From f1e3d1ca3738aac0ba720e4c1d87795d5d0cdcd9 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 5 Jul 2022 03:01:03 +0000 Subject: CTAN sync 202207050301 --- macros/latex/contrib/koma-script/MANIFEST.md | 356 ++ macros/latex/contrib/koma-script/README | 548 -- macros/latex/contrib/koma-script/README.md | 592 ++ macros/latex/contrib/koma-script/doc/INSTALL.txt | 151 - macros/latex/contrib/koma-script/doc/INSTALLD.txt | 153 - .../contrib/koma-script/doc/authorpart-de.tex | 65 + .../contrib/koma-script/doc/authorpart-en.tex | 62 + .../koma-script/doc/common-compatibility-de.tex | 182 + .../koma-script/doc/common-compatibility-en.tex | 175 + .../contrib/koma-script/doc/common-dictum-de.tex | 275 + .../contrib/koma-script/doc/common-dictum-en.tex | 236 + .../koma-script/doc/common-draftmode-de.tex | 112 + .../koma-script/doc/common-draftmode-en.tex | 109 + .../contrib/koma-script/doc/common-fontsize-de.tex | 191 + .../contrib/koma-script/doc/common-fontsize-en.tex | 166 + .../koma-script/doc/common-footnotes-de.tex | 756 +++ .../koma-script/doc/common-footnotes-en.tex | 634 ++ .../doc/common-footnotes-experts-de.tex | 54 + .../doc/common-footnotes-experts-en.tex | 52 + .../koma-script/doc/common-headfootheight-de.tex | 159 + .../koma-script/doc/common-headfootheight-en.tex | 139 + .../koma-script/doc/common-interleafpage-de.tex | 353 + .../koma-script/doc/common-interleafpage-en.tex | 316 + .../contrib/koma-script/doc/common-lists-de.tex | 893 +++ .../contrib/koma-script/doc/common-lists-en.tex | 836 +++ .../koma-script/doc/common-marginpar-de.tex | 129 + .../koma-script/doc/common-marginpar-en.tex | 122 + .../koma-script/doc/common-oddorevenpage-de.tex | 137 + .../koma-script/doc/common-oddorevenpage-en.tex | 129 + .../contrib/koma-script/doc/common-options-de.tex | 228 + .../contrib/koma-script/doc/common-options-en.tex | 197 + .../doc/common-pagestylemanipulation-de.tex | 1156 ++++ .../doc/common-pagestylemanipulation-en.tex | 1034 +++ .../koma-script/doc/common-parmarkup-de.tex | 260 + .../koma-script/doc/common-parmarkup-en.tex | 248 + .../koma-script/doc/common-textmarkup-de.tex | 953 +++ .../koma-script/doc/common-textmarkup-en.tex | 846 +++ .../contrib/koma-script/doc/common-titles-de.tex | 721 +++ .../contrib/koma-script/doc/common-titles-en.tex | 658 ++ .../contrib/koma-script/doc/common-typearea-de.tex | 70 + .../contrib/koma-script/doc/common-typearea-en.tex | 67 + .../contrib/koma-script/doc/expertpart-de.tex | 59 + .../contrib/koma-script/doc/expertpart-en.tex | 58 + .../contrib/koma-script/doc/introduction-de.tex | 381 ++ .../contrib/koma-script/doc/introduction-en.tex | 315 + .../latex/contrib/koma-script/doc/japanlco-en.tex | 580 ++ .../latex/contrib/koma-script/doc/koma-script.html | 60 - macros/latex/contrib/koma-script/doc/komascr.html | 60 - .../latex/contrib/koma-script/doc/komascript.html | 60 - .../koma-script/doc/letter-example-00-de.pdf | Bin 0 -> 14804 bytes .../koma-script/doc/letter-example-00-en.pdf | Bin 0 -> 16176 bytes .../koma-script/doc/letter-example-01-de.pdf | Bin 0 -> 17284 bytes .../koma-script/doc/letter-example-01-en.pdf | Bin 0 -> 18888 bytes .../koma-script/doc/letter-example-02-de.pdf | Bin 0 -> 17530 bytes .../koma-script/doc/letter-example-02-en.pdf | Bin 0 -> 19191 bytes .../koma-script/doc/letter-example-03-de.pdf | Bin 0 -> 17567 bytes .../koma-script/doc/letter-example-03-en.pdf | Bin 0 -> 19225 bytes .../koma-script/doc/letter-example-04-de.pdf | Bin 0 -> 17621 bytes .../koma-script/doc/letter-example-04-en.pdf | Bin 0 -> 19268 bytes .../koma-script/doc/letter-example-05-de.pdf | Bin 0 -> 17717 bytes .../koma-script/doc/letter-example-05-en.pdf | Bin 0 -> 19282 bytes .../koma-script/doc/letter-example-06-de.pdf | Bin 0 -> 17722 bytes .../koma-script/doc/letter-example-06-en.pdf | Bin 0 -> 19282 bytes .../koma-script/doc/letter-example-07-de.pdf | Bin 0 -> 17595 bytes .../koma-script/doc/letter-example-07-en.pdf | Bin 0 -> 19243 bytes .../koma-script/doc/letter-example-08-de.pdf | Bin 0 -> 28921 bytes .../koma-script/doc/letter-example-08-en.pdf | Bin 0 -> 30751 bytes .../koma-script/doc/letter-example-09-de.pdf | Bin 0 -> 28903 bytes .../koma-script/doc/letter-example-09-en.pdf | Bin 0 -> 30731 bytes .../koma-script/doc/letter-example-10-de.pdf | Bin 0 -> 28921 bytes .../koma-script/doc/letter-example-10-en.pdf | Bin 0 -> 30751 bytes .../koma-script/doc/letter-example-11-de.pdf | Bin 0 -> 28924 bytes .../koma-script/doc/letter-example-11-en.pdf | Bin 0 -> 30753 bytes .../koma-script/doc/letter-example-12-de.pdf | Bin 0 -> 28921 bytes .../koma-script/doc/letter-example-12-en.pdf | Bin 0 -> 30751 bytes .../koma-script/doc/letter-example-13-de.pdf | Bin 0 -> 29801 bytes .../koma-script/doc/letter-example-13-en.pdf | Bin 0 -> 31988 bytes .../koma-script/doc/letter-example-14-de.pdf | Bin 0 -> 29774 bytes .../koma-script/doc/letter-example-14-en.pdf | Bin 0 -> 31958 bytes .../koma-script/doc/letter-example-15-de.pdf | Bin 0 -> 29800 bytes .../koma-script/doc/letter-example-15-en.pdf | Bin 0 -> 31988 bytes .../koma-script/doc/letter-example-16-de.pdf | Bin 0 -> 30792 bytes .../koma-script/doc/letter-example-16-en.pdf | Bin 0 -> 32975 bytes .../koma-script/doc/letter-example-17-de.pdf | Bin 0 -> 30818 bytes .../koma-script/doc/letter-example-17-en.pdf | Bin 0 -> 33009 bytes .../koma-script/doc/letter-example-18-de.pdf | Bin 0 -> 30817 bytes .../koma-script/doc/letter-example-18-en.pdf | Bin 0 -> 33001 bytes .../koma-script/doc/letter-example-19-de.pdf | Bin 0 -> 31313 bytes .../koma-script/doc/letter-example-19-en.pdf | Bin 0 -> 33279 bytes .../koma-script/doc/letter-example-20-de.pdf | Bin 0 -> 31498 bytes .../koma-script/doc/letter-example-20-en.pdf | Bin 0 -> 33285 bytes .../koma-script/doc/letter-example-21-de.pdf | Bin 0 -> 42786 bytes .../koma-script/doc/letter-example-21-en.pdf | Bin 0 -> 44408 bytes .../koma-script/doc/letter-example-22-de.pdf | Bin 0 -> 43093 bytes .../koma-script/doc/letter-example-22-en.pdf | Bin 0 -> 44705 bytes .../koma-script/doc/letter-example-23-de.pdf | Bin 0 -> 43093 bytes .../koma-script/doc/letter-example-23-en.pdf | Bin 0 -> 44705 bytes macros/latex/contrib/koma-script/doc/linkalias.tex | 113 + macros/latex/contrib/koma-script/doc/lppl-de.txt | 470 -- macros/latex/contrib/koma-script/doc/lppl.txt | 416 -- macros/latex/contrib/koma-script/doc/manifest.txt | 528 -- .../latex/contrib/koma-script/doc/plength-tikz.tex | 339 + .../latex/contrib/koma-script/doc/preface-de.tex | 106 + .../latex/contrib/koma-script/doc/preface-en.tex | 101 + .../latex/contrib/koma-script/doc/scraddr-de.tex | 266 + .../latex/contrib/koma-script/doc/scraddr-en.tex | 239 + macros/latex/contrib/koma-script/doc/scraddr.html | 57 +- macros/latex/contrib/koma-script/doc/scrartcl.html | 57 +- .../latex/contrib/koma-script/doc/scrarticle.html | 57 + .../latex/contrib/koma-script/doc/scrbase-de.tex | 2159 +++++++ .../latex/contrib/koma-script/doc/scrbase-en.tex | 1932 ++++++ macros/latex/contrib/koma-script/doc/scrbase.html | 57 +- macros/latex/contrib/koma-script/doc/scrbook.html | 57 +- .../koma-script/doc/scrbookreportarticle-de.tex | 5136 +++++++++++++++ .../koma-script/doc/scrbookreportarticle-en.tex | 4678 ++++++++++++++ .../doc/scrbookreportarticle-experts-de.tex | 2110 ++++++ .../doc/scrbookreportarticle-experts-en.tex | 1894 ++++++ .../latex/contrib/koma-script/doc/scrdate-de.tex | 333 + .../latex/contrib/koma-script/doc/scrdate-en.tex | 326 + macros/latex/contrib/koma-script/doc/scrdate.html | 57 +- .../latex/contrib/koma-script/doc/scrextend-de.tex | 225 + .../latex/contrib/koma-script/doc/scrextend-en.tex | 198 + .../latex/contrib/koma-script/doc/scrextend.html | 57 +- .../contrib/koma-script/doc/scrguide-body.tex | 110 + .../latex/contrib/koma-script/doc/scrguide-de.pdf | Bin 0 -> 3257748 bytes .../latex/contrib/koma-script/doc/scrguide-de.tex | 43 + .../latex/contrib/koma-script/doc/scrguide-en.pdf | Bin 0 -> 3163933 bytes .../latex/contrib/koma-script/doc/scrguide-en.tex | 43 + macros/latex/contrib/koma-script/doc/scrguide.bib | 862 +++ macros/latex/contrib/koma-script/doc/scrguide.cls | 2996 +++++++++ macros/latex/contrib/koma-script/doc/scrguide.gst | 63 + macros/latex/contrib/koma-script/doc/scrguide.html | 999 --- macros/latex/contrib/koma-script/doc/scrguide.ist | 52 + macros/latex/contrib/koma-script/doc/scrguide.pdf | Bin 3350180 -> 0 bytes macros/latex/contrib/koma-script/doc/scrguien.html | 1000 --- macros/latex/contrib/koma-script/doc/scrguien.pdf | Bin 3265893 -> 0 bytes .../latex/contrib/koma-script/doc/scrhack-de.tex | 313 + .../latex/contrib/koma-script/doc/scrhack-en.tex | 285 + macros/latex/contrib/koma-script/doc/scrhack.html | 57 +- .../latex/contrib/koma-script/doc/scrjura-de.tex | 1282 ++++ .../latex/contrib/koma-script/doc/scrjura-en.tex | 1164 ++++ .../contrib/koma-script/doc/scrjura-example-de.pdf | Bin 0 -> 56778 bytes .../contrib/koma-script/doc/scrjura-example-de.tex | 145 + .../contrib/koma-script/doc/scrjura-example-en.pdf | Bin 0 -> 57972 bytes .../contrib/koma-script/doc/scrjura-example-en.tex | 143 + macros/latex/contrib/koma-script/doc/scrjura.html | 57 + macros/latex/contrib/koma-script/doc/scrkbase.html | 55 + .../latex/contrib/koma-script/doc/scrlayer-de.tex | 1835 ++++++ .../latex/contrib/koma-script/doc/scrlayer-en.tex | 1605 +++++ .../koma-script/doc/scrlayer-notecolumn-de.tex | 802 +++ .../koma-script/doc/scrlayer-notecolumn-en.tex | 700 ++ .../doc/scrlayer-notecolumn-example-de.pdf | Bin 0 -> 137420 bytes .../doc/scrlayer-notecolumn-example-de.tex | 111 + .../doc/scrlayer-notecolumn-example-en.pdf | Bin 0 -> 135452 bytes .../doc/scrlayer-notecolumn-example-en.tex | 106 + .../koma-script/doc/scrlayer-notecolumn.html | 57 +- .../koma-script/doc/scrlayer-scrpage-de.tex | 1316 ++++ .../koma-script/doc/scrlayer-scrpage-en.tex | 1161 ++++ .../doc/scrlayer-scrpage-experts-de.tex | 428 ++ .../doc/scrlayer-scrpage-experts-en.tex | 370 ++ .../contrib/koma-script/doc/scrlayer-scrpage.html | 57 +- macros/latex/contrib/koma-script/doc/scrlayer.html | 57 +- .../latex/contrib/koma-script/doc/scrletter.html | 57 +- .../latex/contrib/koma-script/doc/scrlfile-de.tex | 749 +++ .../latex/contrib/koma-script/doc/scrlfile-en.tex | 678 ++ .../koma-script/doc/scrlfile-hook-3.34.html | 55 + .../contrib/koma-script/doc/scrlfile-hook.html | 55 + .../koma-script/doc/scrlfile-patcholdlatex.html | 55 + macros/latex/contrib/koma-script/doc/scrlfile.html | 57 +- .../latex/contrib/koma-script/doc/scrlogo-de.tex | 66 + .../latex/contrib/koma-script/doc/scrlogo-en.tex | 66 + macros/latex/contrib/koma-script/doc/scrlogo.html | 57 + .../latex/contrib/koma-script/doc/scrlttr2-de.tex | 5207 +++++++++++++++ .../latex/contrib/koma-script/doc/scrlttr2-en.tex | 4535 +++++++++++++ .../contrib/koma-script/doc/scrlttr2-examples.dtx | 409 ++ .../koma-script/doc/scrlttr2-experts-de.tex | 943 +++ .../koma-script/doc/scrlttr2-experts-en.tex | 823 +++ macros/latex/contrib/koma-script/doc/scrlttr2.html | 57 +- .../latex/contrib/koma-script/doc/scrreport.html | 57 + macros/latex/contrib/koma-script/doc/scrreprt.html | 57 +- .../latex/contrib/koma-script/doc/scrtime-de.tex | 150 + .../latex/contrib/koma-script/doc/scrtime-en.tex | 133 + macros/latex/contrib/koma-script/doc/scrtime.html | 57 +- .../latex/contrib/koma-script/doc/scrwfile-de.tex | 285 + .../latex/contrib/koma-script/doc/scrwfile-en.tex | 265 + macros/latex/contrib/koma-script/doc/scrwfile.html | 57 +- macros/latex/contrib/koma-script/doc/terms-de.tex | 636 ++ macros/latex/contrib/koma-script/doc/terms-en.tex | 606 ++ .../latex/contrib/koma-script/doc/tocbasic-de.tex | 2881 +++++++++ .../latex/contrib/koma-script/doc/tocbasic-en.tex | 2612 ++++++++ macros/latex/contrib/koma-script/doc/tocbasic.html | 57 +- .../latex/contrib/koma-script/doc/typearea-de.tex | 2055 ++++++ .../latex/contrib/koma-script/doc/typearea-en.tex | 1788 ++++++ .../koma-script/doc/typearea-experts-de.tex | 304 + .../koma-script/doc/typearea-experts-en.tex | 266 + macros/latex/contrib/koma-script/doc/typearea.html | 57 +- .../contrib/koma-script/doc/variables-tikz.tex | 212 + macros/latex/contrib/koma-script/japanlco.dtx | 445 ++ .../contrib/koma-script/koma-script-source-doc.dtx | 785 +++ macros/latex/contrib/koma-script/lppl-de.txt | 470 ++ macros/latex/contrib/koma-script/lppl.txt | 416 ++ macros/latex/contrib/koma-script/scraddr.dtx | 296 + macros/latex/contrib/koma-script/scrdoc.cls | 354 + macros/latex/contrib/koma-script/scrdocstrip.tex | 186 + macros/latex/contrib/koma-script/scrextend.dtx | 249 + macros/latex/contrib/koma-script/scrhack.dtx | 1954 ++++++ macros/latex/contrib/koma-script/scrjura.dtx | 2042 ++++++ .../contrib/koma-script/scrkernel-addressfiles.dtx | 164 + .../latex/contrib/koma-script/scrkernel-basics.dtx | 5356 ++++++++++++++++ .../contrib/koma-script/scrkernel-bibliography.dtx | 746 +++ .../koma-script/scrkernel-compatibility.dtx | 759 +++ .../latex/contrib/koma-script/scrkernel-floats.dtx | 1859 ++++++ .../latex/contrib/koma-script/scrkernel-fonts.dtx | 2028 ++++++ .../contrib/koma-script/scrkernel-footnotes.dtx | 635 ++ .../latex/contrib/koma-script/scrkernel-index.dtx | 379 ++ .../contrib/koma-script/scrkernel-language.dtx | 1790 ++++++ .../koma-script/scrkernel-letterclassoptions.dtx | 1719 +++++ .../koma-script/scrkernel-listsandtabulars.dtx | 491 ++ .../contrib/koma-script/scrkernel-listsof.dtx | 1241 ++++ .../koma-script/scrkernel-miscellaneous.dtx | 1117 ++++ .../contrib/koma-script/scrkernel-notepaper.dtx | 5014 +++++++++++++++ .../contrib/koma-script/scrkernel-pagestyles.dtx | 785 +++ .../contrib/koma-script/scrkernel-paragraphs.dtx | 724 +++ .../koma-script/scrkernel-pseudolengths.dtx | 342 + .../contrib/koma-script/scrkernel-sections.dtx | 6754 ++++++++++++++++++++ .../latex/contrib/koma-script/scrkernel-title.dtx | 1003 +++ .../contrib/koma-script/scrkernel-tocstyle.dtx | 2712 ++++++++ .../contrib/koma-script/scrkernel-typearea.dtx | 3239 ++++++++++ .../contrib/koma-script/scrkernel-variables.dtx | 463 ++ .../contrib/koma-script/scrkernel-version.dtx | 263 + .../contrib/koma-script/scrlayer-notecolumn.dtx | 1703 +++++ .../latex/contrib/koma-script/scrlayer-scrpage.dtx | 2495 ++++++++ macros/latex/contrib/koma-script/scrlayer.dtx | 4375 +++++++++++++ macros/latex/contrib/koma-script/scrlfile-hook.dtx | 707 ++ .../contrib/koma-script/scrlfile-patcholdlatex.dtx | 1251 ++++ macros/latex/contrib/koma-script/scrlfile.dtx | 273 + macros/latex/contrib/koma-script/scrlogo.dtx | 138 + macros/latex/contrib/koma-script/scrmain.ins | 457 ++ macros/latex/contrib/koma-script/scrstrip.inc | 92 + macros/latex/contrib/koma-script/scrstrop.inc | 50 + macros/latex/contrib/koma-script/scrtime.dtx | 765 +++ macros/latex/contrib/koma-script/scrwfile.dtx | 502 ++ .../latex/contrib/koma-script/source-doc/Makefile | 219 - .../contrib/koma-script/source-doc/Makefile.guide | 337 - .../koma-script/source-doc/Makefile.latexinit | 68 - .../koma-script/source-doc/bin/genhtmlidx.pl | 205 - .../contrib/koma-script/source-doc/bin/genindex.pl | 204 - .../koma-script/source-doc/english/Makefile | 55 - .../koma-script/source-doc/english/adrconvnote.tex | 99 - .../koma-script/source-doc/english/authorpart.tex | 80 - .../source-doc/english/common-compatibility.tex | 197 - .../source-doc/english/common-dictum.tex | 260 - .../source-doc/english/common-draftmode.tex | 131 - .../source-doc/english/common-fontsize.tex | 189 - .../english/common-footnotes-experts.tex | 54 - .../source-doc/english/common-footnotes.tex | 636 -- .../source-doc/english/common-headfootheight.tex | 163 - .../source-doc/english/common-interleafpage.tex | 340 - .../source-doc/english/common-lists.tex | 858 --- .../source-doc/english/common-marginpar.tex | 144 - .../source-doc/english/common-oddorevenpage.tex | 151 - .../source-doc/english/common-options.tex | 221 - .../english/common-pagestylemanipulation.tex | 1058 --- .../source-doc/english/common-parmarkup.tex | 271 - .../source-doc/english/common-textmarkup.tex | 870 --- .../source-doc/english/common-titles.tex | 680 -- .../source-doc/english/common-typearea.tex | 91 - .../koma-script/source-doc/english/expertpart.tex | 78 - .../source-doc/english/guide-english.tex | 541 -- .../koma-script/source-doc/english/guide.tex | 1 - .../koma-script/source-doc/english/htmlsetup | 65 - .../source-doc/english/introduction.tex | 352 - .../koma-script/source-doc/english/japanlco.tex | 600 -- .../koma-script/source-doc/english/linkalias.tex | 1 - .../koma-script/source-doc/english/preface.tex | 126 - .../koma-script/source-doc/english/scraddr.tex | 261 - .../koma-script/source-doc/english/scrbase.tex | 1928 ------ .../english/scrbookreportarticle-experts.tex | 1898 ------ .../source-doc/english/scrbookreportarticle.tex | 4701 -------------- .../koma-script/source-doc/english/scrdatetime.tex | 443 -- .../koma-script/source-doc/english/scrextend.tex | 222 - .../koma-script/source-doc/english/scrhack.tex | 309 - .../koma-script/source-doc/english/scrjura.tex | 1188 ---- .../source-doc/english/scrjuraexample.tex | 143 - .../english/scrlayer-notecolumn-example.tex | 121 - .../source-doc/english/scrlayer-notecolumn.tex | 723 --- .../english/scrlayer-scrpage-experts.tex | 393 -- .../source-doc/english/scrlayer-scrpage.tex | 1184 ---- .../koma-script/source-doc/english/scrlayer.tex | 1631 ----- .../koma-script/source-doc/english/scrlfile.tex | 702 -- .../source-doc/english/scrlttr2-experts.tex | 847 --- .../koma-script/source-doc/english/scrlttr2.tex | 4545 ------------- .../source-doc/english/scrlttr2examples.dtx | 347 - .../koma-script/source-doc/english/scrwfile.tex | 289 - .../koma-script/source-doc/english/tocbasic.tex | 2637 -------- .../source-doc/english/typearea-experts.tex | 290 - .../koma-script/source-doc/english/typearea.tex | 1812 ------ .../latex/contrib/koma-script/source-doc/guide.bib | 871 --- .../latex/contrib/koma-script/source-doc/guide.tex | 139 - .../contrib/koma-script/source-doc/linkalias.tex | 124 - .../koma-script/source-doc/ngerman/Makefile | 50 - .../koma-script/source-doc/ngerman/adrconvnote.tex | 100 - .../koma-script/source-doc/ngerman/authorpart.tex | 83 - .../source-doc/ngerman/common-compatibility.tex | 202 - .../source-doc/ngerman/common-dictum.tex | 299 - .../source-doc/ngerman/common-draftmode.tex | 132 - .../source-doc/ngerman/common-fontsize.tex | 211 - .../ngerman/common-footnotes-experts.tex | 76 - .../source-doc/ngerman/common-footnotes.tex | 779 --- .../source-doc/ngerman/common-headfootheight.tex | 185 - .../source-doc/ngerman/common-interleafpage.tex | 376 -- .../source-doc/ngerman/common-lists.tex | 914 --- .../source-doc/ngerman/common-marginpar.tex | 155 - .../source-doc/ngerman/common-oddorevenpage.tex | 158 - .../source-doc/ngerman/common-options.tex | 248 - .../ngerman/common-pagestylemanipulation.tex | 1179 ---- .../source-doc/ngerman/common-parmarkup.tex | 280 - .../source-doc/ngerman/common-textmarkup.tex | 974 --- .../source-doc/ngerman/common-titles.tex | 745 --- .../source-doc/ngerman/common-typearea.tex | 92 - .../koma-script/source-doc/ngerman/expertpart.tex | 77 - .../source-doc/ngerman/guide-ngerman.tex | 569 -- .../koma-script/source-doc/ngerman/guide.tex | 1 - .../koma-script/source-doc/ngerman/htmlsetup | 65 - .../source-doc/ngerman/introduction.tex | 424 -- .../koma-script/source-doc/ngerman/linkalias.tex | 1 - .../koma-script/source-doc/ngerman/preface.tex | 125 - .../koma-script/source-doc/ngerman/scraddr.tex | 287 - .../koma-script/source-doc/ngerman/scrbase.tex | 2182 ------- .../ngerman/scrbookreportarticle-experts.tex | 2133 ------- .../source-doc/ngerman/scrbookreportarticle.tex | 5162 --------------- .../koma-script/source-doc/ngerman/scrdatetime.tex | 468 -- .../koma-script/source-doc/ngerman/scrextend.tex | 245 - .../koma-script/source-doc/ngerman/scrhack.tex | 333 - .../koma-script/source-doc/ngerman/scrjura.tex | 1298 ---- .../source-doc/ngerman/scrjuraexample.tex | 145 - .../ngerman/scrlayer-notecolumn-example.tex | 126 - .../source-doc/ngerman/scrlayer-notecolumn.tex | 821 --- .../ngerman/scrlayer-scrpage-experts.tex | 450 -- .../source-doc/ngerman/scrlayer-scrpage.tex | 1339 ---- .../koma-script/source-doc/ngerman/scrlayer.tex | 1860 ------ .../koma-script/source-doc/ngerman/scrlfile.tex | 769 --- .../source-doc/ngerman/scrlttr2-experts.tex | 967 --- .../koma-script/source-doc/ngerman/scrlttr2.tex | 5224 --------------- .../source-doc/ngerman/scrlttr2examples.dtx | 347 - .../koma-script/source-doc/ngerman/scrwfile.tex | 307 - .../koma-script/source-doc/ngerman/tocbasic.tex | 2903 --------- .../source-doc/ngerman/typearea-experts.tex | 324 - .../koma-script/source-doc/ngerman/typearea.tex | 2074 ------ .../contrib/koma-script/source-doc/plength.dtx | 1323 ---- .../contrib/koma-script/source-doc/scrguide.cls | 2945 --------- .../contrib/koma-script/source-doc/scrguide.gst | 63 - .../contrib/koma-script/source-doc/scrguide.ist | 52 - macros/latex/contrib/koma-script/source/Makefile | 468 -- .../contrib/koma-script/source/Makefile.baseinit | 225 - .../contrib/koma-script/source/Makefile.baserules | 144 - .../latex/contrib/koma-script/source/japanlco.dtx | 445 -- .../koma-script/source/koma-script-source-doc.dtx | 785 --- .../latex/contrib/koma-script/source/scraddr.dtx | 296 - macros/latex/contrib/koma-script/source/scrdoc.dtx | 438 -- .../contrib/koma-script/source/scrdocstrip.tex | 311 - .../latex/contrib/koma-script/source/scrextend.dtx | 249 - .../latex/contrib/koma-script/source/scrhack.dtx | 1954 ------ .../latex/contrib/koma-script/source/scrjura.dtx | 2042 ------ .../koma-script/source/scrkernel-addressfiles.dtx | 164 - .../koma-script/source/scrkernel-basics.dtx | 5341 ---------------- .../koma-script/source/scrkernel-bibliography.dtx | 746 --- .../koma-script/source/scrkernel-compatibility.dtx | 675 -- .../koma-script/source/scrkernel-floats.dtx | 1859 ------ .../contrib/koma-script/source/scrkernel-fonts.dtx | 2028 ------ .../koma-script/source/scrkernel-footnotes.dtx | 635 -- .../contrib/koma-script/source/scrkernel-index.dtx | 379 -- .../koma-script/source/scrkernel-language.dtx | 1790 ------ .../source/scrkernel-letterclassoptions.dtx | 1719 ----- .../source/scrkernel-listsandtabulars.dtx | 491 -- .../koma-script/source/scrkernel-listsof.dtx | 1240 ---- .../koma-script/source/scrkernel-miscellaneous.dtx | 1111 ---- .../koma-script/source/scrkernel-notepaper.dtx | 5012 --------------- .../koma-script/source/scrkernel-pagestyles.dtx | 784 --- .../koma-script/source/scrkernel-paragraphs.dtx | 724 --- .../koma-script/source/scrkernel-pseudolengths.dtx | 342 - .../koma-script/source/scrkernel-sections.dtx | 6754 -------------------- .../contrib/koma-script/source/scrkernel-title.dtx | 1003 --- .../koma-script/source/scrkernel-tocstyle.dtx | 2712 -------- .../koma-script/source/scrkernel-typearea.dtx | 3225 ---------- .../koma-script/source/scrkernel-variables.dtx | 463 -- .../koma-script/source/scrkernel-version.dtx | 235 - .../koma-script/source/scrlayer-notecolumn.dtx | 1703 ----- .../koma-script/source/scrlayer-scrpage.dtx | 2495 -------- .../latex/contrib/koma-script/source/scrlayer.dtx | 4352 ------------- .../contrib/koma-script/source/scrlfile-hook.dtx | 707 -- .../koma-script/source/scrlfile-patcholdlatex.dtx | 1251 ---- .../latex/contrib/koma-script/source/scrlfile.dtx | 273 - .../latex/contrib/koma-script/source/scrlogo.dtx | 138 - .../latex/contrib/koma-script/source/scrmain.ins | 457 -- .../latex/contrib/koma-script/source/scrsource.tex | 137 - .../latex/contrib/koma-script/source/scrstrip.inc | 119 - .../latex/contrib/koma-script/source/scrstrop.inc | 67 - .../latex/contrib/koma-script/source/scrtime.dtx | 765 --- .../latex/contrib/koma-script/source/scrwfile.dtx | 502 -- .../latex/contrib/koma-script/source/tocbasic.dtx | 2002 ------ macros/latex/contrib/koma-script/tocbasic.dtx | 2003 ++++++ macros/latex/contrib/l3kernel/CHANGELOG.md | 10 +- macros/latex/contrib/l3kernel/README.md | 2 +- macros/latex/contrib/l3kernel/expl3.dtx | 4 +- macros/latex/contrib/l3kernel/expl3.pdf | Bin 625880 -> 625919 bytes macros/latex/contrib/l3kernel/interface3.pdf | Bin 1767165 -> 1768279 bytes macros/latex/contrib/l3kernel/interface3.tex | 2 +- macros/latex/contrib/l3kernel/l3basics.dtx | 2 +- macros/latex/contrib/l3kernel/l3bootstrap.dtx | 2 +- macros/latex/contrib/l3kernel/l3box.dtx | 2 +- macros/latex/contrib/l3kernel/l3candidates.dtx | 2 +- macros/latex/contrib/l3kernel/l3cctab.dtx | 2 +- macros/latex/contrib/l3kernel/l3clist.dtx | 2 +- macros/latex/contrib/l3kernel/l3coffins.dtx | 2 +- macros/latex/contrib/l3kernel/l3color.dtx | 2 +- macros/latex/contrib/l3kernel/l3debug.dtx | 2 +- macros/latex/contrib/l3kernel/l3deprecation.dtx | 2 +- macros/latex/contrib/l3kernel/l3doc.dtx | 2 +- macros/latex/contrib/l3kernel/l3doc.pdf | Bin 557760 -> 557804 bytes macros/latex/contrib/l3kernel/l3docstrip.dtx | 2 +- macros/latex/contrib/l3kernel/l3docstrip.pdf | Bin 151536 -> 151561 bytes macros/latex/contrib/l3kernel/l3expan.dtx | 2 +- macros/latex/contrib/l3kernel/l3file.dtx | 2 +- macros/latex/contrib/l3kernel/l3flag.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-assign.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-aux.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-basics.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-convert.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-expo.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-extended.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-logic.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-parse.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-random.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-round.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-traps.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-trig.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp.dtx | 2 +- macros/latex/contrib/l3kernel/l3fparray.dtx | 2 +- macros/latex/contrib/l3kernel/l3int.dtx | 2 +- macros/latex/contrib/l3kernel/l3intarray.dtx | 2 +- .../latex/contrib/l3kernel/l3kernel-functions.dtx | 2 +- macros/latex/contrib/l3kernel/l3keys.dtx | 2 +- macros/latex/contrib/l3kernel/l3legacy.dtx | 2 +- macros/latex/contrib/l3kernel/l3luatex.dtx | 2 +- macros/latex/contrib/l3kernel/l3msg.dtx | 2 +- macros/latex/contrib/l3kernel/l3names.dtx | 2 +- macros/latex/contrib/l3kernel/l3news.pdf | Bin 395879 -> 395879 bytes macros/latex/contrib/l3kernel/l3news01.pdf | Bin 122710 -> 122710 bytes macros/latex/contrib/l3kernel/l3news02.pdf | Bin 150676 -> 150676 bytes macros/latex/contrib/l3kernel/l3news03.pdf | Bin 148702 -> 148702 bytes macros/latex/contrib/l3kernel/l3news04.pdf | Bin 114588 -> 114588 bytes macros/latex/contrib/l3kernel/l3news05.pdf | Bin 112487 -> 112487 bytes macros/latex/contrib/l3kernel/l3news06.pdf | Bin 151573 -> 151573 bytes macros/latex/contrib/l3kernel/l3news07.pdf | Bin 128309 -> 128309 bytes macros/latex/contrib/l3kernel/l3news08.pdf | Bin 163454 -> 163454 bytes macros/latex/contrib/l3kernel/l3news09.pdf | Bin 250139 -> 250139 bytes macros/latex/contrib/l3kernel/l3news10.pdf | Bin 150279 -> 150279 bytes macros/latex/contrib/l3kernel/l3news11.pdf | Bin 170063 -> 170063 bytes macros/latex/contrib/l3kernel/l3news12.pdf | Bin 204990 -> 204990 bytes macros/latex/contrib/l3kernel/l3pdf.dtx | 2 +- macros/latex/contrib/l3kernel/l3prefixes.pdf | Bin 81493 -> 81493 bytes macros/latex/contrib/l3kernel/l3prg.dtx | 2 +- macros/latex/contrib/l3kernel/l3prop.dtx | 2 +- macros/latex/contrib/l3kernel/l3quark.dtx | 2 +- macros/latex/contrib/l3kernel/l3regex.dtx | 2 +- macros/latex/contrib/l3kernel/l3seq.dtx | 2 +- macros/latex/contrib/l3kernel/l3skip.dtx | 2 +- macros/latex/contrib/l3kernel/l3sort.dtx | 2 +- macros/latex/contrib/l3kernel/l3str-convert.dtx | 2 +- macros/latex/contrib/l3kernel/l3str.dtx | 2 +- macros/latex/contrib/l3kernel/l3styleguide.pdf | Bin 295942 -> 295977 bytes macros/latex/contrib/l3kernel/l3styleguide.tex | 2 +- macros/latex/contrib/l3kernel/l3syntax-changes.pdf | Bin 242612 -> 242655 bytes macros/latex/contrib/l3kernel/l3syntax-changes.tex | 2 +- macros/latex/contrib/l3kernel/l3sys.dtx | 2 +- macros/latex/contrib/l3kernel/l3term-glossary.pdf | Bin 230997 -> 231062 bytes macros/latex/contrib/l3kernel/l3term-glossary.tex | 4 +- macros/latex/contrib/l3kernel/l3text-case.dtx | 81 +- macros/latex/contrib/l3kernel/l3text-purify.dtx | 2 +- macros/latex/contrib/l3kernel/l3text.dtx | 26 +- macros/latex/contrib/l3kernel/l3tl-analysis.dtx | 2 +- macros/latex/contrib/l3kernel/l3tl.dtx | 2 +- macros/latex/contrib/l3kernel/l3token.dtx | 2 +- macros/latex/contrib/l3kernel/l3unicode.dtx | 2 +- macros/latex/contrib/l3kernel/source3.pdf | Bin 7220729 -> 7226173 bytes macros/latex/contrib/l3kernel/source3.tex | 2 +- macros/latex/contrib/sapthesis/sapthesis-doc.pdf | Bin 365890 -> 325567 bytes macros/latex/contrib/sapthesis/sapthesis-doc.tex | 2 +- macros/latex/contrib/sapthesis/sapthesis.cls | 12 +- 490 files changed, 139527 insertions(+), 146555 deletions(-) create mode 100644 macros/latex/contrib/koma-script/MANIFEST.md delete mode 100644 macros/latex/contrib/koma-script/README create mode 100644 macros/latex/contrib/koma-script/README.md delete mode 100644 macros/latex/contrib/koma-script/doc/INSTALL.txt delete mode 100644 macros/latex/contrib/koma-script/doc/INSTALLD.txt create mode 100644 macros/latex/contrib/koma-script/doc/authorpart-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/authorpart-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-compatibility-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-compatibility-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-dictum-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-dictum-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-draftmode-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-draftmode-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-fontsize-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-fontsize-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-footnotes-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-footnotes-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-footnotes-experts-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-footnotes-experts-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-headfootheight-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-headfootheight-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-interleafpage-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-interleafpage-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-lists-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-lists-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-marginpar-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-marginpar-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-oddorevenpage-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-oddorevenpage-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-options-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-options-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-pagestylemanipulation-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-pagestylemanipulation-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-parmarkup-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-parmarkup-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-textmarkup-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-textmarkup-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-titles-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-titles-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-typearea-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/common-typearea-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/expertpart-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/expertpart-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/introduction-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/introduction-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/japanlco-en.tex delete mode 100644 macros/latex/contrib/koma-script/doc/koma-script.html delete mode 100644 macros/latex/contrib/koma-script/doc/komascr.html delete mode 100644 macros/latex/contrib/koma-script/doc/komascript.html create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-00-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-00-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-01-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-01-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-02-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-02-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-03-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-03-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-04-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-04-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-05-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-05-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-06-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-06-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-07-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-07-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-08-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-08-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-09-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-09-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-10-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-10-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-11-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-11-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-12-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-12-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-13-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-13-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-14-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-14-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-15-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-15-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-16-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-16-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-17-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-17-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-18-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-18-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-19-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-19-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-20-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-20-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-21-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-21-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-22-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-22-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-23-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/letter-example-23-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/linkalias.tex delete mode 100644 macros/latex/contrib/koma-script/doc/lppl-de.txt delete mode 100644 macros/latex/contrib/koma-script/doc/lppl.txt delete mode 100644 macros/latex/contrib/koma-script/doc/manifest.txt create mode 100644 macros/latex/contrib/koma-script/doc/plength-tikz.tex create mode 100644 macros/latex/contrib/koma-script/doc/preface-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/preface-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scraddr-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scraddr-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrarticle.html create mode 100644 macros/latex/contrib/koma-script/doc/scrbase-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrbase-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrbookreportarticle-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrbookreportarticle-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrbookreportarticle-experts-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrbookreportarticle-experts-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrdate-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrdate-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrextend-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrextend-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrguide-body.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrguide-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/scrguide-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrguide-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/scrguide-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrguide.bib create mode 100644 macros/latex/contrib/koma-script/doc/scrguide.cls create mode 100644 macros/latex/contrib/koma-script/doc/scrguide.gst delete mode 100644 macros/latex/contrib/koma-script/doc/scrguide.html create mode 100644 macros/latex/contrib/koma-script/doc/scrguide.ist delete mode 100644 macros/latex/contrib/koma-script/doc/scrguide.pdf delete mode 100644 macros/latex/contrib/koma-script/doc/scrguien.html delete mode 100644 macros/latex/contrib/koma-script/doc/scrguien.pdf create mode 100644 macros/latex/contrib/koma-script/doc/scrhack-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrhack-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrjura-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrjura-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrjura-example-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/scrjura-example-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrjura-example-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/scrjura-example-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrjura.html create mode 100644 macros/latex/contrib/koma-script/doc/scrkbase.html create mode 100644 macros/latex/contrib/koma-script/doc/scrlayer-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlayer-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-de.pdf create mode 100644 macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-en.pdf create mode 100644 macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlayer-scrpage-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlayer-scrpage-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlayer-scrpage-experts-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlayer-scrpage-experts-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlfile-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlfile-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlfile-hook-3.34.html create mode 100644 macros/latex/contrib/koma-script/doc/scrlfile-hook.html create mode 100644 macros/latex/contrib/koma-script/doc/scrlfile-patcholdlatex.html create mode 100644 macros/latex/contrib/koma-script/doc/scrlogo-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlogo-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlogo.html create mode 100644 macros/latex/contrib/koma-script/doc/scrlttr2-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlttr2-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlttr2-examples.dtx create mode 100644 macros/latex/contrib/koma-script/doc/scrlttr2-experts-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrlttr2-experts-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrreport.html create mode 100644 macros/latex/contrib/koma-script/doc/scrtime-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrtime-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrwfile-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/scrwfile-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/terms-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/terms-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/tocbasic-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/tocbasic-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/typearea-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/typearea-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/typearea-experts-de.tex create mode 100644 macros/latex/contrib/koma-script/doc/typearea-experts-en.tex create mode 100644 macros/latex/contrib/koma-script/doc/variables-tikz.tex create mode 100644 macros/latex/contrib/koma-script/japanlco.dtx create mode 100644 macros/latex/contrib/koma-script/koma-script-source-doc.dtx create mode 100644 macros/latex/contrib/koma-script/lppl-de.txt create mode 100644 macros/latex/contrib/koma-script/lppl.txt create mode 100644 macros/latex/contrib/koma-script/scraddr.dtx create mode 100644 macros/latex/contrib/koma-script/scrdoc.cls create mode 100644 macros/latex/contrib/koma-script/scrdocstrip.tex create mode 100644 macros/latex/contrib/koma-script/scrextend.dtx create mode 100644 macros/latex/contrib/koma-script/scrhack.dtx create mode 100644 macros/latex/contrib/koma-script/scrjura.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-addressfiles.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-basics.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-bibliography.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-compatibility.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-floats.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-fonts.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-footnotes.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-index.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-language.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-letterclassoptions.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-listsandtabulars.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-listsof.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-miscellaneous.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-notepaper.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-pagestyles.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-paragraphs.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-pseudolengths.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-sections.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-title.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-tocstyle.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-typearea.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-variables.dtx create mode 100644 macros/latex/contrib/koma-script/scrkernel-version.dtx create mode 100644 macros/latex/contrib/koma-script/scrlayer-notecolumn.dtx create mode 100644 macros/latex/contrib/koma-script/scrlayer-scrpage.dtx create mode 100644 macros/latex/contrib/koma-script/scrlayer.dtx create mode 100644 macros/latex/contrib/koma-script/scrlfile-hook.dtx create mode 100644 macros/latex/contrib/koma-script/scrlfile-patcholdlatex.dtx create mode 100644 macros/latex/contrib/koma-script/scrlfile.dtx create mode 100644 macros/latex/contrib/koma-script/scrlogo.dtx create mode 100644 macros/latex/contrib/koma-script/scrmain.ins create mode 100644 macros/latex/contrib/koma-script/scrstrip.inc create mode 100644 macros/latex/contrib/koma-script/scrstrop.inc create mode 100644 macros/latex/contrib/koma-script/scrtime.dtx create mode 100644 macros/latex/contrib/koma-script/scrwfile.dtx delete mode 100644 macros/latex/contrib/koma-script/source-doc/Makefile delete mode 100644 macros/latex/contrib/koma-script/source-doc/Makefile.guide delete mode 100644 macros/latex/contrib/koma-script/source-doc/Makefile.latexinit delete mode 100755 macros/latex/contrib/koma-script/source-doc/bin/genhtmlidx.pl delete mode 100755 macros/latex/contrib/koma-script/source-doc/bin/genindex.pl delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/Makefile delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/adrconvnote.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/authorpart.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-compatibility.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-dictum.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-draftmode.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-fontsize.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-footnotes-experts.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-footnotes.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-headfootheight.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-interleafpage.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-lists.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-marginpar.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-oddorevenpage.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-options.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-pagestylemanipulation.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-parmarkup.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-textmarkup.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-titles.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/common-typearea.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/expertpart.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/guide-english.tex delete mode 120000 macros/latex/contrib/koma-script/source-doc/english/guide.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/htmlsetup delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/introduction.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/japanlco.tex delete mode 120000 macros/latex/contrib/koma-script/source-doc/english/linkalias.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/preface.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scraddr.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrbase.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrbookreportarticle-experts.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrbookreportarticle.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrdatetime.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrextend.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrhack.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrjura.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrjuraexample.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrlayer-notecolumn-example.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrlayer-notecolumn.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrlayer-scrpage-experts.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrlayer-scrpage.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrlayer.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrlfile.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrlttr2-experts.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrlttr2.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrlttr2examples.dtx delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/scrwfile.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/tocbasic.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/typearea-experts.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/english/typearea.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/guide.bib delete mode 100644 macros/latex/contrib/koma-script/source-doc/guide.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/linkalias.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/Makefile delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/adrconvnote.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/authorpart.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-compatibility.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-dictum.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-draftmode.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-fontsize.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-footnotes-experts.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-footnotes.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-headfootheight.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-interleafpage.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-lists.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-marginpar.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-oddorevenpage.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-options.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-pagestylemanipulation.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-parmarkup.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-textmarkup.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-titles.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/common-typearea.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/expertpart.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/guide-ngerman.tex delete mode 120000 macros/latex/contrib/koma-script/source-doc/ngerman/guide.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/htmlsetup delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/introduction.tex delete mode 120000 macros/latex/contrib/koma-script/source-doc/ngerman/linkalias.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/preface.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scraddr.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrbase.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrbookreportarticle-experts.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrbookreportarticle.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrdatetime.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrextend.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrhack.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrjura.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrjuraexample.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrlayer-notecolumn-example.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrlayer-notecolumn.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrlayer-scrpage-experts.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrlayer-scrpage.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrlayer.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrlfile.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrlttr2-experts.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrlttr2.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrlttr2examples.dtx delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/scrwfile.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/tocbasic.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/typearea-experts.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/ngerman/typearea.tex delete mode 100644 macros/latex/contrib/koma-script/source-doc/plength.dtx delete mode 100644 macros/latex/contrib/koma-script/source-doc/scrguide.cls delete mode 100644 macros/latex/contrib/koma-script/source-doc/scrguide.gst delete mode 100644 macros/latex/contrib/koma-script/source-doc/scrguide.ist delete mode 100644 macros/latex/contrib/koma-script/source/Makefile delete mode 100644 macros/latex/contrib/koma-script/source/Makefile.baseinit delete mode 100644 macros/latex/contrib/koma-script/source/Makefile.baserules delete mode 100644 macros/latex/contrib/koma-script/source/japanlco.dtx delete mode 100644 macros/latex/contrib/koma-script/source/koma-script-source-doc.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scraddr.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrdoc.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrdocstrip.tex delete mode 100644 macros/latex/contrib/koma-script/source/scrextend.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrhack.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrjura.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-addressfiles.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-basics.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-bibliography.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-compatibility.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-floats.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-fonts.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-footnotes.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-index.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-language.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-letterclassoptions.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-listsandtabulars.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-listsof.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-miscellaneous.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-notepaper.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-pagestyles.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-paragraphs.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-pseudolengths.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-sections.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-title.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-tocstyle.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-typearea.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-variables.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrkernel-version.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrlayer-notecolumn.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrlayer-scrpage.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrlayer.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrlfile-hook.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrlfile-patcholdlatex.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrlfile.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrlogo.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrmain.ins delete mode 100644 macros/latex/contrib/koma-script/source/scrsource.tex delete mode 100644 macros/latex/contrib/koma-script/source/scrstrip.inc delete mode 100644 macros/latex/contrib/koma-script/source/scrstrop.inc delete mode 100644 macros/latex/contrib/koma-script/source/scrtime.dtx delete mode 100644 macros/latex/contrib/koma-script/source/scrwfile.dtx delete mode 100644 macros/latex/contrib/koma-script/source/tocbasic.dtx create mode 100644 macros/latex/contrib/koma-script/tocbasic.dtx (limited to 'macros/latex') diff --git a/macros/latex/contrib/koma-script/MANIFEST.md b/macros/latex/contrib/koma-script/MANIFEST.md new file mode 100644 index 0000000000..e1a7c9a9fb --- /dev/null +++ b/macros/latex/contrib/koma-script/MANIFEST.md @@ -0,0 +1,356 @@ +# Manifest of KOMA-Script + +This file is a listing of all files considered to be part of the +KOMA-Script bundle of LaTeX classes and packages. It is *not* automatically +generated but handmade. + +## Source files + +The following files are source files of the KOMA-Script bundle of LaTeX +classes and packages. All these files are also included in the TDS and the +CTAN files. All these files are mandatory for legal distributions of the +KOMA-Script bundle of LaTeX classes and packages. + +**Note:** You can generate the implementation documentation of every file with + extension “`.dtx`” using `lualatex-dev` and `mkindex`. However, you first need + to unpack `koma-script-source-doc.cls` using + “`tex koma-script-source-doc.dtx`”. + +* `japanlco.dtx` +* `koma-script-source-doc.dtx` +* `scraddr.dtx` +* `scrextend.dtx` +* `scrhack.dtx` +* `scrjura.dtx` +* `scrkernel-addressfiles.dtx` +* `scrkernel-basics.dtx` +* `scrkernel-bibliography.dtx` +* `scrkernel-compatibility.dtx` +* `scrkernel-floats.dtx` +* `scrkernel-fonts.dtx` +* `scrkernel-footnotes.dtx` +* `scrkernel-index.dtx` +* `scrkernel-language.dtx` +* `scrkernel-letterclassoptions.dtx` +* `scrkernel-listsof.dtx` +* `scrkernel-miscellaneous.dtx` +* `scrkernel-notepaper.dtx` +* `scrkernel-pagestyles.dtx` +* `scrkernel-paragraphs.dtx` +* `scrkernel-pseudolength.dtx` +* `scrkernel-sections.dtx` +* `scrkernel-title.dtx` +* `scrkernel-tocstyle.dtx` +* `scrkernel-typearea.dtx` +* `scrkernel-variables.dtx` +* `scrkernel-version.dtx` +* `scrlayer.dtx` +* `scrlayer-notecolumn.dtx` +* `scrlayer-scrpage.dtx` +* `scrlfile.dtx` +* `scrlfile-hook.dtx` +* `scrlfile-patcholdlatex.dtx` +* `scrlogo.dtx` +* `scrtime.dtx` +* `scrwfile.dtx` +* `tocbasic.dtx` +* `scrjura.dtx` +* `scrmain.ins` +* `scrstrip.inc` +* `scrstrop.inc` +* `scrdocstrip.tex` +* `scrdoc.cls` (deprecated) + +## Typeset documentation source files + +### User manual main files + +These files are typeset using LaTeX to produce the user manuals of the +KOMA-Script bundle of LaTeX classes and packages. All these files are also +include in the TDS and the CTAN files. All these files are mandatory for legal +distributions of the KOMA-Script bundle of LaTeX classes and packages. + +* `scrguide-en.tex` (English user manual main file) +* `scrguide-de.tex` (German user manual main file) + +### User manual additional files + +These files are also needed to produce the user manuals of the KOMA-Script +bundle of LaTeX classes and packages. All these files are also include in +the TDS and the CTAN files. All these files are mandatory for legal +distributions of the KOMA-Script bundle of LaTeX classes and packages. + +**Note:** Files ending with “`-en.tex`” are part of the English user + manual. Files ending with “`-de.tex`” are part of the German user + manual. All other files are part of both, the English and the German user + manual. + +* `scrlttr2-examples.dtx` (has to unpacked using “`tex scrlttr2-examples.dtx`” + before using LaTeX to produce the user manuals) +* `scrguide.cls` +* `scrguide.ist` +* `scrguide.gst` +* `scrguide-body.tex` +* `linkalias.tex` +* `plength-tikz.tex` +* `variables-tikz.tex` +* `terms-en.tex` +* `preface-en.tex` +* `introduction-en.tex` +* `authorpart-en.tex` +* `typearea-en.tex` +* `scrbookreportarticle-en.tex` +* `scrlttr2-en.tex` +* `scrlayer-scrpage-en.tex` +* `scrdate-en.tex` +* `scrtime-en.tex` +* `scraddr-en.tex` +* `scrextend-en.tex` +* `scrjura-en.tex` +* `scrlogo-en.tex` +* `common-options-en.tex` +* `common-compatibility-en.tex` +* `common-draftmode-en.tex` +* `common-typearea-en.tex` +* `common-fontsize-en.tex` +* `common-textmarkup-en.tex` +* `common-titles-en.tex` +* `common-parmarkup-en.tex` +* `common-oddorevenpage-en.tex` +* `common-interleafpage-en.tex` +* `common-footnotes-en.tex` +* `common-dictum-en.tex` +* `common-lists-en.tex` +* `common-marginpar-en.tex` +* `common-headfootheight-en.tex` +* `common-pagestylemanipulation-en.tex` +* `expertpart-en.tex` +* `scrbase-en.tex` +* `scrlfile-en.tex` +* `scrwfile-en.tex` +* `tocbasic-en.tex` +* `scrhack-en.tex` +* `scrlayer-en.tex` +* `scrlayer-scrpage-experts-en.tex` +* `scrlayer-notecolumn-en.tex` +* `typearea-experts-en.tex` +* `scrbookreportarticle-experts-en.tex` +* `scrlttr2-experts-en.tex` +* `common-footnotes-experts-en.tex` +* `japanlco-en.tex` +* `terms-de.tex` +* `preface-de.tex` +* `introduction-de.tex` +* `authorpart-de.tex` +* `typearea-de.tex` +* `scrbookreportarticle-de.tex` +* `scrlttr2-de.tex` +* `scrlayer-scrpage-de.tex` +* `scrdate-de.tex` +* `scrtime-de.tex` +* `scraddr-de.tex` +* `scrextend-de.tex` +* `scrjura-de.tex` +* `scrlogo-de.tex` +* `common-options-de.tex` +* `common-compatibility-de.tex` +* `common-draftmode-de.tex` +* `common-typearea-de.tex` +* `common-fontsize-de.tex` +* `common-textmarkup-de.tex` +* `common-titles-de.tex` +* `common-parmarkup-de.tex` +* `common-oddorevenpage-de.tex` +* `common-interleafpage-de.tex` +* `common-footnotes-de.tex` +* `common-dictum-de.tex` +* `common-lists-de.tex` +* `common-marginpar-de.tex` +* `common-headfootheight-de.tex` +* `common-pagestylemanipulation-de.tex` +* `expertpart-de.tex` +* `scrbase-de.tex` +* `scrlfile-de.tex` +* `scrwfile-de.tex` +* `tocbasic-de.tex` +* `scrhack-de.tex` +* `scrlayer-de.tex` +* `scrlayer-scrpage-experts-de.tex` +* `scrlayer-notecolumn-de.tex` +* `typearea-experts-de.tex` +* `scrbookreportarticle-experts-de.tex` +* `scrlttr2-experts-de.tex` +* `common-footnotes-experts-de.tex` + +## Text files + +These plain text files are included as documentation or metadata. Files +listed with “`²`” marker are also included to the TDS and the CTAN files. +The files listed with “`²`” marker are also mandatory for legal distributions +of the KOMA-Script bundle of LaTeX classes and packages. + +* `lppl-de.txt`² +* `lppl.txt`² +* `MANIFEST.md`² +* `README.md`² (files is generated using `l3build` with every new release) +* `README.komascript-source-doc.cls` +* `README.scraddr.sty` +* `README.scrartcl.cls` +* `README.scrarticle.cls` +* `README.scrbase.sty` +* `README.scrbook.cls` +* `README.scrdate.sty` +* `README.scrdoc.cls` +* `README.scrextend.sty` +* `README.scrfontsizes.sty` +* `README.scrhack.sty` +* `README.scrjura.sty` +* `README.scrkbase.sty` +* `README.scrlayer-notecolumn.sty` +* `README.scrlayer-scrpage.sty` +* `README.scrlayer.sty` +* `README.scrletter.cls` +* `README.scrletter.sty` +* `README.scrlfile-hook.sty` +* `README.scrlfile-patcholdlatex.sty` +* `README.scrlfile.sty` +* `README.scrlogo.sty` +* `README.scrlttr2.cls` +* `README.scrreport.cls` +* `README.scrreprt.cls` +* `README.scrtime.sty` +* `README.scrwfile.sty` +* `README.tocbasic.sty` +* `README.typearea.sty` +* `releaselist.txt` + +## Derived files + +The files are created by *unpacking* the package sources. These are only +included in the TDS but neither the developer repository nor the CTAN files. +All these files are optional for legal distributions of the KOMA-Script bundle +of LaTeX classes and packages. + +* `scraddr.sty` +* `scrbase.sty` +* `scrdate.sty` +* `scrextend.sty` +* `scrfontsizes.sty` +* `scrhack.sty` +* `scrjura.sty` +* `scrkbase.sty` +* `scrlayer-notecolumn.sty` +* `scrlayer-scrpage.sty` +* `scrlayer.sty` +* `scrletter.sty` +* `scrlfile-hook-3.34.sty` +* `scrlfile-hook.sty` +* `scrlfile-patcholdlatex.sty` +* `scrlfile.sty` +* `scrlogo.sty` +* `scrtime.sty` +* `scrwfile.sty` +* `tocbasic.sty` +* `typearea.sty` +* `koma-script-source-doc.cls` +* `scrartcl.cls` +* `scrarticle.cls` +* `scrbook.cls` +* `scrletter.cls` +* `scrlttr2.cls` +* `scrreport.cls` +* `scrreprt.cls` +* `scrsize10pt.clo` +* `scrsize11pt.clo` +* `scrsize12pt.clo` +* `DIN.lco` +* `DIN5008A.lco` +* `DIN5008B.lco` +* `DINmtext.lco` +* `KOMAold.lco` +* `KakuLL.lco` +* `NF.lco` +* `NipponEH.lco` +* `NipponEL.lco` +* `NipponLH.lco` +* `NipponLL.lco` +* `NipponRL.lco` +* `SN.lco` +* `SNleft.lco` +* `UScommercial9.lco` +* `UScommercial9DW.lco` +* `visualize.lco` +* `float.hak` +* `floatrow.hak` +* `hyperref.hak` +* `listings.hak` +* `lscape.hak` +* `nomencl.hak` +* `setspace.hak` +* `standardsections.hak` + +## Typeset documents + +The output files from typesetting the various source files. + +### Main user manual + +These are the main user manuals. They are included into the TDS and the CTAN +files but not part of the developers repository. All these files are mandatory +for legal distributions of the KOMA-Script bundle of LaTeX classes and +packages unless the developer source repository. + +* `scrguide-en.pdf` +* `scrguide-de.pdf` + +### Class and package reference files + +These files can help users to quickly find the user manual of classes and +packages. All these files are optional for legal distributions of the +KOMA-Script bundle of LaTeX classes and packages. + +* `tocbasic.html` +* `scrlayer.html` +* `scrextend.html` +* `scrlayer-scrpage.html` +* `scrlfile-hook.html` +* `scrwfile.html` +* `scrdate.html` +* `scrartcl.html` +* `scrlfile.html` +* `scrjura.html` +* `scrreport.html` +* `typearea.html` +* `scrarticle.html` +* `scrlayer-notecolumn.html` +* `scraddr.html` +* `scrhack.html` +* `scrlfile-hook-3.34.html` +* `scrtime.html` +* `scrlttr2.html` +* `scrletter.html` +* `scrbase.html` +* `scrlfile-patcholdlatex.html` +* `scrlogo.html` +* `scrkbase.html` +* `scrreprt.html` +* `scrbook.html` + +## Test files + +These files form the test suite for the KOMA-Script bundle of LaTeX classes +and packages. These are part of the developer repository but neither the +TDS nor the CTAN files. + +* `scrbase-load-test.lvt` +* `scrbook-counterwithin.lvt` +* `scrextend-options.lvt` +* `scrlfile-packages.lvt` +* `scrlttr2-depreactedlcoloading.lvt` +* `typearea-pagesize.lvt` +* `scrbase-load-test.tlg` +* `scrbook-counterwithin.tlg` +* `scrextend-options.tlg` +* `scrlfile-packages.tlg` +* `scrlttr2-depreactedlcoloading.tlg` +* `typearea-pagesize.tlg` diff --git a/macros/latex/contrib/koma-script/README b/macros/latex/contrib/koma-script/README deleted file mode 100644 index 552ce2a260..0000000000 --- a/macros/latex/contrib/koma-script/README +++ /dev/null @@ -1,548 +0,0 @@ - -KOMA-Script 2022/05/01 v3.36 -Copyright (c) Markus Kohm , 1994-2022 - -This material is subject to the LaTeX Project Public License. See -lppl.txt (english) or lppl-de.txt (german) for the details of that -license. - --------------------------------------------------------------------- - -KOMA-Script is a versatile bundle of LaTeX2e document classes and -packages. It aims to be a replacement to the standard LaTeX2e -classes. KOMA-Script does not stop with the features known from the -standard classes, but it extends the possibilities in order to -provide the user an almost complete working environment. - --------------------------------------------------------------------- - -For installation see INSTALL.txt (english) or INSTALLD.txt -(german, UTF-8). - --------------------------------------------------------------------- - -Classes and Packages: - -============================================================================== -scraddr - Package to provide data from scrlttr2's adr-files ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scraddr is a LaTeX package of the KOMA-Script bundle. - scrlttr2 uses adr-files to create form letters. The scraddr - package provides commands to read such files and to use the - data of the address entries not only with the scrlttr2 class - and not only for form letters. -Requires: -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/01/24 v1.1d -============================================================================== -scrartcl - versatile class may be used as a drop-in replacement of article ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrartcl is a LaTeX class of the KOMA-Script bundle. It is - the KOMA-Script drop-in replacement for the standard LaTeX - article class. It provides all options, environments, - counters, lengths and commands of the standard LaTeX article - class, as well as several additional options, environments, - commands, etc. to make it much more versatile. The default - layout of scrartcl differs from article, with an emphasis on - good typography. Nevertheless, by changing the defaults, you - can achieve a layout very similar to that of the standard - class. -Requires: scrkbase - internal KOMA-Script package - tocbasic - KOMA-Script package - typearea - KOMA-Script package -Recommended: scrlayer-scrpage - KOMA-Script package -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrarticle - wrapper class to scrartcl ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrreport is a very simple wrapper class to scrartcl. Is has - been made, because several younger KOMA-Script users doe not - understand the 8.3 name scheme. - - However it is still recommended to use scrartcl instead of - scrarticle. -Requires: scrartcl.cls - KOMA-Script class -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrbase - basic features for KOMA-Script, e.g. conditionals and key=value ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrbase is a LaTeX package of the KOMA-Script bundle. It - provides some basic functions used by KOMA-Script that can - also be used by authors and users of other classes and - packages. - - First, it provides extended handling of key=value pairs - that can be used for run-time options of classes and - packages. Several packages in a family can share options, - and all the options in a family can be changed with a - single command. - - Additional conditions like \ifundefinedorrelax, \ifpdftex, - \ifVTeX, \ifpdfoutput, \ifstr etc. are provided. Most of - them can be prevented from being defined and have - additional internal representations that can be used by - package or class authors. - - It also provides commands to easily define or change - language-dependent terms that work not only with babel but - with other packages like ngerman too. - - It provides some commands for package and class authors - missing in the LaTeX kernel like \ClassInfoNoLine, - \PackageInfoNoLine or \l@addto@macro. - - Last but not least, it provides commands for integer - division and integer modulo operation that can be used, - for example, inside \numexpr ...\relax or with \ifnum. -Requires: keyval - key=value package from the graphics bundle - scrlfile - KOMA-Script package for file loading - manipulation -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrbook - versatile class may be used as a drop-in replacement of book ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrbook is a LaTeX class of the KOMA-Script bundle and a - drop-in replacement for the standard LaTeX book class. It - provides all options, environments, commands, etc. of the - standard LaTeX book class, as well as several additional - options, environments, commands, etc. to make it much more - versatile. The default layout of scrbook differs from book, - with an emphasis on good typography. Nevertheless, by changing - the defaults, you can achieve a layout very similar to that - of the standard class. -Requires: scrkbase - internal KOMA-Script package - tocbasic - KOMA-Script package - typearea - KOMA-Script package -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrdate - calender date operations, e.g. calculation of the day of the week ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrdate is a LaTeX package of the KOMA-Script bundle. It - provides several operations with calender dates, e.g., show - the century or the decade of a year, calculate the day of - the week of a given calender date, show the current - calender date in ISO form. It has support for several - languages, including English, German, French, Italian, - Spanish, Croatian, Finnish, Norsk, Swedish, Danish, Polish, - Czech, and Slovak. -Requires: scrkbase - KOMA-Script package for some basic features. - scrlfile - KOMA-Script package for file loading - manipulation -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrdoc - internal source documentation class of KOMA-Script ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrdoc is an internal LaTeX class of the KOMA-Script bundle. - It is an extension of ltxdoc. KOMA-Script uses scrdoc for - the implementation documentation and the documentation of - packages that aren't KOMA-Script core packages. Currently - there is no user manual for this class because the - only user is the KOMA-Script maintainer. -Requires: ltxdoc - the LaTeX2e source documentation class - scrartcl - the KOMA-Script article class -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/02/09 v0.1i -============================================================================== -scrextend - make some features of the KOMA-Script classes available for others ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrextend is a LaTeX package of the KOMA-Script bundle. It - makes some features of the KOMA-Script classes available to - other classes, i.e., for the standard classes. -Requires: scrkbase - internal package with some basics of KOMA-Script - etoolbox - tool-box for LaTeX programming using e-TeX -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrfontsizes - package to generate a KOMA-Script font size file ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrfontsizes is a LaTeX package of the KOMA-Script bundle. - It provides a simple interface to generate KOMA-Script - font-size files. -Requires: scrextend - some KOMA-Script features for other classes -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrhack - patch some isues with other packages ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrhack is a LaTeX package of the KOMA-Script bundle. It - patches other packages to make them work better and adds new - features to improve their interaction with KOMA-Script. One - main feature is to make them work with tocbasic instead of - KOMA-Script's deprecated float list interface. Currently, - patches for float.sty, floatrow.sty, (old versions of) - hyperref, listings, and setspace are available. -Requires: scrkbase - internal KOMA-Script package with basics - tocbasic - features for helper files and float environments - xpatch - extending etoolbox patching commands -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrjura - contract environment for advocates and scholary persons in law ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrjura is a LaTeX package of the KOMA-Script bundle. It - has been made in cooperation with a German lawyer to - provide environments for contracts, laws, acts or other - legal purposes. It supports automatic numbering of - paragraphs and semi-automatic numbering of sentences. - Currently German and English are supported. -Requires: scrkbase - internal KOMA-Script package with basics - tocbasic - features for helper files and float environments -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrkbase - internal basic features for KOMA-Script classes and packages ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrkbase is an internal KOMA-Script packages that provides - some features that are common to several KOMA-Script - classes and packages. Users and class or package authors - should not use this package directly. -Requires: scrbase - KOMA-Script package for some basic features. - scrlfile - KOMA-Script package for file loading - manipulation -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrlayer-notecolumn - control note columns parallel to the main text ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrlayer-notecolumn is a LaTeX package of the KOMA-Script - bundle. It provides an end-user interface to scrlayer to - define and manage note columns. Those note columns are - somewhat similar to marginal notes (see the LaTeX - command \marginpar or packages like notecolumn), but you - can use several of them. The package provides page breaks - inside note columns and synchronization points between the - main text and note columns. - - Like most of the KOMA-Script packages, you can use this - package not only with KOMA-Script classes but also with - several other classes, e.g., the standard LaTeX classes. -Requires: scrlayer.sty -License: LPPL 1.3c or later -State: Author maintained, proof of concept -Version: 2022/02/10 v0.3.3694 -============================================================================== -scrlayer-scrpage - controlling page headers and footers ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrlayer-scrpage is a LaTeX package of the KOMA-Script - bundle. It provides an end-user interface to scrlayer to - define and manage page styles. This end user interface is - sufficiently compatible to scrpage2 that users should easily - be able to switch from the old scrpage2 package to the new - one. Nevertheless, it provides several new features to control - headers and footers. - - Like most of the KOMA-Script packages, you can use this - package not only with KOMA-Script classes but also with - several other classes, e.g., the standard LaTeX classes. -Requires: scrlayer.sty -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrlayer - defining layers and controlling page headers and footers ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrlayer is a LaTeX package of the KOMA-Script bundle. - Users may already be familiar with a type of layer from - packages like eso-pic or textpos. scrlayer is another package - that provides background and foreground layers, but unlike - those other packages, these layers are part of the page-style - definition. With this package, you can easily switch between - the layers used by switching the page style. - - In short, the page-style interface of scrlayer provides - commands to define page styles based on a stack of layers and - to manage those layer stacks. - - Nevertheless, using the layers directly is recommended for - advanced users only. End-user interfaces for beginners or - average users are provided by additional packages, that - load scrlayer on their own, e.g., scrlayer-scrpage. -Requires: scrkbase.sty -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrletter - wrapper class to scrlttr2 ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrreport is a very simple wrapper class to scrlttr2. Is has - been made, because several younger KOMA-Script users doe not - understand the 8.3 name scheme. - - However it is still recommended to use scrlttr2 instead of - scrletter. -Requires: scrlttr2.cls - KOMA-Script class -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrletter - letter extention to KOMA-Script classes ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrletter provides the features of the letter class scrlttr2 - when using the KOMA-Script classes scrartcl, scrreprt, and - scrbook, or the standard classes article, report, and book. -Requires: scrkbase - internal KOMA-Script package - typearea - KOMA-Script package - scrlayer-scrpage - KOMA-Script package -Recommended: marvosym - package by Martin Vogel providing symbols -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrlfile-hook - internal subpackage of scrlfile ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrlfile-hook is an internal subpackage of scrlfile to be - be used with LaTeX from version 2010-10-01 on. -Requires: scrlogo.sty -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrlfile-pacholdlatex - internal subpackage of scrlfile ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrlfile-patcholdlatex is an internal subpackage of scrlfile - to be be used with LaTeX up to version 2010-04-01. -Requires: scrlogo.sty -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrlfile - control of package dependencies ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrlfile is a LaTeX package of the KOMA-Script bundle. It - provides the ability to execute commands before or after - loading files, classes, or packages. It can even - automatically load one file, class, or package in place of - another or prevent a package from being loaded. It also - provides the ability to execute commands before or after - closing the main aux file during \end{document}. It has - been used by the KOMA-Script classes for more than a - decade. -Requires: scrlfile-hook.sty, scrlfile-patcholdlatex.sty, scrlogo.sty -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrlogo - print the KOMA-Script logo ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrlogo is a LaTeX package of the KOMA-Script bundle. It - provides the command \KOMAScript to print the official - KOMA-Script logo. -Requires: -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrlttr2 - versatile letter class with separation of text area and note paper ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrlttr2 is a letter class for LaTeX2e that allows - definition of several letterheads and text area settings - that are independent from the letterhead. So you can use - not only the KOMA-Script package typearea but even packages - like geometry to define the text area and the margins. - - The positions of the elements of the letterhead can be - changed by so called pseudo-lengths. This makes it possible - to adjust scrlttr2 not only to local conventions and paper - sizes but also to a corporate brand identity. - - Several predefined sets of parameters, called - letter-class-option or lco files are part of the - KOMA-Script bundle: two German letters, Swiss letters, US - letters, Japanese letters, and French letters. More can be - found on CTAN or the KOMA-Script homepage as separate - packages. - - Additional lco-files for different letterheads can be found - on the KOMA-Script homepage, e.g., one demonstration file - for a letterhead similar to that of Washington State - University. -Requires: scrkbase - internal KOMA-Script package - typearea - KOMA-Script package -Recommended: marvosym - package by Martin Vogel providing symbols -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrreport - wrapper class to scrreprt ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrreport is a very simple wrapper class to scrreprt. Is has - been made, because several younger KOMA-Script users doe not - understand the 8.3 name scheme. - - However it is still recommended to use scrreprt instead of - scrreport. -Requires: scrreprt.cls - KOMA-Script class -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrreprt - versatile class may be used as a drop-in replacement of report ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrreprt is the KOMA-Script drop-in replacement for the - standard LaTeX report class. It provides all options, - environments, counters, lengths, and commands of the standard - LaTeX report class, as well as several additional options, - environments, commands, etc., to make it much more versatile. - The default layout of scrreprt differs from that of report, - with an emphasis on good typography. Nevertheless, by changing - the defaults, you can achieve a layout very similar to that of - the standard class. -Requires: scrkbase - internal KOMA-Script package - tocbasic - KOMA-Script package - typearea - KOMA-Script package -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrtime - show the time of the LaTeX run ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrtime is a LaTeX package of the KOMA-Script bundle. It - provides only some small features to show the time of the - LaTeX run. -Requires: scrkbase - internal package with some basics of KOMA-Script -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -scrwfile - Spare write handles for helper files to avoid `No room' messages ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: scrwfile is a LaTeX package of the KOMA-Script bundle. TeX - makes only about 16 write handles available for \newwrite. - With LaTeX, each auxiliary file, not only the main aux file - but files such as the toc file, the lof file, the lot file, - and the raw indexes and glossaries need one of these - handles. scrwfile provides facilities to avoid using - handles for auxiliary files that use the main aux file for - intermediate writing. This means that the toc file, the lof - file, the lot file, and files of packages like listings no - longer need a write handle, so the user will have more write - handles for files like indexes or glossaries and can avoid - `No room for new \write' error messages. - - scrwfile also provides facilities to clone auxiliary files, - e.g., to have two tables of contents with different tocdepth - settings. -Requires: scrbase - some basic features for class and package - authors - tocbasic - basic features for helper files and lists of - floats - scrlfile - control of package dependencies -License: LPPL 1.3c or later -State: Author maintained -Version: 2021/05/30 v0.1.10 -============================================================================== -tocbasic - Management of tables and lists of contents using helper files ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: tocbasic is a LaTeX package of the KOMA-Script bundle. The - main purpose of package tocbasic is to provide features for - authors of classes and packages to create their own tables or - lists of contents like the list of figures and the list of - tables, and thereby allow other classes or packages some - measure of control over these. For example, the tocbasic - package delegates control of the language for all these tables - and lists of contents to the babel package. Thus changes of - language will be automatically reflected inside all these - tables and lists of contents. Using tocbasic will free - authors of classes and packages from the burden of - implementing of such features. - - KOMA-Script itself uses tocbasic not only for the table of - contents but also for the lists of figures and tables - mentioned previously. -Requires: scrbase - KOMA-Script package for some basic features. -License: LPPL 1.3c or later -State: Author maintained -Version: 2022/05/01 v3.36 -============================================================================== -typearea - Calculating typeing area and margins depending on typographic rules ------------------------------------------------------------------------------- -Maintainer: Markus Kohm -E-Mail: komascript at gmx info -Abstract: Many LaTeX classes, including the standard classes, present - the user with the largely fixed configuration of margins - and type area. With the standard classes, the choice is - limited to selecting a font size. There are separate packages, - such as geometry, which give the user complete control over, - but also full responsibility for, setting the type area and - margins. - - KOMA-Script takes a somewhat different approach with its - typearea package. Users are offered ways to adjust the design - and algorithms based on established typographic standards, - making it easier for them to make good choices. -Requires: scrkbase - internal basic features for KOMA-Script packages -License: LPPL 1.3c or later -State: Autor maintained -Version: 2022/05/01 v3.36 -============================================================================== diff --git a/macros/latex/contrib/koma-script/README.md b/macros/latex/contrib/koma-script/README.md new file mode 100644 index 0000000000..5505b16a69 --- /dev/null +++ b/macros/latex/contrib/koma-script/README.md @@ -0,0 +1,592 @@ +# KOMA-Script 2022/07/04 v3.37 +Copyright [Markus Kohm](mailto:komascript@gmx.info) 1994–2022 + +This material is subject to the LaTeX Project Public License Version 1.3c. See [`lppl.txt`](lppl.txt) (English) or [`lppl-de.txt`](lppl-de.txt) (German) for the details of that license. + +------------------------------------------------------------------------------ + +KOMA-Script is a versatile bundle of LaTeX2e document classes and packages. The classes are designed as replacements to the standard LaTeX2e classes. Several features have been added to make them more configurable. + +------------------------------------------------------------------------------ + +##Classes and packages in this release: + +###`koma-script-source-doc` — internal source documentation class of KOMA-Script +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       koma-script-source-doc is an internal LaTeX class of the
+                KOMA-Script bundle. It is an extension of ltxdoc.
+                KOMA-Script uses scrdoc for the implementation documentation
+                and the documentation of packages that aren't KOMA-Script core
+                packages.  The user manual of this class can be generated from
+                koma-script-source-doc.dtx.  However average users should not
+                need the user manual, because they should never use this
+                internal class.
+Requires:       ltxdoc   - the LaTeX2e source documentation class
+                doc.sty  - at least version 3.0 is needed
+                scrartcl - the KOMA-Script article class
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022-03-10 v0.91 
+
+*** +###`scraddr` — Package to provide data from scrlttr2's adr-files +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scraddr is a LaTeX package of the KOMA-Script bundle.
+                scrlttr2 uses adr-files to create form letters. The scraddr
+                package provides commands to read such files and to use the
+                data of the address entries not only with the scrlttr2 class
+                and not only for form letters.
+Requires:       
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/01/24 v1.1d 
+
+*** +###`scrartcl` — versatile class may be used as a drop-in replacement of article +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrartcl is a LaTeX class of the KOMA-Script bundle. It is
+                the KOMA-Script drop-in replacement for the standard LaTeX
+                article class. It provides all options, environments,
+                counters, lengths and commands of the standard LaTeX article
+                class, as well as several additional options, environments,
+                commands, etc. to make it much more versatile. The default
+                layout of scrartcl differs from article, with an emphasis on
+                good typography. Nevertheless, by changing the defaults, you
+                can achieve a layout very similar to that of the standard
+                class.
+Requires:       scrkbase - internal KOMA-Script package
+                tocbasic - KOMA-Script package
+                typearea - KOMA-Script package
+Recommended:    scrlayer-scrpage - KOMA-Script package
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrarticle` — wrapper class to scrartcl +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrreport is a very simple wrapper class to scrartcl. Is has
+                been made, because several younger KOMA-Script users doe not
+                understand the 8.3 name scheme.
+
+                However it is still recommended to use scrartcl instead of
+                scrarticle.
+Requires:       scrartcl.cls - KOMA-Script class
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrbase` — basic features for KOMA-Script, e.g. conditionals and key=value +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrbase is a LaTeX package of the KOMA-Script bundle.  It
+                provides some basic functions used by KOMA-Script that can
+                also be used by authors and users of other classes and
+                packages.
+
+                First, it provides extended handling of key=value pairs
+                that can be used for run-time options of classes and
+                packages. Several packages in a family can share options,
+                and all the options in a family can be changed with a
+                single command.
+
+                Additional conditions like \ifundefinedorrelax, \ifpdftex,
+                \ifVTeX, \ifpdfoutput, \ifstr etc. are provided. Most of
+                them can be prevented from being defined and have
+                additional internal representations that can be used by
+                package or class authors.
+
+                It also provides commands to easily define or change
+                language-dependent terms that work not only with babel but
+                with other packages like ngerman too.
+
+                It provides some commands for package and class authors
+                missing in the LaTeX kernel like \ClassInfoNoLine,
+                \PackageInfoNoLine or \l@addto@macro.
+
+                Last but not least, it provides commands for integer
+                division and integer modulo operation that can be used,
+                for example, inside \numexpr ...\relax or with \ifnum.
+Requires:       keyval   - key=value package from the graphics bundle
+                scrlfile - KOMA-Script package for file loading 
+                           manipulation
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrbook` — versatile class may be used as a drop-in replacement of book +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrbook is a LaTeX class of the KOMA-Script bundle and a
+                drop-in replacement for the standard LaTeX book class. It 
+                provides all options, environments, commands, etc. of the
+                standard LaTeX book class, as well as several additional 
+                options, environments, commands, etc. to make it much more
+                versatile. The default layout of scrbook differs from book,
+                with an emphasis on good typography. Nevertheless, by changing
+                the defaults, you can achieve a layout very similar to that
+                of the standard class.
+Requires:       scrkbase - internal KOMA-Script package
+                tocbasic - KOMA-Script package
+                typearea - KOMA-Script package
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrdate` — calender date operations, e.g. calculation of the day of the week +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrdate is a LaTeX package of the KOMA-Script bundle. It
+                provides several operations with calender dates, e.g., show
+                the century or the decade of a year, calculate the day of
+                the week of a given calender date, show the current
+                calender date in ISO form. It has support for several
+                languages, including English, German, French, Italian,
+                Spanish, Croatian, Finnish, Norsk, Swedish, Danish, Polish,
+                Czech, and Slovak.
+Requires:       scrkbase - KOMA-Script package for some basic features.
+                scrlfile - KOMA-Script package for file loading
+                           manipulation
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrdoc` — deprecated internal source documentation class of KOMA-Script +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrdoc is an internal LaTeX class of the KOMA-Script bundle.
+                It is an extension of ltxdoc with version 2 of the doc
+                package.  KOMA-Script has used scrdoc for the implementation
+                documentation before KOMA-Script 3.36.
+Requires:       ltxdoc   - the LaTeX2e source documentation class
+                scrartcl - the KOMA-Script article class
+License:        LPPL 1.3c or later
+State:          deprecated, will be removed soon
+Version:        2022/06/24 v0.1j 
+
+*** +###`scrextend` — make some features of the KOMA-Script classes available for others +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrextend is a LaTeX package of the KOMA-Script bundle. It
+                makes some features of the KOMA-Script classes available to
+                other classes, i.e., for the standard classes.
+Requires:       scrkbase - internal package with some basics of KOMA-Script
+                etoolbox - tool-box for LaTeX programming using e-TeX
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrfontsizes` — package to generate a KOMA-Script font size file +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrfontsizes is a LaTeX package of the KOMA-Script bundle.  
+                It provides a simple interface to generate KOMA-Script
+                font-size files.
+Requires:       scrextend - some KOMA-Script features for other classes
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrhack` — patch some isues with other packages +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrhack is a LaTeX package of the KOMA-Script bundle. It
+                patches other packages to make them work better and adds new
+                features to improve their interaction with KOMA-Script. One
+                main feature is to make them work with tocbasic instead of
+                KOMA-Script's deprecated float list interface. Currently,
+                patches for float.sty, floatrow.sty, (old versions of)
+                hyperref, listings, and setspace are available.
+Requires:       scrkbase - internal KOMA-Script package with basics
+                tocbasic - features for helper files and float environments
+                xpatch - extending etoolbox patching commands
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrjura` — contract environment for advocates and scholary persons in law +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrjura is a LaTeX package of the KOMA-Script bundle.  It
+                has been made in cooperation with a German lawyer to
+                provide environments for contracts, laws, acts or other
+                legal purposes. It supports automatic numbering of
+                paragraphs and semi-automatic numbering of sentences.
+                Currently German and English are supported.
+Requires:       scrkbase - internal KOMA-Script package with basics
+                tocbasic - features for helper files and float environments
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrkbase` — internal basic features for KOMA-Script classes and packages +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrkbase is an internal KOMA-Script packages that provides
+                some features that are common to several KOMA-Script
+                classes and packages. Users and class or package authors
+                should not use this package directly.
+Requires:       scrbase  - KOMA-Script package for some basic features.
+                scrlfile - KOMA-Script package for file loading
+                           manipulation
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrlayer-notecolumn` — control note columns parallel to the main text +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrlayer-notecolumn is a LaTeX package of the KOMA-Script
+                bundle. It provides an end-user interface to scrlayer to
+                define and manage note columns. Those note columns are
+                somewhat similar to marginal notes (see the LaTeX
+                command \marginpar or packages like notecolumn), but you
+                can use several of them. The package provides page breaks
+                inside note columns and synchronization points between the
+                main text and note columns.
+
+                Like most of the KOMA-Script packages, you can use this
+                package not only with KOMA-Script classes but also with
+                several other classes, e.g., the standard LaTeX classes.
+Requires:       scrlayer.sty
+License:        LPPL 1.3c or later
+State:          Author maintained, proof of concept
+Version:        2022/06/29 v0.3.3915 
+
+*** +###`scrlayer-scrpage` — controlling page headers and footers +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrlayer-scrpage is a LaTeX package of the KOMA-Script
+                bundle. It provides an end-user interface to scrlayer to
+                define and manage page styles. This end user interface is
+                sufficiently compatible to scrpage2 that users should easily
+                be able to switch from the old scrpage2 package to the new
+                one. Nevertheless, it provides several new features to control
+                headers and footers.
+
+                Like most of the KOMA-Script packages, you can use this
+                package not only with KOMA-Script classes but also with
+                several other classes, e.g., the standard LaTeX classes.
+Requires:       scrlayer.sty
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrlayer` — defining layers and controlling page headers and footers +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrlayer is a LaTeX package of the KOMA-Script bundle.
+                Users may already be familiar with a type of layer from
+                packages like eso-pic or textpos. scrlayer is another package
+                that provides background and foreground layers, but unlike
+                those other packages, these layers are part of the page-style
+                definition. With this package, you can easily switch between
+                the layers used by switching the page style.
+
+                In short, the page-style interface of scrlayer provides
+                commands to define page styles based on a stack of layers and
+                to manage those layer stacks. 
+
+                Nevertheless, using the layers directly is recommended for
+                advanced users only. End-user interfaces for beginners or
+                average users are provided by additional packages, that
+                load scrlayer on their own, e.g., scrlayer-scrpage.
+Requires:       scrkbase.sty
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrletter` — wrapper class to scrlttr2 +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrreport is a very simple wrapper class to scrlttr2. Is has
+                been made, because several younger KOMA-Script users doe not
+                understand the 8.3 name scheme.
+
+                However it is still recommended to use scrlttr2 instead of
+                scrletter.
+Requires:       scrlttr2.cls - KOMA-Script class
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrletter` — letter extention to KOMA-Script classes +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrletter provides the features of the letter class scrlttr2
+                when using the KOMA-Script classes scrartcl, scrreprt, and
+                scrbook, or the standard classes article, report, and book.
+Requires:       scrkbase - internal KOMA-Script package
+                typearea - KOMA-Script package
+                scrlayer-scrpage - KOMA-Script package
+Recommended:    marvosym - package by Martin Vogel providing symbols
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrlfile-hook` — internal subpackage of scrlfile +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrlfile-hook is an internal subpackage of scrlfile to be
+                be used with LaTeX from version 2010-10-01 on.
+Requires:       scrlogo.sty
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrlfile-pacholdlatex` — internal subpackage of scrlfile +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrlfile-patcholdlatex is an internal subpackage of scrlfile
+                to be be used with LaTeX up to version 2010-04-01.
+Requires:       scrlogo.sty
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrlfile` — control of package dependencies +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrlfile is a LaTeX package of the KOMA-Script bundle. It
+                provides the ability to execute commands before or after
+                loading files, classes, or packages. It can even
+                automatically load one file, class, or package in place of
+                another or prevent a package from being loaded. It also
+                provides the ability to execute commands before or after
+                closing the main aux file during \end{document}. It has
+                been used by the KOMA-Script classes for more than a
+                decade.
+Requires:       scrlfile-hook.sty, scrlfile-patcholdlatex.sty, scrlogo.sty
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrlogo` — print the KOMA-Script logo +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrlogo is a LaTeX package of the KOMA-Script bundle. It
+                provides the command \KOMAScript to print the official
+                KOMA-Script logo.
+Requires:
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrlttr2` — versatile letter class with separation of text area and note paper +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrlttr2 is a letter class for LaTeX2e that allows
+                definition of several letterheads and text area settings
+                that are independent from the letterhead. So you can use
+                not only the KOMA-Script package typearea but even packages
+                like geometry to define the text area and the margins.
+
+                The positions of the elements of the letterhead can be
+                changed by so called pseudo-lengths. This makes it possible
+                to adjust scrlttr2 not only to local conventions and paper
+                sizes but also to a corporate brand identity.
+
+                Several predefined sets of parameters, called
+                letter-class-option or lco files are part of the
+                KOMA-Script bundle: two German letters, Swiss letters, US
+                letters, Japanese letters, and French letters.  More can be
+                found on CTAN or the KOMA-Script homepage as separate
+                packages.
+
+                Additional lco-files for different letterheads can be found
+                on the KOMA-Script homepage, e.g., one demonstration file
+                for a letterhead similar to that of Washington State
+                University.
+Requires:       scrkbase - internal KOMA-Script package
+                typearea - KOMA-Script package
+Recommended:    marvosym - package by Martin Vogel providing symbols
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrreport` — wrapper class to scrreprt +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrreport is a very simple wrapper class to scrreprt. Is has
+                been made, because several younger KOMA-Script users doe not
+                understand the 8.3 name scheme.
+
+                However it is still recommended to use scrreprt instead of
+                scrreport.
+Requires:       scrreprt.cls - KOMA-Script class
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrreprt` — versatile class may be used as a drop-in replacement of report +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrreprt is the KOMA-Script drop-in replacement for the
+                standard LaTeX report class. It provides all options,
+                environments, counters, lengths, and commands of the standard
+                LaTeX report class, as well as several additional options,
+                environments, commands, etc., to make it much more versatile.
+                The default layout of scrreprt differs from that of report,
+                with an emphasis on good typography. Nevertheless, by changing
+                the defaults, you can achieve a layout very similar to that of
+                the standard class.
+Requires:       scrkbase - internal KOMA-Script package
+                tocbasic - KOMA-Script package
+                typearea - KOMA-Script package
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrtime` — show the time of the LaTeX run +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrtime is a LaTeX package of the KOMA-Script bundle.  It
+                provides only some small features to show the time of the
+                LaTeX run.
+Requires:       scrkbase - internal package with some basics of KOMA-Script
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`scrwfile` — Spare write handles for helper files to avoid `No room' messages +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       scrwfile is a LaTeX package of the KOMA-Script bundle. TeX
+                makes only about 16 write handles available for \newwrite.
+                With LaTeX, each auxiliary file, not only the main aux file
+                but files such as the toc file, the lof file, the lot file,
+                and the raw indexes and glossaries need one of these
+                handles. scrwfile provides facilities to avoid using
+                handles for auxiliary files that use the main aux file for
+                intermediate writing. This means that the toc file, the lof
+                file, the lot file, and files of packages like listings no
+                longer need a write handle, so the user will have more write
+                handles for files like indexes or glossaries and can avoid
+                `No room for new \write' error messages.
+
+                scrwfile also provides facilities to clone auxiliary files,
+                e.g., to have two tables of contents with different tocdepth
+                settings.
+Requires:       scrbase  - some basic features for class and package
+                           authors
+                tocbasic - basic features for helper files and lists of
+                           floats
+                scrlfile - control of package dependencies
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2021/05/30 v0.1.10 
+
+*** +###`tocbasic` — Management of tables and lists of contents using helper files +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       tocbasic is a LaTeX package of the KOMA-Script bundle.  The
+                main purpose of package tocbasic is to provide features for
+                authors of classes and packages to create their own tables or
+                lists of contents like the list of figures and the list of
+                tables, and thereby allow other classes or packages some
+                measure of control over these. For example, the tocbasic
+                package delegates control of the language for all these tables
+                and lists of contents to the babel package. Thus changes of
+                language will be automatically reflected inside all these
+                tables and lists of contents. Using tocbasic will free
+                authors of classes and packages from the burden of
+                implementing of such features.
+
+                KOMA-Script itself uses tocbasic not only for the table of
+                contents but also for the lists of figures and tables
+                mentioned previously.
+Requires:       scrbase  - KOMA-Script package for some basic features.
+License:        LPPL 1.3c or later
+State:          Author maintained
+Version:        2022/07/04 v3.37 
+
+*** +###`typearea` — Calculating typeing area and margins depending on typographic rules +
+Maintainer:     Markus Kohm
+E-Mail:         komascript@gmx.info
+Abstract:       Many LaTeX classes, including the standard classes, present 
+                the user with the largely fixed configuration of margins
+                and type area.  With the standard classes, the choice is
+                limited to selecting a font size. There are separate packages,
+                such as geometry, which give the user complete control over,
+                but also full responsibility for, setting the type area and
+                margins.
+
+                KOMA-Script takes a somewhat different approach with its
+                typearea package. Users are offered ways to adjust the design
+                and algorithms based on established typographic standards,
+                making it easier for them to make good choices.
+Requires:       scrkbase - internal basic features for KOMA-Script packages
+License:        LPPL 1.3c or later
+State:          Autor maintained
+Version:        2022/07/04 v3.37 
+
+*** +##Installation: + +We highly recommend installing the latest official release via the package manager of the TeX distribution you are using. For example, for Vanilla TeX Live this would be `tlmgr` or `tlshell` or `tlcockpit`. For MiKTeX it would be `MiKTeX Console`. Linux users who use the TeX Live of their Linux distribution will often find KOMA script in one of the many TeX Live supplementary packages. In Debian, for example, it is in `texlive-latex-recommended`. + +If the package manager does not offer the desired KOMA-Script version, you can find [various versions in the KOMA-Script Project](https://komascript.de/current). There is also the installation from a TDS archive explained. + +From KOMA-Script sources of a [release on SourceForge](https://sourceforge.net/p/koma-script/code/HEAD/tree/tags/) one can build and even install KOMA-Script with the help of `l3build`. More details can be found in the instructions for `l3build`. + +If you want to generate KOMA-Script step by step from the sources, first run `tex scrmain.ins`. This will generate a larger number of files with the extensions `.cls`, `.sty`, `.lco`, `.clo` and `.hak`. All these files are needed for KOMA-Script to work properly. They have to be copied either into the document directory of your LaTeX project or into a directory of one of your TEXMF search trees. In the TEXMF search tree further actions may be necessary. Consult the instructions of your TeX distribution. After the correct installation of these files, the manual is to be generated. To do this, change to the subdirectory `/doc` and first run `pdflatex scrguide-en.tex` there. Then repeat the runs of `bibtex scrguide-en`, `makeindex scrguide-en`, `pdflatex scrguide-en.tex` min. four times. This way you get a form of the English user manual with a simplified index. The German user manual can be generated in the same way by substituting `scrguide-en` for `scrguide-de`. + +If you like to have the implementation documentation of KOMA-Script as a PDF, first create the required class `koma-script-source-doc.cls` with `tex koma-script-source-doc.dx`. This class can then be used to generate the implementation documentation of this class with repeated calls to `lualatex-dev koma-script-source-doc.dtx` and `mkindex koma-script-source-doc`. Correspondingly, the documentation of the other KOMA-Script components can be generated. diff --git a/macros/latex/contrib/koma-script/doc/INSTALL.txt b/macros/latex/contrib/koma-script/doc/INSTALL.txt deleted file mode 100644 index a7d0aea8b3..0000000000 --- a/macros/latex/contrib/koma-script/doc/INSTALL.txt +++ /dev/null @@ -1,151 +0,0 @@ -KOMA Script -a versatile LaTeX2e bundle ----------------------------------------------------------------------------- - -INSTALLATION DIRECTIONS ------------------------ - -There are various ways that KOMA Script can be distributed. The primary -distribution from the KOMA Script maintainers consists of a complete TEXMF -tree (also known as the/a TDS tree). This TEXMF tree in its original form is -provided as a ZIP archive. It may also be distributed in other archival -formats. When the following text refers to an archive, it therefore does not -necessarily refer to a ZIP archive. When creating a new archive, -distributors are strongly encouraged to preserve the structure and contents -of the TEXMF tree so that these instructions remain valid. Distributors are -otherwise urged to provide their own instructions for installation. - -Distribution of the expanded TEXMF tree is also permitted. Should, as a -result, the structure or the contents of the TEXMF tree be modified (within -the framework of that which is permitted by the license) such that these -installation instructions partially or entirely no longer apply, the -distributor should provide new directions. - -The user should therefore first check to see whether the distributor has -included further installation directions. Logically the name of these -directions would also begin with `INSTALLD.', immediately followed by the -distributor's name or acronym. A `README' file should likewise created. - - -Easy installation using TeX Live repository or MiKTeX installation file ------------------------------------------------------------------------ - -TeX Live users can easily install the current release of KOMA-Script from -the KOMA repository for TeX Live. See -for more information. But if you want to install another release, you have -to read the installation instructions below. - -MiKTeX users can easily install the current release of KOMA-Script using -the self extracting archive for windows also known as MiKTeX installation -file. See for more information. But -if you want to install another release, you have to read the installation -instructions below. - - -Installation from an archive ----------------------------- - -If you received the KOMA Script archive with a complete TEXMF tree, the -installation is quite easy. First check to see whether the archive does in -fact contain a complete TEXMF tree. Take a look at the contents of the -archive; there should be three directories: `doc/latex/koma-script', -`tex/latex/koma-script' and `source/latex/koma-script', the last with -additional subdirectories. In each of these directories there are several -files. A file `README' should be found at least at -`doc/latex/koma-script/README'. It may be found outside the archive as well. - -When you unpack such an archive be sure to preserve the directory structure, -but without creating a new directory, either in the local TEXMF tree or in a -private TEXMF tree. More information about the local TEXMF tree and the -question of a private TEXMF tree, as well as how one makes this known to the -system can be found in the directions for your TEX system. - -Finally, update or `refresh' the filename database. With teTeX and -teTeX-based systems this is done with the program `texconfig' or directly with -`texhash' or `mktexlsr'. With MiKTeX you will find the corresponding button -in the application `MiKTeX Options'. Depending on the permissions set for -your installation directory, you may have to do this as administrator or -root. For more information about this see the manual of your TeX system! - - -Installation of an expanded TEXMF tree --------------------------------------- - -If KOMA Script is already present as an expanded TEXMF tree, you can either -register it in the system as a further TEXMF tree or you can copy the contents -of this TEXMF tree -- while preserving the directory structure -- into a -private or local TEXMF tree. - -Here too a refresh of the filename database is necessary. See the last -paragraph of the previous section for more information. - - -Installation from a minimal distribution ----------------------------------------- - -Installation from a minimal distribution, which only includes those files -listed as minimally necessary in the `manifest.txt', is not as simple. For -this Gnu-make and other UNIX tools are essential! - -With this in mind, the process is as follows: - -- Create a Makefile.cfg file. - -- Copy one of the lines that begins with `#INSTALLTEXMF' from the file - `Makefile.baseinit' into this new file. - -- Remove the hash symbol (#) from the beginning. - -- Edit this line so that the name of the directory where the TEXMF tree is to - be installed appears following the equal sign. - CAUTION: No forward slash (/) or backslash (\) at the end of the directory - name! - -- Run your `make' program. - -- After `make' has successfully been run with no errors, run `make install'. - -Finally, update or `refresh' the filename database. With teTeX and -teTeX-based systems this is done with the program `texconfig' or directly with -`texhash' or `mktexlsr'. With MiKTeX you will find the corresponding button -in the application `MiKTeX Options'. Depending on the permissions set for -your installation directory, you may have to do this as administrator or -root. For more information about this see the manual of your TeX system! - - -`Last resort' installation from a minimal distribution ------------------------------------------------------- - -Even if you do not have the necessary Gnu-make or other UNIX tools needed to -install using `make', it is still possible to properly install the KOMA Script -package from the minimal distribution. It just means doing more of the work -yourself. - -- First create the following new directories in the TEXMF tree in which you - wish to install KOMA Script: `source/latex/koma-script', - `doc/latex/koma-script' and `tex/latex/koma-script'. - -- Copy all of the files from the KOMA Script distribution into the new - directory `source/latex/koma-script'. - -- Copy all files with filenames ending in `.pdf', `.html', or `.txt' and the - `README' file into the directory `doc/latex/koma-script'. - -- Change directory to 'source/latex/koma-script'. - -- Run the command `tex scrmain.ins'. Answer any possible questions with `y' - for `yes'. - -- Copy all newly created files whose filenames end in `.cls', `.sty', `.hak', - or `.lco' into the directory `tex/latex/koma-script'. - -Finally, update or `refresh' the filename database. With teTeX and -teTeX-based systems this is done with the program `texconfig' or directly with -`texhash' or `mktexlsr'. With MiKTeX you will find the corresponding button -in the application `MiKTeX Options'. Depending on the permissions set for -your installation directory, you may have to do this as administrator or -root. For more information about this see the manual of your TeX system! - --------------------------------------------------------- -German text by Markus Kohm, 2014/2016 -Translation by Kevin Pfeiffer and Markus Kohm, 2014/2016 diff --git a/macros/latex/contrib/koma-script/doc/INSTALLD.txt b/macros/latex/contrib/koma-script/doc/INSTALLD.txt deleted file mode 100644 index dcb22af1c5..0000000000 --- a/macros/latex/contrib/koma-script/doc/INSTALLD.txt +++ /dev/null @@ -1,153 +0,0 @@ -KOMA-Script -Eine Sammlung von Klassen und Paketen für LaTeX2e ----------------------------------------------------------------------------- - -INSTALLATIONSANLEITUNG ----------------------- - -Für KOMA-Script sind verschiedene Arten der Verteilung zulässig. Die primäre -Verteilung des KOMA-Script-Betreuers besteht aus einem kompletten TEXMF-Baum -(auch bekannt als TDS-Baum). Dieser TEXMF-Baum liegt originär als ZIP-Archiv -vor. Eine Verpackung in andere Archivformate ist zulässig. Wenn im folgenden -von einem Archiv die Rede ist, ist daher nicht ausschließlich das ZIP-Archiv -gemeint. Distributoren wird jedoch empfohlen, Struktur und Inhalt des TEXMF- -Baums beim Anlegen neuer Archive zu übernehmen, damit diese Anleitung gültig -bleibt. Anderenfalls sind die Distributoren angehalten eine eigene Anleitung -für die Installation zuzufügen. - -Die Verteilung eines ausgepackten TEXMF-Baums ist ebenfalls zulässig. Sollte -dabei die Struktur oder der Inhalt des TEXMF-Baums im Rahmen dessen, was die -Lizenz zulässt, verändert werden und somit diese Installationsanleitung ganz -oder in Teilen nicht mehr zutreffen, so sollte der Distributor wiederum eine -eigene Installationsanleitung hinzufügen. - -Der Anwender sollte daher nun kontrollieren, ob der Distributor eine weitere -Installationsanleitung hinzugefügt hat. Sinnvollerweise wäre der Name dieser -Anleitung dann auch "INSTALLD." und dem Namen oder Kürzel eines Distributors -zusammengesetzt. Eventuell gibt es auch eine entsprechend aufgebaute README- -Datei. - - -Installation mit einem TeX Live repository oder MiKTeX Installationspaket -------------------------------------------------------------------------- - -Anwender von TeX Live können die jeweils aktuelle Version von KOMA-Script -einfach aus dem KOMA repository für TeX Live installieren. Sie finden die -Installationsanleitung dafür unter . Um -jedoch eine andere Version zu installieren, sei auf die Instruktionen der -nachfolgenden Abschnitte verwiesen. - -Anwender von MiKTeX können die jeweils aktuelle Version von KOMA-Script am -einfachsten mit Hilfe eines selbstextrahierenden Archivs für Windows, also -mit einer MiKTeX-Installations-Datei installieren. Eine Erklärung dazu mit -einer Installationsanleitung gibt . Soll -jedoch eine andere Version installiert werden, so sind die Erklärungen der -nachfolgenden Abschnitte relevant. - - -Installation aus einem Archiv ------------------------------ - -Wenn Sie KOMA-Script als Archiv mit einem vollständigen TEXMF-Baum erhalten -haben, so ist die Installation denkbar einfach. Kontrollieren Sie zunächst, -ob das Archiv vermutlich einen vollständigen TEXMF-Baum enthält. Lassen Sie -sich hierzu den Inhalt des Archives anzeigen. Im TEXMF-Archiv befinden sich -die drei Verzeichnisse "doc/latex/koma-script", "tex/latex/koma-script" und -"source/latex/koma-script", letzteres enthält weiteren Unterverzeichnissen. -In jedem der Verzeichnisse befinden sich mehrere Dateien. Eine Datei Namens -"README" ist mindestens als "doc/latex/koma-script/README" zu finden. Diese -Datei kann zusätzlich außerhalb des Verzeichnisses abgelegt sein. - -Entpacken Sie das TEXMF-Archiv unter Beibehaltung aller Unterverzeichnisse, -ohne jedoch ein neues Verzeichnis anzulegen, entweder im lokalen TEXMF-Baum -oder in Ihrem persönlichen TEXMF-Baum. Näheres zu lokalen oder persönlichen -TEXMF-Bäumen ist der Anleitung Ihres TeX-Systems zu entnehmen. - -Zum Schluss führen Sie einen Refresh der Filename Database durch. Bei teTeX -oder teTeX-basierten TeX-Systemen geschieht dies mit dem Programm texconfig -oder direkt mit texhash oder mktexlsr. Bei Verwendung von MiKTeX findet man -einen entsprechenden Knopf in der Applikation "MiKTeX Options". Je nach dem -Verzeichnis der Installation ist der Refresh nur als Administrator oder als -root möglich. Näheres entnehmen Sie bitte der Anleitung des TeX-Systems! - - -Installation eines entpackten TEXMF-Baums ------------------------------------------ - -Liegt KOMA-Script bereits als entpackter TEXMF-Baum vor, so können Sie diesen -entweder als weiteren TEXMF-Baum anmelden oder Sie kopieren den Inhalt dieses -TEXMF-Baums unter Beibehaltung der Verzeichnisstruktur in einen privaten oder -lokalen TEXMF-Baum. - -Auch dann ist ein Refresh der Filename Database notwendig. Näheres hierzu ist -dem letzten Absatz des vorherigen Abschnitts zu entnehmen. - - -Installation aus einer Minimaldistribution ------------------------------------------- - -Die Installation aus einer Minimaldistibution, die nur die Dateien enthält, -die in manifest.txt als Minimum aufgeführt sind, ist weniger einfach. Dafür -werden zwingend Gnu-Make und diverse Unix-Werkzeuge benötigt! - -Unter dieser Voraussetzung gehen Sie dan wie folgt vor: - -- Legen Sie eine Datei Makefile.cfg an. - -- Kopieren Sie eine der mit "#INSTALLTEXMF" beginnenden Zeilen aus der Datei - Makefile.baseinit in diese Datei. - -- Entfernen Sie das "#" am Anfang. - -- Ändern Sie die Zeile so, dass nach dem Gleichheitszeichen das Verzeichnis - des gewünschten TEXMF-Baums für die Installation steht. - ACHTUNG: Am Ende des Verzeichnisses darf KEIN "/" stehen! - -- Rufen Sie das Programm "make" auf. - -- Wenn "make" ohne Fehler beendet wurde, rufen Sie "make install" auf. - -Zum Schluss führen Sie einen Refresh der Filename Database durch. Bei teTeX -oder teTeX-basierten TeX-Systemen geschieht dies mit dem Programm texconfig -oder direkt mit texhash oder mktexlsr. Bei Verwendung von MiKTeX findet man -einen entsprechenden Knopf in der Applikation "MiKTeX Options". Je nach dem -Verzeichnis der Installation ist der Refresh nur als Administrator oder als -root möglich. Näheres entnehmen Sie bitte der Anleitung des TeX-Systems! - - -Notinstallation aus einer Minimaldistribution ---------------------------------------------- - -Falls Sie nicht über Gnu-Make oder die sonstigen notwendigen Werkzeuge für -die Installation über "make" verfügen, so können Sie das KOMA-Script-Paket -trotzdem aus einer Minimaldistribution korrekt installieren. Dies ist dann -nur mit etwas mehr Handarbeit verbunden. - -- Legen Sie zunächst in dem TEXMF-Baum, in den Sie KOMA-Script installieren - wollen, die Verzeichnisse source/latex/koma-script, doc/latex/koma-script - und tex/latex/koma-script an. - -- Kopieren Sie alle Dateien aus der KOMA-Script-Verteilung in das angelegte - Verzeichnis source/latex/koma-script. - -- Kopieren Sie alle Dateien mit der Endung ".pdf", ".html" oder ".txt" und - die Datei README in das Verzeichnis doc/latex/koma-script. - -- Wechseln Sie in das Verzeichnis source/latex/koma-script. - -- Rufen Sie - tex scrmain.ins - auf. Beantworten Sie alle eventuell gestellte Fragen mit "y" für "yes". - -- Kopieren Sie alle neu entstandenen Dateien mit der Endung ".cls", ".sty", - ".hak" oder ".lco" in das Verzeichnis tex/latex/koma-script. - -Zum Schluss führen Sie einen Refresh der Filename Database durch. Bei teTeX -oder teTeX-basierten TeX-Systemen geschieht dies mit dem Programm texconfig -oder direkt mit texhash oder mktexlsr. Bei Verwendung von MiKTeX findet man -einen entsprechenden Knopf in der Applikation "MiKTeX Options". Je nach dem -Verzeichnis der Installation ist der Refresh nur als Administrator oder als -root möglich. Näheres entnehmen Sie bitte der Anleitung des TeX-Systems! - ----------------------- -Markus Kohm, 2014/2016 diff --git a/macros/latex/contrib/koma-script/doc/authorpart-de.tex b/macros/latex/contrib/koma-script/doc/authorpart-de.tex new file mode 100644 index 0000000000..c2992cc66c --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/authorpart-de.tex @@ -0,0 +1,65 @@ +% ====================================================================== +% authorpart-de.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% First part: KOMA-Script for Authors +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{authorpart-de.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (part KOMA-Script for Authors)] + +\setpartpreamble{% + \vspace*{2\baselineskip}% + \setlength{\parindent}{1em}% + + \noindent In diesem Teil sind die Informationen für die Autoren von + Artikeln, Berichten, Büchern und Briefen zu finden. Dabei wird davon + ausgegangen, dass der normale Anwender sich weniger dafür interessiert, wie + in \KOMAScript{} die Dinge implementiert sind und wo die Schwierigkeiten + dabei liegen. Auch ist es für den normalen Anwender wenig interessant, + welche obsoleten Optionen und Anweisungen noch enthalten sind. Er will + wissen, wie er aktuell etwas erreichen kann. Eventuell ist er noch an + typografischen Hintergrundinformationen interessiert. + + Die wenigen Passagen, die weiterführende Informationen und Begründungen + enthalten und deshalb für ungeduldige Leser weniger von Interesse sind, + wurden in diesem Teil in serifenloser Schrift gesetzt und können bei Bedarf + übersprungen werden. Wer hingegen noch mehr Informationen zu Hintergründen + der Implementierung, Nebenwirkungen bei Verwendung anderer Pakete und + zu obsoleten Optionen oder Anweisungen sucht, sei auf + \autoref{part:forExperts} ab \autopageref{part:forExperts} + verwiesen. Darüber hinaus beschäftigt sich jener Teil von \KOMAScript{} auch + mit all den Möglichkeiten, die speziell für Autoren von Paketen und Klassen + geschaffen wurden. +} + +\part{\KOMAScript{} für Autoren\label{part:forAuthors}} + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/authorpart-en.tex b/macros/latex/contrib/koma-script/doc/authorpart-en.tex new file mode 100644 index 0000000000..a2e9ec4721 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/authorpart-en.tex @@ -0,0 +1,62 @@ +% ====================================================================== +% authorpart-en.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% First part: KOMA-Script for Authors +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{authorpart-en.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (part KOMA-Script for Authors)] +\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} + +\setpartpreamble{% + \vspace*{2\baselineskip}% + \setlength{\parindent}{1em}% + + \noindent This part provides information for writers of articles, reports, + books, and letters. The average user is probably less interested in how + things are implemented in \KOMAScript{} and what pitfalls exist. Also, + normal users aren't interested in obsolete options and instructions. They + want to know how to achieve things using current options and instructions, + and perhaps in some background information about typography. + + The few passages in this part which contain extra information and + explanations that may be of less interest for the impatient reader are set + in a sans-serif typeface and can be skipped if desired. For those who are + interested in more information about the implementation, side-effects with + other packages, or obsolete options and instructions, please refer to + \autoref{part:forExperts} beginning on \autopageref{part:forExperts}. That + part of the \KOMAScript{} guide also describes all the features that were + created specially for authors of packages and classes.% +} + +\part{\KOMAScript{} for Authors\label{part:forAuthors}} + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-compatibility-de.tex b/macros/latex/contrib/koma-script/doc/common-compatibility-de.tex new file mode 100644 index 0000000000..3a8652febb --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-compatibility-de.tex @@ -0,0 +1,182 @@ +% ====================================================================== +% common-compatibility-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-compatibility-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] + +\section{Kompatibilität zu früheren Versionen von \KOMAScript} +\seclabel{compatibilityOptions} +\BeginIndexGroup +\BeginIndex{}{Kompatibilität} + +\IfThisCommonFirstRun{}{% + Es gilt sinngemäß, was in + \autoref{sec:\ThisCommonFirstLabelBase.compatibilityOptions} geschrieben + wurde.\IfThisCommonLabelBase{scrlttr2}{ Allerdings existiert diese + Möglichkeit bei \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} bereits seit + Version~2.9t, während \Package{scrletter} sie nicht bietet, sondern + sozusagen immer von \OptionValue{version}{last} ausgeht.}{} Falls Sie also + \autoref{sec:\ThisCommonFirstLabelBase.compatibilityOptions} bereits gelesen + und verstanden haben, können Sie in + \autoref{sec:\ThisCommonLabelBase.compatibilityOptions.next} auf + \autopageref{sec:\ThisCommonLabelBase.compatibilityOptions.next} + fortfahren.% +} + +\IfThisCommonLabelBaseOneOf{typearea,maincls,scrlttr2}{% + Wer seine Dokumente im Quellcode archiviert, legt in der Regel allergrößten + Wert darauf, dass bei zukünftigen \LaTeX{}-Läufen immer wieder exakt + dasselbe Ergebnis erzielt wird. In einigen Fällen führen aber Verbesserungen + und Korrekturen \IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{an der + Klasse}{am Paket} zu Änderungen im Verhalten, inbesondere beim + Umbruch. Dies ist jedoch manchmal eher unerwünscht.% +}{% + \IfThisCommonLabelBase{scrextend}{% +% In einigen Fällen ist es so, dass Verbesserungen und Korrekturen am Paket +% zu Änderungen im Verhalten, inbesondere beim Umbruch, führen. Dies ist +% jedoch nicht immer erwünscht.% +% Wer seine Dokumente im Quellcode archiviert, legt in der Regel +% allergrößten Wert darauf, dass bei zukünftigen \LaTeX{}-Läufen immer +% wieder exakt dasselbe Ergebnis erzielt wird. In einigen Fällen ist es aber +% so, dass Verbesserungen und Korrekturen an der Klasse zu Änderungen im +% Verhalten, inbesondere beim Umbruch, führen.% + }{% + \ThisCommonLabelBaseFailure +% \IfThisCommonLabelBase{scrlttr2}{% +% In einigen Fällen ist es so, dass Verbesserungen und Korrekturen an der +% Klasse zu Änderungen im Verhalten, inbesondere beim Umbruch, +% führen. Dies ist jedoch nicht immer erwünscht.% +% }{}% + }% +}% + + +\begin{Declaration} + \OptionVName{version}{Wert} + \OptionValue{version}{first} + \OptionValue{version}{last} +\end{Declaration} +\IfThisCommonLabelBase{scrextend}{Bei }{Seit }% +\ChangedAt{v2.96a}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% +\ChangedAt{v2.9t}{\Class{scrlttr2}}% +\ChangedAt{v3.01b}{\Package{typearea}}% +\IfThisCommonLabelBase{typearea}{% + Version~3.01b besteht bei \Package{typearea} }{% + \IfThisCommonLabelBase{maincls}{% + Version~2.96a besteht bei \KOMAScript{} }{% + \IfThisCommonLabelBase{scrlttr2}{% + Version~2.9t besteht bei \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} }{% + \IfThisCommonLabelBase{scrextend}{\Package{scrextend} besteht }{% + \InteralCommonFileUsageError }% + }% + }% +}% +die Wahl, ob eine Quelldatei, soweit irgend möglich, auch zukünftig bei einem +\LaTeX{}-Lauf zu exakt demselben Ergebnis führen soll oder ob sie jeweils +entsprechend der Anpassungen der neusten +Version\IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{ der Klasse}{} zu setzen +ist. Zu welcher Version Kompatibilität herzustellen ist, wird dabei über die +Option \Option{version} festgelegt. Kompatibilität zur ältesten unterstützten +\KOMAScript-Version kann mit +\OptionValue{version}{first}\important{\OptionValue{version}{first}} oder +\OptionValue{version}{2.9} oder \OptionValue{version}{2.9t} erreicht +werden. Bei Angabe einer unbekannten Version als \PName{Wert} wird eine +Warnung ausgegeben und sicherheitshalber \OptionValue{version}{first} +angenommen. + +Mit \OptionValue{version}{last}\important{\OptionValue{version}{last}}% +\textnote{Voreinstellung} kann die jeweils neuste Version ausgewählt +werden. In diesem Fall wird also auf rückwirkende Kompatibilität +verzichtet. Wird die Option ohne Wertangabe verwendet, so wird ebenfalls +\PValue{last} angenommen. \ChangedAt{v3.01a}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}\and \Class{scrlttr2}\and + \Package{scrextend}}Dies entspricht auch der +Voreinstellung\IfThisCommonLabelBase{scrextend}{}{, solange keine obsolete + Option verwendet wird}. + +\IfThisCommonLabelBase{scrextend}{% scrextend kennt keine obsoleten Optionen +}{% + Bei\textnote{Achtung!} der Verwendung einer obsoleten Option von + \KOMAScript~2 setzt \KOMAScript~3 automatisch + \OptionValue{version}{first}. In der dabei ausgegebenen Warnung wird + erklärt, wie man diese Kompatibilitätsumschaltung verhindern + kann. Alternativ kann man auch nach der obsoleten Option selbst eine + abweichende Einstellung für Option \Option{version} wählen.% +} + +Die Frage der Kompatibilität betrifft in erster Linie Fragen des +Umbruchs. Neue Möglichkeiten, die sich nicht auf den Umbruch auswirken, sind +auch dann verfügbar, wenn man per Option die Kompatibilität zu einer älteren +Version ausgewählt hat. Die Option hat keine Auswirkungen auf +Umbruchänderungen, die bei Verwendung einer neueren Version durch Beseitigung +eindeutiger Fehler entstehen. Wer\textnote{Tipp!} auch im Fehlerfall +unbedingte Umbruchkompatibilität benötigt, sollte stattdessen mit dem Dokument +auch die verwendete \KOMAScript-Version archivieren. + +\IfThisCommonLabelBase{scrlttr2}{\begin{Example} + Die Beispielbriefe dieses Kapitels sollen alle Möglichkeiten nutzen, die in + der neusten Version von \KOMAScript{} zur Verfügung stehen. Dazu muss beim + Laden der Klasse die Kompatibilität entsprechend gesetzt werden:% + \lstinputcode[xleftmargin=1em,lastline=1]{letter-example-00-de.tex}% + \iftrue% Umbruchkorrektur + Hier wurde einfach mit dem symbolischen Wert \PValue{last} die neuste + Version gewählt.% + \else% + Um nicht bei jeder neuen Version eine neue Versionsnummer angeben zu + müssen, wurde hier die Möglichkeit des symbolischen Wertes \PValue{last} + gewählt.% + \fi +\end{Example}}{} + +Es\textnote{Achtung!} ist zu beachten, dass die Option \Option{version} nach +dem Laden % +\IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{der Klasse}{% + des Pakets \IfThisCommonLabelBase{typearea}{\Package{typearea}}{% + \IfThisCommonLabelBase{scrextend}{\Package{scrextend}}{% + \InternalCommonFileUsageError }% + }% +} nicht mehr verändert werden kann. Das Setzen mit +\DescRef{\ThisCommonLabelBase.cmd.KOMAoptions} oder +\DescRef{\ThisCommonLabelBase.cmd.KOMAoption} ist +% Umbruchkorrektur!!!! +\IfThisCommonLabelBaseNotOneOf{maincls,scrlttr2,typearea}{für diese Option }{}% +daher nicht vorgesehen.% +% +\EndIndexGroup +% +\EndIndexGroup + +\phantomsection +\label{sec:\ThisCommonLabelBase.compatibilityOptions.end} +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-compatibility-en.tex b/macros/latex/contrib/koma-script/doc/common-compatibility-en.tex new file mode 100644 index 0000000000..61df7713b7 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-compatibility-en.tex @@ -0,0 +1,175 @@ +% ====================================================================== +% common-compatibility-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-compatibility-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] +\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} + +\section{Compatibility with Earlier Versions of \KOMAScript} +\seclabel{compatibilityOptions} +\BeginIndexGroup +\BeginIndex{}{Compatibility} + +\IfThisCommonFirstRun{}{% + The information in + \autoref{sec:\ThisCommonFirstLabelBase.compatibilityOptions} applies equally + to this chapter. + \IfThisCommonLabelBase{scrlttr2}{However, this feature has existed in + \Class{scrlttr2} since version~2.9t, whereas \Package{scrletter} does not + offer it. }{}% + So if you have already read and understood + \autoref{sec:\ThisCommonFirstLabelBase.compatibilityOptions} you can skip + ahead to \autopageref{sec:\ThisCommonLabelBase.compatibilityOptions.next}, + \autopageref{sec:\ThisCommonLabelBase.compatibilityOptions.next}.% +} + +\IfThisCommonLabelBaseOneOf{typearea,maincls,scrlttr2}{% + Those who produce their documents from source code typically attach the + utmost importance to the fact that future \LaTeX{} runs will yield exactly + the same result. In some cases, however, improvements and bug fixes to the + \IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{class}{package} will + result in changes of behaviour, especially to the layout. This, however, + may be undesirable.% +}{% + \IfThisCommonLabelBase{scrextend}{% + % In some cases, improvements and bug fixes to the package will result + % in changes of behaviour, especially to the layout. This, however, + % may be undesirable. Those who produce their documents from source code + % typically attach the utmost importance to the fact that future + % \LaTeX{} runs will yield exactly the same result.% + }{% + \ThisCommonLabelBaseFailure + % \IfThisCommonLabelBase{scrlttr2}{% + % In some cases, improvements and bug fixes to the package will result + % in changes of behaviour, especially to the layout. This, however, + % may be undesirable. + % }{}% + }% +}% + + +\begin{Declaration} + \OptionVName{version}{value}% + \OptionValue{version}{first}% + \OptionValue{version}{last} +\end{Declaration} +%\ChangedAt{v2.96a}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% +%\ChangedAt{v2.9t}{\Class{scrlttr2}}% +%\ChangedAt{v3.01b}{\Package{typearea}}% +\IfThisCommonLabelBase{scrextend}{With \Package{scrextend}, you can}{Since + \IfThisCommonLabelBase{typearea}{% + Version~3.01b, \Package{typearea}\ChangedAt{v3.01b}{\Package{typearea}}}{% + \IfThisCommonLabelBase{maincls}{% + Version~2.96a, \KOMAScript{}\ChangedAt{v2.96a}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}}}{% + \IfThisCommonLabelBase{scrlttr2}{% + Version~2.9t, \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}}% + \ChangedAt{v2.9t}{\Class{scrlttr2}}}{% + \InteralCommonFileUsageError}% + }% + }% +\ has been able to} % +choose whether the source file should, as much as possible, +continue to produce exactly the same result within a \LaTeX{} run or should +be formatted according to the modifications of the latest version% +\IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{ of the class}{}. You +can specify the version with which you want your file to be compatible by +using the \Option{version} option. Compatibility with the oldest supported +\KOMAScript{} version can be achieved with +\OptionValue{version}{first}\important{\OptionValue{version}{first}} or +\OptionValue{version}{2.9} or \OptionValue{version}{2.9t}. Setting +\PName{value} to an unknown release number will result in a warning message +and selects \OptionValue{version}{first} for safety. + +With \OptionValue{version}{last}\important{\OptionValue{version}{last}}% +\textnote{default}, you can select the latest version. In this case, you give +up backwards compatibility. If the option is used without a value, +\PValue{last} is assumed. This\ChangedAt{v3.01a}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}\and \Class{scrlttr2}\and + \Package{scrextend}} also corresponds to the default setting, as long as you +do not use any deprecated options. + +\IfThisCommonLabelBase{scrextend}{% scrextend doesn't recognize obsolete options +}{% + If\textnote{Attention!} you use a deprecated option of \KOMAScript~2, + \KOMAScript~3 will switch to \OptionValue{version}{first} automatically. + This will also result in a warning message that explains how to prevent + this switch. Alternatively, you can choose a different setting for + \Option{version} with the desired compatibility after the deprecated + option.% +} + +Compatibility is primarily a question of line and page breaks (wrapping). If +you choose compatibility with an older version, new options that do not affect +wrapping are still available. The \Option{version} option does not affect any +wrapping changes that are the result of fixing unambiguous errors. +If\textnote{Hint!} you need unconditional wrapping compatibility even in the +case of bugs, you should physically save the old \KOMAScript{} version you +need together with your document. + +\IfThisCommonLabelBase{scrlttr2}{% + \begin{Example} + The example letters in this chapter should use all the features of the + latest version of \KOMAScript{}. For this, the we set the compatibility + correspondingly when loading the class:% + \lstinputcode[xleftmargin=1em,lastline=1]{letter-example-00-en.tex}% + In this case the symbolic value \PValue{last} has been used to select the + latest version.% + \iftrue% Umbruchkorrektur + Here, the latest version was simply chosen with the symbolic value + \PValue{last}.% + \else% + In order not to have to specify a new version number for each new version, + the symbolic value \PValue{last} was chosen here.% + \fi + \end{Example}}{} + +Note\textnote{Attention!} that you cannot change the \Option{version} option +after loading the % +\IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{class}{% + \IfThisCommonLabelBase{typearea}{\Package{typearea}}{% + \IfThisCommonLabelBase{scrextend}{\Package{scrextend}}{% + \InternalCommonFileUsageError }% + }% +\ package}. Setting this option with +\DescRef{\ThisCommonLabelBase.cmd.KOMAoptions} or +\DescRef{\ThisCommonLabelBase.cmd.KOMAoption} will +therefore cause an error.% +\EndIndexGroup +% +\EndIndexGroup + +\phantomsection +\label{sec:\ThisCommonLabelBase.compatibilityOptions.end} +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-dictum-de.tex b/macros/latex/contrib/koma-script/doc/common-dictum-de.tex new file mode 100644 index 0000000000..488ffe9502 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-dictum-de.tex @@ -0,0 +1,275 @@ +% ====================================================================== +% common-dictum-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-dictum-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] + +\section{Schlauer Spruch} +\seclabel{dictum}% +\BeginIndexGroup +\BeginIndex{}{Spruch}% +\BeginIndex{}{Zitat}% +\BeginIndex{}{Redewendung}% + +\IfThisCommonFirstRun{}{% + Es gilt sinngemäß, was in \autoref{sec:\ThisCommonFirstLabelBase.dictum} + geschrieben wurde. % + \IfThisCommonLabelBase{scrextend}{% + Jedoch werden von \Package{scrextend} die Anweisungen + \DescRef{maincls.cmd.setchapterpreamble} und + \DescRef{maincls.cmd.setpartpreamble} nicht definiert. % + \iftrue% Umbruchvariante + Ob die verwendete Klasse eine entsprechende Anweisung bietet, ist der + Anleitung zur jeweiligen Klasse zu entnehmen. % + \fi% + }{}% + Falls Sie also \autoref{sec:\ThisCommonFirstLabelBase.dictum} bereits + gelesen und verstanden haben, können Sie nach dem Ende dieses Abschnitts auf + \autopageref{sec:\ThisCommonLabelBase.dictum.next} mit + \autoref{sec:\ThisCommonLabelBase.dictum.next} fortfahren.% +} + +\IfThisCommonLabelBase{maincls}{% + Ein vor allem bei Büchern manchmal anzutreffendes Element sind + Redewendungen oder Zitate, die rechtsbündig unter oder über einer + Überschrift gesetzt werden. Dabei werden der Spruch selbst und der + Quellennachweis in der Regel speziell formatiert.% +}{% + \IfThisCommonLabelBase{scrextend}{% Umbruchkorrekturvarianten + \iffalse% Umbruchkorrektur + Ein häufiger anzutreffendes Element ist eine Redewendung oder Zitat, das + rechtsbündig unter oder über einer Überschrift gesetzt wird. Dabei werden + der Spruch selbst und der Quellennachweis in der Regel speziell + formatiert.% + \fi% + }{% + Ein häufiger anzutreffendes Element sind Zitate oder eine Redewendungen, + die mit Quellenangabe und eigener Formatierung unter oder über einer + Überschrift gesetzt werden.% + }% +} + +\begin{Declaration} + \Macro{dictum}\OParameter{Urheber}\Parameter{Spruch} + \Macro{dictumwidth} + \Macro{dictumauthorformat}\Parameter{Urheber} + \Macro{dictumrule} + \Macro{raggeddictum} + \Macro{raggeddictumtext} + \Macro{raggeddictumauthor} +\end{Declaration}% +Ein \IfThisCommonLabelBase{scrextend}{Spruch oder Zitat}{solcher Spruch} kann +mit Hilfe der Anweisung \Macro{dictum} gesetzt werden. +\IfThisCommonLabelBase{maincls}{% + Bei\textnote{Tipp!} \KOMAScript-Klassen wird für Kapitel oder Teile + empfohlen, \Macro{dictum} als obligatorisches Argument der Anweisung + \DescRef{maincls.cmd.setchapterpreamble} beziehungsweise + \DescRef{maincls.cmd.setpartpreamble} (siehe + \autoref{sec:maincls.structure}, + \DescPageRef{maincls.cmd.setchapterpreamble}) zu verwenden. \iffalse Dies + ist jedoch nicht zwingend.\fi% Umbruchkorrektur + \par% +}{}% +Der Spruch wird\IfThisCommonLabelBase{scrextend}{ hierzu}{} zusammen mit einem +optional anzugebenden \PName{Urheber} in einer \Macro{parbox}\IndexCmd{parbox} +(siehe \cite{latex:usrguide}) der Breite +\Macro{dictumwidth}\important{\Macro{dictumwidth}} gesetzt. Dabei ist +\Macro{dictumwidth} keine Länge, die mit \Macro{setlength} gesetzt wird. Es +handelt sich um ein Makro, das mit \Macro{renewcommand} umdefiniert werden +kann. Vordefiniert ist \PValue{0.3333\Length{textwidth}}, also ein Drittel der +jeweiligen Textbreite. Die Box selbst wird mit der Anweisung +\Macro{raggeddictum}\important{\Macro{raggeddictum}} +ausgerichtet. Voreingestellt ist dabei +\Macro{raggedleft}\IndexCmd{raggedleft}, also rechtsbündig. +\Macro{raggeddictum} kann mit +\IfThisCommonLabelBase{scrextend}{% Umbruchoptimierung +}{Hilfe von }\Macro{renewcommand} umdefiniert werden. + +Innerhalb der Box wird der \PName{Spruch} mit +\Macro{raggeddictumtext}\important{\Macro{raggeddictumtext}} +angeordnet. Voreingestellt ist hier \Macro{raggedright}\IndexCmd{raggedright}, +also linksbündig. Eine Umdefinierung ist auch hier mit \Macro{renewcommand} +möglich. % +\BeginIndexGroup +\BeginIndex{FontElement}{dictum}\LabelFontElement{dictum}% +\LabelFontElement{dictumtext}% +Die Ausgabe erfolgt in der für Element +\FontElement{dictum}\important{\FontElement{dictum}} eingestellten +Schriftart, die mit den Anweisungen +\DescRef{\ThisCommonLabelBase.cmd.setkomafont} und +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) geändert werden kann. Die +Voreinstellung entnehmen Sie bitte +\autoref{tab:\ThisCommonFirstLabelBase.dictumfont}% +\IfThisCommonFirstRun{.% + \begin{table} +% \centering% +% \caption + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside} + [{Schriftvoreinstellungen für die Elemente des + Spruchs}] + {\label{tab:\ThisCommonLabelBase.dictumfont}\hspace{0pt plus 1ex}% + Voreinstel\-lungen der Schrift für die Elemente des Spruchs} + [l] + \begin{tabular}[t]{ll} + \toprule + Element & Voreinstellung \\ + \midrule + \DescRef{\ThisCommonLabelBase.fontelement.dictum} & + \Macro{normalfont}\Macro{normalcolor}\Macro{sffamily}\Macro{small}\\ + \DescRef{\ThisCommonLabelBase.fontelement.dictumauthor} & + \Macro{itshape}\\ + \bottomrule + \end{tabular} + \end{captionbeside} + \end{table} +}{% + , \autopageref{tab:\ThisCommonFirstLabelBase.dictumfont}.% +}% +\EndIndexGroup + +Ist ein \PName{Urheber} angegeben, so wird dieser mit einer Linie über die +gesamte Breite der \Macro{parbox} vom \PName{Spruch} abgetrennt. Diese% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.10}{\Package{scrextend}}% + }{\InternalCommonFileUsageError}% +} % +Linie ist in \Macro{dictumrule}\important{\Macro{dictumrule}} definiert. Es +handelt sich dabei um ein vertikales Objekt, das mit +\begin{lstcode} + \newcommand*{\dictumrule}{\vskip-1ex\hrulefill\par} +\end{lstcode} +vordefiniert ist. + +Mit \Macro{raggeddictumauthor}\important{\Macro{raggeddictumauthor}} wird die +Ausrichtung für die Linie und den Urheber vorgenommen. Voreingestellt ist +\Macro{raggedleft}. Auch diese Anweisung kann mit \Macro{renewcommand} +umdefiniert werden. Die Ausgabe erfolgt in der Form, die mit +\Macro{dictumauthorformat}\important{\Macro{dictumauthorformat}} festgelegt +ist. Das Makro erwartet den \PName{Urheber} als Argument. In der +Voreinstellung ist \Macro{dictumauthorformat} mit +\begin{lstcode} + \newcommand*{\dictumauthorformat}[1]{(#1)} +\end{lstcode} +definiert. Der \PName{Urheber} wird also in runde Klammern gesetzt. % +\BeginIndexGroup +\BeginIndex{FontElement}{dictumauthor}\LabelFontElement{dictumauthor}% +Für das Element +\FontElement{dictumauthor}\important{\FontElement{dictumauthor}} kann dabei +eine Abweichung der Schrift von der des Elements \FontElement{dictum}% +\IndexFontElement{dictum}% +\important{\FontElement{dictum}} definiert werden. Die Voreinstellung +entnehmen Sie bitte +\autoref{tab:maincls.dictumfont}\IfThisCommonLabelBase{scrextend}{, + \autopageref{tab:maincls.dictumfont}}{}. Eine Änderung ist mit Hilfe der +Anweisungen \DescRef{\ThisCommonLabelBase.cmd.setkomafont} und +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) möglich.% +\EndIndexGroup + +\IfThisCommonLabelBase{maincls}{% + Wird \Macro{dictum} innerhalb der Anweisung + \DescRef{maincls.cmd.setchapterpreamble} oder + \DescRef{maincls.cmd.setpartpreamble} (siehe + \autoref{sec:maincls.structure}, + \DescPageRef{maincls.cmd.setchapterpreamble}) verwendet, so ist Folgendes zu + beachten:\textnote{Achtung!} \Length{textwidth} ist nicht die Breite des + gesamten Textkörpers, sondern wie bei \Environment{minipage} die aktuelle + Textbreite. Ist also die Breite \Macro{dictumwidth} als + \PValue{.5\Length{textwidth}} definiert und bei + \DescRef{maincls.cmd.setchapterpreamble} wird als optionales Argument für + die Breite ebenfalls \PValue{.5\Length{textwidth}} angegeben, so erfolgt die + Ausgabe in einer Box, deren Breite ein Viertel der Breite des Textkörpers + ist. Die horizontale Anordnung erfolgt immer mit \Macro{raggeddictum}. Das + optionale Argument zur horizontalen Anordnung, das die beiden Anweisungen + vorsehen, ändert also nicht die Ausrichtung des Spruchs innerhalb der + Box. Es wird empfohlen\textnote{Tipp!}, bei Verwendung von \Macro{dictum} + auf die optionale Angabe einer Breite bei + \DescRef{maincls.cmd.setchapterpreamble} oder + \DescRef{maincls.cmd.setpartpreamble} zu verzichten. + + Sollen\textnote{Tipp!} mehrere schlaue Sprüche untereinander gesetzt werden, + so sollten diese durch einen zusätzlichen Abstand vertikal voneinander + abgesetzt werden. Ein solcher kann leicht mit der Anweisung + \Macro{bigskip}\IndexCmd{bigskip} gesetzt werden.% + \iftrue% +}{\csname iffalse\endcsname}% +% + \begin{Example} + Sie schreiben ein Kapitel über die moderne Ehe. Dabei wollen Sie in der + Präambel zur Kapitelüberschrift einen schlauen Spruch setzen. Dieser soll + unter der Überschrift erscheinen. Also schreiben Sie: +\begin{lstcode} + \setchapterpreamble[u]{% + \dictum[Schiller]{Drum prüfe, + wer sich ewig bindet \dots}} + \chapter{Die moderne Ehe} +\end{lstcode} + Die Ausgabe erfolgt dann in der Form: + \begin{ShowOutput} + {\usekomafont{disposition}\usekomafont{chapter}\Large + 17\enskip Die moderne Ehe\raggedright\par} + \vspace{\baselineskip} + \dictum[Schiller]{Drum prüfe, wer sich ewig bindet~\dots} + \end{ShowOutput} + + Wenn Sie wollen, dass nicht ein Drittel, sondern nur ein Viertel der + verfügbaren Textbreite für den Spruch verwendet wird, so definieren Sie + \Macro{dictumwidth} wie folgt um: +\begin{lstcode} + \renewcommand*{\dictumwidth}{.25\textwidth} +\end{lstcode} + \end{Example} +% + \IfThisCommonLabelBase{maincls}{% Umbruchkorrekturtext + An dieser Stelle sei noch auf das Paket~\Package{ragged2e}% + \important{\Package{ragged2e}}\IndexPackage{ragged2e} hingewiesen, mit dem + man Flattersatz mit Trennung erreichen kann (siehe + \cite{package:ragged2e}).% + }{% + \ExampleEndFix + }% +\fi +% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-dictum-en.tex b/macros/latex/contrib/koma-script/doc/common-dictum-en.tex new file mode 100644 index 0000000000..f8cee03811 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-dictum-en.tex @@ -0,0 +1,236 @@ +% ====================================================================== +% common-dictum-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-dictum-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] +\translator{Gernot Hassenpflug\and Markus Kohm\and Krickette Murabayashi\and + Karl Hagen} + +\section{Dicta} +\seclabel{dictum}% +\BeginIndexGroup +\BeginIndex{}{saying}% +\BeginIndex{}{dictum}% +\BeginIndex{}{epigraph}% + +\IfThisCommonFirstRun{}{% + The information in \autoref{sec:\ThisCommonFirstLabelBase.dictum} applies + equally to this chapter. % + \IfThisCommonLabelBase{scrextend}{% + However, \Package{scrextend} does not support the commands + \DescRef{maincls.cmd.setchapterpreamble} and + \DescRef{maincls.cmd.setpartpreamble}. + \iftrue% Umbruchvariante + Whether the class you are using offers an equivalent instruction + can be found in the documentation for the respective class .% + \fi% + }{}% + So if you have already read and understood + \autoref{sec:\ThisCommonFirstLabelBase.dictum}, you can skip ahead to + \autoref{sec:\ThisCommonLabelBase.dictum.next}, + \autopageref{sec:\ThisCommonLabelBase.dictum.next}.% +}{}% + +\IfThisCommonLabelBase{scrextend}{% Umbruchkorrekturvarianten + A common element in a document is an epigraph or quotation that is set above + or below a chapter or section heading, typically right-justified. The + epigraph and its source are usually specially formatted.% +}{% + A common element in a document is an epigraph or quotation that is set above + or below a chapter or section heading, along with a reference to the source + and its own formatting.% +} % +\KOMAScript{} refers to such an epigraph as a \emph{dictum}. + +\begin{Declaration} + \Macro{dictum}\OParameter{author}\Parameter{text}% + \Macro{dictumwidth}% + \Macro{dictumauthorformat}\Parameter{author}% + \Macro{dictumrule}% + \Macro{raggeddictum}% + \Macro{raggeddictumtext}% + \Macro{raggeddictumauthor} +\end{Declaration}% +You can set such a saying with the help of the \Macro{dictum} command. % +\IfThisCommonLabelBase{maincls}{% + This\textnote{Hint!} macro can be included in the mandatory argument of + either the \DescRef{maincls.cmd.setchapterpreamble} or the + \DescRef{maincls.cmd.setpartpreamble} command. However, this is not + obligatory.\par% +}{}% +The dictum, along with an optional \PName{author}, is inserted in a +\Macro{parbox}\IndexCmd{parbox} (see \cite{latex:usrguide}) of width +\Macro{dictumwidth}. However, \Macro{dictumwidth} is not a length which can be +set with \Macro{setlength}. It is a macro that can be redefined using +\Macro{renewcommand}. The default is \PValue{0.3333\Length{textwidth}}, which +is one third of the text width. The box itself is aligned with the command +\Macro{raggeddictum}. The default is \Macro{raggedleft}\IndexCmd{raggedleft}, +that is, right justified. \Macro{raggeddictum} can be redefined +with \IfThisCommonLabelBase{scrextend}{% Umbruchoptimierung +}{the help of }\Macro{renewcommand}. + +You can align the \PName{dictum} within the box using +\Macro{raggeddictumtext}\important{\Macro{raggeddictumtext}}. +The default is \Macro{raggedright}\IndexCmd{raggedright}, that is, left +justified. You can also redefine this macro with \Macro{renewcommand}.% +\BeginIndexGroup +\BeginIndex{FontElement}{dictum}\LabelFontElement{dictum}% +\LabelFontElement{dictumtext}% +The output uses the default font setting for the element +\FontElement{dictum}\important{\FontElement{dictum}}, which can be changed +with the commands \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (see +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}). Default settings are +listed in \autoref{tab:maincls.dictumfont}% +\IfThisCommonFirstRun{.% + \begin{table} +% \centering% + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside}{Default settings for the elements of a dictum} + [l] + \begin{tabular}[t]{ll} + \toprule + Element & Default \\ + \midrule + \DescRef{\LabelBase.fontelement.dictum} & + \Macro{normalfont}\Macro{normalcolor}\Macro{sffamily}\Macro{small}\\ + \DescRef{\LabelBase.fontelement.dictumauthor} & + \Macro{itshape}\\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:\ThisCommonLabelBase.dictumfont} + \end{table} +}{% + , \autopageref{tab:\ThisCommonFirstLabelBase.dictumfont}.% +} +\EndIndexGroup + +If an \PName{author} is defined, it is separated from the \PName{dictum} by +a horizontal rule spanning the full width of the \Macro{parbox}. This% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.10}{\Package{scrextend}}% + }{\InternalCommonFileUsageError}% +} % +rule is defined in \Macro{dictumrule}\important{\Macro{dictumrule}} as a +vertical object with +\begin{lstcode} + \newcommand*{\dictumrule}{\vskip-1ex\hrulefill\par} +\end{lstcode} + +The \Macro{raggeddictumauthor}\important{\Macro{raggeddictumauthor}} command +defines the alignment for the rule and the \PName{author}. The default is +\Macro{raggedleft}. This command can also be redefined using +\Macro{renewcommand}. The format is defined with +\Macro{dictumauthorformat}\important{\Macro{dictumauthorformat}}. This macro +expects the \PName{author} text as its argument. By default +\Macro{dictumauthorformat} is defined as +\begin{lstcode} + \newcommand*{\dictumauthorformat}[1]{(#1)} +\end{lstcode} +Thus the \PName{author} is set enclosed in rounded parentheses. +\BeginIndexGroup +\BeginIndex{FontElement}{dictumauthor}\LabelFontElement{dictumauthor}% +For the \FontElement{dictumauthor}\important{\FontElement{dictumauthor}} +element, you can define a different font than that used for the +\DescRef{\LabelBase.fontelement.dictum} element. The default settings are +listed in \autoref{tab:maincls.dictumfont}. Changes can be made using the +\DescRef{\ThisCommonLabelBase.cmd.setkomafont} and +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}).% +\EndIndexGroup + +\IfThisCommonLabelBase{maincls}{% + If you use \Macro{dictum} within the + \DescRef{maincls.cmd.setchapterpreamble} or + \DescRef{maincls.cmd.setpartpreamble} macro, \Length{textwidth} is not the + width of the whole text body but the current text width. If + \Macro{dictumwidth} is set to \PValue{.5\Length{textwidth}} and + \DescRef{maincls.cmd.setchapterpreamble} has an optional width of + \PValue{.5\Length{textwidth}} too, you will get a box with a width one + quarter of the text width. The horizontal positioning of the dictum inside + the box is always done with \Macro{raggeddictum}. The optional argument for + horizontal positioning which is implemented for these two commands has no + effect to the \Macro{text}. If you use \Macro{dictum} you should + refrain from setting the optional width for + \DescRef{maincls.cmd.setchapterpreamble} or + \DescRef{maincls.cmd.setpartpreamble}. + + If\textnote{Hint!} you have more than one dictum, one under another, you + should separate them by an additional vertical space, which is easily + accomplished using the \Macro{bigskip}\IndexCmd{bigskip} command.% + \iftrue% +}{\csname iffalse\endcsname} + + \begin{Example} + You are writing a chapter about modern marriage, and you want to place a + dictum in the preamble to the chapter heading. You write: +\begin{lstcode} + \setchapterpreamble[u]{% + \dictum[Schiller]{So pause ye who would link your fates~\dots}} + \chapter{Modern Marriage} +\end{lstcode} + The output would look as follows: + \begin{ShowOutput} + {\usekomafont{disposition}\usekomafont{chapter}% + 17\enskip Modern Marriage\par} \vspace{\baselineskip} + \dictum[Schiller]{So pause ye who would link + your fates~\dots} + \end{ShowOutput} + + If you want the dictum to span only a quarter of the text width + rather than a third, you can redefine \Macro{dictumwidth} this way: +\begin{lstcode} + \renewcommand*{\dictumwidth}{.25\textwidth} +\end{lstcode} +\end{Example} + +\IfThisCommonLabelBase{maincls}{}{% Umbruchkorrekturtext + At this point, note the \Package{ragged2e}\important{\Package{ragged2e}}% + \IndexPackage{ragged2e} package, with which you can produce unjustified text + that uses hyphenation (see \cite{package:ragged2e}).% +}% +\fi +% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-draftmode-de.tex b/macros/latex/contrib/koma-script/doc/common-draftmode-de.tex new file mode 100644 index 0000000000..62156be405 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-draftmode-de.tex @@ -0,0 +1,112 @@ +% ====================================================================== +% common-draftmode-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-draftmode-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs: draft)] + +\section{Entwurfsmodus} +\seclabel{draft}% +\BeginIndexGroup +\BeginIndex{}{Entwurf}% + +\IfThisCommonFirstRun{}{% + \IfThisCommonLabelBase{scrlttr2}{Für + \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}}}{Es} gilt sinngemäß, was in + \autoref{sec:\ThisCommonFirstLabelBase.draft} geschrieben wurde. Falls Sie + also \autoref{sec:\ThisCommonFirstLabelBase.draft} bereits gelesen und + verstanden haben, können Sie nach dem Ende dieses Abschnitts auf + \autopageref{sec:\ThisCommonLabelBase.draft.next} mit + \autoref{sec:\ThisCommonLabelBase.draft.next} + fortfahren.\IfThisCommonLabelBase{scrlttr2}{ Das Paket \Package{scrletter} + bietet selbst keinen Entwurfsmodus, sondern verlässt sich diesbezüglich + auf die verwendete Klasse.}{}% +} + +\IfThisCommonLabelBase{scrextend}{}{% + Viele Klassen und viele Pakete kennen neben dem normalen Satzmodus auch + einen Entwurfsmodus. Die Unterschiede zwischen diesen beiden sind so + vielfältig wie die Klassen und Pakete, die diese Unterscheidung anbieten.% + \IfThisCommonLabelBase{scrextend}{% Umbruchkorrekturtext + \ So führt der Entwurfsmodus einiger Pakete auch zu Änderungen der + Ausgabe, die sich auf den Umbruch des Dokuments auswirken. Das ist bei + \Package{scrextend} jedoch nicht der Fall.% + }{}% +} + +\begin{Declaration} + \OptionVName{draft}{Ein-Aus-Wert} + \OptionVName{overfullrule}{Ein-Aus-Wert} +\end{Declaration}% +Mit Option \Option{draft}\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrartcl}\and + \Class{scrreprt}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}\OnlyAt{\Class{scrlttr2}}% + }{}% +} wird zwischen Dokumenten im Entwurfsstadium und fertigen +Dokumenten\Index{Endfassung} unterschieden. Als \PName{Ein-Aus-Wert} kann +einer der Standardwerte für einfache Schalter aus +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} verwendet +werden. Bei Aktivierung der Option\important{\OptionValue{draft}{true}} werden +im Falle überlanger Zeilen am Zeilenende kleine, schwarze Kästchen +ausgegeben. Diese Kästchen erleichtern dem ungeübten Auge, Absätze ausfindig +zu machen, die manueller Nachbearbeitung bedürfen. Demgegenüber erscheinen in +der Standardeinstellung \OptionValue{draft}{false} keine solchen +Kästchen. Solche Zeilen verschwinden übrigens häufig durch Verwendung des +Pakets +\Package{microtype}\IndexPackage{microtype}\important{\Package{microtype}} +\cite{package:microtype}. + +Da\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.25}{\Class{scrbook}\and \Class{scrartcl}\and + \Class{scrreprt}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.25}{\Class{scrlttr2}}% + }{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.25}{\Package{scrextend}}% + }{}% + }% +} Option \Option{draft} bei verschiedenen Paketen zu allerlei unerwünschten +Effekten führen kann, bietet \KOMAScript{} die Möglichkeit, die Markierung für +überlange Zeilen auch über Option +\Option{overfullrule}\important{\OptionValue{overfullrule}{true}} zu +steuern. Auch hier gilt, dass bei aktivierter Option die Markierung angezeigt +wird. +% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-draftmode-en.tex b/macros/latex/contrib/koma-script/doc/common-draftmode-en.tex new file mode 100644 index 0000000000..ed74e98120 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-draftmode-en.tex @@ -0,0 +1,109 @@ +% ====================================================================== +% common-draftmode-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-draftmode-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] +\translator{Markus Kohm\and Gernot Hassenpflug\and Krickette Murabayashi\and + Karl Hagen} + +\section{Draft Mode} +\seclabel{draft}% +\BeginIndexGroup +\BeginIndex{}{draft mode}% + +\IfThisCommonFirstRun{}{% + The information in \autoref{sec:\ThisCommonFirstLabelBase.draft} applies + equally to \IfThisCommonLabelBase{scrlttr2}{\Class{scrlttr2}% + \OnlyAt{\Class{scrlttr2}}}{this chapter}. So if you have already read + and understood \autoref{sec:\ThisCommonFirstLabelBase.draft}, you can skip + ahead to \autoref{sec:\ThisCommonLabelBase.draft.next} on + \autopageref{sec:\ThisCommonLabelBase.draft.next}.% + \IfThisCommonLabelBase{scrlttr2}{ The \Package{scrletter} package does not + provide a draft mode itself but relies upon the class you use.}{}% +} + +\IfThisCommonLabelBase{scrextend}{}{% + Many classes and packages provide a draft mode in addition to the normal + typesetting mode. The differences between these two are as diverse as the + classes and packages that offer this distinction.% + \IfThisCommonLabelBase{scrextend}{% Umbruchkorrekturtext + \ The draft mode of some packages also results in changes to the output + that affect the document's layout. This is not the case with + \Package{scrextend}.% + }{}% +} + +\begin{Declaration} + \OptionVName{draft}{simple switch} + \OptionVName{overfullrule}{simple switch} +\end{Declaration}% +The \Option{draft}\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrartcl}\and + \Class{scrreprt}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}\OnlyAt{\Class{scrlttr2}}% + }{}% +} option distinguishes between documents being drafted and finished +documents\Index{final version}. The \PName{simple switch} can be one of the +standard values for simple switches from \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch}. If you activate this +option\important{\OptionValue{draft}{true}}, small black boxes will be output +at the end of overly long lines. These boxes make it easier for the untrained +eye to locate the paragraphs that require manual post-processing. By contrast, +the default, \OptionValue{draft}{false}, shows no such boxes. Incidentally, +such lines often disappear when you use the +\Package{microtype}\IndexPackage{microtype}\important{\Package{microtype}} +package \cite{package:microtype}. + +Since\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.25}{\Class{scrbook}\and \Class{scrartcl}\and + \Class{scrreprt}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.25}{\Class{scrlttr2}}% + }{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.25}{\Package{scrextend}}% + }{}% + }% +} the \Option{draft} option can lead to all sorts of unwanted effects with +various packages, \KOMAScript{} allows you to control this marking of overly +long lines separately with the +\Option{overfullrule}\important{\OptionValue{overfullrule}{true}} option. If +this option is enabled, the marker is again displayed.% +% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-fontsize-de.tex b/macros/latex/contrib/koma-script/doc/common-fontsize-de.tex new file mode 100644 index 0000000000..b14cbdd95c --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-fontsize-de.tex @@ -0,0 +1,191 @@ +% ====================================================================== +% common-fontsize-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-fontsize-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs: fontsize)] + +\section{Wahl der Schriftgröße für das Dokument} +\seclabel{fontOptions} +\BeginIndexGroup +\BeginIndex{}{Schrift>Groesse=Größe} + +\IfThisCommonFirstRun{% + Die Grundschrift und deren Größe sind zentrale Elemente der Gestaltung eines + Dokuments. Wie in \autoref{cha:typearea} ausgeführt wurde, hängt die + Auf"|teilung zwischen Satzspiegel und Rändern wesentlich davon ab. Die + Grundschrift ist dabei die Schrift, die für die Masse des Textes eines + Dokuments verwendet wird. + \iffalse% Umbruchkorektur + Alle davon abweichenden Einstellungen, sei es in + der Form, der Dicke, der Neigung oder der Größe, stehen in einer Beziehung + zur Grundschrift.% + \fi% +}{% + \IfThisCommonLabelBase{scrlttr2}{Für \Class{scrlttr2}\OnlyAt{scrlttr2}}{Es} + gilt sinngemäß, was in \autoref{sec:\ThisCommonFirstLabelBase.fontOptions} + geschrieben wurde. \IfThisCommonLabelBase{scrlttr2}{Paket + \Package{scrletter} bietet selbst hingegen keine Schriftgrößenauswahl, + sondern verlässt sich diesbezüglich vollständig auf die verwendete + Klasse.}{} Falls Sie also + \autoref{sec:\ThisCommonFirstLabelBase.fontOptions} bereits gelesen und + verstanden haben, können Sie \IfThisCommonLabelBase{scrlttr2}{beim Beispiel + am Ende dieses Abschnitts auf + \autopageref{sec:\ThisCommonLabelBase.fontOptions.end} fortfahren. Wenn + Sie dagegen \Package{scrletter} verwenden, können Sie auch }{}% + direkt zu \autoref{sec:\ThisCommonLabelBase.fontOptions.next} auf + \autopageref{sec:\ThisCommonLabelBase.fontOptions.next} springen.% +} + +\begin{Declaration} + \OptionVName{fontsize}{Größe} +\end{Declaration} +Während\IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{% + \textnote{\KOMAScript{} vs. Standardklassen}} von den Standardklassen und +den meisten anderen Klassen nur eine sehr beschränkte Anzahl an Schriftgrößen +unterstützt wird, bietet +\IfThisCommonLabelBase{scrlttr2}{\Class{scrlttr2}}{\KOMAScript} die +Möglichkeit, jede beliebige \PName{Größe} für die Grundschrift +anzugeben. Dabei kann als Einheit für die \PName{Größe} auch jede bekannte +\TeX-Einheit verwendet werden. Wird die \PName{Größe} ohne Einheit angegeben, +so wird \PValue{pt} als Einheit angenommen. \iffree{}{Das genaue Verfahren, + nach dem die Schriftgröße dann eingestellt wird, ist für Experten und + interessierte Anwender in \autoref{sec:maincls-experts.fonts}, + \DescPageRef{maincls-experts.option.fontsize} dokumentiert.} + +Wird die Option innerhalb des Dokuments gesetzt, so werden ab diesem Punkt die +Grundschriftgröße \Macro{normalsize} und die davon abhängigen Schriftgrößen +der Befehle \Macro{tiny}, \Macro{scriptsize}, \Macro{footnotesize}, +\Macro{small}, \Macro{large}, \Macro{Large}, \Macro{LARGE}, \Macro{huge} und +\Macro{Huge} geändert. Das kann beispielsweise dann nützlich sein, wenn % +\IfThisCommonLabelBase{scrlttr2}{ein weiterer Brief }{der Anhang }% +insgesamt in einer kleineren Schriftgröße gesetzt werden soll. + +Es wird darauf\textnote{Achtung!} hingewiesen, dass bei Verwendung nach +\IfThisCommonLabelBase{scrextend}{einem eventuellen Laden von + \hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea}% + \important{\hyperref[cha:typearea]{\Package{typearea}}}}{dem Laden der + Klasse} die Auf"|teilung zwischen Satzspiegel und Rändern nicht automatisch +neu berechnet wird (siehe +\DescRef{typearea.cmd.recalctypearea}\IndexCmd{recalctypearea}, +\autoref{sec:typearea.typearea}, +\DescPageRef{typearea.cmd.recalctypearea}). Wird diese Neuberechnung jedoch +vorgenommen, so erfolgt sie auf Basis der jeweils gültigen +Grundschriftgröße. Die Auswirkungen des Wechsels der Grundschriftgröße auf +zusätzlich geladene Pakete oder die verwendete Klasse sind von diesen Paketen +und der Klasse abhängig. % +\IfThisCommonLabelBase{maincls}{% + Es können also Fehler auf"|treten, die nicht als Fehler von \KOMAScript{} + angesehen werden. Auch die \KOMAScript-Klassen passen nicht alle + Längen an eine \iffalse% Umbruchkorrekturtext + nach dem Laden der Klasse % + \else nachträglich \fi% + vorgenommene Anderung der Grundschriftgröße an.% +}{% + \IfThisCommonLabelBase{scrlttr2auchnicht}{% Umbruchkorrektur + Dabei sind Fehler möglich, die nicht als Fehler von \KOMAScript{} + betrachtet werden, und auch die Klasse \Class{scrlttr2} selbst passt nicht + alle Längen an eine nach dem Laden der Klasse vorgenommene Änderung der + Grundschriftgröße an. % + \iftrue % Umbruchkorrektur + Das Paket \Package{scrletter} tut dies ohnehin nicht.% + \fi + }{% + Es können also Fehler auf"|treten, die nicht als Fehler von \KOMAScript{} + angesehen werden.% + }% +}% + +Diese\textnote{Achtung!} Option sollte keinesfalls als Ersatz für +\Macro{fontsize} (siehe \cite{latex:fntguide}) missverstanden werden. Sie +sollte auch nicht anstelle einer der von der Grundschrift abhängigen +Schriftgrößenanweisungen, \Macro{tiny} bis \Macro{Huge}, verwendet werden! +\IfThisCommonLabelBase{scrlttr2}{% + Bei \Class{scrlttr2} ist \OptionValue{fontsize}{12pt} voreingestellt. + + \begin{Example} + \phantomsection\label{sec:\ThisCommonLabelBase.fontOptions.end}% + Angenommen, bei dem Verein aus dem Beispielbrief handelt es sich um die + \emph{»Freunde ungesunder Schriftgrößen«}, weshalb er in 14\Unit{pt} statt + in 12\Unit{pt} gesetzt werden soll. Dies kann durch eine kleine Änderung + der ersten Zeile erreicht werden:% + \lstinputcode[xleftmargin=1em]{letter-example-06-de.tex}% + Alternativ könnte die Option auch als optionales Argument von + \DescRef{\LabelBase.env.letter} gesetzt werden: + \lstinputcode[xleftmargin=1em]{letter-example-05-de.tex}% + Da bei dieser späten Änderung der Schriftgröße der Satzspiegel nicht + geändert wird, unterscheiden sich die beiden Ergebnisse in + \autoref{fig:scrlttr2.letter-5-6}. + \begin{figure} + \centering +% \setcapindent{0pt} +% \begin{captionbeside}[{Beispiel: Brief mit Anschrift, Anrede, Text, +% Grußfloskel, Postskriptum, Anlagen, Verteiler und ungesund großer +% Schrift}]{Ergebnis eines kleinen Briefes mit Anschrift, Anrede, Text, +% Grußfloskel, Postskriptum, Anlagen, Verteiler und ungesund großer +% Schrift (Datum und Faltmarken entstammen den Voreinstellungen für +% DIN-Briefe); links wurde die Schriftgröße als optionales Argument von +% \DescRef{\LabelBase.env.letter} gesetzt, rechts als optionales Argument von +% \Macro{documentclass}}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-05-de}}\quad + \frame{\includegraphics[width=.4\textwidth]{letter-example-06-de}} +% \end{captionbeside} + \caption[{Beispiel: Brief mit Anschrift, Anrede, Text, + Grußfloskel, Postskriptum, Anlagen, Verteiler und ungesund + großer Schrift}] + {Ergebnis eines kleinen Briefes mit Anschrift, Anrede, Text, + Grußfloskel, Postskriptum, Anlagen, Verteiler und ungesund großer + Schrift (Datum und Faltmarken entstammen den Voreinstellungen für + DIN-Briefe); links wurde die Schriftgröße als optionales Argument von + \DescRef{\LabelBase.env.letter} gesetzt, rechts als optionales + Argument von \DescRef{\LabelBase.cmd.documentclass}} + \label{fig:scrlttr2.letter-5-6} + \end{figure} + \end{Example}% + \ExampleEndFix +}{% + \IfThisCommonLabelBase{maincls}{% + \par + \phantomsection\label{sec:\ThisCommonLabelBase.fontOptions.end}% + Voreingestellt ist bei \Class{scrbook}, \Class{scrreprt} und + \Class{scrartcl} \OptionValue{fontsize}{11pt}.\textnote{\KOMAScript{} + vs. Standardklassen} Demgegenüber ist bei den Standardklassen + \Option{10pt} voreingestellt. Dies ist bei einem Wechsel von den + Standardklassen zu den \KOMAScript-Klassen\iffree{}{ oder bei Verwendung + von Option \DescRef{maincls-experts.option.emulatestandardclasses}% + \IndexOption{emulatestandardclasses}} gegebenenfalls zu beachten.% + }{}% +}% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-fontsize-en.tex b/macros/latex/contrib/koma-script/doc/common-fontsize-en.tex new file mode 100644 index 0000000000..b1e8dcd1b0 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-fontsize-en.tex @@ -0,0 +1,166 @@ +% ====================================================================== +% common-fontsize-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-fontsize-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs: fontsize)] +\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} + +\section{Choosing the Document Font Size} +\seclabel{fontOptions}% +\BeginIndexGroup +\BeginIndex{}{font>size}% + +\IfThisCommonFirstRun{% + The main font and its size are central elements in the design of a document. + As stated in \autoref{cha:typearea}, the division of the page into the text + area and the margins fundamentally depends on them. The main font is the one + that is used for most of the text in a document. All variations, whether in + shape, thickness, slant, or size, are related to the main font.% +}{% + The information in \autoref{sec:\ThisCommonFirstLabelBase.fontOptions} + applies equally to + \IfThisCommonLabelBase{scrlttr2}{\Class{scrlttr2}\OnlyAt{scrlttr2}}% + {this chapter}. \IfThisCommonLabelBase{scrlttr2}{By contrast, the + \Package{scrletter} package by itself does not offer font-size selection + but depends completely on the class you use.}{} So if you have already + read and understood \autoref{sec:\ThisCommonFirstLabelBase.fontOptions}, you + can \IfThisCommonLabelBase{scrlttr2}{continue to + \autopageref{sec:\ThisCommonLabelBase.fontOptions.end} at the end of this + section. If you use \Package{scrletter}, you can }{}% + skip directly to \autoref{sec:\ThisCommonLabelBase.fontOptions.next}, + \autopageref{sec:\ThisCommonLabelBase.fontOptions.next}.% +} + +\begin{Declaration} + \OptionVName{fontsize}{size} +\end{Declaration} +While\IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{% + \textnote{\KOMAScript{} vs. standard classes}} the standard classes support +only a very limited number of font sizes, +\IfThisCommonLabelBase{scrlttr2}{\Class{scrlttr2}}{\KOMAScript} provides the +ability to specify any \PName{size} for the main font. You can also use any +known \TeX unit as a unit for the \PName{size}. If the \PName{size} is +specified without a unit, it is assumed to be \PValue{pt}.\iffree{}{ The exact + procedure for setting the font size is documented for experts and interested + users in \autoref{sec:maincls-experts.addInfos}, + \DescPageRef{maincls-experts.option.fontsize}.} + +If you set the option within the document, the main font size and the +dependent font sizes of the commands \Macro{tiny}, \Macro{scriptsize}, +\Macro{footnotesize}, \Macro{small}, \Macro{normalsize}, \Macro{large}, +\Macro{Large}, \Macro{LARGE}, \Macro{huge} and \Macro{Huge} are changed. This +can be useful, for example, if you want % +\IfThisCommonLabelBase{scrlttr2}{another letter }{the appendix }% +to be set in a smaller font size. + +Note\textnote{Attention!} that using this option after +\IfThisCommonLabelBase{scrextend}{potentially loading + \hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea}% + \important{\hyperref[cha:typearea]{\Package{typearea}}}}{loading the class} +does not automatically recalculate the type area and margins (see +\DescRef{typearea.cmd.recalctypearea}\IndexCmd{recalctypearea}, +\autoref{sec:typearea.typearea}, +\DescPageRef{typearea.cmd.recalctypearea}). However, if this recalculation is +performed, it will be based on the current main font size. The effects of +changing the main font size upon other loaded packages or the class used +depends on these packages and on the class. \IfThisCommonLabelBase{maincls}{% + This means that you can encounter errors which are not the fault of + \KOMAScript, and even the \KOMAScript{} classes themselves do not + recalculate all lengths if the main font size changes after loading the + class.% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + You can encounter errors which are not the fault of \KOMAScript{}, and + further, the \Class{scrlttr2} class itself does not recalculate all + lengths if the main font size changes after loading the class.% + }{% + This means that you can encounter errors which are not the fault of + \KOMAScript{}.% + }% +}% + +This\textnote{Attention!} option should by no means be misinterpreted as a +substitute for \Macro{fontsize} (see \cite{latex:fntguide}). Also, you should +not use it in place of one of the font size commands that are relative to the +main font, from \Macro{tiny} to \Macro{Huge}. +\IfThisCommonLabelBase{scrlttr2}{% + For \Class{scrlttr2} the default is \OptionValue{fontsize}{12pt}. + + \begin{Example} + \phantomsection\label{sec:\ThisCommonLabelBase.fontOptions.end}% + Suppose the organization in the sample letter is the \emph{``Friends of + Noxious Font Sizes''}, for which reason it should be set in 14\Unit{pt} + instead of 12\Unit{pt}. You can achieve this by making a small change to + the first line:% + \lstinputcode[xleftmargin=1em]{letter-example-06-en.tex}% + Alternatively, the option could be set as an optional argument to + \DescRef{\LabelBase.env.letter}: + \lstinputcode[xleftmargin=1em]{letter-example-05-en.tex}% + Since the text area is not recalculated in this late change of the font + size, the two results differ in \autoref{fig:scrlttr2.letter-05-06}. + \begin{figure} + \centering + \frame{\includegraphics[width=.4\textwidth]{letter-example-05-en}}\quad + \frame{\includegraphics[width=.4\textwidth]{letter-example-06-en}} + \caption[{Example: letter with address, salutation, text, closing phrase, + postscript, enclosures, distribution list, and noxiously large font + size}] + {result of a short letter with recipient, opening, text, closing, + postscript, enclosures, distribution list, and a noxiously large font + (the date is set by default): in the left-hand version, the font size + has been defined by the optional argument of + \DescRef{\LabelBase.env.letter}; in the right-hand one, the optional + argument of \DescRef{\LabelBase.cmd.documentclass} has been used} + \label{fig:scrlttr2.letter-05-06} + \end{figure} + \end{Example} + \ExampleEndFix +}{% + \IfThisCommonLabelBase{maincls}{% + \par + \phantomsection\label{sec:\ThisCommonLabelBase.fontOptions.end}% + The default for \Class{scrbook}, \Class{scrreprt}, and \Class{scrartcl} is + \OptionValue{fontsize}{11pt}.\textnote{\KOMAScript{} vs. standard classes} + In contrast, the default size in the standard classes is \Option{10pt}. + You may need to account for this difference if you switch from a standard + class to a \KOMAScript{} class\iffree{}{ or when using the + \DescRef{maincls-experts.option.emulatestandardclasses}% + \IndexOption{emulatestandardclasses} option}.% + }{}% +}% +% +\EndIndexGroup +% +\EndIndexGroup + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-footnotes-de.tex b/macros/latex/contrib/koma-script/doc/common-footnotes-de.tex new file mode 100644 index 0000000000..8addbc88c3 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-footnotes-de.tex @@ -0,0 +1,756 @@ +% ====================================================================== +% common-footnotes-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-footnotes-de.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] + +\section{Fußnoten} +\seclabel{footnotes}% +\BeginIndexGroup +\BeginIndex{}{Fussnoten=Fußnoten}% + +\IfThisCommonFirstRun{}{% + \IfThisCommonLabelBase{scrextendderzeitauchnicht}{% Umbruchkorrektur + Die Fußnoten-Möglichkeiten der \KOMAScript-Klassen werden von + \Package{scrextend} ebenfalls bereitgestellt. % + }{}% + Es gilt sinngemäß, was in \autoref{sec:\ThisCommonFirstLabelBase.footnotes} + geschrieben wurde. Falls Sie also + \autoref{sec:\ThisCommonFirstLabelBase.footnotes} bereits gelesen und + verstanden haben, können Sie auf + \autopageref{sec:\ThisCommonLabelBase.footnotes.next} mit + \autoref{sec:\ThisCommonLabelBase.footnotes.next} fortfahren.% + \IfThisCommonLabelBase{scrlttr2}{ % + Wird keine \KOMAScript-Klasse verwendet, stützt sich + \Package{scrletter}\OnlyAt{\Package{scrletter}} auf das Paket + \hyperref[cha:scrextend]{\Package{scrextend}}\IndexPackage{scrextend}% + \important{\hyperref[cha:scrextend]{\Package{scrextend}}}. Siehe daher bei + Verwendung von \Package{scrletter} ebenfalls + \autoref{sec:scrextend.footnotes} ab + \autopageref{sec:scrextend.footnotes}.% + \iffalse% Umbruchkorrekturtext + \ Beachten Sie insbesondere, dass in diesem Fall einige + \KOMAScript-typische Erweiterungen in der + Voreinstellung\textnote{Voreinstellung} nicht aktiv sind. Stattdessen + gelten in der Voreinstellung die Fußnotenmöglichkeiten der verwendeten + Klasse oder des \LaTeX-Kerns.% + \fi% + }{% + \IfThisCommonLabelBase{scrextend}{% + \ In der Voreinstellung wird die Formatierung der Fußnoten jedoch der + verwendeten Klasse überlassen. Dies ändert sich, sobald die Anweisung + \DescRef{\ThisCommonLabelBase.cmd.deffootnote} % + \iftrue % Umbruchkorrektur + (siehe \DescPageRef{\ThisCommonLabelBase.cmd.deffootnote}) verwendet + wird. % + \else % + verwendet wird, die auf + \DescPageRef{\ThisCommonLabelBase.cmd.deffootnote} näher erläutert + wird. % + \fi % + Die Einstellmöglichkeiten für die Trennlinie über den Fußnoten werden + hingegen von \Package{scrextend} nicht bereitgestellt.% + }{}% + }% +} + +\IfThisCommonLabelBase{derzeitnichtverwendet}{% + Im\textnote{\KOMAScript{} vs. Standardklassen} Unterschied zu den + Standardklassen bietet \KOMAScript{} die Möglichkeit, die Form von Fußnoten + \iftrue in vielfältiger Weise \fi % Umbruchkorrektur + zu konfigurieren.% +}{% + \IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{% + Die Anweisungen zum Setzen von Fußnoten sind in jeder \LaTeX-Einführung, + beispielsweise \cite{l2kurz}, zu + finden. \KOMAScript{}\textnote{\KOMAScript{} vs. Standardklassen} bietet + darüber hinaus aber auch noch die Möglichkeit, die Form der Fußnoten zu + verändern. % + \IfThisCommonLabelBase{scrlttr2}{% + \iffalse % Umbruchoptimierung + + Ob Fußnoten bei Briefen überhaupt zulässig sind, hängt sehr stark von + der Art des Briefs und dessen Layout ab. So sind beispielsweise optische + Kollisionen mit dem Fuß des Briefbogens oder Verwechslungen mit der + Auf"|listung von Verteilern oder ähnlichen typischen Elementen von + Briefen zu vermeiden. Dies liegt in der Verantwortung des Anwenders.% + \fi% + + Da Fußnoten in Briefen eher selten verwendet werden, wurde auf Beispiele + in diesem Abschnitt weitgehend verzichtet. Sollten Sie Beispiele + benötigen, können Sie solche in + \autoref{sec:\ThisCommonFirstLabelBase.footnotes} ab + \autopageref{sec:\ThisCommonFirstLabelBase.footnotes} finden.% + }{}% + }{% + \IfThisCommonLabelBase{scrextend}{% + }{\InternalCommonFileUsageError}% + }% +}% + + +\begin{Declaration} + \OptionVName{footnotes}{Einstellung} + \Macro{multfootsep} +\end{Declaration} +\IfThisCommonLabelBase{scrextend}{}{% + Fußnoten % + \IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + }{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}% + }{}% + } % + werden im Text in der Voreinstellung\textnote{Voreinstellung} mit kleinen, + hochgestellten Ziffern markiert. }% +Werden in der Voreinstellung\important{\OptionValue{footnotes}{nomultiple}} +\OptionValue{footnotes}{nomultiple} zu einer Textstelle mehrere Fußnoten +hintereinander gesetzt, so entsteht der Eindruck, dass es sich nicht um zwei +einzelne Fußnoten, sondern um eine einzige Fußnote mit hoher Nummer handele. + +Mit\important{\OptionValue{footnotes}{multiple}} +\OptionValue{footnotes}{multiple}\IndexOption{footnotes=~multiple} werden +Fußnoten, die unmittelbar aufeinander folgen, stattdessen mit einem +Trennzeichen aneinander gereiht. Das in +\Macro{multfootsep}\important{\Macro{multfootsep}} definierte Trennzeichen ist +als +\begin{lstcode} + \newcommand*{\multfootsep}{,} +\end{lstcode} +definiert. Es ist also mit einem Komma vorbelegt. Dieses kann umdefiniert +werden. + +Der gesamte Mechanismus ist kompatibel zu +\Package{footmisc}\IndexPackage{footmisc}\important{\Package{footmisc}}, +Version~5.3d bis 5.5b (siehe \cite{package:footmisc}) implementiert. Er wirkt +sich sowohl auf Fußnotenmarkierungen aus, die mit +\DescRef{\ThisCommonLabelBase.cmd.footnote}\IndexCmd{footnote} gesetzt wurden, +als auch auf solche, die direkt mit +\DescRef{\ThisCommonLabelBase.cmd.footnotemark}\IndexCmd{footnotemark} +ausgegeben werden. +% +\IfThisCommonLabelBase{scrextend}{% + Bei Problemen mit der verwendeten Klasse oder anderen Paketen, die Einfluss + auf die Fußnoten nehmen, sollte Option \Option{footnotes} nicht verwendet + werden.% +}{% + \par + Es ist jederzeit möglich, mit \DescRef{\ThisCommonLabelBase.cmd.KOMAoptions} + oder \DescRef{\ThisCommonLabelBase.cmd.KOMAoption} auf die Voreinstellung + \OptionValue{footnotes}{nomultiple} zurückzuschalten. Bei Problemen mit + anderen Paketen, die Einfluss auf die Fußnoten nehmen, sollte die Option + jedoch nicht verwendet und die Einstellung auch nicht innerhalb des + Dokuments umgeschaltet werden.% +}% + +Eine Zusammenfassung möglicher Werte für die \PName{Einstellung} von +\Option{footnotes} bietet +\autoref{tab:\ThisCommonFirstLabelBase.footnotes}% +\IfThisCommonFirstRun{% + . + \begin{table} + \caption[{Mögliche Werte für Option \Option{footnotes}}]{Mögliche Werte für + Option \Option{footnotes} zur Einstellung der Fußnoten} + \label{tab:\ThisCommonLabelBase.footnotes} + \begin{desctabular} + \pventry{multiple}{% + Unmittelbar aufeinander folgende Fußnotenmarkierungen werden durch + \DescRef{\ThisCommonLabelBase.cmd.multfootsep}\IndexCmd{multfootsep} + voneinander getrennt ausgegeben.% + \IndexOption{footnotes~=\textKValue{multiple}}}% + \pventry{nomultiple}{% + Unmittelbar aufeinander folgende Fußnotenmarkierungen werden auch + unmittelbar aufeinander folgend ausgegeben.% + \IndexOption{footnotes~=\textKValue{nomultiple}}}% + \end{desctabular} + \end{table}% +}{, + \autopageref{tab:\ThisCommonFirstLabelBase.footnotes}.% +}% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{footnote}\OParameter{Nummer}\Parameter{Text} + \Macro{footnotemark}\OParameter{Nummer} + \Macro{footnotetext}\OParameter{Nummer}\Parameter{Text} + \Macro{multiplefootnoteseparator} +\end{Declaration}% +Fußnoten werden bei {\KOMAScript} genau wie bei den Standardklassen mit der +Anweisung \Macro{footnote} oder den paarweise zu verwendenden Anweisungen +\Macro{footnotemark} und \Macro{footnotetext} erzeugt. Genau wie bei den +Standardklassen ist es möglich, dass innerhalb einer Fußnote ein +Seiten"-umbruch erfolgt. Dies geschieht in der Regel dann, wenn die zugehörige +Fußnotenmarkierung so weit unten auf der Seite gesetzt wird, dass keine andere +Wahl bleibt, als die Fußnote auf die nächste Seite zu umbrechen. Im +Unterschied\textnote{\KOMAScript{} vs. Standardklassen}% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}% + }{}% +} % +zu den Standardklassen bietet \KOMAScript{} aber zusätzlich die Möglichkeit, +Fußnoten, die unmittelbar aufeinander folgen, automatisch zu erkennen und +durch ein Trennzeichen auseinander zu +rücken. Siehe\important{\DescRef{\ThisCommonLabelBase.option.footnotes}} hierzu +die zuvor dokumentierte Option +\DescRef{\ThisCommonLabelBase.option.footnotes}. + +Will man dieses Trennzeichen stattdessen von Hand setzen, so erhält man es +durch Aufruf von \Macro{multiplefootnoteseparator}. Diese Anweisung sollten +Anwender jedoch nicht umdefinieren, da sie neben dem Trennzeichen auch die +Formatierung des Trennzeichen, beispielsweise die Wahl der Schriftgröße und +das Hochstellen, enthält. Das Trennzeichen selbst ist in der zuvor erklärten +Anweisung \DescRef{\ThisCommonLabelBase.cmd.multfootsep}% +\important{\DescRef{\ThisCommonLabelBase.cmd.multfootsep}}% +\IndexCmd{multfootsep} gespeichert. + +\IfThisCommonFirstRun{\iftrue}{% + Beispiele und ergänzende Hinweise sind + \autoref{sec:\ThisCommonFirstLabelBase.footnotes} ab + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.footnote} zu entnehmen.% + \csname iffalse\endcsname +}% + \begin{Example} + \phantomsection\xmpllabel{cmd.footnote}% + Angenommen, Sie wollen zu einem Wort zwei Fußnoten setzen. Im ersten + Ansatz schreiben Sie dafür +\begin{lstcode} + Wort\footnote{Fußnote 1}\footnote{Fußnote 2}. +\end{lstcode} + Nehmen wir weiter an, dass die Fußnoten mit 1 und 2 nummeriert werden. Da + die beiden Fußnotennummern direkt aufeinander folgen, entsteht jedoch der + Eindruck, dass das Wort nur eine Fußnote mit der Nummer 12 besitzt. Sie + könnten dies nun dadurch ändern, dass Sie mit +\begin{lstcode} + \KOMAoptions{footnotes=multiple} +\end{lstcode} + die automatische Erkennung von Fußnotenhäufungen aktivieren. Stattdessen + können Sie aber auch +\begin{lstcode} + Wort\footnote{Fußnote 1}% + \multiplefootnoteseparator + \footnote{Fußnote 2} +\end{lstcode} + verwenden. Das sollte auch dann noch funktionieren, wenn die automatische + Erkennung aus irgendwelchen Gründen versagt oder nicht verwendet werden + kann. + + Nehmen wir nun an, Sie wollen außerdem, dass die Fußnotennummern + nicht nur durch ein Komma, sondern durch ein Komma, gefolgt von einem + Leerzeichen getrennt werden sollen. In diesem Fall schreiben Sie +\begin{lstcode} + \renewcommand*{\multfootsep}{,\nobreakspace} +\end{lstcode} + in Ihre Dokumentpräambel. + \iffalse % Umbruchkorrektur + \Macro{nobreakspace}\IndexCmd{nobreakspace} wurde hier anstelle eines + normalen Leerzeichens gewählt, damit innerhalb der Reihung der + Fußnotenzeichen kein Absatz- oder Seitenumbruch erfolgen kann.% + \else % + Mit \Macro{nobreakspace}\IndexCmd{nobreakspace} wurde ein Leerzeichen mit + Verhinderung eines Absatzumbruchs innerhalb der Reihung der + Fußnotenzeichen verwendet.% + \fi% + \end{Example}% + \vskip -1\ht\strutbox plus .75\ht\strutbox% Beispiel am Ende der Beschreibung +\fi% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{footref}\Parameter{Referenz} +\end{Declaration} +Manchmal% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}% + }{}% +} % +hat man in einem Dokument eine Fußnote, zu der es im Text mehrere Verweise +geben soll. Die ungünstige Lösung dafür wäre die Verwendung von +\DescRef{\ThisCommonLabelBase.cmd.footnotemark} unter Angabe der gewünschten +Nummer. Ungünstig an dieser Lösung ist, dass man die Nummer kennen muss und +sich diese jederzeit ändern kann. \KOMAScript{} bietet deshalb die +Möglichkeit, den +\Macro{label}-Mechanismus\IndexCmd{label}\important{\Macro{label}} auch für +Verweise auf Fußnoten zu verwenden. Man setzt dabei in der entsprechenden +Fußnote eine \Macro{label}-Anweisung und kann dann mit \Macro{footref} alle +weiteren Fußnotenmarken für diese Fußnote im Text setzen. +\IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname}% + % Umbruchkorrektur über diverse Varianten!!! + \begin{Example} + \phantomsection + \xmpllabel{cmd.footref}% + Sie schreiben einen Text, in dem sie bei jedem Auf"|treten eines + Markennamens eine Fußnote setzen müssen, die darauf hinweist, dass es sich + um einen geschützten Markennamen handelt. Sie schreiben beispielsweise:% + \IfThisCommonLabelBase{maincls}{\iftrue}{\csname iffalse\endcsname}% +\begin{lstcode} + Die Firma SplischSplasch\footnote{Bei diesem + Namen handelt es sich um eine registrierte + Marke. Alle Rechte daran sind dem + Markeninhaber vorbehalten.\label{refnote}} + stellt neben SplischPlumps\footref{refnote} + auch noch die verbesserte Version + SplischPlatsch\footref{refnote} her. +\end{lstcode} + Es wird dann dreimal eine Marke auf dieselbe Fußnote gesetzt, einmal mit + \DescRef{\ThisCommonLabelBase.cmd.footnote} direkt und zweimal mit + \Macro{footref}. + \else\iftrue +\begin{lstcode} + Die Firma SplischSplasch\footnote{Bei diesem + Namen handelt es sich um eine registrierte + Marke. Alle Rechte daran sind dem + Markeninhaber vorbehalten.\label{refnote}} + stellt neben SplischPlumps\footref{refnote} + auch noch die verbesserte Version + SplischPlatsch\footref{refnote} her. +\end{lstcode} + Es wird dann dreimal eine Marke auf dieselbe Fußnote gesetzt, einmal + mit \DescRef{\ThisCommonLabelBase.cmd.footnote} direkt und zweimal mit + \Macro{footref}. + \else +\begin{lstcode} + Die Firma SplischSplasch\footnote{Bei diesem + Namen handelt es sich um eine registrierte + Marke. Alle Rechte daran sind dem + Markeninhaber, der Firma SplischSplasch, + vorbehalten.\label{refnote}} + stellt neben SplischPlumps\footref{refnote} + auch noch die verbesserte Version + SplischPlatsch\footref{refnote} und das sehr + beliebte + SplischSplaschPlumps\footref{refnote} her. +\end{lstcode} + Es wird dann vier Mal eine Marke auf dieselbe Fußnote gesetzt, einmal + mit \DescRef{\ThisCommonLabelBase.cmd.footnote} direkt und drei Mal + mit \Macro{footref}. + \fi% + \fi + \end{Example} +\fi +Da die Fußnotenmarken mit Hilfe des \Macro{label}-Mechanismus gesetzt werden, +werden nach Änderungen, die sich auf die Fußnotennummerierung auswirken, +gegebenenfalls zwei \LaTeX-Durchläufe benötigt, bis die mit \Macro{footref} +gesetzten Marken korrekt sind. % +\IfThisCommonLabelBaseOneOf{scrlttr2,scrextend}{% + Ein passendes Beispiel ist in + \autoref{sec:\ThisCommonFirstLabelBase.footnotes} auf + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.footref} zu finden. % +}{}% +\IfThisCommonLabelBaseOneOf{scrlttr2,scrextend}{}{% + \par + Es\textnote{Achtung!} sei darauf hingewiesen, dass die Anweisung genau wie + \Macro{ref}\IndexCmd{ref} oder \Macro{pageref}\IndexCmd{pageref} zerbrechlich + ist und deshalb in beweglichen Argumenten wie Überschriften + \Macro{protect}\IndexCmd{protect} davor gestellt werden sollte. % +}% +Ab\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.33}{\Class{scrlttr2}}% + }{}% +} % +\LaTeX{} 2021-05-01 wird die Anweisung übrigens von \LaTeX{} selbst +bereitgestellt.% +\EndIndexGroup + +\begin{Declaration} + \Macro{deffootnote}\OParameter{Markenbreite}\Parameter{Einzug}% + \Parameter{Absatzeinzug}% + \Parameter{Markendefinition} + \Macro{deffootnotemark}\Parameter{Markendefinition} + \Macro{thefootnotemark} +\end{Declaration}% +\IfThisCommonLabelBase{maincls}{Die \KOMAScript-Klassen setzen}{\KOMAScript{} + setzt}\textnote{\KOMAScript{} vs. Standardklassen} +Fußnoten etwas anders als die Standardklassen. +Die Fußnotenmarkierung im Text, also die Referenzierung der Fußnote, erfolgt +wie bei den Standardklassen durch kleine hochgestellte Zahlen. Genauso werden +die Markierungen auch in der Fußnote selbst wiedergegeben. Sie werden dabei +rechtsbündig in einem Feld der Breite \PName{Markenbreite} gesetzt. Die erste +Zeile der Fußnote schließt direkt an das Feld der Markierung an. + +Alle weiteren Zeilen werden um den Betrag von \PName{Einzug} +eingezogen\IfThisCommonLabelBase{scrlttr2}{}{ ausgegeben}. Wird der optionale +Parameter \PName{Markenbreite} nicht angegeben, dann entspricht er dem Wert +von \PName{Einzug}. Sollte die Fußnote aus mehreren Absätzen bestehen, dann +wird die erste Zeile eines Absatzes zusätzlich mit dem Einzug der Größe +\PName{Absatzeinzug} versehen. + +\autoref{fig:\ThisCommonFirstLabelBase.deffootnote} % +\IfThisCommonFirstRun{}{auf + \autopageref{fig:\ThisCommonFirstLabelBase.deffootnote} }{}% +veranschaulicht die verschiedenen Parameter% +\IfThisCommonLabelBase{maincls}{ nochmals}{}% +. Die Voreinstellung in den \KOMAScript-Klassen entspricht folgender +Definition: \IfThisCommonLabelBase{scrextend}{\iftrue}{\csname + iffalse\endcsname}% +\begin{lstcode} + \deffootnote[1em]{1.5em}{1em}{% + \textsuperscript{\thefootnotemark}} +\end{lstcode} +\else +\begin{lstcode} + \deffootnote[1em]{1.5em}{1em}{% + \textsuperscript{\thefootnotemark}% + } +\end{lstcode} +\fi% +Dabei wird mit Hilfe von \Macro{textsuperscript} +sowohl die Hochstellung als auch die Wahl einer kleineren Schrift +erreicht. Die Anweisung \Macro{thefootnotemark} liefert die aktuelle +Fußnotenmarke ohne jegliche Formatierung.% +\IfThisCommonLabelBase{scrextend}{ % + Das Paket \Package{scrextend} überlässt hingegen in der Voreinstellung das + Setzen der Fußnoten der verwendeten Klasse. Das Laden des Pakets allein + sollte daher noch zu keinerlei Änderungen bei der Formatierung der Fußnoten + oder der Fußnotenmarken führen. Zur Übernahme der Voreinstellungen der + \KOMAScript-Klassen muss man vielmehr obige Einstellung selbst vornehmen% + \iffalse % + . Dazu können obige Code-Zeilen beispielsweise unmittelbar nach dem + Laden von \Package{scrextend} eingefügt werden.% + \else % + , indem man den gezeigten Code in die Dokumentpräambel übernimmt.% + \fi% +}{}% + +\IfThisCommonLabelBase{maincls}{% + \begin{figure} +% \centering + \KOMAoption{captions}{bottombeside} + \setcapindent{0pt}% + \begin{captionbeside}[{Parameter für die Darstellung der + Fußnoten}]% + {\label{fig:\ThisCommonLabelBase.deffootnote}\hspace{0pt plus 1ex}% + \mbox{Parameter} für die Darstellung der Fußnoten}% + [l] + \setlength{\unitlength}{1.02mm} + \begin{picture}(95,22) + \thinlines + % frame of following paragraph + \put(5,0){\line(1,0){90}} + \put(5,0){\line(0,1){5}} + \put(10,5){\line(0,1){5}}\put(5,5){\line(1,0){5}} + \put(95,0){\line(0,1){10}} + \put(10,10){\line(1,0){85}} + % frame of first paragraph + \put(5,11){\line(1,0){90}} + \put(5,11){\line(0,1){5}} + \put(15,16){\line(0,1){5}}\put(5,16){\line(1,0){10}} + \put(95,11){\line(0,1){10}} + \put(15,21){\line(1,0){80}} + % box of the footnote mark + \put(0,16.5){\framebox(14.5,4.5){\mbox{}}} + % description of paragraphs + \put(45,16){\makebox(0,0)[l]{% + \small\textsf{erster Absatz einer Fußnote}}} + \put(45,5){\makebox(0,0)[l]{% + \small\textsf{folgender Absatz einer Fußnote}}} + % help lines + \thicklines + \multiput(0,0)(0,3){7}{\line(0,1){2}} + \multiput(5,0)(0,3){3}{\line(0,1){2}} + % parameters + \put(2,7){\vector(1,0){3}} + \put(5,7){\line(1,0){5}} + \put(15,7){\vector(-1,0){5}} + \put(15,7){\makebox(0,0)[l]{\small\PName{Absatzeinzug}}} + % + \put(-3,13){\vector(1,0){3}} + \put(0,13){\line(1,0){5}} + \put(10,13){\vector(-1,0){5}} + \put(10,13){\makebox(0,0)[l]{\small\PName{Einzug}}} + % + \put(-3,19){\vector(1,0){3}} + \put(0,19){\line(1,0){14.5}} + \put(19.5,19){\vector(-1,0){5}} + \put(19.5,19){\makebox(0,0)[l]{\small\PName{Markenbreite}}} + \end{picture} + \end{captionbeside} + \end{figure}% +}{} + +\BeginIndexGroup +\BeginIndex{FontElement}{footnote}\LabelFontElement{footnote}% +\BeginIndex{FontElement}{footnotelabel}\LabelFontElement{footnotelabel}% +Auf% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v2.8q}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{} die Fußnote einschließlich der Markierung findet außerdem die für das +Element \FontElement{footnote}\important{\FontElement{footnote}} eingestellte +Schriftart Anwendung. Die % Umbruchkorrekturvarianten +%\IfThisCommonLabelBase{maincls}{davon abweichende }{}% +Schriftart der Markierung kann % +\IfThisCommonLabelBase{maincls}{}{jedoch }% +mit Hilfe der Anweisungen \DescRef{\ThisCommonLabelBase.cmd.setkomafont} und +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) für das Element +\FontElement{footnotelabel}\important{\FontElement{footnotelabel}} davon +abweichend eingestellt werden. Siehe hierzu auch +\autoref{tab:\ThisCommonFirstLabelBase.fontelements}, +\autopageref{tab:\ThisCommonFirstLabelBase.fontelements}. Voreingestellt ist +jeweils keine Umschaltung der Schrift.% +\IfThisCommonLabelBase{scrextend}{ % + Die Elemente finden bei scrextend jedoch nur dann Anwendung, wenn die + Fußnoten mit diesem Paket gesetzt werden, also \Macro{deffootnote} verwendet + wurde.% +}{} Bitte\textnote{Achtung!} missbrauchen Sie das Element nicht für andere +Zwecke, beispielsweise zur Verwendung von Flattersatz in den Fußnoten (siehe +\DescRef{\LabelBase.cmd.raggedfootnote}, +\DescPageRef{\LabelBase.cmd.raggedfootnote}). + +\BeginIndex{FontElement}{footnotereference}% +\LabelFontElement{footnotereference}% +Die Fußnotenmarkierung im Text wird getrennt von der Markierung vor der +Fußnote definiert. Dies geschieht mit der Anweisung +\Macro{deffootnotemark}. Voreingestellt ist hier: +\begin{lstcode} + \deffootnotemark{\textsuperscript{\thefootnotemark}} +\end{lstcode} +Dabei findet% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v2.8q}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{} die Schriftart für das Element +\FontElement{footnotereference}\IndexFontElement{footnotereference}% +\important{\FontElement{footnotereference}} Anwendung (siehe % +\autoref{tab:\ThisCommonLabelBase.fontelements}, +\autopageref{tab:\ThisCommonLabelBase.fontelements}). Die Markierungen im Text +und in der Fußnote selbst sind also identisch. Die Schriftart kann mit den +Anweisungen \DescRef{\ThisCommonLabelBase.cmd.setkomafont} und +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) jedoch geändert +werden.\IfThisCommonLabelBase{scrextend}{\ Ohne \Macro{deffootnote} kann sich + diese auch auf die Markierung in der Fußnote auswirken.}{} + +\IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname}% + \begin{Example} + \phantomsection + \xmpllabel{cmd.deffootnote}% + Relativ\textnote{Tipp!} häufig wird gewünscht, dass die Markierung in der + Fußnote selbst weder hochgestellt noch kleiner gesetzt wird. Dabei soll + sie aber nicht direkt am Text kleben, sondern geringfügig davor + stehen. Dies kann zum einen wie folgt erreicht werden: +\begin{lstcode} + \deffootnote{1em}{1em}{\thefootnotemark\ } +\end{lstcode} + Die Fußnotenmarkierung und das folgende Leerzeichen wird also rechtsbündig + in eine Box der Breite 1\Unit{em} gesetzt. Die folgenden Zeilen der + Fußnote werden gegenüber dem linken Rand ebenfalls um 1\Unit{em} + eingezogen. + + Eine\textnote{Tipp!} weitere, oft gefragte Formatierung sind linksbündige + Fußnotenmarkierungen in der Fußnote. Diese können mit folgender Definition + erhalten werden: +\begin{lstcode} + \deffootnote{1.5em}{1em}{% + \makebox[1.5em][l]{\thefootnotemark}% + } +\end{lstcode} + + Sollen jedoch die Fußnoten insgesamt lediglich in einer anderen + Schriftart, beispielsweise serifenlos, gesetzt werden, so ist dies ganz + einfach mit Hilfe der Anweisungen + \DescRef{\ThisCommonLabelBase.cmd.setkomafont} und + \DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (siehe + \autoref{sec:\ThisCommonLabelBase.textmarkup}, + \DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) zu lösen: +\begin{lstcode} + \setkomafont{footnote}{\sffamily} +\end{lstcode}% + \end{Example}% + \IfThisCommonLabelBaseOneOf{maincls,scrextend}{}{% + Wie die Beispiele zeigen, ermöglicht {\KOMAScript} mit dieser einfachen + Benutzerschnittstelle eine große Vielfalt unterschiedlicher + Fußnotenformatierungen.% + }% +\fi% +\IfThisCommonFirstRun{% + \vskip -1\ht\strutbox plus .75\strutbox% Beispielende + Codeende +}{% + Beispiele für die Verwendung von \Macro{deffootnote} finden Sie in + \autoref{sec:\ThisCommonFirstLabelBase.footnotes}, + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.deffootnote}.% +}{}% +% +\EndIndexGroup +\EndIndexGroup + +\IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname} +\begin{Declaration} + \Macro{setfootnoterule}\OParameter{Höhe}\Parameter{Länge}% +\end{Declaration}% +Üblicherweise% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.06}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.06}{\Class{scrlttr2}}% + }{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.06}{\Package{scrextend}}% + }{}% + }% +} % +wird zwischen dem Textbereich und dem Fußnotenapparat eine Trennlinie gesetzt, +die jedoch normalerweise nicht über die gesamte Breite des Satzspiegels +geht. Mit Hilfe dieser Anweisung kann die genaue Länge und die Höhe oder Dicke +der Linie bestimmt werden. Dabei werden \PName{Höhe} und \PName{Länge} erst +beim Setzen der Linie selbst abhängig von \Macro{normalsize} ausgewertet. Der +optionale Parameter \PName{Höhe} kann komplett entfallen und wird dann nicht +geändert. Ist das Argument \PName{Höhe} oder \PName{Länge} leer, so wird die +jeweilige Größe ebenfalls nicht geändert. Es gibt sowohl beim Setzen als auch +bei Verwendung der Größen für unplausible Werte eine Warnung. + +\BeginIndexGroup +\BeginIndex{FontElement}{footnoterule}\LabelFontElement{footnoterule}% +Die Farbe% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.07}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.07}{\Class{scrlttr2}}% + }{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.07}{\Package{scrextend}}% + }{}% + }% +} % +der Linie kann über das Element +\FontElement{footnoterule}\important{\FontElement{footnoterule}} mit Hilfe der +Anweisungen \DescRef{\ThisCommonLabelBase.cmd.setkomafont} und +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) eingestellt +werden. Voreingestellt ist hierbei keinerlei Änderung von Schrift oder +Farbe. Um die Farbe ändern zu können, muss außerdem ein Farbpaket wie +\Package{xcolor}\IndexPackage{xcolor}\important{\Package{xcolor}} geladen +sein.% +\IfThisCommonLabelBase{scrlttr2}{\par + Verwendet\OnlyAt{scrletter} man das Paket \Package{scrletter} nicht mit + einer \KOMAScript-Klasse, sondern beispielsweise mit einer Standardklasse, + so existieren Anweisung \Macro{setfootnoterule} und Element + \FontElement{footnoterule} nicht.% +}{}% +\EndIndexGroup \EndIndexGroup \fi + +\begin{Declaration} + \Macro{raggedfootnote} +\end{Declaration} +In% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.23}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.23}{\Class{scrlttr2}}% + }{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.23}{\Package{scrextend}}% + }{}% + }% +} % +der Voreinstellung werden die Fußnoten bei \KOMAScript{} genau wie bei den +Standardklassen im Blocksatz gesetzt. \IfThisCommonLabelBase{scrextend}{Bei + Verwendung von \DescRef{\LabelBase.cmd.deffootnote}% + \important{\DescRef{\LabelBase.cmd.deffootnote}}% + \IndexCmd{deffootnote} ist es}{Es\textnote{\KOMAScript{} + vs. Standardklassen} ist aber auch} möglich, die Formatierung abweichend +vom restlichen Dokument zu ändern. Dazu ist \Macro{raggedfootnote} +umzudefinieren. Gültige Definitionen wären +\Macro{raggedright}\IndexCmd{raggedright}, +\Macro{raggedleft}\IndexCmd{raggedleft}, +\Macro{centering}\IndexCmd{centering}, \Macro{relax}\IndexCmd{relax} oder +entsprechend der Voreinstellung eine leere Definition. Auch die +Ausrichtungsbefehle des Pakets \Package{ragged2e}\IndexPackage{ragged2e} sind +zulässig (siehe \cite{package:ragged2e}). +\IfThisCommonLabelBaseOneOf{scrextend,scrlttr2}{% + \ Ein passendes Beispiel ist in + \autoref{sec:\ThisCommonFirstLabelBase.footnotes}, + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.raggedfootnote} zu finden.% + \iffalse% +}{\csname iftrue\endcsname}% +\begin{Example} + \phantomsection\xmpllabel{cmd.raggedfootnote}% + Angenommen Sie verwenden Fußnoten ausschließlich, um Hinweise auf sehr lange + Links anzugeben, deren Umbruch im Blocksatz zu schlechten Ergebnissen + führen. Dann könnten Sie in der Dokumentpräambel mit +\begin{lstcode} + \let\raggedfootnote\raggedright +\end{lstcode} + für die Fußnoten einfach auf linksbündigen Flattersatz umschalten. +\end{Example}% +\vskip -1\ht\strutbox plus .75\ht\strutbox% Beispiel am Ende der Erklärung +\fi +\EndIndexGroup + +\begin{Declaration} + \DoHook{footnote/text/begin}% + \DoHook{footnote/text/end}% +\end{Declaration} +\BeginIndex{}{Haken}% +Für\ChangedAt{v3.36}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}} Experten gibt es außerdem zwei +Haken vom Typ \emph{do-hook} (siehe \autoref{sec:scrbase.hooks} ab +\autopageref{sec:scrbase.hooks}). Der erste davon wird ganz zu Beginn von +\Macro{@makefntext} noch vor \DescRef{\LabelBase.cmd.raggedfootnote} +ausgeführt. Der zweite am Ende noch bevor der Absatz beendet ist. Derzeit +werden beide Haken von \KOMAScript{} selbst nicht verwendet.% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Fußnotennummern Fußnotenmarkierung Satzspiegels +% LocalWords: Standardklassen Fußnotenformatierungen Dokumentpräambel +% LocalWords: Fußnotenmöglichkeiten diff --git a/macros/latex/contrib/koma-script/doc/common-footnotes-en.tex b/macros/latex/contrib/koma-script/doc/common-footnotes-en.tex new file mode 100644 index 0000000000..910fad5c05 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-footnotes-en.tex @@ -0,0 +1,634 @@ +% ====================================================================== +% common-footnotes-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-footnotes-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs: Footnotes)] +\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} + +\section{Footnotes} +\seclabel{footnotes}% +\BeginIndexGroup +\BeginIndex{}{footnotes}% + +\IfThisCommonFirstRun{}{% + The information in \autoref{sec:\ThisCommonFirstLabelBase.footnotes} applies + equally to this chapter. So if you have already read and understood + \autoref{sec:\ThisCommonFirstLabelBase.footnotes}, you can skip ahead to + \autopageref{sec:\ThisCommonLabelBase.footnotes.next}, + \autopageref{sec:\ThisCommonLabelBase.footnotes.next}.% + \IfThisCommonLabelBase{scrlttr2}{ % + If you do not use a \KOMAScript{} class, \Package{scrletter}% + \OnlyAt{\Package{scrletter}} relies on the + \hyperref[cha:scrextend]{\Package{scrextend}}\IndexPackage{scrextend}% + \important{\hyperref[cha:scrextend]{\Package{scrextend}}} package. + Therefore, see also \autoref{sec:scrextend.footnotes}, + \autopageref{sec:scrextend.footnotes} when using \Package{scrletter}.% + \iffalse% Umbruchkorrekturtext + \ Note in particular that in this case some typical \KOMAScript{} + extensions are not active by default\textnote{default}. Instead, the + footnotes make use of the class used, or the \LaTeX{} kernel.% + \fi% + }{}% +} + +\IfThisCommonLabelBase{maincls}{% + Unlike\textnote{\KOMAScript{} vs. standard classes} the standard classes, + \KOMAScript{} offers the ability to configure the format of the footnote + block.% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + You can find the basic commands to set footnotes in any introduction to + \LaTeX, for example \cite{lshort}. \KOMAScript{}% + \textnote{\KOMAScript{} vs. standard classes} provides additional features + to change the format of the footnote block. % + \iffalse % Umbruchoptimierung + + Whether footnotes should be allowed for letters depends very much on the + type of letter and its layout. For example, you should not allow + footnotes to overlap visually with the letterhead footer or be confused + with the courtesy-copy list. Doing so is the responsibility of the + user.% + + Since footnotes are rarely used in letters, examples in this section have + been omitted. If you need examples, you can find them in + \autoref{sec:\ThisCommonFirstLabelBase.footnotes}, + \autopageref{sec:\ThisCommonFirstLabelBase.footnotes}.% + \fi% + }{% + \IfThisCommonLabelBase{scrextend}{% + The footnote capabilities of the \KOMAScript{} classes are also + provided by \Package{scrextend}. By default, the formatting of + footnotes is left to the class used. This changes as soon as you + issue the \DescRef{\ThisCommonLabelBase.cmd.deffootnote} command, + which is explained in detail on + \DescPageRef{\ThisCommonLabelBase.cmd.deffootnote}. + + The options for adjusting the dividing line above footnotes, however, + are not provided by \Package{scrextend}.% + }{\InternalCommonFileUsageError}% + }% +}% + +\begin{Declaration} + \OptionVName{footnotes}{setting} + \Macro{multfootsep} +\end{Declaration} +\IfThisCommonLabelBase{scrextend}{Many classes mark footnotes }{% + Footnotes % + \IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + }{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}% + }{}% + }% + are marked % +}% +by default in the text with a small superscript number. If several footnotes +appear in succession at the same point, it gives the impression that there is +one footnote with a large number rather than multiple footnotes (e.\,g. +footnote 12 instead of footnotes 1 and 2). +With\important{\OptionValue{footnotes}{multiple}} +\OptionValue{footnotes}{multiple}\IndexOption{footnotes=~multiple}, footnotes +that follow each other directly are separated with a delimiter instead. The +default delimiter in \Macro{multfootsep}\important{\Macro{multfootsep}} is +defined as a comma without a space: +\begin{lstcode} + \newcommand*{\multfootsep}{,} +\end{lstcode} +This can be redefined. + +The whole mechanism is compatible with the +\Package{footmisc}\IndexPackage{footmisc}\important{\Package{footmisc}} +package, version~5.3d to 5.5b (see \cite{package:footmisc}). It affects +footnote markers placed using +\DescRef{\ThisCommonLabelBase.cmd.footnote}\IndexCmd{footnote}, as well as +those placed directly with +\DescRef{\ThisCommonLabelBase.cmd.footnotemark}\IndexCmd{footnotemark}. + +You can switch back to the default +\OptionValue{footnotes}{nomultiple} at any time using the +\DescRef{\ThisCommonLabelBase.cmd.KOMAoptions} or +\DescRef{\ThisCommonLabelBase.cmd.KOMAoption} command. However, if you +encounter any problems using another package that alters the footnotes, you +should not use this option, nor should you change the \PName{setting} anywhere +inside the document. + +A summary of the available \PName{setting} values of \Option{footnotes} can +be found in \autoref{tab:\ThisCommonFirstLabelBase.footnotes}% +\IfThisCommonFirstRun{% + . + \begin{table} + \caption[{Available values for the \Option{footnotes} option}] + {Available values for the \Option{footnotes} option to configure footnotes} + \label{tab:\ThisCommonLabelBase.footnotes} + \begin{desctabular} + \pventry{multiple}{% + Consecutive footnote marks will be separated by + \DescRef{\ThisCommonLabelBase.cmd.multfootsep}\IndexCmd{multfootsep}.% + \IndexOption{footnotes~=\textKValue{multiple}}}% + \pventry{nomultiple}{% + Consecutive footnote marks will be handled like single footnotes + and not separated from each other.% + \IndexOption{footnotes~=\textKValue{nomultiple}}}% + \end{desctabular} + \end{table}% +}{, + \autopageref{tab:\ThisCommonFirstLabelBase.footnotes}.% +}% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{footnote}\OParameter{number}\Parameter{text}% + \Macro{footnotemark}\OParameter{number}% + \Macro{footnotetext}\OParameter{number}\Parameter{text}% + \Macro{multiplefootnoteseparator}% +\end{Declaration}% +Footnotes in \KOMAScript{} are produced, as they are in the standard classes, +with the \Macro{footnote} command, or alternatively the pair of commands +\Macro{footnotemark} and \Macro{footnotetext}. As in the standard classes, +it is possible for a page break to occur within a footnote. Normally this +happens if the footnote mark is placed so near the bottom of a page as to +leave \LaTeX{} no choice but to move the footnote to the next page. +Unlike\textnote{\KOMAScript{} vs. standard classes} +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}% + }{}% +} % +the standard classes, \KOMAScript{} can recognize and separate consecutive +footnotes automatically. +See\important{\DescRef{\ThisCommonLabelBase.option.footnotes}} the previously +documented option \DescRef{\ThisCommonLabelBase.option.footnotes}. + +If instead you want to place this delimiter manually, you can do so by calling +\Macro{multiplefootnoteseparator}. However, users should not redefine this +command, as it contains not only the delimiter but also the delimiter's +formatting, for example the font size selection and the superscript. The +delimiter itself is stored in the previously described +\DescRef{\ThisCommonLabelBase.cmd.multfootsep}% +\important{\DescRef{\ThisCommonLabelBase.cmd.multfootsep}}% +\IndexCmd{multfootsep} command. + +\IfThisCommonFirstRun{\iftrue}{% + You can find examples and additional hints in + \autoref{sec:\ThisCommonFirstLabelBase.footnotes} from + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.footnote}.% + \csname iffalse\endcsname }% + \begin{Example} + \phantomsection\xmpllabel{cmd.footnote}% + Suppose you want to put two footnotes after a single word. First you try +\begin{lstcode} + Word\footnote{1st footnote}\footnote{2nd footnote} +\end{lstcode} + Let's assume that the footnotes are numbered 1 and 2. Since the two + footnote numbers follow each other directly, it creates the impression + that the word has only one footnote numbered 12. You can change this + behaviour by using +\begin{lstcode} + \KOMAoptions{footnotes=multiple} +\end{lstcode} + to enable the automatic recognition of footnote sequences. Alternatively, + you can use +\begin{lstcode} + word\footnote{Footnote 1}% + \multiplefootnoteseparator + \footnote{Footnote 2} +\end{lstcode} + This should give you the desired result even if automatic detection + fails or cannot be used for some reason. + + Now suppose you also want the footnote numbers to be separated not just by + a comma, but by a comma and a space. In this case, write +\begin{lstcode} + \renewcommand*{\multfootsep}{,\nobreakspace} +\end{lstcode} + in the preamble of your document. + \Macro{nobreakspace}\IndexCmd{nobreakspace} was used here instead of a + normal space to avoid paragraph or page breaks within the sequence of + footnotes. + \end{Example}% +\fi% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{footref}\Parameter{reference} +\end{Declaration} +Sometimes\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}% + }{}} you have a footnote in a document to which there are several references +in the text. An inconvenient way to typeset this would be to use +\DescRef{\ThisCommonLabelBase.cmd.footnotemark} to set the number directly. +The disadvantage of this method is that you need to know the number and +manually set every \DescRef{\ThisCommonLabelBase.cmd.footnotemark} command. +And if the number changes because you add or remove an earlier footnote, you +will have to change each \DescRef{\ThisCommonLabelBase.cmd.footnotemark}. +\KOMAScript{} thefore offers the \Macro{label}\IndexCmd{label}% +\important{\Macro{label}} mechanism to handle such cases. After placing a +\Macro{label} inside the footnote, you can use \Macro{footref} to set all the +other marks for this footnote in the text. +\IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname}% + \begin{Example} + \phantomsection\xmpllabel{cmd.footref}% + You are writing a text in which you must create a footnote each time a + brand name occurs, indicating that it is a registered trademark. You can + write, for example, +\begin{lstcode} + Company SplishSplash\footnote{This is a registered trade name. + All rights are reserved.\label{refnote}} + produces not only SplishPlump\footref{refnote} + but also SplishPlash\footref{refnote}. +\end{lstcode} + This will produce the same footnote mark three times, but only one + footnote text. The first footnote mark is produced by + \DescRef{\ThisCommonLabelBase.cmd.footnote} itself, and the following two + footnote marks are produced by the additional \Macro{footref} + commands. The footnote text will be produced by + \DescRef{\ThisCommonLabelBase.cmd.footnote}. + \end{Example} +\fi% +When setting footnote marks with the \Macro{label} mechanism, any +changes to the footnote numbers will require at least two \LaTeX{} runs to +ensure correct numbers for all \Macro{footref} marks.% +\IfThisCommonLabelBaseOneOf{scrlttr2,scrextend}{\par% + You can find an example of how to use \Macro{footref} in + \autoref{sec:\ThisCommonFirstLabelBase.footnotes} on + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.footref}. % +}{}% +\IfThisCommonLabelBase{scrlttr2}{}{% + \par + Note\textnote{Attention!} that statements like \Macro{ref}\IndexCmd{ref} + or \Macro{pageref}\IndexCmd{pageref} are fragile and therefore you should + put \Macro{protect}\IndexCmd{protect} in front of them if they appear in + moving arguments such as headings. % +}% +By the way, from\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.33}{\Class{scrlttr2}}% + }{}% +} % +\LaTeX{} 2021-05-01 on, the command is provided by \LaTeX{} itself.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{deffootnote}\OParameter{mark width}\Parameter{indent}% + \Parameter{parindent}\Parameter{definition}% + \Macro{deffootnotemark}\Parameter{definition}% + \Macro{thefootnotemark} +\end{Declaration}% +\IfThisCommonLabelBase{maincls}{The \KOMAScript{} classes set}{\KOMAScript{} + sets}\textnote{\KOMAScript{} vs. standard classes} footnotes slightly +differently than the standard classes do. As in the standard classes, the +footnote mark in the text is rendered with small, superscript numbers. The +same formatting is used in the footnote itself. The mark in the footnote is +typeset right-justified in a box with a width of \PName{mark width}. The first +line of the footnote follows directly. + +All subsequent lines will be indented by the length of \PName{indent}. If the +optional parameter \PName{mark width} is not specified, it defaults to +\PName{indent}. If the footnote consists of more than one paragraph, the first +line of each paragraph is indented by the value of \PName{parindent}. + +\autoref{fig:\ThisCommonFirstLabelBase.deffootnote} % +\IfThisCommonFirstRun{}{on + \autopageref{fig:\ThisCommonFirstLabelBase.deffootnote} }{}% +shows the different parameters% +\IfThisCommonLabelBase{maincls}{ again}{}% +. The default configuration of the \KOMAScript{} classes is as follows: +\IfThisCommonLabelBase{scrextend}{\iftrue}{\csname iffalse\endcsname}% +\begin{lstcode} + \deffootnote[1em]{1.5em}{1em}{% + \textsuperscript{\thefootnotemark}} +\end{lstcode} +\else +\begin{lstcode} + \deffootnote[1em]{1.5em}{1em}{% + \textsuperscript{\thefootnotemark}% + } +\end{lstcode} +\fi% +\Macro{textsuperscript} controls both the +superscript and the smaller font size. The command \Macro{thefootnotemark} +contains the current footnote mark without any formatting.% +\IfThisCommonLabelBase{scrextend}{ % + The \Package{scrextend} package, by contrast, does not change the default + footnote settings of the class you are using. Simply loading the package, + therefore, should not lead to any changes in the formatting of footnote + marks or footnote text. To use the default settings of the \KOMAScript{} + classes with \Package{scrextend}, you must change the settings above + yourself. For example, you can insert the line of code above immediately + after loading the \Package{scrextend} package.% +}{}% + +\IfThisCommonLabelBase{maincls}{% + \begin{figure} +% \centering + \KOMAoption{captions}{bottombeside} + \setcapindent{0pt}% + \begin{captionbeside} + [{Parameters that control the footnote layout}]% + {\label{fig:\ThisCommonLabelBase.deffootnote}\hspace{0pt plus 1ex}% + Parameters that control the footnote layout}% + [l] + \setlength{\unitlength}{1mm} + \begin{picture}(100,22) + \thinlines + % frame of following paragraph + \put(5,0){\line(1,0){90}} + \put(5,0){\line(0,1){5}} + \put(10,5){\line(0,1){5}}\put(5,5){\line(1,0){5}} + \put(95,0){\line(0,1){10}} + \put(10,10){\line(1,0){85}} + % frame of first paragraph + \put(5,11){\line(1,0){90}} + \put(5,11){\line(0,1){5}} + \put(15,16){\line(0,1){5}}\put(5,16){\line(1,0){10}} + \put(95,11){\line(0,1){10}} + \put(15,21){\line(1,0){80}} + % box of the footnote mark + \put(0,16.5){\framebox(14.5,4.5){\mbox{}}} + % description of paragraphs + \put(45,16){\makebox(0,0)[l]{\textsf{first paragraph of a footnote}}} + \put(45,5){\makebox(0,0)[l]{\textsf{next paragraph of a footnote}}} + % help lines + \thicklines + \multiput(0,0)(0,3){7}{\line(0,1){2}} + \multiput(5,0)(0,3){3}{\line(0,1){2}} + % parameters + \put(2,7){\vector(1,0){3}} + \put(5,7){\line(1,0){5}} + \put(15,7){\vector(-1,0){5}} + \put(15,7){\makebox(0,0)[l]{\small\PName{parindent}}} + % + \put(-3,13){\vector(1,0){3}} + \put(0,13){\line(1,0){5}} + \put(10,13){\vector(-1,0){5}} + \put(10,13){\makebox(0,0)[l]{\small\PName{indent}}} + % + \put(-3,19){\vector(1,0){3}} + \put(0,19){\line(1,0){14.5}} + \put(19.5,19){\vector(-1,0){5}} + \put(19.5,19){\makebox(0,0)[l]{\small\PName{mark width}}} + \end{picture} + \end{captionbeside} + \end{figure}} + +\BeginIndexGroup +\BeginIndex{FontElement}{footnote}\LabelFontElement{footnote}% +\BeginIndex{FontElement}{footnotelabel}\LabelFontElement{footnotelabel}% +The footnote\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v2.8q}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}% +}}{}, including the footnote mark, uses the font specified in the +\FontElement{footnote}\important{\FontElement{footnote}} element. You can +change the font of the footnote mark separately using the +\DescRef{\ThisCommonLabelBase.cmd.setkomafont} and +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) +for the \FontElement{footnotelabel}\important{\FontElement{footnotelabel}} +element. See also \autoref{tab:\ThisCommonLabelBase.fontelements}, +\autopageref{tab:\ThisCommonLabelBase.fontelements}. +The default setting is no change to the font.% +\IfThisCommonLabelBase{scrextend}{ % + However, with \Package{scrextend} these elements will only change the fonts + if footnotes are handled by the package, that is, after using + \Macro{deffootnote}.% +}{} Please don't misuse this element for other purposes, for example to set +the footnotes ragged right (see also \DescRef{\LabelBase.cmd.raggedfootnote}, +\DescPageRef{\LabelBase.cmd.raggedfootnote}). + +\BeginIndex{FontElement}{footnotereference}% +\LabelFontElement{footnotereference}% +The footnote mark in the text is defined separately from the mark in +front of the actual footnote. This is done with +\Macro{deffootnotemark}. The default setting is: +\begin{lstcode} + \deffootnotemark{% + \textsuperscript{\thefootnotemark}} +\end{lstcode} +With\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v2.8q}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{} this default, the font for the +\FontElement{footnotereference}\important{\FontElement{footnotereference}} +element is used (see \autoref{tab:\ThisCommonLabelBase.fontelements}, +\autopageref{tab:\ThisCommonLabelBase.fontelements}). Thus, the footnote marks +in the text and in the footnote itself are identical. You can change the font +with the commands \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (see +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}). + +\IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname}% + \begin{Example} + \phantomsection + \xmpllabel{cmd.deffootnote}% + One\textnote{Hint!} feature that is often requested is footnote marks + which are neither in superscript nor in a smaller font. They should not + touch the footnote text but be separated by a small space. You can + accomplish this as follows: +\begin{lstcode} + \deffootnote{1em}{1em}{\thefootnotemark\ } +\end{lstcode} + This will set the footnote mark and subsequent space right-aligned in a + box of width 1\Unit{em}. The lines of the footnote text that follow are + also indented by 1\Unit{em} from the left margin. + + Another\textnote{Hint!} layout that is often requested is footnote marks + that are left-aligned. You can obtain them with the following + definition: +\begin{lstcode} + \deffootnote{1.5em}{1em}{% + \makebox[1.5em][l]{\thefootnotemark}} +\end{lstcode} + + If, however you want to change the font for all footnotes, for example + to sans serif, this can easily be done with the commands + \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and + \DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (see + \autoref{sec:\ThisCommonLabelBase.textmarkup}, + \DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}): +\begin{lstcode} + \setkomafont{footnote}{\sffamily} +\end{lstcode} + \end{Example}% + \IfThisCommonLabelBase{scrextend}{}{% + As the examples show, {\KOMAScript} allows a wide variety of different + footnote formats with this simple user interface.% + }% +\fi% +\IfThisCommonFirstRun{}{% + For examples, see \autoref{sec:\ThisCommonFirstLabelBase.footnotes}, + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.deffootnote}.% +}{}% +% +\EndIndexGroup +\EndIndexGroup + +\IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname} +\begin{Declaration} + \Macro{setfootnoterule}\OParameter{thickness}\Parameter{length}% +\end{Declaration}% +Generally,\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.06}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.06}{\Class{scrlttr2}}% + }{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.06}{\Package{scrextend}}% + }{}% + }% +} a horizontal rule is set between the text area and the footnote area, but +normally this rule does not extend the full width of the type area. With +\Macro{setfootnoterule}, you can set the exact thickness and length of the +rule. In this case, the parameters \PName{thickness} and \PName{length} are +only evaluated when setting the rule itself. If the optional argument +\PName{thickness} has been omitted, the thickness of the rule will not be +changed. Empty arguments for \PName{thickness} or \PName{length} are also +allowed and do not change the corresponding parameters. Using absurd values +will result in warning messages both when setting and when using the +parameters. + +\BeginIndexGroup +\BeginIndex{FontElement}{footnoterule}\LabelFontElement{footnoterule}% +You can% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.07}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.07}{\Class{scrlttr2}}% + }{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.07}{\Package{scrextend}}% + }{}% + }% +} % +change the colour of the rule with the +\FontElement{footnoterule}\important{\FontElement{footnoterule}} element using +the \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}). The default is no change +of font or colour. In order to change the colour, you must also load a colour +package like +\Package{xcolor}\IndexPackage{xcolor}\important{\Package{xcolor}}.% +\EndIndexGroup +\EndIndexGroup +\fi + +\begin{Declaration} + \Macro{raggedfootnote} +\end{Declaration} +By default% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.23}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.23}{\Class{scrlttr2}}% + }{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.23}{\Package{scrextend}}% + }{}% + }% +} % +\KOMAScript{} justifies footnotes just as in the standard classes. +But\IfThisCommonLabelBase{scrextend}{% + \ if you use \DescRef{\LabelBase.cmd.deffootnote}% + \important{\DescRef{\LabelBase.cmd.deffootnote}}% + \IndexCmd{deffootnote}% +}{% + \textnote{\KOMAScript{} vs. standard classes}% +} you can also change the justification separately from the rest of the +document by redefining \Macro{raggedfootnote}. Valid definitions are +\Macro{raggedright}\IndexCmd{raggedright}, +\Macro{raggedleft}\IndexCmd{raggedleft}, +\Macro{centering}\IndexCmd{centering}, \Macro{relax}\IndexCmd{relax} or an +empty definition, which is the default. The alignment commands of the +\Package{ragged2e}\IndexPackage{ragged2e} package are also valid (see +\cite{package:ragged2e}). \IfThisCommonLabelBase{scrextend}{% + You can find a suitable example in + \autoref{sec:\ThisCommonFirstLabelBase.footnotes}, + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.raggedfootnote}.% + \iffalse }{\csname iftrue\endcsname}% + \begin{Example} + \phantomsection\xmpllabel{cmd.raggedfootnote}% + Suppose you are using footnotes only to provide references to very long + links, where line breaks would produce poor results if justified. You can + use +\begin{lstcode} + \let\raggedfootnote\raggedright +\end{lstcode} + in your document's preamble to switch to ragged-right footnotes. + \end{Example}% +\fi +\EndIndexGroup + +\begin{Declaration} + \DoHook{footnote/text/begin}% + \DoHook{footnote/text/end}% +\end{Declaration} +\BeginIndex{}{hook}% +For\ChangedAt{v3.36}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}} experts there are also two hooks +of type \emph{do-hook} (see \autoref{sec:scrbase.hooks} from +\autopageref{sec:scrbase.hooks}). The first of these is used at the very +beginning of \Macro{@makefntext} before +\DescRef{\LabelBase.cmd.raggedfootnote} is executed. The second one at the end +before the paragraph is finished. Currently neither hook is used by +\KOMAScript{} itself.% +\EndIndexGroup +% +\EndIndexGroup + + +%%% Local Variables: +%%% mode: latex +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% TeX-master: "../guide" +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-footnotes-experts-de.tex b/macros/latex/contrib/koma-script/doc/common-footnotes-experts-de.tex new file mode 100644 index 0000000000..7be6c1943c --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-footnotes-experts-de.tex @@ -0,0 +1,54 @@ +% ====================================================================== +% common-footnotes-experts-de.tex +% Copyright (c) Markus Kohm, 2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-footnotes-experts-de.tex}% + [$Date: 2022-02-16 10:57:02 +0100 (Mi, 16. Feb 2022) $ + KOMA-Script guide (common paragraphs)] + +\begin{Declaration} + \DoHook{footnote/text/begin}% + \DoHook{footnote/text/end}% +\end{Declaration} +\BeginIndex{}{Haken}% +Für\ChangedAt{v3.36}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}} Experten gibt es außerdem zwei +Haken vom Typ \emph{do-hook} (siehe \autoref{sec:scrbase.hooks} ab +\autopageref{sec:scrbase.hooks}). Der erste davon wird ganz zu Beginn von +\Macro{@makefntext} noch vor \DescRef{maincls.cmd.raggedfootnote} +ausgeführt. Der zweite am Ende noch bevor der Absatz beendet ist. Derzeit +werden beide Haken von \KOMAScript{} selbst nicht verwendet.% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Fußnotennummern Fußnotenmarkierung Satzspiegels +% LocalWords: Standardklassen Fußnotenformatierungen Dokumentpräambel +% LocalWords: Fußnotenmöglichkeiten diff --git a/macros/latex/contrib/koma-script/doc/common-footnotes-experts-en.tex b/macros/latex/contrib/koma-script/doc/common-footnotes-experts-en.tex new file mode 100644 index 0000000000..3d3907ec0a --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-footnotes-experts-en.tex @@ -0,0 +1,52 @@ +% ====================================================================== +% common-footnotes-experts-en.tex +% Copyright (c) Markus Kohm, 2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-footnotes-experts-en.tex} + [$Date: 2022-02-16 10:57:02 +0100 (Mi, 16. Feb 2022) $ + KOMA-Script guide (common paragraphs: Footnotes)] +\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} + +\begin{Declaration} + \DoHook{footnote/text/begin}% + \DoHook{footnote/text/end}% +\end{Declaration} +\BeginIndex{}{hook}% +For\ChangedAt{v3.36}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}} experts there are also two hooks +of type \emph{do-hook} (see \autoref{sec:scrbase.hooks} from +\autopageref{sec:scrbase.hooks}). The first of these is used at the very +beginning of \Macro{@makefntext} before +\DescRef{maincls.cmd.raggedfootnote} is executed. The second one at the end +before the paragraph is finished. Currently neither hook is used by +\KOMAScript{} itself.% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_BG" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-headfootheight-de.tex b/macros/latex/contrib/koma-script/doc/common-headfootheight-de.tex new file mode 100644 index 0000000000..fc1faef87d --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-headfootheight-de.tex @@ -0,0 +1,159 @@ +% ====================================================================== +% common-headfootheight-de.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% +% Text that is common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{common-headfootheight-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraph: Head and Foot Height)] + +\section{Höhe von Kopf und Fuß} +\seclabel{height} + +\BeginIndexGroup +\BeginIndex{}{Kopf>Hoehe=Höhe}% +\BeginIndex{}{Fuss=Fuß>Hoehe=Höhe}% +\IfThisCommonLabelBase{scrlayer-scrpage}{% + \begin{Explain}% + Vermutlich, weil der Fuß bei den Standardklassen kaum besetzt % + \iffalse % Umbruchkorrektur + ist und zudem als \Macro{mbox} % + \else und \fi % + immer einzeilig ist, gibt es bei \LaTeX{} keine definierte Höhe des + Fußes. Zwar ist der Abstand von der letzten Grundlinie des Textblocks zur + Grundlinie des Fußes mit + \Length{footskip}\IndexLength[indexmain]{footskip} % + \iffalse durchaus \fi % Umbruchkorrektur + definiert. Wenn allerdings der Fuß höher als eine Zeile wird, % + \iffalse dann \fi % Umbruchkorrektur + ist nicht hinreichend festgelegt, wie sich diese Höhe niederschlägt + bzw. ob \Length{footskip} den Abstand zur obersten oder untersten + Grundlinie des Fußes darstellt. + + Obwohl auch der Kopf bei den Seitenstilen der Standardklassen in einer + horizontalen Box ausgegeben wird und damit immer einzeilig ist, hat + \LaTeX{} für die Kopfhöhe \iffalse tatsächlich \fi% Umbruchkorrektur + selbst eine Länge zur Einstellung ihrer Höhe vorgesehen. Dies erklärt sich + vermutlich daraus, dass diese Höhe zur Bestimmung des Anfangs des + Textbereichs benötigt wird.% + \end{Explain}% +}{% + \iffalse% Umbruchkorrektur + \iffree{Der }{}Kopf und \iffree{der }{}Fuß einer Seite sind zentrale + Elemente nicht nur des Seitenstils. \iffree{Auch eine Ebene kann bei der + Definition über entsprechende Optionen genau darauf beschränkt werden + (siehe \autoref{tab:scrlayer.layerkeys} ab + \autopageref{tab:scrlayer.layerkeys}). }{}Deshalb muss die Höhe beider + Elemente bekannt sein.% + \fi% +} + +\IfThisCommonFirstRun{}{% + Es gilt sinngemäß, was in \autoref{sec:\ThisCommonFirstLabelBase.height} + geschrieben wurde. Falls Sie also + \autoref{sec:\ThisCommonFirstLabelBase.height} bereits gelesen und + verstanden haben, können Sie % + \iffalse % Umbruch selbe Seite + auf \autopageref{sec:\ThisCommonLabelBase.height.next} \else unten \fi % + mit \autoref{sec:\ThisCommonLabelBase.height.next} fortfahren.% +} + + +\begin{Declaration} + \Length{footheight} + \Length{headheight} + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \OptionVName{autoenlargeheadfoot}{Ein-Aus-Wert}% + }{}% +\end{Declaration} +Das Paket \Package{scrlayer} führt als neue Länge \Length{footheight} analog +zur Höhe \Length{headheight}\IfThisCommonLabelBase{scrlayer-scrpage}{}{ des + \LaTeX-Kerns} ein. Gleichzeitig interpretiert +\Package{scrlayer\IfThisCommonLabelBase{scrlayer-scrpage}{-scrpage}{}} +\Length{footskip} so, dass es den Abstand der letzten Grundlinie des +Textbereichs von der ersten Standard-Grundlinie des Fußes darstellt. Das Paket +\hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea}% +\important{\hyperref[cha:typearea]{\Package{typearea}}} betrachtet dies in +gleicher Weise, so dass die dortigen Optionen zum Setzen der Höhe des Fußes +(siehe die Optionen \DescRef{typearea.option.footheight} und +\DescRef{typearea.option.footlines} in \autoref{sec:typearea.typearea}, +\DescPageRef{typearea.option.footheight}) und zur Berücksichtigung des Fußes +bei der Berechnung des Satzspiegels (siehe Option +\DescRef{typearea.option.footinclude} in demselben Abschnitt, +\DescPageRef{typearea.option.footinclude}) sehr gut zum Setzen der Werte für +\Package{scrlayer} verwendet werden können und auch das gewünschte Ergebnis +liefern. + +Wird das Paket \hyperref[cha:typearea]{\Package{typearea}}% +\important{\hyperref[cha:typearea]{\Package{typearea}}} nicht verwendet, so +sollte man gegebenenfalls die Höhe von Kopf und Fuß über entsprechende Werte +für die Längen einstellen. Zumindest für den Kopf bietet aber beispielsweise +auch das Paket \Package{geometry} Einstellmöglichkeiten.% +\IfThisCommonLabelBase{scrlayer-scrpage}{\par% + Wurde der Kopf oder der Fuß für den tatsächlich verwendeten Inhalt zu klein + gewählt, so versucht \Package{scrlayer-scrpage} in der + Voreinstellung\textnote{Voreinstellung} die Längen selbst entsprechend + anzupassen. Gleichzeitig wird eine entsprechende Warnung ausgegeben, die + auch Ratschläge für passende Einstellungen enthält. Die automatischen + Änderungen haben dann ab dem Zeitpunkt, an dem ihre Notwendigkeit erkannt + wurde, Gültigkeit und werden nicht automatisch aufgehoben, wenn + beispielsweise der Inhalt von Kopf oder Fuß wieder kleiner wird. Über + Option\ChangedAt{v3.25}{\Package{scrlayer-scrpage}} + \Option{autoenlargeheadfoot} kann dieses Verhalten jedoch geändert + werden. Die Option versteht die Werte für einfache Schalter aus + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. In der + Voreinstellung ist die Option aktiviert. Wird sie deaktiviert, so werden + Kopf und Fuß nicht mehr automatisch vergrößert, sondern nur noch eine + Warnung mit Hinweisen für passende Einstellungen ausgegeben.% +}{% + \IfThisCommonLabelBase{scrlayer}{\par% + Wurde der Kopf oder Fuß für den tatsächlich verwendeten Inhalt zu klein + gewählt, so toleriert \Package{scrlayer} dies in der Regel ohne + Fehlermeldung oder Warnung. Der Kopf dehnt sich dann entsprechend seiner + Höhe in der Regel weiter nach oben, der Fuß entsprechend weiter nach unten + aus. Informationen darüber erhält man jedoch nicht automatisch. Pakete wie + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + \important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% + \IndexPackage{scrlayer-scrpage}, die auf \Package{scrlayer} aufbauen, + enthalten dagegen gegebenenfalls eigene Tests, die auch zu eigenen + Aktionen führen können (siehe \DescRef{scrlayer-scrpage.length.headheight} + und \DescRef{scrlayer-scrpage.length.footheight} auf + \DescPageRef{scrlayer-scrpage.length.headheight}).% + }{}% +}% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Seitenstilen Ebenenmodell scrpage headings myheadings plain +% LocalWords: empty scrlayer Seitenstil Rückgriffe Gliederungsnummern +% LocalWords: Standardklassen Seitenstile konsistenteren Befehlssatzes +% LocalWords: Einstellmöglichkeiten Seiteninhalts Gliederungsüberschrift diff --git a/macros/latex/contrib/koma-script/doc/common-headfootheight-en.tex b/macros/latex/contrib/koma-script/doc/common-headfootheight-en.tex new file mode 100644 index 0000000000..c703e26dbe --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-headfootheight-en.tex @@ -0,0 +1,139 @@ +% ====================================================================== +% common-headfootheight-en.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% +% Text that is common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{common-headfootheight-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraph: Head and Foot Height)] +\translator{Markus Kohm\and Jana Schubert\and Jens H\"uhne\and Karl Hagen} + +\section{Header and Footer Height} +\seclabel{height} +\BeginIndexGroup +\BeginIndex{}{header>height}% +\BeginIndex{}{footer>height}% +\IfThisCommonLabelBase{scrlayer-scrpage}{% + \begin{Explain}% + The \LaTeX{} standard classes do not use the footer much, and if they do + use it, they put the contents into a \Macro{mbox} which results in the + footer being a single text line. This is probably the reason that \LaTeX{} + itself does not have a well-defined footer height. Although the distance + between the last baseline of the text area and the baseline of the footer + is defined with \Length{footskip}\IndexLength[indexmain]{footskip}, if the + footer consists of more than one text line, there is no definite statement + whether this length should be the distance to the first or the last + baseline of the footer. + + Although the page header of the standard classes will also be put into a + horizontal box, and therefore is also a single text line, \LaTeX{} in fact + provides a length to set the height of the header. The reason for this may + be that this height is needed to determine the start of the text area. + \end{Explain}% +}{% + The header and footer of a page are central elements not just of a page + style. They can also serve to restrict layers using the appropriate options + (see \autoref{tab:scrlayer.layerkeys}, + \autopageref{tab:scrlayer.layerkeys}). Therefore the heights of these + elements must be defined.% +} + +\IfThisCommonFirstRun{}{% + The information in \autoref{sec:\ThisCommonFirstLabelBase.height} applies + equally to this chapter. So if you have already read and understood + \autoref{sec:\ThisCommonFirstLabelBase.height}, you can skip ahead to + \autoref{sec:\ThisCommonLabelBase.height.next}, + \autopageref{sec:\ThisCommonLabelBase.height.next}.% +} + +\begin{Declaration} + \Length{footheight} + \Length{headheight} + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \OptionVName{autoenlargeheadfoot}{simple switch}% + }{}% +\end{Declaration} +The \Package{scrlayer} package introduces a new length, \Length{footheight}, +analogous to \Length{headheight}% +\IfThisCommonLabelBase{scrlayer-scrpage}{}{of the \LaTeX{} kernel}. +Additionally, +\Package{scrlayer\IfThisCommonLabelBase{scrlayer-scrpage}{-scrpage}{}} +interprets \Length{footskip} to be the distance from the last baseline of the +text area to the first normal baseline of the footer. The +\hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea}% +\important{\hyperref[cha:typearea]{\Package{typearea}}} package interprets +\Length{footheight} in the same way, so \Package{typearea}'s options for the +footer height can also be used to set the values for the \Package{scrlayer} +package. See the \DescRef{typearea.option.footheight} and +\DescRef{typearea.option.footlines} options in +\autoref{sec:typearea.typearea}, \DescPageRef{typearea.option.footheight}) +and option \DescRef{typearea.option.footinclude} on +\DescPageRef{typearea.option.footinclude} of the same section. + +If you do not use the \hyperref[cha:typearea]{\Package{typearea}}% +\important{\hyperref[cha:typearea]{\Package{typearea}}} package, you should +adjust the header and footer heights using appropriate values for the lengths +where necessary. For the header, at least, the \Package{geometry} package, for +example, provides similar settings. +\IfThisCommonLabelBase{scrlayer-scrpage}{\par% + If you choose a header or footer height that is too small for the actual + content, \Package{scrlayer-scrpage} tries by default to adjust the lengths + appropriately. At the same time, it will issue a warning containing + suggestions for suitable settings. These automatic changes take effect + immediately after the need for them has been detected and are not + automatically reversed, for example, when the content of the header or + footer becomes smaller afterwards. + However,\ChangedAt{v3.25}{\Package{scrlayer-scrpage}}, this behaviour can be + changed by using the \Option{autoenlargeheadfoot} option. This option + recognizes the values for simple switches in \autoref{tab:truefalseswitch}, + \autopageref{tab:truefalseswitch}. The option is activated by default. If it + is deactivated, the header and footer are no longer enlarged + automatically. Only a warning with hints for suitable settings is issued.% +}{% + \IfThisCommonLabelBase{scrlayer}{\par% + If you choose a header or footer height that is too small for the actual + content, \Package{scrlayer} usually accepts this without issuing an error + message or a warning. The header then expands according to its height, + usually upwards, with the footer moved down accordingly. Information about + this change is not obtained automatically. However, packages like + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + \important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% + \IndexPackage{scrlayer-scrpage} that build upon \Package{scrlayer} may + contain their own tests which can lead to their own actions (see + \DescRef{scrlayer-scrpage.length.headheight} and + \DescRef{scrlayer-scrpage.length.footheight} on + \DescPageRef{scrlayer-scrpage.length.headheight}).% + }{}% +}% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: + diff --git a/macros/latex/contrib/koma-script/doc/common-interleafpage-de.tex b/macros/latex/contrib/koma-script/doc/common-interleafpage-de.tex new file mode 100644 index 0000000000..5b705fb536 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-interleafpage-de.tex @@ -0,0 +1,353 @@ +% ====================================================================== +% common-interleafpage-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-interleafpage-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] + +\section{Vakatseiten} +\seclabel{emptypage}% +\BeginIndexGroup +\BeginIndex{}{Vakatseite}% +\BeginIndex{}{Seiten>Stil}% + +\IfThisCommonFirstRun{}{% + Es gilt sinngemäß, was in + \autoref{sec:\ThisCommonFirstLabelBase.emptypage} geschrieben + wurde. Falls Sie also \autoref{sec:\ThisCommonFirstLabelBase.emptypage} + bereits gelesen und verstanden haben, können Sie auf + \autopageref{sec:\ThisCommonLabelBase.emptypage.next} mit + \autoref{sec:\ThisCommonLabelBase.emptypage.next} fortfahren.% +} + +\IfThisCommonLabelBase{scrextend}{}{% + \IfThisCommonLabelBase{scrlttr2}{% Umbruchkorrektur + }{% + Vakatseiten sind Seiten, die beim Satz eines Dokuments absichtlich leer + bleiben. Bei \LaTeX{} werden sie jedoch in der Voreinstellung mit dem + aktuell gültigen Seitenstil gesetzt. \KOMAScript{} bietet hier diverse + Erweiterungen.% + } + + \IfThisCommonLabelBase{scrlttr2}{% + Vakatseiten sind bei Briefen eher unüblich. Das liegt nicht zuletzt daran, + dass wahrhaft doppelseitige Briefe recht selten sind, da Briefe + normalerweise nicht gebunden werden. Trotzdem unterstützt \KOMAScript{} + auch für den Fall von doppelseitigen Briefen Einstellungen für + Vakatseiten. Da die hier vorgestellten Anweisungen aber in Briefen kaum + Verwendung finden, wurde hier auf Beispiele verzichtet. Bei Bedarf + orientieren Sie sich bitte an den Beispielen in + \autoref{sec:maincls.emptypage} ab \autopageref{sec:maincls.emptypage}.% + }{% + Vakatseiten findet man hauptsächlich in Büchern. Da es bei Büchern üblich + ist, dass Kapitel auf einer rechten Seite beginnen, muss in dem Fall, dass + das vorherige Kapitel ebenfalls auf einer rechten Seite endet, eine leere + linke Seite eingefügt werden. +% + \iffalse % Umbruchkorrektur + Aus dieser Erklärung ergibt sich auch, dass Vakatseiten normalerweise nur + im doppelseitigen Satz existieren.% + \fi% +% + \iffalse % Umbruchkorrektur + \ Die leeren Rückseiten im einseitigen Druck werden eher nicht als + Vakatseiten bezeichnet, obwohl sie auf Druckbögen im Ergebnis als solche + erscheinen.% + \fi% + }% +} + +\begin{Declaration} + \OptionVName{cleardoublepage}{Seitenstil}% + \OptionValue{cleardoublepage}{current} +\end{Declaration}% +Mit Hilfe dieser Option% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}% + }{}% +} % +kann man den \PName{Seitenstil} der Vakatseite bestimmen, die bei Bedarf von +den Anweisungen \DescRef{\LabelBase.cmd.cleardoublepage}, +\DescRef{\LabelBase.cmd.cleardoubleoddpage} oder +\DescRef{\LabelBase.cmd.cleardoubleevenpage} eingefügt wird, um bis zur +gewünschten Seite zu umbrechen. Als \PName{Seitenstil} sind dabei alle bereits +definierten Seitenstile (siehe \autoref{sec:\ThisCommonLabelBase.pagestyle} ab +\autopageref{sec:\ThisCommonLabelBase.pagestyle} und +\autoref{cha:scrlayer-scrpage} ab \autopageref{cha:scrlayer-scrpage}) +verwendbar. Daneben ist auch \OptionValue{cleardoublepage}{current} +möglich. Dieser Fall entspricht der Voreinstellung von \KOMAScript{} bis +Version~2.98c\important{\OptionValueRef{\LabelBase}{version}{2.98c}} und führt +dazu, dass die Vakatseite mit dem Seitenstil erzeugt wird, der beim Einfügen +gerade aktuell ist. Ab Version~3.00% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}% + }{}% +} % +werden in der Voreinstellung\textnote{Voreinstellung} entsprechend der +typografischen Gepflogenheiten Vakatseiten mit dem Seitenstil +\IfThisCommonLabelBase{scrextend}{\DescRef{maincls.pagestyle.empty}}{% + \DescRef{\ThisCommonLabelBase.pagestyle.empty}}\IndexPagestyle{empty} +erzeugt% +\iffalse % Umbruchkorrektur (Text überflüssig) +, wenn man nicht Kompatibilität zu früheren \KOMAScript-Versionen +eingestellt hat (siehe Option \DescRef{\ThisCommonLabelBase.option.version}, +\autoref{sec:\ThisCommonLabelBase.compatibilityOptions}, +\DescPageRef{\ThisCommonLabelBase.option.version})% +\fi.% Der Punkt ist hier wichtig! +\IfThisCommonLabelBase{maincls}{\iftrue}{\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{option.cleardoublepage}% + Angenommen, Sie wollen, dass die Vakatseiten bis auf die Paginierung leer + sind\iffree{, also mit Seitenstil \IfThisCommonLabelBase{scrextend}{% + \DescRef{maincls.pagestyle.plain}}{\DescRef{\LabelBase.pagestyle.plain}} + erzeugt werden}{}. Dies erreichen Sie \iffree{beispielsweise }{}mit: +\begin{lstcode} + \KOMAoptions{cleardoublepage=plain} +\end{lstcode} + Näheres zum Seitenstil \IfThisCommonLabelBase{scrextend}{% + \DescRef{maincls.pagestyle.plain}}{\DescRef{\LabelBase.pagestyle.plain}} + ist in + \IfThisCommonLabelBase{scrextend}{% + \autoref{sec:maincls.pagestyle}}{% + \autoref{sec:\LabelBase.pagestyle}}, + \IfThisCommonLabelBase{scrextend}{% + \DescPageRef{maincls.pagestyle.plain}}{% + \DescPageRef{\LabelBase.pagestyle.plain}} zu finden. + \end{Example} +\else + \IfThisCommonLabelBase{scrextend}{% + \ Ein Beispiel für die Bestimmung des Seitenstils von Vakatseiten finden + Sie in \autoref{sec:\ThisCommonFirstLabelBase.emptypage}, + \PageRefxmpl{\ThisCommonFirstLabelBase.option.cleardoublepage}.% + \iffalse% Umbruchvariante ohne Beispiel + }{\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{option.cleardoublepage}% + Angenommen, Sie wollen, dass die Vakatseiten bis auf die Paginierung + leer sind, also mit Seitenstil \IfThisCommonLabelBase{scrextend}{% + \DescRef{maincls.pagestyle.plain}}{\DescRef{\LabelBase.pagestyle.plain}} + erzeugt werden. Dies erreichen Sie beispielsweise mit +\begin{lstcode} + \KOMAoptions{cleardoublepage=plain} +\end{lstcode} + Näheres zum Seitenstil \DescRef{maincls.pagestyle.plain} ist in + \autoref{sec:maincls.pagestyle}, + \DescPageRef{maincls.pagestyle.plain} + zu finden. + \end{Example}% + \fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{clearpage}% + \Macro{cleardoublepage}% + \Macro{cleardoublepageusingstyle}\Parameter{Seitenstil}% + \Macro{cleardoubleemptypage}% + \Macro{cleardoubleplainpage}% + \Macro{cleardoublestandardpage}% + \Macro{cleardoubleoddpage}% + \Macro{cleardoubleoddpageusingstyle}\Parameter{Seitenstil}% + \Macro{cleardoubleoddemptypage}% + \Macro{cleardoubleoddplainpage}% + \Macro{cleardoubleoddstandardpage}% + \Macro{cleardoubleevenpage}% + \Macro{cleardoubleevenpageusingstyle}\Parameter{Seitenstil}% + \Macro{cleardoubleevenemptypage}% + \Macro{cleardoubleevenplainpage}% + \Macro{cleardoubleevenstandardpage} +\end{Declaration}% +Im\textnote{Standardklassen} \LaTeX-Kern existiert die Anweisung +\Macro{clearpage}, die dafür sorgt, dass alle noch nicht ausgegebenen +Gleitumgebungen ausgegeben werden und anschließend eine neue Seite begonnen +wird. Außerdem existiert die Anweisung \Macro{cleardoublepage}, die wie +\Macro{clearpage} arbeitet, durch die aber im doppelseitigen Layout (siehe +Option \DescRef{typearea.option.twoside} in \autoref{sec:typearea.typearea}, +\DescPageRef{typearea.option.twoside}) eine neue rechte Seite begonnen +wird. Dazu wird gegebenenfalls eine linke Vakatseite im aktuellen Seitenstil +ausgegeben. + +Bei {\KOMAScript}\textnote{\KOMAScript} arbeitet +\Macro{cleardoubleoddstandardpage}% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}% + }{}% +} % +genau in der soeben für die Standardklassen beschriebenen Art und Weise. Die +Anweisung \Macro{cleardoubleoddplainpage}% +\important{\IfThisCommonLabelBase{scrextend}{% + \DescRef{maincls.pagestyle.plain}}{\DescRef{\LabelBase.pagestyle.plain}}} +ändert demgegenüber den Seitenstil der leeren linken Seite zusätzlich auf +\IfThisCommonLabelBase{scrextend}{% + \DescRef{maincls.pagestyle.plain}}{\DescRef{\LabelBase.pagestyle.plain}}% +\IndexPagestyle{plain}, um den +\IfThisCommonLabelBase{scrlttr2}{Seitenkopf}{Kolumnentitel} zu +unterdrücken. Analog dazu wird bei der Anweisung +\Macro{cleardoubleoddemptypage}% +\important{% + \IfThisCommonLabelBase{scrextend}{\DescRef{maincls.pagestyle.empty}}{% + \DescRef{\LabelBase.pagestyle.empty}}} der Seitenstil +\IfThisCommonLabelBase{scrextend}{\DescRef{maincls.pagestyle.empty}}{% + \DescRef{\LabelBase.pagestyle.empty}}\IndexPagestyle{empty} verwendet, um +sowohl \IfThisCommonLabelBase{scrlttr2}{Seitenkopf als auch + Seitenfuß}{Kolumnentitel als auch Seitenzahl} auf der leeren linken Seite zu +unterdrücken. Die Seite ist damit vollständig leer. Will man für die +Vakatseite einen eigenen \PName{Seitenstil} vorgeben, so ist dieser als +Argument von \Macro{cleardoubleoddpageusingstyle} anzugeben. Dabei kann jeder +bereits definierte Seitenstil (siehe auch \autoref{cha:scrlayer-scrpage}) +verwendet werden. + +\IfThisCommonLabelBase{scrlttr2}{}{% + Manchmal\textnote{ungerade Vakatseiten} möchte man nicht, dass Kapitel mit + neuen rechten Seiten, sondern links auf einer Doppelseite beginnen. Dies + widerspricht zwar dem klassischen Buchdruck, kann jedoch seine Berechtigung + haben, wenn die Doppelseite am Kapitelanfang einen ganz speziellen Inhalt + hat. Bei \KOMAScript{} ist deshalb die Anweisung + \Macro{cleardoubleevenstandardpage} als Äquivalent zur Anweisung + \Macro{cleardoubleoddstandardpage} definiert, jedoch mit dem Unterschied, + dass die nächste Seite eine linke Seite ist. Entsprechendes gilt für die + Anweisungen \Macro{cleardoubleevenplainpage}, + \Macro{cleardoubleevenemptypage}% + \IfThisCommonLabelBase{maincls}{% Umbruchoptimierungsalternative + \ und für die ein Argument erwartende Anweisung}{,} + \Macro{cleardoubleevenpageusingstyle}.% +} + +Die Arbeitsweise der Anweisungen \Macro{cleardoublestandardpage}, +\Macro{cleardoubleemptypage}, \Macro{cleardoubleplainpage} und der ein +Argument erwartenden Anweisung \Macro{cleardoublepageusingstyle} % +\IfThisCommonLabelBase{maincls}{% + ist ebenso wie die Standard-Anweisung \Macro{cleardoublepage} von der in + \autoref{sec:maincls.structure}, \DescPageRef{maincls.option.open} erklärten + Option \DescRef{maincls.option.open}% + \IndexOption{open}\important{\DescRef{maincls.option.open}} abhängig und + entspricht je nach Einstellung einer der in den vorherigen Absätzen + erläuterten Anweisungen. + +}{% + entspricht \IfThisCommonLabelBase{scrlttr2}{bei der Klasse + \Class{scrlttr2}}{% + \IfThisCommonLabelBase{scrextend}{beim Paket \Package{scrextend}}{% + \InternalCommonFileUsageError}% + } ebenso wie die Standard-Anweisung \Macro{cleardoublepage} den + entsprechenden, zuvor erklärten Anweisungen% + \IfThisCommonLabelBase{scrlttr2}{. % + Die übrigen Anweisungen sind bei \Class{scrlttr2} nur aus Gründen der + Vollständigkeit definiert. Näheres zu diesen ist bei Bedarf + \autoref{sec:maincls.emptypage}, \DescPageRef{maincls.cmd.cleardoublepage} + zu entnehmen% + }{% + \ für den Umbruch zur nächsten ungeraden Seite% + }.% +}% +\IfThisCommonLabelBaseOneOf{scrlttr2,scrextend}{\iffalse}{\csname + iftrue\endcsname} + \begin{Example} + \phantomsection\xmpllabel{cmd.cleardoublepage}% + Angenommen, Sie wollen innerhalb eines Dokuments als nächstes eine + Doppelseite setzen, bei der auf der linken Seite eine Abbildung in Größe + des Satzspiegels platziert wird und rechts ein neues Kapitel + beginnt. Falls das vorherige Kapitel mit einer linken Seite endet, muss + also eine Vakatseite eingefügt werden. Diese soll komplett leer + sein. Ebenso soll die linke Bildseite weder Kopf noch Fußzeile + besitzen. +\iffalse% Umbruchkorrekturtext + Zunächst wird mit +\begin{lstcode} + \KOMAoptions{cleardoublepage=empty} +\end{lstcode} + dafür gesorgt, dass Vakatseiten mit dem Seitenstil + \IfThisCommonLabelBase{scrextend}{\DescRef{maincls.pagestyle.empty}}{% + \DescRef{\LabelBase.pagestyle.empty}}, also ohne Kopf- und Fußzeile + gesetzt + werden. Diese Einstellung können Sie bereits in der Dokumentpräambel + vornehmen. Die Optionen können alternativ auch als optionale Argumente von + \DescRef{\ThisCommonLabelBase.cmd.documentclass} angegeben werden. +\fi + + An der gewünschten Stelle +% \IfThisCommonLabelBase{scrextend}{}{im Dokument }% Umbruchoptimierung!!! + schreiben Sie daher:% mit dem Umbruchkorrekturtext oben statt daher nun: +\begin{lstcode} + \cleardoubleevenemptypage + \thispagestyle{empty} + \includegraphics[width=\textwidth,% + height=\textheight,% + keepaspectratio]% + {bild} + \chapter{Kapitelüberschrift} +\end{lstcode} + Die erste Zeile wechselt auf die nächste linke Seite und fügt zu diesem + Zweck bei Bedarf eine komplett leere rechte Seite ein. Die zweite Zeile + sorgt dafür, dass diese linke Seite ebenfalls mit dem Seitenstil + \IfThisCommonLabelBase{scrextend}{\DescRef{maincls.pagestyle.empty}}{% + \DescRef{\LabelBase.pagestyle.empty}} gesetzt wird. Die dritte bis + sechste Zeile lädt die Bilddatei mit dem Namen \File{bild} und bringt sie + auf die gewünschte Größe, ohne sie dabei zu verzerren. Hierfür wird das + Paket \Package{graphicx}\IndexPackage{graphicx} benötigt (siehe + \cite{package:graphics}). Die letzte Zeile beginnt auf der nächsten -- + dann rechten -- Seite ein neues Kapitel. + \end{Example}% +\fi + +Im doppelseitigen Satz führt \Macro{cleardoubleoddpage} immer zur nächsten +ungeraden Seite\IfThisCommonLabelBase{scrlttr2}{ und }{, }% Umbruchoptimierung +\Macro{cleardoubleevenpage} zur nächsten geraden Seite. Eine gegebenenfalls +einzufügende Vakatseite wird mit dem über Option +\DescRef{\LabelBase.option.cleardoublepage} festgelegten Seitenstil +ausgegeben.% +\IfThisCommonLabelBase{scrextend}{\par% + Ein Beispiel für die Verwendung von \Macro{cleardoubleevenemptypage} finden + Sie in \autoref{sec:maincls.emptypage}, + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.cleardoublepage}.% +}{}% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Gleitumgebungen Seitenkopf Kolumnentitel Seitenfuß Bilddatei +% LocalWords: Satzspiegels Bildseite Dokumentpräambel Vakatseiten +% LocalWords: Vakatseite diff --git a/macros/latex/contrib/koma-script/doc/common-interleafpage-en.tex b/macros/latex/contrib/koma-script/doc/common-interleafpage-en.tex new file mode 100644 index 0000000000..c5f05d3123 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-interleafpage-en.tex @@ -0,0 +1,316 @@ +% ====================================================================== +% common-interleafpage-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-interleafpage-en.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs: Interleaf Pages)] +\translator{Markus Kohm\and Gernot Hassenpflug\and Krickette Murabayashi\and + Karl Hagen} + +\section{Interleaf Pages} +\seclabel{emptypage}% +\BeginIndexGroup +\BeginIndex{}{interleaf page}%% +\BeginIndex{}{page>style}% + +\IfThisCommonFirstRun{}{% + The information in \autoref{sec:\ThisCommonFirstLabelBase.emptypage} applies + equally to this chapter. So if you have already read and understood + \autoref{sec:\ThisCommonFirstLabelBase.emptypage}, you can skip ahead to + \autoref{sec:\ThisCommonLabelBase.emptypage.next}, + \autopageref{sec:\ThisCommonLabelBase.emptypage.next}.% +} + +\IfThisCommonLabelBase{scrextend}{}{% + Interleaf pages are pages that are inserted between parts of a document. + Traditionally, these pages are completely blank. \LaTeX{}, however, sets + them by default with the current page style. \KOMAScript{} provides several + extensions to this functionality. + + Interleaf pages are mostly found in books. Because book chapters commonly + start on the right (recto) page of a two-page spread, an empty left (verso) + page must be inserted if the previous chapter ends on a recto page. For this + reason, interleaf pages really only exist for two-sided printing. +% + \iffalse % Umbruchkorrektur + The blank versos in one-sided printing are not true interleaf pages, + although they may appear as such in counting the printed sheets.% + \fi% + + \IfThisCommonLabelBase{scrlttr2}{% + Interleaf pages are unusual in letters. This is not least because + two-sided letters are rare, as letters are usually not + bound. Nevertheless, \KOMAScript{} also supports interleaf pages for + two-sided letters. However, since the commands described here are seldom + used in letters, you will not find any examples here. If necessary, please + refer to the examples in \autoref{sec:maincls.emptypage}, starting on + \autopageref{sec:maincls.emptypage}.% + }{}% +}% + +\begin{Declaration} + \OptionVName{cleardoublepage}{page style} + \OptionValue{cleardoublepage}{current} +\end{Declaration}% +With this option,\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}% + }{}% +} you can define the page style of the interleaf pages created by the commands +\DescRef{\LabelBase.cmd.cleardoublepage}, +\DescRef{\LabelBase.cmd.cleardoubleoddpage}, or +\DescRef{\LabelBase.cmd.cleardoubleevenpage} to advance to the desired page. +You can use any previously defined \PName{page style} (see +\autoref{sec:\ThisCommonLabelBase.pagestyle} from +\autopageref{sec:\ThisCommonLabelBase.pagestyle} and +\autoref{cha:scrlayer-scrpage} from \autopageref{cha:scrlayer-scrpage}). +In addition, \OptionValue{cleardoublepage}{current} is also possible. +This case corresponds to the default prior to \KOMAScript~2.98c and creates an +interleaf page without changing the page style. Starting with +\KOMAScript~3.00\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}% + }{}% +}, the default\textnote{default} follows the recommendation of most +typographers and creates interleaf pages with the +\IfThisCommonLabelBase{scrextend}{% + \DescRef{maincls.pagestyle.empty}}{% + \DescRef{\ThisCommonLabelBase.pagestyle.empty}}\IndexPagestyle{empty} +page style unless you switch compatibility to earlier \KOMAScript{} versions +(see option \DescRef{\ThisCommonLabelBase.option.version}% +\important{\OptionValueRef{\LabelBase}{version}{2.98c}}, +\autoref{sec:\ThisCommonLabelBase.compatibilityOptions}, +\DescPageRef{\ThisCommonLabelBase.option.version}). +\IfThisCommonLabelBase{maincls}{\iftrue}{\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{option.cleardoublepage}% + Suppose you want interleaf pages that are empty except for the pagination% + \iffree{, so they are created with \IfThisCommonLabelBase{scrextend}{% + \DescRef{maincls.pagestyle.plain}}{% + \DescRef{\LabelBase.pagestyle.plain}}}{}. You can achieve this, + for example, with: +\begin{lstcode} + \KOMAoptions{cleardoublepage=plain} +\end{lstcode} + You can find more information about the + \IfThisCommonLabelBase{scrextend}{% + \DescRef{maincls.pagestyle.plain}}{\DescRef{\LabelBase.pagestyle.plain}} + page style in \IfThisCommonLabelBase{scrextend}{% + \autoref{sec:maincls.pagestyle}}{% + \autoref{sec:\LabelBase.pagestyle}}, + \IfThisCommonLabelBase{scrextend}{% + \DescPageRef{maincls.pagestyle.plain}}{% + \DescPageRef{\LabelBase.pagestyle.plain}}. + \end{Example} +\else + \IfThisCommonLabelBase{scrextend}{% + You can find an example for setting the page style of interleaf pages in + \autoref{sec:\ThisCommonFirstLabelBase.emptypage}, + \PageRefxmpl{\ThisCommonFirstLabelBase.option.cleardoublepage}.% + \iffalse% Umbruchvariante ohne Beispiel + }{\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{option.cleardoublepage}% + Suppose you want interleaf pages that are empty except for the pagination, + so they are created with the \IfThisCommonLabelBase{scrextend}{% + \DescRef{maincls.pagestyle.plain}}{\DescRef{\LabelBase.pagestyle.plain}} + page style. You can achieve this with +\begin{lstcode} + \KOMAoptions{cleardoublepage=plain} +\end{lstcode} + You can find more information about the + \DescRef{maincls.pagestyle.plain} page style in + \autoref{sec:maincls.pagestyle}, \DescPageRef{maincls.pagestyle.plain}. + \end{Example}% + \fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{clearpage}% + \Macro{cleardoublepage}% + \Macro{cleardoublepageusingstyle}\Parameter{page style}% + \Macro{cleardoubleemptypage}% + \Macro{cleardoubleplainpage}% + \Macro{cleardoublestandardpage}% + \Macro{cleardoubleoddpage}% + \Macro{cleardoubleoddpageusingstyle}\Parameter{page style}% + \Macro{cleardoubleoddemptypage}% + \Macro{cleardoubleoddplainpage}% + \Macro{cleardoubleoddstandardpage}% + \Macro{cleardoubleevenpage}% + \Macro{cleardoubleevenpageusingstyle}\Parameter{page style}% + \Macro{cleardoubleevenemptypage}% + \Macro{cleardoubleevenplainpage}% + \Macro{cleardoubleevenstandardpage} +\end{Declaration}% +The\textnote{standard classes} {\LaTeX} kernel provides the \Macro{clearpage} +command, which ensures that all pending floats are output and then starts a +new page. There is also the \Macro{cleardoublepage} command, which works like +\Macro{clearpage} but which starts a new right-hand page in two-sided printing +(see the \Option{twoside} layout option in \autoref{sec:typearea.options}, +\DescPageRef{typearea.option.twoside}). An empty left-hand page in the current +page style is output if necessary. + +With\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.00}{\Class{scrlttr2}}% + }{}% +} \Macro{cleardoubleoddstandardpage}, {\KOMAScript}\textnote{\KOMAScript} +works as exactly in the way just described for the standard classess. The +\Macro{cleardoubleoddplainpage}% +\important{\IfThisCommonLabelBase{scrextend}{% + \DescRef{maincls.pagestyle.plain}}{\DescRef{\LabelBase.pagestyle.plain}}} +command, on the other hand, additionally changes the page style of the empty +left page to \IfThisCommonLabelBase{scrextend}{% + \DescRef{maincls.pagestyle.plain}}{\DescRef{\LabelBase.pagestyle.plain}}% +\IndexPagestyle{plain} in order to suppress the +\IfThisCommonLabelBase{scrlttr2}{page header}{running title}. Likewise, the +\Macro{cleardoubleoddemptypage}\important{% + \IfThisCommonLabelBase{scrextend}{\DescRef{maincls.pagestyle.empty}}{% + \DescRef{\LabelBase.pagestyle.empty}}} command uses the +\IfThisCommonLabelBase{scrextend}{\DescRef{maincls.pagestyle.empty}}{% + \DescRef{\LabelBase.pagestyle.empty}}\IndexPagestyle{empty} page style to +suppress both \IfThisCommonLabelBase{scrlttr2}{page header and page footer}% +{running title and page number} on the empty left-hand side. The page is thus +completely empty. If you want to specify your own \PName{page style} for the +interleaf page, this should be given as an argument of +\Macro{cleardoubleoddusingpagestyle}. You can use any previously defined +\PName{page style} (see \autoref{cha:scrlayer-scrpage}). + +\IfThisCommonLabelBase{scrlttr2}{}{% + Sometimes\textnote{odd-side interleaf pages} you want chapters to start not + on the right-hand but on the left-hand page. Although this layout contradicts + classic typography, it can be appropriate if the double-page spread at the + beginning of the chapter very specific contents. For this reason, + \KOMAScript{} provides the \Macro{cleardoubleevenstandardpage} command, + which is equivalent to the \Macro{cleardoubleoddstandardpage} command + except that the next page is a left page. The same applies to the + \Macro{cleardoubleevenplainpage}, \Macro{cleardoubleevenemptypage}, and + \Macro{cleardoubleevenpageusingstyle} commands% + \IfThisCommonLabelBase{maincls}{% Umbruchoptimierungsalternative + , the last of which expects an argument}{}.% +} + +The \Macro{cleardoublestandardpage}, \Macro{cleardoubleemptypage}, and +\Macro{cleardoubleplainpage} commands, and the single-argument +\Macro{cleardoublepageusingstyle} command, as well as the standard +\Macro{cleardoublepage} command, % +\IfThisCommonLabelBase{maincls}{% + depend on the \DescRef{maincls.option.open}\IndexOption{open}% + \important{\DescRef{maincls.option.open}} option explained in + \autoref{sec:maincls.structure}, \DescPageRef{maincls.option.open} and, + depending on that setting, correspond to one of the commands explained in + the preceding paragraphs. }{% + correspond to the commands previously explained for the + \IfThisCommonLabelBase{scrlttr2}{\Class{scrlttr2} class}{% + \IfThisCommonLabelBase{scrextend}{\Package{scrextend} package}{% + \InternalCommonFileUsageError}% + }% + \IfThisCommonLabelBase{scrlttr2}{. % + The remaining commands are defined in \Class{scrlttr2} for completeness + only. You can find more information on them in + \autoref{sec:maincls.emptypage}, \DescPageRef{maincls.cmd.cleardoublepage} + if necessary% + }{% + \ to transition to the next odd page% + }.% +}% +\IfThisCommonLabelBaseOneOf{scrlttr2,scrextend}{\iffalse}{\csname + iftrue\endcsname} + \begin{Example} + \phantomsection\xmpllabel{cmd.cleardoublepage}% + Suppose you want to insert a double-page spread into your document with a + picture on the left-hand page and a new chapter starting on the right-hand + page. If the previous chapter ends with a left-hand page, an interleaf + page has to be added, which should be completely empty. The picture should + be the same size as the text area without any header or footer. +\iffalse% Umbruchkorrekturtext + First of all, +\begin{lstcode} + \KOMAoptions{cleardoublepage=empty} +\end{lstcode} + ensures that interleaf pages use the + \IfThisCommonLabelBase{scrextend}{\DescRef{maincls.pagestyle.empty}}{% + \DescRef{\LabelBase.pagestyle.empty}} page style. You can put this + setting in the document preamble, or you can set it as an optional + argument of \DescRef{\ThisCommonLabelBase.cmd.documentclass}. +\fi + + At the relevant place in your document, write: +\begin{lstcode} + \cleardoubleevenemptypage + \thispagestyle{empty} + \includegraphics[width=\textwidth,% + height=\textheight,% + keepaspectratio]% + {picture} + \chapter{Chapter Heading} +\end{lstcode} + The first of these lines switches to the next left-hand page. If needed it + also adds a completely blank right-hand page. The second line makes sure + that the following left-hand page will also be set using the + \IfThisCommonLabelBase{scrextend}{\DescRef{maincls.pagestyle.empty}}{% + \DescRef{\LabelBase.pagestyle.empty}} page style. The third through + sixth lines load an image file named \File{picture} and scale it to the + desired size without distorting it. This command requires the + \Package{graphicx}\IndexPackage{graphicx} package (see + \cite{package:graphics}). The last line starts + a new chapter on the next page, which will be a right-hand one. + \end{Example}% +\fi% + +In two-sided printing, \Macro{cleardoubleoddpage} always moves to the next +left-hand page and \Macro{cleardoubleevenpage} to the next right-hand +page. The style of the interleaf page to be inserted if necessary is defined +with the \DescRef{\LabelBase.option.cleardoublepage} option.% +\IfThisCommonLabelBase{scrextend}{\par% + For an example that uses \Macro{cleardoubleevenemptypage}, see + \autoref{sec:maincls.emptypage}, + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.cleardoublepage}.% +}{}% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: mutatis mutandis Interleaf interleaf diff --git a/macros/latex/contrib/koma-script/doc/common-lists-de.tex b/macros/latex/contrib/koma-script/doc/common-lists-de.tex new file mode 100644 index 0000000000..0fbb070153 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-lists-de.tex @@ -0,0 +1,893 @@ +% ====================================================================== +% common-lists-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-lists-de.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] + +\section{Listen} +\seclabel{lists}% +\BeginIndexGroup +\BeginIndex{}{Listen}% + +\IfThisCommonFirstRun{}{% + Es gilt sinngemäß, was in \autoref{sec:\ThisCommonFirstLabelBase.lists} + geschrieben wurde. Falls Sie also + \autoref{sec:\ThisCommonFirstLabelBase.lists} bereits gelesen und verstanden + haben, können Sie auf \autopageref{sec:\ThisCommonLabelBase.lists.next} mit + \autoref{sec:\ThisCommonLabelBase.lists.next} fortfahren.% + \IfThisCommonLabelBaseOneOf{scrextend,scrlttr2}{ % + \IfThisCommonLabelBase{scrlttr2}{% + Das Paket \Package{scrletter}\OnlyAt{\Package{scrletter}} definiert + selbst keine Listenumgebungen, sondern überlässt diese der verwendeten + Klasse. Ist dies keine \KOMAScript-Klasse, so lädt es + \hyperref[cha:scrextend]{\Package{scrextend}}\IndexPackage{scrextend}% + \important{\hyperref[cha:scrextend]{\Package{scrextend}}}. % + }{}% + Allerdings werden vom Paket \Package{scrextend} nur die Umgebungen + \DescRef{\ThisCommonLabelBase.env.labeling}, + \DescRef{\ThisCommonLabelBase.env.addmargin} und + \DescRef{\ThisCommonLabelBase.env.addmargin*} definiert. Alle anderen + Listenumgebungen bleiben der Verantwortung % und Kontrolle + der verwendeten Klasse überlassen.% + }{}% +} + +\IfThisCommonLabelBase{scrextend}{}{% + {\LaTeX} und die Standardklassen\textnote{\KOMAScript{} vs. Standardklassen} + bieten verschiedene Umgebungen für Listen. All diese Umgebungen bietet + {\KOMAScript} selbstverständlich auch, teilweise jedoch mit leichten + Abwandlungen oder Erweiterungen. Grundsätzlich gilt, dass Listen -- auch + unterschiedlicher Art -- bis zu einer Tiefe von vier Listen geschachtelt + werden können. Eine tiefere Schachtelung wäre auch aus typografischen + Gründen kaum sinnvoll, da genau genommen schon mehr als drei Ebenen nicht + mehr überblickt werden können. Ich empfehle\textnote{Tipp!} in solchen + Fällen, die eine große Liste in mehrere kleinere Listen aufzuteilen.% +} + +\IfThisCommonFirstRun{}{% + \IfThisCommonLabelBase{scrextend}{}{% Umbruchkorrektur + \iffalse % Umbruchkorrektur + Da Listen zu den Standardelementen von \LaTeX{} gehören, wurde in diesem + Abschnitt auf Beispiele verzichtet. % + \else% + Auf Beispiele wurde in diesem Abschnitt verzichtet. % + \fi% + Sie finden solche in \autoref{sec:\ThisCommonFirstLabelBase.lists} ab + \autopageref{sec:\ThisCommonFirstLabelBase.lists} oder in jeder + \LaTeX-Einführung.% + }% +} + + +\IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname} + \begin{Declaration} + \begin{Environment}{itemize} + \begin{Body} + \Macro{item} \dots + \BodyDots + \end{Body} + \end{Environment} + \Macro{labelitemi} + \Macro{labelitemii} + \Macro{labelitemiii} + \Macro{labelitemiv} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}Die einfachste + Form einer Liste ist die Stichpunkt-\textnote{Stichpunktliste} oder + \Environment{itemize}-Liste. % + \iffalse % Umbruchoptimierungstext + Die Benutzer einer unbeliebten Textverarbeitung nennen diese Form der Liste + auch gerne \emph{Bulletpoints}. Vermutlich können sie sich nicht vorstellen, + dass je nach Ebene auch ein anderes Zeichen als ein fetter Punkt zur + Einleitung eines Stichpunkts verwendet werden kann. % + \fi% + Bei den \KOMAScript-Klassen werden je nach Ebene folgende Aufzählungszeichen + zur Einleitung eines Listenelements verwendet: »{\labelitemi}«, + »{\labelitemii}«, »{\labelitemiii}« und »{\labelitemiv}«. Die Definition der + Zeichen für die einzelnen Ebenen sind in den Makros \Macro{labelitemi}, + \Macro{labelitemii}, \Macro{labelitemiii} und \Macro{labelitemiv} + abgelegt. Sie können diese leicht mit \Macro{renewcommand} umdefinieren. + \BeginIndex{FontElement}{itemizelabel}\LabelFontElement{itemizelabel}% + \BeginIndex{FontElement}{labelitemi}\LabelFontElement{labelitemi}% + \BeginIndex{FontElement}{labelitemii}\LabelFontElement{labelitemii}% + \BeginIndex{FontElement}{labelitemiii}\LabelFontElement{labelitemiii}% + \BeginIndex{FontElement}{labelitemiv}\LabelFontElement{labelitemiv}% + Die Schriftart\Index{Schrift>Art}\ChangedAt{v3.33}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} der Zeichen für die einzelnen + Ebenen kann außerdem bei den \KOMAScript-Klassen mit Hilfe der Anweisungen + \DescRef{\ThisCommonLabelBase.cmd.setkomafont} und + \DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (siehe + \autoref{sec:\ThisCommonLabelBase.textmarkup}, + \DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) für die Elemente + \FontElement{labelitemi}\important{\FontElement{labelitemi}}, + \FontElement{labelitemii}\important{\FontElement{labelitemii}}, + \FontElement{labelitemiii}\important{\FontElement{labelitemiii}} und + \FontElement{labelitemiv}\important{\FontElement{labelitemiv}} geändert + werden. In der Voreinstellung verwenden diese alle die Schrifteinstellung + für Element + \FontElement{itemizelabel}\important{\FontElement{itemizelabel}}. Lediglich + Element \FontElement{labelitemii} verwendet zusätzlich + \Macro{bfseries}. Die Voreinstellung von \FontElement{itemizelabel} selbst + ist \Macro{normalfont}. Die einzelnen Stichpunkte der Umgebung werden mit + \Macro{item} eingeleitet.% + \IfThisCommonFirstRun{\iftrue}{% + \ In \autoref{sec:maincls.lists} auf \PageRefxmpl{maincls.env.itemize} + finden Sie ein Beispiel für die Anwendung.% + \csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{env.itemize}% + Sie haben eine einfache Aufzählung, die in mehreren Ebenen geschachtelt + ist. Sie schreiben beispielsweise: +\begin{lstcode} + \minisec{Die Fahrzeuge im Spiel} + \begin{itemize} + \item Flugzeuge + \begin{itemize} + \item Doppeldecker + \item Jets + \item Transportmaschinen + \begin{itemize} + \item einmotorig + \begin{itemize} + \item{düsengetrieben} + \item{propellergetrieben} + \end{itemize} + \item zweimotorig + \begin{itemize} + \item{düsengetrieben} + \item{propellergetrieben} + \end{itemize} + \end{itemize} + \item Drehflügler + \end{itemize} + \item Motorräder + \item Automobile + \begin{itemize} + \item Rennwagen + \item Personenwagen + \item Lastwagen + \end{itemize} + \item Fahrräder + \end{itemize} + \end{lstcode} + Anschließend erhalten Sie:% + \iffree{}{\vskip 0pt plus \baselineskip}% Umbruchkorrektur + \begin{ShowOutput}[.5\baselineskip] + \minisec{Die Fahrzeuge im Spiel} + \begin{itemize} + \item Flugzeuge + \begin{itemize} + \item Doppeldecker + \item Jets + \item Transportmaschinen + \begin{itemize} + \item einmotorig + \begin{itemize} + \item{düsengetrieben} + \item{propellergetrieben} + \end{itemize} + \item zweimotorig + \begin{itemize} + \item{düsengetrieben} + \item{propellergetrieben} + \end{itemize} + \end{itemize} + \item Drehflügler + \end{itemize} + \item Motorräder + % \begin{itemize} + % \item historisch korrekt + % \item futurisch nicht real + % \end{itemize} + \item Automobile + \begin{itemize} + \item Rennwagen + \item Personenwagen + \item Lastwagen + \end{itemize} + \item Fahrräder + \end{itemize} + \end{ShowOutput} + \end{Example}% + \fi + % + \EndIndexGroup + + + \begin{Declaration} + \begin{Environment}{enumerate}\labelsuffix[enumerate] + \begin{Body} + \Macro{item} \dots + \BodyDots + \end{Body} + \end{Environment} + \Macro{theenumi} + \Macro{theenumii} + \Macro{theenumiii} + \Macro{theenumiv} + \Macro{labelenumi} + \Macro{labelenumii} + \Macro{labelenumiii} + \Macro{labelenumiv} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}Die nummerierte + Liste\textnote{nummerierte Liste} ist ebenfalls sehr häufig zu finden und + bereits vom {\LaTeX}-Kern vorgesehen. Die Nummerierung\Index{Nummerierung} + erfolgt je nach Ebene in unterschiedlicher Art: mit arabischen Zahlen, mit + Kleinbuchstaben, mit kleinen römischen Zahlen und mit Großbuchstaben. Die + Art der Nummerierung wird dabei über die Makros \Macro{theenumi} bis + \Macro{theenumiv} festgelegt. Das Format der Ausgabe wird von den Makros + \Macro{labelenumi} bis \Macro{labelenumiv} bestimmt. Dabei folgt auf den + Wert der zweiten Ebene, der in Kleinbuchstaben ausgegeben wird, eine runde + Klammer, während die Werte aller anderen Ebenen von einem Punkt gefolgt + werden. Die einzelnen Stichpunkte werden wieder mit \Macro{item} + eingeleitet.% + \IfThisCommonFirstRun{\iftrue}{% + \ In \autoref{sec:maincls.lists} auf \PageRefxmpl{maincls.env.enumerate} + finden Sie ein Beispiel für die Anwendung.% + \csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{env.enumerate}% + Verkürzen wir das vorherige Beispiel und verwenden statt der + \DescRef{\ThisCommonLabelBase.env.itemize}- eine + \Environment{enumerate}-Umgebung: + % Übernehmen wir das Beispiel der + % \DescRef{\LabelBase.env.itemize}-Umgebung, + % wobei wir jede \DescRef{\LabelBase.env.itemize}-Umgebung durch eine + % \Environment{enumerate}-Umgebung ersetzen. Das Ergebnis wäre dann: + \begin{ShowOutput}[\baselineskip] + \minisec{Die Fahrzeuge im Spiel} + \begin{enumerate} + \item Flugzeuge + \begin{enumerate} + \item Doppeldecker + % \item Jets + \item Transportmaschinen + \begin{enumerate} + \item einmotorig + \begin{enumerate} + \item{düsengetrieben}\label{xmp:maincls.jets} + \item{propellergetrieben} + \end{enumerate} + \item mehrmotorig + \end{enumerate} + % \item Drehflügler + \end{enumerate} + %\item Motorräder + % \begin{enumerate} + % \item historisch korrekt + % \item futurisch nicht real + % \end{enumerate} + \item Automobile + \begin{enumerate} + \item Rennwagen + \item Personenwagen + % \item Lastwagen + \end{enumerate} + % \item Fahrräder + \end{enumerate} + \end{ShowOutput} + Innerhalb der Aufzählung können ganz normal mit \Macro{label} Marken + gesetzt werden, auf die dann mit \Macro{ref} zugegriffen werden + kann. So wurde oben hinter den düsengetriebenen, einmotorigen + Flugzeugen mit »\Macro{label}\PParameter{bsp:duesen}« ein Label + gesetzt. Der \Macro{ref}-Wert ist dann »\ref*{xmp:maincls.jets}«. + \end{Example}% + \ExampleEndFix + \fi + % + \EndIndexGroup + + + \begin{Declaration} + \begin{Environment}{description}\labelsuffix[description] + \begin{Body} + \Macro{item}\OParameter{Stichwort} \dots + \BodyDots + \end{Body} + \end{Environment} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}Eine weitere + Listenform ist die Stichwortliste\textnote{Stichwortliste}. Sie dient in + erster Linie der Beschreibung einzelner Begriffe. Diese werden als optionale + Parameter bei \Macro{item} angegeben. % + \BeginIndex{FontElement}{descriptionlabel}% + \LabelFontElement{descriptionlabel}% + Die Schriftart\Index{Schrift>Art}\ChangedAt{v2.8p}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}}, die für die Hervorhebung des + Stichworts verwendet wird, kann außerdem bei den \KOMAScript-Klassen mit + Hilfe der Anweisungen \DescRef{\ThisCommonLabelBase.cmd.setkomafont} und + \DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (siehe + \autoref{sec:\ThisCommonLabelBase.textmarkup}, + \DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) für das Element + \FontElement{descriptionlabel}\important{\FontElement{descriptionlabel}} + (siehe \autoref{tab:\ThisCommonLabelBase.fontelements}, + \autopageref{tab:\ThisCommonLabelBase.fontelements}) geändert werden. In der + Voreinstellung wird \Macro{sffamily}""\Macro{bfseries} verwendet.% + \IfThisCommonFirstRun{\iftrue}{% + \ In \autoref{sec:maincls.lists} auf \PageRefxmpl{maincls.env.description} + finden Sie ein Beispiel für die Anwendung.% + \csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{env.description}% + Sie wollen, dass die Stichworte statt serifenlos und fett lediglich + fett, aber in der Standardschriftart ausgegeben werden. Mit +\begin{lstcode} + \setkomafont{descriptionlabel}{\normalfont + \bfseries} +\end{lstcode} + definieren Sie daher die Schrift entsprechend um. + + Ein Beispiel für die Ausgabe einer Stichwortliste ist eine Aufzählung + der Seitenstile. Der Quelltext dazu lautet beispielsweise: +\begin{lstcode} + \begin{description} + \item[empty] ist der Seitenstil, bei dem Kopf- + und Fußzeile vollständig leer bleiben. + \item[plain] ist der Seitenstil, bei dem + keinerlei Kolumnentitel verwendet wird. + \item[headings] ist der Seitenstil für + automatische Kolumnentitel. + \item[myheadings] ist der Seitenstil für + manuelle Kolumnentitel. + \end{description} +\end{lstcode} + Diese ergibt: + \begin{ShowOutput} + \begin{description} + \item[empty] ist der Seitenstil, bei dem Kopf- und + Fußzeile vollständig leer bleiben. + \item[plain] ist der Seitenstil, bei dem keinerlei + Kolumnentitel verwendet wird. + \item[headings] ist der Seitenstil für automatische + Kolumnentitel. + \item[myheadings] ist der Seitenstil für manuelle + Kolumnentitel. + \end{description} + \end{ShowOutput} + \end{Example}% + \fi + % + \EndIndexGroup% +\fi + +\begin{Declaration} + \begin{Environment}{labeling}\OParameter{Trennzeichen} + \Parameter{längstes Schlüsselwort} + \labelsuffix[labeling] + \begin{Body} + \Macro{item}\OParameter{Stichwort} \dots + \BodyDots + \end{Body} + \end{Environment} +\end{Declaration}% +Eine andere Form der % +\IfThisCommonLabelBase{scrextend}{% + in vielen Klassen als + \DescRef{\ThisCommonFirstLabelBase.env.description}-Umgebung vorhandenen % +}{}% +Stichwortliste\textnote{alternative Stichwortliste} ist nur +bei\IfThisCommonLabelBase{scrextend}{}{ den} {\KOMAScript}-Klassen% +\IfThisCommonLabelBase{scrextend}{ und \Package{scrextend} }{% + \IfThisCommonLabelBase{scrlttr2}{ und + \hyperref[cha:scrextend]{\Package{scrextend}} }{}% +}% +vorhanden: die \Environment{labeling}-Umgebung. Im Unterschied +\IfThisCommonLabelBaseOneOf{maincls,scrextend}{zu}{zur zuvor vorgestellten + Umgebung} % +\IfThisCommonLabelBase{scrextend}{% + \DescRef{\ThisCommonFirstLabelBase.env.description}% +}{% + \DescRef{\ThisCommonLabelBase.env.description}% +} kann bei \Environment{labeling} ein Muster angegeben werden, dessen Länge +die Einrücktiefe aller Stichpunkte ergibt. Zwischen Stichpunkt und +Beschreibungstext kann ein optionales \PName{Trennzeichen} festgelegt +werden. % +\BeginIndexGroup +\BeginIndex{FontElement}{labelinglabel}\LabelFontElement{labelinglabel}% +\BeginIndex{FontElement}{labelingseparator}% +\LabelFontElement{labelingseparator}% +Die Schriftart\Index{Schrift>Art}% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.02}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.02}{\Class{scrlttr2}}% + }{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.02}{\Package{scrextend}}% + }{\InternalCommonFileUsageError}% + }% +}% +, die für die Hervorhebung des Schlüsselworts verwendet wird, kann mit Hilfe +\IfThisCommonLabelBase{scrextend}{von}{der Anweisungen} +\DescRef{\ThisCommonLabelBase.cmd.setkomafont} und +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) für das Element +\FontElement{labelinglabel}\IndexFontElement{labelinglabel} (siehe +\autoref{tab:\ThisCommonLabelBase.fontelements}, +\autopageref{tab:\ThisCommonLabelBase.fontelements}) geändert werden. Für die +davon abweichende Schriftart der Trennzeichen ist das Element +\FontElement{labelingseparator}\IndexFontElement{labelingseparator} (siehe +ebenfalls \autoref{tab:\ThisCommonLabelBase.fontelements}, +\autopageref{tab:\ThisCommonLabelBase.fontelements}) zuständig. Beide sind in +der Voreinstellung\textnote{Voreinstellung} leer, es findet also keine +Schriftumschaltung statt.% +\IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{env.labeling}% + \IfThisCommonLabelBase{scrextend}{% + Eine einfache Liste könnte beispielsweise wie folgt definiert werden:% + }{% + Wir schreiben das Beispiel der + \DescRef{\ThisCommonLabelBase.env.description}-Umgebung etwas um:% + }% +\begin{lstcode} + \setkomafont{labelinglabel}{\ttfamily} + \setkomafont{labelingseparator}{\normalfont} + \begin{labeling}[~--]{myheadings} + \item[empty] + Seitenstil für leere Seiten ohne Kopf und Fuß + \item[plain] + Seitenstil für Kapitelanfänge ganz ohne + Kolumnentitel + \item[headings] + Seitenstil für automatische Kolumnentitel + \item[myheadings] + Seitenstil für manuelle Kolumnentitel + \end{labeling} +\end{lstcode} + Als Ergebnis erhalten wir dann: + \begin{ShowOutput} + \setkomafont{labelinglabel}{\ttfamily} + \setkomafont{labelingseparator}{\normalfont} + \begin{labeling}[~--]{myheadings} + \item[empty] + Seitenstil für leere Seiten ohne Kopf und Fuß + \item[plain] + Seitenstil für Kapitelanfänge ganz ohne + Kolumnentitel + \item[headings] + Seitenstil für automatische Kolumnentitel + \item[myheadings] + Seitenstil für manuelle Kolumnentitel + \end{labeling} + \end{ShowOutput} + Wie in diesem Beispiel zu sehen ist, kann eine eventuell geforderte + Schriftumschaltung in bei \KOMAScript{} gewohnter Weise erreicht + werden. Da sich die Schriftumschaltung für das Schlüsselwort aber auch auf + die Trennzeichen auswirkt, kann es eventuell erforderlich sein, die + Schriftumschaltung dafür explizit aufzuheben. + \end{Example} +\fi% +\EndIndexGroup% +\IfThisCommonFirstRun{% + Gedacht war die Umgebung ursprünglich für Strukturen wie »Voraussetzung, + Aussage, Beweis« oder »Gegeben, Gesucht, Lösung«, wie man sie in + Vorlesungsskripten häufiger findet. Inzwischen findet die Umgebung aber ganz + unterschiedliche Anwendungen. So wurde die Umgebung für Beispiele in dieser + Anleitung mit Hilfe der \Environment{labeling}-Umgebung definiert.% +}{% + \ In \autoref{sec:maincls.lists} auf \PageRefxmpl{maincls.env.labeling} + finden Sie ein Beispiel für die Anwendung der Umgebung.% +}% +\EndIndexGroup + + +\IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname} + \begin{Declaration} + \begin{Environment}{verse}\end{Environment} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}Die + \Environment{verse}-Umgebung\textnote{Versform} wird normalerweise nicht als + Listenumgebung wahrgenommen, da hier nicht mit \Macro{item} gearbeitet + wird. Stattdessen wird wie innerhalb der \Environment{flushleft}-Umgebung + mit festen Zeilenumbrüchen gearbeitet. Intern handelt es sich jedoch sowohl + bei den Standardklassen als auch bei {\KOMAScript} durchaus um eine + Listenumgebung. + + Die \Environment{verse}-Umgebung findet hauptsächlich für + Gedichte\Index{Gedichte} Anwendung. Dabei werden die Zeilen links und rechts + eingezogen. Einzelne Verse werden mit einem festen Zeilenumbruch, also mit + \verb|\\|\IndexCmd{\textbackslash} beendet. Strophen werden ganz normal als + Absatz gesetzt, also durch eine Leerzeile getrennt. Häufig findet + stattdessen auch \Macro{medskip}\IndexCmd{medskip} oder + \Macro{bigskip}\IndexCmd{bigskip} Verwendung. Will man verhindern, dass am + Ende eines Verses ein Seitenumbruch\textnote{Seitenumbruch} erfolgt, so + verwendet man ganz normal \verb|\\*|\IndexCmd{\textbackslash*} anstelle von + \verb|\\|.% + \IfThisCommonFirstRun{\iftrue}{% + \par In \autoref{sec:maincls.lists} auf \PageRefxmpl{maincls.env.verse} + finden Sie ein Beispiel für die Anwendung.% + \csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{env.verse}% + Als Beispiel ein kurzes Gedicht von Wilhelm Busch: +\begin{lstcode} + \begin{verse} + Wenn einer, der mit Mühe kaum\\* + Gekrochen ist auf einen Baum,\\* + Schon meint, dass er ein Vogel wär,\\* + So irrt sich der. + \end{verse} +\end{lstcode} + Mit dem Resultat: + \begin{ShowOutput} + \iffree{}{\vskip-.8\baselineskip}% Umbruchkorrektur + \begin{verse} + Wenn einer, der mit Mühe kaum\\* + Gekrochen ist auf einen Baum,\\* + Schon meint, dass er ein Vogel wär,\\* + So irrt sich der. + \end{verse} + \end{ShowOutput} + Bei einem sehr langen Vers wie: +\begin{lstcode} + \begin{verse} + Der Philosoph wie der Hausbesitzer hat + immer Reparaturen.\\* + \bigskip + Wer dir sagt, er hätte noch nie gelogen, + dem traue nicht, mein Sohn. + \end{verse} +\end{lstcode} + bei dem ein Zeilenumbruch innerhalb des Verses erfolgt: + \begin{ShowOutput} + \iffree{}{\vskip-.8\baselineskip}% Umbruchkorrektur + \begin{verse} + Der Philosoph wie der Hausbesitzer hat immer Reparaturen.\\ + \bigskip + Wer dir sagt, er hätte noch nie gelogen, dem traue nicht, mein + Sohn. + \end{verse} + \end{ShowOutput} + kann mit \verb|\\*| allerdings nicht verhindert werden, dass am + Zeilenumbruch auch ein Seitenumbruch erfolgt. Um dies zu erreichen, kann + man zusätzlich \Macro{interlinepenalty}\IndexCmd{interlinepenalty} auf + 10000 setzen: +\begin{lstcode} + \begin{verse}\interlinepenalty 10000 + Der Philosoph wie der Hausbesitzer + hat immer Reparaturen.\\ + \bigskip + Wer dir sagt, er hätte noch nie + gelogen, dem traue nicht, mein Sohn. + \end{verse} +\end{lstcode} + \iftrue% Umbruchkorrekturtext + Hier noch zwei Sprüche, die man immer bedenken sollte, wenn man mit + scheinbar seltsamen Fragen zu {\LaTeX} oder den dazugehörigen Antworten + konfrontiert ist: +\begin{lstcode} + \begin{verse} + Wir mögen's keinem gerne gönnen,\\* + Dass er was kann, was wir nicht können.\\ + \bigskip + Wie klein ist das, was einer ist,\\* + Wenn man's mit seinem Dünkel misst. + \end{verse} +\end{lstcode} + \begin{ShowOutput} + \iffree{}{\vskip-.8\baselineskip}% Umbruchkorrektur + \begin{verse} + Wir mögen's keinem gerne gönnen,\\* + Dass er was kann, was wir nicht können.\\ + \bigskip + Wie klein ist das, was einer ist,\\* + Wenn man's mit seinem Dünkel misst. + \end{verse} + \end{ShowOutput} + \fi % + \iffalse % + In diesen Beispielen wurde übrigens jeweils \Macro{bigskip} verwendet, + um zwei Sprüche voneinander zu trennen.% + \fi % + \end{Example}% + \vskip -1\ht\strutbox plus .75\strutbox% Ende Beispiel + Beschreibung + \fi + % + \EndIndexGroup + + + \iffalse% Umbruchkorrekturvarianten + \begin{Declaration} + \begin{Environment}{quote}\end{Environment} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}Dies ist + intern ebenfalls eine Listenumgebung\textnote{Blockzitat mit + Absatzabstand} und sowohl bei den Standardklassen als auch bei + {\KOMAScript} zu finden. Der Inhalt der Umgebung wird im Blocksatz mit + beidseitigem Einzug gesetzt. Die Umgebung wird häufig verwendet, um + längere Zitate\Index{Zitat} abzusetzen. Dabei werden Absätze innerhalb der + Umgebung durch einen vertikalen Abstand gekennzeichnet.% + \EndIndexGroup + + \begin{Declaration} + \begin{Environment}{quotation}\end{Environment} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}Diese + Umgebung\textnote{Blockzitat mit Absatzeinzug} ist mit + \DescRef{\ThisCommonLabelBase.env.quote} vergleichbar. Während bei + \DescRef{\ThisCommonLabelBase.env.quote} Absätze durch vertikalen Abstand + gekennzeichnet werden, wird bei \Environment{quotation} mit horizontalem + Einzug der ersten Zeile eines Absatzes gearbeitet. Dies gilt auch für den + ersten Absatz einer \Environment{quotation}-Umgebung. Wollen Sie dort den + Einzug verhindern, müssen Sie die + \Macro{noindent}-Anweisung\IndexCmd{noindent} voranstellen.% + \else % + \begin{Declaration} + \begin{Environment}{quote}\end{Environment} + \begin{Environment}{quotation}\end{Environment} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}Diese beiden + Umgebungen\textnote{Blockzitate} sind intern ebenfalls Listenumgebungen + und sowohl bei den Standardklassen als auch bei {\KOMAScript} zu finden. + Beide Umgebungen setzen Blocksatz, der rechts und links eingezogen + ist. Verwendet werden die Umgebungen häufig, um längere + Zitate\Index{Zitat} abzusetzen. Der Unterschied zwischen beiden liegt in + der Art und Weise, wie Absätze abgesetzt werden. Während bei + \Environment{quote} Absätze durch vertikalen Abstand gekennzeichnet + werden, wird bei \Environment{quotation} mit horizontalem Einzug der + ersten Zeile eines Absatzes gearbeitet. Dies gilt auch für den ersten + Absatz einer \Environment{quotation}-Umgebung% Umbruchkorrektur + \IfThisCommonLabelBase{maincls}{% + , außer es wird \Macro{noindent}\IndexCmd{noindent} vorangestellt.% + }{% + \IfThisCommonLabelBase{scrlttr2}{% + . Wollen Sie dort den Einzug verhindern, müssen Sie die + \Macro{noindent}-Anweisung\IndexCmd{noindent} voranstellen.% + }{\InternalCommonFileUsageError}% + }% + \fi % Umbruchkorrekturvarianten + \IfThisCommonFirstRun{\iftrue}{% + \ In \autoref{sec:maincls.lists} auf \PageRefxmpl{maincls.env.quote} + finden Sie ein Beispiel für die Anwendung.% + \csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{env.quote}% + Sie wollen eine kleine Anekdote hervorheben. Also schreiben Sie + unter Verwendung der Umgebung \Environment{quotation}:% +\begin{lstcode} + \documentclass[paper=a5,pagesize]{scrartcl} + \usepackage[ngerman]{babel} + \begin{document} + Ein kleines Beispiel für eine Anekdote, die sich + einst in Schwaben zugetragen haben soll: + \begin{quotation} + Es klingelt an der Tür eines Pfarrhauses in + Stuttgart. Als die Haushälterin öffnet, steht + ein unrasierter Mann in reichlich schäbigem + Mantel vor der Tür und hält seine Strickmütze + in der Hand. + + "`Gute Frau,"' verkündet der Mann in gequältem + Ton, doch bestem Hochdeutsch, + "`ich habe seit drei Tagen nichts mehr + gegessen."' + + Die Frau schüttelt mitleidig den Kopf und + entgegnet im Brustton vollster Überzeugung: + + "`Guda Moh, Sie missat sich halt zwinga!"' + \end{quotation} + \end{document} +\end{lstcode} + Das Ergebnis könnte dann so aussehen: + \begin{ShowOutput} + \iftrue% Umbruchkorrekturtext + Ein kleines Beispiel für eine Anekdote, die sich einst + in Schwaben zugetragen haben soll: + \fi + \begin{quotation} + Es klingelt an der Tür eines Pfarrhauses in + Stuttgart. Als die Haushälterin öffnet, steht ein + unrasierter Mann in reichlich schäbigem + Mantel vor der Tür und hält seine Strickmütze in + der Hand. + + "`Gute Frau,"' verkündet der Mann in gequältem Ton, + doch bestem Hochdeutsch, + \iffalse% Umbruchkorrekturtext + während er verlegen von einem Bein auf das andere wechselt, + \fi + "`ich habe + seit drei Tagen nichts mehr gegessen."' + + Die Frau schüttelt mitleidig den Kopf und entgegnet + im Brustton vollster Überzeugung: + + "`Guda Moh, Sie missat sich halt zwinga!"' + \end{quotation} + \end{ShowOutput}% + \iffree{}{\IfThisCommonLabelBase{maincls}{\clearpage}{}}% Umbruchkorrektur!!!! + Zum Vergleich sei das Ganze anstelle von \Environment{quotation} auch + noch mit einer \DescRef{\LabelBase.env.quote}-Umgebung gezeigt:% + \begin{ShowOutput} + \iftrue% Umbruchkorrekturtext + Ein kleines Beispiel für eine Anekdote, die sich einst + in Schwaben zugetragen haben soll: + \fi + \begin{quote}\setlength{\parskip}{4pt plus 2pt minus 2pt} + Es klingelt an der Tür eines Pfarrhauses in Stuttgart. Als die + Haushälterin öffnet, steht ein unrasierter Mann in reichlich + schäbigem Mantel vor der Tür und hält seine Strickmütze in der Hand. + + "`Gute Frau,"' verkündet der Mann in gequältem Ton, doch bestem + Hochdeutsch, + \iffalse% Umbruchkorrekturtext + während er verlegen von einem Bein auf das andere wechselt, + \fi + "`ich habe seit drei Tagen nichts mehr gegessen."' + + Die Frau schüttelt mitleidig den Kopf und entgegnet im Brustton + vollster Überzeugung: + + "`Guda Moh, Sie missat sich halt zwinga!"' + \end{quote} + \end{ShowOutput} + % + \end{Example}% + \fi + % + \EndIndexGroup +\fi + +\begin{Declaration} + \begin{Environment}{addmargin}\OParameter{linker Einzug}\Parameter{Einzug} + \end{Environment} + \begin{Environment}{addmargin*}\OParameter{innerer Einzug}\Parameter{Einzug} + \end{Environment} +\end{Declaration} +Wie bei % +\IfThisCommonLabelBase{scrextend}{% + den in den Standardklassen und den \KOMAScript-Klassen vorhandenen + Umgebungen \DescRef{\ThisCommonFirstLabelBase.env.quote} und + \DescRef{\ThisCommonFirstLabelBase.env.quotation}% +}{% + \DescRef{\ThisCommonLabelBase.env.quote} und + \DescRef{\ThisCommonLabelBase.env.quotation}% +} % +handelt\textnote{allgemeine Einzugsumgebung} es sich bei +\Environment{addmargin} um eine Umgebung, die den Rand\Index{Rand} +verändert. Im Unterschied zu den beiden erstgenannten Umgebungen kann der +Anwender jedoch bei \Environment{addmargin} wählen, um welchen Wert der Rand +verändert werden soll. Des Weiteren verändert die Umgebung den Absatzeinzug +und den Absatzabstand nicht. Es wird auch kein zusätzlicher vertikaler Abstand +vor und nach der Umgebung eingefügt. + +Ist nur das obligatorische Argument \PName{Einzug} angegeben, so wird der +Inhalt der Umgebung rechts und links um diesen Wert eingezogen. Ist das +optionale Argument \PName{linker Einzug} hingegen angegeben, so wird links +abweichend von \PName{Einzug} der Wert \PName{linker Einzug} zum Rand addiert. + +Die Sternvariante \Environment{addmargin*}\important{\Environment{addmargin*}} +unterscheidet sich nur im doppelseitigen Satz von der Variante ohne Stern, +wobei der Unterschied auch nur dann auf"|tritt, wenn das optionale Argument +\PName{innerer Einzug} verwendet wird. Dabei wird dann der Wert von +\PName{innerer Einzug} zum inneren Randanteil der Seite addiert. Dies ist bei +rechten Seiten der linke Rand der Seite, bei linken Seiten jedoch der rechte +Rand der Seite. \PName{Einzug} gilt dann für den jeweils anderen Rand. + +Bei beiden Varianten der Umgebung sind für alle Parameter auch negative Werte +erlaubt. % Umbruchkorrektur +\IfThisCommonLabelBase{scrextend}{% + Die Umgebung ragt dann entsprechend in den Rand hinein.% +}{% + Damit kann man erreichen, dass die Umgebung in den Rand hineinragt.% +}% +\IfThisCommonFirstRun{\iftrue}{% + \ Im Beispiel in \autoref{sec:maincls.lists} auf + \PageRefxmpl{maincls.env.addmargin} wird dies gezeigt.% + \csname iffalse\endcsname}% + \begin{Example} + \phantomsection\xmpllabel{env.addmargin}% + Angenommen, Sie schreiben eine Anleitung mit kurzen + Quellcode-Beispielen. Um diese sehr stark hervorzuheben, sollen sie mit + horizontalen Linien vom Text abgesetzt und leicht in den äußeren Rand + verschoben werden. Sie definieren sich dafür zunächst eine Umgebung: +\begin{lstcode} + \newenvironment{QuellcodeRahmen}{% + \begin{addmargin*}[1em]{-1em}% + \begin{minipage}{\linewidth}% + \rule{\linewidth}{2pt}% + }{% + \rule[.25\baselineskip]{\linewidth}{2pt}% + \end{minipage}% + \end{addmargin*}% + } +\end{lstcode} + \begin{ShowOutput} + \newenvironment{QuellcodeRahmen}{% + \begin{addmargin*}[1em]{-1em}% + \begin{minipage}{\linewidth}% + \rule{\linewidth}{2pt}% + }{% + \rule[.25\baselineskip]{\linewidth}{2pt}% + \end{minipage}% + \end{addmargin*}% + } + Zur Demonstration sei die Definition der Umgebung in der Umgebung selbst + gesetzt: + \begin{QuellcodeRahmen} +\begin{lstcode} +\newenvironment{\QuellcodeRahmen}{% + \begin{addmargin*}[1em]{-1em}% + \begin{minipage}{\linewidth}% + \rule{\linewidth}{2pt}% +}{% + \rule[.25\baselineskip]{\linewidth}{2pt}% + \end{minipage}% + \end{addmargin*}% +} +\end{lstcode} + \end{QuellcodeRahmen} + Nicht zwingend schön, aber es zeigt den Nutzen. + \end{ShowOutput} + Das optionale Argument der \Environment{addmargin*}-Umgebung sorgt dafür, + dass der innere Rand um den Wert 1\Unit{em} vergrößert wird. Dafür wird + der äußere Rand um den negativen Wert vergrößert, also in Wirklichkeit um + 1\Unit{em} verkleinert. Dies resultiert in einer Verschiebung um + 1\Unit{em} nach außen. Selbstverständlich kann statt \PValue{1em} auch + eine Länge, beispielsweise \PValue{2\Macro{parindent}}, verwendet werden. + \end{Example} +\fi% + +Ob eine Seite eine linke oder eine rechte Seite ist, kann übrigens beim ersten +\LaTeX-Durchlauf nicht zuverlässig festgestellt werden. Siehe dazu die +Erklärungen zu den Anweisungen +\DescRef{\ThisCommonLabelBase.cmd.Ifthispageodd} +(\autoref{sec:\ThisCommonLabelBase.oddOrEven}, +\DescPageRef{\ThisCommonLabelBase.cmd.Ifthispageodd}) und +\iffree{\Macro{ifthispagewasodd}}{% + \DescRef{maincls-experts.cmd.ifthispagewasodd}} +(\autoref{sec:maincls-experts.addInfos}, +\DescPageRef{maincls-experts.cmd.Ifthispageodd}).% +\IfThisCommonLabelBase{scrlttr2}{}{% +\begin{Explain} + Im Zusammenspiel von % Umgebungen wie + Listen mit Absätzen ergeben sich für + Laien häufiger Fragen. Daher widmet sich die weiterführende Erklärung zu + Option \DescRef{maincls-experts.option.parskip} in + \autoref{sec:maincls-experts.addInfos}, + \DescPageRef{maincls-experts.option.parskip} auch diesem + Thema. Ebenfalls im Expertenteil in \autoref{sec:maincls-experts.addInfos}, + \DescPageRef{maincls-experts.env.addmargin*} wird die Problematik von + mehrseitigen \Environment{addmargin*}-Umgebungen behandelt. +\end{Explain}}% +% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-lists-en.tex b/macros/latex/contrib/koma-script/doc/common-lists-en.tex new file mode 100644 index 0000000000..4a2c64b798 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-lists-en.tex @@ -0,0 +1,836 @@ +% ====================================================================== +% common-lists-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-lists-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] +\translator{Gernot Hassenpflug\and Markus Kohm\and Krickette Murabayashi\and + Karl Hagen} + +\section{Lists} +\seclabel{lists}% +\BeginIndexGroup +\BeginIndex{}{lists}% + +\IfThisCommonFirstRun{}{% + The information in \autoref{sec:\ThisCommonFirstLabelBase.lists} applies + equally to this chapter. So if you have already read and understood + \autoref{sec:\ThisCommonFirstLabelBase.lists}, you can skip ahead to + \autoref{sec:\ThisCommonLabelBase.lists.next}, + \autopageref{sec:\ThisCommonLabelBase.lists.next}.% + \IfThisCommonLabelBaseOneOf{scrextend,scrlttr2}{ % + \IfThisCommonLabelBase{scrlttr2}{% + The \Package{scrletter}\OnlyAt{\Package{scrletter}} package does not + define any list environments itself but leaves them to the class + used. If this is not a \KOMAScript{} class, it will load + \hyperref[cha:scrextend]{\Package{scrextend}}\IndexPackage{scrextend}% + \important{\hyperref[cha:scrextend]{\Package{scrextend}}}. % + }{}% + However, the \Package{scrextend} package only defines the + \DescRef{\ThisCommonLabelBase.env.labeling}, + \DescRef{\ThisCommonLabelBase.env.addmargin}, and + \DescRef{\ThisCommonLabelBase.env.addmargin*} environments. All other list + environments are left to the responsibility of the class used.% + }{}% +} + +\IfThisCommonLabelBase{scrextend}{}{% + Both {\LaTeX} and the standard classes\textnote{\KOMAScript{} vs. standard + classes} offer different environments for lists. Naturally, {\KOMAScript} + also offers all these environments, though slightly modified or extended in + some cases. In general, all lists\,---\,even those of different + kinds\,---\,can be nested up to four levels deep. From a typographical view, + anything more would make no sense, as lists of more than three levels cannot + easily be apprehended. In such cases, I recommend\textnote{Hint!} that you + split a large list into several smaller ones.% +} + +\IfThisCommonFirstRun{}{% + Because lists are standard elements of \LaTeX{}, examples have been omitted + in this section. Nevertheless, you can find examples either in + \autoref{sec:\ThisCommonFirstLabelBase.lists}, + \autopageref{sec:\ThisCommonFirstLabelBase.lists} or in any \LaTeX{} + tutorial.% +} + +\IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname} + \begin{Declaration} + \begin{Environment}{itemize} + \begin{Body} + \Macro{item} \dots + \BodyDots + \end{Body} + \end{Environment} + \Macro{labelitemi} + \Macro{labelitemii} + \Macro{labelitemiii} + \Macro{labelitemiv} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}% + The simplest form of a list is the itemized list\textnote{itemized list}, + \Environment{itemize}. % + \iffalse % Umbruckoptimierungstext + The users of a certain disliked word processing package often refer to this + form of a list as \emph{bullet points}. Presumably, they cannot imagine + that, depending on the level, a symbol other than a large dot could be used + to introduce each point. % + \fi% + Depending on the level, \KOMAScript{} classes use the following marks: + ``{\labelitemi}'', ``{\labelitemii}'', ``{\labelitemiii}'', and + ``{\labelitemiv}''. The definition of these symbols is specified in the + macros \Macro{labelitemi}, \Macro{labelitemii}, \Macro{labelitemiii}, and + \Macro{labelitemiv}, all of which you can redefine using + \Macro{renewcommand}. + \BeginIndex{FontElement}{itemizelabel}\LabelFontElement{itemizelabel}% + \BeginIndex{FontElement}{labelitemi}\LabelFontElement{labelitemi}% + \BeginIndex{FontElement}{labelitemii}\LabelFontElement{labelitemii}% + \BeginIndex{FontElement}{labelitemiii}\LabelFontElement{labelitemiii}% + \BeginIndex{FontElement}{labelitemiv}\LabelFontElement{labelitemiv}% + With the \KOMAScript{} classes the + fonts\Index{font>style}\ChangedAt{v3.33}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} used to format the symbols for the + different levels can be changed using + \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and + \DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (see + \autoref{sec:\ThisCommonLabelBase.textmarkup}, + \DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) for the elements + \FontElement{labelitemi}\important{\FontElement{labelitemi}}, + \FontElement{labelitemii}\important{\FontElement{labelitemii}}, + \FontElement{labelitemiii}\important{\FontElement{labelitemiii}} and + \FontElement{labelitemiv}\important{\FontElement{labelitemiv}}. By default + these all use the font setting for element + \FontElement{itemizelabel}\important{\FontElement{itemizelabel}}. Only + element \FontElement{labelitemii} additionally uses \Macro{bfseries}. The + default of \FontElement{itemizelabel} itself is \Macro{normalfont}. Every + item is introduced with \Macro{item}.% + \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{env.itemize}% + You have a simple list which is nested in several levels. You write, + for example: +\begin{lstcode} + \minisec{Vehicles in the game} + \begin{itemize} + \item aeroplanes + \begin{itemize} + \item biplane + \item transport planes + \begin{itemize} + \item single-engine + \begin{itemize} + \item jet propelled + \item propeller driven + \end{itemize} + \item twin-engine + \begin{itemize} + \item jet propelled + \item propeller driven + \end{itemize} + \end{itemize} + \item helicopters + \end{itemize} + \item motorcycles + \item automobiles + \begin{itemize} + \item racing cars + \item passenger cars + \item lorries + \end{itemize} + \item bicycles + \end{itemize} +\end{lstcode} + As output you get: + \begin{ShowOutput}[\baselineskip] + \minisec{Vehicles in the game} + \begin{itemize} + \item aeroplanes + \begin{itemize} + \item biplanes + \item transport planes + \begin{itemize} + \item single-engine + \begin{itemize} + \item jet-propelled + \item propeller-driven + \end{itemize} + \item twin-engine + \begin{itemize} + \item jet propelled + \item propeller driven + \end{itemize} + \end{itemize} + \item helicopters + \end{itemize} + \item motorcycles + % \begin{itemize} + % \item historically accurate + % \item futuristic, not real + % \end{itemize} + \item automobiles + \begin{itemize} + \item racing cars + \item passenger cars + \item lorries + \end{itemize} + \item bicycles + \end{itemize} + \end{ShowOutput} + \end{Example} + \fi + % + \EndIndexGroup + + + \begin{Declaration} + \begin{Environment}{enumerate}\labelsuffix[enumerate] + \begin{Body} + \Macro{item} \dots + \BodyDots + \end{Body} + \end{Environment} + \Macro{theenumi}% + \Macro{theenumii}% + \Macro{theenumiii}% + \Macro{theenumiv}% + \Macro{labelenumi}% + \Macro{labelenumii}% + \Macro{labelenumiii}% + \Macro{labelenumiv} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}The numbered + list\textnote{numbered list} is also very common and already provided by the + {\LaTeX} kernel. The numbering\Index{numbering} differs according to the + level, with Arabic numbers, small letters, small Roman numerals, and capital + letters, respectively. The style of numbering is defined with the macros + \Macro{theenumi} down to \Macro{theenumiv}. The output format is determined + by the macros \Macro{labelenumi} to \Macro{labelenumiv}. While the small + letter of the second level is followed by a right parenthesis, the values of + all other levels are followed by a dot. Every item is introduced with + \Macro{item}.% + \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{env.enumerate}% + Let's shorten the previous example, using an + \DescRef{\ThisCommonLabelBase.env.itemize} environment instead of the + \Environment{enumerate} environment: + \begin{ShowOutput}[\baselineskip] + \minisec{Vehicles in the game} + \begin{enumerate} + \item aeroplanes + \begin{enumerate} + \item biplanes + \item transport planes + \begin{enumerate} + \item single-engine + \begin{enumerate} + \item jet-propelled\label{xmp:maincls.jets} + \item propeller-driven + \end{enumerate} + \item twin-engine + \end{enumerate} + % \item helicopters + \end{enumerate} + \item motorcycles + \begin{enumerate} + \item historically accurate + \item futuristic, not real + \end{enumerate} + %\item automobiles + % \begin{enumerate} + % \item racing cars + % \item private cars + % \item lorries + % \end{enumerate} + %\item bicycles + \end{enumerate} + \end{ShowOutput} + Within the list, you can set labels in the normal way with + \Macro{label} and then reference then with \Macro{ref}. + In the example above, a label was set after the jet-propelled, + single-engine transport planes with + ``\Macro{label}\PParameter{xmp:jets}''. The \Macro{ref} value is then + ``\ref{xmp:maincls.jets}''. + \end{Example} + \fi% + % + \EndIndexGroup + + + \begin{Declaration} + \begin{Environment}{description}\labelsuffix[description] + \begin{Body} + \Macro{item}\OParameter{keyword} \dots + \BodyDots + \end{Body} + \end{Environment} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}Another list + form is the description list\textnote{description list}. It primarily serves + to describe individual items or keywords. The item itself is specified as an + optional parameter in \Macro{item}. % + \BeginIndex{FontElement}{descriptionlabel}% + \LabelFontElement{descriptionlabel}% + The font\Index{font>style}\ChangedAt{v2.8p}{% + \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% + \ used to format the keyword can be changed with the + \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and + \DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see + \autoref{sec:\ThisCommonLabelBase.textmarkup}, + \DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) for the + \FontElement{descriptionlabel}\important{\FontElement{descriptionlabel}} + element (see \autoref{tab:\ThisCommonLabelBase.fontelements}, + \autopageref{tab:\ThisCommonLabelBase.fontelements}). The default is + \Macro{sffamily}\linebreak[1]\Macro{bfseries}.% + \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{env.description}% + You want the keywords to be printed bold and in the normal font instead + of bold and sans serif. Using +\begin{lstcode} + \setkomafont{descriptionlabel}{\normalfont\bfseries} +\end{lstcode} + you redefine the font accordingly. + + An example for a description list is the output of the page styles + listed in \autoref{sec:maincls.pagestyle}. The (abbreviated) source is: +\begin{lstcode} + \begin{description} + \item[empty] is the page style without any header or footer. + \item[plain] is the page style without headings. + \item[headings] is the page style with running headings. + \item[myheadings] is the page style for manual headings. + \end{description} +\end{lstcode} + This gives: + \begin{ShowOutput} + \begin{description} + \item[empty] is the page style without any header or footer. + \item[plain] is the page style without headings. + \item[headings] is the page style with running headings. + \item[myheadings] is the page style for manual headings. + \end{description} + \end{ShowOutput} + \end{Example} + \fi% + % + \EndIndexGroup% +\fi + +\begin{Declaration} + \begin{Environment}{labeling}\OParameter{delimiter} + \Parameter{widest pattern} + \labelsuffix[labeling] + \begin{Body} + \Macro{item}\OParameter{keyword}\dots + \BodyDots + \end{Body} + \end{Environment} +\end{Declaration}% +Another form of description list\textnote{alternative description list} is +only available in the {\KOMAScript} classes% +\IfThisCommonLabelBase{scrextend}{ and \Package{scrextend} }{% + \IfThisCommonLabelBase{scrlttr2}{ and + \hyperref[cha:scrextend]{\Package{scrextend}}}{}% +}% +: the \Environment{labeling} environment. Unlike +\IfThisCommonLabelBase{scrextend}{% + \DescRef{\ThisCommonFirstLabelBase.env.description}% +}{% + the \DescRef{\ThisCommonLabelBase.env.description} described above% +}, you can specify a pattern for \Environment{labeling} whose length +determines the indentation of all items. Furthermore, you can put an optional +\PName{delimiter} between the item and its description. % +\BeginIndexGroup +\BeginIndex{FontElement}{labelinglabel}\LabelFontElement{labelinglabel}% +\BeginIndex{FontElement}{labelingseparator}% +\LabelFontElement{labelingseparator}% +The font\Index{font>style}% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.02}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.02}{\Class{scrlttr2}}% + }{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.02}{\Package{scrextend}}% + }{\InternalCommonFileUsageError}% + }% +} used to format the item and the separator can be changed with the +\DescRef{\ThisCommonLabelBase.cmd.setkomafont} and +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) for the element +\FontElement{labelinglabel} and \FontElement{labelingseparator} (see +\autoref{tab:\ThisCommonLabelBase.fontelements}, +\autopageref{tab:\ThisCommonLabelBase.fontelements}). +\IfThisCommonFirstRun{\iftrue}{\par\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{env.labeling}% + \IfThisCommonLabelBase{scrextend}{% + A small example of a list like this can be written as follows:% + }{% + Slightly changing the example from the + \DescRef{\ThisCommonLabelBase.env.description} environment, we could + write the following:% + }% +\begin{lstcode} + \setkomafont{labelinglabel}{\ttfamily} + \setkomafont{labelingseparator}{\normalfont} + \begin{labeling}[~--]{myheadings} + \item[empty] + Page style without header or footer + \item[plain] + Page style for chapter beginnings without headings + \item[headings] + Page style for running headings + \item[myheadings] + Page style for manual headings + \end{labeling} +\end{lstcode} + The result is this: + \begin{ShowOutput} + \setkomafont{labelinglabel}{\ttfamily} + \setkomafont{labelingseparator}{\normalfont} + \begin{labeling}[~--]{myheadings} + \item[empty] + Page style without header or footer + \item[plain] + Page style for chapter beginnings without headings + \item[headings] + Page style for running headings + \item[myheadings] + Page style for manual headings + \end{labeling} + \end{ShowOutput} + As this example shows, you can set a font-changing command in the usual + way. But if you do not want the font of the separator to be changed in the + same way as the font of the label, you have to set the font of the + separator as well. + \end{Example} +\fi% +\EndIndexGroup +Originally, this environment was implemented for things like ``Premise, +Evidence, Proof'', or ``Given, Find, Solution'' that are often used in +lecture handouts. These days, however, the environment has very different +applications. For example, the environment for examples in this guide was +defined with the \Environment{labeling} environment.% +% +\EndIndexGroup + + +\IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname} + \begin{Declaration} + \begin{Environment}{verse}\end{Environment} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{} The + \Environment{verse} environment\textnote{verse} is not normally perceived + as a list environment because you do not work with \Macro{item} commands. + Instead, fixed line breaks are used within the \Environment{flushleft} + environment. Internally, however, both the standard classes as well as + {\KOMAScript} implement it as a list environment. + + In general, the \Environment{verse} environment is used for + poetry\Index{poetry}. Lines are indented both left and right. Individual + lines of verse are ended by a fixed line break: \verb|\\|. Verses are set as + paragraphs, separated by an empty line. Often also + \Macro{medskip}\IndexCmd{medskip} or \Macro{bigskip}\IndexCmd{bigskip} is + used instead. To avoid a page break at the end of a line of verse you can, + as usual, insert \verb|\\*| instead of \verb|\\|. + \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{env.verse}% + \iffalse + As an example, the first lines of ``Little Red Riding Hood and the + Wolf'' by Roald Dahl: +\begin{lstcode} + \begin{verse} + As soon as Wolf began to feel\\* + that he would like a decent meal,\\* + He went and knocked on Grandma's door.\\* + When Grandma opened it, she saw\\* + The sharp white teeth, the horrid grin,\\* + And Wolfie said, `May I come in?' + \end{verse} +\end{lstcode} + The result is as follows: + \begin{ShowOutput} + \begin{verse} + As soon as Wolf began to feel\\* + That he would like a decent meal,\\* + He went and knocked on Grandma's door.\\* + When Grandma opened it, she saw\\* + The sharp white teeth, the horrid grin,\\* + And Wolfie said, `May I come in?' + \end{verse} + \end{ShowOutput} + \else + As an example, Emma Lazarus's sonnet from the pedestal of Liberty + Enlightening the World\footnote{The lines from Roald Dahl's poem + ``Little Red Riding Hood and the Wolf'', which was used in former + releases, has been replaced, because in these times certain + politicians around the world really seem to need ``The New + Colossus'' as urgent reminder.}: +\begin{lstcode} + \begin{verse} + Not like the brazen giant of Greek fame\\* + With conquering limbs astride from land to land\\* + Here at our sea-washed, sunset gates shall stand\\* + A mighty woman with a torch, whose flame\\* + Is the imprisoned lightning, and her name\\* + Mother of Exiles. From her beacon-hand\\* + Glows world-wide welcome; her mild eyes command\\* + The air-bridged harbor that twin cities frame.\\* + ``Keep, ancient lands, your storied pomp!'' cries she\\* + With silent lips. ``Give me your tired, your poor,\\* + Your huddled masses yearning to breathe free,\\* + The wretched refuse of your teeming shore.\\* + Send these, the homeless, tempest-tossed to me:\\* + I lift my lamp beside the golden door.'' + \end{verse} +\end{lstcode} + The result is as follows: + \begin{ShowOutput} + \begin{verse} + Not like the brazen giant of Greek fame\\* + With conquering limbs astride from land to land\\* + Here at our sea-washed, sunset gates shall stand\\* + A mighty woman with a torch, whose flame\\* + Is the imprisoned lightning, and her name\\* + Mother of Exiles. From her beacon-hand\\* + Glows world-wide welcome; her mild eyes command\\* + The air-bridged harbor that twin cities frame.\\* + ``Keep, ancient lands, your storied pomp!'' cries she\\* + With silent lips. ``Give me your tired, your poor,\\* + Your huddled masses yearning to breathe free,\\* + The wretched refuse of your teeming shore.\\* + Send these, the homeless, tempest-tossed to me:\\* + I lift my lamp beside the golden door.'' + \end{verse} + \end{ShowOutput} + \fi + However, if you have very long lines of verse where a line + break occurs within a line of verse: +\begin{lstcode} + \begin{verse} + Both the philosopher and the house-owner + always have something to repair.\\* + \bigskip + Don't trust a man, my son, who tells you + that he has never lied. + \end{verse} +\end{lstcode} + \begin{ShowOutput} + \begin{verse} + Both the philosopher and the house-owner always have something to + repair.\\ + \bigskip Don't trust a man, my son, who tells you that he has never + lied. + \end{verse} + \end{ShowOutput} + in this case \verb|\\*| can not prevent a page break occurring within a + verse at such a line break. To prevent such a page break, a change of + \Macro{interlinepenalty}\IndexCmd{interlinepenalty} would have to be + inserted at the beginning of the environment: +\begin{lstcode} + \begin{verse}\interlinepenalty 10000 + Both the philosopher and the house-owner + always have something to repair.\\ + \bigskip + Don't trust a man, my son, who tells you + that he has never lied. + \end{verse} +\end{lstcode} + \iftrue% Umbruchkorrekturtext + Here are two sayings that should always be considered when confronted + with seemingly strange questions about {\LaTeX} or its accompanying + explanations: +\begin{lstcode} + \begin{verse} + A little learning is a dangerous thing.\\* + Drink deep, or taste not the Pierian Spring;\\ + \bigskip + Our judgments, like our watches, none\\* + go just alike, yet each believes his own. + \end{verse} +\end{lstcode} + \begin{ShowOutput} + \iffree{}{\vskip-.8\baselineskip}% Umbruchkorrektur + \begin{verse} + A little learning is a dangerous thing.\\* + Drink deep, or taste not the Pierian Spring;\\ + \bigskip + Our judgments, like our watches, none\\* + go just alike, yet each believes his own. + \end{verse} + \end{ShowOutput} + \fi + Incidentally, \Macro{bigskip} was used in these examples to separate two + sayings. + \end{Example} + \fi + % + \EndIndexGroup + + \iffalse% Umbruchkorrekturvarianten + \begin{Declaration} + \begin{Environment}{quote}\end{Environment} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}This is + internally also a list environment\textnote{block quote with paragraph + spacing} and can be found both in the standard classes and in + {\KOMAScript}. The content of the environment is set fully justified. + The environment is often used to format longer quotes\Index{quotes}. + Paragraphs within the environment are distinguished with vertical space.% + \EndIndexGroup + + \begin{Declaration} + \begin{Environment}{quotation}\end{Environment} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}This + environment\textnote{block quote with paragraph indent} is comparable to + \DescRef{\ThisCommonLabelBase.env.quote}. While + \DescRef{\ThisCommonLabelBase.env.quote} paragraphs are indicated by + vertical spacing, \Environment{quotation} indents the first line of each + paragraph horizontally. This also applies to the first paragraph of a + \Environment{quotation} environment. If you want to prevent the + indentation there, you must precede it with the + \Macro{noindent}\IndexCmd{noindent} command.% + \else + \begin{Declaration} + \begin{Environment}{quote}\end{Environment} + \begin{Environment}{quotation}\end{Environment} + \end{Declaration}% + \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{} These two + environments\textnote{block quotes} are also set internally as list + environments and can be found in both the standard and the {\KOMAScript} + classes. Both environments use justified text which is indented on both + the left and the right side. Often they are used to separate longer + quotations\Index{quotations} from the main text. The difference between + the two lies in in the manner in which paragraphs are typeset. While + \Environment{quote} paragraphs are distinguished by vertical space, in + \Environment{quotation} paragraphs, the first line is indented. This also + applies to the first line of a \Environment{quotation} + environment% Umbruchkorrektur + \IfThisCommonLabelBase{maincls}{% + , unless it is preceded by \Macro{noindent}\IndexCmd{noindent}.% + }{% + \IfThisCommonLabelBase{scrlttr2}{% + . If you want to prevent the indentation there, you must precede it + with the \Macro{noindent} command\IndexCmd{noindent}.% + }{\InternalCommonFileUsageError}% + }% + \fi % Umbruchkorrekturvarianten + \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{env.quote}% + You want to highlight a short anecdote. You write the following + \Environment{quotation} environment for this:% +\begin{lstcode} + A small example for a short anecdote: + \begin{quotation} + The old year was turning brown; the West Wind was + calling; + + Tom caught the beechen leaf in the forest falling. + ``I've caught the happy day blown me by the breezes! + Why wait till morrow-year? I'll take it when me pleases. + This I'll mend my boat and journey as it chances + west down the withy-stream, following my fancies!'' + + Little Bird sat on twig. ``Whillo, Tom! I heed you. + I've a guess, I've a guess where your fancies lead you. + Shall I go, shall I go, bring him word to meet you?'' + \end{quotation} +\end{lstcode} + The result is: + \begin{ShowOutput} + A small example for a short anecdote: + \begin{quotation} + The old year was turning brown; the West Wind was + calling; + + Tom caught the beechen leaf in the forest falling. + ``I've caught the happy day blown me by the breezes! + Why wait till morrow-year? I'll take it when me pleases. + This I'll mend my boat and journey as it chances + west down the withy-stream, following my fancies!'' + + Little Bird sat on twig. ``Whillo, Tom! I heed you. + I've a guess, I've a guess where your fancies lead you. + Shall I go, shall I go, bring him word to meet you?'' + \end{quotation} + \end{ShowOutput} + % + Using a \Environment{quote} environment instead you get: + % + \begin{ShowOutput} + A small example for a short anecdote: + \begin{quote}\setlength{\parskip}{4pt plus 2pt minus 2pt} + The old year was turning brown; the West Wind was + calling; + + Tom caught the beechen leaf in the forest falling. + ``I've caught the happy day blown me by the breezes! + Why wait till morrow-year? I'll take it when me pleases. + This I'll mend my boat and journey as it chances + west down the withy-stream, following my fancies!'' + + Little Bird sat on twig. ``Whillo, Tom! I heed you. + I've a guess, I've a guess where your fancies lead you. + Shall I go, shall I go, bring him word to meet you?'' + \end{quote} + \end{ShowOutput} + % + \end{Example} + \fi + % + \EndIndexGroup +\fi + +\begin{Declaration} + \begin{Environment}{addmargin} + \OParameter{left indentation}\Parameter{indentation} + \end{Environment} + \begin{Environment}{addmargin*} + \OParameter{inner indentation}\Parameter{indentation} + \end{Environment} +\end{Declaration} +Like \IfThisCommonLabelBase{scrextend}{% + \DescRef{\ThisCommonFirstLabelBase.env.quote} and + \DescRef{\ThisCommonFirstLabelBase.env.quotation}, which are available in + the standard and the \KOMAScript{} classes}{% + \DescRef{\ThisCommonLabelBase.env.quote} and + \DescRef{\ThisCommonLabelBase.env.quotation}% +}, the \Environment{addmargin} environment changes the margin\Index{margin}. +However, unlike the first two environments, \Environment{addmargin} lets the +user change the width of the indentation. Apart from this change, this +environment does not change the indentation of the first line nor the vertical +spacing between paragraphs. + +If only the obligatory argument \PName{indentation} is given, both the left +and right margin are expanded by this value. If the optional argument +\PName{left indentation} is given as well, then the value \PName{left + indentation} is used for the left margin instead of \PName{indentation}. + +The starred variant \Environment{addmargin*}% +\important{\Environment{addmargin*}} differs from the normal version only in +the two-sided mode. Furthermore, the difference only occurs if the optional +argument \PName{inner indentation} is used. In this case, the value of +\PName{inner indentation} is added to the normal inner indentation. For +right-hand pages this is the left margin; for left-hand pages, the right +margin. Then the value of \PName{indentation} determines the width of the +opposite margin. + +Both versions of this environment allow negative values for all parameters. +\IfThisCommonLabelBase{scrextend}{% + The environment then protrudes into the margin accordingly.% +}{% + This can be done so that the environment protrudes into the margin.% +}% +\IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{env.addmargin}% +\begin{lstcode} + \newenvironment{SourceCodeFrame}{% + \begin{addmargin*}[1em]{-1em}% + \begin{minipage}{\linewidth}% + \rule{\linewidth}{2pt}% + }{% + \rule[.25\baselineskip]{\linewidth}{2pt}% + \end{minipage}% + \end{addmargin*}% + } +\end{lstcode} + If you now put your source code in such an environment, it will show + up as: + \begin{ShowOutput} + \newenvironment{SourceCodeFrame}{% + \begin{addmargin*}[1em]{-1em}% + \begin{minipage}{\linewidth}% + \rule{\linewidth}{2pt}% + }{% + \rule[.25\baselineskip]{\linewidth}{2pt}% + \end{minipage}% + \end{addmargin*}% + } + You define the following environment: + \begin{SourceCodeFrame} +\begin{lstcode} +\newenvironment{\SourceCodeFrame}{% + \begin{addmargin*}[1em]{-1em}% + \begin{minipage}{\linewidth}% + \rule{\linewidth}{2pt}% +}{% + \rule[.25\baselineskip]{\linewidth}{2pt}% + \end{minipage}% + \end{addmargin*}% +} +\end{lstcode} + \end{SourceCodeFrame} + This may be feasible or not. In any case, it shows the usage of this + environment. + \end{ShowOutput} + The optional argument of the \Environment{addmargin*} environment + makes sure that the inner margin is extended by 1\Unit{em}. In turn + the outer margin is decreased by 1\Unit{em}. The result is a shift + by 1\Unit{em} to the outside. Instead of \PValue{1em}, you can of + course use a length, for example, \PValue{2\Macro{parindent}}. + \end{Example} +\fi% + +Whether a page is going to be on the left or right side of the book cannot be +determined reliably on the first {\LaTeX} run. For details please refer to +the explanation of the commands +\DescRef{\ThisCommonLabelBase.cmd.Ifthispageodd} +(\autoref{sec:\ThisCommonLabelBase.oddOrEven}, +\DescPageRef{\ThisCommonLabelBase.cmd.Ifthispageodd}) and +\iffree{\Macro{ifthispagewasodd}}{% + \DescRef{maincls-experts.cmd.ifthispagewasodd}} +(\autoref{sec:maincls-experts.addInfos}\iffree{}{, +\DescPageRef{maincls-experts.cmd.Ifthispageodd}}). +\IfThisCommonLabelBase{scrlttr2}{}{% +\begin{Explain} + The interplay of environments such as lists and paragraphs gives rise to + frequent questions. Therefore, you can find further explanation in the + description of the \Option{parskip} option in + \autoref{sec:maincls-experts.addInfos}\iffree{}{, + \DescPageRef{maincls-experts.option.parskip}. Also in the expert section, in + \autoref{sec:maincls-experts.addInfos}, + \DescPageRef{maincls-experts.env.addmargin*}, you can find additional + information about page breaks inside \Environment{addmargin*}}.% +\end{Explain}}% +% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-marginpar-de.tex b/macros/latex/contrib/koma-script/doc/common-marginpar-de.tex new file mode 100644 index 0000000000..c2e5c3e188 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-marginpar-de.tex @@ -0,0 +1,129 @@ +% ====================================================================== +% common-marginpar-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-marginpar-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] + +\section{Randnotizen} +\seclabel{marginNotes}% +\BeginIndexGroup +\BeginIndex{}{Randnotizen}% + +\IfThisCommonFirstRun{}{% + Es gilt sinngemäß, was in + \autoref{sec:\ThisCommonFirstLabelBase.marginNotes} geschrieben wurde. Falls + Sie also \autoref{sec:\ThisCommonFirstLabelBase.marginNotes} bereits gelesen + und verstanden haben, können Sie auf + \autopageref{sec:\ThisCommonLabelBase.marginNotes.next} mit + \autoref{sec:\ThisCommonLabelBase.marginNotes.next} fortfahren.% +} + +\IfThisCommonLabelBase{scrextend}{}{% + Außer dem eigentlichen Textbereich, der normalerweise den Satzspiegel + ausfüllt, existiert in Dokumenten noch die sogenannte Marginalienspalte. In + dieser können Randnotizen gesetzt werden. % + \IfThisCommonLabelBase{scrlttr2}{% + Bei Briefen sind Randnotizen allerdings eher unüblich und sollten äußerst + sparsam eingesetzt werden.% + }{% + In diesem \iffree{Dokument}{Buch} wird davon ebenfalls Gebrauch gemacht.% + }% +}% + + +\begin{Declaration} + \Macro{marginpar}\OParameter{Randnotiz links}\Parameter{Randnotiz} + \Macro{marginline}\Parameter{Randnotiz} +\end{Declaration}% +Für Randnotizen\Index[indexmain]{Randnotizen} ist bei {\LaTeX} normalerweise +Anweisung \Macro{marginpar} vorgesehen. Die \PName{Randnotiz} wird dabei im +äußeren Rand gesetzt. Bei einseitigen Dokumenten wird der rechte Rand +verwendet. Zwar kann bei \Macro{marginpar} optional eine abweichende Randnotiz +angegeben werden, falls die Randnotiz im linken Rand landet, jedoch werden +Randnotizen immer im Blocksatz ausgegeben. Die Erfahrung zeigt, dass bei +Randnotizen statt des Blocksatzes oft je nach Rand linksbündiger oder +rechtsbündiger Flattersatz zu bevorzugen ist. {\KOMAScript} bietet hierfür +die Anweisung \Macro{marginline}. + +\IfThisCommonFirstRun{% + \iftrue% +}{% + Ein ausführliches Beispiel hierzu finden Sie in + \autoref{sec:\ThisCommonFirstLabelBase.marginNotes}, + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.marginline}.% + \csname iffalse\endcsname% +}% + \begin{Example} + \phantomsection\xmpllabel{cmd.marginline}% + In diesem \iffree{Dokument}{Buch} ist an einigen Stellen die + Klassenangabe \Class{scrartcl} + im Rand zu finden. Diese kann mit: +\begin{lstcode} + \marginline{\texttt{scrartcl}} +\end{lstcode} + erreicht werden.% + \iffalse % Umbruchkorrekturtext + \footnote{Tatsächlich wurde nicht \Macro{texttt}, + sondern eine semantische Auszeichnung verwendet. Um nicht unnötig + zu verwirren, wurde diese im Beispiel ersetzt.}% + \fi + + Statt der Anweisung \Macro{marginline} wäre auch die Verwendung von + \Macro{marginpar} möglich gewesen. Tatsächlich wird bei obiger Verwendung + von \Macro{marginline} intern nichts anders gemacht als: +\begin{lstcode} + \marginpar[\raggedleft\texttt{scrartcl}] + {\raggedright\texttt{scrartcl}} +\end{lstcode} + Damit ist \Macro{marginline} also nur eine abkürzende Schreibweise.% + \end{Example}% +\fi + +Für\textnote{Achtung!} Experten sind in +\autoref{sec:maincls-experts.addInfos}, +\DescPageRef{maincls-experts.cmd.marginpar} Probleme bei der Verwendung von +\Macro{marginpar} dokumentiert. Diese gelten ebenso für \Macro{marginline}. +Darüber hinaus wird in \autoref{cha:scrlayer-notecolumn} ein Paket +vorgestellt, mit dem sich auch Notizspalten mit eigenem Seitenumbruch +realisieren lassen.% +\iffalse% Umbruchkorrektur + \ Allerdings ist das Paket + \hyperref[cha:scrlayer-notecolumn]{\Package{scrlayer-notecolumn}}% + \IndexPackage{scrlayer-notecolumn} eher als + eine Konzeptstudie und weniger als fertiges Paket zu verstehen.% +\fi% +% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-marginpar-en.tex b/macros/latex/contrib/koma-script/doc/common-marginpar-en.tex new file mode 100644 index 0000000000..6224e4916c --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-marginpar-en.tex @@ -0,0 +1,122 @@ +% ====================================================================== +% common-marginpar-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-marginpar-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] +\translator{Gernot Hassenpflug\and Markus Kohm\and Karl Hagen} + +\section{Marginal Notes} +\seclabel{marginNotes}% +\BeginIndexGroup +\BeginIndex{}{marginal notes}% + +\IfThisCommonFirstRun{}{% + The information in \autoref{sec:\ThisCommonFirstLabelBase.marginNotes} + applies equally to this chapter. So if you have already read and understood + \autoref{sec:\ThisCommonFirstLabelBase.marginNotes}, you can skip ahead to + \autoref{sec:\ThisCommonLabelBase.marginNotes.next}, + \autopageref{sec:\ThisCommonLabelBase.marginNotes.next}.% +} + +In addition to the text area, which normally fills the type area, documents +often contain a column for marginalia. You can set marginal notes in this +area. +\IfThisCommonLabelBase{scrlttr2}{% + In letters, however, marginal notes are unusual and should be used + sparingly.% +}{% + This \iffree{guide}{book} makes frequent use of them.% +}% + + +\begin{Declaration} + \Macro{marginpar}\OParameter{margin note left}\Parameter{margin note}% + \Macro{marginline}\Parameter{margin note} +\end{Declaration}% +Marginal notes\Index[indexmain]{marginal notes} in {\LaTeX} are usually +inserted with the \Macro{marginpar} command. They are placed in the outer +margin. One-sided documents use the right border. Although you can specify a +different marginal note for \Macro{marginpar} in case it winds up in the left +margin, marginal notes are always fully justified. However, experience has +shown that many users prefer left- or right-justified marginal notes +instead. For this purpose, {\KOMAScript} offers the \Macro{marginline} +command. + +\IfThisCommonFirstRun{% + \iftrue% +}{% + For a detailed example, see + \autoref{sec:\ThisCommonFirstLabelBase.marginNotes} at + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.marginline}.% + \csname iffalse\endcsname% +}% + \begin{Example} + \phantomsection\xmpllabel{cmd.marginline}% + In some parts of this \iffree{guide}{book}, the class name + \Class{scrartcl} can be found in the margin. You can produce this with:% + \iffalse% Umbruchkorrekturtext + \footnote{Actually, instead of \Macro{texttt}, a semantic markup + was used. To avoid confusion, this has been replaced in the example.}% + \fi +\begin{lstcode} + \marginline{\texttt{scrartcl}} +\end{lstcode} + + Instead of \Macro{marginline} you could have used \Macro{marginpar}. In fact + the first command is implemented internally as: +\begin{lstcode} + \marginpar[\raggedleft\texttt{scrartcl}] + {\raggedright\texttt{scrartcl}} +\end{lstcode} + Thus \Macro{marginline} is really just a shorthand notation for the + code above.% +\end{Example}% +\fi + +Advanced users\textnote{Attention!} will find notes about difficulties that +can arise using \Macro{marginpar} in \autoref{sec:maincls-experts.addInfos}% +\iffree{}{, on \DescPageRef{maincls-experts.cmd.marginpar}}. These remarks +also apply to \Macro{marginline}. In addition, +\autoref{cha:scrlayer-notecolumn} introduces a package that you can use to +create note columns with their own page breaks.% +\iffalse% Umbruchkorrektur + \ However, the + \hyperref[cha:scrlayer-notecolumn]{\Package{scrlayer-notecolumn}}% + \IndexPackage{scrlayer-notecolumn} package is more a proof of concept than a + finished package.% +\fi% +% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-oddorevenpage-de.tex b/macros/latex/contrib/koma-script/doc/common-oddorevenpage-de.tex new file mode 100644 index 0000000000..d86748a9e5 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-oddorevenpage-de.tex @@ -0,0 +1,137 @@ +% ====================================================================== +% common-oddorevenpage-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-oddorevenpage-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] + +\section{Erkennung von rechten und linken Seiten} +\seclabel{oddOrEven}% +\BeginIndexGroup +\BeginIndex{}{Seiten>gerade}% +\BeginIndex{}{Seiten>ungerade}% + +\IfThisCommonFirstRun{}{% + Es gilt sinngemäß, was in + \autoref{sec:\ThisCommonFirstLabelBase.oddOrEven} geschrieben + wurde. Falls Sie also \autoref{sec:\ThisCommonFirstLabelBase.oddOrEven} + bereits gelesen und verstanden haben, können Sie in + \autoref{sec:\ThisCommonLabelBase.oddOrEven.next} auf + \autopageref{sec:\ThisCommonLabelBase.oddOrEven.next} fortfahren.% +} + +\IfThisCommonLabelBase{scrextend}{}{% Umbruchkorrektur + Bei doppelseitigen Dokumenten wird zwischen linken und rechten Seiten + unterschieden. Dabei hat eine linke Seite immer eine gerade Nummer und eine + rechte Seite immer eine ungerade Nummer. % + \IfThisCommonLabelBase{maincls}{% + Die Erkennung von rechten und linken Seiten ist damit gleichbedeutend mit + der Erkennung von Seiten mit ungerader oder gerader Nummer. In + \iffree{dieser Anleitung}{diesem Buch} ist vereinfachend auch von + ungeraden und geraden Seiten die Rede.% + + % Umbruchkorrekturtext + \iftrue% + Bei einseitigen Dokumenten existiert die Unterscheidung zwischen linken + und rechten Seiten nicht. Dennoch gibt es natürlich auch bei einseitigen + Dokumenten sowohl Seiten mit gerader als auch Seiten mit ungerader + Nummer.% + \fi% + }{% + \IfThisCommonLabelBase{scrlttr2}{% + In der Regel werden Briefe einseitig gesetzt. Sollen Briefe mit + einseitigem Layout jedoch auf Vorder- und Rückseite gedruckt oder + ausnahmsweise tatsächlich doppelseitige Briefe erstellt werden, kann + unter Umständen das Wissen, ob man sich auf einer Vorder- oder einer + Rückseite befindet, nützlich sein.% + }{}% + }% +} + +\begin{Declaration} + \Macro{Ifthispageodd}\Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration}% +Will\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.28}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.28}{\Class{scrlttr2}}% + }{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.28}{\Package{scrextend}}% + }{}% + }% +} % +man bei \KOMAScript{} feststellen, ob ein Text auf einer geraden oder einer +ungeraden Seite ausgegeben wird, so verwendet man die Anweisung +\Macro{Ifthispageodd}. Dabei wird das Argument \PName{Dann-Teil} nur dann +ausgeführt, wenn man sich aktuell auf einer ungeraden Seite +befindet. Anderenfalls kommt das Argument \PName{Sonst-Teil} zur Anwendung. +% +\IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname}% +\begin{Example} + Angenommen, Sie wollen einfach nur ausgeben, ob ein Text auf einer geraden + oder ungeraden Seite ausgegeben wird. Sie könnten dann beispielsweise mit + der Eingabe{\phantomsection\xmpllabel{Ifthispageodd}} +\begin{lstcode} + Dies ist eine Seite mit + \Ifthispageodd{un}{}gerader Seitenzahl. +\end{lstcode} + \iffree{}{mit leerem \PName{Sonst-Teil} }% Umbruchkorrekturtext!!! + die Ausgabe + \begin{quote} + Dies ist eine Seite mit \Ifthispageodd{un}{}gerader Seitenzahl. + \end{quote} + erhalten.\iffree{ Beachten Sie, dass in diesem Beispiel das Argument + \PName{Sonst-Teil} leer geblieben ist.}{}% Umbruchkorrekturtext!!! +\end{Example} +\fi + +Da die Anweisung \Macro{Ifthispageodd} mit einem Mechanismus arbeitet, der +einem Label und einer Referenz darauf sehr ähnlich ist, werden nach jeder +Textänderung mindestens zwei \LaTeX-Durchläufe benötigt. Erst dann ist die +Entscheidung korrekt. Im ersten Durchlauf wird für die +Entscheidung eine Heuristik verwendet. + +Näheres zur Problematik der Erkennung von linken und rechten Seiten oder +geraden und ungeraden Seitennummern ist für Experten in +\autoref{sec:maincls-experts.addInfos}, +\DescPageRef{maincls-experts.cmd.Ifthispageodd} zu finden.% +\IfThisCommonLabelBase{scrextend}{% + \ Ein Beispiel zur Verwendung von \Macro{Ifthispageodd} ist in + \autoref{sec:maincls.oddOrEven} auf \PageRefxmpl{maincls.Ifthispageodd} + angegeben.}{}% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-oddorevenpage-en.tex b/macros/latex/contrib/koma-script/doc/common-oddorevenpage-en.tex new file mode 100644 index 0000000000..61908ce3a1 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-oddorevenpage-en.tex @@ -0,0 +1,129 @@ +% ====================================================================== +% common-oddorevenpage-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-oddorevenpage-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraph: Detection of Odd and + Even Pages)] +\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} + +\section{Detecting Odd and Even Pages} +\seclabel{oddOrEven}% +\BeginIndexGroup% +\BeginIndex{}{page>odd}% +\BeginIndex{}{page>even}% + +\IfThisCommonFirstRun{}{% + The information in \autoref{sec:maincls.oddOrEven} applies equally to this + chapter. So if you have already read and understood + \autoref{sec:\ThisCommonFirstLabelBase.oddOrEven}, you can skip ahead to + \autopageref{sec:\ThisCommonLabelBase.oddOrEven.next}, + \autopageref{sec:\ThisCommonLabelBase.oddOrEven.next}.% +} + +In two-sided documents we distinguish left and right pages. Left pages always +have an even page number, and right pages always have an odd page number. % +\IfThisCommonLabelBase{maincls}{% + Identifying right and left pages is equivalent to identifying even- or + odd-numbered pages, and so we normally refer to them as even and odd pages + in this \iffree{guide}{book}. + + % Umbruchkorrekturtext + \iftrue% + In one-sided documents, the distinction between left and right pages does + not exist. Nevertheless, there are still pages with even and odd page + numbers.% + \fi% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + As a rule, letters will be set one-sided. However, if you need to print + letters using both sides of the paper or, in exceptional cases, are + generating real two-sided letters, it may be useful to know whether you + are currently on an even or odd page.% + }{}% +} + + +\begin{Declaration} + \Macro{Ifthispageodd}\Parameter{true part}\Parameter{false part} +\end{Declaration}% +If\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.28}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.28}{\Class{scrlttr2}}% + }{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.28}{\Package{scrextend}}% + }{}% + }% +} % +you want to determine whether text appears on an even or odd page, +\KOMAScript{} provides the \Macro{Ifthispageodd} command. The \PName{true + part} argument is executed only if you are currently on an odd page. +Otherwise the \PName{false part} argument is executed. +% +\IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname}% +\begin{Example} + Suppose you simply want to show whether a text will be placed onto an + even or odd page. You may achieve that + using{\phantomsection\xmpllabel{Ifthispageodd}} +\begin{lstcode} + This page has an \Ifthispageodd{odd}{even} + page number. +\end{lstcode} + This results in the output + \begin{quote} + This page has an \Ifthispageodd{odd}{even} page number. + \end{quote} +\end{Example} +\fi + +Because the \Macro{Ifthispageodd} command uses a mechanism that is very +similar to a label and a reference to it, at least two {\LaTeX} runs are +required after each change to the text. Only then will the decision be +correct. In the first run, a heuristic is used to make the initial choice. + +In \autoref{sec:maincls-experts.addInfos}, +\DescPageRef{maincls-experts.cmd.Ifthispageodd}, advanced users can find more +information about the problems of detecting left and right pages, or even and +odd page numbers.% +\IfThisCommonLabelBase{scrextend}{% + An example for \Macro{Ifthispageodd} is shown on + \PageRefxmpl{maincls.Ifthispageodd} in \autoref{sec:maincls.oddOrEven}.% +}{}% +% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-options-de.tex b/macros/latex/contrib/koma-script/doc/common-options-de.tex new file mode 100644 index 0000000000..37110f487c --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-options-de.tex @@ -0,0 +1,228 @@ +% ====================================================================== +% common-options-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-options-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] + +\section{Frühe oder späte Optionenwahl} +\seclabel{options} +\BeginIndexGroup +\BeginIndex{}{Optionen}% + +\IfThisCommonFirstRun{% + In diesem Abschnitt wird eine Besonderheit von \KOMAScript{} vorgestellt, die + neben % + \IfThisCommonLabelBase{typearea}{\Package{typearea} auch andere + \KOMAScript-Pakete und "~Klassen }{% + \IfThisCommonLabelBase{maincls}{den Klassen \Class{scrbook}, + \Class{scrreprt} und \Class{scrartcl} auch andere \KOMAScript-Klassen und + "~Pakete }{% + \IfThisCommonLabelBase{scrlttr2}{der Klasse \Class{scrlttr2} auch andere + \KOMAScript-Klassen und "~Pakete }{% + \IfThisCommonLabelBase{scrextend}{den Klassen und \Package{scrextend} + auch einige andere \KOMAScript-Pakete }{% + \IfThisCommonLabelBase{scrhack}{\Package{scrhack} auch andere + \KOMAScript-Pakete und "~Klassen }{% + \IfThisCommonLabelBase{scrjura}{\Package{scrjura} auch andere + \KOMAScript-Pakete und "~Klassen }{% + \IfThisCommonLabelBase{scrlayer}{\Package{scrlayer} auch andere + \KOMAScript-Pakete und "-Klassen }{% + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \Package{scrlayer-scrpage} auch andere \KOMAScript-Pakete und + "-Klassen }{% + \IfThisCommonLabelBase{scrlayer-notecolumn}{% + \Package{scrlayer-notecolumn} auch andere \KOMAScript-Pakete + und "-Klassen }{% + \InternalCommonFileUsageError}}}}}}}}}%% + betrifft. % + % Umbruchvarianten: + \IfThisCommonLabelBase{typearea}{Im Sinne der + Abgeschlossenheit der Kapitel ist dieser Abschnitt nahezu identisch in + mehreren Kapiteln zu finden.% + }{Damit die Anwender alle Informationen zu einem Paket oder einer Klasse im + jeweiligen Kapitel finden, ist dieser Abschnitt nahezu gleichlautend in + mehreren Kapiteln zu finden. Anwender, die nicht nur an der Anleitung zu + einem Paket oder einer Klasse interessiert sind, sondern sich einen + Gesamtüberblick über \KOMAScript{} verschaffen wollen, brauchen diesen + Abschnitt nur in einem der Kapitel zu lesen und können ihn + \IfThisCommonLabelBase{maincls}{bei den weiteren Kapitel + überspringen.}{beim weiteren Studium der Anleitung dann überspringen.}% + }% +}{% + Es gilt sinngemäß, was in \autoref{sec:\ThisCommonFirstLabelBase.options} + geschrieben wurde. Falls Sie also + \autoref{sec:\ThisCommonFirstLabelBase.options} bereits gelesen und + verstanden haben, können Sie auf + \autopageref{sec:\ThisCommonLabelBase.options.next} mit + \autoref{sec:\ThisCommonLabelBase.options.next} fortfahren.% +} + + +\begin{Declaration} + \Macro{documentclass}\OParameter{Optionenliste}% + \Parameter{\KOMAScript-Klasse}% + \Macro{usepackage}\OParameter{Optionenliste}% + \Parameter{Paket-Liste} +\end{Declaration} +Bei \LaTeX{} ist vorgesehen, dass Anwender +Klassenoptionen\textnote{Klassenoptionen} in Form einer durch Komma getrennten +Liste einfacher Schlüsselwörter als optionales Argument von +\Macro{documentclass} angeben. Außer an die Klasse werden diese Optionen auch +an alle Pakete\textnote{globale Optionen} weitergereicht, die diese Optionen +verstehen. Ebenso ist vorgesehen, dass Anwender +Paketoptionen\textnote{Paketoptionen} in Form einer durch Komma getrennten +Liste einfacher Schlüsselwörter als optionales Argument von \Macro{usepackage} +angeben. \KOMAScript{} erweitert\ChangedAt{v3.00}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}\and \Package{typearea}} den +Mechanismus der Optionen für +\IfThisCommonLabelBaseOneOf{scrextend,scrjura}{}{die \KOMAScript-Klassen und +}einige Pakete um weitere Möglichkeiten. So haben die meisten Optionen bei +\KOMAScript{} zusätzlich einen Wert. Eine Option hat also nicht unbedingt nur +die Form \PName{Option}, sondern kann auch die Form +\PName{Option}\texttt{=}\PName{Wert}% +\important{\PName{Option}\texttt{=}\PName{Wert}} haben. Bis auf diesen +Unterschied arbeiten \Macro{documentclass} und \Macro{usepackage} bei +\KOMAScript{} wie in \cite{latex:usrguide} oder jeder \LaTeX-Einführung, +beispielsweise \cite{l2kurz}, beschrieben. + +\IfThisCommonLabelBaseNotOneOf{% + scrjura,scrhack,scrlayer,scrlayer-scrpage,scrlayer-notecolumn,scrextend% +}{% + Bei Verwendung einer \KOMAScript-Klasse\textnote{Achtung!} sollten + \IfThisCommonLabelBase{typearea}{beim dann ohnehin überflüssigen}{im Übrigen + beim} Laden des Pakets \Package{typearea} oder \Package{scrbase} keine + Optionen angegeben werden. \IfThisCommonLabelBase{typearea}{Diese Klassen + laden die beiden Pakete nämlich bereits ohne Optionen und \LaTeX{} meldet + einen Fehler, wenn eines der Pakete anschließend mit Optionen geladen + wird.}{Das ist darin begründet, dass die Klassen diese Pakete bereits ohne + Optionen laden und \LaTeX{} das mehrmalige Laden eines Pakets mit + unterschiedlicher Angabe von Optionen verweigert.}% + \iffalse % Umbruchoptimierung + \IfThisCommonLabelBase{scrlttr2}{ Überhaupt ist es bei Verwendung einer + \KOMAScript-Klasse nicht notwendig, eines dieser Pakete auch noch explizit + zu laden.}{}% + \fi % + \par +}{} + +% Umbruchoptimierung!!! +\IfThisCommonLabelBase{typearea}{Das Setzen der Optionen mit + \Macro{documentclass} hat übrigens einen\textnote{Achtung!} entscheidenden + Nachteil: % +}{% + Gegenüber der nachfolgend vorgestellten Schnittstelle zu Einstellungen von + Optionen hat \Macro{documentclass} einen Nachteil, der unbedingt zu + beachten\textnote{Achtung!} ist: % +}% +Anweisungen, Längen, Zähler und ähnliches können darin leicht zerbrechen. So +führt die Verwendung einer \LaTeX-Länge im Wert einer Option bei dieser +Anweisung bei vielen Nicht-\KOMAScript-Klassen zu einer Fehlermeldung% +\IfThisCommonLabelBaseNotOneOf{maincls,scrlttr2}{, noch bevor der Wert an ein + \KOMAScript-Paket übergeben wird, es also die Kontrolle darüber übernehmen + könnte}{}% +. Wertzuweisungen mit \LaTeX-Längen oder \LaTeX-Zählern sollten daher nie per +\Macro{documentclass}, sondern mit den nachfolgend dokumentierten Anweisungen +\DescRef{\LabelBase.cmd.KOMAoptions} oder \DescRef{\LabelBase.cmd.KOMAoption} +vorgenommen werden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{KOMAoptions}\Parameter{Optionenliste}\\ + \Macro{KOMAoption}\Parameter{Option}\Parameter{Werteliste} +\end{Declaration} +\KOMAScript{}\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{typearea}} bietet bei den meisten +\IfThisCommonLabelBaseOneOf{scrextend,scrjura}{}{Klassen- und }Paketoptionen +auch die Möglichkeit, den Wert der Optionen noch nach dem Laden +\IfThisCommonLabelBaseOneOf{scrextend,scrjura}{}{der Klasse beziehungsweise +}des Pakets zu ändern. Mit der Anweisung \Macro{KOMAoptions} kann man wie bei +\DescRef{\ThisCommonLabelBase.cmd.documentclass} oder +\DescRef{\ThisCommonLabelBase.cmd.usepackage} die Werte einer Reihe von +Optionen ändern. Jede Option der \PName{Optionenliste} hat dabei die Form +\PName{Option}\texttt{=}\PName{Wert}% +\important{\PName{Option}\texttt{=}\PName{Wert},\dots}. + +Einige Optionen besitzen auch einen Säumniswert (engl. \emph{default + value}). Versäumt man die Angabe eines Wertes, verwendet man die Option also +einfach in der Form \PName{Option}, so wird automatisch dieser Säumniswert +angenommen. + +Manche Optionen können gleichzeitig mehrere Werte besitzen. Für solche +Optionen besteht die Möglichkeit, mit \Macro{KOMAoption} der einen +\PName{Option} nacheinander eine Reihe von Werten zuzuweisen. Die einzelnen +Werte sind dabei in der +\PName{Werteliste}\important{\PName{Wert},\dots} durch Komma +voneinander getrennt. + +Soll\textnote{Achtung!} ein \PName{Wert} ein Gleichheitszeichen oder ein Komma +enthalten, so ist der \PName{Wert} in geschweifte Klammern zu setzen. + +\begin{Explain} + \KOMAScript{} bedient sich für die Realisierung dieser Möglichkeit der + Anweisungen \DescRef{scrbase.cmd.FamilyOptions} und + \DescRef{scrbase.cmd.FamilyOption} mit der Familie »\PValue{KOMA}«. + \IfThisCommonLabelBaseOneOf{typearea}{% Umbruchkorrektur + Näheres zu diesen Anweisungen finden fortgeschrittene Anwender in + \autoref{sec:scrbase.keyvalue} ab \DescPageRef{scrbase.cmd.FamilyOptions}. + }{% + Siehe dazu \autoref{part:forExperts}, \autoref{sec:scrbase.keyvalue}, + ab \DescPageRef{scrbase.cmd.FamilyOptions}. + }% +\end{Explain} + +Mit \Macro{KOMAoptions} oder \Macro{KOMAoption} gesetzte Optionen erreichen +\IfThisCommonLabelBase{scrextend}{}{sowohl die \KOMAScript-Klasse als }auch +alle bereits geladenen \KOMAScript-Pakete, die diese Optionen kennen. Ist eine +Option oder ein Wert insgesamt unbekannt, so wird die Option einschließlich +des Wertes von +\hyperref[cha:scrbase]{\Package{scrbase}}\IndexPackage{scrbase}% +\important{\hyperref[cha:scrbase]{\Package{scrbase}}} als fehlerhaft +gemeldet.% +% +\iffalse% Umbruchkorrekturtext +\iffree{}{\IfThisCommonLabelBase{scrlayer-scrpage}{\par + Das als veraltet zu betrachtende Paket + \Package{scrpage2}\IndexPackage{scrpage2}\important{\Package{scrpage2}} + besitzt diese Erweiterung übrigens nicht. Optionen können daher nur über + die zuvor erklärte Möglichkeit während des Ladens des Pakets gesetzt + werden.}{}}% +\fi% +\EndIndexGroup +% +\EndIndexGroup + +\phantomsection +\label{sec:\ThisCommonLabelBase.options.end} +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-options-en.tex b/macros/latex/contrib/koma-script/doc/common-options-en.tex new file mode 100644 index 0000000000..638ea2a5d7 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-options-en.tex @@ -0,0 +1,197 @@ +% ====================================================================== +% common-options-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-options-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] +\translator{Gernot Hassenpflug\and Krickette Murabayashi\and Karl Hagen} + +\section{Early or Late Selection of Options} +\seclabel{options} +\BeginIndexGroup +\BeginIndex{}{options}% + +\IfThisCommonFirstRun{% + This section introduces a special feature of \KOMAScript{} which, in + addition to \IfThisCommonLabelBase{typearea}{\Package{typearea}}{% + \IfThisCommonLabelBase{maincls}{\Class{scrbook}, \Class{scrreprt}, and + \Class{scrartcl}}{% + \IfThisCommonLabelBase{scrlttr2}{the \Class{scrlttr2} class}{% + \IfThisCommonLabelBase{scrextend}{the classes and + \Package{scrextend}}{% + \IfThisCommonLabelBase{scrhack}{\Package{scrhack}}{% + \IfThisCommonLabelBase{scrjura}{\Package{scrjura}}{% + \IfThisCommonLabelBase{scrlayer}{\Package{scrlayer}}{% + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \Package{scrlayer-scrpage}}{% + \IfThisCommonLabelBase{scrlayer-notecolumn}{% + \Package{scrlayer-notecolumn}}{% + \InternalCommonFileUsageError}}}}}}}}}% + , is also relevant to other \KOMAScript{} packages and classes. % + \IfThisCommonLabelBase{scrlttr2}{So that each chapter may stand on its own, + this section appears in nearly identical form in several chapters, but if + you are studying all of \KOMAScript{}, you of course only need to read it + one time.% + }{This section appears in nearly identical form in several chapters, so you + can find all the information about a single package or class in the + relevant chapter. Users who are interested not just in a particular + package or class but in getting an overview of \KOMAScript{} as a whole + only need to read this section in one of the chapters and can + \IfThisCommonLabelBase{maincls}{skip the rest of the chapter.}{% + then skip it as they study the guide.}% + }% +}{% + The information in \autoref{sec:\ThisCommonFirstLabelBase.options} applies + equally to this chapter. So if you have already read and understood + \autoref{sec:\ThisCommonFirstLabelBase.options}, you can skip ahead to + \autoref{sec:\ThisCommonLabelBase.options.next}, + \autopageref{sec:\ThisCommonLabelBase.options.next}.% +} + + + +\begin{Declaration} + \Macro{documentclass}\OParameter{option list}% + \Parameter{{\KOMAScript} class} + \Macro{usepackage}\OParameter{option list}% + \Parameter{package list} +\end{Declaration} +\LaTeX{} allows users to pass class options\textnote{class options} as a +comma-separated list of keywords in the optional argument to +\Macro{documentclass}. In addition to being passed to the class, these options +are also passed on to all packages\textnote{global options} that can +understand them. Users can also pass a similar comma-separated list of +keywords in the optional argument of \Macro{usepackage}\textnote{packet + options}. \KOMAScript{} extends\ChangedAt{v3.00}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}\and \Package{scrextend}\and + \Package{typearea}} the option mechanism for +\IfThisCommonLabelBaseOneOf{scrextend,scrjura}{}{the \KOMAScript{} classes and +} some packages with further options. Thus most \KOMAScript{} options can also +take a value, so an option does not necessarily take the form \PName{option}, +but can also take the form \PName{option}\texttt{=}\PName{value}% +\important{\PName{option}\texttt{=}\PName{value}}. Except for this difference, +\Macro{documentclass} and \Macro{usepackage} in \KOMAScript{} function as +described in \cite{latex:usrguide} or any introduction to \LaTeX, for example +\cite{lshort}. + +\IfThisCommonLabelBaseNotOneOf{% + scrjura,scrhack,scrlayer,scrlayer-scrpage,scrlayer-notecolumn,scrextend% +}{% + When using a \KOMAScript{} class\textnote{Attention!}, you should not + specify options when loading the \Package{typearea} or \Package{scrbase} + packages. The reason for this restriction is that the class already loads + these packages without options, and \LaTeX{} refuses to load a package + multiple times with different option settings.% + \IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{ In general, it is not + necessary to load either one of these packages explicitly when using any + \KOMAScript{} class.}{}% + \par +}{} + +% The alternative text for wrapping optimization was redundant and, as +% it's not required for the English version, has been deleted. +Setting the options with \Macro{documentclass} has one\textnote{Attention!} +major disadvantage: unlike the interface described below, the options in +\Macro{documentclass} are not robust. So commands, lengths, counters, and +similar constructs may break inside the optional argument of this command. +For example, with many non-\KOMAScript{} classes, using a \LaTeX{} length +in the value of an option results in an error% +\IfThisCommonLabelBaseNotOneOf{maincls,scrlttr2}{ before the value is passed + to a \KOMAScript{} package and it can take control of the option + execution}{}% +. So if you want to use a \LaTeX{} length, counter, or command as part of the +value of an option, you should use \DescRef{\LabelBase.cmd.KOMAoptions} or +\DescRef{\LabelBase.cmd.KOMAoption}. These commands will be described next.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{KOMAoptions}\Parameter{option list} + \Macro{KOMAoption}\Parameter{option}\Parameter{value list} +\end{Declaration} +\KOMAScript{}\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}\and \Package{typearea}} also +provides the ability to change the values of most +\IfThisCommonLabelBaseOneOf{scrextend,scrjura}{}{class and }package options +even after loading the \IfThisCommonLabelBaseOneOf{scrextend,scrjura}{}{% + class or} package. You can use the \Macro{KOMAoptions} command to change the +values of a list of options, as in +\DescRef{\ThisCommonLabelBase.cmd.documentclass} or +\DescRef{\ThisCommonLabelBase.cmd.usepackage}. Each option in the +\PName{option list} has the form \PName{option}\texttt{=}\PName{value}% +\important{\PName{option}\texttt{=}\PName{value},\dots}. + +Some options also have a default value. If you do not specify a value, that is +if you give the option simply as \PName{option}, then this default value will +be used. + +Some options can have several values simultaneously. For such options, it is +possible, with the help of \Macro{KOMAoption}, to pass a list of values to a +single \PName{option}. The individual values are given as a comma-separated +\PName{value list}\important{\PName{value},\dots}. + +\begin{Explain} + \KOMAScript{} uses the commands \DescRef{scrbase.cmd.FamilyOptions} and + \DescRef{scrbase.cmd.FamilyOption} with the family ``\PValue{KOMA}'' to + implement this ability. + \IfThisCommonLabelBaseOneOf{typearea}{% Umbruchkorrektur + Advanced users will find more on these instructions in + \autoref{sec:scrbase.keyvalue}, \DescPageRef{scrbase.cmd.FamilyOptions}. + }{% + See \autoref{part:forExperts}, \autoref{sec:scrbase.keyvalue}, + \DescPageRef{scrbase.cmd.FamilyOptions}. }% +\end{Explain} + +Options set with \Macro{KOMAoptions} or \Macro{KOMAoption} will reach +\IfThisCommonLabelBase{scrextend}{}{both the \KOMAScript{} class and }any +previously loaded \KOMAScript{} packages that recognise these options. If an +option or a value is unknown, \hyperref[cha:scrbase]{\Package{scrbase}}% +\IndexPackage{scrbase}\important{\hyperref[cha:scrbase]{\Package{scrbase}}} +will report it as an error.% +% +\iffalse% Umbruchkorrekturtext +\iffree{}{\IfThisCommonLabelBase{scrlayer-scrpage}{\par + Incidentally, the \Package{scrpage2}\IndexPackage{scrpage2}% + \important{\Package{scrpage2}}, which is considered obsolete, does not have + this extension. Options can therefore only be set when the package is loaded + with the option explained previously.}{}}% +\fi% +% +\EndIndexGroup +% +\EndIndexGroup + +\phantomsection +\label{sec:\ThisCommonLabelBase.options.end} +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-pagestylemanipulation-de.tex b/macros/latex/contrib/koma-script/doc/common-pagestylemanipulation-de.tex new file mode 100644 index 0000000000..70ad59f8a3 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-pagestylemanipulation-de.tex @@ -0,0 +1,1156 @@ +% ====================================================================== +% common-pagestylemanipulation-de.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% +% Text that is common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{common-pagestylemanipulation-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraph: + Setting up defined page styles)] + +\section{Beeinflussung von Seitenstilen} +\seclabel{pagestyle.content} +\BeginIndexGroup +\BeginIndex{}{Seiten>Stil} + +\IfThisCommonLabelBase{scrlayer}{% + Obwohl \Package{scrlayer} selbst keine konkreten Seitenstile mit Inhalt + definiert -- die erwähnten Seitenstile + \DescRef{\LabelBase.pagestyle.@everystyle@} und \PageStyle{empty} werden ja + zunächst ohne Ebenen, also leer definiert --, stellt es einige Optionen und + Befehle zur Beeinflussung von Inhalten zur Verfügung.% +}{% + \IfThisCommonLabelBase{scrlayer-scrpage}{% + In \autoref{sec:scrlayer-scrpage.predefined.pagestyles} wurde erklärt, wie + die Seitenstile \DescRef{\LabelBase.pagestyle.scrheadings} und + \DescRef{\LabelBase.pagestyle.plain.scrheadings} grundlegend vordefiniert + sind und wie diese Vorbelegung grundsätzlich geändert werden kann. Es + fehlen jedoch noch Informationen, wie beispielsweise die Kolumnentitel + zustande kommen, wie man die Breite des Kopfes und Fußes verändern kann + und wie man Linien über oder unter Kopf oder Fuß setzen kann. Obwohl dies + eigentlich Fähigkeiten des Pakets + \hyperref[cha:scrlayer]{\Package{scrlayer}}% + \important{\hyperref[cha:scrlayer]{\Package{scrlayer}}} sind, werden sie + nachfolgend erläutert, da diese grundlegenden Eigenschaften von + \hyperref[cha:scrlayer]{\Package{scrlayer}} einen wichtigen Teil der + Möglichkeiten von \IfThisCommonLabelBase{scrlayer-scrpage}{% + \Package{scrlayer-scrpage}% + }{% + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + } ausmachen.% + }{% + \IfThisCommonLabelBase{scrlayer-scrpage-experts}{% + Dieser Abschnitt ist als Ergänzung zu + \autoref{sec:scrlayer.pagestyle.content} zu verstehen und beschreibt + Dinge, die sich dem Anfänger nicht unbedingt sofort erschließen. Wenn + Sie jenen Abschnitt bereits gelesen und verstanden haben, können Sie + natürlich auch direkt mit + \autoref{sec:\LabelBase.pagestyle.content.next} auf + \autopageref{sec:\LabelBase.pagestyle.content.next} forfahren.% + }{\InternalCommonFileUsageError}% + }% +} + +\IfThisCommonLabelBase{scrlayer-scrpage-experts}{\iffalse}{% + \csname iftrue\endcsname}% + \begin{Declaration} + \IfThisCommonLabelBase{scrlayer}{% + \Option{automark} + \OptionVName{autooneside}{Ein-Aus-Wert} + \Option{manualmark} + }{}% + \Macro{automark}\OParameter{Gliederungsebene der rechten Marke} + \Parameter{\mbox{Gliederungsebene der linken Marke}} + \Macro{automark*}\OParameter{Gliederungsebene der rechten Marke} + \Parameter{Gliederungsebene der linken Marke} + \Macro{manualmark} + \end{Declaration} + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \begin{Explain} + Bei den Standardklassen und auch bei den \KOMAScript-Klassen fällt die + Entscheidung, ob mit lebenden oder statischen + Kolumnentiteln\Index{Kolumnentitel>lebend}\Index{Kolumnentitel>statisch} + gearbeitet werden soll, über die Wahl des entsprechenden + Seitenstils. Wie bereits in \autoref{sec:maincls.pagestyle} erklärt, + erhält man bei Wahl von + \DescRef{maincls.pagestyle.headings}\IndexPagestyle{headings}% + \important{\DescRef{maincls.pagestyle.headings}} lebende + Kolumnentitel. Unter lebenden Kolumnentiteln versteht man die + Wiederholung eines für die Seite oder die \emph{Kolumne} markanten + Textes meist im Kopf, seltener im Fuß der Seite. + + Bei den Artikel-Klassen\OnlyAt{\Class{article}\and \Class{scrartcl}} + \Class{article} oder \hyperref[cha:maincls]{\Class{scrartcl}} wird für + den lebenden Kolumnentitel\textnote{lebende Kolumnentitel} im + einseitigen Modus die Abschnittsüberschrift, also das obligatorische + oder das optionale Argument von \DescRef{maincls.cmd.section} + verwendet. Diese wird als \emph{rechte Marke} behandelt. Im + doppelseitigen Satz wird dieselbe Überschrift als \emph{linke Marke} + verwendet und gleichzeitig die Unterabschnittsüberschrift als + \emph{rechte Marke}. Ausgegeben wird die linke Marke, wie der Name schon + sagt, auf der linken Seite, während die rechte Marke auf rechten Seiten + -- im einseitigen Modus also auf allen Seiten -- ausgegeben wird. Beim + Setzen der linken Marke für den Abschnitt werden von den Klassen in der + Voreinstellung außerdem auch immer die rechten Marken gelöscht. + + Bei den Bericht- und Buch-Klassen\OnlyAt{\Class{report}\and + \Class{scrreprt}\and \Class{book}\and \Class{scrbook}} wird eine Ebene + höher begonnen. Im einseitigen Modus wird also die Kapitelüberschrift + als rechte Marke gesetzt. Im doppelseitigen Satz wird die + Kapitelüberschrift als linke Marke und die Abschnittsüberschrift als + rechte Marke gesetzt. + + Verwendet man hingegen als Seitenstil + \DescRef{maincls.pagestyle.myheadings}\IndexPagestyle{myheadings}% + \important{\DescRef{maincls.pagestyle.myheadings}}% + \textnote{manuelle Kolumnentitel}, so existieren zwar die Marken im Kopf + genauso und auch die Seitenzahlen werden gleich platziert, allerdings + werden die Marken nicht automatisch durch die Überschriften gesetzt. Man + kann sie dann nur manuell über die später in diesem Abschnitt + dokumentierten Anweisungen\important{% + \DescRef{\ThisCommonLabelBase.cmd.markright}\\ + \DescRef{\ThisCommonLabelBase.cmd.markboth}} + \DescRef{\ThisCommonLabelBase.cmd.markright} und + \DescRef{\ThisCommonLabelBase.cmd.markboth} befüllen. + \end{Explain}\par% + Genau diese Unterscheidung wurde bei % + \iffalse \Package{scrpage2} und nun auch bei \fi% + \hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer}% + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \important{\hyperref[cha:scrlayer]{\Package{scrlayer}}}}{} + aufgehoben. Statt die Unterscheidung zwischen + automatischen\textnote{lebende und manuelle Kolumnentitel} und manuellen + Kolumnentiteln über den Seitenstil vorzunehmen, gibt es die beiden + Anweisungen \Macro{automark} und \Macro{manualmark}.% + }{% + \IfThisCommonLabelBase{scrlayer}{% + Bei den meisten Klassen bestimmt die Wahl des Seitenstils, meist + \PageStyle{headings} und \PageStyle{myheadings}, darüber, ob die + Kolumnentitel automatisch oder manuell erzeugt werden. Bei + \Package{scrlayer} erfolgt die Unterscheidung stattdessen über die + beiden Anweisungen \Macro{automark} und \Macro{manualmark}.% + }{\InternalCommonFileUsageError}% + }% + + Mit \Macro{manualmark}\important{\Macro{manualmark}} wird dabei auf manuelle + Marken umgeschaltet. Es deaktiviert also das automatische Setzen der + Marken. Demgegenüber kann mit \Macro{automark}\important{\Macro{automark}} + und \Macro{automark*} festgelegt werden, welche Gliederungsebenen für das + automatische Setzen der Marken verwendet werden sollen. Das optionale + Argument gibt dabei die \PName{Gliederungsebene der rechten Marke} an, + während das obligatorische Argument die \PName{Gliederungsebene der linken + Marke} ist. Als Argument werden jeweils die Namen der Gliederungsebenen + angegeben, also \PValue{part}, \PValue{chapter}, \PValue{section}, + \PValue{subsection}, \PValue{subsubsection}, \PValue{paragraph} oder + \PValue{subparagraph}. + + Normalerweise sollte die höhere Ebene die linke Marke setzen, während die + tiefere Ebene für die rechte Marke zu verwenden ist. Diese übliche + Konvention ist jedoch keine Pflicht, sondern lediglich sinnvoll. + + Es ist zu beachten\textnote{Achtung!}, dass nicht alle Klassen Kolumnentitel + für alle Ebenen ermöglichen. So setzen die + Standardklassen\textnote{\KOMAScript{} vs. Standardklassen} beispielsweise + nie Kolumnentitel für \DescRef{maincls.cmd.part}. Die \KOMAScript-Klassen + unterstützen hingegen alle Ebenen. + + Der Unterschied zwischen \Macro{automark} und + \Macro{automark*}\important{\Macro{automark*}} liegt darin, dass + \Macro{automark} alle vorherigen Befehle zum automatischen Setzen der Marken + aufhebt, während die Stern-Version \Macro{automark*} lediglich die Aktionen + für die angegebenen Gliederungsebenen ändert.% + \IfThisCommonLabelBase{scrlayer-scrpage}{}{ % + \iffalse% Umbruchoptimierung + Man kann so, wie in \autoref{sec:scrlayer-scrpage.pagestyle.content} ab + \PageRefxmpl{scrlayer-scrpage.mark} gezeigt, auch relativ komplexe Fälle + abdecken. % + %\else% + Beispiele für die Verwendung finden Sie in + \autoref{sec:scrlayer-scrpage.pagestyle.content} ab + \PageRefxmpl{scrlayer-scrpage.mark}. % + \fi% + }% Umbruchoptimierung + \IfThisCommonLabelBase{scrlayer-scrpage}{\iftrue}{\csname + iffalse\endcsname}% + \iffalse% Umbruchkorrekturtext + \iffree{}{\par + Das veraltete Paket + \Package{scrpage2}\IndexPackage{scrpage2}\important{\Package{scrpage2}} + kennt sowohl \Macro{manualmark} als auch \Macro{automark}, jedoch nicht + \Macro{automark*}. Daher sind die nachfolgenden Beispielen nicht + vollständig auf die Verwendung von \Package{scrpage2} übertragbar.% + }% + \fi + % + \begin{Example} + \phantomsection\xmpllabel{mark}% + Angenommen Sie wollen, dass wie üblich auf den linken Seiten eines + Buches die Kapitelüberschriften als automatische Kolumnentitel verwendet + werden und auf den rechten Seiten die + Abschnittsüberschriften. Allerdings soll auf rechte Seiten so lange + ebenfalls die Kapitelüberschrift verwendet werden, bis der erste + Abschnitt auf"|taucht. Dazu wird zuerst + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \Package{scrlayer-scrpage}% + }{% + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + } geladen. Dadurch ist auch bereits automatisch der Seitenstil + \DescRef{\LabelBase.pagestyle.scrheadings} aktiviert. Das Dokument + beginnt also mit: +\begin{lstcode} + \documentclass{scrbook} + \usepackage{scrlayer-scrpage} +\end{lstcode} + Als nächstes wird dafür gesorgt, dass die Kapitelüberschriften sowohl + die linke als auch die rechte Marke setzen: +\begin{lstcode} + \automark[chapter]{chapter} +\end{lstcode} + Dann sollen die Abschnittsüberschriften zusätzlich die rechten Marken + setzen: +\begin{lstcode} + \automark*[section]{} +\end{lstcode} + Hier findet die Stern-Version Anwendung, da die vorherige + \Macro{automark}-Anweisung weiterhin wirksam bleiben soll. Außerdem + bleibt das Argument für die \PName{Gliederungsebene der linken Marke} + leer, weil diese Marke unverändert bleiben soll. + + Alles, was jetzt noch fehlt, ist ein wenig Dokumentinhalt: +\begin{lstcode} + \usepackage{lipsum} + \begin{document} + \chapter{Kapitel} + \lipsum[1-20] + \section{Abschnitt} + \lipsum[21-40] + \end{document} +\end{lstcode} + \IfThisCommonLabelBase{scrlayer-scrpage}{}{% Umbruchkorrektur + Dabei ist das Paket \Package{lipsum}\IndexPackage{lipsum} mit seiner + Anweisung \Macro{lipsum}\IndexCmd{lipsum} sehr nützlich.}% + + Wenn Sie dieses Beispiel einmal testen, werden Sie sehen, dass die + Kapitelanfangsseite wie üblich ohne Kolumnentitel ist, da sie + automatisch im \PageStyle{plain}-Seitenstil + \DescRef{\LabelBase.pagestyle.plain.scrheadings} gesetzt wird (siehe + dazu Anweisung \DescRef{maincls.cmd.chapterpagestyle} auf + \DescPageRef{maincls.cmd.chapterpagestyle}). Seite~2 bis 4 tragen als + Kolumnentitel die Kapitelüberschrift. Nachdem auf Seite~4 eine + Abschnittsüberschrift ausgegeben wurde, ändert sich der Kolumnentitel + auf Seite~5 in die Abschnittsüberschrift. Ab dann werden die beiden + Überschriften im Kopf wechselweise ausgegeben, auf linken Seiten die + Kapitelüberschrift, auf rechten Seiten die Abschnittsüberschrift.% + \end{Example} + \fi + + \IfThisCommonLabelBase{scrlayer}{}{% + \begin{Declaration} + \Option{automark} + \OptionVName{autooneside}{Ein-Aus-Wert} + \Option{manualmark} + \end{Declaration}} + Außer mit den \IfThisCommonLabelBase{scrlayer}{}{zuvor erklärten }Befehlen + kann auch direkt mit den beiden Optionen + \Option{manualmark}\important{\Option{manualmark}\\\Option{automark}} und + \Option{automark} zwischen automatischen und manuellen Kolumnentiteln hin- + und hergeschaltet werden. Dabei verwendet \Option{automark} bei Klassen mit + \DescRef{maincls.cmd.chapter}-Anweisung immer die + Voreinstellung\textnote{Voreinstellung} + \IfThisCommonLabelBase{scrlayer-scrpage}{\iftrue}{\csname + iffalse\endcsname}% + \lstinline|\automark[section]{chapter}| und bei anderen Klassen + \lstinline|\automark[subsection]{section}|. + \else +\begin{lstcode} + \automark[section]{chapter} +\end{lstcode} + und bei anderen Klassen: +\begin{lstcode} + \automark[subsection]{section} +\end{lstcode} + \fi + + \IfThisCommonLabelBaseOneOf{scrlayer,scrlayer-scrpage}{% Umbruchkorrektur + Im einseitigen Modus\textnote{einseitiger Satz} will man in der Regel, + dass nur die höheren Ebenen den Kolumnentitel vorgeben.% + }{% + Im einseitigen Modus\textnote{einseitiger Satz} will man in der Regel + nicht, dass die untergeordnete Ebene die rechte Marke + beeinflusst. Stattdessen soll auch mit der Voreinstellung nur die höhere + Ebene, die beispielsweise im doppelseitigen Modus in der Voreinstellung + alleine die linke Marke beeinflusst, den Kolumnentitel aller Seiten + vorgeben.% + } Diese Voreinstellung entspricht einer aktiven Option + \Option{autooneside}\important{\Option{autooneside}}. Die Option versteht + die Werte für einfache Schalter, die in \autoref{tab:truefalseswitch} auf + \autopageref{tab:truefalseswitch} angegeben sind. Wird die Option + deaktiviert, so wirken sich im einseitigen Satz sowohl das optionale als + auch das obligatorische Argument auf den Kolumnentitel aus.% + \IfThisCommonLabelBase{scrlayer-scrpage}{\iftrue}{\csname + iffalse\endcsname}% + \begin{Example} + \phantomsection\xmpllabel{mark.oneside}% + Angenommen, Sie wollen im einseitigen Modus eines Berichts % + \iffalse % Umbruchkorrektur + eine ganz ähnliche Verwendung des Kolumnentitels erreichen wie im + vorherigen Beispiel. Konkret soll so lange die Kapitelüberschrift + verwendet werden, % + \else % + so lange die Kapitelüberschriften für den Kolumnentitel verwenden, % + \fi % + bis ein Abschnitt gesetzt wird. Ab dann soll nur noch die + Abschnittsüberschrift verwendet werden. % + \iftrue % Umbruchkorrektur + Dazu wird das % + \iftrue vorherige \fi % Umbruchkorrektur + Beispiel wie folgt abgewandelt:% + \fi % +\begin{lstcode} + \documentclass{scrreprt} + \usepackage[autooneside=false]{scrlayer-scrpage} + \automark[section]{chapter} + \usepackage{lipsum} + \begin{document} + \chapter{Kapitel} + \lipsum[1-20] + \section{Abschnitt} + \lipsum[21-40] + \end{document} +\end{lstcode} + \iffalse % Umbruchkorrektur + Wie zu sehen ist, wird in diesem Fall keine % + \else % + In diesem Fall wird keine % + \fi + \iffalse ergänzende \fi % Umbruchkorrektur + \DescRef{\LabelBase.cmd.automark*}-Anweisung benötigt. Sie sollten zum + Vergleich die Option \Option{autooneside} % + \iffalse auch \fi % Umbruchkorrektur + einmal % + \iffalse auf \PValue{true} setzen oder sie \fi % Umbruchkorrektur + entfernen. Ein Unterschied ist dann ab Seite~4 % + \iffalse im Kolumnentitel im Kopf der Seiten \fi % Umbruchkorrektur + zu sehen. + \end{Example} + \fi + + Das\textnote{Achtung!} Laden des Pakets selbst hat übrigens noch keine + Auswirkung darauf, ob mit automatischen Kolumnentiteln gearbeitet wird oder + nicht. Erst die explizite Verwendung einer der Optionen \Option{automark} + oder \Option{manualmark} oder einer der beiden Anweisungen + \DescRef{\LabelBase.cmd.automark} oder \DescRef{\LabelBase.cmd.manualmark} + schafft hier klare Verhältnisse.% + \IfThisCommonLabelBase{scrlayer}{\par% + \iffalse% Umbruchkorrektur + Bei Bedarf finden Sie weitere Beispiele zur Verwendung dieser Befehle und + Optionen mit dem auf \Package{scrlayer} basierenden Paket + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} + \else + Beispiele finden Sie + \fi + in \autoref{sec:scrlayer-scrpage.pagestyle.content}, ab + \DescPageRef{scrlayer-scrpage.cmd.manualmark}.% + }{% + \EndIndexGroup% + }% + \EndIndexGroup + + + \IfThisCommonLabelBase{scrlayer}{% Bereits bei \layercontentsmeasure erklärt. + }{% + \begin{Declaration} + \OptionVName{draft}{Ein-Aus-Wert} + \end{Declaration} + Die \KOMAScript-Option versteht die Standardwerte für einfache Schalter, + die in \autoref{tab:truefalseswitch} auf \autopageref{tab:truefalseswitch} + angegeben sind. Ist die Option aktiviert, so werden + \IfThisCommonLabelBase{scrlayer}{für die Entwurfsphase}{\unskip} alle + Elemente der Seitenstile zusätzlich mit + Maßlinien\Index{Masslinien=Maßlinien} versehen.% + \IfThisCommonLabelBaseOneOf{scrlayer,scrlayer-scrpage}{}{ % Umbruchkorrektur + Dies kann während der Entwurfsphase manchmal nützlich sein.}% + \IfThisCommonLabelBase{scrlayer-scrpage}{ % + Falls diese Option global gesetzt wurde, die Maßlinien aber nicht + gewünscht sind, kann die Option auch nur für das Paket deaktiviert + werden, indem man \OptionValue{draft}{false} % + \iffalse % Umbruchkorrektur + als optionales Argument von \DescRef{\LabelBase.cmd.usepackage} % + \fi % + beim Laden des Pakets angibt.% + }{}% + \EndIndexGroup% + }% + + + \begin{Declaration} + \Macro{MakeMarkcase}\Parameter{Text} + \OptionVName{markcase}{Wert} + \end{Declaration} + Die automatischen, nicht jedoch die manuellen Kolumnentitel verwenden + \Macro{MakeMarkcase} für ihre Ausgabe. Ist die Anweisung beim Laden von + \IfThisCommonLabelBase{scrlayer}{% + \Package{scrlayer}% + }{% + \hyperref[cha:scrlayer]{\Package{scrlayer}}% + } nicht\textnote{bedingte Voreinstellung} definiert, so + \IfThisCommonLabelBase{scrlayer}{gibt sie in der Voreinstellung ihr Argument + \PName{Text} unverändert aus}{wird sie in der Voreinstellung derart + definiert, dass sie ihr Argument \PName{Text} unverändert + ausgibt}. \IfThisCommonLabelBase{scrlayer}{Die}{Diese} Voreinstellung kann + jedoch durch Umdefinierung von \Macro{MakeMarkcase} geändert + werden. \IfThisCommonLabelBase{scrlayer}{Dies}{Die Umdefinierung} kann auch + automatisch durch Verwendung von Option \Option{markcase} mit einem der + Werte aus \autoref{tab:scrlayer-scrpage.markcase}% + \IfThisCommonLabelBase{scrlayer-scrpage}{}{, + \autopageref{tab:scrlayer-scrpage.markcase}} erfolgen.% + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \begin{table} + \centering + \caption[Mögliche Werte für Option \Option{markcase}]{Mögliche Werte für + Option \Option{markcase} zur Wahl von Groß-/Kleinschreibung in + automatischen Kolumnentiteln}% + \label{tab:\ThisCommonLabelBase.markcase}% + \begin{desctabular} + \pventry{lower}{\IndexOption[indexmain]{markcase~=lower}% + definiert \DescRef{\LabelBase.cmd.MakeMarkcase} so um, dass + automatische Kolumnentitel mit Hilfe von \Macro{MakeLowercase} in + Kleinbuchstaben gewandelt werden (Minuskelsatz).% + }\\[-1.7ex] + \pventry{upper}{\IndexOption[indexmain]{markcase~=upper}% + definiert \DescRef{\LabelBase.cmd.MakeMarkcase} so um, dass + automatische Kolumnentitel mit Hilfe von \Macro{MakeUppercase} in + Großbuchstaben gewandelt werden (Versalsatz).% + }\\[-1.7ex] + \pventry{used}{\IndexOption[indexmain]{markcase~=used}% + definiert \DescRef{\LabelBase.cmd.MakeMarkcase} so um, dass für + automatische Kolumnentitel keine automatische Veränderung der + Groß-/Kleinschreibung durchgeführt wird.% + }\\[-1.7ex] + \entry{\PValue{ignoreuppercase}, \PValue{nouppercase}, + \PValue{ignoreupper}, + \PValue{noupper}}{\IndexOption[indexmain]{markcase~=noupper}% + definiert nicht nur \DescRef{\LabelBase.cmd.MakeMarkcase} so um, + dass für automatische Kolumnentitel keine automatische Veränderung + der Groß-/Kleinschreibung durchgeführt wird, sondern deaktiviert + zusätzlich lokal für alle Ebenen aller Seitenstile + \Macro{MakeUppercase} und \Macro{uppercase}.% + }% + \end{desctabular} + \end{table} + }{}% + + \IfThisCommonLabelBase{scrlayer}{% + Aufgrund der mangelnden typografischen Qualität der primitiven Umwandlung + in Großbuchstaben (siehe die Erklärung zu + \DescRef{scrlayer-scrpage.option.markcase} in + \autoref{sec:scrlayer-scrpage.pagestyle.content} auf + \autopageref{expl:scrlayer-scrpage.MakeUppercase}) empfiehlt der + \KOMAScript-Autor den Verzicht auf Versalsatz.% + }{% + Leider\phantomsection\label{expl:\ThisCommonLabelBase.MakeUppercase} + führt die von \LaTeX{} für Versalsatz\Index{Versalsatz} vorgesehene + Anweisung \Macro{MakeUppercase}\IndexCmd{MakeUppercase} zu keinem guten + Ergebnis, da weder gesperrt noch ausgeglichen wird. Dies liegt teilweise + sicher daran, dass für typografisch korrekten Versalsatz eine + Glyphenanalyse notwendig ist, um die konkrete Form der Buchstaben\iffree{ + und ihrer Kombinationen}{} in den Ausgleich der Sperrung einfließen zu + lassen. Der \KOMAScript-Autor empfiehlt daher, auf Versalsatz für die + Kolumnentitel zu verzichten.% + } Dies ist normalerweise mit + \OptionValue{markcase}{used}\important{\OptionValue{markcase}{used}}% + \IndexOption[indexmain]{markcase~=used} möglich. Allerdings fügen einige + Klassen selbst beispielsweise bei den Kolumnentitel für Verzeichnisse ein + \Macro{MakeUppercase} oder sogar die \TeX-Anweisung \Macro{uppercase} + ein. Für diese Fälle gibt es auch noch die Einstellung + \OptionValue{markcase}{noupper}\important{\OptionValue{markcase}{noupper}}% + \IndexOption[indexmain]{markcase~=noupper}, mit deren Hilfe + \Macro{MakeUppercase} und \Macro{uppercase} für die Kolumnentitel lokal + deaktiviert werden können. + \EndIndexGroup +\fi + + +\IfThisCommonLabelBase{scrlayer-scrpage}{\iffalse}{\csname iftrue\endcsname} + \iffree{\begin{Declaration}}{\begin{Declaration}[0]}% + \Macro{righttopmark} + \Macro{rightbotmark} + \Macro{rightfirstmark} + \Macro{rightmark} + \Macro{lefttopmark} + \Macro{leftbotmark} + \Macro{leftfirstmark} + \Macro{leftmark} + \end{Declaration} + \LaTeX\ChangedAt{v3.16}{\Package{scrlayer}} verwendet für die Seitenstile + normalerweise eine zweiteilige \TeX-Marke. Im Kolumnentitel kann auf den + linken Teil der Marke mit \Macro{leftmark}\important{\Macro{leftmark}} + zugegriffen werden, während der rechte Teil der Marke über + \Macro{rightmark}\important{\Macro{rightmark}} verfügbar ist. Tatsächlich + ist es wohl auch so gedacht, dass \Macro{leftmark} für linke Seiten und + \Macro{rightmark} für rechte Seiten im doppelseitigen Druck verwendet + wird\IfThisCommonLabelBase{scrlayer-scrpage-experts}{, während im + einseitigen Layout nur rechte Marken gesetzt werden}{. Im einseitigen + Layout setzen die Gliederungsbefehle der Standardklassen den linken Teil + der Marke hingegen gar nicht erst.}% Umbruchkorrektur + + \TeX{} selbst kennt drei Möglichkeiten, auf eine Marke zuzugreifen. + \Macro{botmark}\IndexCmd{botmark}\important{\Macro{botmark}} ist die auf der + zuletzt zusammengestellten Seite zuletzt gültige Marke. Das entspricht der + letzten gesetzten Marke der Seite. Wurde auf der Seite keine Marke gesetzt, + so entspricht es der zuletzt gesetzten Marke auf den bereits ausgegebenen + Seiten. Die \LaTeX-Anweisung \Macro{leftmark}\important{\Macro{leftmark}} + verwendet genau diese Marke, gibt also den linken Teil der letzten Marke der + Seite aus. Dies entspricht ebenfalls + \Macro{leftbotmark}\important{\Macro{leftbotmark}}. Im Vergleich dazu gibt + \Macro{rightbotmark}\important{\Macro{rightbotmark}} den rechten Teil dieser + Marke aus. + + \Macro{firstmark}\IndexCmd{firstmark}\important{\Macro{firstmark}} ist die + erste Marke der zuletzt zusammengestellten Seite. Das entspricht der ersten + Marke, die auf der Seite gesetzt wurde. Wurde auf der Seite keine Marke + gesetzt, so entspricht es der zuletzt gesetzten Marke auf den bereits + ausgegebenen Seiten. Die \LaTeX-Anweisung + \Macro{rightmark}\important{\Macro{rightmark}} verwendet genau diese Marke, + gibt also den rechten Teil der ersten Marke der Seite aus. Dies entspricht + ebenfalls \Macro{rightfirstmark}\important{\Macro{rightfirstmark}}. Im + Vergleich dazu gibt \Macro{leftfirstmark}\important{\Macro{leftfirstmark}} + den linken Teil dieser Marke aus. + + \Macro{topmark}\IndexCmd{topmark}\important{\Macro{topmark}} ist der Inhalt, + den \Macro{botmark} hatte, bevor die aktuelle Seite zusammengestellt + wurde. \LaTeX{} verwendet dies selbst nie. + \IfThisCommonLabelBase{scrlayer}{% + \Package{scrlayer}% + }{% + \hyperref[cha:scrlayer]{\Package{scrlayer}}% + } bietet die Möglichkeit, mit + \Macro{lefttopmark}\important{\Macro{lefttopmark}} den linken Teil + dieser Marke und mit \Macro{righttopmark}\important{\Macro{righttopmark}} + den rechten Teil auszugeben. + + Es\textnote{Achtung!} ist zu beachten, dass der linke und rechte Teil der + Marke immer nur gemeinsam gesetzt werden kann. Selbst wenn man mit + \DescRef{scrlayer.cmd.markright}\IndexCmd{markright} nur den rechten Teil + verändert, wird der linke Teil (unverändert) mitgesetzt. Entsprechend + setzen im doppelseitigen Layout die höheren Gliederungsebenen beim + Seitenstil + \PageStyle{headings}\important{\PageStyle{headings}}\IndexPagestyle{headings} + immer beide Teile. Beispielsweise verwendet + \DescRef{scrlayer.cmd.chaptermark} dann + \DescRef{scrlayer.cmd.markboth} mit einem leeren rechten Argument. Das ist + auch der Grund, warum \Macro{rightmark} beziehungsweise + \Macro{rightfirstmark} auf der Seite einer Kapitelüberschrift immer einen + leeren Wert zurückgibt, selbst wenn danach beispielsweise über + \DescRef{scrlayer.cmd.sectionmark} oder indirekt über + \DescRef{maincls.cmd.section} ein neuer rechter Teil + \IfThisCommonLabelBase{scrlayer-scrpage}{der Marke}{\unskip} gesetzt + wurde. + + Bitte\textnote{Achtung!} beachten Sie, dass die Verwendung einer der hier + erklärten Anweisungen zur Ausgabe des linken oder rechten Teils der Marke + innerhalb einer Seite zu unerwarteten Ergebnissen führen kann. Sie sind + wirklich nur zur Verwendung im Kopf oder Fuß eines Seitenstils + gedacht. Daher sollten sie bei \IfThisCommonLabelBase{scrlayer}{% + \Package{scrlayer}% + }{% + \hyperref[cha:scrlayer]{\Package{scrlayer}}% + } immer Teil des Inhalts + einer Ebene sein. Dagegen spielt es keine Rolle, ob sie auf den Hintergrund + oder den Vordergrund beschränkt werden, da alle Ebenen erst nach der + Zusammenstellung der aktuellen Seite ausgegeben werden. + + Näheres zum Mark-Mechanismus \iffree{von \TeX{}}{\unskip} ist beispielsweise + \cite[Kapitel~23]{knuth:texbook} zu entnehmen. Das Thema ist dort als + absolutes Expertenwissen markiert.\IfThisCommonLabelBase{scrlayeralsonot}{ + % Umbruchkorrektur + Sollte Sie obige Erklärung also eher + verwirrt haben, machen Sie sich bitte nichts daraus.}{}% + \EndIndexGroup +\fi + + +\IfThisCommonLabelBase{scrlayer-scrpage-experts}{\iffalse}{% + \csname iftrue\endcsname}% + \begin{Declaration} + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \Macro{leftmark} + \Macro{rightmark} + }{}% + \Macro{headmark} + \Macro{pagemark} + \end{Declaration} + \IfThisCommonLabelBase{scrlayer-scrpage}{% + Will man von den vordefinierten Seitenstilen abweichen, so muss man in der + Regel auch selbst entscheiden können, wo die Marken gesetzt werden + sollen. Mit \Macro{leftmark}\important{\Macro{leftmark}} platziert man die + linke Marke. Diese wird dann bei der Ausgabe der Seite durch den + entsprechenden Inhalt ersetzt. + + Dementsprechend kann man mit + \Macro{rightmark}\important{\Macro{rightmark}} die rechte Marke + platzieren, die dann bei der Ausgabe der Seite durch den entsprechenden + Inhalt ersetzt wird. Für einige Feinheiten dabei sei auch auf die + weiterführenden Erklärungen zu \DescRef{maincls-experts.cmd.rightmark} in + \autoref{sec:maincls-experts.addInfos}, + \DescPageRef{maincls-experts.cmd.rightmark} verwiesen. + + }{}% + + Mit \Macro{headmark}\important{\Macro{headmark}} kann man sich das Leben + erleichtern. Diese Erweiterung von \IfThisCommonLabelBase{scrlayer}{% + \Package{scrlayer}% + }{% + \hyperref[cha:scrlayer]{\Package{scrlayer}}% + } entspricht je nachdem, ob die aktuelle Seite eine linke oder rechte ist, + \IfThisCommonLabelBase{scrlayer-scrpage}{\Macro{leftmark} oder + \Macro{rightmark}}{\DescRef{\LabelBase.cmd.leftmark} oder + \DescRef{\LabelBase.cmd.rightmark}}. + + Die Anweisung \Macro{pagemark}\important{\Macro{pagemark}} hat genau + genommen nichts mit den Marken von \TeX{} zu tun. Sie dient dazu, eine + formatierte Seitenzahl zu platzieren. + \BeginIndex{FontElement}{pagenumber}\LabelFontElement{pagenumber}% + Bei ihrer Ausgabe wird dann auch die Schrifteinstellung für das Element + \FontElement{pagenumber}\important{\FontElement{pagenumber}} + verwendet. Diese kann mit Hilfe der Anweisungen + \DescRef{maincls.cmd.setkomafont} und \DescRef{maincls.cmd.addtokomafont} + verändert werden (siehe auch \autoref{sec:maincls.textmarkup}, + \DescPageRef{maincls.cmd.setkomafont}).% + \EndIndex{FontElement}{pagenumber}% + \IfThisCommonLabelBase{scrlayer-scrpage}{\iftrue}{% + \par% + Für ein Beispiel \iffalse zur Verwendung von + \Macro{headmark} und \Macro{pagemark} \fi % Umbruchkorrektur + siehe + \autoref{sec:scrlayer-scrpage.pagestyle.content}, + \PageRefxmpl{scrlayer-scrpage.headmark}.% + \csname iffalse\endcsname% + }% + \begin{Example} + \phantomsection\xmpllabel{headmark}% + Angenommen, Sie wollen, dass auch im einseitigen Modus der Kolumnentitel + immer am linken Rand und die Seitenzahl immer am rechten Rand + ausgerichtet wird. Beide sollen im Kopf platziert werden. Das folgende, + vollständige Minimalbeispiel liefert genau dies: +\begin{lstcode} + \documentclass{scrreprt} + \usepackage{blindtext} + \usepackage[automark]{scrlayer-scrpage} + \ihead{\headmark} + \ohead*{\pagemark} + \chead{} + \cfoot[]{} + \begin{document} + \blinddocument + \end{document} +\end{lstcode} + Das Paket \Package{blindtext}\IndexPackage{blindtext} mit seiner + Anweisung \Macro{blinddocument}\IndexCmd{blinddocument} wird hier für + die komfortable Erzeugung eines Beispieldokumentinhalts verwendet. + + Mit den Anweisungen \DescRef{scrlayer-scrpage.cmd.ihead}\IndexCmd{ihead} + und \DescRef{scrlayer-scrpage.cmd.ohead*}\IndexCmd{ohead*} werden die + gewünschten Marken platziert. Dabei wird die + Seitenzahl\iffalse-Marke\fi{} durch die Sternform + \DescRef{scrlayer-scrpage.cmd.ohead*} % + \iffalse% Umbruchvarianten + nicht nur auf den mit + \DescRef{\LabelBase.pagestyle.scrheadings}\IndexPagestyle{scrheadings} + gesetzten Seiten, sondern auch für den auf Kapitelanfangsseiten + automatisch verwendeten \PageStyle{plain}-Seitenstil % + \else% + auch für den auf Kapitelanfangsseiten verwendeten Seitenstil % + \fi% + \DescRef{\LabelBase.pagestyle.plain.scrheadings}% + \IndexPagestyle{plain.scrheadings} konfiguriert.% + + Da die Seitenstile bereits mit Marken in der Mitte von Kopf oder + Fuß vordefiniert sind, werden diese beiden Elemente mit + \DescRef{scrlayer-scrpage.cmd.chead} und + \DescRef{scrlayer-scrpage.cmd.cfoot} gelöscht. Hierzu werden leere + Argumente verwendet. Alternativ dazu hätte man auch + \DescRef{scrlayer-scrpage-experts.cmd.clearpairofpagestyles} + \IndexCmd{clearpairofpagestyles} + \emph{vor} \DescRef{scrlayer-scrpage.cmd.ihead} verwenden können. Diese + Anweisung wird jedoch erst in + \autoref{sec:scrlayer-scrpage-experts.pagestyle.pairs} auf + \DescPageRef{scrlayer-scrpage-experts.cmd.clearpairofpagestyles} + erklärt werden. + \end{Example}% + + Bitte beachten Sie, dass das leere optionale Argument bei + \DescRef{scrlayer-scrpage.cmd.cfoot} im Beispiel nicht gleichbedeutend mit + dem Weglassen dieses optionalen Arguments ist. Sie sollten das einmal + selbst ausprobieren und dabei den Fuß der ersten Seite beobachten.% + \fi + + \IfThisCommonLabelBase{scrlayer-scrpage}{% Umbruchvarianten + Fortgeschrittene Anwender finden ab + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \DescPageRef{scrlayer-scrpage-experts.cmd.righttopmark}}{% + \DescPageRef{\ThisCommonLabelBase.cmd.righttopmark}} weitere + Marken-Anweisungen.% + }{}% + \iffalse% Umbruchkorrektur + \ Beispielsweise ist für lexikonartige Dokumente das dort erklärte + \DescRef{scrlayer-scrpage-experts.cmd.leftfirstmark} und + \DescRef{scrlayer-scrpage-experts.cmd.rightbotmark} recht nützlich.% + \fi % + \EndIndexGroup + + + \begin{Declaration} + \Macro{partmarkformat} + \Macro{chaptermarkformat} + \Macro{sectionmarkformat} + \Macro{subsectionmarkformat} + \Macro{subsubsectionmarkformat} + \Macro{paragraphmarkformat} + \Macro{subparagraphmarkformat} + \end{Declaration} + Diese Anweisungen werden von den \KOMAScript-Klassen und auch von + \IfThisCommonLabelBase{scrlayer}{% + \Package{scrlayer}% + }{% + \hyperref[cha:scrlayer]{\Package{scrlayer}}% + } intern üblicherweise verwendet, um die Gliederungsnummern der + automatischen Kolumnentitel zu formatieren. Dabei wird auch der + \DescRef{maincls.cmd.autodot}-Mechanismus der \KOMAScript-Klassen + unterstützt. Bei Bedarf können diese Anweisungen umdefiniert werden, um eine + andere Formatierung der Nummern zu erreichen.% + \IfThisCommonLabelBase{scrlayer-scrpage}{\iftrue}{% + \ Siehe dazu gegebenenfalls das Beispiel in + \autoref{sec:scrlayer-scrpage.pagestyle.content}, auf + \PageRefxmpl{scrlayer-scrpage.cmd.sectionmarkformat}.% + \csname iffalse\endcsname% + }% + \begin{Example} + \phantomsection\xmpllabel{cmd.sectionmarkformat}% + \iffalse + Wollen Sie auf Abschnittsebene Kolumnentitel ohne Gliederungsnummer, + geht das beispielsweise so: + \else + Angenommen, Sie wollen, dass Abschnittsüberschriften im Kolumnentitel + ohne Gliederungsnummer gesetzt werden, so ist das ganz + einfach mit + \fi +\begin{lstcode} + \renewcommand*{\sectionmarkformat}{} +\end{lstcode} + zu erreichen.% + \end{Example}% + \ExampleEndFix + \fi + % + \EndIndexGroup + + + \iffree{% + \begin{Declaration}% + }{\begin{Declaration}[0]}% Umbruchkorrektur + \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} + Diese Anweisungen werden intern von den meisten Klassen verwendet, um die + Marken entsprechend der Gliederungsbefehle zu setzen. Dabei wird als + Argument lediglich der Text, nicht jedoch die Nummer erwartet. Die Nummer + wird stattdessen automatisch über den aktuellen Zählerstand ermittelt, falls + mit nummerierten Überschriften gearbeitet wird. + + Allerdings\textnote{Achtung!} verwenden nicht alle Klassen in allen + Gliederungsebenen eine solche Anweisung. % + \IfThisCommonLabelBase{scrlayer-scrpage}{% Umbruchvarianten + Beispielsweise rufen die Standardklassen\textnote{\KOMAScript{} + vs. Standardklassen} \Macro{partmark} bei \Macro{part} nicht auf.% + }{% + So wird beispielsweise \Macro{partmark} von den + Standardklassen\textnote{\KOMAScript{} vs. Standardklassen} nie + aufgerufen, während die \KOMAScript-Klassen selbstverständlich auch + \Macro{partmark} unterstützen.% + } + + Falls diese Anweisungen vom Anwender umdefiniert werden, sollte + er\textnote{Achtung!} unbedingt darauf achten, vor dem Setzen der Nummer + ebenfalls über \DescRef{maincls.counter.secnumdepth} zu prüfen, ob die + Nummern auszugeben sind. Dies gilt auch, wenn der Anwender + \DescRef{maincls.counter.secnumdepth} selbst nicht verändert, weil Pakete + und Klassen sich eventuell auf die Wirkung von + \DescRef{maincls.counter.secnumdepth} verlassen! + + Das Paket \IfThisCommonLabelBase{scrlayer}{% + \Package{scrlayer}% + }{% + \hyperref[cha:scrlayer]{\Package{scrlayer}}% + } definiert diese Anweisungen außerdem bei jedem Aufruf von + \DescRef{scrlayer.cmd.automark} oder \DescRef{scrlayer.cmd.manualmark} oder + den entsprechenden Optionen teilweise neu, um so die gewünschten + automatischen oder manuellen Kolumnentitel zu erreichen.% + \EndIndexGroup + + + \begin{Declaration} + \Macro{markleft}\Parameter{linke Marke} + \Macro{markright}\Parameter{rechte Marke} + \Macro{markboth}\Parameter{linke Marke}\Parameter{rechte Marke} + \Macro{markdouble}\Parameter{Marke} + \end{Declaration} + Unabhängig davon, ob gerade mit manuellen oder automatischen Kolumnentiteln + gearbeitet wird, kann man jederzeit die \PName{linke Marke} oder + \PName{rechte Marke} mit einer dieser Anweisungen setzen. Dabei ist zu + beachten, dass die resultierende linke Marke in + \Macro{leftmark}\IndexCmd{leftmark}\important{\Macro{leftmark}} die letzte + auf der entsprechenden Seite gesetzte Marke ist, während die resultierende + rechte Marke in + \Macro{rightmark}\IndexCmd{rightmark}\important{\Macro{rightmark}} die erste + auf der entsprechenden Seite gesetzte Marke ausgibt. Näheres dazu ist den + weiterführenden Erklärungen zu \DescRef{maincls-experts.cmd.rightmark} in + \autoref{sec:maincls-experts.addInfos}, + \DescPageRef{maincls-experts.cmd.rightmark} oder zu + \DescRef{scrlayer.cmd.rightfirstmark}\IfThisCommonLabelBase{scrlayer}{}{ in + \autoref{sec:scrlayer.pagestyle.content}}, + \DescPageRef{scrlayer.cmd.rightfirstmark} zu entnehmen. + + Wird mit manuellen Kolumnentiteln\Index{Kolumnentitel>manuell} gearbeitet, + so bleiben die Marken gültig, bis sie durch erneute Verwendung der + entsprechenden Anweisung explizit ersetzt werden. Bei automatischen + Kolumnentiteln können Marken hingegen je nach Konfigurierung des + Automatismus ihre Gültigkeit mit einer der nächsten Gliederungsüberschriften + verlieren. + + Auch im Zusammenhang mit den Sternvarianten der Gliederungsbefehle können + diese Anweisungen nützlich sein.% + \IfThisCommonLabelBase{scrlayer-scrpage}{\iftrue}{% + \ Ausführliche Beispiele für die Verwendung von \Macro{markboth} mit dem + von \IfThisCommonLabelBase{scrlayer-scrpage}{% + \hyperref[cha:scrlayer]{\Package{scrlayer}}% + }{% + \Package{scrlayer}% + } abgeleiteten Paket \IfThisCommonLabelBase{scrlayer-scrpage}{% + \Package{scrlayer-scrpage}% + }{% + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + } sind in \autoref{sec:scrlayer-scrpage.pagestyle.content}, ab + \PageRefxmpl{scrlayer-scrpage.cmd.markboth} zu finden.% + \csname iffalse\endcsname% + }% + \begin{Example} + \phantomsection\xmpllabel{cmd.markboth}% + Angenommen, Sie schreiben noch vor dem Inhaltsverzeichnis ein Vorwort + über mehrere Seiten, das jedoch im Inhaltsverzeichnis nicht auf"|tauchen + soll. Da Sie aber Trennlinien im Kopf verwenden, soll der Kolumnentitel + das Vorwort dennoch zeigen: +\begin{lstcode} + \documentclass[headsepline]{book} + \usepackage[automark]{scrlayer-scrpage} + \usepackage{blindtext} + \begin{document} + \chapter*{Vorwort} + \markboth{Vorwort}{Vorwort} + \blindtext[20] + \tableofcontents + \blinddocument + \end{document} +\end{lstcode} + Zunächst erscheint das Ergebnis wunschgemäß. Vielleicht erst beim + zweiten Blick fällt aber auf, dass der Kolumnentitel »\texttt{Vorwort}« + im Gegensatz zu den übrigen Kolumnentiteln nicht im Versalsatz + erscheint. Das ist jedoch leicht zu ändern: +\begin{lstcode} + \documentclass[headsepline]{book} + \usepackage[automark]{scrlayer-scrpage} + \usepackage{blindtext} + \begin{document} + \chapter*{Vorwort} + \markboth{\MakeMarkcase{Vorwort}}% + {\MakeMarkcase{Vorwort}} + \blindtext[20] + \tableofcontents + \blinddocument + \end{document} +\end{lstcode} + Wie zu sehen ist, wurde \DescRef{scrlayer.cmd.MakeMarkcase}% + \IndexCmd{MakeMarkcase}\important{\DescRef{scrlayer.cmd.MakeMarkcase}} + verwendet, um auch den manuell korrigierten Kolumnentitel des Vorworts + entsprechend der automatischen Kolumnentitel des restlichen Dokuments + anzupassen. + + Verschieben Sie nun einmal \DescRef{maincls.cmd.tableofcontents}% + \Index{Inhaltsverzeichnis}\IndexCmd{tableofcontents}% + \important{\DescRef{maincls.cmd.tableofcontents}} vor das Vorwort und + entfernen Sie die \Macro{markboth}-Anweisung. Sie werden entdecken, dass + das Vorwort als Kolumnentitel nun »\texttt{CONTENTS}« trägt. Das liegt + an einer Eigenart von \DescRef{maincls.cmd.chapter*}% + \IndexCmd{chapter*}\important{\DescRef{maincls.cmd.chapter*}} (siehe + auch in \autoref{sec:maincls.structure} auf + \DescPageRef{maincls.cmd.chapter*}). Soll hier stattdessen kein + Kolumnentitel erscheinen, so ist dies sehr einfach mit \Macro{markboth} + mit zwei leeren Argumenten zu erreichen: +\begin{lstcode} + \documentclass[headsepline]{book} + \usepackage[automark]{scrlayer-scrpage} + \usepackage{blindtext} + \begin{document} + \tableofcontents + \chapter*{Vorwort} + \markboth{}{} + \blindtext[20] + \blinddocument + \end{document} +\end{lstcode} + \end{Example} + \fi% + Die\ChangedAt{v3.28}{\Package{scrlayer}} Anweisung + \Macro{markdouble}\important{\Macro{markdouble}} setzt sowohl die linke als + auch rechte Marke auf denselben Inhalt. Damit ist + \Macro{markdouble}\Parameter{Marke} eine abkürzende Schreibweise für + \Macro{markboth}\Parameter{Marke}\Parameter{Marke} mit zwei identischen + Argumenten.% + \EndIndexGroup +\fi + + +\IfThisCommonLabelBase{scrlayer-scrpage}{\iffalse}{\csname iftrue\endcsname} + \begin{Declaration} + \Macro{GenericMarkFormat}\Parameter{Gliederungsname} + \end{Declaration} + Diese Anweisung wird in der Voreinstellung zur Formatierung aller + Gliederungsnummern in automatischen Kolumnentiteln unterhalb der + Unterabschnitte und bei Klassen ohne \DescRef{maincls.cmd.chapter} + zusätzlich auch für die Ebene der Abschnitte und Unterabschnitte verwendet, + soweit die entsprechenden Mark-Anweisungen nicht bereits anderweitig + definiert sind. Dabei verwendet die Anweisung in der Voreinstellung + \Macro{@seccntmarkformat}\IndexCmd{@seccntmarkformat}% + \important{\Macro{@seccntmarkformat}}, wenn eine solche interne Anweisung + wie bei den \KOMAScript-Klassen definiert ist. Anderenfalls wird mit + \Macro{@seccntformat}\IndexCmd{@seccntformat}\important{\Macro{@seccntformat}} + eine Anweisung verwendet, die bereits vom \LaTeX-Kern für Klassen und Pakete + bereitgestellt und von \KOMAScript{} etwas modifiziert wird. Als Argument + erwartet \Macro{GenericMarkFormat} den Namen der Gliederung, also + beispielsweise \PValue{chapter} oder \PValue{section} \emph{ohne} + vorangestellten umgekehrten Schrägstrich (engl. \emph{backslash}). + + Durch Umdefinierung dieser Anweisung kann damit die Standardformatierung + aller Gliederungsnummern im Kolumnentitel geändert werden, die darauf + zurückgreifen. Ebenso kann eine Klasse darüber eine andere + Standardformatierung vorgeben, ohne alle Befehle einzeln ändern zu müssen.% + \IfThisCommonLabelBase{scrlayer-scrpage-experts}{\iftrue}{% + \par % + Ein ausführliches Beispiel für das Zusammenspiel der Anweisung + \Macro{GenericMarkFormat} mit den auf + \DescPageRef{\ThisCommonLabelBase.cmd.chaptermark} erklärten Anweisungen + \DescRef{\ThisCommonLabelBase.cmd.sectionmarkformat} und + \DescRef{\ThisCommonLabelBase.cmd.subsectionmarkformat} beziehungsweise + \DescRef{\ThisCommonLabelBase.cmd.chaptermarkformat} bei Verwendung des + von \IfThisCommonLabelBase{scrlayer}{% + \Package{scrlayer}% + }{% + \hyperref[cha:scrlayer]{\Package{scrlayer}}% + } abgeleiteten Pakets \IfThisCommonLabelBase{scrlayer-scrpage}{% + \Package{scrlayer-scrpage}% + }{% + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + } ist in \autoref{sec:scrlayer-scrpage-experts.pagestyle.content}, ab + \PageRefxmpl{scrlayer-scrpage-experts.cmd.GenericMarkFormat} zu finden.% + \csname iffalse\endcsname}% + \begin{Example} + \phantomsection + \xmpllabel{cmd.GenericMarkFormat}% + Angenommen, Sie wollen, dass bei allen Gliederungsnummern im + Kolumnentitel eines Artikels die Nummer als weiße Schrift auf einem + schwarzen Kasten ausgegeben wird. Da bei Artikeln mit Klasse + \Class{article} die Anweisungen \DescRef{scrlayer.cmd.sectionmarkformat}% + \IndexCmd{sectionmarkformat}% + \important{% + \DescRef{scrlayer.cmd.sectionmarkformat}\\ + \DescRef{scrlayer.cmd.subsectionmarkformat}} und + \DescRef{scrlayer.cmd.subsectionmarkformat}% + \IndexCmd{subsectionmarkformat} von \IfThisCommonLabelBase{scrlayer}{% + \Package{scrlayer}% + }{% + \hyperref[cha:scrlayer]{\Package{scrlayer}}% + } mit Hilfe von + \Macro{GenericMarkFormat} definiert werden, genügt dafür die + entsprechende Umdefinierung dieser einen Anweisung: +\begin{lstcode}[moretexcs={colorbox,textcolor}] + \documentclass{article} + \usepackage{blindtext} + \usepackage[automark]{scrlayer-scrpage} + \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} + % Umbruchkorrektur (mit Ausgleich zur linken Seite): + \iffree{}{\enlargethispage{-\baselineskip}\pagebreak}% + Für die Farbumschaltungen werden Anweisungen des Pakets + \Package{xcolor}\IndexPackage{xcolor} verwendet. Näheres dazu ist der + Anleitung zum Paket zu entnehmen (siehe \cite{package:xcolor}). + \iffalse \par\fi % Umbruchkorrektur (zusammen mit nachfolgender) + Außerdem wird eine unsichtbare Stütze mit \Macro{strut} + eingefügt.% + \iffalse Diese Anweisung sollte in keiner ausführlichen + \LaTeX-Einführung fehlen. \fi % siehe oben + + Für den Kasten mit der Nummer wird eine eigene Hilfsanweisung + \Macro{numberbox} definiert. Diese wird in der Umdefinierung von + \Macro{GenericMarkFormat} mit + \Macro{protect}\IndexCmd{protect}\important{\Macro{protect}} vor der + Expansion geschützt. Dies ist notwendig, weil sonst durch das + \Macro{MakeUppercase}\IndexCmd{MakeUppercase}% + \important{\Macro{MakeUppercase}} für den Versalsatz der Kolumnentitel + nicht mehr die Farben »\texttt{black}« und »\texttt{white}«, sondern die + Farben »\texttt{BLACK}« und »\texttt{WHITE}« verlangt würden, die gar + nicht definiert sind. Alternativ könnte man \Macro{numberbox} auch mit + Hilfe von \Macro{DeclareRobustCommand*} statt mit \Macro{newcommand*} + definieren (siehe \cite{latex:clsguide}). + + Wollte man dasselbe mit einer \KOMAScript-Klasse oder mit den + Standardklassen \Class{book} oder \Class{report} erreichen, so müsste + man übrigens zusätzlich + \DescRef{scrlayer.cmd.sectionmarkformat}% + \IndexCmd{sectionmarkformat}% + \important{\DescRef{scrlayer.cmd.sectionmarkformat}} und -- + je nach Klasse -- + \DescRef{scrlayer.cmd.subsectionmarkformat}% + \IndexCmd{subsectionmarkformat}% + \important{\DescRef{scrlayer.cmd.subsectionmarkformat}} + beziehungsweise \DescRef{scrlayer.cmd.chaptermarkformat}% + \IndexCmd{chaptermarkformat}% + \important{\DescRef{scrlayer.cmd.chaptermarkformat}} + umdefinieren, da diese bei Verwendung der genannten Klassen + \Macro{GenericMarkFormat} nicht verwenden: +\begin{lstcode}[moretexcs={colorbox,textcolor}] + \documentclass[headheight=19.6pt]{scrbook} + \usepackage{blindtext} + \usepackage[automark]{scrlayer-scrpage} + \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} + Über Option \DescRef{typearea.option.headheight} wird dabei auch die + Warnung beseitigt, die im vorherigen Beispiel noch erzeugt wurde.% + \end{Example} + \fi% + \EndIndexGroup +\fi + + +\IfThisCommonLabelBase{scrlayer-scrpage}{\iffalse}{\csname iftrue\endcsname} + \begin{Declaration} + \Macro{@mkleft}\Parameter{linke Marke}% + \Macro{@mkright}\Parameter{rechte Marke}% + \Macro{@mkdouble}\Parameter{Marke}% + \Macro{@mkboth}\Parameter{linke Marke}\Parameter{rechte Marke}% + \end{Declaration} + Innerhalb der Klassen und Pakete kommt es vor, dass Kolumnentitel nur dann + gesetzt werden sollen, wenn automatische Kolumnentitel (siehe Option + \DescRef{scrlayer.option.automark} und Anweisung + \DescRef{scrlayer.cmd.automark} auf + \DescPageRef{scrlayer.cmd.automark}) aktiviert sind. Bei + den Standardklassen geht dies ausschließlich über \Macro{@mkboth}. Diese + Anweisung entspricht entweder \Macro{@gobbletwo}, einer Anweisung, die ihre + beiden Argumente vernichtet, oder \DescRef{scrlayer.cmd.markboth}, + einer Anweisung, mit der sowohl eine \PName{linke Marke} als auch eine + \PName{rechte Marke} gesetzt wird. Pakete wie \Package{babel} hängen sich + ebenfalls in \Macro{@mkboth} ein, um beispielsweise noch eine + Sprachumschaltung im Kolumnentitel vorzunehmen. + + Will man nun jedoch nur eine \PName{linke Marke} oder nur eine \PName{rechte + Marke} setzen, ohne die jeweils andere Marke zu verändern, so fehlen + entsprechende Anweisungen. Das Paket \IfThisCommonLabelBase{scrlayer}{% + \Package{scrlayer}% + }{% + \hyperref[cha:scrlayer]{\Package{scrlayer}}% + } selbst benötigt entsprechende Anweisungen beispielsweise im Rahmen der + automatischen Kolumnentitel. Sind \Macro{@mkleft} zum Setzen nur der + \PName{linken Marke}, \Macro{@mkright} zum Setzen nur der \PName{rechten + Marke} oder \Macro{@mkdouble} zum Setzen sowohl der rechten als auch der + linken \PName{Marke} mit demselben Inhalt beim Laden von + \IfThisCommonLabelBase{scrlayer}{% + \Package{scrlayer}% + }{% + \hyperref[cha:scrlayer]{\Package{scrlayer}}% + } nicht definiert, so werden sie vom Paket selbst definiert. Dabei wird eine + Definition gewählt, die am Zustand von \Macro{@mkboth} erkennt, ob mit + automatischen Kolumnentiteln gearbeitet wird. Nur in diesem Fall setzen die + Befehle auch eine entsprechende Marke.% + + Klassen- und Paketautoren können ebenfalls auf die passende der vier + Anweisungen zurückgreifen, wenn sie linke oder rechte Marken setzen und + dies auf den Fall beschränken wollen, dass mit automatischen Kolumnentiteln + gearbeitet wird.% + \EndIndexGroup% +\fi + +\IfThisCommonLabelBase{scrlayer}{% + Zu weiteren Möglichkeiten zur Beeinflussung der Inhalte von Seitenstilen + siehe auch \autoref{sec:scrlayer-scrpage.pagestyle.content}, + \autopageref{sec:scrlayer-scrpage.pagestyle.content}.% +}{}% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Seitenstilen Ebenenmodell scrpage headings myheadings plain +% LocalWords: empty scrlayer Seitenstil Rückgriffe Gliederungsnummern +% LocalWords: Standardklassen Seitenstile konsistenteren Befehlssatzes +% LocalWords: Einstellmöglichkeiten Seiteninhalts Gliederungsüberschrift +% LocalWords: Maßlinien Entwurfsphase Unterabschnittsüberschrift Versalsatz +% LocalWords: Abschnittsüberschrift Kapitelüberschrift Glyphenanalyse +% LocalWords: Hilfsanweisung content Expertenwissen Gliederungsebenen +% LocalWords: Gliederungsüberschriften Kapitelüberschriften Kolumnentitel +% LocalWords: Abschnittsüberschriften Gliederungsnummer Kapitelanfangsseite +% LocalWords: Kolumnentiteln Abschnittsebene Paketautoren diff --git a/macros/latex/contrib/koma-script/doc/common-pagestylemanipulation-en.tex b/macros/latex/contrib/koma-script/doc/common-pagestylemanipulation-en.tex new file mode 100644 index 0000000000..c66ecb341b --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-pagestylemanipulation-en.tex @@ -0,0 +1,1034 @@ +% ====================================================================== +% common-pagestylemanipulation-en.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% +% Text that is common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{common-pagestylemanipulation-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraph: + Setting up defined page styles)] +\translator{Markus Kohm\and Jana Schubert\and Karl Hagen} + +\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} + \IfThisCommonLabelBase{scrlayer}{% + \Option{automark} + \OptionVName{autooneside}{simple switch} + \Option{manualmark} + }{}% + \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% + 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}.% + }{% + \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. +% TODO: Fix new translation + With \Package{scrlayer} the distinction is done with the two commands + \Macro{automark} and \Macro{manualmark}.% +% :ODOT + }{\InternalCommonFileUsageError}% + }% + + 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 + + \IfThisCommonLabelBase{scrlayer}{}{% + \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 + + \IfThisCommonLabelBaseOneOf{scrlayer,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}{\par% + You can find additional background information and examples of how to use + these commands in the documentation for the \Package{scrlayer} package + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + in \autoref{sec:scrlayer-scrpage.pagestyle.content}, starting on + \DescPageRef{scrlayer-scrpage.cmd.manualmark}.% + }{% + \EndIndexGroup% + }% + \EndIndexGroup + + + \IfThisCommonLabelBase{scrlayer}{% already described at \layercontentsmeasure + }{% + \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} + \OptionVName{markcase}{value} + \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}. Using the \DescRef{\LabelBase.option.markcase}% + \IndexOption{markcase}\important{\DescRef{\LabelBase.option.markcase}} + option with one of the values of \autoref{tab:scrlayer-scrpage.markcase} + also redefines \Macro{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 +\fi + + +\IfThisCommonLabelBase{scrlayer-scrpage}{\iffalse}{\csname iftrue\endcsname} + \begin{Declaration} + \Macro{righttopmark} + \Macro{rightbotmark} + \Macro{rightfirstmark} + \Macro{rightmark} + \Macro{lefttopmark} + \Macro{leftbotmark} + \Macro{leftfirstmark} + \Macro{leftmark} + \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 +\fi + + +\IfThisCommonLabelBase{scrlayer-scrpage-experts}{\iffalse}{% + \csname iftrue\endcsname}% + \begin{Declaration} + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \Macro{leftmark} + \Macro{rightmark} + }{}% + \Macro{headmark} + \Macro{pagemark} + \end{Declaration} + \IfThisCommonLabelBase{scrlayer-scrpage}{% + 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 used 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} + \renewcommand*{\sectionmarkformat}{} +\end{lstcode} + \end{Example} + \ExampleEndFix + \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} + \Macro{markdouble}\Parameter{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% +% TODO: Fix new translation + The\ChangedAt{v3.28}{\Package{scrlayer}} command + \Macro{markdouble}\important{\Macro{markdouble}} does change the left mark + and the right mark to the same contents. So + \Macro{markdouble}\Parameter{mark} is a shorter form of + \Macro{markboth}\Parameter{mark}\Parameter{mark} with two identical + arguments.% +% :ODOT + \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[headheight=19.6pt]{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} + % TODO: New translation + Here, option \DescRef{typearea.option.headheight} is used to eliminate + the warning, that also has been reported in the previous example.% + % :ODOT + \end{Example} + \fi% + \EndIndexGroup +\fi + + +\IfThisCommonLabelBase{scrlayer-scrpage}{\iffalse}{\csname iftrue\endcsname} + \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 +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: scrlayer diff --git a/macros/latex/contrib/koma-script/doc/common-parmarkup-de.tex b/macros/latex/contrib/koma-script/doc/common-parmarkup-de.tex new file mode 100644 index 0000000000..f61e7ecbc3 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-parmarkup-de.tex @@ -0,0 +1,260 @@ +% ====================================================================== +% common-parmarkup-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-parmarkup-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] + +\section{Absatzauszeichnung} +\seclabel{parmarkup}% +\BeginIndexGroup +\BeginIndex{}{Absatz>Auszeichnung}% + +\IfThisCommonLabelBase{maincls}{% + Die\textnote{Absatzeinzug vs. Absatzabstand} Standardklassen setzen + Absätze\Index[indexmain]{Absatz} normalerweise mit Absatzeinzug und ohne + Absatzabstand. Bei Verwendung eines normalen Satzspiegels, wie ihn + \Package{typearea} bietet, ist dies die vorteilhafteste + Absatzauszeichnung. Würde man ohne Einzug und Abstand arbeiten, hätte der + Leser als Anhaltspunkt nur die Länge der letzten Zeile. Im Extremfall kann + es sehr schwer sein zu erkennen, ob eine Zeile voll ist oder nicht. Des + Weiteren stellt der Typograf fest, dass die Auszeichnung des Absatzendes am + Anfang der nächsten Zeile leicht vergessen ist. Demgegenüber ist eine + Auszeichnung am Absatzanfang einprägsamer. Der Absatzabstand hat den + Nachteil, dass er in verschiedenem Zusammenhang leicht verloren geht. So + wäre nach einer abgesetzten Formel nicht mehr festzustellen, ob der Absatz + fortgesetzt wird oder ein neuer beginnt. Auch am Seitenanfang müsste + zurückgeblättert werden, um feststellen zu können, ob mit der Seite auch ein + neuer Absatz beginnt. All diese Probleme sind beim Absatzeinzug nicht + gegeben. Eine Kombination von Absatzeinzug und Absatzabstand ist wegen der + übertriebenen Redundanz abzulehnen. Der Einzug\Index[indexmain]{Einzug} + alleine ist deutlich genug. Der einzige Nachteil des Absatzeinzugs liegt in + der Verkürzung der Zeile. Damit gewinnt der + Absatzabstand\Index{Absatz>Abstand} bei ohnehin kurzen Zeilen, etwa im + Zeitungssatz, seine Berechtigung.% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + In der Einleitung zu \autoref{sec:maincls.parmarkup} ab + \autopageref{sec:maincls.parmarkup} wird dargelegt, warum der Absatzeinzug + gegenüber dem Absatzabstand vorzuziehen ist. Die Elemente, auf die sich + diese Argumente beziehen, beispielsweise Abbildungen, Tabellen, Listen, + abgesetzte Formeln und auch neue Seiten, sind in Standardbriefen eher + selten. Auch sind Briefe normalerweise nicht so umfänglich, dass ein nicht + erkannter Absatz sich schwerwiegend auf die Lesbarkeit auswirkt. Die + Argumente sind daher bei Standardbriefen eher schwach. Dies dürfte ein + Grund dafür sein, dass der Absatzabstand bei Briefen eher gebräuchlich + ist. Es bleiben damit für Standardbriefe im Wesentlichen zwei Vorteile des + Absatzeinzugs. Zum einen hebt sich ein solcher Brief aus der Masse hervor + und zum anderen durchbricht man damit nicht für Briefe das einheitliche + Erscheinungsbild aller Dokumente aus einer Quelle, die so genannte + \emph{Corporate Identity}.\par% + }{\InternalCommonFileUsageError}% +} % +\IfThisCommonFirstRun{}{% + Über diese Überlegungen hinaus gilt \IfThisCommonLabelBase{scrlttr2}{% + \autoref{sec:\ThisCommonFirstLabelBase.parmarkup} sinngemäß.}{sinngemäß, + was in \autoref{sec:\ThisCommonFirstLabelBase.parmarkup} geschrieben + wurde.} Falls Sie also \autoref{sec:\ThisCommonFirstLabelBase.parmarkup} + bereits gelesen und verstanden haben, können Sie nach dem Ende dieses + Abschnitts auf \autopageref{sec:\ThisCommonLabelBase.parmarkup.next} mit + \autoref{sec:\ThisCommonLabelBase.parmarkup.next} fortfahren.% + \IfThisCommonLabelBase{scrlttr2}{ % + Dies gilt ebenso, wenn Sie nicht mit Klasse + \Class{scrlttr2}\OnlyAt{scrlttr2}, sondern mit Paket \Package{scrletter} + arbeiten. Das Paket bietet keine eigenen Einstellungen für die + Absatzauszeichnung, sondern verlässt sich dabei ganz auf die verwendete + Klasse.% + }{}% +} + + +\begin{Declaration} + \OptionVName{parskip}{Methode} +\end{Declaration} +\IfThisCommonLabelBase{maincls}{% + Hin und wieder wird ein Layout mit Absatzabstand anstelle des + voreingestellten Absatzeinzugs gefordert. Die \KOMAScript-Klassen bieten mit + der Option \Option{parskip}\ChangedAt{v3.00}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} % +}{% + \IfThisCommonLabelBase{scrlttr2}{% + Bei Briefen findet man häufiger ein Layout mit Absatzabstand anstelle des + voreingestellten Absatzeinzugs. Die \KOMAScript-Klasse + \Class{scrlttr2}\OnlyAt{scrlttr2} + bietet mit der Option \Option{parskip} % + }{\InternalCommonFileUsageError}% +}% +eine Reihe von Möglichkeiten, um dies zu erreichen. Die \PName{Methode} setzt +sich dabei aus zwei Teilen zusammen. Der erste Teil ist entweder +\PValue{full}\important{\OptionValue{parskip}{full}\\ + \OptionValue{parskip}{half}} oder \PValue{half}, wobei \PValue{full} für +einen Absatzabstand von einer Zeile und \PValue{half} für einen Absatzabstand +von einer halben Zeile steht. Der zweite Teil ist eines der Zeichen +»\PValue{*}«, »\PValue{+}«, »\PValue{-}« und kann auch entfallen. Lässt man +das Zeichen\important{\OptionVName{parskip}{Abstand}} weg, so wird in der +letzten Zeile des Absatzes am Ende mindestens ein Geviert, das ist 1\Unit{em}, +freigelassen. Mit dem +Pluszeichen\important{\OptionValue{parskip}{\PName{Abstand}+}} wird am +Zeilenende mindestens ein Drittel und mit dem +Stern\important{\OptionValue{parskip}{\PName{Abstand}*}} mindestens ein +Viertel einer normalen Zeile freigelassen. Mit der +Minus-Variante\important{\OptionValue{parskip}{\PName{Abstand}-}} werden keine +Vorkehrungen für die letzte Zeile eines Absatzes getroffen. + +Die Einstellung kann jederzeit geändert werden. Wird sie innerhalb des +Dokuments geändert, so wird implizit die Anweisung +\Macro{selectfont}\IndexCmd{selectfont}% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.08}{\Class{scrlttr2}}% + }{% + \InternalComonFileUsageError% + }% +} % +ausgeführt. Änderungen der Absatzauszeichnung innerhalb eines Absatzes +werden erst am Ende des Absatzes sichtbar. + +Neben den sich so ergebenden acht Kombinationen ist es noch möglich, als +\PName{Methode} die Werte für einfache Schalter aus +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} zu +verwenden. Das Einschalten der +Option\important{\Option{parskip}\\\OptionValue{parskip}{true}} entspricht +dabei \PValue{full} ohne angehängtes Zeichen für den Freiraum der letzten +Absatzzeile, also mit mindestens einem Geviert Freiraum am Ende des +Absatzes. Das Ausschalten\important{\OptionValue{parskip}{false}} der Option +schaltet hingegen wieder auf Absatzeinzug von einem Geviert um. Dabei darf die +letzte Zeile eines Absatzes auch bis zum rechten Rand reichen. Einen Überblick +über alle möglichen Werte für \PName{Methode} bietet +\autoref{tab:\ThisCommonFirstLabelBase.parskip}% +\IfThisCommonFirstRun{.% + \iffree{}{\pagebreak}% Umbruchkorrektur + \begin{desclist} +% \begin{table} + \desccaption +% \caption + [{Mögliche Werte für Option \Option{parskip}}]{% + Mögliche Werte für Option \Option{parskip} zur Auswahl der Kennzeichnung + von Absätzen\label{tab:\ThisCommonFirstLabelBase.parskip}% + }% + {% + Mögliche Werte für Option \Option{parskip} (\emph{Fortsetzung})% + }% +% \begin{desctabular} + \entry{\PValue{false}, \PValue{off}, \PValue{no}% + \IndexOption{parskip~=\textKValue{false}}}{% + Absätze werden durch einen Einzug der ersten Zeilen von einem Geviert + (1\Unit{em}) gekennzeichnet. Absatzenden werden nicht + gekennzeichnet.}% + \entry{\PValue{full}, \PValue{true}, \PValue{on}, \PValue{yes}% + \IndexOption{parskip~=\textKValue{full}}% + }{% + Absätze werden durch einen vertikalen Abstand von einer Zeile + gekennzeichnet, Absatzenden durch einen Leerraum von mind. einem Geviert + (1\Unit{em}) der Grundschrift am Ende der letzten Zeile.}% + \pventry{full-}{% + Absätze werden durch einen vertikalen Abstand von einer Zeile + gekennzeichnet. Absatzenden werden nicht + gekennzeichnet.\IndexOption{parskip~=\textKValue{full-}}}% + \pventry{full+}{% + \looseness=-1 Absätze werden durch einen vertikalen Abstand von einer + Zeile gekennzeichnet. Absatzenden werden durch einen Leerraum von + mind. einem Drittel einer normalen Zeile + gekennzeichnet.\IndexOption{parskip~=\textKValue{full+}}}% + \pventry{full*}{% + Absätze werden durch einen vertikalen Abstand von einer Zeile + gekennzeichnet. Absatzenden werden durch einen Leerraum von mind. einem + Viertel einer normalen Zeile + gekennzeichnet.\IndexOption{parskip~=\textKValue{full*}}}% + \pventry{half}{% + Absätze werden durch einen vertikalen Abstand von einer halben Zeile + gekennzeichnet, Absatzenden durch einen Leerraum von mind. einem Geviert + (1\Unit{em}) der normalen Schrift am Ende + der letzten Zeile.\IndexOption{parskip~=\textKValue{half}}}% + \pventry{half-}{% + Absätze werden durch einen vertikalen Abstand von einer halben Zeile + gekennzeichnet. Absatzenden werden nicht + gekennzeichnet.\IndexOption{parskip~=half-}}% + \pventry{half+}{% + Absätze werden durch einen vertikalen Abstand von einer halben Zeile + gekennzeichnet. Absatzenden werden durch einen Leerraum von mind. einem + Drittel einer normalen Zeile + gekennzeichnet.\IndexOption{parskip~=\textKValue{half+}}}% + \pventry{half*}{% + Absätze werden durch einen vertikalen Abstand von einer Zeile + gekennzeichnet. Absatzenden werden durch einen Leerraum von mind. einem + Viertel einer normalen Zeile + gekennzeichnet.\IndexOption{parskip~=\textKValue{half*}}}% + \pventry{never}{% + Es % + \IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + }{% + \IfThisCommonLabelBase{scrlttr2}{\ChangedAt{v3.08}{\Class{scrlttr2}}}{}% + }% + wird auch dann kein Abstand zwischen Absätzen eingefügt, wenn für den + vertikalen Ausgleich der Einstellung + \DescRef{maincls.cmd.flushbottom}\IndexCmd{flushbottom} zusätzlicher + vertikaler Abstand verteilt werden + muss.\IndexOption{parskip~=\textKValue{never}}}% +% \end{desctabular} +% \end{table}% + \end{desclist}% +}{ auf \autopageref{tab:\ThisCommonFirstLabelBase.parskip}.} + +Wird\textnote{Achtung!} ein Absatzabstand verwendet, so verändert sich auch +der Abstand vor, nach und innerhalb von Listenumgebungen. Dadurch wird +verhindert, dass diese Umgebungen oder Absätze innerhalb dieser Umgebungen +stärker vom Text abgesetzt werden als die Absätze des normalen Textes +voneinander.% +\IfThisCommonLabelBase{maincls}{ % + Inhalts"~, Abbildungs"~ und Tabellenverzeichnis werden immer ohne + zusätzlichen Absatzabstand gesetzt.% +}{% + \iffalse% + \ Verschiedene Elemente des Briefbogens werden immer ohne Absatzabstand + gesetzt.% + \fi% +}% + +Voreingestellt\textnote{Voreinstellung} ist bei \KOMAScript{} +\OptionValue{parskip}{false}. Hierbei gibt es keinen Absatzabstand, sondern +einen Absatzeinzug von 1\Unit{em}.% +% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + diff --git a/macros/latex/contrib/koma-script/doc/common-parmarkup-en.tex b/macros/latex/contrib/koma-script/doc/common-parmarkup-en.tex new file mode 100644 index 0000000000..b2ce3f8a58 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-parmarkup-en.tex @@ -0,0 +1,248 @@ +% ====================================================================== +% common-parmarkup-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-parmarkup-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraph: Paragraph Markup)] +\translator{Gernot Hassenpflug\and Markus Kohm\and Krickette Murabayashi\and + Karl Hagen} + +\section{Marking Paragraphs} +\seclabel{parmarkup}% +\BeginIndexGroup +\BeginIndex{}{paragraph>marking}% + +\IfThisCommonLabelBase{maincls}{% + The\textnote{paragraph indent vs. paragraph spacing} standard classes + normally set paragraphs\Index[indexmain]{paragraph} indented and without any + vertical, inter-paragraph space. This is the best solution when using a + regular page layout like the ones produced with the \Package{typearea} + package. If neither indentation nor vertical space is used, only the length + of the last line would give the reader a guide to the paragraph break. In + extreme cases, it is very difficult to tell whether a line is full or not. + Furthermore, typographers find that a signal given at the paragraph's end is + easily forgotten by the start of the next line. A signal at the paragraph's + beginning is more easily remembered. Inter-paragraph spacing has the + drawback of disappearing in some contexts. For instance, after a displayed + formula it would be impossible to detect if the previous paragraph continues + or a new one begins. Also, at the top of a new page, it might be necessary + to look at the previous page to determine if a new paragraph has been + started or not. All these problems disappear when using indentation. A + combination of indentation and vertical inter-paragraph spacing is redundant + and therefore should be avoided. Indentation\Index[indexmain]{indentation} + alone is sufficient. The only drawback of indentation is that it shortens + the line length. The use of inter-paragraph spacing\Index{paragraph>spacing} + is therefore justified when using short lines, such as in a newspaper.% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + The preliminaries of \autoref{sec:maincls.parmarkup}, + \autopageref{sec:maincls.parmarkup} explain why paragraph indentation is + preferred to paragraph spacing. But the elements to which this explanation + refers, for example figures, tables, lists, equations, and even new pages, + are rare in normal letters. Letters are usually not so long that an + unrecognised paragraph will have serious consequences to the readability + of the document. The arguments for indentation, therefore, are less + consequential for standard letters. This may be one reason that you often + find paragraphs in letters marked with vertical spacing. But two + advantages of paragraph indentation remain. One is that such a letter + stands out from the crowd. Another is that it maintains the \emph{brand + identity}, that is the uniform appearance, of all documents from a single + source.% + }{\InternalCommonFileUsageError}% +} % +\IfThisCommonFirstRun{}{% + Apart from these suggestions, the information described in + \autoref{sec:\ThisCommonFirstLabelBase.parmarkup} for the other + \KOMAScript{} classes is valid for letters too. So if you have already read + and understood \autoref{sec:\ThisCommonFirstLabelBase.parmarkup} you can + skip ahead to \autoref{sec:\ThisCommonLabelBase.parmarkup.next} on + \autopageref{sec:\ThisCommonLabelBase.parmarkup.next}.% + \IfThisCommonLabelBase{scrlttr2}{ % + This also applies if you work not with the + \Class{scrlttr2}\OnlyAt{scrlttr2} class but with the \Package{scrletter} + package. The package does not provide its own settings for paragraph + formatting but relies entirely on the class being used.% + }{}% +} + + +\begin{Declaration} + \OptionVName{parskip}{method} +\end{Declaration} +\IfThisCommonLabelBase{maincls}{% + Once in a while you may require a document layout with vertical + inter-paragraph spacing instead of indentation. The \KOMAScript{} classes + provide several ways to accomplish this with the + \Option{parskip}\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} option.% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + In letters, you often encounter paragraphs marked not by indentation of + the first line but by a vertical space between them. The \KOMAScript{} + class \Class{scrlttr2}\OnlyAt{scrlttr2} provides ways to accomplish this + with the \Option{parskip} option.% + }{\InternalCommonFileUsageError}% +} % +The \PName{method} consists of two elements. The first element is either +\PValue{full}\important{\OptionValue{parskip}{full}\\ + \OptionValue{parskip}{half}} or \PValue{half}, where \PValue{full} stands +for a paragraph spacing of one line and \PValue{half} stands for a paragraph +spacing of half a line. The second element consists of one of the characters +``\PValue{*}'', ``\PValue{+}'', or ``\PValue{-}'' and can be omitted. Without +the second element\important{\OptionVName{parskip}{distance}}, the final line +of a paragraph will end with a white space of at least 1\Unit{em}. With the +plus character as the second element% +\important{\OptionValue{parskip}{\PName{distance}+}}, the white space will be +at least one third\,---\,and with the +asterisk\important{\OptionValue{parskip}{\PName{distance}*}} one +fourth\,---\,the width of a normal line. With the minus variant% +\important{\OptionValue{parskip}{\PName{Abstand}-}}, no provision is made for +white space in the last line of a paragraph. + +You can change the setting at any time. If you change it inside the document, +the \Macro{selectfont}\IndexCmd{selectfont}% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.08}{\Class{scrlttr2}}% + }{% + \InternalComonFileUsageError% + }% +} % +command will be called implicitly. Changes to paragraph spacing within a +paragraph will not be visible until the end of the paragraph. + +In addition to the resulting eight combinations for \PName{method}, you can +use the values for simple switches shown in \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch}. Activating the option% +\important{\Option{parskip}\\\OptionValue{parskip}{true}} corresponds to using +\PValue{full} with no second element and therefore results in inter-paragraph +spacing of one line with at least 1\Unit{em} white space at the end of the +last line of each paragraph. Deactivating% +\important{\OptionValue{parskip}{false}} the option re-activates the default +indentation of 1\Unit{em} at the first line of the paragraph instead of +paragraph spacing. A summary of all possible values for \PName{method} are +shown in \autoref{tab:\ThisCommonFirstLabelBase.parskip}% +\IfThisCommonFirstRun{.% + \begin{desclist} +% \begin{table} + \desccaption +% \caption + [{Available values of option \Option{parskip}}]{% + Available values of option \Option{parskip} to select + how paragraph are + distinguished\label{tab:\ThisCommonFirstLabelBase.parskip}% + }% + {% + Available values of option \Option{parskip} (\emph{continuation})% + }% + % \begin{desctabular} + \entry{\PValue{false}, \PValue{off}, \PValue{no}% + \IndexOption{parskip~=\textKValue{false}}}{% + Paragraphs are identified by indentation of the first line by 1em. + There is no spacing requirement at the end of the last line + of a paragraph.}% + \entry{\PValue{full}, \PValue{true}, \PValue{on}, \PValue{yes}% + \IndexOption{parskip~=\textKValue{full}}% + }{% + Paragraphs are identified by a vertical space of one line between + paragraphs. There must be at least 1\Unit{em} of free space at the + end of the last line of the paragraph.}% + \pventry{full-}{% + Paragraphs are identified by a vertical space of one line between + paragraphs. There is no spacing requirement at the end of the last line + of a paragraph.\IndexOption{parskip~=\textKValue{full-}}}% + \pventry{full+}{% + Paragraphs are identified by a vertical space of one line between + paragraphs. There must be at least a third of a line of free space at the + end of a paragraph.\IndexOption{parskip~=\textKValue{full+}}}% + \pventry{full*}{% + Paragraphs are identified by a vertical space of one line between + paragraphs. There must be at least a quarter of a line of free space at + the end of a paragraph.\IndexOption{parskip~=\textKValue{full*}}}% + \pventry{half}{% + Paragraphs are identified by a vertical space of half a line between + paragraphs. There must be at least 1\Unit{em} free space at the end of the + last line of a paragraph.\IndexOption{parskip~=\textKValue{half}}}% + \pventry{half-}{% + Paragraphs are identified by a vertical space of half a line between + paragraphs. There is no spacing requirement at the end of the last line + of a paragraph.\IndexOption{parskip~=\textKValue{half-}}}% + \pventry{half+}{% + Paragraphs are identified by a vertical space of half a line between + paragraphs. There must be at least a third of a line of free space at the + end of a paragraph.\IndexOption{parskip~=\textKValue{half+}}}% + \pventry{half*}{% + Paragraphs are identified by a vertical space of half a line between + paragraphs. There must be at least a quarter of a line of free space at + the end of a paragraph.\IndexOption{parskip~=\textKValue{half*}}}% + \pventry{never}{% + No% + \IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + }{% + \IfThisCommonLabelBase{scrlttr2}{% + \ChangedAt{v3.08}{\Class{scrlttr2}}% + }{}% + } % + inter-paragraph spacing will be inserted even if additional vertical + spacing is needed for vertical adjustment with + \Macro{flushbottom}.\IndexCmd{flushbottom}% + \IndexOption{parskip~=\textKValue{never}}}% +% \end{desctabular} +% \end{table}% + \end{desclist}% +}{ at \autopageref{tab:\ThisCommonFirstLabelBase.parskip}.} + +All\textnote{Attention!} eight \PValue{full} and \PValue{half} option values +also change the spacing before, after, and inside list environments. This +prevents these environments or the paragraphs inside them from having +a larger separation than that between the paragraphs of normal text.% +\IfThisCommonLabelBase{maincls}{ % + Additionally, these options ensure that the table of contents and the lists + of figures and tables are set without any additional spacing.% +}{ % + Several elements of the letterhead are always set without inter-paragraph + spacing.% +}% + +The default\textnote{default} behaviour of \KOMAScript{} is +\OptionValue{parskip}{false}. In this case, there is no spacing between +paragraphs, only an indentation of the first line by 1\Unit{em}.% +% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-textmarkup-de.tex b/macros/latex/contrib/koma-script/doc/common-textmarkup-de.tex new file mode 100644 index 0000000000..7531a7bb12 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-textmarkup-de.tex @@ -0,0 +1,953 @@ +% ====================================================================== +% common-textmarkup-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-textmarkup-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] + +\section{Textauszeichnungen} +\seclabel{textmarkup}% +\BeginIndexGroup +\BeginIndex{}{Text>Auszeichnung}% +\BeginIndex{}{Schrift>Art}% +%\BeginIndex{}{Element=\UseIndex {gen}\protect\GuideFontElement}% + +\IfThisCommonFirstRun{}{% + Es gilt sinngemäß, was in \autoref{sec:\ThisCommonFirstLabelBase.textmarkup} + geschrieben wurde. Falls Sie also + \autoref{sec:\ThisCommonFirstLabelBase.textmarkup} bereits gelesen und + verstanden haben, können Sie + \IfThisCommonLabelBaseOneOf{scrextend,scrlayer-notecolumn}{% + }{% + \IfThisCommonLabelBase{scrjura}{% Umbruchkorrektur + % unter Beachtung von \autoref{tab:\ThisCommonLabelBase.fontelements}% + }{% + sich auf \autoref{tab:\ThisCommonLabelBase.fontelements}, + \autopageref{tab:\ThisCommonLabelBase.fontelements} beschränken und + ansonsten % + }% + }% + auf \autopageref{sec:\ThisCommonLabelBase.textmarkup.next} mit + \autoref{sec:\ThisCommonLabelBase.textmarkup.next} fortfahren.% + \IfThisCommonLabelBase{scrextend}{\ Es sei jedoch darauf + hingewiesen\textnote{Einschränkung} dass aus + \autoref{tab:maincls.fontelements}, \autopageref{tab:maincls.fontelements} + nur die Elemente für den Dokumenttitel, den schlauen Spruch, die Fußnoten + und die \DescRef{maincls.env.labeling}-Umgebung unterstützt werden. Das + Element \DescRef{maincls.fontelement.disposition} ist zwar auch vorhanden, + wird jedoch nur für den Dokumenttitel verwendet.% + }{}% +} + +% Umbruchkorrektur +\IfThisCommonLabelBaseOneOf{scrlayer-scrpage,scrextend,scrjura}{}{% + \LaTeX{} verfügt über eine ganze Reihe von Anweisungen zur + Textauszeichnung. % + \IfThisCommonLabelBaseOneOf{scrlttr2}{}{% + Neben der Wahl der Schriftart gehören dazu auch Befehle zur Wahl einer + Textgröße oder der Textausrichtung. % + }% + Näheres zu den normalerweise definierten Möglichkeiten ist \cite{l2kurz}, + \cite{latex:usrguide} und \cite{latex:fntguide} zu entnehmen.% +}% + +% Die beiden Anweisungen sind schon so lange in LaTeX, dass ich sie hier nicht +% mehr dokumentiere, obwohl KOMA-Script ggf. noch immer \textsubscript selbst +% definiert. +%\IfThisCommonLabelBaseOneOf{scrlayer-scrpage,scrjura,scrlayer-notecolumn}{% + \iffalse% +%}{% +% \csname iftrue\endcsname}% + \begin{Declaration} + \Macro{textsuperscript}\Parameter{Text} + \Macro{textsubscript}\Parameter{Text} + \end{Declaration} + Im \LaTeX-Kern ist bereits die Anweisung + \Macro{textsuperscript}\IndexCmd{textsuperscript} definiert, mit der + \PName{Text} höher gestellt werden kann. Eine + entsprechende Anweisung, um Text tief\Index{Tiefstellung} statt + hoch\Index{Hochstellung} zu stellen, bietet + \LaTeX{}\textnote{\LaTeX~2015/01/01} erst seit Version + 2015/01/01. Für ältere \LaTeX-Versionen definiert \KOMAScript{} daher + \Macro{textsubscript}. % + \ifthiscommonfirst + \begin{Example} + \phantomsection + \xmpllabel{cmd.textsubscript}% + Sie schreiben einen Text über den menschlichen Stoffwechsel. Darin + kommen hin und wieder einfache chemische Summenformeln vor. Dabei sind + einzelne Ziffern tief zu stellen. Im Sinne des logischen Markups + definieren Sie zunächst in der Dokumentpräambel oder einem eigenen + Paket: +\begin{lstcode} + \newcommand*{\Molek}[2]{#1\textsubscript{#2}} +\end{lstcode} + \newcommand*{\Molek}[2]{#1\textsubscript{#2}}% + Damit schreiben Sie dann: +\begin{lstcode} + Die Zelle bezieht ihre Energie unter anderem aus + der Reaktion von \Molek C6\Molek H{12}\Molek O6 + und \Molek O2 zu \Molek H2\Molek O{} und + \Molek C{}\Molek O2. Arsen (\Molek{As}{}) wirkt + sich auf den Stoffwechsel sehr nachteilig aus. +\end{lstcode} + Das Ergebnis sieht daraufhin so aus: + \begin{ShowOutput} + Die Zelle bezieht ihre Energie unter anderem + aus der Reaktion von + \Molek C6\Molek H{12}\Molek O6 und \Molek O2 zu + \Molek H2\Molek O{} und \Molek C{}\Molek O2. + Arsen (\Molek{As}{}) wirkt sich auf + den Stoffwechsel sehr nachteilig aus. + \end{ShowOutput} + + Etwas später entscheiden Sie, dass Summenformeln grundsätzlich + serifenlos geschrieben werden sollen. Nun zeigt sich, wie gut die + Entscheidung für konsequentes logisches Markup war. Sie müssen nur die + \Macro{Molek}-Anweisung umdefinieren: +\begin{lstcode} + \newcommand*{\Molek}[2]{% + \textsf{#1\textsubscript{#2}}% + } +\end{lstcode} + \renewcommand*{\Molek}[2]{\textsf{#1\textsubscript{#2}}}% + Schon ändert sich die Ausgabe im gesamten Dokument: + \begin{ShowOutput} + Die Zelle bezieht ihr Energie unter anderem aus der Reaktion von + \Molek C6\Molek H{12}\Molek O6 und \Molek O2 zu \Molek H2\Molek + O{} und \Molek C{}\Molek O2. Arsen (\Molek{As}{}) wirkt sich + auf den Stoffwechsel sehr nachteilig aus. + \end{ShowOutput} + \end{Example} + \iffalse % vielleicht in einer späteren Auf-lage + Für Experten ist in \autoref{sec:experts.knowhow}, + \DescPageRef{experts.macroargs} dokumentiert, warum das Beispiel + funktioniert, obwohl teilweise die Argumente von \Macro{Molek} nicht in + geschweifte Klammern gesetzt wurden.% + \fi% + \else% + Ein Anwendungsbeispiel finden Sie in + \autoref{sec:\ThisCommonFirstLabelBase.textmarkup}, + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.textsubscript}.% + \fi% + \EndIndexGroup% +\fi + + +\begin{Declaration} + \Macro{setkomafont}\Parameter{Element}\Parameter{Befehle}% + \Macro{addtokomafont}\Parameter{Element}\Parameter{Befehle}% + \Macro{usekomafont}\Parameter{Element} +\end{Declaration}% +Mit% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{} Hilfe der Anweisungen \Macro{setkomafont} und \Macro{addtokomafont} ist es +möglich, die \PName{Befehle} festzulegen, mit denen die Schrift eines +bestimmten \PName{Element}s umgeschaltet wird. Theoretisch könnten als +\PName{Befehle} alle möglichen Anweisungen einschließlich Textausgaben +verwendet werden. Sie\textnote{Achtung!} sollten sich jedoch unbedingt auf +solche Anweisungen beschränken, mit denen wirklich nur Schriftattribute +umgeschaltet werden. In der Regel werden dies Befehle wie \Macro{rmfamily}, +\Macro{sffamily}, \Macro{ttfamily}, \Macro{upshape}, \Macro{itshape}, +\Macro{slshape}, \Macro{scshape}, \Macro{mdseries}, \Macro{bfseries}, +\Macro{normalfont} oder einer der Befehle \Macro{Huge}, \Macro{huge}, +\Macro{LARGE}, \Macro{Large}, \Macro{large}, \Macro{normalsize}, +\Macro{small}, \Macro{footnotesize}, \Macro{scriptsize} und \Macro{tiny} +sein. Die Erklärung zu diesen Befehlen entnehmen Sie bitte \cite{l2kurz}, +\cite{latex:usrguide} oder \cite{latex:fntguide}. Auch Farbumschaltungen wie +\Macro{normalcolor} sind möglich (siehe \cite{package:graphics} und +\cite{package:xcolor}).% +\iffalse % Umbruchkorrekturtext +\ Das Verhalten bei Verwendung anderer Anweisungen, inbesondere solcher, die +zu Umdefinierungen führen oder Ausgaben tätigen, ist nicht +definiert. Seltsames Verhalten ist möglich und stellt keinen Fehler dar. +\else% +\ Die Verwendung anderer Anweisungen, inbesondere solcher, die Umdefinierungen +vornehmen oder zu Ausgaben führen, ist nicht vorgesehen. Seltsames Verhalten +ist in diesen Fällen möglich und stellt keinen Fehler dar.% +\fi + +Mit \Macro{setkomafont}\important{\Macro{setkomafont}} wird die +Schriftumschaltung eines Elements mit einer völlig neuen Definition +versehen. Demgegenüber wird mit +\Macro{addtokomafont}\important{\Macro{addtokomafont}} die existierende +Definition lediglich erweitert. Es wird empfohlen, beide Anweisungen nicht +innerhalb des Dokuments, sondern nur in der Dokumentpräambel zu +verwenden. Beispiele für die Verwendung entnehmen Sie bitte den Abschnitten zu +den jeweiligen Elementen.% +\IfThisCommonLabelBase{scrlayer-notecolumn}{}{% + \ Namen und Bedeutung der einzelnen Elemente + \IfThisCommonLabelBaseOneOf{scrlayer-scrpage,scrjura}{und deren + Voreinstellungen }{}% + sind in % + \IfThisCommonLabelBase{scrextend}{% + \autoref{tab:maincls.fontelements}, \autopageref{tab:maincls.fontelements} + }{% + \autoref{tab:\ThisCommonLabelBase.fontelements} % + }% + aufgelistet.% + \IfThisCommonLabelBase{scrextend}{ % + Allerdings werden davon in \Package{scrextend} nur\textnote{Einschränkung} + die Elemente für den Dokumenttitel, den schlauen Spruch, die Fußnoten und + die \DescRef{maincls.env.labeling}-Umgebung behandelt. Das Element + \DescRef{maincls.fontelement.disposition} ist zwar auch verfügbar, wird + jedoch von \Package{scrextend} ebenfalls nur für den Dokumenttitel + verwendet.% + }{% + \IfThisCommonLabelBase{scrlayer-scrpage}{ % + Die angegebenen Voreinstellungen gelten nur, wenn das jeweilige Element + beim Laden von \Package{scrlayer-scrpage} nicht bereits definiert + ist. Beispielsweise definieren die \KOMAScript-Klassen + \DescRef{maincls.fontelement.pageheadfoot} und es gilt dann die von + \Package{scrlayer-scrpage} vorgefundene Einstellung.% + }{% + \IfThisCommonLabelBase{scrjura}{}{ % + Die Voreinstellungen sind den jeweiligen Abschnitten zu entnehmen.% + }% + }% + }% +}% + +\IfThisCommonLabelBaseOneOf{scrlttr2,scrextend,scrlayer-notecolumn}{% Umbruchvarianten + \IfThisCommonLabelBase{scrlayer-notecolumn}{\pagebreak}{}% Umbruchkorrektur + Mit der Anweisung \Macro{usekomafont}\important{\Macro{usekomafont}} kann + die aktuelle Schriftart auf die für das angegebene \PName{Element} + umgeschaltet werden.% +}{% + Mit der Anweisung \Macro{usekomafont}\important{\Macro{usekomafont}} kann + die aktuelle Schriftart auf diejenige umgeschaltet werden, die für das + angegebene \PName{Element} definiert ist.% +} +\IfThisCommonLabelBase{maincls}{\iftrue}{\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{cmd.setkomafont}% + Angenommen, für das Element + \DescRef{\ThisCommonLabelBase.fontelement.captionlabel} soll dieselbe + Schriftart wie für + \DescRef{\ThisCommonLabelBase.fontelement.descriptionlabel} verwendet + werden. Das erreichen Sie einfach mit: +\begin{lstcode} + \setkomafont{captionlabel}{% + \usekomafont{descriptionlabel}% + } +\end{lstcode} + Weitere Beispiele finden Sie in den Abschnitten zu den jeweiligen + Elementen. + \end{Example} + + \begin{desclist} + \desccaption{% + Elemente, deren Schrift bei \Class{scrbook}, \Class{scrreprt} oder + \Class{scrartcl} mit \Macro{setkomafont} und \Macro{addtokomafont} + verändert werden kann% + \label{tab:maincls.fontelements}% + \label{tab:scrextend.fontelements}% + }{% + Elemente, deren Schrift verändert werden kann (\emph{Fortsetzung})% + }% + \feentry{author}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}}% + Autorangaben im Haupttitel des Dokuments mit + \DescRef{\ThisCommonLabelBase.cmd.maketitle}, also das Argument von + \DescRef{\ThisCommonLabelBase.cmd.author} (siehe + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.author})}% + \feentry{caption}{Text einer Abbildungs- oder Tabellenunter- oder + "~überschrift (siehe \autoref{sec:maincls.floats}, + \DescPageRef{maincls.cmd.caption})}% + \feentry{captionlabel}{% + Label einer Abbildungs- oder Tabellenunter- oder "~überschrift; + Anwendung erfolgt nach dem Element + \DescRef{\ThisCommonLabelBase.fontelement.caption} (siehe + \autoref{sec:maincls.floats}, \DescPageRef{maincls.cmd.caption})}% + \feentry{chapter}{% + Überschrift der Ebene \DescRef{\ThisCommonLabelBase.cmd.chapter} (siehe + \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.chapter})}% + \feentry{chapterentry}{% + Inhaltsverzeichniseintrag der Ebene + \DescRef{\ThisCommonLabelBase.cmd.chapter} (siehe + \autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{chapterentrydots}{% + \ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}}% + optionale Verbindungspunkte in Inhaltsverzeichniseinträgen der Ebene + \DescRef{\ThisCommonLabelBase.cmd.chapter} abweichend von Element + \DescRef{\ThisCommonLabelBase.fontelement.chapterentry}, + \Macro{normalfont} und \Macro{normalsize} (siehe + \autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{chapterentrypagenumber}{% + Seitenzahl des Inhaltsverzeichniseintrags der Ebene + \DescRef{\ThisCommonLabelBase.cmd.chapter} abweichend vom Element + \DescRef{\ThisCommonLabelBase.fontelement.chapterentry} (siehe + \autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{chapterprefix}{% + Kapitelnummernzeile sowohl bei Einstellung + \OptionValueRef{maincls}{chapterprefix}{true} als auch + \OptionValueRef{maincls}{appendixprefix}{true} (siehe + \autoref{sec:maincls.structure}, + \DescPageRef{maincls.option.chapterprefix})}% + \feentry{date}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}}% + Datum im Haupttitel des Dokuments mit + \DescRef{\ThisCommonLabelBase.cmd.maketitle}, also das Argument von + \DescRef{\ThisCommonLabelBase.cmd.date} (siehe + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.date})}% + \feentry{dedication}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}}% + Widmung nach dem Haupttitel des Dokuments mit + \DescRef{\ThisCommonLabelBase.cmd.maketitle}, also das Argument von + \DescRef{\ThisCommonLabelBase.cmd.dedication} (siehe + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.dedication})}% + \feentry{descriptionlabel}{% + Label, also das optionale Argument der + \DescRef{\ThisCommonLabelBase.cmd.item.description}-Anweisung, in einer + \DescRef{\ThisCommonLabelBase.env.description}-Umgebung (siehe + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.description})}% + \feentry{dictum}{% + mit \DescRef{\ThisCommonLabelBase.cmd.dictum} gesetzter schlauer Spruch + (siehe \autoref{sec:maincls.dictum}, \DescPageRef{maincls.cmd.dictum})}% + \feentry{dictumauthor}{% + Urheber eines schlauen Spruchs; Anwendung erfolgt nach dem Element + \DescRef{\ThisCommonLabelBase.fontelement.dictum} (siehe + \autoref{sec:maincls.dictum}, \DescPageRef{maincls.cmd.dictum})}% + \feentry{dictumtext}{% + alternative Bezeichnung für + \DescRef{\ThisCommonLabelBase.fontelement.dictum}}% + \feentry{disposition}{% + alle Gliederungsüberschriften, also die Argumente von + \DescRef{\ThisCommonLabelBase.cmd.part} bis + \DescRef{\ThisCommonLabelBase.cmd.subparagraph} und + \DescRef{\ThisCommonLabelBase.cmd.minisec} sowie die Überschrift der + Zusammenfassung; die Anwendung erfolgt vor dem Element der jeweiligen + Gliederungsebene (siehe \autoref{sec:maincls.structure} ab + \autopageref{sec:maincls.structure})}% + \feentry{footnote}{% + Marke und Text einer Fußnote (siehe \autoref{sec:maincls.footnotes}, + \DescPageRef{maincls.cmd.footnote})}% + \feentry{footnotelabel}{% + Marke einer Fußnote; Anwendung erfolgt nach dem Element + \DescRef{\ThisCommonLabelBase.fontelement.footnote} (siehe + \autoref{sec:maincls.footnotes}, \DescPageRef{maincls.cmd.footnote})}% + \feentry{footnotereference}{% + Referenzierung der Fußnotenmarke im Text (siehe + \autoref{sec:maincls.footnotes}, \DescPageRef{maincls.cmd.footnote})}% + \feentry{footnoterule}{% + Linie\ChangedAt{v3.07}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} über dem Fußnotenapparat (siehe + \autoref{sec:maincls.footnotes}, + \DescPageRef{maincls.cmd.setfootnoterule})}% + \feentry{itemizelabel}{% + \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Grundeinstellung für die voreingestellten Aufzählungszeichen der + Umgebung \DescRef{\ThisCommonLabelBase.env.itemize} (siehe + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% + \feentry{labelinglabel}{% + Label, also das optionale Argument der + \DescRef{\ThisCommonLabelBase.cmd.item.labeling}-Anweisung, und + Trennzeichen, also das optionale Argument der + \DescRef{\ThisCommonLabelBase.env.labeling}-Umgebung, in einer + \DescRef{\ThisCommonLabelBase.env.labeling}-Umgebung (siehe + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.labeling})}% + \feentry{labelingseparator}{% + Trennzeichen, also das optionale Argument der + \DescRef{\ThisCommonLabelBase.env.labeling}-Umgebung, in einer + \DescRef{\ThisCommonLabelBase.env.labeling}-Umgebung; Anwendung erfolgt + nach dem Element + \DescRef{\ThisCommonLabelBase.fontelement.labelinglabel} (siehe + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.labeling})}% + \feentry{labelitemi}{% + \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Schriftart für die Verwendung in der Definition des Aufzählungszeichens + \DescRef{\ThisCommonLabelBase.cmd.labelitemi} (siehe + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% + \feentry{labelitemii}{% + \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Schriftart für die Verwendung in der Definition des Aufzählungszeichens + \DescRef{\ThisCommonLabelBase.cmd.labelitemii} (siehe + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% + \feentry{labelitemiii}{% + \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Schriftart für die Verwendung in der Definition des Aufzählungszeichens + \DescRef{\ThisCommonLabelBase.cmd.labelitemiii} (siehe + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% + \feentry{labelitemiv}{% + \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Schriftart für die Verwendung in der Definition des Aufzählungszeichens + \DescRef{\ThisCommonLabelBase.cmd.labelitemiv} (siehe + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% + \feentry{minisec}{% + mit \DescRef{\ThisCommonLabelBase.cmd.minisec} gesetzte Überschrift + (siehe \autoref{sec:maincls.structure} ab + \DescPageRef{maincls.cmd.minisec})}% + \feentry{pagefoot}{% + wird nur verwendet, wenn das Paket \Package{scrlayer-scrpage} geladen + ist (siehe \autoref{cha:scrlayer-scrpage}, + \DescPageRef{scrlayer-scrpage.fontelement.pagefoot})}% + \feentry{pagehead}{% + alternative Bezeichnung für + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}, solange + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} nicht + geladen ist (siehe auch + \autoref{sec:scrlayer-scrpage.predefined.pagestyles}, + \DescPageRef{scrlayer-scrpage.fontelement.pageheadfoot})}% + \feentry{pageheadfoot}{% + Seitenkopf und Seitenfuß bei allen von \KOMAScript{} definierten + Seitenstilen (siehe \autoref{sec:maincls.pagestyle} ab + \autopageref{sec:maincls.pagestyle})}% + \feentry{pagenumber}{% + Seitenzahl im Kopf oder Fuß der Seite (siehe + \autoref{sec:maincls.pagestyle}, + \DescPageRef{\LabelBase.fontelement.pagenumber})}% + \feentry{pagination}{% + alternative Bezeichnung für + \DescRef{\ThisCommonLabelBase.fontelement.pagenumber}}% + \feentry{paragraph}{% + Überschrift der Ebene \DescRef{\ThisCommonLabelBase.cmd.paragraph} + (siehe \autoref{sec:maincls.structure}, + \DescPageRef{maincls.cmd.paragraph})}% + \feentry{part}{% + Überschrift der Ebene \DescRef{\ThisCommonLabelBase.cmd.part}, jedoch + ohne die Zeile mit der Nummer des Teils (siehe + \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.part})}% + \feentry{partentry}{% + Inhaltsverzeichniseintrag der Ebene + \DescRef{\ThisCommonLabelBase.cmd.part} (siehe + \autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{partentrypagenumber}{% + Seitenzahl des Inhaltsverzeichniseintrags der Ebene + \DescRef{\ThisCommonLabelBase.cmd.part} abweichend vom Element + \DescRef{\ThisCommonLabelBase.fontelement.partentry} (siehe + \autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{partnumber}{% + Zeile mit der Nummer des Teils in Überschrift der Ebene + \DescRef{\ThisCommonLabelBase.cmd.part} (siehe + \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.part})}% + \feentry{publishers}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}}% + Verlagsangabe im Haupttitel des Dokuments mit + \DescRef{\ThisCommonLabelBase.cmd.maketitle}, also das Argument von + \DescRef{\ThisCommonLabelBase.cmd.publishers} (siehe + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.publishers})}% + \feentry{section}{% + Überschrift der Ebene \DescRef{\ThisCommonLabelBase.cmd.section} (siehe + \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.section})}% + \feentry{sectionentry}{% + Inhaltsverzeichniseintrag der Ebene + \DescRef{\ThisCommonLabelBase.cmd.section} (nur bei \Class{scrartcl} + verfügbar, siehe \autoref{sec:maincls.toc}, + \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{sectionentrydots}{% + \ChangedAt{v3.15}{\Class{scrartcl}}% + optionale Verbindungspunkte in Inhaltsverzeichniseinträgen der Ebene + \DescRef{\ThisCommonLabelBase.cmd.section} abweichend vom Element + \DescRef{\ThisCommonLabelBase.fontelement.sectionentry}, + \Macro{normalfont} und \Macro{normalsize} (nur bei \Class{scrartcl} + verfügbar, siehe \autoref{sec:maincls.toc}, + \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{sectionentrypagenumber}{% + Seitenzahl des Inhaltsverzeichniseintrags der Ebene + \DescRef{\ThisCommonLabelBase.cmd.section} abweichend vom Element + \DescRef{\ThisCommonLabelBase.fontelement.sectionentry} (nur bei + \Class{scrartcl} verfügbar, siehe \autoref{sec:maincls.toc}, + \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{sectioning}{% + alternative Bezeichnung für + \DescRef{\ThisCommonLabelBase.fontelement.disposition}}% + \feentry{subject}{% + Typisierung des Dokuments, also das Argument von + \DescRef{\ThisCommonLabelBase.cmd.subject} auf der Haupttitelseite mit + \DescRef{\ThisCommonLabelBase.cmd.maketitle} (siehe + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.subject})}% + \feentry{subparagraph}{% + Überschrift der Ebene \DescRef{\ThisCommonLabelBase.cmd.subparagraph} + (siehe \autoref{sec:maincls.structure}, + \DescPageRef{maincls.cmd.subparagraph})}% + \feentry{subsection}{% + Überschrift der Ebene \DescRef{\ThisCommonLabelBase.cmd.subsection} + (siehe \autoref{sec:maincls.structure}, + \DescPageRef{maincls.cmd.subsection})}% + \feentry{subsubsection}{% + Überschrift der Ebene \DescRef{\ThisCommonLabelBase.cmd.subsubsection} + (siehe \autoref{sec:maincls.structure}, + \DescPageRef{maincls.cmd.subsubsection})}% + \feentry{subtitle}{% + Untertitel des Dokuments, also das Argument von + \DescRef{\ThisCommonLabelBase.cmd.subtitle} auf der Haupttitelseite mit + \DescRef{\ThisCommonLabelBase.cmd.maketitle} (siehe + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.title})}% + \feentry{title}{% + Haupttitel des Dokuments, also das Argument von + \DescRef{\ThisCommonLabelBase.cmd.title} bei Verwendung von + \DescRef{\ThisCommonLabelBase.cmd.maketitle} (bezüglich der Größe des + Haupttitels siehe die ergänzenden Bemerkungen im Text von + \autoref{sec:maincls.titlepage} ab \DescPageRef{maincls.cmd.title})}% + \feentry{titlehead}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}}% + Kopf über dem Haupttitel des Dokuments, also das Argument von + \DescRef{\ThisCommonLabelBase.cmd.titlehead} mit + \DescRef{\ThisCommonLabelBase.cmd.maketitle} (siehe + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.titlehead})}% + \end{desclist} +\else + \IfThisCommonLabelBase{scrextend}{\iftrue}{\csname iffalse\endcsname} + \begin{Example} + Angenommen, Sie wollen, dass der Titel in Serifenschrift und rot gesetzt + wird. Das erreichen Sie einfach mit: + \iffalse% Umbruchkorrektur +\begin{lstcode}[moretexcs=color] + \setkomafont{title}{% + \color{red}% + } +\end{lstcode} + \else% +\begin{lstcode}[moretexcs=color] + \setkomafont{title}{\color{red}} +\end{lstcode} + \fi% + Für die Anweisung \Macro{color}\PParameter{red} wird das Paket + \Package{color}\IndexPackage{color} oder + \Package{xcolor}\IndexPackage{xcolor} benötigt. % + \iffalse% Umbruchkorrektur + Die zusätzliche Angabe von \Macro{normalfont} ist in diesem Beispiel + deshalb nicht notwendig, weil diese Anweisung bereits in der Definition + des Titels enthalten ist. % + \fi % + Das\textnote{Achtung!} Beispiel setzt voraus, dass + Option \OptionValueRef{scrextend}{extendedfeature}{title} gesetzt ist + (siehe \autoref{sec:scrextend.optionalFeatures}, + \DescPageRef{scrextend.option.extendedfeature}). + \end{Example} + \else + \IfThisCommonLabelBase{scrlttr2}{% + Ein allgemeines Beispiel für die Anwendung sowohl von + \Macro{setkomafont} als auch + \Macro{usekomafont} finden Sie in \autoref{sec:maincls.textmarkup}, + \PageRefxmpl{maincls.cmd.setkomafont}. + + \begin{desclist} + \desccaption[{% + Elemente, deren Schrift bei Briefen mit \Macro{setkomafont} und + \Macro{addtokomafont} verändert werden kann% + }]% + {% + Elemente, deren Schrift bei der Klasse \Class{scrlttr2} oder dem + Paket \Package{scrletter} mit \Macro{setkomafont} und + \Macro{addtokomafont} verändert werden + kann\label{tab:scrlttr2.fontelements}% + }{% + Elemente, deren Schrift verändert werden kann (\emph{Fortsetzung})% + }% + \feentry{addressee}{Name und Anschrift im Anschriftfenster + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.option.addrfield})}% + \feentry{backaddress}{Rücksendeadresse für einen Fensterbriefumschlag + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.option.backaddress})}% + \feentry{descriptionlabel}{Label, also das optionale Argument von + \DescRef{\ThisCommonLabelBase.cmd.item.description}, in einer + \DescRef{\ThisCommonLabelBase.env.description}-Umgebung + (\autoref{sec:scrlttr2.lists}, + \DescPageRef{scrlttr2.env.description})}% + \feentry{foldmark}{Faltmarke auf dem Briefpapier; ermöglicht Änderung + der Linienfarbe (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.option.foldmarks})}% + \feentry{footnote}{% + Marke und Text einer Fußnote (\autoref{sec:scrlttr2.footnotes}, + \DescPageRef{scrlttr2.cmd.footnote})}% + \feentry{footnotelabel}{% + Marke einer Fußnote; Anwendung erfolgt nach dem Element + \DescRef{\ThisCommonLabelBase.fontelement.footnote} + (\autoref{sec:scrlttr2.footnotes}, + \DescPageRef{scrlttr2.cmd.footnote})}% + \feentry{footnotereference}{% + Referenzierung der Fußnotenmarke im Text + (\autoref{sec:scrlttr2.footnotes}, + \DescPageRef{scrlttr2.cmd.footnote})}% + \feentry{footnoterule}{% + Linie\ChangedAt{v3.07}{\Class{scrlttr2}} über dem Fußnotenapparat + (\autoref{sec:scrlttr2.footnotes}, + \DescPageRef{scrlttr2.cmd.setfootnoterule})}% + \feentry{fromaddress}{Absenderadresse im Briefkopf + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.fromaddress})}% + \feentry{fromname}{Name des Absenders im Briefkopf abweichend von + \PValue{fromaddress} (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.fromname})}% + \feentry{fromrule}{Linie im Absender im Briefkopf; gedacht für + Farbänderungen (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.option.fromrule})}% + \feentry{itemizelabel}{% + \ChangedAt{v3.33}{\Class{scrlttr2}}% + Grundeinstellung für die voreingestellten Aufzählungszeichen der + Umgebung \DescRef{\ThisCommonLabelBase.env.itemize} (siehe + \autoref{sec:scrlttr2.lists}, \DescPageRef{scrlttr2.env.itemize})}% + \feentry{labelinglabel}{% + Label, also das optionale Argument der + \DescRef{\ThisCommonLabelBase.cmd.item.labeling}-Anweisung, und + Trennzeichen, also das optionale Argument der + \DescRef{\ThisCommonLabelBase.env.labeling}-Umgebung, in einer + \DescRef{\ThisCommonLabelBase.env.labeling}-Umgebung + (\autoref{sec:scrlttr2.lists}, + \DescPageRef{scrlttr2.env.labeling})}% + \feentry{labelingseparator}{% + Trennzeichen, also das optionale Argument der + \DescRef{\ThisCommonLabelBase.env.labeling}-Umgebung, in einer + \DescRef{\ThisCommonLabelBase.env.labeling}-Umgebung; Anwendung + erfolgt nach dem Element + \DescRef{\ThisCommonLabelBase.fontelement.labelinglabel} + (\autoref{sec:scrlttr2.lists}, + \DescPageRef{scrlttr2.env.labeling})}% + \feentry{labelitemi}{% + \ChangedAt{v3.33}{\Class{scrlttr2}}% + Schriftart für die Verwendung in der Definition des + Aufzählungszeichens \DescRef{\ThisCommonLabelBase.cmd.labelitemi} + (siehe \autoref{sec:scrlttr2.lists}, + \DescPageRef{scrlttr2.env.itemize})}% + \feentry{labelitemii}{% + \ChangedAt{v3.33}{\Class{scrlttr2}}% + Schriftart für die Verwendung in der Definition des + Aufzählungszeichens \DescRef{\ThisCommonLabelBase.cmd.labelitemii} + (siehe \autoref{sec:scrlttr2.lists}, + \DescPageRef{scrlttr2.env.itemize})}% + \feentry{labelitemiii}{% + \ChangedAt{v3.33}{\Class{scrlttr2}}% + Schriftart für die Verwendung in der Definition des + Aufzählungszeichens \DescRef{\ThisCommonLabelBase.cmd.labelitemiii} + (siehe \autoref{sec:scrlttr2.lists}, + \DescPageRef{scrlttr2.env.itemize})}% + \feentry{labelitemiv}{% + \ChangedAt{v3.33}{\Class{scrlttr2}}% + Schriftart für die Verwendung in der Definition des + Aufzählungszeichens \DescRef{\ThisCommonLabelBase.cmd.labelitemiv} + (siehe \autoref{sec:scrlttr2.lists}, + \DescPageRef{scrlttr2.env.itemize})}% + \feentry{pagefoot}{% + wird je nach Seitenstil nach + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot} auf den + Seitenfuß angewendet (\autoref{sec:\LabelBase.pagestyle}, + \DescPageRef{\LabelBase.fontelement.pagefoot})}% + \feentry{pagehead}{% + wird je nach Seitenstil nach + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot} auf den + Seitenkopf angewendet (\autoref{sec:\LabelBase.pagestyle}, + \DescPageRef{\LabelBase.fontelement.pagehead})}% + \feentry{pageheadfoot}{% + Seitenkopf und Seitenfuß bei allen von \KOMAScript{} definierten + Seitenstilen (\autoref{sec:\LabelBase.pagestyle}, + \DescPageRef{\ThisCommonLabelBase.fontelement.pageheadfoot})}% + \feentry{pagenumber}{% + Seitenzahl im Kopf oder Fuß der Seite + (\autoref{sec:\LabelBase.pagestyle}, + \DescPageRef{\ThisCommonLabelBase.fontelement.pagenumber})}% + \feentry{pagination}{% + alternative Bezeichnung für + \DescRef{\ThisCommonLabelBase.fontelement.pagenumber}}% + \feentry{placeanddate}{% + \ChangedAt{v3.12}{\Class{scrlttr2}}% + Ort und Datum, falls statt einer Geschäftszeile nur eine Datumszeile + verwendet wird (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.placeseparator})}% + \feentry{refname}{% + Bezeichnung der Felder in der Geschäftszeile + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.yourref})}% + \feentry{refvalue}{% + Werte der Felder in der Geschäftszeile + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.yourref})}% + \feentry{specialmail}{Versandart im Anschriftfenster + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.specialmail})}% + \feentry{lettersubject}{% + \ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}}% + Betreff in der Brieferöffnung (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.subject})}% + \feentry{lettertitle}{% + \ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}}% + Titel in der Brieferöffnung (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.title})}% + \feentry{toaddress}{Abweichung vom Element + \DescRef{\ThisCommonLabelBase.fontelement.addressee} für die + Anschrift (ohne Name) des Empfängers im Anschriftfeld + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.toaddress})}% + \feentry{toname}{Abweichung vom Element + \DescRef{\ThisCommonLabelBase.fontelement.addressee} für den Namen + des Empfängers im Anschriftfeld (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.toname})}% + \end{desclist} + }{% + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \begin{desclist} + \desccaption[{Elemente, deren Schrift bei \Package{scrlayer-scrpage} + mit \Macro{setkomafont} und \Macro{addtokomafont} verändert werden + kann, einschließlich der jeweiligen Voreinstellung}]% + {Elemente, deren Schrift bei \Package{scrlayer-scrpage} mit + \Macro{setkomafont} und \Macro{addtokomafont} verändert werden + kann, einschließlich der jeweiligen Voreinstellung, falls die + Elemente beim Laden von \Package{scrlayer-scrpage} nicht bereits + definiert sind% + \label{tab:scrlayer-scrpage.fontelements}% + }% + {Elemente, deren Schrift verändert werden kann + (\emph{Fortsetzung})}% + \feentry{footbotline}{% + Linie unter dem Fuß eines mit \Package{scrlayer-scrpage} + definierten Seitenstils (siehe + \autoref{sec:scrlayer-scrpage.pagestyle.content}, + \DescPageRef{scrlayer-scrpage.fontelement.footbotline}). Das + Element wird nach \Macro{normalfont}\IndexCmd{normalfont} und nach + den Elementen + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% + \IndexFontElement{pageheadfoot} und + \DescRef{\ThisCommonLabelBase.fontelement.pagefoot}% + \IndexFontElement{pagefoot} angewandt. Es wird empfohlen, dieses + Element lediglich für Farbänderungen zu verwenden.\par + \mbox{Voreinstellung: \emph{leer}}% + }% + \feentry{footsepline}{% + Linie über dem Fuß eines mit \Package{scrlayer-scrpage} + definierten Seitenstils (siehe + \autoref{sec:scrlayer-scrpage.pagestyle.content}, + \DescPageRef{scrlayer-scrpage.fontelement.footsepline}). Das + Element wird nach \Macro{normalfont}\IndexCmd{normalfont} und nach + den Elementen + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% + \IndexFontElement{pageheadfoot} und + \DescRef{\ThisCommonLabelBase.fontelement.pagefoot}% + \IndexFontElement{pagefoot} angewandt. Es wird empfohlen, dieses + Element lediglich für Farbänderungen zu verwenden.\par + \mbox{Voreinstellung: \emph{leer}}% + }% + \feentry{headsepline}{% + Linie unter dem Kopf eines mit \Package{scrlayer-scrpage} + definierten Seitenstils (siehe + \autoref{sec:scrlayer-scrpage.pagestyle.content}, + \DescPageRef{scrlayer-scrpage.fontelement.headsepline}). Das + Element wird nach \Macro{normalfont}\IndexCmd{normalfont} und nach + den Elementen + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% + \IndexFontElement{pageheadfoot} und + \DescRef{scrlayer-scrpage.fontelement.pagehead}% + \IndexFontElement{pagehead} angewandt. Es wird empfohlen, dieses + Element lediglich für Farbänderungen zu verwenden.\par + \mbox{Voreinstellung: \emph{leer}}% + }% + \feentry{headtopline}{% + Linie über dem Kopf eines mit \Package{scrlayer-scrpage} + definierten Seitenstils (siehe + \autoref{sec:scrlayer-scrpage.pagestyle.content}, + \DescPageRef{scrlayer-scrpage.fontelement.headtopline}). Das + Element wird nach \Macro{normalfont}\IndexCmd{normalfont} und nach + den Elementen + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% + \IndexFontElement{pageheadfoot} und + \DescRef{scrlayer-scrpage.fontelement.pagehead}% + \IndexFontElement{pagehead} angewandt. Es wird empfohlen, dieses + Element lediglich für Farbänderungen zu verwenden.\par + \mbox{Voreinstellung: \emph{leer}}% + }% + \feentry{pagefoot}{% + Inhalt des Fußes eines mit \Package{scrlayer-scrpage} + definierten Seitenstils (siehe + \autoref{sec:scrlayer-scrpage.predefined.pagestyles}, + \DescPageRef{scrlayer-scrpage.fontelement.pagefoot}). Das Element + wird nach \Macro{normalfont}\IndexCmd{normalfont} und nach dem + Element \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% + \IndexFontElement{pageheadfoot} angewandt.\par + \mbox{Voreinstellung: \emph{leer}}% + }% + \feentry{pagehead}{% + Inhalt des Kopfes eines mit \Package{scrlayer-scrpage} + definierten Seitenstils (siehe + \autoref{sec:scrlayer-scrpage.predefined.pagestyles}, + \DescPageRef{scrlayer-scrpage.fontelement.pagehead}). Das Element + wird nach \Macro{normalfont}\IndexCmd{normalfont} und nach Element + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% + \IndexFontElement{pageheadfoot} angewandt.\par + \mbox{Voreinstellung: \emph{leer}}% + }% + \feentry{pageheadfoot}{% + Inhalt des Kopfes oder Fußes eines mit + \Package{scrlayer-scrpage} definierten Seitenstils (siehe + \autoref{sec:scrlayer-scrpage.predefined.pagestyles}, + \DescPageRef{scrlayer-scrpage.fontelement.pageheadfoot}). Das + Element wird nach \Macro{normalfont}\IndexCmd{normalfont} + angewandt.\par + \mbox{Voreinstellung: + \Macro{normalcolor}\Macro{slshape}}% + }% + \feentry{pagenumber}{% + Die mit \DescRef{\ThisCommonLabelBase.cmd.pagemark} gesetzte + Paginierung (siehe + \autoref{sec:scrlayer-scrpage.predefined.pagestyles}, + \DescPageRef{scrlayer-scrpage.fontelement.pagenumber})% + \iftrue % Umbruchkorrektur + . Bei einer + etwaigen Umdefinierung von + \DescRef{\ThisCommonLabelBase.cmd.pagemark} ist dafür zu sorgen, + dass die Umdefinierung auch ein + \Macro{usekomafont}\PParameter{pagenumber} enthält!% + \else % + , solange \DescRef{\ThisCommonLabelBase.cmd.pagemark} nicht + unsachgemäß umdefiniert wird.% + \fi % + \par + \mbox{Voreinstellung: \Macro{normalfont}}% + }% + \end{desclist} + }{% + \IfThisCommonLabelBase{scrjura}{% + \par Ein allgemeines Beispiel für die Anwendung von + \Macro{setkomafont} und \Macro{usekomafont} finden Sie in + \autoref{sec:maincls.textmarkup}, + \PageRefxmpl{maincls.cmd.setkomafont}.% + \begin{table} + \caption{Elemente, deren Schrift bei \Package{scrjura} mit + \Macro{setkomafont} und \Macro{addtokomafont} verändert werden + kann, einschließlich der jeweiligen Voreinstellung}% + \label{tab:scrjura.fontelements}% + \begin{desctabular} + \feentry{Clause}{% + Alias für \FontElement{\PName{Umgebungsname}.Clause} + innerhalb einer Vertragsumgebung, beispielsweise + \FontElement{contract.Clause} innerhalb von + \DescRef{\ThisCommonLabelBase.env.contract}; ist kein + entsprechendes Element definiert, so wird auf + \FontElement{contract.Clause} zurückgegriffen% + }\\[-1.7ex] + \feentry{contract.Clause}{% + Überschrift eines Paragraphen innerhalb von + \DescRef{\ThisCommonLabelBase.env.contract} (siehe + \autoref{sec:\ThisCommonLabelBase.contract}, + \DescPageRef{\ThisCommonLabelBase.fontelement.contract.Clause}); + \par + \mbox{Voreinstellung: + \Macro{sffamily}\Macro{bfseries}\Macro{large}}% + }\\[-1.7ex] + \entry{\DescRef{\ThisCommonLabelBase.fontelement./Name/.Clause}}{% + \IndexFontElement[indexmain]{\PName{Name}.Clause}% + Überschrift eines Paragraphen innerhalb einer Umgebung + \PName{Name}, die mit + \DescRef{\ThisCommonLabelBase.cmd.DeclareNewJuraEnvironment} + definiert wurde, soweit bei der Definition mit + \Option{ClauseFont} eine Einstellung vorgenommen wurde oder + das Element nachträglich definiert wurde (siehe + \autoref{sec:\ThisCommonLabelBase.newenv}, + \DescPageRef{\ThisCommonLabelBase.fontelement./Name/.Clause}); + \par + \mbox{Voreinstellung: \emph{keine}}% + }\\[-1.7ex] + \feentry{parnumber}{% + Absatznummern innerhalb einer Vertragsumgebung (siehe + \autoref{sec:\ThisCommonLabelBase.par}, + \DescPageRef{\ThisCommonLabelBase.fontelement.parnumber});\par + \mbox{Voreinstellung: \emph{leer}}% + }\\[-1.7ex] + \feentry{sentencenumber}{% + \ChangedAt{v3.26}{\Package{scrjura}}% + Satznummer der Anweisung + \DescRef{\ThisCommonLabelBase.cmd.Sentence} (siehe + \autoref{sec:\ThisCommonLabelBase.sentence}, \DescPageRef{% + \ThisCommonLabelBase.fontelement.sentencenumber});\par + \mbox{Voreinstellung: \emph{leer}}% + }% + \end{desctabular} + \end{table} + }{% + \IfThisCommonLabelBase{scrlayer-notecolumn}{}{% + \InternalCommonFileUsageError% + }% + }% + }% + }% + \fi% +\fi +\EndIndexGroup +\IfThisCommonLabelBase{scrextend}{\ExampleEndFix}{}% + + +\begin{Declaration} + \Macro{usefontofkomafont}\Parameter{Element}% + \Macro{useencodingofkomafont}\Parameter{Element}% + \Macro{usesizeofkomafont}\Parameter{Element}% + \Macro{usefamilyofkomafont}\Parameter{Element}% + \Macro{useseriesofkomafont}\Parameter{Element}% + \Macro{useshapeofkomafont}\Parameter{Element}% +\end{Declaration} +Manchmal\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}} werden in der Schrifteinstellung +eines Elements auch Dinge vorgenommen, die mit der Schrift eigentlich gar +nichts zu tun haben, obwohl dies ausdrücklich nicht empfohlen wird. Soll dann +nur die Schrifteinstellung, aber keine dieser zusätzlichen Einstellungen +ausgeführt werden, so kann statt +\DescRef{\ThisCommonLabelBase.cmd.usekomafont} die Anweisung +\Macro{usefontofkomafont} verwendet werden. Diese Anweisung übernimmt nur die +Schriftgröße und den Grundlinienabstand, die Codierung +(engl. \emph{encoding}), die Familie (engl. \emph{family}), die Strichstärke +oder Ausprägung (engl. \emph{font series}) und die Form oder Ausrichtung +(engl. \emph{font shape}). + +Mit den übrigen Anweisungen können auch einzelne Schriftattribute +übernommen werden. Dabei übernimmt \Macro{usesizeofkomafont} sowohl die +Schriftgröße als auch den Grundlinienabstand.% +% +\IfThisCommonLabelBase{scrextend}{% Umbruchvariante! +}{% + \IfThisCommonLabelBaseOneOf{scrjura,scrlttr2,scrlayer-scrpage}{% + \par% + Vor dem Missbrauch der Schrifteinstellungen wird dennoch dringend gewarnt + (siehe \autoref{sec:maincls-experts.fonts}, + \DescPageRef{maincls-experts.cmd.addtokomafontrelaxlist})!% + }{% + \par% + Diese Befehle sollten jedoch nicht als Legitimation dafür verstanden + werden, in die Schrifteinstellungen der Elemente beliebige Anweisungen + einzufügen. Das kann nämlich sehr schnell zu Fehlern führen (siehe + \autoref{sec:maincls-experts.fonts}, + \DescPageRef{maincls-experts.cmd.addtokomafontrelaxlist}).% + }% +}% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-textmarkup-en.tex b/macros/latex/contrib/koma-script/doc/common-textmarkup-en.tex new file mode 100644 index 0000000000..3f161aaedc --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-textmarkup-en.tex @@ -0,0 +1,846 @@ +% ====================================================================== +% common-textmarkup-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-textmarkup-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] +\translator{Gernot Hassenpflug\and Markus Kohm\and Krickette Murabayashi\and + Karl Hagen} + +\section{Text Markup} +\seclabel{textmarkup}% +\BeginIndexGroup% +\BeginIndex{}{text>markup}% +\BeginIndex{}{font}% + +\IfThisCommonFirstRun{}{% + The information in in \autoref{sec:\ThisCommonFirstLabelBase.textmarkup} + largely applies to this chapter. So if you have already read and understood + \autoref{sec:\ThisCommonFirstLabelBase.textmarkup}, you can + \IfThisCommonLabelBaseOneOf{scrextend,scrjura,scrlayer-notecolumn}{}{% + limit yourself to examining + \autoref{tab:\ThisCommonLabelBase.fontelements}, + \autopageref{tab:\ThisCommonLabelBase.fontelements} and then }% + skip ahead to \autoref{sec:\ThisCommonLabelBase.textmarkup.next}, + \autopageref{sec:\ThisCommonLabelBase.textmarkup.next}.% + \IfThisCommonLabelBase{scrextend}{\ In this case, however, + note\textnote{limitation} that \Package{scrextend} supports only the + elements for the document title, the dictum, the footnotes, and the + \DescRef{maincls.env.labeling} environment. from + \autoref{tab:maincls.fontelements}, + \autopageref{tab:maincls.fontelements}. Although the + \DescRef{maincls.fontelement.disposition} element exists, + \Package{scrextend} uses it only for the document title.% + }{}% +} + +% Umbruchkorrektur +\IfThisCommonLabelBaseOneOf{scrlayer-scrpage,scrextend}{}{% + {\LaTeX} offers different possibilities for logical and direct + markup\Index{logical markup}\Index{markup} of text. % + \IfThisCommonLabelBaseOneOf{scrlttr2}{}{% + In addition to the choice of the font, this includes commands for choosing + the font size and orientation. % + } For more information about the standard font facilities, see + \cite{lshort}, \cite{latex:usrguide}, and \cite{latex:fntguide}.% +} + +% Both commands are in LaTeX for a long time, so I do not describe them any +% longer despite \textsubscript is still defined by KOMA-Script if needed. +%\IfThisCommonLabelBaseOneOf{scrlayer-scrpage,scrjura,scrlayer-notecolumn}{% + \iffalse +%}{% +% \csname iftrue\endcsname}% + \begin{Declaration} + \Macro{textsuperscript}\Parameter{text}% + \Macro{textsubscript}\Parameter{text} + \end{Declaration} + The \LaTeX{} kernel defines the command + \Macro{textsuperscript}\IndexCmd{textsuperscript} to put text in + superscript\Index{text>superscript}\Index{superscript}. Unfortunately, + \LaTeX{}\textnote{\Latex~2015/01/01} itself did not offer a command to + produce text in subscript\Index{text>subscript}\Index{subscript} until + release 2015/01/01. \KOMAScript{} defines \Macro{textsubscript} for this + purpose. % + \ifthiscommonfirst + \begin{Example} + \phantomsection + \xmpllabel{cmd.textsubscript}% + You are writing a text on human metabolism. From time to time you + have to give some simple chemical formulas in which the numbers are + in subscript. To allow for logical markup, you first define in the + document preamble or in a separate package: +\begin{lstcode} + \newcommand*{\molec}[2]{#1\textsubscript{#2}} +\end{lstcode} + \newcommand*{\molec}[2]{#1\textsubscript{#2}} + Using this you then write: +\begin{lstcode} + The cell produces its energy partly from the reaction of \molec C6\molec + H{12}\molec O6 and \molec O2 to produce \molec H2\Molec O{} and + \molec C{}\molec O2. However, arsenic (\molec{As}{}) has quite a + detrimental effect on the metabolism. +\end{lstcode} + The output looks as follows: + \begin{ShowOutput} + The cell produces its energy partly from the reaction of \molec C6\molec + H{12}\molec O6 and \molec O2 to produce \molec H2\molec O{} and + \molec C{}\molec O2. However, arsenic (\molec{As}{}) has quite a + detrimental effect on the metabolism. + \end{ShowOutput} + + Some time later you decide that the chemical formulas should be + typeset in sans serif. Now you can see the advantages of using + logical markup. You only have the redefine the \Macro{molec} + command: +\begin{lstcode} + \newcommand*{\molec}[2]{\textsf{#1\textsubscript{#2}}} +\end{lstcode} + \renewcommand*{\molec}[2]{\textsf{#1\textsubscript{#2}}} + Now the output in the whole document changes to: + \begin{ShowOutput} + The cell produces its energy partly from the reaction of \molec + C6\molec H{12}\molec O6 and \molec O2 to produce \molec H2\molec + O{} and \molec C{}\molec O2. However, arsenic (\molec{As}{}) has + quite a detrimental effect on the metabolism. + \end{ShowOutput} + \end{Example} + \iftrue + \begin{Explain} + The example above uses the notation ``\verb|\molec C6|''. + This makes use of the fact that arguments consisting of only one + character do not have to be enclosed in parentheses. That is why + ``\verb|\molec C6|'' is similar to ``\verb|\molec{C}{6}|''. You + may already be familiar with this notation from indices or powers in + mathematical environments, such as ``\verb|$x^2$|'' instead of + ``\verb|$x^{2}$|'' + for ``$x^2$''. + \end{Explain} + \else % maybe some time I've made an English book + Advanced users can find information about the reason the example above + does work unless you put all arguments of \Macro{molec} into braces in + \autoref{sec:experts.knowhow}, + \DescPageRef{experts.macroargs}.% + \fi% + \else% + You can find an example that uses it in + \autoref{sec:\ThisCommonFirstLabelBase.textmarkup}, + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.textsubscript}. + \fi% + \EndIndexGroup% +\fi + + +\begin{Declaration} + \Macro{setkomafont}\Parameter{element}\Parameter{commands}% + \Macro{addtokomafont}\Parameter{element}\Parameter{commands}% + \Macro{usekomafont}\Parameter{element} +\end{Declaration}% +With% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{} the help of the \Macro{setkomafont} and \Macro{addtokomafont} +commands, you can attach particular font styling \PName{commands} that change +the appearance of a given \PName{element}. Theoretically, all statements, +including literal text, can be used as \PName{commands}. You +should\textnote{Attention!}, however, limit yourself to those statements that +really change font attributes only. These are usually commands like +\Macro{rmfamily}, \Macro{sffamily}, \Macro{ttfamily}, \Macro{upshape}, +\Macro{itshape}, \Macro{slshape}, \Macro{scshape}, \Macro{mdseries}, +\Macro{bfseries}, \Macro{normalfont}, as well as the font size commands +\Macro{Huge}, \Macro{huge}, \Macro{LARGE}, \Macro{Large}, \Macro{large}, +\Macro{normalsize}, \Macro{small}, \Macro{footnotesize}, \Macro{scriptsize}, +and \Macro{tiny}. You can find these commands explained in \cite{lshort}, +\cite{latex:usrguide}, or \cite{latex:fntguide}. Colour switching commands +like \Macro{normalcolor} (see \cite{package:graphics} and +\cite{package:xcolor}) are also acceptable.% +\iffalse % Umbruchkorrekturtext + \ The behaviour when using other commands, especially those that lead to + redefinitions or generate output, is undefined. Strange behaviour is possible + and does not represent a bug. +\else + \ The use of other commands, in particular those that redefine things or + or lead to output, is not supported. Strange behaviour is possible in these + cases and does not represent a bug. +\fi + +The command \Macro{setkomafont} provides an element with a completely new +definition of its font styling. In contrast, the \Macro{addtokomafont} command +merely extends an existing definition. You should not use either command +inside the document body but only in the preamble. For examples of their use, +refer to the sections for the respective element.% +\IfThisCommonLabelBase{scrlayer-notecolumn}{}{% + \ The name and meaning of each element + \IfThisCommonLabelBaseOneOf{scrlayer-scrpage,scrjura}{, as well as their + defaults,}{} are listed in \IfThisCommonLabelBase{scrextend}{% + \autoref{tab:maincls.fontelements}, \autopageref{tab:maincls.fontelements} + }{% + \autoref{tab:\ThisCommonLabelBase.fontelements} % + }.% + \IfThisCommonLabelBase{scrextend}{ % + However, in \Package{scrextend} only\textnote{limitation} the listed + elements for the document title, dictum, footnotes, and the + \DescRef{maincls.env.labeling} environment are supported. Although the + \DescRef{maincls.fontelement.disposition} element exists, + \Package{scrextend} uses it only for the document title.% + }{% + \IfThisCommonLabelBase{scrlayer-scrpage}{ % + The specified defaults apply only if the corresponding element has not + already been defined before loading \Package{scrlayer-scrpage}. For + example, the \KOMAScript classes define + \DescRef{maincls.fontelement.pageheadfoot}, and then + \Package{scrlayer-scrpage} uses the setting it finds.% + }{% + \IfThisCommonLabelBase{scrjura}{}{ % + The default values can be found in the corresponding sections.% + }% + }% + }% +}% + +\IfThisCommonLabelBaseOneOf{scrlttr2,scrextend}{% Umbruchvarianten + The \Macro{usekomafont} command can be used to switch the current font style + to the specified \PName{Element}.% +}{% + With the \Macro{usekomafont} command, the current font style can be changed + to the one defined for the specified \PName{element}.% +} + +\IfThisCommonLabelBase{maincls}{\iftrue}{\csname iffalse\endcsname} + \begin{Example} + \phantomsection\xmpllabel{cmd.setkomafont}% + Suppose you want to use the same font specification for the element + \DescRef{\ThisCommonLabelBase.fontelement.captionlabel} + that is used with + \DescRef{\ThisCommonLabelBase.fontelement.descriptionlabel}. This can be + easily done with: +\begin{lstcode} + \setkomafont{captionlabel}{% + \usekomafont{descriptionlabel}% + } +\end{lstcode} + You can find other examples in the explanation of each element. + \end{Example} + + \begin{desclist} + \desccaption{% + Elements whose font style can be changed in \Class{scrbook}, + \Class{scrreprt} or \Class{scrartcl} with \Macro{setkomafont} and + \Macro{addtokomafont}% + \label{tab:maincls.fontelements}% + \label{tab:scrextend.fontelements}% + }{% + Elements whose font style can be changed (\emph{continued})% + }% + \feentry{author}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}}% + author of the document in the title, i.\,e., the argument of + \DescRef{\ThisCommonLabelBase.cmd.author} when + \DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.author})}% + \feentry{caption}{text of a figure or table caption (see + \autoref{sec:maincls.floats}, \DescPageRef{maincls.cmd.caption})}% + \feentry{captionlabel}{label of a figure or table caption; applied in + addition to the \DescRef{\ThisCommonLabelBase.fontelement.caption} + element (see \autoref{sec:maincls.floats}, + \DescPageRef{maincls.cmd.caption})}% + \feentry{chapter}{title of the sectioning command + \DescRef{\ThisCommonLabelBase.cmd.chapter} (see + \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.chapter})}% + \feentry{chapterentry}{% + table of contents entry for the sectioning command + \DescRef{\ThisCommonLabelBase.cmd.chapter} (see + \autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{chapterentrydots}{% + \ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}}% + optional points connecting table-of-content entries for the + \DescRef{\ThisCommonLabelBase.cmd.chapter} level, differing from the + \DescRef{\ThisCommonLabelBase.fontelement.chapterentry} element, + \Macro{normalfont} and \Macro{normalsize} (see + \autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{chapterentrypagenumber}{% + page number of the table of contents entry for the sectioning command + \DescRef{\ThisCommonLabelBase.cmd.chapter}, differing from the element + \DescRef{\ThisCommonLabelBase.fontelement.chapterentry} (see + \autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{chapterprefix}{% + label, e.\,g., ``Chapter'', appearing before the chapter number in both + \OptionValueRef{maincls}{chapterprefix}{true} and + \OptionValueRef{maincls}{appendixprefix}{true} (see + \autoref{sec:maincls.structure}, + \DescPageRef{maincls.option.chapterprefix})}% + \feentry{date}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}}% + date of the document in the main title, i.\,e., the argument of + \DescRef{\ThisCommonLabelBase.cmd.date} when + \DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.date})}% + \feentry{dedication}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}}% + dedication page after the main title, i.\,e., the argument of + \DescRef{\ThisCommonLabelBase.cmd.dedication} when + \DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.dedication})}% + \feentry{descriptionlabel}{labels, i.\,e., the optional argument of + \DescRef{\ThisCommonLabelBase.cmd.item.description} in the + \DescRef{\ThisCommonLabelBase.env.description} environment (see + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.description})}% + \feentry{dictum}{dictum or epigraph (see \autoref{sec:maincls.dictum}, + \DescPageRef{maincls.cmd.dictum})}% + \feentry{dictumauthor}{author of a dictum or epigraph; applied in addition + to the element \DescRef{\ThisCommonLabelBase.fontelement.dictum} (see + \autoref{sec:maincls.dictum}, \DescPageRef{maincls.cmd.dictum})}% + \feentry{dictumtext}{alternative name for + \DescRef{\ThisCommonLabelBase.fontelement.dictum}}% + \feentry{disposition}{all sectioning command titles, i.\,e., the arguments + of \DescRef{\ThisCommonLabelBase.cmd.part} down to + \DescRef{\ThisCommonLabelBase.cmd.subparagraph} and + \DescRef{\ThisCommonLabelBase.cmd.minisec}, including the title of the + abstract; applied before the element of the respective unit (see + \autoref{sec:maincls.structure}, \autopageref{sec:maincls.structure})}% + \feentry{footnote}{footnote text and marker (see + \autoref{sec:maincls.footnotes}, \DescPageRef{maincls.cmd.footnote})}% + \feentry{footnotelabel}{marker for a footnote; applied in addition to the + element \DescRef{\ThisCommonLabelBase.fontelement.footnote} (see + \autoref{sec:maincls.footnotes}, \DescPageRef{maincls.cmd.footnote})}% + \feentry{footnotereference}{footnote reference in the text (see + \autoref{sec:maincls.footnotes}, \DescPageRef{maincls.cmd.footnote})}% + \feentry{footnoterule}{% + horizontal rule\ChangedAt{v3.07}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} above the footnotes at the end + of the text area (see \autoref{sec:maincls.footnotes}, + \DescPageRef{maincls.cmd.setfootnoterule})}% + \feentry{itemizelabel}{% + \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Default for the preset symbols of the environment + \DescRef{\ThisCommonLabelBase.env.itemize} (see + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% + \feentry{labelinglabel}{labels, i.\,e., the optional argument of + \DescRef{\ThisCommonLabelBase.cmd.item.labeling} in the + \DescRef{\ThisCommonLabelBase.env.labeling} environment (see + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.labeling})}% + \feentry{labelingseparator}{separator, i.\,e., the optional argument of + the \DescRef{\ThisCommonLabelBase.env.labeling} environment; applied in + addition to the element + \DescRef{\ThisCommonLabelBase.fontelement.labelinglabel} (see + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.labeling})}% + \feentry{labelitemi}{% + \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Font to be used in the item symbol definition + \DescRef{\ThisCommonLabelBase.cmd.labelitemi} (see + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% + \feentry{labelitemii}{% + \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Font to be used in the item symbol definition + \DescRef{\ThisCommonLabelBase.cmd.labelitemii} (see + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% + \feentry{labelitemiii}{% + \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Font to be used in the item symbol definition + \DescRef{\ThisCommonLabelBase.cmd.labelitemiii} (see + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% + \feentry{labelitemiv}{% + \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Font to be used in the item symbol definition + \DescRef{\ThisCommonLabelBase.cmd.labelitemiv} (see + \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% + \feentry{minisec}{title of \DescRef{\ThisCommonLabelBase.cmd.minisec} (see + \autoref{sec:maincls.structure} ab \DescPageRef{maincls.cmd.minisec})}% + \feentry{pagefoot}{only used if package \Package{scrlayer-scrpage} has + been loaded (see \autoref{cha:scrlayer-scrpage}, + \DescPageRef{scrlayer-scrpage.fontelement.pagefoot})}% + \feentry{pagehead}{alternative name for + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}}% + \feentry{pageheadfoot}{the header and footer of a page (see + \autoref{sec:maincls.pagestyle} from + \autopageref{sec:maincls.pagestyle})}% + \feentry{pagenumber}{page number in the header or footer (see + \autoref{sec:maincls.pagestyle})}% + \feentry{pagination}{alternative name for + \DescRef{\ThisCommonLabelBase.fontelement.pagenumber}}% + \feentry{paragraph}{title of the sectioning command + \DescRef{\ThisCommonLabelBase.cmd.paragraph} (see + \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.paragraph})}% + \feentry{part}{title of the \DescRef{\ThisCommonLabelBase.cmd.part} + sectioning command, without the line containing the part number (see + \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.part})}% + \feentry{partentry}{% + table of contents entry for the sectioning command + \DescRef{\ThisCommonLabelBase.cmd.part} (see \autoref{sec:maincls.toc}, + \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{partentrypagenumber}{% + page number of the table of contents entry for the sectioning command + \DescRef{\ThisCommonLabelBase.cmd.part}; applied in addition to the + element \DescRef{\ThisCommonLabelBase.fontelement.partentry} (see + \autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{partnumber}{line containing the part number in a title of the + sectioning command \DescRef{\ThisCommonLabelBase.cmd.part} (see + \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.part})}% + \feentry{publishers}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}}% + publishers of the document in the main title, i.\,e., the argument of + \DescRef{\ThisCommonLabelBase.cmd.publishers} when + \DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.publishers})}% + \feentry{section}{title of the sectioning command + \DescRef{\ThisCommonLabelBase.cmd.section} (see + \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.section})}% + \feentry{sectionentry}{% + table of contents entry for sectioning command + \DescRef{\ThisCommonLabelBase.cmd.section} (only available in + \Class{scrartcl}, see \autoref{sec:maincls.toc}, + \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{sectionentrydots}{% + \ChangedAt{v3.15}{\Class{scrartcl}}% + optional points connecting table-of-content entries for the + \DescRef{\ThisCommonLabelBase.cmd.section} level, differing from the + \DescRef{\ThisCommonLabelBase.fontelement.sectionentry} element, + \Macro{normalfont} and \Macro{normalsize} (only available in + \Class{scrartcl}, see \autoref{sec:maincls.toc}, + \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{sectionentrypagenumber}{% + page number of the table of contents entry for the sectioning command + \DescRef{\ThisCommonLabelBase.cmd.section}; applied in addition to + element \DescRef{\ThisCommonLabelBase.fontelement.sectionentry} (only + available in \Class{scrartcl}, see \autoref{sec:maincls.toc}, + \DescPageRef{maincls.cmd.tableofcontents})}% + \feentry{sectioning}{alternative name for + \DescRef{\ThisCommonLabelBase.fontelement.disposition}}% + \feentry{subject}{% + topic of the document, i.\,e., the argument of + \DescRef{\ThisCommonLabelBase.cmd.subject} on the main title page (see + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.subject})}% + \feentry{subparagraph}{title of the sectioning command + \DescRef{\ThisCommonLabelBase.cmd.subparagraph} (see + \autoref{sec:maincls.structure}, + \DescPageRef{maincls.cmd.subparagraph})}% + \feentry{subsection}{title of the sectioning command + \DescRef{\ThisCommonLabelBase.cmd.subsection} (see + \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.subsection})}% + \feentry{subsubsection}{title of the sectioning command + \DescRef{\ThisCommonLabelBase.cmd.subsubsection} (see + \autoref{sec:maincls.structure}, + \DescPageRef{maincls.cmd.subsubsection})}% + \feentry{subtitle}{% + subtitle of the document, i.\,e., the argument of + \DescRef{\ThisCommonLabelBase.cmd.subtitle} on the main title page (see + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.title})}% + \feentry{title}{main title of the document, i.\,e., the argument of + \DescRef{\ThisCommonLabelBase.cmd.title} (for details about the title + size see the additional note in the text of + \autoref{sec:maincls.titlepage} from \DescPageRef{maincls.cmd.title})}% + \feentry{titlehead}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}}% + heading above the main title of the document, i.\,e., the argument of + \DescRef{\ThisCommonLabelBase.cmd.titlehead} when + \DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see + \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.titlehead})}% + \end{desclist} +\else + \IfThisCommonLabelBase{scrextend}{\iftrue}{\csname iffalse\endcsname} + \begin{Example} + Suppose you want to print the document title in a red serif font. + You can do this using: +\begin{lstcode} + \setkomafont{title}{\color{red}} +\end{lstcode} + You will need the \Package{color} or the \Package{xcolor} package for + the \Macro{color}\PParameter{red} command. Using \Macro{normalfont} is + unnecessary in this case because it is already part of the definition of + the title itself. This\textnote{Attention!} example also needs the + \OptionValueRef{scrextend}{extendedfeature}{title} option (see + \autoref{sec:scrextend.optionalFeatures}, + \DescPageRef{scrextend.option.extendedfeature}). + \end{Example} + \else + \IfThisCommonLabelBase{scrlttr2}{% + You can find a general example that uses both \Macro{setkomafont} and + \Macro{usekomafont} in \autoref{sec:maincls.textmarkup} on + \PageRefxmpl{maincls.cmd.setkomafont}. + + \begin{desclist} + \desccaption{% + Elements whose font style can be changed in the \Class{scrlttr2} + class or the \Package{scrletter} package with the + \Macro{setkomafont} and \Macro{addtokomafont} + commands\label{tab:scrlttr2.fontelements}% + }{% + Elements whose font style can be changed (\emph{continued})% + }% + \feentry{addressee}{recipient's name and address in the address field + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.option.addrfield})}% + \feentry{backaddress}{% + return address for a window envelope + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.option.backaddress})}% + \feentry{descriptionlabel}{% + label, i.\,e. the optional argument of + \DescRef{\ThisCommonLabelBase.cmd.item.description}, in a + \DescRef{\ThisCommonLabelBase.env.description} environment + (\autoref{sec:scrlttr2.lists}, + \DescPageRef{scrlttr2.env.description})}% + \feentry{foldmark}{% + fold mark on the letterhead page; allows change of line colour + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.option.foldmarks})}% + \feentry{footnote}{% + footnote text and marker (\autoref{sec:scrlttr2.footnotes}, + \DescPageRef{scrlttr2.cmd.footnote})}% + \feentry{footnotelabel}{% + footnote marker; applied in addition to the + \DescRef{\ThisCommonLabelBase.fontelement.footnote} element + (\autoref{sec:scrlttr2.footnotes}, + \DescPageRef{scrlttr2.cmd.footnote})}% + \feentry{footnotereference}{% + footnote reference in the text (\autoref{sec:scrlttr2.footnotes}, + \DescPageRef{scrlttr2.cmd.footnote})}% + \feentry{footnoterule}{% + horizontal rule\ChangedAt{v3.07}{\Class{scrlttr2}} above the + footnotes at the end of the text area + (\autoref{sec:maincls.footnotes}, + \DescPageRef{maincls.cmd.setfootnoterule})}% + \feentry{fromaddress}{% + sender's address in the letterhead + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.fromaddress})}% + \feentry{fromname}{% + sender's name in the letterhead, not including \PValue{fromaddress} + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.fromname})}% + \feentry{fromrule}{% + horizontal rule in the letterhead; intended for colour changes + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.option.fromrule})}% + \feentry{itemizelabel}{% + \ChangedAt{v3.33}{\Class{scrlttr2}}% + Default for the preset symbols of the environment + \DescRef{\ThisCommonLabelBase.env.itemize} (see + \autoref{sec:scrlttr2.lists}, \DescPageRef{scrlttr2.env.itemize})}% + \feentry{labelinglabel}{% + labels, i.\,e. the optional argument of + \DescRef{\ThisCommonLabelBase.cmd.item.labeling} in the + \DescRef{\ThisCommonLabelBase.env.labeling} environment % + (see \autoref{sec:scrlttr2.lists}, + \DescPageRef{scrlttr2.env.labeling})}% + \feentry{labelingseparator}{% + separator, i.\,e. the optional argument of the + \DescRef{\ThisCommonLabelBase.env.labeling} environment; applied in + addition to the + \DescRef{\ThisCommonLabelBase.fontelement.labelinglabel} element + (see \autoref{sec:scrlttr2.lists}, + \DescPageRef{scrlttr2.env.labeling})}% + \feentry{labelitemi}{% + \ChangedAt{v3.33}{\Class{scrlttr2}}% + Font to be used in the item symbol definition + \DescRef{\ThisCommonLabelBase.cmd.labelitemi} (see + \autoref{sec:scrlttr2.lists}, \DescPageRef{scrlttr2.env.itemize})}% + \feentry{labelitemii}{% + \ChangedAt{v3.33}{\Class{scrlttr2}}% + Font to be used in the item symbol definition + \DescRef{\ThisCommonLabelBase.cmd.labelitemii} (see + \autoref{sec:scrlttr2.lists}, \DescPageRef{scrlttr2.env.itemize})}% + \feentry{labelitemiii}{% + \ChangedAt{v3.33}{\Class{scrlttr2}}% + Font to be used in the item symbol definition + \DescRef{\ThisCommonLabelBase.cmd.labelitemiii} (see + \autoref{sec:scrlttr2.lists}, \DescPageRef{scrlttr2.env.itemize})}% + \feentry{labelitemiv}{% + \ChangedAt{v3.33}{\Class{scrlttr2}}% + Font to be used in the item symbol definition + \DescRef{\ThisCommonLabelBase.cmd.labelitemiv} (see + \autoref{sec:scrlttr2.lists}, \DescPageRef{scrlttr2.env.itemize})}% + \feentry{pagefoot}{% + depending on the page style used after the + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot} element for + the footer (\autoref{sec:\LabelBase.pagestyle}, + \DescPageRef{\LabelBase.fontelement.pagefoot})}% + \feentry{pagehead}{% + depending on the page style used after the + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot} element for + the header (\autoref{sec:\LabelBase.pagestyle}, + \DescPageRef{\LabelBase.fontelement.pagefoot})}% + \feentry{pageheadfoot}{% + the header and footer of a page for all page styles that have been + defined using \KOMAScript{} (\autoref{sec:\LabelBase.pagestyle}, + \DescPageRef{\ThisCommonLabelBase.fontelement.pageheadfoot})}% + \feentry{pagenumber}{% + page number in the header or footer % + (\autoref{sec:\LabelBase.pagestyle}, + \DescPageRef{\ThisCommonLabelBase.fontelement.pagenumber})}% + \feentry{pagination}{% + alternative name for + \DescRef{\ThisCommonLabelBase.fontelement.pagenumber}}% + \feentry{placeanddate}{% + \ChangedAt{v3.12}{\Class{scrlttr2}}% + place and date, if a date line will be used instead of a normal + reference line (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.placeseparator})}% + \feentry{refname}{% + description or title of the fields in the reference line % + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.yourref})}% + \feentry{refvalue}{% + content of the fields in the reference line % + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.yourref})}% + \feentry{specialmail}{% + delivery type in the address field % + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.specialmail})}% + \feentry{lettersubject}{% + \ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}}% + subject in the opening of the letter % + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.subject})}% + \feentry{lettertitle}{% + \ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}}% + title in the opening of the letter % + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.title})}% + \feentry{toaddress}{% + variation of the + \DescRef{\ThisCommonLabelBase.fontelement.addressee} element to + format the recipient's address, not including the name, in the + address field (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.toaddress})}% + \feentry{toname}{% + variation of the + \DescRef{\ThisCommonLabelBase.fontelement.addressee} element to + format the recipient's name in the address field + (\autoref{sec:scrlttr2.firstpage}, + \DescPageRef{scrlttr2.variable.toname})}% + \end{desclist} + }{% + \IfThisCommonLabelBase{scrlayer-scrpage}{% + \begin{desclist} + \desccaption[{Elements of \Package{scrlayer-scrpage} whose font + styles can be changed with the \Macro{setkomafont} and + \Macro{addtokomafont} commands}]% + {Elements of \Package{scrlayer-scrpage} whose font styles can be + changed with the \Macro{setkomafont} and \Macro{addtokomafont} + commands, and their defaults, if they have not been defined + before loading \Package{scrlayer-scrpage}% + \label{tab:scrlayer-scrpage.fontelements}% + }% + {Elements whose font style can be changed (\emph{continued})}% + \feentry{footbotline}{% + horizontal line below the footer of a page style defined using + \Package{scrlayer-scrpage}. The font will be applied after + \Macro{normalfont}\IndexCmd{normalfont} and the fonts of elements + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% + \IndexFontElement{pageheadfoot} and + \DescRef{\ThisCommonLabelBase.fontelement.pagefoot}% + \IndexFontElement{pagefoot}. It is recommended to use this element + for colour changes only.\par + \mbox{Default: \emph{empty}}% + }% + \feentry{footsepline}{% + horizontal line above the footer of a page style defined using + \Package{scrlayer-scrpage}. The font will be applied after + \Macro{normalfont}\IndexCmd{normalfont} and the fonts of elements + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% + \IndexFontElement{pageheadfoot} and + \DescRef{\ThisCommonLabelBase.fontelement.pagefoot}% + \IndexFontElement{pagefoot}. It is recommended to use this element + for colour changes only.\par + \mbox{Default: \emph{empty}}% + }% + \feentry{headsepline}{% + horizontal line below the header of a page style defined using + \Package{scrlayer-scrpage}. The font will be applied after + \Macro{normalfont}\IndexCmd{normalfont} and the fonts of elements + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% + \IndexFontElement{pageheadfoot} and + \DescRef{scrlayer-scrpage.fontelement.pagehead}% + \IndexFontElement{pagehead}. It is recommended to use this element + for colour changes only.\par + Default: \emph{empty}% + }% + \feentry{headtopline}{% + horizontal line above the header of a page style defined using + \Package{scrlayer-scrpage}. The font will be applied after + \Macro{normalfont}\IndexCmd{normalfont} and the fonts of elements + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% + \IndexFontElement{pageheadfoot} and + \DescRef{scrlayer-scrpage.fontelement.pagehead}% + \IndexFontElement{pagehead}. It is recommended to use this element + for colour changes only.\par + \mbox{Default: \emph{empty}}% + }% + \feentry{pagefoot}{% + contents of the page footer of a page style defined using + \Package{scrlayer-scrpage}. The font will be applied after + \Macro{normalfont}\IndexCmd{normalfont} and the font of element + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% + \IndexFontElement{pageheadfoot}.\par + \mbox{Default: \emph{empty}}% + }% + \feentry{pagehead}{% + contents of the page header of a page style defined using + \Package{scrlayer-scrpage}. The font will be applied after + \Macro{normalfont}\IndexCmd{normalfont} and the font of element + \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% + \IndexFontElement{pageheadfoot}.\par + \mbox{Default: \emph{empty}}% + }% + \feentry{pageheadfoot}{% + contents of the page header or footer of a page style defined + using \Package{scrlayer-scrpage}. The font will be applied after + \Macro{normalfont}\IndexCmd{normalfont}.\par + \mbox{Default: \Macro{normalcolor}\Macro{slshape}}% + }% + \feentry{pagenumber}{% + pagination set with + \DescRef{\ThisCommonLabelBase.cmd.pagemark}. If you redefine + \DescRef{\ThisCommonLabelBase.cmd.pagemark}, you have to be sure + that your redefinition also uses + \Macro{usekomafont}\PParameter{pagenumber}!\par + \mbox{Default: \Macro{normalfont}}% + }% + \end{desclist} + }{% + \IfThisCommonLabelBase{scrjura}{% + \begin{table} + \caption{Elements whose \Package{scrjura} font styles can be + changed with \Macro{setkomafont} and \Macro{addtokomafont}, + including their default settings}% + \label{tab:scrjura.fontelements}% + \begin{desctabular} + \feentry{Clause}{% + alias for \FontElement{\PName{environment name}.Clause} + within a contract environment, for example + \FontElement{contract.Clause} within + \DescRef{\ThisCommonLabelBase.env.contract}; if no + corresponding element is defined, + \FontElement{contract.Clause} is used% + }% + \feentry{contract.Clause}{% + heading of a paragraph within + \DescRef{\ThisCommonLabelBase.env.contract} (see + \autoref{sec:\ThisCommonLabelBase.contract}, + \DescPageRef{\ThisCommonLabelBase.fontelement.contract.Clause}); + \par + \mbox{Default: \Macro{sffamily}\Macro{bfseries}\Macro{large}}% + }% + \entry{\DescRef{\ThisCommonLabelBase.fontelement./Name/.Clause}}{% + \IndexFontElement[indexmain]{\PName{name}.Clause}% + heading of a paragraph within a \PName{name} environment + defined with + \DescRef{\ThisCommonLabelBase.cmd.DeclareNewJuraEnvironment} + as long as the setting was made with \Option{ClauseFont} or + the item was subsequently defined (see + \autoref{sec:\ThisCommonLabelBase.newenv}, + \DescPageRef{\ThisCommonLabelBase.fontelement./Name/.Clause}); + \par + \mbox{Default: \emph{none}}% + }% + \feentry{parnumber}{% + paragraph numbers within a contract environment (see + \autoref{sec:\ThisCommonLabelBase.par}, + \DescPageRef{\ThisCommonLabelBase.fontelement.parnumber});\par + \mbox{Default: \emph{empty}}% + }% + \feentry{sentencenumber}{% + \ChangedAt{v3.26}{\Package{scrjura}}% + sentence number of \DescRef{\ThisCommonLabelBase.cmd.Sentence} + (see \autoref{sec:\ThisCommonLabelBase.sentence}, + \DescPageRef{% + \ThisCommonLabelBase.fontelement.sentencenumber});\par + \mbox{Default: \emph{empty}}% + }% + \end{desctabular} + \end{table} + }{% + \IfThisCommonLabelBase{scrlayer-notecolumn}{}{% + \InternalCommonFileUsageError% + }% + }% + }% + }% + \fi% +\fi +\EndIndexGroup + + +\begin{Declaration} + \Macro{usefontofkomafont}\Parameter{element}% + \Macro{useencodingofkomafont}\Parameter{element}% + \Macro{usesizeofkomafont}\Parameter{element}% + \Macro{usefamilyofkomafont}\Parameter{element}% + \Macro{useseriesofkomafont}\Parameter{element}% + \Macro{useshapeofkomafont}\Parameter{element} +\end{Declaration} +Sometimes\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Package{scrextend}}, although this is not recommended, +the font setting of an element is used for settings that are not actually +related to the font. If you want to apply only the font setting of an element +but not those other settings, you can use \Macro{usefontofkomafont} instead of +\DescRef{\ThisCommonLabelBase.cmd.usekomafont}. This will activate the font +size and baseline skip, the font encoding, the font family, the font series, +and the font shape of an element, but no further settings as long as those +further settings are local. + +You can also switch to a single one of those attributes using one of the other +commands. Note that \Macro{usesizeofkomafont} uses both the font +size and the baseline skip.% +% +\IfThisCommonLabelBase{scrextend}{% Umbruchvariante! +}{% + \IfThisCommonLabelBase{scrjura}{% + \par% + However, the misuse of the font settings is strongly discouraged (see + \autoref{sec:maincls-experts.fonts}, + \DescPageRef{maincls-experts.cmd.addtokomafontrelaxlist})!% + }{% + \par% + However, you should not take these commands as legitimizing the insertion + of arbitrary commands in an element's font setting. To do so can lead + quickly to errors (see \autoref{sec:maincls-experts.fonts}, + \DescPageRef{maincls-experts.cmd.addtokomafontrelaxlist}).% + }% +}% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-titles-de.tex b/macros/latex/contrib/koma-script/doc/common-titles-de.tex new file mode 100644 index 0000000000..1bcd135694 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-titles-de.tex @@ -0,0 +1,721 @@ +% ====================================================================== +% common-titles-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-titles-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] + +\section{Dokumenttitel} +\seclabel{titlepage}% +\BeginIndexGroup +\BeginIndex{}{Titel}% + +\IfThisCommonFirstRun{}{% + Es gilt sinngemäß, was in \autoref{sec:\ThisCommonFirstLabelBase.titlepage} + geschrieben wurde. Falls Sie also + \autoref{sec:\ThisCommonFirstLabelBase.titlepage} bereits gelesen und + verstanden haben, können Sie auf + \autopageref{sec:\ThisCommonLabelBase.titlepage.next} mit + \autoref{sec:\ThisCommonLabelBase.titlepage.next} fortfahren.% +}% +\IfThisCommonLabelBase{scrextend}{\iftrue}{\csname iffalse\endcsname}% + \ Die\textnote{Achtung!} Möglichkeiten von \Package{scrextend} zum + Dokumenttitel gehören jedoch zu den optionalen, erweiterten Möglichkeiten + und stehen daher nur zur Verfügung, wenn beim Laden des Pakets + \OptionValueRef{\ThisCommonLabelBase}{extendedfeature}{title} gewählt + wurde (siehe \autoref{sec:\ThisCommonLabelBase.optionalFeatures}, + \DescPageRef{\ThisCommonLabelBase.option.extendedfeature}). + + Darüber hinaus kann \Package{scrextend} nicht mit einer \KOMAScript-Klasse + zusammen verwendet werden. In allen Beispielen aus + \autoref{sec:maincls.titlepage} muss daher bei Verwendung von + \Package{scrextend} +\begin{lstcode} + \documentclass{scrbook} +\end{lstcode} +durch +\begin{lstcode} + \documentclass{book} + \usepackage[extendedfeature=title]{scrextend} +\end{lstcode} + ersetzt werden. +\fi + +\IfThisCommonLabelBase{scrextend}{}{% Umbruchkorrektur + Bei Dokumenten wird zwischen zwei Arten von Titeln + \IfThisCommonLabelBase{scrextend}{}{für das gesamte Dokument + }unterschieden. Zum einen gibt es die Titelseiten. Hierbei steht der + Dokumenttitel zusammen mit einigen zusätzlichen Informationen wie dem Autor + auf einer eigenen Seite. Neben der Haupttitelseite kann es weitere + Titelseiten, etwa Schmutztitel, Verlagsinformationen, Widmung oder ähnliche, + geben. Zum anderen gibt es den Titelkopf. Dabei erscheint der Titel + lediglich am Anfang einer neuen \IfThisCommonLabelBase{scrextend}{}{-- in + der Regel der ersten -- }Seite. Unterhalb dieser + Titelzeilen\Index{Titel>Zeilen} wird \IfThisCommonLabelBase{scrextend}{}{das + Dokument }beispielsweise mit der Zusammenfassung, einem Vorwort oder dem + Inhaltsverzeichnis + \IfThisCommonLabelBase{scrextend}{fortgefahren}{fortgesetzt}.% +} + + +\begin{Declaration} + \OptionVName{titlepage}{Ein-Aus-Wert} + \OptionValue{titlepage}{firstiscover} + \Macro{coverpagetopmargin} + \Macro{coverpageleftmargin} + \Macro{coverpagerightmargin} + \Macro{coverpagebottommargin} +\end{Declaration}% +Mit dieser Option% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{} wird ausgewählt, ob für die mit +\DescRef{\ThisCommonLabelBase.cmd.maketitle} (siehe +\DescPageRef{\ThisCommonLabelBase.cmd.maketitle}) gesetzte Titelei eigene +Seiten\Index{Titel>Seite} verwendet werden oder stattdessen die Titelei von +\DescRef{\ThisCommonLabelBase.cmd.maketitle} als Titelkopf\Index{Titel>Kopf} +\IfThisCommonLabelBase{scrextend}{am Anfang einer neuen Seite gesetzt + wird.}{gesetzt wird.} Als \PName{Ein-Aus-Wert} kann einer der Standardwerte +für einfache Schalter aus \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} verwendet werden. + +Mit \OptionValue{titlepage}{true}\important{\OptionValue{titlepage}{true}} +\IfThisCommonLabelBase{scrextend}{}{oder \Option{titlepage} }wird die Titelei +in Form von Titelseiten ausgewählt. Die Anweisung +\DescRef{\ThisCommonLabelBase.cmd.maketitle} verwendet +\IfThisCommonLabelBase{scrextend}{dabei +}{}\DescRef{\ThisCommonLabelBase.env.titlepage}-Umgebungen zum Setzen dieser +Seiten, die somit normalerweise weder Seitenkopf noch Seitenfuß erhalten. Bei +{\KOMAScript} wurde die Titelei gegenüber den Standardklassen stark +erweitert. Die zusätzlichen Elemente finden sie auf den nachfolgenden Seiten. + +Demgegenüber wird mit +\important{\OptionValue{titlepage}{false}}\OptionValue{titlepage}{false} +erreicht, dass ein Titelkopf (engl.: \emph{in-page title}) gesetzt wird. Das +heißt, die Titelei wird lediglich speziell hervorgehoben. Auf der Seite mit +dem Titel kann aber nachfolgend weiteres Material, beispielsweise eine +Zusammenfassung oder ein Abschnitt, gesetzt werden. + +Mit% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.12}{\Package{scrextend}}% + }{\InternalCommonFileUseError}% +} der dritten Möglichkeit, \OptionValue{titlepage}{firstiscover}% +\important{\OptionValue{titlepage}{firstiscover}}, werden nicht nur +Titelseiten aktiviert. Es wird auch dafür gesorgt, dass die erste von +\DescRef{\LabelBase.cmd.maketitle}\IndexCmd{maketitle} ausgegebene Titelseite, +also entweder der Schmutztitel oder der Haupttitel, als +Umschlagseite\Index{Umschlag} ausgegeben wird. Jede andere Einstellung für die +Option \Option{titlepage} hebt diese Einstellung wieder auf. Die +Ränder\important{\Macro{coverpage\dots margin}} dieser Umschlagseite werden +über \Macro{coverpagetopmargin} (oberer Rand), \Macro{coverpageleftmargin} +(linker Rand), \Macro{coverpagerightmargin} (rechter Rand) und natürlich +\Macro{coverpagebottommargin} (unterer Rand) bestimmt. Die Voreinstellungen +sind von den Längen \Length{topmargin}\IndexLength{topmargin} und +\Length{evensidemargin}\IndexLength{evensidemargin} abhängig und können mit +\Macro{renewcommand} geändert werden. + +\IfThisCommonLabelBase{maincls}{% + Bei den Klassen \Class{scrbook} und \Class{scrreprt} sind Titelseiten + voreingestellt. Demgegenüber verwendet \Class{scrartcl} in der + Voreinstellung einen Titelkopf.% +}{% + \IfThisCommonLabelBase{scrextend}{% + Die Voreinstellung ist von der verwendeten Klasse abhängig und wird von + \Package{scrextend} kompatibel zu den Standardklassen erkannt. Setzt eine + Klasse keine entsprechende Voreinstellung, so ist der Titelkopf + voreingestellt.% + }{\InternalCommonFileUsageError}% +}% +% +\EndIndexGroup + + +\begin{Declaration} + \begin{Environment}{titlepage}\end{Environment} +\end{Declaration}% +\BeginIndex{Env}{titlepage}% +Grundsätzlich werden bei den Standardklassen und bei {\KOMAScript} alle +Titelseiten in einer speziellen Umgebung, der +\Environment{titlepage}-Umgebung, gesetzt. Diese Umgebung startet immer mit +einer neuen Seite -- im zweiseitigen Layout sogar mit einer neuen rechten +Seite~-- im einspaltigen Modus. Für eine Seite wird der Seitenstil mit +\DescRef{maincls.cmd.thispagestyle}% +\PParameter{\DescRef{maincls.pagestyle.empty}} +geändert, so dass weder Seitenzahl noch Kolumnentitel ausgegeben werden. Am +Ende der Umgebung wird die Seite automatisch beendet. Sollten Sie nicht das +automatische Layout der Titelei, wie es das nachfolgend beschriebene +\DescRef{\ThisCommonLabelBase.cmd.maketitle} bietet, verwenden können, ist zu +empfehlen, eine eigene Titelei mit Hilfe dieser Umgebung zu entwerfen. +% +\IfThisCommonFirstRun{\iftrue}{% + Ein Beispiel für eine einfache Titelseite mit \Environment{titlepage} finden + Sie in \autoref{sec:\ThisCommonFirstLabelBase.titlepage}, + \PageRefxmpl{\ThisCommonFirstLabelBase.env.titlepage}.% + \csname iffalse\endcsname% +}% + \begin{Example} + \phantomsection\xmpllabel{env.titlepage}% + Angenommen, Sie wollen eine Titelseite, auf der lediglich oben links + möglichst groß und fett das Wort »Me« steht -- kein Autor, kein Datum, + nichts weiter. Folgendes Dokument ermöglicht das: +\begin{lstcode} + \documentclass{scrbook} + \begin{document} + \begin{titlepage} + \textbf{\Huge Me} + \end{titlepage} + \end{document} +\end{lstcode} + \end{Example} + % Beispiel am Ende der Beschreibung + \vskip -1\ht\strutbox plus .75\ht\strutbox% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{maketitle}\OParameter{Seitenzahl} +\end{Declaration}% +Während\textnote{\KOMAScript{} vs. Standardklassen} bei den Standardklassen +nur maximal eine Titelseite mit den \IfThisCommonLabelBase{scrextend}{}{drei +}Angaben Titel, Autor und Datum existiert, können bei {\KOMAScript} mit +\Macro{maketitle} bis zu sechs Titelseiten gesetzt werden. +\iffalse % Umbruchkorrektur +Im Gegensatz zu den Standardklassen % +\else % +Außerdem % +\fi % +kennt \Macro{maketitle} bei {\KOMAScript} +\iffalse % Umbruchkorrektur (von obiger abhängig) +außerdem % +\fi % +noch ein optionales numerisches Argument. Findet es Verwendung, so wird die +Nummer als Seitenzahl der ersten Titelseite benutzt. Diese Seitenzahl wird +jedoch nicht ausgegeben, sondern beeinflusst lediglich die Zählung. Sie +sollten hier unbedingt eine ungerade Zahl wählen, da sonst die gesamte Zählung +durcheinander gerät. Meiner Auf"|fassung nach gibt es nur zwei sinnvolle +Anwendungen für das optionale Argument. Zum einen könnte man dem +Schmutztitel\Index[indexmain]{Schmutztitel} die logische Seitenzahl -1 geben, +um so die Seitenzählung erst ab der Haupttitelseite mit 1 zu beginnen. Zum +anderen könnte man mit einer höheren Seitenzahl beginnen, beispielsweise 3, 5 +oder 7, um so weitere Titelseiten zu berücksichtigen, die erst vom Verlag +hinzugefügt werden. Wird ein Titelkopf verwendet, wird das optionale Argument +ignoriert. Dafür kann der Seitenstil einer solchen Titelei durch Umdefinierung +des Makros \DescRef{\ThisCommonLabelBase.cmd.titlepagestyle}% +\important{\DescRef{\ThisCommonLabelBase.cmd.titlepagestyle}} (siehe +\autoref{sec:maincls.pagestyle}, \DescPageRef{maincls.cmd.titlepagestyle}) +verändert werden. + +Die folgenden Anweisungen führen nicht unmittelbar zum Setzen der Titelei. Das +Setzen der Titelei erfolgt immer mit \Macro{maketitle}. Es sei an dieser +Stelle auch darauf hingewiesen, dass \Macro{maketitle} nicht innerhalb einer +\DescRef{\ThisCommonLabelBase.env.titlepage}-Umgebung zu verwenden +ist. Wie\textnote{Achtung!} in den +Beispielen\IfThisCommonLabelBase{maincls}{}{ in + \autoref{sec:\ThisCommonFirstLabelBase.titlepage}} angegeben, sollte man nur +entweder \Macro{maketitle} oder \DescRef{\ThisCommonLabelBase.env.titlepage} +verwenden. + +Mit den nachfolgend erklärten Anweisungen werden lediglich die Inhalte der +Titelei festgelegt. Sie müssen daher auch unbedingt vor \Macro{maketitle} +verwendet werden. Es ist jedoch nicht notwendig und bei Verwendung des +\Package{babel}-Pakets\IndexPackage{babel} (siehe \cite{package:babel}) auch +nicht empfehlenswert, diese Anweisungen in der Dokumentpräambel vor +\Macro{begin}\PParameter{document} zu verwenden. Beispieldokumente finden Sie +\IfThisCommonFirstRun{bei den weiteren Befehlen dieses Abschnitts}{in + \autoref{sec:\ThisCommonFirstLabelBase.titlepage} ab + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.extratitle}}. + + +\begin{Declaration} + \Macro{extratitle}\Parameter{Schmutztitel} + \Macro{frontispiece}\Parameter{Frontispiz} +\end{Declaration}% +\begin{Explain}% + Früher war der Buchblock oftmals nicht durch einen Buchdeckel vor + Verschmutzung geschützt. Diese Aufgabe übernahm dann die erste Seite des + Buches, die meist einen Kurztitel, eben den \emph{Schmutztitel}, trug. Auch + heute noch wird diese Extraseite vor dem eigentlichen Haupttitel gerne + verwendet und enthält dann Verlagsangaben, Buchreihennummer und ähnliche + Angaben. +\end{Explain} +Bei {\KOMAScript} ist es möglich, vor der eigentlichen Titelseite eine weitere +Seite zu setzen. Als \PName{Schmutztitel}\Index{Schmutztitel} kann dabei +beliebiger Text -- auch mehrere Absätze -- gesetzt werden. Der Inhalt von +\PName{Schmutztitel} wird von {\KOMAScript} ohne zusätzliche Beeinflussung der +Formatierung ausgegeben. Dadurch ist dessen Gestaltung völlig dem Anwender +überlassen. Die Rückseite% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.25}{\Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.25}{\Package{scrextend}}% + }{\ThisCommonLabelBaseFailure}% +} +des Schmutztitels ist das \PName{Frontispiz}. Der Schmutztitel +ergibt auch dann eine eigene Titelseite, wenn mit Titelköpfen gearbeitet +wird. Die Ausgabe des mit \Macro{extratitle} definierten Schmutztitels erfolgt +als Bestandteil der Titelei mit \DescRef{\ThisCommonLabelBase.cmd.maketitle}. + +\IfThisCommonFirstRun{\iftrue}{% + Ein Beispiel für eine einfache Titelseite mit Schmutztitel und Haupttitel + finden Sie in \autoref{sec:\ThisCommonFirstLabelBase.titlepage}, + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.extratitle}.% + \csname iffalse\endcsname% +}% + \begin{Example} + \phantomsection\xmpllabel{cmd.extratitle}% + Kommen wir auf das Beispiel von oben zurück und gehen davon aus, dass das + spartanische »Me« nur den Schmutztitel darstellt. Nach dem Schmutztitel + soll noch der Haupttitel folgen. Dann kann wie folgt verfahren werden: +\begin{lstcode} + \documentclass{scrbook} + \begin{document} + \extratitle{\textbf{\Huge Me}} + \title{It's me} + \maketitle + \end{document} +\end{lstcode} + Sie können den Schmutztitel aber auch horizontal zentriert und etwas + tiefer setzen: +\begin{lstcode} + \documentclass{scrbook} + \begin{document} + \extratitle{\vspace*{4\baselineskip} + \begin{center}\textbf{\Huge Me}\end{center}} + \title{It's me} + \maketitle + \end{document} +\end{lstcode} + Die\textnote{Achtung!} Anweisung \DescRef{\ThisCommonLabelBase.cmd.title} + ist beim Setzen der Titelei mit Hilfe von + \DescRef{\ThisCommonLabelBase.cmd.maketitle} grundsätzlich notwendig, + damit die Beispiele fehlerfrei sind. Sie wird nachfolgend erklärt. + \end{Example} +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{titlehead}\Parameter{Kopf} + \Macro{subject}\Parameter{Typisierung} + \Macro{title}\Parameter{Titel} + \Macro{subtitle}\Parameter{Untertitel} + \Macro{author}\Parameter{Autor} + \Macro{date}\Parameter{Datum} + \Macro{publishers}\Parameter{Verlag} + \Macro{and} + \Macro{thanks}\Parameter{Fußnote} +\end{Declaration}% +Für den Inhalt der Haupttitelseite stehen sieben Elemente zur Verfügung. Die +Ausgabe der Haupttitelseite erfolgt als Bestandteil der Titelei mit +\DescRef{\ThisCommonLabelBase.cmd.maketitle}, während die hier aufgeführten +Anweisungen lediglich der Definition der entsprechenden Elemente dienen. + +\BeginIndexGroup\BeginIndex{FontElement}{titlehead}% +\LabelFontElement{titlehead}% +Der\important{\Macro{titlehead}} +\PName{Kopf}\Index[indexmain]{Titel>Seitenkopf} des Haupttitels wird mit der +Anweisung \Macro{titlehead} definiert. Er wird über die gesamte Textbreite in +normalem Blocksatz am Anfang der Seite ausgegeben. Er kann vom Anwender frei +gestaltet werden. Für die Ausgabe wird die +Schrift\important{\FontElement{titlehead}} des gleichnamigen Elements +verwendet (siehe \autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, +\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% +\EndIndexGroup + +\BeginIndexGroup\BeginIndex{FontElement}{subject}\LabelFontElement{subject}% +Die\important{\Macro{subject}} +\PName{Typisierung}\Index[indexmain]{Typisierung} wird unmittelbar über dem +\PName{Titel} in der Schrift\important{\FontElement{subject}} des +gleichnamigen Elements ausgegeben.% +\EndIndexGroup + +\BeginIndexGroup\BeginIndex{FontElement}{title}\LabelFontElement{title}% +Der\important{\Macro{title}} \PName{Titel} wird in einer sehr großen Schrift +gesetzt. Dabei\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}}{} finden \IfThisCommonLabelBase{scrextend}{}{abgesehen + von der Größe }% Umbruchkorrektur +Schriftumschaltungen für das Element +\FontElement{title}\IndexFontElement[indexmain]{title}% +\important{\FontElement{title}} Anwendung (siehe +\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, +\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% +\EndIndexGroup + +\BeginIndexGroup\BeginIndex{FontElement}{subtitle}\LabelFontElement{subtitle}% +Der\important{\Macro{subtitle}} +\PName{Untertitel}\ChangedAt{v2.97c}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} steht knapp unter dem Titel in der +Schrift\important{\FontElement{subtitle}} des gleichnamigen Elements (siehe +\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, +\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% +\EndIndexGroup + +\BeginIndexGroup\BeginIndex{FontElement}{author}\LabelFontElement{author}% +Unter\important{\Macro{author}} dem \PName{Untertitel} folgt der +\PName{Autor}\Index[indexmain]{Autor}. Es kann auch durchaus mehr als ein +Autor innerhalb des Arguments von \Macro{author} angegeben werden. Die Autoren +sind dann mit \Macro{and}\important{\Macro{and}} voneinander zu trennen. Die +Ausgabe erfolgt in der Schrift\important{\FontElement{author}} des +gleichnamigen Elements (siehe +\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, +\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% +\EndIndexGroup + +\BeginIndexGroup\BeginIndex{FontElement}{date}\LabelFontElement{date}% +Unter\important{\Macro{date}} dem Autor oder den Autoren folgt das +Datum\Index{Datum}. Dabei ist das aktuelle Datum, +\Macro{today}\IndexCmd{today}, voreingestellt. Es kann jedoch mit \Macro{date} +eine beliebige Angabe -- auch ein leere -- erreicht werden. Die Ausgabe +erfolgt in der Schrift\important{\FontElement{date}} des gleichnamigen +Elements (siehe \autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, +\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% +\EndIndexGroup + +\BeginIndexGroup\BeginIndex{FontElement}{publishers}% +\LabelFontElement{publishers}% +Als\important{\Macro{publishers}} Letztes folgt schließlich der +\PName{Verlag}\Index[indexmain]{Verlag}. Selbstverständlich kann diese +Anweisung auch für andere Angaben geringer Wichtigkeit verwendet +werden. Notfalls kann durch Verwendung einer \Macro{parbox} über die gesamte +Seitenbreite auch erreicht werden, dass diese Angabe nicht zentriert, sondern +im Blocksatz gesetzt wird. Sie ist dann als Äquivalent zum Kopf zu +betrachten. Dabei ist jedoch zu beachten, dass sie oberhalb von eventuell +vorhandenen Fußnoten ausgegeben wird. Die Ausgabe erfolgt in der +Schrift\important{\FontElement{publishers}} des gleichnamigen Elements (siehe +\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, +\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% +\EndIndexGroup + +Fußnoten\important{\Macro{thanks}}\Index{Fussnoten=Fußnoten} werden auf der +Titelseite nicht mit \DescRef{\ThisCommonLabelBase.cmd.footnote}, sondern mit +der Anweisung \Macro{thanks} erzeugt. Sie dienen in der Regel für Anmerkungen +bei den Autoren. Als Fußnotenzeichen werden dabei Symbole statt Zahlen +verwendet. Es\textnote{Achtung!} ist zu beachten, dass \Macro{thanks} +innerhalb des Arguments einer der übrigen Anweisungen, beispielsweise im +Argument \PName{Autor} der Anweisung \Macro{author}, zu verwenden ist. % +\IfThisCommonLabelBase{scrextend}{% + Damit die Schrifteinstellung für das Element + \DescRef{\ThisCommonLabelBase.fontelement.footnote} beim Paket + \Package{scrextend} Beachtung findet muss allerdings nicht nur die + Titelerweiterung aktiviert sein, es muss auch dafür gesorgt sein, dass die + Fußnoten mit diesem Paket gesetzt werden (siehe Einleitung von + \autoref{sec:\ThisCommonLabelBase.footnotes}, + \autopageref{sec:\ThisCommonLabelBase.footnotes}). Trifft dies nicht zu, so + wird die Schrift verwendet, die von der Klasse oder anderen für die Fußnoten + verwendeten Paketen vorgegeben ist.% +}{}% + +Für% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.12}{\Package{scrextend}}% + }{\InternalCommonFileUsageError}% +} die Ausgabe der Titelelemente kann die Schrift\textnote{Schrift} +mit Hilfe der Befehle \DescRef{\ThisCommonLabelBase.cmd.setkomafont} und +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) eingestellt werden. Die +Voreinstellungen sind \autoref{tab:\ThisCommonFirstLabelBase.titlefonts}% +\IfThisCommonFirstRun{}{% + , \autopageref{tab:\ThisCommonFirstLabelBase.titlefonts}% +} % +zu entnehmen.% +\IfThisCommonFirstRun{% + \begin{table} +% \centering +% \caption + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \addtokomafont{caption}{\raggedright}% + \begin{captionbeside} + [{Schriftvoreinstellungen für die Elemente des Titels}] + {\label{tab:\ThisCommonLabelBase.titlefonts}% + \hspace{0pt plus 1ex}Voreinstellungen der Schrift für die Elemente des Titels} + [l] + \begin{tabular}[t]{ll} + \toprule + Element-Name & Voreinstellung \\ + \midrule + \FontElement{author} & \Macro{Large} \\ + \FontElement{date} & \Macro{Large} \\ + \FontElement{dedication} & \Macro{Large} \\ + \FontElement{publishers} & \Macro{Large} \\ + \FontElement{subject} & + \Macro{normalfont}\Macro{normalcolor}% + \Macro{bfseries}\Macro{Large} \\ + \FontElement{subtitle} & + \DescRef{\ThisCommonLabelBase.cmd.usekomafont}% + \PParameter{title}\Macro{large} \\ + \FontElement{title} & + \DescRef{\ThisCommonLabelBase.cmd.usekomafont}% + \PParameter{disposition} \\ + \FontElement{titlehead} & \\ + \bottomrule + \end{tabular} + \end{captionbeside} + \end{table}% +}{}% + +Bis auf den \PName{Kopf} und eventuelle Fußnoten werden alle Ausgaben +horizontal zentriert. % +\iffree{% + \IfThisCommonLabelBase{scrextend}{Die Formatierungen der einzelnen + Elemente}{Diese Angaben} sind noch einmal kurz zusammengefasst in + \autoref{tab:\ThisCommonFirstLabelBase.mainTitle}\IfThisCommonFirstRun{}{% + , \autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}} zu finden.% +}{% + \IfThisCommonLabelBase{scrextend}{% + Die Ausrichtungen der einzelnen Elemente sind ebenfalls in + \autoref{tab:\ThisCommonFirstLabelBase.mainTitle}\IfThisCommonFirstRun{}{% + , \autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}} zu finden.% + }{% + Eine Zusammenfassung dazu bietet + \autoref{tab:\ThisCommonFirstLabelBase.mainTitle}.% + }% +}% +\IfThisCommonFirstRun{% + \begin{table} + % \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + % \caption + \begin{captionbeside}[Der Haupttitel]{% + \hspace{0pt plus 1ex}% + Schrift\-größe und + Ausrichtung der Elemente der Haupttitelseite bei Verwendung von + \DescRef{\LabelBase.cmd.maketitle}} + [l] + \setlength{\tabcolsep}{.7\tabcolsep}% Umbruchoptimierung + \begin{tabular}[t]{llll} + \toprule + Element & Anweisung & Schrift & Satz \\ + \midrule + Seitenkopf & \Macro{titlehead} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{titlehead} & Block- \\ + Typisierung & \Macro{subject} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{subject} + & zentriert \\ + Titel & \Macro{title} & + \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{title}\Macro{huge} & zentriert \\ + Untertitel & \Macro{subtitle} & + \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{subtitle} & zentriert \\ + Autoren & \Macro{author} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{author} & zentriert \\ + Datum & \Macro{date} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{date} & zentriert \\ + Verlag & \Macro{publishers} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{publishers} & zentriert \\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:maincls.mainTitle} + \end{table}% +}{} + +\IfThisCommonFirstRun{\iftrue}{% + Ein Beispiel mit allen von \KOMAScript{} angebotenen Elementen für die + Haupttitelseite finden Sie in + \autoref{sec:\ThisCommonFirstLabelBase.titlepage} auf + \PageRefxmpl{\ThisCommonFirstLabelBase.maintitle}.% + \csname iffalse\endcsname% +}% + \begin{Example} + \phantomsection\xmpllabel{maintitle}% + Nehmen wir nun einmal an, Sie schreiben eine Diplomarbeit. Dabei sei + vorgegeben, dass die Titelseite oben linksbündig das Institut + einschließlich Adresse und rechtsbündig das Semester wiedergibt. Wie + üblich ist ein Titel einschließlich Autor und Abgabedatum zu setzen. + Außerdem soll der Betreuer angegeben und zu erkennen sein, dass es + sich um eine Diplomarbeit handelt. Sie könnten das wie folgt + erreichen: +\begin{lstcode} + \documentclass{scrbook} + \usepackage[ngerman]{babel} + \begin{document} + \titlehead{{\Large Universit"at Schlauenheim + \hfill SS~2001\\} + Institut f"ur Raumkr"ummung\\ + Hochschulstra"se~12\\ + 34567 Schlauenheim} + \subject{Diplomarbeit} + \title{Digitale Raumsimulation mit dem + DSP\,56004} + \subtitle{Klein aber fein?} + \author{cand. stup. Uli Ungenau} + \date{30. Februar 2001} + \publishers{Betreut durch + Prof. Dr. rer. stup. Naseweis} + \maketitle + \end{document} +\end{lstcode} + \end{Example}% +\fi + +\begin{Explain} + Ein häufiges Missverständnis betrifft die Bedeutung der + Haupttitelseite. Irrtümlich wird oft angenommen, es handle sich dabei um den + Buchumschlag\textnote{Umschlag}\Index{Umschlag} oder Buchdeckel. Daher wird + häufig erwartet, dass die Titelseite nicht den Randvorgaben für + doppelseitige Satzspiegel gehorcht, sondern rechts und links gleich große + Ränder besitzt. Nimmt man jedoch einmal ein Buch zur Hand und klappt es auf, + trifft man sehr schnell auf mindestens eine Titelseite\textnote{Titelseiten} + unter dem Buchdeckel innerhalb des sogenannten Buchblocks. Genau diese + Titelseiten werden mit \DescRef{\ThisCommonLabelBase.cmd.maketitle} gesetzt. + + Wie beim Schmutztitel handelt es sich also auch bei der Haupttitelseite um + eine Seite innerhalb des Buchblocks, die deshalb dem Satzspiegel des + gesamten Dokuments gehorcht. Überhaupt ist ein Buchdeckel, das \emph{Cover}, + etwas, das man in einem getrennten Dokument erstellt.% + \IfThisCommonLabelBase{scrextend}{}{% Umbruchkorrektur + \ Schließlich hat er oft eine sehr individuelle Gestalt. Es spricht auch + nichts dagegen, hierfür ein Grafik- oder DTP-Programm zu Hilfe zu + nehmen. Ein getrenntes Dokument sollte auch deshalb verwendet werden, weil + es später auf ein anderes Druckmedium, etwa Karton, und möglicherweise mit + einem anderen Drucker ausgegeben werden soll.% + }% + + Seit \KOMAScript~3.12 kann man die erste von + \DescRef{\ThisCommonLabelBase.cmd.maketitle} ausgegebene Titelseite + alternativ aber auch als Umschlagseite formatieren lassen. Dabei ändern sich + nur die für diese Seite verwendeten Ränder (siehe Option + \OptionValueRef{\ThisCommonLabelBase}{titlepage}{firstiscover}% + \IndexOption{titlepage~=\textKValue{firstiscover}} auf + \DescPageRef{\ThisCommonLabelBase.option.titlepage}). +\end{Explain} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{uppertitleback}\Parameter{Titelrückseitenkopf} + \Macro{lowertitleback}\Parameter{Titelrückseitenfuß} +\end{Declaration}% +Im\textnote{\KOMAScript{} vs. Standardklassen} doppelseitigen Druck bleibt bei +den Standardklassen die Rückseite des Blatts mit der Titelseite leer. Bei +{\KOMAScript} lässt sich die Rückseite der Haupttitelseite hingegen für +weitere Angaben nutzen. Dabei wird zwischen genau zwei Elementen +unterschieden, die der Anwender frei gestalten kann: dem +\PName{Titelrückseitenkopf}\Index{Titel>Rueckseite=Rückseite} und dem +\PName{Titelrückseitenfuß}. Dabei kann der Kopf bis zum Fuß reichen und +umgekehrt. \iffree{Nimmt man diese Anleitung als Beispiel, so wurde der + Haftungsausschluss mit Hilfe von \Macro{uppertitleback} + gesetzt.}{Beispielsweise hätte man die Verlagsinformationen zu diesem Buch + wahlweise mit \Macro{uppertitleback} oder \Macro{lowertitleback} setzen + können.}% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{dedication}\Parameter{Widmung} +\end{Declaration}% +{\KOMAScript} bietet eine eigene Widmungsseite. Diese Widmung\Index{Widmung} +wird zentriert und in der Voreinstellung mit etwas größerer +Schrift\textnote{Schrift} gesetzt. +\BeginIndexGroup\BeginIndex{FontElement}{dedication}% +\LabelFontElement{dedication} +Die% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.12}{\Package{scrextend}}% + }{\InternalCommonFileUseError}% +}\important{\FontElement{dedication}} genaue Schrifteinstellung für das +Element \FontElement{dedication}, die +\autoref{tab:\ThisCommonFirstLabelBase.titlefonts}, +\autopageref{tab:\ThisCommonFirstLabelBase.titlefonts} zu entnehmen ist, kann +über die Anweisungen \DescRef{\ThisCommonLabelBase.cmd.setkomafont} und +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) verändert werden.% +\EndIndexGroup + +Die Rückseite ist grundsätzlich leer. Die Widmungsseite wird zusammen mit der +restlichen Titelei mit \DescRef{\ThisCommonLabelBase.cmd.maketitle} ausgegeben +und muss daher vor dieser Anweisung definiert sein. + +\IfThisCommonFirstRun{\iftrue}{% + Ein Beispiel mit allen von \KOMAScript{} angebotenen Titelseiten finden Sie + in \autoref{sec:\ThisCommonFirstLabelBase.titlepage} auf + \PageRefxmpl{\ThisCommonFirstLabelBase.fulltitle}.% + \csname iffalse\endcsname% +}% + \begin{Example} + \phantomsection\xmpllabel{fulltitle} + Nehmen wir dieses Mal an, dass Sie einen Gedichtband schreiben, den + Sie Ihrer Partnerin oder Ihrem Partner widmen wollen. Das könnte wie folgt + aussehen: +\begin{lstcode} + \documentclass{scrbook} + \usepackage[ngerman]{babel} + \begin{document} + \extratitle{\textbf{\Huge In Liebe}} + \title{In Liebe} + \author{Prinz Eisenherz} + \date{1412} + \lowertitleback{% + Dieser Gedichtband wurde mit Hilfe von + {\KOMAScript} und {\LaTeX} gesetzt.} + \uppertitleback{% + Selbstverlach\par + Auf"|lage: 1 Exemplar} + \dedication{% + Meinem Schnuckelchen\\ + in ewiger Liebe\\ + von Deinem Hasenboppelchen.} + \maketitle + \end{document} +\end{lstcode} +\iffalse % Umbruchkorrektur + Ich bitte, die Kosenamen nach eigenen Vorlieben zu ersetzen und zu + personalisieren. +\else + % Zusammentreffen von Beispielende und Beschreibung + \vskip -1\ht\strutbox plus .75\ht\strutbox +\fi + \end{Example}% +\fi% +\EndIndexGroup +% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-titles-en.tex b/macros/latex/contrib/koma-script/doc/common-titles-en.tex new file mode 100644 index 0000000000..b551559492 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-titles-en.tex @@ -0,0 +1,658 @@ +% ====================================================================== +% common-titles-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-titles-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs)] + +\translator{Gernot Hassenpflug\and Markus Kohm\and Krickette Murabayashi\and + Karl Hagen} + +\section{Document Titles} +\seclabel{titlepage}% +\BeginIndexGroup +\BeginIndex{}{title}% + +\IfThisCommonFirstRun{}{% + This information in \autoref{sec:\ThisCommonFirstLabelBase.titlepage} + largely applies to this chapter. So if you have already read and understood + \autoref{sec:\ThisCommonFirstLabelBase.titlepage}, you can skip to + \autoref{sec:\ThisCommonLabelBase.titlepage.next}, + \autopageref{sec:\ThisCommonLabelBase.titlepage.next}.% +}% +\IfThisCommonLabelBase{scrextend}{\iftrue}{\csname iffalse\endcsname}% + \ However,\textnote{Attention!} the capabilities of \Package{scrextend} + for handling the document title are part of the optional, advanced + features. Therfore they are only available, if + \OptionValueRef{\ThisCommonLabelBase}{extendedfeature}{title} is + selected while loading the package (see + \autoref{sec:\ThisCommonLabelBase.optionalFeatures}, + \DescRef{\ThisCommonLabelBase.option.extendedfeature}). + + Furthermore, \Package{scrextend} cannot be used with a \KOMAScript{} + class. Because of this, you should replace +\begin{lstcode} + \documentclass{scrbook} +\end{lstcode} + with +\begin{lstcode} + \documentclass{book} + \usepackage[extendedfeature=title]{scrextend} +\end{lstcode} + for all examples from \autoref{sec:maincls.titlepage}, if you want to + try them with \Package{scrextend}. +\fi + +\IfThisCommonLabelBase{scrextend}{}{% + In general, we distinguish two kinds of document titles. First, there are + title pages. These include title of the document, together with additional + information such as the author, on a separate page. In addition to the main + title page, there may be several other title pages, such as the half-title + or bastard title, publisher data, dedication, and so on. Second, there is + the in-page title. This kind of title appears at the top of a new page, + usually the first, and is specially emphasized. It too may be accompanied by + additional information, but it will be followed by more material on the same + page, for example by an abstract, the table of contents, or even a section.% +}% + +\begin{Declaration} + \OptionVName{titlepage}{simple switch}% + \OptionValue{titlepage}{firstiscover} + \Macro{coverpagetopmargin} + \Macro{coverpageleftmargin} + \Macro{coverpagerightmargin} + \Macro{coverpagebottommargin} +\end{Declaration}% +This option\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{} determines whether to use document title pages\Index{title>pages} or +in-page titles\Index{title>in-page} when using +\DescRef{\ThisCommonLabelBase.cmd.maketitle} (see +\DescPageRef{\ThisCommonLabelBase.cmd.maketitle}). Any value from +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} can be used +for \PName{simple switch}. + +With the \OptionValue{titlepage}{true}% +\important{\OptionValue{titlepage}{true}} +\IfThisCommonLabelBase{scrextend}{}{or \Option{titlepage}} option, +invoking \DescRef{\ThisCommonLabelBase.cmd.maketitle} creates titles on +separate pages. These pages are set inside a +\DescRef{\ThisCommonLabelBase.env.titlepage} environment, and they +normally have neither header nor footer. Compared to standard {\LaTeX}, +{\KOMAScript} significantly expands the handling of the titles. These +additional elements can be found on the following pages. + +In contrast, with the +\OptionValue{titlepage}{false}\important{\OptionValue{titlepage}{false}} +option, invoking \DescRef{\ThisCommonLabelBase.cmd.maketitle} creates an +\emph{in-page} title. This means that the title is specially emphasized, but +it may be followed by more material on the same page, for instance an abstract +or a section.% + +The third choice,% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.12}{\Package{scrextend}}% + }{\InternalCommonFileUseError}% +} \OptionValue{titlepage}{firstiscover}% +\important{\OptionValue{titlepage}{firstiscover}} not only activates title +pages but also prints the first title page of +\DescRef{\ThisCommonLabelBase.cmd.maketitle}\IndexCmd{maketitle}, i.\,e. +either the half-title or the main title, as a cover\Index{cover} page. Any +other setting of the \Option{titlepage} option will cancel this setting. The +margins\important{\Macro{coverpage\dots margin}} of the cover page are given +by \Macro{coverpagetopmargin}, \Macro{coverpageleftmargin}, +\Macro{coverpagerightmargin}, and \Macro{coverpagebottommargin}. The defaults +of these depend on the lengths of \Length{topmargin}\IndexLength{topmargin} +and \Length{evensidemargin}\IndexLength{evensidemargin} and can be changed +with \Macro{renewcommand}. + +\IfThisCommonLabelBase{maincls}{% + The default of the \Class{scrbook} and \Class{scrreprt} classes is to use + title pages. The \Class{scrartcl} class, on the other hand, uses in-page + titles by default.% +}{% + \IfThisCommonLabelBase{scrextend}{% + The default depends on the class used and \Package{scrextend} recognizes + it in a way that compatible with the standard class. If a class does not + set up a comparable default, it will be an in-page title.% + }{\InternalCommonFileUsageError}% +}% +% +\EndIndexGroup + + +\begin{Declaration} + \begin{Environment}{titlepage}\end{Environment}% +\end{Declaration}% +The standard classes and {\KOMAScript} set all title pages in a special +environment: the \Environment{titlepage} environment. This environment always +starts a new page\,---\,in two-sided printing a new right-hand page\,---\,and +in single-column mode. For this page, the style is changed to +\DescRef{maincls.cmd.thispagestyle}% +\PParameter{\DescRef{maincls.pagestyle.empty}}, so that neither page number +nor running head is output. At the end of the environment, the page is +automatically shipped out. Should you not be able to use the automatic layout +of the title pages provided by \DescRef{\ThisCommonLabelBase.cmd.maketitle}, +described next, you should design a new one with the help of this environment. + +\IfThisCommonFirstRun{\iftrue}{% + A simple example for a title page with \Environment{titlepage} is shown in + \autoref{sec:\ThisCommonFirstLabelBase.titlepage} on + \PageRefxmpl{\ThisCommonFirstLabelBase.env.titlepage}% + \csname iffalse\endcsname% +}% + \begin{Example} + \phantomsection\xmpllabel{env.titlepage} + Suppose you want a title page on which only the word ``Me'' stands at + the top on the left, as large as possible and in bold\,---\,no + author, no date, nothing else. The following document creates just + that: +\begin{lstcode} + \documentclass{scrbook} + \begin{document} + \begin{titlepage} + \textbf{\Huge Me} + \end{titlepage} + \end{document} +\end{lstcode} + It's simple, isn't it? + \end{Example} +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{maketitle}\OParameter{page number} +\end{Declaration}% +While\textnote{\KOMAScript{} vs. standard classes} the standard classes +produce at most one title page that can have three items (title, author, and +date), with \KOMAScript{} \Macro{maketitle} can produce up to six pages. In +contrast to the standard classes, \Macro{maketitle} in {\KOMAScript} accepts +an optional numeric argument. If it is used, this number is the page number of +the first title page. This page number is not output, but it affects the +subsequent numbering. You should definitely choose an odd number, because +otherwise the whole count gets mixed up. In my opinion, there are only two +useful applications for the optional argument. On the one hand, you could give +the the logical page number -1 to the half-title\Index[indexmain]{half-title} +in order to give the full title page the number 1. On the other hand, you +could use it to start at a higher page number, for example, 3, 5, or 7, to +accommodate other title pages added by the publishing house. The optional +argument is ignored for \emph{in-page} titles. You can change the page style +of such a title page by redefining the +\DescRef{\ThisCommonLabelBase.cmd.titlepagestyle} macro (see +\autoref{sec:maincls.pagestyle}, \DescPageRef{maincls.cmd.titlepagestyle}). + +The following commands do not lead immediately to the ship-out of the titles. +The typesetting and ship-out of the title pages are always done by +\Macro{maketitle}. Note also that \Macro{maketitle} should not be used inside +a \DescRef{\ThisCommonLabelBase.env.titlepage} environment. +As\textnote{Attention!} shown in the examples, you should use either +\Macro{maketitle} or \DescRef{\ThisCommonLabelBase.env.titlepage}, but not +both. + +The following commands only define the contents of the title. Therefore they +must be used before \Macro{maketitle}. It is, however, not necessary and, when +using the \Package{babel} package\IndexPackage{babel} not recommended, to +include these in the preamble before \Macro{begin}\PParameter{document} (see +\cite{package:babel}). You can find examples +\IfThisCommonFirstRun{in the descriptions of the other commands in this + section}{in \autoref{sec:\ThisCommonFirstLabelBase.titlepage}, starting on + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.extratitle}}. + + +\begin{Declaration} + \Macro{extratitle}\Parameter{half-title} + \Macro{frontispiece}\Parameter{frontispiece} +\end{Declaration}% +\begin{Explain}% + In earlier times the inner book was often not protected from dirt by a + cover. This function was then assumed by the first page of the book, which + usually had just a short title, known as the \emph{half-title}. Nowadays the + extra page often appears before the real main title and contains information + about the publisher, series number, and similar information. +\end{Explain} +With {\KOMAScript}, it is possible to include a page before the real title +page. The \PName{half-title} can be arbitrary text\,---\,even several +paragraphs. The contents of the \PName{half-title} are output by {\KOMAScript} +without additional formatting. Their organisation is completely left to the +user. The verso of the half-title\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.25}{\Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.25}{\Package{scrextend}}% + }{\ThisCommonLabelBaseFailure}% +} is the frontispiece. The half-title is set on its own page even when in-page +titles are used. The output of the half-title defined with \Macro{extratitle} +takes place as part of the title produced by +\DescRef{\ThisCommonLabelBase.cmd.maketitle}. + +\IfThisCommonFirstRun{\iftrue}{% + An example of a simple title page with half-title and main title is shown + in \autoref{sec:\ThisCommonFirstLabelBase.titlepage} on + \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.extratitle}% + \csname iffalse\endcsname% +}% + \begin{Example} + \phantomsection\xmpllabel{cmd.extratitle} + Let's return to the previous example and suppose + that the Spartan ``Me'' is the half-title. The full title should + still follow the half-title. You can proceed as follows: +\begin{lstcode} + \documentclass{scrbook} + \begin{document} + \extratitle{\textbf{\Huge Me}} + \title{It's me} + \maketitle + \end{document} +\end{lstcode} + You can centre the half-title horizontally and put it a little lower down + the page: +\begin{lstcode} + \documentclass{scrbook} + \begin{document} + \extratitle{\vspace*{4\baselineskip} + \begin{center}\textbf{\Huge Me}\end{center}} + \title{It's me} + \maketitle + \end{document} +\end{lstcode} + The command\textnote{Attention!} \DescRef{\ThisCommonLabelBase.cmd.title} + is necessary in order to make the examples above work correctly. It is + explained next. + \end{Example} +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{titlehead}\Parameter{title head}% + \Macro{subject}\Parameter{subject}% + \Macro{title}\Parameter{title}% + \Macro{subtitle}\Parameter{subtitle}% + \Macro{author}\Parameter{author}% + \Macro{date}\Parameter{date}% + \Macro{publishers}\Parameter{publisher}% + \Macro{and}% + \Macro{thanks}\Parameter{footnote} +\end{Declaration}% +There are seven elements available for the content of the main title page. The +main title page is output as part of the title pages created by +\DescRef{\ThisCommonLabelBase.cmd.maketitle}, while the definitions given here +only apply to the respective elements. + +\BeginIndexGroup\BeginIndex{FontElement}{titlehead}% +\LabelFontElement{titlehead}% +The\important{\Macro{titlehead}} \PName{title head}% +\Index[indexmain]{title>head} is defined with the command +\Macro{titlehead}. It occupies the entire text width, at the top of the page, +in normal justification, and it can be freely designed by the user. It uses +the font element\important{\FontElement{titlehead}} with same name (see +\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, +\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% +\EndIndexGroup + +\BeginIndexGroup\BeginIndex{FontElement}{subject}\LabelFontElement{subject}% +The\important{\Macro{subject}} \PName{subject}\Index[indexmain]{subject} is +output with the font element\important{\FontElement{subject}} of the same name +immediately above the \PName{title}.% +\EndIndexGroup + +\BeginIndexGroup\BeginIndex{FontElement}{title}\LabelFontElement{title}% +The\important{\Macro{title}} \PName{title} is set in a very large font size. +Along\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}}{} with the font size, the font element +\FontElement{title}\IndexFontElement[indexmain]{title}% +\important{\FontElement{title}} is applied (see +\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, +\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% +\EndIndexGroup + +\BeginIndexGroup\BeginIndex{FontElement}{subtitle}\LabelFontElement{subtitle}% +The\important{\Macro{subtitle}} +\PName{subtitle}\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v2.97c}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}}{} is set just below the title using the font +element\important{\FontElement{subtitle}} of the same name (see +\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, +\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% +\EndIndexGroup + +\BeginIndexGroup\BeginIndex{FontElement}{author}\LabelFontElement{author}% +Below\important{\Macro{author}} the \PName{subtitle} appears the +\PName{author}\Index[indexmain]{author}. Several authors can be specified in +the argument of \Macro{author}. They should be separated by +\Macro{and}\important{\Macro{and}}. The output uses the font +element\important{\FontElement{author}} of the same name. (see +\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, +\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% +\EndIndexGroup + +\BeginIndexGroup\BeginIndex{FontElement}{date}\LabelFontElement{date}% +Below\important{\Macro{date}} the author or authors appears the +date\Index{date} in the font of the element of the same name. The default +value is the current date, as produced by \Macro{today}\IndexCmd{today}. The +\Macro{date} command accepts arbitrary information\,---\,even an empty +argument. The output uses the font element\important{\FontElement{date}} of +the same name (see \autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, +\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% +\EndIndexGroup + +\BeginIndexGroup\BeginIndex{FontElement}{publishers}% +\LabelFontElement{publishers}% +Finally\important{\Macro{publishers}} comes the +\PName{publisher}\Index[indexmain]{publisher}. Of course this command can also +be used for any other information of minor importance. If necessary, the +\Macro{parbox} command can be used to typeset this information over the full +page width like a regular paragraph instead of centring it. It should then be +considered equivalent to the title head. Note, however, that this field is +placed above any existing footnotes. The output uses the font +element\important{\FontElement{publishers}} of the same name (see +\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, +\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% +\EndIndexGroup + +Footnotes\important{\Macro{thanks}}\Index{footnotes} on the title page are +produced not with \Macro{footnote}, but with \Macro{thanks}. They serve +typically for notes associated with the authors. Symbols are used as footnote +markers instead of numbers. Note\textnote{Attention!} that \Macro{thanks} has +to be used inside the argument of another command, such as in the +\PName{author} argument of the command \Macro{author}. +\IfThisCommonLabelBase{scrextend}{% + However, in order for the \DescRef{\ThisCommonLabelBase.fontelement.footnote} + element to be aware of the \Package{scrextend} package, not only does the + title extension need to be enabled, it must also be set to use footnotes + with this package (see the introduction to + \autoref{sec:\ThisCommonLabelBase.footnotes}, + \autopageref{sec:\ThisCommonLabelBase.footnotes}). Otherwise, the font + specified by the class or other packages used for the footnotes will be + used.% +}{}% + +For% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.12}{\Package{scrextend}}% + }{\InternalCommonFileUsageError}% +} the output of the title elements, the font\textnote{font} can be set using +the \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} command (see +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}). The defaults are listed +in \autoref{tab:\ThisCommonFirstLabelBase.titlefonts}% +\IfThisCommonFirstRun{}{% + , \autopageref{tab:\ThisCommonFirstLabelBase.titlefonts}% +}.% +\IfThisCommonFirstRun{% + \begin{table} +% \centering +% \caption + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \addtokomafont{caption}{\raggedright}% + \begin{captionbeside} + [{Font defaults for the elements of the title}] + {\label{tab:\ThisCommonLabelBase.titlefonts}% + \hspace{0pt plus 1ex}Font defaults for the elements of the title} + [l] + \begin{tabular}[t]{ll} + \toprule + Element name & Default \\ + \midrule + \FontElement{author} & \Macro{Large} \\ + \FontElement{date} & \Macro{Large} \\ + \FontElement{dedication} & \Macro{Large} \\ + \FontElement{publishers} & \Macro{Large} \\ + \FontElement{subject} & + \Macro{normalfont}\Macro{normalcolor}% + \Macro{bfseries}\Macro{Large} \\ + \FontElement{subtitle} & + \DescRef{\ThisCommonLabelBase.cmd.usekomafont}% + \PParameter{title}\Macro{large} \\ + \FontElement{title} & + \DescRef{\ThisCommonLabelBase.cmd.usekomafont}% + \PParameter{disposition} \\ + \FontElement{titlehead} & \\ + \bottomrule + \end{tabular} + \end{captionbeside} + \end{table}% +}{}% + +With the exception of \PName{title head} and any footnotes, all output is +centred horizontally. % +\iffree{% + \IfThisCommonLabelBase{scrextend}{The formatting of each element is}{These + details are} briefly summarized in + \autoref{tab:\ThisCommonFirstLabelBase.mainTitle}\IfThisCommonFirstRun{}{% + , \autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}}.% +}{% + \IfThisCommonLabelBase{scrextend}{% + The alignment of individual elements can also be found in + \autoref{tab:\ThisCommonFirstLabelBase.mainTitle}\IfThisCommonFirstRun{}{% + , \autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}}.% + }{% + For a summary, see \autoref{tab:\ThisCommonFirstLabelBase.mainTitle}.% + }% +}% +\IfThisCommonFirstRun{% + \begin{table} + % \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + % \caption + \begin{captionbeside}[Main title]{% + \hspace{0pt plus 1ex}% + Font and horizontal positioning of the elements in the main title page + in the order of their vertical position from top to bottom when + typeset with \DescRef{\ThisCommonLabelBase.cmd.maketitle}} + [l] + \setlength{\tabcolsep}{.85\tabcolsep}% Umbruchoptimierung + \begin{tabular}[t]{llll} + \toprule + Element & Command & Font & Alignment \\ + \midrule + Title head & \Macro{titlehead} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{titlehead} & justified \\ + Subject & \Macro{subject} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{subject} & centred \\ + Title & \Macro{title} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{title}\Macro{huge} & centred \\ + Subtitle & \Macro{subtitle} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{subtitle} & centred \\ + Authors & \Macro{author} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{author} & centred \\ + Date & \Macro{date} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{date} & centred \\ + Publishers & \Macro{publishers} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{publishers} & centred \\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:maincls.mainTitle} + \end{table} +}{} + +Note\textnote{Attention!} that for the main title, \Macro{huge} will be used +after the font switching element +\DescRef{\ThisCommonLabelBase.fontelement.title}\IndexFontElement{title}. So +you cannot change the size of the main title using +\DescRef{\ThisCommonLabelBase.cmd.setkomafont} or +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont}.% + +\IfThisCommonFirstRun{\iftrue}{% + An example for a title page using all the elements offered by \KOMAScript{} + is shown in \autoref{sec:\ThisCommonFirstLabelBase.titlepage} on + \PageRefxmpl{\ThisCommonFirstLabelBase.maintitle}.% + \csname iffalse\endcsname% +}% + \begin{Example} + \phantomsection\xmpllabel{maintitle}% + Suppose you are writing a dissertation. The title page should have the + university's name and address at the top, flush left, and the semester, + flush right. As usual, a title including author and submission date + should be given. The adviser must also be indicated, together with the + fact that the document is a dissertation. You can do this as follows: +\begin{lstcode} + \documentclass{scrbook} + \usepackage[english]{babel} + \begin{document} + \titlehead{{\Large Unseen University + \hfill SS~2002\\} + Higher Analytical Institute\\ + Mythological Rd\\ + 34567 Etherworld} + \subject{Dissertation} + \title{Digital space simulation with the DSP\,56004} + \subtitle{Short but sweet?} + \author{Fuzzy George} + \date{30. February 2002} + \publishers{Adviser Prof. John Eccentric Doe} + \maketitle + \end{document} +\end{lstcode} + \end{Example}% +\fi + +\begin{Explain} + A common misconception concerns the function of the full title page. It is + often erroneously assumed to be the cover\Index{cover} or dust jacket. + Therefore, it is frequently expected that the title page will not follow the + normal layout for two-sided typesetting but will have equally large left and + right margins. + + But if you pick up a book and open it, you will quickly find at least one + title page inside the cover, within the so-called book block. Precisely + these title pages are produced by + \DescRef{\ThisCommonLabelBase.cmd.maketitle}. + + As is the case with the half-title, the full title page belongs to the book + block, and therefore should have the same page layout as the rest of the + document. A cover is actually something that you should create in a + separate document. After all, it often has a very distinct format. It can + also be designed with the help of a graphics or DTP program. A separate + document should also be used because the cover will be printed on a + different medium, such as cardboard, and possibly with another printer. + + Nevertheless, since \KOMAScript~3.12 the first title page issued by + \DescRef{\ThisCommonLabelBase.cmd.maketitle} can be formatted as a cover + page with different margins. Changes to the margins on this page do not + affect the other margins. For more information about this option, see + \OptionValueRef{\ThisCommonLabelBase}{titlepage}{firstiscover}% + \IndexOption{titlepage~=\textKValue{firstiscover}} on + \DescPageRef{\ThisCommonLabelBase.option.titlepage}. +\end{Explain} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{uppertitleback}\Parameter{titlebackhead}% + \Macro{lowertitleback}\Parameter{titlebackfoot} +\end{Declaration}% +In\textnote{\KOMAScript{} vs. standard classes} two-sided printing, the +standard classes leave the back (verso) of the title page empty. However, with +{\KOMAScript} the back of the full title page can be used for other +information. There are exactly two elements which the user can freely format: +\PName{titlebackhead}\Index{title>back}\Index{title>verso} and +\PName{titlebackfoot}. The header can extend to the footer and vice versa. +\iffree{Using this guide as an example, the legal disclaimer was set with the + help of the \Macro{uppertitleback} command.}{The publishers information of + this book, for example, could have been set either with + \Macro{uppertitleback} or \Macro{lowertitleback}.}% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{dedication}\Parameter{dedication} +\end{Declaration}% +{\KOMAScript} offers its own dedication page. This +dedication\Index{dedication} is centred and set by default with a slightly +larger font\textnote{font}. +\BeginIndexGroup\BeginIndex{FontElement}{dedication}% +\LabelFontElement{dedication} +The% +\IfThisCommonLabelBase{maincls}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% +}{% + \IfThisCommonLabelBase{scrextend}{% + \ChangedAt{v3.12}{\Package{scrextend}}% + }{\InternalCommonFileUseError}% +}\important{\FontElement{dedication}} exact font setting for the +\FontElement{dedication} element, which is taken from +\autoref{tab:\ThisCommonFirstLabelBase.titlefonts}, +\autopageref{tab:\ThisCommonFirstLabelBase.titlefonts}, can be changed with +the \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and +\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\ThisCommonLabelBase.textmarkup}, +\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}).% +\EndIndexGroup + +\IfThisCommonFirstRun{\iftrue}{% + An example with all title pages provided by \KOMAScript{} is shown in + \autoref{sec:\ThisCommonFirstLabelBase.titlepage} on + \PageRefxmpl{\ThisCommonFirstLabelBase.fulltitle}.% + \csname iffalse\endcsname% +}% + \begin{Example} + \phantomsection\xmpllabel{fulltitle}% + Suppose you have written a book of poetry and want to + dedicate it to your spouse. A solution would look like this: +\begin{lstcode} + \documentclass{scrbook} + \usepackage[english]{babel} + \begin{document} + \extratitle{\textbf{\Huge In Love}} + \title{In Love} + \author{Prince Ironheart} + \date{1412} + \lowertitleback{This poem book was set with% + the help of {\KOMAScript} and {\LaTeX}} + \uppertitleback{Self-mockery Publishers} + \dedication{To my treasured hazel-hen\\ + in eternal love\\ + from your dormouse.} + \maketitle + \end{document} +\end{lstcode} + Please use your own favourite pet names to personalize it. + \end{Example}% +\fi% +\EndIndexGroup +% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-typearea-de.tex b/macros/latex/contrib/koma-script/doc/common-typearea-de.tex new file mode 100644 index 0000000000..a34ea6f07f --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-typearea-de.tex @@ -0,0 +1,70 @@ +% ====================================================================== +% common-typearea-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-typearea-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs: typearea)] + + +\section{\texorpdfstring{Seitenauf"|teilung}{Seitenaufteilung}} +\seclabel{typearea} +\BeginIndexGroup +\BeginIndex{}{Seiten>Aufteilung=Auf\/teilung} + +Eine Dokumentseite besteht aus unterschiedlichen Teilen, wie den Rändern, dem +Kopf, dem Fuß, dem Textbereich, einer Marginalienspalte und den Abständen +zwischen diesen Elementen. \KOMAScript{} unterscheidet dabei auch noch +zwischen der Gesamtseite oder dem Papier und der sichtbaren Seite. Ohne +Zweifel gehört die Auf"|teilung der Seite in diese unterschiedlichen Teile zu +den Grundfähigkeiten einer +Klasse\IfThisCommonLabelBase{scrlttr2}{\OnlyAt{scrlttr2}}{}. Bei \KOMAScript{} +wird diese Arbeit an das Paket +\hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea} +delegiert. Dieses Paket kann auch zusammen mit anderen Klassen verwendet +werden. Die \KOMAScript-Klassen laden +\hyperref[cha:typearea]{\Package{typearea}} jedoch selbstständig. Es ist daher +weder notwendig noch sinnvoll, das Paket bei Verwendung einer +\KOMAScript-Klasse auch noch explizit per \Macro{usepackage} zu laden. Siehe +hierzu auch \autoref{sec:\ThisCommonLabelBase.options}, ab +\autopageref{sec:\ThisCommonLabelBase.options}. + +Einige Einstellungen der \KOMAScript{}-Klassen haben Auswirkungen auf die +Seitenauf"|teilung und umgekehrt. Diese Auswirkungen werden bei den +entsprechenden Einstellungen dokumentiert. + +Für die weitere Erklärung zur Wahl des Papierformats, der Auf"|teilung der +Seite in Ränder und Satzspiegel und die Wahl von ein- oder zweispaltigem Satz +sei auf die Anleitung des Pakets +\hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea} +verwiesen. Diese ist in \autoref{cha:typearea} ab \autopageref{cha:typearea} +zu finden. + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/common-typearea-en.tex b/macros/latex/contrib/koma-script/doc/common-typearea-en.tex new file mode 100644 index 0000000000..20815e2cb4 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/common-typearea-en.tex @@ -0,0 +1,67 @@ +% ====================================================================== +% common-typearea-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Paragraphs that are common for several chapters of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{common-typearea-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (common paragraphs: typearea)] +\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} + +\section{Page Layout} +\seclabel{typearea} +\BeginIndexGroup +\BeginIndex{}{page>layout} + +Each page of a document consists of different layout elements, such as the +margins, the header, the footer, the text area, the marginal note column, and +the distances between these elements. \KOMAScript{} additionally distinguishes +the entire page, also known as the paper, and the visible page. Without doubt, +the separation of the page into these different parts is one of the basic +features of a class\IfThisCommonLabelBase{scrlttr2}{\OnlyAt{scrlttr2}}{}. +\KOMAScript{} delegates this work to the package +\hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea}. This +package can also be used with other classes. The \KOMAScript{} classes, +however, load \Package{typearea} on their own. Therefore, it's neither +necessary nor sensible to load the package explicitly with \Macro{usepackage} +while using a \KOMAScript{} class. See also +\autoref{sec:\ThisCommonLabelBase.options}, +\autopageref{sec:\ThisCommonLabelBase.options}. + +Some settings of \KOMAScript{} classes affect the page layout and vice versa. +Those effects are documented at the corresponding settings. + +For more information about the choice of paper format, the division of the +page into margins and type area, and the choice between one- and two-column +typesetting, see the documentation for the +\hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea} +package. You can find it in \autoref{cha:typearea}, starting on +\autopageref{cha:typearea}. + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/expertpart-de.tex b/macros/latex/contrib/koma-script/doc/expertpart-de.tex new file mode 100644 index 0000000000..67e6cee574 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/expertpart-de.tex @@ -0,0 +1,59 @@ +% ====================================================================== +% expertpart-de.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% First part: KOMA-Script for Authors +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{expertpart-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + Part KOMA-Script for Experts] + +\setpartpreamble{% + \vspace*{2\baselineskip}% + \setlength{\parindent}{1em}% + + \noindent In diesem Teil sind die Informationen für die Autoren von + \LaTeX-Paketen und "~Klassen zu finden. Dies betrifft nicht nur + Anweisungen, die bei der Implementierung neuer Pakete und Klassen nützlich + sind, sondern auch Schnittstellen, die weitere Eingriffe in \KOMAScript{} + erlauben. Darüber hinaus sind in diesem Teil auch obsolete Optionen und + Anweisungen ebenso wie Hintergründe zur Implementierung von \KOMAScript{} zu + finden. + + Dieser Teil ist als Ergänzung zu den Informationen für Autoren von + Artikeln, Berichten, Büchern und Briefen in \autoref{part:forAuthors} + gedacht. Nähere Informationen und Beispiele für diese Anwender sind + jenem Teil zu entnehmen. +} + +\part{\KOMAScript{} für fortgeschrittene Anwender + und Experten\label{part:forExperts}} + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/expertpart-en.tex b/macros/latex/contrib/koma-script/doc/expertpart-en.tex new file mode 100644 index 0000000000..dde7d59292 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/expertpart-en.tex @@ -0,0 +1,58 @@ +% ====================================================================== +% expertpart-en.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% First part: KOMA-Script for Authors +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{expertpart-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + Part KOMA-Script for Experts] +\translator{Markus Kohm\and Karl Hagen} + +\setpartpreamble{% + \vspace*{2\baselineskip}% + \setlength{\parindent}{1em}% + + \noindent In this part, you can find information for the authors of LaTeX + packages and classes. This applies not only to commands that are useful for + implementing new packages and classes, but also to interfaces that allow + further alteration of \KOMAScript{}. Moreover, this part provides + information on obsolete options and instructions, as well as background + information on the implementation of \KOMAScript{}. + + This part is intended to supplement the information for authors of articles, + reports, books and letters in \autoref{part:forAuthors}. More information + and examples for those users can be found in that part. +} + +\part{\KOMAScript{} for Advanced Users and Experts} +\label{part:forExperts} + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/introduction-de.tex b/macros/latex/contrib/koma-script/doc/introduction-de.tex new file mode 100644 index 0000000000..c74444bc37 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/introduction-de.tex @@ -0,0 +1,381 @@ +% ====================================================================== +% introduction-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Introduction of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{introduction-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide introduction] + +\chapter{Einleitung} +\labelbase{introduction} + +Dieses Kapitel enthält \iffree{unter anderem }{}wichtige Informationen über +den Aufbau \iffree{der Anleitung}{des Buches} und die Geschichte von +\KOMAScript, die Jahre vor der ersten Version beginnt. Darüber hinaus finden +Sie Informationen für den Fall, dass Sie % +\iffalse % Umbruchkorreturauslassung + \KOMAScript{} noch nicht installiert haben, oder % +\fi% +auf Fehler stoßen. + +\iffree{% +\section{Vorbemerkung} +\seclabel{preface} + +{\KOMAScript} ist ein sehr komplexes Paket (engl. \emph{bundle}). Dies +ist schon allein darin begründet, dass es nicht nur aus einer einzigen +Klasse (engl. \emph{class}) oder einem einzigen Paket (engl. +\emph{package}), sondern einer Vielzahl derer besteht. Zwar sind die +Klassen als Gegenstücke zu den Standardklassen konzipiert (siehe +\autoref{cha:maincls}), das heißt jedoch insbesondere nicht, +dass sie nur über die Befehle, Umgebungen und Einstellmöglichkeiten +der Standardklassen verfügen oder deren Aussehen als +Standardeinstellung übernehmen. +Die Fähigkeiten von {\KOMAScript} reichen +teilweise weit über die Fähigkeiten der Standardklassen hinaus. +Manche davon sind auch als Ergänzung zu den Grundfähigkeiten des +\LaTeX-Kerns zu betrachten. + +Allein aus dem Vorgenannten ergibt sich schon zwangsläufig, dass die +Dokumentation zu {\KOMAScript} sehr umfangreich ausfällt. Hinzu kommt, +dass {\KOMAScript} in der Regel nicht gelehrt wird. Das heißt, es gibt +keinen Lehrer, der seine Schüler kennt und damit den Unterricht und +das Unterrichtsmaterial entsprechend wählen und anpassen kann. Es wäre +ein Leichtes, die Dokumentation für irgendeine Zielgruppe zu +verfassen. Die Schwierigkeit, der sich der Autor gegenüber sieht, +besteht jedoch darin, dass eine Anleitung für alle möglichen +Zielgruppen benötigt wird. Ich habe mich bemüht, eine Anleitung zu +erstellen, die für den Informatiker gleichermaßen geeignet ist wie für +die Sekretärin des Fischhändlers. Ich habe mich bemüht, obwohl es sich +dabei eigentlich um ein unmögliches Unterfangen handelt. Ergebnis sind +zahlreiche Kompromisse. Ich bitte jedoch, die Problematik bei +eventuellen Beschwerden zu berücksichtigen und bei der Verbesserung +der derzeitigen Lösung zu helfen. + +Trotz des Umfangs der Anleitung bitte ich außerdem darum, im Falle von +Problemen zunächst die Dokumentation zu konsultieren. Als erste Anlaufstelle +sei auf den mehrteiligen Index am Ende des \iffree{Dokuments}{Buches} +hingewiesen. \iffree{Zur Dokumentation gehören neben dieser Anleitung auch + alle Text-Dokumente, die Bestandteil des Pakets sind. Sie sind in + \File{MANIFEST.md} vollständig aufgeführt}{} +}{} + +\section{Dokumentaufbau} +\seclabel{structure} + +Diese Anleitung ist in mehrere Teile untergliedert. Es gibt einen Teil für +Anwender, einen für fortgeschrittene Anwender und Experten und einen Anhang +mit weiterführenden Informationen und Beispielen für diejenigen, die es ganz +genau wissen wollen. + +\autoref{part:forAuthors} richtet sich dabei an alle \KOMAScript-Anwender. Das +bedeutet, dass hier auch einige Informationen für \LaTeX-Neulinge zu finden +sind. Insbesondere ist dieser Teil mit vielen Beispielen angereichert, die dem +reinen Anwender zur Verdeutlichung der Erklärungen dienen sollen. Scheuen Sie +sich nicht, diese Beispiele selbst auszuprobieren und durch Abwandlung +herauszufinden, wie \KOMAScript{} funktioniert. Trotz allem ist diese +Anleitung jedoch keine Einführung in \LaTeX. \LaTeX-Neulingen seien daher +Dokumente wie \cite{l2kurz} nahegelegt. Wiedereinsteigern aus der Zeit von +\LaTeX~2.09 sei zumindest \cite{latex:usrguide} empfohlen. Auch das Studium des +einen oder anderen Buches zu \LaTeX{} wird empfohlen. Literaturempfehlungen +finden sich beispielsweise in \cite{DANTE:FAQ}. Der Umfang von +\cite{DANTE:FAQ} ist ebenfalls erheblich. Dennoch wird darum gebeten, sich +einen groben Überblick darüber zu verschaffen und es bei Problemen ebenso wie +\iffree{diese Anleitung}{dieses Buch} zu konsultieren. + +\autoref{part:forExperts} richtet sich an fortgeschrittene +\KOMAScript-Anwender. Das sind all diejenigen, die sich bereits mit \LaTeX{} +auskennen oder schon einige Zeit mit \KOMAScript{} gearbeitet haben und jetzt +etwas besser verstehen wollen, wie \KOMAScript{} funktioniert, wie es mit +anderen Paketen interagiert und wie man speziellere Aufgaben mit \KOMAScript{} +lösen kann. Hierzu werden die Klassenbeschreibungen aus +\autoref{part:forAuthors} in einigen Aspekten nochmals aufgegriffen und näher +erläutert. Dazu kommt die Dokumentation von Anweisungen, die speziell für +fortgeschrittene Anwender und Experten vorgesehen sind. Ergänzt wird dies +durch die Dokumentation von Paketen, die für den Anwender normalerweise insofern +verborgen sind, als sie unter der Oberfläche der Klassen und Anwenderpakete +ihre Arbeit verrichten. Diese Pakete sind ausdrücklich auch für die Verwendung +durch andere Klassen- und Paketautoren vorgesehen. + +Der Anhang\iffree{, der nur in der Buchfassung zu finden ist,}{} richtet sich +an diejenigen, denen all diese Informationen nicht genügen. Es gibt dort zum +einen Hintergrundwissen zu Fragen der Typografie, mit denen dem +fortgeschrittenen Anwender eine Grundlage für fundierte eigene Entscheidungen +vermittelt werden soll. Darüber hinaus sind dort Beispiele für angehende +Paketautoren zu finden. Diese Beispiele sind weniger dazu gedacht, einfach +übernommen zu werden. Vielmehr sollen sie Wissen um Planung und Durchführung +von \LaTeX-Projekten sowie einige grundlegende \LaTeX-Anweisungen für +Paketautoren vermitteln. + +Die Kapitel-Einteilung der Anleitung soll ebenfalls dabei +helfen, nur die Teile lesen zu müssen, die tatsächlich von Interesse sind. Um +dies zu erreichen, sind die Informationen zu den einzelnen Klassen und Paketen +nicht über das gesamte Dokument verteilt, sondern jeweils in einem Kapitel +konzentriert. Querverweise in ein anderes Kapitel sind damit in der Regel auch +Verweise auf einen anderen Teil des Gesamtpakets. Da die drei Hauptklassen in +weiten Teilen übereinstimmen, sind sie in einem gemeinsamen Kapitel +zusammengefasst. Die Unterschiede werden deutlich hervorgehoben, soweit +sinnvoll auch durch eine entsprechende Randnotiz. Dies geschieht +beispielsweise wie hier, wenn etwas nur die Klasse +\Class{scrartcl}\OnlyAt{\Class{scrartcl}} betrifft. Nachteil dieses Vorgehens +ist, dass diejenigen, die \KOMAScript{} insgesamt kennenlernen wollen, in +einigen Kapiteln auf bereits Bekanntes stoßen werden. Vielleicht nutzen Sie +die Gelegenheit, um Ihr Wissen zu vertiefen. + +Unterschiedliche Schriftarten werden auch zur Hervorhebung unterschiedlicher +Dinge verwendet. So werden die Namen von \Package{Paketen} und \Class{Klassen} +anders angezeigt als \File{Dateinamen}. \Option{Optionen}, \Macro{Anweisungen}, +\Environment{Umgebungen}, \Variable{Variablen} und +\PLength{Pseudolängen} werden einheitlich hervorgehoben. Der +\PName{Platzhalter} für einen Parameter wird jedoch anders dargestellt als ein +konkreter \PValue{Wert} eines Parameters. So zeigt etwa +\Macro{begin}\Parameter{Umgebung}, wie eine Umgebung ganz allgemein +eingeleitet wird, wohingegen \Macro{begin}\PParameter{document} angibt, wie die +konkrete Umgebung \Environment{document} beginnt. Dabei ist dann +\PValue{document} ein konkreter Wert für den Parameter \PName{Umgebung} +der Anweisung \Macro{begin}. + +\iffalse% Umbruchkorrekturtext +Damit sollten Sie nun alles wissen, um diese Anleitung lesen und verstehen zu +können. Trotzdem könnte es sich lohnen, den Rest dieses Kapitels gelegentlich +auch zu lesen. +\fi + + +\section{Die Geschichte von \KOMAScript} +\seclabel{history} + +%\begin{Explain} + Anfang der 1990er~Jahre wurde Frank Neukam damit beauf"|tragt, ein + Vorlesungsskript zu setzen. Damals war noch \LaTeX~2.09 aktuell und + es gab keine Unterscheidung nach Klassen und Paketen, sondern alles + waren Stile (engl. \emph{styles}). Die Standarddokumentstile + erschienen ihm für ein Vorlesungsskript nicht optimal und boten auch + nicht alle Befehle und Umgebungen, die er benötigte. + + Zur selben Zeit beschäftigte sich Frank auch mit Fragen der + Typografie, insbesondere mit \cite{JTsch87}. Damit stand für ihn + fest, nicht nur irgendeinen Dokumentstil für Skripten zu erstellen, + sondern allgemein eine Stilfamilie, die den Regeln der europäischen + Typografie folgt. {\Script} war geboren. + + Der \KOMAScript-Autor traf auf {\Script} ungefähr zum Jahreswechsel + 1992/""1993. Im Gegensatz zu Frank Neukam hatte er häufig mit Dokumenten im + A5-Format zu tun. Zu jenem Zeitpunkt wurde A5 weder von den Standardstilen + noch von {\Script} unterstützt. Daher dauerte es nicht lange, bis er erste + Veränderungen an {\Script} vornahm. Diese fanden sich auch in {\ScriptII} + wieder, das im Dezember~1993 von Frank veröffentlicht wurde. + + Mitte 1994 erschien dann \LaTeXe. Die damit einhergehenden Änderungen waren + tiefgreifend. Daher blieb dem Anwender von {\ScriptII} nur die Entscheidung, + sich entweder auf den Kompatibilitätsmodus von \LaTeX{} zu beschränken oder + auf {\Script} zu verzichten. Wie viele andere wollte ich beides nicht. Also + machte der \KOMAScript-Autor sich daran, einen \Script-Nachfolger für + {\LaTeXe} zu entwickeln, der am 7.~Juli~1994 unter dem Namen {\KOMAScript} + erschienen ist. Ich will hier nicht näher auf die Wirren eingehen, die es um + die offizielle Nachfolge von {\Script} gab und warum dieser neue Name + gewählt wurde. Tatsache ist, dass auch aus Franks Sicht {\KOMAScript} der + Nachfolger von {\ScriptII} ist. Zu erwähnen ist noch, dass {\KOMAScript} + ursprünglich ohne Briefklasse erschienen war. Diese wurde im Dezember~1994 + von Axel Kielhorn beigesteuert. Noch etwas später erstellte Axel Sommerfeldt + den ersten richtigen scrguide zu {\KOMAScript}. + + Seither ist einige Zeit vergangen. {\LaTeX} hat sich kaum verändert, die + \LaTeX-Landschaft erheblich. {\KOMAScript} wurde weiterentwickelt. Es findet + nicht mehr allein im deutschsprachigen Raum Anwender, sondern in ganz + Europa, Nordamerika, Australien und Asien. Diese Anwender suchen bei + {\KOMAScript} nicht allein nach einem typografisch ansprechenden + Ergebnis. Zu beobachten ist vielmehr, dass bei {\KOMAScript} ein neuer + Schwerpunkt entstanden ist: Flexibilisierung durch Variabilisierung. Unter + diesem Schlagwort verstehe ich die Möglichkeit, in das Erscheinungsbild an + vielen Stellen eingreifen zu können. Dies führte zu vielen neuen Makros, die + mehr schlecht als recht in die ursprüngliche Dokumentation integriert wurden. + Irgendwann wurde es damit auch Zeit für eine komplett überarbeitete + Anleitung. +%\end{Explain} + + +\iffree{% +\section{Danksagung} +\seclabel{thanks} + +Mein persönlicher Dank gilt Frank Neukam, ohne dessen \Script-Familie es +vermutlich {\KOMAScript} nie gegeben hätte. Mein Dank gilt denjenigen, die an +der Entstehung von {\KOMAScript} und den Anleitungen mitgewirkt +haben. Dieses Mal danke ich Elke, Jana, Ben und Edoardo stellvertretend für +Beta-Test und Kritik. Ich hoffe, ihr macht damit noch weiter. + +Ganz besonderen Dank bin ich den Gründern und den Mitgliedern von DANTE, +Deutschsprachige Anwendervereinigung \TeX~e.V\kern-.18em., schuldig, durch die +letztlich die Verbreitung von \TeX{} und \LaTeX{} und allen Paketen +einschließlich {\KOMAScript} an einer zentralen Stelle überhaupt ermöglicht +wird. In gleicher Weise bedanke ich mich bei den aktiven Helfern auf der +Mailingliste \texttt{\TeX-D-L} (siehe \cite{DANTE:FAQ})m in der Usenet-Gruppe +\texttt{de.comp.text.tex} und den vielen \LaTeX-Foren im Internet, die mir so +manche Antwort auf Fragen zu {\KOMAScript} abnehmen. + +Mein Dank gilt aber auch allen, die mich immer wieder aufgemuntert haben, +weiter zu machen und dieses oder jenes noch besser, weniger fehlerhaft oder +schlicht zusätzlich zu implementieren. Ganz besonders bedanke ich mich noch +einmal bei dem äußerst großzügigen Spender, der mich mit dem bisher und +vermutlich für alle Zeiten größten Einzelbetrag für die bisher geleistete +Arbeit an \KOMAScript{} bedacht hat. + + +\section{Rechtliches} +\seclabel{legal} + +{\KOMAScript} steht unter der {\LaTeX} Project Public Licence. Eine nicht +offizielle deutsche Übersetzung ist Bestandteil des \KOMAScript-Pakets. In +allen Zweifelsfällen gilt im deutschsprachigen Raum der Text +\File{lppl-de.txt}, während in allen anderen Ländern der Text \File{lppl.txt} +anzuwenden ist. + +\iffree{Für die Korrektheit der Anleitung, Teile der Anleitung oder einer + anderen in diesem Paket enthaltenen Dokumentation wird keine Gewähr + übernommen.}% +{Diese gedruckte Ausgabe der Anleitung ist davon und von den in den Dateien + \File{lppl.txt} und \File{lppl-de.txt} des \KOMAScript-Pakets + festgeschriebenden rechtlichen Bedingungen ausdrücklich ausgenommen.} +}{} + +\section{Installation} +\seclabel{installation} + +Die drei wichtigsten \TeX-Distributionen, Mac\TeX, MiK\TeX{} und \TeX~Live, +stellen \KOMAScript{} über ihre jeweiligen Paketverwaltungen bereit. Es wird +empfohlen, die Installation und Aktualisierung von \KOMAScript{} darüber +vorzunehmen. Die manuelle Installation von {\KOMAScript} ohne Verwendung der +jeweiligen Paketverwaltung wird in der Datei \File{INSTALLD.txt}, die +Bestandteil jeder \KOMAScript-Verteilung ist, beschrieben. Beachten Sie dazu +auch die jeweilige Dokumentation zur installierten \TeX-Distribution. + +Daneben gibt es auf \cite{homepage} seit einiger Zeit Installationspakete von +Zwischenversionen von \KOMAScript{} für die wichtigsten Distributionen. Für +deren Installation ist die dortige Anleitung zu beachten. + + +\section{Fehlermeldungen, Fragen, Probleme} +\seclabel{errors} + +\iffree{% + Sollten Sie der Meinung sein, dass Sie einen Fehler in der Anleitung, einer + der \KOMAScript-Klassen, einem der \KOMAScript-Pakete oder einem anderen + Bestandteil von \KOMAScript{} gefunden haben, so sollten Sie folgende + Checkliste abarbeiten: + \begin{itemize} + \item Tritt das Problem auch auf, wenn statt einer \KOMAScript-Klasse eine + Standardklasse verwendet wird? In dem Fall liegt der Fehler höchst + wahrscheinlich nicht bei \KOMAScript. Es ist dann sinnvoller, die Frage in + einem öffentlichen Forum, einer Mailingliste oder im Usenet zu stellen. + \item Welche \KOMAScript-Version verwenden Sie? Entsprechende Informationen + finden Sie in der \File{log}-Datei des \LaTeX-Laufs jedes Dokuments, das + eine \KOMAScript-Klasse verwendet. + \item Falls Sie nicht die aktuelle \KOMAScript-Version verwenden, sollten + Sie unbedingt die Installation einer aktuellen Version ins Auge gefasst + werden. Tritt das Problem mit der aktuellen Version von \KOMAScript{} dann + nicht mehr auf, haben Sie die Lösung bereits gefunden. + \item Welches Betriebssystem und welche \TeX-Distribution wird verwendet? + Diese Angaben erscheinen bei einem bestriebssystemunabhängigen Paket wie + \KOMAScript{} oder \LaTeX{} eher überflüssig. Es zeigt sich aber immer + wieder, dass sie durchaus eine Rolle spielen können. + \item Was genau ist das Problem oder der Fehler? Beschreiben Sie das Problem + oder den Fehler lieber zu ausführlich als zu knapp. Oftmals ist es + sinnvoll auch die Hintergründe zu erläutern. + \item Wie sieht ein vollständiges Minimalbeispiel aus? Ein solches + vollständiges Minimalbeispiel kann jeder leicht selbst erstellen, indem + Schritt für Schritt Inhalte und Pakete aus dem Problemdokument + auskommentiert werden. Am Ende bleibt ein Dokument, das nur die Pakete + lädt und nur die Teile enthält, die für das Problem notwendig + sind. Außerdem sollten alle geladenen Abbildungen durch + \Macro{rule}-Anweisungen entsprechender Größe oder durch Beispieldateien + aus dem Paket \Package{mwe} \cite{package:mwe} ersetzt werden. Das Paket + können Sie auch verwenden, um Fülltext zu erzeugen. Vor dem Verschicken + entfernt man nun die auskommentierten Teile, fügt als erste Zeile die + Anweisung \Macro{listfiles} ein und führt einen weiteren \LaTeX-Lauf + durch. Man erhält dann am Ende der \File{log}-Datei eine Übersicht über + die verwendeten Pakete und deren Version. Das vollständige Minimalbeispiel + und die \File{log}-Datei fügen Sie ihrer Beschreibung hinzu. + \end{itemize} + Schicken Sie keine Pakete, PDF- oder PS- oder DVI-Dateien mit. Falls die + gesamte Problem- oder Fehlerbeschreibung einschließlich Minimalbeispiel und + \File{log}-Datei größer als ein paar Dutzend KByte ist, haben Sie mit + größter Wahrscheinlichkeit etwas falsch gemacht. Anderenfalls erzeugen Sie + für das Problem einen neuen Eintrag im Ticketsystem unter + \url{https://sf.net/p/koma-script/tickets}. Falls dies für Sie nicht möglich + ist, können Sie ihre Meldung ersatzweise an + \href{mailto:komascript@gmx.info}{komascript@gmx.info} verschicken. + + Häufig werden Sie eine Frage zu \KOMAScript{} oder im Zusammenhang mit + \KOMAScript{} lieber öffentlich, beispielsweise in \texttt{de.comp.text.tex} + oder einem Forum stellen wollen. Auch in diesem Fall sollten Sie obige + Punkte beachten, in der Regel jedoch auf die \File{log}-Datei + verzichten. Fügen Sie stattdessen nur die Liste der Pakete und + Paketversionen aus der \File{log}-Datei an. Im Falle einer Fehlermeldung + zitieren Sie diese ebenfalls aus der \File{log}-Datei.% +}{% + Der Autor hat sich große Mühe gegeben, Fehler in diesem Buch zu + vermeiden. Die Beispiele, die in diesem Buch abgedruckt sind, wurden + größtenteils während ihrer Entstehung getestet. Leider sind trotzdem weder + orthografische noch inhaltliche Fehler komplett auszuschließen. Sollten Sie + Fehler in diesem Buch finden, so melden Sie diese bitte über die + \KOMAScript-Support-Adresse \mbox{komascript@gmx.info} an den Autor. + + Bei Fehlern an \KOMAScript{} selbst beachten Sie bitte die Prozedur, die in + der Einleitung der freien \KOMAScript-Anleitung erklärt ist. Nur so ist + sichergestellt, dass das Problem auch reproduziert werden kann. Dies ist + für die Beseitigung eventueller Fehler eine Grundvoraussetzung.% +} + +Bitte beachten Sie, dass typografisch nicht optimale Voreinstellungen keine +Fehler darstellen. Aus Gründen der Kompatibilität werden Voreinstellungen nach +Möglichkeit auch in neuen \KOMAScript-Versionen beibehalten. Darüber hinaus +ist Typografie auch eine Frage der Sprache und Kultur. Die Voreinstellungen +von \KOMAScript{} stellen daher zwangsläufig einen Kompromiss dar. + +\iffree{% +\section{Weitere Informationen} +\seclabel{moreinfos} + +Sobald Sie im Umgang mit \KOMAScript{} geübt sind, werden Sie sich +möglicherweise Beispiele zu schwierigeren Aufgaben wünschen. Solche Beispiele +gehen über die Vermittlung von Grundwissen hinaus und sind daher\iffree{}{ + außer im Angang} nicht Bestandteil dieser Anleitung. Auf den Internetseiten +des \KOMAScript{} Documentation Projects \cite{homepage} finden Sie jedoch +weiterführende Beispiele. Diese sind für fortgeschrittene \LaTeX-Anwender +konzipiert. Für Anfänger sind sie wenig oder nicht geeignet. +}{} + +\endinput +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Installationspakete Zwischenversionen Wiedereinsteigern +% LocalWords: Kompatibilitätsmodus Problemdokument Beispieldateien Fülltext +% LocalWords: Minimalbeispiel Ticketsystem diff --git a/macros/latex/contrib/koma-script/doc/introduction-en.tex b/macros/latex/contrib/koma-script/doc/introduction-en.tex new file mode 100644 index 0000000000..d840cfe64f --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/introduction-en.tex @@ -0,0 +1,315 @@ +% ====================================================================== +% introduction-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Introduction of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{introduction-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide introduction] +\translator{Kevin Pfeiffer\and Gernot Hassenpflug\and + Krickette Murabayashi\and Markus Kohm\and Karl Hagen} + +\chapter{Introduction} +\labelbase{introduction} + +This chapter contains, among other things, important information about the +structure of the manual and the history of {\KOMAScript}, which begins +years before the first version. You will also find information on how to +install {\KOMAScript} and what to do if you encounter errors. + +\section{Preliminary Note}\seclabel{preface} + +{\KOMAScript} is very complex. This is due to the fact that it consists of not +just a single class or a single package but a bundle of many classes and +packages. Although the classes are designed as counterparts to the standard +classes, that does not mean they provide only the commands, environments, and +settings of the standard classes, or that they imitate their appearance. The +capabilities of {\KOMAScript} sometimes far surpass those of the standard +classes. Some of them should be considered extensions to the basic +capabilities of the \LaTeX{} kernel. + +The foregoing means that the documentation of {\KOMAScript} has to be +extensive. In addition, {\KOMAScript} is not normally taught. That means there +are no teachers who know their students and can therefore choose the teaching +materials and adapt them accordingly. It would be easy to write documentation +for a specific audience. The difficulty facing the author, however, is that +the manual must serve all potential audiences. I have tried to create a guide +that is equally suitable for the computer scientist and the fishmonger's +secretary. I have tried, although this is actually an impossible task. The +result is numerous compromises, and I would ask you to take this issue into +account if you have any complaints or suggestions to help improve the current +situation. + +Despite the length of this manual, I would ask you to consult the +documentation first in case you have problems. You should start by referring +to the multi-part index at the end of this document. In addition to this +manual, documentation includes all the text documents that are part of the +bundle. See \File{manifest.tex} for a complete list. + +\section{Structure of the Guide}\seclabel{structure} + +This manual is divided into several parts: There is a section for average +users, one for advanced users and experts, and an appendix with further +information and examples for those who want to understand {\KOMAScript} +thoroughly. + +\autoref{part:forAuthors} is intended for all {\KOMAScript} users. This means +that some information in this section is directed at newcomers to \LaTeX. In +particular, this part contains many examples that are intended to clarify the +explanations. Do not hesitate to try these examples yourself and discover how +{\KOMAScript} works by modifying them. That said, the {\KOMAScript} user guide +is not intended to be a {\LaTeX} primer. Those new to {\LaTeX} should look at +\emph{The Not So Short Introduction to {\LaTeXe}} \cite{lshort} or +\emph{{\LaTeXe} for Authors} \cite{latex:usrguide} or a {\LaTeX} reference +book. You will also find useful information in the many {\LaTeX} FAQs, +including the \emph{{\TeX} Frequently Asked Questions on the Web} +\cite{UK:FAQ}. Although the length of the \emph{{\TeX} Frequently Asked + Questions on the Web} is considerable, you should get at least a rough +overview of it and consult it in case you have problems, as well as this +\iffree{guide}{book}. + +\autoref{part:forExperts} is intended for advanced {\KOMAScript} users, those +who are already familiar with \LaTeX{} or who have been working with +{\KOMAScript} for a while and want to understand more about how {\KOMAScript} +works, how it interacts with other packages, and how to perform more +specialized tasks with it. For this purpose, we return to some aspects of the +class descriptions from \autoref{part:forAuthors} and explain them in more +detail. In addition we document some commands that are particularly intended +for advanced users and experts. This is supplemented by the documentation of +packages that are normally hidden from the user, insofar as they do their work +beneath the surface of the classes and user packages. These packages are +specifically designed to be used by authors of classes and packages. + +The appendix\iffree{, which can only be found in the German book version,}{} +contains information beyond that which is covered in \autoref{part:forAuthors} +and \autoref{part:forExperts}. Advanced users will find background information +on issues of typography to give them a basis for their own decisions. In +addition, the appendix provides examples for aspiring package authors. These +examples are not intended simply to be copied. Rather, they provide +information about planning and implementing projects, as well as some basic +\LaTeX{} commands for package authors. + +The guide's layout should help you read only those parts that are actually of +interest. Each class and package typically has its own chapter. +Cross-references to another chapter are thus usually also references to +another part of the overall package. However, since the three main classes +(\Class{scrbook}, \Class{scrrprt}, and \Class{scrartcl}) largely agree, they +are introduced together in \autoref{cha:maincls}. Differences between the +classes, e.\,g., for something that only affects the class +\Class{scrartcl}\OnlyAt{\Class{scrartcl}}, are clearly highlighted in the +margin, as shown here with \Class{scrartcl}. + +\begin{Explain} + The primary documentation for {\KOMAScript} is in German and has been + translated for your convenience; like most of the {\LaTeX} world, its + commands, environments, options, etc., are in English. In a few cases, the + name of a command may sound a little strange, but even so, we hope and + believe that with the help of this guide, {\KOMAScript} will be usable + and useful to you. +\end{Explain} + +At this point you should know enough to understand the guide. +It might, however, still be worth reading the rest of this chapter. + +\section{History of {\KOMAScript}}\seclabel{history} + +%\begin{Explain} +In the early 1990s, Frank Neukam needed a method to publish an instructor's +lecture notes. At that time {\LaTeX} was {\LaTeX}2.09 and there was no +distinction between classes and packages\,---\,there were only \emph{styles}. +Frank felt that the standard document styles were not good enough for his +work; he wanted additional commands and environments. At the same time he was +interested in typography and, after reading Tschichold's \emph{Ausgew\"ahlte + Aufs\"atze \"uber Fragen der Gestalt des Buches und der Typographie} +(Selected Articles on the Problems of Book Design and Typography) +\cite{JTsch87}, he decided to write his own document style\,---\,and not just +a one-time solution to his lecture notes, but an entire style family, one +specifically designed for European and German typography. Thus {\Script} was +born. + +Markus Kohm, the developer of {\KOMAScript}, came across {\Script} in December +1992 and added an option to use the A5 paper format. At that time neither the +standard style nor {\Script} provided support for A5 paper. Therefore it did +not take long until Markus made the first changes to {\Script}. This and other +changes were then incorporated into {\ScriptII}, released by Frank in December +1993. + +In mid-1994, {\LaTeXe} became available and brought with it many changes. +Users of {\ScriptII} were faced with either limiting their usage to +{\LaTeXe}'s compatibility mode or giving up {\Script} altogether. This +situation led Markus to put together a new {\LaTeXe} package, released on +7~July 1994 as {\KOMAScript}. A few months later, Frank declared {\KOMAScript} +to be the official successor to {\Script}. {\KOMAScript} originally provided +no \emph{letter} class, but this deficiency was soon remedied by Axel +Kielhorn, and the result became part of {\KOMAScript} in December 1994. Axel +also wrote the first true German-language user guide, which was followed by an +English-language guide by Werner Lemberg. + +Since then much time has passed. {\LaTeX} has changed in only minor ways, but +the {\LaTeX} landscape has changed a great deal; many new packages and classes +are now available and {\KOMAScript} itself has grown far beyond what it was in +1994. The initial goal was to provide good {\LaTeX} classes for +German-language authors, but today its primary purpose is to provide +more-flexible alternatives to the standard classes. {\KOMAScript}'s success +has led to e-mail from users all over the world, and this has led to many new +macros\,---\,all needing documentation; hence this ``small guide.'' +%\end{Explain} + + +\section{Special Thanks} +\seclabel{thanks} + +Acknowledgements in the introduction? No, the proper acknowledgements can be +found in the addendum. My comments here are not intended for the authors of +this guide\,---\,and those thanks should rightly come from you, the reader, +anyhow. I, the author of {\KOMAScript}, would like to extend my personal +thanks to Frank Neukam. Without his {\Script} family, {\KOMAScript} would not +have come about. I am indebted to the many persons who have contributed to +{\KOMAScript}, but with their indulgence, I would like to specifically mention +Jens-Uwe Morawski and Torsten Kr\"uger. The English translation of the guide +is, among many other things, due to Jens's untiring commitment. Torsten was +the best beta-tester I ever had. His work has particularly enhanced the +usability of \Class{scrlttr2} and \Class{scrpage2}. Many thanks to all who +encouraged me to go on, to make things better and less error-prone, or to +implement additional features. + +Special thanks go as well to the founders and members of DANTE, +Deutschsprachige Anwendervereinigung {\TeX}~e.V\kern-.18em, (the +German-Language {\TeX} User Group). Without the DANTE server, {\KOMAScript} +could not have been released and distributed. Thanks as well to everybody on +the {\TeX} newsgroups and mailing lists who answer questions and have helped +me provide support for {\KOMAScript}. + +My thanks also go to all those who have always encouraged me to go further and +to implement this or that feature better, with fewer flaws, or simply as an +extension. I would also like to thank the very generous donor who has given me +the most significant amount of money I have ever been paid for the work done +so far on \KOMAScript{}. + +\section{Legal Notes} +\seclabel{legal} + +{\KOMAScript} is released under the {\LaTeX} Project Public License. You will +find it in the file \File{lppl.txt}. An unofficial German-language translation +is also available in \File{lppl-de.txt} and is valid for all German-speaking +countries. + +\iffree{This document and the {\KOMAScript} bundle are provided ``as is'' and + without warranty of any kind.}% +{Please note: the printed version of this guide is not free under the + conditions of the {\LaTeX} Project Public Licence. If you need a free + version of this guide, use the version that is provided as part of the + {\KOMAScript} bundle.} + + +\section{Installation} +\seclabel{installation} + +The three most important \TeX{} distributions, Mac\TeX, MiK\TeX, and +\TeX{}~Live, make {\KOMAScript} available through their package management +software. You should install and update {\KOMAScript} using these tools, if +possible. Manual installation without using the package managers is described +in the file \File{INSTALL.txt}, which is part of every {\KOMAScript} +distribution. You should also read the documentation that comes with the +{\TeX} distribution you are using. + + +\section{Bug Reports and Other Requests} +\seclabel{errors} + +If you think you have found an error in the documentation or a bug in one of +the {\KOMAScript} classes, packages, or another part of {\KOMAScript}, please +do the following: +\begin{itemize} +\item Does the problem also occur if a standard class is used instead of a + {\KOMAScript} class? In this case, the error is most likely not with + {\KOMAScript}, and it makes more sense to ask your question in a public + forum, a mailing list, or Usenet. +\item Which {\KOMAScript} version do you use? For related information, see the + \File{log} file of the \LaTeX{} run of any document that uses a + {\KOMAScript} class. +\item If you do not use an up-to-date \KOMAScript{} version, please consider + to install a new \KOMAScript{} release. If the problem does not occur with + an updated \KOMAScript, you've already found a solution. +\item Which operating system and which \TeX{} distribution do you use? This + information might seem rather superfluous for a system-independent package + like {\KOMAScript} or {\LaTeX}, but time and again they have certainly been + shown to play a role. +\item What exactly is the problem or the error? Describe the problem. It's + better to be too detailed than too short. Often it makes sense to explain + the background. +\item What does a minimal working example look like? You can easily create one + by commenting out content and packages from the document step by step. The + result is a document that only contains the packages and parts necessary to + reproduce the problem. In addition, all loaded images should be replaced by + \Macro{rule} statements of the appropriate size or by an example image from + package \Package{mwe} \cite{package:mwe}. Before sending your minimal + working example,remove the commented-out parts, insert the command + \Macro{listfiles} in the preamble, and perform another {\LaTeX} run. At the + end of the \File{log} file, you will see an overview of the packages + used. Add the minimal working example and the log file to the end of your + description of the problem. +\end{itemize} + +Do not send packages, PDF, PS, or DVI files. If the entire issue or bug +description, including the minimal example and the \File{log} file is larger +than a few tens of kilobytes, you're likely doing something wrong. + +If you've followed all these steps, please create a new ticket in the +\KOMAScript{} ticket system at \url{https://sf.net/p/koma-script/tickets}. If +you are not able to do so, you may alternatively send your {\KOMAScript} +(only) bug report to \href{mailto:komascript@gmx.info}{komascript@gmx.info}. + +If you want to ask your question in a Usenet group, mailing list, or Internet +forum, you should follow the procedures mentioned above and include a minimal +working example as part of your question, but usually you don't need to +provide the \File{log}-file. Instead, just add the list of packages and +package versions from the \File{log}-file and, if your minimal working example +compiles with errors, you should quote those messages from the \File{log} +file. + +Please note that default settings which are not typographically optimal do not +represent errors. For reasons of compatibility, defaults are preserved +whenever possible in new versions of {\KOMAScript}. Furthermore, typographical +best practices are partly a matter of language and culture, and so the default +settings of {\KOMAScript} are necessarily a compromise. + +\section{Additional Information} +\seclabel{moreinfos} + +Once you become familiar with {\KOMAScript}, you may want examples that show +how to accomplish more difficult tasks. Such examples go beyond the basic +instructional scope of this manual and so are not included. However, you will +find more examples on the website of the {\KOMAScript} Documentation Project +\cite{homepage}. These examples are designed for advanced {\LaTeX} users and +are not particularly suitable for beginners. The main language of the site +is German, but English is also welcome. + +\endinput +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/japanlco-en.tex b/macros/latex/contrib/koma-script/doc/japanlco-en.tex new file mode 100644 index 0000000000..036b3b9a9b --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/japanlco-en.tex @@ -0,0 +1,580 @@ +% ====================================================================== +% japanlco-en.tex +% Copyright (c) Gernot Hassenpflug and Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about Japanise paper size, envelopes and letters +% Maintained by Gernot Hassenplug (with help from Markus Kohm) +% +% ====================================================================== +% +% Special Note: Originally in English by Gernot Hassenpflug as part of +% KOMA-Script bundle. +% + +\KOMAProvidesFile{japanlco-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (appendix: japanlco)] + +\appendix + +\chapter[{Japanese Letter Support for \Class{scrlttr2}} and \Package{scrletter}] +{Japanese Letter Support for \Class{scrlttr2} and \Package{scrletter}\footnote{This chapter was + originally written by Gernot Hassenpflug.}} +\labelbase{japanlco} \Index{letter>Japanese} + +Since version~2.97e, \KOMAScript{} has provided support not only for +European ISO~envelope sizes and window envelopes but also for Japanese +envelopes, in the form of \File{lco} files which set the layout of the paper. +This chapter documents this support and provides a few examples of using the +provided \File{lco} files to print letters intended for Japanese envelopes. + +\section{Japanese standard paper and envelope sizes} +\seclabel{PaperEnvelope} + +The Japan Industrial Standard (JIS) defines paper sizes and envelope sizes for +national use, which both overlap with the ISO and US sizes and include some +metricated traditional Japanese sizes. Envelope window size and position have +not been defined internationally as yet; hence, there exists a plethora of +envelopes with differing window sizes and positions. The following subsections +give some background on Japanese paper sizes and envelopes. + +\subsection{Japanese paper sizes} +\seclabel{Paper} + +The JIS defines two main series of paper sizes: +\begin{enumerate} +\item the JIS A-series, which is identical to the ISO A-series but + with slightly different tolerances; and +\item the JIS B-series, which is not identical to the ISO/DIN + B-series. Instead, the JIS B-series paper has an area 1.5 times that + of the corresponding A-series paper, so that the length ratio is + approximately 1.22 times the length of the corresponding A-series + paper. The aspect ratio of the paper is the same as for A-series + paper. +\end{enumerate} + +Both JIS A-series and B-series paper is widely available in Japan and most +photocopiers and printers are loaded with at least A4 and B4 paper. The +ISO/JIS~A-series and the different ISO and JIS~B-series sizes are listed in +\autoref{tab:japanlco.jpapersizes1}. + +%% ISO/JIS standard comparison +\begin{table} +\begin{minipage}{\textwidth}\renewcommand*{\footnoterule}{}% +\centering +\caption[{ISO and JIS standard paper sizes}] +{ISO and JIS standard paper sizes}%; trim sizes are given with width +% preceding height, both in millimeters} +\begin{tabular}{lr@{$\times$}llr@{$\times$}llr@{$\times$}l}\toprule +ISO/JIS\,A & \multicolumn2l{W$\times$H in mm} & ISO\,B & +\multicolumn2l{W$\times$H in mm} & JIS\,B & \multicolumn2l{W$\times$H + in mm} \\ \midrule +A0 & 841 & 1189 & B0 & 1000 & 1414 & B0 & 1030 & 1456 \\ +A1 & 594 & 841 & B1 & 707 & 1000 & B1 & 728 & 1030 \\ +A2 & 420 & 594 & B2 & 500 & 707 & B2 & 515 & 728 \\ +A3 & 297 & 420 & B3 & 353 & 500 & B3 & 364 & 515 \\ +A4 & 210 & 297 & B4 & 250 & 353 & B4 & 257 & 364 \\ +A5 & 148 & 210 & B5 & 176 & 250 & B5 & 182 & 257 \\ +A6 & 105 & 148\footnotemark[1] & B6 & 125 & 176 & B6 & 128 & 182 \\ +A7 & 74 & 105 & B7 & 88 & 125 & B7 & 91 & 128 \\ +A8 & 52 & 74 & B8 & 62 & 88 & B8 & 64 & 91 \\ +A9 & 37 & 52 & B9 & 44 & 62 & B9 & 45 & 64 \\ +A10 & 26 & 37 & B10 & 31 & 44 & B10 & 32 & 45 \\ +A11 & 18 & 26 & & \multicolumn2l{} & B11 & 22 & 32 \\ +A12 & 13 & 18 & & \multicolumn2l{} & B12 & 16 & 22 \\ +\bottomrule +\end{tabular} +\label{tab:japanlco.jpapersizes1} +\footnotetext[1]{Although Japan's official postcard size + appears to be A6, it is actually 100$\times$148\Unit{mm}, 5 millimetres + narrower than A6.} +\end{minipage} +\end{table} + +There are also a number of traditional paper sizes, which are now used +mostly only by printers. The most common of these old series are the +Shiroku-ban and the Kiku paper sizes. The difference of these types compared +to the JIS~B-series are shown in \autoref{tab:japanlco.jpapersizes2}. +Finally, there are some common stationery sizes, listed in +\autoref{tab:japanlco.jpapersizes3}. You may come across these when buying +stationery. + +%% JIS B-series variants +\begin{table} +\centering +\caption[{Japanese B-series variants}] +{Japanese B-series variants}%; trim sizes are given with width +% preceding height, both in millimeters} +\begin{tabular}{lr@{$\times$}lr@{$\times$}lr@{$\times$}l}\toprule +Format & \multicolumn{2}{l}{JIS B-series} & \multicolumn{2}{l}{Shiroku-ban} & +\multicolumn{2}{l}{Kiku} \\ +Size & \multicolumn{2}{l}{W$\times$H in mm} & \multicolumn{2}{l}{W$\times$H in mm} & \multicolumn{2}{l}{W$\times$H in mm} \\ \midrule +4 & 257 & 364 & 264 & 379 & 227 & 306 \\ +5 & 182 & 257 & 189 & 262 & 151 & 227 \\ +6 & 128 & 182 & 189 & 262 & \multicolumn2l{} \\ +7 & 91 & 128 & 127 & 188 & \multicolumn2l{} \\ +\bottomrule +\end{tabular} +\label{tab:japanlco.jpapersizes2} +\end{table} + +%% Japanese contemporary sizes +\begin{table} +\centering +\caption[{Main Japanese contemporary stationery}] +{Main Japanese contemporary stationery}%; trim sizes are given with width +% preceding height, both in millimeters} +\begin{tabular}{lr@{$\times$}ll}\toprule +Name & \multicolumn{2}{l}{W$\times$H in mm} & Usage and Comments \\ \midrule +Kokusai-ban & 216 & 280 & ``international size'' \\ + & \multicolumn2l{} & i.\,e., US letter size \\ +Semi B5 or & 177 & 250 & ``standard size'' \\ +Hyoujun-gata & \multicolumn2l{} & (formerly called ``Hyoujun-gata''),\\ + & \multicolumn2l{} & semi B5 is almost identical to ISO B5 \\ +Oo-gata & 177 & 230 & ``large size'' \\ +Chuu-gata & 162 & 210 & ``medium size'' \\ +Ko-gata & 148 & 210 & ``small size'' \\ +Ippitsu sen & 82 & 185 & ``note paper'' \\ +\bottomrule +\end{tabular} +\label{tab:japanlco.jpapersizes3} +\end{table} + +The ISO~C-series is not a paper size as such but a standard developed for +envelopes and intended for the corresponding A-series paper. It is discussed +in the next subsection. + +%\clearpage +\subsection{Japanese envelope sizes} +\seclabel{envelope} + +ISO (International Organization for Standardization) envelope sizes are the +official international metric envelope sizes; however, Japan uses also JIS and +metricated traditional envelope sizes. Sizes identified as non-standard do not +conform to Universal Postal Union requirements for correspondence envelopes. + +\subsubsection{ISO envelope sizes} +The ISO C-series envelope sizes, and possibly B-series envelope sizes, are +available in Japan. C-series envelopes can hold the corresponding A-series +paper, while B-series envelopes can hold either the corresponding A-series +paper or the corresponding C-series envelope. The ISO envelope sizes commonly +for Japan are listed in \autoref{tab:japanlco.jenvsizes1}, with the +corresponding paper they are intended for, and the folding required. + +%%%%%% JIS Japanese Envelopes + +%% ISO envelope sizes +%{\onelinecaptionsfalse +%\begin{longtable}{lr@{$\times$}ll} +\begin{table} +\begin{minipage}{\textwidth}\renewcommand*{\footnoterule}{} +\caption[{Japanese ISO envelope sizes}] +{Japanese ISO envelope sizes}%; trim sizes are given with width +% preceding height, both in millimeters% +\label{tab:japanlco.jenvsizes1}% +%}\\ +\begin{tabular}{lr@{$\times$}ll} +\toprule +Name & \multicolumn2l{W$\times$H in mm} & Usage and Comments \\ +%\endfirsthead +%\caption[]{Japanese envelope sizes (\emph{continued})}\\ +%\toprule +%Name & \multicolumn2l{W$\times$H in mm} & Usage and Comments \\ +%\midrule +%\endhead +%\midrule +%\multicolumn{4}{r@{}}{\dots}\\ +%\endfoot +%\bottomrule +%\endlastfoot +\midrule +C0 & 917 & 1297 & for flat A0 sheet; \\* + & \multicolumn2l{} & non-standard \\ +C1 & 648 & 917 & for flat A1 sheet; \\* + & \multicolumn2l{} & non-standard \\ +C2 & 458 & 648 & for flat A2 sheet, A1 sheet folded in half; \\* + & \multicolumn2l{} & non-standard \\ +C3 & 324 & 458 & for flat A3 sheet, A2 sheet folded in half; \\* + & \multicolumn2l{} & non-standard \\ +B4 & 250 & 353 & C4 envelope \\ +C4 & 229 & 324 & for flat A4 sheet, A3 sheet folded in half; \\* + & \multicolumn2l{} & very common; non-standard \\ +B5 & 176 & 250 & C5 envelope \\ +C5 & 162 & 229 & for flat A5 sheet, A4 sheet folded in half; \\* + & \multicolumn2l{} & very common; non-standard \\ +B6 & 125 & 176 & C6 envelope; A4 folded in quarters; \\* + & \multicolumn2l{} & very common \\ +C6 & 114 & 162 & for A5 sheet folded in half, \\* + & \multicolumn2l{} & A4 sheet folded in quarters; \\* + & \multicolumn2l{} & very common \\ +C6/C5 & 114 & 229 & A4 sheet folded in thirds; \\* + & \multicolumn2l{} & very common \\ +C7/6 & 81 & 162 & for A5 sheet folded in thirds; uncommon; \\* + & \multicolumn2l{} & non-standard \\ +C7 & 81 & 114 & for A5 sheet folded in quarters; uncommon; \\* + & \multicolumn2l{} & non-standard \\ +C8 & 57 & 81 & \\ +C9 & 40 & 57 & \\ +C10 & 28 & 40 & \\ +DL\footnotemark[1] & 110 & 220 & for A4 sheet folded in thirds, \\* + & \multicolumn2l{} & A5 sheet folded in half lengthwise; \\* + & \multicolumn2l{} & very common \\ +%\end{longtable}}\vspace{-\baselineskip} +\bottomrule +\end{tabular} +%\noindent\begin{minipage}{\textwidth} +%\renewcommand*{\footnoterule}{} +\footnotetext[1]{Although DL is not part of the + ISO C-series, it is a very widely used standard size. DL, probably + at one time the abbreviation of DIN Lang (Deutsche Industrie Norm, + long), is now identified as ``Dimension Lengthwise'' by ISO 269.} +\end{minipage} +\end{table} + +\subsubsection{JIS and traditional envelope sizes} +The JIS classifies envelopes into three categories based on the +general shape of the envelope and where the flap is located: + +\begin{description} +\item[You:] these envelopes are of the `commercial' type, rectangular, + and correspond largely to Western envelope sizes, and also have the + flap on the long dimension (`Open Side') in `commercial' or `square' + style. `You-kei' means Western-style. +\item[Chou:] these are also `commercial' type envelopes, with the same + shape as the corresponding `You' type, but with the flap on the + short dimension (`Open End') in `wallet' style. `Chou-kei' means + long-style. +\item[Kaku:] these envelopes are more square in appearance and are + made for special use, and correspond to `announcement' + envelopes. The flap is on the long side, in the `square' style. They + generally do not fall under the ordinary envelope postage + rates. `Kaku-kei' means square-style. +\end{description} + +The main JIS and traditional envelope sizes, the corresponding paper, and +its required folding are listed in \autoref{tab:japanlco.jenvsizes2}. + +%% JIS and other envelope sizes +%\begin{table} +%\begin{minipage}{\textwidth}\renewcommand*{\footnoterule}{}% +%\centering +{\onelinecaptionsfalse +\begin{longtable}{llr@{$\times$}ll} +\caption[{Japanese envelope sizes 3}] +{Japanese JIS and other envelope sizes\label{tab:japanlco.jenvsizes2}}% +%; trim sizes are given with width preceding height, both in millimeters}% +\\ +%\begin{tabular}{llr@{$\times$}ll} +\toprule +JIS & Name & \multicolumn2l{W$\times$ in mm} & Usage and Comments \\ +\endfirsthead +\caption[]{Japanese JIS and other envelope sizes (\emph{continued})}\\ +\toprule +JIS & Name & \multicolumn2l{W$\times$ in mm} & Usage and Comments \\ +\midrule +\endhead +\midrule +\multicolumn{5}{r@{}}{\dots}\\ +\endfoot +\bottomrule +\endlastfoot +\midrule + & Chou 1 & 142 & 332 & for A4 folded in half lengthwise;\\* + & & \multicolumn2l{} & non-standard \\ +Yes & Chou 2 & 119 & 277 & for B5 folded in half lengthwise;\\* + & & \multicolumn2l{} & non-standard \\ +Yes & Chou 3 & 120 & 235 & for A4 folded in thirds;\\* + & & \multicolumn2l{} & very common \\ + & Chou 31 & 105 & 235 & for A4 folded in thirds \\ + & Chou 30 & 92 & 235 & for A4 folded in fourths\footnotemark[3] \\ + & Chou 40 & 90 & 225 & for A4 folded in fourths\footnotemark[3] \\ +Yes & Chou 4 & 90 & 205 & for JIS B5 folded in fourths\footnotemark[3];\\* + & & \multicolumn2l{} & very common \\ + & Kaku A3 & 320 & 440 & for A3 flat, A2 folded in half\\* + & & \multicolumn2l{} &; non-standard \\ + & Kaku 0 & 287 & 382 & for B4 flat, B3 folded in half;\\* + & & \multicolumn2l{} & non-standard \\ + & Kaku 1 & 270 & 382 & for B4 flat, B3 folded in half;\\* + & & \multicolumn2l{} & non-standard \\ +Yes & Kaku 2 & 240 & 332 & for A4 flat, A3 folded in half;\\* + & & \multicolumn2l{} & non-standard \\ + & Kaku & 229 & 324 & for A4 flat, A3 folded in half;\\* + & Kokusai A4 & \multicolumn2l{} & same size as ISO C4;\\* + & & \multicolumn2l{} & non-standard \\ +Yes & Kaku 3 & 216 & 277 & for B5 flat, B4 folded in half;\\* + & & \multicolumn2l{} & non-standard \\ +Yes & Kaku 4 & 197 & 267 & for B5 flat, B4 folded in half;\\* + & & \multicolumn2l{} & non-standard \\ +Yes & Kaku 5 & 190 & 240 & for A5 flat, A4 folded in half\\* + & & \multicolumn2l{} &; non-standard \\ +Yes & Kaku 6 & 162 & 229 & for A5 flat, A4 folded in half;\\* + & & \multicolumn2l{} & same size as ISO C5;\\* + & & \multicolumn2l{} & non-standard \\ +Yes & Kaku 7 & 142 & 205 & for B6 flat, B5 folded in half;\\* + & & \multicolumn2l{} & non-standard \\ +Yes & Kaku 8 & 119 & 197 & pay envelope (for salaries, wages)\\* + & & \multicolumn2l{} &; common for direct mail \\ +Yes & You 0\footnotemark[1] & 235 & 120 & for A4 folded in thirds;\\* + & or Furusu 10 & \multicolumn2l{} & same size as Chou 3 but with \\* + & & \multicolumn2l{} & `Open Side' style flap \\ + & You 0\footnotemark[1] & 197 & 136 & for kyabine\footnotemark[1] (cabinet) size photos \\* + & & \multicolumn2l{} & (165\Unit{mm}$\times$120\Unit{mm});\\* + & & \multicolumn2l{} & non-standard \\ + & You 1\footnotemark[2] & 176 & 120 & for B5 folded in quarters \\ + & You 1\footnotemark[2] & 173 & 118 & for B5 folded in quarters \\ +Yes & You 2 & 162 & 114 & for A5 folded in half,\\* + & & \multicolumn2l{} & A4 folded in quarters;\\* + & & \multicolumn2l{} & same size as ISO C6 \\ +Yes & You 3 & 148 & 98 & for B6 folded in half \\ +Yes & You 4 & 235 & 105 & for A4 folded in thirds \\ +Yes & You 5 & 217 & 95 & for A4 folded in fourths\footnotemark[3] \\ +Yes & You 6 & 190 & 98 & for B5 folded in thirds \\ +Yes & You 7 & 165 & 92 & for A4 folded in quarters,\\* + & & \multicolumn2l{} & B4 folded in quarters \\ +%\bottomrule +%\end{tabular}% +\end{longtable}}\vskip-\baselineskip +\noindent\begin{minipage}{\textwidth}\renewcommand*{\footnoterule}{}% + \footnotetext[1]{Because two different sizes are called You~0, the + JIS You~0 is normally called Furusu~10; Furusu (`fools') derives + from `foolscap'; Kyabine is a metricated traditional Japanese + size.}% + \footnotetext[2]{Two slightly different sizes are sold as You~1; the + smaller size (173\Unit{mm}$\times$118\Unit{mm}) is the + paper-industry standard size.}% + \footnotetext[3]{Twice in the same direction.}% +\end{minipage} +%\end{table} + + +\subsubsection{Window variants} +There are a large number of window subtypes existing within the +framework explained in the previous subsection. The most common window +sizes and locations are listed in \autoref{tab:japanlco.jwinsizes1}. + +%% my table of windows +\begin{table} +\begin{minipage}{\textwidth}\renewcommand*{\footnoterule}{} +\centering +\caption[{Supported Japanese envelope types, window sizes, and + locations}] {Supported Japanese envelope types, window sizes, and + locations.} +\begin{tabular}{lllll} +\toprule +Envelope type & Window name\footnotemark[1] & - size\footnotemark[2] & - location\footnotemark[3] & \File{lco} file\footnotemark[4] \\ +\midrule +Chou 3 & A & 90$\times$45 & l 23, t 13 & \Option{NipponEL} \\ +Chou 3 & F & 90$\times$55 & l 23, t 13 & \Option{NipponEH} \\ +Chou 3 & Hisago & 90$\times$45 & l 23, t 12 & \Option{NipponEL} \\ +Chou 3 & Mutoh 1 & 90$\times$45 & l 20, t 11 & \Option{NipponEL} \\ +Chou 3 & Mutoh 101 & 90$\times$55 & l 20, t 11 & \Option{NipponEH} \\ +Chou 3 & Mutoh 2 & 80$\times$45 & l 20, t 11 & \Option{NipponEL} \\ +Chou 3 & Mutoh 3 & 90$\times$45 & l 25, t 11 & \Option{NipponLL} \\ +Chou 3 & Mutoh 301 & 90$\times$55 & l 25, t 11 & \Option{NipponLH} \\ +Chou 3 & Mutoh 6 & 100$\times$45 & l 20, t 11 & \Option{NipponEL} \\ +Chou 3 & v.2\footnotemark[5] & 90$\times$45 & l 24, t 12 & \Option{NipponLL} \\ +Chou 40 & A & 90$\times$45 & l 23, t 13 & \Option{NipponEL} \\ +Chou 4 & A & 90$\times$45 & l 23, t 13 & \Option{NipponEL} \\ +Chou 4 & B & 80$\times$45 & l 98, t 28 & \Option{NipponRL} \\ +Chou 4 & C & 80$\times$45 & l 21, t 13 & \Option{NipponEL} \\ +Chou 4 & K & 80$\times$45 & l 22, t 13 & \Option{NipponEL} \\ +Chou 4 & Mutoh 1 & 80$\times$45 & l 40, b 11 & --- \\ +Chou 4 & Mutoh 2 & 80$\times$45 & l 20, t 11 & \Option{NipponEL} \\ +Chou 4 & Mutoh 3 & 90$\times$45 & l 20, t 11 & \Option{NipponEL} \\ +Chou 4 & Mutoh 6 & 100$\times$45 & l 20, t 11 & \Option{NipponEL} \\ +Chou 4 & v.2\footnotemark[5] & 80$\times$45 & l 20, t 12 & \Option{NipponEL} \\ +Chou 4 & v.3\footnotemark[5] & 90$\times$45 & l 20, t 12 & \Option{NipponEL} \\ +Kaku A4 & v.1\footnotemark[6] & 95$\times$45 & l 20, t 24 & \Option{KakuLL} \\ +You 0 & Cruise 6 & 90$\times$45 & l 20, t 12 & \Option{NipponEL} \\ +You 0 & Cruise 601 & 90$\times$55 & l 20, t 12 & \Option{NipponEH} \\ +You 0 & Cruise 7 & 90$\times$45 & l 20, b 12 & \Option{NipponEL} \\ +You 0 & Cruise 8 & 90$\times$45 & l 24, t 12 & \Option{NipponLL} \\ +You 0 & v.2\footnotemark[5] & 90$\times$45 & l 24, t 12 & \Option{NipponEL} \\ +You 0 & v.3\footnotemark[5] & 90$\times$45 & l 23, t 13 & \Option{NipponEL} \\ +You 4 & A & 90$\times$45 & l 23, t 13 & \Option{NipponEL} \\ +\bottomrule +\end{tabular}% +\footnotetext[1]{Names (acting as subtype information) are taken from + the manufacturer catalogue.}% +\footnotetext[2]{Given as width by height in millimetres.}% +\footnotetext[3]{Given as offset from left (l) or right (r), followed by + offset from bottom (b) or top (t).}% +\footnotetext[4]{The \File{lco} file, which provides support (see + \autoref{tab:japanlco.lcolist}).}% +\footnotetext[5]{In the absence of any other information, a numerical + variation number for the subtype name is provided.}% +\footnotetext[6]{Dimensions apply when envelope is held in portrait mode.}% +\label{tab:japanlco.jwinsizes1}% +\end{minipage} +\end{table} + +\section{Provided \File{lco} files} +With \Class{scrlttr2} and \Package{scrletter}, support is provided for +Japanese envelope and window sizes through a number of \File{lco} files which +customize the fold marks required for different envelope sizes and subvariants +with different window positions and sizes. + +The \File{lco} files provided together with the envelope types that they +support are listed at \autoref{tab:japanlco.lcolist}. See +\autoref{tab:japanlco.jenvsizes1} for the full list of Japanese envelopes and +the paper they take, and \autoref{tab:japanlco.jwinsizes1} for the common +window sizes and locations. The rightmost column indicates which \File{lco} +file provides the support. + +The tolerances for location is about 2\Unit{mm}, so it is possible to +accommodate all the envelope and window variants of +\autoref{tab:japanlco.jwinsizes1} with just a small number of \File{lco} +files. The difference between Chou/You~3 and Chou/You~4 is determined +by paper size. + +\begin{table} +\begin{minipage}{\textwidth}\renewcommand*{\footnoterule}{} +\centering +\caption{\File{lco} files provided by \KOMAScript{} for Japanese window + envelopes} +\begin{tabular}{llll} +\toprule +\File{lco} file & Supported & Window size\footnotemark[1] & Window +location\footnotemark[1] \\ +\midrule +\Option{NipponEL} & Chou/You 3 and 4 & 90$\times$45 & l 22, t 12 \\ +\Option{NipponEH} & Chou/You 3 and 4 & 90$\times$55 & l 22, t 12 \\ +\Option{NipponLL} & Chou/You 3 and 4 & 90$\times$45 & l 25, t 12 \\ +\Option{NipponLH} & Chou/You 3 and 4 & 90$\times$55 & l 25, t 12 \\ +\Option{NipponRL} & Chou/You 3 and 4 & 90$\times$45 & l 98, t 28 \\ +\Option{KakuLL} & Kaku A4 & 90$\times$45 & l 25, t 24 \\ +\bottomrule +\end{tabular}% +\label{tab:japanlco.lcolist}% +\footnotetext[1]{Window size is given in width by height, location as + offset from left (l) or right (r), followed by offset from bottom (b) or top + (t). All Values in millimeters.}% +\end{minipage} +\end{table} + +\section{Examples of Japanese Letter Usage} +Suppose you want to write a letter on A4 size paper and will post it in +a Japanese envelope. If the envelope has no window, then it is enough +to determine whether the envelope dimensions match a European +one\,---\,the standard \File{DIN.lco} style may suffice for many such +cases. + +If you wish to use a windowed envelope, please note that owing to the +large variety, not all existing subvariants are currently +supported. If you notice that the window dimensions and positions +of your particular windowed envelope differ significantly (more than +approximately 2\Unit{mm}) from those of any of the supported subvariants, +please contact the author of {\KOMAScript} to obtain support as soon as +possible, and in the meantime, create a customized \File{lco} file for your +own use, using one of the existing ones as a template and reading the +{\KOMAScript} documentation attentively. + +If your window envelope subvariant is supported, this is how you would +go about using it: simply select the required \File{lco} file and +activate the horizontal and vertical fold marks as required. Another, +independent, mark is the hole-punch mark, which divides a sheet in two +horizontally for easy punching and filing. + +\subsection{Example 1:} +Your favourite envelope happens to be a You~3 with window subvariant +Mutoh~3, left over from when the company had its previous name, and +you do not wish them to go to waste. Thus, you write your letter with +the following starting code placed before the letter environment: + +\begin{lstlisting} +\LoadLetterOption{NipponLL}\setkomavar{myref}{NipponLL} +\begin{letter}{Martina Muster\\Address} +... +\end{letter} +\end{lstlisting} + +\subsection{Example 2:} +You originally designed your letter for a You~3 envelope, but suddenly +you get handed a used electrical company envelope with cute manga +characters on it which you simply cannot pass up. Surprisingly, you +find it conforms fairly closely to the Chou~4 size and C window +subvariant, such that you realize you can alter the following in your +document preamble: + +\begin{lstlisting} +\LoadLetterOption{NipponEL}\setkomavar{myref}{NipponEL} +\begin{letter}{Martina Muster\\Address} +... +\end{letter} +\end{lstlisting} + +Now, \Class{scrlttr2} resp. \Package{scrletter} automatically reformats the +letter for you to fit the required envelope. + +% \LoadLetterOption{NipponEL}\setkomavar{myref}{NipponEL} +% \begin{letter}{Martina Muster\\at and\\there\\and one\\more} +% \opening{Dear Martina,} +% \lipsum[1-2] +% \closing{Regards} +% \ps{PS: Forgotten to say.} +% \encl{Something} +% \cc{Somebody\\Someone} +% \end{letter} + +% \LoadLetterOption{NipponEH}\setkomavar{myref}{NipponEH} +% \begin{letter}{Martina Muster\\at and\\there\\and one\\more} +% \opening{Dear Martina,} +% \lipsum[1-2] +% \closing{Regards} +% \end{letter} + +% \LoadLetterOption{NipponLL}\setkomavar{myref}{NipponLL} +% \begin{letter}{Martina Muster\\at and\\there\\and one\\more} +% \opening{Dear Martina,} +% \lipsum[1-2] +% \closing{Regards} +% \end{letter} + +% \LoadLetterOption{NipponLH}\setkomavar{myref}{NipponLH} +% \begin{letter}{Martina Muster\\at and\\there\\and one\\more} +% \opening{Dear Martina,} +% \lipsum[1-2] +% \closing{Regards} +% \end{letter} + +%% comparison of US common paper sizes, wider and shorter +% Millimetres Inches Points +% Height Width Height Width Height Width +% Letter 279.4 215.9 11.00 8.50 792 612 +% Legal 355.6 215.9 14.00 8.50 1008 612 +% Ledger 431.8 279.4 17.00 11.00 1224 792 +% Tabloid 279.4 431.8 11.00 17.00 792 1224 +% Executive 266.7 184.1 10.55 7.25 756 522 + +%% English foolscap is here for reference +% Millimetres Inches Points +% Height Width Height Width Height Width +%Foolscap 419 336 16.50 13.25 1188 954 +% + +%% nice reference on envelope types and windows in the US +%http://www.belightsoft.com/products/companion/paper/envelopes.php + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/koma-script.html b/macros/latex/contrib/koma-script/doc/koma-script.html deleted file mode 100644 index b386b493a2..0000000000 --- a/macros/latex/contrib/koma-script/doc/koma-script.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - The KOMA-Script Documentation Wrapper - - - -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

-
- I think you are searching for the KOMA-Script documentation. You - may find the Englisch documentation - at scrguien.pdf and an index of it - at scrguien.html. -
-
- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. -
-
- Markus Kohm, 2007-09-21 -

Valid XHTML 1.1

-
- - diff --git a/macros/latex/contrib/koma-script/doc/komascr.html b/macros/latex/contrib/koma-script/doc/komascr.html deleted file mode 100644 index b386b493a2..0000000000 --- a/macros/latex/contrib/koma-script/doc/komascr.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - The KOMA-Script Documentation Wrapper - - - -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

-
- I think you are searching for the KOMA-Script documentation. You - may find the Englisch documentation - at scrguien.pdf and an index of it - at scrguien.html. -
-
- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. -
-
- Markus Kohm, 2007-09-21 -

Valid XHTML 1.1

-
- - diff --git a/macros/latex/contrib/koma-script/doc/komascript.html b/macros/latex/contrib/koma-script/doc/komascript.html deleted file mode 100644 index b386b493a2..0000000000 --- a/macros/latex/contrib/koma-script/doc/komascript.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - The KOMA-Script Documentation Wrapper - - - -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

-
- I think you are searching for the KOMA-Script documentation. You - may find the Englisch documentation - at scrguien.pdf and an index of it - at scrguien.html. -
-
- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. -
-
- Markus Kohm, 2007-09-21 -

Valid XHTML 1.1

-
- - diff --git a/macros/latex/contrib/koma-script/doc/letter-example-00-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-00-de.pdf new file mode 100644 index 0000000000..08b3010193 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-00-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-00-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-00-en.pdf new file mode 100644 index 0000000000..37dca09318 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-00-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-01-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-01-de.pdf new file mode 100644 index 0000000000..85cb21242a Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-01-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-01-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-01-en.pdf new file mode 100644 index 0000000000..ecf1c97783 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-01-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-02-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-02-de.pdf new file mode 100644 index 0000000000..e51467739e Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-02-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-02-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-02-en.pdf new file mode 100644 index 0000000000..5dd319ab72 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-02-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-03-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-03-de.pdf new file mode 100644 index 0000000000..069e0fe921 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-03-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-03-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-03-en.pdf new file mode 100644 index 0000000000..950caf38ec Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-03-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-04-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-04-de.pdf new file mode 100644 index 0000000000..f3dcc6a937 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-04-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-04-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-04-en.pdf new file mode 100644 index 0000000000..aeb27cae95 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-04-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-05-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-05-de.pdf new file mode 100644 index 0000000000..8d4f4c09bf Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-05-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-05-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-05-en.pdf new file mode 100644 index 0000000000..fcffded9b7 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-05-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-06-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-06-de.pdf new file mode 100644 index 0000000000..209da9c98e Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-06-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-06-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-06-en.pdf new file mode 100644 index 0000000000..8610f26119 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-06-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-07-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-07-de.pdf new file mode 100644 index 0000000000..31ef8a8944 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-07-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-07-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-07-en.pdf new file mode 100644 index 0000000000..b401622527 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-07-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-08-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-08-de.pdf new file mode 100644 index 0000000000..778bfce9b1 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-08-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-08-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-08-en.pdf new file mode 100644 index 0000000000..341c1e8550 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-08-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-09-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-09-de.pdf new file mode 100644 index 0000000000..f353e53639 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-09-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-09-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-09-en.pdf new file mode 100644 index 0000000000..750b66b484 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-09-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-10-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-10-de.pdf new file mode 100644 index 0000000000..f014485f97 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-10-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-10-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-10-en.pdf new file mode 100644 index 0000000000..e4298822bc Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-10-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-11-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-11-de.pdf new file mode 100644 index 0000000000..56d76928d3 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-11-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-11-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-11-en.pdf new file mode 100644 index 0000000000..ebfcc1282c Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-11-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-12-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-12-de.pdf new file mode 100644 index 0000000000..93c2806ec5 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-12-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-12-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-12-en.pdf new file mode 100644 index 0000000000..0b6c8d50c5 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-12-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-13-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-13-de.pdf new file mode 100644 index 0000000000..9b99ab6a1b Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-13-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-13-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-13-en.pdf new file mode 100644 index 0000000000..e67542f275 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-13-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-14-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-14-de.pdf new file mode 100644 index 0000000000..664b450743 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-14-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-14-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-14-en.pdf new file mode 100644 index 0000000000..a6d1032174 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-14-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-15-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-15-de.pdf new file mode 100644 index 0000000000..3decabe3a0 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-15-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-15-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-15-en.pdf new file mode 100644 index 0000000000..9f4b4d2ef9 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-15-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-16-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-16-de.pdf new file mode 100644 index 0000000000..57e1e3252b Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-16-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-16-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-16-en.pdf new file mode 100644 index 0000000000..1db47bbf48 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-16-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-17-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-17-de.pdf new file mode 100644 index 0000000000..1a4aa70316 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-17-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-17-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-17-en.pdf new file mode 100644 index 0000000000..8d9479cf8a Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-17-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-18-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-18-de.pdf new file mode 100644 index 0000000000..b027108d4a Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-18-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-18-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-18-en.pdf new file mode 100644 index 0000000000..1349911d41 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-18-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-19-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-19-de.pdf new file mode 100644 index 0000000000..7b9cd2c348 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-19-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-19-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-19-en.pdf new file mode 100644 index 0000000000..05514b4534 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-19-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-20-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-20-de.pdf new file mode 100644 index 0000000000..c6533e0b9a Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-20-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-20-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-20-en.pdf new file mode 100644 index 0000000000..916ceb1345 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-20-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-21-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-21-de.pdf new file mode 100644 index 0000000000..b8eccb8443 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-21-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-21-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-21-en.pdf new file mode 100644 index 0000000000..993f0f3135 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-21-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-22-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-22-de.pdf new file mode 100644 index 0000000000..69c2272384 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-22-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-22-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-22-en.pdf new file mode 100644 index 0000000000..b05ee71af2 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-22-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-23-de.pdf b/macros/latex/contrib/koma-script/doc/letter-example-23-de.pdf new file mode 100644 index 0000000000..25f291c9a0 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-23-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/letter-example-23-en.pdf b/macros/latex/contrib/koma-script/doc/letter-example-23-en.pdf new file mode 100644 index 0000000000..7f651e8e02 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/letter-example-23-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/linkalias.tex b/macros/latex/contrib/koma-script/doc/linkalias.tex new file mode 100644 index 0000000000..6c41c70b54 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/linkalias.tex @@ -0,0 +1,113 @@ +% ====================================================================== +% linkalias.tex +% Copyright (c) Markus Kohm, 2008-2022 +% +% 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.md. +% ---------------------------------------------------------------------- +% +% Link aliase needed for the free version of the manuals +% +% ====================================================================== + +\KOMAProvidesFile{linkalias.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + link aliases for the free version] + +\makeatletter +\newcommand*{\lalias}[3][]{% + \scr@ifundefinedorrelax{r@#3}{% + \ClassWarning{scrguide}{% + Label alias `#2'\MessageBreak + to `#3' ignored,\MessageBreak + because `#3' undefined% + }% + }{% + \scr@ifundefinedorrelax{r@#2}{% + \IfArgIsEmpty{#1}{% + \expandafter\let\csname r@#2\expandafter\endcsname + \csname r@#3\endcsname + }{% + \expandafter\let\expandafter\reserved@a\csname r@#3\endcsname + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\reserved@a + \expandafter\expandafter\expandafter{\expandafter\@gobble\reserved@a}% + \expandafter\edef\csname r@#2\endcsname{% + {\unexpanded{#1}}\unexpanded\expandafter{\reserved@a}% + }% + }% + }{% + \ClassWarning{scrguide}{% + Label alias `#2'\MessageBreak + to `#3' ignored,\MessageBreak + because of multiply definition% + }% + \gdef \@multiplelabels {% + \@latex@warning@no@line{There were multiply-defined labels}}% + }% + }% +} +\makeatother + +\lalias[\Macro{ifthispageodd}] + {desc:maincls-experts.cmd.Ifthispageodd} + {sec:maincls-experts.addInfos} +\lalias[\Macro{rightmark}] + {desc:maincls-experts.cmd.rightmark} + {sec:maincls-experts.addInfos} +\lalias[\Option{parskip}] + {desc:maincls-experts.option.parskip} + {sec:maincls-experts.addInfos} +\lalias[\Environment{addmargin*}] + {desc:maincls-experts.env.addmargin*} + {sec:maincls-experts.addInfos} +\lalias[\Macro{marginpar}] + {desc:maincls-experts.cmd.marginpar} + {sec:maincls-experts.addInfos} +\lalias[\Macro{AfterBibliographyPreamble}] + {desc:maincls-experts.cmd.AfterBibliographyPreamble} + {sec:maincls-experts.addInfos} +\lalias[\Option{fontsize}] + {desc:maincls-experts.option.fontsize} + {sec:maincls-experts.addInfos} +\lalias[\Macro{raggedsection}] + {desc:maincls-experts.cmd.raggedsection} + {sec:maincls-experts.coexistence} +\lalias[\Macro{thepage}] + {desc:maincls-experts.cmd.thepage} + {sec:maincls-experts.addInfos} +\lalias[\Macro{pagemark}] + {desc:maincls-experts.cmd.pagemark} + {sec:maincls-experts.addInfos} +\lalias[\Macro{the\PName{Zähler}}] + {desc:maincls-experts.cmd.the/Zaehler/} + {sec:maincls-experts.addInfos} +\lalias[\Macro{the\PName{Zähler}}] + {desc:maincls-experts.cmd.the/Zähler/} + {sec:maincls-experts.addInfos} +\lalias[\Macro{the\PName{Zähler}}] + {desc:maincls-experts.cmd.the/Z"ahler/} + {sec:maincls-experts.addInfos} +\lalias[\Macro{the\PName{Counter}}] + {desc:maincls-experts.cmd.the/Counter/} + {sec:maincls-experts.addInfos} +\lalias[\OptionValue{parskip}{relative}] + {desc:maincls-experts.option.parskip.relative} + {sec:maincls-experts.addInfos} + +%%% Local Variables: +%%% mode: latex +%%% coding: utf-8 +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/lppl-de.txt b/macros/latex/contrib/koma-script/doc/lppl-de.txt deleted file mode 100644 index 68a3adcce9..0000000000 --- a/macros/latex/contrib/koma-script/doc/lppl-de.txt +++ /dev/null @@ -1,470 +0,0 @@ -Diese Uebersetzung wird mit der Absicht angeboten, das Verstaendnis der LaTeX -Project Public License (LPPL) zu erleichtern. Es handelt sich jedoch nicht um -eine offizielle oder im rechtlichen Sinne anerkannte Uebersetzung. - -Das LaTeX3 Project ist nicht der Herausgeber dieser Uebersetzung, und sie hat -diese Uebersetzung auch nicht als rechtskraeftigen Ersatz fuer die -Original-LPPL anerkannt. Da die Uebersetzung nicht sorgfaeltig von Anwaelten -ueberprueft wurde, koennen die Uebersetzer nicht garantieren, dass die -Uebersetzung die rechtlichen Aussagen der LPPL exakt wiedergibt. Wenn Sie -sichergehen wollen, dass von Ihnen geplante Aktivitaeten im Sinne der LPPL -gestattet sind, halten Sie sich bitte an die englischsprachige -Originalversion. - -Das LaTeX3 Project moechte Sie darum bitten, diese Uebersetzung nicht als -offizielle Lizenzbedingungen fuer von Ihnen geschriebene Programme zu -verwenden. Bitte benutzen Sie hierfuer stattdessen die von dem LaTeX3 Project -herausgegebene englischsprachige Originalversion. - -This is a translation of the LaTeX Project Public License (LPPL) into German. -This translation is distributed in the hope that it will facilitate -understanding, but it is not an official or legally approved translation. - -The LaTeX3 Project is not the publisher of this translation and has not -approved it as a legal substitute for the authentic LaTeX Project Public -License. The translation has not been reviewed carefully by lawyers, and -therefore the translator cannot be sure that it exactly represents the legal -meaning of the LaTeX Project Public License. If you wish to be sure whether -your planned activities are permitted by the LaTeX Project Public License, -please refer to the authentic English version. - -The LaTeX3 Project strongly urges you not to use this translation as the -official distribution terms for your programs; instead, please use the -authentic English version published by the LaTeX3 Project. - -------------------------------------------------------------------------------- - -Inhalt - - • VORWORT - • DEFINITIONEN - • BEDINGUNGEN FUeR DIE VERTEILUNG UND VERAeNDERUNG - • KEINE GEWAeHRLEISTUNG - • BETREUUNG DES WERKES - • OB UND WIE EIN WERK UNTER DIESER LIZENZ VERTEILT WIRD - -Deutsche Uebersetzung der LPPL Version 1.3c 2006-05-20 -Uebersetzt durch Markus Kohm. - -Copyright 1999 2002-2009 LaTeX3 Project - -Jeder hat das Recht, die Lizenzurkunde und diese Uebersetzung zu -vervielfaeltigen und unveraenderte Kopien zu verbreiten; Aenderungen sind -jedoch nicht gestattet. - -Diese Uebersetzung ist kein rechtskraeftiger Ersatz fuer die englischsprachige -Originalversion! - - -VORWORT - -Die LaTeX Project Public License (LPPL) ist die Grundlizenz unter der der -LaTeX Kern und die Standard LaTeX Pakete verteilt werden. - -Sie koennen diese Lizenz fuer jedes Werk verwenden, dessen Rechte-Inhaber Sie -sind und das sie verteilen wollen. Diese Lizenz mag besonders nuetzlich sein, -wenn Ihr Werk einen Bezug zu TeX hat (wie ein LaTeX Paket), aber Sie wurde auf -eine Art und Weise geschrieben, dass sie sogar dann verwendet werden kann, -wenn Ihr Werk keinen Bezug zu TeX hat. - -Der Abschnitt `OB UND WIE EIN WERK UNTER DIESER LIZENZ VERTEILT WIRD', unten, -liefert Informationen, Beispiele und Empfehlungen fuer Autoren die erwaegen -ihr Werk unter dieser Lizenz zu verteilen. - -Diese Lizenz legt Bedingungen fest, unter denen ein Werk verteilt und -veraendert werden darf, ebenso wie Bedingungen unter denen eine veraenderte -Version des Werks verteilt werden darf. - -Wir, das LaTeX3 Project, glauben, dass die unten genannten Bedingungen Ihnen -die Freiheit bieten eine veraenderte Version Ihres Werks zu erstellen und zu -verteilen, die jede gewuenschte technische Spezifikation erfuellt, waehrend -die Verfuegbarkeit, Unversehrtheit und Zuverlaessigkeit dieses Werks bewahrt -wird. Wenn Ihnen nicht klar ist, wie Sie ihr Ziel unter Einhaltung dieser -Bedingungen erreichen koennen, koennen Sie dazu in den Dokumenten -`cfgguide.tex' und `modguide.tex' in der Standard-LaTeX-Verteilung Vorschlaege -nachlesen. - - -DEFINITIONEN - -In diesem Lizenzdokument werden folgende Begriffe verwendet: - -`Werk' - Jegliches Werk, das unter dieser Lizenz verteilt wird. -`Abgeleitetes Werk' - Jegliches Werk das nach geltendem Recht von dem Werk abgeleitet wurde. -`Veraenderung' - Jeglicher Prozess, der nach geltendem Recht ein abgeleitetes Werk schafft, - – beispielsweise die Erstellung einer Datei, die eine mit dem Werk - verbundene Datei oder einen nennenswerten Teil einer solchen Datei - enthaelt, sei es unveraendert oder mit Veraenderungen und/oder - Uebersetzungen in eine andere Sprache. Das Ausfuehren eines Prozesses, der - nach geltendem Recht ein abgeleitetes Werk erzeugt. -`Verteilung' - Kopien des Werkes im Ganzen oder in Teilen von einer Person fuer eine - andere verfuegbar machen. Verteilung schliesst die Bereitstellung - irgendeines elektronischen Teils des Werks ueber - Datei-Austausch-Protokolle wie FTP oder HTTP oder verteilte Dateisysteme - wie Suns Netzwerk-Datei-System (NFS) ein (ist jedoch nicht darauf - beschraenkt). -`Kompiliertes Werk' - Eine Version des Werks die in eine Form ueberfuehrt wurde, in der es auf - einem Computer-System direkt verwendbar ist. Dieser Prozess der - Ueberfuehrung kann die Verwendung von Installations-Einrichtungen, die vom - Werk zur Verfuegung gestellt werden, Umwandlungen des Werks, das Kopieren - von Teilen des Werks und andere Aktivitaeten einschliessen. Beachten Sie, - dass Veraenderungen irgendeiner Installations-Einrichtung, die vom Werk zur - Verfuegung gestellt wird, Veraenderung des Werks selbst nach sich zieht. -`Aktueller Betreuer' - Eine Person oder Personen, die im Werk als solche benannt ist oder benannt - sind. Wenn keine solche explizite Benennung vorhanden ist, so ist es der - Rechte-Inhaber nach geltendem Recht. -`Standard-Interpreter' - Ein Programm oder Prozess, der normalerweise fuer die Ausfuehrung oder - Interpretierung eines Teils oder des ganzen Werks benoetigt wird. - - Ein Standard-Interpreter kann von externen Teilen abhaengen, aber diese - sind nicht als Teil des Standard-Interpreters zu betrachten, solange jeder - externe Teil sich selbst bei interaktiver Nutzung deutlich identifiziert. - Solange bei der Anwendung der Lizenz auf das Werk nicht explizit anderes - erklaert ist, ist der einzige anwendbare Standard-Interpreter ein - `LaTeX-Format', bzw. im Falle von Dateien die zum `LaTeX-Format' selbst - gehoeren, ein Progamm welches die `TeX-Sprache' implementiert. - - -BEDINGUNGEN FUER DIE VERTEILUNG UND VERAENDERUNG - - 1. Andere Aktivitaeten als die Verteilung und/oder Veraenderung des Werks sind - nicht von dieser Lizenz betroffen; sie liegen ausserhalb ihres - Anwendungsbereiches. Insbesondere ist die Taetigkeit des Ausfuehrens des - Werks nicht beschraenkt und es sind keine Bedingungen geknuepft, - irgendwelche Hilfe fuer das Werk anzubieten. - 2. Sie duerfen eine vollstaendige, unveraenderte Kopie des Werkes, so wie Sie - es erhalten haben, verteilen. Verteilungen von Teilen des Werkes werden als - Veraenderungen des Werkes betrachtet, und es kann kein Recht zur Verteilung - eines solchen Abgeleiteten Werkes aus dieser Regel abgeleitet werden. - 3. Sie duerfen ein Kompiliertes Werk, das aus einer vollstaendigen, - unveraenderten Kopie des Werkes erzeugt wurde, nach vorstehender Regel 2 - verteilen, solange das Kompilierte Werk in einer Art und Weise verteilt - wird, dass die Empfaenger das Abgeleitete Werk in genau der Weise - installieren koennen, in der sie es installieren wuerden, wenn sie selbst - das Abgeleitete Werk direkt aus dem Werk erzeugt haetten. - 4. Wenn Sie der Aktuelle Betreuer des Werks sind, koennen Sie, ohne - Beschraenkung das Werk veraendern und so ein Abgeleitetes Werk - schaffen. Sie duerften ebenso das Abgeleitete Werk ohne Einschraenkungen - verteilen, einschliesslich Kompilierter Werke, die aus Abgeleiteten Werken - geschaffen wurden. Abgeleitete Werke, die in dieser Weise vom Akuellen - Betreuer verteilt werden, sind als aktualisierte Versionen des Werks zu - verstehen. - 5. Wenn Sie nicht der Aktuelle Betreuer des Werkes sind, duerfen Sie Ihre - Kopie des Werkes veraendern und so ein Abgeleitetes Werk auf Grundlage des - Werkes schaffen, das Abgeleitete Werk kompilieren und so ein Kompiliertes - Werk auf Grundlage des Abgeleiteten Werkes schaffen. - 6. Wenn Sie nicht der Aktuelle Betreuer des Werkes sind, duerfen Sie ein - Abgeleitetes Werk verteilen, solange die folgenden Bedingungen fuer jeden - Teil des Werkes eingehalten werden, solange nicht fuer diesen Teil im - Rechte-Hinweis deutlich gemacht ist, dass dieser Teil von diesen - Bedingungen ausgenommen ist. Nur der Aktuelle Betreuer ist befugt solch - eine Ausnahmeregelung fuer einen Teil des Werkes zu erlassen. - 1. Wenn Teile des Abgeleiteten Werkes bei Nutzung mit dem - Standard-Interpreter eine direkte Ersetzung von Teilen des Werkes sein - koennen, dann muss der Ersetzungs-Teil aus dem Abgeleiteten Werk, wann - immer dieser Teil des Werks sich selbst gegenueber dem Anwender bei der - interaktiven Verwendung mit dem Standard-Interpreter identifiziert, - sich gegenueber dem Anwender klar und unmissverstaendlich selbst als - eine veraenderte Version dieses Teils identifizieren. - 2. Jeder Teil des Abgeleiteten Werks enthaelt einen deutliche Hinweis auf - die genaue Natur der Aenderungen an diesem Teil oder einen deutlichen - Verweis auf eine andere Datei, die als Teil des Abgeleiteten Werks - verteilt wird und eine vollstaendige und genaue Liste der Aenderungen - enthaelt. - 3. Das Abgeleitete Werk enthaelt keine Aussagen aus denen man schliessen - kann, dass irgendeine Person, einschliesslich (aber nicht beschraenkt - auf den) des Autors der Original-Version des Werkes, irgendwelche - Unterstuetzung, einschliesslich (aber nicht beschraenkt auf) Meldung - und Behandlung von Fehlern, gegenueber den Empfaengern des Abgeleiteten - Werkes leistet, solange diese Personen nicht ausdruecklich erklaert - haben, dass sie solch eine Unterstuetzung fuer das Abgeleitete Werk - leisten werden. - 4. Sie verteilen zusammen mit dem Abgeleiteten Werk mindestens eines der - folgenden: - 1. Eine vollstaendige, unveraenderte Kopie des Werks; wenn Ihre - Verteilung eines veraenderten Teils darin besteht, Zugang zum - Kopieren eines veraenderten Teils von einem bestimmten Ort - anzubieten, dann wird diese Bedingung erfuellt, wenn Sie - gleichwertigen Zugang zu einer Kopie des Werkes am gleichen oder - einem vergleichbaren Ort anbieten, selbst wenn Dritte so nicht - gezwungen sind, das Werk zusammen mit dem veraenderten Teil zu - kopieren. - 2. Informationen, die ausreichen, eine vollstaendige, unveraenderte - Kopie des Werks zu erhalten. - 7. Wenn Sie nicht der Aktuelle Betreuer des Werkes sind, duerfen Sie ein - Kompiliertes Werk, das aus einem Abgeleiteten Werk erzeugt wurde, - verteilen, solange das Abgeleitete Werk an alle Empfaenger des Kompilierten - Werkes verteilt wird und solange die Bedingungen aus vorstehender Regel 6 - mit Blick auf das Abgeleitete Werk erfuellt sind. - 8. Die vorstehenden Bedingungen sind nicht dazu gedacht, Veraenderungen gleich - welcher Weise und welchen Teils zu verhindern, die dazu fuehren, dass - dieser Teil mit einer aktualisierten Version dieses Teiles, wie sie vom - Aktuellen Betreuer nach Regel 4 verteilt wird, identisch wird. Die - vorstehenden Bedingungen sind daher auf diesen Fall nicht anzuwenden. - 9. Verteilungen des Werkes und jedes Abgeleiteten Werkes in einem alternativen - Format, aus dem das Werk oder das abgeleitete Werk (im Ganzen oder in - Teilen) dann erzeugt wird, indem irgend ein Prozess auf das Format - angewendet wird, schwaecht keinen Abschnitt dieser Lizenz ab und hebt - keinen Abschnitt dieser Lizenz auf, da sie das Ergebnis der Anwendung - dieses Prozesses betreffen. -10. - 1. Ein Abgeleitetes Werk darf unter einer anderen Lizenz verteilt werden, - solange sichergestellt ist, dass diese Lizenz selbst die Bedingungen - aus Regel 6 in Bezug auf das Werk beachtet, obgleich sie nicht die - restlichen Bedingungen dieser Lizenz zu beachten hat. - 2. Wenn ein Abgeleitetes Werk unter einer anderen Lizenz verteilt wird, - muss dieses Abgeleitete Werk genuegend Dokumentation als Teil von sich - selbst bieten, damit jeder Empfaenger dieses Abgeleiteten Werkes die - Bedingungen von vorstehender Regel 6, betreffend Aenderungen des Werks, - beachten kann. -11. Diese Lizenz trifft keine Einschraenkungen fuer Werke, die in keiner - Beziehung zu dem Werk stehen, noch trifft diese Lizenz irgendwelche - Einschraenkungen betreffens das Zusammenpacken solcher Werke mit dem Werk - auf irgendeine Art. -12. Nichts in dieser Lizenz ist dazu gedacht oder darf dazu verwendet werden - vollstaendige Einhaltung geltenden Rechts durch alle Beteiligten zu - verhindern. - - -KEINE GEWAEHRLEISTUNG - -Es besteht keinerlei Gewaehrleistung fuer das Werk, soweit dies gesetzlich -zulaessig ist. Sofern nicht anderweitig schriftlich bestaetigt, stellen die -Rechte-Inhaber das Werk so zur Verfuegung, `wie es ist', ohne irgendeine -Gewaehrleistung, weder ausdruecklich noch implizit, einschliesslich, aber -nicht begrenzt auf, Marktreife oder Tauglichkeit fuer einen bestimmten -Zweck. Das volle Risiko bezueglich Qualitaet und Leistungsfaehigkeit des -Programms liegt bei Ihnen. Sollte sich das Programm als fehlerhaft -herausstellen, liegen die Kosten fuer notwendigen Service, Reparatur oder -Korrektur bei Ihnen. - -In keinem Fall, ausser wenn durch geltendes Recht gefordert oder schriftlich -zugesichert, ist irgendein Rechte-Inhaber oder ein in einem Teil des Werkes -namentlich genannter Autor oder irgendein anderer, der das Programm wie oben -erlaubt modifiziert und/oder verbreitet hat, Ihnen gegenueber fuer -irgendwelche Schaeden haftbar, einschliesslich jeglicher allgemeiner oder -spezieller Schaeden, Schaeden durch Seiteneffekte (Nebenwirkungen) oder -Folgeschaeden, die aus der Benutzung des Werkes oder der Unbenutzbarkeit des -Werkes folgen (einschliesslich, aber nicht beschraenkt auf, Datenverluste, -fehlerhafte Verarbeitung von Daten, Verluste, die von Ihnen oder anderen -getragen werden muessen, oder dem Unvermoegen des Werkes, mit irgendeinem -anderen Programm zusammenzuarbeiten), selbst wenn ein Rechte-Inhaber oder -genannter Autor oder genannter Dritter ueber die Moeglichkeit solcher Schaeden -unterrichtet worden war. - - -BETREUUNG DES WERKES - -Das Werk hat den Status `author-maintained' (vom Autor betreut) wenn der -Rechte-Inhaber ausdruecklich und deutlich in der Naehe des grundlegenden -Rechtehinweises im Werk feststellt, dass das Werk nur vom Rechte-Inhaber -betreut werden kann oder einfach, dass es `author-maintained' (vom Autor -betreut) ist. - -Das Werk hat den Status `maintained' (betreut), wenn ein Aktueller Betreuer -existiert, der im Werk angezeigt hat, dass er bereit ist, Fehlermeldungen das -Werk betreffend zu erhalten (beispielsweise, indem er eine gueltige -E-Mail-Adresse bekannt gibt). Es ist nicht erforderlich, dass der Aktuelle -Betreuer diese Fehlermeldungen bestaetigt oder auf sie reagiert. - -Das Werk wechselt vom Status `maintained' (betreut) in den Status -`unmaintained' (nicht betreut), wenn kein Aktueller Betreuer vorhanden ist -oder die Person, die als Aktueller Betreuer des Werks festgelegt ist, fuer -einen Zeitraum von sechs Monaten nicht auf dem bekannten Kommunikationsweg -erreichbar ist, und keine anderen Anzeichen einer aktiven Betreuung zu -erkennen sind. - -Wenn das Werk den Status `unmaintained' hat, koennen Sie durch die folgenden -Schritte zum Aktuelle Betreuer des Werkes werden: - - 1. Unternehmen Sie vertretbare Anstrengungen, um den Aktuellen Betreuer (und - den Rechte-Inhaber, falls dies zwei verschiedene Personen sind) durch - Nutzung des Internets und anderer Methoden ausfindig zu machen. - 2. Wenn diese Suche erfolgreich ist, dann erkundigen Sie sich, ob das Werk - noch immer betreut wird. - 1. Wenn es betreut wird, fragen Sie den Aktuellen Betreuer nach einer - Aktualisierung der Kommunikationsdaten innerhalb eines Monats. - 2. Wenn die Suche erfolglos ist oder vom Aktuellen Betreuer nichts - unternommen wird, um die aktive Betreuung fortzusetzen oder - wiederaufzunehmen, dann zeigen Sie in der zur Sache gehoerenden - Nutzergemeinschaft Ihren Willen zur Uebernahme der Betreuung an. (Wenn - das Werk ein LaTeX-Werk ist, kann dies beispielsweise durch eine - Mitteilung in comp.text.tex oder de.comp.text.tex erfolgen). - 3. - 1. Wenn der Aktuelle Betreuer erreichbar ist und der Uebergabe der - Betreuung an Sie zustimmt, dann hat dies sofortige Wirkung nach - Bekanntgabe. - 2. Wenn der Aktuelle Betreuer nicht erreichbar ist und der Rechte-Inhaber - einer Uebergabe der Betreuung an Sie zustimmt, dann hat sofortige - Wirkung nach Bekanntgabe. - 4. Wenn Sie eine Willens-Bekanntgabe wie oben in 2b beschrieben durchfuehren - und nach drei Monaten Ihr Wunsch weder vom Aktuellen Betreuer noch vom - Rechte-Inhaber noch von anderen Personen zurueckgewiesen wurde, dann - koennen Sie Verfuegungen fuer das Werk treffen, damit sie als (neuer) - Aktueller Betreuer bezeichnet werden. - 5. Wenn der zuvor unerreichbare Aktuelle Betreuer innerhalb weiterer drei - Monate nach einer erfolgten Aenderung gemaess den Bedingungen von 3b oder 4 - erreichbar wird, dann muss dieser Aktuelle Betreuer auf seinen Wunsch - wieder der Aktuelle Betreuer werden, wenn er innerhalb eines Monats seine - Kommunikationsdaten aktualisiert. - -Ein Wechsel des Aktuellen Betreuers allein aendert nichts an der Tatsache, dass -das Werk unter der LPPL verteilt wird. - -Wenn Sie der Aktuelle Betreuer des Werks werden, sollten Sie unverzueglich das -Werk mit einer deutlichen und unmissverstaendlichen Feststellung ueber Ihren -Status als Aktueller Betreuer versehen. Sie sollten ebenfalls Ihren neuen -Status derselben Nutzergemeinschaft bekannt geben wie in oben in 2b. - - -OB UND WIE EIN WERK UNTER DIESER LIZENZ VERTEILT WERDEN SOLLTE - -Dieser Abschnitt enthaelt wichtige Informationen, Beispiele und Empfehlungen -fuer Autoren, die erwaegen Ihr Werk unter dieser Lizenz zu verteilen. Die -Autoren sind in diesem Abschnitt mit `Sie' bezeichnet. - - -Wahl dieser Lizenz oder einer anderen Lizenz - -Wenn Sie fuer irgend einen Teil Ihres Werkes Bedingungen fuer die Verteilung -benoetigen oder wollen, die bedeutsam von dieser Lizenz abweichen, dann sollten -Sie sich an keiner Stelle Ihres Werkes auf diese Lizenz beziehen, sondern -stattdessen Ihr Werk unter einer anderen Lizenz verteilen. Sie koennen dann den -Text dieser Lizenz als Modell fuer Ihre eigene Lizenz verwenden, aber Ihre -Lizenz sollte sich nicht auf diese Lizenz beziehen, anderenfalls entsteht der -Eindruck, dass Ihr Werk unter der LPPL verteilt wird. - -Das Dokument `modguide.tex' in der Standard-LaTeX-Verteilung erklaert die -Motivation hinter den Bedingungen dieser Lizenz. Es erklaert beispielsweise, -warum die Verteilung von LaTeX unter der GNU General Public License (GPL) als -unpassend betrachtet wurde. Selbst wenn Ihr Werk nicht mit LaTeX zu tun hat, -kann die Diskussion in `modguide.tex' immer noch relevant sein und Autoren, die -beabsichtigen ihr Werk unter irgendeiner Lizenz zu verteilen wird empfohlen es -zu lesen. - - -Eine Empfehlung fuer Aenderungen ohne Verteilung - -Es ist klug niemals einen Teil des Werkes zu veraendern, auch nicht fuer die -eigene persoenliche Verwendung, ohne alle obigen Regeln fuer die Verteilung -des veraenderten Teils einzuhalten. Auch wenn Sie beabsichtigen, diesen -veraenderten Teil niemals zu verteilen, geschieht dies des oefteren -versehentlich – Sie koennten vergessen, dass Sie diesen Teil veraendert haben; -oder es koennte Ihnen nicht bewusst sein, wenn Sie anderen den Zugang zu der -veraenderten Version erlauben, dass Sie sie damit verteilen und Sie so gegen -die Bedingungen dieser Lizenz in einer Weise verstossen, die rechtliche -Implikationen haben und, schlimmer, Probleme in der Nutzergemeinschaft -verursachen kann. Es ist daher ueblicherweise in Ihrem eigenen Interesse, Ihre -eigene Kopie des Werkes identisch mit der oeffentlichen Version zu -halten. Viele Werke unterstuetzen Wege, um das Verhalten des Werkes ohne -Aenderung eines lizensierten Teils zu veraendern. - - -Wie diese Lizenz zu nutzen ist - -Um diese Lizenz zu nutzen, fuegen Sie in jeden Teil Ihres Werkes einen -expliziten Rechtehinweis sowohl mit Ihrem Namen als auch dem Jahr, in dem das -Werk geschrieben und/oder wesentlich geaendert wurde, ein. Fuegen Sie -ebenfalls eine Festlegung ein, dass die Verteilung und/oder Veraenderung -dieses Teils nach durch die Bedingungen dieser Lizenz geregelt ist. - -Hier ist ein Beispiel fuer solch einen Hinweis und eine Festlegung: - - %% pig.dtx - %% Copyright 2005 M. Y. Name - % - % This work may be distributed and/or modified under the - % conditions of the LaTeX Project Public License, either version 1.3 - % of this license or (at your option) any later version. - % The latest version of this license is in - % http://www.latex-project.org/lppl.txt - % and version 1.3 or later is part of all distributions of LaTeX - % version 2005/12/01 or later. - % - % This work has the LPPL maintenance status "maintained". - % - % The Current Maintainer of this work is M. Y. Name. - % - % This work consists of the files pig.dtx and pig.ins - % and the derived file pig.sty. - -auf Deutsch (Sie sollten den Hinweis und die Festlegung jedoch unbedingt -zumindest auch in englischer Sprache aufnehmen): - - %% pig.dtx - %% Copyright 2005 M. Y. Name - % - % Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz, - % entweder Version 1.3 oder (nach Ihrer Wahl) jede spaetere Version, - % verteilt und/oder veraendert werden. - % Die neuste Version dieser Lizenz ist - % http://www.latex-project.org/lppl.txt - % und Version 1.3 oder neuer ist Teil aller Verteilungen von LaTeX - % Version 2005/12/01 oder spaeter. - % - % Dieses Werk hat den LPPL-Betreuungs-Status "maintained" (betreut). - % - % Der Aktuelle Betreuer dieses Werkes ist M. Y. Name. - % - % Dieses Werk besteht aus den Dateien pig.dtx und pig.ins und der - % abgeleiteten Datei pig.sty. - -Mit solchem Hinweis und Festlegung in einer Datei, sind die Bedingungen dieses -Lizenz-Dokuments anzuwenden, wobei das `Werk' sich auf die drei Dateien -`pig.dtx', `pig,ins' und `pig.sty' bezieht (das letzte wird aus `pig.dtx' -unter Verwendung von `pig.ins' erzeugt), der `Standard-Interpreter' bezieht -sich auf jegliches `LaTeX-Format' und beide `Rechte-Inhaber' und `Aktueller -Betreuer' beziehen sich auf die Person `M. Y. Name'. - -Wenn Sie nicht wollen, dass der Betreuer-Abschnitt der LPPL auf Ihr Werk -anzuwenden ist, aendern Sie oben "maintained" in "author-maintained". Wir -empfehlen die Verwendung von "maintained", da der Betreuungs-Abschnitt -hinzugefuegt wurde um sicherzustellen, dass Ihr Werk fuer die -Nutzergemeinschaft nuetzlich bleibt, selbst wenn Sie es nicht mehr selbst -betreuen und aktualisieren koennen. - - -Abgeleitete Werke, die keinen Ersatz darstellen - -Diverse Bedingungen der LPPL treffen Festlegungen, um die Benutzbarkeit und -Stabilitaet fuer die Nutzergemeinschaft sicher zu stellen. Daher befassen sie -sich mit dem Fall, dass ein abgeleitetes Werk (kompatibel oder auch nicht -kompatibel) dazu gedacht ist, als Ersatz des Originalwerks verwendet zu -werden. Falls das nicht der Fall ist (beispielsweise, wenn nur einige wenige -Zeilen Quelltext in einem komplett anderen Zusammenhang wiederverwendet -werden), dann finden die Bedingungen 6b und 6d keine Anwendung. - - -Wichtige Empfehlungen - -Festlegen was das Werk ausmacht - -Die LPPL erfordert, dass die Verteilung des Werkes alle Dateien des Werkes -beinhaltet. Es ist daher wichtig, dass Sie fuer den Lizenznehmer eine -Moeglichkeit schaffen, festzustellen welche Dateien das Werk ausmachen. Dies -kann beispielsweise erreicht werden, indem alle Dateien des Werks in der Naehe -des Rechte-Hinweises in jeder Datei aufgefuehrt werde oder durch eine Zeile -wie: - - % This work consists of all files listed in manifest.txt. - -auf Deutsch (Sie sollten den Hinweis jedoch unbedingt zumindest auch in -englischer Sprache aufnehmen): - - % Dieses Werk besteht aus allen in manifest.txt aufgefuehrten Dateien - -an dieser Stelle. Bei Fehlen einer unzweideutigen Liste kann es fuer den -Lizenznehmer unmoeglich sein herauszufinden woraus nach Ihrer Auffassung das -Werk besteht, in diesem Fall waere der Lizenznehmer berechtigt sinnvolle -Annahmen zu treffen, aus welchen Dateien das Werk besteht. - -------------------------------------------------------------------------------- -Letzte Aenderung, 16. Januar 2006 -Letzte Aenderung der Uebersetzung, 13. Februar 2006 diff --git a/macros/latex/contrib/koma-script/doc/lppl.txt b/macros/latex/contrib/koma-script/doc/lppl.txt deleted file mode 100644 index 90e5e3ab79..0000000000 --- a/macros/latex/contrib/koma-script/doc/lppl.txt +++ /dev/null @@ -1,416 +0,0 @@ -The LaTeX Project Public License -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - -LPPL Version 1.3c 2006-05-20 - -Copyright 1999 2002-2006 LaTeX3 Project - Everyone is allowed to distribute verbatim copies of this - license document, but modification of it is not allowed. - - -PREAMBLE -======== - -The LaTeX Project Public License (LPPL) is the primary license under -which the the LaTeX kernel and the base LaTeX packages are distributed. - -You may use this license for any work of which you hold the copyright -and which you wish to distribute. This license may be particularly -suitable if your work is TeX-related (such as a LaTeX package), but -it is written in such a way that you can use it even if your work is -unrelated to TeX. - -The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', -below, gives instructions, examples, and recommendations for authors -who are considering distributing their works under this license. - -This license gives conditions under which a work may be distributed -and modified, as well as conditions under which modified versions of -that work may be distributed. - -We, the LaTeX3 Project, believe that the conditions below give you -the freedom to make and distribute modified versions of your work -that conform with whatever technical specifications you wish while -maintaining the availability, integrity, and reliability of -that work. If you do not see how to achieve your goal while -meeting these conditions, then read the document `cfgguide.tex' -and `modguide.tex' in the base LaTeX distribution for suggestions. - - -DEFINITIONS -=========== - -In this license document the following terms are used: - - `Work' - Any work being distributed under this License. - - `Derived Work' - Any work that under any applicable law is derived from the Work. - - `Modification' - Any procedure that produces a Derived Work under any applicable - law -- for example, the production of a file containing an - original file associated with the Work or a significant portion of - such a file, either verbatim or with modifications and/or - translated into another language. - - `Modify' - To apply any procedure that produces a Derived Work under any - applicable law. - - `Distribution' - Making copies of the Work available from one person to another, in - whole or in part. Distribution includes (but is not limited to) - making any electronic components of the Work accessible by - file transfer protocols such as FTP or HTTP or by shared file - systems such as Sun's Network File System (NFS). - - `Compiled Work' - A version of the Work that has been processed into a form where it - is directly usable on a computer system. This processing may - include using installation facilities provided by the Work, - transformations of the Work, copying of components of the Work, or - other activities. Note that modification of any installation - facilities provided by the Work constitutes modification of the Work. - - `Current Maintainer' - A person or persons nominated as such within the Work. If there is - no such explicit nomination then it is the `Copyright Holder' under - any applicable law. - - `Base Interpreter' - A program or process that is normally needed for running or - interpreting a part or the whole of the Work. - - A Base Interpreter may depend on external components but these - are not considered part of the Base Interpreter provided that each - external component clearly identifies itself whenever it is used - interactively. Unless explicitly specified when applying the - license to the Work, the only applicable Base Interpreter is a - `LaTeX-Format' or in the case of files belonging to the - `LaTeX-format' a program implementing the `TeX language'. - - - -CONDITIONS ON DISTRIBUTION AND MODIFICATION -=========================================== - -1. Activities other than distribution and/or modification of the Work -are not covered by this license; they are outside its scope. In -particular, the act of running the Work is not restricted and no -requirements are made concerning any offers of support for the Work. - -2. You may distribute a complete, unmodified copy of the Work as you -received it. Distribution of only part of the Work is considered -modification of the Work, and no right to distribute such a Derived -Work may be assumed under the terms of this clause. - -3. You may distribute a Compiled Work that has been generated from a -complete, unmodified copy of the Work as distributed under Clause 2 -above, as long as that Compiled Work is distributed in such a way that -the recipients may install the Compiled Work on their system exactly -as it would have been installed if they generated a Compiled Work -directly from the Work. - -4. If you are the Current Maintainer of the Work, you may, without -restriction, modify the Work, thus creating a Derived Work. You may -also distribute the Derived Work without restriction, including -Compiled Works generated from the Derived Work. Derived Works -distributed in this manner by the Current Maintainer are considered to -be updated versions of the Work. - -5. If you are not the Current Maintainer of the Work, you may modify -your copy of the Work, thus creating a Derived Work based on the Work, -and compile this Derived Work, thus creating a Compiled Work based on -the Derived Work. - -6. If you are not the Current Maintainer of the Work, you may -distribute a Derived Work provided the following conditions are met -for every component of the Work unless that component clearly states -in the copyright notice that it is exempt from that condition. Only -the Current Maintainer is allowed to add such statements of exemption -to a component of the Work. - - a. If a component of this Derived Work can be a direct replacement - for a component of the Work when that component is used with the - Base Interpreter, then, wherever this component of the Work - identifies itself to the user when used interactively with that - Base Interpreter, the replacement component of this Derived Work - clearly and unambiguously identifies itself as a modified version - of this component to the user when used interactively with that - Base Interpreter. - - b. Every component of the Derived Work contains prominent notices - detailing the nature of the changes to that component, or a - prominent reference to another file that is distributed as part - of the Derived Work and that contains a complete and accurate log - of the changes. - - c. No information in the Derived Work implies that any persons, - including (but not limited to) the authors of the original version - of the Work, provide any support, including (but not limited to) - the reporting and handling of errors, to recipients of the - Derived Work unless those persons have stated explicitly that - they do provide such support for the Derived Work. - - d. You distribute at least one of the following with the Derived Work: - - 1. A complete, unmodified copy of the Work; - if your distribution of a modified component is made by - offering access to copy the modified component from a - designated place, then offering equivalent access to copy - the Work from the same or some similar place meets this - condition, even though third parties are not compelled to - copy the Work along with the modified component; - - 2. Information that is sufficient to obtain a complete, - unmodified copy of the Work. - -7. If you are not the Current Maintainer of the Work, you may -distribute a Compiled Work generated from a Derived Work, as long as -the Derived Work is distributed to all recipients of the Compiled -Work, and as long as the conditions of Clause 6, above, are met with -regard to the Derived Work. - -8. The conditions above are not intended to prohibit, and hence do not -apply to, the modification, by any method, of any component so that it -becomes identical to an updated version of that component of the Work as -it is distributed by the Current Maintainer under Clause 4, above. - -9. Distribution of the Work or any Derived Work in an alternative -format, where the Work or that Derived Work (in whole or in part) is -then produced by applying some process to that format, does not relax or -nullify any sections of this license as they pertain to the results of -applying that process. - -10. a. A Derived Work may be distributed under a different license - provided that license itself honors the conditions listed in - Clause 6 above, in regard to the Work, though it does not have - to honor the rest of the conditions in this license. - - b. If a Derived Work is distributed under a different license, that - Derived Work must provide sufficient documentation as part of - itself to allow each recipient of that Derived Work to honor the - restrictions in Clause 6 above, concerning changes from the Work. - -11. This license places no restrictions on works that are unrelated to -the Work, nor does this license place any restrictions on aggregating -such works with the Work by any means. - -12. Nothing in this license is intended to, or may be used to, prevent -complete compliance by all parties with all applicable laws. - - -NO WARRANTY -=========== - -There is no warranty for the Work. Except when otherwise stated in -writing, the Copyright Holder provides the Work `as is', without -warranty of any kind, either expressed or implied, including, but not -limited to, the implied warranties of merchantability and fitness for a -particular purpose. The entire risk as to the quality and performance -of the Work is with you. Should the Work prove defective, you assume -the cost of all necessary servicing, repair, or correction. - -In no event unless required by applicable law or agreed to in writing -will The Copyright Holder, or any author named in the components of the -Work, or any other party who may distribute and/or modify the Work as -permitted above, be liable to you for damages, including any general, -special, incidental or consequential damages arising out of any use of -the Work or out of inability to use the Work (including, but not limited -to, loss of data, data being rendered inaccurate, or losses sustained by -anyone as a result of any failure of the Work to operate with any other -programs), even if the Copyright Holder or said author or said other -party has been advised of the possibility of such damages. - - -MAINTENANCE OF THE WORK -======================= - -The Work has the status `author-maintained' if the Copyright Holder -explicitly and prominently states near the primary copyright notice in -the Work that the Work can only be maintained by the Copyright Holder -or simply that it is `author-maintained'. - -The Work has the status `maintained' if there is a Current Maintainer -who has indicated in the Work that they are willing to receive error -reports for the Work (for example, by supplying a valid e-mail -address). It is not required for the Current Maintainer to acknowledge -or act upon these error reports. - -The Work changes from status `maintained' to `unmaintained' if there -is no Current Maintainer, or the person stated to be Current -Maintainer of the work cannot be reached through the indicated means -of communication for a period of six months, and there are no other -significant signs of active maintenance. - -You can become the Current Maintainer of the Work by agreement with -any existing Current Maintainer to take over this role. - -If the Work is unmaintained, you can become the Current Maintainer of -the Work through the following steps: - - 1. Make a reasonable attempt to trace the Current Maintainer (and - the Copyright Holder, if the two differ) through the means of - an Internet or similar search. - - 2. If this search is successful, then enquire whether the Work - is still maintained. - - a. If it is being maintained, then ask the Current Maintainer - to update their communication data within one month. - - b. If the search is unsuccessful or no action to resume active - maintenance is taken by the Current Maintainer, then announce - within the pertinent community your intention to take over - maintenance. (If the Work is a LaTeX work, this could be - done, for example, by posting to comp.text.tex.) - - 3a. If the Current Maintainer is reachable and agrees to pass - maintenance of the Work to you, then this takes effect - immediately upon announcement. - - b. If the Current Maintainer is not reachable and the Copyright - Holder agrees that maintenance of the Work be passed to you, - then this takes effect immediately upon announcement. - - 4. If you make an `intention announcement' as described in 2b. above - and after three months your intention is challenged neither by - the Current Maintainer nor by the Copyright Holder nor by other - people, then you may arrange for the Work to be changed so as - to name you as the (new) Current Maintainer. - - 5. If the previously unreachable Current Maintainer becomes - reachable once more within three months of a change completed - under the terms of 3b) or 4), then that Current Maintainer must - become or remain the Current Maintainer upon request provided - they then update their communication data within one month. - -A change in the Current Maintainer does not, of itself, alter the fact -that the Work is distributed under the LPPL license. - -If you become the Current Maintainer of the Work, you should -immediately provide, within the Work, a prominent and unambiguous -statement of your status as Current Maintainer. You should also -announce your new status to the same pertinent community as -in 2b) above. - - -WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE -====================================================== - -This section contains important instructions, examples, and -recommendations for authors who are considering distributing their -works under this license. These authors are addressed as `you' in -this section. - -Choosing This License or Another License ----------------------------------------- - -If for any part of your work you want or need to use *distribution* -conditions that differ significantly from those in this license, then -do not refer to this license anywhere in your work but, instead, -distribute your work under a different license. You may use the text -of this license as a model for your own license, but your license -should not refer to the LPPL or otherwise give the impression that -your work is distributed under the LPPL. - -The document `modguide.tex' in the base LaTeX distribution explains -the motivation behind the conditions of this license. It explains, -for example, why distributing LaTeX under the GNU General Public -License (GPL) was considered inappropriate. Even if your work is -unrelated to LaTeX, the discussion in `modguide.tex' may still be -relevant, and authors intending to distribute their works under any -license are encouraged to read it. - -A Recommendation on Modification Without Distribution ------------------------------------------------------ - -It is wise never to modify a component of the Work, even for your own -personal use, without also meeting the above conditions for -distributing the modified component. While you might intend that such -modifications will never be distributed, often this will happen by -accident -- you may forget that you have modified that component; or -it may not occur to you when allowing others to access the modified -version that you are thus distributing it and violating the conditions -of this license in ways that could have legal implications and, worse, -cause problems for the community. It is therefore usually in your -best interest to keep your copy of the Work identical with the public -one. Many works provide ways to control the behavior of that work -without altering any of its licensed components. - -How to Use This License ------------------------ - -To use this license, place in each of the components of your work both -an explicit copyright notice including your name and the year the work -was authored and/or last substantially modified. Include also a -statement that the distribution and/or modification of that -component is constrained by the conditions in this license. - -Here is an example of such a notice and statement: - - %% pig.dtx - %% Copyright 2005 M. Y. Name - % - % This work may be distributed and/or modified under the - % conditions of the LaTeX Project Public License, either version 1.3 - % of this license or (at your option) any later version. - % The latest version of this license is in - % http://www.latex-project.org/lppl.txt - % and version 1.3 or later is part of all distributions of LaTeX - % version 2005/12/01 or later. - % - % This work has the LPPL maintenance status `maintained'. - % - % The Current Maintainer of this work is M. Y. Name. - % - % This work consists of the files pig.dtx and pig.ins - % and the derived file pig.sty. - -Given such a notice and statement in a file, the conditions -given in this license document would apply, with the `Work' referring -to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being -generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' -referring to any `LaTeX-Format', and both `Copyright Holder' and -`Current Maintainer' referring to the person `M. Y. Name'. - -If you do not want the Maintenance section of LPPL to apply to your -Work, change `maintained' above into `author-maintained'. -However, we recommend that you use `maintained', as the Maintenance -section was added in order to ensure that your Work remains useful to -the community even when you can no longer maintain and support it -yourself. - -Derived Works That Are Not Replacements ---------------------------------------- - -Several clauses of the LPPL specify means to provide reliability and -stability for the user community. They therefore concern themselves -with the case that a Derived Work is intended to be used as a -(compatible or incompatible) replacement of the original Work. If -this is not the case (e.g., if a few lines of code are reused for a -completely different task), then clauses 6b and 6d shall not apply. - - -Important Recommendations -------------------------- - - Defining What Constitutes the Work - - The LPPL requires that distributions of the Work contain all the - files of the Work. It is therefore important that you provide a - way for the licensee to determine which files constitute the Work. - This could, for example, be achieved by explicitly listing all the - files of the Work near the copyright notice of each file or by - using a line such as: - - % This work consists of all files listed in manifest.txt. - - in that place. In the absence of an unequivocal list it might be - impossible for the licensee to determine what is considered by you - to comprise the Work and, in such a case, the licensee would be - entitled to make reasonable conjectures as to which files comprise - the Work. - diff --git a/macros/latex/contrib/koma-script/doc/manifest.txt b/macros/latex/contrib/koma-script/doc/manifest.txt deleted file mode 100644 index e6da434d29..0000000000 --- a/macros/latex/contrib/koma-script/doc/manifest.txt +++ /dev/null @@ -1,528 +0,0 @@ -% ====================================================================== -% manifest.txt -% Copyright (c) Markus Kohm, 2005-2022 -% -% 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. -% ---------------------------------------------------------------------- -% manifest.txt -% Copyright (c) Markus Kohm, 2005-2022 -% -% 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. -% ====================================================================== -% -% CONTENTS OF THE KOMA-SCRIPT RELEASE 2022/05/01 v3.36 -% ------------------------------------------------------ -% -% -% Documentation: -% -------------- -% -% README - The distribution guide. START BY READING THIS FILE! -% Informationen zur Verteilung. DIESE DATEI ZUERST LESEN! -% manifest.txt - This file -% -% INSTALL.txt - English installation guide -% INSTALLD.txt - Deutsche Installationsanleitung -% -% lppl.txt - Licence informations -% lppl-de.txt - Deutsche Uebersetzung der Lizenzbestimmungen. Diese ist -% in allen Laendern oder Staaten mit Deutsch als -% zulaessiger Amtssprache bindend. -% -% scrsource.tex - File to produce the KOMA-Script implementation -% documentation -% -% doc/ - Directory with all the documentation -% Makefile - Gnu make's makefile for the user guides -% Makefile.guide - Used by Makefile -% Makefile.latexinit -% - Used by Makefile -% guide.tex - Source main file of the user guides -% guide.bib - Bibliography database of the user guides -% plength.dtx - Source of Metapost figures used by the user guides -% scrguide.cls - Class used by the user guides -% scrguide.gst - MakeIndex style for the glossary of the user guides -% scrguide.ist - MakeIndex style for the index of the user guides -% -% koma-script.html - Wrapper to the user guides -% komascript.html - Wrapper to the user guides -% komascr.html - Wrapper to the user guides -% scraddr.html - Wrapper to the user guides -% scrartcl.html - Wrapper to the user guides -% scrbase.html - Wrapper to the user guides -% scrbook.html - Wrapper to the user guides -% scrdate.html - Wrapper to the user guides -% scrlfile.html - Wrapper to the user guides -% scrwfile.html - Wrapper to the user guides -% scrlttr2.html - Wrapper to the user guides -% scrletter.html - Wrapper to the user guides -% scrreprt.html - Wrapper to the user guides -% scrtime.html - Wrapper to the user guides -% tocbasic.html - Wrapper to the user guides -% typearea.html - Wrapper to the user guides -% -% scrguien.pdf - English user guide -% scrguien.html - HTML index of the English user guide -% -% scrguide.pdf - Deutsche Anleitung -% scrguide.html - HTML-Index fuer die deutsche Anleitung -% -% linkalias.tex - alias definitions of links in the free manual -% -% bin/ -% genhtmlidx.pl - Perl script for HTML index generation -% genindex.pl - Perl script to split the index -% -% english/ - Directory with the source of the English user guide -% adrconvnote.tex - Source of the chapter about adrconv at the English -% user guide -% authorpart.tex - heading of part I -% common-options.tex, common-compatibility.tex, common-draftmode.tex, -% common-typearea.tex, common-fontsize.tex, common-textmarkup, -% common-parmarkup, common-oddorevenpage.tex, common-interleafpage.tex, -% common-footnotes.tex, common-lists.tex, common-marginpar.tex, -% common-titles.tex, common-dictum.tex, common-headfootheight.tex, -% common-pagestylemanipulation.tex -% - used in several chapters -% guide-english.tex -% - Terms for the English user guide -% expertpart.tex - heading of part II -% htmlsetup - Terms for the html index of the English user guide -% introduction.tex - Source of introduction chapter at the English user -% guide -% japanlco.tex - Source of the appendix about Japanese letters -% preface.tex - preface to KOMA-Script 3 -% scraddr.tex - Source of the chapter about scraddr at the English -% user guide -% scrbase.tex - Source of the chapter about scrbase at the English -% user guide -% scrbookreportarticle.tex -% - Source of the chapter about scrbook, scrreprt, and -% scrartcl in part I of the English user guide -% scrbookreportarticle-experts.tex -% - Source of the chapter about scrbook, scrreprt, and -% scrartcl in part II of the English user guide -% scrdatetime.tex - Source of the chapter about scrdate and scrtime at -% the English user guide -% scrjura.tex - Source of the chapter about scrjura -% scrjuraexample.tex -% - Source of an example for scrjura -% scrlfile.tex - Source of the chapter about scrlfile at the English -% user guide -% scrwfile.tex - Source of the chapter about scrwfile at the English -% user guide -% scrlttr2.tex - Source of the chapter about scrlttr2 in part I of -% the English user guide -% scrlttr2examples.dtx -% - Source of the example letter -% scrlttr2-experts.tex -% - Source of the chapter about scrlttr2 in part II of -% the English user guide -% scrlayer-scrpage.tex -% - Source of the chapter about scrlayer-scrpage at the -% English user guide -% scrlayer-scrpage-experts.tex -% - Source of the chapter about scrlayer-scrpage at the -% expert part of the English user guide -% scrlayer.tex - Source of the chapter about scrlayer the -% English user guide -% scrlayer-notecolumn.tex -% - Source of the chapter about scrlayer-notecolumn at the -% English user guide -% scrlayer-notecolumn-example.tex -% - Source of the (German) example in the chapter about -% scrlayer-notecolumn in the English manual. -% tocbasic.tex - Source of the chapter about tocbasic at the English -% user guide -% typearea.tex - Source of the chapter about typearea in part I of -% the English user guide -% typearea-experts.tex -% - Source of the chapter about typearea in part I of -% the English user guide -% -% ngerman/ - Verzeichnis mit der deutschen Anleitung -% adrconvnote.tex - Quellen des Kapitels ueber adrconv in der deutschen -% Anleitung -% authorpart.tex - Vorspann von Teil I -% common-options.tex, common-compatibility.tex, common-draftmode.tex, -% common-typearea.tex, common-fontsize.tex, common-textmarkup, -% common-parmarkup, common-oddorevenpage.tex, common-interleafpage.tex, -% common-footnotes.tex, common-lists.tex, common-marginpar.tex, -% common-titles.tex, common-dictum.tex, common-headfootheight.tex, -% common-pagestylemanipulation.tex -% - Passagen, die in verschiedenen Kapiteln vorkommen -% expertpart.tex - Vorspann von Teil II -% guide-ngerman.tex -% - Begriffe fuer die deutsche Anleitung -% htmlsetup - Begriffe fuer den HTML-Index fuer die deutsche Anleitung -% introduction.tex - Quellen des Einleitungskapitels der deutschen Anleitung -% preface.tex - Vorwort zu KOMA-Script 3 -% scraddr.tex - Quellen des Kapitels ueber scraddr in der deutschen -% Anleitung -% scrbase.tex - Quellen des Kapitels ueber scrbase in der deutschen -% Anleitung -% scrbookreportarticle.tex -% - Quellen des Kapitels ueber scrbook, scrreprt und -% scrartcl in Teil I der deutschen Anleitung -% scrbookreportarticle-experts.tex -% - Quellen des Kapitels ueber scrbook, scrreprt und -% scrartcl in Teil II der deutschen Anleitung -% scrdatetime.tex - Quellen des Kapitels ueber scrdate und scrtime in der -% deutschen Anleitung -% scrextend.tex - Quellen des Kapitels ueber scrextend in der deutschen -% Anleitung -% scrhack.tex - Quellen des Kapitels ueber scrhack in der deutschen -% Anleitung -% scrjura.tex - Quellen des Kapitels ueber scrjura in der deutschen -% Anleitung -% scrjuraexample.tex -% - Quellen eines Beispiels mit scrjura -% scrlfile.tex - Quellen des Kapitels ueber scrlfile in der deutschen -% Anleitung -% scrwfile.tex - Quellen des Kapitels ueber scrwfile in der deutschen -% Anleitung -% scrlttr2examples.dtx -% - Quellen der Beispielbriefe -% scrlttr2.tex - Quellen des Kapitels ueber scrlttr2 in Teil I der -% deutschen Anleitung -% scrlttr2-experts.tex -% - Quellen des Kapitels ueber scrlttr2 in Teil II der -% deutschen Anleitung -% scrlayer-scrpage.tex -% - Quellen des Kapitels ueber scrlayer-scrpage in der -% deutschen Anleitung -% scrlayer-scrpage-experts.tex -% - Quellen des Kapitels ueber scrlayer-scrpage im -% Exptertenteil der deutschen Anleitung -% scrlayer-notecolumn.tex -% - Quellen des Kapitels ueber scrlayer-notecolumn in der -% deutschen Anleitung -% scrlayer-notecolumn-example.tex -% - Quellen des Beispiels aus dem Kapitel ueber -% scrlayer-notecolumn in der deutschen Anleitung -% scrlayer.tex - Quellen des Kapitels ueber scrlayer in der -% deutschen Anleitung -% tocbasic.tex - Quellen des Kapitels ueber tocbasic in der deutschen -% Anleitung -% typearea.tex - Quellen des Kapitels ueber typearea in Teil I der -% deutschen Anleitung -% typearea-experts.tex -% - Quellen des Kapitels ueber typearea in Teil II der -% deutschen Anleitung -% -% -% KOMA-Script Source Files: -% ------------------------- -% -% Makefile - Makefile for gnu make (needed by developers) -% Makefile.baseinit - Used by Makefile and Makefiles at subdirectories -% Makefile.baserules - Used by Makefile and Makefiles at subdirectories -% Makefile.cfg - Optional configuration file for make -% -% scrdoc.dtx - Class used by the KOMA-Script dtx files -% koma-script-source-doc.dtx -% - Successor of scrdoc.dtx -% scrkernel-basics.dtx -% - KOMA-Script kernel basics for all packages and classes -% scrkernel-bibliography.dtx -% - KOMA-Script bibliography part of the classes -% scrkernel-floats.dtx -% - KOMA-Script float part of the classes -% scrkernel-fonts.dtx -% - KOMA-Script font part of the classes and packages -% scrkernel-footnotes.dtx -% - KOMA-Script footnote part of the classes and packages -% scrkernel-index.dtx -% - KOMA-Script index part of the classes -% scrkernel-language.dtx -% - KOMA-Script language part of the classes and packages -% scrkernel-listsof.dtx -% - KOMA-Script list of ... part of the classes -% scrkernel-listsandtabulars.dtx -% - KOMA-Script lists part of the classes -% scrkernel-miscellaneous.dtx -% - KOMA-Script other parts of the classes or packages -% scrkernel-pagestyles.dtx -% - KOMA-Script pagestyle part of the classes -% scrkernel-paragraphs.dtx -% - KOMA-Script paragraph settings part of the classes -% scrkernel-sections.dtx -% - KOMA-Script sectioning part of the classes -% scrkernel-title.dtx -% - KOMA-Script title part of the classes -% scrkernel-tocstyle.dtx -% - KOMA-Script TOC file style part of classes and package -% tocbasic -% scrkernel-typearea.dtx -% - KOMA-Script typearea part of the classes and package -% scrkernel-version.dtx -% - KOMA-Script version part of the classes and packages -% scrkernel-addressfiles.dtx -% - KOMA-Script classes and packages address file part -% scrkernel-compatibility.dtx -% - KOMA-Script compatibility modes of the classes -% scrkernel-letterclassoptions.dtx -% - KOMA-Script letter class option part -% japanlco.dtx - KOMA-Script letter class options for Japanese letters -% scrkernel-notepaper.dtx -% - KOMA-Script note paper part of scrlttr2 -% scrkernel-pseudolengths.dtx -% - KOMA-Script pseudo length part of scrlttr2 -% scrkernel-variables.dtx -% - KOMA-Script variables part of scrlttr2 -% scrlogo.dtx - KOMA-Script logo for all classes and packages -% scrhack.dtx - KOMA-Script hacking other packages -% -% scrextend.dtx - KOMA-Script extensions package -% -% tocbasic.dtx - KOMA-Script toc-file package -% -% scrlfile.dtx - KOMA-Script load file package -% scrlfile-hook.dtx - subpackage of scrlfile -% scrlfile-patcholdlatex.dtx -% - subpackage of scrlfile -% -% scrwfile.dtx - KOMA-Script write file package -% -% scraddr.dtx - KOMA-Script scraddr package -% -% scrtime.dtx - KOMA-Script time and date package -% -% scrlayer.dtx - KOMA-Script layer package -% scrlayer-scrpage.dtx -% - KOMA-Script page style package using layers -% scrlayer-notecolumn.dtx -% - KOMA-Script note column package using layers -% -% -% Installation scripts for the various parts: -% ------------------------------------------- -% -% scrdocstrip.tex - Extension of docstrip.tex -% scrmain.ins - Installation script for the main classes and packages -% scrstrip.inc - Include file at the begin of all installation scripts -% scrstrop.inc - incldue file at the end of all installation scripts -% -% ============================================================================ -% -% The following is a machine readable list of all needed files. -% The directories of the files scrguien.pdf, scrguien.html, scrguide.pdf and -% scrguide.html may be changed. -% -README -manifest.txt -INSTALL.txt -INSTALLD.txt -lppl.txt -lppl-de.txt - -scrsource.tex - -doc/Makefile -doc/Makefile.guide -doc/Makefile.latexinit -doc/guide.tex -doc/guide.bib -doc/plength.dtx -doc/scrguide.cls -doc/scrguide.gst -doc/scrguide.ist -doc/linkalias.tex - -doc/scrguien.pdf -doc/scrguien.html - -doc/scrguide.pdf -doc/scrguide.html - -doc/koma-script.html -doc/komascript.html -doc/komascr.html -doc/scraddr.html -doc/scrartcl.html -doc/scrbook.html -doc/scrdate.html -doc/scrlfile.html -doc/scrwfile.html -doc/scrlttr2.html -doc/scrletter.html -doc/scrreprt.html -doc/scrtime.html -doc/typearea.html -doc/tocbasic.html -doc/scrbase.html - -doc/bin/genhtmlidx.pl -doc/bin/genindex.pl - -doc/english/adrconvnote.tex -doc/english/authorpart.tex -doc/english/common-options.tex -doc/english/common-compatibility.tex -doc/english/common-draftmode.tex -doc/english/common-typearea.tex -doc/english/common-fontsize.tex -doc/english/common-textmarkup.tex -doc/english/common-parmarkup.tex -doc/english/common-oddorevenpage.tex -doc/english/common-interleafpage.tex -doc/english/common-footnotes.tex -doc/english/common-lists.tex -doc/english/common-marginpar.tex -doc/english/common-titles.tex -doc/english/common-dictum.tex -doc/english/common-headfootheight.tex -doc/english/common-pagestylemanipulation.tex -doc/english/expertpart.tex -doc/english/guide-english.tex -doc/english/htmlsetup -doc/english/introduction.tex -doc/english/japanlco.tex -doc/english/preface.tex -doc/english/scraddr.tex -doc/english/scrbase.tex -doc/english/scrbookreportarticle.tex -doc/english/scrbookreportarticle-experts.tex -doc/english/scrdatetime.tex -doc/english/scrhack.tex -doc/english/scrlfile.tex -doc/english/scrwfile.tex -doc/english/scrlttr2.tex -doc/english/scrlttr2-experts.tex -doc/english/scrlttr2examples.dtx -doc/english/scrlayer-scrpage.tex -doc/english/scrlayer-scrpage-experts.tex -doc/english/scrlayer.tex -doc/english/scrlayer-notecolumn.tex -doc/english/scrlayer-notecolumn-example.tex -doc/english/tocbasic.tex -doc/english/scrjura.tex -doc/english/scrjuraexample.tex -doc/english/typearea.tex -doc/english/typearea-experts.tex - -doc/ngerman/adrconvnote.tex -doc/ngerman/authorpart.tex -doc/ngerman/common-options.tex -doc/ngerman/common-compatibility.tex -doc/ngerman/common-draftmode.tex -doc/ngerman/common-typearea.tex -doc/ngerman/common-fontsize.tex -doc/ngerman/common-textmarkup.tex -doc/ngerman/common-parmarkup.tex -doc/ngerman/common-oddorevenpage.tex -doc/ngerman/common-interleafpage.tex -doc/ngerman/common-footnotes.tex -doc/ngerman/common-lists.tex -doc/ngerman/common-marginpar.tex -doc/ngerman/common-titles.tex -doc/ngerman/common-dictum.tex -doc/ngerman/common-headfootheight.tex -doc/ngerman/common-pagestylemanipulation.tex -doc/ngerman/expertpart.tex -doc/ngerman/guide-ngerman.tex -doc/ngerman/htmlsetup -doc/ngerman/introduction.tex -doc/ngerman/preface.tex -doc/ngerman/scraddr.tex -doc/ngerman/scrbase.tex -doc/ngerman/scrbookreportarticle.tex -doc/ngerman/scrbookreportarticle-experts.tex -doc/ngerman/scrdatetime.tex -doc/ngerman/scrhack.tex -doc/ngerman/scrlfile.tex -doc/ngerman/scrwfile.tex -doc/ngerman/scrlttr2.tex -doc/ngerman/scrlttr2-experts.tex -doc/ngerman/scrlttr2examples.dtx -doc/ngerman/scrlayer-scrpage.tex -doc/ngerman/scrlayer-scrpage-experts.tex -doc/ngerman/scrlayer.tex -doc/ngerman/scrlayer-notecolumn.tex -doc/ngerman/scrlayer-notecolumn-example.tex -doc/ngerman/tocbasic.tex -doc/ngerman/scrjura.tex -doc/ngerman/scrjuraexample.tex -doc/ngerman/typearea.tex -doc/ngerman/typearea-experts.tex - -Makefile -Makefile.baseinit -Makefile.baserules - -scrdoc.dtx -koma-script-source-doc.dtx -scrkernel-basics.dtx -scrkernel-bibliography.dtx -scrkernel-floats.dtx -scrkernel-fonts.dtx -scrkernel-footnotes.dtx -scrkernel-index.dtx -scrkernel-language.dtx -scrkernel-listsof.dtx -scrkernel-listsandtabulars.dtx -scrkernel-miscellaneous.dtx -scrkernel-pagestyles.dtx -scrkernel-paragraphs.dtx -scrkernel-sections.dtx -scrkernel-title.dtx -scrkernel-tocstyle.dtx -scrkernel-typearea.dtx -scrkernel-version.dtx -scrkernel-addressfiles.dtx -scrkernel-compatibility.dtx -scrkernel-letterclassoptions.dtx -japanlco.dtx -scrkernel-notepaper.dtx -scrkernel-pseudolengths.dtx -scrkernel-variables.dtx -scrlogo.dtx -scrhack.dtx - -scrextend.dtx - -tocbasic.dtx - -scrlfile.dtx -scrlfile-hook.dtx -scrlfile-patcholdlatex.dtx - -scrwfile.dtx - -scraddr.dtx - -scrtime.dtx - -scrlayer.dtx -scrlayer-scrpage.dtx -scrlayer-notecolumn.dtx - -scrdocstrip.tex -scrmain.ins -scrstrip.inc -scrstrop.inc diff --git a/macros/latex/contrib/koma-script/doc/plength-tikz.tex b/macros/latex/contrib/koma-script/doc/plength-tikz.tex new file mode 100644 index 0000000000..73a77dfbdf --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/plength-tikz.tex @@ -0,0 +1,339 @@ +% ====================================================================== +% plength-tikz.tex +% Copyright (c) Markus Kohm, 2005-2022 +% +% 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.md. +% ---------------------------------------------------------------------- +% +% Generation of plength figures at scrlttr2 chapter of the KOMA-Script +% guide +% +% Maintained by Markus Kohm +% Original metapost source by Stephan Hennig +% Original TikZ source by Marei Peischl +% +% ====================================================================== + +\KOMAProvidesFile{plength-tikz.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (figure in scrlttr2.tex)] + +\ExplSyntaxOn +\prop_if_exist:NF \l_this_plength_description_prop { + \prop_new:N \l_this_plength_description_prop +} +\prop_set_from_keyval:Nn \l_this_plength_description_prop { + firsthead=\letterheadname, + firstfoot=\letterfootname, + backaddress=\backaddressname, + specialmail=\specialmailname, + toaddr=\toaddrname, + refline=\reflinename, + title=\titlename, + subject=\subjectname, + opening=\openingname, + body=\letterbodyname, + closing=\closingname, + signature=\signaturename, + location=\begin{tabular}{@{}c@{}}\locationname\end{tabular}, +} + +\prop_if_exist:NF \l_this_plength_var_prop { + \prop_new:N \l_this_plength_var_prop +} + +\prop_set_from_keyval:Nn \l_this_plength_var_prop { + ticksize=1, + textwidth= 147, + textheight= 209.4, + evensidemargin= 6.1, + oddsidemargin = 6.1, + paperwidth = 210, + paperheight = 297, + baselineskip = .9\baselineskip,% 3.86607, + headheight = 6, + headsep =7.2, + footskip =16.73, + foldmarkhpos = 3.5, + tfoldmarkvpos = 105, + bfoldmarkvpos = 210, + tfoldmarklength = 2, + pfoldmarklength = 4, + bfoldmarklength = 2, + toaddrvpos = 45, + refvpos = 98.5, + refaftervskip = \UseVar{baselineskip}, + toaddrhpos = 20, + toaddrwidth = 85, + toaddrheight = 40, + toaddrindent = 6, + specialmailwidth = 50, + specialmailrightindent = 4, + specialmailheight = \UseVar{baselineskip}, + locwidth = 37.5, + backaddrheight = 5, + firstheadvpos = 8, + firstheadwidth = \UseVar{paperwidth} - 2 * \UseVar{toaddrhpos}, + firstfootwidth = \UseVar{firstheadwidth}, + firstfootvpos = 16.58 + \UseVar{headheight} + \UseVar{headsep} + \UseVar{textheight} + \UseVar{footskip}, + refwidth = 0, + sigindent = 0, + toaddrindent =0, + sigbeforevskip = 2*\UseVar{baselineskip}, + firstheadhpos = 0.5* \UseVar{paperwidth}-.5*\UseVar{firstheadwidth}, + firstheadheight = 5*\UseVar{baselineskip}, + firstfoothpos = 0.5*(\UseVar{paperwidth}-\UseVar{firstfootwidth}), + firstfootheight = 3*\UseVar{baselineskip}, + fromrulewidth = 0.5 * \UseVar{firstheadwidth}, + lochpos = \UseVar{paperwidth}-\UseVar{toaddrhpos}-\UseVar{locwidth}, + refhpos = 25.40+\UseVar{oddsidemargin}, + text = \UseVar{refhpos}, + textcenter = \UseVar{refhpos}+0.5*\UseVar{textwidth}, + refheight = 2*\UseVar{baselineskip}, + refwidth = \UseVar{textwidth}, + titlevpos = \UseVar{refvpos}+\UseVar{refheight}+\UseVar{refaftervskip}, + titlewidth = 90, + titleheight = 1.2*\UseVar{baselineskip}, + subjectvpos = \UseVar{titlevpos}+\UseVar{titleheight}+1*\UseVar{baselineskip}, + subjectwidth = 80, + subjectheight = \UseVar{baselineskip}, + openingvpos = \UseVar{subjectvpos}+\UseVar{subjectheight}+2*\UseVar{baselineskip}, + openingwidth = 60, + openingheight = \UseVar{baselineskip}, + bodyvpos = \UseVar{openingvpos}+\UseVar{openingheight}+\UseVar{baselineskip}, + bodywidth = \UseVar{textwidth}, + bodyheight = 6*\UseVar{baselineskip}, + typeareabottom = \UseVar{firstfootvpos}-\UseVar{footskip}, + sigvpos = \UseVar{bodyvpos}+\UseVar{bodyheight}+\UseVar{baselineskip}, + sigwidth = 50, + sigheight = \UseVar{baselineskip}, + locvpos = \UseVar{toaddrvpos}, + locheight = \UseVar{toaddrheight}, + sigindent = 10, + toaddrindent = 7, +} +\def\UseVar#1{ + \fp_eval:n {\prop_item:Nn \l_this_plength_var_prop {#1}} +} + +\def\UseDesc#1{ + \desc + \prop_item:Nn \l_this_plength_description_prop {#1} +} + +\ExplSyntaxOff + +\def\desc{\itshape} + +\providecommand*{\Multi}[1]{% + {\def\and{, }% + \begin{tabular}{@{}l@{}} + #1 + \end{tabular} + }% +} + +\pgfarrowsdeclare{measure}{measure} +{ + \arrowsize=\pgflinewidth + \pgfarrowsleftextend{0\arrowsize} + \pgfarrowsrightextend{5\arrowsize} +}{ + \arrowsize=\pgflinewidth + \pgfsetdash{}{0pt} + \pgfsetlinewidth{.5\arrowsize} + \pgfpathmoveto{\pgfpoint{4.75\arrowsize}{7\arrowsize}} + \pgfpathlineto{\pgfpoint{4.75\arrowsize}{-7\arrowsize}} + \pgfusepathqstroke + \pgfsetlinewidth{0.01pt} + \pgfpathmoveto{\pgfpoint{4.5\arrowsize}{0pt}} + \pgfpathlineto{\pgfpoint{-.5\arrowsize}{2\arrowsize}} + \pgfpathlineto{\pgfpoint{-.5\arrowsize}{-2\arrowsize}} + \pgfpathclose + \pgfusepathqfillstroke +} + +\pgfdeclaredecoration{vmeasure}{measure begin}{% + \state{measure begin}[ + width={\pgfmetadecoratedpathlength - \pgfdecorationsegmentlength}, + next state=measure end, + ] + { + \pgfpathmoveto{\pgfqpoint{\dimexpr\pgfmetadecoratedpathlength - \pgfdecorationsegmentlength}{0pt}} + }% + \state{measure end}[width=0pt, next state=final]{ + \pgfpathlineto{\pgfpointorigin} + }% + \state{final} + { + \pgfpathlineto{\pgfpointdecoratedpathlast} + }% +}% + +\tikzset{ + measure/.style={arrows=measure-measure,every node/.append style={font=\sffamily\strut}}, + top hmeasure/.style={measure, + yshift=7\pgflinewidth, + every node/.append style={yshift=10\pgflinewidth}, + }, + bottom hmeasure/.style={measure,every node/.append style={below},yshift=-7\pgflinewidth,}, + left double vmeasure/.style={ + measure, + xshift=-7\pgflinewidth, + every node/.append style={rotate=90,above,}, + }, + right double vmeasure/.style={ + measure, + xshift=7\pgflinewidth, + every node/.append style={rotate=90,below}, + }, + right vmeasure/.style={ + measure, + xshift=7\pgflinewidth, + arrows=-measure, + decoration={vmeasure,post length=14\pgflinewidth,segment length=20\pgflinewidth},decorate, + every node/.append style={above=7\pgflinewidth}, + }, + left vmeasure/.style={ + measure, + xshift=-7\pgflinewidth, + arrows=-measure, + decoration={vmeasure,post length=14\pgflinewidth,segment length=20\pgflinewidth},decorate, + every node/.append style={above=14\pgflinewidth}, + }, + hmeasure/.style={yshift=7\pgflinewidth}, + measure right/.style={xshift=7\pgflinewidth}, + measure left/.style={xshift=-7\pgflinewidth} +} + +\begin{tikzpicture}[fill=black!20] + \draw (0,0)rectangle (\UseVar{paperwidth},\UseVar{paperheight}); + + \filldraw(\UseVar{firstheadhpos},\UseVar{firstheadvpos})rectangle node{\UseDesc{firsthead}}+(\UseVar{firstheadwidth},\UseVar{firstheadheight}); + + \filldraw(\UseVar{toaddrhpos},\UseVar{toaddrvpos}) rectangle + node {\UseDesc{backaddress}} + +(\UseVar{toaddrwidth},\UseVar{backaddrheight}); + + \filldraw(\UseVar{toaddrhpos}+.5*\UseVar{toaddrwidth}-\UseVar{specialmailrightindent},\UseVar{toaddrvpos}+\UseVar{backaddrheight}) rectangle + node {\UseDesc{specialmail}} + +(.5*\UseVar{toaddrwidth},\UseVar{specialmailheight}); + + \filldraw(\UseVar{toaddrhpos}+\UseVar{toaddrindent},\UseVar{toaddrvpos}+\UseVar{backaddrheight}+\UseVar{specialmailheight}) + rectangle node {\UseDesc{toaddr}} + +(\UseVar{toaddrwidth}-2*\UseVar{toaddrindent},\UseVar{toaddrheight}-\UseVar{backaddrheight}-\UseVar{specialmailheight}); + + \draw(\UseVar{toaddrhpos},\UseVar{toaddrvpos})rectangle+(\UseVar{toaddrwidth},\UseVar{toaddrheight}); + + \filldraw (\UseVar{refhpos},\UseVar{refvpos})rectangle node{\UseDesc{refline}} + +(\UseVar{refwidth},\UseVar{refheight}); + + \filldraw (\UseVar{textcenter}-.5*\UseVar{titlewidth},\UseVar{titlevpos})rectangle node{\UseDesc{title}} + +(\UseVar{titlewidth},\UseVar{titleheight}); + + \filldraw (\UseVar{text},\UseVar{subjectvpos})rectangle node{\UseDesc{subject}} + +(\UseVar{subjectwidth},\UseVar{subjectheight}); + + \filldraw (\UseVar{text},\UseVar{openingvpos})rectangle node{\UseDesc{opening}} + +(\UseVar{openingwidth},\UseVar{openingheight}); + + \filldraw (\UseVar{text},\UseVar{bodyvpos})rectangle node{\UseDesc{body}} + +(\UseVar{bodywidth},\UseVar{bodyheight}); + + \filldraw (\UseVar{text}+\UseVar{sigindent},\UseVar{sigvpos})rectangle node{\UseDesc{closing}} + +(\UseVar{sigwidth},\UseVar{sigheight}); + + \filldraw (\UseVar{text}+\UseVar{sigindent}+.1*\UseVar{sigwidth},\UseVar{sigvpos}+\UseVar{sigheight}+\UseVar{sigbeforevskip})rectangle node{\UseDesc{signature}} + +(.8*\UseVar{sigwidth},\UseVar{sigheight}); + + \filldraw (\UseVar{lochpos},\UseVar{locvpos}) rectangle node{\UseDesc{location}}+(\UseVar{locwidth},\UseVar{locheight}); + + \filldraw (\UseVar{firstfoothpos},\UseVar{firstfootvpos}) rectangle node{\UseDesc{firstfoot}} +(\UseVar{firstfootwidth},\UseVar{firstfootheight}); + + \draw[thick] (\UseVar{foldmarkhpos},\UseVar{tfoldmarkvpos}) --+(\UseVar{tfoldmarklength},0); + \draw[thick] (\UseVar{foldmarkhpos},.5*\UseVar{paperheight}) --+(\UseVar{pfoldmarklength},0); + \draw[thick] (\UseVar{foldmarkhpos},\UseVar{bfoldmarkvpos}) --+(\UseVar{bfoldmarklength},0); + %%%%%%%%%%%%%%%%%%%%%%%% + \draw (\UseVar{text}+\UseVar{sigindent},\UseVar{sigvpos})rectangle +(\UseVar{sigwidth},2*\UseVar{sigheight}+\UseVar{sigbeforevskip}); + + \draw (\UseVar{text},\UseVar{titlevpos})rectangle (\UseVar{text}+\UseVar{textwidth},\UseVar{firstfootvpos}-\UseVar{footskip}) + -- +(.5*\UseVar{firstfootwidth}-.5*\UseVar{textwidth},0); + %%%%%%%%%%%%%%%%%%%%%%%% + + \draw[right vmeasure] (\UseVar{foldmarkhpos}+\UseVar{tfoldmarklength},0)--++(0,\UseVar{tfoldmarkvpos})+(0,\UseVar{ticksize})node[anchor=150]{\DescRef{scrlttr2.plength.tfoldmarkvpos}}; + \draw[right vmeasure] (\UseVar{foldmarkhpos}+\UseVar{bfoldmarklength},0)--++(0,\UseVar{bfoldmarkvpos})+(0,-\UseVar{ticksize})node[anchor=-150]{\DescRef{scrlttr2.plength.bfoldmarkvpos}}; + + \draw[top hmeasure] (0,\UseVar{firstheadvpos}) node[right]{\DescRef{scrlttr2.plength.firstheadhpos}} -- +(\UseVar{firstheadhpos},0); + \draw[top hmeasure] (\UseVar{firstheadhpos},\UseVar{firstheadvpos})-- node{\DescRef{scrlttr2.plength.firstheadwidth}} +(\UseVar{firstheadwidth},0); + \draw[right vmeasure] (\UseVar{paperwidth}-\UseVar{firstheadhpos},0)--node[near end,anchor=base east]{\DescRef{scrlttr2.plength.firstheadvpos}}+(0,\UseVar{firstheadvpos}); + + \draw[right vmeasure] (\UseVar{toaddrhpos}+\UseVar{toaddrwidth},0)--+(0,\UseVar{toaddrvpos})node{\DescRef{scrlttr2.plength.toaddrvpos}}; + \draw[right double vmeasure] (\UseVar{toaddrhpos}+\UseVar{toaddrwidth},\UseVar{toaddrvpos}) -- node[rotate=-90,right]{\DescRef{scrlttr2.plength.backaddrheight}} +(0,\UseVar{backaddrheight}); + \draw[top hmeasure] (0,\UseVar{toaddrvpos}) node[right]{\DescRef{scrlttr2.plength.toaddrhpos}} --+(\UseVar{toaddrhpos},0); + \draw[top hmeasure] (\UseVar{toaddrhpos},\UseVar{toaddrvpos})-- node{\DescRef{scrlttr2.plength.toaddrwidth}} +(\UseVar{toaddrwidth},0); + \draw[measure] (\UseVar{toaddrhpos}+\UseVar{toaddrwidth},\UseVar{toaddrvpos}+1.5*\UseVar{backaddrheight})node[right] {\DescRef{scrlttr2.plength.specialmailindent}} --+(-\UseVar{specialmailrightindent},0); + \draw[top hmeasure] (\UseVar{toaddrhpos},\UseVar{toaddrvpos}+\UseVar{toaddrheight})-- +(\UseVar{toaddrindent},0) node[right]{\DescRef{scrlttr2.plength.toaddrindent}}; + \draw[top hmeasure] (\UseVar{toaddrhpos}+\UseVar{toaddrwidth},\UseVar{toaddrvpos}+\UseVar{toaddrheight}) --+ (-\UseVar{toaddrindent},0) node[left]{\DescRef{scrlttr2.plength.toaddrindent}}; + \draw[left double vmeasure] (\UseVar{toaddrhpos},\UseVar{toaddrvpos})-- + node{\DescRef{scrlttr2.plength.toaddrheight}} + +(0,\UseVar{toaddrheight}); + + \draw[right double vmeasure] (\UseVar{lochpos}+\UseVar{locwidth},\UseVar{locvpos})--node{\DescRef{scrlttr2.plength.locheight}}+(0,\UseVar{locheight}); + \draw[left vmeasure] (\UseVar{lochpos},0)--+(0,\UseVar{locvpos})node{\DescRef{scrlttr2.plength.locvpos}}; + \draw[top hmeasure] (\UseVar{lochpos}+\UseVar{locwidth},\UseVar{locvpos})-- node{\DescRef{scrlttr2.plength.lochpos}} (\UseVar{paperwidth},\UseVar{locvpos}); + \draw[top hmeasure] (\UseVar{lochpos},\UseVar{locvpos})-- node{\DescRef{scrlttr2.plength.locwidth}} +(\UseVar{locwidth},0); + + \draw[right vmeasure] (\UseVar{refhpos}+\UseVar{refwidth},0)--+(0,\UseVar{refvpos})node[above=\baselineskip]{\DescRef{scrlttr2.plength.refvpos}}; + \draw[top hmeasure](0,\UseVar{refvpos})--node{\DescRef{scrlttr2.plength.refhpos}}+(\UseVar{refhpos},0); + \draw[top hmeasure](\UseVar{refhpos},\UseVar{refvpos})--node{\DescRef{scrlttr2.plength.refwidth}}+(\UseVar{refwidth},0); + + \draw[right double vmeasure] (\UseVar{refhpos}+\UseVar{refwidth},\UseVar{refvpos}+\UseVar{refheight})-- + node[rotate=-90,right]{\DescRef{scrlttr2.plength.refaftervskip}} + +(0,\UseVar{refaftervskip}); + + \draw[right double vmeasure] (\UseVar{text}+\UseVar{openingwidth},\UseVar{titlevpos}+\UseVar{titleheight})-- + node[rotate=-90,right]{\Length{baselineskip}+\DescRef{scrlttr2.plength.subjectbeforevskip}} + (\UseVar{text}+\UseVar{openingwidth},\UseVar{subjectvpos}); + + \draw[right double vmeasure] (\UseVar{text}+\UseVar{openingwidth},\UseVar{subjectvpos}+\UseVar{subjectheight})-- + node[rotate=-90,right]{\DescRef{scrlttr2.plength.subjectaftervskip}} + (\UseVar{text}+\UseVar{openingwidth},\UseVar{openingvpos}); + + \draw[right double vmeasure] (\UseVar{text}+\UseVar{openingwidth},\UseVar{openingvpos}+\UseVar{openingheight})-- + node[rotate=-90,right]{\Length{baselineskip}} + (\UseVar{text}+\UseVar{openingwidth},\UseVar{bodyvpos}); + + \draw[right double vmeasure] (\UseVar{text}+\UseVar{openingwidth},\UseVar{bodyvpos}+\UseVar{bodyheight})-- + node[rotate=-90,right]{\Length{baselineskip}} + (\UseVar{text}+\UseVar{openingwidth},\UseVar{sigvpos}); + + \draw[bottom hmeasure](\UseVar{text},\UseVar{firstfootvpos}-\UseVar{footskip})--node{\Length{textwidth}} +(\UseVar{textwidth},0); + + \draw[left double vmeasure] (\UseVar{text}+1.5*\UseVar{sigindent},\UseVar{sigvpos}+\UseVar{sigheight})--node[rotate=-90,right]{\DescRef{scrlttr2.plength.sigbeforevskip}} + +(0,\UseVar{sigbeforevskip}); + + \draw[left vmeasure] (\UseVar{firstfoothpos},0)--+(0,\UseVar{firstfootvpos})node{\DescRef{scrlttr2.plength.firstfootvpos}}; + \draw[top hmeasure] (\UseVar{firstfoothpos},\UseVar{firstfootvpos}) -- node{\DescRef{scrlttr2.plength.firstfootwidth}} +(\UseVar{firstfootwidth},0); + \draw[bottom hmeasure] (0,\UseVar{firstfootvpos}+\UseVar{firstfootheight}) node[below right]{\DescRef{scrlttr2.plength.firstfoothpos}} -- +(\UseVar{firstfoothpos},0); + \draw[right double vmeasure] (\UseVar{firstfoothpos}+\UseVar{firstfootwidth},\UseVar{firstfootvpos}) -- node{$\geq$ \Length{footskip}} +(0,-\UseVar{footskip}); +\end{tikzpicture} + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% coding: utf-8 +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/preface-de.tex b/macros/latex/contrib/koma-script/doc/preface-de.tex new file mode 100644 index 0000000000..4d044a1d15 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/preface-de.tex @@ -0,0 +1,106 @@ +% ====================================================================== +% preface-de.tex +% Copyright (c) Markus Kohm, 2008-2022 +% +% 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.md. +% ====================================================================== + +\KOMAProvidesFile{preface-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + preface to a dedicated version] + +\addchap{Vorwort zu \KOMAScript~3.36 und 3.37} + +Mit \KOMAScript~3.36 wurde eine Phase größerer Umbauten an den Quellen von +\KOMAScript{} eingeläutet. Begonnen wurde mit den Quellen der Klassen und +Pakete. Dabei wurde nicht nur eine Umstellung auf Version~3 des Pakets +\Package{doc} durchgeführt. Die ursprüngliche Quellcode-Dokumentationsklasse +\Class{scrdoc} wurde auch obsolet und durch \Class{koma-script-source-doc} +ersetzt. Die komplette Dokumentation des Quellcodes wurde außerdem ins +Englische übertrage oder in Englisch neu erstellt. Im Zuge dieser Änderung +wurden die Quellen teilweise auch innerhalb der Dateien umorganisiert oder in +neue Dateien verschoben. Dabei entstand viele Dutzend neue Anmerkungen über +unerledigte Aufgaben. Ob ich die jemals alle selbst abarbeiten +kann, sei dahingestellt. + +Durch die massiven Umbauten an den Quellen war von vornherein leider nicht +auszuschließen, dass sich neue Fehler einschleichen. Aufgrund des akuten +Mangels an Beta-Testern hat sich diese Befürchtung leider bewahrheitet. Ob all +diese Fehler inzwischen beseitigt sind, ist schwer zu sagen. + +Mehr oder weniger nebenbei wurde eine neue, auf \Package{l3build} basierende +Teststruktur aufgebaut. Damit soll zukünftig sichergestellt werden, dass +einmal gemeldete Fehler künftig nicht wieder auftreten. + +Mit \KOMAScript~3.37 wurde begonnen, die Quellen der Anleitung zu +restrukturieren. Für die Erzeugung der Deutschen und Englischen +Benutzeranleitung einschließlich der vollständigen Beispiele mit PDF wird nun +ebenfalls \Package{l3build} verwendet. Außerdem wird eine flache Hierarchie +für die Anleitungen in allen Sprachen verwendet. Es gibt dadurch in den +Quellen keine unterschiedlichen Dateien mit demselben Dateinamen +mehr. Dadurch sollen nicht nur Anforderungen von CTAN befriedigt werden. Damit +ist es auch erstmals seit langem wieder möglich, aus den CTAN-Quellen von +\KOMAScript{} selbst die Anleitungen zu erzeugen. + +Aufgrund der bereits im Vorwort zu \KOMAScript~3.28 erklärten Probleme mit der +Endlichkeit der Zeit eines einzelnen Entwicklers, werde ich mich auch in +Zukunft weiterhin auf die Fehlerbehebung, die notwendige Reorganisation der +Quellen und die Kompatibilität mit neuen \LaTeX-Kernel-Versionen +konzentrieren. Vor allem bei letzterem steht mir inzwischen auch Marei +Peischl zur Seite, die eigentlich mit eigenen Projekten bereits sehr gut +ausgelastet ist. Von ihr stammt auch der ursprüngliche Code für die +Abbildungen zu Pseudolängen und Variablen, für den ich mich recht herzlich +bedanke. Damit war es mir endlich möglich, einem lange gehegten Wunsch vieler +Anwender nachzukommen. Mit wenigen Änderungen sind die Pseudolängen in der +Abbildung nun mit den zugehörigen Erklärungen im Text verlinkt. + +Durch den weitgehenden Verzicht auf neue Funktionen schwindet natürlich auch +der Aufwand für die Dokumentation derselben. Leser dieser freien +Bildschirm-Version der Anleitung müssen aber auch weiterhin mit gewissen +Einschränkungen leben. So sind einige Informationen -- hauptsächliche solche +für fortgeschrittene Anwender oder die dazu geeignet sind, aus einem Anwender +einen fortgeschrittenen Anwender zu machen -- der Buchfassung vorbehalten. Das +führt auch dazu, dass weiterhin einige Links in dieser Anleitung lediglich zu +einer Seite führen, auf der genau diese Tatsache erwähnt ist. Darüber hinaus +ist die freie Version nur eingeschränkt zum Ausdruck geeignet. Der Fokus liegt +vielmehr auf der Verwendung am Bildschirm parallel zur Arbeit an einem +Dokument. Sie hat auch weiterhin keinen optimierten Umbruch, sondern ist quasi +ein erster Entwurf, bei dem Absatz- und Seitenumbruch in einigen Fällen +durchaus dürftig sind. Entsprechende Optimierungen bleiben den Buchausgaben +vorbehalten. + +Mein Dank geht hauptsächlich an meine Familie und allen voran an meine +Frau. Sie federn all meine unschönen Erfahrungen im Internet ab. Ebenso +erdulden sie seit teilweise mehr als 25~Jahren, wenn ich wieder einmal nicht +ansprechbar bin, weil ich ganz und gar in \KOMAScript{} oder irgendwelche +\LaTeX-Probleme vertieft bin. Dass ich es mir leisten kann, überhaupt geradezu +wahnsinnig viel Zeit in ein derartiges Projekt zu investieren, ist allein +meiner Frau zu verdanken. + +\bigskip\noindent +Markus Kohm, Neckarhausen im Mai 2022 +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Dokumentationsklasse Teststruktur Benutzeranleitung +% LocalWords: Pseudolängen Buchausgaben diff --git a/macros/latex/contrib/koma-script/doc/preface-en.tex b/macros/latex/contrib/koma-script/doc/preface-en.tex new file mode 100644 index 0000000000..180a1c61a4 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/preface-en.tex @@ -0,0 +1,101 @@ +% ====================================================================== +% preface-en.tex +% Copyright (c) Markus Kohm, 2008-2022 +% +% 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.md. +% ====================================================================== + +\KOMAProvidesFile{preface-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + preface to dedicated version] +\translator{Markus Kohm\and Karl Hagen\and DeepL} + +\addchap{Preface to \KOMAScript~3.36 and 3.37} + +With \KOMAScript~3.36 a phase of major rebuilds of the sources of +\KOMAScript{} was initiated. It started with the sources of the classes and +packages. Not only a conversion to version~3 of the package \Package{doc} was +done. The original source code documentation class \Class{scrdoc} was also +made obsolete and replaced by \Class{koma-script-source-doc}. The complete +source code documentation was also transferred to English or recreated in +English. In the course of this change, some of the sources were also +reorganized within the files or moved to new files. In the process, many +dozens of new notes about undone tasks were added. Whether I will ever be able +to work through all of them myself remains to be seen. + +Due to the massive modifications to the sources, it could not be ruled out +from the outset that new errors could creep in. Due to the acute shortage of +beta testers, this fear has unfortunately come true. Whether all these bugs +have been fixed in the meantime is hard to say. + +More or less in parallel, a new test structure based on \Package{l3build} was +built. This should ensure in the future that once reported errors do not occur +again in the future. + +With \KOMAScript~3.37 I started to restructure the sources of the manual. For +the generation of the German and English user manual including the complete +examples with PDF now also \Package{l3build} is used. In addition, a flat +hierarchy is used for the user guides in all languages. Thus there are no +different files with the same filename in the sources anymore. This is not +only to satisfy CTAN requirements. With this it is also possible for the first +time in a long time to generate the manuals from the CTAN sources of +\KOMAScript. + +Due to the problems with the finiteness of a single developer's time already +explained in the preface to \KOMAScript~3.28, I will therefore continue to +concentrate on bug fixing, the necessary reorganisation of the sources and +compatibility with new \LaTeX{} kernel versions in the future. Especially with +the latter, I now have the support of Marei Peischl, who is already very busy +with her own projects. She also wrote the original code for the illustrations +of pseudo-lengths and variables, for which I thank her very much. This finally +made it possible for me to fulfil a long-cherished wish of many users. With a +few changes, the pseudo lengths in the illustration are now linked to the +corresponding explanations in the text. + + +By largely abstaining from new functions, the effort for documenting them +naturally also dwindles. Readers of this free, screen version, however, still +have to live with some restrictions. So some information\,---\,mainly intended +for advanced users or capable of turning an ordinary user into an advanced +one\,---\,is reserved for the printed book, which currently exists only in +German. As a result, some links in this manual lead to a page that simply +mentions this fact. In addition, the free version is scarcely suitable for +making a hard-copy. The focus, instead, is on using it on screen, in parallel +with the document you are working on. It still has no optimized wrapping but +is almost a first draft, in which both the paragraph and page breaks are in +some cases quite poor. Corresponding optimizations are reserved for the German +book editions. + + +The biggest thanks go to my family and above all to my wife. They absorb all +my unpleasant experiences on the Internet. They have also tolerated it for +more than 25~years, when I am again not approachable, because I am completely +lost in \KOMAScript{} or some \LaTeX{} problems. The fact that I can afford to +invest an incredible amount of time in such a project is entirely thanks to my +wife. + +\bigskip\noindent +Markus Kohm, Neckarhausen in May 2022. + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scraddr-de.tex b/macros/latex/contrib/koma-script/doc/scraddr-de.tex new file mode 100644 index 0000000000..36a5a88e06 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scraddr-de.tex @@ -0,0 +1,266 @@ +% ====================================================================== +% scraddr-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scraddr of the KOMA-Script guide +% Maintained by Jens-Uwe Morawski (with help from Markus Kohm) +% +% ====================================================================== + +\KOMAProvidesFile{scraddr-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scraddr)] + +\chapter{Adressdateien mit \Package{scraddr} erschließen}% +\labelbase{scraddr}% +\BeginIndexGroup +\BeginIndex{Package}{scraddr} + +Das Paket \Package{scraddr} ist eine kleine Beigabe zur Briefklasse und zum +Briefpaket von \KOMAScript. Ziel ist, die Benutzung von Adressdateien zu +vereinfachen und ihre Anwendung flexibler zu gestalten. + +\section{Befehle} +\seclabel{overview} + +Im Grunde stellt das Paket nur einen Lademechanismus für Adressdateien bereit, +die aus \DescRef{\LabelBase.cmd.adrentry}- und +\DescRef{\LabelBase.cmd.adrchar}- oder den neueren +\DescRef{\LabelBase.cmd.addrentry}- und +\DescRef{\LabelBase.cmd.addrchar}-Einträgen bestehen, wie sie in +\autoref{cha:scrlttr2} ab \DescPageRef{scrlttr2.cmd.adrentry} beschrieben +sind. + + +\begin{Declaration} +\Macro{InputAddressFile}\Parameter{Dateiname} +\end{Declaration}% +Der Befehl \Macro{InputAddressFile} ist der zentrale Ladebefehl +von \Package{scraddr}. +Er erwartet als obligatorisches Argument den +Namen der einzulesenden Adressdatei.\Index{Adressdatei} +Wird diese Datei nicht gefunden, wird ein Fehler ausgegeben. + +Für jeden Eintrag dieser Adressdatei wird eine Reihe von Makros generiert, +die es ermöglichen, auf die Daten der Adressdatei zuzugreifen. Es soll an +dieser Stelle nicht verschwiegen werden, dass dies bei großen Adressdateien +sehr viel \TeX-Speicher kostet. +% +\EndIndexGroup + +\begin{Declaration}% + \Macro{adrentry}\Parameter{Name}\Parameter{Vorname}\Parameter{Adresse} + \Parameter{Tel.}\Parameter{F1}\Parameter{F2} + \Parameter{Kommentar}\Parameter{Kürzel} + \Macro{addrentry}\Parameter{Name}\Parameter{Vorname}\Parameter{Adresse} + \Parameter{Tel.}\Parameter{F1}\Parameter{F2} + \Parameter{F3}\Parameter{F4} + \Parameter{Kürzel} + \Macro{adrchar}\Parameter{Anfangsbuchstaben} + \Macro{addrchar}\Parameter{Anfangsbuchstaben} +\end{Declaration}% +Der Aufbau der Adresseinträge in der Adressdatei wurde in +\autoref{sec:scrlttr2.addressFile} ab +\DescPageRef{scrlttr2.cmd.adrentry} ausführlich besprochen. Die +ebenfalls dort erwähnte Unterteilung der Adressdatei mit Hilfe von +\Macro{adrchar} oder \Macro{addrchar} hat für \Package{scraddr} keine +Bedeutung und wird vom Paket ignoriert.% +\EndIndexGroup + +\begin{Declaration} + \Macro{Name}\Parameter{Kürzel} + \Macro{FirstName}\Parameter{Kürzel} + \Macro{LastName}\Parameter{Kürzel} + \Macro{Address}\Parameter{Kürzel} + \Macro{Telephone}\Parameter{Kürzel} + \Macro{FreeI}\Parameter{Kürzel} + \Macro{FreeII}\Parameter{Kürzel} + \Macro{Comment}\Parameter{Kürzel} + \Macro{FreeIII}\Parameter{Kürzel} + \Macro{FreeIV}\Parameter{Kürzel} +\end{Declaration}% +Die englischen Namen der Zugriffsbefehle folgen den Bezeichnungen der +Argumente von \DescRef{\LabelBase.cmd.adrentry} und +\DescRef{\LabelBase.cmd.addrentry}. Die Auswahl des Adresseintrags erfolgt +anhand des Kürzels im letzten Argument eines Eintrags, das heißt Argument +Nummer 8 für \DescRef{\LabelBase.cmd.adrentry}-Einträge beziehungsweise +Argument Nummer 9 für \DescRef{\LabelBase.cmd.addrentry}-Einträge. Das +bedeutet auch, dass dieses Argument nicht leer sein darf. Um eine sichere +Funktionsweise zu garantieren, empfiehlt es sich, das Kürzel nur als Folge von +Buchstaben aufzubauen, wobei jedoch keine Umlaute benutzt werden dürfen. + +Weiterhin ist zu beachten, dass bei mehrmaligem Auf"|treten +eines Kürzels in den Einträgen die Angaben beim +letzten Auf"|treten die gültigen sind.% +% +\EndIndexGroup + + +\section{Anwendung}\seclabel{usage} + +\BeginIndexGroup +\BeginIndex[indexother]{Cmd}{addrentry}% +\BeginIndex[indexother]{Cmd}{adrentry}% +Um das Paket benutzen zu können, ist eine gültige +Adressdatei zu erstellen. +Diese, hier \File{lotr.adr} genannt, könnte beispielsweise +folgendermaßen aussehen: +\begin{lstcode} + \addrentry{Beutlin}{Frodo}% + {Der Bühl\\ Beutelsend/Hobbingen im Auenland}{}% + {Bilbo Beutlin}{Rauchen von Pfeifenkraut}% + {der Ringträger}{Bilbos Erbe}{FRODO} + \adrentry{Gamdschie}{Samweis}% + {Beutelhaldenweg 3\\Hobbingen im Auenland}{}% + {Rosie Kattun}{Knullen}% + {des Ringträgers treuester Gefährte}{SAM} + \adrentry{Bombadil}{Tom}% + {Im Alten Wald}{}% + {Goldbeere}{trällern von Nonsensliedern}% + {Meister von Wald, Wasser und Berg}{TOM} +\end{lstcode} +% +Das vierte Argument, die Telefonnummer, wurde hier leer gelassen, da es in +Auenland keine Telefone gibt. % +\iffalse % Umbruchkorrektur +Wie zu sehen ist, sind also auch leere Angaben möglich. Dagegen ist % +\else% +Dagegen wäre % +\fi% +es nicht erlaubt,\nopagebreak{} ein Argument einfach komplett weg zu lassen. + +Mit dem oben beschriebenen Ladebefehl lesen wir die Adressdatei in unser +Briefdokument ein:\IndexCmd{InputAddressFile} +\begin{lstcode} + \InputAddressFile{lotr} +\end{lstcode} + +\BeginIndexGroup +\BeginIndex[indexother]{Cmd}{Name}% +\BeginIndex[indexother]{Cmd}{Address}% +\BeginIndex[indexother]{Cmd}{FirstName}% +\BeginIndex[indexother]{Cmd}{LastName}% +\BeginIndex[indexother]{Cmd}{FreeI}% +\BeginIndex[indexother]{Cmd}{FreeII}% +\BeginIndex[indexother]{Cmd}{FreeIII}% +\BeginIndex[indexother]{Cmd}{FreeIV}% +\BeginIndex[indexother]{Cmd}{Comment}% +Mit Hilfe der vorgestellten Makros können wir dann einen Brief +an den alten \textsc{Tom Bombadil} schreiben, in dem wir ihn +fragen, ob er sich noch an zwei Gefährten aus alter Zeit +erinnern kann. +\begin{lstcode} + \begin{letter}{\Name{TOM}\\\Address{TOM}} + + \opening{Lieber \FirstName{TOM} \LastName{TOM},} + + oder \FreeIII{TOM}, wie Dich Deine geliebte \FreeI{TOM} + nennt. Kannst Du Dich noch an einen Herrn + \LastName{FRODO}, genauer gesagt \Name{FRODO}, denn es gab + ja auch noch den Herrn \FreeI{FRODO}, erinnern. Er war + \Comment{FRODO} im dritten Zeitalter und \FreeIV{FRODO}. + Begleitet wurde er von \Name{SAM}, \Comment{SAM}. + + Beider Vorlieben waren sehr weltlich. Der + \FirstName{FRODO} genoss das \FreeII{FRODO}, sein Gefährte + schätzte eine gute Mahlzeit mit \FreeII{SAM}. + + Weißt du noch? Mithrandir hat Dir bestimmt viel von ihnen + erzählt. + + \closing{"`O Frühling und Sommerzeit + und danach wieder Frühling!\\ + O Wind auf dem Wasserfall + und Lachen des Laubes!"'} + \end{letter} +\end{lstcode} +Die in diesem Beispiel in \DescRef{scrlttr2.cmd.opening} verwendete +Zusammensetzung aus \Macro{FirstName}\Parameter{Kürzel} und +\Macro{LastName}\Parameter{Kürzel} kann, wie bei +\Macro{begin}\PParameter{letter} gezeigt, auch direkt mittels +\Macro{Name}\Parameter{Kürzel} erhalten werden. + +Das fünf"|te und sechste Argument von \DescRef{\LabelBase.cmd.adrentry} und +\DescRef{\LabelBase.cmd.addrentry} steht zur freien Verfügung. Mit den Makros +\Macro{FreeI} und \Macro{FreeII} kann auf diese Inhalte zugegriffen werden. Im +vorliegenden Fall wurde das fünf"|te Argument für die Person benutzt, die der +Person des Eintrags am nächsten steht. Das sechste Argument enthält im +Beispiel die besondere Vorliebe der jeweiligen Person. Das siebente Argument +ist ebenfalls ein freier Eintrag. Der Zugriff erfolgt per \Macro{Comment} oder +\Macro{FreeIII}. Der Zugriff auf das vierte freie Argument mittels +\Macro{FreeIV} ist nur für \DescRef{\LabelBase.cmd.addrentry}-Einträge gültig. +Bei \DescRef{\LabelBase.cmd.adrentry}-Einträgen ist seine Verwendung nicht +zulässig. Näheres hierzu findet sich im nächsten Abschnitt. +% +\EndIndexGroup +\EndIndexGroup + +\section{Paketoptionen für Warnungen} + +Wie im vorherigen Abschnitt erwähnt, ist die Benutzung des Zugriffsbefehls +\Macro{FreeIV} bei \DescRef{\LabelBase.cmd.adrentry}-Einträgen nicht +zulässig. Wie \Package{scraddr} darauf reagiert, ist allerdings durch +Paketoptionen konfigurierbar. Bitte beachten Sie\textnote{Achtung!}, dass +dieses Paket die erweiterte Optionenschnittstelle mit +\DescRef{maincls.cmd.KOMAoptions} und \DescRef{maincls.cmd.KOMAoption} nicht +unterstützt. Die Optionen sind also entweder als globale Optionen bei +\DescRef{maincls.cmd.documentclass} oder als lokale Optionen bei +\DescRef{maincls.cmd.usepackage} anzugeben. + + +\begin{Declaration} +\Option{adrFreeIVempty} +\Option{adrFreeIVshow} +\Option{adrFreeIVwarn} +\Option{adrFreeIVstop} +\end{Declaration} +Diese vier Optionen erlauben die Auswahl aus vier verschiedenen Reaktionen +zwischen \emph{Ignorieren} bis \emph{Abbruch} falls bei einem +\DescRef{\LabelBase.cmd.adrentry}-Eintrag der Zugriffsbefehl \Macro{FreeIV} +verwendet wird: +% +\begin{labeling}[~--]{\Option{adrFreeIVempty}} +\item[\Option{adrFreeIVempty}] + Der Befehl \Macro{FreeIV} wird einfach ignoriert. +\item[\Option{adrFreeIVshow}] + Es wird die Warnung: »(entry FreeIV undefined at \PName{Kürzel})«, + in den Text geschrieben. +\item[\Option{adrFreeIVwarn}] + In der Log-Datei erscheint eine Warnung. +\item[\Option{adrFreeIVstop}] + Der \LaTeX{}-Lauf wird mit einer Fehlermeldung unterbrochen. +\end{labeling} +Wird für das Paket keine Option angegeben, so ist \Option{adrFreeIVshow} +voreingestellt.% +\EndIndexGroup +% +\EndIndexGroup +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + + +% LocalWords: Zugriffsbefehle Briefpaket Briefklasse Adresseintrags +% LocalWords: Ladebefehl Auenland diff --git a/macros/latex/contrib/koma-script/doc/scraddr-en.tex b/macros/latex/contrib/koma-script/doc/scraddr-en.tex new file mode 100644 index 0000000000..187ae5646c --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scraddr-en.tex @@ -0,0 +1,239 @@ +% ====================================================================== +% scraddr-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scraddr of the KOMA-Script guide +% Maintained by Jens-Uwe Morawski (with help from Markus Kohm) +% +% ====================================================================== + +\KOMAProvidesFile{scraddr-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scraddr)] +\translator{Jens-Uwe Morawski\and Gernot Hassenpflug\and Markus Kohm\and Karl + Hagen} + +\chapter{Accessing Address Files with \Package{scraddr}}% +\labelbase{scraddr}% +\BeginIndexGroup +\BeginIndex{Package}{scraddr} + +The \Package{scraddr} package is a small extension to \KOMAScript{}'s letter +class and letter package. Its goal is to make access to the data in address +files easier and more flexible. + +\section{Overview}\seclabel{overview} +Basically, the package provides a new loading mechanism for address files +consisting of \DescRef{\LabelBase.cmd.adrentry} and the newer +\DescRef{\LabelBase.cmd.addrentry} format entries, as described in +\autoref{cha:scrlttr2} starting on \DescPageRef{scrlttr2.cmd.adrentry}. + +\begin{Declaration} +\Macro{InputAddressFile}\Parameter{file name} +\end{Declaration}% +The \Macro{InputAddressFile} command is the main command of \Package{scraddr}. +It reads the content of the address file\Index{address>file} given as its +parameter. If the file is not found, an error message is issued. + +For each entry in this address file, the command generates a set of +macros to access the data. For large address files, this will require +a lot of \TeX{} memory. +% +\EndIndexGroup + +\begin{Declaration}% + \Macro{adrentry}\Parameter{Lastname}\Parameter{Firstname}% + \Parameter{Address}\Parameter{Phone}\Parameter{F1}\Parameter{F2}% + \Parameter{Comment}\Parameter{Key}% + % + \Macro{addrentry}\Parameter{Lastname}\Parameter{Firstname}% + \Parameter{Address}\Parameter{Phone}\Parameter{F1}\Parameter{F2}% + \Parameter{F3}\Parameter{F4}\Parameter{Key}% + % + \Macro{adrchar}\Parameter{initial}% + \Macro{addrchar}\Parameter{initial}% +\end{Declaration}% +The structure of the address entries in the address file was discussed in +detail in \autoref{sec:scrlttr2.addressFile}, starting on +\DescPageRef{scrlttr2.cmd.adrentry}. The subdivision of the address file with +the help of \Macro{adrchar} or \Macro{addrchar}, also discussed there, has no +meaning for \Package{scraddr} and is simply ignored by the package.% +\EndIndexGroup + +\begin{Declaration} + \Macro{Name}\Parameter{key}% + \Macro{FirstName}\Parameter{key}% + \Macro{LastName}\Parameter{key}% + \Macro{Address}\Parameter{key}% + \Macro{Telephone}\Parameter{key}% + \Macro{FreeI}\Parameter{key}% + \Macro{FreeII}\Parameter{key}% + \Macro{Comment}\Parameter{key}% + \Macro{FreeIII}\Parameter{key}% + \Macro{FreeIV}\Parameter{key} +\end{Declaration}% +These commands give access to data of your address file. The last parameter, +that is, parameter 8 for the \DescRef{\LabelBase.cmd.adrentry} entry and +parameter 9 for the \DescRef{\LabelBase.cmd.addrentry} entry, is the +identifier of an entry, thus the \PName{key} has to be unique and non-empty. +To guarantee safe functioning, you should use only ASCII letters in the +\PName{key}. + +Furthermore, if the file contains more than one entry with the same +\PName{key} name, the last occurrence will be used.% +% +\EndIndexGroup + + +\section{Usage}\seclabel{usage} +\BeginIndexGroup +\BeginIndex[indexother]{Cmd}{addrentry}% +\BeginIndex[indexother]{Cmd}{adrentry}% +To use the package, we need a valid address file. For example, the file +\File{lotr.adr} contains the following entries: +\begin{lstcode} + \addrentry{Baggins}{Frodo}% + {The Hill\\ Bag End/Hobbiton in the Shire}{}% + {Bilbo Baggins}{pipe-weed}% + {the Ring-bearer}{Bilbo's heir}{FRODO} + \adrentry{Gamgee}{Samwise}% + {3 Bagshot Row\\Hobbiton in the Shire}{}% + {Rosie Cotton}{taters}% + {the Ring-bearer's faithful servant}{SAM} + \adrentry{Bombadil}{Tom}% + {The Old Forest}{}% + {Goldberry}{trill queer songs}% + {The Master of Wood, Water and Hill}{TOM} +\end{lstcode} + +The fourth parameter, the telephone number, has been left blank, since there +are no phones in Middle Earth. And as you can see, blank fields are possible. +On the other hand, you cannot simply omit an argument altogether. + +\BeginIndexGroup +\BeginIndex[indexother]{Cmd}{InputAddressFile} +With the \Macro{InputAddressFile} command described above, we read the address +file into our letter document: +\begin{lstcode} + \InputAddressFile{lotr} +\end{lstcode} +\EndIndexGroup + +\BeginIndexGroup +\BeginIndex[indexother]{Cmd}{Name}% +\BeginIndex[indexother]{Cmd}{Address}% +\BeginIndex[indexother]{Cmd}{FirstName}% +\BeginIndex[indexother]{Cmd}{LastName}% +\BeginIndex[indexother]{Cmd}{FreeI}% +\BeginIndex[indexother]{Cmd}{FreeII}% +\BeginIndex[indexother]{Cmd}{FreeIII}% +\BeginIndex[indexother]{Cmd}{FreeIV}% +\BeginIndex[indexother]{Cmd}{Comment}% +With the help of the commands introduced in this chapter we can now write a +letter to old \textsc{Tom Bombadil}, in which we ask him if he can remember +two companions from olden times. +\begin{lstcode} + \begin{letter}{\Name{TOM}\\\Address{TOM}} + \opening{Dear \FirstName{TOM} \LastName{TOM},} + + Or \FreeIII{TOM}, as your beloved \FreeI{TOM} calls you. Do + you still remember Mr \LastName{FRODO}, or more precisely + \Name{FRODO}, since there was also Mr \FreeI{FRODO}. He was + \Comment{FRODO} in the Third Age and \FreeIV{FRODO}. \Name{SAM}, + \Comment{SAM}, accompanied him. + + Their passions were very worldly. \FirstName{FRODO} enjoyed + smoking \FreeII{FRODO}. His companion appreciated a good meal + with \FreeII{SAM}. + + Do you remember? Certainly Mithrandir has told you much + about their deeds and adventures. + \closing{``O spring-time and summer-time + and spring again after!\\ + O wind on the waterfall, + and the leaves' laughter!''} + \end{letter} +\end{lstcode} +You can also produce the combination of \Macro{FirstName}\Parameter{key} and +\Macro{LastName}\Parameter{key} used in the \DescRef{scrlttr2.cmd.opening} of +this letter with \Macro{Name}\PParameter{key}. + +You can use the fifth and sixth parameters of the +\DescRef{\LabelBase.cmd.adrentry} or \DescRef{\LabelBase.cmd.adrentry} for any +purpose you wish. You can access them with the \Macro{FreeI} and +\Macro{FreeII} commands. In this example, the fifth parameter contains the +name of the most important person in the life of the person in the entry. The +sixth contains the person's favourite thing. The seventh parameter is a +comment or in general also a free parameter. You can access it with the +\Macro{Comment} or \Macro{FreeIII} commands. \Macro{FreeIV} is only valid for +\DescRef{\LabelBase.cmd.addrentry} entries. For +\DescRef{\LabelBase.cmd.adrentry} entries, it results in an error. You can +find more details in the next section. +% +\EndIndexGroup +\EndIndexGroup + + +\section{Package Warning Options} + +As mentioned above, you cannot use the \Macro{FreeIV} command with +\DescRef{\LabelBase.cmd.adrentry} entries. However, you can configure how +\Package{scraddr} reacts in such a situation by package options. +Note\textnote{Attention!} that this package does not support the extended +options interface with \DescRef{maincls.cmd.KOMAoptions} and +\DescRef{maincls.cmd.KOMAoption}. You should therefore specify the options +either as global options in \DescRef{maincls.cmd.documentclass} or as local +options in \DescRef{maincls.cmd.usepackage} + + +\begin{Declaration} + \Option{adrFreeIVempty}% + \Option{adrFreeIVshow}% + \Option{adrFreeIVwarn}% + \Option{adrFreeIVstop}% +\end{Declaration}% +These four options let you choose from four different reactions, ranging +from \emph{ignore} to \emph{abort}, if \Macro{FreeIV} is used +within an \DescRef{\LabelBase.cmd.adrentry} entry. + +\begin{labeling}[~--]{\Option{adrFreeIVempty}} +\item[\Option{adrFreeIVempty}] + the command \Macro{FreeIV} will be ignored +\item[\Option{adrFreeIVshow}] + the warning ``(entry FreeIV undefined at \PName{key})'' will be + written in the text +\item[\Option{adrFreeIVwarn}] + a warning is written in the logfile +\item[\Option{adrFreeIVstop}] + the \LaTeX{} run will abort with an error message +\end{labeling} +The default setting is \Option{adrFreeIVshow}.% +\EndIndexGroup +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scraddr.html b/macros/latex/contrib/koma-script/doc/scraddr.html index b386b493a2..daec8122e7 100644 --- a/macros/latex/contrib/koma-script/doc/scraddr.html +++ b/macros/latex/contrib/koma-script/doc/scraddr.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scraddr" /> + + - + - The KOMA-Script Documentation Wrapper + Accessing Address Files with scraddr -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

Accessing Address Files with scraddr

+

Adressdateien mit scraddr erschließen

- I think you are searching for the KOMA-Script documentation. You - may find the Englisch documentation - at scrguien.pdf and an index of it - at scrguien.html. + I think you are searching for the chapter + “Accessing Address Files with scraddr in the + KOMA-Script documentation.
- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Adressdateien mit scraddr erschließen” in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrartcl.html b/macros/latex/contrib/koma-script/doc/scrartcl.html index b386b493a2..f4377f876f 100644 --- a/macros/latex/contrib/koma-script/doc/scrartcl.html +++ b/macros/latex/contrib/koma-script/doc/scrartcl.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrartcl" /> + + - + - The KOMA-Script Documentation Wrapper + The Main Classes: scrbook, scrreprt, and scrartcl -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

The Main Classes: scrbook, scrreprt, and scrartcl

+

Die Hauptklassen scrbook, scrreprt, scrartcl

- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Die Hauptklassen scrbook, scrreprt, scrartcl in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrarticle.html b/macros/latex/contrib/koma-script/doc/scrarticle.html new file mode 100644 index 0000000000..206908899a --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrarticle.html @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + The Main Classes: scrbook, scrreprt, and scrartcl + + + +

The Main Classes: scrbook, scrreprt, and scrartcl

+

Die Hauptklassen scrbook, scrreprt, scrartcl

+
+
+ Ich nehme an, Sie suchen nach dem Kapitel + „Die Hauptklassen scrbook, scrreprt, scrartcl in der + KOMA-Script-Anleitung. +
+
+ Markus Kohm, 2022-06-03 +

Valid XHTML 1.1

+
+ + + diff --git a/macros/latex/contrib/koma-script/doc/scrbase-de.tex b/macros/latex/contrib/koma-script/doc/scrbase-de.tex new file mode 100644 index 0000000000..6b4ef4a8d7 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrbase-de.tex @@ -0,0 +1,2159 @@ +% ====================================================================== +% scrbase-de.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% Package scrbase for Package and Class Authors +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{scrbase-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script package scrbase] + +\chapter{Grundlegende Funktionen im Paket \Package{scrbase}} +\labelbase{scrbase} +\BeginIndexGroup +\BeginIndex{Package}{scrbase}% + +Das Paket \Package{scrbase} stellt einige grundlegende Funktionen bereit, die +sich an Autoren von Paketen und Klassen richten. Dabei kann es nicht nur für +Wrapper-Klassen genutzt werden, die ihrerseits eine \KOMAScript-Klasse +laden. Auch Autoren von Klassen, die ansonsten nichts mit \KOMAScript{} zu tun +haben, können von der Funktionalität von \Package{scrbase} profitieren. + +\section{Laden des Pakets} +\seclabel{loadit} + +Während Anwender ein Paket mit Hilfe von \Macro{usepackage} laden, verwenden +Paket- und Klassenautoren +\Macro{RequirePackage}\IndexCmd{RequirePackage}. Autoren von Wrapper-Paketen +nutzen auch +\Macro{RequirePackageWithOptions}\IndexCmd{RequirePackageWithOptions}. Bei +Verwendung von \Macro{RequirePackage} können wie bei +\Macro{usepackage}\IndexCmd{usepackage} Optionen angegeben +werden. Demgegenüber erhält das Paket bei \Macro{RequirePackageWithOptions} +alle Optionen, mit denen zuvor das Wrapper-Paket geladen wurde. Näheres zu +diesen Anweisungen ist \cite{latex:clsguide} zu entnehmen. + +Das Paket \Package{scrbase} benötigt intern die Funktionalität des Pakets +\Package{keyval}\IndexPackage{keyval}\important{\Package{keyval}}. Diese kann +auch vom Paket \Package{xkeyval} zur Verfügung gestellt werden. Bei Bedarf +lädt \Package{scrbase} selbst \Package{keyval}. Näheres zu dem Paket is +\cite{package:keyval} zu entnehmen. + +Das Paket \Package{keyval} erlaubt es, Schlüssel zu definieren und diesen +Werte zuzuweisen. Auch die Optionen, die \Package{scrbase} bereitstellt, +verwenden die \Package{keyval}-Syntax: \OptionVName{\PName{Schlüssel}}{Wert}% +\important{\OptionVName{\PName{Schlüssel}}{Wert}}. + + +\section{Schlüssel als Eigenschaften von Familien und deren Mitgliedern} +\seclabel{keyvalue} + +Wie bereits in \autoref{sec:scrbase.loadit} erwähnt, setzt \Package{scrbase} +bei Schlüsseln und deren Werten auf das Paket \Package{keyval}. Allerdings +erweitert es dessen Funktionalität. Während bei \Package{keyval} ein Schlüssel +einer Familie gehört, kennt \Package{scrbase} zu jeder Familie auch noch +Familienmitglieder. Ein Schlüssel kann dann sowohl einer Familie als auch +einem oder mehreren Familienmitgliedern gehören. Außerdem kann ein Wert einem +Schlüssel eines Familienmitglieds, einem Schlüssel einer Familie oder einem +Schlüssel aller Familienmitglieder zugewiesen werden. + +\begin{Declaration} + \Macro{DefineFamily}\Parameter{Familienname} + \Macro{DefineFamilyMember}\OParameter{Mitglied}\Parameter{Familienname} +\end{Declaration} +\Package{scrbase} muss aus verschiedenen Gründen die Mitglieder einer Familie +kennen. Daher ist es notwendig, eine neue Familie zunächst mit +\Macro{DefineFamily} zu definieren und so eine leere Mitgliederliste zu +erzeugen. Ist die Familie bereits definiert, so geschieht schlicht nichts. Es +wird also auch nicht eine bereits existierende Mitgliederliste überschrieben. + +Ein neues Mitglied wird der Familie dann mit der Anweisung +\Macro{DefineFamilyMember} bekannt gegeben. Existiert die Familie nicht, so +führt dies zu einer Fehlermeldung. Existiert das Mitglied bereits, so +geschieht nichts. Wird kein Mitglied angegeben, so bleibt das Mitglied nicht +etwa leer, sondern es wird +»\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}« angenommen. Während +des Ladens einer Klasse oder eines Pakets sind \Macro{@currname} und +\Macro{@currext} zusammen der Dateiname. + +Theoretisch wäre es möglich, mit einem leeren optionalen Argument +\PName{Mitglied} auch ein Mitglied ohne Name zu definieren. Dies würde jedoch +der Familie selbst entsprechen. Es wird empfohlen, als \PName{Familienname} nur +Buchstaben und Ziffern zu verwenden und das \PName{Mitglied} immer mit einem +anderen Zeichen, vorzugsweise einem Punkt, zu beginnen. Anderenfalls könnte +es passieren, dass sich Mitglieder einer Familie mit Mitgliedern anderer +Familien überdecken. + +\Package{scrbase} definiert selbst bereits die Familie »\PValue{KOMA}« und +fügt ihr das Mitglied »\PValue{.scrbase.sty}« hinzu. Grundsätzlich sind die +Familien »\PValue{KOMA}« und »\PValue{KOMAarg}« \KOMAScript{} vorbehalten. Es +wird empfohlen, für eigene Pakete den Namen des Gesamtpakets als Familie und +den Namen einzelner Pakete im Gesamtpaket als Mitglied zu verwenden. +% +\begin{Example} + Angenommen, Sie schreiben ein neues Gesamtpaket »Fleischermeister«. Darin + befinden sich die Pakete \File{Salami.sty}, \File{Mettwurst.sty} und + \File{Krakauer.sty}. Daher entscheiden Sie sich für den Familienname + »\PValue{Fleischermeister}« und fügen in jedem der Pakete die Zeilen +\begin{lstcode} + \DefineFamily{Fleischermeister} + \DefineFamilyMember{Fleischermeister} +\end{lstcode} + ein. Dadurch wird beim Laden der drei genannten Pakete der Familie + »\PValue{Fleischermeister}« je nach Paket eines der drei Mitglieder + »\PValue{.Salami.sty}«, »\PValue{.Mettwurst.sty}« und + »\PValue{.Krakauer.sty}« zugefügt. Am Ende sind dann alle drei Mitglieder + definiert. +\end{Example} +% +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \Macro{DefineFamilyKey}\OParameter{Mitglied}\Parameter{Familie}% + \Parameter{Schlüssel} + \OParameter{Säumniswert}\Parameter{Aktion} + \Macro{FamilyKeyState} + \Macro{FamilyKeyStateUnknown} + \Macro{FamilyKeyStateProcessed} + \Macro{FamilyKeyStateUnknownValue} + \Macro{FamilyKeyStateNeedValue} +\end{Declaration} +Mit dieser Anweisung wird ein \PName{Schlüssel} definiert. Ist ein +\PName{Mitglied} angegeben, so ist der \PName{Schlüssel} eine Eigenschaft +dieses Mitglieds der angegebenen \PName{Familie}. Ist\textnote{Hinweis} +\OParameter{Mitglied} nicht angegeben, so wird wieder das Mitglied +»\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}« angenommen. Ist das +\PName{Mitglied} hingegen leer, so wird ein Familienschlüssel anstelle eines +Mitgliederschlüssels definiert. + +Wird später dem \PName{Schlüssel} ein Wert zugewiesen, so wird \PName{Aktion} +ausgeführt, wobei der Wert als Parameter übergeben wird. Innerhalb von +\PName{Aktion} steht also »\lstinline{#1}« für den übergebenen Wert. Wurde +kein Wert übergeben, so wird stattdessen der \PName{Säumniswert} +eingesetzt. Falls kein \PName{Säumniswert} angegeben wird, kann später der +\PName{Schlüssel} nur mit Wertübergabe verwendet werden. + +%\begin{Explain} + \phantomsection\label{explain:scrbase.macro.DefineFamilyKey}% + Letztlich führt +\begin{lstcode}[escapeinside=><] + \DefineFamilyKey[>\PName{Mitglied}<]{>\PName{Familie}<}{>\PName{Schlüssel}<} + [>\PName{Säumniswert}<]{>\PName{Aktion}<} +\end{lstcode} + zu dem Aufruf +\begin{lstcode}[moretexcs={define@key},escapeinside=><] + \define@key{>\PName{Familie\,Mitglied}<}{>\PName{Schlüssel}<} + [>\PName{Säumniswert}<]{>\PName{erweiterte Aktion}<} +\end{lstcode} + wobei \Macro{define@key} im \Package{keyval}-Paket\IndexPackage{keyval} + definiert ist (siehe \cite{package:keyval}). Allerdings kommen zu dem Aufruf + von \Macro{define@key} noch einige zusätzliche Vorkehrungen und auch die + \PName{Aktion} wird automatisch um einige interne Aktionen erweitert. +%\end{Explain} + +Erfolg\ChangedAt{v3.12}{\Package{scrbase}} oder Misserfolg der Ausführung +der \PName{Aktion} werden über \Macro{FamilyKeyState} an \Package{scrbase} +zurückgemeldet, damit dieses je nach Bedarf und Verwendung des Schlüssels +weitere Maßnahmen ergreifen kann. Das kann beispielsweise eine Fehlermeldung +aber auch nur die Signalisierung einer unbekannten Option sein. + +Der Zustand\textnote{unbekannt} \Macro{FamilyKeyState} ist in der +Voreinstellung identisch mit dem Zustand \Macro{FamilyKeyStateUnknown}. Das +bedeutet, dass es nicht sicher ist, ob der Schlüssel korrekt verarbeitet +werden konnte. Findet \Package{scrbase} nach Ausführung der \PName{Aktion} +noch immer diesen Zustand vor, so wird ein Hinweis in die \File{log}-Datei +geschrieben und im weiteren der Zustand \Macro{FamilyKeyStateProcessed} +angenommen. + +Der Zustand\textnote{Erfolg} \Macro{FamilyKeyStateProcessed} signalisiert, +dass der Schlüssel und die Wertzuweisung an den Schlüssel vollständig +abgeschlossen wurde und alles in Ordnung ist. Auf den Zustand kann einfach +durch Aufruf von \Macro{FamilyKeyStateProcessed} selbst umgeschaltet werden. + +Der Zustand\textnote{unbekannter Wert} \Macro{FamilyKeyStateUnknownValue} +signalisiert, dass der Schlüssel zwar verarbeitet wurde, ihm jedoch ein Wert +zugewiesen werden sollte, der nicht erlaubt ist. Diesen Zustand meldet +beispielsweise \hyperref[cha:typearea]{\Package{typearea}}, wenn versucht +wird, an Option \DescRef{typearea.option.twoside} den Wert \PValue{unbekannt} +zuzuweisen. Die Umschaltung auf den Zustand erfolgt einfach durch Aufruf von +\Macro{FamilyKeyStateUnknownValue} selbst. + +Der Zustand\textnote{fehlender Wert} +\Macro{FamilyKeyStateNeedValue} +signalisiert, dass der Schlüssel nicht verarbeitet werden konnte, weil er +zwingend einen Wert erwartet, er aber ohne Wertzuweisung aufgerufen +wurde. Dieser Zustand wird automatisch gesetzt, wenn ein Schlüssel, der keinen +\PName{Säumniswert} besitzt, ohne Wertzuweisung verwendet wird. Theoretisch +wäre aber auch eine explizite Umschaltung darauf durch Aufruf von +\Macro{FamilyKeyStateNeedValue} selbst möglich. + +Des Weiteren können zusätzliche\textnote{Fehler} Fehlerzustände definiert +werden, indem man \Macro{FamilyKeyState} auf eine kurze Meldung +umdefiniert. In der Regel sollten jedoch die vier vordefinierten Zustände +verwendet werden. + +\begin{Example} + Nehmen wir an, jedes der drei Pakete aus dem letzten Beispiel soll einen + Schlüssel \PValue{Aufschnitt} erhalten. Wird dieser aufgerufen, so soll in + jedem der Pakete entsprechend dem Aufrufwert ein Schalter gesetzt + werden. Für das Paket \Package{Salami} könnte das beispielsweise so + aussehen: +\begin{lstcode} + \newif\if@Salami@Aufschnitt + \DefineFamilyKey{Fleischermeister}% + {Aufschnitt}[true]{% + \expandafter\let + \expandafter\if@Salami@Aufschnitt + \csname if#1\endcsname + \FamilyKeyStateProcessed + } +\end{lstcode} + Als Wert ist daher beim Aufruf \PValue{true} oder \PValue{false} + erlaubt. Ein Test auf unerlaubte Werte existiert in diesem Beispiel + nicht. Stattdessen wird immer zurückgemeldet, dass der Schlüssel vollständig + und korrekt verarbeitet wurde. Wird der Schlüssel später verwendet, so muss + entweder einer der erlaubten Werte zugewiesen oder ein Aufruf ohne + Wertzuweisung verwendet werden. In letzterem Fall kommt der Säumniswert + \PName{true} zum Einsatz. + + Für die anderen beiden Pakete kann das fast identisch definiert + werden. Lediglich die Zeichenfolge »\texttt{Salami}« ist jeweils zu + ersetzen. +\end{Example} +% +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \Macro{RelaxFamilyKey}\OParameter{Mitglied}\Parameter{Familie} + \Parameter{Schlüssel} +\end{Declaration} +Wurde\ChangedAt{v3.15}{\Package{scrbase}} zuvor \PName{Schlüssel} für das +\PName{Mitglied} der \PName{Familie} definiert, so wird diese Definition +quasi aufgehoben. Der \PName{Schlüssel} ist dann für dieses \PName{Mitglied} +der \PName{Familie} nicht mehr definiert. Die Verwendung für einen +\PName{Schlüssel}, der für dieses \PName{Mitglied} der \PName{Familie} gar +nicht definiert ist, ist ebenfalls zulässig und bleibt wirkungslos. + +Ist kein \PName{Mitglied} angegeben, so wird genau wie bei Anweisung +\DescRef{\LabelBase.cmd.DefineFamilyKey} wieder das Mitglied +»\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}« angenommen. Allerdings +wird \Macro{RelaxFamilyKey} selten während des Ladens eines Pakets, +sondern häufiger zur Laufzeit verwendet. Daher ist \PName{Mitglied} in der +Regel auch explizit anzugeben.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyProcessOptions}\OParameter{Mitglied}\Parameter{Familie} +\end{Declaration} +Grundsätzlich ist die Erweiterung der Schlüssel von Familien auf Familien und +Familienmitglieder dazu gedacht, dass Schlüssel beziehungsweise die +Wertzuweisung an Schlüssel als ganz normale Klassen- oder Paketoptionen +verwendet werden können. Diese Anweisung stellt daher eine Erweiterung von +\Macro{ProcessOptions*}\IndexCmd{ProcessOptions*}% +\important{\Macro{ProcessOption*}} aus dem \LaTeX-Kern dar (siehe +\cite{latex:clsguide}). Dabei verarbeitet die Anweisung nicht nur Optionen, +die mit \Macro{DeclareOption}\IndexCmd{DeclareOption}% +\important{\Macro{DeclareOption}} definiert wurden. Es werden auch alle +Schlüssel eines angegebenen Familienmitglieds abgearbeitet. Wird das optionale +Argument \PName{Mitglied} nicht angegeben, so wird wieder das Mitglied +»\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}« verwendet. + +Eine Besonderheit sind Schlüssel, die nicht einem Familienmitglied, sondern +der Familie selbst zugeordnet sind, bei der also das Mitglied leer geblieben +ist. Diese werden ebenfalls gesetzt und zwar noch bevor der Schlüssel des +Mitglieds gesetzt wird. +\begin{Example} + Wenn in den Paketen aus den zurückliegenden Beispielen nach der Definition + der Schlüssel die Zeile +\begin{lstcode} + \FamilyProcessOptions{Fleischermeister} +\end{lstcode} + ergänzt wird, so kann der Anwender bereits beim Laden der Pakete mit + \Macro{usepackage} die Eigenschaft \Option{Aufschnitt} als Option + angeben. Wird die Option bei \Macro{documentclass} und damit global + angegeben, so wird die Eigenschaft automatisch bei allen drei Paketen + gesetzt, wenn alle drei Pakete einzeln geladen werden. +\end{Example} +Es\textnote{Achtung!} wird darauf hingewiesen, dass bei Paketen globale +Optionen vor den lokal dem Paket zugewiesenen Optionen ausgeführt +werden. Während bei der Abarbeitung der globalen Optionen unbekannte Werte für +Optionen dazu führen, dass darüber lediglich in der \File{log}-Datei +informiert und die Option ansonsten ignoriert wird, führt dies bei lokalen +Optionen zu einer Fehlermeldung. + +Man kann \Macro{FamilyProcessOptions} wahlweise als Erweiterung von +\Macro{ProcessOption*} oder als Erweiterung des +\PName{Schlüssel=Wert}-Mechanismus von \Package{keyval} verstehen. Letztlich +werden mit Hilfe von \Macro{FamilyProcessOptions} aus +\PName{Schlüssel=Wert}-Paaren Optionen. + +Wie\textnote{Achtung!} auch \Macro{ProcessOptions} darf +\Macro{FamilyProcessOptions} nicht während der Ausführung von Optionen +verwendet werden. Es ist also insbesondere auch nicht erlaubt, innerhalb der +Ausführung von Optionen Pakete zu laden.%, die selbst +%\Macro{FamilyProcessOptions} verwenden.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{BeforeFamilyProcessOptions}\OParameter{Mitglied}\Parameter{Familie}% + \Parameter{Code}% +\end{Declaration} +Insbesondere\ChangedAt{v3.18}{\Package{scrbase}} Autoren von Wrapper-Klassen +wünschen manchmal, in ein Paket oder eine Klasse noch vor der Verarbeitung der +Optionen eines zukünftig geladenen Pakets oder einer zukünftig geladenen +Klasse mit \DescRef{\LabelBase.cmd.FamilyProcessOptions} eingreifen zu +können. Dies ist mit \Macro{BeforeFamilyProcessOptions} möglich. Das Paket +\Package{scrbase} bietet dafür einen sogenannten Haken\Index{Haken} +(engl. \emph{hook}). Diesem kann man mit \Macro{BeforeFamilyProcessOptions} +neuen \PName{Code} hinzufügen. Die Parameter \PName{Mitglied} und +\PName{Familie} entsprechen dabei denen von +\Macro{FammilyProcessOptions}. Allerdings kann man auch den Haken von +Familien-Mitgliedern \PName{Code} hinzufügen, wenn bisher die \PName{Familie} +oder das \PName{Mitglied} noch gar nicht definiert ist. + +Der Haken eines Familien-Mitglieds wird übrigens nach dessen Ausführung +automatisch gelöscht. Verwendet man hingegen ein leeres \PName{Mitglied}, so +wird dieser Haken\Index{Haken} für alle Mitglieder der \PName{Familie} +ausgeführt und bleibt auch über die Ausführung hinaus erhalten. + +\begin{Example} + Sie schreiben ein Paket \Package{Rauchwurst}, das selbst \Package{Mettwurst} + lädt. Allerdings wollen Sie nicht, dass für dieses Paket die Option + \Option{Aufschnitt} gesetzt werden kann. Daher deaktivieren sie die Option + vor dem Laden des Pakets über \Macro{BeforeFamilyProcessOptions}. +\begin{lstcode} + \RequirePackage{scrbase} + \BeforeFamilyProcessOptions[.Mettwurst.sty]% + {Fleischermeister}{% + \RelaxFamilyKey[.Mettwurst.sty]% + {Fleischermeister}{Aufschnitt}% + } + \RequirePackageWithOptions{Mettwurst} +\end{lstcode} + Versucht nun jemand Ihr Paket mit Option + \Option{Aufschnitt} zu laden, so meldet das Paket \Package{Mettwurst}, dass + diese Option nicht bekannt ist. Wird die Option \Option{Aufschnitt} als + globale Option angegeben, so ignoriert Paket \Package{Mettwurst} + diese. Voreinstellungen innerhalb des Pakets \Package{Mettwurst}, die + beispielsweise mit \DescRef{\LabelBase.cmd.FamilyExecuteOptions} noch vor + \DescRef{\LabelBase.cmd.FamilyProcessOptions} erfolgen könnten, wären + allerdings davon unabhängig. Aber natürlich kann man eigene + Voreinstellungen von \Package{Rauchwurst} aus ebenfalls per + \Macro{BeforeFamilyProcessOptions} in \Package{Mettwurst} einschleusen.% +\end{Example} +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \Macro{FamilyExecuteOptions}\OParameter{Mitglied}\Parameter{Familie}% + \Parameter{Optionenliste} +\end{Declaration} +Diese Anweisung stellt eine Erweiterung von +\Macro{ExecuteOptions} aus dem \LaTeX-Kern dar (siehe +\cite{latex:clsguide}). Dabei verarbeitet die Anweisung nicht nur Optionen, +die mit \Macro{DeclareOption} definiert wurden. Es werden auch alle Schlüssel +eines angegebenen Familienmitglieds abgearbeitet. Wird das optionale Argument +\PName{Mitglied} nicht angegeben, so wird wieder das Mitglied +»\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}« verwendet. + +Eine Besonderheit sind Schlüssel, die nicht einem Familienmitglied, sondern +der Familie selbst zugeordnet sind, bei der also das Mitglied leer geblieben +ist. Diese werden ebenfalls gesetzt, und zwar noch bevor der Schlüssel des +Mitglieds gesetzt wird. +\begin{Example} + Angenommen, die Option \Option{Aufschnitt} soll in den zurückliegenden + Beispielen bereits als Voreinstellung gesetzt werden, so müssen die Pakete + nur um den Aufruf +\begin{lstcode} + \FamilyExecuteOptions{Fleischermeister} + {Aufschnitt} +\end{lstcode} + ergänzt werden. +\end{Example} + +Wird\ChangedAt{v3.20}{\Package{scrbase}} \Macro{FamilyExecuteOptions} mit +einer nicht definierten Option in der \PName{Optionenliste} aufgerufen, so +wird normalerweise ein Fehler ausgegeben. Eine Ausnahme von dieser Regel ist, +wenn für das \PName{Mitglied} eine Option namens +\Option{@else@}\important{\Option{@else@}} definiert wurde. In diesem Fall +wird statt der unbekannten Option eben diese Option \Option{@else@} +verwendet. Der an \Option{@else@} übergebene Wert ist dabei die nicht +definierte Option mit dem im Aufruf angegebenen Wert. Innerhalb von +\KOMAScript{} wird das beispielsweise genutzt, um die Stil-Option bei der +Definition von Gliederungsbefehlen vor allen anderen auszuwerten. + +Diese Anweisung darf auch innerhalb der Ausführung von Optionen verwendet +werden.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyOptions}\Parameter{Familie}\Parameter{Optionenliste}% +\end{Declaration} +Im Gegensatz zu normalen Optionen, die mit \Macro{DeclareOption} definiert +wurden, können die \PName{Schlüssel} auch noch nach dem Laden der Klasse oder +des Pakets gesetzt werden. Dazu verwendet der Anwender +\Macro{FamilyOptions}. Die \PName{Optionenliste} hat dabei die Form: +%\begin{flushleft}\begin{tabular}{l} + \PName{Schlüssel}\texttt{=}\PName{Wert}\texttt{,}\linebreak[1]% + \PName{Schlüssel}\texttt{=}\PName{Wert} \dots{}, +%\end{tabular}\vskip\dp\strutbox\end{flushleft} +wobei für \PName{Schlüssel}, für die ein Säumniswert definiert ist, die +Wertzuweisung natürlich auch entfallen kann. + +Durch die Anweisung werden die \PName{Schlüssel} aller Mitglieder der +angegebenen \PName{Familie} gesetzt. Existiert ein \PName{Schlüssel} auch als +Eigenschaft der Familie selbst, so wird dieser Familien-Schlüssel zuerst +gesetzt. Danach folgen die Mitglieder-Schlüssel in der Reihenfolge, in der die +Mitglieder definiert wurden. Existiert ein angegebener \PName{Schlüssel} weder +für die Familie noch für ein Mitglied der Familie, so wird von +\Macro{FamilyOptions} ein Fehler ausgegeben. Dies geschieht ebenfalls, wenn +zwar für einige Mitglieder ein Schlüssel existiert, jedoch jedes dieser +Mitglieder über \DescRef{\LabelBase.cmd.FamilyKeyState} einen Fehler +zurückmeldet. +\begin{Example} + Sie ergänzen das Fleischermeister-Projekt um ein weiteres Paket + \Package{Wurstsalat}. Wird dieses Paket verwendet, so sollen alle + Wurstpakete zunächst einmal Aufschnitt produzieren: +\begin{lstcode} + \ProvidesPackage{Wurstsalat}% + [2008/05/06 nonsense package] + \RequirePackage{scrbase} + \DefineFamily{Fleischermeister} + \DefineFamilyMember{Fleischermeister} + \FamilyProcessOptions{Fleischermeister}\relax + \FamilyOptions{Fleischermeister}{Aufschnitt} +\end{lstcode} + Sollte noch kein Wurstpaket geladen sein, so würde nun eine Fehlermeldung + wegen der nicht definierten Option »\Option{Aufschnitt}« ausgegeben. Das + kann vermieden werden, indem vor der letzten Zeile für das Paket selbst + ebenfalls ein entsprechender Schlüssel definiert wird: +\begin{lstcode} + \DefineFamilyKey{Fleischermeister}% + {Aufschnitt}[true]{}% +\end{lstcode} + Allerdings produzieren so Wurstpakete, die nach Paket + \Package{Wurstsalat} geladen werden, keinen Aufschnitt. Dies kann man + ebenfalls ändern: +\begin{lstcode} + \AtBeginDocument{% + \DefineFamilyKey[.Wurstsalat.sty]% + {Fleischermeister}% + {Aufschnitt}[true]{}% + } + \DefineFamilyKey{Fleischermeister}% + {Aufschnitt}[true]{% + \AtBeginDocument{% + \FamilyOptions{Fleischermeister}% + {Aufschnitt=#1}% + }% + }% +\end{lstcode} + Somit wird zunächst während \Macro{begin}\PParameter{document} die Option so + definiert, dass sie für das Paket \Package{Wurstsalat} keine Funktion mehr + ausübt. Da nach dem Laden von \Package{Wurstsalat}, innerhalb von + \Macro{begin}\PParameter{document} die beiden Anweisungen \Macro{@currname} + und \Macro{@currext} nicht mehr den Dateinamen des Pakets enthalten, muss + zwingend das optionale Argument von \DescRef{\LabelBase.cmd.DefineFamilyKey} + verwendet werden. + + Bis zu dieser Umdefinierung der Option wird jedoch eine Definition + verwendet, die während \Macro{begin}\PParameter{document} die Option erneut + für die Familie und all ihre Mitglieder ausführt und damit auch für andere + Wurstpakete setzt. Die Verzögerung der Ausführung von \Macro{FamilyOptions} + ist hier entscheidend. Zum einen werden nur so später geladene Wurstpakete + erfasst. Zum anderen wird dadurch sichergestellt, dass die eigene Option + \Option{Aufschnitt} bereits umdefiniert wurde. Dadurch wird eine endlose + Rekursion vermieden.% +\end{Example}% + +Für\ChangedAt{v3.27}{\Package{scrbase}} die Option Namens +\Option{@else@}\important{\Option{@else}} existiert ähnlich wie bei Anweisung +\DescRef{\LabelBase.cmd.FamilyExecuteOptions} eine Sonderbehandlung. Ist eine +solche für ein Mitglied definiert, so wird sie immer dann ausgeführt, wenn das +Mitglied eine angegebene Option nicht kennt. Ist für die Familie selbst eine +Option \Option{@else@} definiert, so wird sie nur aufgerufen, wenn weder die +Familie noch eines ihrer Mitglieder eine angegebene Option vollständig +verarbeiten konnte und mit \DescRef{\LabelBase.cmd.FamilyKeyStateProcessed} +quitiert hat.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyOption}\Parameter{Familie}% + \Parameter{Option}\Parameter{Werteliste}% +\end{Declaration} +Neben Optionen, die sich gegenseitig ausschließende Werte besitzen, kann es +auch Optionen geben, die gleichzeitig mehrere Werte annehmen können. Für diese +wäre es bei Verwendung von \DescRef{\LabelBase.cmd.FamilyOptions} notwendig, +der Option mehrfach einen Wert zuzuweisen und dabei die Option selbst mehrfach +anzugeben. Stattdessen kann man einfach mit \Macro{FamilyOption} einer +einzigen \PName{Option} eine ganze \PName{Werteliste} zuweisen. Die +\PName{Werteliste} ist dabei eine durch Komma separierte Liste von Werten: +%\begin{flushleft}\begin{tabular}{l} + \PName{Wert}\texttt{,}\PName{Wert} \dots{} +%\end{tabular}\end{flushleft} +In diesem Zusammenhang sei darauf hingewiesen, dass die Verwendung eines +Kommas in einem Wert möglich ist, wenn man den Wert in geschweifte Klammern +setzt. Die weitere Funktionsweise ist der vorhergehenden Erklärung zu +\DescRef{\LabelBase.cmd.FamilyOptions} zu entnehmen. +\begin{Example} + Das Paket \Package{Wurstsalat} soll eine Option bekommen, über die man + weitere Zutaten bestimmen kann. Für jede Zutat wird dabei wieder ein + Schalter gesetzt. +\begin{lstcode} + \newif\if@salatmit@Zwiebeln + \newif\if@salatmit@Gurken + \newif\if@salatmit@Peperoni + \DefineFamilyKey{Fleischermeister}{SalatZusatz}{% + \csname @salatmit@#1true\endcsname + } +\end{lstcode} + Es wurden hier die drei Zutaten »Zwiebeln«, »Gurken« und »Peperoni« + definiert. Eine Fehlerbehandlung für den Fall, dass der Anwender unbekannte + Zutaten fordert, existiert nicht. + + Für einen Salat mit Zwiebeln und Gurken kann der Anwender +\begin{lstcode} + \FamilyOptions{Fleischermeister}{% + SalatZusatz=Zwiebeln,SalatZusatz=Gurken} +\end{lstcode} + oder einfach +\begin{lstcode} + \FamilyOption{Fleischermeister}% + {SalatZusatz}{Zwiebeln,Gurken} +\end{lstcode} + verwenden. +\end{Example} + +\iffalse% Umbruchkorrektur +Die\ChangedAt{v3.27}{\Package{scrbase}} Verarbeitung einer Option +\Option{@else@} findet in derselben Weise statt wie bei +\DescRef{\LabelBase.cmd.FamilyOptions}.% +\else% +Intern basiert \Macro{FamilyOption} auf +\DescRef{\LabelBase.cmd.FamilyOptions}. +Die\ChangedAt{v3.27}{\Package{scrbase}} Verarbeitung einer Option +\Option{@else@} findet daher in gleicher Weise statt.% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AtEndOfFamilyOptions}\Parameter{Aktion}% + \Macro{AtEndOfFamilyOptions*}\Parameter{Aktion}% +\end{Declaration} +Manchmal\ChangedAt{v3.12}{\Package{scrbase}} ist es vorteilhafter, wenn nicht +jede Wertzuweisung an eine Option unmittelbar eine \PName{Aktion} auslöst, +sondern dies erst geschieht, wenn alle Wertzuweisungen innerhalb eines Aufrufs +von +\DescRef{\LabelBase.cmd.FamilyProcessOptions}\IndexCmd{FamilyProcessOptions} +oder +\DescRef{\LabelBase.cmd.FamilyExecuteOptions}\IndexCmd{FamilyExecuteOptions} +respektive \DescRef{\LabelBase.cmd.FamilyOptions}\IndexCmd{FamilyOptions} oder +\DescRef{\LabelBase.cmd.FamilyOption}\IndexCmd{FamilyOptions} abgeschlossen +sind. Genau das ist mit Hilfe von \Macro{AtEndOfFamilyOptions} und der +zugehörigen Sternvariante\ChangedAt{v3.23}{\Package{scrbase}} möglich. Die +Rückmeldung von Fehlerzuständen ist über die Anweisungen jedoch ebenso wenig +möglich wie die Verwendung der Anweisungen außerhalb der Ausführung von +Optionen. + +Die beiden Varianten unterscheiden sich im Falle von verschachtelt definierten +Optionen, wenn also die Ausführung einer Option den Aufruf einer oder mehrerer +anderer Optionen bedingt. In diesem Fall werden alle per +\Macro{AtEndOfFamilyOptions} festgelegten Aktionen ausgeführt, sobald der +innerste Optionenaufruf endet. Dagegen werden die per +\Macro{AtEndOfFamilyOptions*} festgelegten Aktionen erst mit dem Ende des +äußersten Optionenaufrufs ausgeführt. Die Reihenfolge\textnote{Achtung!} der +Aktionen ist dabei jedoch ausdrücklich unbestimmt! Weder ist sichergestellt, +dass zuerst angeforderte Aktionen auch zuerst ausgeführt werden, noch die +umgekehrte Reihenfolge.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyBoolKey}\OParameter{Mitglied}\Parameter{Familie} + \Parameter{Schlüssel}\Parameter{Schaltername} + \Macro{FamilySetBool}\Parameter{Familie} + \Parameter{Schlüssel}\Parameter{Schaltername} + \Parameter{Wert} +\end{Declaration} +In den vorherigen Beispielen wurden schon mehrfach Schalter gesetzt. Im +Beispiel der Option \Option{Aufschnitt} war es dabei notwendig, dass der +Anwender als Wert \PValue{true} oder \PValue{false} angibt. Es existierte +keine Fehlerbehandlung, falls der Anwender einen falschen Wert verwendet. Da +solche booleschen Schalter ein häufiger Anwendungsfall sind, kann man sie bei +\Package{scrbase} einfach mit \Macro{FamilyBoolKey} definieren. Dabei sind die +Argumente \PName{Mitglied}, \PName{Familie} und \PName{Schlüssel} die gleichen +wie bei \DescRef{\LabelBase.cmd.DefineFamilyKey} (siehe +\DescPageRef{scrbase.cmd.DefineFamilyKey}). Das Argument \PName{Schaltername} +ist der Name eines Schalter ohne den Präfix \Macro{if}. Existiert dieser +Schalter noch nicht, so wird er automatisch definiert und mit \PName{false} +voreingestellt. Intern verwendet \Macro{FamilyBoolKey} dann +\Macro{FamilySetBool} als \PName{Aktion} für +\DescRef{\LabelBase.cmd.DefineFamilyKey}. Der Säumniswert für eine solche +Option ist immer \PValue{true}. + +\Macro{FamilySetBool} wiederum versteht als \PName{Wert} neben \PValue{true} +auch die Werte \PValue{on} und \PValue{yes} zum Einschalten und neben +\PValue{false} auch die Werte \PValue{off} und \PValue{no} zum +Ausschalten. Wird ein unbekannter Wert übergeben, so wird die auf +\DescPageRef{\LabelBase.cmd.FamilyUnknownKeyValue} erklärte Anweisung +\DescRef{\LabelBase.cmd.FamilyUnknownKeyValue} aufgerufen und so +\DescRef{\LabelBase.cmd.FamilyKeyState} (siehe +\DescPageRef{\LabelBase.cmd.FamilyKeyState}) entsprechend gesetzt. Dadurch +kann dann gegebenenfalls eine Meldung über eine unbekannte Wertzuweisung +ausgegeben werden.% +\begin{Example} + Der Schlüssel \Option{Aufschnitt} soll in den Wurstpaketen etwas robuster + definiert werden, so dass Fehleingaben erkannt und behandelt + werden. Außerdem sollen alle Wurstpakete denselben Schalter + verwenden, so dass entweder alle Wurstpakete Aufschnitt produzieren oder + keines. +\begin{lstcode} + \FamilyBoolKey{Fleischermeister}{Aufschnitt}% + {@Aufschnitt} +\end{lstcode} + Ein Test, ob Aufschnitt produziert wird, sähe dann so aus: +\begin{lstcode} + \if@Aufschnitt + ... + \else + ... + \fi +\end{lstcode} + Dies wäre in allen drei Wurstpaketen identisch. Damit könnte man + prinzipiell die Eigenschaft »Aufschnitt« auch als Eigenschaft der Familie + definieren: +\begin{lstcode}[moretexcs={define@key}] + \@ifundefined{if@Aufschnitt}{% + \expandafter\newif + \csname if@Aufschnitt\endcsname + }{}% + \DefineFamilyKey[]{Fleischermeister}% + {Aufschnitt}[true]{% + \FamilySetBool{Fleischermeister}% + {Aufschnitt}% + {@Aufschnitt}% + {#1}% + } +\end{lstcode} + oder einfacher +\begin{lstcode} + \FamilyBoolKey[]{Fleischermeister}% + {Aufschnitt}% + {@Aufschnitt} +\end{lstcode} + unter Ausnutzung des Hinweises bezüglich leerer Mitglieder + \iftrue% Umbruchkorrekturtext + im Gegensatz zum Weglassen des optionalen Arguments + \fi% + auf \autopageref{explain:scrbase.macro.DefineFamilyKey}, der nicht nur für + \DescRef{\LabelBase.cmd.DefineFamilyKey}, sondern entsprechend auch für + \Macro{FamilyBoolKey} gilt. + + Da \DescRef{\LabelBase.cmd.FamilyKeyState} bereits von \Macro{FamilySetBool} + gesetzt wird, kann innerhalb der Definition der Option mit Hilfe von + \DescRef{\LabelBase.cmd.DefineFamilyKey} der Status gegebenenfalls auch + abgefragt werden. So könnte man im ersten Fall beispielsweise nach + \Macro{FamilySetBool} einen Test der Art: +\begin{lstcode} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + ... + \else + ... + \fi +\end{lstcode} + ergänzen, um zusätzliche Aktionen in Abhängigkeit davon, ob + \Macro{FamilySetBool} erfolgreich war oder nicht, + auszuführen. Es\textnote{Achtung!} ist zu beachten, dass an dieser Stelle + unbedingt ein Test mit Hilfe von \Macro{ifx} vorzunehmen ist. Expandierende + Tests wie \DescRef{\LabelBase.cmd.Ifstr} sind hier zu vermeiden. Sie können + abhängig vom aktuellen Status und dem Vergleichszustand zu unterschiedlichen + Fehlermeldungen und auch zu falschen Ergebnissen führen.% +\end{Example}% +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \Macro{FamilyInverseBoolKey}\OParameter{Mitglied}\Parameter{Familie} + \Parameter{Schlüssel}\Parameter{Schaltername} + \Macro{FamilySetInverseBool}\Parameter{Familie} + \Parameter{Schlüssel}\Parameter{Schaltername} + \Parameter{Wert} +\end{Declaration}% +Diese\ChangedAt{v3.27}{\Package{scrbase}} beiden Anweisungen unterscheiden +sich von \DescRef{\LabelBase.cmd.FamilyBoolKey} beziehungsweise +\DescRef{\LabelBase.cmd.FamilySetBool} nur dadurch, dass die Logik invertiert +wird. Das heißt, dass die Werte \PValue{true}, \PValue{yes} und \PValue{on} +den durch \PName{Schaltername} angegebenen Schalter auf \Macro{iffalse} setzen +und damit deaktivieren, während \PValue{false}, \PValue{no} und \PValue{off} +ihn zu \Macro{iftrue} werden lassen, also aktivieren.% +\EndIndexGroup + +\begin{Declaration} + \Macro{FamilyNumericalKey}\OParameter{Mitglied}\Parameter{Familie} + \Parameter{Schlüssel} + \OParameter{Säumniswert}\Parameter{Makroname}% + \Parameter{Werteliste} + \Macro{FamilySetNumerical}\Parameter{Familie}\Parameter{Schlüssel} + \Parameter{Makroname}\Parameter{Werteliste}% + \Parameter{Wert} +\end{Declaration} +Während Schalter nur zwei Werte annehmen können, gibt es auch Schlüssel, die +mehrere Werte kennen. So kann beispielsweise eine Ausrichtung nicht nur +entweder links oder nicht links, sondern auch links, mittig oder rechts +sein. Intern unterscheidet man solche Einstellungen dann gerne mit Hilfe von +\Macro{ifcase}\IndexCmd{ifcase}. Diese \TeX-Anweisung erwartet wiederum einen +numerischen Wert. Daher heißt bei \Package{scrbase} die Anweisung, mit der +man via \PName{Schlüssel} einem Makro eine Definition zuweisen kann, +entsprechend \Macro{FamilyNumericalKey}. + +Die \PName{Werteliste} hat dabei die Form: +%\begin{flushleft}\vskip\dp\strutbox\begin{tabular}{l} + \Parameter{Wert}\Parameter{Definition}\texttt{,}\linebreak[1]% + \Parameter{Wert}\Parameter{Definition}~\dots{} +%\end{tabular}\vskip\dp\strutbox\end{flushleft} +Über diese \PName{Werteliste} werden so nicht nur die erlaubten Werte für den +\PName{Schlüssel} angegeben. Für jeden erlaubten \PName{Wert} wird auch +gleich angegeben, wie bei Verwendung desselben das Makro +\Macro{\PName{Makroname}} definiert werden soll. Üblicherweise werden als +\PName{Definition} schlicht Zahlenwerte angegeben. Es sind zwar auch andere +Angaben möglich, derzeit gibt es aber die Einschränkung, dass +\PName{Definition} voll expandierbar sein muss und bei der Zuweisung auch +expandiert wird. +\begin{Example} + Die Wurst für den Wurstsalat kann unterschiedlich geschnitten werden. So + wäre es denkbar, dass der Aufschnitt einfach ungeschnitten bleibt oder in + grobe oder feine Streifen geschnitten werden soll. Diese Information soll in + der Anweisung \Macro{Schnitt} gespeichert werden. +\begin{lstcode} + \FamilyNumericalKey{Fleischermeister}% + {SalatSchnitt}{Schnitt}{% + {Kein}{Kein},{Nein}{Kein},% + {Grob}{Grob},% + {Fein}{Fein}% + } +\end{lstcode} + Dass nicht geschnitten werden soll, kann in diesem Fall vom Anwender sowohl + mit +\begin{lstcode} + \FamilyOptions{Fleischermeister}{SalatSchnitt=Kein} +\end{lstcode} + als auch mit +\begin{lstcode} + \FamilyOptions{Fleischermeister}{SalatSchnitt=Nein} +\end{lstcode} + angegeben werden. In beiden Fällen würde \Macro{Schnitt} mit dem Inhalt + \PValue{Kein} definiert. Es kann durchaus sinnvoll sein, dem Anwender wie in + diesem Beispiel mehrere Werte für denselben Zweck anzubieten. + + Nun ist es sehr wahrscheinlich, dass die Schnittart nicht ausgegeben, + sondern später ausgewertet werden soll. In diesem Fall sind die textuellen + Definitionen aber eher unpraktisch. Definiert man den Schlüssel hingegen als +\begin{lstcode} + \FamilyNumericalKey{Fleischermeister}% + {SalatSchnitt}{Schnitt}{% + {Kein}{0},{Nein}{0},% + {Grob}{1},% + {Fein}{2}% + } +\end{lstcode} + so kann später einfach in der Form +\begin{lstcode} + \ifcase\Schnitt + % ungeschnitten + \or + % grob geschnitten + \else + % fein geschnitten + \fi +\end{lstcode} + unterschieden werden. +\end{Example} + +Intern wird von \Macro{FamilyNumericalKey} dann +\DescRef{\LabelBase.cmd.DefineFamilyKey} mit der Anweisung +\Macro{FamilySetNumerical} verwendet. Wird an einen solchen Schlüssel ein +unbekannter Wert übergeben, so wird von \Macro{FamilySetNumerical} Anweisung +\DescRef{\LabelBase.cmd.FamilyUnknownKeyValue} (siehe +\DescPageRef{\LabelBase.cmd.FamilyUnknownKeyValue}) aufgerufen. Dies führt zu +einer Fehlersignalisierung, indem \DescRef{\LabelBase.cmd.FamilyKeyState} den +Status \DescRef{\LabelBase.cmd.FamilyKeyStateUnknownValue} annimmt (siehe +\DescPageRef{\LabelBase.cmd.FamilyKeyStateUnknownValue}). Daraus resultiert +beispielsweise bei der Verwendung als lokale Option dann eine +Fehlermeldung. Ebenso wird beim Aufruf von \Macro{FamilySetNumerical} auch der +Erfolg via \DescRef{\LabelBase.cmd.FamilyKeyStateProcessed} in +\DescRef{\LabelBase.cmd.FamilyKeyState} signalisiert.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyCounterKey}\OParameter{Mitglied}\Parameter{Familie} + \Parameter{Schlüssel} + \OParameter{Säumniswert}\Parameter{\LaTeX-Zähler} + \Macro{FamilySetCounter}\Parameter{Familie} + \Parameter{Schlüssel}\Parameter{\LaTeX-Zähler} + \Parameter{Wert} +\end{Declaration} +Während\ChangedAt{v3.12}{\Package{scrbase}} bei +\DescRef{\LabelBase.cmd.FamilyNumericalKey} ein Makro aufgrund eines +symbolischen Wertes auf einen korrespondierenden numerischen Wert +gesetzt wurde, gibt es natürlich auch Fälle, in denen ein \PName{Schlüssel} +direkt einen \PName{\LaTeX-Zähler} repräsentiert, dem unmittelbar ein +numerischer \PName{Wert} zugewiesen werden soll. Dazu dient die Anweisung +\Macro{FamilyCounterKey}, von der intern dann \Macro{FamilySetCounter} +aufgerufen wird. Dabei finden einige grundlegende Prüfungen des +\PName{Wert}-Arguments statt um festzustellen, ob dieses Argument für eine +Zuweisung an einen Zähler in Frage kommt. Die Zuweisung findet nur statt, wenn +diese Prüfungen gelingen. Allerdings können hier nicht alle Fehler erkannt +werden, so dass eine falsche Zuweisung auch zu einer Fehlermeldung von \TeX{} +selbst führen kann. Erkannte Fehler werden hingegen über +\DescRef{\LabelBase.cmd.FamilyKeyStateUnknownValue} signalisiert. + +Wurde\ChangedAt{v3.15}{\Package{scrbase}} kein Wert übergeben, so wird +stattdessen der \PName{Säumniswert} eingesetzt. Falls kein \PName{Säumniswert} +angegeben wird, kann später der \PName{Schlüssel} nur mit Wertübergabe +verwendet werden.% +\iffalse% Umbruchkorrekturtext +\ Anderenfalls wir mit +\DescRef{\LabelBase.cmd.FamilyKeyStateNeedValue} ein entsprechender Fehler +signalisiert und beispielsweise innerhalb \Macro{FamilyOptions} auch als +solcher gemeldet.% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyCounterMacroKey}\OParameter{Mitglied}\Parameter{Familie} + \Parameter{Schlüssel} + \OParameter{Säumniswert}\Parameter{Makro} + \Macro{FamilySetCounterMacro}\Parameter{Familie} + \Parameter{Schlüssel}\Parameter{Makro} + \Parameter{Wert} +\end{Declaration} +Diese\ChangedAt{v3.12}{\Package{scrbase}} beiden Anweisungen unterscheiden +sich von den zuvor erklärten \DescRef{\LabelBase.cmd.FamilyCounterKey} und +\DescRef{\LabelBase.cmd.FamilySetCounter} nur dadurch, dass nicht ein +\LaTeX-Zähler auf einen Wert gesetzt wird, sondern ein \PName{Makro} mit +diesem Wert definiert wird. Auch dabei wird \PName{Wert} lokal einem Zähler +zugewiesen und dann dessen expandierter Wert verwendet. Es gilt daher der Wert +zum Zeitpunkt des Aufrufs der Option.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyLengthKey}\OParameter{Mitglied}\Parameter{Familie} + \Parameter{Schlüssel} + \OParameter{Säumniswert}\Parameter{Länge} + \Macro{FamilySetLength}\Parameter{Familie} + \Parameter{Schlüssel}\Parameter{Länge} + \Parameter{Wert} + \Macro{FamilyLengthMacroKey}\OParameter{Mitglied}\Parameter{Familie} + \Parameter{Schlüssel} + \OParameter{Säumniswert}\Parameter{Makro} + \Macro{FamilySetLengthMacro}\Parameter{Familie} + \Parameter{Schlüssel}\Parameter{Makro} + \Parameter{Wert} + \Macro{FamilyUseLengthMacroKey}\OParameter{Mitglied}\Parameter{Familie} + \Parameter{Schlüssel} + \OParameter{Säumniswert}\Parameter{Makro} + \Macro{FamilySetUseLengthMacro}\Parameter{Familie} + \Parameter{Schlüssel}\Parameter{Makro} + \Parameter{Wert} +\end{Declaration} +Über\ChangedAt{v3.12}{\Package{scrbase}} \Macro{FamilyLengthKey} kann ein +\PName{Schlüssel} definiert werden, der eine \PName{Länge} +repräsentiert. Dabei spielt es keine Rolle, ob eine \LaTeX-Länge, ein +\TeX-Abstand oder eine \TeX-Ausdehnung als \PName{Länge} verwendet +wird. Intern wird die \PName{Länge} über \Macro{FamilySetLength} gesetzt. +Dabei finden einige grundlegende Prüfungen des \PName{Wert}-Arguments statt um +festzustellen, ob dieses Argument für eine Zuweisung an eine \PName{Länge} in +Frage kommt. Die Zuweisung findet nur statt, wenn diese Prüfungen +gelingen. Allerdings können hier nicht alle Fehler erkannt werden, so dass +eine falsche Zuweisung auch zu einer Fehlermeldung von \TeX{} selbst führen +kann. Erkannte Fehler werden hingegen über +\DescRef{\LabelBase.cmd.FamilyKeyStateUnknownValue} signalisiert. + +Wurde\ChangedAt{v3.15}{\Package{scrbase}} kein Wert übergeben, so wird +stattdessen der \PName{Säumniswert} eingesetzt. Falls kein \PName{Säumniswert} +angegeben wird, kann später der \PName{Schlüssel} nur mit Wertübergabe +verwendet werden. + +\Macro{FamilyLengthMacroKey} und \Macro{FamilySetLengthMacroKey} sowie +\Macro{FamilyUseLengthMacro} und \Macro{FamilySetUseLengthMacro} verwenden für +die Speicherung des Wertes keine \PName{Länge}, sondern ein \PName{Makro}. Bei +\Macro{FamilyLengthMacroKey} und \Macro{FamilySetLengthMacro} wird wie im +Falle einer \PName{Länge} der aktuelle \PName{Wert} zum Zeitpunkt der +Verwendung des Schlüssels beziehungsweise der Anweisung in \PName{Makro} +gespeichert. Dagegen wird bei +\Macro{FamilyUseLengthMacroKey}\ChangedAt{v3.20}{\Package{scrbase}} und +\Macro{FamilySetUseLengthMacro} \PName{Wert} selbst gespeichert. Damit wird +\PName{Wert} dann bei jeder Verwendung von \PName{Makro} neu ausgewertet.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyStringKey}\OParameter{Mitglied}\Parameter{Familie} + \Parameter{Schlüssel} + \OParameter{Säumniswert}\Parameter{Makro} + \Macro{FamilyCSKey}\OParameter{Mitglied}\Parameter{Familie} + \Parameter{Schlüssel} + \OParameter{Säumniswert}\Parameter{Makroname} +\end{Declaration} +Hier wird nun\ChangedAt{v3.08}{\Package{scrbase}} ein Schlüssel definiert, der +jeden beliebigen Wert annehmen kann. Der Wert wird in dem angegebenen +\PName{Makro} gespeichert. Wird das optionale Argument für den +\PName{Säumniswert} weggelassen, so entspricht \Macro{FamilyStringKey}: +\begin{lstcode}[escapeinside=><] + \DefineFamilyKey[>\PName{Mitglied}<]{>\PName{Familie}<}{>\PName{Schlüssel}<} + {\def>\PName{Makro}<{#1}} +\end{lstcode} +Existiert +das optionale Argument für den \PName{Säumniswert} so entspricht die Anweisung: +\begin{lstcode}[escapeinside=><] + \DefineFamilyKey[>\PName{Mitglied}<]{>\PName{Familie}<}{>\PName{Schlüssel}<} + [>\PName{Säumniswert}<] + {\def>\PName{Makro}<{#1}\FamilyKeyStateProcessed} +\end{lstcode} + +\begin{Example} + In der Voreinstellung sollen 250\,g Wurstsalat erzeugt werden. Die Menge + soll jedoch einfach per Option geändert werden können. Dazu wird die zu + erstellende Menge im Makro \Macro{Salatgewicht} gespeichert. Die Option, + über die das Gewicht geändert werden kann, soll \iffalse ebenfalls \fi + \PValue{Salatgewicht} heißen: +\begin{lstcode} + \newcommand*{\Salatgewicht}{250g} + \FamilyStringKey{Fleischermeister}% + {Salatgewicht}[250g]% + {\Salatgewicht} +\end{lstcode} + Soll nach einer Änderung + \iftrue% Umbruchkorrekturtext + wie +\begin{lstcode} + \FamilyOptions{Fleichermeister}{Salatgewicht=100g} +\end{lstcode} + \fi% + wieder die Standardmenge hergestellt + werden, so kann der Anwender die Option einfach ohne Gewichtsangabe + aufrufen: +\begin{lstcode} + \FamilyOptions{Fleischermeister}{Salatgewicht} +\end{lstcode} + Das ist möglich, weil die Standardmenge bei der Definition auch als + Säumniswert angegeben wurde. +\end{Example} +Da alle Werte unmittelbar für eine Makrodefinition verwendet werden, gibt es +keine unbekannten Werte. In der Wertzuweisung an den \PName{Schlüssel} dürfen +jedoch keine Absätze enthalten sein. + +Im\ChangedAt{v3.25}{\Package{scrbase}} Unterschied zu \Macro{FamilyStringKey} +erwartet \Macro{FamilyCSKey} kein Makro als letztes Argument, sondern +lediglich den Namen eines Makros, also beispielsweise nicht +\PParameter{\Macro{Salatgewicht}}, sondern \PParameter{Salatgewicht}.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyUnknownKeyValue}\Parameter{Familie}\Parameter{Schlüssel} + \Parameter{Wert}\Parameter{Werteliste} +\end{Declaration} +Diese Anweisung signalisiert über \DescRef{\LabelBase.cmd.FamilyKeyState} +einen Fehler aufgrund eines unbekannten oder unerlaubten Wertes. Dabei wird +als \PName{Werteliste} eine durch Komma separierte Liste von erlaubten Werten +der Form: +%\begin{flushleft}\vskip\dp\strutbox\begin{tabular}{l} + `\PName{Wert}'\texttt{,} `\PName{Wert}' \dots{} +%\end{tabular}\vskip\dp\strutbox\end{flushleft} +erwartet. Allerdings\ChangedAt{v3.12}{\Package{scrbase}} wird die +\PName{Werteliste} derzeit nicht ausgewertet. + +\begin{Example} + Für den Aufschnitt soll nun zusätzlich wählbar sein, ob er grob oder + fein geschnitten werden soll. Dabei ist grob die Voreinstellung, die auch + dann verwendet werden soll, wenn nicht angegeben wird, wie der Aufschnitt zu + schneiden ist. +\begin{lstcode} + \@ifundefined{if@Feinschnitt}{% + \expandafter + \newif\csname if@Feinschnitt\endcsname}{}% + \@ifundefined{if@Aufschnitt}{% + \expandafter + \newif\csname if@Aufschnitt\endcsname}{} + \DefineFamilyKey{Fleischermeister}% + {Aufschnitt}[true]{% + \FamilySetBool{Fleischermeister}{Aufschnitt}% + {@Aufschnitt}% + {#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \@Feinschnittfalse + \else + \Ifstr{#1}{fein}{% + \@Aufschnitttrue + \@Feinschnittrue + \FamilyKeyStateProcessed + }{% + \FamilyUnknownKeyValue{Fleichermeister}% + {Aufschnitt}% + {#1}{% + `true', `on', `yes', + `false`, `off`, `no', + `fein'% + }% + }% + \fi + }% +\end{lstcode} + Zunächst wird versucht, den booleschen Schalter für Aufschnitt über + \DescRef{\LabelBase.cmd.FamilySetBool} zu setzen. Gelingt dies, wurde also + \DescRef{\LabelBase.cmd.FamilyKeyState} zu + \DescRef{\LabelBase.cmd.FamilyKeyStateProcessed} definiert, wird + der Feinschnitt abgeschaltet. Anderenfalls wird überprüft, ob anstelle + eines gültigen Wertes für einen booleschen Schalter %der Wert + \PValue{fein} übergeben wurde. In diesem Fall wird sowohl der Feinschnitt, + als auch Aufschnitt aktiviert und mit Hilfe von + \DescRef{\LabelBase.cmd.FamilyKeyStateProcessed} der Erfolgs-Status + gesetzt. Ist auch das nicht der Fall, wird der von + \DescRef{\LabelBase.cmd.FamilySetBool} signalisierte Fehler-Zustand + neu auf \DescRef{\LabelBase.cmd.FamilyKeyStateUnknownValue} gesetzt. Die + Liste der üblichen erlaubten Werte von + \DescRef{\LabelBase.cmd.FamilySetBool} wird dabei um \PValue{fein} + ergänzt. Da diese Liste jedoch inzwischen nicht mehr verwendet wird, hätte + man auf den Aufruf von \Macro{FamilyUnknownKeyValue} im Beispiel auch + einfach verzichten und damit den Fehlerstatus von + \DescRef{\LabelBase.cmd.FamilySetBool} übernehmen können. + + Die bei den Tests verwendete Anweisung + \DescRef{\LabelBase.cmd.Ifstr}\IndexCmd{Ifstr} ist auf + \DescPageRef{scrbase.cmd.Ifstr} in \autoref{sec:scrbase.if} erklärt. +\end{Example} +% +\EndIndexGroup +\ExampleEndFix + + +\section{Verzweigungen} +\seclabel{if} + +Das Paket \Package{scrbase} stellt diverse Verzweigungsanweisungen zur +Verfügung. Dabei wird überwiegend die \LaTeX-Syntax mit Argumenten eingesetzt, +die man von Anweisungen wie \Macro{IfFileExists}\iffalse % Umbruchkorrektur +, \Macro{@ifundefined}, \Macro{@ifpackageloaded} und vielen weiteren\fi % +\ kennt. + +\begin{Declaration} + \Macro{Ifundefinedorrelax} + \Parameter{Name}\Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Diese\ChangedAt{v3.28}{\Package{scrbase}} Anweisung funktioniert +prinzipiell wie \Macro{@ifundefined} aus dem \LaTeX-Kern (siehe +\cite{latex:source2e}). Es wird also der \PName{Dann-Teil} ausgeführt, wenn +\PName{Name} der Name einer undefinierten Anweisung oder \Macro{\PName{Name}} +derzeit \Macro{relax} ist. Im Unterschied zu \Macro{@ifundefined} wird auch +bei älteren \LaTeX-Versionen % +\iftrue% Umbruchvarianten +weder Hash-Speicher belegt noch \Macro{\PName{Name}} % +\else% +\Macro{\PName{Name}} nicht % +\fi% +zu \Macro{relax}, wenn \Macro{\PName{Name}} zuvor undefiniert +war. +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifnotundefined}\Parameter{Name}% + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Ist\ChangedAt{v3.28}{\Package{scrbase}} die Anweisung mit dem angegebenen +Namen bereits definiert wird der \PName{Dann-Teil} ausgeführt, anderenfalls +der \PName{Sonst-Teil}.\iftrue % Umbruchkorrektur +\ Da es bereits ein Paket mit einer inkompatiblen +Anweisung \Macro{Ifdefined} gibt, musste leider diese etwas unhandliche +Bezeichnung gewählt werden.% +\iffalse% +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifstr}\Parameter{Zeichenfolge}\Parameter{Zeichenfolge}% + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Die\ChangedAt{v3.28}{\Package{scrbase}} beiden Argumente \PName{Zeichenfolge} +werden expandiert und dann verglichen. Sind sie gleich, so wird der +\PName{Dann-Teil} ausgeführt, anderenfalls der \PName{Sonst-Teil}.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifstrstart}\Parameter{Zeichenfolge}\Parameter{Zeichenfolge} + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Die\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +beiden Argumente \PName{Zeichenfolge} werden expandiert und dann +verglichen. Beginnt die erste Zeichenfolge, von Leerzeichen abgesehen, mit der +zweiten Zeichenfolge, so wird der \PName{Dann-Teil} ausgeführt, anderenfalls +der \PName{Sonst-Teil}.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfArgIsEmpty}\Parameter{Argument}% + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Ist\ChangedAt{v3.19}{\Package{scrbase}} das \PName{Argument} leer, so wird der +\PName{Dann-Teil} ausgeführt, anderenfalls der \PName{Sonst-Teil}. Bereits ein +Leerzeichen gilt als nicht leer. Da das \PName{Argument} nicht expandiert +wird, gelten Makros, die zu einem leeren Ergebnis expandieren, ebenfalls als +nicht leeres \PName{Argument}. Dasselbe gilt für \Macro{relax} oder nicht +definierte Makros.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifpdfoutput} + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Wird\ChangedAt{v3.28}{\Package{scrbase}} eine PDF-Datei erzeugt, wird der +\PName{Dann-Teil} ausgeführt, anderenfalls der \PName{Sonst-Teil}. Dabei ist +es unerheblich, ob die PDF-Datei mit Hilfe von lua\TeX{}, pdf\TeX{}, V\TeX{} +oder \XeTeX{} erzeugt wird.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifpsoutput} + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Wird\ChangedAt{v3.28}{\Package{scrbase}} eine PostScript-Datei erzeugt, wird +der \PName{Dann-Teil} ausgeführt, anderenfalls der \PName{Sonst-Teil}. V\TeX{} +kann PostScript direkt erzeugen, was hier erkannt wird. Wird hingegen kein +V\TeX{} verwendet, ist aber ein Schalter \Macro{if@dvips} definiert, so wird +die Entscheidung darüber getroffen. \KOMAScript{} stellt \Macro{if@dvips} in +\hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea}% +\IndexCmd{if@dvips} bereit.% +\EndIndexGroup + + +\begin{Declaration}[0] + \Macro{Ifdvioutput} + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Wird \ChangedAt{v3.28}{\Package{scrbase}}eine DVI-Datei erzeugt, so wird der +\PName{Dann-Teil} ausgeführt, anderenfalls der \PName{Sonst-Teil}. Es wird +immer dann davon \iffree{}{\pagebreak}% Umbruchkorrektur +ausgegangen, dass eine DVI-Datei erzeugt wird, wenn keine +direkte Ausgabe einer PDF- oder Postscript-Datei erkannt werden kann.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisdimen}\Parameter{Code}\Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Wenn\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +die Expansion von \PName{Code} in einem \Macro{dimen}, also einem +\TeX-Längenregister, resultiert, wird der \PName{Dann-Teil} ausgeführt, +anderenfalls der \PName{Sonst-Teil}. Die Anweisung ist nicht voll +expandierbar.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisdimension}\Parameter{Code}% + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Wenn\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +die Expansion von \PName{Code} in etwas resultiert, das syntaktisch dem Wert +einer Länge entspricht, wird der \PName{Dann-Teil} ausgeführt, anderenfalls +der \PName{Sonst-Teil}. Es ist zu beachten,\textnote{Achtung!} dass derzeit +unbekannte oder fehlende Einheiten zu einer Fehlermeldung führen. Die +Anweisung ist nicht voll expandierbar.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifdimen}\Parameter{Zeichenfolge}% + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Der\ChangedAt{v3.28}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{Dann-Teil} wird ausgeführt, wenn die einfache Expansion der +\PName{Zeichenfolge} eine gültige Länge mit einer gültigen Längeneinheit +ergibt. Anderenfalls wird der \PName{Sonst-Teil} verwendet.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisdimexpr}\Parameter{Code} + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Wenn\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +die Expansion von \PName{Code} in einer \Macro{dimexpr}\IndexCmd{dimexpr}, +also einem \eTeX-Längenausdruck resultiert, wird der \PName{Dann-Teil} +ausgeführt, anderenfalls der \PName{Sonst-Teil}. Es ist zu +beachten,\textnote{Achtung!} dass fehlerhafte Ausdrücke zu Fehlermeldungen +führen. Die Anweisung ist nicht voll expandierbar.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisskip}\Parameter{Code}\Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Wenn\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +die Expansion von \PName{Code} in einem \Macro{skip}, also einem \TeX-Abstand, +resultiert, wird der \PName{Dann-Teil} ausgeführt, anderenfalls der +\PName{Sonst-Teil}. Die Anweisung ist nicht voll expandierbar.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisglue}\Parameter{Code}% + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Wenn\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +die Expansion von \PName{Code} in etwas resultiert, das syntaktisch dem Wert +eines Abstandes entspricht, wird der \PName{Dann-Teil} ausgeführt, +anderenfalls der \PName{Sonst-Teil}. Es ist zu beachten,\textnote{Achtung!} +dass derzeit unbekannte oder fehlende Einheiten zu einer Fehlermeldung +führen. Die Anweisung ist nicht voll expandierbar.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\iffree{\begin{Declaration}}{\begin{Declaration}[0]}% Umbruchkorrektur + \Macro{Ifisglueexpr}\Parameter{Code}% + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Wenn\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +die Expansion von \PName{Code} in einer \Macro{glueexpr}\IndexCmd{glueexpr}, +also einem \mbox{\eTeX}-Abstandsausdruck resultiert, wird der +\PName{Dann-Teil} ausgeführt, \iffree{}{\pagebreak}% Umbruchkorrektur +anderenfalls der \PName{Sonst-Teil}. Es ist zu beachten,\textnote{Achtung!} +dass fehlerhafte Ausdrücke zu Fehlermeldungen führen. Die Anweisung ist nicht +voll expandierbar.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifiscounter}\Parameter{Zähler}% + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Wenn\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{Zähler} ein definierter \LaTeX-Zähler ist, wird der \PName{Dann-Teil} +ausgeführt, anderenfalls der \PName{Sonst-Teil}. Die Anweisung ist nicht voll +expandierbar.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifiscount}\Parameter{Code}\Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Wenn\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +die Expansion von \PName{Code} in einem \Macro{count}, also einem \TeX-Zähler, +resultiert, wird der \PName{Dann-Teil} ausgeführt, anderenfalls der +\PName{Sonst-Teil}. Die Anweisung ist nicht voll expandierbar. Für einen Test +auf einen \LaTeX-Zähler siehe \DescRef{\LabelBase.cmd.Ifiscounter}.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisinteger}\Parameter{Code}% + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Wenn\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +die Expansion von \PName{Code} in etwas resultiert, das syntaktisch dem Wert +eines Zählers entspricht, also eine negative oder positive ganze Zahl ist, +wird der \PName{Dann-Teil} ausgeführt, anderenfalls der +\PName{Sonst-Teil}. Die Anweisung ist nicht voll expandierbar.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifnumber}\Parameter{Zeichenfolge}% + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Der\ChangedAt{v3.28}{\Package{scrbase}} \PName{Dann-Teil} wird ausgeführt, +wenn die einfache Expansion der \PName{Zeichenfolge} nur aus Ziffern +besteht. In allen anderen Fällen wird der \PName{Sonst-Teil} verwendet.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisnumexpr}\Parameter{Code}% + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Wenn\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +die Expansion von \PName{Code} in einer \Macro{numexpr}\IndexCmd{numexpr}, +also einem \eTeX-Zahlenausdruck resultiert, wird der \PName{Dann-Teil} +ausgeführt, anderenfalls der \PName{Sonst-Teil}. Es ist zu +beachten,\textnote{Achtung!} dass fehlerhafte Ausdrücke zu Fehlermeldungen +führen. Die Anweisung ist nicht voll expandierbar.% +\iffalse% Umbruchkorrektur +\iftrue% Umbruchvarianten +\ Von dieser Anweisung gibt es keine interne Variante.% +\else% +\ Es gibt keine interne Variante.% +\fi% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfActiveMkBoth}\Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Bei\ChangedAt{v3.27}{\Package{scrbase}} der Umschaltung zwischen automatischen +und manuellen Kolumnentiteln, verwendet der \LaTeX-Kern die Anweisung +\DescRef{scrlayer.cmd.@mkboth}\important{\Macro{@mkboth}}\IndexCmd{@mkboth}. +Im Falle automatischer Kolumnentitel setzt diese normalerweise sowohl den +linken als auch rechten Markenanteil. Im Falle manueller Kolumnentiteln setzt +sie keine Marke. Will man wissen, ob \DescRef{scrlayer.cmd.@mkboth} Marken +setzt oder nicht, so verwenden viele Pakete einen Vergleich entweder mit +\DescRef{maincls.cmd.markboth}\IndexCmd{markboth} oder +\Macro{@gobbletwo}. Dies deckt aber nicht alle Fälle von möglichen +Umdefinierungen von \DescRef{scrlayer.cmd.@mkboth} ab. Daher testet +\Macro{IfActiveMkBoth}, ob \DescRef{scrlayer.cmd.@mkboth} tatsächlich zum +Setzen einer Marke führen würde und deckt dabei sogar die Verwendung von +\Macro{marks} für die Definition von \DescRef{scrlayer.cmd.@mkboth} ab. Wird +ein solches aktives \DescRef{scrlayer.cmd.@mkboth} entdeckt, so wird der +\PName{Dann-Teil} ausgeführt. In allen anderen Fällen wird der +\PName{Sonst-Teil} ausgeführt.% +\begin{Example} + Angenommen, Sie wollen in einem Paket im Fall der Verwendung automatischer + Kolumnentitel, wie sie beispielsweise der Seitenstil + \PageStyle{headings}\IndexPagestyle{headings} aktiviert, nur die rechte + Marke setzen und die linke unverändert lassen, wohingegen bei Verwendung + manueller Kolumentitel die Marken unverändert bleiben sollen. In einem + ersten Ansatz verwenden Sie dafür: +\begin{lstcode} + \ifx\@mkboth\markboth \markright{Kolumnentitel}\fi +\end{lstcode} + Etwas später entdecken Sie, dass irgendein Paket nicht wie gewohnt +\begin{lstcode} + \let\@mkboth\markboth +\end{lstcode} + sondern +\begin{lstcode} + \renewcommand{\@mkboth}{\markboth} +\end{lstcode} + verwendet hat, um automatische Kolumnentitel zu aktivieren. Daher ruft Ihr + Vergleich niemals die \DescRef{maincls.cmd.markright}-Anweisung auf. Daher + ändern Sie den Vergleich oben zu +\begin{lstcode} + \ifx\@mkboth\@gobbletwo + \else \markright{Kolumnentitel}\fi +\end{lstcode} + Leider wird nun \DescRef{maincls.cmd.markright} auch bei manuellen + Kolumentiteln aufgerufen, weil irgend jemand für diesen Fall +\begin{lstcode} + \renewcommand{\@mkboth}[2]{% + \typeout{DEBUG: ignoring running head setting}% + } +\end{lstcode} + definiert hat. + + Beide Probleme sind jedoch mit Hilfe von \Package{scrbase} einfach zu lösen: +\begin{lstcode} + \IfActiveMkBoth{\markright{Kolumnentitel}}{} +\end{lstcode}% +\end{Example} +Noch einfacher lässt sich das Problem aus dem Beispiel % +\iffalse übrigens \fi % Umbruchkorrektur +mit Hilfe von \DescRef{scrlayer.cmd.@mkright} aus Paket +\hyperref[cha:scrlayer]{\Package{scrlayer}} lösen (siehe +\autoref{sec:scrlayer.pagestyle.content}, +\DescPageRef{scrlayer.cmd.@mkright}).% +\EndIndexGroup + + +\begin{Declaration}[0] + \Macro{if@atdocument}\ \PName{Dann-Teil}\ % + \textMacro{else}\ \PName{Sonst-Teil} \textMacro{fi} +\end{Declaration} +Diese Verzweigung in \TeX-Syntax existiert bewusst nur als interne +Anweisung. In der Dokumentpräambel ist \Macro{if@atdocument} \Macro{iffalse}, +nach \Macro{begin}\PParameter{document} entspricht \Macro{if@atdocument} dann +\Macro{iftrue}. Klassen- und Paketautoren können dieses Anweisung manchmal +sinnvoll nutzen, wenn sich Anweisungen in der Dokumentpräambel anders +verhalten sollen als innerhalb des Dokuments. Es\textnote{Achtung!} ist zu +beachten, dass es sich bei dieser Anweisung um eine Verzweigung in \TeX-Syntax +und nicht in \LaTeX-Syntax handelt. Ab\ChangedAt{v3.37}{\Package{scrbase}} +\LaTeX{} 2020/10/01 wird \Macro{@atdocumenttrue} von \Package{scrbase} über +den generischen \LaTeX-Hook \texttt{begindocument/before} ausgeführt. Daher +ist der Zustand bereits für \Macro{BeginDocument} für Klassen und alle Pakete +\Macro{iftrue}. Für Verwendung von \Macro{if@atdocument} mit dem generischen +\LaTeX-Hook \texttt{begindocument/before} wird hingegen gegebenenfalls eine +zusätzliche Hook-Regel benötigt, um einen definierten Zustand zu erreichen.% +\EndIndexGroup + + +\section{Definition sprachabhängiger Bezeichner} +\seclabel{languageSupport} +\BeginIndexGroup +\BeginIndex{}{Sprachdefinition} + +\iffalse% Umbruchkorrektur +Anfänger haben häufig Probleme damit, sprachabhängige Begriffe wie +\Macro{listfigurename}\IndexCmd{listfigurename}, in der Voreinstellung meist +»List of Figures« beziehungsweise in Deutsch: »Abbildungsverzeichnis«, zu +ändern. Werden diese beispielsweise einfach mit \Macro{renewcommand} in der +Dokumentpräambel umdefiniert, so überleben sie eine spätere Umschaltung der +Sprache nicht. Bei Verwendung von \Package{babel}\IndexCmd{babel} wird die +Umdefinierung in der Dokumentpräambel bereits von +\Macro{begin}\PParameter{document} wieder überschrieben. +\fi + +Normalerweise muss man zur Definition oder zur Änderung sprachabhängiger +Begriffe Anweisungen wie \Macro{captionsngerman} so umdefinieren, dass +zusätzlich zu den bisherigen Begriffen auch die neuen oder geänderten +definiert werden. Erschwert wird dieses Vorhaben dadurch, dass beim Laden +eines Pakets wie \Package{babel}\IndexPackage{babel} oder +\Package{polyglossia}\IndexPackage{polyglossia} diese Anweisungen von den +Paketen erneut definiert werden. Bei den genannten Paketen geschieht dies, +indem alle zuvor gemachten Änderungen überschrieben werden. Aus diesem Grund +ist es sinnvoll, eigene Änderungen bis nach dem Laden entsprechender Pakete +oder mit Hilfe von \Macro{AtBeginDocument} bis +\Macro{begin}\PParameter{document} zu verzögern. + +Darüber hinaus kommt erschwerend hinzu, dass einige Pakete zusätzliche, +sprachabhängige Begriffe in \Macro{captions\PName{Sprache}} definieren, +während andere dafür \Macro{extras\PName{Sprache}} verwenden. So muss der +Anwender sich schon sehr genau auskennen, um die richtige Anweisung auf die +richtige Weise zu ergänzen. + +Das Paket \Package{scrbase} bietet dem Anwender daher für die Definition und +Änderung selbst einige zusätzliche Anweisungen, die ihn von vielen dieser +Überlegungen befreit. Gleichzeitig erlauben die Befehle, die +sprachabhängigen Begriffe mehrerer Dialekte oder Ausprägungen einer Sprache +gleichzeitig zu definieren oder zu ändern. + +\begin{Declaration} + \Macro{defcaptionname} + \Parameter{Sprachliste}\Parameter{Begriff}\Parameter{Inhalt} + \Macro{providecaptionname} + \Parameter{Sprachliste}\Parameter{Begriff}\Parameter{Inhalt} + \Macro{newcaptionname} + \Parameter{Sprachliste}\Parameter{Begriff}\Parameter{Inhalt} + \Macro{renewcaptionname} + \Parameter{Sprachliste}\Parameter{Begriff}\Parameter{Inhalt} + \Macro{defcaptionname*} + \Parameter{Sprachliste}\Parameter{Begriff}\Parameter{Inhalt} + \Macro{providecaptionname*} + \Parameter{Sprachliste}\Parameter{Begriff}\Parameter{Inhalt} + \Macro{newcaptionname*} + \Parameter{Sprachliste}\Parameter{Begriff}\Parameter{Inhalt} + \Macro{renewcaptionname*}% + \Parameter{Sprachliste}\Parameter{Begriff}\Parameter{Inhalt} +\end{Declaration} +Mit Hilfe dieser Anweisungen ist es möglich, einem \PName{Begriff} in +Abhängigkeit der Sprache einen \PName{Inhalt} zuzuweisen. Mehrere Sprachen +können durch Komma voneinander getrennt als +\PName{Sprachliste}\ChangedAt{v3.12}{\Package{scrbase}} angegeben werden. +Der \PName{Begriff} ist immer ein Makro. Die Arbeitsweise der Anweisungen +unterscheidet sich je nachdem, ob eine Sprache und ein \PName{Begriff} +innerhalb der Sprache zum Zeitpunkt des Aufrufs bereits definiert ist. + +Ist eine Sprache nicht definiert, vermerkt \Macro{providecaptionname} das +lediglich in \File{log}-Datei. Dabei wird für jede Sprache nur einmal eine +entsprechende Information in die \File{log}-Datei geschrieben. Ist die Sprache +definiert, enthält aber bisher keinen entsprechenden \PName{Begriff}, so wird +er mit dem angegebenen \PName{Inhalt} definiert. Ist der \PName{Begriff} +hingegen in der Sprache bereits definiert, so wird er nicht umdefiniert, +sondern ebenfalls ein entsprechender Hinweis in die \File{log}-Datei +geschrieben. + +Ist dagegen bei \Macro{newcaptionname} +eine Sprache nicht definiert, dann wird diese neu definiert, indem eine +entsprechende Anweisung definiert wird. Für die Sprache +\PValue{ngerman} wäre das beispielsweise \Macro{captionsngerman}. Außerdem +wird darüber auch in der \File{log}-Datei informiert. Ist die Sprache +definiert, der \PName{Begriff} in dieser Sprache aber noch nicht +vorhanden, so wird er mit dem gewünschten \PName{Inhalt} definiert. Ist der +\PName{Begriff} in der Sprache bereits vorhanden, so wird eine +Fehlermeldung ausgegeben. + +Ist bei Anweisung \Macro{renewcaptionname} eine Sprache nicht definiert, so +wird eine Fehlermeldung ausgegeben. Ist die Sprache definiert, der +\PName{Begriff} in dieser Sprache jedoch nicht, so wird ebenfalls eine +Fehlermeldung ausgegeben. Ist der \PName{Begriff} in der Sprache definiert, so +wird er auf den gewünschten \PName{Inhalt} umdefiniert. + +Die\ChangedAt{v3.12}{\Package{scrbase}} Anweisung \Macro{defcaptionname} +definiert einen \PName{Begriff} immer, überschreibt also eventuell vorhandene +Definitionen. Wie bei \Macro{providecaptionname} braucht eine angegebene +Sprache nicht definiert zu sein. + +\KOMAScript{} selbst verwendet \Macro{providecaptionname} um beispielsweise +die Begriffe aus \autoref{sec:scrlttr2-experts.languages}, +\DescPageRef{scrlttr2-experts.cmd.yourrefname} zu definieren. + +\begin{Example} + Möchten Sie »Abb.« statt »Abbildung« in den Abbildungsunterschriften, so + erreichen Sie dies mit: +\begin{lstcode} + \renewcaptionname{ngerman}{\figurename}{Abb.} +\end{lstcode} + + Soll dieselbe Änderung nicht nur für \PValue{ngerman}, sondern + auch für die Sprachen \PValue{naustrian} und \PValue{nswissgerman}, also für + Österreichisch und Schweizer Deutsch gelten, so ist + es nicht notwendig zwei weitere Anweisungen: +\begin{lstcode} + \renewcaptionname{naustrian}{\figurename}{Abb.} + \renewcaptionname{nswissgerman}{\figurename}{Abb.} +\end{lstcode} + hinzuzufügen. Stattdessen kann einfach, die \PName{Sprachliste} erweitert + werden: +\begin{lstcode} + \renewcaptionname{ngerman,naustrian,nswissgerman}% + {\figurename}{Abb.} +\end{lstcode} + In gleicher Weise können auch \PValue{german}, \PValue{austrian} und + \PValue{swissgerman}, also Deutsch, Österreichisch und Schweizer Deutsch + nach der veralteten Rechtschreibung, hinzugefügt werden. +\end{Example} +\iffalse % Das ist 6 Jahre her und damit nicht mehr von Belang! +\begin{Explain} + Die Sprachen \PValue{swissgerman} und \PValue{nswissgerman} werden übrigens + von älteren Versionen von \Package{babel} noch nicht unterstützt. Sie sind + erst seit Dezember~2013 Bestandteil des deutschen Sprachpakets für + \Package{babel}. Für die Anweisungen \Macro{defcaptionname}, + \Macro{newcaptionname} und \Macro{providecaptionname} spielt dies kaum eine + Rolle, da diese auch Begriffe für nicht existierende Sprachen definieren + können. Da mit \Macro{renewcaptionname} jedoch nur existierende Begriffe von + existierenden Sprachen umdefiniert werden können, resultiert die + Umdefinierung für \Option{nswissgerman} und \Option{swissgerman} bei + Verwendung einer älteren Version von \Package{babel} in einer entsprechenden + Fehlermeldung. +\end{Explain}% +\fi + +Es\ChangedAt{v3.12}{\Package{scrbase}} ist nicht erforderlich, die Definierung +oder Umdefinierung via \Macro{AtBeginDocument} bis +\Macro{begin}\PParameter{document} zu verzögern. Stattdessen erledigt +\Package{scrbase} das selbst, falls die Anweisungen in der Dokumentpräambel +aufgerufen werden. Außerdem prüft \Package{scrbase} auch, ob ein +umzudefinierender Begriff statt in \Macro{captions\PName{Sprache}} in +\Macro{extras\PName{Sprache}} zu definieren ist. Die Sternvarianten der +Befehle verwenden grundsätzlich \Macro{extras\PName{Sprache}}, da dessen +Definitionen in der Regel nach \Macro{captions\PName{Sprache}} Anwendung +finden. Damit funktioniert auch das Umdefinieren von sprachabhängigen +Bezeichnern von Paketen\iffalse\ wie \Package{hyperref}\fi, die dafür +\Macro{extras\PName{Sprache}} verwenden. + +In \autoref{tab:scrbase.commonNames} ist ein Überblick über die üblicherweise +von Klassen und Sprachpaketen definierten Begriffe und deren Verwendung zu +finden.\iffree{}{ \KOMAScript{} selbst definiert noch einige weitere + Begriffe. Siehe dazu \autoref{sec:scrlttr2-experts.languages} ab + \DescPageRef{scrlttr2-experts.cmd.yourrefname}.} +% +%\iffree{}{\enlargethispage{4pt}}% Umbruchkorrektur +\begin{desclist} + \renewcommand*{\abovecaptionskipcorrection}{-\normalbaselineskip}% + \desccaption[{% + Überblick über übliche sprachabhängige Begriffe% + }]{% + Überblick über sprachabhängige Begriffe in den üblichen + Sprachpaketen\label{tab:scrbase.commonNames}% + }{% + Überblick über übliche sprachabhängige Begriffe + (\emph{Fortsetzung})% + }% + \entry{\Macro{abstractname}}{% + Überschrift für die Zusammenfassung% + \IndexCmd{abstractname}% + }% + \entry{\Macro{alsoname}}{% + »siehe auch« bei ergänzenden Verweisen im Stichwortverzeichnis% + \IndexCmd{alsoname}% + }% + \entry{\Macro{appendixname}}{% + »Anhang« in der Kapitelüberschrift eines Anhangs% + \IndexCmd{appendixname}% + }% + \entry{\Macro{bibname}}{% + Überschrift für das Literaturverzeichnis% + \IndexCmd{bibname}% + }% + \entry{\Macro{ccname}}{% + Spitzmarke für den Verteiler in Briefen% + \IndexCmd{ccname}% + }% + \entry{\Macro{chaptername}}{% + »Kapitel« in der Kapitelüberschrift% + \IndexCmd{chaptername}% + }% + \entry{\Macro{contentsname}}{% + Überschrift für das Inhaltsverzeichnis% + \IndexCmd{contentsname}% + }% + \entry{\Macro{enclname}}{% + Spitzmarke für die Anlagen bei Briefen% + \IndexCmd{enclname}% + }% + \entry{\Macro{figurename}}{% + Spitzmarke in der Abbildungsunterschrift% + \IndexCmd{figurename}% + }% + \entry{\Macro{glossaryname}}{% + Überschrift für das Glossar% + \IndexCmd{glossaryname}% + }% + \entry{\Macro{headtoname}}{% + »An« im Briefkopf% + \IndexCmd{headtoname}% + }% + \entry{\Macro{indexname}}{% + Überschrift für das Stichwortverzeichnis% + \IndexCmd{indexname}% + }% + \entry{\Macro{listfigurename}}{% + Überschrift für das Abbildungsverzeichnis% + \IndexCmd{listfigurename}% + }% + \entry{\Macro{listtablename}}{% + Überschrift für das Tabellenverzeichnis% + \IndexCmd{listtablename}% + }% + \entry{\Macro{pagename}}{% + »Seite« in der Seitennummer von Briefen% + \IndexCmd{pagename}% + }% + \entry{\Macro{partname}}{% + »Teil« in der Teileüberschrift% + \IndexCmd{partname}% + }% + \entry{\Macro{prefacename}}{% + Überschrift für das Vorwort% + \IndexCmd{prefacename}% + }% + \entry{\Macro{proofname}}{% + Spitzmarke bei Beweisen% + \IndexCmd{proofname}% + }% + \entry{\Macro{refname}}{% + Überschrift für das Quellenverzeichnis% + \IndexCmd{refname}% + }% + \entry{\Macro{seename}}{% + »siehe« bei Verweisen im Stichwortverzeichnis% + \IndexCmd{seename}% + }% + \entry{\Macro{tablename}}{% + Spitzmarke in der Tabellenunter- bzw. "~überschrift% + \IndexCmd{tablename}% + }% +\end{desclist} +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Identifikation von \KOMAScript} +\seclabel{identify} + +Obwohl -- oder gerade weil -- \Package{scrbase} ganz allgemein als Paket für +Klassen- und Paketautoren konzipiert ist, wird es natürlich von den +\KOMAScript-Klassen und den meisten \KOMAScript-Paketen verwendet. Es enthält +daher auch eine Anweisung, die in allen \KOMAScript-Klassen und allen +grundlegenden \KOMAScript-Paketen vorhanden ist. + + +\begin{Declaration} + \Macro{KOMAScriptVersion} +\end{Declaration} +Bei \KOMAScript{} ist in dieser Anweisung die Hauptversion von \KOMAScript{} +in der Form »\PName{Datum} \PName{Version} \texttt{KOMA-Script}« +abgelegt. Diese Hauptversion ist für alle \KOMAScript-Klassen und alle +\KOMAScript-Pakete, die von den Klassen verwendet werden, gleich. Daher kann +sie auch nach dem Laden von \Package{scrbase} abgefragt werden. Diese +Anleitung wurde beispielsweise mit der \KOMAScript-Version +»\KOMAScriptVersion« erstellt. Das Vorhandensein der Anweisung ist ein +starkes Indiz dafür, dass zumindest ein \KOMAScript-Paket verwendet wird.% +\EndIndexGroup + + +\section{Erweiterungen des \LaTeX-Kerns} +\seclabel{latexkernel} + +In einigen Fällen stellt der \LaTeX-Kern selbst Anweisungen zur Verfügung, +lässt aber ganz ähnliche Anweisungen, die ebenfalls häufiger benötigt werden +oder eigentlich nahe liegen, vermissen. Einige wenige solcher Anweisungen +für Klassen- und Paketautoren stellt \Package{scrbase} zur Verfügung. + +\begin{Declaration} + \Macro{ClassInfoNoLine}\Parameter{Klassenname}\Parameter{Information} + \Macro{PackageInfoNoLine}\Parameter{Paketname}\Parameter{Information} +\end{Declaration}% +Der \LaTeX-Kern bietet dem Klassen- und Paketautor zwar Anweisungen wie +\Macro{PackageInfo} und \Macro{ClassInfo}, um Informationen mit aktueller +Zeilennummer in die Log-Datei zu schreiben. Er bietet neben +\Macro{PackageWarning} und \Macro{ClassWarning}, die Warnungen mit aktueller +Zeilennummer ausgeben, auch die beiden Anweisungen +\Macro{PackageWarningNoLine} und \Macro{ClassWarningNoLine}, um Warnungen ohne +Zeilennummer auszugeben. Die naheliegenden Anweisungen +\Macro{ClassInfoNoLine} und \Macro{PackageInfoNoLine}, um auch Informationen +ohne Zeilennummer in die Log-Datei zu schreiben, fehlen jedoch. Diese werden +von \Package{scrbase} bereitgestellt. +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{l@addto@macro}\Parameter{Anweisung}\Parameter{Erweiterung}% +\end{Declaration}% +Der \LaTeX-Kern bietet mit \Macro{g@addto@macro} eine interne Anweisung, um +die Definition eines Makro \PName{Anweisung} global um den Code +\PName{Erweiterung} zu erweitern. Das funktioniert in dieser Form nur für +Makros ohne Argumente. Dennoch könnte man die Anweisung in einigen Fällen +auch in einer Form benötigen, die lokal zur aktuellen Gruppe arbeitet. Diese +wird mit \Macro{l@addto@macro} von \Package{scrbase} bereitgestellt. Eine +Alternative stellt hier die Verwendung des Pakets +\Package{etoolbox}\IndexPackage{etoolbox} oder +\Package{xpatch}\IndexPackage{xpatch} dar, die eine ganze Reihe solcher +Anweisungen für unterschiedliche Zwecke bieten (siehe +\cite{package:etoolbox} oder \cite{package:xpatch}). +% +\EndIndexGroup + + +\section{Erweiterungen der mathematischen Fähigkeiten von \eTeX} +\seclabel{etex} + +Das für \LaTeX{} inzwischen verwendete und von \KOMAScript{} vorausgesetzte +\eTeX{} besitzt mit \Macro{numexpr}\IndexCmd{numexpr} erweiterte Möglichkeiten +zur Berechnung einfacher Ausdrücke mit \TeX-Zählern und ganzen Zahlen. Als +Operationen werden dabei die vier Grundrechenarten und Klammern +unterstützt. Bei der Division wird korrekt gerundet. +\iffalse Manchmal sind weitere Operationen nützlich.\fi% Umbruchkorrektur + +\begin{Declaration} + \Macro{XdivY}\Parameter{Dividend}\Parameter{Divisor} + \Macro{XmodY}\Parameter{Dividend}\Parameter{Divisor} +\end{Declaration}% +\BeginIndex{Cmd}{XdivY}% +\BeginIndex{Cmd}{XmodY}% +Die\ChangedAt{v3.05a}{\Package{scrbase}} Anweisung \Macro{XdivY} liefert den +Wert des ganzzahligen Quotienten, die Anweisung \Macro{XmodY} den Wert des +Rests der Division mit Rest. Diese Art der Division ist nach der Gleichung +\[ +\textit{Dividend} = \textit{Divisor} \cdot +\textit{Quotient} + \textit{Rest} +\] +% +definiert, wobei \textit{Dividend}, \textit{Divisor} und \textit{Rest} ganze +Zahlen und \textit{Rest} außerdem größer oder gleich 0 und kleiner als +\textit{Divisor} ist. Der \textit{Divisor} ist eine natürliche Zahl (ohne die +0). + +Der Wert kann jeweils zur Zuweisung an einen Zähler oder direkt innerhalb +eines Ausdrucks mit \Macro{numexpr}\IndexCmd{numexpr} verwendet werden. Zur +Ausgabe als arabische Zahl ist \Macro{the} voranzustellen.% +% +\EndIndexGroup + + +\section[{Mechanismus für mehrstufige Haken}] +{Mechanismus für mehrstufige + Haken\ChangedAt{v3.27}{\Package{scrbase}}} +\seclabel{hooks} + +\BeginIndexGroup +\BeginIndex{}{Haken} +Der \LaTeX-Kern bietet selbst bereits einige wenige Stellen in der +Verarbeitung eines Dokuments, an denen die Ausführung zusätzlichen Codes +\emph{eingehakt} werden kann. Klassen- und Paketautoren dürften +\Macro{AtBeginDocument} und \Macro{AtEndDocument} bestens bekannt +sein. \KOMAScript{} bietet an einigen Stellen vergleichbares, beispielsweise +um Code in die Ausführung von +\hyperref[sec:maincls.structure]{Gliederungsbefehlen} einzuhaken. Über die +Jahre zeigten sich dabei zwei Probleme: +\begin{itemize} +\item Es gibt nie genug Haken. +\item Es gibt sowohl Code, der nur einmal ausgeführt werden soll, also quasi + bei seiner Ausführung wieder vom Haken fällt, als auch Code, der bei jedem + Durchlaufen des Hakens auszuführen ist, also dauerhaft auf dem Haken bleibt. +\end{itemize} +Üblicherweise muss man zur Definition eines einzelnen Hakens eine Anweisung +definieren, mit der Code für den jeweiligen Haken aufgesammelt wird. Der Code +wird dazu in einem weiteren internen Makro abgelegt, das man an der Stelle +einfügen muss, an der der aufgesammelte Code auszuführen ist. Je mehr Haken +man einfügt, desto mehr solcher Anweisungen gibt es. Um sowohl Einmalcode als +auch dauerhaften Code zu ermöglichen, bedarf es sogar zweier Haken und damit +der doppelten Anzahl an zu definierenden Anweisungen. + +Das Beispiel der Gliederungsbefehle zeigt, dass sich das erste Problem +an einem einzigen Codeausführungspunkt noch verschärfen kann. Der +eine Paketautor benötigt nur eine Möglichkeit, für alle +Gliederungsbefehle denselben Code auszuführen. Ein anderer Paketautor hätte +lieber, dass er bei bestimmten Gliederungsbefehlen unterschiedlichen Code +ausführen kann. Es würde also sowohl ein allgemeiner Haken als auch ein Haken +je Gliederungsbefehl benötigt. Das ganze dann wieder wegen des zweiten +Problems verdoppelt. + +\KOMAScript{} bietet in \Package{scrbase} daher einen verallgemeinerten +Hakenmechanismus, der mehrstufige Haken sowohl für Einmalcode als auch für +dauerhaften Code bereitstellt. Diese Haken haben aufgrund der Implementierung +den Namen \emph{do-hook} erhalten. Davon leitet sich auch der Name der +Anweisungen ab, mit denen sie gesteuert werden. + +\begin{Declaration} + \Macro{ExecuteDoHook}\Parameter{Spezifikator} +\end{Declaration} +Über\ChangedAt[2019/01]{v3.27}{\Package{scrbase}} diese Anweisung werden Haken +implementiert. Dabei bestimmt der \PName{Spezifikator} den Namen des oder +genauer der Haken. Der \PName{Spezifikator} wird zur Analyse immer vollständig +expandiert. + +Der \PName{Spezifikator} besteht allgemein aus durch Querstrichen, +»\texttt{/}«, voneinander getrennten Zeichenfolgen. Von \Macro{ExecuteDoHook} +wird zunächst die Zeichenfolge vor dem ersten Querstrich abgetrennt. Diese ist +der Name. Der verbleibende Rest ohne den führenden Querstrich ist das +Argument. Dann wird der Code für den Haken mit diesem Namen +ausgeführt. Anschließend wird erneut die vordere Zeichenfolge vom Rest +abgetrennt und mit einem Querstrich hinten an den Namen angefügt und der Code +für den so neu gebildeten Namen ausgeführt. Das geht so lange, bis der Code +für den Haken mit dem Namen \PName{Spezifikator} und leerem Argument +ausgeführt wurde. + +Im einfachsten Fall besteht der \PName{Spezifikator} aus einem einzelnen +Namen. In diesem Fall wird zunächst der dauerhafte Code für genau einen durch +diesen Namen festgelegten Haken mit leerem Argument ausgeführt. + +In jeder Stufe der Ausführung wird nach dem dauerhaften Code für einen Haken +zusätzlich Einmalcode ausgeführt, bevor der Einmalcode global vom Haken +genommen wird. + +\begin{Example} + Mit \DescRef{\LabelBase.cmd.ExecuteDoHook}% + \PParameter{heading/begingroup/\PName{Name}} in der Ausführung jedes + durch \DescRef{maincls-experts.cmd.DeclareSectionCommand} definierten + Gliederungbefehls wurden in den \KOMAScript-Klassen letztlich sechs Haken an + diesem Codepunkt eingefügt, die in dieser Reihenfolge ausgeführt werden: + \begin{enumerate} + \item \PValue{heading} mit Argument \PValue{begingroup/}\PName{Name} für + dauerhaften Code, + \item \PValue{heading} mit Argument \PValue{begingroup/}\PName{Name} für + Einmalcode, + \item \PValue{heading/begingroup} mit Argument \PName{Name} für + dauerhaften Code, + \item \PValue{heading/begingroup} mit Argument \PName{Name} für + Einmalcode, + \item \PValue{heading/begingroup/}\PName{Name} mit leerem Argument für + dauerhaften Code, + \item \PValue{heading/begingroup/}\PName{Name} mit leerem Argument für + Einmalcode. + \end{enumerate} + Der Platzhalter \PName{Name} ist dabei identisch mit dem bei + \DescRef{maincls-experts.cmd.DeclareSectionCommand}, + \DescRef{maincls-experts.cmd.DeclareNewSectionCommand} oder + \DescRef{maincls-experts.cmd.ProvideSectionCommand} + angegebenen Namen + der Gliederungsebene beziehungsweise des dadurch bestimmten + Gliederungsbefehls, also beispielsweise \PValue{subparagraph} oder + \PValue{chapter}. Betrachtet man obige Auf"|listung unter + Berücksichtigung der Vielzahl an Gliederungsbefehlen, + wird klar, dass die Haken \PValue{heading} und \PValue{heading/begingroup} + mehrfach, nämlich für jeden Gliederungsbefehl existieren.% +\end{Example}% +% +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \Macro{AddtoDoHook}\Parameter{Name}\Parameter{Befehl} + \Macro{AddtoOneTimeDoHook}\Parameter{Name}\Parameter{Befehl} +\end{Declaration} +Mit\ChangedAt[2019/01]{v3.27}{\Package{scrbase}} \Macro{AddtoDoHook} wird an +dem Haken mit dem Namen \PName{Name} dauerhafter\textnote{dauerhaft} Code +aufgehängt. Als Code dient dabei der \PName{Befehl}, dem das in der Erklärung +zu \DescRef{\LabelBase.cmd.ExecuteDoHook} erwähnte Argument als Parameter +angehängt wird. +\begin{Example} + Angenommen, es soll innerhalb von \Macro{section} mitgezählt werden, wie oft + diese Anweisung ausgeführt wird. Dies wäre in Fortführung des obigen + Beispiels mit +\begin{lstcode} + \newcounter{sectionZaehler} + \AddtoDoHook{heading/begingroup/section} + {\stepcounter{sectionZaehler}} +\end{lstcode} + sehr einfach möglich. Allerdings würde dann in Wirklichkeit + \Macro{stepcounter}\PParameter{sectionZaehler}\PParameter{} ausgeführt. Wir + erinnern uns daran, dass immer ein Argument als Parameter angehängt wird. + Im Falle des Hakens mit dem Namen \PValue{heading/begingroup/section} ist + dieses Argument leer. Da ein solcher leerer Parameter hier zu einer leeren + Gruppe wird, ist es besser, diesen leeren Parameter quasi aufzubrauchen: +\begin{lstcode} + \newcommand*{\stepcountergobble}[2]{% + \stepcounter{#1}% + } + \AddtoDoHook{heading/begingroup/section} + {\stepcountergobble{sectionZaehler}} +\end{lstcode} + Somit wird der angehängte, leere Parameter von der neuen Anweisung + \Macro{stepcountergobble} gelesen, aber nicht verwendet. + + Sollen nun statt \Macro{section} alle Gliederungsbefehle gezählt werden, so + muss nur ein anderer Hakenname eingesetzt werden: +\begin{lstcode} + \AddtoDoHook{heading/begingroup} + {\stepcountergobble{sectionZaehler}} +\end{lstcode} + Hier ist übrigens der angehängte Parameter nicht leer, sondern enthält den + Namen der Gliederungsebene oder des Gliederungsbefehls. Wollte man die + Gliederungsbefehle einzeln zählen, so könnte man genau dies ausnützen: +\begin{lstcode} + \newcommand*{\stepZaehler}[1]{% + \stepcounter{#1Zaehler}% + } + \AddtoDoHook{heading/begingroup} + {\stepZaehler} +\end{lstcode} + Natürlich müssten dann auch die Zähler \Counter{partZaehler}, + \Counter{chapterZaehler} bis hinunter zu \Counter{subparagraphZaehler} + definiert werden. +\end{Example} + +Die Anweisung \Macro{AddtoOneTimeDoHook}\textnote{einmalig} arbeitet +vergleichbar, fügt den \PName{Befehl} aber dem Einmalcode hinzu. Dieser Code +wird dann nach der ersten Ausführung global vom Haken genommen.% +\EndIndexGroup + +\begin{Declaration} + \Macro{ForDoHook}\Parameter{Spezifikator}\Parameter{Befehl} +\end{Declaration} +Während\ChangedAt[2019/01]{v3.27}{\Package{scrbase}} +\DescRef{\LabelBase.cmd.ExecuteDoHook} dazu gedacht ist, die Befehle +auszuführen, die zuvor mit \DescRef{\LabelBase.cmd.AddtoDoHook} oder +\DescRef{\LabelBase.cmd.AddtoOneTimeDoHook} für die durch den +\PName{Spezifikator} bestimmten Haken gespeichert wurden, führt diese Anweisung +den unmittelbar angegebenen \PName{Befehl} aus. Dabei werden an \PName{Befehl} +sogar zwei Parameter angefügt. Der erste Parameter ist der Name des Haken, der +zweite das Argument des Hakens. + +Diese Anweisung ist ein Abfallprodukt der Implementierung von +\DescRef{\LabelBase.cmd.ExecuteDoHook}. Normalerweise sollten weder Anwender +noch Paketautoren diese Anweisung benötigen.% +\EndIndexGroup + +\begin{Declaration} + \Macro{SplitDoHook}\Parameter{Spezifikator}\Parameter{Kopf-Makro} + \Parameter{Rest-Makro} +\end{Declaration} +Wie\ChangedAt[2019/01]{v3.27}{\Package{scrbase}} aus den vorangegangenen +Erklärungen deutlich wird, kann der Parameter eines mit +\DescRef{\LabelBase.cmd.AddtoDoHook} oder +\DescRef{\LabelBase.cmd.AddtoOneTimeDoHook} hinzugefügten \PName{Befehls} +ebenfalls ein mehrteiliger \PName{Spezifikator} sein. Mit \Macro{SplitDoHook} +kann so ein \PName{Spezifikator} in das vordere Element und den Rest +aufgeteilt werden. Das \PName{Kopf-Makro} wird dabei als das vordere Element +definiert. Das \PName{Rest-Makro} wird als der Rest definiert. Im Falle, dass +kein Rest bleibt, wird das \PName{Rest-Makro} leer definiert. Falls bereits der +\PName{Spezifikator} leer war, wird eine Warnung ausgegeben und sowohl +\PName{Kopf-Makro} als auch \PName{Rest-Makro} leer definiert. + +\begin{Example} + Wollte man am Anfang der Gruppe, in der die Überschrift ausgegeben wird, + einen Zähler erhöhen, diesen am Ende aber wieder verringern, so könnte man + dies über zwei Haken tun: +\begin{lstcode} + \AddtoDoHook{heading/begingroup} + {\stepZaehler} + \newcommand*{\restepZaehler}[1]{% + \addtocounter{#1Zaehler}{-1}% + } + \AddtoDoHook{heading/endgroup} + {\restepcounter} +\end{lstcode} + Man könnte aber auch mit einem einzigen Haken arbeiten und dessen Parameter + zerlegen: +\begin{lstcode} + \newcommand*{\changeZaehler}[1]{% + \SplitDoHook{#1}{\Gruppe}{\Ebene}% + \Ifstr{\Gruppe}{begingroup}{% + \stepcounter{\Ebene Zaehler}% + }{% + \Ifstr{\Gruppe}{endgroup}{% + \addtocounter{\Ebene Zaehler}{-1}% + }{}% + }% + } + \AddtoDoHook{heading} + {\changeZaehler} +\end{lstcode} + Wie zu sehen ist, ist die erste Lösung um einiges einfacher. Dazu kommt, + dass man die zweite Fallunterscheidung in der zweiten Lösung gerne + vergisst. Das wäre allerdings fatal, da es weitere Haken mit Namen + \PValue{heading} aber abweichendem Argument geben kann. +\end{Example} + +Genau genommen ist diese Anweisung ein Abfallprodukt der Implementierung +von \DescRef{\LabelBase.cmd.ForDoHook}.% +\EndIndexGroup +% +\EndIndexGroup + +\section{Obsolete Optionen und Anweisungen} +\seclabel{obsolete} + +Frühere Versionen von \Package{scrbase} verfügten über Optionen und +Anweisungen, die inzwischen entfernt oder ersetzt wurden. Diese sind hier nur +aus Gründen der Vollständigkeit aufgeführt und sollten nicht mehr verwendet +werden. + +\LoadNonFree{scrbase}{0}% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Paketoptionen Familienmitglieder Familienmitglieds Säumniswert +% LocalWords: Fleischermeister FamilyProcessOptions ProcessOption keyval Cmd +% LocalWords: documentclass ProcessOptions FamilyExecuteOptions currname +% LocalWords: Optionenliste ExecuteOptions DeclareOption currext Wurstsalat +% LocalWords: FamilyOptions FamilyKeyState Wurstpakete nonsense package true +% LocalWords: Wurstpaket FamilyOption salatmit SalatZusatz scrbase false +% LocalWords: AtEndOfFamilyOptions FamilyBoolKey FamilySetBool Schaltername +% LocalWords: FamilyLengthKey FamilySetLength FamilyLengthMacroKey +% LocalWords: FamilySetLengthMacro Wertübergabe Gliederungsbefehlen +% LocalWords: Sternvariante Anwenderanweisungen Signalisierung Paketautoren +% LocalWords: Familienschlüssel Mitgliederschlüssels Vergleichszustand +% LocalWords: Benutzeräquivalent Dokumentpräambel voranzustellen diff --git a/macros/latex/contrib/koma-script/doc/scrbase-en.tex b/macros/latex/contrib/koma-script/doc/scrbase-en.tex new file mode 100644 index 0000000000..bdba9ee1f5 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrbase-en.tex @@ -0,0 +1,1932 @@ +% ====================================================================== +% scrbase-en.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% Package scrbase for Package and Class Authors +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{scrbase-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script package scrbase] +\translator{Markus Kohm\and Melvin Hendrix\and Karl Hagen} + +\chapter{Basic Functions in the \Package{scrbase} Package} +\labelbase{scrbase} +\BeginIndexGroup +\BeginIndex{Package}{scrbase}% + +The \Package{scrbase} package provides basic features intended for use by +authors of packages and classes. Its use is not limited merely to wrapper +classes which in turn load a \KOMAScript{} class. Authors of classes that +otherwise have nothing to do with \KOMAScript{} can also benefit from the +functionality of \Package{scrbase}. + +\section{Loading the Package} +\seclabel{loadit} + +Whereas users load packages with \Macro{usepackage}, authors of packages or +classes should use \Macro{RequirePackage}\IndexCmd{RequirePackage}. Authors of +wrapper packages can also use \Macro{RequirePackageWithOptions}. The +\Macro{RequirePackage} command has the same optional argument for package +options as \Macro{usepackage}. In contrast, \Macro{RequirePackageWithOptions} +does not have an optional argument but passes to this package all the options +that were previously given when loading the wrapper package or class. See +\cite{latex:clsguide} for more information about these commands. + +The \Package{scrbase} package needs the functionality of the +\Package{keyval}\IndexPackage{keyval} package internally. This can also be +provided by the \Package{xkeyval} package. If needed, \Package{scrbase} itself +loads \Package{keyval}. + +The \Package{keyval} package lets you define keys and assign values to them. +The options provided by \Package{scrbase} also use \Package{keyval} syntax: +\PName{key}\texttt{=}\PName{value}. + + +\section{Keys as Attributes of Families and Their Members} +\seclabel{keyvalue} + +As already mentioned in \autoref{sec:scrbase.loadit}, \Package{scrbase} uses +the \Package{keyval} package to set keys and their values. However, +\Package{scrbase} extends this functionality. Whereas with \Package{keyval} a +key belongs to only one family, \Package{scrbase} also recognizes family +members. A key can therefore belong to both a family and one or more family +members. Additionally, you can assign a value to the key of a family member, +to the key of a family, or to the keys of all family members. + +\begin{Declaration} + \Macro{DefineFamily}\Parameter{family}% + \Macro{DefineFamilyMember}\OParameter{member}\Parameter{family}% +\end{Declaration} +\Package{scrbase} needs to know the members of a family for various reasons. +Therefore, you must first define a new family using \Macro{DefineFamily}, +which produces an empty member list. If the family has already been defined, +nothing happens. Therefore an existing member list will not be overwritten. + +Next, you can add a new member to the family using \Macro{DefineFamilyMember}. +If the family does not exist, this will result in an error message. If the +member already exists, nothing happens. If the optional \PName{member} is +omitted, the default value +``\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}'' is used. While +the class or package is being loaded, \Macro{@currname} and \Macro{@currext} +together represent the file name of the class or package. + +Theoretically, it is possible, to define a member without a name using an +empty optional \PName{member} argument. But this is the same as the family +itself. You should use only letters and digits for the \PName{family} name, +and the first character of \PName{member} should be something else, preferably +a point. Otherwise, it could happen that the members of one family will clash +with the members of other families. + +\Package{scrbase} assigns the family ``\PValue{KOMA}'' to itself and adds the +member ``\PValue{.scrbase.sty}''. The values ``\PValue{KOMA}'' and +``\PValue{KOMAarg}'' are reserved for \KOMAScript{}. If you are creating a +bundle of packages, you should use the name of the bundle as \PName{family} +and the name of each package as \PName{member} of that \PName{family}. +% +\begin{Example} + Suppose you are writing a bundle called ``master butcher''. Within that + bundle, you have the packages \File{salami.sty}, \File{mettwurst.sty}, + and \File{kielbasa.sty}. Therefore, you decide to use family name + ``\PValue{butcher}'' and you add the lines +\begin{lstcode} + \DefineFamily{butcher} + \DefineFamilyMember{butcher} +\end{lstcode} + to each of the package files. When loading the three packages, this will + add the members ``\PValue{.salami.sty}'', ``\PValue{.mettwurst.sty}'', + and ``\PValue{.kielbasa.sty}'' to the family ``\PValue{butcher}''. After + loading all three packages, all three members will be defined. +\end{Example} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DefineFamilyKey}\OParameter{member}\Parameter{family}% + \Parameter{key}% + \OParameter{default}\Parameter{action}% + \Macro{FamilyKeyState}% + \Macro{FamilyKeyStateUnknown}% + \Macro{FamilyKeyStateProcessed}% + \Macro{FamilyKeyStateUnknownValue}% + \Macro{FamilyKeyStateNeedValue} +\end{Declaration} +The \Macro{DefineFamilyKey} command defines a \PName{key}. If you specify a +\PName{member}, the \PName{key} becomes an attribute of that member in the +given \PName{family}. If you do not specify a \PName{member}, the member +``\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}'' is assumed. If you +later assign a value to the \PName{key}, the \PName{action} will be +executed and the value made an argument of \PName{action}. Within +\PName{action}, ``\lstinline{#1}'' stands for that value. If you omit the value, +the \PName{default} is used instead. If you do not specify a \PName{default}, +the \PName{key} then always requires you to pass an explicit value. + +%\begin{Explain} + \phantomsection\label{explain:scrbase.macro.DefineFamilyKey}% + Ultimately, +\begin{lstcode}[escapeinside=`'] + \DefineFamilyKey[`\PName{member}']{`\PName{family}'}{`\PName{key}'} + [`\PName{default}']{`\PName{action}'} +\end{lstcode} + results in a call to +\begin{lstcode}[moretexcs={define@key},escapeinside=`'] + \define@key{`\PName{family\,member}'}{`\PName{key}'} + [`\PName{default}']{`\PName{extended action}'} +\end{lstcode} + where \Macro{define@key} is provided by the + \Package{keyval}\IndexPackage{keyval} package (see \cite{package:keyval}). + However, there are some additional precautions taken with the call to + \Macro{define@key}, and the \PName{action} will be extended to include these + precautions. +%\end{Explain} + +Success\ChangedAt{v3.12}{\Package{scrbase}} or failure in executing the +\PName{action} should be reported back to \Package{scrbase} through +\Macro{FamilyKeyState} so that the package itself can take further action as +needed. This could be, for example, an error message or merely warning of an +unknown option. You should not report errors directly! + +The default state of \PName{action} before execution is +\Macro{FamilyKeyStateUnknown}. This indicates that it is not known whether or +not the key could be processed successfully. If this state remains unchanged +after the \PName{action} has been executed, \Package{scrbase} writes a +message to the \File{log} file and assumes the that state is +\Macro{FamilyKeyStateProcessed}. + +The \Macro{FamilyKeyStateProcessed} state indicates that the key and the value +assigned to it have been successfully processed and everything is OK. You can +switch to this state by calling \Macro{FamilyKeyStateProcessed} itself. + +The \Macro{FamilyKeyStateUnknownValue} state indicates that the key has been +processed but that the value passed to it was either unknown or not allowed. +For example, \hyperref[cha:typearea]{\Package{typearea}} reports this +condition if you try to set the \DescRef{typearea.option.twoside} option to +\PValue{unknown}. You can set this state by simply calling +\Macro{FamilyKeyStateUnknownValue}. + +The \Macro{FamilyKeyStateNeedValue} state indicates that the key could not be +processed because it expects a value, but it was called without such a value. +This state is set automatically if you use a key that does not have a +\PName{default} value without assigning a value. Theoretically, you could +set this state explicitly with \Macro{FamilyKeyStateNeedValue}, but you should +not need to set it yourself. + +In addition, you can define additional error conditions by redefining +\Macro{FamilyKeyState} with a short text message. Generally, however, the four +predefined states should be sufficient. + +\begin{Example} + Suppose each of the three packages from the previous example should have a + key named \PValue{coldcuts}. When used, a switch should be set in each of + the packages. For the \Package{salami} package, for example, this could look + like this: +\begin{lstcode} + \newif\if@salami@coldcuts + \DefineFamilyKey{butcher}% + {coldcuts}[true]{% + \expandafter\let\expandafter\if@salami@coldcuts + \csname if#1\endcsname + \FamilyKeyStateProcessed + } +\end{lstcode} + When called, the value will therefore be either \PValue{true} or + \PValue{false}. This example does not test for illegal values. Instead, + it is always reported that the key was processed completely and correctly. + If the key is used later, one of the permitted values, or no value, must be + used. In the second case, the default \PName{true} value will be used. + + The definitions for the other packages are nearly identical. Only the string + ``\texttt{salami}'' has to be replaced. +\end{Example} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{RelaxFamilyKey}\OParameter{member}\Parameter{family}% + \Parameter{key} +\end{Declaration} +If\ChangedAt{v3.15}{\Package{scrbase}} a \PName{key} has been previously +defined as a \PName{member} of a \PName{family}, that definition will be +cancelled. Afterwards the \PName{key} will no longer be defined for this +\PName{member} of the \PName{family}. You can use \Macro{RelaxFamilyKey} for a +\PName{key} that is not defined for this \PName{member} of the \PName{family}. + +If you do not specify a \PName{member}, then the member +``\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}'' is assumed, just as +with \DescRef{\LabelBase.cmd.DefineFamilyKey}. However, \Macro{RelaxFamilyKey} +is only rarely used while loading a package rather than at runtime. Therefore +the \PName{member} should usually be specified explicitly as well.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyProcessOptions}\OParameter{member}\Parameter{family} +\end{Declaration} +In essence, extending keys from families to both families and family members +means that either keys or key-value pairs can be used as normal class or +package options. The \Macro{FamilyProcessOptions} command is an extension of +\Macro{ProcessOption*} from the \LaTeX{} kernel (see \cite{latex:clsguide}, +which processes not only options declared with \Macro{DeclareOption}, but also +all keys of the given member. If you omit the optional argument +\PName{member}, the member +``\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}'' is used. + +One feature worth noting is that keys which are attached not to a family +member but to a family have an empty family member. Such keys are set before +the keys of the members. +\begin{Example} + If, in the packages from the previous example, you add the line +\begin{lstcode} + \FamilyProcessOptions{butcher} +\end{lstcode} + after you define the key, you can specify the \Option{coldcuts} option when + loading the package. If you specify the option globally in + \Macro{documentclass}, the option will be passed automatically to all three + packages if they are loaded later. +\end{Example} +Note\textnote{Attention!} that packages always process global options +before local options. While unknown global options result in an entry in the +\File{log} file and the option being otherwise ignored, unknown local +options result in an error message. + +You can think of \Macro{FamilyProcessOptions} as an extension of either +\Macro{ProcessOption*} or the \PName{key=value} mechanism +of \Package{keyval}. Ultimately, with the help of +\Macro{FamilyProcessOptions}, \PName{key=value} pairs become options.% + +As with\textnote{Attention!} \Macro{ProcessOptions}, +\Macro{FamilyProcessOptions} must not be used while executing options code. +In particular, you cannot load packages while processing options.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{BeforeFamilyProcessOptions}\OParameter{member}\Parameter{family}% + \Parameter{code}% +\end{Declaration} +Authors\ChangedAt{v3.18}{\Package{scrbase}} of wrapper classes in particular +sometimes need a hook to execute \PName{code} before +\DescRef{\LabelBase.cmd.FamilyProcessOptions}. The \Package{scrbase} package +provides such a hook, and you can add \PName{code} to it with +\Macro{BeforeFamilyProcessOptions}. The \PName{member} and \PName{family} +parameters are same as those of \DescRef{\LabelBase.cmd.FamilyProcessOptions}. +However, you can also add \PName{code} to the hook for families or members +that have not yet been defined. + +Note that the hook of a family member is automatically deleted after it is +executed. But if you use an empty \PName{member}, this hook\Index{hook} will +be executed for every member of the \PName{family} and will not be deleted. + +\begin{Example} + You are writing a \Package{smokedsausage} package that loads + \Package{mettwurst}. But you do not want to be able to set the + \Option{coldcut} option with this package. So you use + \Macro{BeforeFamilyProcessOptions} to deactivate that option before you load + the package: +\begin{lstcode} + \RequirePackage{scrbase} + \BeforeFamilyProcessOptions[.mettwurst.sty]{butcher}{% + \RelaxFamilyKey[.mettwurst.sty]{butcher}{coldcut}% + } + \RequirePackageWithOptions{mettwurst} +\end{lstcode} + If a user tries to load your package with the \Option{coldcut} option, the + \Package{mettwurst} package will throw an undefined option error. If + \Option{coldcut} is used as a global option, the \Package{mettwurst} + package will ignore it. But default settings inside \Package{mettwurst}, + for example using \DescRef{\LabelBase.cmd.FamilyExecuteOptions} before + \DescRef{\LabelBase.cmd.FamilyProcessOptions} are not affected. Of course, + you can also insert your own default for \Package{smokedsausage} via + \Macro{BeforeFamilyProcessOptions} in \Package{mettwurst}. +\end{Example} +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyExecuteOptions}\OParameter{member}\Parameter{family}% + \Parameter{options list} +\end{Declaration} +This command is an extension of \Macro{ExecuteOptions} from the \LaTeX{} +kernel (see \cite{latex:clsguide}). The command processes not only options +defined with \Macro{DeclareOption} but also all keys of the given +\PName{family}. If you omit the optional argument \Macro{member}, +``\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}'' is used. + +One feature worth noting is that keys which are attached not to a family +member but to a family have an empty family member. Such keys are set before +the keys of the members. +\begin{Example} + Suppose the \Option{coldcuts} option should be set by default in the + previous examples. In this case only line +\begin{lstcode} + \FamilyExecuteOptions{butcher}{coldcuts} +\end{lstcode} + has to be added. +\end{Example} + +If\ChangedAt{v3.20}{\Package{scrbase}} you call \Macro{FamilyExecuteOptions} +with an unknown option inside the \PName{options list}, you will get an error. +An exception to this rule occurs when the \PName{member} has an option called +\Option{@else@}. In this case, the \Option{@else@} option will be used instead +of the unknown one. The value passed to the \Option{@else@} option is the +unknown option with the value specified in the call. \KOMAScript{} itself uses +this feature, for example inside the definition of sectioning commands, +to evaluate the style option before all other attributes. + +You can also use this command inside the code executed when processing the +option.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyOptions}\Parameter{family}\Parameter{options list}% +\end{Declaration} +Unlike normal options defined with \Macro{DeclareOption}, the \PName{key}s can +also be set after loading a class or package. To do this, you call +\Macro{FamilyOptions}. The \PName{options list} has the form +\begin{flushleft}\vskip\dp\strutbox\begin{tabular}{l} + \PName{key}\texttt{=}\PName{value}\texttt{,}% + \PName{key}\texttt{=}\PName{value}\dots +\end{tabular}\vskip\dp\strutbox\end{flushleft} +after which the value assignment can be omitted for \PName{key}s that have a +defined default. + +The statement sets the keys of all members of the specified family. If a +\PName{key} also exists as an attribute of the family itself, then the family +key is set first, followed by the member keys in the order in which they were +defined. If a given \PName{key} does not exist, either for the family or for +any member of the family, then \Macro{FamilyOptions} will throw an error. An +error also occurs if a \PName{key} exists for some members but each of those +members returns an error through \DescRef{\LabelBase.cmd.FamilyKeyState}. +\begin{Example} + You extend your butcher project with a \Package{sausagesalad} package. If + this package has been loaded, all sausage packages should generate cold + cuts: +\begin{lstcode} + \ProvidesPackage{sausagesalad}% + [2008/05/06 nonsense package] + \DefineFamily{butcher} + \DefineFamilyMember{butcher} + \FamilyProcessOptions{butcher}\relax + \FamilyOptions{butcher}{coldcuts} +\end{lstcode} + If no sausage package has yet been loaded, the undefined option + \Option{coldcuts} leads to an error message. You can avoid this by defining + a corresponding key for the package before the last line of the code above: +\begin{lstcode} + \DefineFamilyKey{butcher}% + {coldcuts}[true]{}% +\end{lstcode} + However, sausage packages loaded after \Package{sausagesalad} still do not + produce cold cuts. You can correct this by replacing the previous command + with: +\begin{lstcode} + \AtBeginDocument{% + \DefineFamiyKey[.sausagesalad.sty]% + {butcher}% + {coldcuts}[true]{}% + } + \DefineFamilyKey{butcher}% + {coldcuts}[true]{% + \AtBeginDocument{\FamilyOptions{butcher}% + {coldcuts=#1}}% + }% +\end{lstcode} + Thus, the option is defined during \Macro{begin}\PParameter{document} so + that it no longer functions for the \Package{sausagesalad} package. Because + \Macro{@currname} and \Macro{@currext} no longer contain the file name of + the package, you must use the optional argument of + \DescRef{\LabelBase.cmd.DefineFamilyKey}. + + But until this redefinition is performed, it uses a definition that executes + the option again for the family and all its members during + \Macro{begin}\PParameter{document}, thus setting it for other sausage + packages. The delay in executing \Macro{FamilyOptions} is crucial here. For + one thing, it includes only the packages loaded afterwards. For another, it + ensures that its own \Option{coldcuts} option has already been redefined. + This avoids endless recursion. +\end{Example} + +Like\ChangedAt{v3.27}{\Package{scrbase}} +\DescRef{\LabelBase.cmd.FamilyExecuteOptions}, \Macro{FamilyOptions} offers +special handling for an option named +\Option{@else@}\important{\Option{@else@}}. If a family member has such an +option, it will be executed whenever an option in the \PName{option list} is +unrecognized by the member. If the family itself defines an option +\Option{@else@}, it will only be called if neither the family nor any of its +members were able to fully process the given option by executing +\DescRef{\LabelBase.cmd.FamilyKeyStateProcessed}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyOption}\Parameter{family}% + \Parameter{option}\Parameter{value list}% +\end{Declaration} +In addition to options that have mutually exclusive values, there may be +options that can take multiple values at the same time. To use +\DescRef{\LabelBase.cmd.FamilyOptions} for that type of option, it would be +necessary to invoke the same option several times with different value +assignments. Instead, you can easily assign a whole list of values to a single +\PName{option} using \Macro{FamilyOption}. The \PName{value list} is a comma +separated list of values, also known as \emph{csv}: +%\begin{flushleft}\begin{tabular}{l} + \PName{value}\texttt{,}\PName{value}\dots +%\end{tabular}\end{flushleft} +Note in this context that you can use a comma in a value by putting the value +inside braces. This command's other functionality is the same previously +described for \DescRef{\LabelBase.cmd.FamilyOptions}. +\begin{Example} + The \Package{sausagesalad} package should have one more option to add + additional ingredients. Each of the ingredients sets a switch, as was done + previously for the cold cuts. +\begin{lstcode} + \newif\if@saladwith@onions + \newif\if@saladwith@gherkins + \newif\if@saladwith@chillies + \DefineFamilyKey{butcher}{ingredient}{% + \csname @saladwith@#1true\endcsname + } +\end{lstcode} + Here the three ingredients ``onions'', ``gherkins'', and ``chillies'' have + been defined. There is no error message for unknown ingredients. + + For a salad with onions and gherkins, you can use +\begin{lstcode} + \FamilyOptions{butcher}{% + ingredient=onions,ingredient=gherkins} +\end{lstcode} + or simply +\begin{lstcode} + \FamilyOption{butcher} + {ingredient}{onions,gherkins} +\end{lstcode} +\end{Example} + +An\ChangedAt{v3.27}{\Package{scrbase}} \Option{@else@} option is processed +in the same manner as with \DescRef{\LabelBase.cmd.FamilyOptions}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AtEndOfFamilyOptions}\Parameter{action}% + \Macro{AtEndOfFamilyOptions*}\Parameter{action}% +\end{Declaration} +Sometimes\ChangedAt{v3.12}{\Package{scrbase}} it is useful to delay the +execution of an \PName{action} that is part of a value assignment to a key +until all assignments inside one +\DescRef{\LabelBase.cmd.FamilyProcessOptions}\IndexCmd{FamilyProcessOptions}, +\DescRef{\LabelBase.cmd.FamilyExecuteOptions}\IndexCmd{FamilyExecuteOptions}, +\DescRef{\LabelBase.cmd.FamilyOptions}\IndexCmd{FamilyOptions}, or +\DescRef{\LabelBase.cmd.FamilyOption}\IndexCmd{FamilyOptions} is finished. +You can do this using \Macro{AtEndOfFamilyOptions} or its starred +variant\ChangedAt{v3.23}{\Package{scrbase}} inside an option definition. +However, reporting failure states of \PName{action} is not possible with this +command, nor should it be used outside an option definition. + +The two variants differ in case there are nested option definitions, when +executing an option requires further option calls. In this case all actions +specified by \Macro{AtEndOfFamilyOptions} will be executed when the innermost +option call returns. In contrast, the actions of \Macro{AtEndOfFamilyOptions*} +are not executed until the outermost option call returns. +However,\textnote{Attention!} the order of the actions of both commands is +emphatically undefined! It is not guaranteed that the action requested first +will be executed first, nor the converse.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyBoolKey}\OParameter{member}\Parameter{family}% + \Parameter{key}\Parameter{switch name}% + \Macro{FamilySetBool}\Parameter{family}% + \Parameter{key}\Parameter{switch name}\Parameter{value} +\end{Declaration} +Boolean switches have been used several times in the previous examples. In the +example with \Option{coldcuts} option, the user had to assign either +\PValue{true} or \PValue{false} as a value. There was no error message if the +user provided the wrong value. Because boolean switches are a common use case, +you can easily define them with \Package{scrbase} using \Macro{FamilyBoolKey}. +The \PName{member}, \PName{family}, and \PName{key} arguments are the same as +those used by \DescRef{\LabelBase.cmd.DefineFamilyKey} (see +\DescPageRef{scrbase.cmd.DefineFamilyKey}). The \PName{switch name} is the +name of the switch without the prefix \Macro{if}. If a switch with this name +does not exist already, \Macro{FamilyBoolKey} will define it and initialize it +to \PName{false}. Internally, \Macro{FamilyBooKey} uses \Macro{FamilySetBool} +as the \PName{action} of \DescRef{\LabelBase.cmd.DefineFamilyKey}. The +\PName{default} for such an option is always \PValue{true}. + +\Macro{FamilySetBool}, on the other hand, accepts \PValue{on} and +\PValue{yes}, in addition to \PName{true}, to turn the switch on, and +\PName{off} and \PName{no}, in addition to \PName{false}, to turn it off. +Unknown values will result in a call to +\DescRef{\LabelBase.cmd.FamilyUnknownKeyValue} with the arguments +\PName{family}, \PName{key}, and \PName{value}, which sets +\DescRef{\LabelBase.cmd.FamilyKeyState} accordingly. As a result, an error +message about an unknown value assignment is printed if necessary (see also +\DescPageRef{scrbase.cmd.FamilyUnknownKeyValue} and +\DescPageRef{scrbase.cmd.FamilyKeyState}). +\begin{Example} + The key \Option{coldcuts} should be defined more robustly in the sausage + packages. Additionally, all sausage packages should use the same key, so + that either all sausage packages will produce cold cuts or none will. +\begin{lstcode} + \FamilyBoolKey{butcher}{coldcuts}% + {@coldcuts} +\end{lstcode} + A test of whether to produce cold cuts would look like this: +\begin{lstcode} + \if@coldcuts + ... + \else + ... + \fi +\end{lstcode} + This would be the same in all three sausage packages, thereby + defining the attribute ``coldcuts'' as a family option: +\begin{lstcode}[moretexcs={define@key}] + \@ifundefined{if@coldcuts}{% + \expandafter\newif\csname if@coldcuts\endcsname + }{}% + \DefineFamilyKey[]{butcher}{coldcuts}[true]{% + \FamilySetBool{butcher}{coldcuts}% + {@coldcuts}% + {#1}% + } +\end{lstcode} + or shorter: +\begin{lstcode} + \FamilyBoolKey[]{butcher}{coldcuts}% + {@coldcuts} +\end{lstcode} + taking advantage of the treatment of empty family members as opposed to + omitting the optional argument explained on + \autopageref{explain:scrbase.macro.DefineFamilyKey}, which applies not only + to \DescRef{\LabelBase.cmd.DefineFamilyKey} but also for + \Macro{FamilyBoolKey}. + + Since \DescRef{\LabelBase.cmd.FamilyKeyState} is already set by + \Macro{FamilySetBool}, you can check its status with the help of + \DescRef{\LabelBase.cmd.DefineFamilyKey}. For example, in the first case you + could add an equivalence test to \Macro{FamilySetBool} to perform additional + actions depending on whether \Macro{FamilySetBool} succeeded or not: + \begin{lstcode} + \ifx\FamilyKeyState\FamilyKeyStateProcessed + ... + \else + ... + \fi + \end{lstcode} + Note\textnote{Attention!} that it is essential to perform the test with + \Macro{ifx} at this point. Fully expanding tests like \Macro{ifstr} should + be avoided here. Depending on the current status and the comparison status, + they can lead to different error messages as well as incorrect results. +\end{Example}% +\EndIndexGroup + +\begin{Declaration} + \Macro{FamilyInverseBoolKey}\OParameter{member}\Parameter{family} + \Parameter{key}\Parameter{switch name} + \Macro{FamilySetInverseBool}\Parameter{family} + \Parameter{key}\Parameter{switch name} + \Parameter{value} +\end{Declaration} +These\ChangedAt{v3.27}{\Package{scrbase}} two commands differ from +\DescRef{\LabelBase.cmd.FamilyBoolKey} and +\DescRef{\LabelBase.cmd.FamilySetBool}, respectively, only in that the +logic is inverted. This means that the values \PValue{true}, \PValue{yes}, and +\PValue{on} set the boolean switch given by \PName{switch name} to +\Macro{iffalse} and therefore deactivate it. The values \PValue{false}, +\PValue{no}, and \PValue{off} set the boolean switch to \Macro{iftrue} and +therefore activate it.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyNumericalKey}\OParameter{member}\Parameter{family}% + \Parameter{key}% + \OParameter{default}\Parameter{command}% + \Parameter{value list}% + \Macro{FamilySetNumerical}\Parameter{family}\Parameter{key}% + \Parameter{command}\Parameter{value list}% + \Parameter{value} +\end{Declaration} +While switches can accept only two values, there are also keys that recognize +several values. For example an alignment can be not just left or not-left, but +left, centred, or right. Internally, such differentiation is often made using +\Macro{ifcase}. This \TeX{} command expects a numerical value. Therefore in +\Package{scrbase} the command to define a macro by a \PName{key} has been +named \Macro{FamilyNumericalKey}. The \PName{value list} has the form: +%\begin{flushleft}\vskip\dp\strutbox\begin{tabular}{l} + \Parameter{value}\Parameter{definition}\texttt{,}\linebreak[1]% + \Parameter{value}\Parameter{definition}\texttt{,}~\dots +%\end{tabular}\vskip\dp\strutbox\end{flushleft} +The \PName{value list} defines not just the values permitted for the +\PName{key}. For each \PName{value}, the \PName{definition} of the macro +\Macro{\PName{command}} also is given. Usually, the \PName{definition} is just +a numerical value. Although other content is possible, there is currently a +restriction that the \PName{definition} must be fully expandable, and it will +be expanded during the assignment. +\begin{Example} + The sausage for the sausage salad can be cut differently. For example, the + cold cuts could simply remain uncut or be cut into thick or thin slices. + This information should be stored in the command \Macro{cuthow}. +\begin{lstcode} + \FamilyNumericalKey{butcher}% + {saladcut}{cuthow}{% + {none}{none},{no}{none},{not}{none}% + {thick}{thick},% + {thin}{thin}% + } +\end{lstcode} + Not cutting anything can be selected by +\begin{lstcode} + \FamilyOptions{butcher}{saladcut=none} +\end{lstcode} + or +\begin{lstcode} + \FamilyOptions{butcher}{saladcut=no} +\end{lstcode} + or +\begin{lstcode} + \FamilyOptions{butcher}{saladcut=not} +\end{lstcode} + In all three cases \Macro{cuthow} would be defined with the content + \PValue{none}. It can be useful to provide several values for the same + result, as shown in this example. + + Now it's very likely that the manner of cutting will not be printed but + should be evaluated later. In this case, a textual definition would be + rather impractical. If the key is defined like this: +\begin{lstcode} + \FamilyNumericalKey{butcher}% + {saladcut}{cuthow}{% + {none}{0},{no}{0},{not}{0}% + {thick}{1},% + {thin}{2}% + } +\end{lstcode} + then you can use a condition like the following: +\begin{lstcode} + \ifcase\cuthow + % uncut + \or + % thickly cut + \else + % thinly cut + \fi +\end{lstcode} +\end{Example} +Internally, \Macro{FamilyNumericalKey} uses \Macro{FamilySetNumerical} as the +\PName{action} of \DescRef{\LabelBase.cmd.DefineFamilyKey}. If an unknown +value is assigned to such a key, \Macro{FamilySetNumerical} will call +\DescRef{\LabelBase.cmd.FamilyUnknownKeyValue} with the \PName{family}, +\PName{key} and \PName{value} arguments. This leads to an error signalled with +the \DescRef{\LabelBase.cmd.FamilyKeyStateUnknownValue} status in +\DescRef{\LabelBase.cmd.FamilyKeyState}. Similarly, when calling +\Macro{FamilySetNumerical} the success is signalled via +\DescRef{\LabelBase.cmd.FamilyKeyStateProcessed} in +\DescRef{\LabelBase.cmd.FamilyKeyState}.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyCounterKey}\OParameter{member}\Parameter{family}% + \Parameter{key}% + \OParameter{default}\Parameter{\LaTeX{} counter}% + \Macro{FamilySetCounter}\Parameter{family}% + \Parameter{key}\Parameter{\LaTeX{} counter}\Parameter{value} +\end{Declaration} +While\ChangedAt{v3.12}{\Package{scrbase}} +\DescRef{\LabelBase.cmd.FamilyNumericalKey} defines a macro in which a numeric +value corresponds to a symbolic value, there are, of course, circumstances +when a \PName{key} directly represents a \PName{\LaTeX{} counter} to which a +numeric value should be assigned immediately. For this case, you can use +\Macro{FamilyCounterKey}, which calls \Macro{FamilySetCounter} internally. +There are some basic tests of the \PName{value} argument to determine if the +\PName{value} argument appears to be suitable for assignment to a counter. The +assignment will only be made if these tests succeed. However, not all errors +can be detected here, so an incorrect assignment can also lead to an error +message from \TeX{} itself. Errors that are detected, however, are signalled +by \DescRef{\LabelBase.cmd.FamilyKeyStateUnknownValue}. + +If\ChangedAt{v3.15}{\Package{scrbase}} the value is omitted, the +\PName{default} is used instead. If there is no \PName{default}, the +\PName{key} can be used only with an explicit value.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyCounterMacroKey}\OParameter{member}\Parameter{family}% + \Parameter{key}% + \OParameter{default}\Parameter{macro}% + \Macro{FamilySetCounterMacro}\Parameter{family}% + \Parameter{key}\Parameter{macro}\Parameter{value}% +\end{Declaration} +These\ChangedAt{v3.12}{\Package{scrbase}} two commands differ from the +previously described \DescRef{\LabelBase.cmd.FamilyCounterKey} and +\DescRef{\LabelBase.cmd.FamilySetCounter} only by the fact that they do not +assign a \PName{value} to a \LaTeX{} counter, but define a \Macro{macro} with +the \PName{value}. This \PName{value} is locally assigned to a counter and +then its expanded value is used. Therefore, its value at the time the option +is called applies.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyLengthKey}\OParameter{member}\Parameter{family} + \Parameter{key} + \OParameter{default}\Parameter{length} + \Macro{FamilySetLength}\Parameter{family} + \Parameter{key}\Parameter{length}\Parameter{value} + \Macro{FamilyLengthMacroKey}\OParameter{member}\Parameter{family} + \Parameter{key} + \OParameter{default}\Parameter{macro} + \Macro{FamilySetLengthMacro}\Parameter{family} + \Parameter{key}\Parameter{macro} + \Parameter{value} + \Macro{FamilyUseLengthMacroKey}\OParameter{member}\Parameter{family} + \Parameter{key} + \OParameter{default}\Parameter{macro} + \Macro{FamilySetUseLengthMacro}\Parameter{family} + \Parameter{key}\Parameter{macro} + \Parameter{value} +\end{Declaration} +With\ChangedAt{v3.12}{\Package{scrbase}} \Macro{FamilyLengthKey}, you can +define a \PName{key} that represents a \PName{length}. It does not matter +whether the \PName{length} is a \LaTeX{} length, a \TeX{} skip, or a \TeX{} +dimension. Internally the \PName{length} will be set to the \PName{value} +using \Macro{FamilySetLength}. There are some basic tests to decide whether +this \PName{value} is valid to assign to \PName{length}. The assignment will +only take place if these tests succeed. However, not all errors can be +detected, so an inaccurate \PName{value} can still result in a \TeX{} error. +Errors that are detected, however, are signalled by +\DescRef{\LabelBase.cmd.FamilyKeyStateUnknownValue}. + +If\ChangedAt{v3.15}{\Package{scrbase}} the value is omitted, the +\PName{default} is used instead. If there is no \PName{default}, the +\PName{key} can be used only with an explicit value. + +When you use \Macro{FamilyLengthMacroKey} and \Macro{FamilySetLengthMacroKey}, +or \Macro{FamilySetLengthMacro} and \Macro{FamilySetUseLengthMacro}, the +\PName{value} is stored not in a \PName{length} but in a +\PName{macro}. \Macro{FamilyLengthMacroKey} and +\Macro{FamilySetLengthMacroKey} define the \PName{macro} to be the +\PName{value} as evaluated at the point of definition, similar to +\Macro{setlength}. In contrast, +\Macro{FamilyUseLengthMacroKey}\ChangedAt{v3.20}{\Package{scrbase}} and +\Macro{FamilySetUseLengthMacroKey} store the \PName{value} directly, and +so the \PName{value} is reevaluated each time the \PName{macro} is used.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyStringKey}\OParameter{member}\Parameter{family}% + \Parameter{key}% + \OParameter{default}\Parameter{command} + \Macro{FamilyCSKey}\OParameter{member}\Parameter{family}% + \Parameter{key}% + \OParameter{default}\Parameter{command name} +\end{Declaration} +This defines\ChangedAt{v3.08}{\Package{scrbase}} a \PName{key} that accepts +any value. The value will be stored in the specified \Macro{command}. If there +is no optional argument for the \PName{default}, \Macro{FamilyStringKey} is +the same as: +\begin{lstcode}[escapeinside=`'] + \DefineFamilyKey[`\PName{member}']{`\PName{family}'}{`\PName{key}'} + {\def`\PName{command}'{#1}} +\end{lstcode} +If you use the optional argument \PName{default}, \Macro{FamilyStringKey} +corresponds to: +\begin{lstcode}[escapeinside=`'] + \DefineFamilyKey[`\PName{member}']{`\PName{family}'}{`\PName{key}'} + [`\PName{default}'] + {\def`\PName{command}'{#1}\FamilyKeyStateProcessed} +\end{lstcode} + +\begin{Example} + By default 250\Unit{g} of sausage salad should be produced. However, the + amount should be configurable by an option. To do so, the quantity to be + created is stored in the macro \Macro{saladweight}. The option to change + the weight should also be called \PValue{saladweight}: +\begin{lstcode} + \newcommand*{\saladweight}{250g} + \FamilyStringKey{butcher}% + {saladweight}[250g]{\saladweight} +\end{lstcode} + To switch back to the default weight after changing it, you can simply + call the option without the weight: +\begin{lstcode} + \FamilyOptions{butcher}{saladweight} +\end{lstcode} + This is possible because the default quantity was also set as the default + value in the definition. +\end{Example} +In this case, there are no unknown values because all values are simply used +for a macro definition. Note, however, that paragraph breaks are not allowed +when assigning a value to the key. + +In contrast\ChangedAt{v3.25}{\Package{scrbase}} to \Macro{FamilyStringKey}, +the \Macro{FamilyCSKey} command expects for the final argument not a macro but +only the name of a command, for example \PParameter{saladweight} instead of +\PParameter{\Macro{saladweight}}.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{FamilyUnknownKeyValue}\Parameter{family}\Parameter{key}% + \Parameter{value}\Parameter{value list}% +\end{Declaration} +The command \Macro{FamilyUnknownKeyValue} throws an error message due to an +unknown or illegal values by means of \DescRef{\LabelBase.cmd.FamilyKeyState}. +The \PName{value list} is a comma separated list of permissible values in the +form +%\begin{flushleft}\vskip\dp\strutbox\begin{tabular}{l} + `\PName{value}'\texttt{,} `\PName{value}' \dots +%\end{tabular}\vskip\dp\strutbox\end{flushleft} +However\ChangedAt{v3.12}{\Package{scrbase}}, the \PName{value list} is +currently not evaluated by \Package{scrbase}. +\begin{Example} + The user should now also be able to select whether the cold cuts should be + cut thick or thin. Thick should be the default setting, which should be used + even if the user does not specify how to cut the coldcuts. +\begin{lstcode} + \@ifundefined{if@thincut}{% + \expandafter + \newif\csname if@thincut\endcsname}{}% + \@ifundefined{if@coldcuts}{% + \expandafter + \newif\csname if@coldcuts\endcsname}{} + \DefineFamilyKey{butcher}% + {coldcuts}[true]{% + \FamilySetBool{butcher}{coldcuts}% + {@coldcuts}% + {#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \@thincutfalse + \else + \Ifstr{#1}{thin}{% + \@coltcutstrue + \@finecuttrue + \FamilyKeyStateProcessed + }{% + \FamilyUnknownKeyValue{butcher}% + {coldcuts}% + {#1}{% + `true', `on', `yes', + `false`, `off`, `no', + `thin'% + }% + }% + \fi + }% +\end{lstcode} + First we try to set the boolean coldcuts switch using + \DescRef{\LabelBase.cmd.FamilySetBool}. If this succeeds, i.\,e. if + \DescRef{\LabelBase.cmd.FamilyKeyState} corresponds to + \DescRef{\LabelBase.cmd.FamilyKeyStateProcessed}, thincut will be + deactivated. Otherwise, we check if the value is equal to \PValue{thin} + rather than one of the valid values for a boolean switch. In this case, both + coldcuts and thincut are activated and the state will be switched to + \DescRef{\LabelBase.cmd.FamilyKeyStateProcessed}. If the previous test + fails, the error state signalled by \DescRef{\LabelBase.cmd.FamilySetBool} + is reset to \DescRef{\LabelBase.cmd.FamilyKeyStateUnknownValue}. The list of + the permissible values will be added to it. However, since this list is no + longer used, it would have been easy to skip the call to + \Macro{FamilyUnknownKeyValue} in the example and thus assume the error + status of \DescRef{\LabelBase.cmd.FamilySetBool}. + + The \Macro{ifstr} command used in the test is explained on + \DescPageRef{scrbase.cmd.Ifstr} in \autoref{sec:scrbase.if}. +\end{Example} +% +\EndIndexGroup + + +\section{Conditional Execution} +\seclabel{if} + +The \Package{scrbase} package provides several commands for conditional +execution. Mostly it does not rely on the \TeX{} syntax of conditionals such +as +\begin{lstcode} + \iftrue + ... + \else + ... + \fi +\end{lstcode} +but uses the \LaTeX{} syntax with arguments similar to those used by \LaTeX{} +commands like \Macro{IfFileExists}, \Macro{@ifundefined}, +\Macro{@ifpackageloaded}, and many others. + +% TODO: Fix translation (note: this text does not really correspond to the +% German manual but there is a similar note at the (not free) German book +From \KOMAScript~3.28, following a recommendation from \LaTeX{} team members, +\Package{scrbase} does not longer use \Macro{if\dots} but \Macro{If\dots} for +commands that expect an argument instead of using the \TeX{} +syntax. Some commands from prior versions of \KOMAScript{} have been +removed. You may use package \Package{iftex} (see \cite{package:iftex}) to +replace the functionality. Others have been renamed. +% :ODOT + +\begin{Declaration} + \Macro{Ifundefinedorrelax}% + \Parameter{name}\Parameter{then code}\Parameter{else code} +\end{Declaration} +This\ChangedAt{v3.28}{\Package{scrbase}} command works like +\Macro{@ifundefined} from the \LaTeX{} kernel (see \cite{latex:source2e}). So +the \PName{then code} is executed if \PName{name} is the name of a +command that is currently either not defined or \Macro{relax}. Otherwise, the +\PName{else code} is executed. Unlike \Macro{@ifundefined}, no hash +memory is allocated nor is \Macro{\PName{Name}} set to \Macro{relax} if +\Macro{\PName{name}} was previously undefined.% +\EndIndexGroup + +\begin{Declaration} + \Macro{Ifnotundefined}\Parameter{name}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.28}{\Package{scrbase}} the command with the given name has +already been defined, the \PName{then code} is executed. Otherwise, the +\PName{else code} is executed. Since \eTeX{} already has a primitive +\Macro{ifdefined}, this somewhat unwieldy name, unfortunately, had to be +chosen. There is no corresponding internal command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifstr}\Parameter{string 1}\Parameter{string 2}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +Both\ChangedAt{v3.28}{\Package{scrbase}} \PName{string} arguments are expanded +and then compared. If the expansions are the same, the \PName{then code} is +executed. Otherwise the \PName{else code} is executed. There is no +corresponding internal command. +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifstrstart}\Parameter{string 1}\Parameter{string 2}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +Both\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{string} arguments are expanded and then compared. If \PName{string 1}, +apart from white space, begins with \PName{string 2}, the \PName{then code} is +executed. Otherwise, the \PName{else code} is executed. There is no +corresponding internal command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfArgIsEmpty}\Parameter{argument} + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.19}{\Package{scrbase}} the \PName{argument} is empty, the +\PName{then code} is executed, otherwise the \PName{else code} is +executed. Even one whitespace character is considered non-empty. Since the +\PName{argument} is not expanded, macros that expand to an empty result are +also considered to be a non-empty \PName{argument}. The same applies to +\Macro{relax} or undefined macros.% +\EndIndexGroup + + +\iffalse % internal +\begin{Declaration} + \Macro{scr@ifluatex} + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.21}{\Package{scrbase}} you use lua\TeX{}, the \PName{then +code} will be executed. Otherwise, the \PName{else code} will be executed. +\iftrue% Umbruchkorrekturtext +This test is rarely useful. % +\fi% +As a rule, it is better to test directly for the command you want. +There\textnote{Attention!} is no user equivalent for this instruction. Use the +\Package{ifluatex}\important{\Package{ifluatex}} package instead (see +\cite{package:ifluatex}).% +\EndIndexGroup +\fi + + +\iffalse% It makes no sense to document this instruction yet +\begin{Declaration} + \Macro{scr@ifpdforluatex} + \Parameter{then code}\Parameter{else code} +\end{Declaration} +Until lua\TeX~0.85, it was mostly irrelevant whether you used pdf\TeX{} or +lua\TeX{}. This command, which executes the \PName{then code} in both cases, +derives from that fact. If neither pdf\TeX{} nor lua\TeX{} is used, the +\PName{else code} will be executed. Since version~0.85, lua\TeX{} has given up +compatibility with many of its commands. Therefore this distinction is no +longer useful in practice and is no longer used by \KOMAScript{} itself. There +is no user equivalent of this statement.% +\EndIndexGroup +\fi + +\iffalse % internal +\begin{Declaration} + \Macro{scr@ifpdftex}% + \Parameter{then code}\Parameter{else code}% +\end{Declaration} +If you use pdf\TeX{}, the \PName{then code} will be executed. Otherwise, the +\PName{else code} will be executed. It does not matter whether a PDF-file is +actually generated or not. This test is rarely useful. As a rule, you should +test directly for the command you want instead.% +\EndIndexGroup +\fi + +\iffalse % internal +\begin{Declaration} + \Macro{scr@ifVTeX}% + \Parameter{then code}\Parameter{else code}% +\end{Declaration} +If you use V\TeX{}, the \PName{then code} is executed. Otherwise, the +\PName{else code} is executed. This test is seldom useful. As a rule, +you should test directly for the command you want instead.% +% +\EndIndexGroup +\fi + + +\begin{Declaration} + \Macro{Ifpdfoutput}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.28}{\Package{scrbase}} a PDF file is generated, the +\PName{then code} is executed. Otherwise, the \PName{else code} is +executed. It does not matter whether PDF file is created using lua\TeX{}, +pdf\TeX{}, or V\TeX{}, or \XeTeX{}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifpsoutput}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.28}{\Package{scrbase}} a PostScript file is generated, the +\PName{then code} is executed. Otherwise, the \PName{else code} is +executed. V\TeX{} can generate PostScript directly, which is recognized +here. However, if V\TeX{} is not used but the switch \Macro{if@dvips} has been +defined, the decision depends on that switch. \KOMAScript{} provides +\Macro{if@dvips} in +\hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea}% +\IndexCmd{if@dvips}. +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifdvioutput}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.28}{\Package{scrbase}} a DVI-file is generated, the +\PName{then code} is executed. Otherwise, the \PName{else code} is +executed. A DVI file is always assumed to be generated if no direct output of +a PDF file or a PostScript file can be detected.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisdimen}\Parameter{expression}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{expression} expands to a \Macro{dimen}, i.\,e. a \TeX{} length +register, the \PName{then code} is executed. Otherwise the \PName{else + code} is executed. The command is not completely expandable, and there +is no corresponding internal command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisdimension}\Parameter{expression}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{expression} expands to something syntactically equivalent to a length, +the \PName{then code} is executed. Otherwise the \PName{else code} is +executed. Note\textnote{Attention!} that unknown units and missing units +cause an error message. The command is not completely expandable, and there is +no corresponding internal command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifdimen}\Parameter{string}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +The \PName{then code}\ChangedAt{v3.28}{\Package{scrbase}} is executed if +the first-order expansion of \PName{string} consists of digits and a valid +length unit. Otherwise, the \PName{else code} is used. There is no +corresponding internal command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisdimexpr}\Parameter{expression}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{expression} expands to an \eTeX{} \Macro{dimexpr}\IndexCmd{dimexpr}, +the \PName{then code} is executed. Otherwise, the \PName{else code} is +executed. Note\textnote{Attention!} that illegal expressions result in +error messages. The command is not completely expandable, and there is no +corresponding internal command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisskip}\Parameter{expression}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{expression} expands to a \Macro{skip}, i.\,e. a \TeX{} distance, the +\PName{then code} is executed. Otherwise, the \PName{else code} is +executed. The command is not completely expandable, and there is no +corresponding internal command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisglue}\Parameter{expression}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{expression} expands to something syntactically equivalent of the value +of a skip, the \PName{then code} is executed. Otherwise, the \PName{else code} +is executed. Note\textnote{Attention!} that invalid units and missing units +cause an error message. The command is not completely expandable, and +there is no corresponding internal command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisglueexpr}\Parameter{expression}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{expression} expands to a \Macro{glueexpr}, i.\,e. an \eTeX{} distance +expression, the \PName{then code} is executed. Otherwise, the \PName{else + code} is executed. Note,\textnote{Attention!} that illegal expressions +result in error messages. The command is not completely expandable, and +there is no corresponding internal command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifiscounter}\Parameter{counter}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{counter} is defined as a \LaTeX{} counter, the \PName{then code} is +executed. Otherwise, the \PName{else code} is executed. The command is +not completely expandable, and there is no corresponding internal command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifiscount}\Parameter{count}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{count} expands to a \Macro{count}, i.\,e. a \TeX{} counter, the +\PName{then code} is executed. Otherwise, the \PName{else code} is +executed. The command is not completely expandable, and there is no +corresponding internal command. For tests of \LaTeX{} counters, see +\DescRef{\LabelBase.cmd.Ifiscounter}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisinteger}\Parameter{expression}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{expression} expands to something syntactically equivalent to of the +value of a counter, i.\,e. a negative or positive integer, the \PName{then + code} is executed. Otherwise, the \PName{else code} is +executed. The command is not completely expandable, and there is no +corresponding internal command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifnumber}\Parameter{string}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +The\ChangedAt{v3.28}{\Package{scrbase}} \PName{then code} is executed if +the first-order expansion of \PName{string} consists only of +digits. Otherwise, the \PName{else code} is used. There is no +corresponding internal command. +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifisnumexpr}\Parameter{expression}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} +\PName{expression} expands to a \Macro{numexpr}, i.\,e. an \eTeX{} number +expression, the \PName{then code} is executed. Otherwise, the \PName{else + code} is executed. Note\textnote{Attention!} that illegal expressions +result in error messages. The command is not completely expandable, and +there is no corresponding internal command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfActiveMkBoth}\Parameter{then code}\Parameter{else code} +\end{Declaration} +The\ChangedAt{v3.27}{\Package{scrbase}} \LaTeX{} kernel uses +\DescRef{scrlayer.cmd.@mkboth}\important{\Macro{@mkboth}}\IndexCmd{@mkboth} to +distinguish between automatic and manual running heads. Usually, it sets both +marks with automatic running heads. With manual running heads, it does not set +any mark. To determine whether automatic running heads are active, many +packages compare \DescRef{scrlayer.cmd.@mkboth} with either +\DescRef{maincls.cmd.markboth}\IndexCmd{markboth} or \Macro{@gobbletwo}. But +this does not account for all cases in which \DescRef{scrlayer.cmd.@mkboth} +may be redefined. Therefore \Macro{IfActiveMkBoth} tests if +\DescRef{scrlayer.cmd.@mkboth} would actually set a mark, even when +\Macro{marks} appears in the definition of \DescRef{scrlayer.cmd.@mkboth}. If +such an active \DescRef{scrlayer.cmd.@mkboth} is detected, the +\PName{then code} is executed. In all other cases, the \PName{else code} is +used.% +\begin{Example} + For example, suppose you want to set the right mark if and only if + automatic running heads are used, e.\,g., the pagestyle + \PageStyle{headings}\IndexPagestyle{headings}. For a first attempt, + you might use: +\begin{lstcode} + \ifx\@mkboth\markboth \markright{running head}\fi +\end{lstcode} + Later you discover that some package does not use the usual +\begin{lstcode} + \let\@mkboth\markboth +\end{lstcode} + but +\begin{lstcode} + \renewcommand{\@mkboth}{\markboth} +\end{lstcode} + to activate automatic running heads. Because of this, your comparison always + fails and never calls \DescRef{maincls.cmd.markright}. To solve this, you + try the following change: +\begin{lstcode} + \ifx\@mkboth\@gobbletwo\else \markright{running head}\fi +\end{lstcode} + Unfortunately, now \DescRef{maincls.cmd.markright} is also called for + manual running heads, because someone has defined +\begin{lstcode} + \renewcommand{\@mkboth}[2]{% + \typeout{DEBUG: ignoring running head setting}% + } +\end{lstcode} + for this case. + + Fortunately, both problems are easy to solve with \Package{scrbase}: +\begin{lstcode} + \IfActiveMkBoth{\markright{Kolumnentitel}}{} +\end{lstcode}% +\end{Example} +By the way, an even simpler solution for the problem in the example +would be to use \DescRef{scrlayer.cmd.@mkright} from package +\hyperref[cha:scrlayer]{\Package{scrlayer}} (see +\autoref{sec:scrlayer.pagestyle.content}, +\DescPageRef{scrlayer.cmd.@mkright}).% +\EndIndexGroup + + +\begin{Declaration} + \Macro{if@atdocument}\ \PName{then code}\ % + \textMacro{else}\ \PName{else code}\ \textMacro{fi} +\end{Declaration} +This conditional command intentionally exists only as an internal command. In +the document preamble, \Macro{if@atdocument} corresponds to \Macro{iffalse}. +After \Macro{begin}\PParameter{document}, it corresponds to \Macro{iftrue}. +Authors of classes and packages may find this command useful if a command +should behave differently depending on whether it is used in the preamble or +inside document body. Note\textnote{Attention!} that this command is a +condition using \TeX{} syntax and not \LaTeX{} +syntax. From\ChangedAt{v3.37}{\Package{scrbase}} \LaTeX{} 2020/10/01 +\Package{scrbase} does \Macro{@atdocumentrue} already with the generic +\LaTeX{} hook \texttt{begindocument/before}. Therefore for code with +\Macro{AtBeginDocument} the state of \Macro{if@atdocument} is already +\Macro{iftrue} for all packages and classes. For using \Macro{if@atdocument} +with the generic \LaTeX{} hook \texttt{begindocument/before} you would need an +additional hook rule to have a definite state.% +\EndIndexGroup + + +\section{Defining Language-Dependent Terms} +\seclabel{languageSupport} +\BeginIndexGroup +\BeginIndex{}{language>definition} +\index{language>dependent terms|see{language definition}} +\index{terms>language-dependent|see{language definition}} + +Beginners often find it difficult to change language-dependent terms +\Macro{listfigurename}\IndexCmd{listfigurename}, by default usually ``List of +Figures.'' For example, if these are simply redefined with +\Macro{renewcommand} in the document preamble, they will not survive a later +change of language. If you use \Package{babel}\IndexCmd{babel}, the +redefinition in the preamble is overwritten with +\Macro{begin}\PParameter{document}. + +To define or change language-dependent terms, you normally have to redefine +commands like \Macro{captionsenglish} so that the new or redefined terms are +defined in addition to the previous terms. This is made more difficult by the +fact that some packages like \Package{german}\IndexPackage{german} or +\Package{ngerman}\IndexPackage{ngerman} redefine those settings when they are +loaded. These definitions, unfortunately, occur in a way that undoes all the +previous changes. For this reason, it makes sense to delay changes until +\Macro{begin}\PParameter{document} by using \Macro{AtBeginDocument}, that is, +after all packages have been loaded. A user can also use +\Macro{AtBeginDocument} or redefine the language-dependent terms not in the +preamble but after \Macro{begin}\PParameter{document}. + +Adding further to the difficulty, some packages define additional +language-dependent terms in \Macro{captions\PName{language}}, while others use +\Macro{extras\PName{language}}. So the user must understand the commands very +well in order to use the correct one in the right way. + +The \Package{scrbase} package therefore provides additional commands to define +or modify language-dependent terms, relieving the user of many of these +problems. These commands also let you simultaneously define or change the +language-dependent terms of several dialects or forms of a language. + +\begin{Declaration} + \Macro{defcaptionname}% + \Parameter{language list}\Parameter{term}\Parameter{definition}% + \Macro{providecaptionname}% + \Parameter{language list}\Parameter{term}\Parameter{definition}% + \Macro{newcaptionname}% + \Parameter{language list}\Parameter{term}\Parameter{definition}% + \Macro{renewcaptionname}% + \Parameter{language list}\Parameter{term}\Parameter{definition}% + \Macro{defcaptionname*}% + \Parameter{language list}\Parameter{term}\Parameter{definition}% + \Macro{providecaptionname*}% + \Parameter{language list}\Parameter{term}\Parameter{definition}% + \Macro{newcaptionname*}% + \Parameter{language list}\Parameter{term}\Parameter{definition}% + \Macro{renewcaptionname*}% + \Parameter{language list}\Parameter{term}\Parameter{definition} +\end{Declaration} +With these four commands and their starred variants, you can assign a +\PName{definition} for a particular language to a \PName{term}. Several +languages can be concatenated with comma in the \PName{language list}. + +The \PName{term} is always a macro. The commands differ depending on whether a +given language or a \PName{term} within a given language is already defined at +the time the command is called. + +If a language is not defined, \Macro{providecaptionname} does nothing other +than write a message to the log file. This happens only once for each +language. If a language is defined but does not yet contain a corresponding +\PName{term}, it will be defined using \PName{definition}. However, the +\PName{term} will not be redefined if the language already has such a +definition; instead, an appropriate message is written to the log file. + +On the other hand, if a language has not yet been defined, +\Macro{newcaptionname} defines a new language command will be created. For the +language \PValue{USenglish}, for example, this would be the language command +\Macro{captionsUSenglish}. This definition will also be noted in the log file. +If \PName{term} is not yet defined in this language, it will be defined using +\PName{definition}. If the \PName{term} already exists in a language, an error +message is issued. + +The \Macro{renewcaptionname} command behaves still differently. If a language +is undefined, an error message is issued. If the \PName{term} is not defined +in this language, an error message is also issued. If the \PName{term} is +defined in the language, it will be redefined to \PName{definition}. + +The\ChangedAt{v3.12}{\Package{scrbase}} \Macro{defcaptionname} command always +defines the \PName{term}, thus overwriting any previous definition. As with +\Macro{providecaptionname}, the language specified need not be previously +defined. + +\KOMAScript{} itself uses \Macro{providecaptionname} to define the commands in +\autoref{sec:scrlttr2-experts.languages}. +\DescPageRef{scrlttr2-experts.cmd.yourrefname}. + +\begin{Example} + If you prefer ``fig.'' instead of ``figure'' in \PValue{USenglish}, you can + achieve this using: +\begin{lstcode} + \renewcaptionname{USenglish}{\figurename}{fig.} +\end{lstcode} + If you want the same change not only in \PValue{USenglish} but also in + \PValue{UKenglish}, you do not need an additional: +\begin{lstcode} + \renewcaptionname{UKenglish}{\figurename}{fig.} +\end{lstcode} + but can simply extend the \PName{language list}: +\begin{lstcode} + \renewcaptionname{USenglish,UKenglish}{\figurename}{fig.} +\end{lstcode} + You can extend the \PName{language list} in the same manner with + \PValue{american}, \PValue{australian}, \PValue{british}, \PValue{canadian}, + and \PValue{newzealand}. +\end{Example} + +Since \KOMAScript~3.12\ChangedAt{v3.12}{\Package{scrbase}}, you no longer need +to delay the definition or redefinition until +\Macro{begin}\PParameter{document} using \Macro{AtBeginDocument} because +\Package{scrbase} does this itself if the commands are called in the +document's preamble. Additionally, \Package{scrbase} now checks if a term +should be redefined in \Macro{extras\PName{language}} instead of +\Macro{captions\PName{language}}. The new starred variants of the commands +always use \Macro{extras\PName{language}}. So redefining language-dependent +terms for packages like \Package{hyperref} that use +\Macro{extras\PName{language}} should work as expected. + +Language-dependent terms that are commonly defined by classes and language +packages are described in \autoref{tab:scrbase.commonNames}. + +\begin{desclist} + \renewcommand*{\abovecaptionskipcorrection}{-\normalbaselineskip}% + \desccaption[{% + Overview of common language-dependent terms% + }]{% + Overview of language-dependent terms of typical language packages% + \label{tab:scrbase.commonNames}% + }{% + Overview of common language dependent terms + (\emph{continued})% + }% + \entry{\Macro{abstractname}}{% + heading of the abstract% + \IndexCmd{abstractname}% + }% + \entry{\Macro{alsoname}}{% + ``see also'' in additional cross references of the index% + \IndexCmd{alsoname}% + }% + \entry{\Macro{appendixname}}{% + ``appendix'' in the heading of an appendix chapter% + \IndexCmd{appendixname}% + }% + \entry{\Macro{bibname}}{% + heading of the bibliography% + \IndexCmd{bibname}% + }% + \entry{\Macro{ccname}}{% + prefix heading for the distribution list of a letter% + \IndexCmd{ccname}% + }% + \entry{\Macro{chaptername}}{% + ``chapter'' in the heading of a chapter% + \IndexCmd{chaptername}% + }% + \entry{\Macro{contentsname}}{% + heading of the table of contents% + \IndexCmd{contentsname}% + }% + \entry{\Macro{enclname}}{% + prefix heading for the enclosures of a letter% + \IndexCmd{enclname}% + }% + \entry{\Macro{figurename}}{% + prefix heading of figure captions% + \IndexCmd{figurename}% + }% + \entry{\Macro{glossaryname}}{% + heading of the glossary% + \IndexCmd{glossaryname}% + }% + \entry{\Macro{headtoname}}{% + ``to'' in header of letter pages% + \IndexCmd{headtoname}% + }% + \entry{\Macro{indexname}}{% + heading of the index% + \IndexCmd{indexname}% + }% + \entry{\Macro{listfigurename}}{% + heading of the list of figures% + \IndexCmd{listfigurename}% + }% + \entry{\Macro{listtablename}}{% + heading of the list of tables% + \IndexCmd{listtablename}% + }% + \entry{\Macro{pagename}}{% + ``page'' in the pagination of letters% + \IndexCmd{pagename}% + }% + \entry{\Macro{partname}}{% + ``part'' in the heading of a part% + \IndexCmd{partname}% + }% + \entry{\Macro{prefacename}}{% + heading of the preface% + \IndexCmd{prefacename}% + }% + \entry{\Macro{proofname}}{% + prefix heading of mathematical proofs% + \IndexCmd{proofname}% + }% + \entry{\Macro{refname}}{% + heading of the list of references% + \IndexCmd{refname}% + }% + \entry{\Macro{seename}}{% + ``see'' in cross references of the index% + \IndexCmd{seename}% + }% + \entry{\Macro{tablename}}{% + prefix heading at table captions% + \IndexCmd{tablename}% + }% +\end{desclist} +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Identifying \KOMAScript} +\seclabel{identify} + +Although\,---\,or especially because\,---\,\Package{scrbase} is generally +designed as a package for authors of classes and packages, it is of course +used by the \KOMAScript{} classes and most \KOMAScript{} packages. It +therefore contains a that is present in all \KOMAScript{} classes +and all basic \KOMAScript{} packages. + +\begin{Declaration} + \Macro{KOMAScriptVersion} +\end{Declaration} +\KOMAScript{} defines the major version of \KOMAScript{} in this command. It +has the form ``\PName{date} \PName{version} \texttt{KOMA-Script}''. This major +version is same for all \KOMAScript{} classes and all \KOMAScript{} packages +used by the classes. For this reason, it can be queried after you +load \Package{scrbase}, too. For example, this guide was made using +\KOMAScript{} version ``\KOMAScriptVersion''. +% +\EndIndexGroup + + +\section{Extensions to the \LaTeX{} Kernel} +\seclabel{latexkernel} + +Sometimes the \LaTeX{} kernel itself provides commands but lacks other very +similar commands that would often be useful. A few such commands are provided +by \Package{scrbase} for authors of packages and classes. + +\begin{Declaration} + \Macro{ClassInfoNoLine}\Parameter{class name}\Parameter{information}% + \Macro{PackageInfoNoLine}\Parameter{package name}\Parameter{information}% +\end{Declaration}% +The \LaTeX{} kernel already provides authors of classes and packages commands +like \Macro{ClassInfo} and \Macro{PackageInfo} to write information, along +with the current line number, to the log file. In addition to +\Macro{PackageWarning} and \Macro{ClassWarning}, which throw warning messages +with line numbers, it also provides \Macro{PackageWarningNoLine} and +\Macro{ClassWarningNoLine} for warning messages without line numbers. However +the obvious commands \Macro{ClassInfoNoLine} and \Macro{PackageInfoNoLine}, +for writing information without line numbers into the log file, are missing. +The \Package{scrbase} package provides them. +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{l@addto@macro}\Parameter{command}\Parameter{extension}% +\end{Declaration}% +The \LaTeX{} kernel provides an internal command \Macro{g@addto@macro} to +extend the definition of macro \Macro{command} globally with +\PName{extension}. This works in this form only for macros that have no +arguments. However, sometimes you may need a command like this that works +locally within the current group. The \Package{scrbase} package provides such +a command with \Macro{l@addto@macro}. An alternative is to use the +\Package{etoolbox}\IndexPackage{etoolbox} or +\Package{xpatch}\IndexPackage{xpatch} package, which offers a whole range of +such commands for different purposes (see \cite{package:etoolbox} or +\cite{package:xpatch}).% +\EndIndexGroup + + +\section{Extensions to the Mathematical Features of \eTeX} +\seclabel{etex} + +\eTeX{}, which is used by \LaTeX{} and loaded by \KOMAScript{}, has extended +capabilities for calculating simple arithmetic with \TeX{} counters and +integers using \Macro{numexpr}\IndexCmd{numexpr}. The four basic arithmetic +operations and parentheses are supported. Division is rounded +correctly. Sometimes additional operators would be useful. + +\begin{Declaration} + \Macro{XdivY}\Parameter{dividend}\Parameter{divisor}% + \Macro{XmodY}\Parameter{dividend}\Parameter{divisor}% +\end{Declaration}% +The\ChangedAt{v3.05a}{\Package{scrbase}} \Macro{XdivY} command returns the +value of the integer quotient, with the \Macro{XmodY} command giving the value +of the remainder. This type of of division is defined by the equation +\[ +\textit{dividend} = \textit{divisor} \cdot +\textit{integer quotient} + \textit{remainder} +\] +where \textit{dividend}, \textit{divisor}, and \textit{remainder} are +integers, \textit{remainder} is greater or equal to 0 and less than +\textit{divisor}, and \textit{divisor} is a natural number greater than 0. + +You can assign the value to a counter or use it directly within an expression +using \Macro{numexpr}. To output the value as an Arabic number, you must +prefix it with \Macro{the}.% +% +\EndIndexGroup + + +\section[{General Mechanism for Multi-Level Hooks}] +{General Mechanism for Multi-Level + Hooks\ChangedAt[2019/01]{v3.27}{\Package{scrbase}}} +\seclabel{hooks} + +\BeginIndexGroup +\BeginIndex{}{Hooks} +The \LaTeX{} kernel provides a few \emph{hooks} in the processing of +a document where additional code can be inserted. Class and package authors +should be very familiar with \Macro{AtBeginDocument} and +\Macro{AtEndDocument}. \KOMAScript{} offers similar features in some places, +for example to hook code into the execution of +\hyperref[sec:maincls.structure]{sectioning commands}. Over the years, there +have been two problems: +\begin{itemize} + \item There are never enough hooks. + \item There is some code that should only be executed once, as if it almost + drops off the hook, as well as code that must be executed each time the + hook is encountered, thus remaining permanently on the hook. +\end{itemize} +Usually, to define a single hook you must define a command that collects the +code for each hook. This code is then stored in another internal macro, which +must be inserted at the point where the collected code is executed. The more +hooks you insert, the more such commands there are. To allow for both +single-use code and permanent code may even require two hooks, and therefore +twice the number of commands to be defined. + +The example of sectioning commands shows that the first problem can sometimes +be exacerbated by having only a single point for code execution. One package +author may need only one way to execute the same code for all sectioning +commands. Another package author would prefer to execute different code for +certain sectioning commands only. Meeting both these demands would require a +general hook as well as a hook for each sectioning command. These requirements +are doubled again because of the second problem. + +\KOMAScript{} therefore offers a generalized hook mechanism in +\Package{scrbase} that provides multi-level hooks for both single-use and +persistent code. These hooks are named \emph{do-hooks} because of their +implementation. From this also comes the names of the instructions by which +they are controlled. + +\begin{Declaration} + \Macro{ExecuteDoHook}\Parameter{specifier} +\end{Declaration} +Hooks\ChangedAt[2019/01]{v3.27}{\Package{scrbase}} are implemented with this +command. The \PName{specifier} determines the name or names of the hook. The +\PName{specifier} is always completely expanded for analysis. + +The \PName{specifier} generally consists of strings separated by forward +slashes (``/''). Initially, \Macro{ExecuteDoHook} divides the string at the +first slash. The first part is the name. The remainder (without the slash) is +the argument. Then the code for the hook with this name is executed. Next the +first part of the remaining string is divided again from the remainder, +combined with a slash after the name to form a new name, and the code with +this name is executed. This process continues until the code for the hook with +the name \PName{specifier} has been executed and the argument is empty. + +In the simplest case, the \PName{specifier} consists of a single name. In this +case, the persistent code is executed first, with an empty argument, for +exactly one hook specified by this name. + +At each stage of execution, single-use code is also executed after the hook's +persistent code, and then the single-use code is globally removed from the +hook. + +\begin{Example} + By inserting \DescRef{\LabelBase.cmd.ExecuteDoHook}% + \PParameter{heading/begingroup/\PName{name}} into the execution of each + sectioning command defined with + \DescRef{maincls-experts.cmd.DeclareSectionCommand}, the \KOMAScript{} + classes ultimately have six hooks inserted at that code-point, executed in + this order: + \begin{enumerate} + \item \PValue{heading} with the argument \PValue{begingroup/}\PName{name} + for persistent code, + \item \PValue{heading} with the argument \PValue{begingroup/}\PName{name} + for single-use code, + \item \PValue{heading/begingroup} with the argument \PName{name} for + persistent code, + \item \PValue{heading/begingroup} with the argument \PName{name} for + single-use code, + \item \PValue{heading/begingroup/}\PName{name} with an empty argument for + persistent code, + \item \PValue{heading/begingroup/}\PName{name} with an empty argument for + single-use code. + \end{enumerate} + The \PName{name} is the name of section level specified in + \DescRef{maincls-experts.cmd.DeclareSectionCommand}, + \DescRef{maincls-experts.cmd.DeclareNewSectionCommand} or + \DescRef{maincls-experts.cmd.ProvideSectionCommand}, or the sectioning + command specified by it, for example \PValue{chapter} or + \PValue{subparagraph}. Looking at the list above, and considering that there + are various sectioning commands, it becomes clear that the \PValue{heading} + and \PValue{heading/begingroup} hooks will be called multiple times for each + sectioning command.% +\end{Example}% +% +\EndIndexGroup + +\begin{Declaration} + \Macro{AddtoDoHook}\Parameter{name}\Parameter{command} + \Macro{AddtoOneTimeDoHook}\Parameter{name}\Parameter{command} +\end{Declaration} +\Macro{AddtoDoHook}\ChangedAt[2019/01]{v3.27}{\Package{scrbase}} appends +persistent code to the hook named \PName{name}. The code to be added is the +\PName{command}, to which the argument mentioned in the description of +\DescRef{\LabelBase.cmd.ExecuteDoHook} is appended as a parameter. +\begin{Example} + Suppose you want to count how many times the \Macro{section} command is + executed. This would be simple, continuing the previous example: +\begin{lstcode} + \newcounter{sectionCounter} + \AddtoDoHook{heading/begingroup/section} + {\stepcounter{sectionCounter}} +\end{lstcode} + However, in reality, \Macro{stepcounter}\PParameter{sectionCounter}% + \PParameter{} would be executed. Remember that an argument is always appended + as a parameter. In the case of the hook named + \PValue{heading/begingroup/section}, this argument is empty. Since an empty + parameter becomes an empty group here, it is better to consume this empty + parameter: +\begin{lstcode} + \newcommand*{\stepcountergobble}[2]{% + \stepcounter{#1}% + } + \AddtoDoHook{heading/begingroup/section} + {\stepcountergobble{sectionCounter}} +\end{lstcode} + Here, the appended, empty parameter of \Macro{stepcountergobble} is read but + not used. + + If instead of \Macro{section}, you want to count all sectioning commands, you + only need to change the hook name: +\begin{lstcode} + \AddtoDoHook{heading/begingroup} + {\stepcountergobble{sectionCounter}} +\end{lstcode} + By the way, the appended parameter is not empty in this case but contains the + name of the sectioning level or sectioning command. If you wanted to count + the sectioning commands individually, you could just use this: +\begin{lstcode} + \newcommand*{\stepCounter}[1]{% + \stepcounter{#1Counter}% + } + \AddtoDoHook{heading/begingroup} + {\stepCounter} +\end{lstcode} + Of course, you must also define the counters \Counter{partCounter}, + \Counter{chapterCounter} down to \Counter{subparagraphCounter}. +\end{Example} + +The \Macro{AddtoOneTimeDoHook} command works similarly but adds the +\PName{command} to the single-use code. This code will be globally removed +after the first execution.% +\EndIndexGroup + +\begin{Declaration} + \Macro{ForDoHook}\Parameter{specification}\Parameter{command} +\end{Declaration} +While\ChangedAt[2019/01]{v3.27}{\Package{scrbase}} +\DescRef{\LabelBase.cmd.ExecuteDoHook} executes the commands previously stored +with \DescRef{\LabelBase.cmd.AddtoDoHook} or +\DescRef{\LabelBase.cmd.AddtoOneTimeDoHook} for the hook given by the +\PName{specifier}, this macro executes the \PName{command} immediately. There +are two parameters added to the \PName{command}. The first is the hook's name; +the second, the hook's argument. + +This command is a byproduct of the implementation of +\DescRef{\LabelBase.cmd.ExecuteDoHook}. Normally, neither end users nor package +authors should need this command.% +\EndIndexGroup + +\begin{Declaration} + \Macro{SplitDoHook}\Parameter{specifier}\Parameter{head macro} + \Parameter{remainder macro} +\end{Declaration} +As\ChangedAt[2019/01]{v3.27}{\Package{scrbase}} can be seen from the preceding +explanations, the parameter of a \PName{command} added with +\DescRef{\LabelBase.cmd.AddtoDoHook} or +\DescRef{\LabelBase.cmd.AddtoOneTimeDoHook} can also be a multi-part +\PName{specifier}. You can use \Macro{SplitDoHook} to divide a +\PName{specifier} into the front element and the remainder. The +\PName{head macro} will be set to the front element. The \PName{remainder +macro} will be set to the rest. If there is no remainder left, the +\PName{remainder macro} is set to empty. If the \PName{specifier} was already +empty, a warning is issued and both the \PName{head macro} and the +\PName{remainder macro} are set to empty. + +\begin{Example} + If you want to increase a counter at the start of a group in which a heading + is issued but decrease it at the end, you can do this with two hooks: +\begin{lstcode} + \AddtoDoHook{heading/begingroup} + {\stepCounter} + \newcommand*{\restepCounter}[1]{% + \addtocounter{#1Counter}{-1}% + } + \AddtoDoHook{heading/endgroup} + {\restepCounter} +\end{lstcode} + But you could also use a single hook and split its parameters: +\begin{lstcode} + \newcommand*{\changeCounter}[1]{% + \SplitDoHook{#1}{\Group}{\Level}% + \Ifstr{\Group}{begingroup}{% + \stepcounter{\Level Counter}% + }{% + \Ifstr{\Group}{endgroup}{% + \addtocounter{\Level Counter}{-1}% + }{}% + }% + } + \AddtoDoHook{heading} + {\changeCounter} +\end{lstcode} + As you can see, the first solution is much simpler. In addition, it would + be easy to overlook including the empty group for the second false-case in + the second example. That would be fatal, however, as there make be other + hooks with named \PValue{heading} but with different arguments. +\end{Example} + +Strictly speaking, this command is a byproduct of the implementation of +\DescRef{\LabelBase.cmd.ForDoHook}.% +\EndIndexGroup +% +\EndIndexGroup + +\section{Obsolete Options and Commands} +\seclabel{obsolete} + +% TODO: Fix new translation +Prior release of \Package{scrbase} provided some options and commands that has +been removed or replaced meanwhile. Those are documented in this section only +for completeness but shouldn't be used any longer. +% :ODOT + +% \LoadNonFree{scrbase}{0}% not available in English +\begin{Explain} + \begin{Declaration} + \Macro{FamilyElseValues} + \end{Declaration} + Since version 3.12 the command is deprecated. Nevertheless, + \Package{scrbase} detects its use and issues a message requesting that you + update the code accordingly.% + \EndIndexGroup% + + + \begin{Declaration} + \OptionVName{internalonly}{value} + \end{Declaration} + Since version 3.28 this option is deprecated. For compatibility it is + processed (see \DescRef{\LabelBase.cmd.FamilyKeyStateProcessed}) but + ignored.% + \EndIndexGroup% +\end{Explain}% +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrbase.html b/macros/latex/contrib/koma-script/doc/scrbase.html index b386b493a2..769e33aa24 100644 --- a/macros/latex/contrib/koma-script/doc/scrbase.html +++ b/macros/latex/contrib/koma-script/doc/scrbase.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrbase" /> + + - + - The KOMA-Script Documentation Wrapper + Basic Functions in the scrbase Package -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

Basic Functions in the scrbase Package

+

Grundlegende Funktionen im Paket scrbase

- I think you are searching for the KOMA-Script documentation. You - may find the Englisch documentation - at scrguien.pdf and an index of it - at scrguien.html. + I think you are searching for the chapter + “Basic Functions in the scrbase Package” in the + KOMA-Script documentation.
- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Grundlegende Funktionen im Paket scrbase in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrbook.html b/macros/latex/contrib/koma-script/doc/scrbook.html index b386b493a2..b237757886 100644 --- a/macros/latex/contrib/koma-script/doc/scrbook.html +++ b/macros/latex/contrib/koma-script/doc/scrbook.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrbook" /> + + - + - The KOMA-Script Documentation Wrapper + The Main Classes: scrbook, scrreprt, and scrartcl -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

The Main Classes: scrbook, scrreprt, and scrartcl

+

Die Hauptklassen scrbook, scrreprt, scrartcl

- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Die Hauptklassen scrbook, scrreprt, scrartcl in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrbookreportarticle-de.tex b/macros/latex/contrib/koma-script/doc/scrbookreportarticle-de.tex new file mode 100644 index 0000000000..5e98e698c6 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrbookreportarticle-de.tex @@ -0,0 +1,5136 @@ +% ====================================================================== +% scrbookreportarticle-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrbook, scrreprt, and scrartcl of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrbookreportarticle-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrbook, scrreprt, scrartcl)] + +\chapter{Die Hauptklassen \Class{scrbook}, \Class{scrreprt}, \Class{scrartcl}} +\labelbase{maincls}% +\BeginIndexGroup +\BeginIndex{Class}{scrbook}% +\BeginIndex{Class}{scrreprt}% +\BeginIndex{Class}{scrartcl}% + +\AddSeeIndex{Anweisung}{gen}{\GuidecmdIndexShort}{cmd}% +\AddSeeIndex{Makro}{gen}{\GuidecmdIndexShort}{cmd}% +Die Hauptklassen des \KOMAScript-Pakets sind als Äquivalent zu den +\LaTeX-Standard"-klassen angelegt. Das bedeutet, dass zu den drei +Standardklassen \Class{book}\IndexClass{book}, \Class{report}% +\IndexClass{report} und \Class{article}\IndexClass{article} im +\KOMAScript-Paket Entsprechungen zu finden sind. Daneben ist auch für die +Standardklasse \Class{letter}\IndexClass{letter} eine Entsprechung vorhanden. +Der Briefklasse in {\KOMAScript} ist jedoch ein eigenes Kapitel gewidmet, da +sie sich von den drei Hauptklassen grundsätzlich unterscheidet (siehe +\autoref{cha:scrlttr2}). + +Die einfachste Möglichkeit, anstelle einer Standardklasse eine +\KOMAScript-Klasse zu verwenden, ist das Ersetzen des Klassennamens in der +Anweisung \verb|\documentclass| entsprechend +\autoref{tab:maincls.overview}. Man tauscht +also beispielsweise \Macro{documentclass}\PParameter{article} gegen +\Macro{documentclass}\PParameter{scrartcl}. Der anschließende \LaTeX-Lauf +sollte lediglich einige Layoutänderungen mit sich bringen. Ein großer Teil der +in den nachfolgenden Abschnitten beschriebenen vielfältigen Möglichkeiten und +Optionen werden von den \KOMAScript-Klassen zusätzlich geboten. + +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside} + [Klassengegenüberstellung]{\label{tab:maincls.overview}Gegenüberstellung der + Standardklassen und der \KOMAScript-Klassen} + [l] + \begin{tabular}[t]{ll} + \toprule + Standard-Klasse & \KOMAScript-Klasse \\%& \Script-Stil (\LaTeX2.09)\\ + \midrule + \Class{article} & \Class{scrartcl} \\%& \File{script\textunderscore s} \\ + \Class{report} & \Class{scrreprt} \\%& \File{script} \\ + \Class{book} & \Class{scrbook} \\%& \File{script} \\ + \Class{letter} & \Class{scrlttr2} \\%& \File{script\textunderscore l} \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} + +Es sei an dieser Stelle jedoch nicht verschwiegen, dass einige Paketautoren +ihre Pakete auf Basis der Implementierung und sogar von internem Code der +Standardklassen entwickeln und dabei keine Rücksicht auf komplett unabhängige +Entwicklungen wie die \KOMAScript-Klassen nehmen. In solchen Fällen kann es +beim ersten \LaTeX-Lauf nach der Umstellung durchaus zu Fehlermeldungen oder +zusäzlichen Warnungen kommen. Meist lassen sich diese auf einfache Weise +beheben. Oftmals können dazu die erweiterten Möglichkeiten von \KOMAScript{} +genutzt werden, wodurch das problematische Paket dann vollständig +entfällt. Manchmal kann auch das in \autoref{cha:scrhack} ab Seite +\autopageref{cha:scrhack} dokumentierte \hyperref[cha:scrhack]{Paket + \Package{scrhack}}\IndexPackage{scrhack} Abhilfe schaffen. Auch der Ersatz +von veralteten Paketen durch aktuelle Nachfolger kann zur Beseitigung +derartiger Probleme beitragen. Teilweise geben sogar die \KOMAScript-Klassen +durch entsprechende Warnungen Hilfestellung bei der Lösung von +Inkompatibilitäten. + +Lassen Sie mich der Erläuterung der Klassen noch eine Bemerkung +vorausschicken. Oft ist man sich am Anfang eines Dokuments unsicher, welche +Einstellungen konkret zu wählen sind. Bei einigen Einstellungen, wie der +Auswahl des Papierformats, mögen sie bereits vorab feststehen. Aber schon die +Frage nach der Seitenauf"|teilung könnte im Voraus schwer zu beantworten sein. +Andererseits sollten diese Angaben für die Haupttätigkeiten des Autors -- +Entwurf der Gliederung, Schreiben des Textes, Zusammenstellen von Abbildungen, +Tabellen und Verzeichnissen -- zunächst auch unerheblich sein. Konzentrieren +Sie sich als Autor erst einmal auf den Inhalt. Wenn der dann steht, können Sie +sich um die Feinheiten der Form kümmern. Neben der Auswahl der Optionen +gehören dazu dann auch Dinge wie die Korrektur der Trennung und möglicherweise +dezente Eingriffe in den Seitenumbruch oder die Verteilung von Abbildungen und +Tabellen. + + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\LoadCommonFile{options} % \section{Frühe oder späte Optionenwahl} + +%\iffree{}{\clearpage}% Umbruchkorrektur!!! + +\LoadCommonFile{compatibility} % \section{Kompatibilität zu früheren Versionen von \KOMAScript} + +\LoadCommonFile{draftmode} % \section{Entwurfsmodus} + +\LoadCommonFile{typearea} % \section{Seitenauf"|teilung} + +\begin{Declaration} + \Macro{flushbottom} + \Macro{raggedbottom} +\end{Declaration} +\begin{Explain} + Insbesondere bei doppelseitigen Dokumenten ist es wünschenswert, wenn nicht + nur alle ersten Zeilen eines Satzspiegels mit ihrer Grundlinie auf der + gleichen Höhe liegen, sondern auch die letzten Zeilen einer + Doppelseite. Enthält eine Seite nur Text ohne Absätze und Überschriften, so + hat man das automatisch, wenn bei der Konstruktion des Satzspiegels einige + Grundregeln befolgt wurden. Aber bereits dann, wenn Absätze mit einem halben + Grundlinienabstand markiert werden, genügt es, wenn die Anzahl der Absätze + auf der einen Seite um eine ungerade Zahl von der auf der anderen Seite + abweicht, damit dieses Ziel nicht mehr erreicht werden kann. Es ist dann + notwendig, dass man zumindest einige der vertikalen Abstände etwas dehnt + oder staucht, um das Ziel wieder zu erreichen. \TeX{} kennt zu diesem Zweck + dehn- und stauchbare Abstände und \LaTeX{} bietet die Möglichkeit, + diesen \emph{vertikalen Ausgleich}\Index{Ausgleich} automatisch + durchzuführen. +\end{Explain} + +Wird über die Option +\Option{twoside}\IndexOption{twoside}\important{\Option{twoside}} (siehe +\autoref{sec:typearea.typearea}, \DescPageRef{typearea.option.twoside}) +doppelseitiger oder über Option +\Option{twocolumn}\IndexOption{twocolumn}\important{\Option{twocolumn}} (siehe +\DescPageRef{typearea.option.twocolumn}) zweispaltiger Satz angefordert, so +wird der vertikale Ausgleich ebenfalls +eingeschaltet. Das\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} gilt jedoch bei einer Kompatibilitätseinstellung zu einer +\KOMAScript-Version vor 3.17 (siehe +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}, Option +\DescRef{\LabelBase.option.version}% +\IndexOption{version}\important{\OptionValueRef{\LabelBase}{version}{3.17}}) +nicht, wenn die Option über \DescRef{\LabelBase.cmd.KOMAoption} oder +\DescRef{\LabelBase.cmd.KOMAoptions} geändert wird. + +Man kann den vertikalen Ausgleich auch mit \Macro{flushbottom} jederzeit +ab der aktuellen Seite explizit fordern. Umgekehrt ist es möglich, mit +\Macro{raggedbottom} den vertikalen Ausgleich ab der aktuellen Seite explizit +abzuschalten. Dies entspricht der Voreinstellung bei einseitigem Satz. + +{\KOMAScript} verwendet übrigens einen leicht modifizierten Verzicht auf den +vertikalen Ausgleich. \iffree{}{Näheres dazu ist in + \autoref{sec:maincls-experts.addInfos}, + \DescPageRef{maincls-experts.cmd.footnoterule} zu erfahren.}% +% +\EndIndexGroup +% +\EndIndexGroup + + +\LoadCommonFile{fontsize} % \section{Wahl der Schriftgröße für das Dokument} + +\LoadCommonFile{textmarkup} % \section{Textauszeichnungen} + +\LoadCommonFile{titles}% \section{Dokumenttitel} + +\section{Zusammenfassung} +\seclabel{abstract} +\BeginIndexGroup +\BeginIndex{}{Zusammenfassung}% + +Insbesondere bei Artikeln% +\iffalse % Umbruchkorrektur +, seltener bei Berichten findet man unmittelbar unter der Titelei und noch vor +dem Inhaltsverzeichnis % +\else % +\ findet man zwischen Titel und Inhaltsverzeichnis oft % +\fi % +eine Zusammenfassung. Bei Verwendung eines Titelkopfes ist die +Zusammenfassung in der Regel % +\iffalse % Umbruchkorrektur +ein rechts und links eingezogener Block. % +\else % +rechts und links eingezogen. % +\fi % +\iffalse % Umbruchkorrektur +Im Vergleich dazu wird bei Verwendung von Titelseiten % +\else % +Bei Verwendung von Titelseiten wird % +\fi % +die Zusammenfassung eher als Kapitel oder Abschnitt gesetzt. + +\begin{Declaration} + \OptionVName{abstract}{Ein-Aus-Wert} +\end{Declaration}% +Bei\ChangedAt{v3.00}{\Class{scrreprt}\and \Class{scrartcl}}% +\OnlyAt{\Class{scrreprt}\and \Class{scrartcl}} den +Standardklassen\textnote{\KOMAScript{} vs. Standardklassen} setzt die +\DescRef{\LabelBase.env.abstract}-Umgebung noch den zentrierten Titel +»\abstractname« vor die Zusammenfassung. Früher war dies durchaus +üblich. Inzwischen sind wir durch das Zeitunglesen darin geübt, einen +entsprechend hervorgehobenen Text am Anfang eines Artikels oder Berichts als +Zusammenfassung zu erkennen. Dies gilt umso mehr, wenn dieser Text noch vor +dem Inhaltsverzeichnis steht. Zudem verwundert es, wenn ausgerechnet diese +Überschrift klein und zentriert ist. {\KOMAScript} bietet mit der Option +\Option{abstract} die Möglichkeit, die Überschrift über der Zusammenfassung +ein- oder auszuschalten. Als \PName{Ein-Aus-Wert} kann einer der +Standardwerte für einfache Schalter aus \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} verwendet werden. Voreingestellt ist bei +\KOMAScript{} \PValue{false}. + +Bei Büchern wird in der Regel eine andere Art der Zusammenfassung +verwendet. Dort setzt man ein entsprechendes Kapitel an den Anfang oder das +Ende des Werks. Oft wird diese Zusammenfassung entweder mit der Einleitung +oder einem weiteren Ausblick verknüpft. Daher gibt es bei \Class{scrbook} +überhaupt keine \DescRef{\LabelBase.env.abstract}-Umgebung. +Bei\textnote{Tipp!} Berichten im weiteren Sinne, etwa einer Studien- oder +Diplomarbeit, ist ebenfalls eine Zusammenfassung in dieser Form zu +empfehlen. Siehe dazu die in \autoref{sec:maincls.structure}, ab +\DescPageRef{\LabelBase.cmd.chapter*} dokumentierten Befehle +\DescRef{\LabelBase.cmd.chapter*}\IndexCmd{chapter*}. +\DescRef{\LabelBase.cmd.addchap}\IndexCmd{addchap} und +\DescRef{\LabelBase.cmd.addchap*}\IndexCmd{addchap*}.% +\EndIndexGroup + + +\begin{Declaration} + \begin{Environment}{abstract}\end{Environment} +\end{Declaration}% +\OnlyAt{\Class{scrartcl}\and \Class{scrreprt}}% +Einige \LaTeX-Klassen bieten eine spezielle Umgebung für die +Zusammenfassung: die \Environment{abstract}-Umgebung. Diese wird unmittelbar +ausgegeben, ist also nicht Bestandteil der mit +\DescRef{\LabelBase.cmd.maketitle} gesetzten Titelei. Bitte\textnote{Achtung!} +beachten Sie unbedingt, dass es sich bei \Environment{abstract} um eine +Umgebung und nicht um eine Anweisung handelt. Ob die Zusammenfassung mit einer +Überschrift versehen wird oder nicht, wird über die Option +\DescRef{\LabelBase.option.abstract} gesteuert (siehe oben). + +Bei Büchern ist die Zusammenfassung häufig Bestandteil der Einleitung oder +eines gesonderten Kapitels am Ende des Dokuments. Daher gibt es bei +\Class{scrbook} keine \Environment{abstract}-Umgebung. Bei Verwendung der +Klasse \Class{scrreprt} ist es sicher eine Überlegung wert, ob man nicht +genauso verfahren sollte. Siehe hierzu in \autoref{sec:\LabelBase.structure} +ab \DescPageRef{\LabelBase.cmd.chapter*} +die Anweisungen \DescRef{\LabelBase.cmd.chapter*}\IndexCmd{chapter*} und +\DescRef{\LabelBase.cmd.addchap}\IndexCmd{addchap} oder +\DescRef{\LabelBase.cmd.addchap*}.% (\DescPageRef{\LabelBase.cmd.addchap}). + +Wird ein Titelkopf\Index{Titel>Kopf} (siehe Option +\DescRef{\LabelBase.option.titlepage}, \autoref{sec:\LabelBase.titlepage}, +\DescPageRef{\LabelBase.option.titlepage}) verwendet, so wird die +Zusammenfassung intern mit Hilfe einer +\DescRef{\LabelBase.env.quotation}-Umgebung\IndexEnv{quotation} (siehe +\autoref{sec:\LabelBase.lists}, \DescPageRef{\LabelBase.env.quotation}) +gesetzt. Dabei werden Absatzanfänge normalerweise mit Einzug gesetzt. Soll der +erste Absatz nicht eingezogen werden, so kann dieser Einzug mit +\Macro{noindent}\IndexCmd{noindent}\important{\Macro{noindent}} +\iffree{unmittelbar nach \Macro{begin}\PParameter{abstract}}{am Anfang der + Umgebung} unterdrückt werden.% +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Inhaltsverzeichnis} +\seclabel{toc} +\BeginIndexGroup +\BeginIndex{}{Inhaltsverzeichnis} + +Auf die Titelei und eine eventuell vorhandene Zusammenfassung folgt +normalerweise das Inhaltsverzeichnis. Häufig findet +man nach dem Inhaltsverzeichnis auch noch die Verzeichnisse der +Gleitumgebungen, beispielsweise von Tabellen und Abbildungen (siehe +\autoref{sec:\LabelBase.floats}). + +\iffalse% +Es ist zu beachten, dass neben den in diesem Abschnitt dokumentierten +Möglichkeiten auch noch die Anweisungen +\DescRef{maincls-experts.cmd.DeclareSectionCommand}, +\DescRef{maincls-experts.cmd.DeclareNewSectionCommand}, +\DescRef{maincls-experts.cmd.RedeclareSectionCommand} und +\DescRef{maincls-experts.cmd.ProvideSectionCommand} Auswirkungen auf das +Inhaltsverzeichnis haben können. Siehe \autoref{sec:maincls-experts.sections}, +\DescPageRef{maincls-experts.cmd.DeclareSectionCommand}.% +\else% +Neben den in diesem Abschnitt dokumentierten Möglichkeiten hat auch der mit +\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}\IndexCmd{DeclareTOCStyleEntry}% +\important[O]{\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}} +gewählte und +konfigurierte Eintragsstil des Pakets +\hyperref[cha:tocbasic]{\Package{tocbasic}}% +\important{\hyperref[cha:tocbasic]{\Package{tocbasic}}}% +\IndexPackage{tocbasic} (siehe +\DescPageRef{tocbasic.cmd.DeclareTOCStyleEntry}) maßgeblichen Einfluss auf die +Darstellung des Inhaltsverzeichnisses. Entsprechend können sich auch die in +\autoref{sec:maincls-experts.sections} ab +\DescPageRef{maincls-experts.cmd.DeclareSectionCommand} dokumentierten +Befehle +\DescRef{maincls-experts.cmd.DeclareSectionCommand}% +\important[O]{\DescRef{maincls-experts.cmd.DeclareSectionCommand}}% +\IndexCmd{DeclareSectionCommand}, +\DescRef{maincls-experts.cmd.ProvideSectionCommand}% +\IndexCmd{ProvideSectionCommand}, +\DescRef{maincls-experts.cmd.DeclareNewSectionCommand}% +\IndexCmd{DeclareNewSectionCommand} und +\DescRef{maincls-experts.cmd.RedeclareSectionCommand}% +\IndexCmd{RedeclareSectionCommand} auf das Inhaltsverzeichnis auswirken.% +\fi + + +\begin{Declaration} + \OptionVName{toc}{Einstellung} +\end{Declaration} +Neuerdings ist es fast schon üblich geworden Tabellen- und +Abbildungsverzeichnis sowie das Literaturverzeichnis, seltener das +Stichwortverzeichnis, ins Inhaltsverzeichnis aufzunehmen. Dies hat sicher auch +mit der neuen Mode zu tun, Abbildungs- und Tabellenverzeichnis ans Buchende zu +stellen. Beide Verzeichnisse haben von Aufbau und Intention eine deutliche +Ähnlichkeit mit dem Inhaltsverzeichnis. Daher betrachte ich die Entwicklung +skeptisch. Da\important{\OptionValue{toc}{listof}} es keinen Sinn hat, nur das +Tabellen- oder nur das Abbildungsverzeichnis ohne das jeweils andere ins +Inhaltsverzeichnis aufzunehmen, werden mit der +\PName{Einstellung}\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} \PValue{listof}\IndexOption{toc~=\textKValue{listof}} beide +Verzeichnisse gemeinsam ins Inhaltsverzeichnis aufgenommen. Dabei werden auch +Verzeichnisse berücksichtigt, die mit Hilfe des +\Package{float}-Pakets\IndexPackage{float} ab Version~1.2e (siehe +\cite{package:float}) oder \Package{floatrow} (siehe \cite{package:floatrow}) +erstellt werden. Als\important{\OptionValue{toc}{listofnumbered}} +Verzeichnisse, die den Inhalt anderer Abschnitte des Werks auf"|führen, +erhalten Tabellen"~, Abbildungs- und die mit den genannten Paketen erzeugten +Verzeichnisse grundsätzlich keine Kapitelnummer. Wer diesen Grundsatz +ignorieren will, bedient sich der \PName{Einstellung} +\PValue{listofnumbered}\IndexOption{toc~=\textKValue{listofnumbered}}. + +\leavevmode\LabelOptionValue{toc}{index}\nobreak +Das\important{\OptionValue{toc}{index}} Stichwortverzeichnis erhält mit +\OptionValue{toc}{index}\IndexOption{toc~=\textKValue{index}} einen Eintrag im +Inhaltsverzeichnis. Da das Stichwortverzeichnis ebenfalls nur Verweise auf den +Inhalt anderer Abschnitte enthält, wird auch dieser Eintrag grundsätzlich +nicht nummeriert. Eine\ChangedAt{v3.18}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} +Abweichung\important{\OptionValue{toc}{indexnumbered}} von diesem Grundsatz +wird von \KOMAScript{} trotz Bedenken des Autors mit +\OptionValue{toc}{indexnumbered}\IndexOption{toc~=\textKValue{indexnumbered}} +ebenfalls unterstützt. + +\leavevmode\LabelOptionValue{toc}{bibliography}\nobreak Das +Literaturverzeichnis stellt eine etwas andere Art von Verzeichnis dar. Hier +wird nicht der Inhalt des vorliegenden Werks aufgelistet, sondern auf externe +Inhalte verwiesen. Mit\important{\OptionValue{toc}{bibliographynumbered}} +dieser Begründung könnte man argumentieren, dass das Literaturverzeichnis ein +eigenes Kapitel bzw. einen eigenen Abschnitt darstelle und somit eine Nummer +verdiene. Die Option \OptionValue{toc}{bibliographynumbered}% +\IndexOption{toc~=\textKValue{bibliographynumbered}} führt genau dazu, +einschließlich des dann fälligen Eintrags im Inhaltsverzeichnis. Ich selbst +bin allerdings der Meinung, dass bei dieser Argumentation auch ein +klassisches, kommentiertes Quellenverzeichnis ein eigenes Kapitel +wäre. Außerdem ist das Literaturverzeichnis letztlich nichts, was man selbst +geschrieben hat. Deshalb\important{\OptionValue{toc}{bibliography}} erscheint +mir allenfalls ein nicht nummerierter Eintrag im Inhaltsverzeichnis +angemessen, was mit der Einstellung +\OptionValue{toc}{bibliography}\IndexOption{toc~=\textKValue{bibliography}} +erreicht wird. + +\leavevmode\LabelOptionValue{toc}{graduated}\nobreak +Normalerweise\ChangedAt{v2.8q}{% + \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% +\important{\OptionValue{toc}{graduated}} wird das Inhaltsverzeichnis so +formatiert, dass die Gliederungsebenen unterschiedlich weit eingezogen +werden. Dabei wird für die Gliederungsnummer jeder Ebene ein Raum fester +Breite vorgesehen, in dem die Nummer linksbündig gesetzt wird. Dies entspricht +der Einstellung\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} +\OptionValue{toc}{graduated}\IndexOption{toc~=\textKValue{graduated}}. + +\leavevmode\LabelOptionValue{toc}{flat}\nobreak +Werden sehr viele Gliederungspunkte verwendet, so werden die +Gliederungsnummern sehr breit. Damit reicht der vorgesehene Platz nicht +aus. In \cite{DANTE:FAQ} wird für solche Fälle vorgeschlagen, die Erzeugung +des Inhaltsverzeichnisses +umzudefinieren. \KOMAScript{}\important{\OptionValue{toc}{flat}} bietet jedoch +eine alternative Formatierung an, bei der das Problem nicht auf"|tritt. Bei +Verwendung der Option \OptionValue{toc}{flat}\IndexOption{toc~=\textKValue{flat}} +werden die unterschiedlichen Gliederungsebenen nicht unterschiedlich weit +eingezogen. Stattdessen wird eine tabellenartige Form gewählt, in der alle +Gliederungsnummern und alle Gliederungstexte jeweils in einer Spalte +linksbündig untereinander stehen. Der für die Gliederungsnummern benötigte +Platz wird dabei automatisch ermittelt. + +Einen Überblick über alle möglichen Werte für die \PName{Einstellung} von +\Option{toc} ist in \autoref{tab:maincls.toc} zu finden. + +\begin{desclist} + \desccaption[{Mögliche Werte für Option \Option{toc}}]{% + Mögliche Werte für Option \Option{toc} zur Einstellung von Form und Inhalt + des Inhaltsverzeichnisses\label{tab:maincls.toc}% + }{% + Mögliche Werte für Option \Option{toc} (\emph{Fortsetzung})% + }% + \entry{\PValue{bibliography}, \PValue{bib}}{% + Das Literaturverzeichnis erhält einen Eintrag im Inhaltsverzeichnis, ohne + dass es nummeriert wird.% + \IndexOption{toc~=\textKValue{bibliography}}}% + \entry{\PValue{bibliographynumbered}, \PValue{bibnumbered}, + \PValue{numberedbibliography}, \PValue{numberedbib}}{% + Das Literaturverzeichnis erhält einen Eintrag im Inhaltsverzeichnis und + wird nummeriert.% + \IndexOption{toc~=\textKValue{bibliographynumbered}}}% + \entry{\PValue{chapterentrywithdots}, \PValue{chapterentrydotfill}}{% + \ChangedAt[2014/12]{v3.15}{\Class{scrbook}\and \Class{scrreprt}}% + Bei den Kapiteleinträgen der Klassen \Class{scrbook} und \Class{scrreprt} + werden Text und Seitenzahl ebenfalls durch eine punktierte Linie + miteinander verbunden.% + \IndexOption{toc~=\textKValue{chapterentrywithdots}}}% + \entry{\PValue{chapterentrywithoutdots}, \PValue{chapterentryfill}}{% + \ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}}% + Bei den Kapiteleinträgen der Klassen \Class{scrbook} und \Class{scrreprt} + werden Text und Seitenzahl nicht durch eine punktierte Linie miteinander + verbunden. Dies entspricht der Voreinstellung.% + \IndexOption{toc~=\textKValue{chapterentrywithoutdots}}}% + \entry{\PValue{flat}, \PValue{left}}{% + Das Inhaltsverzeichnis erhält eine tabellarische Form. Die + Gliederungsnummern sind dabei die erste Spalte, die Überschriften die + zweite Spalte, die Seitenzahlen die dritte Spalte. Der Platz, der für die + Gliederungsnummern reserviert wird, richtet sich nach dem benötigten Platz + des vorherigen \LaTeX-Laufs.% + \IndexOption{toc~=\textKValue{flat}}}% + \entry{\PValue{graduated}, \PValue{indent}, \PValue{indented}}{% + Das Inhaltsverzeichnis erhält eine hierarchische Form. Es steht nur ein + begrenzter Platz für die Gliederungsnummern zur Verfügung. Dies entspricht + der Voreinstellung.% + \IndexOption{toc~=\textKValue{graduated}}}% + \entry{\PValue{indenttextentries}, \PValue{indentunnumbered}, + \PValue{numberline}}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Die Eigenschaft \PValue{numberline} (siehe \autoref{sec:tocbasic.toc}, + \DescPageRef{tocbasic.cmd.setuptoc}) wird für das Inhaltsverzeichnis + gesetzt. Dadurch werden nicht nummerierte Einträge linksbündig mit dem + Text von nummerierten Einträgen gleicher Ebene gesetzt.% + \IndexOption{toc~=\textKValue{numberline}}}% + \entry{\PValue{index}, \PValue{idx}}{% + Das Stichwortverzeichnis erhält einen Eintrag im Inhaltsverzeichnis, ohne + dass es nummeriert wird.% + \IndexOption{toc~=\textKValue{index}}}% + \entry{\PValue{indexnumbered}, \PValue{idxnumbered}, \PValue{numberedindex}, + \PValue{numberedidx}}{% + \ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Das Stichwortverzeichnis erhält einen Eintrag im Inhaltsverzeichnis und + wird nummeriert.% + \IndexOption{toc~=\textKValue{index}}}% + \entry{\PValue{leftaligntextentries}, \PValue{leftalignunnumbered}, + \PValue{nonumberline}}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Die Eigenschaft \PValue{numberline} (siehe \autoref{sec:tocbasic.toc}, + \DescPageRef{tocbasic.cmd.setuptoc}) wird für das Inhaltsverzeichnis + gelöscht. Dadurch werden nicht nummerierte Einträge linksbündig mit der + Nummer von nummerierten Einträgen gleicher Ebene gesetzt. Dies entspricht + der Voreinstellung.% + \IndexOption{toc~=\textKValue{numberline}}}% + \pventry{listof}{% + Die Verzeichnisse der Gleitumgebungen, beispielsweise das Abbildungs"~ und + das Tabellenverzeichnis, erhalten einen Eintrag im Inhaltsverzeichnis, + ohne dass sie nummeriert werden.% + \IndexOption{toc~=\textKValue{listof}}}% + \entry{\PValue{listofnumbered}, \PValue{numberedlistof}}{% + Die Verzeichnisse der Gleitumgebungen, beispielsweise das Abbildungs"~ und + das Tabellenverzeichnis, erhalten einen Eintrag im Inhaltsverzeichnis und + werden nummeriert.% + \IndexOption{toc~=\textKValue{listofnumbered}}}% + \entry{\PValue{nobibliography}, \PValue{nobib}}{% + Das Literaturverzeichnis erhält keinen Eintrag im Inhaltsverzeichnis. Dies + entspricht der Voreinstellung.% + \IndexOption{toc~=\textKValue{nobibliography}}}% + \entry{\PValue{noindex}, \PValue{noidx}}{% + Das Stichwortverzeichnis erhält keinen Eintrag im Inhaltsverzeichnis. Dies + entspricht der Voreinstellung.% + \IndexOption{toc~=\textKValue{noindex}}}% + \pventry{nolistof}{% + Die Verzeichnisse der Gleitumgebungen, beispielsweise das Abbildungs"~ und + das Tabellenverzeichnis, erhalten keinen Eintrag im + Inhaltsverzeichnis. Dies entspricht der Voreinstellung.% + \IndexOption{toc~=\textKValue{nolistof}}}% + \entry{\PValue{sectionentrywithdots}, \PValue{sectionentrydotfill}}{% + \ChangedAt[2014/12]{v3.15}{\Class{scrartcl}}% + Bei den Abschnittseinträgen der Klasse \Class{scrartcl} werden Text und + Seitenzahl ebenfalls durch eine punktierte Linie miteinander verbunden.% + \IndexOption{toc~=\textKValue{sectionentrywithdots}}}% + \entry{\PValue{sectionentrywithoutdots}, \PValue{sectionentryfill}}{% + \ChangedAt{v3.15}{\Class{scrartcl}}% + Bei den Abschnittseinträgen der Klasse \Class{scrartcl} werden Text und + Seitenzahl nicht durch eine punktierte Linie miteinander verbunden. Dies + entspricht der Voreinstellung.% + \IndexOption{toc~=\textKValue{sectionentrywithoutdots}}}% +\end{desclist} +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{chapterentrydots}{Ein-Aus-Wert}\\ + \OptionVName{sectionentrydots}{Ein-Aus-Wert} +\end{Declaration} +Diese\ChangedAt[2014/12]{v3.15}{\Class{scrbook}\and \Class{scrreprt}} Optionen +legen fest, ob im Inhaltsverzeichnis bei den Klassen \Class{scrbook} und +\Class{scrreprt}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} für die +Kapitelebene beziehungsweise bei der Klasse +\Class{scrartcl}\OnlyAt{\Class{scrartcl}} für die Abschnittsebene wie bei den +tieferen Ebenen auch eine punktierte Verbindungslinie zwischen dem Text des +Eintrags und der zugehörigen Seitenzahl verwendet werden soll. Als +\PName{Ein-Aus-Wert} kann einer der Standardwerte für einfache Schalter aus +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} verwendet +werden. Voreingestellt ist für beide Optionen \PValue{false}, wodurch statt +einer punktierten Linie lediglich ein Abstand verwendet wird. + +\BeginIndex{FontElement}{chapterentrydots}\LabelFontElement{chapterentrydots}% +\BeginIndex{FontElement}{sectionentrydots}\LabelFontElement{sectionentrydots}% +Wird die punktierte Linie verwendet, so kann deren Schrift über das Element +\FontElement{chapterentrydots}% +\important{\FontElement{chapterentrydots}\\ + \FontElement{sectionentrydots}} oder \FontElement{sectionentrydots} +verändert werden (siehe \DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont}, \autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}, sowie +\autoref{tab:maincls.fontelements}, +\autopageref{tab:maincls.fontelements}). Die Voreinstellungen der Elemente +sind \autoref{tab:maincls.tocelements} auf +\autopageref{tab:maincls.tocelements} zu entnehmen. Es ist zu +beachten\textnote{Achtung!}, dass die Pünktchen nur sauber untereinander +stehen, wenn die Schrift aller Pünktchen identisch ist. Aus diesen Grund ist +die Ausgangschrift immer \Macro{normalfont}\Macro{normalsize}. Von +\DescRef{\LabelBase.fontelement.chapterentry} oder +\DescRef{\LabelBase.fontelement.sectionentry} bleibt für die Pünktchen daher +nur die Farbe erhalten.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tableofcontents} +\end{Declaration}% +Die Ausgabe des Inhaltsverzeichnisses wird mit \Macro{tableofcontents} +erreicht. Um ein korrektes Inhaltsverzeichnis zu erhalten, sind nach jeder +Änderung mindestens zwei \LaTeX-Läufe notwendig. Mit der oben erläuterten +Option \DescRef{\LabelBase.option.toc} kann der Umfang und die Form des +Inhaltsverzeichnisses beeinflusst werden. Nach einer Umschaltung der Option +sind ebenfalls mindestens zwei weitere \LaTeX-Läufe notwendig. + +Der Eintrag für \DescRef{\LabelBase.cmd.chapter}\IndexCmd{chapter} bei +\Class{scrbook}\IndexClass{scrbook} und \Class{scrreprt}\IndexClass{scrreprt} +beziehungsweise \DescRef{\LabelBase.cmd.section}\IndexCmd{section} bei +\Class{scrartcl}\IndexClass{scrartcl} sowie der Gliederungsebene +\DescRef{\LabelBase.cmd.part}\IndexCmd{part} wird nicht +eingerückt. Gleichzeitig befinden sich zwischen dem Text der Gliederungsebene +und der Seitenzahl in der Voreinstellung keine Pünktchen. Die typografischen +Gründe dafür liegen in der normalerweise anderen Schriftart sowie der +erwünschten Hervorhebung. Dies\ChangedAt{v3.15}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} kann jedoch mit den zuvor +dokumentierten Optionen geändert werden. Das Inhaltsverzeichnis \iffree{dieser + Anleitung}{dieses Buches} ist mit den Voreinstellungen gesetzt und dient als +Beispiel. + +\BeginIndex{FontElement}{partentry}\LabelFontElement{partentry}% +\BeginIndex{FontElement}{chapterentry}\LabelFontElement{chapterentry}% +\BeginIndex{FontElement}{sectionentry}\LabelFontElement{sectionentry}% +Die\ChangedAt{v2.97c}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\important{\FontElement{partentry}\\ + \FontElement{chapterentry}\\ + \FontElement{sectionentry}} Schrift der oberen Inhaltsverzeichniseinträge +ist über die Elemente \FontElement{partentry} und für \Class{scrbook} und +\Class{scrreprt} über \FontElement{chapterentry} beziehungsweise +\FontElement{sectionentry} für \Class{scrartcl} einstellbar. +\BeginIndex{FontElement}{partentrypagenumber}% +\LabelFontElement{partentrypagenumber}% +\LabelFontElement{pagination}% +\BeginIndex{FontElement}{chapterentrypagenumber}% +\LabelFontElement{chapterentrypagenumber}% +\BeginIndex{FontElement}{sectionentrypagenumber}% +\LabelFontElement{sectionentrypagenumber}% +Die Schrift der Seitenzahlen kann jeweils davon abweichend über die Elemente +\FontElement{partentrypagenumber}% +\important{\FontElement{partentrypagenumber}} und +\FontElement{chapterentrypagenumber}% +\important{\FontElement{chapterentrypagenumber}\\ + \FontElement{sectionentrypagenumber}} (\Class{scrbook} und \Class{scrreprt}) +beziehungsweise \FontElement{sectionentrypagenumber} (\Class{scrartcl}) +eingestellt werden (siehe auch \DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} in \autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}, sowie +\autoref{tab:maincls.fontelements}, \autopageref{tab:maincls.fontelements}). +Werden\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} je nach Klasse für die Kapitel- beziehungsweise +Abschnittseinträge ebenfalls punktierte Verbindungslinien zu den Seitenzahlen +über Option \DescRef{\LabelBase.option.toc}% +\IndexOption{toc~=\textKValue{chapterentrywithdots}}% +\IndexOption{toc~=\textKValue{sectionentrywithdots}}, +\DescRef{\LabelBase.option.chapterentrydots}% +\IndexOption{chapterentrydots~=\PName{Ein-Aus-Wert}} oder +\DescRef{\LabelBase.option.sectionentrydots}% +\IndexOption{sectionentrydots~=\PName{Ein-Aus-Wert}} verwendet, so kann deren +Schrift über die Elemente \DescRef{\LabelBase.fontelement.chapterentrydots}% +\IndexFontElement{chapterentrydots}% +\important{\DescRef{\LabelBase.fontelement.chapterentrydots}\\ + \DescRef{\LabelBase.fontelement.sectionentrydots}} und +\DescRef{\LabelBase.fontelement.sectionentrydots}% +\IndexFontElement{sectionentrydots} verändert werden. Die Voreinstellungen der +Elemente sind \autoref{tab:maincls.tocelements} zu entnehmen. +\begin{table} +% \centering +% \caption + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside} + [Schriftvoreinstellungen für die Elemente + des Inhaltsverzeichnisses] + {\label{tab:maincls.tocelements}% + \hspace{0pt plus 1ex}Vorein\-stel\-lung\-en der Schrift für die Elemente + des In\-halts\-ver\-zeich\-nis\-ses} + [l] + \setlength{\tabcolsep}{.9\tabcolsep}% Umbruchoptimierung! + \begin{tabular}[t]{ll} + \toprule + Element & Voreinstellung \\ + \midrule + \FontElement{partentry} & + \DescRef{\LabelBase.cmd.usekomafont}\PParameter{disposition}\Macro{large} \\ + \FontElement{partentrypagenumber} & \\ + \FontElement{chapterentry} & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{disposition}\\ + \FontElement{chapterentrydots} & \\ + \FontElement{chapterentrypagenumber} & \\ + \FontElement{sectionentry} & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{disposition} \\ + \FontElement{sectionentrydots} & \\ + \FontElement{sectionentrypagenumber} & \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} +% +\EndIndexGroup + + +\begin{Declaration} + \Counter{tocdepth} + \Macro{parttocdepth} + \Macro{sectiontocdepth} + \Macro{subsectiontocdepth} + \Macro{subsubsectiontocdepth} + \Macro{paragraphtocdepth} + \Macro{subparagraphtocdepth} +\end{Declaration}% +Normalerweise werden bei den Klassen \Class{scrbook} und \Class{scrreprt} die +Gliederungsebenen \DescRef{\LabelBase.cmd.part} bis +\DescRef{\LabelBase.cmd.subsection} und bei der Klasse \Class{scrartcl} die +Ebenen \DescRef{\LabelBase.cmd.part} bis +\DescRef{\LabelBase.cmd.subsubsection} in das Inhaltsverzeichnis +aufgenommen. Dies wird über den Zähler \Counter{tocdepth} gesteuert. Dabei +steht der Wert -1 für \DescRef{\LabelBase.cmd.part}, 0 für +\DescRef{\LabelBase.cmd.chapter} und so weiter. Durch Setzen oder Erhöhen +oder Verringern des Zählers kann bestimmt werden, bis zu welcher +Gliederungsebene Einträge in das Inhaltsverzeichnis erfolgen sollen. Dies ist +übrigens bei den Standardklassen ganz +genauso. Im\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} Unterschied\textnote{\KOMAScript{} vs. Standardklassen} zu +den Standardklassen muss sich bei \KOMAScript{} aber niemand diese Zuordnung +merken. \KOMAScript{} definiert für jede Gliederungsebene eine Anweisung +\Macro{\PName{Ebene}tocdepth} mit dem entsprechenden Wert, die für Zuweisungen +an \Counter{tocdepth} verwendet werden kann. + +Bitten beachten Sie\textnote{Achtung!}, dass die Werte für die Zähler +\Counter{tocdepth} und +\DescRef{\LabelBase.counter.secnumdepth}\IndexCounter{secnumdepth} (siehe +\autoref{sec:\LabelBase.structure}, +\DescPageRef{\LabelBase.counter.secnumdepth}) bei +\Class{scrartcl}\OnlyAt{\Class{scrartcl}} für \DescRef{\LabelBase.cmd.part} +nicht übereinstimmen. Dies wurde aus Gründen der Kompatibilität von der +Standardklasse \Class{article} übernommen. Daher sollte beispielsweise die +Anweisung \DescRef{\LabelBase.cmd.partnumdepth}\IndexCmd{partnumdepth} auch +nicht zum Setzen von \Counter{tocdepth} verwendet werden.% +\begin{Example} + Angenommen, Sie setzen einen Artikel, bei dem die Gliederungsebene + \DescRef{\LabelBase.cmd.subsubsection} verwendet wird. Gehen wir weiter + davon aus, dass Sie diese Gliederungsebene aber nicht im Inhaltsverzeichnis + haben wollen. Dann könnte die Präambel Ihres Dokuments wie folgt + aussehen: +\begin{lstcode} + \documentclass{scrartcl} + \setcounter{tocdepth}{\subsectiontocdepth} +\end{lstcode} + Sie setzen den Zähler \Counter{tocdepth} daher auf den in Anweisung + \Macro{subsectiontocdepth} gespeicherten Wert. Dass dies normalerweise der + Wert 2 ist, müssen Sie sich also gar nicht merken. + + Wollen Sie stattdessen nur, dass eine Ebene weniger in das + Inhaltsverzeichnis eingetragen wird als normalerweise, können Sie auch + einfach vom voreingestellten Wert des Zählers \Counter{tocdepth} eins + abziehen: +\begin{lstcode} + \documentclass{scrartcl} + \addtocounter{tocdepth}{-1} +\end{lstcode} + Den\textnote{Tipp!} Wert, den Sie zu \Counter{tocdepth} addieren oder davon + subtrahieren müssen, können Sie nach mindestens zwei \LaTeX-Läufen einfach + im Inhaltsverzeichnis abzählen. +\end{Example}% +\EndIndexGroup +% +\EndIndexGroup + + +\LoadCommonFile{parmarkup}% \section{Absatzauszeichnung} + +\LoadCommonFile{oddorevenpage}% \section{Erkennung von rechten und linken Seiten} + + +\section{Kopf und Fuß bei vordefinierten Seitenstilen} +\seclabel{pagestyle} + +\BeginIndexGroup +\BeginIndex{}{Seiten>Stil}% +Eine der allgemeinen Eigenschaften eines Dokuments ist der Seitenstil. Bei +{\LaTeX} versteht man unter dem Seitenstil in erster Linie den Inhalt der +Kopf- und Fußzeilen. + + +\begin{Declaration} + \OptionVName{headsepline}{Ein-Aus-Wert} + \OptionVName{footsepline}{Ein-Aus-Wert} +\end{Declaration}% +Mit diesen Optionen kann eingestellt werden, +ob\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} +unter Kolumnentiteln oder über dem Fuß eine horizontale Linie\Index{Trennlinie} +gewünscht wird. Als \PName{Ein-Aus-Wert} kann +einer der Standardwerte für einfache Schalter aus +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} verwendet +werden. Ein Aktivieren der Option \Option{headsepline} oder die Verwendung +der Option ohne Wertübergabe schaltet die Linie unter den Kolumnentiteln +ein. Ein Aktivieren der Option \Option{footsepline} oder die Verwendung der +Option ohne Wertübergabe schaltet die Linie über der Fußzeile ein. Die +Deaktivierung der Optionen schaltet die jeweilige Linie aus. + +Bei\textnote{Achtung!} den weiter unten erklärten Seitenstilen +\DescRef{\LabelBase.pagestyle.empty} und \DescRef{\LabelBase.pagestyle.plain} +hat die Option \Option{headsepline} selbstverständlich keine Auswirkung, da +hier auf einen Seitenkopf\Index{Seiten>Kopf} ausdrücklich verzichtet werden +soll. Typografisch betrachtet, hat eine solche Linie immer die Auswirkung, +dass der Kopf optisch näher an den Text heranrückt. Dies bedeutet nun nicht, +dass der Kopf räumlich weiter vom Textkörper\Index{Text>Bereich} weggerückt +werden müsste. Stattdessen sollte der Kopf dann bei der Berechnung des +Satzspiegels als zum Textkörper gehörend betrachtet werden. Dies wird bei +\KOMAScript{} dadurch erreicht, dass Paket +\hyperref[cha:typearea]{\Package{typearea}}% +\important{\hyperref[cha:typearea]{\Package{typearea}}}\IndexPackage{typearea} +ebenfalls auf \Option{headsepline} reagiert und automatisch die Paketoption +\DescRef{typearea.option.headinclude}% +\IndexOption{headinclude}\important{\DescRef{typearea.option.headinclude}} mit +gleichem Wert ausführt. Entsprechendes gilt auch für die Fußlinie. Im +Gegensatz zu \Option{headsepline} wirkt sich die Option \Option{footsepline} +auch beim Seitenstil \PValue{plain} aus, da \PValue{plain} eine Seitenzahl im +Fuß ausgibt. + +Die Optionen führen selbst keine automatische Neuberechnung des Satzspiegels +aus. Zur Neuberechnung des Satzspiegels siehe Option +\DescRef{typearea.option.DIV} mit den Werten +\hyperref[desc:typearea.option.DIV.last]{\PValue{last}} oder +\hyperref[desc:typearea.option.DIV.current]{\PValue{current}} (siehe +\DescPageRef{typearea.option.DIV.last}) oder die Anweisung +\DescRef{typearea.cmd.recalctypearea} (siehe +\DescPageRef{typearea.cmd.recalctypearea}) in \autoref{cha:typearea}. + +Das Paket \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} (siehe +\autoref{cha:scrlayer-scrpage}) bietet weitere Einflussmöglichkeiten für +Linien im Kopf und Fuß.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{pagestyle}\Parameter{Seitenstil} + \Macro{thispagestyle}\Parameter{lokaler Seitenstil} +\end{Declaration}% +Üblicherweise wird zwischen vier verschiedenen Seitenstilen unterschieden: +\begin{description} +\item[{\PageStyle{empty}% + \BeginIndex[indexmain]{Pagestyle}{empty}\LabelPageStyle{empty}}] ist der + Seitenstil, bei dem Kopf- und Fußzeile vollständig leer bleiben. Dies ist + bei {\KOMAScript} vollkommen identisch zu den Standardklassen.% +\item[{\PageStyle{headings}% + \BeginIndex[indexmain]{Pagestyle}{headings}\LabelPageStyle{headings}}] ist + der Seitenstil für lebende Kolumnentitel. Das sind Kolumnentitel, bei denen + Überschriften automatisch\Index[indexmain]{Kolumnentitel>automatisch} in den + Seitenkopf übernommen werden. Im Internet oder in Beschreibungen zu + \LaTeX-Paketen findet man auch häufig die englische Bezeichnung + »\emph{running headline}«. \OnlyAt{\Class{scrbook}\and \Class{scrreprt}}% + Bei den Klassen \Class{scrbook}\IndexClass{scrbook} und + \Class{scrreprt}\IndexClass{scrreprt} werden dabei im doppelseitigen Layout + die Überschriften der Kapitel und der Abschnitte in der Kopfzeile wiederholt + -- bei {\KOMAScript}\textnote{\KOMAScript{} vs. Standardklassen} jeweils + außen, bei den Standardklassen innen. Die Seitenzahl wird bei {\KOMAScript} + im Fuß außen, bei den Standardklassen im Kopf außen gesetzt. Im einseitigen + Layout werden nur die Überschriften der Kapitel verwendet und bei + {\KOMAScript} zentriert im Kopf ausgegeben. Die Seitenzahlen werden bei + {\KOMAScript} dann zentriert im Fuß gesetzt. \OnlyAt{\Class{scrartcl}}Bei + \Class{scrartcl}\IndexClass{scrartcl} wird entsprechend verfahren, jedoch + eine Ebene tiefer bei Abschnitt und Unterabschnitt angesetzt, da die + Gliederungsebene Kapitel hier nicht existiert. + + Während die Standardklassen\textnote{\KOMAScript{} vs. Standardklassen} + automatische Kolumnentitel immer in Versalien -- also Großbuchstaben -- + setzen, verwendet {\KOMAScript} die Schreibweise, die in der Überschrift + vorgefunden wurde. Dies hat verschiedene typografische Gründe. So sind + Versalien als Auszeichnung eigentlich viel zu mächtig. Verwendet man sie + trotzdem, sollten sie um einen Punkt kleiner gesetzt und leicht gesperrt + werden (siehe hierzu beispielsweise \cite{JTschErfreulich}). All dies findet + bei den Standardklassen keine Beachtung. + + Darüber hinaus können bei den \KOMAScript-Klassen mit den Optionen + \DescRef{\LabelBase.option.headsepline} und + \DescRef{\LabelBase.option.footsepline} (siehe + \DescPageRef{\LabelBase.option.headsepline}) Linien unter dem Kopf und über + dem Fuß gesetzt werden.% +\item[{\PageStyle{myheadings}% + \BeginIndex[indexmain]{Pagestyle}{myheadings}\LabelPageStyle{myheadings}}] + entspricht weitgehend dem Seitenstil \PageStyle{headings}, allerdings werden + die Kolumnentitel nicht automatisch\Index[indexmain]{Kolumnentitel>manuell} + erzeugt, sondern liegen in der Verantwortung des Anwenders. Er verwendet + dazu die Anweisungen \DescRef{\LabelBase.cmd.markboth}\IndexCmd{markboth} + und \DescRef{\LabelBase.cmd.markright}\IndexCmd{markright}\important{% + \DescRef{\LabelBase.cmd.markboth}\\ + \DescRef{\LabelBase.cmd.markright}} (siehe + \DescPageRef{\LabelBase.cmd.markright}). +\item[{\PageStyle{plain}% + \BeginIndex[indexmain]{Pagestyle}{plain}\LabelPageStyle{plain}}] + ist der Seitenstil, bei dem keinerlei Kolumnentitel\Index{Kolumnentitel} + verwendet, sondern nur eine Seitenzahl\Index{Seiten>Zahl}\Index{Paginierung} + ausgegeben wird. Bei\textnote{\KOMAScript{} vs. Standardklassen} den + Standardklassen wird diese Seitenzahl immer mittig im Fuß ausgegeben. Bei + {\KOMAScript} erfolgt die Ausgabe im doppelseitigen\Index{doppelseitig} + Layout stattdessen außen im Fuß. Der einseitige Seitenstil entspricht bei + {\KOMAScript} dem der Standardklassen.% +\end{description} + +\iftrue% Umbruchoptimierung!!!! +Der\important{\Macro{pagestyle}} Seitenstil kann jederzeit mit Hilfe der +\Macro{pagestyle}-Anweisung % +\else % +Mit \Macro{pagestyle} kann der Seitenstil jederzeit % +\fi % +gesetzt werden. Verwendet\textnote{Tipp!} man \Macro{pagestyle} vor +Anweisungen, die einen Seitenumbruch mit Einfügen einer +Vakatseite\Index{Vakatseite}\textnote{Vakatseite} herbeiführen können, und +soll die Änderung erst ab der neuen Seite gelten, so ist ein +\DescRef{\LabelBase.cmd.cleardoublepage} davor nützlich. +% +\iffalse % Umbruchkorrektur +Üblicherweise verwendet man \Macro{pagestyle} aber nur einmal zu +Beginn des Dokuments oder in der Präambel. +% +\fi + +Für\important{\Macro{thispagestyle}} eine Änderung des Seitenstils nur der +aktuellen Seite verwendet man stattdessen die Anweisung +\Macro{thispagestyle}. Dies geschieht auch an einigen Stellen im Dokument +automatisch. Beispielsweise wird bei allen Kapitelanfangsseiten implizit die +Anweisung +\Macro{thispagestyle}\PParameter{\DescRef{\LabelBase.cmd.chapterpagestyle}} +ausgeführt. + +Bitte\textnote{Achtung!} beachten Sie, dass die Umschaltung zwischen +automatischen und manuellen Kolumnentiteln bei Verwendung von +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} nicht +mehr über den Seitenstil, sondern mit speziellen Anweisungen erfolgt. Die +beiden Seitenstile \PageStyle{headings} und \PageStyle{myheadings} sollten +nicht zusammen mit diesem Paket verwendet werden. + +\BeginIndexGroup \BeginIndex[indexother]{}{Schrift>Art}% +\BeginIndex{FontElement}{pageheadfoot}\LabelFontElement{pageheadfoot}% +\LabelFontElement{pagehead}% +\BeginIndex{FontElement}{pagefoot}\LabelFontElement{pagefoot}% +\BeginIndex{FontElement}{pagenumber}\LabelFontElement{pagenumber}% +Um die Schriftarten von Kopf und Fuß der Seite oder der Seitenzahl zu +ändern\ChangedAt{v2.8p}{% + \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}, % +verwenden Sie die Anweisungen \DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}). Für den Kopf und den Fuß ist dabei +das gleiche Element \FontElement{pageheadfoot}\IndexFontElement{pageheadfoot}% +\important{\FontElement{pageheadfoot}} zuständig. Das Element für die +Seitenzahl innerhalb des Kopfes oder Fußes heißt +\FontElement{pagenumber}\IndexFontElement{pagenumber}% +\important{\FontElement{pagenumber}}. Das ebenfalls in den \KOMAScript-Klassen +bereitgestellte Element \FontElement{pagefoot}\IndexFontElement{pagefoot}% +\important{\FontElement{pagefoot}} wird nur verwendet, wenn man mit dem Paket +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage} (siehe \autoref{cha:scrlayer-scrpage}, +\DescPageRef{scrlayer-scrpage.fontelement.pagefoot}) einen Seitenstil +definiert, bei dem auch der Fuß Text enthält. + +Die Voreinstellungen sind in \autoref{tab:maincls.defaultFontsHeadFoot} zu +finden. +% +\begin{table} +% \centering% +% \caption + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \addtokomafont{caption}{\raggedright}% + \begin{captionbeside} + [{Schriftvoreinstellungen für die Elemente des Seitenstils}] + {\label{tab:maincls.defaultFontsHeadFoot}% + \hspace{0pt plus 1ex}% + Vorein\-stellungen der Schrift für die Elemente des Seitenstils} + [l] + \begin{tabular}[t]{ll} + \toprule + Element & Voreinstellung \\ + \midrule + \FontElement{pagefoot}\IndexFontElement{pagefoot} & + \\ + \FontElement{pageheadfoot}\IndexFontElement{pageheadfoot} & + \Macro{normalfont}\Macro{normalcolor}\Macro{slshape} \\ + \FontElement{pagenumber}\IndexFontElement{pagenumber} & + \Macro{normalfont}\Macro{normalcolor}\\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} +% +\begin{Example} + \leavevmode\phantomsection\xmpllabel{cmd.pagestyle}% + Angenommen, Sie wollen Kopf und Fuß einen Schriftgrad kleiner und kursiv + setzen. Die Seitenzahl soll jedoch nicht kursiv, sondern fett gesetzt + werden. Davon abgesehen, dass das Ergebnis grauenvoll aussehen wird, können + Sie dies wie folgt erreichen: +\begin{lstcode} + \setkomafont{pageheadfoot}{% + \normalfont\normalcolor\itshape\small} + \setkomafont{pagenumber}{\normalfont\bfseries} +\end{lstcode} + Wollen Sie hingegen lediglich, dass zusätzlich zur bereits voreingestellten + schrägen Variante ebenfalls eine kleinere Schrift verwendet wird, so genügt: +\begin{lstcode} + \addtokomafont{pagehead}{\small} +\end{lstcode} + Wie Sie sehen, wurde im letzten Beispiel das Element + \FontElement{pagehead}\important{\FontElement{pagehead}} verwendet. Das + gleiche Ergebnis erhalten Sie auch, wenn Sie stattdessen + \FontElement{pageheadfoot} verwenden (siehe + \autoref{tab:maincls.fontelements}, + \autopageref{tab:maincls.fontelements}). +\end{Example} +Es ist an dieser Stelle nicht möglich, Versalien für die automatischen +Kolumnentitel zu erzwingen. Wenn Sie dies wünschen, müssen Sie beispielsweise +\DescRef{tocbasic.cmd.MakeMarkcase}\IndexCmd{MakeMarkcase} entsprechend +umdefinieren. Es wird jedoch empfohlen, in solchen Fällen das Paket +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} zu verwenden +(siehe \autoref{cha:scrlayer-scrpage}, +\DescPageRef{scrlayer-scrpage.option.markcase}). + +Werden\textnote{Tipp!} eigene Seitenstile definiert, sind eventuell die +Befehle \DescRef{\LabelBase.cmd.usekomafont}\PParameter{pageheadfoot}, +\DescRef{\LabelBase.cmd.usekomafont}\PParameter{pagenumber} sowie +\DescRef{\LabelBase.cmd.usekomafont}\PParameter{pagefoot} +nützlich. Insbesondere falls Sie dafür nicht das \KOMAScript-Paket +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} (siehe +\autoref{cha:scrlayer-scrpage}), sondern beispielsweise das Paket +\Package{fancyhdr}\IndexPackage{fancyhdr}\important{\Package{fancyhdr}} (siehe +\cite{package:fancyhdr}) einsetzen, können Sie diese Befehle in Ihren +Definitionen verwenden. Dadurch bleiben Sie zu \KOMAScript{} möglichst +kompatibel. Verwenden Sie diese Befehle in Ihren eigenen Definitionen nicht, +so bleiben Schriftänderungen wie in den vorangehenden Beispielen +unbeachtet. Das Paket +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage} sorgt selbst für maximale +Kompatibilität, solange beispielsweise für die Seitenzahl nicht direkt +\DescRef{\LabelBase-experts.cmd.thepage}\IndexCmd{thepage}, sondern +das dafür vorgesehene +\DescRef{\LabelBase-experts.cmd.pagemark}\IndexCmd{pagemark} verwendet +wird.% +\EndIndexGroup +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{markboth}\Parameter{linke Marke}\Parameter{rechte Marke} + \Macro{markright}\Parameter{rechte Marke} +\end{Declaration} +Beim Seitenstil \DescRef{\LabelBase.pagestyle.myheadings}% +\important{\DescRef{\LabelBase.pagestyle.myheadings}}% +\IndexPagestyle{myheadings} wird der Kolumnentitel nicht automatisch +gesetzt. Stattdessen setzt man ihn mit Hilfe der Anweisungen \Macro{markboth} +und \Macro{markright}. Dabei wird die \PName{linke Marke} normalerweise im +Kopf linker Seiten und die \PName{rechte Marke} im Kopf rechter Seiten +verwendet. Im einseitigen Satz existiert nur die rechte Marke. Bei Verwendung +des Pakets \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} steht +außerdem die Anweisung \DescRef{scrlayer-scrpage.cmd.markleft}% +\IndexCmd{markleft}\important{\DescRef{scrlayer-scrpage.cmd.markleft}} zur +Verfügung. + +Die Anweisungen können % +\iffalse % Umbruchkorrektur +auch zusammen mit anderen % +\else % +mit beliebigen % +\fi % +Seitenstilen verwendet werden. Bei Kombination mit automatischen +Kolumnentiteln, etwa dem Seitenstil +\DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings}, ist der +Wirkungsbereich % +\iffalse % Umbruchkorrektur +allerdings % +\fi % +bis zum nächsten automatischen Setzen der entsprechenden Marke begrenzt.% +% +\EndIndexGroup + +\begin{Declaration} + \Macro{titlepagestyle} + \Macro{partpagestyle} + \Macro{chapterpagestyle} + \Macro{indexpagestyle} +\end{Declaration}% +\Index{Titel>Seitenstil}% +\Index{Teil>Seitenstil}% +\Index{Kapitel>Seitenstil}% +\Index{Stichwortverzeichnis>Seitenstil}% +Auf einigen Seiten wird mit Hilfe von \DescRef{\LabelBase.cmd.thispagestyle} +automatisch ein anderer Seitenstil gewählt. Welcher Seitenstil dies ist, wird +diesen vier Makros entnommen, wobei \Macro{partpagestyle} und +\Macro{chapterpagestyle}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} nur bei +den Klassen \Class{scrbook} und \Class{scrreprt} nicht jedoch bei +\Class{scrartcl} existieren. In der Voreinstellung ist der Seitenstil in allen +vier Fällen \DescRef{\LabelBase.pagestyle.plain}\IndexPagestyle{plain}. Die +Bedeutung der einzelnen Makros entnehmen Sie bitte +\autoref{tab:specialpagestyles}. +% +\begin{table} + \centering + \caption{Makros zur Festlegung des Seitenstils besonderer Seiten} + \label{tab:specialpagestyles} + \begin{desctabular} + \mentry{titlepagestyle}{Seitenstil der Seite mit der Titelei bei + Titelköpfen (siehe \autoref{sec:\LabelBase.titlepage})}% + \mentry{partpagestyle}{Seitenstil der Seiten mit \DescRef{\LabelBase.cmd.part}-Titeln + (siehe \autoref{sec:\LabelBase.structure})}% + \mentry{chapterpagestyle}{Seitenstil auf Kapitelanfangsseiten (siehe + \autoref{sec:\LabelBase.structure})}% + \mentry{indexpagestyle}{Seitenstil der ersten Stichwortverzeichnisseite + (siehe \autoref{sec:\LabelBase.index})}% + \end{desctabular} +\end{table} +% +Die Seitenstile können mit Hilfe von \Macro{renewcommand} umdefiniert +werden. +\begin{Example} + Angenommen, Sie wollen nicht, dass die Seiten mit der + \DescRef{\LabelBase.cmd.part}-Überschrift mit einer Nummer versehen + werden. Dann setzen Sie folgende Anweisung beispielsweise in der Präambel + Ihres Dokuments: +\begin{lstcode} + \renewcommand*{\partpagestyle}{empty} +\end{lstcode} + Wie Sie auf \DescPageRef{\LabelBase.pagestyle.empty} erfahren haben, ist + der Seitenstil \DescRef{\LabelBase.pagestyle.empty}\IndexPagestyle{empty} + genau das, was in diesem Beispiel verlangt wird.% + \iffalse % Umbruchkorrektur + \ Natürlich können Sie auch einen selbst definierten Seitenstil verwenden.% + \fi % + + Angenommen, Sie haben mit einem der Pakete + \hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer} (siehe + \autoref{sec:scrlayer.pagestyles}) oder Paket + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + \IndexPackage{scrlayer-scrpage} (siehe + \autoref{sec:scrlayer-scrpage-experts.pagestyle.pairs}) einen eigenen + Seitenstil \iftrue mit Namen \PValue{chapter} \fi% Umbruchkorrektur + für Kapitelanfangsseiten\Index{Kapitel>Seitenstil}% + \textnote{Kapitel\-anfangs\-seiten} erstellt. % + \iffalse Diesem Seitenstil haben Sie den passenden Namen \PValue{chapter} + gegeben. \fi% Umbruchkorrektur (abhängig von oben) + Um ihn auch tatsächlich zu + verwenden, definieren Sie \Macro{chapterpagestyle} entsprechend um: +\begin{lstcode} + \renewcommand*{\chapterpagestyle}{chapter} +\end{lstcode} + + Angenommen, Sie wollen das + Inhaltsverzeichnis\Index{Inhaltsverzeichnis}\textnote{Inhaltsverzeichnis} + eines Buches insgesamt nicht mit Seitenzahlen versehen. Danach soll aber + wieder mit dem Seitenstil \PageStyle{headings} gearbeitet werden sowie mit + \PageStyle{plain} auf den Kapitelanfangsseiten. Dann verwenden Sie + beispielsweise: +\begin{lstcode} + \clearpage + \pagestyle{empty} + \renewcommand*{\chapterpagestyle}{empty} + \tableofcontents + \clearpage + \pagestyle{headings} + \renewcommand*{\chapterpagestyle}{plain} +\end{lstcode} + Sie können die Umdefinierung des Seitenstils für Kapitelanfangsseiten aber + auch lokal halten. Das hat den Vorteil, dass Sie dann keine Annahmen über + die vor der Änderung gültige Einstellung treffen müssen. Die Änderung + des Seitenstils selbst können Sie gleichermaßen lokal halten: +\begin{lstcode} + \clearpage + \begingroup + \pagestyle{empty} + \renewcommand*{\chapterpagestyle}{empty} + \tableofcontents + \clearpage + \endgroup +\end{lstcode} + Beachten\textnote{Achtung!} Sie jedoch, dass Sie niemals eine nummerierte + Gliederungsüberschrift in eine Gruppe packen sollten. Anderenfalls können + Anweisungen wie \Macro{label} rasch zu unvorhergesehenen Ergebnissen + führen. + + \iffalse % Umbruchoptimierung + Auf \DescPageRef{tocbasic.cmd.AfterTOCHead} in \autoref{sec:tocbasic.toc} + werden Sie die Anweisung \DescRef{tocbasic.cmd.AfterTOCHead} kennenlernen, + mit der eine Lösung noch einfacher ist:% + \else % + Mit der Anweisung \DescRef{tocbasic.cmd.AfterTOCHead} aus + \autoref{sec:tocbasic.toc}, \DescPageRef{tocbasic.cmd.AfterTOCHead} wird die + Lösung noch einfacher:% + \fi % +\begin{lstcode} + \AfterTOCHead[toc]{% + \thispagestyle{empty}% + \pagestyle{empty}} +\end{lstcode}% + Hierbei wird die Tatsache ausgenutzt. dass bei mehreren + \DescRef{\LabelBase.cmd.thispagestyle}-Anweisungen auf derselben Seite immer + die letzte gewinnt. +\end{Example} + +\begin{Explain} + Wer nun glaubt, er könne auf Kapitelanfangsseiten ebenfalls mit + lebenden Kolumnentiteln arbeiten, indem er einfach +\begin{lstcode} + \renewcommand*{\chapterpagestyle}{headings} +\end{lstcode} + verwendet, sollte in \autoref{sec:maincls-experts.addInfos} auf + \DescPageRef{maincls-experts.cmd.rightmark} Näheres über die + Hintergründe zu \DescRef{maincls-experts.cmd.rightmark} nachlesen. Auch die + Ausführungen zu \DescRef{scrlayer-scrpage-experts.cmd.rightfirstmark} ab + Seite \DescPageRef{scrlayer-scrpage-experts.cmd.rightfirstmark} in + \autoref{cha:scrlayer-scrpage-experts}, \autoref{part:forExperts} können + hierzu wichtige Informationen liefern.% +\end{Explain} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{pagenumbering}\Parameter{Nummerierungsstil} +\end{Declaration} +Diese Anweisung funktioniert bei \KOMAScript{} in der gleichen Weise wie bei +den Standardklassen. Genau genommen handelt es sich dabei % +\iffalse weder um eine Fähigkeit der Standardklassen noch der +\KOMAScript-Klassen, sondern \fi % Umbruchkorrektur +um eine Anweisung des \LaTeX-Kerns. Sie wird verwendet, um den +\PName{Nummerierungsstil} für die Seitenzahlen umzuschalten. + +Die Umschaltung gilt ab sofort, also ab der Seite, auf der diese Anweisung +aufgerufen wird. Gegebenenfalls sollte also zuvor mit +\DescRef{\LabelBase.cmd.clearpage} oder besser +\DescRef{\LabelBase.cmd.cleardoubleoddpage}% +\important{\DescRef{\LabelBase.cmd.cleardoubleoddpage}}% +\IndexCmd{cleardoubleoddpage} diese Seite erst beendet werden. Mögliche +Angaben für den \PName{Nummerierungsstil} sind \autoref{tab:numberKind} zu +entnehmen. +% +\begin{table} +% \centering +% \caption + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \addtokomafont{caption}{\raggedright}% + \begin{captionbeside} + {\label{tab:numberKind}% + \hspace{0pt plus 1ex}% + Verfügbare Nummerierungsstile für Seitenzahlen} + \begin{tabular}[t]{lll} + \toprule + Nummerierungsstil & Beispiel & Bedeutung \\ + \midrule + \PValue{arabic} & 8 & arabische Zahlen \\ + \PValue{roman} & viii & kleine römische Zahlen \\ + \PValue{Roman} & VIII & große römische Zahlen \\ + \PValue{alph} & h & Kleinbuchstaben \\ + \PValue{Alph} & H & Großbuchstaben \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} + +Der\textnote{Achtung!} Aufruf von \Macro{pagenumbering} setzt immer die +Seitenzahl\Index{Seiten>Zahl} zurück. Die aktuelle Seite bekommt also die +Nummer 1 im gewählten \PName{Nummerierungsstil}. Damit bei doppelseitigen +Dokumenten diese neue Seite auch wirklich auf eine gerade Seite folgt, die +linke Seite also nicht etwa fehlt, sollte man daher vor \Macro{pagenumbering} +immer \DescRef{\LabelBase.cmd.cleardoubleoddpage}% +\important{\DescRef{\LabelBase.cmd.cleardoubleoddpage}}% +\IndexCmd{cleardoubleoddpage} einfügen. Näheres zu einer dabei gegebenenfalls +eingefügten Vakatseite erfahren Sie im nächsten Abschnitt. + +\begin{Explain} + Lassen Sie mich noch ein Wort zu einem häufigen Fehler verlieren, den man in + diversen Vorlagen findet, die im Internet kursieren. Wenn Sie -- natürlich + ohne den Eingangskommentar -- auf Zeilen wie: +\begin{lstcode} + % Achtung dieses Beispiel enthält Fehler! + % Beachten Sie bitte die Erklärungen im Text! + \tableofcontents + \pagenumbering{arabic} + \setcounter{page}{1} +\end{lstcode} + stoßen, so ist das ein untrügliches Zeichen dafür, dass der Ersteller dieser + Vorlage obige Ausführungen nicht gelesen oder nicht verstanden hat. Da + \DescRef{\LabelBase.cmd.tableofcontents} das Inhaltsverzeichnis zwar + ausgibt, aber die letzte Seite nicht automatisch beendet, wird bereits für + diese letzte Seite des Inhaltsverzeichnisses die Seitennummerierung + umgeschaltet. Sie erhält damit die arabische Seitenzahl 1. Es fehlt also + \DescRef{\LabelBase.cmd.cleardoubleoddpage} vor + \Macro{pagenumbering}. Ebenso ist die letzte Zeile mit dem Setzen der + Seitennummerierung auf 1 überflüssig, da dies bereits von + \Macro{pagenumbering} erledigt wird. + + Teilweise findet man -- natürlich ohne den Eingangskommentar -- auch: +\begin{lstcode} + % Achtung dieses Beispiel enthält Fehler! + % Beachten Sie bitte die Erklärungen im Text! + \tableofcontents + \pagebreak + \pagenumbering{arabic} + \setcounter{page}{1} +\end{lstcode} + Hier hat der Ersteller versucht, das Problem mit der letzten Seite des + Inhaltsverzeichnisses mit Hilfe von \Macro{pagebreak}\IndexCmd{pagebreak} zu + lösen. Diese Lösung ist aber leider auch nicht viel besser. Hier wird die + letzte Seite des Inhaltsverzeichnisses auf die nächste Seite + umbrochen. Damit werden bei einem doppelseitigen Dokument unter Umständen + die Einträge auf der letzten Seite mit einem erhöhten vertikalen Abstand + gesetzt (siehe \DescRef{\LabelBase.cmd.flushbottom} auf + \DescPageRef{\LabelBase.cmd.flushbottom}). \Macro{pagebreak} ist hier + eindeutig die falsche Anweisung. + + Aber auch \Macro{newpage}\IndexCmd{newpage} oder + \DescRef{\LabelBase.cmd.clearpage} würden bei einem doppelseitigen Dokument + nicht genügen. Hätte die letzte Seite des Inhaltsverzeichnisses + beispielsweise die römische Nummer vii, so würde auf die römisch nummerierte + rechte Seite nun unmittelbar die arabisch nummerierte rechte Seite 1 + folgen. Eine linke Seite zwischen diesen beiden Seiten würde im Dokument + fehlen, was beim späteren Druck erhebliche Probleme bereiten könnte. + + Mein Rat: Vermeiden Sie die Verwendung von Vorlagen, die bereits in solch + einfachen Dingen Fehler enthalten. Korrekt wäre übrigens: +\begin{lstcode} + \tableofcontents + \cleardoubleoddpage + \pagenumbering{arabic} +\end{lstcode} + Das gilt auch, wenn mit \Class{scrartcl}\OnlyAt{\Class{scrartcl}} eine + Klasse verwendet wird, bei der üblicherweise nach dem Inhaltsverzeichnis + keine neue Seite begonnen wird. Schaltet man die Seitennummerierung um, so + muss eine neue rechte Seite begonnen werden. Wollen Sie eine solche + Umschaltung nicht, so sollten Sie den Nummerierungsstil der Seiten über das + gesamte Dokument konsequent durchhalten, ohne ihn zwischendurch zu + ändern. +\iftrue% Umbruchkorrekturtext + Bei Artikeln oder anderen kurzen Dokumenten ist das generell zu + empfehlen. +\fi + + Einfacher wird die Änderung des Nummerierungsstils bei Verwendung von + \Class{scrbook}\OnlyAt{\Class{scrbook}}. Dort werden Sie durch + die beiden Anweisungen \DescRef{\LabelBase.cmd.frontmatter}% + \important{\DescRef{\LabelBase.cmd.frontmatter}\\ + \DescRef{\LabelBase.cmd.mainmatter}}% + \IndexCmd{fontmatter} und \DescRef{\LabelBase.cmd.mainmatter}% + \IndexCmd{mainmatter} bei der am häufigsten verwendeten Umschaltung + unterstützt. Nähere Informationen entnehmen Sie bitte + \autoref{sec:maincls.separation}, ab + \DescPageRef{\LabelBase.cmd.mainmatter}.% +\end{Explain}% +\EndIndexGroup +\EndIndexGroup + + +\LoadCommonFile{interleafpage}% \section{Vakatseiten} + +\LoadCommonFile{footnotes}% \section{Fußnoten} + +\section[Abgrenzung]{Abgrenzung\protect\OnlyAt{\Class{scrbook}}} +\seclabel{separation} + +Bei Büchern gibt es teilweise die Grobauf"|teilung in +\emph{Vorspann}\Index{Vorspann}, \emph{Hauptteil}\Index{Hauptteil} und +\emph{Nachspann}\Index{Nachspann}% +\iffalse % Umbruchkorrektur +. Auch \KOMAScript{} bietet für \Class{scrbook} diese Möglichkeit.% +\else +, die auch von \Class{scrbook} unterstützt wird. +\fi + + +\begin{Declaration} + \Macro{frontmatter} + \Macro{mainmatter} + \Macro{backmatter} +\end{Declaration}% +Mit \Macro{frontmatter}\important{\Macro{frontmatter}} wird der Vorspann +eingeleitet. Dadurch werden die nummerierten Seiten mit römischen +Seitenzahlen versehen. Kapitelüberschriften sind im Vorspann nicht +nummeriert. Abschnittsüberschriften wären jedoch nummeriert, gingen von +Kapitelnummer~0 aus und wären außerdem über Kapitelgrenzen hinweg durchgehend +nummeriert. Dies spielt jedoch keine Rolle, da der Vorspann allenfalls für die +Titelei, das Inhalts-\Index{Inhaltsverzeichnis}, +Abbildungs-\Index{Abbildungen>Verzeichnis} und +Tabellenverzeichnis\Index{Tabellen>Verzeichnis} und ein +Vorwort\Index{Vorwort} verwendet wird. Das Vorwort kann also als normales +Kapitel gesetzt werden. Ein Vorwort sollte niemals in Abschnitte unterteilt, +sondern möglichst kurz gefasst werden. Im Vorwort wird also keine tiefere +Gliederungsebene als Kapitel benötigt. + +Für den Fall, dass der Anwender dies anders sieht und nummerierte +Abschnitte\Index{Abschnitt>Nummer} in den Kapiteln des Vorspanns haben will, +enthält ab Version~2.97e\ChangedAt{v2.97e}{\Class{scrbook}}% +\important{\OptionValueRef{\LabelBase}{version}{2.97e}} die Nummerierung der +Abschnitte keine Kapitelnummer. Diese Änderung gibt es nur, wenn eine +Kompatibilität ab Version~2.97e eingestellt ist (siehe Option +\DescRef{\LabelBase.option.version}, +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}). Es wird ausdrücklich darauf +hingewiesen, dass dadurch bezüglich der Nummern eine Verwechslung mit +Kapitelnummern gegeben ist! Die Verwendung von \DescRef{\LabelBase.cmd.addsec} und +\DescRef{\LabelBase.cmd.section*} (siehe \autoref{sec:\LabelBase.structure}, +\DescPageRef{\LabelBase.cmd.section*} und \DescPageRef{\LabelBase.cmd.addsec}) +sind aus Sicht des Autors im Vorspann deshalb unbedingt vorzuziehen! + +Ab Version~2.97e\ChangedAt{v2.97e}{\Class{scrbook}}% +\important{\OptionValueRef{\LabelBase}{version}{2.97e}} enthalten auch die +Nummern für Gleitumgebungen wie Tabellen\Index{Tabellen>Nummern} und +Abbildungen\Index{Abbildungen>Nummern} und die +Gleichungsnummern\Index{Gleichungen>Nummern} im Vorspann keinen +Kapitelanteil. Auch dies erfordert eine entsprechende +Kompatibilitätseinstellung (siehe Option \DescRef{\LabelBase.option.version}, +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}). + +Mit \Macro{mainmatter}\important{\Macro{mainmatter}} wird der Hauptteil +eingeleitet. Existiert kein Vorspann, so kann diese Anweisung auch +entfallen. Im Hauptteil sind arabische Seitenzahlen voreingestellt. Die +Seitenzählung beginnt im Hauptteil neu mit der 1. + +Mit \Macro{backmatter}\important{\Macro{backmatter}} wird der Nachspann +eingeleitet. Was zum Nachspann gehört, ist unterschiedlich. Manchmal wird im +Nachspann nur das Literaturverzeichnis\Index{Literaturverzeichnis}, manchmal +nur das Stichwortverzeichnis\Index{Stichwortverzeichnis} gesetzt. Manchmal +erscheint der gesamte Anhang im Nachspann. Der Nachspann gleicht bezüglich der +Gliederungsüberschriften dem Vorspann. Eine getrennte Seitennummerierung ist +jedoch nicht vorgesehen. Falls Sie dies ebenfalls benötigen, bedienen Sie sich +bitte der Anweisung \DescRef{\LabelBase.cmd.pagenumbering}% +\important{\DescRef{\LabelBase.cmd.pagenumbering}} aus +\autoref{sec:\LabelBase.pagestyle}, +\DescPageRef{\LabelBase.cmd.pagenumbering}.% +% +\EndIndexGroup + + +\section{Gliederung} +\seclabel{structure}% +\BeginIndexGroup +\BeginIndex{}{Gliederung} + +Unter der Gliederung versteht man die Einteilung eines Dokuments in +Teile, Kapitel, Abschnitte und weitere Gliederungsebenen. + + +\begin{Declaration} + \OptionVName{open}{Methode} +\end{Declaration}% +Bei\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} den \KOMAScript-Klassen +\Class{scrbook} und \Class{scrreprt} kann gewählt werden, wo im doppelseitigen +Satz neue Kapitel beginnen. In der Voreinstellung beginnen bei +\Class{scrreprt} neue Kapitel\Index{Kapitel>Anfang} auf der nächsten neuen +Seite. Dies entspricht der \PName{Methode} \PValue{any}. Demgegenüber beginnen +bei \Class{scrbook} neue Kapitel auf der nächsten rechten Seite. Dies +entspricht der \PName{Methode} \PValue{right} und ist bei den meisten Büchern +üblich. In einigen Fällen sollen neue Kapitel jedoch auf der linken Seite +einer kompletten Doppelseite beginnen. Dies entspricht der \PName{Methode} +\PValue{left}\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}}. +Eine Zusammenfassung der möglichen Werte findet sich in +\autoref{tab:maincls.open}. Dabei sind auch die Auswirkungen auf +\DescRef{\LabelBase.cmd.cleardoublepage} sowie +% die vier \KOMAScript"=Anweisungen +\DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, +\DescRef{\LabelBase.cmd.cleardoublestandardpage}, +\DescRef{\LabelBase.cmd.cleardoubleplainpage} und die letzte der betroffenen +Anweisungen, \DescRef{\LabelBase.cmd.cleardoubleemptypage}, (siehe +\autoref{sec:\LabelBase.emptypage}, +\DescPageRef{\LabelBase.cmd.cleardoublepage}) angegeben. + +\begin{table} + \caption[{Mögliche Werte für Option \Option{open}}]{Mögliche Werte für + Option \Option{open} zur Auswahl von Umbrüchen mit Vakatseiten bei + \Class{scrbook} und \Class{scrreprt}} + \begin{desctabular} + \pventry{any}{% + Teile, Kapitel, Index und Nachspann verwenden + \DescRef{\LabelBase.cmd.clearpage}, aber nicht + \DescRef{\LabelBase.cmd.cleardoublepage};\newline die Anweisungen + \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, + \DescRef{\LabelBase.cmd.cleardoublestandardpage}, + \DescRef{\LabelBase.cmd.cleardoubleplainpage}, + \DescRef{\LabelBase.cmd.cleardoubleemptypage} und + \DescRef{\LabelBase.cmd.cleardoublepage} verhalten sich wie bei + \OptionValue{open}{right}.% + }% + \pventry{left}{% + Teile, Kapitel, Index und Nachspann verwenden + \DescRef{\LabelBase.cmd.cleardoublepage};\newline die Anweisungen + \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, + \DescRef{\LabelBase.cmd.cleardoublestandardpage}, + \DescRef{\LabelBase.cmd.cleardoubleplainpage}, + \DescRef{\LabelBase.cmd.cleardoubleemptypage} und + \DescRef{\LabelBase.cmd.cleardoublepage} erzeugen einen Seitenumbruch + und fügen gegebenenfalls eine Vakatseite\Index{Vakatseite} ein, um im + doppelseitigen Satz auf die nächste linke Seite zu gelangen.% + \IndexOption{open~=\textKValue{left}}}% + \pventry{right}{% + Teile, Kapitel, Index und Nachspann verwenden + \DescRef{\LabelBase.cmd.cleardoublepage};\newline die Anweisungen + \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, + \DescRef{\LabelBase.cmd.cleardoublestandardpage}, + \DescRef{\LabelBase.cmd.cleardoubleplainpage}, + \DescRef{\LabelBase.cmd.cleardoubleemptypage} und + \DescRef{\LabelBase.cmd.cleardoublepage} erzeugen einen Seitenumbruch + und fügen gegebenenfalls eine Vakatseite ein, um im doppelseitigen Satz + auf die nächste rechte Seite zu gelangen.% + \IndexOption{open~=\textKValue{right}}}% + \end{desctabular} + \label{tab:maincls.open} +\end{table} + +Da im einseitigen Satz nicht zwischen linken und rechten Seiten unterschieden +wird, hat die Option dort keine Wirkung. + +Bei der Klasse \Class{scrartcl} ist die oberste Gliederungsebene unter dem +Teil der Abschnitt. Daher unterstützt \Class{scrartcl} diese Option nicht.% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{chapterprefix}{Ein-Aus-Wert} + \OptionVName{appendixprefix}{Ein-Aus-Wert} + \Macro{IfChapterUsesPrefixLine}\Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration}% +Bei\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} den Standardklassen +\Class{book} und \Class{report} werden Kapitelüberschriften% +\Index{Kapitel>Ueberschrift=Überschrift} in der Form ausgegeben, dass zunächst +in einer Zeile »Kapitel«\iffree{\footnote{Bei Verwendung einer anderen Sprache + als Deutsch wird »Kapitel« selbstverständlich in der jeweiligen Sprache + gesetzt.}}{\footnote{Die Ausgabe erfolgt tatsächlich in der aktuell + aktiven Sprache.}}, % +gefolgt von der Kapitelnummer steht. Erst ab der nächsten Zeile wird dann die +Überschrift in linksbündigem Flattersatz ausgegeben. Bei {\KOMAScript} kann +dieses Verhalten mit der Klassenoption \Option{chapterprefix} ebenfalls +erreicht werden. Als \PName{Ein-Aus-Wert} kann einer der Standardwerte für +einfache Schalter aus \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} verwendet werden. +Voreingestellt\textnote{\KOMAScript{} vs. Standardklassen} ist +\OptionValue{chapterprefix}{false}, während das +Verhalten\important{\Option{chapterprefix}} der Standardklassen +\OptionValue{chapterprefix}{true} entspricht. Die Optionen wirken sich +außerdem auf das Aussehen der automatischen Kolumnentitel für Kapitel aus +(siehe \autoref{sec:\LabelBase.pagestyle}, +\DescPageRef{\LabelBase.pagestyle.headings}). + +Zuweilen kommt es vor, dass man die Kapitelüberschriften im Hauptteil +in der einfachen Form von \OptionValue{chapterprefix}{false} setzen +möchte. Gleichzeitig\important{\Option{appendixprefix}} sollen die +Überschriften im Anhang\Index{Anhang} jedoch davon abweichend mit einer +Präfixzeile --~»Anhang«, gefolgt vom Buchstaben des Anhangs~-- versehen +werden. Dies ist mit der Einstellung \OptionValue{appendixprefix}{true} +möglich. Da sich jedoch dadurch ein inkonsistentes Layout ergibt, rate ich von +der Verwendung ab. Letztlich führt die Option dazu, dass +\Option{chapterprefix} zu Beginn des Anhangs automatisch geändert wird. + +Mit der Anweisung +\Macro{IfChapterUsesPrefixLine}\ChangedAt{v3.18}{\Class{scrbook}\and + \Class{scrreprt}} kann man Code in Abhängigkeit der aktuellen Einstellung +für die Präfixzeile ausführen. Ist \Option{chapterprefix} aktiv, so wird der +\PName{Dann-Teil} ausgeführt, anderenfalls der \PName{Sonst-Teil}. + +\BeginIndex{FontElement}{chapterprefix}% +Die Schriftart der Kapitelnummernzeile bei \OptionValue{chapterprefix}{true} +oder \OptionValue{appendixprefix}{true} kann mit den beiden Anweisungen +\DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) +für das Element \FontElement{chapterprefix}% +\ChangedAt{v2.96a}{\Class{scrbook}\and \Class{scrreprt}} geändert +werden. Voreingestellt ist die Verwendung des Elements +\DescRef{\LabelBase.fontelement.chapter}\IndexFontElement{chapter} (siehe +\DescPageRef{\LabelBase.cmd.chapter}, sowie +\autoref{tab:maincls.structureElementsFont}, +\autopageref{tab:maincls.structureElementsFont}). + +Weitere Einstellmöglichkeiten für Kapitelüberschriften sind den Erklärungen zu +\DescRef{maincls-experts.cmd.RedeclareSectionCommand} sowie den Anweisungen +\DescRef{maincls-experts.cmd.chapterlineswithprefixformat} und +\DescRef{maincls-experts.cmd.chapterlinesformat} in +\autoref{sec:maincls-experts.sections}, \autoref{part:forExperts} zu +entnehmen.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{headings}{Einstellung} +\end{Declaration} +Die Überschriften\index{Ueberschriften=Überschriften} werden sowohl bei den +Standardklassen als auch bei {\KOMAScript} normalerweise recht groß +gesetzt. Dies gefällt nicht jedem und wirkt insbesondere bei kleinen +Papiergrößen oft störend. Daher stehen bei {\KOMAScript} neben den mit der +Option \OptionValue{headings}{big}\IndexOption{headings~=\textKValue{big}}% +\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% +\important{\OptionValue{headings}{big}\\ + \OptionValue{headings}{normal}\\ + \OptionValue{headings}{small}} sehr groß voreingestellten Überschriften die +beiden Möglichkeiten +\OptionValue{headings}{normal}\IndexOption{headings~=\textKValue{normal}} und +\OptionValue{headings}{small}\IndexOption{headings~=\textKValue{small}} zur +Verfügung, mit denen man insgesamt kleinere Überschriften erhält. Die aus den +Optionen resultierenden Schriftgrößen sind für die Überschriften der Klassen +\Class{scrbook} und \Class{scrreprt} +\autoref{tab:maincls.structureElementsFont}, +\autopageref{tab:maincls.structureElementsFont} zu entnehmen. Konkret setzen +alle drei Einstellungen die Schrift für die Elemente +\DescRef{\LabelBase.fontelement.chapter}\IndexFontElement{chapter}, +\DescRef{\LabelBase.fontelement.section}\IndexFontElement{section}, +\DescRef{\LabelBase.fontelement.subsection}\IndexFontElement{subsection}, +\DescRef{\LabelBase.fontelement.subsubsection}\IndexFontElement{subsubsection}, +\DescRef{\LabelBase.fontelement.paragraph}\IndexFontElement{paragraph} und +\DescRef{\LabelBase.fontelement.subparagraph}\IndexFontElement{subparagraph} +auf entsprechende Voreinstellungen zurück. Bei \Class{scrartcl} werden +generell etwas kleinere Überschriften verwendet. \OnlyAt{\Class{scrbook}\and + \Class{scrreprt}}Die Abstände vor und nach Kapitelüberschriften werden von +diesen Optionen ebenfalls neu definiert. + +\iffalse% +Auf Kapitelüberschriften wirkt sich außerdem die Option \Option{headings} mit +den Einstellungen \PValue{twolinechapter} oder \PValue{onelinechapter} aus, +die den oben erklärten Optionen +\OptionValueRef{\LabelBase}{chapterprefix}{true} und +\OptionValueRef{\LabelBase}{chapterprefix}{false} entsprechen. Im Anhang gibt +es zusätzlich Auswirkungen durch die Einstellungen \PValue{onelineappendix} +und \PValue{twolineappendix} für Option \Option{headings}, was dann +\OptionValueRef{\LabelBase}{appendixprefix}{false} und +\OptionValueRef{\LabelBase}{appendixprefix}{true} entspricht (siehe ebenfalls +oben). % +\else% +Auf Kapitelüberschriften\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} wirken +sich\important{% + \OptionValue{headings}{twolinechapter}\\ + \OptionValue{headings}{onelinechapter}\\ + \OptionValue{headings}{twolineappendix}\\ + \OptionValue{headings}{onelineappendix}% +} außerdem die beiden Optionen \OptionValue{headings}{twolinechapter} und +\OptionValue{headings}{onelinechapter}, die den oben erklärten +\OptionValueRef{\LabelBase}{chapterprefix}{true} und +\OptionValueRef{\LabelBase}{chapterprefix}{false} entsprechen, aus. Für den +Anhang stehen als Alternativen zu +\OptionValueRef{\LabelBase}{appendixprefix}{true} und +\OptionValueRef{\LabelBase}{appendixprefix}{false} die Optionen +\OptionValue{headings}{twolineappendix} und +\OptionValue{headings}{onelineappendix} zur Verfügung. \iffalse Für den +Anhang stehen \OptionValue{headings}{twolineappendix} und +\OptionValue{headings}{onelineappendix} zur Verfügung, die den Optionen +\OptionValueRef{\LabelBase}{appendixprefix}{true} und +\OptionValueRef{\LabelBase}{appendixprefix}{false} entsprechen (siehe +ebenfalls oben). \fi Diese existieren natürlich nicht bei \Class{scrartcl}% +\iffree{}{% Umbruchkorrekturtext + , da diese Klasse nicht über Kapitel verfügt}% +.% +\fi + +Option\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} \OptionValue{headings}{standardclasses}% +\important{\OptionValue{headings}{standardclasses}} passt zum einen die +Schriftgrößen der Überschriften an die der Standardklassen an. Des Weiteren +wird die Schrift für Element +\DescRef{\LabelBase.fontelement.disposition}\IndexFontElement{disposition} auf +\Macro{bfseries} gesetzt. Es wird also für Überschriften nicht mehr auf einen +serifenlosen Font umgeschaltet. Bei Verwendung von +\Class{scrbook}\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} oder +\Class{scrreprt} wird außerdem \OptionValue{headings}{twolinechapter} gesetzt +und die Abstände bei den Kapitelüberschriften werden denen der Standardklassen +angepasst. + +Für\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} Kapitel kann mit +\OptionValue{headings}{openany}\important{% + \OptionValue{headings}{openany}\\ + \OptionValue{headings}{openright}\\ + \OptionValue{headings}{openleft}}, \OptionValue{headings}{openright} und +\OptionValue{headings}{openleft} die Methode für Kapitelanfänge alternativ zur +Verwendung der Option \DescRef{\LabelBase.option.open} mit den Werten +\PValue{any}, \PValue{right} und \PValue{left} (siehe oben) gesetzt werden. + +Eine\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} weitere Besonderheit von \KOMAScript{} betrifft die +Behandlung des optionalen +Arguments der Gliederungsbefehle. Sowohl dessen +Funktion% +\important{\OptionValue{headings}{optiontohead}\\ + \OptionValue{headings}{optiontotoc}\\ + \OptionValue{headings}{optiontoheadandtoc}} als +auch dessen Bedeutung kann durch die Einstellungen +\OptionValue{headings}{optiontohead}% +\IndexOption{headings~=\textKValue{optiontohead}}, +\OptionValue{headings}{optiontotoc}\IndexOption{headings~=\textKValue{optiontotoc}} +und \OptionValue{headings}{optiontoheadandtoc}% +\IndexOption{headings~=\textKValue{optiontoheadandtoc}} +beeinflusst werden. + +Eine Zusammenfassung der möglichen Einstellungen für Option \Option{headings} +finden Sie in \autoref{tab:maincls.headings}. Beispiele zur Verwendung einiger +der möglichen Einstellungen sind in den nachfolgenden Beschreibungen +der Gliederungsbefehle enthalten. +\begin{desclist} + \desccaption[{Mögliche Werte für Option \Option{headings}}]{% + Mögliche Werte für Option \Option{headings} zur Einstellung der + Überschriften% + \label{tab:maincls.headings}% + }{% + Mögliche Werte für Option \Option{headings} (\emph{Fortsetzung})% + }% + \pventry{big}{% + setzt die Schrifteinstellung für die einzelnen Standard-Gliederungsebenen + zurück und verwendet große Überschriften mit großen Abständen darüber und + darunter.% + \IndexOption{headings~=\textKValue{big}}}% + \pventry{normal}{% + setzt die Schrifteinstellung für die einzelnen Standard-Gliederungsebenen + zurück und verwendet mittelgroße Überschriften mit mittelgroßen Abständen + darüber und darunter.% + \IndexOption{headings~=\textKValue{normal}}}% + \entry{\PValue{onelineappendix}, \PValue{noappendixprefix}, + \PValue{appendixwithoutprefix}, \PValue{appendixwithoutprefixline}% + \IndexOption{headings~=\textKValue{onelineappendix}}}{% + Kapitelüberschriften im Anhang werden ohne Präfixzeile gesetzt.}% + \entry{\PValue{onelinechapter}, \PValue{nochapterprefix}, + \PValue{chapterwithoutprefix}, \PValue{chapterwithoutprefixline}% + \IndexOption{headings~=\textKValue{onelinechapter}}}{% + Kapitelüberschriften werden ohne Präfixzeile gesetzt.}% + \pventry{openany}{% + Die Anweisungen \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, + \DescRef{\LabelBase.cmd.cleardoublestandardpage}, + \DescRef{\LabelBase.cmd.cleardoubleplainpage}, + \DescRef{\LabelBase.cmd.cleardoubleemptypage} und + \DescRef{\LabelBase.cmd.cleardoublepage} erzeugen einen Seitenumbruch und + fügen gegebenenfalls eine Vakatseite\Index{Vakatseite} ein, um im + doppelseitigen Satz wie bei \OptionValue{headings}{openright} auf die + nächste rechte Seite zu gelangen. Teile, Kapitel, Index und Nachspann + verwenden \DescRef{\LabelBase.cmd.clearpage}, aber nicht + \DescRef{\LabelBase.cmd.cleardoublepage}.% + \IndexOption{headings~=\textKValue{openany}}}% + \pventry{openleft}{% + Die Anweisungen \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, + \DescRef{\LabelBase.cmd.cleardoublestandardpage}, + \DescRef{\LabelBase.cmd.cleardoubleplainpage}, + \DescRef{\LabelBase.cmd.cleardoubleemptypage} und + \DescRef{\LabelBase.cmd.cleardoublepage} erzeugen einen Seitenumbruch und + fügen gegebenenfalls eine Vakatseite\Index{Vakatseite} ein, um im + doppelseitigen Satz auf die nächste linke Seite zu gelangen. Teile, + Kapitel, Index und Nachspann verwenden + \DescRef{\LabelBase.cmd.cleardoublepage}.% + \IndexOption{headings~=\textKValue{openleft}}}% + \pventry{openright}{% + Die Anweisungen \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, + \DescRef{\LabelBase.cmd.cleardoublestandardpage}, + \DescRef{\LabelBase.cmd.cleardoubleplainpage}, + \DescRef{\LabelBase.cmd.cleardoubleemptypage} und + \DescRef{\LabelBase.cmd.cleardoublepage} erzeugen einen Seitenumbruch und + fügen gegebenenfalls eine Vakatseite\Index{Vakatseite} ein, um im + doppelseitigen Satz auf die nächste rechte Seite zu gelangen. Teile, + Kapitel, Index und Nachspann verwenden + \DescRef{\LabelBase.cmd.cleardoublepage}.% + \IndexOption{headings~=\textKValue{openright}}}% + \pventry{optiontohead}{% + Die\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} erweiterte Funktion des optionalen Arguments der + Gliederungsbefehle wird aktiviert. In der Voreinstellung wird das + optionale Argument ausschließlich für den Kolumnentitel verwendet.% + \IndexOption{headings~=\textKValue{optiontohead}}% + }% + \entry{\PValue{optiontoheadandtoc}, \PValue{optiontotocandhead}% + \IndexOption{headings~=\textKValue{optiontoheadandtoc}}}{% + Die\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} erweiterte Funktion des optionalen Arguments der + Gliederungsbefehle wird aktiviert. In der Voreinstellung wird das + optionale Argument sowohl für den Kolumnentitel als auch den Eintrag ins + Inhaltsverzeichnis verwendet.% + }% + \pventry{optiontotoc}{% + Die\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} erweiterte Funktion des optionalen Arguments der + Gliederungsbefehle wird aktiviert. In der Voreinstellung wird das + optionale Argument ausschließlich für den Eintrag ins Inhaltsverzeichnis + verwendet.% + \IndexOption{headings~=\textKValue{optiontohead}}% + }% + \pventry{small}{% + setzt die Schrifteinstellung für die einzelnen Standard-Gliederungsebenen + zurück und verwendet kleine Überschriften mit kleinen Abständen darüber + und darunter.% + \IndexOption{headings~=\textKValue{small}}}% + \pventry{standardclasses}{% + \ChangedAt{v3.12}{\Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}}% + setzt die Schrifteinstellung für die einzelnen Standard-Gliederungsebenen + zurück und verwendet Überschriften in den Größen der Standardklassen. Für + Kapitelüberschriften wird bei \Class{scrbook} und \Class{scrreprt} + \OptionValue{headings}{twolinechapter} gesetzt.% + }% + \entry{\PValue{twolineappendix}, \PValue{appendixprefix}, + \PValue{appendixwithprefix}, \PValue{appendixwithprefixline}% + \IndexOption{headings~=\textKValue{twolineappendix}}}{% + Kapitelüberschriften im Anhang werden mit einer Präfixzeile gesetzt, deren + Inhalt von \DescRef{\LabelBase.cmd.chapterformat}\IndexCmd{chapterformat} + bestimmt wird.}% + \entry{\PValue{twolinechapter}, \PValue{chapterprefix}, + \PValue{chapterwithprefix}, \PValue{chapterwithprefixline}% + \IndexOption{headings~=\textKValue{twolinechapter}}}{% + Kapitelüberschriften werden mit einer Präfixzeile gesetzt, deren Inhalt + von \DescRef{\LabelBase.cmd.chapterformat}\IndexCmd{chapterformat} + bestimmt wird.}% +\end{desclist} +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{numbers}{Einstellung} +\end{Declaration}% +Nach {\small DUDEN} steht in Gliederungen\Index{Gliederung}, in denen +ausschließlich arabische Ziffern für die Nummerierung\Index{Nummerierung} +verwendet werden, am Ende der Gliederungsnummern kein abschließender Punkt +(siehe \cite[R\,3]{DUDEN}). Wird hingegen innerhalb der Gliederung auch mit +römischen Zahlen oder Groß- oder Kleinbuchstaben gearbeitet, so steht am Ende +aller Gliederungsnummern ein abschließender Punkt (siehe +\cite[R\,4]{DUDEN}). In {\KOMAScript} ist ein Automatismus eingebaut, der +diese etwas komplexe Regel zu erfüllen versucht. Der Automatismus wirkt sich +so aus, dass normalerweise bei Verwendung des Gliederungsbefehls +\DescRef{\LabelBase.cmd.part} oder eines Anhangs +(\DescRef{\LabelBase.cmd.appendix}) auf Gliederungsnummer mit abschließendem +Punkt umgeschaltet wird. Diese Information wird in der \File{aux}-Datei +gespeichert und wirkt sich dann beim nächsten \LaTeX-Lauf auf das gesamte +Dokument aus. + +Manchmal versagt der mit \OptionValue{numbers}{autoendperiod}% +\IndexOption{numbers~=\textKValue{autoendperiod}} voreingestellte Automatismus +zum Setzen oder Weglassen des abschließenden Punktes in der +Gliederungsnummer. Teilweise sehen andere Sprachen auch andere Regeln +vor. Deshalb ist es beispielsweise mit der Einstellung +\OptionValue{numbers}{endperiod}\IndexOption{numbers~=\textKValue{endperiod}}% +\important{\OptionValue{numbers}{endperiod}\\ + \OptionValue{numbers}{noendperiod}} möglich, den Punkt manuell +vorzuschreiben oder mit \OptionValue{numbers}{noendperiod} zu verbieten. + +Es ist zu beachten\textnote{Achtung!}, dass der Automatismus immer erst für +den nächsten \LaTeX-Lauf die Verwendung des abschließenden Punktes ein- oder +ausschaltet. Bevor also versucht wird, die korrekte Darstellung über +Verwendung einer der Optionen zu erzwingen, sollte grundsätzlich ein weiterer +\LaTeX-Lauf ohne Dokumentänderung durchgeführt werden. + +Eine Zusammenfassung der möglichen Werte für die \PName{Einstellung} von +\PName{numbers} bietet \autoref{tab:maincls.numbers}. Im Unterschied zu den +meisten anderen Einstellungen kann diese Option nur in der Dokumentpräambel, +also vor \Macro{begin}\PParameter{document} vorgenommen werden.% +\iftrue% Umbruchkorrektur +\ Spätere Änderungen der Option führen zu einer Fehlermeldung.% +\fi% +\begin{table} + \caption[{Mögliche Werte für Option \Option{numbers}}]{Mögliche Werte für + Option \Option{numbers} zur Konfigurierung des Abschlusspunktes in + Gliederungsnummern} + \label{tab:maincls.numbers} + \begin{desctabular} + \entry{\PValue{autoendperiod}, \PValue{autoenddot}, \PValue{auto}}{% + \KOMAScript{} trifft die Entscheidung, ob am Ende von Gliederungsnummern + und allen von Gliederungsnummern abhängigen Nummern ein Punkt gesetzt + wird, selbst. Kommen in sämtlichen Gliederungsnummern nur arabische + Ziffern vor, so wird kein Punkt gesetzt. Wird in einer Gliederungsnummer + ein Buchstabe oder eine römische Zahl entdeckt, so wird der Punkt bei + allen Nummern gesetzt. Referenzen auf diese Nummern werden jedoch ohne + abschließenden Punkt gesetzt.% + \IndexOption{numbers~=\textKValue{autoendperiod}}}\\[-1.4ex] + \entry{\PValue{endperiod}, \PValue{withendperiod}, \PValue{periodatend}, + \PValue{enddot}, \PValue{withenddot}, \PValue{dotatend}}{% + Bei sämtlichen Gliederungsnummern und davon abhängigen Nummern wird am + Ende ein Punkt gesetzt, der bei der Referenzierung entfällt.% + \IndexOption{numbers~=\textKValue{endperiod}}}\\[-1.4ex] + \entry{\PValue{noendperiod}, \PValue{noperiodatend}, + \PValue{noenddot}, \PValue{nodotatend}}{% + Gliederungsnummern und davon abhängige Nummern werden ohne + abschließenden Punkt gesetzt.% + \IndexOption{numbers~=\textKValue{noendperiod}}}% + \end{desctabular} +\end{table} +% +\EndIndexGroup + + +\begin{Declaration} + \Option{chapteratlists} + \OptionVName{chapteratlists}{Wert} +\end{Declaration}% +Wie\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} auch bei der Option +\DescRef{\LabelBase.option.listof} in \autoref{sec:\LabelBase.floats}, +\DescPageRef{\LabelBase.option.listof} erwähnt wird, fügt +normalerweise\ChangedAt{v2.96a}{\Class{scrbook}\and \Class{scrreprt}} jeder +mit \DescRef{\LabelBase.cmd.chapter} erzeugte Kapiteleintrag einen vertikalen +Abstand in die Verzeichnisse der Gleitumgebungen ein. Seit +Version~2.96a\important{\OptionValueRef{\LabelBase}{version}{2.96a}} gilt dies +auch für die Anweisung \DescRef{\LabelBase.cmd.addchap}, wenn nicht eine +Kompatibilitätseinstellung zu einer früheren Version gewählt wurde (siehe +Option \DescRef{\LabelBase.option.version} in +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}). + +Außerdem kann mit der Option \Option{chapteratlists} der Abstand verändert +werden. Dazu gibt man als \PName{Wert} den gewünschten Abstand an. Bei der +Voreinstellung \OptionValueRef{\LabelBase}{listof}{chaptergapsmall}% +\IndexOption{listof~=\textKValue{chaptergapsmall}} (siehe +\DescPageRef{\LabelBase.option.listof.chaptergapsmall}) sind dies +10\Unit{pt}. + +Mit der Einstellung \OptionValue{chapteratlists}{entry}% +\IndexOption{chapteratlists~=\textKValue{entry}}% +\important{\OptionValue{chapteratlists}{entry}} oder bei Verwendung der Form +\Option{chapteratlists} ohne Angabe eines Wertes wird statt des Abstandes der +Kapiteleintrag selbst in die Verzeichnisse eingetragen. Es wird darauf +hingewiesen, dass ein solcher Eintrag auch dann erfolgt, wenn das Kapitel +keine Gleitumgebung enthält. Eine Lösung, bei der nur Kapitel mit +Gleitumgebungen im jeweiligen Verzeichnis angezeigt werden, finden Sie unter +\cite{https://komascript.de/comment/5070}. + +Es ist zu beachten\textnote{Achtung!}, dass sich eine Änderung der +Einstellung je nach Art der Änderung erst nach zwei weiteren \LaTeX-Läufen im +Verzeichnis auswirkt.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{part}\OParameter{Kurzform}\Parameter{Überschrift} + \Macro{chapter}\OParameter{Kurzform}\Parameter{Überschrift} + \Macro{section}\OParameter{Kurzform}\Parameter{Überschrift} + \Macro{subsection}\OParameter{Kurzform}\Parameter{Überschrift} + \Macro{subsubsection}\OParameter{Kurzform}\Parameter{Überschrift} + \Macro{paragraph}\OParameter{Kurzform}\Parameter{Überschrift} + \Macro{subparagraph}\OParameter{Kurzform}\Parameter{Überschrift} +\end{Declaration}% +\Index[indexmain]{Teil}% +\Index[indexmain]{Kapitel}% +\Index[indexmain]{Abschnitt}% +Die Standardgliederungsbefehle funktionieren bei {\KOMAScript} im Grundsatz +wie bei den Standardklassen. So kann in der Voreinstellung ganz normal über +ein optionales Argument ein abweichender Text für den Kolumnentitel und das +Inhaltsverzeichnis vorgegeben werden. + +Mit\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\textnote{\KOMAScript{} vs. Standardklassen} der +Einstellung\important{\DescRef{\LabelBase.option.headings}} +\OptionValueRef{\LabelBase}{headings}{optiontohead}% +\IndexOption[indexmain]{headings~=\textKValue{optiontohead}} wird das +optionale Argument bei \KOMAScript{} hingegen nur noch für den Kolumnentitel +verwendet. Ein konkreter Eintrag in den Kolumnentitel erfolgt natürlich nur, +wenn ein Seitenstil\Index{Seiten>Stil} gewählt wird, bei dem die entsprechende +Gliederungsebene überhaupt für den Kolumnentitel verwendet wird. Siehe hierzu +\autoref{sec:\LabelBase.pagestyle} sowie \autoref{cha:scrlayer-scrpage}. Mit +der Einstellung \OptionValueRef{\LabelBase}{headings}{optiontotoc}% +\IndexOption[indexmain]{headings~=\textKValue{optiontotoc}} wird das optionale +Argument hingegen ausschließlich für den Eintrag ins Inhaltsverzeichnis +verwendet. Auch dies selbstverständlich nur, wenn die Einstellung für den +Zähler \DescRef{\LabelBase.counter.tocdepth} (siehe +\autoref{sec:\LabelBase.toc}, \DescPageRef{\LabelBase.counter.tocdepth}) einen +Eintrag der entsprechenden Ebene überhaupt vorsieht. Mit der Einstellung +\OptionValueRef{\LabelBase}{headings}{optiontoheadandtoc}% +\IndexOption[indexmain]{headings~=\textKValue{optiontoheadandtoc}} findet +schließlich das optionale Argument wieder sowohl für den Kolumnentitel als +auch den Eintrag ins Inhaltsverzeichnis Verwendung. Allen drei Einstellungen +ist gemeinsam, dass sie im Gegensatz zur Voreinstellung die erweiterte +Interpretation des optionalen Arguments aktivieren. + +Bei\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} der erweiterten Interpretation des optionalen Arguments +wird geprüft, ob sich ein Gleichheitszeichen in \PName{Kurzform} befindet. Ist +dies der Fall, so wird das optionale Argument der Gliederungsbefehle selbst +statt als \PName{Kurzform} als \PName{Optionenliste} interpretiert. Dabei +werden die vier Optionen +\OptionVName{head}{Kolumnentitel}\important{\Option{head}, \Option{tocentry}}, +\OptionVName{tocentry}{Inhaltsverzeichniseintrag}, +\important{\Option{reference}, \Option{nonumber}}% +\OptionVName{reference}{Querverweistitel}\ChangedAt{v3.22}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} und +\OptionVName{nonumber}{Ein-Aus-Wert}\ChangedAt{v3.27}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} akzeptiert. Um ein Gleichheitszeichen +oder ein Komma in einem der Werte der ersten drei Optionen unterzubringen, +muss dieses in zusätzliche geschweifte Klammern gesetzt werden. + +Bitte\textnote{Achtung!} beachten Sie, dass dieser Mechanismus nur +funktioniert, solange \KOMAScript{} die Kontrolle über die Gliederungsbefehle +besitzt. Wird hingegen ein Paket verwendet, dass die Gliederungsbefehle oder +die internen \LaTeX-Kern-Anweisungen für Gliederungsbefehle umdefiniert, so +kann \KOMAScript{} diese erweiterte Funktionalität nicht mehr zur Verfügung +stellen. Dies gilt auch für die immer aktive Erweiterung, dass +leere\textnote{leere Inhalts\-verzeichnis\-einträge} +Inhaltsverzeichniseinträge nicht zu einem Eintrag ohne Text führen, sondern +gänzlich unterbleiben. Soll tatsächlich einmal ein leerer Eintrag ins +Inhaltsverzeichnis erfolgen, so kann dies mit einem unsichtbaren Eintrag +wie \lstinline|\mbox{}| erreicht werden. + +\begin{Example} + Angenommen, Sie haben ein Dokument mit teilweise sehr langen + Kapitelüberschriften. Diese langen Kapitelüberschriften sollen auch im + Inhaltsverzeichnis ausgegeben werden. Die Kolumnentitel wollen Sie jedoch + auf einzeilige Kurztexte beschränken. Dazu stellen Sie mit +\begin{lstcode} + \documentclass[headings=optiontohead]{scrbook} +\end{lstcode} + bereits beim Laden der Klasse ein, dass das optionale Argument der + Gliederungsbefehle nur für die Kolumnentitel verwendet werden soll. Im + Dokument nehmen Sie dann einen entsprechenden Eintrag über das optionale + Argument von \Macro{chapter} vor. +\begin{lstcode} + \chapter[Kurzformen für Kapitel] + {Der Gliederungsbefehl für + Kapitelüberschriften erlaubt neben dem + Text für die eigentliche + Kapitelüberschrift auch eine Kurzform + mit steuerbarer Verwendung} +\end{lstcode} + + Etwas später wird Ihnen bewusst, dass diese lange Überschrift sehr ungünstig + umbrochen wird. Sie wollen deshalb die Umbrüche für diese Überschrift selbst + bestimmen. Im Inhaltsverzeichnis soll allerdings weiterhin automatisch + umbrochen werden. Mit +\begin{lstcode} + \chapter[head={Kurzformen für Kapitel}, + tocentry={Der Gliederungsbefehl für + Kapitelüberschriften erlaubt neben + dem Text für die eigentliche + Kapitelüberschrift auch eine Kurzform + mit steuerbarer Verwendung}] + {Der Gliederungsbefehl für + Kapitelüberschriften\\ + erlaubt neben dem\\ + Text für die eigentliche + Kapitelüberschrift\\ + auch eine Kurzform\\ + mit steuerbarer Verwendung} +\end{lstcode} + setzen Sie daher die Einträge für den Kolumnentitel und das + Inhaltsverzeichnis unabhängig voneinander und von der Überschrift selbst. + Die Argumente der beiden Optionen \Option{head} und \Option{tocentry} wurden + dabei in geschweifte Klammern gesetzt, damit der Inhalt der Argumente + beliebig sein kann. + + Die Notwendigkeit der geschweiften Klammern im vorherigen Beispiel lässt + sich am besten an einem weiteren Beispiel verdeutlichen. Angenommen, Sie + haben als Option \OptionValueRef{\LabelBase}{headings}{optiontotoc} gewählt + und setzen nun die Überschrift: +\begin{lstcode} + \section[head=\emph{Wert}] + {Die Option head=\emph{Wert}} +\end{lstcode} + Dies führt dazu, dass im Inhaltsverzeichnis der Eintrag »Die Option + head=\emph{Wert}« und im Kolumnentitel der Eintrag »\emph{Wert}« verwendet + wird. In Wirklichkeit wollten Sie aber, dass im Inhaltsverzeichnis der + Eintrag »head=\emph{Wert}« lautet und im Kolumnentitel der Text der + Überschrift übernommen wird. Dies ist dadurch zu erreichen, dass das + Gleichheitszeichen in geschweifte Klammern gesetzt wird: +\begin{lstcode} + \section[head{=}\emph{Wert}] + {Die Option head=\emph{Wert}} +\end{lstcode} + + Ein ähnlicher Fall betrifft das Komma. Bei gleicher Voreinstellung der + Optionen würde +\begin{lstcode} + \section[head=0, 1, 2, 3, \dots] + {Die natürlichen Zahlen mit der Null} +\end{lstcode} + zu einer Fehlermeldung führen, weil die Kommata als Trennzeichen zwischen + den einzelnen Optionen der Optionenliste »\lstinline|head=0, 1, 2, 3, \dots|« + interpretiert würden. Schreibt man hingegen +\begin{lstcode} + \section[head={0, 1, 2, 3, \dots}] + {Die natürlichen Zahlen mit der Null} +\end{lstcode} + so ist »\lstinline|0, 1, 2, 3, \dots|« das Argument der Option + \Option{head}. +\end{Example} + +So\ChangedAt{v3.22}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} +wie im Beispiel Option \Option{head} den Titel für den lebenden Kolumnentitel +und Option \Option{tocentry} den Titel für den Verzeichniseintrag bestimmt, +kann mit \Option{reference}\important{\Option{reference}} der Titel für einen +Querverweise durch die Pakete +\Package{nameref}\IndexPackage{nameref}\important{\Package{nameref}\\ + \Package{titleref}\\ + \Package{zref-titleref}}, \Package{titleref}\IndexPackage{titleref} oder das +\Package{titleref}\IndexPackage{zref-titleref}-Modul von +\Package{zref}\IndexPackage{zref} explizit vorgegeben werden. Die +Unterstützung für \Package{titleref} ist dabei eher rudimentär, da das Paket +mit % +\iffalse % Umbruchoptimierung +der Leistungsfähigkeit der % +\else den % +\fi % +anderen beiden nur schlecht mithalten kann und +auch nicht mit +\Package{hyperref}\IndexPackage{hyperref}\important{\Package{hyperref}} +kompatibel ist. + +Darüber hinaus kann mit Hilfe der Option +\OptionValue{nonumber}{true}\important{\Option{nonumber}}% +\ChangedAt{v3.27}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} im erweiterten optionalen Argument +die Nummerierung der Überschrift deaktiviert werden. Im Gegensatz zu den +nachfolgend erklärten +\hyperref[desc:maincls.cmd.part*]{Sternvarianten der Gliederungsbefehle} wird +jedoch trotzdem ein Inhaltsverzeichniseintrag und gegebenenfalls ein +Kolumnentitel erzeugt. Für \Macro{part}, \Macro{chapter} und \Macro{section} +entspricht dies weitgehend den auf \DescPageRef{\LabelBase.cmd.addpart} +erklärten Anweisungen \DescRef{\LabelBase.cmd.addpart}, +\DescRef{\LabelBase.cmd.addchap} und \DescRef{\LabelBase.cmd.addsec}. + +Die\important{\Macro{part}} Überschrift der Teile-Ebene (\Macro{part}) +unterscheidet sich von den anderen Gliederungsebenen dadurch, dass sie +unabhängig von den übrigen Ebenen nummeriert wird. Das bedeutet, dass die +Kapitel-Ebene (bei \Class{scrbook} oder \Class{scrreprt}) bzw. die +Abschnitt-Ebene (bei \Class{scrartcl}) über alle Teile hinweg durchgehend +nummeriert wird. Darüber hinaus steht bei den Klassen \Class{scrbook} und +\Class{scrreprt}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} die Überschrift +dieser Ebene zusammen mit ihrer Präambel (siehe Anweisung +\DescRef{\LabelBase.cmd.setpartpreamble}, +\DescPageRef{\LabelBase.cmd.setpartpreamble}) alleine auf einer Seite. + +\Macro{chapter}\important{\Macro{chapter}}\OnlyAt{\Class{scrbook}\and + \Class{scrreprt}} existiert nur bei Buch- und Berichtklassen, also bei +\Class{book}, \Class{scrbook}, \Class{report} und \Class{scrreprt}, nicht +jedoch bei den Artikelklassen \Class{article} und +\Class{scrartcl}. \Macro{chapter}\textnote{\KOMAScript{} + vs. Standardklassen} unterscheidet sich bei {\KOMAScript} außerdem +gravierend von der Version der Standardklassen. Bei den Standardklassen wird +die Kapitelnummer mit dem Präfix »Kapitel« beziehungsweise dem Kapitelnamen in +der gewählten Sprache in einer Zeile vor dem eigentlichen Text der Überschrift +ausgegeben. Diese\important{\DescRef{\LabelBase.option.chapterprefix}\\ + \DescRef{\LabelBase.option.appendixprefix}} sehr mächtige Form +wird bei {\KOMAScript} durch eine einfache Nummer vor dem Text abgelöst, lässt +sich aber durch die Optionen \DescRef{\LabelBase.option.chapterprefix} und +\DescRef{\LabelBase.option.appendixprefix} einstellen (siehe +\DescPageRef{\LabelBase.option.chapterprefix}). + +Bitte beachten\textnote{Achtung!} Sie, dass \Macro{part} und \Macro{chapter} +bei \Class{scrbook} und \Class{scrreprt}\OnlyAt{\Class{scrbook}\and + \Class{scrreprt}} den Seitenstil für eine Seite umschalten. Der jeweilige +Seitenstil ist bei \KOMAScript{} in den Makros +\DescRef{\LabelBase.cmd.partpagestyle} und +\DescRef{\LabelBase.cmd.chapterpagestyle} abgelegt (siehe +\autoref{sec:\LabelBase.pagestyle}, \DescPageRef{\LabelBase.cmd.partpagestyle}). + +\BeginIndexGroup +\BeginIndex[indexother]{}{Schrift>Art}% +\BeginIndex[indexother]{}{Schrift>Groesse=Größe}% +\BeginIndex{FontElement}{disposition}\LabelFontElement{disposition}% +\BeginIndex{FontElement}{part}\LabelFontElement{part}% +\BeginIndex{FontElement}{parnumber}\LabelFontElement{partnumber}% +\BeginIndex{FontElement}{chapter}\LabelFontElement{chapter}% +\BeginIndex{FontElement}{chapterprefix}\LabelFontElement{chapterprefix}% +\BeginIndex{FontElement}{section}\LabelFontElement{section}% +\BeginIndex{FontElement}{subsection}\LabelFontElement{subsection}% +\BeginIndex{FontElement}{subsubsection}\LabelFontElement{subsubsection}% +\BeginIndex{FontElement}{paragraph}\LabelFontElement{paragraph}% +\BeginIndex{FontElement}{subparagraph}\LabelFontElement{subparagraph}% +Die\ChangedAt{v2.8p}{% + \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} Schriftart aller +sieben Gliederungsebenen kann mit den Anweisungen +\DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) +bestimmt werden. Dabei wird zunächst generell das Element +\FontElement{disposition}\important{\FontElement{disposition}} und +anschließend zusätzlich je Gliederungsebene ein spezifisches +Element\important{% + \FontElement{part}\\ + \FontElement{partnumber}\\ + \FontElement{chapter}\\ + \FontElement{chapterprefix}\\ + \FontElement{section}\\ + \FontElement{subsection}\\ + \FontElement{paragraph}\\ + \FontElement{subparagraph}} verwendet (siehe +\autoref{tab:maincls.fontelements}, +\autopageref{tab:maincls.fontelements}). Für den Nummernteil der +Teile-Überschrift wird zusätzlich das Element \FontElement{partnumber} +verwendet, für die optionale Präfixzeile der Kapitelüberschriften das Element +\FontElement{chapterprefix}. Die Schriftart für das Element +\FontElement{disposition} ist als +\Macro{normalcolor}""\Macro{sffamily}""\Macro{bfseries} vordefiniert. Die +Voreinstellungen für die spezifischen Elemente sind mit einer Schriftgröße +vorbelegt und daher von den Einstellungen \PValue{big}, \PValue{normal} und +\PValue{small} für die Option +\DescRef{\LabelBase.option.headings}\IndexOption{headings} abhängig (siehe +\DescPageRef{\LabelBase.option.headings}). Sie finden die Voreinstellungen in +\autoref{tab:maincls.structureElementsFont}. +% Umbruchkorrektur: Tabelle verschoben +\begin{table} +% \centering% +% \caption + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside}[{Schriftvoreinstellungen für die Elemente der Gliederung + bei\newline \Class{scrbook} und \Class{scrreprt}}]{% + \label{tab:maincls.structureElementsFont}% + \hspace{0pt plus .5em}Voreinstellungen der Schrift + für die Elemente der Gliederung bei \Class{scrbook} und \Class{scrreprt}} + [l] + \begin{tabular}[t]{lll} + \toprule + Klassenoption & Element & Voreinstellung \\ + \midrule + \OptionValueRef{\LabelBase}{headings}{big} + & \FontElement{part}\IndexFontElement{part} + & \Macro{Huge} \\ + & \FontElement{partnumber}\IndexFontElement{partnumber} + & \Macro{huge} \\ + & \FontElement{chapter}\IndexFontElement{chapter} + & \Macro{huge} \\ + & \FontElement{chapterprefix}\IndexFontElement{chapterprefix} + & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{chapter} \\ + & \FontElement{section}\IndexFontElement{section} + & \Macro{Large} \\ + & \FontElement{subsection}\IndexFontElement{subsection} + & \Macro{large} \\ + & \FontElement{subsubsection}\IndexFontElement{subsubsection} + & \Macro{normalsize} \\ + & \FontElement{paragraph}\IndexFontElement{paragraph=} + & \Macro{normalsize} \\ + & \FontElement{subparagraph}\IndexFontElement{subparagraph} + & \Macro{normalsize} \\[1ex] + \OptionValueRef{\LabelBase}{headings}{normal} + & \FontElement{part} & \Macro{huge} \\ + & \FontElement{partnumber} & \Macro{huge} \\ + & \FontElement{chapter} & \Macro{LARGE} \\ + & \FontElement{chapterprefix}\IndexFontElement{chapterprefix} + & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{chapter} \\ + & \FontElement{section} & \Macro{Large} \\ + & \FontElement{subsection} & \Macro{large} \\ + & \FontElement{subsubsection} & \Macro{normalsize} \\ + & \FontElement{paragraph} & \Macro{normalsize} \\ + & \FontElement{subparagraph} & \Macro{normalsize} \\[1ex] + \OptionValueRef{\LabelBase}{headings}{small} + & \FontElement{part} & \Macro{LARGE} \\ + & \FontElement{partnumber} & \Macro{LARGE} \\ + & \FontElement{chapter} & \Macro{Large} \\ + & \FontElement{chapterprefix}\IndexFontElement{chapterprefix} + & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{chapter} \\ + & \FontElement{section} & \Macro{large} \\ + & \FontElement{subsection} & \Macro{normalsize} \\ + & \FontElement{subsubsection} & \Macro{normalsize} \\ + & \FontElement{paragraph} & \Macro{normalsize} \\ + & \FontElement{subparagraph} & \Macro{normalsize} \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} +% +\begin{Example} + Angenommen, Sie stellen bei Verwendung der Klassenoption + \OptionValueRef{\LabelBase}{headings}{big} fest, dass die sehr großen + Überschriften von Teildokumenten (\Macro{part} oder + \DescRef{\LabelBase.cmd.addpart}) zu fett wirken. Nun könnten Sie natürlich + wie folgt % + \iftrue % Umbruchoptimierung!!!! + verfahren:% + \else % + für Abhilfe sorgen:% + \fi +\begin{lstcode} + \setkomafont{disposition}{\normalcolor\sffamily} + \part{\appendixname} + \addtokomafont{disposition}{\bfseries} +\end{lstcode} + Auf diese Weise würden Sie nur für die eine Überschrift »Anhang« + das Schriftattribut \textbf{Fett} abschalten. Sehr viel komfortabler + und eleganter ist es aber, stattdessen generell für + \Macro{part}-Überschriften eine entsprechende Änderung vorzunehmen. + Das ist wahlweise mit: +\begin{lstcode} + \addtokomafont{part}{\normalfont\sffamily} + \addtokomafont{partnumber}{\normalfont\sffamily} +\end{lstcode} + oder einfach mit: +\begin{lstcode} + \addtokomafont{part}{\mdseries} + \addtokomafont{partnumber}{\mdseries} +\end{lstcode} + möglich. Die Verwendung von \DescRef{\LabelBase.cmd.setkomafont} wäre zwar grundsätzlich + möglich, müsste aber auch die Auswahl der Schriftgröße enthalten und würde + damit die Größenänderung über die Option \DescRef{\LabelBase.option.headings} verhindern. + + Die zweite Version mit \Macro{mdseries} ist vorzuziehen, da diese auch dann + noch zum gewünschten Ergebnis führt, wenn Sie später das Element + \FontElement{disposition}\IndexFontElement{disposition} wie folgt ändern: +\begin{lstcode} + \setkomafont{disposition}{\normalcolor\bfseries} +\end{lstcode} + Mit dieser Änderung verzichten Sie darauf, für alle + Gliederungsebenen serifenlose Schrift voreinzustellen. +\end{Example} + +Ich möchte eindringlich davon abraten, die Möglichkeit zur +Schriftumschaltung zu missbrauchen, um wild Schriften, Schriftgrößen und +Schriftattribute miteinander zu mischen. Die Auswahl der richtigen Schrift für +die richtige Aufgabe ist eine Sache für Experten und hat sehr, sehr wenig mit +dem persönlichem Geschmack eines Laien zu tun. Siehe hierzu auch das Zitat am +Ende von \autoref{sec:typearea.tips}, \autopageref{sec:typearea.tips.cite} und +die folgende Erklärung. + +\begin{Explain} + Unterschiedliche Schriften für unterschiedliche Gliederungsebenen sind mit + {\KOMAScript}-Mitteln möglich. Der Laie sollte sie aber meiden wie der + Teufel das Weihwasser. Dies hat typografische Gründe. + + Eine Regel der Typografie besagt, dass man möglichst wenig Schriften + miteinander mischen soll. Serifenlose für die Überschriften scheinen bereits + ein Verstoß gegen diese Regel zu sein. Allerdings muss man wissen, dass + fette, große, serifenbehaftete Buchstaben oft viel zu mächtig für eine + Überschrift sind. Man müsste dann strenggenommen zumindest auf eine normale + statt eine fette oder halbfette Schrift ausweichen. In tiefen + Gliederungsebenen kann das aber wieder zu schwach sein. Andererseits haben + Serifenlose in Überschriften eine sehr angenehme Wirkung und fast nur für + Überschriften eine Berechtigung. Daher wurde diese Voreinstellung für + {\KOMAScript} mit gutem Grund gewählt. + + Größere Vielfalt sollte aber vermieden werden. Schriftenmischung ist etwas + für Profis. Aus den genannten Gründen sollten Sie bei Verwendung anderer als + der Standard-\TeX-Fonts -- egal ob CM"~\Index{CM-Fonts}, + EC"~\Index{EC-Fonts} oder LM-Fonts\Index{LM-Fonts} -- bezüglich der + Verträglichkeit der serifenlosen und serifenbehafteten Schrift einen + Experten zu Rate ziehen oder die Schrift für das Element + \FontElement{disposition}\IndexFontElement{disposition} vorsichtshalber wie + in obigem Beispiel umdefinieren. \iffree{}{Auch der komplette Verzicht auf + die Voreinstellung einer serifenlosen Schrift mit Option + \DescRef{maincls-experts.option.egregdoesnotlikesansseriftitles} (siehe + \DescPageRef{maincls-experts.option.egregdoesnotlikesansseriftitles}) + kommt in solchen Fällen in Frage. }% Umbruchkorrektur + Die häufig anzutreffenden Kombinationen Times mit Helvetica oder Palatino + mit Helvetica werden vom Autor als ungünstig betrachtet. +\end{Explain} +\EndIndexGroup +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{part*}\Parameter{Überschrift} + \Macro{chapter*}\Parameter{Überschrift} + \Macro{section*}\Parameter{Überschrift} + \Macro{subsection*}\Parameter{Überschrift} + \Macro{subsubsection*}\Parameter{Überschrift} + \Macro{paragraph*}\Parameter{Überschrift} + \Macro{subparagraph*}\Parameter{Überschrift} +\end{Declaration}% +Bei den Sternvarianten der Gliederungsbefehle erfolgt keine +Nummerierung\Index{Nummerierung}, wird kein +Kolumnentitel\Index{Kolumnentitel>automatisch} gesetzt und kein Eintrag im +Inhaltsverzeichnis\Index{Inhaltsverzeichnis} vorgenommen. Der Verzicht auf +den Kolumnentitel hat übrigens einen oftmals unerwünschten Effekt. Geht +beispielsweise ein mit \Macro{chapter*} gesetztes Kapitel über mehrere Seiten, +so taucht plötzlich der Kolumnentitel des letzten Kapitels wieder auf. +{\KOMAScript} bietet dafür aber eine Lösung, die im Anschluss beschrieben +wird. \OnlyAt{\Class{scrbook}\and \Class{scrreprt}}\Macro{chapter*} existiert +selbstverständlich nur bei Buch- und Berichtklassen, also bei \Class{book}, +\Class{scrbook}, \Class{report} und \Class{scrreprt}, nicht jedoch bei den +Artikelklassen \Class{article} und \Class{scrartcl}. + +Bitte\textnote{Achtung!} beachten Sie, dass \Macro{part*} und \Macro{chapter*} +den Seitenstil für eine Seite umschalten. Während die +Standardklassen\textnote{\KOMAScript{} vs. Standardklassen} dabei den +Seitenstil \PageStyle{plain} verwenden, ist bei \KOMAScript{} der zu +verwendende Seitenstil in den Makros \DescRef{\LabelBase.cmd.partpagestyle} +und \DescRef{\LabelBase.cmd.chapterpagestyle} abgelegt (siehe +\autoref{sec:\LabelBase.pagestyle}, +\DescPageRef{\LabelBase.cmd.titlepagestyle}). + +Bezüglich der Möglichkeiten der Schriftumschaltung\ChangedAt{v2.8p}{% + \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} % +gilt das Gleiche, wie zuvor in der Erklärung zu den sternlosen +Varianten geschrieben. Die Elemente tragen die gleichen Namen, da sie +nicht Varianten, sondern Gliederungsebenen bezeichnen.% +% +\EndIndexGroup + + +\iffalse% Umbruchkorrekturtext +Bei den Standardklassen\textnote{\KOMAScript{} vs. Standardklassen} gibt +es keine weiteren Gliederungsbefehle. Es existieren also insbesondere keine +Anweisungen, mit denen man nicht nummerierte Kapitel oder nicht nummerierte +Abschnitte erzeugen kann, die ins Inhaltsverzeichnis aufgenommen werden und +bei denen ein automatischer Kolumnentitel erzeugt wird. +\fi + + +\begin{Declaration} + \Macro{addpart}\OParameter{Kurzform}\Parameter{Überschrift} + \Macro{addpart*}\Parameter{Überschrift} + \Macro{addchap}\OParameter{Kurzform}\Parameter{Überschrift} + \Macro{addchap*}\Parameter{Überschrift} + \Macro{addsec}\OParameter{Kurzform}\Parameter{Überschrift} + \Macro{addsec*}\Parameter{Überschrift} + \textnote[n]{\KOMAScript{} vs. Standardklassen} +\end{Declaration}% +{\KOMAScript} bietet über die Gliederungsbefehle der Standardklassen hinaus +die Anweisungen \Macro{addpart}, \Macro{addchap} und \Macro{addsec}. Diese +ähneln bis auf die fehlende Nummerierung sehr den Standardanweisungen +\DescRef{\LabelBase.cmd.part}\IndexCmd{part}% +\important{\DescRef{\LabelBase.cmd.part}, \DescRef{\LabelBase.cmd.chapter}, + \DescRef{\LabelBase.cmd.section}}, +\DescRef{\LabelBase.cmd.chapter}\IndexCmd{chapter} und +\DescRef{\LabelBase.cmd.section}\IndexCmd{section}. Sie erzeugen sowohl einen +automatischen Kolumnentitel als auch einen Eintrag im Inhaltsverzeichnis, +wobei auch die Einstellungen von Option \DescRef{\LabelBase.option.headings}% +\important{\DescRef{\LabelBase.option.headings}} einschließlich +der Erweiterung für das optionale Argument beachtet werden. Das +Aktivieren oder Deaktivieren des in der Erklärung zu +\DescRef{\LabelBase.cmd.part}, +\DescRef{\LabelBase.cmd.chapter}\IndexCmd{chapter} und +\DescRef{\LabelBase.cmd.section}\IndexCmd{section} dokumentierten Schalters +\Option{nonumber} bleibt dabei jedoch wirkungslos. + +Die Sternvarianten \Macro{addchap*} und \Macro{addsec*} gleichen hingegen den +Standardanweisungen \DescRef{\LabelBase.cmd.chapter*} und +\DescRef{\LabelBase.cmd.section*} mit einem winzigen, aber wichtigen +Unterschied: Die Kolumnentitel werden gelöscht. Dadurch wird der oben erwähnte +Effekt veralteter Kolumnentitel ausgeschlossen. Stattdessen bleibt der +Kolumnentitel auf Folgeseiten leer. \OnlyAt{\Class{scrbook}\and + \Class{scrreprt}}\Macro{addchap} und \Macro{addchap*} existieren +\iffree{% + selbstverständlich nur bei der Buch- und Berichtklasse, also bei + \Class{scrbook} und \Class{scrreprt}, nicht jedoch bei der Artikelklasse + \Class{scrartcl}.% +}{% + nur bei \Class{scrbook} und \Class{scrreprt}, nicht jedoch bei + \Class{scrartcl}.% +} + +Die Anweisung \Macro{addpart} erstellt entsprechend einen nicht nummerierten +Dokumentteil mit einem Eintrag im Inhaltsverzeichnis. Da bereits +\DescRef{\LabelBase.cmd.part} und \DescRef{\LabelBase.cmd.part*} den +Kolumnentitel löschen, ergibt sich hier nicht das oben genannte Problem mit +veralteten Kolumnentiteln. Die Sternvariante \Macro{addpart*} ist daher +identisch mit der Sternvariante \DescRef{\LabelBase.cmd.part*} und wurde nur +aus Konsistenzgründen definiert. + +Bitte\textnote{Achtung!} beachten Sie, dass \Macro{addpart} und +\Macro{addchap} und deren Sternvarianten den Seitenstil für eine Seite +umschalten. Der jeweilige Seitenstil ist in den Makros +\DescRef{\LabelBase.cmd.partpagestyle} und +\DescRef{\LabelBase.cmd.chapterpagestyle} abgelegt (siehe +\autoref{sec:\LabelBase.pagestyle}, +\DescPageRef{\LabelBase.cmd.titlepagestyle}). +\iffree{\iffalse}{\csname iftrue\endcsname}% Umbruchkorrekturbeispiel +\begin{Example} + Sie schreiben ein Buch mit einem ausladenden Nachwort über mehrere + Seiten. Dieses soll weder einen Kolumnentitel noch einen Eintrag ins + Inhaltsverzeichnis erhalten. Daher verwenden Sie zunächst + \DescRef{\LabelBase.cmd.chapter*}: +\begin{lstcode} + \documentclass{scrbook} + \usepackage[ngerman]{babel} + \usepackage{blindtext} + \begin{document} + \tableofcontents + \blinddocument + \chapter*{Nachwort} + \Blindtext[10] + \end{document} +\end{lstcode} + Allerdings entdecken Sie, dass auf der zweiten und dritten Seite des + Nachworts der Kolumnentitel des vorherigen Kapitels wieder auftaucht. Das + wollen Sie natürlich nicht. Deshalb verwenden Sie nun \Macro{addchap*}: +\begin{lstcode} + \documentclass{scrbook} + \usepackage[ngerman]{babel} + \usepackage{blindtext} + \begin{document} + \tableofcontents + \blinddocument + \addchap*{Nachwort} + \Blindtext[10] + \end{document} +\end{lstcode} + Wunschgemäß ist das komplette Nachwort nun ohne Kolumnentitel. Doch auch das + entspricht nicht ganz Ihren Vorstellungen. Ein Kolumnentitel wäre doch + schön. Mit +\begin{lstcode} + \documentclass{scrbook} + \usepackage[ngerman]{babel} + \usepackage{blindtext} + \begin{document} + \tableofcontents + \blinddocument + \addchap{Nachwort} + \Blindtext[10] + \end{document} +\end{lstcode} + erhalten Sie nun sowohl »Nachwort« als Kolumnentitel der geraden Seiten, als + auch einen Inhaltsverzeichniseintrag. Genau an diesem Eintrag stört sich + dann aber der Verlag. Er besteht darauf, dass das Nachwort keinen Eintrag + ins Inhaltsverzeichnis zu erhalten hat. Auch wenn Ihnen das seltsam + erscheint, wollen Sie den Verlag zufriedenstellen. Also aktivieren Sie mit + \OptionValueRef{\LabelBase}{headings}{optiontotocandhead} zunächst die + erweiterte Funktion für das optionale Argument und setzen dann für das + Inhaltsverzeichnis explizit ein leeres Argument: +\begin{lstcode} + \documentclass[headings=optiontotocandhead] + {scrbook} + \usepackage[ngerman]{babel} + \usepackage{blindtext} + \begin{document} + \tableofcontents + \blinddocument + \addchap[tocentry={}]{Nachwort} + \Blindtext[10] + \end{document} +\end{lstcode} + Der Kolumnentitel wird von \OptionValue{tocentry}{\{\}} nicht verändert. + Da \Class{scrbook} leere Einträge ins Inhaltsverzeichnis automatisch + unterdrückt, ist nun auch der Verlag zufriedengestellt. + + Aufmerksame Leser der Erklärung zu \DescRef{\LabelBase.cmd.chapter} werden + bereits wissen, dass dasselbe Ergebnis auch mit +\begin{lstcode} + \documentclass[headings=optiontotocandhead] + {scrbook} + \usepackage[ngerman]{babel} + \usepackage{blindtext} + \begin{document} + \tableofcontents + \blinddocument + \chapter[tocentry={},nonumber=true]{Nachwort} + \Blindtext[10] + \end{document} +\end{lstcode} + erreicht werden kann. +\end{Example}% +\fi + +Bezüglich der Möglichkeiten der Schriftumschaltung\ChangedAt{v2.8p}{% + \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} % +gilt das Gleiche, wie zuvor in der Erklärung zu +\DescRef{\LabelBase.cmd.section*}, \DescRef{\LabelBase.cmd.chapter*} und +\DescRef{\LabelBase.cmd.part*} geschrieben. Die Elemente tragen die gleichen +Namen, da sie nicht Varianten, sondern Gliederungsebenen bezeichnen.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{minisec}\Parameter{Überschrift} +\end{Declaration}% +Manchmal ist eine Art Überschrift\Index{Ueberschriften=Überschriften} +wünschenswert, die zwar hervorgehoben wird, ansonsten aber eng mit dem +nachfolgenden Text zusammenhängt. Eine solche Überschrift soll dann ohne große +Abstände gesetzt werden. + +Der Befehl \Macro{minisec} bewirkt genau eine derartige Überschrift. Diese +Überschrift ist keiner Gliederungsebene\textnote{ohne Gliederungsebene} +zugeordnet. Eine solche \emph{Mini-Section} wird nicht in das +Inhaltsverzeichnis aufgenommen und erhält auch keine Nummerierung. + +\BeginIndexGroup +\BeginIndex{FontElement}{minisec}\LabelFontElement{minisec}% +Die Schriftart des Gliederungsbefehls \Macro{minisec} kann über die Elemente +\DescRef{\LabelBase.fontelement.disposition}% +\important{\DescRef{\LabelBase.fontelement.disposition}\\ + \FontElement{minisec}} und \FontElement{minisec}\ChangedAt{v2.96a}{% + \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} beeinflusst +werden (siehe \autoref{tab:maincls.fontelements}, +\autopageref{tab:maincls.fontelements}). Die Voreinstellung für das Element +\FontElement{minisec} ist leer, so dass in der Voreinstellung nur das Element +\DescRef{\LabelBase.fontelement.disposition} wirkt.% +\EndIndexGroup + +\begin{Example} + Sie haben einen Bausatz für eine Mausefalle entwickelt und wollen + diesen getrennt nach den benötigten Materialien und der Anleitung für + die Montage beschreiben. Das könnte so gemacht werden: +\begin{lstcode} + \documentclass{scrartcl} + \usepackage[ngerman]{babel} + + \begin{document} + + \title{Selbstbauprojekte} + \author{Zwei Linke Daumen} + \date{\today} + \maketitle + + \section{Mausefalle} + Das erste Projekt ist auch für Anfänger geeignet + und benötigt lediglich einige wenige Bauteile, + die in jedem Haushalt zu finden sein sollten. + + \minisec{Bauteile} + + \begin{flushleft} + 1 Brett ($100\times 50 \times 12$)\\ + 1 Bierflaschenschnappverschluss\\ + 1 Kugelschreiberfeder\\ + 1 Reißzwecke\\ + 2 Schrauben\\ + 1 Hammer\\ + 1 Messer + \end{flushleft} + + \minisec{Montage} + + Zunächst suche man das Mauseloch. Dann lege man + die Reißzwecke innen unmittelbar hinter das Loch, + damit bei den folgenden Aktionen die Maus nicht + entschlüpfen kann. + Anschließend klopfe man mit dem Hammer den + Bierflaschenschnappverschluss in das Mauseloch. + Sollte der Verschluss nicht groß genug sein, um + das Loch vollständig und dauerhaft zu + verschließen, nehme man stattdessen das Brett + und schraube es unter Zuhilfenahme der beiden + Schrauben und des Messers vor das Loch. Statt + des Messers kann selbstverständlich auch ein + Schraubendreher verwendet werden. + Die Kugelschreiberfeder ist dem Tierschutz zum + Opfer gefallen. + \end{document} +\end{lstcode} + Der wesentliche Teil ab der Überschrift »Bauteile« sieht anschließend wie + folgt aus: + \begin{ShowOutput}[\baselineskip]\setlength{\parindent}{1em} + \minisec{Bauteile} + + \begin{flushleft} + 1 Brett ($100\times 50 \times 12$)\\ + 1 Bierflaschenschnappverschluss\\ + 1 Kugelschreiberfeder\\ + 1 Reißzwecke\\ + 2 Schrauben\\ + 1 Hammer\\ + 1 Messer + \end{flushleft} + + \minisec{Montage} + + Zunächst suche man das Mauseloch. Dann lege man die + Reißzwecke innen unmittelbar hinter das Loch, damit + bei den folgenden Aktionen die Maus nicht + entschlüpfen kann. + Anschließend klopfe man mit dem Hammer den + Bierflaschenschnappverschluss in das Mauseloch. + Sollte der Verschluss nicht groß genug sein, um das + Loch vollständig und dauerhaft zu verschließen, + nehme man stattdessen das Brett und schraube es + unter Zuhilfenahme der beiden Schrauben und des + Messers vor das Loch. Statt des Messers kann + selbstverständlich auch ein Schraubendreher + verwendet werden. + Die Kugelschreiberfeder ist dem Tierschutz zum + Opfer gefallen.% +% Mit der Kugelschreiberfeder hat es eine besondere +% Bewandtnis. Sie stammt noch aus dem Selbstbauprojekt +% »Mauseschnappfalle«, das dem Tierschutz zum Opfer gefallen ist. + \end{ShowOutput}% +\end{Example}% +\EndIndexGroup% +% Zusammentreffen von Ausgabeende, Beispielende und Beschreibungsende: +\vskip -1\baselineskip plus .75\ht\strutbox + +\begin{Declaration} + \Macro{raggedsection} + \Macro{raggedchapter} + \Macro{raggedpart} +\end{Declaration}% +Bei den Standardklassen\textnote{\KOMAScript{} vs. Standardklassen} werden die +Überschriften ganz normal im Blocksatz ausgegeben. Dadurch können in den +Überschriften Trennungen auf"|treten und mehrzeilige Überschriften werden auf +Textbreite gedehnt. Dieses Vorgehen ist in der Typografie eher +unüblich. {\KOMAScript} setzt Überschriften von +\DescRef{\LabelBase.cmd.chapter} bis \DescRef{\LabelBase.cmd.subparagraph} +daher in linksbündigem Flattersatz mit hängendem Einzug. Verantwortlich ist +dafür die Anweisung \Macro{raggedsection}, die vordefiniert ist als: +\begin{lstcode} + \let\raggedsection\raggedright +\end{lstcode} +Die Anweisung \Macro{raggedsection} kann mit \Macro{renewcommand} umdefiniert +werden. +\begin{Example} + Sie wollen auch für Überschriften Blocksatz. Dazu schreiben Sie in + die Präambel Ihres Dokuments: +\begin{lstcode} + \renewcommand*{\raggedsection}{} +\end{lstcode} + oder kürzer: +\begin{lstcode} + \let\raggedsection\relax +\end{lstcode} + Sie erreichen somit eine ähnliche Formatierung der Überschriften wie + bei den Standardklassen. Noch ähnlicher wird es, wenn Sie diese + Änderung mit der oben vorgestellten Änderung für das Element + \DescRef{\LabelBase.fontelement.disposition}\IndexFontElement{disposition} + kombinieren. +\end{Example} + +Da\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}} manche Anwender für +die Kapitelebene eine andere Ausrichtung wünschen als für alle anderen Ebenen, +kann diese über \Macro{raggedchapter} auch getrennt verändert werden. In der +Voreinstellung verwendet die Anweisung jedoch einfach \Macro{raggedsection}, +so dass eine Änderung von \Macro{raggedsection} sich indirekt auch auf +\Macro{raggedchapter} auswirkt. + +Die Überschriften von Teilen (\DescRef{\LabelBase.cmd.part}) werden in der Voreinstellung als +einzige nicht in linksbündigem Flattersatz, sondern zentriert gesetzt. Dafür +ist die Anweisung \Macro{raggedpart} verantwortlich, die als: +\begin{lstcode} + \let\raggedpart\centering +\end{lstcode} +vordefiniert ist. Auch diese Anweisung kann mit \Macro{renewcommand} +umdefiniert werden. +\begin{Example} + Sie wollen, dass Überschriften mit \DescRef{\LabelBase.cmd.part} in der + gleichen Weise formatiert werden wie alle anderen Ebenen. Dazu schreiben + Sie +\begin{lstcode} + \renewcommand*{\raggedpart}{\raggedsection} +\end{lstcode} + in die Präambel Ihres Dokuments. An\textnote{Tipp!} dieser Stelle wurde im + Gegensatz zu oben absichtlich nicht \Macro{let} verwendet, da mit + \Macro{let} der Anweisung \Macro{raggedpart} die aktuelle Bedeutung von + \Macro{raggedsection} zugewiesen würde. Spätere Änderungen von + \Macro{raggedsection} blieben also bei \Macro{raggedpart} + unberücksichtigt. Bei der Umdefinierung mit \Macro{renewcommand} erhält + \Macro{raggedpart} dagegen nicht die Bedeutung von \Macro{raggedsection} zum + Zeitpunkt dieser Umdefinierung, sondern zum Zeitpunkt der Verwendung von + \Macro{raggedpart}. +\end{Example} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{partformat} + \Macro{chapterformat} + \Macro{sectionformat} + \Macro{subsectionformat} + \Macro{subsubsectionformat} + \Macro{paragraphformat} + \Macro{subparagraphformat} + \Macro{othersectionlevelsformat}\Parameter{Gliederungsname}\Parameter{} + \Parameter{Zählerausgabe} + \Macro{IfUsePrefixLine}\Parameter{Dann-Teil}\Parameter{Sonst-Teil} + \Macro{autodot} +\end{Declaration}% +\KOMAScript{} fügt der Ausgabe der Gliederungsnummern oberhalb von +\Macro{the\PName{Gliederungsname}} (siehe \Macro{the\PName{Zähler}}, +\DescPageRef{maincls-experts.cmd.the/Zähler/}) eine weitere logische Ebene +hinzu. Die Zähler werden für die jeweilige Überschrift nicht einfach nur +ausgegeben. Sie werden mit Hilfe der parameterlosen Anweisungen +\Macro{partformat}, \Macro{chapterformat} bis +\Macro{subparagraphformat}\ChangedAt{v3.17}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} formatiert. +\OnlyAt{\Class{scrbook}\and \Class{scrreprt}}Die Anweisung +\Macro{chapterformat} existiert, wie bereits \Macro{thechapter}, +selbstverständlich nicht in der Klasse \Class{scrartcl}, sondern nur in den +Klassen \Class{scrbook} und \Class{scrreprt}. + +Wie bereits bei Option \DescRef{\LabelBase.option.numbers}% +\important{\DescRef{\LabelBase.option.numbers}} am Anfang dieses Abschnitts +(siehe \DescPageRef{\LabelBase.option.numbers}) erläutert wurde, müssen gemäß +\cite{DUDEN} die Gliederungsnummern je nach Gliederung mit einem nachfolgenden +Punkt versehen werden oder dieser hat zu entfallen. Die Anweisung +\Macro{autodot} ist bei {\KOMAScript} für die Einhaltung dieser Regel +verantwortlich. Auf den Punkt folgt bei allen Gliederungsebenen außer +\DescRef{\LabelBase.cmd.part} noch ein \Macro{enskip}. Dies entspricht einem +Leerraum von 0,5\Unit{em}, also einem Halbgeviert. + +Die Anweisung +\Macro{othersectionlevelsformat}\ChangedAt{v3.17}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} wird seit \KOMAScript~3.17 nur noch +in Ausnahmefällen verwendet, wenn für eine Gliederungsebene keine +Format-Anweisung definiert oder diese \Macro{relax} ist, was jedoch in der +Voreinstellung für die Gliederungsebenen von KOMA-Script nicht zutrifft. Daher +wird sie auch nicht mehr offiziell dokumentiert. Bei einer +Kompatibilitätseinstellung zu Versionen vor +3.17\important{\OptionValueRef{\LabelBase}{version}{3.17}} (siehe Option +\DescRef{\LabelBase.option.version}, +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}) haben hingegen die Anweisungen +\Macro{sectionformat} bis \Macro{subparagraphformat} keine interne +Funktion. Stattdessen wird für diese Ebenen dann weiterhin +\Macro{othersectionlevelsformat} verwendet. + +Mit Hilfe von \Macro{renewcommand} kann jede der +Formatierungsanweisungen umdefiniert werden, um sie eigenen Anforderungen +anzupassen. Nachfolgend finden Sie einige Definitionen, die denen aus den +{\KOMAScript}-Klassen entsprechen: +\begin{lstcode} + \newcommand*{\partformat}{\partname~\thepart\autodot} + \newcommand*{\chapterformat}{% + \mbox{\chapappifchapterprefix{\nobreakspace}\thechapter + \autodot\IfUsePrefixLine{}{\enskip}}} + \newcommand*{\sectionformat}{\thesection\autodot\enskip} + \newcommand*{\subsectionformat}{% + \thesubsection\autodot\enskip} + \newcommand*{\subsubsectionformat}{% + \thesubsubsection\autodot\enskip} + \newcommand*{\paragraphformat}{\theparagraph\autodot\enskip} + \newcommand*{\subparagraphformat}{% + \thesubparagraph\autodot\enskip} + \newcommand*{\othersectionlevelsformat}[3]{% + #3\autodot\enskip} +\end{lstcode} + +Wegen\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}} der Verwendung +von \Macro{IfUsePrefixLine} sollte die Anweisung \Macro{chapterformat} nicht +außerhalb von \DescRef{\LabelBase.cmd.chapter} verwendet +werden. \Macro{IfUsePrefixLine} ist nur innerhalb der Gliederungsbefehle von +\KOMAScript{} wohldefiniert. Dort wird dann im Falle der Verwendung einer +Präfixzeile für die Nummer der Überschrift der \PName{Dann-Teil} ausgeführt, +während im anderen Fall der \PName{Sonst-Teil} zur Ausführung kommt. + +Bitte\textnote{Achtung!} beachten Sie außerdem, dass bei der Umdefinierung +selbstverständlich \Macro{newcommand} durch \Macro{renewcommand} zu ersetzen +ist. + +\begin{Example} + Angenommen, Sie wollen, dass bei \DescRef{\LabelBase.cmd.part} das Wort + »Teil« vor der Nummer nicht ausgegeben wird. Dann können Sie beispielsweise + folgende Anweisung in die Präambel Ihres Dokuments schreiben: +\begin{lstcode} + \renewcommand*{\partformat}{\thepart\autodot} +\end{lstcode} + Genau genommen könnten Sie an dieser Stelle auch auf \Macro{autodot} + verzichten und stattdessen einen festen Punkt setzen. Da + \DescRef{\LabelBase.cmd.part} mit römischen Zahlen nummeriert wird, muss der + Punkt laut \cite{DUDEN} folgen. Allerdings bringen Sie sich dann um die + Möglichkeit, die Option \DescRef{\LabelBase.option.numbers}% + \important{\DescRef{\LabelBase.option.numbers}} einzusetzen und so von der + Regel abzuweichen. Näheres zu der Option siehe + \DescPageRef{\LabelBase.option.numbers}. + + Eine weitere Möglichkeit besteht darin, die Nummerierung der Abschnitte + so in den Rand zu platzieren, dass der Überschriftentext + links mit dem umgebenden Text abschließt. Dies erreicht man + mit: +\begin{lstcode} + \renewcommand*{\sectionformat}{% + \makebox[0pt][r]{\thesection\autodot\enskip}} + \renewcommand*{\subsectionformat}{% + \makebox[0pt][r]{\thesubsection\autodot\enskip}} + \renewcommand*{\subsubsectionformat}{% + \makebox[0pt][r]{% + \thesubsubsection\autodot\enskip}} + \renewcommand*{\paragraphformat}{% + \makebox[0pt][r]{\theparagraph\autodot\enskip}} + \renewcommand*{\paragraphformat}{% + \makebox[0pt][r]{% + \thesubparagraph\autodot\enskip}} +\end{lstcode} + Die optionalen Argumente der \Macro{makebox}-Anweisungen fordern von + \LaTeX{} dabei eine Box der Breite Null, deren Inhalt rechtsbündig + angeordnet ist. Im Ergebnis wird der Inhalt der Box links von der aktuellen + Position ausgegeben.\iffree{}{ %Umbruchkorrekturtext + Mit diesem beliebten Trick wird vermieden, dass zunächst die Breite von + Nummer und Abstand ausgemessen werden muss, um dann die aktuelle Position + entsprechend mit \Macro{hspace} zu verändern.} + Näheres zu den optionalen Argumenten von \Macro{makebox} ist + \cite{latex:usrguide} zu entnehmen. +\end{Example} + +Für Formatierungsänderungen bei den Überschriften, die über die reine Ausgabe +der Nummer hinaus gehen, sei ausdrücklich auf +\DescRef{maincls-experts.cmd.partlineswithprefixformat}% +\IndexCmd{partlineswithprefixformat}, +\DescRef{maincls-experts.cmd.chapterlineswithprefixformat}% +\IndexCmd{chapterlineswithprefixformat} und +\DescRef{maincls-experts.cmd.chapterlinesformat}\IndexCmd{chapterlinesformat} +sowie +\DescRef{maincls-experts.cmd.sectionlinesformat}\IndexCmd{sectionlinesformat} +und das zugehörige \DescRef{maincls-experts.cmd.sectioncatchphraseformat}% +\IndexCmd{sectioncatchphraseformat} in \autoref{sec:maincls-experts.sections}, +ab \DescPageRef{maincls-experts.cmd.partlineswithprefixformat} verwiesen.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{chapappifchapterprefix}\Parameter{Zusatztext} + \Macro{chapapp} +\end{Declaration}% +Diese \OnlyAt{\Class{scrbook}\and \Class{scrreprt}}% +\ChangedAt{v2.8o}{\Class{scrbook}\and \Class{scrreprt}}% +beiden Anweisungen werden nicht nur intern von {\KOMAScript} verwendet, +sondern stehen auch dem Anwender zur Verfügung. Nachfolgend werden sie +beispielsweise für die Umdefinierung anderer Anweisungen verwendet. + +Bei Verwendung von Option \OptionValueRef{\LabelBase}{chapterprefix}{true}% +\important{\DescRef{\LabelBase.option.chapterprefix}} (siehe +\DescPageRef{\LabelBase.option.chapterprefix}) setzt +\Macro{chapappifchapterprefix} im Hauptteil des Dokuments das Wort +»Kapitel«\Index{Kapitel>Ueberschrift=Überschrift} in der aktuellen Sprache, +gefolgt vom \PName{Zusatztext}. Im Anhang\Index{Anhang} wird stattdessen das +Wort »Anhang« in der aktuellen Sprache, ebenfalls gefolgt vom +\PName{Zusatztext}, ausgegeben. Bei der Einstellung +\OptionValueRef{\LabelBase}{chapterprefix}{false} wird hingegen nichts +ausgegeben. + +Die Anweisung \Macro{chapapp} setzt immer das Wort »Kapitel« +beziehungsweise »Anhang«. Dabei spielt die Einstellung der Option +\DescRef{\LabelBase.option.chapterprefix} keine Rolle. + +Da es Kapitel nur bei den Klassen \Class{scrbook} und \Class{scrreprt} +gibt, existieren die beiden Anweisungen auch nur bei diesen Klassen.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{chaptermark}\Parameter{Kolumnentitel} + \Macro{addchapmark}\Parameter{Kolumnentitel} + \Macro{sectionmark}\Parameter{Kolumnentitel} + \Macro{addsecmark}\Parameter{Kolumnentitel} + \Macro{subsectionmark}\Parameter{Kolumnentitel} + \Macro{chaptermarkformat} + \Macro{sectionmarkformat} + \Macro{subsectionmarkformat} +\end{Declaration}% +\begin{Explain} + Wie bereits in \autoref{sec:\LabelBase.pagestyle} erwähnt, arbeitet der + Seitenstil \DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings}% + \important{\DescRef{\LabelBase.pagestyle.headings}} mit automatischen + Kolumnentiteln\Index{Kolumnentitel>automatisch}. Dazu werden die + Anweisungen \Macro{chaptermark} und \Macro{sectionmark} beziehungsweise + \Macro{sectionmark} und \Macro{subsectionmark} entsprechend definiert. + Gliederungsbefehle (\DescRef{\LabelBase.cmd.chapter}, + \DescRef{\LabelBase.cmd.section}~\dots) führen automatisch eine + entsprechende \Macro{\dots mark}-Anweisung aus. Der dabei übergebene + Parameter beinhaltet den Text der + Gliederungsüberschrift\Index{Ueberschriften=Überschriften}. Die zugehörige + Gliederungsnummer wird automatisch in der \Macro{\dots mark}-Anweisung + hinzugefügt. Die Formatierung erfolgt je nach Gliederungsebene mit einer der + drei Anweisungen \Macro{chaptermarkformat}, \Macro{sectionmarkformat} und + \Macro{subsectionmarkformat}. + + Es ist zu beachten\textnote{Achtung!}, dass die Kolumnentitel von + \DescRef{\LabelBase.cmd.addchap}\IndexCmd{addchap} und + \DescRef{\LabelBase.cmd.addsec}\IndexCmd{addsec} ebenfalls auf + \Macro{chaptermark} und \Macro{sectionmark} basieren. Dabei wird aber lokal + der Zähler \DescRef{\LabelBase.counter.secnumdepth} auf einen Wert gesetzt, + mit dem die Nummerierung von Kapiteln beziehungsweise Abschnitten + abgeschaltet wird. Dies sollte man beispielsweise bei der Umdefinierung von + \Macro{chaptermark} und \Macro{sectionmark} berücksichtigen (siehe + \DescRef{\LabelBase.cmd.Ifnumbered} auf + \DescPageRef{\LabelBase.cmd.Ifnumbered}). Für die Sternformen + \DescRef{\LabelBase.cmd.addchap*} und \DescRef{\LabelBase.cmd.addsec*} + existieren außerdem die Anweisungen \Macro{addchapmark} und + \Macro{addsecmark}, die in der Voreinstellung ebenfalls in der genannten + Weise definiert sind. + + Während\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} bei \Class{scrartcl} + weder \Macro{chaptermark} noch \Macro{addchapmark} oder + \Macro{chaptermarkformat} existieren, gibt es die beiden Anweisungen + \Macro{subsectionmark} und \Macro{subsectionmarkformat} nicht nur bei + \Class{scrartcl}. Bei \Class{scrbook} und \Class{scrreprt} ist + \Macro{subsectionmark} aber als Leeranweisung definiert, hat also keine + Auswirkung. Bei Verwendung des Pakets + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + \IndexPackage{scrlayer-scrpage} kann sich dies ändern (siehe + \autoref{cha:scrlayer-scrpage}). +\end{Explain} +So wie mit \DescRef{\LabelBase.cmd.partformat} bis +\DescRef{\LabelBase.cmd.subparagraphformat} die Nummern der +Gliederungsüberschriften formatiert ausgegeben werden, werden entsprechend mit +\Macro{chaptermarkformat}, \Macro{sectionmarkformat} und +\Macro{subsectionmarkformat} die Nummern der Gliederungsebenen in den +automatischen Kolumnentiteln formatiert ausgegeben. Mit \Macro{renewcommand} +können sie eigenen Anforderungen angepasst werden. Die Originaldefinitionen +aus den {\KOMAScript}-Klassen sind: +\begin{lstcode} + \newcommand*{\chaptermarkformat}{% + \chapappifchapterprefix{\ }\thechapter\autodot\enskip} + \newcommand*{\sectionmarkformat}{% + \thesection\autodot\enskip} + \newcommand*{\subsectionmarkformat}{% + \thesubsection\autodot\enskip} +\end{lstcode} +\begin{Example} + Angenommen, Sie wollen, dass der Kapitelnummer in den Kolumnentiteln + das Wort »Kapitel« vorangestellt wird. Dann setzen Sie + beispielsweise diese Definition in die Präambel Ihres Dokuments: +\begin{lstcode} + \renewcommand*{\chaptermarkformat}{% + \chapapp~\thechapter\autodot\enskip} +\end{lstcode} +\end{Example} +Wie Sie sehen, finden hier die beiden Anweisungen +\DescRef{\LabelBase.cmd.chapapp} und +\DescRef{\LabelBase.cmd.chapappifchapterprefix} Verwendung, die weiter oben +erklärt wurden.% +\EndIndexGroup + + +\begin{Declaration} + \Counter{secnumdepth} + \Macro{partnumdepth} + \Macro{chapternumdepth} + \Macro{sectionnumdepth} + \Macro{subsectionnumdepth} + \Macro{subsubsectionnumdepth} + \Macro{paragraphnumdepth} + \Macro{subparagraphnumdepth} +\end{Declaration}% +\BeginIndex{}{Nummerierung}% +Normalerweise werden bei den Klassen \Class{scrbook}\IndexClass{scrbook} und +\Class{scrreprt}\IndexClass{scrreprt} die Gliederungsebenen +\DescRef{\LabelBase.cmd.part}\IndexCmd{part}\IndexCmd{chapter}% +\IndexCmd{section} bis +\DescRef{\LabelBase.cmd.subsection}\IndexCmd{subsection} und bei der Klasse +\Class{scrartcl}\IndexClass{scrartcl} die Ebenen \DescRef{\LabelBase.cmd.part} +bis \DescRef{\LabelBase.cmd.subsubsection}\IndexCmd{subsubsection} +nummeriert. Gesteuert wird dies über den \LaTeX-Zähler \Counter{secnumdepth}. + +Damit\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} sich der Anwender keine abstrakten Nummern merken muss, um +einstellen zu können, bis zu welcher Gliederungsebene die Überschriften +nummeriert werden sollen, gibt es die Anweisungen \Macro{partnumdepth} bis +\Macro{subparagraphnumdepth}. Diese liefern die entsprechende Nummer zur +jeweiligen Gliederungsebene. +\begin{Example} + Sie wollen, dass in einem Buchprojekt nur die Gliederungsebenen vom Teil + (engl. \emph{part}) über das Kapitel (engl. \emph{chapter}) bis zum + Abschnitt (engl. \emph{section}) nummeriert werden. Dazu müssen Sie + in der Dokumentpräambel den Zähler \Counter{secnumdepth} auf den Wert + setzen, den die Anweisung \Macro{sectionnumdepth} liefert: +\begin{lstcode} + \setcounter{secnumdepth}{\sectionnumdepth} +\end{lstcode} +\end{Example} +Eine Umdefinierung der Anweisungen ist nicht vorgesehen und wird ausdrücklich +nicht empfohlen, da dies zu unvorhergesehenen Ergebnissen sowohl mit +\KOMAScript{} als auch bei Verwendung von Drittpaketen führen kann. + +Der\textnote{Achtung!} Zähler \Counter{secnumdepth} ist nicht zu verwechseln +mit dem Zähler \DescRef{\LabelBase.counter.tocdepth} (siehe +\autoref{sec:\LabelBase.toc}, \DescPageRef{\LabelBase.counter.tocdepth}). Auch +sind die Werte je nach Klasse nicht eins zu eins übertragbar.% +% +\EndIndexGroup + +\begin{Declaration} + \Macro{Ifnumbered}\Parameter{Gliederungsebene}% + \Parameter{Dann-Teil}\Parameter{Else-Teil} + \Macro{Ifunnumbered}\Parameter{Gliederungsebene}% + \Parameter{Dann-Teil}\Parameter{Else-Teil} +\end{Declaration} +Nachdem\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\ChangedAt{v3.28}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} zuvor erklärt wurde, wie man bestimmen kann, welche +Gliederungsebenen nummeriert werden sollen, kann mit diesen Anweisungen nun +Code abhängig davon, ob eine \PName{Gliederungsebene} nummeriert wird oder +nicht, ausgeführt werden. Wird mit den aktuellen Einstellungen eine +\PName{Gliederungsebene} nummeriert, so führt \Macro{Ifnumbered} den +\PName{Dann-Teil} aus, während \Macro{Ifunnumbered} den \PName{Else-Teil} +ausführt. Wird mit den aktuellen Einstellungen eine \PName{Gliederungsebene} +nicht nummeriert, dann führt \Macro{Ifnumbered} den \PName{Else-Teil} aus, +wohingegen \Macro{Ifunnumbered} den \PName{Dann-Teil} ausführt. Als +\PName{Gliederungsebene} wird der englische Name der Ebene angegeben, also +\PValue{part}, \PValue{chapter}, \PValue{section}, \PValue{subsection}, +\PValue{subsubsection}, \PValue{paragraph} oder \PValue{subparagraph}. + +\KOMAScript{} selbst verwendet diesen Test beispielsweise in der Definition +von \DescRef{\LabelBase.cmd.chaptermark}\IndexCmd{chaptermark} beim Seitenstil +\DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings}. Dadurch wird +indirekt auch sichergestellt, dass Überschriften mit +\DescRef{\LabelBase.cmd.addchap} den Kolumnentitel nicht mit einer Nummer +versehen (siehe auch \DescRef{\LabelBase.cmd.addchapmark}, +\DescPageRef{\LabelBase.cmd.addchapmark}).% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setpartpreamble}% + \OParameter{Position}\OParameter{Breite}\Parameter{Präambel} + \Macro{setchapterpreamble}% + \OParameter{Position}\OParameter{Breite}\Parameter{Präambel} +\end{Declaration}% +\OnlyAt{\Class{scrbook}\and + \Class{scrreprt}}Teile\Index{Teil>Praeambel=Präambel} und +Kapitel\Index{Kapitel>Praeambel=Präambel} können bei {\KOMAScript} mit einer +\PName{Präambel} versehen werden. Dies ist insbesondere im zweispaltigen +Layout mit der Klassenoption \Option{twocolumn}\IndexOption{twocolumn} +nützlich, da die \PName{Präambel} zusammen mit der Überschrift einspaltig +gesetzt wird. Die \PName{Präambel} kann auch mehrere Absätze beinhalten. Die +Anweisung zum Setzen der \PName{Präambel} muss vor der jeweiligen +\DescRef{\LabelBase.cmd.part}- oder \DescRef{\LabelBase.cmd.addpart}- +bzw. \DescRef{\LabelBase.cmd.chapter}- oder +\DescRef{\LabelBase.cmd.addchap}-Anweisung stehen. +\begin{Example} + Sie schreiben einen Bericht über den Zustand einer Firma. Dabei + organisieren Sie den Bericht so, dass jeder Abteilung ein eigener + Teilbericht spendiert wird. Jedem dieser Teile soll außerdem eine + Zusammenfassung vorangestellt werden. Diese Zusammenfassung soll auf + der Titelseite jedes Teils stehen. Das ist wie folgt möglich: +\begin{lstcode} + \setpartpreamble{% + \begin{abstract} + Dies ist ein Blindtext zur Demonstration. + \end{abstract}} + \part{Abteilung Grünschnitt} +\end{lstcode} + Je nach Einstellung der Optionen für die + Überschriftengröße\Index{Ueberschriften=Überschriften} (siehe + \DescPageRef{\LabelBase.option.headings}) und der Optionen für die Form + der \DescRef{\LabelBase.env.abstract}-Umgebung\IndexEnv{abstract} (siehe + \autoref{sec:\LabelBase.abstract}, \DescPageRef{\LabelBase.option.abstract}), + sieht das Ergebnis ungefähr wie folgt aus: + \begin{ShowOutput}\centering + {\LARGE\usekomafont{disposition} Teil III.\par\vspace{14pt}} + {\LARGE\usekomafont{disposition} Abteilung Grünschnitt\strut\par} + \begin{quote}\small + \vspace{4ex} + \begin{center} + \usekomafont{disposition}\abstractname + \end{center} + \vspace{2ex} + Dies ist ein Blindtext zur Demonstration. + \end{quote} + \end{ShowOutput} +\end{Example} +Bitte\textnote{Achtung!} beachten Sie, dass Sie für die Abstände der Präambel +zur Teilüberschrift bzw. zum Kapiteltext selbst verantwortlich sind. Bitte +beachten Sie auch, dass die \DescRef{\LabelBase.env.abstract}-Umgebung bei der +Klasse \Class{scrbook} nicht existiert (siehe \autoref{sec:\LabelBase.abstract}, +\DescPageRef{\LabelBase.env.abstract}). + +Das\ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}} erste +optionale Argument \PName{Position} bestimmt über ein bis zwei +Buchstaben die Position, an der die Präambel ausgegeben wird. Für die +vertikale Position existieren derzeit zwei Möglichkeiten: +%\iffree{}{\pagebreak}% Umbruchoptimierung +\begin{labeling}[~--]{\quad\PValue{o}}\itemsep=-\parsep +\item [\quad\PValue{o}] über der Überschrift +\item [\quad\PValue{u}] unter der Überschrift +\end{labeling}\pagebreak[3]% Umbruchkorrektur +Es kann so jeweils eine Präambel unter und über der Überschrift gesetzt werden, +mit drei Möglichkeiten für die horizontale Position: +\begin{labeling}[~--]{\quad\PValue{o}}\itemsep=-\parsep +\item [\quad\PValue{l}] linksbündig +\item [\quad\PValue{r}] rechtsbündig +\item [\quad\PValue{c}] zentriert +\end{labeling} +Dabei wird allerdings nicht der Text der \PName{Präambel} entsprechend +angeordnet, sondern eine Box, deren Breite durch das zweite optionale +Argument \PName{Breite} bestimmt wird. Wird auf das zweite optionale +Argument verzichtet, so wird stattdessen die gesamte Textbreite +verwendet. Damit bleibt die Option zur horizontalen Positionierung in +diesem Fall wirkungslos. Es kann jeweils ein Buchstabe für die +vertikale mit einem Buchstaben für die horizontale Anordnung +kombiniert werden. + +Eine häufigere Anwendung von \Macro{setchapterpreamble} dürfte ein Spruch oder +Zitat zu einer Überschrift sein. Die dazu verwendbare Anweisung +\DescRef{\LabelBase.cmd.dictum}\IndexCmd{dictum} ist im nachfolgenden +Abschnitt erläutert. Dort findet sich auch ein entsprechendes Beispiel. + +Bitte\textnote{Achtung!} beachten Sie, dass \PName{Präambel} bei der +Platzierung über der Überschrift in den dort vorhandenen freien Platz gesetzt +wird. Die Überschrift wird dabei nicht nach unten verschoben. Der Anwender ist +also selbst dafür verantwortlich dass \PName{Präambel} nicht zu groß ist und +der vorhandene freie Platz über der Überschrift genügt. Siehe dazu auch +Einstellung \Option{beforeskip} für +\DescRef{maincls-experts.cmd.RedeclareSectionCommand} in +\autoref{sec:maincls-experts.sections}, +\autoref{tab:maincls-experts.declarechapterstyle.keys}, +\autopageref{tab:maincls-experts.declarechapterstyle.keys}. +% +% +\EndIndexGroup +% +\EndIndexGroup + + +\LoadCommonFile{dictum}% \section{Schlauer Spruch} + +\LoadCommonFile{lists}% \section{Listen} + +\section{Mathematik} +\seclabel{math}% +\BeginIndexGroup +\BeginIndex{}{Mathematik}% +\BeginIndex{}{Formeln}% +\BeginIndex{}{Gleichungen}% + +Die \KOMAScript-Klassen stellen keine eigenen Umgebungen für mathematische +Formeln, Gleichungssysteme oder ähnliche Elemente der Mathematik +bereit. Stattdessen stützt sich \KOMAScript{} im Bereich der Mathematik voll +und ganz auf den \LaTeX-Kern. Dies gilt auch für die Realisierung der beiden +Optionen \DescRef{\LabelBase.option.leqno} und +\DescRef{\LabelBase.option.fleqn}. + +Auf eine Beschreibung der Mathematikumgebungen des \LaTeX-Kerns, also +\Environment{displaymath}\IndexEnv{displaymath}, +\Environment{equation}\IndexEnv{equation} und +\Environment{eqnarray}\IndexEnv{eqnarray}, wird an dieser Stelle +verzichtet. Wer diese verwenden möchte, sei auf \cite{l2kurz} verwiesen. Für +mehr als nur einfachste mathematische Formeln und Gleichungen sei jedoch +die Verwendung von Paket \Package{amsmath}\textnote{Tipp!} empfohlen (siehe +\cite{package:amsmath}).% + +\begin{Declaration} + \Option{leqno} +\end{Declaration}% +Gleichungen\Index{Gleichungen>Nummern} werden normalerweise auf der rechten +Seite nummeriert. Mit Hilfe der Standardoption \Option{leqno} wird die +Standardoptionsdatei \File{leqno.clo} geladen. Dadurch erfolgt die +Nummerierung von Gleichungen links. Diese Option ist als optionales +Argument\textnote{Achtung!} von \DescRef{\LabelBase.cmd.documentclass} zu +verwenden. Eine Einstellung per \DescRef{\LabelBase.cmd.KOMAoptions} oder +\DescRef{\LabelBase.cmd.KOMAoption} wird nicht unterstützt. Dies wäre auch +deshalb nicht sinnvoll, weil das für den Mathematiksatz empfohlene Paket +\Package{amsmath} ebenfalls nur beim Laden, nicht aber zur Laufzeit auf diese +Option reagieren kann.% +% +\EndIndexGroup + + +\begin{Declaration} + \Option{fleqn} +\end{Declaration}% +Gleichungen\Index{Gleichungen>Ausrichtung} werden normalerweise horizontal +zentriert ausgegeben. Mit Hilfe der Standardoption \Option{fleqn} wird die +Standardoptionsdatei \File{fleqn.clo} geladen. Dadurch erfolgt die Ausgabe von +Gleichungen linksbündig. Diese Option ist als optionales +Argument\textnote{Achtung!} von \DescRef{\LabelBase.cmd.documentclass} zu +verwenden. Eine Einstellung per \DescRef{\LabelBase.cmd.KOMAoptions} oder +\DescRef{\LabelBase.cmd.KOMAoption} wird nicht unterstützt. Dies wäre auch +deshalb nicht sinnvoll, weil das für den Mathematiksatz empfohlene Paket +\Package{amsmath} ebenfalls nur beim Laden, nicht aber zur Laufzeit auf diese +Option reagieren kann.% +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Gleitumgebungen für Tabellen und Abbildungen} +\seclabel{floats} +\BeginIndexGroup +\BeginIndex{}{Gleitumgebungen} +\BeginIndex{}{Tabellen} +\BeginIndex{}{Abbildungen} + +{\LaTeX} bietet mit den Gleitumgebungen einen sehr leistungsfähigen und +komfortablen Mechanismus für die automatische Anordnung von Abbildungen und +Tabellen. Genau genommen sollte von »Tafeln«\Index{Tafeln} statt von +»Tabellen« die Rede sein. Dies wäre auch zur Unterscheidung der Umgebungen +\Environment{table}\IndexEnv{table} und +\Environment{tabular}\IndexEnv{tabular} von Vorteil. Es hat sich im Deutschen +aber für beides die Bezeichnung »Tabelle« eingebürgert. Das kommt vermutlich +daher, dass man in \Environment{table}-Umgebungen üblicherweise +\Environment{tabular}-Umgebungen setzt, auch wenn dies keineswegs zwingend +ist. + +Häufig\textnote{Achtung!} werden die Gleitumgebungen von Anfängern nicht +richtig verstanden. So wird oft die Forderung aufgestellt, eine Tabelle oder +Abbildung genau an einer bestimmten Position im Text zu setzen. Dies ist +jedoch nicht erforderlich, da auf Gleitumgebungen im Text über eine Referenz +verwiesen wird. Es ist auch nicht sinnvoll, da ein solches Objekt an einer +Stelle nur dann gesetzt werden kann, wenn auf der Seite noch genügend Platz +für das Objekt vorhanden ist. Ist dies nicht der Fall, müsste das Objekt auf +die nächste Seite umbrochen werden und auf der aktuellen Seite würde ein +möglicherweise sehr großer leerer Raum bleiben. + +Häufig\textnote{Achtung!} findet sich in einem Dokument auch bei jedem +Gleitobjekt das gleiche optionale Argument zur Platzierung des Objekts. Auch +dies ist nicht sinnvoll. In solchen Fällen sollte man besser den Standardwert +global ändern. Näheres dazu ist \cite{DANTE:FAQ} zu entnehmen. + +Ein\textnote{Achtung!} wichtiger Hinweis sei diesem Abschnitt noch +vorangestellt: Die meisten Mechanismen, die hier vorgestellt werden und über +die Fähigkeiten der Standardklassen hinaus gehen, funktionieren nicht mehr, +wenn Sie ein Paket verwenden, das in die Generierung von Tabellen- und +Abbildungstiteln eingreift und deren Aussehen verändert. Dies sollte +selbstverständlich sein, wird aber leider häufig nicht bedacht. + + +\begin{Declaration} + \OptionVName{captions}{Einstellung} +\end{Declaration} +Bei den Standardklassen werden die Titel von Gleitumgebungen, die mit der +Anweisung \DescRef{\LabelBase.cmd.caption}\IndexCmd{caption} (siehe unten) +gesetzt werden, als Unterschrift formatiert. Darüber hinaus wird zwischen +ein"~ und mehrzeiligen Unterschriften unterschieden, wobei einzeilige +Unterschriften horizontal zentriert werden. + +\leavevmode\LabelOptionValue{captions}{tableheading}\nobreak% +Tabellen werden jedoch häufig mit +Überschriften\important{\OptionValue{captions}{tableheading}} statt mit +Unterschriften versehen. Das liegt daran, dass es auch Tabellen geben kann, +die sich über mehrere Seiten erstrecken. Bei solchen Tabellen möchte man +natürlich bereits auf der ersten Seite wissen, worum es sich handelt. Darüber +hinaus werden Tabellen zeilenweise von oben nach unten gelesen. Damit gibt es +mindestens zwei gute Gründe, in der Regel alle Tabellen mit Überschriften zu +versehen. \KOMAScript{} bietet daher mit der Einstellung +\OptionValue{captions}{tableheading}% +\IndexOption{captions~=\textKValue{tableheading}} die Möglichkeit, bei +Tabellen die Formatierung auf Überschriften zu ändern. + +Es\textnote{Achtung!} sei % +\iffalse an dieser Stelle \fi % Umbruchkorrektur +darauf hingewiesen, dass mehrseitige Tabellen nicht als Gleitumgebungen +gesetzt werden können. Für den automatischen Seitenumbruch von Tabellen werden +\iffalse außerdem \fi % Umbruchkorrektur +Zusatzpakete wie \Package{longtable}\IndexPackage{longtable} (siehe +\cite{package:longtable}) oder +\Package{supertabular}\IndexPackage{supertabular} (siehe +\cite{package:supertabular}) benötigt. + +Mit\important{\OptionValue{captions}{tablesignature}} +der Einstellung +\OptionValue{captions}{tablesignature}% +\IndexOption{captions~=\textKValue{tablesignature}} +wird wieder die Voreinstellung der Formatierung als Tabellenunterschrift +gewählt. Es\textnote{Achtung!} sei an dieser Stelle darauf hingewiesen, dass +die beiden Werte lediglich die Formatierung ändern. Der Ort, an dem die Über"~ +oder Unterschrift gesetzt wird, hängt bei den Gleitumgebungen von +\KOMAScript{} allein vom Ort ab, an dem die Anweisung +\DescRef{\LabelBase.cmd.caption} verwendet wird. Dies ändert sich jedoch bei +Verwendung des Pakets \Package{float}\IndexPackage{float} mit der Anweisung +\Macro{restylefloat}\IndexCmd{restylefloat}\important{\Macro{restylefloat}} +(siehe \cite{package:float}). + +Natürlich\important{\OptionValue{captions}{figureheading}\\ + \OptionValue{captions}{figuresignature}} +existiert\ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} mit den Optionen \OptionValue{captions}{figureheading}% +\IndexOption{captions~=\textKValue{figureheading}} und +\OptionValue{captions}{figuresignature}% +\IndexOption{captions~=\textKValue{figuresignature}} auch die entsprechende +Funktion für Abbildungen. Allerdings werden Abbildungen in der Regel wie im +Falle von Fotos eher als Ganzes und im Falle von Diagrammen oder Graphen eher +von unten links her betrachtet. In den wenigsten Fällen dürfte es daher +sinnvoll sein, nur bei Abbildungen die Formatierung von Unterschriften in +Überschriften zu ändern. + +Manchmal wird jedoch gewünscht, alle Gleitumgebungen mit Überschriften zu +versehen. Daher gibt es bei \KOMAScript{} die Einstellungen\important{% + \OptionValue{captions}{heading}\\ + \OptionValue{captions}{signature}} \OptionValue{captions}{heading}% +\IndexOption{captions~=\textKValue{heading}} und +\OptionValue{captions}{signature}\IndexOption{captions~=\textKValue{signature}}, +mit der man die Formatierungen aller Gleitumgebungen entsprechend ändern +kann. Diese entfalten ihre Wirkung auch noch, wenn sie innerhalb einer +Gleitumgebung verwendet werden. + +Bitte\textnote{Achtung!}\OnlyAt{\Package{float}}\IndexPackage{float} beachten +Sie, dass bei Verwendung des \Package{float}-Pakets die Einstellungen von +Unterschriften oder Überschriften nicht mehr funktionieren, sobald Sie +\Macro{restylefloat} auf Tabellen oder Abbildungen anwenden. Näheres zum +\Package{float}-Paket und \Macro{restylefloat} entnehmen Sie bitte +\cite{package:float}. Dies gilt ebenso für \DescRef{\LabelBase.cmd.caption} +innerhalb von neuen Gleitumgebungen, die mit \Package{float} definiert +wurden. Zusätzliche Unterstützung, die \KOMAScript{} bei Verwendung des +\Package{float}-Pakets bietet, finden Sie bei der Erklärung zu +\PValue{komaabove} (siehe \DescPageRef{\LabelBase.floatstyle.komaabove}). Als +Alternative zu \Package{float} sei auch die Verwendung von +\DescRef{\LabelBase.cmd.captionof} (siehe +\DescPageRef{\LabelBase.cmd.captionof}) und +\DescRef{tocbasic.cmd.DeclareNewTOC} (siehe +\DescPageRef{tocbasic.cmd.DeclareNewTOC}) erwähnt. Darüber hinaus sei bei +Verwendung von \Package{float} ausdrücklich Paket +\hyperref[cha:scrhack]{\Package{scrhack}}\IndexPackage{scrhack}% +\important{\hyperref[cha:scrhack]{\Package{scrhack}}} (siehe +\autoref{cha:scrhack} ab \autopageref{cha:scrhack} in +\autoref{part:forExperts}) empfohlen. + +\leavevmode\LabelOptionValue{captions}{nooneline}\nobreak +Bei\important{\OptionValue{captions}{nooneline}} \KOMAScript{} besteht darüber +hinaus auch die Möglichkeit, mit der Einstellung +\OptionValue{captions}{nooneline}\IndexOption{captions~=\textKValue{nooneline}} +die Unterscheidung zwischen ein"~ und mehrzeiligen Über"~ bzw. Unterschriften +abzuschalten. Dies ist beispielsweise dann wichtig, wenn man keine Zentrierung +wünscht. Die\important{\OptionValue{captions}{oneline}}% +\LabelOptionValue{captions}{oneline} +Voreinstellung\textnote{Voreinstellung}, bei der einzeilige Über"~ und +Unterschriften automatisch horizontal zentriert werden, entspricht der +Einstellung \OptionValue{captions}{oneline}. + +Als Besonderheit bietet \KOMAScript{} innerhalb von Gleitumgebungen die +Möglichkeit, den Titel statt als Über"~ oder Unterschrift neben den +eigentlichen Inhalt zu +setzen. Die\important{\DescRef{\LabelBase.env.captionbeside}} dazu notwendige +Umgebung \DescRef{\LabelBase.env.captionbeside}\IndexEnv{captionbeside} ist ab +\DescPageRef{\LabelBase.env.captionbeside} erklärt. Die Einstellungen für +diese Umgebung können ebenfalls mit der Option \Option{captions} geändert +werden. Die dabei möglichen Werte für die jeweilige \PName{Einstellung} sind +\autoref{tab:maincls.captions} zu entnehmen. +% +\begin{desclist} + \desccaption[{Mögliche Werte für Option \Option{captions}}]{M% + ögliche Werte für Option \Option{captions} zur Einstellung der + Formatierung von Über"~ und Unterschriften in + Gleitumgebungen\label{tab:maincls.captions}% + }{% + Mögliche Werte für Option \Option{captions} (\emph{Fortsetzung})% + }% + \entry{\PValue{bottombeside}, \PValue{besidebottom}}{% + Gleitumgebungstitel der Umgebung \DescRef{\LabelBase.env.captionbeside} + (siehe \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) werden mit der untersten + Grundlinie auf Höhe der untersten Grundlinie des Inhalts der Gleitumgebung + ausgerichtet.% + \IndexOption{captions~=\textKValue{bottombeside}}}% + \entry{\PValue{centeredbeside}, \PValue{besidecentered}, + \PValue{middlebeside}, \PValue{besidemiddle}}{% + Gleitumgebungstitel der Umgebung \DescRef{\LabelBase.env.captionbeside} + (siehe \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) werden zum Inhalt der + Gleitumgebung vertikal zentriert ausgerichtet.% + \IndexOption{captions~=\textKValue{centeredbeside}}}% + \entry{\PValue{figureheading}, \PValue{figureabove}, \PValue{abovefigure}, + \PValue{topatfigure}% + \IndexOption{captions~=\textKValue{figureheading}}}{% + \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Bei Abbildungen wird (gegebenenfalls abweichend von + \OptionValue{captions}{signature}) die Formatierung als Überschrift + gewählt.}% + \entry{\PValue{figuresignature}, \PValue{figurebelow}, \PValue{belowfigure}, + \PValue{bottomatfigure}% + \IndexOption{captions~=\textKValue{figuresignature}}}{% + \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Bei Abbildungen wird (gegebenenfalls abweichend von + \OptionValue{captions}{heading}) die Formatierung als Unterschrift + gewählt.}% + \entry{\PValue{heading}, \PValue{above}, \PValue{top}% + \IndexOption{captions~=\textKValue{heading}}}{% + Gleitumgebungstitel\ChangedAt{v3.09}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} werden als Überschriften + formatiert. Dies hat jedoch keinen Einfluss darauf, ob sie über oder unter + der Gleitumgebung platziert werden. Die Option impliziert auch + \OptionValue{captions}{tableheading} und + \OptionValue{captions}{figureheading}.}% + \entry{\PValue{innerbeside}, + \PValue{besideinner}\IndexOption{captions~=\textKValue{innerbeside}}}{% + Gleitumgebungstitel der Umgebung \DescRef{\LabelBase.env.captionbeside} + (siehe \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) werden bei doppelseitigem Satz + in der Voreinstellung innen neben dem Inhalt der Gleitumgebung + gesetzt. Dies entspricht im einseitigen Satz + \OptionValue{captions}{leftbeside}.}% + \entry{\PValue{leftbeside}, + \PValue{besideleft}\IndexOption{captions~=\textKValue{leftbeside}}}{% + Gleitumgebungstitel der Umgebung \DescRef{\LabelBase.env.captionbeside} + (siehe \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) werden in der Voreinstellung + links neben dem Inhalt der Gleitumgebung gesetzt.}% + \pventry{nooneline}{% + Einzeilige Über"~ und Unterschriften von Gleitumgebungen werden nicht + gesondert, sondern genau wie mehrzeilige behandelt.% + \IndexOption{captions~=\textKValue{nooneline}}}% + \pventry{oneline}{% + Einzeilige Über"~ und Unterschriften von Gleitumgebungen werden gesondert + behandelt, um sie horizontal zu zentrieren.% + \IndexOption{captions~=\textKValue{oneline}}}% + \entry{\PValue{outerbeside}, \PValue{besideouter}% + \IndexOption{captions~=\textKValue{outerbeside}}}{% + Gleitumgebungstitel der Umgebung \DescRef{\LabelBase.env.captionbeside} + (siehe \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) werden bei doppelseitigem Satz + in der Voreinstellung außen neben dem Inhalt der Gleitumgebung + gesetzt. Dies entspricht im einseitigen Satz + \OptionValue{captions}{rightbeside}.}% + \entry{\PValue{rightbeside}, \PValue{besideright}% + \IndexOption{captions~=\textKValue{rightbeside}}}{% + Gleitumgebungstitel der Umgebung \DescRef{\LabelBase.env.captionbeside} + (siehe \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) werden in der Voreinstellung + rechts neben dem Inhalt der Gleitumgebung gesetzt.}% + \entry{\PValue{signature}, \PValue{below}, \PValue{bot}, \PValue{bottom}% + \IndexOption{captions~=\textKValue{signature}}}{% + \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Gleitumgebungstitel werden als Unterschriften formatiert. Dies hat jedoch + keinen Einfluss darauf, ob sie über oder unter der Gleitumgebung platziert + werden. Die Option impliziert auch \OptionValue{captions}{tablesignature} + und \OptionValue{captions}{figuresignature}.}% + \entry{\PValue{tableheading}, \PValue{tableabove}, \PValue{abovetable}, + \PValue{abovetabular}, \PValue{topattable}% + \IndexOption{captions~=\textKValue{tableheading}}}{% + Bei Tabellen wird (gegebenenfalls abweichend von + \OptionValue{captions}{signature}) die Formatierung als Überschrift + gewählt.}% + \entry{\PValue{tablesignature}, \PValue{belowtable}, \PValue{belowtabular}, + \PValue{bottomattable}% + \IndexOption{captions~=\textKValue{tablesignature}}}{% + Bei Tabellen wird (gegebenenfalls abweichend von + \OptionValue{captions}{heading}) die Formatierung als Unterschrift + gewählt.}% + \entry{\PValue{topbeside}, \PValue{besidetop}}{% + Gleitumgebungstitel der Umgebung \DescRef{\LabelBase.env.captionbeside} + (siehe \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) werden mit der obersten + Grundlinie auf Höhe der obersten Grundlinie des Inhalts der Gleitumgebung + ausgerichtet.% + \IndexOption{captions~=\textKValue{topbeside}}}% +\end{desclist}% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{caption}\OParameter{Verzeichniseintrag}\Parameter{Titel} + \Macro{captionbelow}\OParameter{Verzeichniseintrag}\Parameter{Titel} + \Macro{captionabove}\OParameter{Verzeichniseintrag}\Parameter{Titel} +\end{Declaration}% +Tabellen und Abbildungen werden bei den Standardklassen mit Hilfe der +Anweisung \Macro{caption} mit einem \PName{Titel} in Form einer +Unterschrift\Index{Tabellen>Unterschrift} versehen. Bei Abbildungen ist dies +grundsätzlich korrekt. Bei Tabellen wird gestritten, ob der \PName{Titel} als +Überschrift über oder konsistent mit der +Bildunterschrift\Index{Bildunterschrift} unter die Tabelle gehört. Daher +bietet \KOMAScript{}\textnote{\KOMAScript{} vs. Standardklassen} im +Gegensatz zu den Standardklassen die Anweisungen \Macro{captionbelow} für +\PName{Titel} in Form von Unterschriften und \Macro{captionabove} für +\PName{Titel} in Form von Überschriften. + +Sowohl bei Tabellen als auch bei Abbildungen oder generell für alle +Gleitumgebungen lässt sich das Verhalten von \Macro{caption} mit der Option +\DescRef{\LabelBase.option.captions}\IndexOption{captions} steuern, die am +Anfang dieses Abschnitts zu finden ist. Aus Gründen der Kompatibilität ist +voreingestellt, dass sich \Macro{caption} bei allen Gleitumgebungen wie +\Macro{captionbelow} verhält. Es wird jedoch empfohlen\textnote{Tipp!}, +Tabellenüberschriften zu verwenden und auf die Formatierung mit +\OptionValueRef{\LabelBase}{captions}{tableheading} entsprechend umzustellen +oder bei Tabellen auf \Macro{captionabove} zurückzugreifen. +% +\begin{Example} + Sie wollen mit + Tabellenüberschriften\Index{Tabellen>Ueberschrift=Überschrift} statt mit + Tabellenunterschriften arbeiten, weil Sie teilweise Tabellen haben, die über + mehr als eine Seite gehen. Mit den Standardklassen bliebe Ihnen nur die + Möglichkeit: +\begin{lstcode} + \begin{table} + \caption{Dies ist nur eine Beispieltabelle} + \begin{tabular}{llll} + Dies & ist & ein & Beispiel.\\\hline + Bitte & lassen & Sie & den \\ + Inhalt & dieser & Tabelle & unbeachtet. + \end{tabular} + \end{table} +\end{lstcode} + Damit hätten Sie das unschöne Ergebnis: + \begin{ShowOutput}\centering + {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:} + Dies ist nur eine + Beispieltabelle}\\ + \begin{tabular}{llll} + Dies & ist & ein & Beispiel.\\\hline + Bitte & lassen & Sie & den \\ + Inhalt & dieser & Tabelle & unbeachtet. + \end{tabular} + \end{ShowOutput} + Bei \KOMAScript{} schreiben Sie hingegen: +\begin{lstcode} + \begin{table} + \captionabove{Dies ist nur eine Beispieltabelle} + \begin{tabular}{llll} + Dies & ist & ein & Beispiel.\\\hline + Bitte & lassen & Sie & den \\ + Inhalt & dieser & Tabelle & unbeachtet. + \end{tabular} + \end{table} +\end{lstcode} + Sie erhalten dann das gewünschte Ergebnis: + \begin{ShowOutput}\centering + {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:} + Dies ist nur eine + Beispieltabelle}\\\vskip\abovecaptionskip + \begin{tabular}{llll} + Dies & ist & ein & Beispiel.\\\hline + Bitte & lassen & Sie & den \\ + Inhalt & dieser & Tabelle & unbeachtet. + \end{tabular} + \end{ShowOutput} + Da Sie konsequent nicht nur eine, sondern alle Tabellen mit Überschriften + versehen, können Sie stattdessen auch die Option + \OptionValueRef{\LabelBase}{captions}{tableheading} setzen (siehe + \DescPageRef{\LabelBase.option.captions.tableheading}). Dann genügt es, + wenn Sie wie bei den Standardklassen \Macro{caption} verwenden. Sie + erhalten trotzdem das Ergebnis von \Macro{captionabove}. +\end{Example} + +\BeginIndex[indexother]{}{Schrift>Art}% +\BeginIndex{FontElement}{caption}\LabelFontElement{caption}% +\BeginIndex{FontElement}{captionlabel}\LabelFontElement{captionlabel}% +Die Schriftart\ChangedAt{v2.8p}{% + \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} für die +Beschreibung und das Label~-- »Abbildung« oder »Tabelle«, gefolgt von der +Nummer und einem Trennzeichen -- kann über die Anweisungen +\DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) +verändert werden. Zuständig sind hier die Elemente \FontElement{caption}% +\important[i]{\FontElement{caption}\\\FontElement{captionlabel}} und +\FontElement{captionlabel} (siehe \autoref{tab:maincls.fontelements}, +\autopageref{tab:maincls.fontelements}). Dabei wird die Schriftart für das +Element \FontElement{caption} zunächst auch auf das Element +\FontElement{captionlabel} angewandt, bevor dessen spezifische Schriftart +Anwendung findet. Die Vorbelegungen sind \autoref{tab:maincls.captionFont} zu +entnehmen. +% +\begin{table} +% \centering% +% \caption + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt} + \begin{captionbeside} + [{Schriftvoreinstellungen für die Elemente der Tabellen- + oder\newline Abbildungsunterschrift + bzw. "~überschrift}] + {\label{tab:maincls.captionFont}% + Voreinstellungen der Schrift für die Elemente der Tabellen- + oder Abbildungsunterschrift bzw. "~überschrift} + [l] + \begin{tabular}[t]{ll} + \toprule + Element & Voreinstellung \\ + \midrule + \FontElement{caption} & \Macro{normalfont} \\ + \FontElement{captionlabel} & \Macro{normalfont} \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} +% +\begin{Example} + Sie wollen, dass Tabellen- und Abbildungsbeschreibungen in einer + kleineren Schriftart gesetzt werden. Also setzen Sie + beispielsweise in der Präambel Ihres Dokuments: +\begin{lstcode} + \addtokomafont{caption}{\small} +\end{lstcode} + Außerdem hätten Sie gerne, dass das Label serifenlos und fett + gedruckt wird. Sie setzen also außerdem: +\begin{lstcode} + \setkomafont{captionlabel}{\sffamily\bfseries} +\end{lstcode} + \iffalse % Umbruchkorrektur + Das Ergebnis wäre bei Verwendung von + \DescRef{\LabelBase.cmd.addtokomafont} in diesem Fall übrigens gleich. + \fi +\end{Example}% +\EndIndexGroup +\vskip -1\ht\strutbox plus .75\strutbox% Beispiel am Beschreibungsende + + +\begin{Declaration} + \Macro{captionof}\Parameter{Objekttyp}\OParameter{Verzeichniseintrag} + \Parameter{Titel} + \Macro{captionaboveof}\Parameter{Objekttyp}\OParameter{Verzeichniseintrag} + \Parameter{Titel} + \Macro{captionbelowof}\Parameter{Objekttyp}\OParameter{Verzeichniseintrag} + \Parameter{Titel} +\end{Declaration} +Ähnlich wie die Pakete \Package{caption}\IndexPackage{caption} und +\Package{capt-of}\IndexPackage{capt-of} bietet auch \KOMAScript{} die +Anweisung \Macro{captionof}\ChangedAt{v3.05}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} mit der man auch außerhalb einer +Gleitumgebung oder in einer fremden Gleitumgebung einen entsprechenden Titel +mit Eintrag in das jeweilige Verzeichnis setzen kann. Dabei muss im Gegensatz +zu \DescRef{\LabelBase.cmd.caption} die Art des Gleitobjekts als zusätzliches +erstes Argument angegeben werden. + +Darüber hinaus bietet \KOMAScript{} zusätzlich auch die Anweisungen +\Macro{captionaboveof}\ChangedAt{v3.09}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} und \Macro{captionbelowof}. Diese +dienen als Gegenstücke zu \DescRef{\LabelBase.cmd.captionabove} und +\DescRef{\LabelBase.cmd.captionbelow}. + +Selbstverständlich berücksichtigt\ChangedAt{v3.09a}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} \Macro{captionof} auch die +Einstellungen von Option \DescRef{\LabelBase.option.captions} bezüglich der +Formatierung des Titels als Über- oder Unterschrift. Diese Fähigkeit geht +jedoch eventuell durch das Laden von Paketen wie +\Package{capt-of}\IndexPackage{capt-of} oder +\Package{caption}\IndexPackage{caption} verloren. Bei Verwendung von +\Package{caption} ist die Anleitung zu diesem Paket zu beachten (siehe +\cite{package:caption})!% +\begin{Example} + Angenommen, Sie wollen ein Gleitobjekt erstellen, bei dem eine Tabelle und + eine Abbildung nebeneinander stehen. Da es keine gemischten Gleitobjekte gibt, + verwenden Sie primär eine \Environment{figure}-Umgebung: +\begin{lstcode} + \begin{figure} + \begin{minipage}{.5\linewidth} + \centering + \rule{4cm}{5cm} + \caption{Ein Rechteck}\label{fig:rechteck} + \end{minipage}% + \begin{minipage}{.5\linewidth} + \centering + \captionaboveof{table} + [Maße des Rechtecks aus + Abbildung~\ref{fig:rechteck}]% + {Rechtecksmaße} + \label{tab:rechteck} + \begin{tabular}{ll} + Breite: & 4\,cm\\ + Höhe: & 5\,cm + \end{tabular} + \end{minipage} + \end{figure} +\end{lstcode} + Um Abbildung und Tabelle nebeneinander zu setzen, wurden zwei + \Environment{minipage}-Umgebungen verwendet. % + \iffalse % Umbruchkorrektur + Wichtig\textnote{Achtung!} ist hier das Prozentzeichen nach der ersten + \Environment{minipage}, ohne das ein zusätzlicher Wortabstand zwischen die + beiden \Environment{minipage}-Umgebungen gesetzt würde.% + \else % + Wichtig\textnote{Achtung!} ist das Prozentzeichen nach der ersten + \Environment{minipage} zur Unterdrückung des Wortabstands zwischen den + Umgebungen.% + \fi % + + \iffalse % Umbruchkorrektur + Die Abbildungsunterschrift wurde mit \DescRef{\LabelBase.cmd.caption} + gesetzt. % + \fi % + Für die Tabellenüberschrift wurde \Macro{captionaboveof} verwendet. Als + erstes Argument wurde \PValue{table} angegeben. Dadurch weiß \KOMAScript{}, + dass es sich trotz \Environment{figure}-Umgebung um eine Tabellenüberschrift + handelt. + + Das optionale Argument von \Macro{captionaboveof} setzt den Eintrag in das + Tabellenverzeichnis. Ohne das optionale Argument würde der als letztes + Argument angegebene Titel ebenfalls in das Tabellenverzeichnis + geschrieben. Während dieser Titel im Gleitobjekt selbst völlig ausreichend + ist, wäre er jedoch im Tabellenverzeichnis wenig aussagekräftig. Daher wird + hier für das Verzeichnis ein abweichender Titel über das optionale Argument + verwendet. Das Ergebnis der Bemühungen zeigt + \autoref{fig:maincls.captionaboveof}.% +% +\begin{figure} +% \centering +% \caption + \KOMAoptions{captions=bottombeside}% + \setcapindent{0pt}% + \begin{captionbeside} + [{Beispiel: Verwendung von \Macro{captionaboveof} innerhalb einer + fremden Gleitumgebung}] + {\hspace{0pt plus 1ex}Verwendung von \Macro{captionaboveof} innerhalb einer + fremden Gleitumgebung\label{fig:maincls.captionaboveof}} + [l] + \begin{minipage}[b]{.66\linewidth}% + \raisebox{\depth}{\fbox{\KOMAoptions{captions=oneline}% + \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax} + \centering + \rule{4cm}{5cm} + \caption[Beispiel: Ein Rechteck]{Ein Rechteck}\label{fig:maincls.rechteck} + \end{minipage}% + \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax} + \centering + \captionaboveof{table}[Beispiel: Maße des Rechtecks aus + Abbildung~\ref{fig:maincls.rechteck}]{Rechteckmaße} + \label{tab:maincls.rechteck} + \begin{tabular}{ll} + Breite: & 4\,cm\\ + Höhe: & 5\,cm + \end{tabular} + \end{minipage}}}% + \end{minipage}% + \end{captionbeside}% +\end{figure}% +\end{Example}% +In gleicher Weise, wie in obigem Beispiel eine Tabelle innerhalb einer +Abbildungsumgebung gesetzt und mit einem Titel versehen wird, könnte man auch +eine nicht gleitende Tabelle außerhalb jeder Gleitumgebung setzen. Auch dabei +sollte in der Regel eine \Environment{minipage} verwendet werden, um zu +verhindern, dass zwischen Überschrift und Tabelle ein Seitenumbruch erfolgen +kann. Zusätzlich sollte man die \Environment{minipage} dann noch in eine +\Environment{flushleft}-Umgebung einbetten, um einerseits einen gefälligen +Abstand zum Text davor und dahinter zu erreichen und andererseits den +Absatzeinzug vor der \Environment{minipage} zu verhindern.% +\EndIndexGroup + + +\begin{Declaration} + \begin{Environment}{captionbeside} + \OParameter{Verzeichnistitel} + \Parameter{Titel} + \OParameter{Anordnung} + \OParameter{Breite} + \OParameter{Offset} + \begin{Body}\BodyDots\end{Body} + \end{Environment} + \labelsuffix[*] + \begin{Environment}{captionbeside} + \OParameter{Verzeichnistitel} + \Parameter{Titel} + \OParameter{Anordnung} + \OParameter{Breite} + \OParameter{Offset}\PValue{*} + \begin{Body}\BodyDots\end{Body} + \end{Environment} +\end{Declaration} +Neben \ChangedAt{v2.8q}{% + \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% +den Unter- und Überschriften findet man insbesondere bei kleineren Abbildungen +häufiger Beschreibungen, die neben der Abbildung gesetzt werden. Dabei +schließt normalerweise die Unterkante der Beschreibung mit der Unterkante der +Abbildung ab. Natürlich kann man mit etwas Geschick und beispielsweise zwei +\Macro{parbox}-Anweisungen dergleichen auch in den Standardklassen +erreichen. \KOMAScript{} bietet jedoch eine spezielle Umgebung. Diese Umgebung +kann innerhalb der Gleitumgebungen verwendet werden. Der erste optionale +Parameter \PName{Verzeichnistitel}% +\important{\PName{Verzeichnistitel}\\\PName{Titel}} und der obligatorische +Parameter \PName{Titel} entsprechen genau den gleichnamigen Parametern von +\DescRef{\LabelBase.cmd.caption}, \DescRef{\LabelBase.cmd.captionabove} oder +\DescRef{\LabelBase.cmd.captionbelow}. Der \PName{Titel} wird neben den Inhalt +der Umgebung gesetzt. + +Ob\important{\PName{Anordnung}} der \PName{Titel} rechts oder links daneben +gesetzt wird, kann mit dem optionalen Parameter \PName{Anordnung} bestimmt +werden. Es darf genau einer der folgenden Buchstaben angegeben werden: +\begin{labeling}[~--]{\quad\PValue{o}}\setlength{\itemsep}{-1\parsep plus 1ex}% +\item[\quad\PValue{l}] links +\item[\quad\PValue{r}] rechts +\item[\quad\PValue{i}] innen: auf rechten Seiten links, auf + linken Seiten rechts +\item[\quad\PValue{o}] außen: auf rechten Seiten rechts, auf + linken Seiten links +\end{labeling} +Voreingestellt ist rechts neben dem Inhalt der Umgebung. Diese +Voreinstellung\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} kann jedoch mit der Option +\DescRef{\LabelBase.option.captions}\IndexOption{captions}% +\important{\DescRef{\LabelBase.option.captions}} (siehe +\DescPageRef{\LabelBase.option.captions}) und deren Werte +\PValue{innerbeside}\IndexOption[indexmain]{captions~=\textKValue{innerbeside}}, +\PValue{leftbeside}\IndexOption[indexmain]{captions~=\textKValue{leftbeside}}, +\PValue{outerbeside}\IndexOption[indexmain]{captions~=\textKValue{outerbeside}} +und +\PValue{rightbeside}\IndexOption[indexmain]{captions~=\textKValue{rightbeside}} +verändert werden. Bei Verwendung der Anordnung außen oder innen werden unter +Umständen zwei \LaTeX-Läufe benötigt, um die korrekte Anordnung zu erreichen. + +Normalerweise\important{\PName{Breite}} nehmen der Inhalt der Umgebung und der +\PName{Titel} die gesamte verfügbare Breite ein. Es besteht jedoch die +Möglichkeit, mit dem optionalen Parameter \PName{Breite} eine andere Breite +anzugeben. Diese kann auch größer als die Breite des Textkörpers sein. + +Bei Angabe einer \PName{Breite}\important{\PName{Breite}\\\PName{Offset}} wird +die genutzte Breite normalerweise bezüglich der Breite des Textkörpers +zentriert. Mit dem optionalen Argument \PName{Offset} kann stattdessen eine +Verschiebung relativ zum linken Rand angegeben werden. Ein positiver Wert +entspricht einer Verschiebung nach rechts, ein negativer Wert einer +Verschiebung nach links. Mit einem \PName{Offset} von 0\Unit{pt} erfolgt die +Ausgabe linksbündig. + +Wird\important{\PValue{*}} hinter den optionalen Parameter \PName{Offset} noch +ein Stern gesetzt, so stellt der \PName{Offset} im doppelseitigen Druck auf +linken Seiten eine Verschiebung relativ zum rechten Rand dar. Ein positiver +Wert entspricht dann einer Verschiebung nach außen, während ein negativer Wert +für eine Verschiebung nach innen steht. Ein \PName{Offset} von 0\Unit{pt} wäre +dann also bündig zum inneren Rand. Diese Variante benötigt unter Umständen +zwei \LaTeX-Durchläufe, um die korrekte Verschiebung zu erreichen. + +Vertikal erfolgt die Ausrichtung in der Voreinstellung unten. Das bedeutet, +dass die untere Grundlinie des Inhalts des Gleitobjekts und die untere +Grundlinie von \PName{Titel} auf einer Höhe liegen. Diese +Einstellung\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} kann mit der Option +\DescRef{\LabelBase.option.captions}\IndexOption{captions}% +\important{\DescRef{\LabelBase.option.captions}} (siehe +\DescPageRef{\LabelBase.option.captions}) und deren Werte +\PValue{topbeside}\IndexOption[indexmain]{captions~=\textKValue{topbeside}}, +\PValue{centeredbeside}% +\IndexOption[indexmain]{captions~=\textKValue{centeredbeside}} und +\PValue{bottombeside}\IndexOption[indexmain]{captions~=\textKValue{bottombeside}} +verändert werden. Bei der Einstellung \PValue{topbeside} werden die oberen +Grundlinien von Gleitobjektinhalt und \PName{Titel} auf einer Höhe +ausgerichtet, während bei \PValue{centeredbeside} eine Zentrierung +stattfindet. In diesem Zusammenhang sei erwähnt, dass Abbildungen +normalerweise die Grundlinie unten haben. Dies kann beispielsweise mit der +Anweisung \Macro{raisebox}\IndexCmd{raisebox} verändert werden. + +\begin{Example} + \iffalse % Umbruchvarianten + Ein Beispiel für die Verwendung der \Environment{captionbeside}-""Umgebung + ist in \autoref{fig:maincls.captionbeside} zu finden. Gesetzt wurde diese + Abbildung mit:% + \else % + \autoref{fig:maincls.captionbeside} veranschaulicht die folgende Verwendung + der \Environment{captionbeside}-Umgebung:% + \fi + +\begin{lstcode} + \begin{figure} + \begin{captionbeside}% + [Beispiel: Bildbeschreibung daneben, unten]% + {Eine Bildbeschreibung weder über noch unter + der Abbildung, sondern unten daneben}% + [i][\dimexpr \linewidth + +\marginparwidth+\marginparsep\relax][0pt]* + \fbox{% + \parbox[b][5\baselineskip][c]{.25\textwidth} + {% + \hspace*{\fill}\KOMAScript + \hspace*{\fill}\par + }% + } + \end{captionbeside} + \label{fig:maincls.captionbeside} + \end{figure} +\end{lstcode} + \begin{figure} + \begin{captionbeside}[Beispiel: Bildbeschreibung daneben, unten]% + {Eine Bildbeschreibung weder über noch unter der Abbildung, + sondern unten daneben}[i][\linewidth] + \fbox{\parbox[b][5\baselineskip][c]{.25\textwidth}{% + \hspace*{\fill}\KOMAScript\hspace*{\fill}\par}} + \end{captionbeside} + \label{fig:maincls.captionbeside} + \end{figure} + Die Gesamtbreite ist also die aktuell verfügbare Breite + \PValue{\Macro{linewidth}} um $\Length{marginparwidth} + + \Length{marginparsep}$ nach + außen erweitert. Der Titel % + \iffalse % Umbruchkorrektur + oder die Beschreibung % + \fi % + steht innen neben der Abbildung. Damit erscheint die Abbildung selbst bis in + die Marginalienspalte in den Rand gerückt. + +\iffalse% Umbruchkorrekturtext + Mit \Macro{dimexpr} wird hier eine \eTeX-Anweisung verwendet, da + \KOMAScript{} dessen Verwendung voraussetzt und bei jeder halbwegs aktuellen + \LaTeX-Distribution ohnehin \eTeX{} verwendet wird.% +\fi + +\iffalse % Umrbuchalternativen + Die Zentrierung der Bildbeschreibung mit +\begin{lstcode} + \KOMAoption{captions}{centeredbeside} +\end{lstcode} + zeigt \autoref{fig:maincls.captionbesidecentered}. % +\iffalse % Umbruchalternativen + Auch der typografisch weniger bewanderte Anfänger wird sofort + erkennen, dass von dieser Ausrichtung normalerweise abzusehen ist.% +\else + Das ist jedoch sicher keine empfehlswerte Lösung.% +\fi +\else + \autoref{fig:maincls.captionbesidecentered} zeigt die wenig empfehlenswerte + Zentrierung der Bildbeschreibung mit: +\begin{lstcode} + \KOMAoption{captions}{centeredbeside} +\end{lstcode} +\fi + + \begin{figure} + \KOMAoption{captions}{centeredbeside} + \begin{captionbeside}[Beispiel: Bildbeschreibung daneben, mittig]% + {Eine Bildbeschreibung weder über noch unter der Abbildung, + sondern mittig daneben}[i][\linewidth] + \fbox{\parbox[b][5\baselineskip][c]{.25\textwidth}{% + \hspace*{\fill}\KOMAScript\hspace*{\fill}\par}} + \end{captionbeside} + \label{fig:maincls.captionbesidecentered} + \end{figure} + + Demgegenüber kann die Ausrichtung oben, die in + \autoref{fig:maincls.captionbesidetop} zu sehen ist, durchaus verwendet + werden. + + Zur Verdeutlichung, wie man \Macro{raisebox} zur Verschiebung der Grundlinie + nutzen kann, sei hier ein komplettes Beispiel angegeben. Eine solche + Verschiebung kann man nicht nur bei einer Ersatzgrafik wie zuvor angegeben, + sondern auch beispielsweise auf \Macro{includegraphics} (siehe + \cite{package:graphics}) anwenden: +\begin{lstcode} + \documentclass[captions=topbeside]{scrbook} + \usepackage[ngerman]{babel} + \usepackage{graphics} + \begin{document} + \chapter{Ein Beispiel} + \begin{figure} + \begin{captionbeside}% + [Beispiel: Bildbeschreibung daneben, oben]% + {Eine Bildbeschreibung oben, neben einem + Beispielbild aus Paket \texttt{mwe}}% + [i][\dimexpr\linewidth + \dimexpr\marginparwidth+\marginparsep\relax] + [0pt]* + \raisebox{% + \dimexpr\baselineskip-\totalheight\relax + }{% + \includegraphics{example-image-1x1}% + }% + \end{captionbeside} + \label{fig:maincls.captionbesidetop} + \end{figure} + \end{document} +\end{lstcode} + \begin{figure} + \KOMAoption{captions}{topbeside} + \begin{captionbeside}[Beispiel: Bildbeschreibung daneben, oben]% + {Eine Bildbeschreibung weder über noch unter der Abbildung, + sondern oben daneben}[i][\linewidth] + \raisebox{\dimexpr\baselineskip-\totalheight}{% + \fbox{% + \parbox[b][5\baselineskip][c]{.25\textwidth}{% + \hspace*{\fill}\KOMAScript\hspace*{\fill}\par}}% + }% + \end{captionbeside} + \label{fig:maincls.captionbesidetop} + \end{figure} +\end{Example} +\vskip -1\ht\strutbox plus .75\strutbox% Beispiel am Ende der Erklärung +% +\EndIndexGroup + + +\begin{Declaration} + \begin{Environment}{captionofbeside} + \Parameter{Objekttyp} + \OParameter{Verzeichnistitel} + \Parameter{Titel} + \OParameter{Anordnung} + \OParameter{Breite} + \OParameter{Offset} + \begin{Body}\BodyDots\end{Body} + \end{Environment} + \labelsuffix[*] + \begin{Environment}{captionofbeside} + \Parameter{Objekttyp} + \OParameter{Verzeichnistitel} + \Parameter{Titel} + \OParameter{Anordnung} + \OParameter{Breite} + \OParameter{Offset}\PValue{*} + \begin{Body}\BodyDots\end{Body} + \end{Environment} +\end{Declaration} +Wie\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} zu \DescRef{\LabelBase.cmd.caption} mit +\DescRef{\LabelBase.cmd.captionof} eine Variante existiert, bei der der +\PName{Objekttyp} nicht durch die Verwendung innerhalb einer Gleitumgebung +dieses Typs bestimmt wird, so gibt es passend zur Umgebung +\DescRef{\LabelBase.env.captionbeside} mit \Environment{captionofbeside} auch +eine entsprechende Umgebung. Im Unterschied zu +\DescRef{\LabelBase.env.captionbeside} ist auch hier der \PName{Objekttyp} als +zusätzliches, erstes Argument anzugeben.% +% +\EndIndexGroup + +\begin{Declaration} + \FloatStyle{komaabove} + \FloatStyle{komabelow} +\end{Declaration}% +Bei\OnlyAt{\Package{float}} Verwendung des +\Package{float}-Pakets\IndexPackage{float} wird das Aussehen der damit +definierten Gleitumgebungen allein vom \emph{float}-Stil bestimmt. Dies +schließt auch die Frage ein, ob mit Überschriften oder Unterschriften +gearbeitet wird. Im \Package{float}-Paket gibt es keinen vordefinierten Stil, +der im Aussehen dem von \KOMAScript{} entspricht und dieselben +Einstellmöglichkeiten (siehe unten) bietet. \KOMAScript{} definiert deshalb +zusätzlich die beiden Stile \PValue{komaabove} und \PValue{komabelow}. Diese +können bei Verwendung des \Package{float}-Pakets wie die dort definierten +Stile \PValue{plain}\IndexFloatstyle{plain}, +\PValue{boxed}\IndexFloatstyle{boxed} oder +\PValue{ruled}\IndexFloatstyle{ruled} aktiviert werden. Siehe dazu +\cite{package:float}. Beim Stil \PValue{komaabove} werden \DescRef{\LabelBase.cmd.caption}, +\DescRef{\LabelBase.cmd.captionabove} und \DescRef{\LabelBase.cmd.captionbelow} als Überschrift, beim Stil +\PValue{komabelow} als Unterschrift gesetzt.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{captionformat} +\end{Declaration}% +Bei {\KOMAScript} gibt es verschiedene Eingriffsmöglichkeiten, um die +Formatierung der Beschreibung zu ändern. Die Änderung der Schriftart +wurde bereits erläutert. Das oder die Trennzeichen zwischen dem Label +und dem eigentlichen Beschreibungstext sind im Makro +\Macro{captionformat} abgelegt. Abweichend von allen anderen +\Macro{\dots}format-Anweisungen ist hier also nicht der Zähler, +sondern nur die auf den Zähler folgenden Angaben enthalten. Die +Originaldefinition lautet: +\begin{lstcode} + \newcommand*{\captionformat}{:\ } +\end{lstcode} +Auch diese kann mit \Macro{renewcommand} geändert werden. +\begin{Example} + Aus mir unerfindlichen Gründen wollen Sie als Trennzeichen + keinen Doppelpunkt, gefolgt von einem Leerzeichen, sondern einen + Gedankenstrich einschließlich der notwendigen Leerzeichen. + Daher definieren Sie: +\begin{lstcode} + \renewcommand*{\captionformat}{~--~} +\end{lstcode} + Diese Definition sollten Sie beispielsweise in die Präambel Ihres + Dokuments stellen. +\end{Example} +% +\EndIndexGroup +\vskip -1\ht\strutbox plus .75\ht\strutbox% Beispiel am Ende + +\begin{Declaration} + \Macro{figureformat} + \Macro{tableformat} +\end{Declaration}% +Es wurde schon darauf hingewiesen, dass \DescRef{\LabelBase.cmd.captionformat} +keine Formatierung für das Label selbst enthält. Dieses sollte nun keineswegs +über Umdefinierung der Anweisungen für die Zählerausgabe, \Macro{thefigure} +oder \Macro{thetable}, verändert werden. Eine solche Umdefinierung hätte +nämlich auch Auswirkungen auf die Ausgabe von \Macro{ref} oder der +Verzeichnisse. Stattdessen bietet {\KOMAScript} zwei weitere \Macro{\dots + format}-Anweisungen. Diese sind wie folgt vordefiniert: +\begin{lstcode} + \newcommand*{\figureformat}{\figurename~\thefigure\autodot} + \newcommand*{\tableformat}{\tablename~\thetable\autodot} +\end{lstcode} +\iffalse % Umbruchvarianten +Sie können ebenfalls mit \Macro{renewcommand} eigenen Anforderungen +angepasst werden.% +\else % +Mit \Macro{renewcommand} können diese leicht umdefiniert werden.% +\fi % +\begin{Example} + Hin und wieder wird gewünscht, dass die Beschreibungstexte % + \iffalse % Umbruchvarianten + ganz ohne Label und natürlich auch ohne % + \else % + ohne Label und % + \fi % + Trennzeichen ausgegeben werden. Bei {\KOMAScript} genügen % + \iffalse % Umbruchvarianten + folgende Definitionen, um dies zu erreichen:% + \else % + dafür folgende Definitionen:% + \fi % +\begin{lstcode} + \renewcommand*{\figureformat}{} + \renewcommand*{\tableformat}{} + \renewcommand*{\captionformat}{} +\end{lstcode} + Dabei ist jedoch zu beachten, dass die Nummerierung damit zwar nicht + ausgegeben, aber dennoch fortgezählt wird. Dies ist insbesondere dann + von Bedeutung, wenn die Umdefinierungen nur auf einzelne + \Environment{figure}- oder \Environment{table}-Umgebungen angewendet + werden. +\end{Example} +% +\EndIndexGroup +\vskip -1\ht\strutbox plus .75\ht\strutbox% Beispiel am Ende der Erklärung + +\begin{Declaration} + \Macro{setcapindent}\Parameter{Einzug} + \Macro{setcapindent*}\Parameter{Einzug} + \Macro{setcaphanging} +\end{Declaration}% +Wie bereits erwähnt wurde, werden in den +Standardklassen\textnote{\KOMAScript{} vs. Standardklassen} die +Beschreibungen nicht hängend gesetzt. Das heißt: In mehrzeiligen +Beschreibungen beginnt die zweite Zeile direkt unter dem Labeltext. +Es gibt bei den Standardklassen auch keinen Mechanismus, dies direkt +zu beeinflussen. Bei {\KOMAScript} werden hingegen alle Zeilen ab der +zweiten so weit eingerückt, dass diese nicht mehr unter dem Label, +»Abbildung~\dots:« oder »Tabelle~\dots:«, sondern unter dem +eigentlichen Text der ersten Zeile beginnen. + +Dieses Verhalten, das der Verwendung von \Macro{setcaphanging} entspricht, +kann bei {\KOMAScript} jederzeit durch \Macro{setcapindent} oder +\Macro{setcapindent*} geändert werden. Dabei gibt der Parameter \PName{Einzug} +an, wie weit ab der zweiten Zeile eingerückt werden soll. Soll nach dem Label +und vor dem Beschreibungstext noch ein Zeilenumbruch erfolgen, so definieren +Sie die Einrücktiefe \PName{Einzug} der Beschreibung stattdessen mit der +Sternvariante der Anweisung: \Macro{setcapindent*}. Mit einem negativen +\PName{Einzug} bei \Macro{setcapindent} erreicht man hingegen, dass vor der +Beschreibung ebenfalls ein Umbruch erfolgt und nur die erste Zeile der +Beschreibung, nicht jedoch die folgenden, um den Betrag von \PName{Einzug} +eingerückt werden. + +Ob einzeilige Beschreibungen wie mehrzeilige Beschreibungen gesetzt werden +oder eine Sonderbehandlung erfahren, wird über die Option +\DescRef{\LabelBase.option.captions} gewählt. Siehe hierzu die Erklärung zu +den Werten \PValue{oneline} und \PValue{nooneline} dieser Option auf +\DescPageRef{\LabelBase.option.captions.oneline}. + +\begin{Example} + Die \hyperref[fig:maincls.caption.first]{% + Abbildungen~\ref*{fig:maincls.caption.first}} bis + \ref{fig:maincls.caption.last} zeigen die Auswirkungen unterschiedlicher + Einstellungen. Es wird deutlich, dass bei geringer Spaltenbreite der + komplett hängende Einzug unvorteilhaft ist. Der Quelltext der zweiten + Abbildung sei hier mit gekürzter Unterschrift beispielhaft + wiedergegeben: +\begin{lstcode} + \begin{figure} + \setcapindent{1em} + \fbox{\parbox{.95\linewidth}{% + \centering\KOMAScript}} + \caption{Beispiel mit teilweise hängendem Einzug + ab der zweiten Zeile} + \end{figure} +\end{lstcode} + \begin{figure} + \typeout{^^J--- Ignore underfull and overfull \string\hbox:} + \addtokomafont{caption}{\small} + \addtokomafont{captionlabel}{\bfseries} + \centering% + \begin{minipage}{.92\linewidth} + \begin{minipage}[t]{.48\linewidth}\sloppy + \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} + \caption[Beispiel: Bildunterschrift mit Voreinstellung]% + {Mit der Stan\-dard\-ein\-stel\-lung, also wie bei + Verwendung von \Macro{setcaphanging}} + \label{fig:maincls.caption.first} + \end{minipage} + \hspace{.02\linewidth} + \begin{minipage}[t]{.48\linewidth}\sloppy + \setcapindent{1em} + \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} + \caption[Beispiel: Bildunterschrift mit teilweise hängendem Einzug]% + {Mit teilweise häng"-endem Einzug ab der zweiten Zeile durch + Verwendung von \Macro{setcapindent}\PParameter{1em}} + \end{minipage} + \end{minipage} + %\end{figure} + \par\bigskip\noindent% + %\begin{figure} + %\addtokomafont{caption}{\small} + %\addtokomafont{captionlabel}{\bfseries} + %\centering + \begin{minipage}{.9\linewidth} + \begin{minipage}[t]{.48\linewidth}\sloppy + \setcapindent*{1em} + \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} + \caption[Beispiel: Bildunterschrift mit hängendem Einzug und Umbruch]% + {Mit hängendem Einzug ab der zweiten Zeile und Umbruch vor + der Beschreibung durch Verwendung von + \Macro{setcapindent*}\PParameter{1em}} + \end{minipage} + \hspace{.02\linewidth} + \begin{minipage}[t]{.48\linewidth}\sloppy + \setcapindent{-1em} + \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} + \caption[Beispiel: Bildunterschrift mit Einzug in der zweiten Zeile]% + {Mit Einzug lediglich in der zweiten Zeile und einem Umbruch + vor der Beschreibung durch Verwendung von + \Macro{setcapindent}\PParameter{-1em}} + \label{fig:maincls.caption.last} + \end{minipage} + \end{minipage} + \typeout{^^J--- Don't ignore underfull and overfull + \string\hbox:^^J} + \end{figure} +\end{Example} +Wie im Beispiel zu sehen ist, kann die Formatierung auch lokal innerhalb einer +Gleitumgebung geändert werden. Die Änderung gilt dann nur für die eine +Umgebung. Nachfolgende Abbildungen und Tabellen werden wieder mit den +Grundeinstellungen oder den globalen Einstellungen, die Sie beispielsweise in +der Dokumentpräambel vorgenommen haben, gesetzt.% +\EndIndexGroup + +\begin{Declaration} + \Macro{setcapwidth}\OParameter{Ausrichtung}\Parameter{Breite} + \Macro{setcapdynwidth}\OParameter{Ausrichtung}\Parameter{Breite} + \Macro{setcapmargin}\OParameter{Rand \kern-.25em links}\Parameter{Rand} + \Macro{setcapmargin*}\OParameter{Rand \kern-.25em innen}\Parameter{Rand} +\end{Declaration} +Mit\ChangedAt{v2.8q}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} Hilfe dieser Befehle kann die Breite und Anordnung der +Beschreibung beeinflusst werden. Normalerweise steht die gesamte Text- oder +Spaltenbreite zur Verfügung. Mit\important{\Macro{setcapwidth}} der Anweisung +\Macro{setcapwidth} kann diese \PName{Breite} reduziert werden. Dabei gibt das +obligatorische Argument die maximale für die Beschreibung verwendete +\PName{Breite} an. Als optionales Argument kann genau ein Buchstabe übergeben +werden, der die horizontale Ausrichtung der Beschreibung bestimmt. Die +möglichen Ausrichtungen finden Sie in der folgenden Liste. +\begin{labeling}[~--]{\quad\PValue{o}}\setlength{\itemsep}{-1\parsep plus 1ex}% +\item[\quad\PValue{l}] links +\item[\quad\PValue{r}] rechts +\item[\quad\PValue{i}] innen: auf rechten Seiten links, auf + linken Seiten rechts +\item[\quad\PValue{o}] außen: auf rechten Seiten rechts, auf + linken Seiten links +\end{labeling} +Die Ausrichtung innen und außen entspricht im einseitigen Satz linksbündig und +rechtsbündig. Innerhalb\textnote{Achtung!} von +\Package{longtable}\IndexPackage{longtable}-Tabellen% +\important{\Package{longtable}} funktioniert die Ausrichtung innen und außen +nicht korrekt. Insbesondere werden Beschreibungen von Folgeseiten bei diesen +Tabellen immer nach den Beschreibungen der ersten Teiltabelle +ausgerichtet. Dies ist ein konzeptionelles Problem des Pakets +\Package{longtable}. + +Zu\ChangedAt{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\textnote{Achtung!} beachten ist, dass die an +\Macro{setcapwidth} übergebene \PName{Breite} wie bei \Macro{setlength} zum +Zeitpunkt der Zuweisung ausgewertet +wird. Will\important{\Macro{setcapdynwidth}} man hingegen, dass \PName{Breite} +erst bei der Verwendung ausgewertet wird, kann man stattdessen +\Macro{setcapdynwidth} verwenden. Unterschiede gibt es beispielsweise, wenn +Längen wie \Length{linewidth} oder andere Anweisungen als Argument verwendet +werden. + +Mit\important{\Macro{setcapmargin}} der Anweisung \Macro{setcapmargin} kann +statt der Breite der Beschreibung ein \PName{Rand} angegeben werden, der neben +der Beschreibung zusätzlich zum normalen Textrand eingehalten werden soll. +Sollen der Rand rechts und links nicht identisch gewählt werden, kann mit dem +optionalen Argument ein von \PName{Rand} abweichender \PName{Rand \kern-.25em + links} von der Beschreibung eingestellt +werden. Bei\important{\Macro{setcapmargin*}} der Sternvariante +\Macro{setcapmargin*} wird statt \PName{Rand \kern-.25em links} im +doppelseitigen Satz \PName{Rand \kern-.25em innen} abweichend definiert. +Hier\textnote{Achtung!} ergibt sich bei +\Package{longtable}\IndexPackage{longtable}-Tabellen% +\important{\Package{longtable}} das gleiche Problem wie bei der Ausrichtung +außen oder innen bei der Anweisung \Macro{setcapwidth}. Die Verwendung von +\Macro{setcapmargin} oder \Macro{setcapmargin*} aktiviert außerdem +\OptionValueRef{\LabelBase}{captions}{nooneline} (siehe +\DescPageRef{\LabelBase.option.captions.nooneline}) für die Beschreibungen, +die mit dieser Randeinstellung gesetzt werden. + +\iffalse% Umbruchkorrektur +Man\textnote{Tipp!} kann übrigens auch negative Werte für \PName{Rand} und +\PName{Rand \kern-.25em rechts} oder \PName{Rand \kern-.25em außen} +angeben. Dadurch erreicht man, dass die Beschreibung in den entsprechenden +Rand hineinragt.% +\else % +Soll\textnote{Tipp!} die Beschreibung in einen Rand ragen, gibt man übrigens +für das entsprechende Argument einfach einen negativen Wert an.% +\fi % +\iffalse\par% Anhang wurde entfernt. +Für\textnote{Tipp!} Experten und versierte Anwender ist eine etwas +trickreiche Anwendung für \Macro{setcapwidth} in +\iffree{\cite{book:komascript}}{\autoref{cha:floattricks}, + \autopageref{cha:floattricks}} zu finden.% +\fi% +% +\EndIndexGroup + +\begin{Declaration} + \Macro{setcaptionalignment}\OParameter{Gleitumgebung}\Parameter{Ausrichtung} +\end{Declaration} +Normalerweise\ChangedAt{v3.25}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} werden mehrzeilige\textnote{Ausrichtung mehrzeiliger + Beschreibungen} Beschreibungen im Blocksatz gesetzt. Dies entspricht +\Macro{setcaptionalignment}\PParameter{j}. Manchmal wird allerdings eine davon +abweichende Ausrichtung gewünscht, beispielsweise linksbündiger +Flattersatz. Eine entsprechende Änderung ist mit \Macro{setcaptionalignment} +jederzeit möglich. Für \PName{Ausrichtung} kann dabei genau einer der +Buchstaben aus \autoref{tab:maincls.captionalignment} angegeben werden. Wird +eine unbekannte \PName{Ausrichtung} angegeben, so resultiert dies in einer +Fehlermeldung. +% +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside} + [{Ausrichtungen für mehrzeilige Beschreibungen in Gleitumgebungen}] + {\label{tab:maincls.captionalignment}% + Ausrichtungen für mehrzeilige Beschreibungen in Gleitumgebungen} + [l] + \begin{tabular}[t]{ll} + \toprule + c & zentriert \\ + j & Blocksatz \\ + l & linksbündig \\ + r & rechtsbündig \\ + C & zentriert mit \Package{ragged2e} \\ + J & Blocksatz mit \Package{ragged2e} \\ + L & linksbündig mit \Package{ragged2e} \\ + R & rechtsbündig mit \Package{ragged2e} \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} + +Die vier Möglichkeiten mit Paket +\Package{ragged2e}\important{\Package{ragged2e}}\IndexPackage{ragged2e} stehen +nur zur Verfügung, wenn das Paket vor Verwendung von +\Macro{setcaptionalignment} geladen wurde. Anderenfalls werden sie auf die +entsprechenden Möglichkeiten ohne \Package{ragged2e} abgebildet. Zur +Sicherheit wird in diesem Fall eine Warnung ausgegeben. + +Verwendet man den Befehl ohne\textnote{kein optionaler Parameter} den +optionalen Parameter, so hängt das Ergebnis davon ab, ob der Aufruf innerhalb +oder außerhalb einer Gleitumgebung stattfindet. Innerhalb einer Gleitumgebung +wird dann die Ausrichtung für diese Gleitumgebung gesetzt. Außerhalb wird +hingegen ein leerer optionaler Parameter angenommen. + +Beim Aufruf mit einem leeren\textnote{leerer optionaler Parameter} optionalen +Parameter oder außerhalb einer Gleitumgebung auch komplett ohne optionalen +Parameter wird die allgemeine Ausrichtung festgelegt. Diese wird immer dann +verwendet, wenn keine Ausrichtung für den aktuellen Gleitumgebungstyp +definiert ist. + +Will man nur die Ausrichtung eines bestimmen Typs\textnote{mit + \PName{Gleitumgebung}} von Gleitumgebungen festlegen, ohne +\PName{Ausrichtung} auch für andere Arten von Gleitumgebungen zu verändern, so +gibt man den Typ der Gleitumgebung, beispielsweise \PValue{figure} oder +\PValue{table}, als optionalen Parameter \PName{Gleitumgebung} an. +% +\begin{Example} + Sie wollen, dass Bildunterschriften auch dann vollständig zentriert unter + den Bildern stehen, wenn sie mehrzeilig sind. Um das zunächst einmal nur für + eine einzige Abbildung zu testen, verwenden Sie\textnote{in der + Gleitumgebung}: +\begin{lstcode} + \begin{figure} + \centering + \setcaptionalignment{c} + \includegraphics{example-image} + \caption{\blindtext} + \end{figure} +\end{lstcode} + Da Sie mit dem Ergebnis zufrieden sind, verschieben Sie die + Anweisung\textnote{in der Dokumentpräambel} +\begin{lstcode} + \setcaptionalignment{c} +\end{lstcode} + in die Dokumentpräambel. Daraufhin bemerken Sie allerdings, dass Ihnen + diese Änderung für Tabellenüberschriften überhaupt nicht gefällt. Daher + beschränken Sie mit\textnote{nur für Abbildungen} +\begin{lstcode} + \setcaptionalignment[figure]{c} +\end{lstcode} + die Zentrierung auf Abbildungen. + + Etwas später stellen Sie fest, dass die Zentrierung doch nicht so günstig + ist. Stattdessen wollen Sie nun lieber eine linksbündige Ausrichtung im + Flattersatz haben. Also ändern Sie die Anweisung erneut zu: +\begin{lstcode} + \setcaptionalignment[figure]{l} +\end{lstcode} + Allerdings gefällt Ihnen nun nicht, dass die Zeilen sehr unterschiedlich + lang werden. Als Ursache machen Sie die fehlende Trennung aus, wodurch lange + Wörter komplett in die nächste Zeile rutschen und so große Lücken + hinterlassen. Also wollen Sie zusätzlich Trennung nach Bedarf + ermöglichen. Dies ist mit Hilfe des Pakets + \Package{ragged2e}\important{\Package{ragged2e}}\IndexPackage{ragged2e} + leicht möglich. Dabei genügt es allerdings nicht, das Paket mit +\begin{lstcode} + \usepackage{ragged2e} +\end{lstcode} + zu laden. Auch Option \Option{newcommands} beim Laden des Pakets bringt + keine Abhilfe. Stattdessen muss zusätzlich die \PName{Ausrichtung} geändert + werden: +\begin{lstcode} + \usepackage{ragged2e} + \setcaptionalignment[figure]{L} +\end{lstcode} + Beachten\textnote{Achtung!} Sie den Großbuchstabe für \PName{Ausrichtung}. +\end{Example} +\EndIndexGroup + + +\begin{Declaration} + \Option{origlongtable} +\end{Declaration}% +\BeginIndex{Package}{longtable}% +Falls die Tabellenüberschriften des \Package{longtable}-Pakets (siehe +\cite{package:longtable}) von den \KOMAScript-Klassen nicht umdefiniert werden +sollen, kann die Option \Option{origlongtable} % +\iffalse % Umbruchkorrektur +gesetzt werden. Diese Option\textnote{Achtung!} ist als optionales Argument +von \DescRef{\LabelBase.cmd.documentclass} zu verwenden. % +\else % +beim Laden der Klasse gesetzt werden. \textnote{Achtung!}% +\fi % +Eine Einstellung per \DescRef{\LabelBase.cmd.KOMAoptions} oder +\DescRef{\LabelBase.cmd.KOMAoption} wird nicht unterstützt. +% +\EndIndexGroup +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{listof}{Einstellung} +\end{Declaration} +Normalerweise\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} werden Verzeichnisse von Gleitumgebungen --~wie das +Tabellen"~\Index{Tabellen>Verzeichnis} und das +Abbildungsverzeichnis\Index{Abbildungen>Verzeichnis}~-- nicht nummeriert oder +in das Inhaltsverzeichnis aufgenommen. In \autoref{sec:\LabelBase.toc} wurde +dies bereits näher ausgeführt. Alternativ zu den dort erwähnten Einstellungen +\OptionValueRef{\LabelBase}{toc}{nolistof}% +\IndexOption{toc~=\textKValue{nolistof}}, +\OptionValueRef{\LabelBase}{toc}{listof}\IndexOption{toc~=\textKValue{listof}} +und \OptionValueRef{\LabelBase}{toc}{listofnumbered}% +\IndexOption{toc~=\textKValue{listofnumbered}}, kann dieses Verhalten auch aus +Sicht der Verzeichnisse selbst gesehen werden. Daher kann man die gleichen +Ergebnisse auch mit den Einstellungen \OptionValue{listof}{notoc}, +\OptionValue{listof}{totoc} und \OptionValue{listof}{numbered} erreichen. + +Dabei wird in der Voreinstellung für die Überschriften der Verzeichnisse die +oberste verfügbare Gliederungsebene unterhalb von +\DescRef{\LabelBase.cmd.part} verwendet. Bei \Class{scrbook} und +\Class{scrreprt} ist das die Kapitelebene, bei \Class{scrartcl} die +Abschnittsebene. Mit\important{\OptionValue{listof}{leveldown}}% +\ChangedAt{v3.06}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} +Hilfe der Einstellung \OptionValue{listof}{leveldown} kann hingegen die +nächsttiefere Gliederungsebene verwendet +werden. \important{\OptionValue{listof}{standardlevel}}% +\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% +\OptionValue{listof}{standardlevel} schaltet bei Bedarf wieder zurück auf die +voreingestellte Gliederungsebene. +\begin{Example} + Sie wollen in einem Buch das Abbildungs- und das Tabellenverzeichnis als + Unterverzeichnisse eines gemeinsamen Verzeichnisses »Abbildungen und + Tabellen« setzen. Dazu verwenden Sie einfach: +\begin{lstcode} + \KOMAoption{listof}{leveldown} +\end{lstcode} + und dann an entsprechender Stelle Ihres Dokuments: +\begin{lstcode} + \addchap*{Abbildungs- und Tabellenverzeichnis} + \listoffigures + \listoftables +\end{lstcode} + Näheres zur Anweisung \DescRef{\LabelBase.cmd.addchap*} ist + \autoref{sec:\LabelBase.structure}, \DescPageRef{\LabelBase.cmd.addchap*} zu + entnehmen. +\end{Example} + +Normalerweise\ChangedAt{v2.8q}{% + \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} werden die +Verzeichnisse\Index{Abbildungen>Verzeichnis}\Index{Tabellen>Verzeichnis} +der Gleitumgebungen so formatiert, dass für die Nummer ein Raum fester Breite +verwendet wird. Gleichzeitig werden alle Einträge leicht eingezogen. Dies +entspricht der Verwendung der Einstellung +\OptionValue{listof}{graduated}\IndexOption{listof~=\textKValue{graduated}}. + +Werden die Nummern sehr breit, weil beispielsweise sehr viele Tabellen +verwendet werden, so reicht der vorgesehene Platz irgendwann nicht mehr aus. +Vergleichbar\important{\OptionValue{listof}{flat}} zur Einstellung +\OptionValueRef{\LabelBase}{toc}{flat}\IndexOption{toc~=\textKValue{flat}} für +das Inhaltsverzeichnis bietet \KOMAScript{} daher die Einstellung +\OptionValue{listof}{flat}\IndexOption{listof~=\textKValue{flat}} für die +Verzeichnisse der Gleitumgebungen. Dabei wird die Breite der Nummern +automatisch ermittelt und der Platz entsprechend angepasst. Bezüglich der +Nebenwirkungen und Funktionsweise gilt, was in \autoref{sec:\LabelBase.toc}, +\DescPageRef{\LabelBase.option.toc.flat} für die Einstellung +\OptionValueRef{\LabelBase}{toc}{flat} erklärt wurde. Es sei an dieser Stelle +jedoch nochmals darauf hingewiesen, dass mit der Einstellung +\OptionValue{listof}{flat} mehrere \LaTeX-Durchläufe benötigt werden, bis die +Verzeichnisse ihre endgültige Form erhalten haben. + +Die Einstellung \OptionValue{listof}{flat} wird automatisch aktiviert, falls +die Einstellung +\OptionValue{listof}{entryprefix}\ChangedAt{v3.06}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} verwendet +wird. Normalerweise\important{\OptionValue{listof}{entryprefix}} ist es nicht +sinnvoll jeden Eintrag in eines der Verzeichnisse der Gleitumgebungen mit +einem Präfix wie »Abbildung« oder »Tabelle« zu versehen, da natürlich im +Abbildungsverzeichnis nur Abbildungen und im Tabellenverzeichnis nur Tabellen +zu finden sind. Damit hat ein solcher Präfix keinen zusätzlichen +Informationswert und wird in der Voreinstellung auch weggelassen. Mit der +Einstellung \OptionValue{listof}{entryprefix} wird ein solcher Präfix jedoch +gesetzt. Dabei erhalten alle Einträge eines Verzeichnisses denselben +Präfix. Dieser richtet sich nach dem Dateianhang der Hilfsdatei, die für das +Verzeichnis verwendet wird. Für das Abbildungsverzeichnis, das den Dateianhang +»\File{lof}« besitzt, wird beispielsweise \Macro{listoflofentryname} verwendet, +während für das Tabellenverzeichnis, das den Dateianhang »\File{lot}« besitzt, +\Macro{listoflotentryname} verwendet wird. + +Bei den Klassen \Class{scrbook} und +\Class{scrreprt}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} fügt +\KOMAScript{} in der Voreinstellung bei jedem Kapitelanfang einen vertikalen +Abstand in die Verzeichnisse der Gleitumgebungen ein. Dieses Verhalten, das es +auch bei den Standardklassen gibt, dient dazu, diese Verzeichnisse nach +Kapiteln zu gruppieren. Es entspricht bei \KOMAScript{} der +Einstellung\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} \OptionValue{listof}{chaptergapsmall}% +\LabelOptionValue{listof}{chaptergapsmall}% +\important{\OptionValue{listof}{chaptergapsmall}}% +\IndexOption{listof~=\textKValue{chaptergapsmall}}. Dabei wird ein fester +vertikaler Abstand von 10\Unit{pt} +verwendet. Mit\important{\OptionValue{listof}{chaptergapline}} der Einstellung +\OptionValue{listof}{chaptergapline}% +\IndexOption{listof~=\textKValue{chaptergapline}} kann man stattdessen einen +vertikalen Abstand von einer Zeile +erreichen. Mit\important{\OptionValue{listof}{nochaptergap}} +\OptionValue{listof}{nochaptergap}% +\IndexOption{listof~=\textKValue{nochaptergap}} kann man den vertikalen +Abstand komplett +abschalten. Eine\important{\OptionValue{listof}{chapterentry}} Besonderheit +stellt die Einstellung \OptionValue{listof}{chapterentry}% +\IndexOption{listof~=\textKValue{chapterentry}} dar. Dabei wird statt des +Abstandes der Inhaltsverzeichniseintrag für das Kapitel in das Verzeichnis der +Gleitumgebungen eingefügt. Es\textnote{Achtung!} wird darauf hingewiesen, dass +ein solcher Eintrag auch dann erfolgt, wenn das Kapitel keine Gleitumgebung +enthält. Eine Lösung, bei der nur Kapitel mit Gleitumgebungen im jeweiligen +Verzeichnis angezeigt werden, finden Sie unter +\cite{https://komascript.de/comment/5070}. Eine noch direktere Beeinflussung, +was in den Verzeichnissen der Gleitumgebungen bei neuen Kapiteln geschehen +soll, ist mit der Option \DescRef{\LabelBase.option.chapteratlists} zu +erreichen, die in \autoref{sec:\LabelBase.structure} auf +\DescPageRef{\LabelBase.option.chapteratlists} erläutert wird. + +Ein Überblick über alle möglichen Werte für die \PName{Einstellung} von +\Option{listof} ist in \autoref{tab:maincls.listof} zu finden. + +\begin{desclist} + \desccaption[{Mögliche Werte für Option \Option{listof}}]{% + Mögliche Werte für Option \Option{listof} zur Einstellung von Form und + Inhalt der Verzeichnisse der Gleitumgebungen\label{tab:maincls.listof}% + }{% + Mögliche Werte für Option \Option{listof} (\emph{Fortsetzung})% + }% + \entry{\PValue{chapterentry}, \PValue{withchapterentry}}{% + Kapitelanfänge werden in den Verzeichnissen der Gleitumgebungen durch + einen Inhaltsverzeichniseintrag des Kapitels markiert.% + \IndexOption{listof~=\textKValue{chapterentry}}}% + \entry{\PValue{chaptergapline}, \PValue{onelinechaptergap}}{% + Kapitelanfänge werden in den Verzeichnissen der Gleitumgebungen durch + einen Abstand von einer Zeile markiert.% + \IndexOption{listof~=\textKValue{chaptergapline}}}% + \entry{\PValue{chaptergapsmall}, \PValue{smallchaptergap}}{% + Kapitelanfänge werden in den Verzeichnissen der Gleitumgebungen durch + einen kleinen Abstand markiert.% + \IndexOption{listof~=\textKValue{chaptergapsmall}}}% + \entry{\PValue{entryprefix}}{% + \ChangedAt{v3.06}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Jeder Verzeichniseintrag wird mit einem vom Verzeichnis abhängenden Präfix + vor der Nummer versehen. Der Präfix ist normalerweise sprachabhängig, + beispielsweise bei deutschen Spracheinstellungen »Abbildung« für das + Abbildungsverzeichnis und »Tabelle« für das Tabellenverzeichnis, jeweils + gefolgt von einem Leerzeichen.% + \IndexOption{listof~=\textKValue{entryprefix}}}% + \entry{\PValue{flat}, \PValue{left}}{% + Die Verzeichnisse der Gleitumgebungen erhalten eine tabellarische + Form. Die Gleitumgebungsnummern sind dabei die erste Spalte, der Titel die + zweite Spalte, die Seitenzahlen die dritte Spalte. Der Platz, der für die + Gleitumgebungsnummern reserviert wird, richtet sich nach dem benötigten + Platz des vorherigen \LaTeX-Laufs.% + \IndexOption{listof~=\textKValue{flat}}}% + \entry{\PValue{graduated}, \PValue{indent}, \PValue{indented}}{% + Die Verzeichnisse der Gleitumgebungen erhalten eine hierarchische Form. Es + steht nur ein begrenzter Platz für die Gleitumgebungsnummern zur + Verfügung.% + \IndexOption{listof~=\textKValue{graduated}}}% + \entry{\PValue{indenttextentries}, \PValue{indentunnumbered}, + \PValue{numberline}}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Die Eigenschaft \PValue{numberline} (siehe \autoref{sec:tocbasic.toc}, + \DescPageRef{tocbasic.cmd.setuptoc}) wird für die Verzeichnisse der + Gleitumgebungen, beispielsweise das Abbildungs"~ und das + Tabellenverzeichnis, gesetzt. Dadurch werden nicht nummerierte Einträge + linksbündig mit dem Text von nummerierten Einträgen gleicher Ebene + gesetzt. Allerdings bieten die \KOMAScript-Klassen selbst keine nicht + nummerierten Einträge in diese Verzeichnisse. Dies hat daher nur + Auswirkungen auf entsprechende Einträge, die nicht von den Klassen selbst, + aber dennoch mit Hilfe von \DescRef{tocbasic.cmd.addxcontentsline} (siehe + \autoref{sec:tocbasic.toc}, \DescPageRef{tocbasic.cmd.addxcontentsline}) + erzeugt werden.% + \IndexOption{toc~=\textKValue{numberline}}}% + \entry{\PValue{leftaligntextentries}, \PValue{leftalignunnumbered}, + \PValue{nonumberline}}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Die Eigenschaft \PValue{numberline} (siehe \autoref{sec:tocbasic.toc}, + \DescPageRef{tocbasic.cmd.setuptoc}) wird für die Verzeichnisse der + Gleitumgebungen, beispielsweise das Abbildungs"~ und das + Tabellenverzeichnis, gelöscht. Dadurch werden nicht nummerierte Einträge + linksbündig mit der Nummer von nummerierten Einträgen gleicher Ebene + gesetzt. Allerdings bieten die \KOMAScript-Klassen selbst keine nicht + nummerierten Einträge in diese Verzeichnisse. Dies hat daher nur + Auswirkungen auf entsprechende Einträge, die nicht von den Klassen selbst, + aber dennoch mit Hilfe von \DescRef{tocbasic.cmd.addxcontentsline} (siehe + \autoref{sec:tocbasic.toc}, \DescPageRef{tocbasic.cmd.addxcontentsline}) + erzeugt werden.% + \IndexOption{toc~=\textKValue{numberline}}}% + \entry{\PValue{leveldown}}{% + Die Verzeichnisse werden um eine Gliederungsebene nach unten verschoben.% + \IndexOption{listof~=\textKValue{leveldown}}}% + \entry{\PValue{nochaptergap}, \PValue{ignorechapter}}{% + Kapitelanfänge werden in den Verzeichnissen der Gleitumgebungen nicht + markiert.% + \IndexOption{listof~=\textKValue{nochaptergap}}}% + \entry{\PValue{notoc}, \PValue{nottotoc}, \PValue{plainheading}}{% + Die Verzeichnisse der Gleitumgebungen, beispielsweise das Abbildungs"~ und + das Tabellenverzeichnis, erhalten keinen Eintrag im Inhaltsverzeichnis.% + \IndexOption{listof~=\textKValue{nottotoc}}}% + \entry{\PValue{numbered}, \PValue{totocnumbered}, \PValue{tocnumbered}, + \PValue{numberedtoc}, \PValue{numberedtotoc}}{% + Die Verzeichnisse der Gleitumgebungen, beispielsweise das Abbildungs"~ und + das Tabellenverzeichnis, erhalten einen Eintrag im Inhaltsverzeichnis und + werden nummeriert.% + \IndexOption{listof~=\textKValue{numbered}}}% + \entry{\PValue{standardlevel}}{% + Die Verzeichnisse liegen auf der üblichen Gliederungsebene.% + \IndexOption{listof~=\textKValue{standardlevel}}}% + \entry{\PValue{toc}, \PValue{totoc}, \PValue{notnumbered}}{% + Die Verzeichnisse der Gleitumgebungen, beispielsweise das Abbildungs"~ und + das Tabellenverzeichnis, erhalten einen Eintrag im Inhaltsverzeichnis, + ohne dass sie nummeriert werden.% + \IndexOption{listof~=\textKValue{totoc}}}% +\end{desclist} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{listoftables} + \Macro{listoffigures} +\end{Declaration}% +Mit diesen Anweisungen kann ein Verzeichnis der Tabellen beziehungsweise der +Abbildungen ausgegeben werden. Änderungen, die Auswirkungen auf diese +Verzeichnisse haben, werden erst nach zwei \LaTeX{}-Läufen sichtbar. Die Form +der Verzeichnisse kann durch die Option +\DescRef{\LabelBase.option.listof}\important{\DescRef{\LabelBase.option.listof}} +mit den Werten \PValue{graduated} und \PValue{flat} beeinflusst werden (siehe +\DescPageRef{\LabelBase.option.listof}). Darüber hinaus wirken sich indirekt +die Werte \PValue{listof} und \PValue{listofnumbered} für die Option +\DescRef{\LabelBase.option.toc}\important{\DescRef{\LabelBase.option.toc}} +(siehe \autoref{sec:\LabelBase.toc}, \DescPageRef{\LabelBase.option.toc}) +sowie die Werte \PValue{totoc} und \PValue{numbered} der oben erläuterten +Option \DescRef{\LabelBase.option.listof} auf die Verzeichnisse aus. + +In\textnote{Tipp!} der Regel findet man die Verzeichnisse der +Gleitumgebungen\Index{Gleitumgebungen}, also das +\index{Tabellen>Verzeichnis}Tabellen- und das +Abbildungsverzeichnis\index{Abbildungen>Verzeichnis}, unmittelbar nach dem +Inhaltsverzeichnis. In einigen Dokumenten wandern diese auch in den +Anhang. Der Autor bevorzugt jedoch die Platzierung unmittelbar nach dem +Inhaltsverzeichnis.% +% +\EndIndexGroup + + +\LoadCommonFile{marginpar}% \section{Randnotizen} + + +\section{Anhang} +\seclabel{appendix} +\BeginIndexGroup +\BeginIndex{}{Anhang} + +Der Anhang eines Dokuments besteht im Wesentlichen aus den Anlagen zu einem +Dokument. Typische Teile eines Anhangs sind Literaturverzeichnis, +Stichwortverzeichnis und Begriffsverzeichnis. Alleine für diese Teile würde +man jedoch keinen Anhang beginnen, da diese Teile normalerweise schon von sich +aus eine Auszeichnung besitzen, die sie als Anhang erkennbar macht. Enthält +der Anhang aber weitere Teile wie beispielsweise zitierte Fremddokumente, +Endnoten oder Tafeln, so werden die zuvor genannten Teile ebenfalls im Anhang +gesetzt. + + +\begin{Declaration} + \Macro{appendix} +\end{Declaration}% +Der Anhang wird in den Standardklassen und den {\KOMAScript}-Klassen mit der +Anweisung \Macro{appendix} eingeleitet. Diese Anweisung schaltet unter anderem +die Kapitelnummerierung auf Großbuchstaben um und sorgt gleichzeitig dafür, +dass die Regeln für die Nummerierung der Gliederungsebenen nach \cite{DUDEN} +eingehalten werden. Diese Regeln sind in der Beschreibung der Option +\DescRef{\LabelBase.option.numbers} in \autoref{sec:\LabelBase.structure}, +\DescPageRef{\LabelBase.option.numbers} näher erläutert. + +Die Form der Kapitelüberschriften\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} +im Anhang wird durch die Optionen \DescRef{\LabelBase.option.chapterprefix}% +\important{\DescRef{\LabelBase.option.chapterprefix}\\ + \DescRef{\LabelBase.option.appendixprefix}} und +\DescRef{\LabelBase.option.appendixprefix} bestimmt. Näheres dazu ist +\autoref{sec:\LabelBase.structure}, +\DescPageRef{\LabelBase.option.appendixprefix} zu entnehmen. + +Bitte\textnote{Achtung!} beachten Sie, dass es sich bei \Macro{appendix} um +eine Anweisung und \emph{nicht} um eine Umgebung handelt! Die Anweisung +erwartet auch nicht etwa ein Argument. Die Kapitel beziehungsweise Abschnitte +des Anhangs werden ganz normal mit \DescRef{\LabelBase.cmd.chapter} und +\DescRef{\LabelBase.cmd.section} gesetzt.% +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Literaturverzeichnis} +\seclabel{bibliography} +\BeginIndexGroup +\BeginIndex{}{Literaturverzeichnis} + +Das Literaturverzeichnis erschließt externe Quellen. In der Regel wird das +Literaturverzeichnis mit Hilfe des Programms \BibTeX{} aus einer Datei mit +datenbankähnlicher Struktur erzeugt. Dabei kann über den \BibTeX-Stil sowohl +die Form der Einträge als auch deren Sortierung verändert werden. Wird +zusätzlich ein Literaturpaket, beispielsweise +\Package{natbib}\IndexPackage{natbib}, +\Package{babelbib}\IndexPackage{babelbib} oder +\Package{biblatex}\IndexPackage{biblatex} verwendet, so schwindet der Einfluss +von \KOMAScript{} auf das Literaturverzeichnis. In diesen Fällen ist unbedingt +die Anleitung des verwendeten Pakets zu beachten! Zur generellen Verwendung +eines Literaturverzeichnisses sei auf \cite{l2kurz} verwiesen. + + +\begin{Declaration} + \OptionVName{bibliography}{Einstellung} +\end{Declaration} +Als \PName{Einstellung}\ChangedAt{v3.00}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} kann zunächst einmal jeder definierte +Formatierungsstil gewählt werden. Vordefiniert sind bei \KOMAScript{} zwei +solche Formatierungsstile für das Literaturverzeichnis. Diese sind jedoch +nicht zu verwechseln mit den unterschiedlichen Stilen für +\BibTeX\Index{BibTeX=\BibTeX}, die man mit \Macro{bibstyle} auswählt. Während +\BibTeX{} sowohl die Art der Sortierung als auch den Inhalt des +Literaturverzeichnisses bestimmt, können über die Einstellungen von +\KOMAScript{} nur grundlegende Eigenschaften des Literaturverzeichnisses oder +einige wenige Eigenschaften der Formatierung der Einträge beeinflusst werden. + +Mit\important{\OptionValue{bibliography}{oldstyle}} +\OptionValue{bibliography}{oldstyle}% +\IndexOption{bibliography~=\textKValue{oldstyle}} wird die kompakte Formatierung +gewählt. Dabei führt die Anweisung +\DescRef{maincls-experts.cmd.newblock}\IndexCmd{newblock} in den einzelnen +Einträgen lediglich zu einem dehnbaren horizontalen Abstand. Der Name kommt +daher, dass dies die häufigste klassische Form eines Literaturverzeichnisses +ist. Demgegenüber\important{\OptionValue{bibliography}{openstyle}} erreicht +man die etwas modernere, offene Form mit der Einstellung +\OptionValue{bibliography}{openstyle}% +\IndexOption{bibliography~=\textKValue{openstyle}}. Der Name kommt daher, dass +hier die Anweisung \DescRef{maincls-experts.cmd.newblock} einen Absatz +einfügt. Die Einträge im Literaturverzeichnis werden so stärker +gegliedert. Sie sind weniger kompakt und deutlich aufgelockerter oder +geöffnet. Bezüglich der Möglichkeit, neue Formatierungsstile zu definieren, +sei auf \DescRef{maincls-experts.cmd.newbibstyle}, +\autoref{sec:maincls-experts.bibliography}, +\DescPageRef{maincls-experts.cmd.newbibstyle} verwiesen. + +Neben dem Formatierungsstil gibt es eine weitere Eigenschaft, die über +\PName{Einstellung} verändert werden kann. Das Literaturverzeichnis stellt +eine Art von Verzeichnis dar, bei der nicht der Inhalt des vorliegenden Werks +aufgelistet, sondern auf externe Inhalte verwiesen wird. Mit dieser Begründung +könnte man argumentieren, dass das Literaturverzeichnis ein eigenes Kapitel +bzw. einen eigenen Abschnitt darstellt und somit eine Nummer verdiene. Die +Einstellung \OptionValue{bibliography}{numbered}% +\important{\OptionValue{bibliography}{numbered}}% +\IndexOption{bibliography~=\textKValue{numbered}} führt genau dazu, +einschließlich des dann fälligen Eintrags im Inhaltsverzeichnis. Ich selbst +bin der Meinung, dass bei dieser Argumentation auch ein klassisches, +kommentiertes Quellenverzeichnis ein eigenes Kapitel wäre. Außerdem ist das +Literaturverzeichnis letztlich nichts, was man selbst geschrieben +hat. Deshalb\important{\OptionValue{bibliography}{totoc}} verdient es +allenfalls einen nicht nummerierten Eintrag im Inhaltsverzeichnis, was mit der +Einstellung +\OptionValue{bibliography}{totoc}\IndexOption{bibliography~=\textKValue{totoc}} +erreicht wird. Die Voreinstellung, bei der das Literaturverzeichnis als nicht +nummeriertes Kapitel\important{\OptionValue{bibliography}{nottotoc}}% +\IndexOption{bibliography~=\textKValue{nottotoc}} ohne eigenen +Inhaltsverzeichniseintrag gesetzt wird, entspricht +\OptionValue{bibliography}{nottotoc}. Siehe hierzu auch Option +\DescRef{\LabelBase.option.toc} in \autoref{sec:\LabelBase.toc}, insbesondere +die Werte \PValue{bibliographynumbered}, \PValue{bibliography} und +\PValue{nobibliography} ab \DescPageRef{\LabelBase.option.toc.bibliography}. + +In\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} +einigen Fällen wird nicht das gesamte Dokument mit einem einzigen +Literaturverzeichnis versehen, sondern jedes Kapitel eines mit \Class{scrbook} +oder \Class{scrreprt} gesetzten Dokuments erhält sein eigenes +Literaturverzeichnis. In diesem Fall ist es sinnvoll, +wenn\important{\OptionValue{bibliography}{leveldown}} das Literaturverzeichnis +selbst nicht auf Kapitelebene, sondern etwas tiefer auf Abschnittsebene +angesiedelt wird. Dies ist mit Option \OptionValue{bibliography}{leveldown}% +\IndexOption{bibliography~=\textKValue{leveldown}} zu erreichen. Die +Einstellung kann auch verwendet werden, wenn das Literaturverzeichnis zusammen +mit anderen Verzeichnissen unter einer gemeinsamen Überschrift erscheinen +soll. Daher ist diese Option auch in \Class{scrartcl} verfügbar. + +Eine Zusammenfassung möglicher Werte für \PName{Einstellung} ist +\autoref{tab:maincls.bibliography} zu entnehmen. Es ist jedoch zu beachten, +dass mit \DescRef{maincls-experts.cmd.newbibstyle}\IndexCmd{newbibstyle} +weitere Werte definiert werden können. + +\begin{table} + \caption[{Mögliche Werte für Option \Option{bibliography}}]{Vordefinierte + Werte für Option \Option{bibliography} zur Einstellung der Form des + Literatur\-verzeichnisses} + \label{tab:maincls.bibliography} + \begin{desctabular} + \pventry{leveldown}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Das Literaturverzeichnis wird um eine Gliederungsebene nach unten + verschoben.% + \IndexOption{bibliography~=\textKValue{leveldown}}}\\[-1.7ex] + \entry{\PValue{notoc}, \PValue{nottotoc}, \PValue{plainheading}}{% + Das Literaturverzeichnis erhält keinen Eintrag im Inhaltsverzeichnis und + wird auch nicht nummeriert.% + \IndexOption{bibliography~=\textKValue{nottotoc}}}\\[-1.7ex] + \entry{\PValue{numbered}, \PValue{tocnumbered}, \PValue{totocnumbered}, + \PValue{numberedtoc}, \PValue{numberedtotoc}}{% + Das Literaturverzeichnis erhält einen Eintrag im Inhaltsverzeichnis und + wird nummeriert.% + \IndexOption{bibliography~=\textKValue{numbered}}}\\[-1.7ex] + \pventry{oldstyle}{% + Es wird die klassische, kompakte Formatierung gewählt, bei der + \DescRef{maincls-experts.cmd.newblock}\IndexCmd{newblock} nur einen + dehnbaren horizontalen Abstand darstellt.% + \IndexOption{bibliography~=\textKValue{oldstyle}}}\\[-1.7ex] + \pventry{openstyle}{% + Es wird eine untergliederte, offene Formatierung gewählt, bei der + \DescRef{maincls-experts.cmd.newblock}\IndexCmd{newblock} einen Absatz + darstellt.% + \IndexOption{bibliography~=\textKValue{openstyle}}}\\[-1.7ex] + \pventry{standardlevel}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Das Literaturverzeichnis liegt auf der üblichen Gliederungsebene.% + \IndexOption{bibliography~=\textKValue{standardlevel}}}\\[-1.7ex] + \entry{\PValue{toc}, \PValue{totoc}, \PValue{notnumbered}}{% + Das Literaturverzeichnis erhält einen Eintrag im Inhaltsverzeichnis, + ohne dass es nummeriert wird.% + \IndexOption{bibliography~=\textKValue{totoc}}}% + \end{desctabular} +\end{table} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setbibpreamble}\Parameter{Präambel} +\end{Declaration}% +Mit der Anweisung \Macro{setbibpreamble} kann eine Präambel für das +Literaturverzeichnis gesetzt werden. Bedingung dafür ist, dass die Präambel +vor der Anweisung zum Setzen des Literaturverzeichnisses gesetzt wird. Dies +muss nicht unmittelbar davor sein. Es kann also beispielsweise am Anfang des +Dokuments erfolgen. Ebenso\textnote{Achtung!} wie Option +\OptionValueRef{\LabelBase}{bibliography}{totoc} oder +\OptionValueRef{\LabelBase}{bibliography}{numbered} kann die Anweisung aber nur +erfolgreich sein, wenn nicht ein Paket geladen wird, das dies durch +Umdefinierung der \Environment{thebibliography}-Umgebung verhindert. Obwohl +das \Package{natbib}-Paket\IndexPackage{natbib} nicht freigegebene interne +Makros von {\KOMAScript} verwendet, konnte erreicht werden, dass +\Macro{setbibpreamble} auch mit der aktuellen Version von \Package{natbib} +funktioniert (siehe \cite{package:natbib}). +\begin{Example} + Sie wollen darauf hinweisen, dass das Literaturverzeichnis nicht in + der Reihenfolge der Zitierung im Dokument, sondern alphabetisch + sortiert ist. Daher setzen Sie folgende Anweisung: +\begin{lstcode} + \setbibpreamble{Die Literaturangaben sind + alphabetisch nach den Namen der Autoren + sortiert. Bei mehreren Autoren wird nach dem + ersten Autor sortiert.\par\bigskip} +\end{lstcode} + Mit \Macro{bigskip} wird der Abstand nach der Präambel sichergestellt.% +\end{Example} +% +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \Macro{BreakBibliography}\Parameter{Unterbrechung} +\end{Declaration} +Diese\textnote{Achtung!}\ChangedAt{v3.00}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} Anweisung existiert nur, wenn +Umgebung \Environment{thebibliography} nicht durch ein Paket neu definiert +wurde. In diesem Fall ist es möglich, mit dieser Anweisung das +Literaturverzeichnis zu unterbrechen. Die \PName{Unterbrechung} wird dann +innerhalb einer Gruppe ausgegeben. Eine solche \PName{Unterbrechung} könnte +beispielsweise eine Überschrift mit Hilfe von \DescRef{\LabelBase.cmd.minisec} +sein. Leider gibt es bisher keine Möglichkeit, diese Anweisung beispielsweise +mit Hilfe eines speziellen Eintrags in der Literaturdatenbank von \BibTeX{} +erzeugen zu lassen. Daher kann sie derzeit nur von Anwendern verwendet werden, +die das Literaturverzeichnis selbst editieren. Ihr Nutzen ist damit sehr +beschränkt.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AfterBibliographyPreamble}\Parameter{Anweisungen} + \Macro{AtEndBibliography}\Parameter{Anweisungen} +\end{Declaration} +In\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} +einigen Fällen ist es nützlich, wenn man nach der Präambel des +Literaturverzeichnisses oder unmittelbar vor dem Ende des +Literaturverzeichnisses noch \PName{Anweisungen} ausführen kann. Dies ist mit +Hilfe dieser beiden Anweisungen möglich. +\begin{Example} + Sie wollen, dass das Literaturverzeichnis nicht im Blocksatz, sondern im + linksbündigen Flattersatz ausgegeben wird. Dies ist einfach mit: +\begin{lstcode} + \AfterBibliographyPreamble{\raggedright} +\end{lstcode} + zu erreichen. Sie können diese Anweisung an beliebiger Stelle vor dem + Literaturverzeichnis verwenden. Es wird jedoch empfohlen, sie in die + Präambel des Dokuments oder ein eigenes Paket zu schreiben. +\end{Example} +Die\textnote{Achtung!} Realisierung dieser Anweisung bedarf bei Verwendung +eines Pakets, das die Umgebung für Literaturverzeichnisse umdefiniert, der +Zusammenarbeit mit dem entsprechenden Paket (siehe +\autoref{sec:maincls-experts.coexistence}, +\DescPageRef{maincls-experts.cmd.AfterBibliographyPreamble}).% +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Stichwortverzeichnis} +\seclabel{index} +\BeginIndexGroup + +Das Stichwortverzeichnis ist auch unter den Bezeichnungen Index oder Register +bekannt. Zur generellen Verwendung eines Stichwortverzeichnisses sei auf +\cite{l2kurz} sowie auf \cite{makeindex} und \cite{xindy} verwiesen. Wird ein +Paket verwendet, das selbst Anweisungen und Umgebungen für das +Stichwortverzeichnis zur Verfügung stellt, so schwindet eventuell der +Einfluss, den \KOMAScript{} auf dieses Verzeichnis hat. Dies gilt +beispielsweise bei Verwendung von \Package{index}\IndexPackage{index}, +nicht jedoch bei Verwendung von +\Package{splitidx}\IndexPackage{splitidx} (siehe +\cite{package:splitindex}). + + +\begin{Declaration} + \OptionVName{index}{Einstellung}% +\end{Declaration} +\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% +In der Voreinstellung +\OptionValue{index}{nottotoc}\IndexOption{index~=\textKValue{nottotoc}} ist das +Stichwortverzeichnis ein nicht nummeriertes Kapitel ohne Eintrag im +Inhaltsverzeichnis. Da\important{\OptionValue{index}{totoc}} das +Stichwortverzeichnis normalerweise in einem Buch oder ähnlichen Dokument +zuletzt steht, benötigt es eigentlich auch keinen +Inhaltsverzeichniseintrag. Wird dieser dennoch gewünscht, beispielsweise weil +wie in \iffree{dieser Anleitung}{diesem Buch} mit einem mehrgliedrigen +Stichwortverzeichnis gearbeitet wird, so kann dies mit der Einstellung +\OptionValue{index}{totoc}\IndexOption{index~=\textKValue{totoc}} erreicht +werden. Soll\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\important{\OptionValue{index}{numbered}} der Index +entgegen aller Gepflogenheiten sogar nummeriert werden, so verwendet man +Option \OptionValue{index}{numbered}. Siehe hierzu auch Option +\DescRef{\LabelBase.option.toc} mit dem Wert \PValue{index} oder +\PValue{indexnumbered} in \autoref{sec:\LabelBase.toc} ab +\DescPageRef{\LabelBase.option.toc.index}. + +Werden beispielsweise mit Hilfe von \Package{splitidx}\IndexPackage{splitidx} +(siehe \cite{package:splitindex}) mehrere Stichwortverzeichnisse erstellt, so +kann es sinnvoll sein, diese unter einer gemeinsamen Überschrift +zusammenzufassen. Um dies zu ermöglichen, kann mit +\OptionValue{index}{leveldown}% +\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\important{\OptionValue{index}{leveldown}} das Verzeichnis +eine Gliederungsebene tiefer als üblich angesiedelt werden. Bei +\Class{scrbook} und \Class{scrreprt} ist es dann also kein Kapitel mehr, +sondern ein Abschnitt, bei \Class{scrartcl} entsprechend ein +Unterabschnitt. Option \OptionValue{index}{standardlevel}% +\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\important{\OptionValue{index}{standardlevel}} ist das +Gegenstück dazu und hebt ein eventuell zuvor verwendetes +\OptionValue{index}{leveldown} wieder auf. + +Eine Zusammenfassung der möglichen Werte für die \PName{Einstellung} von +\Option{index} ist in \autoref{tab:maincls.index} zu finden. + +\begin{table} + \caption[{Mögliche Werte für Option \Option{index}}]{Mögliche Werte für + Option \Option{index} zur Einstellung des Stich\-wort\-verzeichnisses} + \label{tab:maincls.index} + \begin{desctabular} + \pventry{leveldown}{% + \ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Der Index wird um eine Gliederungsebene nach unten verschoben.% + \IndexOption{index~=\textKValue{leveldown}}% + }\\[-1.7ex] + \entry{\PValue{notoc}, \PValue{nottotoc}, \PValue{plainheading}}{% + Das Stichwortverzeichnis erhält keinen Eintrag im Inhaltsverzeichnis.% + \IndexOption{index~=\textKValue{nottotoc}}}\\[-1.7ex] + \entry{\PValue{numbered}, \PValue{tocnumbered}, \PValue{totocnumbered}, + \PValue{numberedtoc}, \PValue{numberedtotoc}}{% + \ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Das Stichwortverzeichnis erhält einen Eintrag im Inhaltsverzeichnis und + wird nummeriert.% + \IndexOption{index~=\textKValue{numbered}}}\\[-1.7ex] + \pventry{standardlevel}{% + \ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Der Index liegt auf der üblichen Gliederungsebene.% + \IndexOption{index~=\textKValue{standardlevel}}% + }\\[-1.7ex] + \entry{\PValue{toc}, \PValue{totoc}, \PValue{notnumbered}}{% + Das Stichwortverzeichnis erhält einen Eintrag im Inhaltsverzeichnis, + ohne dass es nummeriert wird.% + \IndexOption{index~=\textKValue{totoc}}}% + \end{desctabular} +\end{table} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setindexpreamble}\Parameter{Präambel} +\end{Declaration}% +Analog zur Präambel des Literaturverzeichnisses können Sie auch das +Stichwortverzeichnis mit einer Präambel versehen. Dies findet häufig +dann Anwendung, wenn es mehr als einen Index gibt oder im Index +unterschiedliche Arten der Referenzierung durch unterschiedliche +Hervorhebung der Seitenzahlen markiert werden. +\begin{Example} + Sie haben ein Dokument, in dem Begriffe sowohl definiert als auch + verwendet werden. Die Seitenzahlen der Begriffsdefinitionen sind + fett dargestellt. Natürlich möchten Sie gerne auf diesen Umstand + hinweisen. Also setzen Sie eine entsprechende Präambel für den + Index: +\begin{lstcode} + \setindexpreamble{Alle \textbf{fett} gedruckten + Seitenzahlen sind Referenzen auf die Definition + des jeweiligen Begriffs. Demgegenüber geben + normal gedruckte Seitenzahlen die Seiten der + Verwendung des jeweiligen Begriffs wieder.\par + \bigskip} +\end{lstcode} +\iffalse % Umbruchkorrektur + Die Anweisung \Macro{bigskip}\IndexCmd{bigskip} sorgt dafür, dass + zwischen der Präambel und den Indexeinträgen ein großer + Zwischenraum gesetzt wird.% +\fi% +\end{Example} + +Bitte\textnote{Achtung!} beachten Sie, dass für die erste Seite des Index der +Seitenstil umgeschaltet wird. Welcher Seitenstil hierbei Verwendung findet, +ist im Makro \DescRef{\LabelBase.cmd.indexpagestyle}% +\important{\DescRef{\LabelBase.cmd.indexpagestyle}}\IndexCmd{indexpagestyle} +abgelegt (siehe \autoref{sec:\LabelBase.pagestyle}, +\DescPageRef{\LabelBase.cmd.indexpagestyle}). + +Für die Erstellung, Sortierung und Ausgabe des Stichwortverzeichnisses +sind die üblichen Standard-\LaTeX-Pakete und Zusatzprogramme +zuständig.% +\iftrue % Umbruchoptimierung + \iffree{}{ % + Besonders empfehlenswert ist beispielsweise das Paket + \Package{imakeidx}\IndexPackage{imakeidx} (siehe \cite{package:imakeidx}), + das unter anderem den Aufruf des Programms \File{makeindex} oder + \File{xindy} automatisiert. Damit entfällt eine häufige Fehlerquelle + insbesondere für \LaTeX-Anfänger.% + } + Von {\KOMAScript} werden genau wie von den Standardklassen + lediglich die grundlegenden Makros und Umgebungen dafür zur Verfügung + gestellt.% +\fi +% +\EndIndexGroup +% +\EndIndexGroup +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Teildokumenten Klassenoption Tabellenunterschrift float +% LocalWords: Satzspiegels Schrifteinstellung Abschnittseinträgen Nachspann +% LocalWords: Vakatseiten Kolumnentitel Sternformen Teiltabelle Seitenstil +% LocalWords: Bildunterschriften Dokumentpräambel Tabellenüberschriften +% LocalWords: Gleitumgebungstyp Kapitelüberschriften Standardklassen +% LocalWords: serifenlosen Abschnittseinträge Gliederungsebenen Paketoption +% LocalWords: Nummerierungsstilen Seitenstilen Seitenankern Vakatseite +% LocalWords: Nummerierungsstil Eingangskommentar Nummerierungsstils +% LocalWords: Standardanweisung Einstellmöglichkeiten Umbruchkorrekturtext +% LocalWords: Inhaltsverzeichniseintrag Formatierungsänderungen Präfixzeile diff --git a/macros/latex/contrib/koma-script/doc/scrbookreportarticle-en.tex b/macros/latex/contrib/koma-script/doc/scrbookreportarticle-en.tex new file mode 100644 index 0000000000..c1c8426c6a --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrbookreportarticle-en.tex @@ -0,0 +1,4678 @@ +% ====================================================================== +% scrbookreportarticle-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrbook, scrreprt, and scrartcl of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrbookreportarticle-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrbook, scrreprt, scrartcl)] + +\translator{Jens-Uwe Morawski\and Gernot Hassenpflug\and Markus Kohm\and + Krickette Murabayashi\and Jana Schubert\and Jens H\"uhne\and Karl Hagen} + +\chapter{The Main Classes: \Class{scrbook}, \Class{scrreprt}, and + \Class{scrartcl}} +\labelbase{maincls}% +\BeginIndexGroup +\BeginIndex{Class}{scrbook}% +\BeginIndex{Class}{scrreprt}% +\BeginIndex{Class}{scrartcl}% + +\AddSeeIndex{instruction}{gen}{\GuidecmdIndexShort}{cmd}% +\AddSeeIndex{macro}{gen}{\GuidecmdIndexShort}{cmd}% +The main classes of the {\KOMAScript} bundle are designed as counterparts to +the standard {\LaTeX} classes. This means that the {\KOMAScript} bundle +contains replacements for the three standard classes, +\Class{book}\IndexClass{book}, \Class{report}\IndexClass{report}, and +\Class{article}\IndexClass{article}. There is also a replacement for the +standard \Class{letter}\IndexClass{letter} class. The document class for +letters is described in a separate chapter because it is fundamentally +different from the three main classes (see \autoref{cha:scrlttr2}). + +The simplest way to use a {\KOMAScript} class instead of a standard one is to +substitute the class name in the \verb|\documentclass| command in accordance +with \autoref{tab:\LabelBase.overview}. For example, you can replace +\Macro{documentclass}\PParameter{book} with +\Macro{documentclass}\PParameter{scrbook}. Normally, {\LaTeX} should process +the document without errors, just as before the substitution. The layout, +however, should be different. Additionally, the {\KOMAScript} classes provide +new possibilities and options that are described in the following sections. + +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside} + [Class correspondence]{\label{tab:\LabelBase.overview}Correspondence between + standard classes and {\KOMAScript} classes} + [l] + \begin{tabular}[t]{ll} + \toprule + standard class & \KOMAScript{} class \\%& \Script-Stil (\LaTeX2.09)\\ + \midrule + \Class{article} & \Class{scrartcl} \\%& \File{script\textunderscore s} \\ + \Class{report} & \Class{scrreprt} \\%& \File{script} \\ + \Class{book} & \Class{scrbook} \\%& \File{script} \\ + \Class{letter} & \Class{scrlttr2} \\%& \File{script\textunderscore l} \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} + +% TODO: Fix translation +However, it should be noted here that some package authors develop their +packages based on the implementation and even internal code of the standard +classes, without regard to completely independent developments like the +\KOMAScript{} classes. In such cases, the first \LaTeX{} run after the change +may well result in error messages or additional warnings. These can usually be +corrected in a simple way. Often the extended capabilities of \KOMAScript{} +can be used for this purpose, which completely eliminates the problematic +package. Sometimes the \hyperref[cha:scrhack]{package + \Package{scrhack}}\IndexPackage{scrhack} documented in \autoref{cha:scrhack} +starting on \autopageref{cha:scrhack} can also help. Replacing obsolete +packages with current successors can also help to eliminate such +problems. Sometimes even the \KOMAScript{} classes provide warnings to help +solve incompatibilities. +% :ODOT + +Let me say something before describing the classes. When beginning to write a +document, you are often unsure which specific options to choose. Some +settings, for instance the choice of paper size, may be fixed in advance. But +even the question of the appropriate page layout could be difficult to answer +initially. On the other hand, these settings should be nearly irrelevant, in +the beginning, to the main business of an author: planning the document +structure, writing the text, preparing figures, tables, lists, index, and +other data. As an author, you should concentrate initially on the content. +When that is done, you can take on the fine points of presentation. In +addition to the choice of options, this includes correcting hyphenation, +optimizing page breaks, and placing tables and figures. + + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\LoadCommonFile{options}% \section{Early or Late Selection of Options} + +\LoadCommonFile{compatibility}% \section{Compatibility with Earlier Versions of KOMA-Script} + +\LoadCommonFile{draftmode}% \section{Draft Mode} + +\LoadCommonFile{typearea}% \section{Page Layout} + +\begin{Declaration} + \Macro{flushbottom} + \Macro{raggedbottom} +\end{Declaration} +\begin{Explain} + In two-sided documents especially, it is preferable to have the same visual + baseline not only for the first lines of each text area in a two-page spread + but also for the last lines. If a page consists only of text without + paragraphs or headings, this is generally the result. But a paragraph + spacing of half a line would be enough to prevent you from achieving this + goal if the number of paragraphs on each page of the two-page spread differs + by an odd number. In this case, at least some of the paragraph distances + need to be stretched or shrunk to reach the target again. \TeX{} defines + stretchable and shrinkable distances for this purpose, and \LaTeX{} lets you + perform this kind of \emph{vertical adjustment}\Index{adjustment} + automatically. +\end{Explain} + +Using two-sided printing with the +\Option{twoside}\IndexOption{twoside}\important{\Option{twoside}} option (see +\autoref{sec:typearea.options}, \DescPageRef{typearea.option.twoside}) or +two-column formatting with the +\Option{twocolumn}\IndexOption{twocolumn}\important{\Option{twocolumn}} option +(see \DescPageRef{typearea.option.twocolumn}) also activates this vertical +adjustment. But\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} this does not apply with a compatibility setting for a +\KOMAScript{} version prior to 3.17 (see +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}, option +\DescRef{\LabelBase.option.version}\IndexOption{version}% +\important{\OptionValueRef{\LabelBase}{version}{3.17}}) if you use +\DescRef{\LabelBase.cmd.KOMAoption} or \DescRef{\LabelBase.cmd.KOMAoptions} to +change the setting of these options. + +You can also explicitly request vertical adjustment at any time starting with +the current page by using \Macro{flushbottom}. \Macro{raggedbottom} has the +opposite effect, switching off vertical adjustment starting with the current +page. This corresponds to the default for one-sided printing. + +By the way, \KOMAScript{} uses a slightly modified method for adjusting the +vertical skip. This has been done to move footnotes to the bottom of the +text area instead of having them close to the last text line used. +\iffree{}{ + You can find more information about this at + \autoref{sec:maincls-experts.addInfos}, + \DescPageRef{maincls-experts.cmd.footnoterule}.}% +% +\EndIndexGroup +% +\EndIndexGroup + + +\LoadCommonFile{fontsize}% \section{Choosing the Document Font Size} + +\LoadCommonFile{textmarkup}% \section{Text Markup} + +\LoadCommonFile{titles}% \section{Document Titles} + +\section{Abstract} +\seclabel{abstract} +\BeginIndexGroup +\BeginIndex{}{abstract}% + +Particularly with articles, more rarely with reports, there is an abstract, or +summary, directly beneath the title and before the table of contents. When +using an in-page title, this abstract is normally a kind of left- and +right-indented block. In comparison, the abstract appears as a chapter or +section when using title pages. + +\begin{Declaration} + \OptionVName{abstract}{simple switch} +\end{Declaration}% +In\OnlyAt{\Class{scrreprt}\and\Class{scrartcl}} the standard +classes\textnote{\KOMAScript{} vs. standard classes}, the +\DescRef{\LabelBase.env.abstract} environment sets the text ``\abstractname'' +centred before the abstract text. This used to be the normal practice. Since +then, reading newspapers has trained us to recognize a suitably highlighted +text at the beginning of an article or report as the abstract. This is even +more true when the text comes before the table of contents. It is also +confusing if, of all things, this title appears small and centred. +{\KOMAScript}\ChangedAt{v3.00}{\Class{scrreprt}\and \Class{scrartcl}} offers +the option to include or exclude the abstract's title with the +\Option{abstract} option. For \PName{simple switch}, you can use any value +from \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. The +default for \KOMAScript{} is \PValue{false}. + +Books typically use a different kind of summary. There, you usually place an +appropriate chapter at the beginning or the end of the work. This chapter is +often combined with either the introduction or a description of a larger +prospectus. Therefore, the \Class{scrbook} class has no +\DescRef{\LabelBase.env.abstract} environment. A\textnote{Hint!} summary +chapter is also recommended for reports in a wider sense, such as a Master's +thesis or Ph.D. dissertation. See the commands +\DescRef{\LabelBase.cmd.chapter*}\IndexCmd{chapter*}, +\DescRef{\LabelBase.cmd.addchap}\IndexCmd{addchap}, and +\DescRef{\LabelBase.cmd.addchap*}\IndexCmd{addchap*} documented in +\autoref{sec:maincls.structure}, from \DescPageRef{\LabelBase.cmd.chapter*}.% +\EndIndexGroup + + +\begin{Declaration} + \begin{Environment}{abstract}\end{Environment} +\end{Declaration}% +\OnlyAt{\Class{scrartcl}\and \Class{scrreprt}}% +Some {\LaTeX} classes provide a special environment for this summary: the +\Environment{abstract} environment. This is output directly, so it is not part +of the title created with \DescRef{\LabelBase.cmd.maketitle}. +Please\textnote{Attention!} note that \Environment{abstract} is an +environment, not a command. Whether the abstract has a heading or not is +determined by the \DescRef{\LabelBase.option.abstract} option (see above). + +For books, the abstract is usually part of the introduction or a separate +chapter at the end of the document. Therefore \Class{scrbook} does not provide +an \Environment{abstract} environment. When using the \Class{scrreprt} class, +it is definitely worth considering whether to proceed in the same way. See the +commands \DescRef{\LabelBase.cmd.chapter*}\IndexCmd{chapter*} and +\DescRef{\LabelBase.cmd.addchap}\IndexCmd{addchap}, or +\DescRef{\LabelBase.cmd.addchap*} in \autoref{sec:\LabelBase.structure} +from \DescPageRef{\LabelBase.cmd.chapter*} for more on this. + +When using an in-page title\Index{title>in-page} (see option +\DescRef{\LabelBase.option.titlepage}, \autoref{sec:\LabelBase.titlepage}, +\DescPageRef{\LabelBase.option.titlepage}), the abstract is set internally +using the \DescRef{\LabelBase.env.quotation}\IndexEnv{quotation} environment +(see \autoref{sec:\LabelBase.lists}, \DescPageRef{\LabelBase.env.quotation}). +This way paragraphs will be set with the first line indented. If the first +paragraph of the abstract should not be indented, you can suppress this indent +by using \Macro{noindent}\IndexCmd{noindent}% +\important{\Macro{noindent}} \iffree{just after + \Macro{begin}\PParameter{abstract}}{at the beginning of the environment}.% +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Table of Contents} +\seclabel{toc} +\BeginIndexGroup +\BeginIndex{}{table of contents} + +The title and optional abstract are normally followed by a table of contents. +Often you also find additional lists of the floating environments, such as +tables and figures, after the table of contents (see +\autoref{sec:\LabelBase.floats}). + +\iffalse% + Note that in addition to the options documented in this section, the + commands \DescRef{maincls-experts.cmd.DeclareSectionCommand}, + \DescRef{maincls-experts.cmd.DeclareNewSectionCommand}, + \DescRef{maincls-experts.cmd.RedeclareSectionCommand}, and + \DescRef{maincls-experts.cmd.ProvideSectionCommand} can also affect the + table of contents. See \autoref{sec:maincls-experts.sections}, + \DescPageRef{maincls-experts.cmd.DeclareSectionCommand}.% +\else% + In addition to the options documented in this section, the + \hyperref[cha:tocbasic]{\Package{tocbasic}}% + \important{\hyperref[cha:tocbasic]{\Package{tocbasic}}}% + \IndexPackage{tocbasic} package style selected and configured with + \DescRef{tocbasic.cmd.DeclareTOCStyleEntry}\IndexCmd{DeclareTOCStyleEntry}% + \important[O]{\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}} (see + \DescPageRef{tocbasic.cmd.DeclareTOCStyleEntry}) also has a significant + impact on the appearance of the table of contents. Similarly, the commands + \DescRef{maincls-experts.cmd.DeclareSectionCommand}% + \important[O]{\DescRef{maincls-experts.cmd.DeclareSectionCommand}}% + \IndexCmd{DeclareSectionCommand}, + \DescRef{maincls-experts.cmd.ProvideSectionCommand}% + \IndexCmd{ProvideSectionCommand}, + \DescRef{maincls-experts.cmd.DeclareNewSectionCommand}% + \IndexCmd{DeclareNewSectionCommand} and + \DescRef{maincls-experts.cmd.RedeclareSectionCommand}% + \IndexCmd{RedeclareSectionCommand} documented in + \autoref{sec:maincls-experts.sections}, + \DescPageRef{maincls-experts.cmd.DeclareSectionCommand} can also affect the + table of contents.% +\fi + + +\begin{Declaration} + \OptionVName{toc}{setting} +\end{Declaration} +It is becoming increasingly common to include lists of tables and figures, +the bibliography, and sometimes even the index in the table of contents. This +is surely related to the recent trend of putting lists of figures and tables +at the end of the document. Both lists are similar to the table of contents in +structure and intention. I'm therefore sceptical of this evolution. +Since\important{\OptionValue{toc}{listof}} it makes no sense to include only +the list of tables or that of figures in the table of contents without the +other, there is only one \PName{setting}\ChangedAt{v3.00}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} +\PValue{listof}\IndexOption{toc~=\textKValue{listof}}, which causes entries +for both types of lists to be included. This also includes any lists produced +with version~1.2e or later of the \Package{float} package\IndexPackage{float} +from Version~1.2e (see \cite{package:float}) or \Package{floatrow} (see +\cite{package:floatrow}). None\important{\OptionValue{toc}{listofnumbered}} +of these lists are generally given a chapter number. If you want to ignore +this principle, use the \PName{setting} +\PValue{listofnumbered}\IndexOption{toc~=\textKValue{listofnumbered}}. + +\leavevmode\LabelOptionValue{toc}{index}\nobreak +The\important{\OptionValue{toc}{index}} +\OptionValue{toc}{index}\IndexOption{toc~=\textKValue{index}} option causes an +entry for the index to be included in the table of contents. The index is +unnumbered since it too only includes references to the contents of the other +sectioning levels. Despite\ChangedAt{v3.18}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} +\important{\OptionValue{toc}{indexnumbered}} the author's concerns, +\KOMAScript{} does support deviating from this principle with +\OptionValue{toc}{indexnumbered}\IndexOption{toc~=\textKValue{indexnumbered}}. + +\leavevmode\LabelOptionValue{toc}{bibliography}\nobreak The bibliography is a +slightly different kind of listing. It does not list the contents of the +present document but refers instead to external sources. +For\important{\OptionValue{toc}{bibliographynumbered}} that reason, it could +be argued that it qualifies as a chapter (or section) and, as such, should be +numbered. The \OptionValue{toc}{bibliographynumbered}% +\IndexOption{toc~=\textKValue{bibliographynumbered}} option has this effect, +and puts the appropriate entry in the table of contents. However, I think that +this reasoning would lead us to consider even a classic, annotated source list +to be a separate chapter. Moreover, the bibliography is ultimately not +something that you wrote yourself. +Therefore\important{\OptionValue{toc}{bibliography}} the bibliography merits, +at best, an unnumbered entry in the table of contents, and you can achieve +this achieved with +\OptionValue{toc}{bibliography}\IndexOption{toc~=\textKValue{bibliography}}. + +\leavevmode\LabelOptionValue{toc}{graduated}\nobreak +The table of contents is normally\ChangedAt{v2.8q}{% + \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% +\important{\OptionValue{toc}{graduated}} formatted so that different levels of +sectioning commands have different indentations. The number for each level is +set left-justified in a fixed-width field. This default set-up is selected +with the\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} +\OptionValue{toc}{graduated}\IndexOption{toc~=\textKValue{graduated}} option. + +\leavevmode\LabelOptionValue{toc}{flat}\nobreak +If the sectioning level which appears in the table of contents is too deep, the +number for that level can be so wide that the space reserved for the number is +insufficient. The German FAQ \cite{DANTE:FAQ} suggests redefining the table of +contents in such a case. \KOMAScript{}\important{\OptionValue{toc}{flat}} +offers an alternative format that avoids the problem completely. If you use +the \OptionValue{toc}{flat}\IndexOption{toc~=\textKValue{flat}} option, no +graduated indentation is applied to the headings of the sectioning levels. +Instead, a table-like organisation is used, where all sectioning numbers and +headings are set in a left-justified column. The space necessary for the +section numbers is thus determined automatically. + +You can find an overview of all available values for the \PName{setting} of +\Option{toc}. in \autoref{tab:\LabelBase.toc}. + +\begin{desclist} + \desccaption[{Available values for the \Option{toc} option}]{% + Available values for the \Option{toc} option to set the format and contents + of the table of contents\label{tab:\LabelBase.toc}% + }{% + Available values for the \Option{toc} option (\emph{continued})% + }% + \entry{\PValue{bibliography}, \PValue{bib}}{% + The bibliography has an unnumbered entry in the table of contents.% + \IndexOption{toc~=\textKValue{bibliography}}}% + \entry{\PValue{bibliographynumbered}, \PValue{bibnumbered}, + \PValue{numberedbibliography}, \PValue{numberedbib}}{% + The bibliography has a numbered entry in the table of contents.% + \IndexOption{toc~=\textKValue{bibliographynumbered}}}% + \entry{\PValue{chapterentrywithdots}, \PValue{chapterentrydotfill}}{% + \ChangedAt[2014/12]{v3.15}{\Class{scrbook}\and \Class{scrreprt}}% + The chapter entries for the \Class{scrbook} and \Class{scrreprt} classes + also use dots to separate the heading text from the page numbers.% + \IndexOption{toc~=\textKValue{chapterentrywithdots}}}% + \entry{\PValue{chapterentrywithoutdots}, \PValue{chapterentryfill}}{% + \ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}}% + The chapter entries of the \Class{scrbook} and \Class{scrreprt} classes + use white space to separate the heading text from the page numbers. This + corresponds to the default setting.% + \IndexOption{toc~=\textKValue{chapterentrywithoutdots}}}% + \entry{\PValue{flat}, \PValue{left}}{% + The table of contents is set in table form. The numbers of the headings + are in the first column, the heading text in the second column, and the + page number in the third column. The amount of space needed for the + numbers of the headings is determined by the required amount of space + detected during the previous \LaTeX{} run.% + \IndexOption{toc~=\textKValue{flat}}}% + \entry{\PValue{graduated}, \PValue{indent}, \PValue{indented}}{% + The table of contents is set in hierarchical form. The amount of space for + the heading numbers is limited. This corresponds to the default setting.% + \IndexOption{toc~=\textKValue{graduated}}}% + \entry{\PValue{indenttextentries}, \PValue{indentunnumbered}, + \PValue{numberline}}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + The \PValue{numberline} property (see \autoref{sec:tocbasic.toc}, + \DescPageRef{tocbasic.cmd.setuptoc}) is set for the table of contents. As + a result, unnumbered entries are left aligned with the text of numbered + entries of the same level.% + \IndexOption{toc~=\textKValue{numberline}}}% + \entry{\PValue{index}, \PValue{idx}}{% + The index has an unnumbered entry in the table of contents.% + \IndexOption{toc~=\textKValue{index}}}% + \entry{\PValue{indexnumbered}, \PValue{idxnumbered}, \PValue{numberedindex}, + \PValue{numberedidx}}{% + \ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + The index has a numbered entry in the table of contents.% + \IndexOption{toc~=\textKValue{index}}}% + \entry{\PValue{leftaligntextentries}, \PValue{leftalignunnumbered}, + \PValue{nonumberline}}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + The \PValue{numberline} property (see \autoref{sec:tocbasic.toc}, + \DescPageRef{tocbasic.cmd.setuptoc}) is deleted for the table of contents. + This places unnumbered entries left-aligned with the number of + numbered entries of the same level. This corresponds to the default + setting.% + \IndexOption{toc~=\textKValue{numberline}}}% + \pventry{listof}{% + The lists of floating environments, e.\,g. figures and tables, have + unnumbered entries in the table of contents.% + \IndexOption{toc~=\textKValue{listof}}}% + \entry{\PValue{listofnumbered}, \PValue{numberedlistof}}{% + The lists of floating environments, e.\,g. figures and tables, have + numbered entries in the table of contents.% + \IndexOption{toc~=\textKValue{listofnumbered}}}% + \entry{\PValue{nobibliography}, \PValue{nobib}}{% + The bibliography does not have an entry in the table of contents. This + corresponds to the default setting.% + \IndexOption{toc~=\textKValue{nobibliography}}}% + \entry{\PValue{noindex}, \PValue{noidx}}{% + The index does not have an entry in the table of contents. This + corresponds to the default setting.% + \IndexOption{toc~=\textKValue{noindex}}}% + \pventry{nolistof}{% + The lists of floating environments, e.\,g. figures and tables, do not + have entries in the table of contents. This corresponds to the default + setting.% + \IndexOption{toc~=\textKValue{nolistof}}}% + \entry{\PValue{sectionentrywithdots}, \PValue{sectionentrydotfill}}{% + \ChangedAt[2014/12]{v3.15}{\Class{scrartcl}}% + The section entries of the \Class{scrartcl} class also use dots to + separate the heading text from the page numbers.% + \IndexOption{toc~=\textKValue{sectionentrywithdots}}}% + \entry{\PValue{sectionentrywithoutdots}, \PValue{sectionentryfill}}{% + \ChangedAt{v3.15}{\Class{scrartcl}}% + The section entries of the \Class{scrartcl} class use white space to + separate the heading text from the page number. This corresponds to the + default setting.% + \IndexOption{toc~=\textKValue{sectionentrywithoutdots}}}% +\end{desclist} +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{chapterentrydots}{simple switch}\\ + \OptionVName{sectionentrydots}{simple switch} +\end{Declaration} +These\ChangedAt[2014/12]{v3.15}{\Class{scrbook}\and \Class{scrreprt}} options +configure a dotted connecting line between the text and page number of the +chapter entries for the \Class{scrbook} and +\Class{scrreprt}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} classes, or for +the section entries of the \Class{scrartcl}\OnlyAt{\Class{scrartcl}} class, in +the table of contents. For the \PName{simple switch}, you can use any value from +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. +The default is \PValue{false}. It selects an empty gap instead of dots. + +\BeginIndex{FontElement}{chapterentrydots}\LabelFontElement{chapterentrydots}% +\BeginIndex{FontElement}{sectionentrydots}\LabelFontElement{sectionentrydots}% +If a dotted line is used, you can change its font using the element +\FontElement{chapterentrydots}% +\important[i]{\FontElement{chapterentrydots}\\ + \FontElement{sectionentrydots}} or \FontElement{sectionentrydots} (see also +\DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont}, \autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}, as well as +\autoref{tab:maincls.fontelements}, +\autopageref{tab:maincls.fontelements}). The defaults of the elements are +shown in \autoref{tab:maincls.tocelements}, from +\autopageref{tab:maincls.tocelements}. Note\textnote{Attention!} that the dots +of all entries will be equally spaced only if all dots use the same +font. Because of this the base font is always +\Macro{normalfont}\Macro{normalsize} and only the colour of +\DescRef{\LabelBase.fontelement.chapterentry} or +\DescRef{\LabelBase.fontelement.sectionentry} is also used for the dots.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tableofcontents} +\end{Declaration}% +The table of contents is output by the \Macro{tableofcontents} command. To get +correct values in the table of contents requires at least two {\LaTeX} runs +after every change. The \DescRef{\LabelBase.option.toc} option described above +can also affect the extent and format of the table of contents. After changing +the settings of this option, at least two \LaTeX{} runs are needed again. + +Entries for \DescRef{\LabelBase.cmd.chapter}\IndexCmd{chapter} with +\Class{scrbook}\IndexClass{scrbook} and \Class{scrreprt}\IndexClass{scrreprt}, +or \DescRef{\LabelBase.cmd.section}\IndexCmd{section} with +\Class{scrartcl}\IndexClass{scrartcl}, and the sectioning level +\DescRef{\LabelBase.cmd.part}\IndexCmd{part} are not indented. Additionally, +there are no dots between the text of this heading and the page number. The +typographical logic for this behaviour is that the font is usually distinct +and appropriate emphasis is desirable. +However\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}, you can change this behaviour with the previously +documented options. The table of contents of this \iffree{guide}{book} is +created with the default settings and serves as an example. + +\BeginIndex{FontElement}{partentry}\LabelFontElement{partentry}% +\BeginIndex{FontElement}{chapterentry}\LabelFontElement{chapterentry}% +\BeginIndex{FontElement}{sectionentry}\LabelFontElement{sectionentry}% +The\ChangedAt{v2.97c}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\important{\FontElement{partentry}\\ + \FontElement{chapterentry}\\ + \FontElement{sectionentry}} font style of the top two levels in the table of +contents is also affected by the settings for the \FontElement{partentry} +element, as well as by the \FontElement{chapterentry} element for the +\Class{scrbook} and \Class{scrreprt} classes, and by the +\FontElement{sectionentry} element for the \Class{scrartcl} class. +\BeginIndex{FontElement}{partentrypagenumber}% +\LabelFontElement{partentrypagenumber}% +\LabelFontElement{pagination}% +\BeginIndex{FontElement}{chapterentrypagenumber}% +\LabelFontElement{chapterentrypagenumber}% +\BeginIndex{FontElement}{sectionentrypagenumber}% +\LabelFontElement{sectionentrypagenumber}% +You can set the font style of the page numbers separately from these elements +using \FontElement{partentrypagenumber}% +\important{\FontElement{partentrypagenumber}} and +\FontElement{chapterentrypagenumber}% +\important{\FontElement{chapterentrypagenumber}\\ + \FontElement{sectionentrypagenumber}}\,---\,for \Class{scrbook} and +\Class{scrreprt}\,---\,or \FontElement{sectionentrypagenumber}\,---\,for +\Class{scrartcl}\,---\, (see \DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont} in \autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}, or +\autoref{tab:maincls.fontelements}, \autopageref{tab:maincls.fontelements}). +If\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} you use dotted lines connecting the heading entries +(chapter or section depending on the class) to the page numbers using the +\DescRef{\LabelBase.option.toc}% +\IndexOption{toc~=\textKValue{chapterentrywithdots}}% +\IndexOption{toc~=\textKValue{sectionentrywithdots}} +\DescRef{\LabelBase.option.chapterentrydots}% +\IndexOption{chapterentrydots~=\PName{simple switch}} or +\DescRef{\LabelBase.option.sectionentrydots}% +\IndexOption{sectionentrydots~=\PName{simple switch}} option, you can change +their font style using the \DescRef{\LabelBase.fontelement.chapterentrydots}% +\IndexFontElement{chapterentrydots}% +\important{\DescRef{\LabelBase.fontelement.chapterentrydots}\\ + \DescRef{\LabelBase.fontelement.sectionentrydots}} and +\DescRef{\LabelBase.fontelement.sectionentrydots}% +\IndexFontElement{sectionentrydots} elements. The defaults for these +elements are found in \autoref{tab:maincls.tocelements}. +\begin{table} +% \centering +% \caption + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside} + [Default font styles for the elements of the table of contents] + {\label{tab:maincls.tocelements}% + Default font styles for the elements of the table of contents} + [l] + \setlength{\tabcolsep}{.9\tabcolsep}% Umbruchoptimierung! + \begin{tabular}[t]{ll} + \toprule + Element & Default font style \\ + \midrule + \FontElement{partentry} & + \DescRef{\LabelBase.cmd.usekomafont}\PParameter{disposition}\Macro{large} \\ + \FontElement{partentrypagenumber} & \\ + \FontElement{chapterentry} & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{disposition}\\ + \FontElement{chapterentrydots} & \Macro{normalfont} \\ + \FontElement{chapterentrypagenumber} & \\ + \FontElement{sectionentry} & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{disposition} \\ + \FontElement{sectionentrydots} & \Macro{normalfont} \\ + \FontElement{sectionentrypagenumber} & \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} +% +\EndIndexGroup + + +\begin{Declaration} + \Counter{tocdepth} + \Macro{parttocdepth} + \Macro{sectiontocdepth} + \Macro{subsectiontocdepth} + \Macro{subsubsectiontocdepth} + \Macro{paragraphtocdepth} + \Macro{subparagraphtocdepth} +\end{Declaration}% +Normally, the sectioning divisions included in the table of contents are all +those from \DescRef{\LabelBase.cmd.part} to +\DescRef{\LabelBase.cmd.subsection} for the \Class{scrbook} and +\Class{scrreprt} classes, or from \DescRef{\LabelBase.cmd.part} to +\DescRef{\LabelBase.cmd.subsubsection} for the \Class{scrartcl} class. Whether +or not to include a sectioning level in the table of contents is controlled by +the \Counter{tocdepth} counter. This has the value -1 for +\DescRef{\LabelBase.cmd.part}, 0 for \DescRef{\LabelBase.cmd.chapter}, and so +on. By incrementing or decrementing the counter, you can choose the lowest +sectioning level to include in the table of contents. Incidentally, the +standard classes work the same way. +Unlike\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\textnote{\KOMAScript{} vs. standard classes} with the +standard classes, with \KOMAScript{} you do not need to remember these values. +\KOMAScript{} defines a \Macro{\PName{level}tocdepth} command for each +sectioning level with the appropriate value which you can use to set +\Counter{tocdepth}. + +Please note\textnote{Attention!} that in +\Class{scrartcl}\OnlyAt{\Class{scrartcl}}, the values of \Counter{tocdepth} +and \DescRef{\LabelBase.counter.secnumdepth}\IndexCounter{secnumdepth} (see +\autoref{sec:\LabelBase.structure}, +\DescPageRef{\LabelBase.counter.secnumdepth}) for +\DescRef{\LabelBase.cmd.part} are not the same. This behaviour was copied from +the standard \Class{article} class for compatibility. Thus, for example, you +should not use \DescRef{\LabelBase.cmd.partnumdepth}\IndexCmd{partnumdepth} to +set the value of \Counter{tocdepth}.% +\begin{Example} + Suppose you are preparing an article that uses the sectioning level + \DescRef{\LabelBase.cmd.subsubsection}. However, you do not want this + sectioning level to appear in the table of contents. The preamble of your + document might contain the following: +\begin{lstcode} + \documentclass{scrartcl} + \setcounter{tocdepth}{\subsectiontocdepth} +\end{lstcode} + Thus you set the \Counter{tocdepth} counter to the value of the + \Macro{subsectiontocdepth} command. That value is normally 2, but this way, + you do not have to remember it. + + If instead you simply want to include one less level in the table of + contents than you normally would, you can simply subtract one from the + default value of \Counter{tocdepth}: +\begin{lstcode} + \documentclass{scrartcl} + \addtocounter{tocdepth}{-1} +\end{lstcode} + The\textnote{Hint!} value that you need to add to or subtract from + \Counter{tocdepth} is listed in the table of contents after at least two + \LaTeX{} runs. +\end{Example}% +\EndIndexGroup +% +\EndIndexGroup + + +\LoadCommonFile{parmarkup}% \section{Paragraph Markup} + +\LoadCommonFile{oddorevenpage}% \section{Detecting Odd or Even Pages} + + +\section{Headers and Footers Using Predefined Page Styles} +\seclabel{pagestyle} + +\BeginIndexGroup +\BeginIndex{}{page>style}% +One of the general characteristics of a document is the page style. In +\LaTeX{} this primarily consists of the contents of headers and footers. + + +\begin{Declaration} + \OptionVName{headsepline}{simple switch} + \OptionVName{footsepline}{simple switch} +\end{Declaration}% +You\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} can use these options to specify whether a horizontal rule +appears beneath the header or above the footer. You can use any of the values +for simple switches shown in \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch}. Setting the \Option{headsepline} option to +true or invoking it with no value results in a line beneath the header. +Similarly, activating the \Option{footsepline} option results in a rule above +the footer. Deactivating either option switches off the respective rule. + +The\textnote{Attention!} \Option{headsepline} option naturally has no effect +with the \DescRef{\LabelBase.pagestyle.empty} and +\DescRef{\LabelBase.pagestyle.plain} page styles, which are described below, +because these styles explicitly dispense with a header\Index{page>header}. +Typographically, such a line has the effect of making the header appear to be +closer to the text. This does not mean that the header then needs to be moved +farther away from the body of the text\Index{text>body}. Instead, the header +should be considered as belonging to the text body for the purpose of +calculating the type area. \KOMAScript{} takes this into account by passing +the \Option{headsepline} option to the +\hyperref[cha:typearea]{\Package{typearea}}% +\important{\hyperref[cha:typearea]{\Package{typearea}}}\IndexPackage{typearea} +package, which then automatically executes the package option +\DescRef{typearea.option.headinclude}% +\IndexOption{headinclude}\important{\DescRef{typearea.option.headinclude}} +with the same value. The same applies to the footer separation line. Unlike +\Option{headsepline}, the \Option{footsepline} option also affects the +\PValue{plain} page style because \PValue{plain} prints a page number in the +footer. + +The options themselves do not automatically recalculate the type area. To +recalculate it, use the \DescRef{typearea.option.DIV} option with the values +\hyperref[desc:typearea.option.DIV.last]{\PValue{last}} or +\hyperref[desc:typearea.option.DIV.current]{\PValue{current}} (see +\DescPageRef{typearea.option.DIV.last}) or the +\DescRef{typearea.cmd.recalctypearea} command (see +\DescPageRef{typearea.cmd.recalctypearea}) in \autoref{cha:typearea}. + +The \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} +package (see \autoref{cha:scrlayer-scrpage}) offers further possibilities for +adjusting lines in headers and footers.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{pagestyle}\Parameter{page style} + \Macro{thispagestyle}\Parameter{local page style} +\end{Declaration}% +There are usually four different page styles: +\begin{description} +\item[{\PageStyle{empty}% + \BeginIndex[indexmain]{Pagestyle}{empty}\LabelPageStyle{empty}}] is the + page style with completely empty headers and footers. In {\KOMAScript} + this is identical to the standard classes.% +\item[{\PageStyle{headings}% + \BeginIndex[indexmain]{Pagestyle}{headings}\LabelPageStyle{headings}}] is + the page style with running heads in the header. In this style, headings are + automatically\Index[indexmain]{running heads>automatic} inserted into the + header. \OnlyAt{\Class{scrbook}\and\Class{scrreprt}}% + With the classes \Class{scrbook}\IndexClass{scrbook} and + \Class{scrreprt}\IndexClass{scrreprt}, the headings of chapters and sections + are repeated in the header for two-sided printing\,---\,on the outer side + with {\KOMAScript}\textnote{\KOMAScript{} vs. standard classes}, on the + inner side with the standard classes. {\KOMAScript} puts the page number on + the outer side of the footer; the standard classes put it on the inner side + of the header. In one-sided printing, {\KOMAScript} uses only the chapter + headings, which are centred in the header, and puts the page numbers centred + in the footer. + \OnlyAt{\Class{scrartcl}}\Class{scrartcl}\IndexClass{scrartcl} behaves + similarly but starts one a level deeper in the sectioning hierarchy, with + sections and subsections, because the chapter level does not exist in this + case. + + While the standard classes\textnote{\KOMAScript{} vs. standard classes} + automatically convert the running heads to upper-case letters, + {\KOMAScript} uses the capitalisation found in the headings. There are + several typographical reasons for this. Upper-case letters are actually far + too massive as a text decoration. If you use them anyway, they should be set + one point smaller and with slightly tighter spacing. The standard classes do + not take these points into consideration. + + In addition, the {\KOMAScript} classes support rules below the header and + above the footer with the \DescRef{\LabelBase.option.headsepline} and + \DescRef{\LabelBase.option.footsepline} options (see + \DescPageRef{\LabelBase.option.headsepline}).% +\item[{\PageStyle{myheadings}% + \BeginIndex[indexmain]{Pagestyle}{myheadings}\LabelPageStyle{myheadings}}] + mostly corresponds to the \PValue{headings} page style, but the running + heads are not generated automatically% + \Index[indexmain]{running heads>manual}\,---\,they have to be defined by the + user. You can use the \DescRef{\LabelBase.cmd.markboth}\IndexCmd{markboth} + and \DescRef{\LabelBase.cmd.markright}\IndexCmd{markright}\important{% + \DescRef{\LabelBase.cmd.markboth}\\ + \DescRef{\LabelBase.cmd.markright}} commands for that purpose (see + \DescPageRef{\LabelBase.cmd.markright}). +\item[{\PageStyle{plain}% + \BeginIndex[indexmain]{Pagestyle}{plain}\LabelPageStyle{plain}}] is the + page style with no running head\Index{running head} and only a page number% + \Index{page>number} in the footer. The\textnote{\KOMAScript{} vs. standard + classes} standard classes always centre this page number in the footer. + {\KOMAScript} puts the page number on the outer side of the footer in + two-sided\Index{two-sided} mode. {\KOMAScript} behaves like the + standard classes in one-sided printing.% +\end{description} + +You\important{\Macro{pagestyle}} can set the page style at any time with the +help of the \Macro{pagestyle} command, and this setting takes effect with the +next page that is output. If\textnote{Hint!} you use \Macro{pagestyle} just +before a command that results in an implicit page break and if the new page +style should be used on the resulting new page, a +\DescRef{\LabelBase.cmd.cleardoublepage} just before \Macro{pagestyle} will be +useful. But usually you set the page style only once, at the beginning of the +document or in the preamble. + +To\important{\Macro{thispagestyle}} change the page style of the current page +only, use the \Macro{thispagestyle} command. This occurs automatically at some +points in the document. For example, the +\Macro{thispagestyle}\PParameter{\DescRef{\LabelBase.cmd.chapterpagestyle}} +command is issued implicitly on the first page of a chapter. + +Note\textnote{Attention!} that when you use the +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} +package, switching between automatic and manual running heads is no longer +accomplished by changing the page styles but with special instructions. You +should not use the \PValue{headings} and \PValue{myheadings} page styles with +this package. + +\BeginIndexGroup \BeginIndex[indexother]{}{font>style}% +\BeginIndex{FontElement}{pageheadfoot}\LabelFontElement{pageheadfoot}% +\LabelFontElement{pagehead}% +\BeginIndex{FontElement}{pagefoot}\LabelFontElement{pagefoot}% +\BeginIndex{FontElement}{pagenumber}\LabelFontElement{pagenumber}% +To change the font style used for the header, the footer, or the page +number\ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}, use the \DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}). The same element, +\FontElement{pageheadfoot}\IndexFontElement{pageheadfoot}% +\important{\FontElement{pageheadfoot}}, is used for the header and the footer. +The element for the page number within the header or footer is called +\FontElement{pagenumber}\IndexFontElement{pagenumber}% +\important{\FontElement{pagenumber}}. The +\FontElement{pagefoot}\IndexFontElement{pagefoot}% +\important{\FontElement{pagefoot}} element, which is also provided by the +\KOMAScript{} classes, is used only if you define a page style with the +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage} package in which the footer contains text (see +\autoref{cha:scrlayer-scrpage}, +\DescPageRef{scrlayer-scrpage.fontelement.pagefoot}). + +You can find the default settings in +\autoref{tab:\LabelBase.defaultFontsHeadFoot}. +% +\begin{table} +% \centering% +% \caption + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \addtokomafont{caption}{\raggedright}% + \begin{captionbeside} + [{Default values for page style elements}] + {\label{tab:maincls.defaultFontsHeadFoot}% + \hspace{0pt plus 1ex}% + Default values for page style elements} + [l] + \begin{tabular}[t]{ll} + \toprule + Element & Default \\ + \midrule + \FontElement{pagefoot}\IndexFontElement{pagefoot} & + \\ + \FontElement{pageheadfoot}\IndexFontElement{pageheadfoot} & + \Macro{normalfont}\Macro{normalcolor}\Macro{slshape} \\ + \FontElement{pagenumber}\IndexFontElement{pagenumber} & + \Macro{normalfont}\Macro{normalcolor}\\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} +% +\begin{Example} + \leavevmode\phantomsection\xmpllabel{cmd.pagestyle}% + Suppose you want to set header and footer in a smaller type size + and in italics. However, the page number should not be set in + italics but in bold. Apart from the fact that the result will look + horrible, you can do this as follows: +\begin{lstcode} + \setkomafont{pageheadfoot}{% + \normalfont\normalcolor\itshape\small} + \setkomafont{pagenumber}{\normalfont\bfseries} +\end{lstcode} + On the other hand, if you only want a smaller font to be used along with the + default slanted text, you can use the following: +\begin{lstcode} + \addtokomafont{pagehead}{\small} +\end{lstcode} + As you can see, the previous example uses the + \FontElement{pagehead}\important{\FontElement{pagehead}} element. You can + achieve the same result using \PValue{pageheadfoot} instead (see + \autoref{tab:\LabelBase.fontelements} on + \autopageref{tab:\LabelBase.fontelements}). +\end{Example} +It is not possible to use these methods to force upper-case letters to be used +automatically for the running heads. Although you can redefine +\DescRef{tocbasic.cmd.MakeMarkcase}\IndexCmd{MakeMarkcase}, in such cases you +should instead use the +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} package (see +\autoref{cha:scrlayer-scrpage}, +\DescPageRef{scrlayer-scrpage.option.markcase}). + +If\textnote{Hint!} you define your own page styles, the commands +\DescRef{\LabelBase.cmd.usekomafont}\PParameter{pageheadfoot}, +\DescRef{\LabelBase.cmd.usekomafont}\PParameter{pagenumber}, and +\DescRef{\LabelBase.cmd.usekomafont}\PParameter{pagefoot} can be useful. In +particular, if you do not use the {\KOMAScript} package +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} (see +\autoref{cha:scrlayer-scrpage}) but use, for example, the +\Package{fancyhdr}\IndexPackage{fancyhdr}\important{\Package{fancyhdr}} +package (see \cite{package:fancyhdr}), you can use these commands in your +definitions. In this way you can maintain compatibility with {\KOMAScript} as +much as possible. If you do not use these commands in your own definitions, +changes such as those shown in the previous examples have no effect. The +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage} package tries to maintain maximum +compatibility as long as, for example, +\iffree{\Macro{thepage}}{\DescRef{\LabelBase-experts.cmd.thepage}}% +\IndexCmd{thepage} is not used directly for the page number rather than the +\iffree{\Macro{pagemark}}{\DescRef{\LabelBase-experts.cmd.pagemark}}% +\IndexCmd{pagemark} which is provided for it.% +\EndIndexGroup +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{markboth}\Parameter{left mark}\Parameter{right mark} + \Macro{markright}\Parameter{right mark} +\end{Declaration} +The \DescRef{\LabelBase.pagestyle.myheadings}% +\important{\DescRef{\LabelBase.pagestyle.myheadings}}% +\IndexPagestyle{myheadings} page style does not set the running head. Instead, +you set it with the help of the \Macro{markboth} and \Macro{markright} +commands. This way the \PName{left mark} will normally be used in the header +of even pages and \PName{right mark} in the header of odd pages. With +one-sided printing, only the \PName{right mark} exists. With the +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} +package, the \DescRef{scrlayer-scrpage.cmd.markleft}% +\IndexCmd{markleft}\important{\DescRef{scrlayer-scrpage.cmd.markleft}} command +is also available. + +You can use these commands with other page styles too. However, when combined +with automatic running heads, for example with the +\DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings} page style, +the effect of the commands lasts only until the next time the respective marks +are set automatically.% +% +\EndIndexGroup + +\begin{Declaration} + \Macro{titlepagestyle} + \Macro{partpagestyle} + \Macro{chapterpagestyle} + \Macro{indexpagestyle} +\end{Declaration}% +\Index{title>page style}% +\Index{part>page style}% +\Index{chapter>page style}% +\Index{index>page style}% +On some pages, a different page style is chosen automatically with the help of +the \DescRef{\LabelBase.cmd.thispagestyle} command. Which page style this +actually is, is defined by these four macros, of which \Macro{partpagestyle} +and \Macro{chapterpagestyle}\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} are +found only with classes \Class{scrbook} and \Class{scrreprt}, and not in +\Class{scrartcl}. The default value for all four cases is +\DescRef{\LabelBase.pagestyle.plain}\IndexPagestyle{plain}. You can find the +meaning of these macros in \autoref{tab:specialpagestyles}. +% +\begin{table} + \centering + \caption{Macros to set up the page style of special pages} + \label{tab:specialpagestyles} + \begin{desctabular} + \mentry{titlepagestyle}{Page style for a title page when using + \emph{in-page} titles.}% + \mentry{partpagestyle}{Page style for pages with + \DescRef{\LabelBase.cmd.part} titles.}% + \mentry{chapterpagestyle}{Page style for the first page of a chapter.}% + \mentry{indexpagestyle}{Page style for the first page of the index.}% + \end{desctabular} +\end{table} +% +You can redefine the page styles with the \Macro{renewcommand} macro. +\begin{Example} + Suppose you do not want the pages with a \DescRef{\LabelBase.cmd.part} + heading to be numbered. You can use the following command in the preamble of + your document: +\begin{lstcode} + \renewcommand*{\partpagestyle}{empty} +\end{lstcode} + As mentioned previously on \DescPageRef{\LabelBase.pagestyle.empty}, + the \PValue{empty} page style is exactly what is required in this + example. Of course, you can also use a user-defined page style. + + Suppose you have defined your own page style for initial chapter pages with + the \hyperref[cha:scrlayer]{\Package{scrlayer}} (see + \autoref{sec:scrlayer.pagestyles}) or the + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} package (see + \autoref{sec:scrlayer-scrpage-experts.pagestyle.pairs}). You have given this + page style the fitting name of \PValue{chapter}. To actually use this style, + you must redefine \Macro{chapterpagestyle} in this way: +\begin{lstcode} + \renewcommand*{\chapterpagestyle}{chapter} +\end{lstcode} + + Suppose you do not want the table of contents\Index{table of contents}% + \textnote{table of contents} of a book to have page numbers. Everything + after the table of contents, however, should use the \PValue{headings} + page style, including the \PValue{plain} page style for the first + page of every chapter. You can use the following: +\begin{lstcode} + \clearpage + \pagestyle{empty} + \renewcommand*{\chapterpagestyle}{empty} + \tableofcontents + \clearpage + \pagestyle{headings} + \renewcommand*{\chapterpagestyle}{plain} +\end{lstcode} + You can also keep the redefinition local by using a group. This method has + the advantage that you do not need to make any assumptions about the what + the previous page style was in order to restore it after your local change: +\begin{lstcode} + \clearpage + \begingroup + \pagestyle{empty} + \renewcommand*{\chapterpagestyle}{empty} + \tableofcontents + \clearpage + \endgroup +\end{lstcode} + Note,\important{Attention!} however, that you never should put a numbered + sectioning command into a group. Otherwise you may get unpredictable results + with commands like \Macro{label}. + + On \DescPageRef{tocbasic.cmd.AfterTOCHead} in \autoref{sec:tocbasic.toc}, + you will discover the \DescRef{tocbasic.cmd.AfterTOCHead} command, which + makes a solution even easier: +\begin{lstcode} + \AfterTOCHead[toc]{% + \thispagestyle{empty}% + \pagestyle{empty}% + } +\end{lstcode}% + This takes advantage of the fact that if there are several + \DescRef{\LabelBase.cmd.thispagestyle} commands on the same page, the last + one always wins. +\end{Example} + +\begin{Explain} + You might think that you can put running heads on the first page of a + chapter simply by using the +\begin{lstcode} + \renewcommand*{\chapterpagestyle}{headings} +\end{lstcode} + command. Before you try this, you should read \iffree{}{more about the + background to \DescRef{maincls-experts.cmd.rightmark} in + \autoref{sec:maincls-experts.addInfos} on + \DescPageRef{maincls-experts.cmd.rightmark}. Also, }the remarks on + \DescRef{scrlayer-scrpage-experts.cmd.rightfirstmark} starting on page + \DescPageRef{scrlayer-scrpage-experts.cmd.rightfirstmark} in + \autoref{cha:scrlayer-scrpage-experts}, \autoref{part:forExperts} + \iffree{}{provide important information}.% +\end{Explain} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{pagenumbering}\Parameter{numbering style} +\end{Declaration} +This command works the same way in {\KOMAScript} as in the standard classes. +Strictly speaking, it is a feature of neither the standard classes nor the +\KOMAScript{} classes but of the {\LaTeX} kernel. This command is used to +change the \PName{numbering style} of page numbers. + +The changes take effect immediately, i.\,e., starting from the page that +contains the command. If necessary, you should first close the current page +with \DescRef{\LabelBase.cmd.clearpage} or better +\DescRef{\LabelBase.cmd.cleardoubleoddpage}% +\important{\DescRef{\LabelBase.cmd.cleardoubleoddpage}}% +\IndexCmd{cleardoubleoddpage}. You can find the available settings for +\PName{numbering style} in \autoref{tab:numberKind}. +% +\begin{table} + % \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + % \caption + \begin{captionbeside} + {\label{tab:numberKind}% + Available numbering styles of page numbers} + \begin{tabular}[t]{lll} + \toprule + numbering style & example & description \\ + \midrule + \PValue{arabic} & 8 & Arabic numbers \\ + \PValue{roman} & viii & lower-case Roman numbers \\ + \PValue{Roman} & VIII & upper-case Roman numbers \\ + \PValue{alph} & h & letters \\ + \PValue{Alph} & H & capital letters \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} + +Calling\textnote{Attention!} \Macro{pagenumbering} always resets the page +number\Index{page>number}. The current page becomes number 1 in the selected +\PName{numbering style}. In order that two-sided documents produce the correct +results on an even page, so that the left-hand page is not missing, you should +always add \DescRef{\LabelBase.cmd.cleardoubleoddpage}% +\important{\DescRef{\LabelBase.cmd.cleardoubleoddpage}}% +\IndexCmd{cleardoubleoddpage} before \Macro{pagenumbering}. The next section +provides more information about potentially inserted blank pages. + +\begin{Explain} + Let me say a word about a common mistake found in various templates + circulating on the Internet. If you encounter lines like the + following\,---\,without the initial comment naturally\,---\,this is an + unmistakable sign that the creator did not read or understand the + remark above: +\begin{lstcode} + % Attention! This example contains errors! + % Please note the explanation in the text! + \tableofcontents + \pagenumbering{arabic} + \setcounter{page}{1} +\end{lstcode} + Since \DescRef{\LabelBase.cmd.tableofcontents} outputs the table of contents + but does not automatically issue a page break at the end, the page numbering + is already changed on the last page of the table of contents. Because it + lacks a \DescRef{\LabelBase.cmd.cleardoubleoddpage} command before + \Macro{pagenumbering}, it receives a pagination of the Arabic number 1. + Additionally, the final line which sets the page numbering to 1 is + superfluous, since this is already done by \Macro{pagenumbering}. + + Sometimes\,---\,without the initial comment, naturally\,---\, you find: +\begin{lstcode} + % Attention! This example contains errors! + % Please note the explanation in the text! + \tableofcontents + \pagebreak + \pagenumbering{arabic} + \setcounter{page}{1} +\end{lstcode} + Here the creator tried to solve the problem with the final page of the table + of contents with the help of \Macro{pagebreak}\IndexCmd{pagebreak}. + + Unfortunately, this solution is not much better. Here there is a page break + after the last page of the table of contents. This may cause entries on the + last page of a two-sided document to have excess vertical spacing (see + \DescRef{\LabelBase.cmd.flushbottom}, + \DescPageRef{\LabelBase.cmd.flushbottom}). \Macro{pagebreak} is clearly + the wrong command here. + + Furthermore, \Macro{newpage}\IndexCmd{newpage} or + \DescRef{\LabelBase.cmd.clearpage} would not be sufficient for a two-sided + document. For example, if the last page of the table of contents had the + Roman numeral vii, the Arabic numbered right-side page 1 would immediately + follow the Roman numeral right-side page. A left-side page between the two + would be missing, which could cause serious problems with later printing. + + My advice: Avoid using templates that contain errors with respect to such + simple things. Incidentally, the correct way would be: +\begin{lstcode} + \tableofcontents + \cleardoubleoddpage + \pagenumbering{arabic} +\end{lstcode} + This also applies if \Class{scrartcl}\OnlyAt{\Class{scrartcl}} uses a class + that usually does not start a new page after the table of contents. If you + switch the page numbering, a new right-hand page must be started. If you do + not want such a change, you should keep the numbering style of pages + consistent throughout the document without changing it in between. +\iffalse% Umbruchkorrekturtext + For articles or other short documents, this is generally recommended. +\fi + + It is easier to change the numbering style when using + \Class{scrbook}\OnlyAt{\Class{scrbook}}. There you have the support of two + commands, \DescRef{\LabelBase.cmd.frontmatter}% + \important{\DescRef{\LabelBase.cmd.frontmatter}\\ + \DescRef{\LabelBase.cmd.mainmatter}}% + \IndexCmd{fontmatter} and \DescRef{\LabelBase.cmd.mainmatter}% + \IndexCmd{mainmatter}, for the most commonly used switching. For more + information, please see + \autoref{sec:maincls.separation}, + \DescPageRef{\LabelBase.cmd.mainmatter}.% +\end{Explain}% +\EndIndexGroup +\EndIndexGroup + + +\LoadCommonFile{interleafpage}% \section{Interleaf Pages} + +\LoadCommonFile{footnotes}% \section{Footnotes} + +\section[Book Structure]{Book Structure\protect\OnlyAt{\Class{scrbook}}} +\seclabel{separation} + +Sometimes books are loosely divided into \emph{front matter}% +\Index{front matter}, \emph{main matter}\Index{main matter}, and +\emph{back matter}\Index{back matter}. \KOMAScript{} also provides this +capability for \Class{scrbook}. + + +\begin{Declaration} + \Macro{frontmatter} + \Macro{mainmatter} + \Macro{backmatter} +\end{Declaration}% +The front matter includes all the material which appears before the main +text begins, including title pages, preface, and table of contents. It is +initiated with +\Macro{frontmatter}\important{\Macro{frontmatter}}. In the front matter, +Roman numerals are used for the page numbers, and chapter headings in +the header are not numbered. However, section headings are numbered +consecutively, starting from chapter 0. This typically does not matter, as the +front matter is used only for the title pages, table of contents% +\Index{table of contents}, lists of figures\Index{list of>figures}% +\Index{figures>list of} and tables\Index{tables>list of}, and a +preface\Index{preface} or foreword\Index{foreword}. The preface can thus be +created as a normal chapter. A preface should be as short as possible and +never divided into sections. The preface thus does not require a deeper level +of structure than the chapter. + +If you see things differently and want to use numbered +sections\Index{section>number} in the chapters of the front matter, as of +version~2.97e,\ChangedAt{v2.97e}{\Class{scrbook}}% +\important{\OptionValueRef{\LabelBase}{version}{2.97e}} the section numbering +no longer contains the chapter number. This change only takes effect when the +compatibility option is set to at least version~2.97e (see option +\DescRef{\LabelBase.option.version}, +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}). It is explicitly noted that this +creates confusion with chapter numbers! The use of +\DescRef{\LabelBase.cmd.addsec} and \DescRef{\LabelBase.cmd.section*} (see +\autoref{sec:\LabelBase.structure}, \DescPageRef{\LabelBase.cmd.section*} and +\DescPageRef{\LabelBase.cmd.addsec}) are thus, in the author's opinion, +greatly preferable. + +As of version~2.97e\ChangedAt{v2.97e}{\Class{scrbook}} the numbering of +floating environments, such as tables\Index{table>number} and +figures\Index{figure>number}, and equation numbers\Index{equation>number} in +the front matter also contains no chapter-number part. To take effect, this +too requires the corresponding compatibility setting (see the +\DescRef{\LabelBase.option.version} option, +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}). + +The part of the book with the main text is introduced +with \Macro{mainmatter}\important{\Macro{mainmatter}}. If there is no front +matter, you can omit this command. The default page numbering in the main +matter uses Arabic numerals and (re)starts the page count at 1 at the start of +the main matter. + +The back matter is introduced with +\Macro{backmatter}\important{\Macro{backmatter}}. Opinions differ as to what +belongs in the back matter. So in some cases you will find only the +bibliography\Index{bibliography}, in some cases only the index\Index{index}, +and in other cases both of these as well as the appendices. The chapters in +the back matter are similar to the chapters in the front matter, but page +numbering is not reset. If you do require separate page numbering, you can use +the \DescRef{\LabelBase.cmd.pagenumbering}% +\important{\DescRef{\LabelBase.cmd.pagenumbering}} command in +\autoref{sec:\LabelBase.pagestyle}, +\DescPageRef{\LabelBase.cmd.pagenumbering}.% +% +\EndIndexGroup + + +\section{Document Structure} +\seclabel{structure}% +\BeginIndexGroup +\BeginIndex{}{document structure} + +The structure refers to dividing a document into parts, chapters, sections, +and additional levels of structure. + + +\begin{Declaration} + \OptionVName{open}{method} +\end{Declaration}% +The\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} \KOMAScript{} classes +\Class{scrbook} and \Class{scrreprt} give you the choice of where to start a +new chapter with two-sided printing. By default \Class{scrreprt} starts a new +chapter\Index{chapter>start} on the next page. This is equivalent to +\PName{method} \PValue{any}. However, \Class{scrbook} starts new chapters at +the next right-hand page. This is equivalent to \PName{method} \PValue{right} +and is usually used in books. But sometimes chapters should start on the +left-hand page of a two-page spread. You can accomplish this with the +\PName{method} \PValue{left}\ChangedAt{v3.00}{\Class{scrbook}\and + \Class{scrreprt}}. You can find a summary of the available values in +\autoref{tab:\LabelBase.open}. The table also describes the effects of +\DescRef{\LabelBase.cmd.cleardoublepage}, +\DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, +\DescRef{\LabelBase.cmd.cleardoublestandardpage}, +\DescRef{\LabelBase.cmd.cleardoubleplainpage}, and +\DescRef{\LabelBase.cmd.cleardoubleemptypage} (see +\autoref{sec:\LabelBase.emptypage}, +\DescPageRef{\LabelBase.cmd.cleardoublepage}). + +\begin{table} + \caption[{Available values for the \Option{open} option}]{Available values + for the \Option{open} option to select page breaks with interleaf pages + using \Class{scrbook} or \Class{scrreprt}} + \begin{desctabular} + \pventry{any}{% + Parts, chapter, index, and back matter use + \DescRef{\LabelBase.cmd.clearpage}, not + \DescRef{\LabelBase.cmd.cleardoublepage}; + \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, + \DescRef{\LabelBase.cmd.cleardoublestandardpage}, + \DescRef{\LabelBase.cmd.cleardoubleplainpage}, + \DescRef{\LabelBase.cmd.cleardoubleemptypage}, and + \DescRef{\LabelBase.cmd.cleardoublepage} behave the same as using + \OptionValue{open}{right}.% + \IndexOption{open~=\textKValue{any}}}% + \pventry{left}{% + Part, chapter, index, and back matter use + \DescRef{\LabelBase.cmd.cleardoublepage}; the commands + \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, + \DescRef{\LabelBase.cmd.cleardoublestandardpage}, + \DescRef{\LabelBase.cmd.cleardoubleplainpage}, + \DescRef{\LabelBase.cmd.cleardoubleemptypage}, and + \DescRef{\LabelBase.cmd.cleardoublepage} result in a page break and add + an interleaf page\Index{page>interleaf} if needed to reach the next + left-hand page.% + \IndexOption{open~=\textKValue{left}}}% + \pventry{right}{% + Part, chapter, index, and back matter use + \DescRef{\LabelBase.cmd.cleardoublepage}; the commands + \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, + \DescRef{\LabelBase.cmd.cleardoublestandardpage}, + \DescRef{\LabelBase.cmd.cleardoubleplainpage}, + \DescRef{\LabelBase.cmd.cleardoubleemptypage}, and + \DescRef{\LabelBase.cmd.cleardoublepage} result in a page break and add + an interleaf page\Index{page>interleaf} if needed to reach the next + right-hand page.% + \IndexOption{open~=\textKValue{right}}}% + \end{desctabular} + \label{tab:\LabelBase.open} +\end{table} + +Since \LaTeX{} does not differentiate between left-hand and right-hand pages +in one-sided printing, the option has no effect in that case. + +In the \Class{scrartcl} class, the section is the first structural element +below the part. For this reason, \Class{scrartcl} does not support this +option. +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{chapterprefix}{simple switch} + \OptionVName{appendixprefix}{simple switch} + \Macro{IfChapterUsesPrefixLine}\Parameter{then code}\Parameter{else code} +\end{Declaration}% +With\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} the standard classes +\Class{book} and \Class{report}, a chapter +heading\Index[indexmain]{chapter>heading} consists of a line with the word +``Chapter''\footnote{When using another language the word ``Chapter'' is of +course translated to the appropriate language.} followed by the chapter +number. The heading itself is set left-justified on the following line. The +same effect is obtained in {\KOMAScript} with the \Option{chapterprefix} +option. You can use any value from \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} as the \PName{simple switch}. The default, +however, is \OptionValue{chapterprefix}{false}, the opposite +behaviour\textnote{\KOMAScript{} vs. standard classes} of that of the standard +classes, which corresponds to \OptionValue{chapterprefix}{true}. These options +also affect the automatic running heads in the headers (see +\autoref{sec:\LabelBase.pagestyle}, +\DescPageRef{\LabelBase.pagestyle.headings}). + +Sometimes you may want to use the simplified chapter headings produced by +\OptionValue{chapterprefix}{false} but at the same time to have the heading of +an appendix\Index{appendix} preceded by a line with ``Appendix'' followed by +the appendix letter. This is achieved by using the \Option{appendixprefix} +option (see \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}). +Since this results in an inconsistent document layout, I advise against using +this option. Ultimately, this option changes the \Option{chapterprefix} option +automatically at the beginning of the \DescRef{\LabelBase.cmd.appendix}. + +You\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}} can execute code +depending on the current setting for the chapter preceding line using +\Macro{IfChapterUsesPrefixLine}. If \Option{chapterprefix} is currently +active, the \PName{then code} is executed; otherwise, the \PName{else code} is +executed. + +\BeginIndex{FontElement}{chapterprefix}% +You can change the font style of the chapter number line that uses +\OptionValue{chapterprefix}{true} or \OptionValue{appendixprefix}{true} +by using the +\FontElement{chapterprefix}\ChangedAt{v2.96a}{\Class{scrbook}\and + \Class{scrreprt}} element with the \DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}). The default is to use the +\DescRef{\LabelBase.fontelement.chapter}\IndexFontElement{chapter} element +(see \DescPageRef{\LabelBase.cmd.chapter}, as well as +\autoref{tab:\LabelBase.structureElementsFont}, +\autopageref{tab:\LabelBase.structureElementsFont}). + +You can find additional settings for chapter headings in the explanation for +\DescRef{maincls-experts.cmd.RedeclareSectionCommand} and the commands +\DescRef{maincls-experts.cmd.chapterlineswithprefixformat} and +\DescRef{maincls-experts.cmd.chapterlinesformat} in +\autoref{sec:maincls-experts.sections}, \autoref{part:forExperts}.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{headings}{setting} +\end{Declaration} +Headings\index{heading}\index{document structure} of sectioning levels +normally use a relatively large font size in both the standard classes and +{\KOMAScript}. This choice does not appeal to everyone and is especially +problematic for small paper sizes. Consequently, {\KOMAScript} provides, in +addition to the large headings defined by the +\OptionValue{headings}{big}\IndexOption{headings~=\textKValue{big}}% +\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% +\important{\OptionValue{headings}{big}\\ + \OptionValue{headings}{normal}\\ + \OptionValue{headings}{small}} option, the options +\OptionValue{headings}{normal}\IndexOption{headings~=\textKValue{normal}} and +\OptionValue{headings}{small}\IndexOption{headings~=\textKValue{small}}, which +allow for smaller headings. The font sizes resulting from these options for +\Class{scrbook} and \Class{scrreprt} are shown in +\autoref{tab:\LabelBase.structureElementsFont}, +\autopageref{tab:\LabelBase.structureElementsFont}. Specifically, all three +settings reset the elements \DescRef{\LabelBase.fontelement.chapter}% +\IndexFontElement{chapter}, +\DescRef{\LabelBase.fontelement.section}\IndexFontElement{section}, +\DescRef{\LabelBase.fontelement.subsection}\IndexFontElement{subsection}, +\DescRef{\LabelBase.fontelement.subsubsection}% +\IndexFontElement{subsubsection}, +\DescRef{\LabelBase.fontelement.paragraph}\IndexFontElement{paragraph}, and +\DescRef{\LabelBase.fontelement.subparagraph}\IndexFontElement{subparagraph} +to the corresponding defaults. \Class{scrartcl}\OnlyAt{\Class{scrbook}\and + \Class{scrreprt}} generally uses slightly smaller headings. The spacing +before and after chapter headings is also reset by these options. + +\iffalse% + Chapter headings also have the \Option{headings} option with the + \PValue{twolinechapter} or \PValue{onelinechapter} settings, which are + equivalent to the + \OptionValueRef{\LabelBase}{chapterprefix}{true} and + \OptionValueRef{\LabelBase}{chapterprefix}{false} options. In the appendix + there are additional effects of the \PValue{onelineappendix} and + \PValue{twolineappendix} options upon the \Option{headings} option, which + corresponds to + \OptionValueRef{\LabelBase}{appendixprefix}{false} and + \OptionValueRef{\LabelBase}{appendixprefix}{true} (see also + above). % +\else% + Chapter headings\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} also + have\important{% + \OptionValue{headings}{twolinechapter}\\ + \OptionValue{headings}{onelinechapter}\\ + \OptionValue{headings}{twolineappendix}\\ + \OptionValue{headings}{onelineappendix}% + } the two options \OptionValue{headings}{twolinechapter} and + \OptionValue{headings}{onelinechapter}, which correspond to + \OptionValueRef{\LabelBase}{chapterprefix}{true} and + \OptionValueRef{\LabelBase}{chapterprefix}{false} explained above. For the + appendix, + \OptionValueRef{\LabelBase}{appendixprefix}{true} and + \OptionValueRef{\LabelBase}{appendixprefix}{false} serve as alternatives for + the \OptionValue{headings}{twolineappendix} and + \OptionValue{headings}{onelineappendix} options. % + \iffalse% + For the appendix, \OptionValue{headings}{twolineappendix} and + \OptionValue{headings}{onelineappendix} are available, which correspond to + the \OptionValueRef{\LabelBase}{appendixprefix}{true} and + \OptionValueRef{\LabelBase}{appendixprefix}{false} options (also see above). + \fi% + Of course, these options do not exist with \Class{scrartcl}% + \iffree{}{% Umbruchkorrekturtext + , since this class does not have chapters}% + .% +\fi + +The\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} \OptionValue{headings}{standardclasses}% +\important{\OptionValue{headings}{standardclasses}} option adjusts the font +sizes of the headings to those of the standard classes. In addition, the font +for the \DescRef{\LabelBase.fontelement.disposition}% +\IndexFontElement{disposition} element is set to \Macro{bfseries}. It +therefore no longer uses a sans-serif font for the headings. If you use +\Class{scrbook}\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} or +\Class{scrreprt}, \OptionValue{headings}{twolinechapter} is also set and the +spacing between the chapter headings is adjusted to that of the standard +classes. + +You\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} can set the method to specify +the page on which new chapters begin with +\OptionValue{headings}{openany}\important{% + \OptionValue{headings}{openany}\\ + \OptionValue{headings}{openright}\\ + \OptionValue{headings}{openleft}}, \OptionValue{headings}{openright}, and +\OptionValue{headings}{openleft}, or alternatively with the +\DescRef{\LabelBase.option.open} option, which takes the values \PValue{any}, +\PValue{right}, and \PValue{left} (see above). + +Another\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} special feature of \KOMAScript{} is the handling of the +optional argument of the sectioning commands \DescRef{\LabelBase.cmd.part}, +\DescRef{\LabelBase.cmd.chapter}, etc. down to +\DescRef{\LabelBase.cmd.subparagraph}. You can change its function and +meaning\important{\OptionValue{headings}{optiontohead}\\ + \OptionValue{headings}{optiontotoc}\\ + \OptionValue{headings}{optiontoheadandtoc}} with the options +\OptionValue{headings}{optiontohead}% +\IndexOption{headings~=\textKValue{optiontohead}}, +\OptionValue{headings}{optiontotoc}% +\IndexOption{headings~=\textKValue{optiontotoc}} and +\OptionValue{headings}{optiontoheadandtoc}% +\IndexOption{headings~=\textKValue{optiontoheadandtoc}}. + +See \autoref{tab:\LabelBase.headings} for a summary of all available settings +for the \Option{headings} option. The explanations of the sectioning commands +below contain examples using some of these settings. +\begin{desclist} + \desccaption[{Available values for the \Option{headings} option}]{% + Available values for the \Option{headings} option to format + section headings% + \label{tab:\LabelBase.headings}% + }{% + Available values for the \Option{headings} option (\emph{continued})% + }% + \pventry{big}{% + Use large fonts in the headings for each of the default sectioning levels + with wide spacing above and below the titles. + \IndexOption{headings~=\textKValue{big}}}% + \pventry{normal}{% + Use medium-sized fonts in the headings with medium spacing above and below + the titles. \IndexOption{headings~=\textKValue{normal}}}% + \entry{\PValue{onelineappendix}, \PValue{noappendixprefix}, + \PValue{appendixwithoutprefix}, \PValue{appendixwithoutprefixline}% + \IndexOption{headings~=\textKValue{onelineappendix}}}{% + Chapter headings in the appendix are set like other headings.% + }% + \entry{\PValue{onelinechapter}, \PValue{nochapterprefix}, + \PValue{chapterwithoutprefix}, \PValue{chapterwithoutprefixline}% + \IndexOption{headings~=\textKValue{onelinechapter}}}{% + Chapter titles are set like other headings.% + }% + \pventry{openany}{% + The commands \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, + \DescRef{\LabelBase.cmd.cleardoublestandardpage}, + \DescRef{\LabelBase.cmd.cleardoubleplainpage}, + \DescRef{\LabelBase.cmd.cleardoubleemptypage}, and + \DescRef{\LabelBase.cmd.cleardoublepage} generate a page break and insert + an interleaf page\Index{interleaf page} if needed to reach the next + right-hand page in two-sided printing, the same as in + \OptionValue{headings}{openright}. Parts, chapter, the index, and back + matter use \DescRef{\LabelBase.cmd.clearpage} instead of + \DescRef{\LabelBase.cmd.cleardoublepage}.% + \IndexOption{headings~=\textKValue{openany}}}% + \pventry{openleft}{% + The commands \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, + \DescRef{\LabelBase.cmd.cleardoublestandardpage}, + \DescRef{\LabelBase.cmd.cleardoubleplainpage}, + \DescRef{\LabelBase.cmd.cleardoubleemptypage}, and + \DescRef{\LabelBase.cmd.cleardoublepage} generate a page break and insert + an interleaf page if needed to reach the next left-hand page in two-sided + printing. Part, chapter, index and back matter use + \DescRef{\LabelBase.cmd.cleardoublepage}.% + \IndexOption{headings~=\textKValue{openleft}}}% + \pventry{openright}{% + The commands \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, + \DescRef{\LabelBase.cmd.cleardoublestandardpage}, + \DescRef{\LabelBase.cmd.cleardoubleplainpage}, + \DescRef{\LabelBase.cmd.cleardoubleemptypage}, and + \DescRef{\LabelBase.cmd.cleardoublepage} generate a page break and insert + an interleaf page if needed to reach the next right-hand page in two-sided + printing. Part, chapter, index and back matter use + \DescRef{\LabelBase.cmd.cleardoublepage}.% + \IndexOption{headings~=\textKValue{openright}}}% + \pventry{optiontohead}{% + The\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} advanced functionality of the optional argument of the + sectioning commands \DescRef{\LabelBase.cmd.part} down to + \DescRef{\LabelBase.cmd.subparagraph} is activated. By default, the + optional argument is used only for the running head.% + \IndexOption{headings~=\textKValue{optiontohead}}% + }% + \entry{\PValue{optiontoheadandtoc}, \PValue{optiontotocandhead}% + \IndexOption{headings~=\textKValue{optiontoheadandtoc}}}{% + The\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} advanced functionality of the optional argument of the + sectioning commands \DescRef{\LabelBase.cmd.part} down to + \DescRef{\LabelBase.cmd.subparagraph} is activated. By default, the + optional argument is used for the running head and the table of contents.% + }% + \pventry{optiontotoc}{% + The\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} advanced functionality of the optional argument of the + sectioning commands \DescRef{\LabelBase.cmd.part} down to + \DescRef{\LabelBase.cmd.subparagraph} is activated. By default, the + optional argument is used only for the table of contents.% + \IndexOption{headings~=\textKValue{optiontohead}}% + }% + \pventry{small}{% + Use small fonts in the headings with small spacing above and below the + titles.% + \IndexOption{headings~=\textKValue{small}}}% + \pventry{standardclasses}{% + \ChangedAt{v3.12}{\Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}}% + Reset the font settings for each of the standard sectioning levels and use + headings with the sizes of the standard classes. For chapter headings, + \Class{scrbook} und \Class{scrreprt} set + \OptionValue{headings}{twolinechapter}.% + }% + \entry{\PValue{twolineappendix}, \PValue{appendixprefix}, + \PValue{appendixwithprefix}, \PValue{appendixwithprefixline}% + \IndexOption{headings~=\textKValue{twolineappendix}}}{% + Chapter titles in the appendix are set with a number line whose format is + determined by + \DescRef{\LabelBase.cmd.chapterformat}\IndexCmd{chapterformat}.% + }% + \entry{\PValue{twolinechapter}, \PValue{chapterprefix}, + \PValue{chapterwithprefix}, \PValue{chapterwithprefixline}% + \IndexOption{headings~=\textKValue{twolinechapter}}}{% + Chapter titles are set with a number line whose format is determined by + \DescRef{\LabelBase.cmd.chapterformat}\IndexCmd{chapterformat}.% + }% +\end{desclist} +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{numbers}{setting} +\end{Declaration}% +According to {\small DUDEN}, if only Arabic numerals are used to number +section headings\Index{headings}, the German practice is to have no point at +the end (see \cite[R\,3]{DUDEN}). On the other hand, if Roman numerals or +letters appear in the numbering, then a point should appear at the end of the +numbering (see \cite[R\,4]{DUDEN}). {\KOMAScript} has a mechanism that tries +to automate this somewhat complex rule. The result is that normally after +the sectioning commands \DescRef{\LabelBase.cmd.part} and +\DescRef{\LabelBase.cmd.appendix} the numbering switches to using a final +point. This information is saved in the \File{aux} file and takes effect on +the next {\LaTeX} run. + +Sometimes the mechanism for placing or omitting the final point may fail. +Sometimes other languages have different rules. Therefore you can force the +use of the final point with the option +\OptionValue{numbers}{endperiod}\IndexOption{numbers~=\textKValue{endperiod}}% +\important{\OptionValue{numbers}{endperiod}\\ +\OptionValue{numbers}{noendperiod}} or to prohibit it with +\OptionValue{numbers}{noendperiod}. + +Note\textnote{Attention!} that this mechanism only takes effect on the +next {\LaTeX} run. Therefore, before you try to use these options to force +the correct numbering format, you should always perform another \LaTeX{} run +without modifying the document. + +You can find a summary of the available values for the \PName{setting} of +\PName{numbers} in \autoref{tab:\LabelBase.numbers}. Unlike most other +settings, this option can only be set in the document preamble, i.\,e. before +\Macro{begin}\PParameter{document}. + +\begin{table} + \caption[{Available values for the \Option{numbers} option}]{Available values + of the \Option{numbers} option to configure the final points of the + numbers for section headings} + \label{tab:\LabelBase.numbers} + \begin{desctabular} + \entry{\PValue{autoendperiod}, \PValue{autoenddot}, \PValue{auto}}{% + \KOMAScript{} decides whether to set the point at the end of sectioning + command numbers. If there are only Arabic numerals, the point will + be omitted. If a letter or Roman numeral is found, the + point is set. However, references to these numbers are set without + a final point.% + \IndexOption{numbers~=\textKValue{autoendperiod}}}% + \entry{\PValue{endperiod}, \PValue{withendperiod}, \PValue{periodatend}, + \PValue{enddot}, \PValue{withenddot}, \PValue{dotatend}}{% + All numbers of sectioning commands and their subordinate numbers are set + with a final point. Only references will be set without the final + point.% + \IndexOption{numbers~=\textKValue{endperiod}}}% + \entry{\PValue{noendperiod}, \PValue{noperiodatend}, + \PValue{noenddot}, \PValue{nodotatend}}{% + All numbers of sectioning commands are set without a final point.% + \IndexOption{numbers~=\textKValue{noendperiod}}}% + \end{desctabular} +\end{table} +% +\EndIndexGroup + + +\begin{Declaration} + \Option{chapteratlists}% + \OptionVName{chapteratlists}{value} +\end{Declaration}% +As mentioned in \autoref{sec:\LabelBase.floats}, +\DescPageRef{\LabelBase.option.listof}\OnlyAt{\Class{scrbook}\and + \Class{scrreprt}}, every chapter that is created with +\DescRef{\LabelBase.cmd.chapter} normally inserts a vertical space in the +lists of floating environments (e.\,g., tables and figures). +Since version~2.96a,\important{\OptionValueRef{\LabelBase}{version}{2.96a}}% +\ChangedAt{v2.96a}{\Class{scrbook}\and \Class{scrreprt}} this also applies to +the \DescRef{\LabelBase.cmd.addchap} command unless you choose a compatibility +setting for an earlier version (see the \DescRef{\LabelBase.option.version} +option in \autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}). + +In addition, you can use the \Option{chapteratlists} option to change the +vertical spacing by specifying the desired distance as the \PName{value}. +The default with \OptionValueRef{\LabelBase}{listof}{chaptergapsmall}% +\IndexOption{listof~=\textKValue{chaptergapsmall}} % +is 10\Unit{pt} (see the\DescRef{\LabelBase.option.version} option in +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}). + +If you use \OptionValue{chapteratlists}{entry}% +\IndexOption{chapteratlists~=\textKValue{entry}}% +\important{\OptionValue{chapteratlists}{entry}} or \Option{chapteratlists} +without specifying a value, instead of a vertical space, the chapter entry +itself will be entered into the lists. Note that such an entry occurs even if +the chapter does not contain a floating environment. A method where only +chapters with floating environments are displayed in the respective list can +be found in the German-language \KOMAScript{} forum at +\cite{https://komascript.de/comment/5070}. + +Please\textnote{Attention!} note that changes to this option only takes +effect after two additional {\LaTeX} runs.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{part}\OParameter{short version}\Parameter{heading}% + \Macro{chapter}\OParameter{short version}\Parameter{heading}% + \Macro{section}\OParameter{short version}\Parameter{heading}% + \Macro{subsection}\OParameter{short version}\Parameter{heading}% + \Macro{subsubsection}\OParameter{short version}\Parameter{heading}% + \Macro{paragraph}\OParameter{short version}\Parameter{heading}% + \Macro{subparagraph}\OParameter{short version}\Parameter{heading} +\end{Declaration}% +\Index[indexmain]{part}% +\Index[indexmain]{chapter}% +\Index[indexmain]{section}% +The standard sectioning commands in {\KOMAScript} work the same way as those +in the standard classes. Thus, you can specify an alternative text for the +table of contents and running heads as an optional argument to the sectioning +commands. + +However, with\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\textnote{\KOMAScript{} vs. standard classes} the +\important{\DescRef{\LabelBase.option.headings}} +\OptionValueRef{\LabelBase}{headings}{optiontohead}% +\IndexOption[indexmain]{headings~=\textKValue{optiontohead}} option, +\KOMAScript{} only uses the optional argument \PName{short version} in the +running head, not the table of contents. Of course, this text will only appear +if you use a page style\Index{page>style} that puts the corresponding +sectioning level in the running head. See \autoref{sec:\LabelBase.pagestyle} +and \autoref{cha:scrlayer-scrpage}. With the +\OptionValueRef{\LabelBase}{headings}{optiontotoc}% +\IndexOption[indexmain]{headings~=\textKValue{optiontotoc}} option, +\KOMAScript{} uses the optional argument \PName{short version} exclusively for +the table of contents and not the running head. However, the entry will be +shown only if the \DescRef{\LabelBase.counter.tocdepth} counter is great +enough (see \autoref{sec:\LabelBase.toc}, +\DescPageRef{\LabelBase.counter.tocdepth}). With the +\OptionValueRef{\LabelBase}{headings}{optiontoheadandtoc}% +\IndexOption[indexmain]{headings~=\textKValue{optiontoheadandtoc}} option, +\KOMAScript{} uses the optional argument \PName{short version} in both the +table of contents and the running head. These three options all activate the +extended interpretation of the optional argument \PName{short version}, which +is not active by default. + +The \ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} extended interpretation of the optional argument checks to +see if there is an equals sign in \PName{short version}. If so, the optional +argument will be interpreted as an \PName{option list}. +Three options\,---\,\OptionVName{head}{running head}\important{\Option{head}\\ + \Option{tocentry}\\ + \Option{reference}\\ + \Option{nonumber}}, \OptionVName{tocentry}{table of contents entry}, +\OptionVName{reference}{reference title}% +\ChangedAt{v3.22}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}, +and \OptionVName{nonumber}{simple switch}\ChangedAt{v3.27}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}}\,---\,are supported with this +format. To use commas or equals signs within the values of those options, you +must enclose them in braces. + +Please\textnote{Attention!} note that this mechanism only works as long as +\KOMAScript{} controls the sectioning commands. If you use package that +redefines the \KOMAScript{}'s or the internal \LaTeX{} kernel's sectioning +commands, \KOMAScript{} can no longer provide this extended mechanism. This +also applies to a \KOMAScript{} extension that is always active: sectioning +commands with no heading text\textnote{empty headings} do not create entries +in the table of contents. If you really want an entry with empty heading text, +you can use an invisible entry like \lstinline|\mbox{}|. + +\begin{Example} + Suppose you have a document with very long chapter headings. These headings + should appear in the table of contents, but you want to limit the running + head to short, single-line headings. You can do this with the optional + argument of \Macro{chapter}. +\begin{lstcode} + \chapter[short version of chapter heading] + {The Sectioning Command for Chapters + Supports not only the Heading Text + Itself but also a Short Version Whose + Use can be Controlled} +\end{lstcode} + + A little later you realize that the line breaks for this long heading are + very inappropriate. You therefore want to choose the breaks + yourself. Nevertheless, you still want automatic line breaking in the table + of contents. With +\begin{lstcode} + \chapter[head={short version of chapter heading}, + tocentry={The Sectioning + Command for Chapters Supports not + only the Heading Text Itself but + also a Short Version Whose Use + can be Controlled}] + {The Sectioning\\ + Command for Chapters\\ + Supports not only\\ + the Heading Text Itself\\ + but also\\ + a Short Version Whose\\ + Use can be Controlled} +\end{lstcode} + you create separate entries for the table of contents, running head, and + chapter heading itself. The arguments of the options \Option{head} and + \Option{tocentry} have been enclosed in braces so their contents + can be arbitrary. + + The need for braces in the example above is best illustrated by another + example. Suppose you chose the + \OptionValueRef{\LabelBase}{headings}{optiontotoc} option and set the title + this way: +\begin{lstcode} + \section[head=\emph{value}] + {Option head=\emph{value}} +\end{lstcode} + This results in the entry ``Option head=\emph{value}'' in the table of + contents but ``\emph{value}'' in the running head. But surely you wanted the + entry ``head=\emph{value}'' in the table of contents and the complete + heading text in the running head. You can do this using braces: +\begin{lstcode} + \section[head{=}\emph{value}] + {Option head=\emph{value}} +\end{lstcode} + + A similar case concerns the comma. Using the same + \DescRef{\LabelBase.option.headings} option as before +\begin{lstcode} + \section[head=0, 1, 2, 3, \dots] + {Natural Numbers Including the Zero} +\end{lstcode} + results in an error because the comma is interpreted as the + separator between the individual options of the option list % + ``\lstinline|0, 1, 2, 3, \dots|''. But writing +\begin{lstcode} + \section[head={0, 1, 2, 3, \dots}] + {Natural Numbers Including the Zero} +\end{lstcode} + makes ``\lstinline|0, 1, 2, 3, \dots|'' the argument of + the \Option{head} option. +\end{Example} + +Like\ChangedAt{v3.22}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} setting the title of a running head with the \Option{head} +option, or setting the title of a table-of-contents entry with the +\Option{tocentry} option, you can set the title of a reference with the +\Package{nameref}\IndexPackage{nameref}\important{\Package{nameref}\\ + \Package{titleref}\\ + \Package{zref-titleref}} or +\Package{titleref}\IndexPackage{titleref} packages, or with the +\Package{titleref}\IndexPackage{zref-titleref} module of the +\Package{zref}\IndexPackage{zref} package, using the \Option{reference}% +\important{\Option{reference}} option. Note that the support for the +\Package{titleref} package is rather rudimentary, since that package's +performance is poor compared to the other two, and it is not fully compatible +with \Package{hyperref}\IndexPackage{hyperref}\important{\Package{hyperref}}. + +You can deactivate the numbering using +\OptionValue{nonumber}{true}\important{\Option{nonumber}}% +\ChangedAt{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} +in the extended optional argument. In contrast to the +\hyperref[desc:maincls.cmd.part*]{starred versions of the sectioning commands} +explained below, the titles will still be added to the table of contents and, +if applicable, used for the running head. For \Macro{part}, \Macro{chapter}, +and \Macro{section}, using \OptionValue{nonumber}{true} this essentially +corresponds to the \DescRef{\LabelBase.cmd.addpart}, +\DescRef{\LabelBase.cmd.addchap}, and \DescRef{\LabelBase.cmd.addsec} +commands, which are explained on \DescPageRef{\LabelBase.cmd.addpart}. + +The part-level title\important{\Macro{part}} (\Macro{part}) differs from other +sectioning levels by being numbered independently. This means that the chapter +level (in \Class{scrbook} or \Class{scrreprt}), or the section level (in +\Class{scrartcl}) is numbered consecutively over all parts. Furthermore, for +the \Class{scrbook}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} and +\Class{scrreprt} classes, the title of the part level together with the +corresponding preamble (see \DescRef{\LabelBase.cmd.setpartpreamble}, +\DescPageRef{\LabelBase.cmd.setpartpreamble}) is set on a separate page. + +The \Macro{chapter}\important{\Macro{chapter}}\OnlyAt{\Class{scrbook}\and + \Class{scrreprt}} command only exists in the book and report classes, that +is, in \Class{book}, \Class{scrbook}, \Class{report} and \Class{scrreport}, +but not in the article classes \Class{article} and \Class{scrartcl}. +Furthermore, the \Macro{chapter}\textnote{\KOMAScript{} vs. standard classes} +command in {\KOMAScript} differs substantially from the version in the +standard classes. In the standard classes, the chapter number is used together +with the prefix ``Chapter'', or the corresponding word in the appropriate +language, on a separate line above the actual chapter title text. +\KOMAScript{} replaces this +overpowering\important{\DescRef{\LabelBase.option.chapterprefix}\\ + \DescRef{\LabelBase.option.appendixprefix}} style with a simple chapter +number before the chapter title, but you can restore the original behaviour +with the \DescRef{\LabelBase.option.chapterprefix} option (see +\DescPageRef{\LabelBase.option.chapterprefix}). + +Please\textnote{Attention!} note that \Macro{part} and \Macro{chapter} in the +\Class{scrbook} and \Class{scrreprt} +\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} classes change the page style for +one page. The page style applied in {\KOMAScript} is defined in the macros +\DescRef{\LabelBase.cmd.partpagestyle} and +\DescRef{\LabelBase.cmd.chapterpagestyle} (see +\autoref{sec:\LabelBase.pagestyle}, +\DescPageRef{\LabelBase.cmd.titlepagestyle}). + +\BeginIndexGroup +\BeginIndex[indexother]{}{font}% +\BeginIndex[indexother]{}{font>style}% +\BeginIndex[indexother]{}{font>size}% +\BeginIndex{FontElement}{part}\LabelFontElement{part}% +\BeginIndex{FontElement}{partnumber}\LabelFontElement{partnumber}% +\BeginIndex{FontElement}{chapter}\LabelFontElement{chapter}% +\BeginIndex{FontElement}{chapterprefix}\LabelFontElement{chapterprefix}% +\BeginIndex{FontElement}{section}\LabelFontElement{section}% +\BeginIndex{FontElement}{subsection}\LabelFontElement{subsection}% +\BeginIndex{FontElement}{subsubsection}\LabelFontElement{subsubsection}% +\BeginIndex{FontElement}{paragraph}\LabelFontElement{paragraph}% +\BeginIndex{FontElement}{subparagraph}\LabelFontElement{subparagraph}% +\BeginIndex{FontElement}{disposition}\LabelFontElement{disposition}% +You\ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} can change the font style for all headings with the +\DescRef{\LabelBase.cmd.setkomafont}\IndexCmd{setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont}\IndexCmd{addtokomafont} commands (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}). In doing so, the element +\FontElement{disposition}\important{\FontElement{disposition}} is applied +first, followed by the specific element\important{% + \FontElement{part}\\ + \FontElement{chapter}\\ + \FontElement{section}\\ + \FontElement{subsection}\\ + \FontElement{paragraph}\\ + \FontElement{subparagraph}} for each sectioning level (see +\autoref{tab:\LabelBase.fontelements}, +\autopageref{tab:\LabelBase.fontelements}). There is a separate elements, +\FontElement{partnumber}, for the number of the part heading, and +\FontElement{chapterprefix}, for the optional prefix line of chapter headings. +The initial definition for the \FontElement{disposition} element is +\Macro{normalcolor}\linebreak[2]\Macro{sffamily}\linebreak[2]\Macro{bfseries}. +The default font sizes for the specific elements depends on the options +\OptionValueRef{\LabelBase}{headings}{big}, +\OptionValueRef{\LabelBase}{headings}{normal}, and +\OptionValueRef{\LabelBase}{headings}{small} (see +\DescPageRef{\LabelBase.option.headings}). They are listed in +\autoref{tab:\LabelBase.structureElementsFont}. +% Umbruchkorrektur: Tabelle verschoben +\begin{table} +% \centering% +% \caption + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside}[{Default font sizes for different levels of document + sectioning}]{% + \label{tab:\LabelBase.structureElementsFont}% + Default font sizes for different levels of document sectioning in + \Class{scrbook} and \Class{scrreprt}}[l] + \begin{tabular}[t]{lll} + \toprule + Class Option & Element & Default\\ + \midrule + \OptionValueRef{\LabelBase}{headings}{big} + & \DescRef{\LabelBase.fontelement.part}\IndexFontElement{part} + & \Macro{Huge} \\ + & \DescRef{\LabelBase.fontelement.partnumber}% + \IndexFontElement{partnumber} + & \Macro{huge} \\ + & \DescRef{\LabelBase.fontelement.chapter}\IndexFontElement{chapter} + & \Macro{huge} \\ + & \DescRef{\LabelBase.fontelement.chapterprefix}% + \IndexFontElement{chapterprefix} + & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{chapter} \\ + & \DescRef{\LabelBase.fontelement.section}\IndexFontElement{section} + & \Macro{Large} \\ + & \DescRef{\LabelBase.fontelement.subsection}% + \IndexFontElement{subsection} + & \Macro{large} \\ + & \DescRef{\LabelBase.fontelement.subsubsection}% + \IndexFontElement{subsubsection} + & \Macro{normalsize} \\ + & \DescRef{\LabelBase.fontelement.paragraph}\IndexFontElement{paragraph} + & \Macro{normalsize} \\ + & \DescRef{\LabelBase.fontelement.subparagraph}% + \IndexFontElement{subparagraph} + & \Macro{normalsize} \\[1ex] + \OptionValueRef{\LabelBase}{headings}{normal} + & \DescRef{\LabelBase.fontelement.part} & \Macro{huge} \\ + & \DescRef{\LabelBase.fontelement.partnumber} & \Macro{huge} \\ + & \DescRef{\LabelBase.fontelement.chapter} & \Macro{LARGE} \\ + & \FontElement{chapterprefix}\IndexFontElement{chapterprefix} + & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{chapter} \\ + & \DescRef{\LabelBase.fontelement.section} & \Macro{Large} \\ + & \DescRef{\LabelBase.fontelement.subsection} & \Macro{large} \\ + & \DescRef{\LabelBase.fontelement.subsubsection} & \Macro{normalsize} \\ + & \DescRef{\LabelBase.fontelement.paragraph} & \Macro{normalsize} \\ + & \DescRef{\LabelBase.fontelement.subparagraph} & \Macro{normalsize} \\[1ex] + \OptionValueRef{\LabelBase}{headings}{small} + & \DescRef{\LabelBase.fontelement.part} & \Macro{LARGE} \\ + & \DescRef{\LabelBase.fontelement.partnumber} & \Macro{LARGE} \\ + & \DescRef{\LabelBase.fontelement.chapter} & \Macro{Large} \\ + & \FontElement{chapterprefix}\IndexFontElement{chapterprefix} + & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{chapter} \\ + & \DescRef{\LabelBase.fontelement.section} & \Macro{large} \\ + & \DescRef{\LabelBase.fontelement.subsection} & \Macro{normalsize} \\ + & \DescRef{\LabelBase.fontelement.subsubsection} & \Macro{normalsize} \\ + & \DescRef{\LabelBase.fontelement.paragraph} & \Macro{normalsize} \\ + & \DescRef{\LabelBase.fontelement.subparagraph} & \Macro{normalsize}\\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} +% +\begin{Example} + Suppose you use the \OptionValueRef{\LabelBase}{headings}{big} class option + and notice that the very large headings of the document parts are too bold. + You could change this as follows: +\begin{lstcode} + \setkomafont{disposition}{\normalcolor\sffamily} + \part{Appendices} + \addtokomafont{disposition}{\bfseries} +\end{lstcode} +Using the command above you only switch off the font attribute +\textbf{bold} for a heading ``Appendices''. A much more convenient +and elegant solution is to change all \Macro{part} headings at once. +This is done either by: +\begin{lstcode} + \addtokomafont{part}{\normalfont\sffamily} + \addtokomafont{partnumber}{\normalfont\sffamily} +\end{lstcode} + or simply: +\begin{lstcode} + \addtokomafont{part}{\mdseries} + \addtokomafont{partnumber}{\mdseries} +\end{lstcode} +The second version is preferred because it gives you the correct result +even if you change the \DescRef{\LabelBase.fontelement.disposition} +element\IndexFontElement{disposition}, for instance: +\begin{lstcode} + \setkomafont{disposition}{\normalcolor\bfseries} +\end{lstcode} + With this change, it is possible to set all section levels at once to no + longer use sans serif fonts. +\end{Example} + +I strongly advise against using the ability to switch fonts in order to mix +fonts, font sizes, and font attributes wildly. Picking the right font for the +job is a matter for experts and has almost nothing to do with the personal +tastes of non-experts. See the citation at the end of +\autoref{sec:typearea.tips}, \autopageref{sec:typearea.tips.cite} and to the +following explanation. + +\begin{Explain} + It is possible to use different font types for different sectioning + levels in {\KOMAScript}. Non-experts in typography should absolutely avoid + doing so for excellent typographical reasons. + + A rule of typography states that you should mix as few fonts as possible. + Using sans serif for headings already seems to violate this rule. However, + you should realize that large, bold, serif letters are much too heavy for + headings. Strictly speaking, you should then use a normal instead of a bold + or semi-bold font. However, in deeper levels of the sectioning, a normal + font may then appear too light. On the other hand, sans serif fonts have a + very pleasant appearance in headings, and almost solely in headings. There + is, therefore, good reason why sans serif is the default in {\KOMAScript}. + + Greater variety should, however, be avoided. Font mixing is something for + professionals. For this reason, if you want to use fonts other than the + standard {\TeX} fonts\,---\,regardless of whether these are CM\Index{CM + fonts}, EC\Index{EC fonts}, or LM fonts\Index{LM fonts}\,---\,you should + consult an expert about the compatibility of the sans serif and serif fonts, + or redefine the element + \DescRef{\LabelBase.fontelement.disposition}\IndexFontElement{disposition} + as a precautionary measure. The author considers the commonly encountered + combinations of Times and Helvetica or Palatino with Helvetica to be + awkward. +\end{Explain} +\EndIndexGroup +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{part*}\Parameter{heading}% + \Macro{chapter*}\Parameter{heading}% + \Macro{section*}\Parameter{heading}% + \Macro{subsection*}\Parameter{heading}% + \Macro{subsubsection*}\Parameter{heading}% + \Macro{paragraph*}\Parameter{heading}% + \Macro{subparagraph*}\Parameter{heading} +\end{Declaration}% +The starred variants of all sectioning commands produce +unnumbered\Index{numbering} headings which do not appear in the table of +contents\Index{table>of contents}\Index{contents>table of} or in the running +head\Index{running head}. The absence of a running head often has an unwanted +side effect. If, for example, a chapter set using \Macro{chapter*} spans +several pages, then the running head of the previous chapter suddenly +reappears. {\KOMAScript} offers a solution for this problem, described below. +\Macro{chapter*}\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} only exists in +book and report classes, that is, \Class{book}, \Class{scrbook}, +\Class{report} and \Class{scrreport}, not in the article classes +\Class{article} and \Class{scrartcl}. + +Please\textnote{Attention!} note that \DescRef{\LabelBase.cmd.part} and +\DescRef{\LabelBase.cmd.chapter} change the page style for one page. While the +standard classes use the \PageStyle{plain} page style, {\KOMAScript} applies +the style defined in the \DescRef{\LabelBase.cmd.partpagestyle} and +\DescRef{\LabelBase.cmd.chapterpagestyle} macros (see +\autoref{sec:\LabelBase.pagestyle}, +\DescPageRef{\LabelBase.cmd.titlepagestyle}). + +The possibilities for switching fonts\ChangedAt{v2.8p}{% + \Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}} % +described above for the unstarred variants apply without change. The elements +use the same names since they do not indicate variants but structuring +levels.% +% +\EndIndexGroup + + +\iffalse% Umbruchkorrekturtext + In the standard classes\textnote{\KOMAScript{} vs. standard classes} there + are no further structuring commands. In particular, there are no commands + which can produce unnumbered chapters or sections which show up in the table + of contents and in the running heading.% +\fi + + +\begin{Declaration} + \Macro{addpart}\OParameter{short version}\Parameter{heading}% + \Macro{addpart*}\Parameter{heading}% + \Macro{addchap}\OParameter{short version}\Parameter{heading}% + \Macro{addchap*}\Parameter{heading}% + \Macro{addsec}\OParameter{short version}\Parameter{heading}% + \Macro{addsec*}\Parameter{heading} + \textnote[n]{\KOMAScript{} vs. standard classes} +\end{Declaration}% +In addition to the commands of the standard classes, {\KOMAScript} offers the +new commands \Macro{addpart}, \Macro{addsec} and \Macro{addchap}. They are +similar to the standard commands \DescRef{\LabelBase.cmd.part}\IndexCmd{part}% +\important{\DescRef{\LabelBase.cmd.part}, \DescRef{\LabelBase.cmd.chapter}, + \DescRef{\LabelBase.cmd.section}}, +\DescRef{\LabelBase.cmd.chapter}\IndexCmd{chapter} and +\DescRef{\LabelBase.cmd.section}\IndexCmd{section} except that they are +unnumbered. They thus produce both a running head and an entry in the table of +contents which take into account the \DescRef{\LabelBase.option.headings}% +\important{\DescRef{\LabelBase.option.headings}} option settings, especially +the handling of the optional argument. However, enabling or disabling the +\Option{nonumber} switch will have no effect. + +The starred variants \Macro{addchap*} and \Macro{addsec*} are similar to the +standard commands \DescRef{\LabelBase.cmd.chapter*} and +\DescRef{\LabelBase.cmd.section*} except for a small but important difference: +the running heads are deleted. This eliminates the side effect of obsolete +headers mentioned above. Instead, the running heads on subsequent pages remain +empty. \OnlyAt{\Class{book}\and \Class{scrreprt}}\Macro{addchap} and +\Macro{addchap*} only exist, of course, in book and report classes, namely +\Class{book}, \Class{scrbook}, \Class{report} and \Class{scrreport}, not in +the article classes \Class{article} and \Class{scrartcl}. + +The \Macro{addpart} command produces an unnumbered document part with an +entry in the table of contents. Since the running heads are already deleted +by \DescRef{\LabelBase.cmd.part} and \DescRef{\LabelBase.cmd.part*} the +previously mentioned problem with obsolete headers does not exist. The starred +version \Macro{addpart*} is thus identical to \DescRef{\LabelBase.cmd.part*} +and is only defined for reasons of consistency. + +Please note\textnote{Attention!} that \Macro{addpart} and \Macro{addchap} and +their starred variants change the page style for one page. The particular page +style is defined in the macros \DescRef{\LabelBase.cmd.partpagestyle} and +\DescRef{\LabelBase.cmd.chapterpagestyle} (see +\autoref{sec:\LabelBase.pagestyle}, +\DescPageRef{\LabelBase.cmd.titlepagestyle}). +\iffree{\iffalse}{\csname iftrue\endcsname}% Umbruchkorrekturbeispiel + \begin{Example} + You write a book with a long afterword that spans several pages. This + should receive neither a running head nor an entry in the table of + contents. Therefore, you first use \DescRef{\LabelBase.cmd.chapter*}: +\begin{lstcode} + \documentclass{scrbook} + \usepackage{blindtext} + \begin{document} + \tableofcontents + \blinddocument + \chapter*{Afterword} + \Blindtext[10] + \end{document} +\end{lstcode} + However, you discover that the running head of the previous chapter + reappears on the second and third pages of the afterword. Naturally, you do + not want that. Therefore, you use \Macro{addchap*}: +\begin{lstcode} + \documentclass{scrbook} + \usepackage{blindtext} + \begin{document} + \tableofcontents + \blinddocument + \addchap*{Afterword} + \Blindtext[10] + \end{document} +\end{lstcode} + The complete postscript is now without a running head, if that is what you + want. But even that does not quite meet your expectations. A running head + would be nice. With +\begin{lstcode} + \documentclass{scrbook} + \usepackage{blindtext} + \begin{document} + \tableofcontents + \blinddocument + \addchap{Afterword} + \Blindtext[10] + \end{document} +\end{lstcode} + you now get both ``Afterword'' as the running head on the even pages and an + entry in the table of contents. But this entry bothers your publisher. He + insists that the afterword have no entry in the table of contents. Even if + that seems strange to you, you want to satisfy the publisher, so with + \OptionValueRef{\LabelBase}{headings}{optiontotocandhead} you first + activate the extended function for the optional argument and then + explicitly set an empty argument for the table of contents: +\begin{lstcode} + \documentclass[headings=optiontotocandhead] + {scrbook} + \usepackage{blindtext} + \begin{document} + \tableofcontents + \blinddocument + \addchap[tocentry={}]{Afterword} + \Blindtext[10] + \end{document} +\end{lstcode} + The running head is not changed by \OptionValue{tocentry}{\{\}}. Since + \Class{scrbook} automatically omits empty entries in the table of contents, + the publisher is now satisfied. + \end{Example}% +\fi + +The possibilities for switching fonts\ChangedAt{v2.8p}{% + \Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}} % +described above for the unstarred variant of the sectioning commands apply +without change. The elements have the same names since they do not designate +variants but sectioning levels.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{minisec}\Parameter{heading} +\end{Declaration}% +Sometimes you want a heading\Index{heading} that is highlighted but also +closely linked to the following text. Such a heading should not be separated +by a large vertical skip. + +The \Macro{minisec} command is designed for this situation. This heading is +not associated with any sectioning level\textnote{no sectioning level}. Such a +\emph{mini-section} does not produce an entry in the table of contents, nor +does it receive any numbering. + +\BeginIndexGroup +\BeginIndex{FontElement}{minisec}\LabelFontElement{minisec}% +You can change the font of the \Macro{minisec} command using the +\DescRef{\LabelBase.fontelement.disposition}% +\important{\DescRef{\LabelBase.fontelement.disposition}\\ +\FontElement{minisec}} and \FontElement{minisec}\ChangedAt{v2.96a}{% + \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} element (see +\autoref{tab:maincls.fontelements}, \autopageref{tab:maincls.fontelements}). +The default of the \FontElement{minisec} element is empty, so by default only +the \DescRef{\LabelBase.fontelement.disposition} element is used.% +\EndIndexGroup + +\begin{Example} + You have developed a kit for building a mouse trap and want the + documentation separated into a list of necessary items and an + assembly description. You could write the following: +\begin{lstcode} + \documentclass{scrartcl} + + \begin{document} + + \title{DIY Projects} + \author{Two Left Thumbs} + \date{\today} + \maketitle + + \section{Mousetrap} + + The first project is suitable for beginners and only requires + a few components that should be found in every household. + + \minisec{Material Required} + + \begin{flushleft} + 1 board ($100\times 50 \times 12$)\\ + 1 swing-top cap of a beer-bottle\\ + 1 ballpoint pen\\ + 1 push pin\\ + 2 screws\\ + 1 hammer\\ + 1 knife + \end{flushleft} + + \minisec{Assembly} + First, find the mouse hole and put the push pin directly behind + the hole so that the mouse cannot escape during the following + actions. + + Next tap the swing-top cap into the mouse hole with the hammer. + If the cap is not big enough to block the hole completely and + permanently, take the board instead and screw it to the front + of the mouse hole using the two screws and the knife. Of + course, you can use a screwdriver instead of a knife. The + ballpoint pen has fallen victim to animal welfare. + \end{document} +\end{lstcode} + The main part, starting with the heading ``Material Required'' will look + like this: + \begin{ShowOutput}[\baselineskip]\setlength{\parindent}{1em} + \minisec{Material Required} + + \begin{flushleft} + 1 board ($100\times 50 \times 12$)\\ + 1 swing-top cap of a beer-bottle\\ + 1 ballpoint pen\\ + 1 push pin\\ + 2 screws\\ + 1 hammer\\ + 1 knife + \end{flushleft} + + \minisec{Assembly} + First, find the mouse hole and put the push pin directly behind the hole + so that the mouse cannot escape during the following actions. + + Next tap the swing-top cap into the mouse hole with the hammer. If the cap + is not big enough to block the hole completely and permanently, take the + board instead and screw it to the front of the mouse hole using the two + screws and the knife. Of course, you can use a screwdriver instead of a + knife. The ballpoint pen has fallen victim to animal welfare. + \end{ShowOutput} +\end{Example} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{raggedsection}% + \Macro{raggedchapter}% + \Macro{raggedpart} +\end{Declaration}% +In the standard classes\textnote{\KOMAScript{} vs. standard classes}, headings +are set as justified text. That means that hyphenated words can occur and +multi-line headings are stretched up to the text width. This approach is +rather uncommon in typography. {\KOMAScript} therefore sets the +headings left aligned with hanging indentation using \Macro{raggedsection} +with the default: +\begin{lstcode} + \newcommand*{\raggedsection}{\raggedright} +\end{lstcode} +You can redefine this command with \Macro{renewcommand}. +\begin{Example} + You prefer justified headings, so you write in the preamble of your document: +\begin{lstcode} + \renewcommand*{\raggedsection}{} +\end{lstcode} + or more compactly: +\begin{lstcode} + \let\raggedsection\relax +\end{lstcode} + You will get heading formatting which is very close to that of the standard + classes. It will become even closer when you combine this change with the + change to the + \DescRef{\LabelBase.fontelement.disposition}\IndexFontElement{disposition} + element mentioned above. +\end{Example} + +Because\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}} some users want +a different alignment for the \DescRef{\LabelBase.cmd.chapter} level than for +the other sectioning levels, you can change the +\DescRef{\LabelBase.cmd.chapter} justification separately by redefining +\Macro{raggedchapter}. By default, however, this command simply uses +\Macro{raggedsection}, so changing \Macro{raggedsection} indirectly affects +\Macro{raggedchapter}. + +By default, part headings (\DescRef{\LabelBase.cmd.part}) are set horizontally +centred rather than ragged right. This formatting is performed by the +\Macro{raggedpart} statement, which has the default definition +\begin{lstcode} + \let\raggedpart\centering +\end{lstcode} +You can also redefine this command using \Macro{renewcommand}. +\begin{Example} + You want the headings for \DescRef{\LabelBase.cmd.part} to be formatted the + same as any other sectioning command. To do so, put +\begin{lstcode} + \renewcommand*{\raggedpart}{\raggedsection} +\end{lstcode} + in the preamble of your document. In\textnote{Hint!} this case, and unlike + in the example above, we did not use \Macro{let} because \Macro{let} would + set \Macro{raggedpart} to the underlying value of \Macro{raggedsection}. + Subsequent changes to \Macro{raggedsection} would then not change the + behaviour of \Macro{raggedpart}. By redefining with \Macro{renewcommand}, + \Macro{raggedpart} will use the current meaning of \Macro{raggedsection} at + the time it is used rather than when it was redefined. +\end{Example}% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{partformat} + \Macro{chapterformat} + \Macro{sectionformat} + \Macro{subsectionformat} + \Macro{subsubsectionformat} + \Macro{paragraphformat} + \Macro{subparagraphformat} + \Macro{othersectionlevelsformat}\Parameter{sectioning name}\Parameter{} + \Parameter{counter output} + \Macro{IfUsePrefixLine}\Parameter{then code}\Parameter{else code} + \Macro{autodot} +\end{Declaration}% +{\KOMAScript} adds another logical layer above \Macro{the\PName{sectioning + name}} to format the sectioning numbers. The counters for each heading are +not merely output. They are formatted using the commands \Macro{partformat}, +\Macro{chapterformat}, down to +\Macro{subparagraphformat}\ChangedAt{v3.17}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}}. Of course the \Macro{chapterformat} +command, like \Macro{thechapter}, does not exist in the \Class{scrartcl} +class, but only in the \Class{scrbook} and \Class{scrreprt} +classes.\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} + +As already explained for the \DescRef{\LabelBase.option.numbers}% +\important{\DescRef{\LabelBase.option.numbers}} option at the beginning of +this section (see \DescPageRef{\LabelBase.option.numbers}), {\KOMAScript}'s +handling of points in section numbers implements the rules given in +\cite{DUDEN}, which are standard in German-language typography, in the +\Macro{autodot} command. In all levels except for +\DescRef{\LabelBase.cmd.part}, a point is followed by a further +\Macro{enskip}. This corresponds to a horizontal skip of 0.5\Unit{em}. + +Since \KOMAScript~3.17\ChangedAt{v3.17}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}}, the command +\Macro{othersectionlevelsformat} is used only in rare circumstances, i.\,e., +if the corresponding format command to a section command does not exist or is +\Macro{relax}. This should not happen for any section commands defined by +\KOMAScript{} itself. Therefore the command is no longer officially +documented. Nevertheless, if you select a compatibility level prior to +3.17\important{\OptionValueRef{\LabelBase}{version}{3.17}} (see option +\DescRef{\LabelBase.option.version}, +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}), commands \Macro{sectionformat} down +to \Macro{subparagraphformat} are ignored by \KOMAScript{}. Instead, these +layers will continue to use \Macro{othersectionlevelsformat}. + +You can redefine the formatting commands using \Macro{renewcommand} to fit +them to your personal needs. The following default definitions are used by the +{\KOMAScript} classes: +\begin{lstcode} + \newcommand*{\partformat}{\partname~\thepart\autodot} + \newcommand*{\chapterformat}{% + \mbox{\chapappifchapterprefix{\nobreakspace}\thechapter + \autodot\IfUsePrefixLine{}{\enskip}}} + \newcommand*{\sectionformat}{\thesection\autodot\enskip} + \newcommand*{\subsectionformat}{% + \thesubsection\autodot\enskip} + \newcommand*{\subsubsectionformat}{% + \thesubsubsection\autodot\enskip} + \newcommand*{\paragraphformat}{\theparagraph\autodot\enskip} + \newcommand*{\subparagraphformat}{% + \thesubparagraph\autodot\enskip} + \newcommand*{\othersectionlevelsformat}[3]{% + #3\autodot\enskip} +\end{lstcode} + +Because\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}} it uses +\Macro{IfUsePrefixLine}, \Macro{chapterformat} should not be used outside of +\DescRef{\LabelBase.cmd.chapter}. \Macro{IfUsePrefixLine} is only valid inside +\KOMAScript{} sectioning commands. Within those commands, it executes the +\PName{then code} if a prefix line for the number is used and the \PName{else +code} otherwise. + +Please also remember\textnote{Attention!} to replace \Macro{newcommand} with +\Macro{renewcommand} if you want to redefine one of the commands above. + +\begin{Example} + Suppose you do not want the word ``Part'' written in front of the part + number when you use \DescRef{\LabelBase.cmd.part}. You can put the + following command in the preamble of your document: +\begin{lstcode} + \renewcommand*{\partformat}{\thepart\autodot} +\end{lstcode} + In fact, you could do without \Macro{autodot} here and insert a fixed point + instead. Since \DescRef{\LabelBase.cmd.part} is numbered with Roman numerals, + it must be followed by a point according to \cite{DUDEN}. However, by using + \Macro{autodot} you retain the ability to use the + \DescRef{\LabelBase.option.numbers}% + \important{\DescRef{\LabelBase.option.numbers}} option + \OptionValueRef{\LabelBase}{numbers}{endperiod} and thus deviate from + the rule. You can find more details concerning class options on + \DescPageRef{\LabelBase.option.numbers}. + + Another possibility is to place the section numbers in the left margin in + such a way that the heading text is left aligned with the surrounding text. + You can accomplish this with: +\begin{lstcode} + \renewcommand*{\sectionformat}{% + \makebox[0pt][r]{\thesection\autodot\enskip}} + \renewcommand*{\subsectionformat}{% + \makebox[0pt][r]{\thesubsection\autodot\enskip}} + \renewcommand*{\subsubsectionformat}{% + \makebox[0pt][r]{% + \thesubsubsection\autodot\enskip}} + \renewcommand*{\paragraphformat}{% + \makebox[0pt][r]{\theparagraph\autodot\enskip}} + \renewcommand*{\paragraphformat}{% + \makebox[0pt][r]{% + \thesubparagraph\autodot\enskip}} +\end{lstcode} + The optional arguments of the \Macro{makebox} command require \LaTeX{} to + create a zero-width box with right-justified content. As a result, the + contents of the box are output to the left of the current position.% + \iffree{}{ %Umbruchkorrekturtext + This popular trick avoids the need first to measure the width of the + number and the spacing, and then to change the current position + appropriately with \Macro{hspace}.} + You can find more about the optional arguments of \Macro{makebox} in + \cite{latex:usrguide}. +\end{Example} + +For formatting changes in the headings that go beyond merely formatting the +unit number, please refer to +\DescRef{maincls-experts.cmd.partlineswithprefixformat}% +\IndexCmd{partlineswithprefixformat}, +\DescRef{maincls-experts.cmd.chapterlineswithprefixformat}% +\IndexCmd{chapterlineswithprefixformat} and +\DescRef{maincls-experts.cmd.chapterlinesformat}\IndexCmd{chapterlinesformat}, +as well as +\DescRef{maincls-experts.cmd.sectionlinesformat}\IndexCmd{sectionlinesformat} +and its \DescRef{maincls-experts.cmd.sectioncatchphraseformat}% +\IndexCmd{sectioncatchphraseformat} format in +\autoref{sec:maincls-experts.sections}, starting from +\DescPageRef{maincls-experts.cmd.partlineswithprefixformat}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{chapappifchapterprefix}\Parameter{additional text}% + \Macro{chapapp} +\end{Declaration}% +These\ChangedAt{v2.8o}{\Class{scrbook}\and\Class{scrreprt}} two commands are +used internally by {\KOMAScript} and also made available to the user. Later, +you will see how to use them, for example to redefine other commands.% +\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} + +If you use the layout option \OptionValueRef{\LabelBase}{chapterprefix}{true}% +\important{\DescRef{\LabelBase.option.chapterprefix}} (see +\DescPageRef{\LabelBase.option.chapterprefix}), \Macro{chapappifchapterprefix} +outputs the word ``Chapter''\Index{chapter>heading} in the body of the text in +the current language, followed by \PName{additional text}. In the +appendix\Index{appendix}, the word ``Appendix'' in the current language is +output instead, followed by \PName{additional text}. If the option +\OptionValue{\LabelBase}{chapterprefix}{false} is set, then nothing is output. + +The \Macro{chapapp} command always outputs the word ``Chapter'' or +``Appendix'', regardless of the setting of the +\DescRef{\LabelBase.option.chapterprefix} option. + +Since chapters only exist in the classes \Class{scrbook} and \Class{scrreprt}, +these commands only exist in these classes.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{chaptermark}\Parameter{running head}% + \Macro{addchapmark}\Parameter{running head}% + \Macro{sectionmark}\Parameter{running head}% + \Macro{addsecmark}\Parameter{running head}% + \Macro{subsectionmark}\Parameter{running head}% + \Macro{chaptermarkformat}% + \Macro{sectionmarkformat}% + \Macro{subsectionmarkformat} +\end{Declaration}% +\begin{Explain}% + As mentioned in \autoref{sec:\LabelBase.pagestyle}, the + \DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings}% + \important{\DescRef{\LabelBase.pagestyle.headings}} page style works with + automatic running heads\Index{running heads>automatic}. For this, the + commands \Macro{chaptermark} and \Macro{sectionmark}, or \Macro{sectionmark} + and \Macro{subsectionmark}, are defined accordingly. Every sectioning + command (\DescRef{\LabelBase.cmd.chapter}, \DescRef{\LabelBase.cmd.section}, + etc.) automatically executes the corresponding \Macro{\dots mark} command. + The parameter passed contains the text of the section heading% + \Index{heading}. The corresponding section number is added automatically in + the \Macro{\dots mark} command. The formatting is done according to the + sectioning level with one of the three commands \Macro{chaptermarkformat}, + \Macro{sectionmarkformat}, or \Macro{subsectionmarkformat}. + + Note\textnote{Attention!} that the running heads of + \DescRef{\LabelBase.cmd.addchap}\IndexCmd{addchap} and + \DescRef{\LabelBase.cmd.addsec}\IndexCmd{addsec} are also based on + \Macro{chaptermark} and \Macro{sectionmark}. However, the + \DescRef{\LabelBase.counter.secnumdepth} counter is set locally to a value + that switches off the numbering of chapters or sections. You should consider + this, for example, if you redefine \Macro{chaptermark} or + \Macro{sectionmark} (see \DescRef{\LabelBase.cmd.Ifnumbered} on + \DescPageRef{\LabelBase.cmd.Ifnumbered}). The starred variants + \DescRef{\LabelBase.cmd.addchap*} and \DescRef{\LabelBase.cmd.addsec*} use + additional commands \Macro{addchapmark} and \Macro{addsecmark} that are also + defined based on \Macro{chaptermark} and \Macro{sectionmark} with local + changes of \DescRef{\LabelBase.counter.secnumdepth}. + + Although\OnlyAt{\Class{scrartcl}} there is no \Macro{chaptermark} or + \Macro{chaptermarkformat} command in \Class{scrartcl}, there are two + commands, \Macro{subsectionmark} and \Macro{subsectionmarkformat}, which + exist only in \Class{scrartcl}. However using the + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + \IndexPackage{scrlayer-scrpage} package changes this (see + \autoref{cha:scrlayer-scrpage}). +\end{Explain} +Just as numbers in the sectioning-command headers are formatted with +\DescRef{\LabelBase.cmd.partformat} down to +\DescRef{\LabelBase.cmd.subparagraphformat}, \Macro{chaptermarkformat}, +\Macro{sectionmarkformat}, and \Macro{subsectionmarkformat} define the +formatting of the sectioning numbers in the automatic running heads. They can +be adapted to your personal needs with \Macro{renewcommand}. The original +definitions for the {\KOMAScript} classes are: +\begin{lstcode} + \newcommand*{\chaptermarkformat}{% + \chapappifchapterprefix{\ }\thechapter\autodot\enskip} + \newcommand*{\sectionmarkformat}{% + \thesection\autodot\enskip} + \newcommand*{\subsectionmarkformat}{% + \thesubsection\autodot\enskip} +\end{lstcode} +\begin{Example} + Suppose you want the word ``Chapter'' to precede the chapter number in the + running head. You could put the following definition in the preamble of your + document: +\begin{lstcode} + \renewcommand*{\chaptermarkformat}{% + \chapapp~\thechapter\autodot\enskip} +\end{lstcode} +\end{Example} +As you can see, both \DescRef{\LabelBase.cmd.chapapp} and +\DescRef{\LabelBase.cmd.chapappifchapterprefix}, explained above, are used +here.% +\EndIndexGroup + + +\begin{Declaration} + \Counter{secnumdepth} + \Macro{partnumdepth} + \Macro{chapternumdepth} + \Macro{sectionnumdepth} + \Macro{subsectionnumdepth} + \Macro{subsubsectionnumdepth} + \Macro{paragraphnumdepth} + \Macro{subparagraphnumdepth} +\end{Declaration}% +\BeginIndex{}{Nummerierung}% +Normally, the \Class{scrbook}\IndexClass{scrbook} and +\Class{scrreport}\IndexClass{scrreprt} classes number the section headings +from \DescRef{\LabelBase.cmd.part}\IndexCmd{part}\IndexCmd{chapter}% +\IndexCmd{section} down to +\DescRef{\LabelBase.cmd.subsection}\IndexCmd{subsection} and the +\Class{scrartcl}\IndexClass{scrartcl} class numbers them from +\DescRef{\LabelBase.cmd.part} down to +\DescRef{\LabelBase.cmd.subsubsection}\IndexCmd{subsubsection}. The actual +depth to which headings are numbered is controlled by the \LaTeX{} counter +\Counter{secnumdepth}. + +To\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} +save users the trouble of having to remember abstract numbers, the commands +\Macro{partnumdepth} to \Macro{subparagraphnumdepth} return the appropriate +number for the section level in their name. + +\begin{Example} + For a book project, you want the section levels from part down to section + to be numbered. To achieve this, you have to set counter + \Counter{secnumdepth} to the value represented by \Macro{sectionnumdepth} in + the preamble of your document: +\begin{lstcode} + \setcounter{secnumdepth}{\sectionnumdepth} +\end{lstcode} +\end{Example} +No provision is made for redefining these commands. Doing so could lead to +unexpected results, not only with \KOMAScript{} but also with third party +packages. Thus, you should never redefine them. + +Do\textnote{Attention!} not confuse the \Counter{secnumdepth} and +\DescRef{\LabelBase.counter.tocdepth} counters (see +\autoref{sec:\LabelBase.toc}, \DescPageRef{\LabelBase.counter.tocdepth}). +Depending on the class you are using, the meaning of the values of the +\Counter{secnumdepth} and \DescRef{\LabelBase.counter.tocdepth} counters may +differ for the same section level.% +% +\EndIndexGroup + +\begin{Declaration} + \Macro{Ifnumbered}\Parameter{section level}% + \Parameter{then code}\Parameter{else code}% + \Macro{Ifunnumbered}\Parameter{section level}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +The\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\ChangedAt{v3.28}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} commands \Macro{Ifnumbered} and \Macro{Ifunnumbered} +determine which section-level headings are numbered, using the technique +described above, and execute code depending on whether a \PName{section level} +is numbered or not. If a \PName{section level} is numbered with the current +settings, \Macro{Ifnumbered} executes the \PName{then code}. If the section +level is unnumbered, the \PName{else code} is executed. The +\Macro{Ifunnumbered} command behaves in exactly the opposite manner, executing +the \PName{then code} if the current level is unnumbered and the \PName{else + code} if it is. The \PName{section level} parameter is simply the \LaTeX{} +name of a section like \PValue{part}, \PValue{chapter}, \PValue{section}, +\PValue{subsection}, \PValue{subsubsection}, \PValue{paragraph} oder +\PValue{subparagraph}.\PValue{part}, \PValue{chapter}, \PValue{section}, +\PValue{subsection}, \PValue{subsubsection}, \PValue{paragraph}, or +\PValue{subparagraph}. + +\KOMAScript{} itself uses these tests, for example, in the definition of +\DescRef{\LabelBase.cmd.chaptermark}\IndexCmd{chaptermark} in the +\DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings} page style. +This indirectly ensures that headings inserted by +\DescRef{\LabelBase.cmd.addchap} do not set a number inside the running head +(see also \DescRef{\LabelBase.cmd.addchapmark}, +\DescPageRef{\LabelBase.cmd.addchapmark}).% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setpartpreamble}% + \OParameter{position}\OParameter{width}\Parameter{preamble} + \Macro{setchapterpreamble}% + \OParameter{position}\OParameter{width}\Parameter{preamble} +\end{Declaration}% +Parts\OnlyAt{\Class{scrbook}\and + \Class{scrreprt}}\Index{part>preamble}\Index{chapter>preamble} and chapters +in {\KOMAScript} can be given a \PName{preamble}. This is particularly useful +when you are using a two-column format with the class option +\Option{twocolumn}\IndexOption{twocolumn}, since the heading and the +\PName{preamble} are always set in a one-column layout. The \PName{preamble} +can contain more than one paragraph. The command to set the \PName{preamble} +must come before the respective \DescRef{\LabelBase.cmd.part}, +\DescRef{\LabelBase.cmd.addpart}, \DescRef{\LabelBase.cmd.chapter}, or +\DescRef{\LabelBase.cmd.addchap} command. +\begin{Example} + You are writing a report about the condition of a company. You organize the + report in such a way that every department gets its own partial report. + Each of these parts should be introduced by an abstract on the corresponding + title page. You could write the following: +\begin{lstcode} + \setpartpreamble{% + \begin{abstract} + This is a filler text. It serves merely to demonstrate the + capabilities of {\KOMAScript}. If you read this text, you will + get no information. + \end{abstract} + } + \part{Department for Word Processing} +\end{lstcode} + Depending on the settings for the heading font size\Index{heading} + (see \DescPageRef{\LabelBase.option.headings}) and the options for + the \DescRef{\LabelBase.env.abstract} environment\IndexEnv{abstract} (see + \autoref{sec:\LabelBase.abstract}, + \DescPageRef{\LabelBase.option.abstract}), the result will look something + like this: + \begin{ShowOutput}\centering + {\LARGE\usekomafont{disposition} Part III.\par\vspace{14pt}} + {\LARGE\usekomafont{disposition} Department for Word Processing\strut\par} + \begin{quote}\small + \vspace{4ex} + \begin{center} + \usekomafont{disposition}\abstractname + \end{center} + \vspace{2ex} + This is a filler text. It serves merely to demonstrate the + capabilities of {\KOMAScript}. If you read this text, you will + get no information. + \end{quote} + \end{ShowOutput} +\end{Example} +Please\textnote{Attention!} note that \emph{you} are responsible for the +spacing between the heading, preamble, and the following text. Note also that +there is no \DescRef{\LabelBase.env.abstract} environment in the +\Class{scrbook} class (see \autoref{sec:\LabelBase.abstract}, +\DescPageRef{\LabelBase.env.abstract}). + +The\ChangedAt{v2.8p}{\Class{scrbook}\and\Class{scrreprt}} first optional +argument, \PName{position}, determines the position at which the preamble +is placed with the help of one or two letters. For vertical placement +there are two possibilities at present: +\begin{labeling}[~--]{\quad\PValue{o}}\itemsep=0pt +\item [\quad\texttt{o}] above the heading +\item [\quad\texttt{u}] below the heading +\end{labeling} +You can therefore put one preamble above and another below a heading. For +horizontal placement you have three options: +\begin{labeling}[~--]{\quad\PValue{o}}\itemsep=0pt +\item [\quad\texttt{l}] left-aligned +\item [\quad\texttt{r}] right-aligned +\item [\quad\texttt{c}] centred +\end{labeling} +This setting does not affect the alignment of the text in the +\PName{preamble}. Instead, it aligns the box that contains the preamble. The +width of this box is determined by the second optional argument, +\PName{width}. If you omit this second argument, the box uses the full text +width. In that case, the option for horizontal positioning has no effect. You +can combine exactly one letter from the vertical with one letter from the +horizontal positioning. + +A typical use for \Macro{setchapterpreamble} would be something like an +epigraph, a wise saying, or a dictum. The +\DescRef{\LabelBase.cmd.dictum}\IndexCmd{dictum} command, which you can use +for this purpose, is described in the next section. You will also find an +example there. + +Please note\textnote{Attention!} that a \PName{preamble} placed above the +heading is set within the existing vertical space above the heading. The +heading will not be moved down. You are therefore responsible for ensuring +that the \PName{preamble} is not too large and that the space above the +heading is sufficient. See also the \Option{beforeskip} setting for +\DescRef{maincls-experts.cmd.RedeclareSectionCommand} in +\autoref{sec:maincls-experts.sections}, +\autoref{tab:maincls-experts.declarechapterstyle.keys}, +\autopageref{tab:maincls-experts.declarechapterstyle.keys}. +% +% +\EndIndexGroup +% +\EndIndexGroup + + +\LoadCommonFile{dictum}% \section{Dicta} + +\LoadCommonFile{lists}% \section{Lists} + +\section{Mathematics} +\seclabel{math}% +\BeginIndexGroup +\BeginIndex{}{equations}% +\BeginIndex{}{formulas}% +\BeginIndex{}{mathematics}% + +\KOMAScript{} classes do not provide their own environments for formulas, +systems of equations, or similar mathematical elements. Instead, \KOMAScript{} +relies fully on the maths features of the \LaTeX{} kernel. This also applies to +the the options \DescRef{\LabelBase.option.leqno} and +\DescRef{\LabelBase.option.fleqn}. + +You will not find a description of the maths environments of the \LaTeX{} +kernel here. If you want to use +\Environment{displaymath}\IndexEnv{displaymath}, +\Environment{equation}\IndexEnv{equation}, or +\Environment{eqnarray}\IndexEnv{eqnarray} you should read an introduction to +\LaTeX{} like \cite{lshort}. But\textnote{Hint!} if you want more than very +simple mathematics, you should use the \Package{amsmath} package (see +\cite{package:amsmath}). + +\begin{Declaration} + \Option{leqno} +\end{Declaration}% +Equations are normally numbered\Index{equation>number} on the right. The +\Option{leqno} option loads the standard option file \File{leqno.clo}. The +equations are then numbered on the left. You\textnote{Attention!} must use +this option as an optional argument of \DescRef{\LabelBase.cmd.documentclass}. +Using it as an argument of \DescRef{\LabelBase.cmd.KOMAoptions} or +\DescRef{\LabelBase.cmd.KOMAoption} is not supported. The latter +would not make sense because the recommended maths package \Package{amsmath} +can only respond to this option at load time and does not react to run-time +changes of the option. +% +\EndIndexGroup + + +\begin{Declaration} + \Option{fleqn} +\end{Declaration}% +Displayed equations\Index{equation>alignment} are normally centred. The +standard option \Option{fleqn} loads the standard option file +\File{fleqn.clo}. Displayed equations are then left-justified. +You\textnote{Attention!} must use this option as an optional argument of +\DescRef{\LabelBase.cmd.documentclass}. Using it as an argument of +\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption} is +not supported. The latter would not make sense because the recommended maths +package \Package{amsmath} can only respond to this option at load time and +does not react to run-time changes of the option. +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Floating Environments for Tables and Figures} +\seclabel{floats} +\BeginIndexGroup +\BeginIndex{}{floats}% +\BeginIndex{}{tables}% +\BeginIndex{}{figures}% + +With the floating environments, {\LaTeX} offers a powerful and convenient +mechanism to arrange figures\Index{figure} and tables\Index{table} +automatically. +% Im Deutschen ist hier ein Absatz, den wir nicht uebernehmen! +Frequently,\textnote{Attention!} beginners do not properly understand these +floating environments\Index[indexmain]{floating environments}. They often ask +to specify the exact position of a table or figure within the text. However, +this is usually unnecessary, since the text will contain references to these +floating environments. It is also not sensible because such an object can only +be set on the page if there is enough space left for it. If this is not the +case, the object would have to be shifted onto the next page, possibly leaving +a huge empty space on the previous page. + +Often\textnote{Attention!} a document will use the same optional argument to +position every floating object. This also makes no sense. In such cases, you +should instead change the default value globally. For more details, see +\cite{DANTE:FAQ}. + +One\textnote{Attention!} final, important note before starting this section: +most of mechanisms described here, which extend the capabilities of the +standard classes, no longer work correctly when used with packages that modify +the appearance of figure and table captions. This should be self-evident, but +it is often overlooked. + + +\begin{Declaration} + \OptionVName{captions}{setting} +\end{Declaration} +In the standard classes, the titles of floating environments, which are +formatted with the \DescRef{\LabelBase.cmd.caption}\IndexCmd{caption} command +(see below), are set off from the float with vertical spacing appropriate for +putting the caption beneath the float, like a signature. They also distinguish +between one-line and multi-line captions. One-line captions are centred while +multi-line captions are left-justified. + +\leavevmode\LabelOptionValue{captions}{tableheading}\nobreak% +For tables, however, you want the caption% +\important{\Option{captions}{tableheading}} to appear as a heading instead of +a signature. That's because tables can span multiple pages. With such tables, +the reader wants to know the purpose of the table on the first page. +Furthermore, tables are usually read row by row, from top to bottom. So there +are normally at least two good reasons to provide all tables with headings. +\KOMAScript{} therefore offers the \OptionValue{captions}{tableheading}% +\IndexOption{captions~=\textKValue{tableheading}} option, which changes the +formatting of table captions for use above the table. + +Note\textnote{Attention!} that multi-page tabulars cannot use a floating +environment. To have an automatic page break in a tabular you need an +additional package like \Package{longtable}\IndexPackage{longtable} (see +\cite{package:longtable}) or \Package{supertabular}\IndexPackage{supertabular} +(see \cite{package:supertabular}). + +You\important{\OptionValue{captions}{tablesignature}} can switch back to the +default caption formatting using \OptionValue{captions}{tablesignature}% +\IndexOption{captions~=\textKValue{tablesignature}}. Note\textnote{Attention!} +that these options change only the formatting, not the actual position of the +caption. Whether the caption is placed above or below a float depends solely +upon where you use the \DescRef{\LabelBase.cmd.caption} command inside float +environment. However, this can change when using the \Package{float}% +\IndexPackage{float} package with the \Macro{restylefloats} command (see +\cite{package:float}). + +Of course\important{\OptionValue{captions}{figureheading}\\ + \OptionValue{captions}{figuresignature}}, corresponding functions +exist\ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} for figures using the options +\OptionValue{captions}{figureheading}% +\IndexOption{captions~=\textKValue{figureheading}} and +\OptionValue{captions}{figuresignature}% +\IndexOption{captions~=\textKValue{figuresignature}}. However, figures such as +photos tend to be viewed as a whole, and a diagram or graph will mostly be +examined starting from the lower left. Therefore, it only rarely makes sense +to change the caption format for figures alone from signatures to headings. + +Sometimes, however, all floating environments should use headings. Therefore +\KOMAScript{} provides\ChangedAt{v3.09}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} +options\important{\OptionValue{captions}{heading}\\ + \OptionValue{captions}{signature}} +\OptionValue{captions}{heading}\IndexOption{captions~=\textKValue{heading}} +and \OptionValue{captions}{signature}% +\IndexOption{captions~=\textKValue{signature}} to switch the format of every +floating environment. These options can also be used inside a floating +environment. + +Please note\textnote{Achtung!}\OnlyAt{\Package{float}}\IndexPackage{float} +when using the \Package{float} package that the settings for signatures or +headings will no longer work once \Macro{restylefloat} is applied to tables or +figures. For details about the \Package{float} package and +\Macro{restylefloat}, please refer to \cite{package:float}. This also applies +to \DescRef{\LabelBase.cmd.caption} within new floating environments defined +with \Package{float}. You can find additional support which \KOMAScript{} +provides when using the \Package{float} package in the explanation of +\PValue{komaabove} (see \DescPageRef{\LabelBase.floatstyle.komaabove}). As an +alternative to \Package{float}, you can also consult +\DescRef{\LabelBase.cmd.captionof} (see +\DescPageRef{\LabelBase.cmd.captionof}) and +\DescRef{tocbasic.cmd.DeclareNewTOC} (see +\DescPageRef{tocbasic.cmd.DeclareNewTOC}). Additionally, when using +\Package{float}, the +\hyperref[cha:scrhack]{\Package{scrhack}}\IndexPackage{scrhack}% +\important{\hyperref[cha:scrhack]{\Package{scrhack}}} package is +expressly recommended (see \autoref{cha:scrhack} from +\autopageref{cha:scrhack} in \autoref{part:forExperts}). + +\leavevmode +\LabelOptionValue{captions}{nooneline}\nobreak +\LabelOptionValue{captions}{oneline}\nobreak +Furthermore\important{\OptionValue{captions}{nooneline}}, \KOMAScript{} offers +the option to disable the distinction between one-line and multi-line captions +using the \OptionValue{captions}{nooneline}% +\IndexOption{captions~=\textKValue{nooneline}}% +\important{\OptionValue{captions}{nooneline}} option. This can be useful, for +example, if you do not want one-line captions to be centred. The default, +where one-line captions are centred, corresponds to +\OptionValue{captions}{oneline}. + +Another special feature of \KOMAScript{} is the ability to put the caption +beside the floating object rather than above or below it. For this, you need +the environment\important{\DescRef{\LabelBase.env.captionbeside}} +\DescRef{\LabelBase.env.captionbeside}\IndexEnv{captionbeside}, which is +explained starting on \DescPageRef{\LabelBase.env.captionbeside}. The settings +for this environment can also be changed with the \Option{caption} option. You +can find the available values for the corresponding \PName{settings} in +\autoref{tab:\LabelBase.captions}. +% +\begin{desclist} + \desccaption[{Available values for the \Option{captions}} option]{% + Available values for the \Option{captions} option for setting formatting of + captions as headings or signatures in floating environments% + \label{tab:\LabelBase.captions}% + }{% + Available values for the \Option{captions} option (\emph{continued})% + }% + \entry{\PValue{bottombeside}, \PValue{besidebottom}}{% + Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see + \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) are vertically aligned with + the bottommost baseline of the contents of the floating environment.% + \IndexOption{captions~=\textKValue{bottombeside}}}% + \entry{\PValue{centeredbeside}, \PValue{besidecentered}, + \PValue{middlebeside}, \PValue{besidemiddle}}{% + Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see + \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) are vertically aligned with + the center of the contents of the floating environment.% + \IndexOption{captions~=\textKValue{centeredbeside}}}% + \entry{\PValue{figureheading}, \PValue{figureabove}, \PValue{abovefigure}, + \PValue{topatfigure}% + \IndexOption{captions~=\textKValue{figureheading}}}{% + \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Captions for figures use heading format\,---\,possibly deviating from + \OptionValue{captions}{signature}.% + }% + \entry{\PValue{figuresignature}, \PValue{belowfigure}, + \PValue{bottomatfiggure}% + \IndexOption{captions~=\textKValue{figuresignature}}}{% + \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Captions for figures use signature format\,---\,possibly deviating + from \OptionValue{captions}{headings}.% + }% + \entry{\PValue{heading}, \PValue{above}, \PValue{top}% + \IndexOption{captions~=\textKValue{heading}}}{% + \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} Captions for floating environments use formatting + suitable for use in a heading. This setting does not control whether they + are placed at the top or the bottom of the object. This option also + implies \OptionValue{captions}{tableheading} and + \OptionValue{captions}{figureheading}.% + }% + \entry{\PValue{innerbeside}, + \PValue{besideinner}\IndexOption{captions~=\textKValue{innerbeside}}}{% + Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see + \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) are placed inside of and next + to the contents of the environment in two-sided printing. In one-sided + printing, \OptionValue{captions}{leftbeside} is used.% + }% + \entry{\PValue{leftbeside}, + \PValue{besideleft}\IndexOption{captions~=\textKValue{leftbeside}}}{% + Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see + \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) are placed to the left of + the contents of the floating environment.% + }% + \pventry{nooneline}{% + Single-line captions are handled the same as multi-line captions.% + \IndexOption{captions~=\textKValue{nooneline}}}% + \pventry{oneline}{% + Single-line captions are centred horizontally.% + \IndexOption{captions~=\textKValue{oneline}}}% + \entry{\PValue{outerbeside}, \PValue{besideouter}% + \IndexOption{captions~=\textKValue{outerbeside}}}{% + Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see + \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) are placed outside of and + next to the contents of the environment in two-sided printing. In + one-sided printing, \OptionValue{captions}{rightbeside} is used.% + }% + \entry{\PValue{rightbeside}, \PValue{besideright}% + \IndexOption{captions~=\textKValue{rightbeside}}}{% + Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see + \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) are placed to the right of the + contents of the floating environment.% + }% + \entry{\PValue{signature}, \PValue{below}, \PValue{bot}, \PValue{bottom}% + \IndexOption{captions~=\textKValue{signature}}}{% + \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Captions for floating environments use signature format. This setting + does not control whether they are placed at the top or the bottom of the + object. This options also implies \OptionValue{captions}{tablesignature} + and \OptionValue{captions}{figuresignature}.% + }% + \entry{\PValue{tableheading}, \PValue{tableabove}, \PValue{abovetable}, + \PValue{abovetabular}, \PValue{topattable}% + \IndexOption{captions~=\textKValue{tableheading}}}{% + Captions for tables use heading format\,---\,possibly deviating from + \OptionValue{captions}{signature}.% + }% + \entry{\PValue{tablesignature}, \PValue{belowtable}, \PValue{belowtabular}, + \PValue{bottomattable}% + \IndexOption{captions~=\textKValue{tablesignature}}}{% + Captions for tables use signature format\,---\,possibly deviating + from \OptionValue{captions}{heading}.% + }% + \entry{\PValue{topbeside}, \PValue{besidetop}}{% + Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see + \autoref{sec:\LabelBase.floats}, + \DescPageRef{\LabelBase.env.captionbeside}) are vertically aligned to the + baseline at the top of the floating environment.% + \IndexOption{captions~=\textKValue{topbeside}}}% +\end{desclist}% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{caption}\OParameter{entry}\Parameter{title} + \Macro{captionbelow}\OParameter{entry}\Parameter{title} + \Macro{captionabove}\OParameter{entry}\Parameter{title} +\end{Declaration}% +In the standard classes, tables and figures are given captions with the +\Macro{caption} command placed below the table or figure. For figures, this is +generally correct. For tables, opinions differ as to whether captions should +be placed above the table or, consistent with captions of +figures\Index{caption>of figure}, below it\Index{caption>of table}. Therefore +{\KOMAScript}\textnote{\KOMAScript{} vs. standard classes}, +unlike the standard classes, offers \Macro{captionbelow} for captions +below and \Macro{captionabove} for captions above tables or +figures. + +For tables and figures, or in general for all floating environments, you can +control the behaviour of \Macro{caption} with the +\DescRef{\LabelBase.option.captions}\IndexOption{captions} option described at +the beginning of this section. For compatibility reasons, the default +behaviour of \Macro{caption} for all floating environments is like +\Macro{captionbelow}. However, you\textnote{Hint!} should use the +\OptionValueRef{\LabelBase}{captions}{tableheading} option, which switches the +behaviour of \Macro{caption} inside table environments to +\Macro{captionabove}. Alternatively, you can use \Macro{captionabove} instead +of \Macro{caption} inside every \Environment{table} environment. +% +\begin{Example} + Instead of using captions below a table, you want to place your + captions above it\Index{table>caption}, because you have tables + which span more then one page. In the standard classes you could + only write: +\begin{lstcode} + \begin{table} + \caption{This is an example table} + \begin{tabular}{llll} + This & is & an & example.\\\hline + This & is & an & example.\\ + This & is & an & example. + \end{tabular} + \end{table} +\end{lstcode} + Then you would get this unsatisfying result: + \begin{ShowOutput}\centering + {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:} + This is an example table.}\\ + \begin{tabular}{llll} + This & is & an & example.\\\hline + This & is & an & example.\\ + This & is & an & example. + \end{tabular} +\end{ShowOutput} + Using {\KOMAScript} you write instead: +\begin{lstcode} + \begin{table} + \captionabove{This is just an example table} + \begin{tabular}{llll} + This & is & an & example.\\\hline + This & is & an & example.\\ + This & is & an & example. + \end{tabular} + \end{table} +\end{lstcode} + Then you get: + \begin{ShowOutput}\centering + {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:} + This is just an example table}\\\vskip\abovecaptionskip + \begin{tabular}{llll} + This & is & an & example.\\\hline + This & is & an & example.\\ + This & is & an & example. + \end{tabular} + \end{ShowOutput} + Since you want all your tables typeset with captions above, you could + of course use the \OptionValueRef{\LabelBase}{captions}{tableheading} option + instead (see \DescPageRef{\LabelBase.option.captions.tableheading}). Then + you can use \Macro{caption} as you would in the standard classes. You will + get the same result as with \Macro{captionabove}. +\end{Example} + +\BeginIndex[indexother]{}{font>style}% +\BeginIndex{FontElement}{caption}\LabelFontElement{caption}% +\BeginIndex{FontElement}{captionlabel}\LabelFontElement{captionlabel}% +The font style\ChangedAt{v2.8p}{% + \Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}} for the description +and the label\,---\,``Figure'' or ``Table'', followed by the number and the +delimiter\,---\,can be changed with the commands +\DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont} (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}). The respective elements for this +are \FontElement{caption}\important[i]{\FontElement{caption}\\ + \FontElement{captionlabel}} and \FontElement{captionlabel} (see +\autoref{tab:\LabelBase.fontelements}, +\autopageref{tab:\LabelBase.fontelements}). The font style for the element +\FontElement{caption} is applied to the element \FontElement{captionlabel} +before the font style of \FontElement{captionlabel} itself is applied. The +default settings are listed in \autoref{tab:\LabelBase.captionFont}. +% +\begin{table} +% \centering% +% \caption + \begin{captionbeside} + {Font defaults for the elements of figure or table captions} + [l] + \begin{tabular}[t]{ll} + \toprule + element & default \\ + \midrule + \DescRef{\LabelBase.fontelement.caption} & \Macro{normalfont} \\ + \DescRef{\LabelBase.fontelement.captionlabel} & \Macro{normalfont}\\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:\LabelBase.captionFont} +\end{table} +% +\begin{Example} + You want the table and figure descriptions typeset in a smaller font + size. Thus you could write the following in the preamble of your + document: +\begin{lstcode} + \addtokomafont{caption}{\small} +\end{lstcode} + Furthermore, you would like the labels to be printed in sans serif and + bold. You add: +\begin{lstcode} + \setkomafont{captionlabel}{\sffamily\bfseries} +\end{lstcode} + As you can see, simple extensions of the default definitions are + possible. +\end{Example}% +\EndIndexGroup + + +\begin{Declaration} + \Macro{captionof}\Parameter{float type}\OParameter{entry}% + \Parameter{title}% + \Macro{captionbelowof}\Parameter{float type}\OParameter{entry}% + \Parameter{title}% + \Macro{captionaboveof}\Parameter{float type}\OParameter{entry}% + \Parameter{title} +\end{Declaration}% +Like\ChangedAt{v3.05}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} the \Package{caption}\IndexPackage{caption} and +\Package{capt-of}\IndexPackage{capt-of} packages, \KOMAScript{} offers the +\Macro{captionof} command, with which you can put a caption for a floating +environment, together with an entry in the corresponding environment list, +outside of the floating environment or even in a different floating +environment. Unlike \DescRef{\LabelBase.cmd.caption}, the type of floating +environment must be specified as the first parameter. + +In addition, \KOMAScript{} also provides the commands +\Macro{captionaboveof}\ChangedAt{v3.09}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} and \Macro{captionbelowof}. These are +like \DescRef{\LabelBase.cmd.captionabove} and +\DescRef{\LabelBase.cmd.captionbelow} but with the additional features and +parameter of \Macro{captionof}. + +Of course\ChangedAt{v3.09a}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} \Macro{captionof} takes into account the \PValue{heading} +and \PValue{signature} settings of the \DescRef{\LabelBase.option.captions} +option. But this feature may be lost if you load the +\Package{capt-of}\IndexPackage{capt-of} or +\Package{caption}\IndexPackage{caption} packages. When using +\Package{caption}, you must follow the instructions for that package (see +\cite{package:caption})! +\begin{Example} + Suppose you want to create a floating object with a table and a figure next + to each other. Since there are no mixed floating environments, you primarily + use a \Environment{figure} environment: +\begin{lstcode} + \begin{figure} + \begin{minipage}{.5\linewidth} + \centering + \rule{4cm}{5cm} + \caption{A rectangle}\label{fig:rechteck} + \end{minipage}% + \begin{minipage}{.5\linewidth} + \centering + \captionaboveof{table} + [Measure of the rectangle in + figure~\ref{fig:rechteck}]% + {Measure of the rectangle} + \label{tab:rechteck} + \begin{tabular}{ll} + Width: & 4\,cm\\ + Height: & 5\,cm + \end{tabular} + \end{minipage} + \end{figure} +\end{lstcode} + Two \Environment{minipage} environments were used to place the figure + and the table side by side. The\textnote{Attention!} percent sign after the + end of the first \Environment{minipage} is important. Without it, an + additional space would appear between the \Environment{minipage} + environments. + + The figure caption was created with \DescRef{\LabelBase.cmd.caption}. The + table caption was created with \Macro{captionaboveof} with \PValue{table} + as the first argument. Because of this, \KOMAScript{} knows that this is a + table caption even though it is inside the \Environment{figure} environment. + + The optional argument of \Macro{captionaboveof} creates an entry in the + list of tables. Without the optional argument, the caption specified in the + final mandatory argument would have been used for the list of tables too. + Although this caption text is sufficient for the environment itself, it + would not be very meaningful in the list of tables. Therefore, a different + title is used for the list of tables using the optional argument. + \autoref{fig:\LabelBase.captionaboveof} shows the result of the example code.% +\begin{figure} +% \centering +% \caption + \KOMAoptions{captions=bottombeside}% + \setcapindent{0pt}% + \begin{captionbeside} + [{Example: Using \Macro{captionaboveof} inside another floating + environment}] + {Example: Using \Macro{captionaboveof} inside another floating + environment\label{fig:\LabelBase.captionaboveof}} + [l] + \begin{minipage}[b]{.66\linewidth}% + \raisebox{\depth}{\fbox{\KOMAoptions{captions=oneline}% + \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax} + \centering + \rule{4cm}{5cm} + \caption[Example: A rectangle]{A rectangle}\label{fig:\LabelBase.rechteck} + \end{minipage}% + \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax} + \centering + \captionaboveof{table}[Example: Measure of the rectangle in + figure~\ref{fig:\LabelBase.rechteck}]{Rectangle size} + \label{tab:\LabelBase.rechteck} + \begin{tabular}{ll} + Width: & 4\,cm\\ + Height: & 5\,cm + \end{tabular} + \end{minipage}}}% + \end{minipage}% + \end{captionbeside}% +\end{figure}% +\end{Example}% +You can produce a non-floating table with a caption in the same way as the +table inside a figure environment in the example above. In such a case, a +\Environment{minipage} environment should also be used to avoid page breaks +between the caption and the table. In addition, you should embed the +\Environment{minipage} environment in a \Environment{flushleft} environment +both to achieve a pleasing separation between the surrounding text and to +avoid the paragraph indentation of the \Environment{minipage} environment.% +\EndIndexGroup + + +\begin{Declaration} + \begin{Environment}{captionbeside} + \OParameter{short title} + \Parameter{caption text} + \OParameter{placement} + \OParameter{width} + \OParameter{offset} + \end{Environment} + \labelsuffix[*]% + \begin{Environment}{captionbeside} + \OParameter{short title} + \Parameter{caption text} + \OParameter{placement} + \OParameter{width} + \OParameter{offset}\PValue{*}% + \end{Environment} +\end{Declaration} +In addition\ChangedAt{v2.8q}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} to captions above and below the figure, you will often +find captions, in particular for small figures, which are placed beside the +figure. The bottom edge of the caption is normally aligned with the bottom of +the figure. Of course, you can achieve the same thing in the standard classes +with some fiddling and the use of two \Macro{parbox} commands. However, +\KOMAScript{} offers a special environment for this which you can use within +the floating environments. The first optional parameter, +\PName{short title}\important{\PName{short title}\\\PName{caption text}}, and +the required parameter \PName{caption text} have the same meaning as the +corresponding parameters of \DescRef{\LabelBase.cmd.caption}, +\DescRef{\LabelBase.cmd.captionabove} or +\DescRef{\LabelBase.cmd.captionbelow}. The \PName{caption text} is +placed beside the content of the environment in this case. + +The \PName{placement}\important{\PName{placement}} parameter can determine +whether the \PName{caption text} is placed on the left or the right. Exactly +one of the following letters is allowed: +\begin{labeling}[~--]{\quad\PValue{o}}\setlength{\itemsep}{-1\parsep plus 1ex}% + \item[\PValue{l}] left + \item[\PValue{r}] right + \item[\PValue{i}] inner margin in two-sided printing + \item[\PValue{o}] outer margin in two-sided printing +\end{labeling} +The default placement is to the right of the content of the environment. You +can change this default\ChangedAt{v3.00}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} using the +\DescRef{\LabelBase.option.captions}\IndexOption{captions}% +\important{\DescRef{\LabelBase.option.captions}} option (see +\DescPageRef{\LabelBase.option.captions}) with values like +\PValue{innerbeside}\IndexOption[indexmain]{captions~=\textKValue{innerbeside}}, +\PValue{leftbeside}\IndexOption[indexmain]{captions~=\textKValue{leftbeside}}, +\PValue{outerbeside}\IndexOption[indexmain]{captions~=\textKValue{outerbeside}}, +and +\PValue{rightbeside}\IndexOption[indexmain]{captions~=\textKValue{rightbeside}}. +If either \PValue{o} or \PValue{i} are used you may need to run {\LaTeX} twice +to obtain the correct placement. + +Normally\important{\PName{width}}, the content of the environment and the +\PName{caption text} fill the entire available text width. However, you can +specify a different width using the optional parameter \PName{width}. This can +be greater than the current text width. + +When specifying a \PName{width}\important{\PName{width}\\\PName{offset}}, the +width used is usually centred with respect to the body text. Using the +optional parameter \PName{offset}, you can shift the environment relative to +the left margin. A positive value corresponds to a shift to the right, whereas +a negative value corresponds to a shift to the left. An \PName{offset} of +0\Unit{pt} gives you a left-aligned output. + +If\important{\PValue{*}} you add a star to the optional \PName{offset} +parameter, the value represents a shift relative to the right margin on +left-hand pages in a two-sided layout. A positive value corresponds to a shift +towards the outer margin, whereas a negative value corresponds to a shift +towards the inner margin. An \PName{offset} of 0\Unit{pt} means alignment with +the inner margin. This variant may require two {\LaTeX} runs to achieve the +correct offset. + +The default vertical alignment is bottom. This means that the bottommost base +lines of the contents of the environment and of the caption are aligned. +You\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} can change this setting using the +\DescRef{\LabelBase.option.captions}\IndexOption{captions}% +\important{\DescRef{\LabelBase.option.captions}} option (see +\DescPageRef{\LabelBase.option.captions}) with the value +\PValue{topbeside}\IndexOption[indexmain]{captions~=\textKValue{topbeside}}, +\PValue{centeredbeside}% +\IndexOption[indexmain]{captions~=\textKValue{centeredbeside}}, or +\PValue{bottombeside}% +\IndexOption[indexmain]{captions~=\textKValue{bottombeside}}. +With the setting \PValue{topbeside}, the topmost base lines of the environment +contents and caption will be aligned. With \PValue{centeredbeside}, they will +be centred vertically. In this context, note that the base line of a figure is +usually the bottom of the figure. You can change this using, for example, +\Macro{raisebox}\IndexCmd{raisebox}. + +\begin{Example} + You can find an example using the \Environment{captionbeside} environment in + \autoref{fig:\LabelBase.captionbeside}. This figure was typeset with: +\begin{lstcode} + \begin{figure} + \begin{captionbeside}[Example: Figure beside description]% + {A figure description which is neither above nor + below, but beside the figure}[i][\linewidth][% + [i][\linewidth][% + \dimexpr\marginparwidth+\marginparsep\relax]* + \fbox{% + \parbox[b][5\baselineskip][c]{.25\textwidth} + {% + \hspace*{\fill}\KOMAScript + \hspace*{\fill}\par + }% + } + \end{captionbeside} + \label{fig:\LabelBase.captionbeside} + \end{figure} +\end{lstcode} + \begin{figure} + \begin{captionbeside}[Example: Figure beside description]% + {A figure description which is neither above nor + below, but beside the figure}[i][\linewidth][2em]* + \fbox{% + \parbox[b][5\baselineskip][c]{.25\textwidth}{% + \hspace*{\fill}\KOMAScript\hspace*{\fill}\par}} + \end{captionbeside} + \label{fig:\LabelBase.captionbeside} + \end{figure} + The total width is thus the currently available width of + \PValue{\Macro{linewidth}}. However, this width is shifted + $\Length{marginparwidth} + \Length{marginparsep}$ to the outside. The + caption text or description is placed on the inner side beside the figure. + The figure itself is shifted 2\Unit{em} into the outer margin. + +\iffalse% Umbruchkorrekturtext + The \Macro{dimexp} macro is an \eTeX{} command. This should not be a + problem at all because \KOMAScript{} itself requires \eTeX{} and every almost + up-to-date \LaTeX{} distribution uses \eTeX already. +\fi + + \hyperref[fig:\LabelBase.captionbesidecentered]% + {Figure~\ref*{fig:\LabelBase.captionbesidecentered}} + shows a centred caption with: +\begin{lstcode} + \KOMAoption{captions}{centeredbeside} +\end{lstcode} +\iffalse % Umbruchalternativen + Even a typographical novice will immediately realize that you should + usually avoid this alignment. +\else + This is certainly not a recommended solution. +\fi + + \begin{figure} + \begin{captionbeside}[Example: Description centered beside figure]% + {A figure description which is neither above nor + below, but centred beside the figure}[i][\linewidth][2em]* + \fbox{% + \parbox[b][5\baselineskip][c]{.25\textwidth}{% + \hspace*{\fill}\KOMAScript\hspace*{\fill}\par}} + \end{captionbeside} + \label{fig:\LabelBase.captionbesidecentered} + \end{figure} + + In contrast, you can use the top-aligned format seen in + \autoref{fig:\LabelBase.captionbesidetop}. To illustrate how to shift the + baseline using \Macro{raisebox}, here is a complete example. You can apply + this not only to a substitute figure, as previously shown, but also, for + example, to \Macro{includegraphics} (see \cite{package:graphics}). +\begin{lstcode} + \documentclass[captions=topbeside]{scrbook} + \usepackage[english]{babel} + \usepackage{graphics} + \begin{document} + \chapter{An Example} + \begin{figure} + \begin{captionbeside}% + [Example: Figure title top beside]% + {A figure description which is neither above nor + below, but top beside the figure}% + [i][\linewidth][% + \dimexpr\marginparwidth+\marginparsep\relax + ]* + \raisebox{% + \dimexpr\baselineskip-\totalheight\relax + }{% + \includegraphics{examplepicture}% + }% + \end{captionbeside} + \label{fig:\LabelBase.captionbesidetop} + \end{figure} + \end{document} +\end{lstcode} + \begin{figure} + \KOMAoption{captions}{topbeside} + \begin{captionbeside}[Example: Figure title top beside]% + {A figure description which is neither above nor + below, but top beside the figure}% + [i][\linewidth] + \raisebox{\dimexpr\baselineskip-\totalheight}{% + \fbox{% + \parbox[b][5\baselineskip][c]{.25\textwidth}{% + \hspace*{\fill}\KOMAScript\hspace*{\fill}\par}}% + }% + \end{captionbeside} + \label{fig:\LabelBase.captionbesidetop} + \end{figure} +\end{Example} +% +\EndIndexGroup + + +\begin{Declaration} + \begin{Environment}{captionofbeside} + \Parameter{float type} + \OParameter{short title} + \Parameter{caption text} + \OParameter{placement} + \OParameter{width} + \OParameter{offset} + \begin{Body}\BodyDots\end{Body} + \end{Environment} + \labelsuffix[*]% + \begin{Environment}{captionofbeside} + \Parameter{float type} + \OParameter{short title} + \Parameter{caption text} + \OParameter{placement} + \OParameter{width} + \OParameter{offset}\PValue{*}% + \begin{Body}\BodyDots\end{Body} + \end{Environment} +\end{Declaration} +As\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} is the case for \DescRef{\LabelBase.cmd.caption}, there is +a variant for \DescRef{\LabelBase.cmd.captionof} where the \PName{float type} +is not defined by using it within a floating environment of this type, so you +can specify a suitable environment for \DescRef{\LabelBase.env.captionbeside} +with \Environment{captionofbeside}. In contrast to +\DescRef{\LabelBase.env.captionbeside}, the \PName{float type} must be +specified as an additional, first argument.% +% +\EndIndexGroup + +\begin{Declaration} + \FloatStyle{komaabove}% + \FloatStyle{komabelow} +\end{Declaration}% +If you use\OnlyAt{\Package{float}} the \Package{float}\IndexPackage{float} +package, the appearance of the float environments is solely defined by the +\emph{float} style. This includes whether captions appear above or below. In +the \Package{float} package, there is no predefined style which gives you the +same output and offers the same setting options (see below) as \KOMAScript{}. +Therefore \KOMAScript{} defines the two additional styles, \PValue{komaabove} +and \PValue{komabelow}. When using the \Package{float} package, you can +activate these styles just like the styles +\PValue{plain}\IndexFloatstyle{plain}, \PValue{boxed}\IndexFloatstyle{boxed}, +or \PValue{ruled}\IndexFloatstyle{ruled} defined in \Package{float}. For +details refer to \cite{package:float}. The style \PValue{komaabove} inserts +\DescRef{\LabelBase.cmd.caption}, \DescRef{\LabelBase.cmd.captionabove}, and +\DescRef{\LabelBase.cmd.captionbelow} above, whereas \PValue{komabelow} +inserts them below the float content. +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{captionformat} +\end{Declaration}% +In {\KOMAScript} there are various ways to change the formatting of +the caption text. The definition of different font styles has already +been explained above. The delimiter or delimiters between the label and +actual caption text is specified by the macro \Macro{captionformat}. +In contrast to all other \Macro{\dots}format commands, this is not the counter +but only the items which follow it. The original definition is: +\begin{lstcode} + \newcommand*{\captionformat}{:\ } +\end{lstcode} +You can change this too with \Macro{renewcommand}. +\begin{Example} + For some inexplicable reason, you want a dash surrounded by spaces + instead of a colon followed by a space as a label delimiter. You + therefore define: +\begin{lstcode} + \renewcommand*{\captionformat}{~--~} +\end{lstcode} +This definition should be put in the preamble of your document. +\end{Example} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{figureformat}% + \Macro{tableformat} +\end{Declaration}% +It has already been mentioned that \DescRef{\LabelBase.cmd.captionformat} does +not contain formatting for the label itself. You should not alter this by +redefining the commands for the output of the \Macro{thefigure} or +\Macro{thetable} counters. Such a redefinition would have unwanted side +effects on the output of \Macro{ref}, the table of contents, the list of +figures, and the list of tables. Instead, {\KOMAScript} offers two +\Macro{\dots format} commands. These have the following defaults: +\begin{lstcode} + \newcommand*{\figureformat}{\figurename~\thefigure\autodot} + \newcommand*{\tableformat}{\tablename~\thetable\autodot} +\end{lstcode} +They can also be customised to your requirements with \Macro{renewcommand}. +\begin{Example} + From time to time, it is required to have captions without labels or + delimiters. With {\KOMAScript} the following definitions suffice to + achieve this: +\begin{lstcode} + \renewcommand*{\figureformat}{} + \renewcommand*{\tableformat}{} + \renewcommand*{\captionformat}{} +\end{lstcode} + It should be noted, however, that although no numbering is output, the + internal counters are nevertheless incremented. This becomes especially + important if this redefinition is applied only to selected + \Environment{figure} or \Environment{table} environments. +\end{Example} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setcapindent}\Parameter{indent}% + \Macro{setcapindent*}\Parameter{xindent}% + \Macro{setcaphanging} +\end{Declaration}% +As mentioned previously, in the standard classes the captions are set in a +non-hanging style. In other words, in multi-line captions the second and +subsequent lines start directly beneath the label. The standard classes +provide no direct mechanism to change this behaviour. In {\KOMAScript}, on the +contrary, beginning at the second line all lines are indented by the width of +the label so that the caption text is aligned. + +You can change this behaviour, which corresponds to using +\Macro{setcaphanging}, at any time with the \Macro{setcapindent} or +\Macro{setcapindent*} command. Here the parameter \PName{indent} determines +the indentation of the second and subsequent lines. If you want a line break +after the label and before the caption text, then you can define the +indentation \PName{xindent} of the caption text with the starred version of +the command instead: \Macro{setcapindent*}. + +A negative value of \PName{indent}, on the other hand, results in a line break +before the caption text, and only the first line of the caption text, not +subsequent lines, is indented by the absolute value of \PName{indent}. + +Whether one-line captions are set the same way as multi-line captions or are +treated separately is specified with the option +\DescRef{\LabelBase.option.captions}. For details please refer to the +explanations of this option on +\DescPageRef{\LabelBase.option.captions.oneline}. + +\begin{Example} + The illustrations~\ref{fig:\LabelBase.caption.first} to + \ref{fig:\LabelBase.caption.last} show the effects of different settings. As + you can see, using a fully hanging indentation with a narrow column width is + awkward. To illustrate, the source code for the second figure is given here + with a modified caption text: +\begin{lstcode} + \begin{figure} + \setcapindent{1em} + \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} + \caption{Example with partially indented caption + starting from the second line} + \end{figure} +\end{lstcode} + As you can see, the formatting can also be changed locally within the + \Environment{figure} environment\IndexEnv{figure}. The change then affects + only the current figure. Subsequent figures once again use the default + settings or global settings that you set, for example, in the preamble. This + also, of course, applies to tables. + \begin{figure} + \typeout{^^J--- Ignore underfull and overfull \string\hbox:} + \addtokomafont{caption}{\small} + \addtokomafont{captionlabel}{\bfseries} + \centering% + \begin{minipage}{.9\linewidth} + \begin{minipage}[t]{.48\linewidth}\sloppy + \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} + \caption[Example: Default caption]% + {\sloppy With the default setting, like using + \Macro{setcaphanging}} + \label{fig:\LabelBase.caption.first} + \end{minipage} + \hspace{.02\linewidth} + \begin{minipage}[t]{.48\linewidth}\sloppy + \setcapindent{1em} + \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} + \caption[Example: Caption with partially hanging indention]% + {With partially hanging indentation starting from the second line + by using \Macro{setcapindent}\PParameter{1em}} + \end{minipage} + \end{minipage} + + \vspace*{2ex}\noindent% + \begin{minipage}{.9\linewidth} + \begin{minipage}[t]{.48\linewidth}\sloppy + \setcapindent*{1em} + \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} + \caption[Example: Caption with hanging indention and line break]% + {With hanging indentation starting from the second line and line + break before the description using + \Macro{setcapindent*}\PParameter{1em}} + \end{minipage} + \hspace{.02\linewidth} + \begin{minipage}[t]{.48\linewidth}\sloppy + \setcapindent{-1em} + \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} + \caption[Example: Caption with indention in the second line]% + {With indentation only in the second line and a line break + before the description using + \Macro{setcapindent}\PParameter{-1em}} + \label{fig:\LabelBase.caption.last} + \end{minipage} + \end{minipage} + \typeout{^^J--- Don't ignore underfull and overfull + \string\hbox:^^J} + \end{figure} +\end{Example} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setcapwidth}\OParameter{justification}\Parameter{width}% + \Macro{setcapdynwidth}\OParameter{justification}\Parameter{width}% + \Macro{setcapmargin}\OParameter{left margin}\Parameter{margin}% + \Macro{setcapmargin*}\OParameter{inside margin}\Parameter{margin} +\end{Declaration} +Using\ChangedAt{v2.8q}{% + \Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}} these three +commands, you can specify the width and justification of the caption +text. Normally, the entire text or column width is available for the caption. + +With\important{\Macro{setcapwidth}} the \Macro{setcapwidth} command, you can +decrease this \PName{width}. The mandatory argument determines the maximum +\PName{width} of the caption. As an optional argument, you can supply exactly +one letter which specifies the horizontal justification. The possible +justifications are given in the following list: +\begin{labeling}[~--]{\quad\PValue{o}}% + \itemsep=.5\topsep plus .5\topsep minus .5\topsep + \rightskip=1em +\item[\PValue{l}] left-justified +\item[\PValue{c}] centred +\item[\PValue{r}] right-aligned +\item[\PValue{i}] aligned to the inner margin in two-sided printing +\item[\PValue{o}] aligned to the outer margin in two-sided printing +\end{labeling} +Inside and outside justification corresponds to left-aligned and right-aligned +justification, respectively, in one-sided printing. +Within\textnote{Attention!} \Package{longtable}\IndexPackage{longtable}% +\important{\Package{longtable}} tables, inside and outside justification does +not work correctly. In particular, the captions on subsequent pages of such +tables are aligned according to the format of the caption on the first page of +the table. This is a conceptual problem in the implementation of the +\Package{longtable} package. + +Note\ChangedAt{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\textnote{Attention!} that \Macro{setcapwidth} immediately +sets the width to the value of the \PName{width} parameter at the time of the +assignment, as \Macro{setlength} does. If\important{\Macro{setcapdynwidth}} +you instead want to use the current value of \PName{width} when the caption is +set, you should use \Macro{setcapdynwidth}. There can be significant +differences in the result if, for example, you use lengths like +\Length{linewidth} or other commands as \PName{width} arguments. + +With\important{\Macro{setcapmargin}} the \Macro{setcapmargin} command, instead +of specifying the width of the caption text, you can specify a \PName{margin} +to be set next to the caption text in addition to the normal text margin. If +you want margins with different widths on the left and right sides, you can +use the optional argument to specify a \PName{left margin} that differs from +\PName{margin}. Instead of a \PName{left margin}, the starred version +\Macro{setcapmargin*} defines an \PName{inside margin} in a two-sided layout. +The same problem arises here with with inside and outside justification inside +\Package{longtable}\IndexPackage{longtable}\important{\Package{longtable}} +tables that occurs with \Macro{setcapwidth}. Furthermore, using +\Macro{setcapmargin} or \Macro{setcapmargin*} activates the +\OptionValueRef{\LabelBase}{captions}{nooneline} option (see +\DescPageRef{\LabelBase.option.captions.nooneline}) for captions which are +typeset with this margin setting. + +You\textnote{Hint!} can also specify negative values for \PName{margin} and +\PName{left margin} or \PName{inside margin}. This has the effect of making +the caption protrude into the margin.% +\iffalse\par% Anhang wurde entfernt. +Experts\textnote{Hint!} and advanced users can find a a somewhat tricky +application of \Macro{setcapwidth} in +\iffree{\cite{book:komascript}}{\autoref{cha:floattricks}, + \autopageref{cha:floattricks}}.% +\fi% +% +\EndIndexGroup + +\begin{Declaration} + \Macro{setcaptionalignment}\OParameter{float type}\Parameter{alignment} +\end{Declaration} +Normally\ChangedAt{v3.25}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}, multi-line\textnote{alignment of multi-line captions} +captions are fully justified. This corresponds to +\Macro{setcaptionalignment}\PParameter{j}. Sometimes, however, you want a +different alignment, for example ragged right. An appropriate change is +possible at any time with \Macro{setcaptionalignment}. You can specify exactly +one of the letters listed in \autoref{tab:maincls.captionalignment} for the +\PName{alignment}. If you specify an unknown \PName{alignment}, you will +receive an error message. +% +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside} + [{Alignments for multi-line captions of floating environments}] + {\label{tab:maincls.captionalignment}% + Alignments for multi-line captions of floating environments} + [l] + \begin{tabular}[t]{ll} + \toprule + c & centred \\ + j & fully justified \\ + l & left justified \\ + r & right justified \\ + C & centred with \Package{ragged2e} \\ + J & fully justified with \Package{ragged2e} \\ + L & left justified with \Package{ragged2e} \\ + R & right justified with \Package{ragged2e} \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} + +The four possibilities with the +\Package{ragged2e}\important{\Package{ragged2e}}\IndexPackage{ragged2e} +package are only available if that package was loaded before you use +\Macro{setcaptionalignment}. Otherwise, they are converted to the +corresponding options without \Package{ragged2e}. For safety reasons, a +warning is issued in this case. + +When using this command without\textnote{without optional parameter} the +optional parameter, the result depends on whether the call occurs inside our +outside of a floating environment. Within a floating environment, the +alignment is then set for this floating environment. Outside, on the other +hand, the optional parameter is assumed to be empty. + +Using this command with an empty\textnote{empty optional parameter} optional +parameter, or outside a floating environment and also without any optional +parameter, sets the general alignment. This is used whenever the current +floating environment type does not define an alignment. + +If you only want to set the alignment of a particular type of floating +environment\textnote{with \PName{float type}} without changing the +\PName{alignment} for other types of floating environments, then the type of +floating environment, e.\,g., \PValue{figure} or \PValue{table}, is given as +the optional parameter \PName{float type}. +% +\begin{Example} + You want captions to be centred under the images even if they are + multi-line. To text this for a single image, use\textnote{in the + floating environment}: +\begin{lstcode} + \begin{figure} + \centering + \setcaptionalignment{c} + \includegraphics{example-image} + \caption{\blindtext} + \end{figure} +\end{lstcode} + Since you are satisfied with the result, you move the\textnote{in the + preamble} +\begin{lstcode} + \setcaptionalignment{c} +\end{lstcode} + command to the document preamble. Thereafter, however, you decide you do not + like this change for table captions at all. Therefore, you use\textnote{only + for figures} +\begin{lstcode} + \setcaptionalignment[figure]{c} +\end{lstcode} + to limit the centring to figures. + + A little later, you realize that the centring is not so suitable. Instead, + you now prefer to have ragged right alignment. So you change the alignment + again: +\begin{lstcode} + \setcaptionalignment[figure]{l} +\end{lstcode} + However, you do not like the fact that the lines are very different in + length. This is caused by the lack of hyphenation, causing long words to + wrap completely onto the next line, leaving large gaps. You want to allow + hyphenation as needed. This is easy to achieve with the help of the + \Package{ragged2e}\important{\Package{ragged2e}}\IndexPackage{ragged2e} + package. However, it is not enough to use +\begin{lstcode} + \usepackage{ragged2e} +\end{lstcode} + to load the package. Using the \Option{newcommands} option when loading the + package does not help. Instead, the \PName{alignment} must also be changed: +\begin{lstcode} + \usepackage{ragged2e} + \setcaptionalignment[figure]{L} +\end{lstcode} + Note\textnote{Attention!} the upper-case letter for the \PName{alignment}. +\end{Example} +\EndIndexGroup + + +\begin{Declaration} + \Option{origlongtable} +\end{Declaration}% +\BeginIndex{Package}{longtable}% +If you do not want the table captions produced by the \Package{longtable} +package (see \cite{package:longtable}) to be redefined by the {\KOMAScript} +classes, activate the \Option{origlongtable} option. This\textnote{Attention!} +option must be used in the optional argument of +\DescRef{\LabelBase.cmd.documentclass}. It cannot be used as a setting of +\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption}. +% +\EndIndexGroup +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{listof}{setting} +\end{Declaration} +Normally\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} lists of floating environments\,---\,like +tables\Index{tables>list of} or figures\Index{figures>list of}\,---\,are +neither numbered nor included in the table of contents. You can find more +information about this behaviour in \autoref{sec:\LabelBase.toc}. As an +alternative to the settings \OptionValueRef{\LabelBase}{toc}{nolistof}% +\IndexOption{toc~=\textKValue{nolistof}}, +\OptionValueRef{\LabelBase}{toc}{listof}\IndexOption{toc~=\textKValue{listof}}, +and \OptionValueRef{\LabelBase}{toc}{listofnumbered}% +\IndexOption{toc~=\textKValue{listofnumbered}} mentioned there, you can also +look at this behaviour from perspective of the lists themselves. Therefore +you can achieve the same results with the settings +\OptionValue{listof}{notoc}, \OptionValue{listof}{totoc}, and +\OptionValue{listof}{numbered}. + +By default, the headings in the lists of floating environments use the topmost +level below \DescRef{\LabelBase.cmd.part}. This is the chapter level in +\Class{scrbook} and \Class{scrreprt} and the section level in +\Class{scrartcl}. By contrast,\ChangedAt{v3.06}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} +\OptionValue{listof}{leveldown}\important{\OptionValue{listof}{leveldown}} +uses the next lower level to be used instead. +\important{\OptionValue{listof}{standardlevel}}% +\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% +\OptionValue{listof}{standardlevel} switches back to the default sectioning +level, if necessary. +\begin{Example} + In a book, you want to put the list of figures and the list of tables as + sub-lists into a common list named ``Figures and Tables''. Simply use: +\begin{lstcode} + \KOMAoption{listof}{leveldown} +\end{lstcode} + to use the section instead of the chapter level for both lists, and put the + following at the appropriate place in your document: +\begin{lstcode} + \addchap*{Figures and Tables} + \listoffigures + \listoftables +\end{lstcode} + You can find more information about the \DescRef{\LabelBase.cmd.addchap*} + command in \autoref{sec:\LabelBase.structure} on + \DescPageRef{\LabelBase.cmd.addchap*}. +\end{Example} + +Normally\ChangedAt{v2.8q}{% + \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} the lists of +floating environments use a fixed-width space for the caption number of the +entries. At the same time, all entries are somewhat indented. This behaviour +corresponds to the +\OptionValue{listof}{graduated}\IndexOption{listof~=\textKValue{graduated}} +setting. + +If the numbers become very wide, for example because you have many tables or +figures, the space provided may at some point no longer be sufficient. +\KOMAScript{} offers the setting \OptionValue{listof}{flat}% +\important{\OptionValue{listof}{flat}}\IndexOption{listof~=\textKValue{flat}} +for lists of floating environments, comparable to +\OptionValueRef{\LabelBase}{toc}{flat}\IndexOption{toc~=\textKValue{flat}} for +the table of contents. The width required to print the number is +determined automatically and the space is adjusted accordingly. See the +\OptionValueRef{\LabelBase}{toc}{flat} option, \autoref{sec:\LabelBase.toc}, +\DescPageRef{\LabelBase.option.toc.flat} for more information about side +effects and how it works. Note\textnote{Attention!} again that you need more +than one \LaTeX{} run before the lists of floating environments reach +their final state. + +The \OptionValue{listof}{entryprefix}\ChangedAt{v3.06}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} setting automatically activates +\OptionValue{listof}{flat} too. +Normally\important{\OptionValue{listof}{entryprefix}}, it does not make sense +to add a prefix such as ``figure'' or ``table'' to each entry in the lists of +floating environments because, of course, only figures are included in the +list of figures and only tables are included in the list of tables. Such a +prefix provides no additional information and is thus omitted by default. +However, you can add such prefixes using the +\OptionValue{listof}{entryprefix} option. With this, all entries in the same +list will get the same prefix. The prefix depends on the file extension of the +auxiliary file that is used for the corresponding list. For the list of +figures, the file extension is ``\File{lof}'' and therefore +\Macro{listoflofentryname} is used. For the list of tables, the file extension +is ``\File{lot}'' and \Macro{listoflotentryname} is used. + +For the \Class{scrbook} and \Class{scrreprt}\OnlyAt{\Class{scrbook}\and + \Class{scrreprt}} classes, \KOMAScript{} adds a vertical space to the lists +of floating environments whenever a new chapter starts. This behaviour, which +also exists in the standard classes, groups the lists by chapters. In +\KOMAScript{}, it corresponds to setting \ChangedAt{v3.00}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}}% +\OptionValue{listof}{chaptergapsmall}% +\LabelOptionValue{listof}{chaptergapsmall}% +\important{\OptionValue{listof}{chaptergapsmall}}% +\IndexOption{listof~=\textKValue{chaptergapsmall}}. In this case, is uses a +fixed vertical space of 10\Unit{pt}. +With\important{\OptionValue{listof}{chaptergapline}} the +\OptionValue{listof}{chaptergapline}% +\IndexOption{listof~=\textKValue{chaptergapline}} option, you instead get a +vertical space the height of one standard text line. With +\OptionValue{listof}{nochaptergap}% +\IndexOption{listof~=\textKValue{nochaptergap}}% +\important{\OptionValue{listof}{nochaptergap}}, you can completely remove the +vertical space. The\important{\OptionValue{listof}{chapterentry}} +\OptionValue{listof}{chapterentry}% +\IndexOption{listof~=\textKValue{chapterentry}} option is a special feature. +Instead of a vertical space, the table of contents entry for the chapter is +inserted into the lists of floating environments. Note\textnote{Attention!} +that this happens even if the chapter does not contain a floating environment. +You can find a method where only chapters containing floating environments +appear in the respective lists at \cite{https://komascript.de/comment/5070}. +You can achieve a more direct control over what appears in the lists of +floating environments with the \DescRef{\LabelBase.option.chapteratlists} +option, which is explained in \autoref{sec:\LabelBase.structure}, on +\DescPageRef{\LabelBase.option.chapteratlists}. + +You can find an overview of all settings for the \Option{listof} option in +\autoref{tab:\LabelBase.listof}. + +\begin{desclist} + \desccaption[{Available values for the \Option{listof} option}]{% + Available values for the \Option{listof} option for modifying the format + and contents of the lists of floating + environments\label{tab:\LabelBase.listof}% + }{% + Available values for the \Option{listof} option (\emph{continued})% + }% + \entry{\PValue{chapterentry}, \PValue{withchapterentry}}{% + Indicates the beginning of chapters in the lists of floating environments + with copies of their table-of-contents entries.% + \IndexOption{listof~=\textKValue{chapterentry}}}% + \entry{\PValue{chaptergapline}, \PValue{onelinechaptergap}}{% + Indicates the beginning of chapters in the lists of floating environments + with a vertical space the height of one standard text line.% + \IndexOption{listof~=\textKValue{chaptergapline}}}% + \entry{\PValue{chaptergapsmall}, \PValue{smallchaptergap}}{% + Indicates the beginning of chapters in the lists of floating environments + with a small vertical space.% + \IndexOption{listof~=\textKValue{chaptergapsmall}}}% + \entry{\PValue{entryprefix}}{% + \ChangedAt{v3.06}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + Adds a prefix before the number of each floating-environment list entry. + The prefix is usually language-dependent, e.\,g., in English ``Figure'' is + used for the list of figures and ``Table'' for the list of tables, each + followed by a white space.% + \IndexOption{listof~=\textKValue{entryprefix}}}% + \entry{\PValue{flat}, \PValue{left}}{% + Prints the lists of floating environments in tabular form. The caption + numbers are the first column, the caption texts the second column, and the + page numbers the third column. The space reserved for the caption numbers + depends on the previous \LaTeX{} run.% + \IndexOption{listof~=\textKValue{flat}}}% + \entry{\PValue{graduated}, \PValue{indent}, \PValue{indented}}{% + Prints the lists of floating environments in a hierarchical form. The + space reserved for the caption numbers is limited.% + \IndexOption{listof~=\textKValue{graduated}}}% + \entry{\PValue{leveldown}}{% + Uses headings that are one level lower in the sectioning hierarchy than + the default for lists of floating environments.% + \IndexOption{listof~=\textKValue{leveldown}}}% + \entry{\PValue{indenttextentries}, \PValue{indentunnumbered}, + \PValue{numberline}}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + The \PValue{numberline} property (see \autoref{sec:tocbasic.toc}, + \DescPageRef{tocbasic.cmd.setuptoc}) is set for the lists of floating + environments such as figures and tables. As a result, unnumbered entries + are left-aligned with the text of numbered entries of the same level. + However, the \KOMAScript{} classes themselves do not put unnumbered + entries in these lists. This option therefore affects only entries that + are generated not by the \KOMAScript{} classes themselves but with the + help of \DescRef{tocbasic.cmd.addxcontentsline} (see + \autoref{sec:tocbasic.toc}, \DescPageRef{tocbasic.cmd.addxcontentsline}).% + \IndexOption{toc~=\textKValue{numberline}}}% + \entry{\PValue{leftaligntextentries}, \PValue{leftalignunnumbered}, + \PValue{nonumberline}}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + The \PValue{nonumberline} property (see \autoref{sec:tocbasic.toc}, + \DescPageRef{tocbasic.cmd.setuptoc}) is set for the lists of floating + environments. This will place unnumbered entries left-aligned with the + number of numbered entries. However, the \KOMAScript{} classes themselves + do not put unnumbered entries in these lists. This option therefore + affects only entries that are generated not by the \KOMAScript{} classes + themselves but with the help of \DescRef{tocbasic.cmd.addxcontentsline} + (see \autoref{sec:tocbasic.toc}, + \DescPageRef{tocbasic.cmd.addxcontentsline}).% + \IndexOption{toc~=\textKValue{nonumberline}}}% + \entry{\PValue{nochaptergap}, \PValue{ignorechapter}}{% + The beginnings of chapters are not marked in the lists of floating + environments.% + \IndexOption{listof~=\textKValue{nochaptergap}}}% + \entry{\PValue{notoc}, \PValue{nottotoc}, \PValue{plainheading}}{% + The lists of floating environments do not generate entries in the table of + contents.% + \IndexOption{listof~=\textKValue{nottotoc}}}% + \entry{\PValue{numbered}, \PValue{totocnumbered}, \PValue{tocnumbered}, + \PValue{numberedtoc}, \PValue{numberedtotoc}}{% + The lists of floating environments receive numbered entries in the table + of contents.% + \IndexOption{listof~=\textKValue{numbered}}}% + \entry{\PValue{standardlevel}}{% + The lists use the normal sectioning level.% + \IndexOption{listof~=\textKValue{standardlevel}}}% + \entry{\PValue{totoc}, \PValue{toc}, \PValue{notnumbered}}{% + The lists of floating environment generate entries in the table of + contents, but their headings are unnumbered.% + \IndexOption{listof~=\textKValue{totoc}}}% +\end{desclist} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{listoftables}% + \Macro{listoffigures} +\end{Declaration} +These commands generate a list of tables or figures. Changes affecting these +lists will require two \LaTeX{} runs to take effect. The layout of the lists +can be influenced by the \DescRef{\LabelBase.option.listof}% +\important{\DescRef{\LabelBase.option.listof}} option with the values +\PValue{graduated} or \PValue{flat} (see +\DescPageRef{\LabelBase.option.listof}). In addition, the \PValue{listof} and +\PValue{listofnumbered} values of the \DescRef{\LabelBase.option.toc}% +\important{\DescRef{\LabelBase.option.toc}} option (see +\autoref{sec:\LabelBase.toc}), as well as the \PValue{totoc} and +\PValue{numbered} values of the \DescRef{\LabelBase.option.listof} option +described above indirectly affect these lists. + +As\textnote{Hint!} a rule, you will find the lists of the floating +environments immediately after the table of contents. In some documents, they +go into the appendix. However, the author of this guide prefers them +immediately after the table of contents.% +% +\EndIndexGroup + + +\LoadCommonFile{marginpar}% \section{Marginal Notes} + + +\section{Appendix} +\seclabel{appendix} +\BeginIndexGroup +\BeginIndex{}{Appendix} + +The appendix of a document mostly consists of supplements to the document. +Typical parts of an appendix include a bibliography, an index, and a glossary. +However you should not start an appendix for these parts alone because their +format already distinguishes them from the main document. But if there are +additional elements in the appendix, such as quoted third-party documents, +endnotes, figures, or tabulars, the standard elements such as the bibliography +should also be part of the appendix. + + +\begin{Declaration} + \Macro{appendix} +\end{Declaration}% +The appendix is started in the standard as well as the {\KOMAScript} classes +with \Macro{appendix}. Among other things, this command changes the chapter +numbering to upper-case letters while ensuring that the rules according to +\cite{DUDEN} for numbering the sectioning levels are followed (for +German-speaking regions). These rules are explained in more detail in the +description of the \DescRef{\LabelBase.option.numbers} option in +\autoref{sec:\LabelBase.structure}, \DescPageRef{\LabelBase.option.numbers}. + +The format of the chapter headings\OnlyAt{\Class{scrbook}\and + \Class{scrreprt}} in the appendix is influenced by the +\DescRef{\LabelBase.option.chapterprefix}% +\important{\DescRef{\LabelBase.option.chapterprefix}\\ + \DescRef{\LabelBase.option.appendixprefix}} and +\DescRef{\LabelBase.option.appendixprefix} options. See +\autoref{sec:\LabelBase.structure}, +\DescPageRef{\LabelBase.option.appendixprefix} for more information. + +Please\textnote{Attention!} note that \Macro{appendix} is a command, +\emph{not} an environment! This command does not expect an argument. Chapters +and sections in the appendix use \DescRef{\LabelBase.cmd.chapter} and +\DescRef{\LabelBase.cmd.section}, just as in the main text.% +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Bibliography} +\seclabel{bibliography} +\BeginIndexGroup +\BeginIndex{}{bibliography} + +The bibliography makes external sources accessible. As a rule, the +bibliography is created from an external file with a database-like structure +using the \BibTeX{} program. You can use the \BibTeX{} style to change both +the format of the entries and their sorting. If you use an additional +bibliography package like \Package{natbib}\IndexPackage{natbib}, +\Package{babelbib}\IndexPackage{babelbib}, or +\Package{biblatex}\IndexPackage{biblatex}, \KOMAScript{}'s influence over the +bibliography disappears. In such cases, you must follow the manual of the +relevant bibliography package. You can find general information about +bibliographies in \cite{lshort}. + + +\begin{Declaration} + \OptionVName{bibliography}{setting} +\end{Declaration} +For a start,\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} you can select any predefined bibliography style in +\PName{setting}. There are two such bibliography styles predefined in +\KOMAScript{}. You should not confuse them with the styles used by +\BibTeX\Index{BibTeX=\BibTeX}, which you select with +\Macro{bibstyle}. While \BibTeX{} determines both the sorting and the +contents of the bibliography, \KOMAScript{} influences only some basic +features of the bibliography and few properties of the entry format. + +The\important{\OptionValue{bibliography}{oldstyle}} +\OptionValue{bibliography}{oldstyle}% +\IndexOption{bibliography~=\textKValue{oldstyle}} option selects a compact +format for bibliography entries. In this case, using the +\DescRef{maincls-experts.cmd.newblock}\IndexCmd{newblock} command results in +only a small glue between the entries. The name comes from the fact that this +is the most common classic form of a bibliography. +In\important{\OptionValue{bibliography}{openstyle}} contrast, the +\OptionValue{bibliography}{openstyle}% +\IndexOption{bibliography~=\textKValue{openstyle}} setting selects a more +modern and open kind of bibliography. The name comes from the fact that the +\DescRef{maincls-experts.cmd.newblock} command inserts a paragraph break. The +bibliography entries appear more structured. They are less compact and seem +more relaxed or open. Information about defining new bibliography styles can +be found in the description of the \DescRef{maincls-experts.cmd.newbibstyle} +command in \autoref{sec:maincls-experts.bibliography}, +\DescPageRef{maincls-experts.cmd.newbibstyle}. + +In addition to the formatting style, you can select one more feature using +\PName{setting}. The bibliography is a kind of list of contents. But instead +of listing the contents of the document itself, it references external works. +With this reasoning, you could argue that the bibliography is a separate +chapter or section and therefore deserves a chapter or section number. The +\OptionValue{bibliography}{numbered}% +\important{\OptionValue{bibliography}{numbered}}% +\IndexOption{bibliography~=\textKValue{numbered}} setting does exactly that, +including creating an entry in the table of contents. In my opinion, a +traditional, annotated source list should by this reasoning be a separate +chapter too. Moreover, the bibliography is ultimately nothing you've written +yourself and so merits at most an unnumbered entry in the table of contents, +which is achieved with the \OptionValue{bibliography}{totoc}% +\IndexOption{bibliography~=\textKValue{totoc}} option. The default setting, +where the bibliography is produced as an unnumbered chapter and does not +receive an entry in the table of contents corresponds to +\OptionValue{bibliography}{nottotoc}% +\IndexOption{bibliography~=\textKValue{nottotoc}}. For more information, see +the \DescRef{\LabelBase.option.toc} option in \autoref{sec:\LabelBase.toc}, +especially the \PValue{bibliographynumbered}, \PValue{bibliography}, +and\PValue{nobibliography} values for this option on +\DescPageRef{\LabelBase.option.toc.bibliography}. + +Sometimes\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} a document made using \Class{scrbook} or \Class{scrreprt} +will have a bibliography for every chapter rather than one bibliography for +the whole document. In that case, it makes sense for the bibliography +itself\important{\OptionValue{bibliography=leveldown}} to be not a chapter but +a section. You can achieve this using the +\OptionValue{bibliography}{leveldown}% +\IndexOption{bibliography~=\textKValue{leveldown}} option. You can also use +this if you want the bibliography to appear with other lists under a common +heading, therefore this option is also available with \Class{scrartcl}. + +You can find a summary of available values for the \Option{bibliography} +option in \autoref{tab:\LabelBase.bibliography}. Note, however, that you can +define new values with +\DescRef{maincls-experts.cmd.newbibstyle}\IndexCmd{newbibstyle}. + +\begin{table} + \caption[{Available values for the \Option{bibliography} option}]{% + Predefined values for the \Option{bibliography} option for setting the + bibliography format} + \label{tab:\LabelBase.bibliography} + \begin{desctabular} + \pventry{leveldown}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + The bibliography uses a sectioning command one level lower than + the default.% + \IndexOption{bibliography~=\textKValue{leveldown}}}% + \entry{\PValue{notoc}, \PValue{nottotoc}, \PValue{plainheading}}{% + The bibliography receives neither an entry in the table of contents nor + a number.% + \IndexOption{bibliography~=\textKValue{nottotoc}}}% + \entry{\PValue{numbered}, \PValue{tocnumbered}, \PValue{totocnumbered}, + \PValue{numberedtoc}, \PValue{numberedtotoc}}{% + The bibliography receives an entry in the table of contents and a + number.% + \IndexOption{bibliography~=\textKValue{numbered}}}% + \pventry{oldstyle}{% + The bibliography uses the classic, compact formation, where + \DescRef{maincls-experts.cmd.newblock}\IndexCmd{newblock} generates only + a horizontal glue.% + \IndexOption{bibliography~=\textKValue{oldstyle}}}% + \pventry{openstyle}{% + The bibliography uses the structured, open format where + \DescRef{maincls-experts.cmd.newblock}\IndexCmd{newblock} generates a + paragraph break.% + \IndexOption{bibliography~=\textKValue{openstyle}}}% + \pventry{standardlevel}{% + \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + The bibliography uses the standard sectioning command level.% + \IndexOption{bibliography~=\textKValue{standardlevel}}}% + \entry{\PValue{toc}, \PValue{totoc}, \PValue{notnumbered}}{% + The bibliography receives an entry in the table of contents but no + number.% + \IndexOption{bibliography~=\textKValue{totoc}}}% + \end{desctabular} +\end{table} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setbibpreamble}\Parameter{preamble} +\end{Declaration}% +You can use the \Macro{setbibpreamble} command to set a preamble for the +bibliography\Index{bibliography}. This preamble must be placed before the +command for issuing the bibliography. However, it need not be directly +in front of it. For example, it could be placed at the beginning of +the document. Like\textnote{Attention!} the +\OptionValueRef{\LabelBase}{bibliography}{totoc} and +\OptionValueRef{\LabelBase}{bibliography}{totocnumbered} options, this command +only works if you have not loaded a package which prevents this from happening +by redefining the \Environment{thebibliography} environment. Although the +\Package{natbib} package\IndexPackage{natbib} uses undocumented, internal +{\KOMAScript} macros, \Macro{setbibpreamble} could still work with the current +version of \Package{natbib} (see \cite{package:natbib}). +\begin{Example} + You want to point out that the bibliographical references are sorted + alphabetically by the names of the authors. You therefore use the following + command: +\begin{lstcode} + \setbibpreamble{References are in alphabetical order. + References with more than one author are sorted + according to the first author.\par\bigskip} +\end{lstcode} + The \Macro{bigskip}\IndexCmd{bigskip} command ensures that the + preamble and the first reference are separated by a large vertical + space.% +\end{Example}% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{BreakBibliography}\Parameter{interruption code} +\end{Declaration} +This\textnote{Attention!}\ChangedAt{v3.00}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} command exists only if the +environment \Environment{thebibliography} has not been redefined by another +package. With this instruction, you can insert a break into the +bibliography. The \PName{interruption code} will be expanded inside a +group. Such a break may be, for example, a heading using +\DescRef{\LabelBase.cmd.minisec}. Unfortunately there is currently no way to +have this command automatically generated, for example by using a special +entry in the \BibTeX{} database. Therefore, it can currently only be used by +users who edit the bibliography directly. For this reason, its usefulness is +very limited.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AfterBibliographyPreamble}\Parameter{code}% + \Macro{AtEndBibliography}\Parameter{code} +\end{Declaration} +In\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} +some cases, it may be useful to add some \PName{code} after the bibliography +preamble or just before the end of the bibliography. This is possible with the +help of these two instructions. +\begin{Example} + You want to set the bibliography not justified but ragged right. You can + achieve this with: +\begin{lstcode} + \AfterBibliographyPreamble{\raggedright} +\end{lstcode} + You can put this instruction anywhere before the bibliography. However, it is + recommended to do so in the preamble of the document or a separate package. +\end{Example} +The\textnote{Attention!} functionality of this instruction depends on +cooperation with packages modifying the bibliography, if you use such a +package\iffree{}{(see \autoref{sec:maincls-experts.coexistence}, +\DescPageRef{maincls-experts.cmd.AfterBibliographyPreamble})}.% +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Index} +\seclabel{index} +\BeginIndexGroup + +For general information about making a keyword index, see \cite{lshort}, +\cite{makeindex}, and \cite{xindy}. Using a package that redefines +commands or environments for the index \KOMAScript{}'s ability to influence +the index may disappear. This applies, for example, when using the +\Package{index}\IndexPackage{index} package, but not when using the +\Package{splitidx}\IndexPackage{splitidx} package (see +\cite{package:splitindex}). + +\begin{Declaration} + \OptionVName{index}{setting}% +\end{Declaration} +\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% +By default or with \OptionValue{index}{default}% +\IndexOption{index~=\textKValue{default}}, the index is an unnumbered chapter +(\Class{scrbook} or \Class{scrreprt}) or section (\Class{scrartcl}) without an +entry in the table of contents. Since\important{\OptionValue{index}{totoc}} +the index usually comes last in a book or similar document, it does not +actually need an entry in the table of contents. Nevertheless, if you want to +do this, for example because you are working with a multi-index keyword +dictionary such as the one that appears in this \iffree{guide}{book}, you can +create this with the +\OptionValue{index}{totoc}\IndexOption{index~=\textKValue{totoc}} option. +You\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} can even number the index using the +\OptionValue{index}{numbered}\IndexOption{index~=\textKValue{numbered}} +setting. See also the \DescRef{\LabelBase.option.toc} option with the +\PValue{index} or \PValue{indexnumbered} values in +\autoref{sec:\LabelBase.toc} starting at +\DescPageRef{\LabelBase.option.toc.index}. + +For example, if you create multiple indexes with +\Package{splitidx}\IndexPackage{splitidx} (see \cite{package:splitindex}), +it may be useful to group them under a common heading. To make this possible, +\OptionValue{index}{leveldown}% +\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\important{\OptionValue{index}{leveldown}} places the index +one sectioning level deeper than usual. In \Class{scrbook} and +\Class{scrreprt}, it is no longer a chapter but a section; with +\Class{scrartcl}, a subsection. The \OptionValue{index}{standardlevel}% +\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}\important{\OptionValue{index}{standardlevel}} option is +the counterpart to this and cancels any instance of +\OptionValue{index}{leveldown} used previously. + +You can find a summary of the available values for the \PName{setting} of +\Option{index} in \autoref{tab:maincls.index}. + +\begin{table} + \caption{Available values for the \Option{index} option} + \label{tab:maincls.index} + \begin{desctabular} + \pventry{leveldown}{% + \ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + The index is moved down by one sectioning level.% + \IndexOption{index~=\textKValue{leveldown}}% + }% + \entry{\PValue{notoc}, \PValue{nottotoc}, \PValue{plainheading}}{% + The index does not receive an entry in the table of contents.% + \IndexOption{index~=\textKValue{nottotoc}}}% + \entry{\PValue{numbered}, \PValue{tocnumbered}, \PValue{totocnumbered}, + \PValue{numberedtoc}, \PValue{numberedtotoc}}{% + \ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + The index receives an entry in the table of contents and is numbered.% + \IndexOption{index~=\textKValue{numbered}}}% + \pventry{standardlevel}{% + \ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + The index is at the usual sectioning level.% + \IndexOption{index~=\textKValue{standardlevel}}% + }% + \entry{\PValue{toc}, \PValue{totoc}, \PValue{notnumbered}}{% + The index receives an entry in the table of contents without being + numbered.% + \IndexOption{index~=\textKValue{totoc}}}% + \end{desctabular} +\end{table} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setindexpreamble}\Parameter{preamble} +\end{Declaration}% +As with the bibliography, you can also provide a preamble to the +index. This is often the case if you have more than one index or if +you mark different kinds of references by highlighting the page +numbers in different ways. +\begin{Example} + You have a document in which terms are both defined and used. The + page numbers of definitions are in bold. Of course you want to make + your reader aware of this fact. Thus you insert a preamble for the + index: +\begin{lstcode} + \setindexpreamble{All page numbers printed in \textbf{bold} + refer to definitions of terms. Page numbers printed + normally refer to pages where the term is used.\par\bigskip} +\end{lstcode} +\end{Example} + +Note\textnote{Attention!} that the page style is changed for the first page +of the index. The page style that is applied is defined in the macro +\DescRef{\LabelBase.cmd.indexpagestyle} (see +\autoref{sec:\LabelBase.pagestyle}, +\DescPageRef{\LabelBase.cmd.indexpagestyle}). + +The usual \LaTeX{} packages and additional programs are responsible for +creating, sorting, and outputting the index.% +\iftrue % Umbruchoptimierung + \iffree{}{ % + For example, the \Package{imakeidx}\IndexPackage{imakeidx} package + (see \cite{package:imakeidx}), which among other things automates the + invocation of the \File{makeindex} or \File{xindy} program, is highly + recommended. This eliminates a common source of error, particularly for + \LaTeX{} beginners.% + } + {\KOMAScript}, like the standard classes, provides only the basic macros + and environments for them.% +\fi +% +\EndIndexGroup +% +\EndIndexGroup +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrbookreportarticle-experts-de.tex b/macros/latex/contrib/koma-script/doc/scrbookreportarticle-experts-de.tex new file mode 100644 index 0000000000..08c0ee03e0 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrbookreportarticle-experts-de.tex @@ -0,0 +1,2110 @@ +% ====================================================================== +% scrbookreportarticle-experts-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrbook, scrreprt, and scrartcl of the KOMA-Script guide +% expert part +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrbookreportarticle-experts-de.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrbook, scrreprt, scrartcl for + experts)] + +\chapter[{Zusätzliche Informationen zu den Hauptklassen und + \Package{scrextend}}]{Zusätzliche + Informationen zu den Hauptklassen + \Class{scrbook}, \Class{scrreprt} und + \Class{scrartcl} sowie dem + Paket \Package{scrextend}} +\labelbase{maincls-experts} + +\BeginIndexGroup% +\BeginIndex{Class}{scrartcl}% +\BeginIndex{Class}{scrbook}% +\BeginIndex{Class}{scrreprt}% +\BeginIndex{Package}{scrextend}% +In diesem Kapitel finden Sie zusätzliche Informationen zu den +\KOMAScript-Klassen \Class{scrbook}, \Class{scrreprt} und \Class{scrartcl} und +einigen Anweisungen, die auch in \Package{scrextend} vorhanden sind. +\iffree{Einige Teile des Kapitels sind dabei dem \KOMAScript-Buch + \cite{book:komascript} vorbehalten. Dies sollte kein Problem sein, denn + der}{Der} normale Anwender, der die Klassen einfach nur verwenden will, wird +diese Informationen eher selten benötigen. Ein Teil der Informationen richtet +sich an Anwender, die ausgefallene Aufgaben lösen oder eigene Klassen +schreiben wollen, die auf einer \KOMAScript-Klasse basieren. Da sich die +entsprechenden Erklärungen ausdrücklich nicht an \LaTeX-Anfänger richten, sind +sie teilweise deutlich kürzer gefasst und setzen ein vertieftes Wissen über +\LaTeX{} voraus. Anderes existiert nur aus Gründen der Kompatibilität zu den +Standardklassen\iffree{ oder früheren Versionen von \KOMAScript}{}.\iffree{}{ + Teile, die nur aus Gründen der Kompatibilität zu früheren Versionen von + \KOMAScript{} existieren, sind in serifenloser Schrift gesetzt und sollten + nicht mehr verwendet werden.} + +\LoadNonFree{scrbookreportarticle-experts}{0} + +\section{Ergänzungen zu Benutzeranweisungen} +\seclabel{addInfos} + +\LoadNonFree{scrbookreportarticle-experts}{1} + +\iffree{\LoadCommonFile{footnotes-experts}}{} + +\section{Zusammenspiel von \KOMAScript{} und anderen Paketen} +\seclabel{coexistence} + +\LoadNonFree{scrbookreportarticle-experts}{2} + + +\section{Erkennung von \KOMAScript-Klassen} +\seclabel{identify} + +Für Paketautoren besteht manchmal die Notwendigkeit, eine \KOMAScript-Klasse +zu erkennen. Für Anwender besteht diese Notwendigkeit dagegen eher +nicht. Bezüglich der verwendeten \KOMAScript-Version sei auf +\DescRef{scrbase.cmd.KOMAScriptVersion} in \autoref{sec:scrbase.identify}, +\DescPageRef{scrbase.cmd.KOMAScriptVersion} verwiesen. + +\begin{Declaration} + \Macro{KOMAClassName} + \Macro{ClassName} +\end{Declaration} +In \Macro{KOMAClassName} ist der Name der aktuell verwendeten +\KOMAScript-Klasse abgelegt. Will man also wissen, ob eine \KOMAScript-Klasse +verwendet wird, so kann man einfach mit \Macro{@ifundefined} auf diese +Anweisung testen. Tests auf eine konkrete \KOMAScript-Klasse, beispielsweise +mit \DescRef{scrbase.cmd.Ifstr}, sind ebenfalls möglich. Demgegenüber gibt +\Macro{ClassName} Auskunft, welche Standardklasse durch diese +\KOMAScript-Klasse ersetzt wird.% +\iffalse% Umbruchkorrektur +\par +Es\textnote{Achtung!} sei in diesem Zusammenhang darauf hingewiesen, dass +dagegen die Existenz von +\DescRef{scrlogo.cmd.KOMAScript}\IndexCmd{KOMAScript} nicht als Indiz für die +Verwendung einer \KOMAScript-Klasse dienen kann. Zum einen definieren alle +\KOMAScript-Pakete diese Anweisung, zum anderen können auch andere Pakete es +für sinnvoll erachten, das \KOMAScript-Piktogramm unter diesem Namen zu +definieren.% +\fi% +\EndIndexGroup + + +\section{Einträge ins Inhaltsverzeichnis} +\seclabel{toc} + +\KOMAScript-Klassen bieten erweiterte Möglichkeiten zur Erstellung und +Manipulation von Einträgen in das Inhaltsverzeichnis. Einige davon basieren +auf der Verwendung von \Package{tocbasic} (siehe +\autoref{sec:tocbasic.tocstyle} ab +\autopageref{sec:tocbasic.tocstyle}). Andere sind direkt in den Klassen +implementiert. + + +\begin{Declaration} + \Macro{raggedchapterentry} +\end{Declaration} +Bei früheren\ChangedAt{v3.21}{\Class{scrbook}\and \Class{scrreprt}} Version +von \KOMAScript{} gab es die Möglichkeit, das Makro \Macro{raggedchapterentry} +als \Macro{raggedright} zu definieren, um den Text der Kapiteleinträge ins +Inhaltsverzeichnis im linksbündigen Flattersatz zu setzen. Offiziell existiert +diese Möglichkeit seit \KOMAScript-Version~3.21 nicht mehr. + +Tatsächlich ist aber die Eigenschaft \PValue{raggedentrytext} für den +Eintrags-Stil \PValue{tocline} im Paket +\hyperref[cha:tocbasic]{\Package{tocbasic}}\IndexPackage{tocbasic} so +implementiert, dass sie das Makro \Macro{ragged\PName{Eintragsebene}entry} +entweder auf \Macro{relax} oder auf \Macro{raggedright} setzt. Bei der +Auswertung der Eigenschaft wird dann getestet, ob das entsprechende Makro +entweder \Macro{raggedright} ist oder als \Macro{raggedright} definiert +ist. In beiden Fällen wird Flattersatz verwendet. In allen anderen Fällen wird +kein Flattersatz verwendet. + +Da schon früher dokumentiert war, dass \Macro{raggedchapterentry} nicht +als etwas anderes als \Macro{raggedright} definiert werden sollte, ist damit +Kompatibilität zum dokumentierten Verhalten früherer Versionen erreicht. Wie +in früheren Versionen gewarnt, führen andere Definitionen von +\Macro{raggedchapterentry} -- nun aber auch von \Macro{raggedsectionentry} und +entsprechend für die anderen Eintragsebenen -- möglicherweise zu unerwarteten +Ergebnissen. + +Empfohlen wird, eventuell gewünschten Flattersatz für Verzeichniseinträge +stattdessen über die genannte Eigenschaft des Verzeichniseintragsstils +\PValue{tocline} zu wählen.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{addtocentrydefault}\Parameter{Ebene}\Parameter{Nummer}% + \Parameter{Überschrift} +\end{Declaration} +Die\ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} \KOMAScript-Klassen verwenden +\Macro{addcontentsline}\IndexCmd{addcontentsline}% +\important{\Macro{addcontentsline}} nicht direkt, um Einträge ins +Inhaltsverzeichnis vorzunehmen. Stattdessen wird \Macro{addtocentrydefault} +mit ganz ähnlichen Argumenten aufgerufen. Die Anweisung kann sowohl für +nummerierte als auch für nicht nummerierte Einträge verwendet werden. Dabei +gibt \PName{Ebene} die Gliederungsebene in Textform an, also \PValue{part}, +\PValue{chapter}, \PValue{section}, \PValue{subsection}, +\PValue{subsubsection}, \PValue{paragraph} oder \PValue{subparagraph}. Die +formatierte Gliederungsnummer wird über das zweite Argument \PName{Nummer} +übergeben. Dieses Argument darf auch leer sein. Der Text des Eintrags wird mit +\PName{Überschrift} angegeben. Zerbrechliche Befehle in +diesem Argument sind mit +\Macro{protect}\IndexCmd{protect}\important{\Macro{protect}} zu schützen. + +Für das Argument \PName{Nummer} gilt noch eine Besonderheit. Ist das Argument +leer, so signalisiert dies, dass ein nicht nummerierter Eintrag erzeugt werden +soll. In der Voreinstellung wird dies mit +\begin{quote}\small\raggedright + \Macro{addcontentsline}\PParameter{toc}\Parameter{Ebene}% + \PParameter{\%\\ + \quad\Macro{protect}\DescRef{tocbasic.cmd.nonumberline} + \PName{Überschrift}\%\\ + } +\end{quote} +erreicht. Ist das Argument jedoch nicht leer, so soll ein nummerierter Eintrag +erzeugt werden und \PName{Nummer} ist die vorformatierte Gliederungsnummer. In +der Voreinstellung verwendet \KOMAScript{} dann: +\begin{quote}\small\raggedright + \Macro{addcontentsline}\PParameter{toc}\Parameter{Ebene}% + \PParameter{\%\\ + \quad\Macro{protect}\DescRef{tocbasic.cmd.numberline}\Parameter{Nummer}% + \PName{Überschrift}\%\\ + } +\end{quote} +\iffalse zur Erzeugung dieses Eintrags.\fi + +Paketautoren und Autoren von Wrapper-Klassen können diese Anweisung +umdefinieren, um Einfluss auf die Einträge zu nehmen. So\textnote{Beispiel} +wäre beispielsweise denkbar, mit +\begin{lstcode} + \renewcommand{\addtocentrydefault}[3]{% + \IfArgIsEmpty{#3}{% + }{% + \IfArgIsEmpty{#2}{% + \addcontentsline{toc}{#1}{\protect\nonumberline#3}% + }{% + \addcontentsline{toc}{#1}{\protect\numberline{#2}#3}% + }% + }% + }% +\end{lstcode} +dafür\IndexCmd{IfArgIsEmpty} zu sorgen, dass Einträge mit leerer +\PName{Überschrift} erst gar nicht vorgenommen werden. Eine solche Änderung +ist in der Praxis jedoch nicht notwendig, da die Unterdrückung leerer Einträge +bereits auf andere Weise in die \KOMAScript-Klassen eingebaut ist. Siehe +hierzu auch die Erklärung zu den Gliederungsbefehlen in +\autoref{sec:maincls.structure} ab \DescPageRef{maincls.cmd.part}.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{addparttocentry}\Parameter{Nummer}\Parameter{Überschrift} + \Macro{addchaptertocentry}\Parameter{Nummer}\Parameter{Überschrift} + \Macro{addsectiontocentry}\Parameter{Nummer}\Parameter{Überschrift} + \Macro{addsubsectiontocentry}\Parameter{Nummer}\Parameter{Überschrift} + \Macro{addsubsubsectiontocentry}\Parameter{Nummer}\Parameter{Überschrift} + \Macro{addparagraphtocentry}\Parameter{Nummer}\Parameter{Überschrift} + \Macro{addsubparagraphtocentry}\Parameter{Nummer}\Parameter{Überschrift} +\end{Declaration}% +Auch \ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} die oben dokumentierte Anweisung +\DescRef{\LabelBase.cmd.addtocentrydefault}\IndexCmd{addtocentrydefault}% +\important{\DescRef{\LabelBase.cmd.addtocentrydefault}} wird von den +\KOMAScript-Klassen nur dann direkt aufgerufen, wenn für die angegebene +\PName{Ebene} keine direkte Anweisung definiert oder diese +\Macro{relax}\IndexCmd{relax}\important{\Macro{relax}} ist. In der +Voreinstellung sind die angegebenen Anweisungen alle so definiert, dass sie +ihre \PName{Ebene} und die Argumente direkt an +\DescRef{\LabelBase.cmd.addtocentrydefault} weitergeben.% +% +\EndIndexGroup + + +\section{Schrifteinstellungen} +\seclabel{fonts} + +\KOMAScript-Klassen verfügen nicht nur über erweiterte Möglichkeiten zur +Auswahl der Grundschriftgröße. Sie erlauben auch die Definition von Elementen +mit eigenen Schrifteinstellungen, sowie deren Manipulation und dedizierter +Anwendung. + +\LoadNonFree{scrbookreportarticle-experts}{5} + +\begin{Declaration} + \Macro{newkomafont}\OParameter{Warnung}\Parameter{Element} + \Parameter{Voreinstellung} + \Macro{aliaskomafont}\Parameter{Aliasname}\Parameter{Element} +\end{Declaration} +Experten können mit \Macro{newkomafont} eine \PName{Voreinstellung} für die +Schrift eines \PName{Element}s definieren. Anschließend kann diese +Voreinstellung mit den Anweisungen \DescRef{maincls.cmd.setkomafont} und +\DescRef{maincls.cmd.addtokomafont} (siehe \autoref{sec:maincls.textmarkup}, +\DescPageRef{maincls.cmd.setkomafont}) verändert werden. Natürlich wird diese +Schrift damit noch lange nicht verwendet. Der Experte muss selbst Sorge dafür +tragen, dass er an den entsprechenden Stellen die Anweisung +\DescRef{maincls.cmd.usekomafont}% +\important{\DescRef{maincls.cmd.usekomafont}}\IndexCmd{usekomafont} (siehe +\DescPageRef{maincls.cmd.usekomafont}) für dieses Element in seine +Definitionen einbaut. Der Aufruf von \Macro{newkomafont} für ein bereits +existierendes Element führt zu Fehlermeldungen. + +Das optionale Argument \PName{Warnung} definiert eine Warnmeldung. Diese wird +bei den \KOMAScript-Klassen per \Macro{ClassWarning} oder beim Paket +\Package{scrextend} per \Macro{PackageWarning} immer dann ausgegeben, wenn die +Voreinstellung für das Element verändert wird. Als Urheber der +Warnung wird das Paket +\Package{scrkbase}\IndexPackage{scrkbase}\important{\Package{scrkbase}} +angegeben. + +Mit \Macro{aliaskomafont} kann für ein bereits existierendes \PName{Element} +ein \PName{Aliasname} definiert werden. \KOMAScript{} informiert den Benutzer +in der \File{log}-Datei über den Namen des tatsächlichen Elements, wenn dieser +den \PName{Aliasname} verwendet. \PName{Aliasname}n\textnote{Tipp!} können +beispielsweise dann eingesetzt werden, wenn der Entwickler sich später einen +besseren Namen für ein Element überlegt und der alte Name aus +Kompatibilitätsgründen weiter verwendbar bleiben soll. Außerdem kann damit die +Benutzerfreundlichkeit erhöht werden, indem einem Element all die Namen als +Alias zugeordnet werden, die unterschiedliche Benutzer intuitiv wählen +würden. \KOMAScript{} selbst macht von dieser Möglichkeit regen Gebrauch. +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{addtokomafontrelaxlist}\Parameter{Makro} + \Macro{addtokomafontonearglist}\Parameter{Makro} + \Macro{addtokomafontgobblelist}\Parameter{Makro} +\end{Declaration} +Wie bereits in \autoref{part:forAuthors} der Anleitung erklärt, dürfen in den +Schrifteinstellungen der Elemente nur Befehle zur Wahl der Größe, Familie, +Codierung, Strichstärke, Form und Farbe enthalten sein. Dabei erfolgt schon +die Änderung der Farbe bei \LaTeX{} nicht transparent und kann damit +unerwünschte Effekte hervorrufen, wenn man \DescRef{maincls.cmd.usekomafont} +an ungünstiger Stelle verwendet. + +Nun neigen Anwender dazu, in die Schrifteinstellungen auch ganz andere, +teilweise sehr kritische Dinge zu packen, beispielsweise ein +\Macro{MakeUppercase} ganz am Ende der Einstellung. Bei der internen +Verwendung der Schrifteinstellungen wurde daher möglichst so vorgegangen, dass +viele dieser eigentlich verbotenen Einstellungen trotzdem keinen Schaden +anrichten und es meist sogar funktioniert, wenn der letzte Befehl in der +Schrifteinstellung ein Argument erwartet, also beispielsweise \Macro{textbf} +anstelle von \Macro{bfseries} verwendet wird. Eine Garantie gibt es dafür +jedoch nicht. + +In Einzelfällen war es innerhalb von \KOMAScript{} notwendig, die Umschaltung +wirklich auf Schrifteinstellungen zu beschränken. Dies erfolgt dann +beispielsweise mit +\DescRef{maincls.cmd.usefontofkomafont}\IndexCmd{usefontofkomafont}% +\IndexCmd{usesizeofkomafont}\IndexCmd{useencodingofkomafont}% +\IndexCmd{usefamilyofkomafont}\IndexCmd{useseriesofkomafont}% +\IndexCmd{useshapeofkomafont} statt \DescRef{maincls.cmd.usekomafont} (siehe +\autoref{sec:maincls.textmarkup}, +\DescPageRef{maincls.cmd.usefontofkomafont}). + +Die Anweisung \DescRef{maincls.cmd.usefontofkomafont} und ihre Geschwister +haben allerdings ihre Grenzen. Deshalb darf die vermeintliche Schrifteinstellung +eines Elements keinesfalls ein voll expandierbares Argument erwarten. Genau +das ist aber beispielsweise bei \Macro{MakeUppercase} der +Fall. Daher\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} verwaltet \KOMAScript{} eine interne Liste von Makros, die +innerhalb von \DescRef{maincls.cmd.usefontofkomafont} und ihren Geschwistern +zu \Macro{relax} werden sollen. In der Voreinstellung ist das seit +\KOMAScript~3.24\ChangedAt{v3.24}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} nur noch \Macro{normalcolor}. + +Es ist zu beachten, dass das angegebene \PName{Makro} wirklich stur auf +\Macro{relax} gesetzt wird. Irgendwelche Argumente innerhalb der +Schrifteinstellung werden also gegebenenfalls lokal ausgeführt. Daher dürfen +Anweisungen wie \Macro{setlength} keinesfalls zu dieser Liste hinzugefügt +werden. Für alle Fehler, die durch die Verwendung von +\Macro{addtokomafontrelaxlist} entstehen, ist der Anwender selbst +verantwortlich. Außerdem sollte diese Möglichkeit nicht als Legitimation dafür +missverstanden werden, den Schrifteinstellungen alle möglichen Anweisungen +hinzuzufügen! + +Für\ChangedAt{v3.24}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} Befehle, deren erstes Argument noch ohne zusätzliche +Gruppe ausgeführt werden soll, gibt es +\Macro{addtokomafontonearglist}. Das angegebene \PName{Makro} wird dabei auf +\Macro{@firstofone} gesetzt. In der Voreinstellung wird dies für +\Macro{MakeUppercase} und \Macro{MakeLowercase} verwendet. + +Soll\ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} hingegen ein \PName{Makro} innerhalb von +\DescRef{maincls.cmd.usefontofkomafont} und ihren Geschwistern zusammen mit +seinem ersten Argument ignoriert werden, so ist stattdessen +\Macro{addtokomafontgobblelist} zu verwenden. Ein Beispiel dafür ist die +Anweisung \Macro{color}, die einschließlich des Namens der Farbe ignoriert +werden muss und deshalb bereits in der Voreinstellung Teil dieser Liste ist. + +Es ist zu beachten, dass sich die hier genannten Voreinstellungen in +zukünftigen Versionen ändern können. Wenn Sie bestimmte Befehle in einer der +Listen zwingend benötigen, sollten Sie diese also selbst explizit hinzufügen.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfExistskomafont}\Parameter{Element}\Parameter{Dann-Code}% + \Parameter{Sonst-Code} + \Macro{IfIsAliaskomafont}\Parameter{Element}\Parameter{Dann-Code}% + \Parameter{Sonst-Code} +\end{Declaration} +Da\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Class{scrlttr2}} die Schrift mancher Elemente erst ab +bestimmten Versionen von \KOMAScript{} geändert werden kann, ist es manchmal +sinnvoll, vorher testen zu können, ob ein \PName{Element} mit dieser +Möglichkeit überhaupt existiert. Die Anweisung \Macro{IfExistskomafont} führt +den \PName{Dann-Code} genau dann aus, wenn das \PName{Element} über +\DescRef{\LabelBase.cmd.newkomafont} oder +\DescRef{\LabelBase.cmd.aliaskomafont} definiert wurde und daher auch mit +\DescRef{maincls.cmd.setkomafont} oder \DescRef{maincls.cmd.addtokomafont} +geändert und mit den \Macro{use\dots komafont}-Anweisungen abgefragt werden +kann. Anderenfalls wird der \PName{Sonst-Code} ausgeführt. + +Im Unterschied dazu führt +\Macro{IfIsAliaskomafont}\ChangedAt{v3.25}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}\and \Class{scrlttr2}} den +\PName{Dann-Code} nur aus, wenn \PName{Element} über +\DescRef{\LabelBase.cmd.aliaskomafont} als Alias für ein anderes Element +definiert wurde. Sowohl für nicht definierte Elemente als auch für mit +\DescRef{\LabelBase.cmd.newkomafont} definierte Elemente wird hingegen der +\PName{Sonst-Code} ausgeführt.% +\EndIndexGroup + + +\section{Absatzmarkierung} +\seclabel{parskip} + +Nicht nur, aber insbesondere aufgrund der erweiterten Möglichkeiten der +Absatzmarkierung bei den \KOMAScript-Klassen sollte auf die direkte Änderung +der Standardlängen \Length{parskip}\IndexLength{parskip}, +\Length{parindent}\IndexLength{parskip} und +\Length{parfillskip}\IndexLength{parskip} weitgehend verzichtet werden. + +\begin{Declaration} + \Macro{setparsizes}\Parameter{Einzug}\Parameter{Abstand} + \Parameter{Endzeilenleerraum} +\end{Declaration} +\KOMAScript{} bietet mit dieser Anweisung die Möglichkeit, sowohl den +Absatzeinzug als auch den Absatzabstand und den Freiraum am Ende der letzten +Zeile des Absatzes einzustellen. Diese Anweisung ist immer dann zu verwenden, +wenn die Änderungen auch bei Einstellung +\OptionValueRef{\LabelBase}{parskip}{relative} beachtet werden +sollen. \KOMAScript{}\textnote{Beispiel} selbst verwendet sie beispielsweise +in der Form +\begin{lstcode} + \setparsizes{0pt}{0pt}{0pt plus 1fil} +\end{lstcode} +um sowohl den Einzug als auch den Abstand abzuschalten und am Ende des +Absatzes beliebigen Freiraum zu erlauben. Eine solche Maßnahme ist sinnvoll, +wenn ein Absatz nur aus einer Box besteht, die ohne Abstand nach oben oder +unten gesetzt werden soll und die gesamte Spaltenbreite einnimmt. Soll +demgegenüber die Box nur die gesamte Breite einnehmen, jedoch mit der +aktuellen Einstellung bezüglich des Absatzabstandes gesetzt werden, so ist +\begin{lstcode} + \setlength{\parfillskip}{0pt plus 1fil} +\end{lstcode} +vorzuziehen. + +Eine\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} Neuberechnung\IndexCmd{activateareas} oder Reaktivierung +der Einstellungen für den Satzspiegel und die Ränder (siehe +\autoref{cha:typearea}) führt seit \KOMAScript~3.17 übrigens immer auch zu +einer Neueinstellung der via \Macro{setparsizes} gesetzten Werte, falls die +Werte nicht zwischenzeitlich geändert wurden. Dies sollte ein Grund mehr sein, +nicht an \KOMAScript{} vorbei die Einstellungen zu ändern. Die Neuberechnung +wird bei einer Kompatibilitätseinstellung zu einer früheren Version (siehe +\autoref{sec:maincls.compatibilityOptions}, +\DescPageRef{maincls.option.version}, Option +\DescRef{maincls.option.version}% +\IndexOption{version}\important{\OptionValueRef{maincls}{version}{3.17}}) +deaktiviert.% +% +\EndIndexGroup + +\section{Zähler} +\seclabel{counter} + +Zähler sind bei \LaTeX{} eine durchaus komplexere Angelegenheit, als dies auf +den ersten Blick erscheinen mag. Das gilt insbesondere, wenn die +Referenzierung von Zählern über \Macro{refstepcounter}, \Macro{label} und +\Macro{ref} mit betrachtet wird. + +\LoadNonFree{scrbookreportarticle-experts}{3} + +\section{Gliederung} +\seclabel{sections} + +Die \KOMAScript-Klassen bieten weitreichende Möglichkeiten, um Einfluss auf +die Gliederungsebenen und die zugehörigen Überschriften zu nehmen. Selbst die +Definition neuer Ebenen ist damit möglich. + +\begin{Declaration} + \Macro{DeclareSectionCommand}\OParameter{Einstellungen}\Parameter{Name} + \Macro{DeclareNewSectionCommand}\OParameter{Einstellungen}\Parameter{Name} + \Macro{RedeclareSectionCommand}\OParameter{Einstellungen}\Parameter{Name} + \Macro{ProvideSectionCommand}\OParameter{Einstellungen}\Parameter{Name} +\end{Declaration} +Diese\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} Anweisungen dienen dazu, einen neuen Gliederungsbefehl +\Macro{\PName{Name}} zu definieren beziehungsweise einen vorhandenen +Gliederungsbefehl \Macro{\PName{Name}} zu verändern. Dazu werden über das +optionale Argument \PName{Einstellungen} vorgenommen. Die +\PName{Einstellungen} sind dabei eine durch Komma separierte Liste von +\PName{Schlüssel}=\PName{Wert}-Zuweisungen. Neben den vom Stil der Überschrift +unabhängigen Eigenschaften, die +\autoref{tab:maincls-experts.declaresection.keys}, +\autopageref{tab:maincls-experts.declaresection.keys} zu entnehmen sind, gibt +es auch Eigenschaften, die vom jeweiligen Stil abhängig sind. Derzeit stehen +die folgenden Stile zur Verfügung: +\begin{description}\setkomafont{descriptionlabel}{} +\item[\PValue{part}] \ChangedAt{v3.18}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}}ist der + Stil\textnote{Gliederungsstil + \PValue{part}}\Index{Gliederung>Stil>~\PValue{part}} für + Teileüberschriften. Dieser Stil wird in der Voreinstellung für + \DescRef{maincls.cmd.part}\IndexCmd{part} und indirekt für + \DescRef{maincls.cmd.addpart}\IndexCmd{addpart} verwendet. Neue + Überschriften in diesem Stil können definiert werden, haben dann aber nicht + automatisch auch eine \Macro{add\dots}-Variante. Für die Konfiguration der + vorhandenen oder neuer Überschriften stehen zusätzlich die Eigenschaften aus + \autoref{tab:maincls-experts.declarepartstyle.keys}, + \autopageref{tab:maincls-experts.declarepartstyle.keys} zur + Verfügung. Die\textnote{Achtung!} Anweisung \DescRef{maincls.cmd.addpart} + wird ebenso wie die Sternformen automatisch zusammen mit + \DescRef{maincls.cmd.part} umkonfiguriert und kann nicht unabhängig davon + verändert werden. +\item[\PValue{chapter}] \ChangedAt{v3.18}{\Class{scrbook}\and + \Class{scrreprt}}ist der Stil\textnote{Gliederungsstil + \PValue{chapter}}\Index{Gliederung>Stil>~\PValue{chapter}} für + Kapitelüberschriften. Dieser Stil wird in der Voreinstellung für + \DescRef{maincls.cmd.chapter}\IndexCmd{chapter} und indirekt für + \DescRef{maincls.cmd.addchap}\IndexCmd{addchap} verwendet. Neue + Überschriften in diesem Stil können definiert werden, haben dann aber nicht + automatisch auch eine \Macro{add\dots}-Variante. Für die Konfiguration der + vorhandenen oder neuer Überschriften stehen zusätzlich die Eigenschaften aus + \autoref{tab:maincls-experts.declarechapterstyle.keys}, + \autopageref{tab:maincls-experts.declarechapterstyle.keys} zur + Verfügung. Die\textnote{Achtung!} Anweisung \DescRef{maincls.cmd.addchap} + wird ebenso wie die Sternformen automatisch zusammen mit + \DescRef{maincls.cmd.chapter} umkonfiguriert und kann nicht unabhängig davon + verändert werden. Es ist zu beachten, dass dieser Stil von + \Class{scrartcl}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} nicht + bereitgestellt wird. +\item[\PValue{section}] ist der Stil\textnote{Gliederungsstil + \PValue{section}}\Index{Gliederung>Stil>~\PValue{section}} für + Abschnittsüberschriften und tieferer Ebenen. Dieser Stil wird derzeit sowohl + für \DescRef{maincls.cmd.section}\IndexCmd{section}, + \DescRef{maincls.cmd.subsection}\IndexCmd{subsection}, + \DescRef{maincls.cmd.subsubsection}\IndexCmd{subsubsection} als auch + \DescRef{maincls.cmd.paragraph}\IndexCmd{paragraph} und + \DescRef{maincls.cmd.subparagraph}\IndexCmd{subparagraph} verwendet. Neue + Überschriften in diesem Stil können definiert werden. Für die Konfiguration + der vorhandenen oder neuer Überschriften stehen zusätzlich die Eigenschaften + aus \autoref{tab:maincls-experts.declaresectionstyle.keys}, + \autopageref{tab:maincls-experts.declaresectionstyle.keys} zur + Verfügung. Bei\ChangedAt{v3.24}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} der Neudefinition sind die \PName{Schlüssel} + \PValue{style}, \PValue{afterskip}, \PValue{beforeskip} und \PValue{level} + zwingend. Die \PName{Schlüssel} + \PValue{afterindent}\ChangedAt{v3.26}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}}, \PValue{font}, \PValue{indent} und + \PValue{runin} sind empfohlen. \PValue{tocindent} und \PValue{tocnumwidth} + können abhängig vom Namen der Gliederungsebene ebenfalls zwingend sein. Das + gilt auch, falls ein Befehl, der bisher kein Gliederungsbefehl war, mit + \Macro{RedeclareSectionCommand} zu einem Gliederungsbefehl umdefiniert + wird. Die\textnote{Achtung!} Anweisung \Macro{addsec} wird ebenso wie die + Sternformen zusammen mit \DescRef{maincls.cmd.section} umkonfiguriert und + kann nicht unabhängig davon verändert werden. +\end{description} + +\BeginIndexGroup% +\BeginIndex{FontElement}{\PName{Gliederungsebene}}% +\BeginIndex{FontElement}{\PName{Gliederungsebene}prefix}% +Bei der Definition eines Gliederungsbefehls wird ein gleichnamiges +Element\textnote{Elemente}% +\Index{Element=\UseIndex {gen}\protect\GuideFontElement} % Getrickst! +angelegt, falls es noch nicht existiert. Bei \PValue{chapter} und +\PValue{part} werden ebenso Elemente für die Präfixzeile erzeugt. Die +Schrifteinstellung der Elemente kann mit \DescRef{maincls.cmd.setkomafont} und +\DescRef{maincls.cmd.addtokomafont} (siehe \autoref{sec:maincls.textmarkup}, +\DescPageRef{maincls.cmd.setkomafont}) geändert werden.% +\EndIndexGroup + +\begin{table} + \caption[{Stil unabhängige Eigenschaften bei der Konfiguration von + Gliederungsbefehlen}]% + {Mögliche vom Stil der Überschrift unabhängige + \PName{Schlüssel} und \PName{Werte} für die \PName{Eigenschaften} bei der + Konfiguration von Gliederungsbefehlen}% + \label{tab:maincls-experts.declaresection.keys}% + \begin{tabularx}{\linewidth}{llX} + \toprule + \PName{Schlüssel} + & \PName{Wert} + & Bedeutung \\ + \midrule + \PValue{counterwithin} + & \PName{Zählername} + & Der zur Gliederungsebene gehörende Zähler soll vom als Wert angegebenen + Zähler abhängig sein. Wird \PName{Zählername} über \Macro{stepcounter} + oder \Macro{refstepcounter} erhöht, so wird der zur Gliederungsebene + gehörende Zähler auf 0 zurückgesetzt. Darüber hinaus wird + \Macro{the\PName{Zählername}}, gefolgt von einem Punkt in der Ausgabe + des zur Gliederungsebene gehörenden Zählers vorangestellt.\\ + \PValue{counterwithout}% + \ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + & \PName{Zählername} + & Hebt eine früher vorgenommene \PValue{counterwithin}-Einstellung auf und + ist daher nur bei Änderung vorhandener Gliederungsbefehle sinnvoll.\\ + \PValue{expandtopt} + & \PName{Schalter} + & Ist dieser Schalter aktiv, so werden alle in den \PName{Einstellungen} + nachfolgend angegebenen Werte für Längen vollständig expandiert, + ausgewertet und in \texttt{pt} umgerechnet gespeichert. Ist der + Schalter nicht aktiv, so werden alle nachfolgend angegebenen + Werte für Längen nur testweise expandiert und ausgewertet, aber + lediglich expandiert gespeichert. Es werden die Werte für einfache + Schalter aus \autoref{tab:truefalseswitch}, + \autopageref{tab:truefalseswitch} verstanden.\\ + \PValue{level} + & \PName{Ganzzahl} + & Numerischer Wert der Gliederungsebene (siehe Zähler + \DescRef{maincls.counter.secnumdepth}, \autoref{sec:maincls.structure}, + \DescPageRef{maincls.counter.secnumdepth}); der Wert sollte eindeutig + sein und ist für neue Ebenen zwingend.\\ + \PValue{style} + & \PName{Name} + & Legt den Stil der Überschrift fest und ist für neue Ebenen zwingend.\\ + \PValue{tocstyle}% + \ChangedAt{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + & \PName{Name} + & Legt den Stil des zur Überschrift gehörenden Verzeichniseintrags fest. + Es können alle bisher definierten Verzeichniseintragsstile (siehe + \autoref{sec:tocbasic.tocstyle}) verwendet werden. Ein leerer + \PName{Name} verhindert die Umdefinierung des Befehls + \Macro{l@\dots} für die Verzeichniseinträge.\\ + \PValue{toc\PName{Option}}% + \ChangedAt{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + & \PName{Wert} + & Weitere Optionen in Abhängigkeit vom via \Option{tocstyle} gewählten + Verzeichniseintragsstil. Siehe dazu \autoref{sec:tocbasic.tocstyle} ab + \autopageref{sec:tocbasic.tocstyle}. Für die von + \hyperref[cha:tocbasic]{\Package{tocbasic}} vordefinierten + Verzeichniseintragsstile finden sich die als \PName{Option} verwendbaren + Attribute in \autoref{tab:tocbasic.tocstyle.attributes}, ab + \autopageref{tab:tocbasic.tocstyle.attributes}.\\ + % \PValue{tocindent} + % & \PName{Länge} + % & Der horizontale Einzug des zum Gliederungsbefehls gehörenden + % Eintrags ins Inhaltsverzeichnis, falls ein solcher abhängig von + % \DescRef{maincls.counter.tocdepth} (siehe \autoref{sec:maincls.toc}, + % \DescPageRef{maincls.counter.tocdepth}) erzeugt wird.\\ + % \PValue{toclevel} + % & \PName{Ganzzahl} + % & Die Ebene des zum Gliederungsbefehl gehörenden Eintrags ins + % Inhaltsverzeichnis, falls diese von \PValue{level} abweichen soll + % (siehe auch \DescRef{maincls.counter.tocdepth} in + % \autoref{sec:maincls.toc}, \DescPageRef{maincls.counter.tocdepth}). \\ + % PValue{tocnumwidth} + % & \PName{Länge} + % & Die Breite, die für die Gliederungsnummer im zum Gliederungsbefehl + % gehörenden Eintrag ins Inhaltsverzeichnis reserviert wird.\\ + \bottomrule + \end{tabularx} +\end{table} + +\begin{table} + \caption[{Eigenschaften des Stils \PValue{part} bei der Konfiguration von + Gliederungsbefehlen}]{Zusätzliche \PName{Schlüssel} und \PName{Werte} für + die \PName{Eigenschaften} bei der Konfiguration von Gliederungsbefehlen des + Stils \PValue{part}\Index{Gliederung>Stil>~\PValue{part}}}% + \label{tab:maincls-experts.declarepartstyle.keys}% + \begin{tabularx}{\linewidth}{llX} + \toprule + \PName{Schlüssel} + & \PName{Wert} + & Bedeutung \\ + \midrule + \PValue{afterindent}% + \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + & \PName{Schalter} + & Es wird bestimmt, ob auf die erste Zeile nach der + Überschrift der aktuelle Absatzeinzug angewendet + wird. Bei der Einstellung \PValue{bysign} bestimmt das Vorzeichen von + \PValue{beforeskip} das Verhalten. Ein negativer Wert für + \PValue{beforeskip} bewirkt dann, dass der Absatzeinzug entfällt. Mit + den Werten für einfache Schalter (siehe \autoref{tab:truefalseswitch}, + \autopageref{tab:truefalseswitch}) kann die Anwendung des aktuellen + Absatzeinzugs explizit aktiviert oder deaktiviert werden. Aus + Kompatibilitätsgründen ist die Voreinstellung + für \Class{scrartcl} \PValue{false}, für \Class{scrbook} und + \Class{scrreprt} \PValue{true}.\\ + \PValue{afterskip} + & \PName{Länge} + & Der Betrag gibt den vertikalen Abstand nach der Überschrift an.\\ + \PValue{beforeskip} + & \PName{Länge} + & Gibt den vertikalen Abstand vor der Überschrift an. Ist + \OptionValue{afterindent}{bysign}, so wird für den Abstand der Betrag + von \PName{Länge} verwendet. Es wird also trotzdem ein positiver + Abstand eingefügt. Negative Werte bedeuten in diesem Fall, dass ein + Absatzeinzug nach der Überschrift entfällt.\\ + \PValue{font} + & \PName{Befehle} + & Die Schrifteinstellungen, die zusätzlich zum Element + \DescRef{maincls.fontelement.disposition} bei der Ausgabe des + Textes der Überschrift verwendet werden sollen. Hier sind alle + \PName{Befehle} erlaubt, die auch über \DescRef{maincls.cmd.setkomafont} + und \DescRef{maincls.cmd.addtokomafont} für das Element des + Gliederungsbefehls erlaubt sind.\\ + \PValue{innerskip} + & \PName{Länge} + & %\OnlyAt{\Class{scrbook}\and \Class{scrreprt}}% + Der vertikale Abstand zwischen Präfixzeile und Text der Überschrift bei + \Class{scrbook} und \Class{scrreprt}.\\ + \PValue{pagestyle} + & \PName{Seitenstil} + & %\OnlyAt{\Class{scrbook}\and \Class{scrreprt}}% + Der Name des Seitenstils, der für die Seite mit der Überschrift + verwendet werden soll. Es findet keine Überprüfung statt, ob der + angegebene \PName{Seitenstil} gültig ist. Fehlerhafte Angaben führen + daher zu Fehlermeldungen bei Verwendung des Gliederungsbefehls. Diese + Möglichkeit existiert nur bei \Class{scrbook} und \Class{scrreprt}. \\ + \PValue{prefixfont} + & \PName{Befehle} + & Die Schrifteinstellungen, die zusätzlich zum Element + \DescRef{maincls.fontelement.disposition} ab der Ausgabe einer + Präfixzeile oder Nummer in der Überschrift verwendet werden sollen. Hier + sind alle \PName{Befehle} erlaubt, die + auch über \DescRef{maincls.cmd.setkomafont} und + \DescRef{maincls.cmd.addtokomafont} für das Element der Präfixzeile des + Gliederungsbefehls erlaubt sind.\\ + \bottomrule + \end{tabularx} +\end{table} + +\begin{table} + \caption[{Eigenschaften des Stils \PValue{chapter} bei der Konfiguration von + Gliederungsbefehlen}]{Zusätzliche \PName{Schlüssel} und \PName{Werte} für + die \PName{Eigenschaften} bei der Konfiguration von Gliederungsbefehlen des + Stils \PValue{chapter}\Index{Gliederung>Stil>~\PValue{chapter}}}% + \label{tab:maincls-experts.declarechapterstyle.keys}% + \begin{tabularx}{\linewidth}{llX} + \toprule + \PName{Schlüssel} & \PName{Wert} & Bedeutung \\ + \midrule + \PValue{afterindent}% + \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}}% + & \PName{Schalter} + & Es wird bestimmt, ob auf die erste Zeile nach der Überschrift der + aktuelle Absatzeinzug angewendet wird. Bei der Voreinstellung + \PValue{bysign} bestimmt das Vorzeichen von \PValue{beforeskip} das + Verhalten. Ein negativer Wert für \PValue{beforeskip} bewirkt dann, dass + der Absatzeinzug entfällt. Mit den Werten für einfache Schalter (siehe + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}) kann + die Anwendung des aktuellen Absatzeinzugs explizit aktiviert oder + deaktiviert werden.\\ + \PValue{afterskip}% + \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}}% + & \PName{Länge} + & Gibt den vertikalen Abstand nach der Überschrift an.\\ + \PValue{beforeskip} + & \PName{Länge} + & Gibt den vertikalen Abstand vor der Überschrift an. Ist + \OptionValue{afterindent}{bysign}, so wird für den Abstand der Betrag + von \PName{Länge} verwendet. Es wird also trotzdem ein positiver + Abstand eingefügt. Negative Werte bedeuten in diesem Fall, dass ein + Absatzeinzug nach der Überschrift entfällt.\\ + \PValue{font} + & \PName{Befehle} + & Die Schrifteinstellungen, die zusätzlich zum Element + \DescRef{maincls.fontelement.disposition} bei der Ausgabe der + Überschrift verwendet werden sollen. Hier sind alle \PName{Befehle} + erlaubt, die auch über \DescRef{maincls.cmd.setkomafont} und + \DescRef{maincls.cmd.addtokomafont} für das Element des + Gliederungsbefehls erlaubt sind.\\ + \PValue{innerskip} + & \PName{Länge} + & Der vertikale Abstand zwischen Präfixzeile und Text der + Überschrift, falls eine Präfixzeile verwendet wird.\\ + \PValue{pagestyle} + & \PName{Seitenstil} + & Der Name des Seitenstils, der für die Seite mit der Überschrift + verwendet werden soll. Es findet keine Überprüfung statt, ob der + angegebene \PName{Seitenstil} gültig ist. Fehlerhafte Angaben führen + daher zu Fehlermeldungen bei Verwendung des Gliederungsbefehls.\\ + \PValue{prefixfont} + & \PName{Befehle} + & Die Schrifteinstellungen, die zusätzlich zum Element + \DescRef{maincls.fontelement.disposition} und dem Element des + Gliederungsbefehls bei der Ausgabe einer Präfixzeile in der Überschrift + verwendet werden sollen. Hier sind alle \PName{Befehle} erlaubt, die + auch über \DescRef{maincls.cmd.setkomafont} und + \DescRef{maincls.cmd.addtokomafont}für das Element der Präfixzeile des + Gliederungsbefehls erlaubt sind.\\ + \bottomrule + \end{tabularx} +\end{table} + +\begin{table} + \caption[{Eigenschaften des Stils \PValue{section} bei der Konfiguration von + Gliederungsbefehlen}]{Zusätzliche \PName{Schlüssel} und \PName{Werte} für + die \PName{Eigenschaften} bei der Konfiguration von Gliederungsbefehlen des + Stils \PValue{section}\Index{Gliederung>Stil>~\PValue{section}}}% + \label{tab:maincls-experts.declaresectionstyle.keys}% + \begin{tabularx}{\linewidth}{llX} + \toprule + \PName{Schlüssel} & \PName{Wert} & Bedeutung \\ + \midrule + \PValue{afterindent}% + \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + & \PName{Schalter} + & Es wird bestimmt, ob auf die erste Zeile nach einer frei stehenden + Überschrift (siehe \PValue{runin}) der aktuelle Absatzeinzug angewendet + wird. Bei der Voreinstellung \PValue{bysign} bestimmt das Vorzeichen von + \PValue{beforeskip} das Verhalten. Ein negativer Wert für + \PValue{beforeskip} bewirkt dann, dass der Absatzeinzug entfällt. Mit + den Werten für einfache Schalter (siehe \autoref{tab:truefalseswitch}, + \autopageref{tab:truefalseswitch}) kann die Anwendung des aktuellen + Absatzeinzugs explizit aktiviert oder deaktiviert werden.\\ + \PValue{afterskip} + & \PName{Länge} + & Im Fall einer Spitzmarke (siehe \PValue{runin}) ist der Betrag der + \PName{Länge} der horizontale Abstand nach der Überschrift. Es + wird in diesem Fall also immer ein positiver Abstand eingefügt. Im Fall + einer frei stehenden Überschrift ist \PName{Länge} der vertikale Abstand + nach der Überschrift. Ist \OptionValue{runin}{bysign}, so + führt ein positiver Wert zu einer frei stehenden Überschrift, während + ein negativer Wert oder Null zu einer Spitzmarke führt.\\ + \PValue{beforeskip} + & \PName{Länge} + & Gibt den vertikalen Abstand vor der Überschrift an. Ist + \OptionValue{afterindent}{bysign}, so wird für den Abstand der Betrag + von \PName{Länge} verwendet. Es wird also trotzdem ein positiver + Abstand eingefügt. Negative Werte bedeuten in diesem Fall, dass ein + Absatzeinzug nach der Überschrift entfällt.\\ + \PValue{font} + & \PName{Befehle} + & Die Schrifteinstellungen, die zusätzlich zum Element + \DescRef{maincls.fontelement.disposition} bei der Ausgabe der + Überschrift verwendet werden sollen. Hier sind alle \PName{Befehle} + erlaubt, die auch über \DescRef{maincls.cmd.setkomafont} und + \DescRef{maincls.cmd.addtokomafont} für das Element des + Gliederungsbefehls erlaubt sind.\\ + \PValue{indent} + & \PName{Länge} + & Einzug vom linken Rand vor der Ausgabe der Nummer und des Textes + der Überschrift.\\ + \PValue{runin}% + \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + & \PName{Schalter} + & Es wird bestimmt, ob die Überschrift als Spitzmarke\iffree{ (am + Zeilenanfang)}{} oder frei stehend gesetzt wird. \iffree{}{Bei einer + Spitzmarke schließt sich der nachfolgende Text direkt an die + Überschrift an, während bei einer frei stehenden Überschrift erst noch + ein Absatz und ein vertikaler Abstand (siehe \PValue{afterskip}) + folgen. }% + Bei der Voreinstellung \PValue{bysign} bestimmt das Vorzeichen von + \PValue{afterskip} das Verhalten. Ein positiver Wert für + \PValue{afterskip} bewirkt dann eine frei stehende Überschrift. + Darüber hinaus kann mit den Werten für einfache Schalter (siehe + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}) + eine Spitzmarke explizit aktiviert oder deaktiviert werden.\\ + \bottomrule + \end{tabularx} +\end{table} + +\Macro{DeclareNewSectionCommand}\textnote{Neudefinition} dient der Definition +eines neuen Gliederungsbefehls. Ist derselbe \PName{Name} von \TeX{} bereits +anderweitig belegt, so wird ein Fehler ausgegeben und es findet keine +Umdefinierung statt. + +\Macro{ProvideSectionCommand}\textnote{bedingte Definition} verhält sich +ähnlich, gibt aber keine Fehlermeldung aus, wenn der Gliederungsbefehl bereits +existiert. Es findet dann nur keine Umdefinierung statt. + +\Macro{RedeclareSectionCommand}\textnote{Änderung} kann hingegen nur verwendet +werden, um eine existierende Anweisung zu einem Gliederungsbefehl mit den +angegebenen \PName{Eigenschaften} zu ändern. Dabei wird nicht überprüft, ob +\Macro{\PName{Name}} bereits zuvor ein Gliederungsbefehl war. Es muss nur ein +von \TeX{} bereits belegter \PName{Name} sein. + +Bei \Macro{DeclareSectionCommand}\textnote{unbedingte Definition} findet +keinerlei Überprüfung statt, ob \PName{Name} von \TeX{} bereits anderweitig +belegt ist. Stattdessen wird der Gliederungsbefehl \Macro{\PName{Name}} +unbedingt entsprechend der angegebenen \PName{Eigenschaften} definiert. + +Zu jeder Gliederungsanweisung gehört außerdem ein Zähler: \PName{Name}, der +bei Bedarf von allen vier Befehlen mit \Macro{newcounter} neu angelegt +wird. Dasselbe gilt für die Ausgabe des Zählers: \Macro{the\PName{Name}}, die +Formatierung des Zählers: \Macro{\PName{Name}format}, die Anweisung zur +Erstellung eines Kolumnentitels: \Macro{\PName{Name}mark}, die dabei +verwendete Formatierung des Zählers: \Macro{\PName{Name}markformat}, die oben +erwähnten Elemente: \FontElement{\PName{Name}} und gegebenenfalls +\FontElement{\PName{Name}prefix}, die numerische Gliederungsebene: +\Macro{\PName{Name}numdepth}. Die Anweisung \Macro{\PName{Name}mark} wird +gegebenenfalls so vordefiniert, dass kein Kolumnentitel erzeugt wird. Die +Ausgabe des Zählers, \Macro{the\PName{Name}}, wird als arabische Zahl +vordefiniert. Wird über den \PName{Schlüssel} \PValue{counterwithin} der +Zähler als von einem anderen Zähler abhängig definiert, so wird in der Ausgabe +dieser andere Zähler mit einem Punkt getrennt vorangestellt. + +Neben\ChangedAt[2016/03]{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} dem Gliederungsbefehl selbst wird auch ein Befehl für +einen Eintrag ins Inhaltsverzeichnis definiert. Dafür wird auf das Paket +\hyperref[cha:tocbasic]{\Package{tocbasic}}% +\important{\hyperref[cha:tocbasic]{\Package{tocbasic}}}\IndexPackage{tocbasic} +zurückgegriffen. Der Stil des Verzeichniseintrags wird über die Eigenschaft +\PValue{tocstyle} festgelegt. Wird hier mit \OptionValue{tocstyle}{} oder +\OptionValue{tocstyle}{\{\}} ein leerer \PName{Name} angegeben, so erfolgt +keine Umdefinierung des Befehls für den Verzeichniseintrag. Das ist +beispielsweise dann wichtig, wenn Sie ein zusätzliches Paket zur Modifikation +des Inhaltsverzeichnisses verwenden. Fehlt die Eigenschaft \PValue{tocstyle}, +so wird bei der Umdefinierung der bisherige Stil erneut verwendet. + +Unterschiedliche\ChangedAt[2016/03]{v3.20}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} Stile für Verzeichniseinträge haben +unterschiedliche zusätzliche Eigenschaften. Diese können, mit dem Präfix +\PValue{toc} versehen, direkt mit angegeben werden. So kann beispielsweise die +Ebene des Verzeichniseintrags, die bei allen von den \KOMAScript-Klassen und +\hyperref[cha:tocbasic]{\Package{tocbasic}} definierten Stilen als Eigenschaft +\PValue{level} bekannt ist, mit \PValue{toclevel} gesetzt werden, der Einzug +des Eintrags, \PValue{indent}, über \PValue{tocindent} und die für die Nummer +reservierte Breite, \PValue{numwidth}, mit \PValue{tocnumwidth}. Für weitere +Eigenschaften der Verzeichniseinträge siehe \autoref{sec:tocbasic.tocstyle} ab +Seite \autopageref{sec:tocbasic.tocstyle}. + +\begin{Example} + Aus unerfindlichen Gründen sollen die Überschriften von + \DescRef{maincls.cmd.paragraph} nicht mehr als Spitzmarken, sondern als + Überschriften ähnlich \DescRef{maincls.cmd.subsubsection} umdefiniert + werden. Dabei soll über der Überschrift ein kleiner Abstand von 10\,pt und + unter der Überschrift kein zusätzlicher Abstand eingefügt werden. Das wäre + bereits mit +\begin{lstcode} + \RedeclareSectionCommand[% + beforeskip=-10pt,% + afterskip=1sp% + ]{paragraph} +\end{lstcode} + möglich. Durch den negativen Wert bei \PValue{beforeskip} wird der vertikale + Abstand über der Überschrift erzeugt und gleichzeitig der Einzug des ersten + Abschnitts nach der Überschrift abgeschaltet. Obwohl eigentlich nach der + Überschrift kein vertikaler Abstand gewünscht wird, wurde als Wert hier + 1\,sp angegeben. Der Grund ist einfach: Einen Wert von 0\,pt betrachtet + \TeX{} nicht als positiven Wert und \Macro{RedeclareSectionCommand} erzeugt + damit unter Berücksichtigung der Voreinstellung \OptionValue{runin}{bysign} + eine Überschrift in Form einer Spitzmarke. Der kleinste positive Wert + ist 1\,sp. Natürlich könnte man stattdessen auch explizit die Verwendung von + Spitzmarken aktivieren und dann wirklich einen Wert von 0\,pt einstellen: +\begin{lstcode} + \RedeclareSectionCommand[% + beforeskip=-10pt,% + runin=true,% + afterskip=0pt% + ]{paragraph} +\end{lstcode} + + In der Regel ist es für den vertikalen Ausgleich (siehe + \DescRef{maincls.cmd.flushbottom}, \autoref{sec:maincls.typearea}, + \DescPageRef{maincls.cmd.flushbottom}) besser, wenn man die Abstände + mit etwas Spielraum, dem sogenannten Leim, versieht: +\begin{lstcode} + \RedeclareSectionCommand[% + beforeskip=-10pt plus -2pt minus -1pt,% + runin=true,% + afterskip=0pt% + ]{paragraph} +\end{lstcode} + Dabei ist zu beachten, dass natürlich auch der Leim bei der Anwendung als + vertikaler Abstand das Vorzeichen wechselt, also bei \PValue{beforeskip} im + Beispiel negativ angegeben wird. Auch diese Überlegung kann man sich jedoch + sparen, indem man den Erstzeileneinzug nach der Überschrift nicht über das + Vorzeichen von \Option{beforeskip} steuert, sondern über + \Option{afterindent}: +\begin{lstcode} + \RedeclareSectionCommand[% + afterindent=false,% + beforeskip=10pt plus 2pt minus 1pt,% + runin=true,% + afterskip=0pt% + ]{paragraph} +\end{lstcode} +\end{Example} + +Dass im Beispiel nur die Schlüssel verwendet werden mussten, deren Einstellung +geändert werden soll, liegt daran, dass seit \KOMAScript{} 3.15 +\DescRef{maincls.cmd.paragraph} intern bereits mit +\Macro{DeclareSectionCommand} definiert wird. Alle anderen Einstellungen +aus der Originaldefinition bleiben so enthalten. Bei +\Class{scrartcl}\OnlyAt{scrartcl} entspräche dies der Definition: +\begin{lstcode} + \DeclareSectionCommand[% + level=4, + indent=0pt, + afterindent=bysign, + runin=bysign, + beforeskip=3.25ex plus 1ex minus .2ex, + afterskip=-1em, + font={}, + tocindent=7em, + tocnumwidth=4.1em, + counterwithin=subsubsection + ]{paragraph} +\end{lstcode} + +% Umbruchkorrektur: Tabelle verschoben +\begin{table} + %\centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + % \caption + \begin{captionbeside} + [{Voreinstellungen für die Kapitelüberschriften von \Class{scrbook} + und \Class{scrreprt} in Abhängigkeit von Option + \DescRef{maincls.option.headings}}] + {\hskip 0pt plus .5em + Voreinstellungen für die Kapitelüberschriften von \Class{scrbook} + und \Class{scrreprt} in Abhängigkeit von Option + \DescRef{maincls.option.headings}% + \label{tab:maincls.chapter.skips}} + [l] + \begin{tabular}[t]{ll} + \multicolumn{2}{@{}l}{\bfseries Mit \OptionValueRef{maincls}{headings}{big}:}\\ + \toprule + Einstellung & voreingestellter Wert \\ + \midrule + \PValue{afterskip} + & \PValue{1.725\Length{baselineskip} plus .115\Length{baselineskip}} \\ + & \PValue{\phantom{1.725\Length{baselineskip}} + minus .192\Length{baselineskip}} \\ + \PValue{beforeskip} + & \PValue{-3.3\Length{baselineskip}-\Length{parskip}} \\ + \PValue{font} & \Macro{huge} \\ + \bottomrule\\ + \multicolumn{2}{@{}l}{\bfseries Mit \OptionValueRef{maincls}{headings}{normal}:}\\ + \toprule + Einstellung & voreingestellter Wert \\ + \midrule + \PValue{afterskip} + & \PValue{1.5\Length{baselineskip} plus .1\Length{baselineskip}} \\ + & \PValue{\phantom{1.5\Length{baselineskip}} + minus .167\Length{baselineskip}} \\ + \PValue{beforeskip} + & \PValue{-3\Length{baselineskip}-\Length{parskip}} \\ + \PValue{font} & \Macro{LARGE} \\ + \bottomrule\\ + \multicolumn{2}{@{}l}{\bfseries Mit \OptionValueRef{maincls}{headings}{small}:}\\ + \toprule + Einstellung & voreingestellter Wert \\ + \midrule + \PValue{afterskip} + & \PValue{1.35\Length{baselineskip} plus .09\Length{baselineskip}} \\ + & \PValue{\phantom{1.35\Length{baselineskip}} + minus .15\Length{baselineskip}} \\ + \PValue{beforeskip} + & \PValue{-2.8\Length{baselineskip}-\Length{parskip}} \\ + \PValue{font} & \Macro{Large} \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} + +Die Werte für \Class{scrreprt} und \Class{scrbook}\OnlyAt{\Class{scrbook}\and + \Class{scrreprt}} weichen teilweise ab. Für \DescRef{maincls.cmd.chapter} +sind einige Einstellungen für die Überschriften von Option +\DescRef{maincls.option.headings} (siehe \autoref{sec:maincls.structure}, +\DescPageRef{maincls.option.headings}) abhängig. Diese abhängigen +Einstellungen sind in \autoref{tab:maincls.chapter.skips} zu finden. Eine +Übersicht über alle Voreinstellungen bietet +\autoref{tab:maincls.section.defaults}. Es ist zu beachten, dass dabei +\PValue{1ex} und \Length{baselineskip} von der voreingestellten Größe der +Überschrift beziehungsweise des Inhaltsverzeichniseintrags abhängig +sind. Weitere Voreinstellungen\ChangedAt[2016/03]{v3.20}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} für die Stile der Verzeichniseinträge +sind \autoref{sec:tocbasic.tocstyle}% +\important{\hyperref[cha:tocbasic]{\Package{tocbasic}}} ab +\autopageref{sec:tocbasic.tocstyle} zu entnehmen. + +Das in den Einstellungen für \DescRef{maincls.cmd.subparagraph} verwendete +interne Makro \Macro{scr@parindent} ist übrigens, der per Option +\DescRef{maincls.option.parskip} oder Befehl +\DescRef{maincls-experts.cmd.setparsizes} eingestellte Absatzeinzug.% +% Umbruchkorrektur: longtable verschoben +% begin{table} +% \centering + \begin{longtable}{@{}p{\columnwidth}@{}} + \caption{Voreinstellungen für die Formatierung der Überschriften von + \Class{scrbook} und \Class{scrreprt}}% + \label{tab:maincls.section.defaults}\\ + \endfirsthead + \caption[]{Voreinstellungen für die Formatierung der Überschriften von + \Class{scrbook} und + \Class{scrreprt} \emph{(Fortsetzung)}}\\ + \addlinespace[-\normalbaselineskip] \endhead + \raggedleft\dots\\ + \endfoot \endlastfoot + \DescRef{maincls.cmd.part}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Einstellung & voreingestellter Wert \\ + \midrule + \PValue{afterskip} & \PValue{0pt plus 1fil} \\ + \PValue{beforeskip} & \PValue{0pt plus 1fil + \Length{baselineskip}} \\ + \PValue{font} & siehe \DescRef{maincls.fontelement.part}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{innerskip} & \PValue{20pt} \\ + \PValue{level} & -1 \\ + \PValue{prefixfont} & siehe + \DescRef{maincls.fontelement.partnumber}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{tocindent} & \PValue{0pt} \\ + \PValue{toclevel} & -1 \\ + \PValue{tocnumwidth} & \PValue{2em} \\ + \PValue{tocstyle} & \PValue{part} \\ + \bottomrule + \end{tabularx} \\ + \addlinespace[\normalbaselineskip] + \DescRef{maincls.cmd.chapter}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Einstellung & voreingestellter Wert \\ + \midrule + \PValue{afterskip} & siehe \autoref{tab:maincls.chapter.skips} \\ + \PValue{beforeskip} & siehe \autoref{tab:maincls.chapter.skips} \\ + \PValue{font} & siehe \DescRef{maincls.fontelement.chapter}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{innerskip} & \PValue{0.5\Length{baselineskip}} \\ + \PValue{level} & 0 \\ + \PValue{prefixfont} & siehe + \DescRef{maincls.fontelement.chapterprefix}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{tocindent} & \PValue{0pt} \\ + \PValue{toclevel} & 0 \\ + \PValue{tocnumwidth} & \PValue{1.5em} \\ + \PValue{tocstyle} & \PValue{chapter} \\ + \bottomrule + \end{tabularx} \\ + \addlinespace[\normalbaselineskip] + \DescRef{maincls.cmd.section}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Einstellung & voreingestellter Wert \\ + \midrule + \PValue{afterskip} & \PValue{2.3ex plus .2ex} \\ + \PValue{beforeskip} & \PValue{-3.5ex plus -1ex minus -.2ex} \\ + \PValue{font} & siehe \DescRef{maincls.fontelement.section}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{indent} & \PValue{0pt} \\ + \PValue{level} & 1 \\ + \PValue{tocindent} & \PValue{1.5em}\\ + \PValue{toclevel} & 1 \\ + \PValue{tocnumwidth} & \PValue{2.3em}\\ + \PValue{tocstyle} & \PValue{section} \\ + \bottomrule + \end{tabularx} \\ + \addlinespace[\normalbaselineskip] + \DescRef{maincls.cmd.subsection}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Einstellung & voreingestellter Wert \\ + \midrule\nopagebreak + \PValue{afterskip} & \PValue{1.5ex plus .2ex} \\ + \PValue{beforeskip} & \PValue{-3.25ex plus -1ex minus -.2ex} \\ + \PValue{font} & siehe + \DescRef{maincls.fontelement.subsection}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{indent} & \PValue{0pt} \\ + \PValue{level} & 2 \\ + \PValue{tocindent} & \PValue{3.8em}\\ + \PValue{toclevel} & 2 \\ + \PValue{tocnumwidth} & \PValue{3.2em}\\ + \PValue{tocstyle} & \PValue{section} \\ + \bottomrule + \end{tabularx} \\ + \addlinespace[\normalbaselineskip] + \DescRef{maincls.cmd.subsubsection}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Einstellung & voreingestellter Wert \\ + \midrule\nopagebreak + \PValue{afterskip} & \PValue{1.5ex plus .2ex} \\ + \PValue{beforeskip} & \PValue{-3.25ex plus -1ex minus -.2ex} \\ + \PValue{font} & siehe + \DescRef{maincls.fontelement.subsubsection}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{indent} & \PValue{0pt} \\ + \PValue{level} & 3 \\ + \PValue{tocindent} & \PValue{7.0em}\\ + \PValue{toclevel} & 3 \\ + \PValue{tocnumwidth} & \PValue{4.1em}\\ + \PValue{tocstyle} & \PValue{section} \\ + \bottomrule + \end{tabularx} \\ + \addlinespace[\normalbaselineskip] + \DescRef{maincls.cmd.paragraph}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Einstellung & voreingestellter Wert \\ + \midrule\nopagebreak + \PValue{afterskip} & \PValue{-1em} \\ + \PValue{beforeskip} & \PValue{3.25ex plus 1ex minus .2ex} \\ + \PValue{font} & siehe + \DescRef{maincls.fontelement.paragraph}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{indent} & \PValue{0pt} \\ + \PValue{level} & 4 \\ + \PValue{tocindent} & \PValue{10em}\\ + \PValue{toclevel} & 4 \\ + \PValue{tocnumwidth} & \PValue{5em}\\ + \PValue{tocstyle} & \PValue{section} \\ + \bottomrule + \end{tabularx} \\ + \addlinespace[\normalbaselineskip] + \DescRef{maincls.cmd.subparagraph}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Einstellung & voreingestellter Wert \\ + \midrule\nopagebreak + \PValue{afterskip} & \PValue{-1em} \\ + \PValue{beforeskip} & \PValue{3.25ex plus 1ex minus .2ex} \\ + \PValue{font} & siehe + \DescRef{maincls.fontelement.subparagraph}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{indent} & \Macro{scr@parindent} \\ + \PValue{level} & 5 \\ + \PValue{tocindent} & \PValue{12em}\\ + \PValue{toclevel} & 5 \\ + \PValue{tocnumwidth} & \PValue{6em}\\ + \PValue{tocstyle} & \PValue{section} \\ + \bottomrule + \end{tabularx} + \end{longtable} +%end{table} +\EndIndexGroup + + +\begin{Declaration} + \Macro{DeclareSectionCommands}\OParameter{Einstellungen}% + \Parameter{Namensliste} + \Macro{DeclareNewSectionCommands}\OParameter{Einstellungen}% + \Parameter{Namensliste} + \Macro{RedeclareSectionCommands}\OParameter{Einstellungen}% + \Parameter{Namensliste} + \Macro{ProvideSectionCommands}\OParameter{Einstellungen}% + \Parameter{Namensliste} +\end{Declaration} +Diese\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} Anweisungen können gleich eine ganze Reihe von +Gliederungsbefehlen definieren oder ändern. Dabei ist \PName{Namensliste} eine +durch Komma separierte Liste von Namen der Gliederungsbefehle. + +Die Befehle unterscheiden sich in zwei weiteren Punkten von den zuvor +erklärten Anweisungen zur Definition oder Änderung eines einzelnen +Gliederungsbefehls. Zum einen wird im Fehlerfall\textnote{Fehlerbehandlung}, +also wenn eine Anweisung bei \Macro{DeclareNewSectionCommands} bereits zuvor +existierte oder bei \Macro{RedeclareSectionCommands} noch nicht existierte, +die Definition dennoch vorgenommen. Ein entsprechender Fehler wird natürlich +trotzdem gemeldet. Zum anderen gibt es eine weitere Einstellung: +\important{\PValue{increaselevel}}\OptionVName{increaselevel}{Ganzzahl}. +Damit ändert sich die Bedeutung von \PValue{level} und \PValue{toclevel} +(siehe \autoref{tab:maincls-experts.declaresection.keys}, +\autopageref{tab:maincls-experts.declaresection.keys}) dahingehend, dass deren +Werte lediglich als \PName{Einstellungen} des ersten Gliederungsbefehls aus +der \PName{Namensliste} dienen. Für alle weiteren Gliederungsbefehle werden +die Werte von \PValue{level} und \PValue{toclevel} um den Wert von +\PValue{increaselevel} erhöht. Wurde die Einstellung \PValue{increaselevel} +ohne Wertzuweisung verwendet, so wird der Wert 1 angenommen.% +\EndIndexGroup + + +\begin{Declaration}[0] + \Macro{IfSectionCommandStyleIs}\Parameter{Name}\Parameter{Stil} + \Parameter{Dann-Code}\Parameter{Sonst-Code} +\end{Declaration} +In\ChangedAt{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} +seltenen Fällen ist es nützlich, testen zu können, ob ein Gliederungsbefehl +einem bestimmten \PName{Stil} angehört. Ist der mittels \PName{Name} bestimmte +Gliederungsbefehl aus \KOMAScript-Sicht derzeit mit dem angebenen \PName{Stil} +definiert, so wird der \PName{Dann-Code} ausgeführt, anderenfalls der +\PName{Sonst-Code}. Ist \Macro{\PName{Name}} nicht definiert oder kein mit +\KOMAScript-Mitteln definierter Gliederungsbefehl, so wird dies als Fehler +gemeldet.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{chapterheadstartvskip} + \Macro{chapterheadmidvskip} + \Macro{chapterheadendvskip} + \Macro{partheadstartvskip} + \Macro{partheadmidvskip} + \Macro{partheadendvskip} + \Macro{partheademptypage} +\end{Declaration} +Diese\important[i]{\DescRef{maincls.cmd.chapter}\\ + \DescRef{maincls.cmd.part}\\ + \DescRef{maincls.cmd.addchap}\\ + \DescRef{maincls.cmd.addpart}\\ + \DescRef{maincls.cmd.chapter*}\\ + \DescRef{maincls.cmd.part*}\\ + \DescRef{maincls.cmd.addchap*}\\ + \DescRef{maincls.cmd.addpart*}} Anweisungen werden innerhalb von +Überschriften der zuvor erklärten Stile \PValue{chapter} und \PValue{part} und +damit für die Definition der Überschriften +\DescRef{maincls.cmd.chapter}\IndexCmd{chapter}, +\DescRef{maincls.cmd.part}\IndexCmd{part}, +\DescRef{maincls.cmd.addchap}\IndexCmd{addchap}, +\DescRef{maincls.cmd.addpart}\IndexCmd{addpart} und deren Sternvarianten +\DescRef{maincls.cmd.chapter*}\IndexCmd{chapter*}, +\DescRef{maincls.cmd.part*}\IndexCmd{part*}, +\DescRef{maincls.cmd.addchap*}\IndexCmd{addchap*}, +\DescRef{maincls.cmd.addpart*}\IndexCmd{addpart*} verwendet. Dabei ist +\Macro{chapterheadstartvskip} eine Anweisung, die dafür vorgesehen ist, vor +der Kapitelüberschrift einen vertikalen Abstand einzufügen. Entsprechend ist +\Macro{chapterheadendvskip} eine Anweisung, die dafür vorgesehen ist, nach der +Kapitelüberschrift einen vertikalen Abstand +einzufügen. Bei\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}} +Kapitelüberschriften mit eigener Nummernzeile (siehe Option +\DescRef{maincls.option.chapterprefix} in \autoref{sec:maincls.structure}, +\DescPageRef{maincls.option.chapterprefix}) wird zwischen der Nummernzeile und +der eigentlichen Überschrift außerdem \Macro{chapterheadmidvskip} ausgeführt. + +Für das Einfügen der vertikalen Abstände über und unter Teile-Überschriften +sind die Anweisungen \Macro{partheadstartvskip} und \Macro{partheadendvskip} +vorgesehen. Dabei wird ein Seitenumbruch als Teil des vertikalen Abstandes +interpretiert. Ein solcher Seitenumbruch ist in der Voreinstellung sowohl bei +\Class{scrbook}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} als auch +\Class{scrreprt} in der Definition von \Macro{partheadendvskip} enthalten. Die +Anweisung \Macro{partheadmidvskip} ist für den Abstand zwischen der +Teile-Nummer und dem Text der Teile-Überschrift vorgesehen. Die Anweisung +\Macro{partheademptypage}\ChangedAt{v3.02}{\Class{scrbook}\and + \Class{scrreprt}} wird bei \Class{scrbook} und \Class{scrreprt} +gegebenenfalls für die leere Seite nach der Überschrift verwendet. + +Die Voreinstellungen der sieben Anweisungen sind seit +\KOMAScript~3.15\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} von der Einstellung von Option +\DescRef{maincls.option.headings} (siehe \autoref{sec:maincls.structure}, +\DescPageRef{maincls.option.headings}) unabhängig. Die Original-Definitionen +für die Kapitelüberschriften ab +\KOMAScript~3.17\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} entsprechen:\IndexLength{@tempskipa} +\begin{lstcode} + \newcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}} + \newcommand*{\chapterheadmidvskip}{\par\nobreak + \vskip\@tempskipa} + \newcommand*{\chapterheadendvskip}{\vskip\@tempskipa} +\end{lstcode} +Diese werden auch bei jeder Verwendung von Option +\OptionValueRef{maincls}{headings}{big}\IndexOption{headings}, +\OptionValueRef{maincls}{headings}{normal} oder +\OptionValueRef{maincls}{headings}{small} reaktiviert. Als Seiteneffekt haben +diese Optionen also gegebenenfalls nicht nur Auswirkungen auf +Kapitelüberschriften, sondern auf alle Überschriften im Stil \PValue{chapter}. + +Der Stil \PValue{chapter} setzt die interne Länge +\Length{@tempskipa}\IndexLength{@tempskipa} vor Aufruf von +\Macro{chapterheadstartvskip} automatisch auf den Wert, der sich aus der +\DescRef{\LabelBase.cmd.DeclareSectionCommand}-Einstellung% +\IndexCmd{DeclareSectionCommand} \PValue{beforeskip} ergibt. Vor dem Aufruf +von \Macro{chapterheadendvskip} geschieht entsprechendes mit dem Wert, der +sich aus der Einstellung +\PValue{afterskip} ergibt, und vor dem Aufruf von \Macro{chapterheadmidvskip} +mit dem Wert, der sich aus der Einstellung \PValue{innerskip} +ergibt. + +Da die Voreinstellungen für die Abstände von \DescRef{maincls.cmd.part} nicht +von Option \DescRef{maincls.option.headings} abhängen, werden auch die +zugehörigen Anweisungen von dieser Option nicht neu +definiert. Ihre\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} Original-Definitionen entsprechen bei \Class{scrbook} und +\Class{scrreprt}: +\begin{lstcode} + \newcommand*{\partheadstartvskip}{% + \null\vskip-\baselineskip\vskip\@tempskipa + } + \newcommand*{\partheadmidvskip}{% + \par\nobreak\vskip\@tempskipa + } + \newcommand*{\partheadendvskip}{% + \vskip\@tempskipa\newpage + } +\end{lstcode} +und bei \Class{scrartcl}: +\begin{lstcode} + \newcommand*{\partheadstartvskip}{% + \addvspace{\@tempskipa}% + } + \newcommand*{\partheadmidvskip}{% + \par\nobreak + } + \newcommand*{\partheadendvskip}{% + \vskip\@tempskipa + } +\end{lstcode} +Auch hier wird vom Stil \PValue{part} die interne Länge +\Length{@tempskipa}\IndexLength{@tempskipa}\IndexLength{@tempskipa} vor der +Verwendung der Befehle entsprechend der Einstellungen von +\DescRef{\LabelBase.cmd.DeclareSectionCommand}\IndexCmd{DeclareSectionCommand} +gesetzt. + +Wird eine der Anweisungen, die im Original \Length{@tempskipa} für den +vertikalen Abstand verwendet, umdefiniert und sollen die Abstände weiterhin +beispielsweise mit \DescRef{\LabelBase.cmd.RedeclareSectionCommand} +konfigurierbar sein, so sollte man in der neuen Definition ebenfalls +\Length{@tempskipa} verwenden. Da\ChangedAt{v3.17}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} die Abstände über, innerhalb und +unter den Überschriften einfacher mit +\DescRef{\LabelBase.cmd.RedeclareSectionCommand} eingestellt werden können, +wird generell nicht empfohlen, zu diesem Zweck stattdessen die hier +beschriebenen Anweisungen umzudefinieren. Sie sollten für tiefgreifendere +Änderungen reserviert bleiben, die nicht über +\DescRef{\LabelBase.cmd.RedeclareSectionCommand} zu erreichen sind. +Auf\textnote{Beispiel!} \cite{homepage} findet sich dazu ein Beispiel, bei +dem durch Umdefinierung von \Macro{chapterheadstartvskip} und +\Macro{chapterheadendvskip} Linien über und unter der Kapitelüberschrift +gesetzt werden.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{partlineswithprefixformat}% + \Parameter{Ebene}\Parameter{Nummer}\Parameter{Text} +\end{Declaration} +Diese\ChangedAt{v3.25}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} Anweisung wird von Überschriften des Stils +\PValue{part}\textnote{Gliederungsstil + \PValue{part}}\Index{Gliederung>Stil>~\PValue{part}} verwendet. Die beiden +Argumente \PName{Nummer} und \PName{Text} sind dabei einschließlich +Einstellung der Fonts für sich bereits fertig formatiert. Letztlich regelt die +Anweisung also die Anordnung der beiden Teile der Überschrift. Bei nicht +nummerierten Überschriften ist \PName{Nummer} ein komplett leeres Argument, +enthält also auch keine Formatierungsanweisungen. + +Vordefiniert ist die Anweisung mit: +\begin{lstcode} + \newcommand{\partlineswithprefixformat}[3]{#2#3} +\end{lstcode} +\iffalse bisher eher spartanisch.\fi% Umbruchkorrektur + +\begin{Example} + Sie wollen die Teile-Überschriften in eine hellblaue Box mit blauer + Umrandung stellen, die nur etwa drei Viertel der Breite des Textbereichs + einnimmt. Hierzu verwenden Sie +\begin{lstcode}[moretexcs={fcolorbox}] + \documentclass{scrbook} + \usepackage{xcolor} + \renewcommand*{\partlineswithprefixformat}[3]{% + \fcolorbox{blue}{blue!25}{% + \parbox{.75\linewidth}{#2#3}% + }% + } + \begin{document} + \part{Umrahmte Teile} + \end{document} +\end{lstcode} + Allerdings fällt Ihnen auf, dass die Überschrift dabei nicht wie sonst + für Teile üblich zentriert wird -- weder die Box selbst noch der Text + innerhalb der Box. + + Die Ursache für die fehlende Zentrierung der Box liegt + darin, dass aufgrund der Änderung das in Argument 3 versteckte Absatzende + nur noch den Absatz innerhalb der Box beendet, aber nicht mehr den Absatz mit + der \Macro{parbox}. Also ergänzen Sie ein \Macro{par} am Ende der Definition. + + Die Ursache der fehlenden Zentrierung innerhalb der Box ist, dass in der + \Macro{parbox}-Anweisung die Ausrichtung von + \DescRef{maincls.cmd.raggedpart} nicht automatisch gültig ist. Daher + ergänzen Sie diese Anweisung innerhalb der Box. + + Mit +\begin{lstcode}[moretexcs={fcolorbox}] + \documentclass{scrbook} + \usepackage{xcolor} + \renewcommand*{\partlineswithprefixformat}[3]{% + \fcolorbox{blue}{blue!25}{% + \parbox{.75\linewidth}{\raggedpart #2#3}% + }% + \par + } + \begin{document} + \part{Umrahmte Teile} + \end{document} +\end{lstcode} + erhalten Sie die gewünschte Formatierung. +\end{Example} + +Wie im Beispiel gezeigt, ist der Anwender bei der Umdefinierung der Anweisung +für einige Dinge selbst verantwortlich. Dazu gehört neben dem Erhalt der +voreingestellten Ausrichtung auch, dass innerhalb der Überschrift kein +Seitenumbruch, beispielsweise an zusätzlich eingefügten Absätzen oder +Abständen, erfolgen kann. Das gezeigte Beispiel ist diesbezüglich +unproblematisch. Nicht nur, dass die beiden Boxen ohnehin keinen Seitenumbruch +erlauben. \KOMAScript{} verändert außerdem \Macro{interlinepenalty} als Teil +von \PName{Text} so, dass darin kein Seitenumbruch stattfinden +darf. Gleichzeitig endet \PName{Text} immer mit einem internen Absatz, +\Macro{@@par}. + +Das Argument \PName{Ebene} wird von +\Macro{partlineswithprefixformat} in der Voreinstellung nicht verwendet und +ist auch im Beispiel nicht erforderlich. Erst wenn der Anwender mehrere +Anweisungen im Stil \PValue{part} definiert und man innerhalb der Definition +nach den Anweisungen unterscheiden will, kann dies über \PName{Ebene} +erfolgen. Dabei ist \PName{Ebene} der vom Namen der Anweisung abgeleitete Name +der Gliederungsebene. Bei \DescRef{maincls.cmd.part}, +\DescRef{maincls.cmd.part*}, \DescRef{maincls.cmd.addpart} und +\DescRef{maincls.cmd.addpart*} ist \PName{Ebene} daher einheitlich +\PValue{part}.% +\EndIndexGroup + +\begin{Declaration} + \Macro{chapterlineswithprefixformat}% + \Parameter{Ebene}\Parameter{Nummer}\Parameter{Text} + \Macro{chapterlinesformat}% + \Parameter{Ebene}\Parameter{Nummer}\Parameter{Text} +\end{Declaration} +Diese\ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}} Anweisungen +werden von Überschriften des Stils \PValue{chapter}\textnote{Gliederungsstil + \PValue{chapter}}\Index{Gliederung>Stil>~\PValue{chapter}} in Abhängigkeit +von Option \DescRef{maincls.option.chapterprefix}\IndexOption{chapterprefix}% +\textnote{\DescRef{maincls.option.chapterprefix}} (siehe +\autoref{sec:maincls.structure}, \DescPageRef{maincls.option.chapterprefix}) +verwendet. Dabei gibt \Macro{chapterlineswithprefixformat} die Ausgabe bei +aktivierter Option vor. Bei deaktivierter Option +bestimmt dagegen \Macro{chapterlinesformat} die Ausgabe. + +Die beiden Argumente \PName{Nummer} und \PName{Text} sind dabei +einschließlich Einstellung der Fonts für sich bereits fertig +formatiert. Letztlich regeln die Anweisungen also die Anordnung der beiden +Teile der Überschrift. Bei nicht nummerierten Überschriften ist \PName{Nummer} +ein komplett leeres Argument, enthält also auch keine +Formatierungsanweisungen. + +Vordefiniert\textnote{Voreinstellung} sind die beiden Anweisungen mit: +\begin{lstcode} + \newcommand{\chapterlinesformat}[3]{% + \@hangfrom{#2}{#3}% + } + \newcommand{\chapterlineswithprefixformat}[3]{#2#3} +\end{lstcode} + +\begin{Example} + Sie wollen Überschriften im Kapitelstil gelb hinterlegen. Für + Überschriften ohne Präfixzeile definieren Sie daher in der Präambel des + Dokument: +\begin{lstcode}[moretexcs={colorbox}] + \makeatletter + \renewcommand{\chapterlinesformat}[3]{% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth + -2\fboxrule-2\fboxsep}{% + \@hangfrom{#2}#3% + }% + }% + } + \makeatother +\end{lstcode} + und für Überschriften mit Präfixzeile: +\begin{lstcode}[moretexcs={colorbox}] + \renewcommand{\chapterlineswithprefixformat}[3]{% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth + -2\fboxrule-2\fboxsep}{% + #2#3% + }% + }% + } +\end{lstcode} + Allerdings fällt Ihnen nach einiger Zeit auf, dass mit dieser Umdefinierung + die Überschriften wieder im Blocksatz gesetzt werden. Das liegt daran, dass + \Macro{parbox} sein Argument so setzt. Um dies zu korrigieren, fügen Sie die + Anweisung \DescRef{maincls.cmd.raggedchapter} (siehe + \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.raggedchapter}), + die automatisch bereits vor \Macro{chapterlinesformat} und + \Macro{chapterlineswithprefixformat} aufgerufen wird, in die Definitionen + ein: +\begin{lstcode}[moretexcs={colorbox}] + \makeatletter + \renewcommand{\chapterlinesformat}[3]{% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth + -2\fboxrule-2\fboxsep}{% + \raggedchapter + \@hangfrom{#2}#3% + }% + }% + } + \makeatother + \renewcommand{\chapterlineswithprefixformat}[3]{% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth + -2\fboxrule-2\fboxsep}{% + \raggedchapter + #2#3% + }% + }% + } +\end{lstcode} + Es sei daran erinnert, dass die Klammerung mit den Anweisungen + \Macro{makeatletter} und \Macro{makeatother} nur in der Dokumentpräambel zu + verwenden ist. In einer eigenen Wrapper-Klasse oder einem Paket haben sie zu + entfallen. Sie werden auch nur wegen \Macro{@hangfrom} in der Definition von + \Macro{chapterlinesformat} benötigt.% +\end{Example} + +Wie im Beispiel gezeigt, ist der Anwender bei der Umdefinierung der +Anweisungen für einige Dinge selbst verantwortlich. Dazu gehört neben dem +Erhalt der voreingestellten Ausrichtung auch, dass innerhalb der Überschrift +kein Seitenumbruch, beispielsweise an zusätzlich eingefügten Absätzen oder +Abständen, erfolgen kann. Das gezeigte Beispiel ist diesbezüglich +unproblematisch. Nicht nur, dass die beiden Boxen ohnehin keinen Seitenumbruch +erlauben. \KOMAScript{} verändert außerdem \Macro{interlinepenalty} als Teil +von \PName{Text} so, dass darin kein Seitenumbruch stattfinden +darf. Gleichzeitig endet \PName{Text} immer mit einem internen Absatz, +\Macro{@@par}. + +Die Anweisung \DescRef{maincls.cmd.raggedchapter} ist übrigens nicht +Bestandteil von \PName{Text}, weil anderenfalls beispielsweise die Verwendung +von \Macro{MakeUppercase} innerhalb der Umdefinierung der beiden Anweisungen +erheblich erschwert wäre. Dennoch sei darauf hingewiesen, dass typografischen +Regeln zufolge Versalsatz mit gängigen Fonts immer der Sperrung und des +Ausgleichs bedarf. Die \LaTeX-Anweisung \Macro{MakeUppercase} leistet dies +jedoch nicht. + +Das erste Argument, \PName{Ebene}, wird von den Anweisungen in der +Voreinstellung nicht verwendet und ist auch im Beispiel nicht +erforderlich. Erst wenn der Anwender mehrere Anweisungen im Stil +\PValue{chapter} definiert und man innerhalb der Definition nach den +Anweisungen unterscheiden will, kann dies über \PName{Ebene} erfolgen. Dabei +ist \PName{Ebene} der vom Namen der Anweisung abgeleitete Name der +Gliederungsebene. Bei \DescRef{maincls.cmd.chapter}, +\DescRef{maincls.cmd.chapter*}, \DescRef{maincls.cmd.addchap} und +\DescRef{maincls.cmd.addchap*} ist \PName{Ebene} daher einheitlich +\PValue{chapter}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{sectionlinesformat}% + \Parameter{Ebene}\Parameter{Einzug}\Parameter{Nummer}\Parameter{Text} + \Macro{sectioncatchphraseformat}% + \Parameter{Ebene}\Parameter{Einzug}\Parameter{Nummer}\Parameter{Text} +\end{Declaration} +Diese\ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} Anweisungen werden von Überschriften des Stils +\PValue{section}\textnote{Gliederungsstil + \PValue{section}}\Index{Gliederung>Stil>~\PValue{section}} in Abhängigkeit +davon verwendet, ob die jeweilige Überschrift eine Spitzmarke erzeugt oder +eine frei stehende Überschrift. Frei stehende Überschriften werden dabei per +\Macro{sectionlinesformat} ausgegeben, während +\Macro{sectioncatchphraseformat} für Spitzmarken zuständig ist. + +In beiden Fällen gibt \PName{Einzug} den Wert eines horizontalen Einzugs +der Überschrift gegenüber dem Textbereich an. Durch Angabe eines negativen +Wertes soll es auch möglich sein, die Überschrift in den linken Rand zu +rücken. + +Die beiden Argumente \PName{Nummer} und \PName{Text} sind einschließlich +Einstellung der Fonts für sich bereits fertig formatiert. Letztlich regeln die +Anweisungen also die Anordnung der beiden Teile der Überschrift. Bei nicht +nummerierten Überschriften ist \PName{Nummer} ein komplett leeres Argument, +enthält also auch keine Formatierungsanweisungen. + +Vordefiniert sind die beiden Anweisungen als: +\begin{lstcode} +\newcommand{\sectionlinesformat}[4]{% + \@hangfrom{\hskip #2#3}{#4}% +} +\newcommand{\sectioncatchphraseformat}[4]{\hskip #2#3#4} +\end{lstcode} + +Bei Umdefinierung einer der beiden Anweisungen ist wiederum der Anwender +selbst dafür verantwortlich, Seitenumbrüche innerhalb der Ausgabe zu +verhindern. \KOMAScript{} hilft hier lediglich mit entsprechend gesetztem +\Macro{interlinepenalty}. + +\begin{Example} + Wie schon im Beispiel der Kapitelüberschriften sollen nun die frei stehenden + Überschriften der Ebene \PValue{section} mit einer Farbe hinterlegt + werden. Die frei stehenden Überschriften tieferer Ebenen sollen nicht + verändert werden: +\begin{lstcode}[moretexcs={colorbox}] + \makeatletter + \renewcommand{\sectionlinesformat}[4]{% + \Ifstr{#1}{section}{% + \hspace*{#2}% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth + -2\fboxrule-2\fboxsep-#2}{% + \raggedsection + \@hangfrom{#3}{#4}% + }% + }% + }{% + \@hangfrom{\hskip #2#3}{#4}% + }% + } + \makeatother +\end{lstcode} + Mit dem gezeigten Code wird im Falle eines Einzugs der Überschrift der + Bereich des Einzugs nicht mit gefärbt. Wird hingegen die Überschrift in den + linken Rand gestellt, so wird dieser Bereich des Randes ebenfalls farbig + hinterlegt. Durch Verschiebung der \Macro{hspace*}-Anweisung in die + \Macro{colorbox} kann dieses Verhalten verändert werden.% + \iffalse Umbruchkorrekturtext + + Erneut sei daran erinnert, dass \Macro{makeatletter} und \Macro{makeatother} + nur in der Dokumentpräambel zu verwenden sind. In einer eigenen + Wrapper-Klasse oder einem Paket haben sie zu entfallen. Sie werden auch nur + wegen \Macro{@hangfrom} in der Definition von \Macro{sectionlinesformat} + benötigt.% + \else% + + \Macro{makeatletter} und \Macro{makeatother} werden in der Dokumentpräambel + erneut wegen \Macro{@hangfrom} benötigt.% + \fi% +\end{Example} + +Das erste Argument, \PName{Ebene}, wird von den Anweisungen in der +Voreinstellung nicht verwendet. Wie das Beispiel zeigt, kann es aber sehr gut +dazu verwendet werden, nach unterschiedlichen Gliederungsebenen im gemeinsamen +Stil \PValue{section} zu unterscheiden.% +\EndIndexGroup + + +\begin{Declaration} +\DoHook{heading/preinit/\PName{Name}}% +\DoHook{heading/postinit/\PName{Name}}% +\DoHook{heading/branch/star/\PName{Name}}% +\DoHook{heading/branch/nostar/\PName{Name}}% +\DoHook{heading/begingroup/\PName{Name}}% +\DoHook{heading/endgroup/\PName{Name}}% +\end{Declaration} +\BeginIndex{}{Haken}% +Abgesehen\ChangedAt[2019/01]{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} von den übrigen Einstellmöglichkeiten bieten sämtliche mit +\DescRef{\LabelBase.cmd.DeclareSectionCommand}, +\DescRef{\LabelBase.cmd.DeclareNewSectionCommand} und +\DescRef{\LabelBase.cmd.ProvideSectionCommand} definierten und ebenso auch die +mit \DescRef{\LabelBase.cmd.RedeclareSectionCommand} umdefinierten +Gliederungsanweisungen eine ganze Reihe an Haken, die per +\DescRef{scrbase.cmd.AddtoDoHook} manipuliert werden können. Zur +Funktionsweise dieser \emph{do-hook} genannten Haken sei auf +\autoref{sec:scrbase.hooks} ab \autopageref{sec:scrbase.hooks} verwiesen. Der +letzte Teil des Spezifikators ist dabei der \PName{Name} der +Gliederungsanweisung, wie er auch bei den oben genannten Befehlen als letztes +Argument anzugeben ist. + +Wichtig\important{Achtung!} ist, dass keiner dieser Haken für Anweisungen +verwendet werden sollte, die Auswirkungen auf den Seitenumbruch oder die +Positionierung der Überschriften haben. Daher sollten nur wirklich erfahrene +Anwender Gebrauch von diesen Haken machen. Im Zweifelsfall ist außerdem der +Quellcode der Klasse bezüglich des genauen Ausführungszeitpunktes des +jeweiligen Hakens zu konsultieren. Diese Haken dienen als letzter Notanker vor +einer tatsächlichen Umdefinierung von Gliederungsbefehlen außerhalb der von +\KOMAScript{} gebotenen Mittel. + +Der\textnote{\DoHook{\dots/preinit/\dots}} Haken +\DoHook{heading/preinit/\PName{Name}} wird unmittelbar vor der +Ini"-tialisierung der Anweisungen ausgeführt. Zu diesem Zeitpunkt wurden noch +keine Einstellungen vorgenommen. Selbst der Absatz, der einer Überschrift +vorausgeht, ist noch nicht zwingend beendet. + +Der\textnote{\DoHook{\dots/postinit/\dots}} Haken +\DoHook{heading/postinit/\PName{Name}} wird etwas später ausgeführt. Zu +diesem Zeitpunkt wurden einige Einstellungen bereits vorgenommen und auch ein +vorausgehender Absatz wurde bereits beendet. + +Der Haken \textnote{\DoHook{\dots/branch/\dots}} +\DoHook{heading/branch/nostar/\PName{Name}} wird ausgeführt, sobald feststeht, +dass keine Sternform der Gliederungsanweisung vorliegt. Für die Sternform wird +hingegen \DoHook{heading/branch/star/\PName{Name}} ausgeführt. Zu diesem +Zeitpunkt sind gegebenenfalls auch bereits vertikale Abstände über der +jeweiligen Überschrift eingefügt. + +Der\textnote{\DoHook{\dots/begingroup/\dots}} Haken +\DoHook{heading/begingroup/\PName{Name}} wird am Anfang der Gruppe +ausgeführt, in der schließlich die Überschrift gesetzt wird. Das ist also die +letzte Eingriffsmöglichkeit vor der Ausgabe der Überschrift. + +Entsprechend\textnote{\DoHook{\dots/endgroup/\dots}} wird +\DoHook{heading/endgroup/\PName{Name}} vor dem Ende der Gruppe ausgeführt, in +der die Überschrift gesetzt wurde. Derzeit ist das auch der letzte Haken +innerhalb einer Gliederungsanweisung. + +Zu beachten\textnote{\DescRef{maincls.cmd.minisec}} ist, dass +\DescRef{maincls.cmd.minisec} keine echte Gliederungsanweisung ist und die +genannten Haken daher auf diese Anweisung keine Anwendung finden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfUseNumber}\Parameter{Dann-Code}\Parameter{Sonst-Code} +\end{Declaration} +Streng\ChangedAt{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} genommen handelt es sich hier um eine interne +Anweisung. Sie ist nur innerhalb von Überschriften zwischen den beiden Haken +\DoHook{\dots/begingroup/\dots} und \DoHook{\dots/endgroup/\dots} +spezifiziert. In diesem Fall wird der \PName{Dann-Code} ausgeführt, wenn die +aktuelle Überschrift gemäß Einstellung von +\DescRef{maincls.counter.secnumdepth} und aufgrund der Nichtverwendung einer +Sternform nummeriert werden soll. Soll die Überschrift aufgrund der Verwendung +einer Sternform oder der Einstellung von \DescRef{maincls.counter.secnumdepth} +nicht nummeriert werden, so wird der \PName{Sonst-Code} ausgeführt. Bei +Überschriften im Stil \PValue{chapter} wird für die Entscheidung außerdem +berücksichtigt, ob die Überschrift im Hauptteil gesetzt wird. + +Wird die Anweisung außerhalb von +Überschriften verwendet, so ist ihr Ergebnis nicht spezifiziert. In der Regel +gibt sie dann eine Fehlermeldung aus und führt weder den \PName{Dann-Code} +noch den \PName{Sonst-Code} aus.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{SecDef}\Parameter{Sternanweisung}\Parameter{Normalanweisung} + \Macro{scr@startsection}\Parameter{Name}\Parameter{Ebene}% + \Parameter{Einzug}\Parameter{Abstand~davor}\Parameter{Abstand~danach} + \Parameter{Stilanweisungen}% + \OParameter{Kurzform}\Parameter{Überschrift} + \labelsuffix[*]% + \Macro{scr@startsection}\Parameter{Name}\Parameter{Ebene}% + \Parameter{Einzug}\Parameter{Abstand~davor} + \Parameter{Abstand~danach} + \Parameter{Stilanweisungen}% + \nobreak\texttt{*}\Parameter{Überschrift} + \labelsuffix +\end{Declaration} +Wie\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} bereits in \autoref{sec:maincls.structure} bei der +Beschreibung zu den Gliederungsbefehlen ab +\DescPageRef{maincls.cmd.chapter} erklärt, verfügt \KOMAScript{} +bezüglich des optionalen Arguments der Gliederungsbefehle über erweiterte +Möglichkeiten. Um dies zu erreichen, war es notwendig, einige Anweisungen +des \LaTeX-Kerns zu ersetzen: +\begin{itemize} +\item Statt + \Macro{@startsection}\IndexCmd{@startsection}\important{\Macro{@startsection}} + wird \Macro{scr@startsection} verwendet. Die Definition + von \Macro{@startsection} wird jedoch geprüft. Entspricht diese beim Laden + der Klasse nicht den Erwartungen, so wird eine Warnung + ausgegeben, diverse + Möglichkeiten von \KOMAScript{} werden deaktiviert und + \Macro{scr@startsection} stützt sich auf eine Kopie von + \Macro{@startsection}, während \Macro{@startsection} selbst + \Macro{scr@startsection} aufruft. +\item Statt \Macro{@dblarg}\IndexCmd{@dblarg}\important{\Macro{@dblarg}} wird + von den Gliederungsbefehlen eine eigene, interne Anweisung + verwendet. +\item Statt \Macro{secdef}\IndexCmd{secdef}\important{\Macro{secdef}} wird + \Macro{SecDef} verwendet, um die erwähnte Änderung + bezüglich \Macro{@dblarg} zu erreichen. Sollte die Definition von + \Macro{secdef} nicht den Erwartungen entsprechen, wird eine Warnung + ausgegeben. +\item \Macro{@sect}\IndexCmd{@sect}\important{\Macro{@sect}} wird umdefiniert, + um diverse Erweiterungen durch \KOMAScript{} zu realisieren. +\item \Macro{@ssect}\IndexCmd{@ssect}\important{\Macro{@ssect}} wird + umdefiniert, um diverse Erweiterungen von \KOMAScript{} zu realisieren. +\item \Macro{@xsect}\IndexCmd{@xsect}\important{\Macro{@xsect}} wird + umdefiniert, um diverse Erweiterungen von \KOMAScript{} zu realisieren. +\end{itemize} +Es gibt Überlegungen, in künftigen Versionen von \KOMAScript{} die erwähnten +Anweisungen aus dem \LaTeX-Kern nicht mehr anzutasten, sondern intern komplett +durch Eigenentwicklungen zu ersetzen. Bei Verwendung eigentlich inkompatibler +Pakete würden dadurch automatisch Erweiterungen von \KOMAScript{} deaktiviert +und die Gliederungsbefehle in die Hände jener Pakete gelegt. Gleichzeitig +müssten aber zum Erhalt der Kompatibilität mit anderen Paketen zusätzliche +Maßnahmen ergriffen werden. + +Die erwähnten Ersatzanweisungen können von Paketautoren genau wie die +\LaTeX-Kern-Anweisungen verwendet werden, bieten dann aber automatisch die +erweiterte Funktionalität von \KOMAScript{}. Jedoch sollten sie nicht +umdefiniert werden, da sie sich jederzeit ändern können und dann die +Funktionalität von \KOMAScript{} durch diese Umdefinierung erneut +beeinträchtigt werden könnte. Die Bedeutung der Parameter ist der +Anleitung zum \LaTeX-Kern \cite{latex:source2e} zu entnehmen. +Als\ChangedAt[2019/01]{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} Ersatz für die Umdefinierung von Anweisungen bietet +\KOMAScript{} die zuvor dokumentierten Haken.% +\EndIndexGroup + +\begin{Explain} + \begin{Declaration} + \Macro{At@startsection}\Parameter{Code} + \Macro{Before@ssect}\Parameter{Code} + \Macro{Before@sect}\Parameter{Code} + \end{Declaration} + Bis\ChangedAt[2019/01]{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} \KOMAScript{}~3.26b dienten diese Anweisungen ebenfalls + als Ersatz für die Umdefinierung von + \DescRef{\LabelBase.cmd.scr@startsection} und + \DescRef{\LabelBase.cmd.SecDef}. Seit\textnote{veraltete + \KOMAScript-Anweisungen} \KOMAScript~3.27 gelten sie jedoch als veraltet. + + Intern wird \Macro{At@startsection} seit \KOMAScript~3.27 über den Haken + \DescRef{\LabelBase.dohook.heading/postinit} + realisiert. \Macro{Before@ssect} ist mit Hilfe von + \DescRef{\LabelBase.dohook.heading/branch/star} implementiert und + \Macro{Before@sect} über \DescRef{\LabelBase.dohook.heading/branch/nostar}. + \PName{Code} wird den Haken per \DescRef{scrbase.cmd.AddtoDoHook} + hinzugefügt. Es ist nicht vorgesehen, einmal eingefügten \PName{Code} wieder + zu entfernen.% + \EndIndexGroup +\end{Explain} + +% \section{Anhang} +% \seclabel{appendix} + +\begin{Declaration} + \Macro{appendixmore} +\end{Declaration}% +Bei den {\KOMAScript}-Klassen gibt es innerhalb der Anweisung +\DescRef{maincls.cmd.appendix}% +\IndexCmd{appendix}\important{\DescRef{maincls.cmd.appendix}} eine +Besonderheit. Ist \Macro{appendixmore} definiert, so wird diese Anweisung von +\DescRef{maincls.cmd.appendix} ebenfalls ausgeführt. Intern wird das von den +{\KOMAScript}-Klassen \Class{scrbook}\OnlyAt{\Class{scrbook}\and + \Class{scrreprt}} und \Class{scrreprt} für die Realisierung der Layoutoption +\DescRef{maincls.option.appendixprefix} genutzt (siehe +\autoref{sec:maincls.structure}, +\DescPageRef{maincls.option.appendixprefix}). Dies\textnote{Achtung!} sollten +Sie unbedingt beachten, falls Sie selbst das Makro \Macro{appendixmore} +definieren oder umdefinieren wollen. Wurde diese Option bereits verwendet, so +erhalten Sie bei \verb|\newcommand{\appendixmore}{|\dots\verb|}| eine +Fehlermeldung. Dadurch wird verhindert, dass Sie die Option außer +Kraft setzen, ohne es zu merken. + +\begin{Example} + Sie wollen nicht, dass bei Verwendung der Klasse \Class{scrbook} oder + \Class{scrreprt} im Hauptteil die Kapitel mit einer Präfixzeile versehen + werden (siehe Layoutoption \DescRef{maincls.option.chapterprefix} + in \autoref{sec:maincls.structure}, + \DescPageRef{maincls.option.chapterprefix}). Damit die Konsistenz + gewahrt bleibt, wollen Sie auch nicht, dass eine solche Zeile im Anhang + verwendet wird. Stattdessen soll in den Anhängen direkt vor dem + Kapitelbuchstaben das Wort »Anhang« in der jeweiligen Sprache stehen. Dies + soll auch für die Kolumnentitel gelten. Also verwenden Sie nicht die + Layoutoption \DescRef{maincls.option.appendixprefix}, sondern + definieren in der Dokumentpräambel: +\begin{lstcode} + \newcommand*{\appendixmore}{% + \renewcommand*{\chapterformat}{% + \appendixname~\thechapter\autodot\enskip}% + \renewcommand*{\chaptermarkformat}{% + \appendixname~\thechapter\autodot\enskip}} +\end{lstcode} + Sollten Sie doch noch entscheiden, dass Sie die Option + \DescRef{maincls.option.appendixprefix} bei + \DescRef{maincls.cmd.documentclass} setzen wollen, so erhalten Sie aufgrund + der dann bereits definierten Anweisung \Macro{appendixmore} eine + Fehlermeldung. Damit wird verhindert, dass obige Definition unbemerkt die + Einstellungen überschreibt, die Sie per Option getroffen haben. + + Wenn Sie ein vergleichbares Verhalten des Anhangs für die Klasse + \Class{scrartcl} erreichen wollen, so ist dies ebenfalls möglich. Schreiben + Sie dazu beispielsweise Folgendes in die Präambel Ihres Dokuments: +\begin{lstcode} + \newcommand*{\appendixmore}{% + \renewcommand*{\sectionformat}{% + \appendixname~\thesection\autodot\enskip}% + \renewcommand*{\sectionmarkformat}{% + \appendixname~\thesection\autodot\enskip}} +\end{lstcode} + + Die Erklärungen zu den in diesem Beispiel umdefinierten Anweisungen finden + Sie in \autoref{sec:maincls.structure}, + \DescPageRef{maincls.cmd.chapterformat} und + \DescPageRef{maincls.cmd.chaptermarkformat}. +\end{Example}% +% +\EndIndexGroup +\ExampleEndFix + + +\section{Literaturverzeichnis} +\seclabel{bibliography} + +Die Erklärungen in diesem Abschnitt verlieren mit der Verwendung von Paketen +wie \Package{biblatex} zunehmend an Bedeutung. Die weitreichenden +Möglichkeiten solcher Pakete ersetzen dann die hier beschriebenen +Erweiterungen der \KOMAScript-Klassen. + +\begin{Declaration} + \Macro{newbibstyle}\OParameter{Elternstil}\Parameter{Name}% + \Parameter{Anweisungen} + \Macro{newblock} + \Macro{@openbib@code} + \Macro{bib@beginhook} + \Macro{bib@endhook} +\end{Declaration} +Schon die Standardklassen\textnote{Standardklassen} kennen zur Unterteilung +der Einträge in das Literaturverzeichnis die Anweisung \Macro{newblock}. Was +diese Anweisung genau macht, hängt dabei von den Klassenoptionen ab. Wird die +Option \Option{openbib}\important{\Option{openbib}} verwendet, so werden am +Ende der Standardklasse die Anweisungen \Macro{@openbib@code} und +\Macro{newblock} selbst umdefiniert. Von den Standardklassen wird die +Anweisung \Macro{@openbib@code} beim Start der Liste für das +Literaturverzeichnis --~genauer: bei der Festlegung der Parameter für diese +Liste~-- ausgeführt. Es darf davon ausgegangen werden, dass auch viele Pakete, +die das Literaturverzeichnis umdefinieren, diese Anweisung entsprechend +abarbeiten. + +Bei den \KOMAScript-Klassen\textnote{\KOMAScript} geschieht etwas +ähnliches. Allerdings wird \Macro{@openbib@code} nicht am Ende der Klasse +umdefiniert. Stattdessen wird mit \Macro{newbibstyle} der Stil +\PValue{openstyle} für das Literaturverzeichnis definiert. Die +\PName{Anweisungen}, die dabei in der Implementierung angegeben wurden, +beinhalten die gewünschten Umdefinierung von \Macro{@openbib@code} und von +\Macro{newblock}. Wird nun mit Hilfe der Option +\OptionValueRef{maincls}{bibliography}{openstyle}% +\IndexOption{bibliography~=\textKValue{openstyle}}% +\important{\OptionValueRef{maincls}{bibliography}{openstyle}} dieser +Literaturverzeichnisstil gewählt, so werden die \PName{Anweisungen} +unmittelbar ausgeführt, also \Macro{@openbib@code} und \Macro{newblock} +umdefiniert. + +Neben \Macro{@openbib@code} und \Macro{newblock} können in \PName{Anweisungen} +auch noch \Macro{bib@beginhook} und \Macro{bib@endhook} umdefiniert +werden. Die Anweisung \Macro{bib@beginhook} wird unmittelbar nach der +Überschrift und der Präambel des Literaturverzeichnisses, aber noch vor der +Liste mit den Literatureinträgen ausgeführt. Die Anweisung \Macro{bib@endhook} +wird direkt nach dieser Liste am Ende des Literaturverzeichnisses +ausgeführt. Im Falle eines mit \DescRef{maincls.cmd.BreakBibliography} (siehe +\autoref{sec:maincls.bibliography}, +\DescPageRef{maincls.cmd.BreakBibliography}) unterbrochenen +Literaturverzeichnisses werden diese Anweisungen außerdem am Anfang und Ende +jedes Teils, also unmittelbar vor und nach +\DescRef{maincls.cmd.BreakBibliography} ausgeführt. + +Die Anweisungen \Macro{newblock}, \Macro{@openbib@code}, \Macro{bib@beginhook} +und \Macro{bib@endhook} werden bei der Verwendung eines neuen +Literaturverzeichnisstils zunächst als leer definiert. Danach werden die +\PName{Anweisungen} des bei der Definition des Stils optional angegebenen +Elternstils ausgeführt und dann erst die \PName{Anweisungen}, die bei +Definition des neuen Stils angegeben wurden. Daraus ergibt sich auch, % +\iffalse % Umbruchkorrektur +dass jede der vier Anweisungen innerhalb von \PName{Anweisung} bei Bedarf +keinesfalls mit \Macro{newcommand}, sondern mit +\Macro{renewcommand}\IndexCmd{renewcommand}\important{\Macro{renewcommand}} +definiert werden sollte.% +\else% +\enlargethispage{3pt}% Umbruchkorrektur (im Paar) +dass die vier Anweisungen innerhalb von \PName{Anweisung} bei Bedarf mit +\Macro{renewcommand}\IndexCmd{renewcommand}\important{\Macro{renewcommand}} +umzudefinieren sind.% +\par\enlargethispage{3pt}% Umbruchkorrektur (im Paar) +\fi% + +Setzt der Anwender mit den Anweisungen +\DescRef{maincls.cmd.AtEndBibliography}%\important[i]{\DescRef{maincls.cmd.AtEndBibliography}\\ +% \DescRef{maincls.cmd.AfterBibliographyPreamble}}% Passt blöder Weise nicht! +\IndexCmd{AtEndBibliography} und +\DescRef{maincls.cmd.AfterBibliographyPreamble}% +\IndexCmd{AfterBibliographyPreamble} weitere \PName{Anweisungen} für die +Ausführung nach der Präambel und am Ende des Literaturverzeichnisses, so +werden die mit \DescRef{maincls.cmd.AfterBibliographyPreamble} festgelegten +\PName{Anweisungen} einmalig am Anfang des Literaturverzeichnisses nach +\Macro{bib@beginhook} und die mit \DescRef{maincls.cmd.AtEndBibliography} +festgelegten \PName{Anweisungen} einmalig am Ende des Literaturverzeichnisses +vor \Macro{bib@endhook} ausgeführt. + +Mit\textnote{Beispiel!} Hilfe des Pakets +\Package{multicol}\IndexPackage{multicol}\important{\Package{multicol}} (siehe +\cite{package:multicol}) könnte man beispielsweise einen Literaturstil für ein +zweispaltiges Literaturverzeichnis definieren: +% Umbruchkorrektur: listings korrigiert +\begin{lstcode} + \newbibstyle{twocolumstyle}{% + \renewcommand*{\bib@beginhook}{\begin{multicols}{2}}% + \renewcommand*{\bib@endhook}{\end{multicols}}}% +\end{lstcode} +Soll es außerdem eine \emph{open}-Variante davon geben, kann man hier die +Möglichkeiten der Vererbung verwenden und bei der Definition einen Elternstil +mit angeben: +% Umbruchkorrektur: listings korrigiert +\begin{lstcode} + \newbibstyle[openstyle]{twocolumopenstyle}{% + \renewcommand*{\bib@beginhook}{\begin{multicols}{2}}% + \renewcommand*{\bib@endhook}{\end{multicols}}}% +\end{lstcode} +Die Auswahl eines dieser neuen Stile erfolgt dann einfach wieder über die +Option \DescRef{maincls.option.bibliography}. + +Wie\textnote{Achtung!} schon \DescRef{maincls.cmd.BreakBibliography} verlieren +auch diese Anweisungen ganz oder teilweise ihre Wirkung, wenn +\Environment{thebibliography} beispielsweise durch Verwendung von +\Package{biblatex}\IndexPackage{biblatex}\important{\Package{biblatex}} +umdefiniert wird.% +\EndIndexGroup + + +\section{Mehr oder weniger obsolete Optionen und Anweisungen} +\seclabel{obsolete} + +\LoadNonFree{scrbookreportarticle-experts}{4} +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Sternvarianten Kapitelüberschrift Standardklassen Paketautoren +% LocalWords: Klassenoptionen Gliederungsbefehlen Namensliste umzudefinieren +% LocalWords: Inhaltsverzeichniseintrags Abstandsanweisungen Sternformen +% LocalWords: Teilüberschriften Benutzerfreundlichkeit Absatzmarkierung +% LocalWords: umkonfiguriert Teileüberschrift Abschnittsüberschrift +% LocalWords: Absolutwert Gliederungsbefehls Präfixzeile Schrifteinstellung +% LocalWords: Zählername Spitzmarke Kolumnentitels Schrifteinstellungen +% LocalWords: Strichstärke expandierbar expandierbaren expandierbares +% LocalWords: spartanisch Kapitelstil Spitzmarken Formatierungsanweisungen +% LocalWords: Kapitelüberschriften Gliederungsebenen Verzeichniseinträge +% LocalWords: Verzeichniseintragsstile Gliederungsbefehl Verzeichniseintrag +% LocalWords: Verzeichniseintrags Verzeichniseintragsstilen Gliederungsstil +% LocalWords: Gliederungsebene Eintragsebenen Absatzeinzug Dokumentpräambel diff --git a/macros/latex/contrib/koma-script/doc/scrbookreportarticle-experts-en.tex b/macros/latex/contrib/koma-script/doc/scrbookreportarticle-experts-en.tex new file mode 100644 index 0000000000..e3807a114c --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrbookreportarticle-experts-en.tex @@ -0,0 +1,1894 @@ +% ====================================================================== +% scrbookreportarticle-experts-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrbook, scrreprt, and scrartcl of the KOMA-Script guide +% expert part +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrbookreportarticle-experts-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrbook, scrreprt, scrartcl for + experts)] + +\translator{Gernot Hassenpflug\and Markus Kohm\and Karl Hagen} + +\chapter[{Additional Information about the Main Classes and + \Package{scrextend}}]{Additional Information about the Main Classes + \Class{scrbook}, + \Class{scrreprt}, and \Class{scrartcl} as well as the Package + \Package{scrextend}} +\labelbase{maincls-experts} + +\BeginIndexGroup% +\BeginIndex{Class}{scrartcl}% +\BeginIndex{Class}{scrbook}% +\BeginIndex{Class}{scrreprt}% +\BeginIndex{Package}{scrextend}% +This chapter provides additional information about the \KOMAScript{} classes +\Class{scrbook}, \Class{scrreprt}, and \Class{scrartcl} and some commands that +are also available in \Package{scrextend}. \iffree{Some parts of the chapter + are found only in the German \KOMAScript{} book \cite{book:komascript}. This + should not be a problem because the}{The} average user, who only wants to +use the classes, will seldom need this information. Some of this information +is addressed to users with non-standard requirements or who want to write +their own classes based on a \KOMAScript{} class. Because such descriptions +are not addressed to beginners, they are condensed and require deeper +knowledge of \LaTeX. Other parts describe features that exist only for the +sake of compatibility with the standard classes or earlier versions of +\KOMAScript{}.\iffree{}{ + Portions that describe features that exist only for reasons of compatibility + with earlier versions of \KOMAScript{} are printed in sans serif font. You + should not use them any longer.} + +\LoadNonFree{scrbookreportarticle-experts}{0} + +\section{Extensions to User Commands} +\seclabel{addInfos} + +\LoadNonFree{scrbookreportarticle-experts}{1} + +\iffree{\LoadCommonFile{footnotes-experts}}{} + +\section{\KOMAScript's Interaction with Other Packages} +\seclabel{coexistence} + +\LoadNonFree{scrbookreportarticle-experts}{2} + + +\section{Detection of \KOMAScript{} Classes} +\seclabel{identify} + +Package authors sometimes need to detect a \KOMAScript{} class. Mostly this is +of little or no interest to the average user. To identify the version of +\KOMAScript{} that is being used, refer to +\DescRef{scrbase.cmd.KOMAScriptVersion} in \autoref{sec:scrbase.identify}, +\DescPageRef{scrbase.cmd.KOMAScriptVersion}. + +\begin{Declaration} + \Macro{KOMAClassName}% + \Macro{ClassName} +\end{Declaration} +\Macro{KOMAClassName} stores the name of the \KOMAScript{} class currently in +use. So if you want to know if a \KOMAScript{} class is used, you can easily +test for this command. In contrast, \Macro{ClassName} indicates which standard +class has been replaced by this \KOMAScript{} class. + +Note\textnote{Attention!} in this context, however, that the existence of +\DescRef{scrlogo.cmd.KOMAScript}\IndexCmd{KOMAScript} cannot guarantee that a +\KOMAScript{} class is in use. For one thing, all \KOMAScript{} packages +define this command. For another, other packages may find it useful to define +the \KOMAScript{} label using this name.% +% +\EndIndexGroup + +\section{Entries to the Table of Contents} +\seclabel{toc} + +\KOMAScript{} classes provide advanced methods for generating and +manipulating entries in the table of contents. Some of these are based on +the \Package{tocbasic} package (see \autoref{sec:tocbasic.tocstyle} starting +on \autopageref{sec:tocbasic.tocstyle}). Other are implemented directly in the +classes. + +\begin{Declaration} + \Macro{raggedchapterentry} +\end{Declaration} +In\ChangedAt{v3.21}{\Class{scrbook}\and \Class{scrreprt}} earlier versions of +\KOMAScript{}, it was possible to define the \Macro{raggedchapterentry} macro +as \Macro{raggedright} to print chapter entries in the table of contents +left-aligned instead of fully justified. Officially, this feature has not +existed in \KOMAScript{} since version~3.21. + +In fact, the \PValue{raggedentrytext} attribute for the \PValue{tocline} +TOC-entry style of the \Package{tocbasic}\IndexPackage{tocbasic} package is +implemented by setting the \Macro{ragged\PName{entry level}entry} macro to +either \Macro{relax} or \Macro{raggedright}. This attribute is evaluated by +checking whether the corresponding macro is defined as \Macro{raggedright}. If +so, the text is printed left-aligned. With any other definition, no ragged +margins are used. + +Since it was previously documented that \Macro{raggedchapterentry} should not +be defined as anything other than \Macro{raggedright}, this behaviour is +compatible with the documented behaviour of earlier versions. As noted in +earlier releases, other definitions of \Macro{raggedchapterentry}\,---\,and +now also of \Macro{raggedsectionentry} and similar macros for other entry +levels\,---\,may lead to unexpected results. + +You should select the desired justification for the all table-of-contents +entries using the \PValue{raggedentrytext} attribute of \PValue{tocline} +rather than attempting to set the attribute for specific entry levels.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{addtocentrydefault}\Parameter{level}\Parameter{number}% + \Parameter{heading} +\end{Declaration} +The\ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} \KOMAScript{} classes do not use +\Macro{addcontentsline}\IndexCmd{addcontentsline}% +\important{\Macro{addcontentsline}} directly to make entries in the table of +contents. Instead, they call \Macro{addtocentrydefault} with similar +arguments. The command can be used for both numbered and unnumbered entries. +The \PName{level} is the sectioning level, that is \PValue{part}, +\PValue{chapter}, \PValue{section}, \PValue{subsection}, +\PValue{subsubsection}, \PValue{paragraph}, or \PValue{subparagraph}. The +formatted sectioning number is given the second argument, \PName{number}. This +argument can be empty. The text of the entry is given by the \PName{heading} +argument. You should protect fragile commands inside this argument with +\Macro{protect}\IndexCmd{protect}\important{\Macro{protect}}. + +One notable feature of the \PName{number} argument is that an empty argument +indicates that an unnumbered entry should be generated. By default, +\KOMAScript{} uses +\begin{quote} + \Macro{addcontentsline}\PParameter{toc}\Parameter{level}% + \Parameter{heading} +\end{quote} +for this. If the argument is not empty, however, an entry with number +will be created and \PName{number} is the formatted heading +number. \KOMAScript{} uses +\begin{quote}\raggedright + \Macro{addcontentsline}\PParameter{toc}\Parameter{level}% + \PParameter{\%\\ + \quad\Macro{protect}\DescRef{tocbasic.cmd.numberline}\Parameter{number}% + \PName{heading}\%\\ + } +\end{quote} +to create this entry. + +Package authors and authors of wrapper classes can redefine this command to +alter the entries. For example\textnote{Example}, you could use +\begin{lstcode} + \renewcommand{\addtocentrydefault}[3]{% + \IfArgIsEmpty{#3}{% + \IfArgIsEmpty{#2}{% + \addcontentsline{toc}{#1}{#3}% + }{% + \addcontentsline{toc}{#1}{\protect\numberline{#2}#3}% + }% + }% + }% +\end{lstcode} +to\IndexCmd{IfArgIsEmpty} omit entries with an empty \PName{heading}. In +practice, such a change is not necessary because the \KOMAScript{} classes +already use another method to suppress empty entries. See the description of +the sectioning commands in \autoref{sec:maincls.structure}, starting on +\DescPageRef{maincls.cmd.part} for this.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{addparttocentry}\Parameter{number}\Parameter{heading} + \Macro{addchaptertocentry}\Parameter{number}\Parameter{heading} + \Macro{addsectiontocentry}\Parameter{number}\Parameter{heading} + \Macro{addsubsectiontocentry}\Parameter{number}\Parameter{heading} + \Macro{addsubsubsectiontocentry}\Parameter{number}\Parameter{heading} + \Macro{addparagraphtocentry}\Parameter{number}\Parameter{heading} + \Macro{addsubparagraphtocentry}\Parameter{number}\Parameter{heading} +\end{Declaration}% +The\ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} \KOMAScript{} classes call the previously described +command +\DescRef{\LabelBase.cmd.addtocentrydefault}\IndexCmd{addtocentrydefault}% +\important{\DescRef{\LabelBase.cmd.addtocentrydefault}} directly only if no +individual command for the \PName{level} has been defined or if that command +is \Macro{relax}\IndexCmd{relax}\important{\Macro{relax}}. By default, all +these commands simply pass their own \PName{level} and arguments directly to +\DescRef{\LabelBase.cmd.addtocentrydefault}.% +% +\EndIndexGroup + + +\section{Font Settings} +\seclabel{fonts} + +\KOMAScript{} classes not only provide an extended selection of basic font +sizes, but they also let you define, manipulate, and apply elements with +their own font settings. + +% Note: Instead of +% \LoadNonFree{scrbookreportarticle-experts}{5} +% here is the content of that file: +\begin{Declaration} + \Macro{@fontsizefilebase}% + \Macro{changefontsizes}\Parameter{font size} +\end{Declaration} +The \File{scrsize} prefix for file names of font-size files described +in \autoref{sec:maincls-experts.addInfos}\iffree{}{ on +\DescPageRef{maincls-experts.option.fontsize}} is just the default for the +internal \Macro{@fontsizefilebase}\IndexCmd{@fontsizefilebase} macro. This +default is used only when the macro is not yet defined when loading a +\KOMAScript{} class or the \Package{scrextend} package. Authors of wrapper +classes can redefine this macro to use completely different font-size files. +Similarly\textnote{Hint!} authors of wrapper classes can change or deactivate +the fallback solution for unknown font sizes by redefining the +\Macro{changefontsizes}\important{\Macro{changefontsizes}} macro. This macro +has exactly one argument: the desired \PName{font size}. +However\textnote{Attention!}, the \Macro{changefontsizes} macro is not +designed as an end-user instruction.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{newkomafont}\OParameter{warning}\Parameter{element}% + \Parameter{default}% + \Macro{aliaskomafont}\Parameter{alias}\Parameter{element} +\end{Declaration} +Experts can use \Macro{newkomafont} to define a \PName{default} for the font +style of an \PName{element}. Subsequently, that default can be changed with +the \DescRef{maincls.cmd.setkomafont} and \DescRef{maincls.cmd.addtokomafont} +commands (see \autoref{sec:maincls.textmarkup}, +\DescPageRef{maincls.cmd.setkomafont}). Of course, merely defining the font +style does not actually put it to use. You must make sure you include the +\DescRef{maincls.cmd.usekomafont}% +\important{\DescRef{maincls.cmd.usekomafont}}\IndexCmd{usekomafont} command +(see \DescPageRef{maincls.cmd.usekomafont}) for this \PName{element} in your +code at the appropriate places. Calling \Macro{newkomafont} for an existing +element will result in error messages. + +The optional \PName{warning} argument defines a warning message. The +\KOMAScript{} classes output it with \Macro{ClassWarning}, and the +\Package{scrextend} package with \Macro{PackageWarning}, whenever the default +font style of that \PName{element} is changed. The package \Package{scrkbase} +is listed as the generator of the warning. + +The \Macro{aliaskomafont} command defines an \PName{alias} for a previously +defined \PName{element}. \KOMAScript{} informs the user in the \File{log} file +about the actual name of the element if it uses an \PName{alias}. +You\textnote{Hint!} can use an \PName{alias}, for example, if you think of a +better name for an element and the old name should remain usable for the sake +of compatibility. It can also increase user-friendliness by creating aliases +for all the terms that different users may intuitively choose. \KOMAScript{} +itself makes use of this possibility.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{addtokomafontrelaxlist}\Parameter{macro} + \Macro{addtokomafontonearglist}\Parameter{macro} + \Macro{addtokomafontgobblelist}\Parameter{macro} +\end{Declaration} +As already mentioned in \autoref{part:forAuthors} of this manual, font +settings of elements should consist only of commands to select the size, +family, encoding, series, shape, or colour. Colour changes are not +always transparent in \LaTeX{} and therefore can cause in unwanted side-effects +if you use \DescRef{maincls.cmd.usekomafont} at an inappropriate place. + +Users tend to put very different, sometimes critical, things into the font +setting of an element, such as \Macro{MakeUppercase} at the very end of the +setting. As much as possible, the internal use of the font settings has been +implemented so that many of these prohibited elements still do no harm, and it +usually works even if the last command in a font setting expects an argument, +for example using \Macro{textbf} instead of \Macro{bfseries}. But there is no +guarantee for that. + +Internally, \KOMAScript{} must sometimes limit font changes to real font +settings. This is accomplished, for example, by using +\DescRef{maincls.cmd.usefontofkomafont}% +\IndexCmd{usefontofkomafont}% +\IndexCmd{usesizeofkomafont}\IndexCmd{useencodingofkomafont}% +\IndexCmd{usefamilyofkomafont}\IndexCmd{useseriesofkomafont}% +\IndexCmd{useshapeofkomafont} instead of \DescRef{maincls.cmd.usekomafont} +(see \autoref{sec:maincls.textmarkup}, +\DescPageRef{maincls.cmd.usefontofkomafont}). + +Nevertheless, the \DescRef{maincls.cmd.usefontofkomafont} command and its +siblings have their limitations. Therefore you must not use a command that +always needs a fully expandable argument inside the font setting of an +element. But this is exactly what \Macro{MakeUppercase} needs. +Therefore\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and +\Class{scrartcl}} \KOMAScript{} maintains an internal list of macros that +should become \Macro{relax} inside \DescRef{maincls.cmd.usefontofkomafont} and +its siblings. Since \KOMAScript~3.24\ChangedAt{v3.24}{\Class{scrbook}\and +\Class{scrreprt}\and \Class{scrartcl}} only \Macro{normalcolor} is added to +this list by default. + +Note that the given \PName{macro} is actually just set to \Macro{relax}. So +any arguments within the font setting will be executed locally, if applicable. +Therefore you should never add commands like \Macro{setlength} to the list. +You are responsible for all errors resulting caused by using +\Macro{addtokomafontrelaxlist}. Also, do not take this command as license to +add all sorts of commands to the font settings! + +For\ChangedAt{v3.24}{\Class{scrbook}\and \Class{scrreprt}\and +\Class{scrartcl}} commands whose first argument should be executed without an +additional group, there is \Macro{addtokomatfontonearglist}. The specified +macro is set to \Macro{@firstofone}. By default \Macro{MakeUppercase} and +\Macro{MakeLowercase} are added to this list. + +If\ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}\and +\Class{scrartcl}}, on the other hand, a \PName{macro} and its first argument +should be ignored locally inside \DescRef{maincls.cmd.usefontofkomafont} and +its siblings, you can use \Macro{addtokomafontgobblelist} instead of +\Macro{addtokomafontrelaxlist}. An example of this is the command +\Macro{color}, which must be ignored along with the colour name and therefore +is a member of this list by default. + +Note the defaults of these three lists may change in future version. If you +need a certain commands in one of the lists, you should should explicitly add +them yourself.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfExistskomafont}\Parameter{element}\Parameter{then code}% + \Parameter{else code} + \Macro{IfIsAliaskomafont}\Parameter{element}\Parameter{then code}% + \Parameter{else code} +\end{Declaration} +Which\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}\and \Class{scrlttr2}} elements are defined depends on the +version of \KOMAScript. So it sometimes makes sense to test in advance whether +a specific \PName{element} even exists. The \Macro{IfExistskomafont} command +executes the \PName{then code} if and only if an \PName{element} has been +defined using \DescRef{\LabelBase.cmd.newkomafont} or +\DescRef{\LabelBase.cmd.aliaskomafont} and therefore can also be changed using +\DescRef{maincls.cmd.setkomafont} or \DescRef{maincls.cmd.addtokomafont} and +can be used by one of the \Macro{use\dots komafont} commands. Otherwise it +executes the \PName{else code}.% + +In contrast, \Macro{IfIsAliaskomafont}\ChangedAt{v3.25}{\Class{scrbook}\and +\Class{scrreprt}\and \Class{scrartcl}\and \Class{scrlttr2}} executes +\PName{then code} only if \PName{element} has been defined with +\DescRef{\LabelBase.cmd.aliaskomafont} as an alias of another element. For +undefined elements as well as for elements defined with +\DescRef{\LabelBase.cmd.newkomafont}, however, it executes the +\PName{else code}.% +\EndIndexGroup + +\section{Paragraph Indention or Gap} +\seclabel{parskip} + +Because the \KOMAScript{} classes offer extended features for setting the +paragraph indention or gap, direct changes of the standard lengths +\Length{parskip}\IndexLength{parskip}, \Length{parindent}\IndexLength{parskip} +and \Length{parfillskip}\IndexLength{parskip} are not only unnecessary but +mostly inadvisable. + +\begin{Declaration} + \Macro{setparsizes}\Parameter{indent}\Parameter{distance} + \Parameter{last-line end space} +\end{Declaration} +\KOMAScript{} provides the option to set the indent of the first line of a new +paragraph, the distance between paragraphs, and the white space required at the +end of the last line of each paragraph. You should use this command whenever +the \OptionValueRef{maincls}{parskip}{relative} option should recognize these +changes. \KOMAScript{}\textnote{example} itself uses this command, for +example, in the form +\begin{lstcode} + \setparsizes{0pt}{0pt}{0pt plus 1fil} +\end{lstcode} +to eliminate both the paragraph indentation and inter-paragraph spacing, as +well as to allow any amount of white space at the end of the last line of the +paragraph. Such values are useful if a paragraph consists of only a box that +should be printed without vertical spacing and filling the whole column +width. If, on the other hand, the box should only span the whole width but use +the current settings for indentation and distance between paragraphs, then +\begin{lstcode} + \setlength{\parfillskip}{0pt plus 1fil} +\end{lstcode} +is preferable. + +Starting with \KOMAScript~3.17\ChangedAt{v3.17}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}}, recalculating or +reactivating\IndexCmd{activateareas} the type area or the margins (see +\autoref{cha:typearea}) also readjusts the values of \Macro{setparsizes} if +they have not been changed in the meantime. This is one more reason not to +change these values without using \KOMAScript. Setting compatibility to a +\KOMAScript{} version prior to 3.17 (see +\autoref{sec:maincls.compatibilityOptions}, +\DescPageRef{maincls.option.version}, option \DescRef{maincls.option.version}% +\IndexOption{version}\important{\OptionValueRef{maincls}{version}{3.17}}) +disables this recalculation.% +% +\EndIndexGroup + +\section{Counters} +\seclabel{counter} + +\LoadNonFree{scrbookreportarticle-experts}{3} + +\section{Sections} +\seclabel{sections} + +The \KOMAScript{} classes provide a wide range of options for modifying +sectioning levels and their corresponding headings. You can even define new +levels. + +\begin{Declaration} + \Macro{DeclareSectionCommand}\OParameter{attributes}\Parameter{name}% + \Macro{DeclareNewSectionCommand}\OParameter{attributes}\Parameter{name}% + \Macro{RedeclareSectionCommand}\OParameter{attributes}\Parameter{name}% + \Macro{ProvideSectionCommand}\OParameter{attributes}\Parameter{name} +\end{Declaration} +With\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} these commands you can either define a new sectioning +command, \Macro{\PName{name}}, or modify an existing sectioning command, +\Macro{\PName{name}}. To do so, you use the optional argument to set several +\PName{attributes}. The \PName{attributes} are a comma-separated list of +\PName{key}=\PName{value} assignments. In addition to the style-independent +attributes shown in \autoref{tab:maincls-experts.declaresection.keys}, +\autopageref{tab:maincls-experts.declaresection.keys}, there are also +attributes that depend on the style. Currently the following styles are +available: +\begin{description}\setkomafont{descriptionlabel}{} +\item[\PValue{chapter}:] \ChangedAt{v3.18}{\Class{scrbook}\and + \Class{scrreprt}}The style for chapter headings. This style is used by + default for \DescRef{maincls.cmd.chapter}\IndexCmd{chapter} and indirectly + for \DescRef{maincls.cmd.addchap}\IndexCmd{addchap}. You can define new + sectioning commands using this style, but then they do not automatically + have an \Macro{add\dots} variant. To configure existing or new sectioning + commands, you can also use the attributes of + \autoref{tab:maincls-experts.declarechapterstyle.keys}, + \autopageref{tab:maincls-experts.declarechapterstyle.keys}. + The\textnote{Attention!} \DescRef{maincls.cmd.addchap} command, + like the starred variants, is configured automatically with + \DescRef{maincls.cmd.chapter} and cannot be modified independently. Note + that \Class{scrartcl}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} does not + provide this style. +\item[\PValue{part}:] \ChangedAt{v3.18}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}}The style for part headings. This + style is used by default for \DescRef{maincls.cmd.part}\IndexCmd{part} and + indirectly for \DescRef{maincls.cmd.addpart}\IndexCmd{addpart}. You can + define new sectioning commands using this style, but then they do not + automatically have an \Macro{add\dots} variant. To configure existing or new + sectioning commands, you can also use the attributes of + \autoref{tab:maincls-experts.declarepartstyle.keys}, + \autopageref{tab:maincls-experts.declarepartstyle.keys}. + Note\textnote{Attention!} that the \DescRef{maincls.cmd.addpart} command, + like the starred variants, is configured automatically with + \DescRef{maincls.cmd.part} and cannot be modified independently. +\item[\PValue{section}:] The style for section headings. This style is currently + used for \DescRef{maincls.cmd.section}\IndexCmd{section}, + \DescRef{maincls.cmd.subsection}\IndexCmd{subsection}, + \DescRef{maincls.cmd.subsubsection}\IndexCmd{subsubsection}, + \DescRef{maincls.cmd.paragraph}\IndexCmd{paragraph}, and + \DescRef{maincls.cmd.subparagraph}\IndexCmd{subparagraph}. You can define + new sectioning commands using this style. To configure existing or new + sectioning commands, you can also use the attributes of + \autoref{tab:maincls-experts.declaresectionstyle.keys}, + \autopageref{tab:maincls-experts.declaresectionstyle.keys}. When redefining + a command, the \ChangedAt{v3.24}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}} \PName{key}s + \PValue{style}, \PValue{afterskip}, \PValue{beforeskip}, and \PValue{level} + are mandatory. The keys + \PValue{afterindent}\ChangedAt{v3.26}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}},\PValue{font} and \PValue{indent} + are recommended. \PValue{tocindent} and + \PValue{tocnumwidth} may also be required depending on the command's + \PName{name}. This also applies if a command that was not previously a + sectioning command is redefined as a sectioning command using + \Macro{RedeclareSectionCommand}. Note\textnote{Attention!} that the + \Macro{addsec} command and its starred variants are configured automatically + with \DescRef{maincls.cmd.section} and cannot be changed independently. +\end{description} +Defining a sectioning command also creates an element with the same +\PName{name}, if it does not already exist. For \PValue{chapter} and +\PValue{part}, elements are also created for the prefix line. You can change +its font settings using \DescRef{maincls.cmd.setkomafont} or +\DescRef{maincls.cmd.addtokomafont} (see \autoref{sec:maincls.textmarkup}, +\DescPageRef{maincls.cmd.setkomafont}). + +\begin{table} + \caption[{Style-independent attributes for declaring sectioning + commands}]{Available \PName{key}s and \PName{value}s for + style-independent \PName{attributes} when declaring sectioning command}% + \label{tab:maincls-experts.declaresection.keys}% + \begin{tabularx}{\linewidth}{llX} + \toprule + \PName{key} & \PName{value} & Description \\ + \midrule% + \PValue{counterwithin} + & \PName{counter name} + & The value of the counter of the heading should depend on \PName{counter + name}. Whenever \Macro{stepcounter} or \Macro{refstepcounter} increases + the value of \PName{counter name}, the value of the counter of this + heading is reset to 0. In addition, \Macro{the\PName{counter name}} is + prefixed with a dot when this counter is output.\\ + \PValue{counterwithout}% + \ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + & \PName{counter name} + & Cancels a prior \PValue{counterwithin} setting. Therefore it makes sense + only if you redefine an existing sectioning command.\\ + \PValue{expandtopt} + & \PName{switch} + & If the switch is on, all subsequent values for lengths will be + completely expanded, evaluated, and stored as \texttt{pt} values when + they are defined. This means lengths no longer depend on the current + font size. If the switch is off, all subsequent values for lengths will + be tentatively expanded and evaluated but stored for full evaluation at + application time. You can use any values from + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. + The default is \PValue{false}.\\ + \PValue{level} + & \PName{integer} + & The numerical value of the sectioning level (see the + \DescRef{maincls.counter.secnumdepth} counter, + \autoref{sec:maincls.structure}, + \DescPageRef{maincls.counter.secnumdepth}); the value should be unique + and is mandatory for new levels.\\ + \PValue{style} + & \PName{name} + & Defines the style of the heading.\\ + \ChangedAt{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + \PValue{tocstyle} + & \PName{name} + & Defines the style of the entries in the table of contents. You can use + every previously defined TOC-entry style (see + \autoref{sec:tocbasic.tocstyle}). An empty \PName{name} prevents a new + definition of the TOC-entry command \Macro{l@\dots}.\\ + \ChangedAt{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + \PValue{toc\PName{option}} + & \PName{value} + & Additional options depending on the TOC-entry style selected with + \Option{tocstyle}. See \autoref{sec:tocbasic.tocstyle}, + \autopageref{sec:tocbasic.tocstyle} for additional information about + TOC-entry styles. You can find the attributes that can be used as + \PName{option}s for the predefined TOC-entry styles of the + \Package{tocbasic} package in + \autoref{tab:tocbasic.tocstyle.attributes}, + \autopageref{tab:tocbasic.tocstyle.attributes}.\\ + % \PValue{tocindent} + % & \PName{length} + % & Total indentation from the left margin of the entry in the table of + % contents corresponding to this heading, if and only if such an + % entry will be made (see \DescRef{maincls.counter.tocdepth}, + % \autoref{sec:maincls.toc}, \DescPageRef{maincls.counter.tocdepth}).\\ + % \PValue{toclevel} + % & \PName{integer} + % & A number denoting the depth of the entry in the table of contents + % corresponding to this heading, if this should differ from + % \PValue{level} (see \DescRef{maincls.counter.tocdepth}, + % \autoref{sec:maincls.toc}, \DescPageRef{maincls.counter.tocdepth}). \\ + % \PValue{tocnumwidth} + % & \PName{length} + % & Width of the box for the number of the entry in the table of + % contents.\\ + \bottomrule + \end{tabularx} +\end{table} + +\begin{table} + \caption[{Attributes of the \PValue{section} style when declaring a + sectioning command}]{Additional \PName{key}s and \PName{value}s for + attributes when declaring a sectioning command with the \PValue{section} + style}% + \label{tab:maincls-experts.declaresectionstyle.keys}% + \begin{tabularx}{\linewidth}{llX} + \toprule + \PName{key} & \PName{value} & Description \\ + \midrule + \PValue{afterindent}% + \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + & \PName{switch} + & The \PName{switch} determines whether the current paragraph indent is + applied to the first line following a freestanding heading (see + \PValue{runin}). With the default, \PValue{bysign}, the sign of + \PValue{beforeskip} determines the behaviour. If the value of + \PValue{beforeskip} is negative, the indentation of the first paragraph + following the heading is suppressed. You can use any value from + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} to + explicitly enable or disable this indentation.\\ + \PValue{afterskip} + & \PName{length} + & In the case of a run-in heading (see \PValue{runin}), the absolute value + of the \PName{length} is the horizontal space after the heading. That is, + a positive distance is always inserted. In the case of a freestanding + heading, the \PName{length} is the vertical skip below the heading. With + \OptionValue{runin}{bysign}, a positive value results in a freestanding + heading, while a negative value or zero results in a run-in heading.\\ + \PValue{beforeskip} + & \PName{length} + & Specifies the vertical space before the heading. With + \OptionValue{afterindent}{bysign}, if the value is negative, a positive + distance\,---\,the amount of \PName{length}\,---\,is still inserted, but + in this case the indentation of the paragraph following the heading is + suppressed.\\ + \PValue{font} + & \PName{font commands} + & The font settings that should be used for the heading in addition to + \DescRef{maincls.fontelement.disposition}. You can use all settings that + are allowed for \DescRef{maincls.cmd.setkomafont} and + \DescRef{maincls.cmd.addtokomafont} for the element of the heading.\\ + \PValue{indent} + & \PName{length} + & The indentation of heading from the left margin.\\ + \PValue{runin} + \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + & \PName{switch} + & Defines whether to use a run-in or a freestanding heading. With + the default, \PValue{bysign}, the sign of \PValue{afterskip} determines + the behaviour. In this case, a positive value of \PValue{afterskip} + results in a freestanding heading. You can use any values from + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} to + explicitly enable or disable a run-in heading.\\ + \bottomrule + \end{tabularx} +\end{table} + +\begin{table} + \caption[{Attributes of the \PValue{chapter} style when declaring a + sectioning command}]{Additional \PName{keys} and \PName{value}s for + attributes when declaring a sectioning command with the \PValue{chapter} + style}% + \label{tab:maincls-experts.declarechapterstyle.keys}% + \begin{tabularx}{\linewidth}{llX} + \toprule + \PName{key} & \PName{value} & Description \\ + \midrule + \PValue{afterindent}% + \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + & \PName{switch} + & The \PName{switch} determines whether to apply the indentation of the + first paragraph following a heading. With the default, \PValue{bysign}, + the sign of \PValue{beforeskip} defines the behaviour. If the value of + \PValue{beforeskip} is negative, the indentation of the paragraph + following the heading is suppressed. You can use any value from + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} to + explicitly enable or disable this indentation.\\ + \PValue{afterskip}% + \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + & \PName{length} + & The vertical skip below the heading.\\ + \PValue{beforeskip} + & \PName{length} + & The vertical skip before the heading. With + \OptionValue{afterindent}{bysign}, if the value is negative, a positive + distance\,---\,the amount of \PName{length}\,---\,is still inserted, but + in this case the indentation of the first paragraph following the heading + is suppressed.\\ + \PValue{font} & \PName{font commands} & The font setting to use for the + heading in addition to \DescRef{maincls.fontelement.disposition}. You + can use all settings, that are allowed for + \DescRef{maincls.cmd.setkomafont} and + \DescRef{maincls.cmd.addtokomafont} for this element.\\ + \PValue{innerskip} & \PName{length} & The vertical skip between the prefix + line and the heading's text, if a prefix line is used.\\ + \PValue{pagestyle} & \PName{page style name} & The name of the page style + to use automatically for pages with the heading. There is no check to + see if the \PName{page style name} is valid. Therefore, incorrect names + will result in error messages when the sectioning command is used.\\ + \PValue{prefixfont} & \PName{font commands} & The font setting to use + for the prefix line of the heading, in addition to the + \DescRef{maincls.fontelement.disposition} and sectioning command + elements. You can use all settings that are allowed for + \DescRef{maincls.cmd.setkomafont} and + \DescRef{maincls.cmd.addtokomafont} for the element of the prefix + line.\\ + \bottomrule + \end{tabularx} +\end{table} + +\begin{table} + \caption[{Attributes of the \PValue{part} style when declaring a sectioning + command}]{Additional \PName{keys} and \PName{value}s for attributes + when declaring a sectioning command with the \PValue{part} style}% + \label{tab:maincls-experts.declarepartstyle.keys}% + \begin{tabularx}{\linewidth}{llX} + \toprule + \PName{key} & \PName{value} & Description \\ + \midrule + \PValue{afterindent}% + \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}}% + & \PName{switch} + & The \PName{switch} determines whether to apply the indentation of the + first paragraph following a heading. With the value \PValue{bysign}, + the sign of \PValue{beforeskip} determines the behaviour. If the value + of \PValue{beforeskip} is negative, the indentation of the first + paragraph following the heading is suppressed. You can use any value + from \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} to + explicitly enable or disable this indentation. For compatibility, + the default is \PValue{false} for \Class{scrartcl} and \PValue{true} for + \Class{scrbook} and \Class{scrreprt}.\\ + \PValue{afterskip} & \PName{length} & The value is the vertical skip below + the heading.\\ + \PValue{beforeskip} + & \PName{length} + & The vertical skip before the heading. With + \OptionValue{afterindent}{bysign}, if the value is negative, a positive + distance\,---\,the amount of \PName{length}\,---\,is still inserted, but + in this case the indentation of the first paragraph following the heading + is suppressed.\\ + \PValue{font} & \PName{font commands} & The font setting to use for the + heading in addition to \DescRef{maincls.fontelement.disposition}. You + can use all settings that are allowed for + \DescRef{maincls.cmd.setkomafont} and + \DescRef{maincls.cmd.addtokomafont} for the element of the heading.\\ + \PValue{innerskip} & \PName{length} & % \OnlyAt{\Class{scrbook}\and + % \Class{scrreprt}}% + The vertical skip between the prefix line and the heading text in + \Class{scrbook} and \Class{scrreprt}.\\ + \PValue{pagestyle} & \PName{page style name} & + % \OnlyAt{\Class{scrbook}\and + % \Class{scrreprt}}% + The name of the page style to use automatically on pages with the + heading. There is no check to see if \PName{page style name} is valid. + Therefore, incorrect names will result in error messages when the + sectioning command is used. This feature only exists in \Class{scrbook} + and\Class{scrreprt}.\\ + \PValue{prefixfont} & \PName{font commands} & The font setting to use for + the prefix line of the heading, in addition to the + \DescRef{maincls.fontelement.disposition} and sectioning command + elements. You can use all settings that are allowed for + \DescRef{maincls.cmd.setkomafont} and + \DescRef{maincls.cmd.addtokomafont} for the element of the prefix + line.\\ + \bottomrule + \end{tabularx} +\end{table} + +\Macro{DeclareNewSectionCommand} defines a new sectioning command. If the +same \PName{name} is already used by \TeX{} for something else, the command +will result in an error message and will not define anything. + +\Macro{ProvideSectionSommand} behaves similarly but does not issue an error +message. + +\Macro{RedeclareSectionCommand}, on the other hand, can only change an +existing command to a sectioning command with the specified +\PName{attributes}. It does not check whether \Macro{\PName{name}} is already +a sectioning command. It only needs to be a \PName{name} already a \TeX +command. + +\Macro{DeclareSectionCommand} does not check whether or not \PName{name} is +an existing \TeX{} command name. It just defines a sectioning +command \Macro{\PName{name}} with the specified \PName{attributes}. + +Each sectioning command also has a corresponding counter with the same +\PName{name} that is allocated with \Macro{newcounter} if necessary. The same +naming rule applies to the corresponding output of the counter +(\Macro{the\PName{name}}), the counter's format (\Macro{\PName{name}format}), +the command to generate a running head (\Macro{\PName{name}mark}), the format +of the counter in the running head (\Macro{\PName{name}markformat}), the font +element (\FontElement{\PName{name}}), and the section-depth number +(\Macro{\PName{name}numdepth}). The command for the running head, +\Macro{\PName{name}mark}, is defined by default not to generate a running +head. The default output of the counter \Macro{the\PName{name}} is an Arabic +number. If the counter is defined as depending on another counter with the +\PValue{counterwithin} \PName{key}, the output of this counter will be +prefixed by a dot. + +In\ChangedAt[2016/03]{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} addition to the sectioning command itself, a command for +corresponding entries to the table of contents is also defined. This is done +using the \hyperref[cha:tocbasic]{\Package{tocbasic}}% +\important{\hyperref[cha:tocbasic]{\Package{tocbasic}}}\IndexPackage{tocbasic} +package. The \PName{tocstyle} attribute defines the style of those entries. If +you set an empty \PName{name}, e.\,g. using \OptionValue{tocstyle}{} or +\OptionValue{tocstyle}{\{\}}, the command for the TOC entry will not be +changed. This is important, for example, if you use another package to modify +the table of contents. If you do not set the \PValue{tocstyle} attribute, the +previous style will be used again during the redefinition. + +The\ChangedAt[2016/03]{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} different TOC-entry styles also have different additional +attributes. You can set them directly if you prefix them with \PValue{toc}. +For example, you can set the level of the TOC entries, \PValue{level}, using +\PValue{toclevel}, the indention, \PValue{indent}, using \PValue{tocindent}, +or the number width, \PValue{numwidth}, using \PValue{tocnumwidth}. For more +TOC-entry style attributes see \autoref{sec:tocbasic.tocstyle}, +\autopageref{sec:tocbasic.tocstyle}. + +\begin{Example} + For some unknown reason, you want to redefine the + \DescRef{maincls.cmd.paragraph} headings so that they are no longer run-in + headings but are similar to \DescRef{maincls.cmd.subsubsection}. The + vertical skip above the heading should be 10\Unit{pt} and no additional + vertical skip below the heading. To do so, you can use: +\begin{lstcode} + \RedeclareSectionCommand[% + beforeskip=-10pt,% + afterskip=1sp% + ]{paragraph} +\end{lstcode} + The negative value of \PValue{beforeskip} creates a positive vertical skip + before the heading and simultaneously disables the paragraph indentation of + the following text. Even though the specification did not want any vertical + skip after the heading, a value of 1\Unit{sp} has been given here. This is + because \LaTeX{} doesn't recognize 0\Unit{pt} as positive value. So + 1\Unit{sp} is the smallest possible positive value. + + Generally, it is better to have some tolerance for adjusting the vertical + spacing, the so-called \emph{glue}: +\begin{lstcode} + \RedeclareSectionCommand[% + beforeskip=-10pt plus -2pt minus -1pt,% + afterskip=1sp plus -1sp minus 1sp% + ]{paragraph} +\end{lstcode} + Note that the glue also switches the algebraic sign before becoming a skip, + if the value is negative. That is the reason for the negative glue values in + the example. Additionally we used the occasion to minimize the vertical skip + after the heading using glue too. +\end{Example} + +In the example above, we only needed to define the keys \PValue{beforeskip} +and \PValue{afterskip} because since v3.15 \KOMAScript{} has defined +\DescRef{maincls.cmd.paragraph} internally using +\Macro{DeclareSectionCommand}, and therefore the other settings can be adopted +unchanged. The original definition of \DescRef{maincls.cmd.paragraph} in +\Class{scrartcl} reads: +\begin{lstcode} + \DeclareSectionCommand[% + level=4, + indent=0pt, + beforeskip=3.25ex plus 1ex minus .2ex, + afterskip=-1em, + font={}, + tocindent=7em, + tocnumwidth=4.1em, + counterwithin=subsubsection + ]{paragraph} +\end{lstcode} +\Class{scrreprt} and \Class{scrbook} use slightly different values. + +Some settings of \DescRef{maincls.cmd.chapter} depend on the +\DescRef{maincls.option.headings} option (see \autoref{sec:maincls.structure}, +\DescPageRef{maincls.option.headings}). +\hyperref[tab:maincls.chapter.skips]{Table~\ref*{tab:maincls.chapter.skips}} +shows the default values of these settings. An overview of all settings is +shown in \autoref{tab:maincls.section.defaults}. For more +information\ChangedAt[2016/03]{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and +\Class{scrartcl}} about the default of the TOC-entry styles see +\autoref{sec:tocbasic.tocstyle}\important{\Package{tocbasic}}, +\autopageref{sec:tocbasic.tocstyle}. Note that \PValue{1ex} and +\Length{baselineskip} depend on the default font size of the heading or the +table of contents entry.% + +\begin{table} + \centering + \caption{Defaults for the chapter headings of \Class{scrbook} + and \Class{scrreprt} depending on the \DescRef{maincls.option.headings} + option} + \label{tab:maincls.chapter.skips} + \begin{tabular}{ll} + \multicolumn{2}{@{}l}{\bfseries + With \OptionValueRef{maincls}{headings}{big}:}\\ + \toprule + Attribute & Default Value \\ + \midrule + \PValue{afterskip} + & \PValue{1.725\Length{baselineskip} plus .115\Length{baselineskip} + minus .192\Length{baselineskip}} \\ + \PValue{beforeskip} + & \PValue{-3.3\Length{baselineskip}-\Length{parskip}} \\ + \PValue{font} & \Macro{huge} \\ + \bottomrule\\ + \multicolumn{2}{@{}l}{\bfseries + With \OptionValueRef{maincls}{headings}{normal}:}\\ + \toprule + Attribute & Default Value \\ + \midrule + \PValue{afterskip} + & \PValue{1.5\Length{baselineskip} plus .1\Length{baselineskip} + minus .167\Length{baselineskip}} \\ + \PValue{beforeskip} + & \PValue{-3\Length{baselineskip}-\Length{parskip}} \\ + \PValue{font} & \Macro{LARGE} \\ + \bottomrule\\ + \multicolumn{2}{@{}l}{\bfseries + With \OptionValueRef{maincls}{headings}{small}:}\\ + \toprule + Attribute & Default Value \\ + \midrule + \PValue{afterskip} + & \PValue{1.35\Length{baselineskip} plus .09\Length{baselineskip} + minus .15\Length{baselineskip}} \\ + \PValue{beforeskip} + & \PValue{-2.8\Length{baselineskip}-\Length{parskip}} \\ + \PValue{font} & \Macro{Large} \\ + \bottomrule + \end{tabular} +\end{table} + +%begin{table} +% \centering + \begin{longtable}{@{}p{\columnwidth}@{}} + \caption{Defaults for the headings of \Class{scrbook} and + \Class{scrreprt}}% + \label{tab:maincls.section.defaults}\\ + \endfirsthead + \caption[]{Default for the headings of \Class{scrbook} and + \Class{scrreprt} \emph{(continued)}}\\ + \addlinespace[-\normalbaselineskip] + \endhead + \raggedleft\dots\\ + \endfoot + \endlastfoot + \DescRef{maincls.cmd.part}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Attribute & Default Value \\ + \midrule + \PValue{afterskip} & \PValue{0pt plus 1fil} \\ + \PValue{beforeskip} & \PValue{0pt plus 1fil + \Length{baselineskip}} \\ + \PValue{font} & see element \DescRef{maincls.fontelement.part}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{innerskip} & \PValue{20pt} \\ + \PValue{level} & -1 \\ + \PValue{prefixfont} & see element + \DescRef{maincls.fontelement.partnumber}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{tocindent} & \PValue{0pt} \\ + \PValue{toclevel} & -1 \\ + \PValue{tocnumwidth} & \PValue{2em} \\ + \PValue{tocstyle} & \PValue{part} \\ + \bottomrule + \end{tabularx} \\ + \addlinespace[\normalbaselineskip] + \DescRef{maincls.cmd.chapter}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Attribute & Default Value \\ + \midrule + \PValue{afterskip} & see \autoref{tab:maincls.chapter.skips} \\ + \PValue{beforeskip} & see \autoref{tab:maincls.chapter.skips} \\ + \PValue{font} & see element \DescRef{maincls.fontelement.chapter}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{innerskip} & \PValue{0.5\Length{baselineskip}} \\ + \PValue{level} & 0 \\ + \PValue{prefixfont} & see element + \DescRef{maincls.fontelement.chapterprefix}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{tocindent} & \PValue{0pt} \\ + \PValue{toclevel} & 0 \\ + \PValue{tocnumwidth} & \PValue{1.5em} \\ + \PValue{tocstyle} & \PValue{chapter} \\ + \bottomrule + \end{tabularx} \\ + \addlinespace[\normalbaselineskip] + \DescRef{maincls.cmd.section}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Attribute & Default Value \\ + \midrule + \PValue{afterskip} & \PValue{2.3ex plus .2ex} \\ + \PValue{beforeskip} & \PValue{-3.5ex plus -1ex minus -.2ex} \\ + \PValue{font} & see element \DescRef{maincls.fontelement.section}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{indent} & \PValue{0pt} \\ + \PValue{level} & 1 \\ + \PValue{tocindent} & \PValue{1.5em}\\ + \PValue{toclevel} & 1 \\ + \PValue{tocnumwidth} & \PValue{2.3em}\\ + \PValue{tocstyle} & \PValue{section} \\ + \bottomrule + \end{tabularx} \\ + \addlinespace[\normalbaselineskip] + \DescRef{maincls.cmd.subsection}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Attribute & Default Value \\ + \midrule\nopagebreak + \PValue{afterskip} & \PValue{1.5ex plus .2ex} \\ + \PValue{beforeskip} & \PValue{-3.25ex plus -1ex minus -.2ex} \\ + \PValue{font} & see element + \DescRef{maincls.fontelement.subsection}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{indent} & \PValue{0pt} \\ + \PValue{level} & 2 \\ + \PValue{tocindent} & \PValue{3.8em}\\ + \PValue{toclevel} & 2 \\ + \PValue{tocnumwidth} & \PValue{3.2em}\\ + \PValue{tocstyle} & \PValue{section} \\ + \bottomrule + \end{tabularx} \\ + \addlinespace[\normalbaselineskip] + \DescRef{maincls.cmd.subsubsection}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Attribute & Default Value \\ + \midrule\nopagebreak + \PValue{afterskip} & \PValue{1.5ex plus .2ex} \\ + \PValue{beforeskip} & \PValue{-3.25ex plus -1ex minus -.2ex} \\ + \PValue{font} & see element + \DescRef{maincls.fontelement.subsubsection}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{indent} & \PValue{0pt} \\ + \PValue{level} & 3 \\ + \PValue{tocindent} & \PValue{7.0em}\\ + \PValue{tocnumwidth} & \PValue{4.1em}\\ + \PValue{toclevel} & 3 \\ + \PValue{tocstyle} & \PValue{section} \\ + \bottomrule + \end{tabularx} \\ + \addlinespace[\normalbaselineskip] + \DescRef{maincls.cmd.paragraph}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Attribute & Default Value \\ + \midrule\nopagebreak + \PValue{afterskip} & \PValue{-1em} \\ + \PValue{beforeskip} & \PValue{3.25ex plus 1ex minus .2ex} \\ + \PValue{font} & see element \DescRef{maincls.fontelement.paragraph}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{indent} & \PValue{0pt} \\ + \PValue{level} & 4 \\ + \PValue{tocindent} & \PValue{10em}\\ + \PValue{toclevel} & 4 \\ + \PValue{tocnumwidth} & \PValue{5em}\\ + \PValue{tocstyle} & \PValue{section} \\ + \bottomrule + \end{tabularx} \\ + \addlinespace[\normalbaselineskip] + \DescRef{maincls.cmd.subparagraph}: \\* + \begin{tabularx}{\linewidth}{ll} + \toprule + Attribute & Default Value \\ + \midrule\nopagebreak + \PValue{afterskip} & \PValue{-1em} \\ + \PValue{beforeskip} & \PValue{3.25ex plus 1ex minus .2ex} \\ + \PValue{font} & see element + \DescRef{maincls.fontelement.subparagraph}, + \autoref{tab:maincls.structureElementsFont}, + \autopageref{tab:maincls.structureElementsFont} \\ + \PValue{indent} & \Macro{scr@parindent} \\ + \PValue{level} & 5 \\ + \PValue{tocindent} & \PValue{12em}\\ + \PValue{toclevel} & 5 \\ + \PValue{tocnumwidth} & \PValue{6em}\\ + \PValue{tocstyle} & \PValue{section} \\ + \bottomrule + \end{tabularx} + \end{longtable} +%end{table} +Incidentally, the internal macro \Macro{scr@parindent} used in the settings +for \DescRef{maincls.cmd.subparagraph} is the paragraph indent set by the +\DescRef{maincls.option.parskip} option or the +\DescRef{maincls-experts.cmd.setparsizes} command. +\EndIndexGroup + + +\begin{Declaration} + \Macro{DeclareSectionCommands}\OParameter{attributes} + \Parameter{list of names}% + \Macro{DeclareNewSectionCommands}\OParameter{attributes} + \Parameter{list of names}% + \Macro{RedeclareSectionCommands}\OParameter{attributes} + \Parameter{list of names}% + \Macro{ProvideSectionCommands}\OParameter{attributes} + \Parameter{list of names} +\end{Declaration} +These\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} commands can define or change a whole series of +sectioning commands at once. The names of the sectioning commands are given by +the comma-separated \PName{list of names}. + +These commands differ in two other ways from the previously described commands +that only define or change a single sectioning command. First, in case of +error\,---\,that is if a command already exists with +\Macro{DeclareNewSectionCommands} or is undefined with +\Macro{RedeclareSectionCommands}\,---\,the definition will be performed +regardless. An appropriate an error message will, of course, be reported +anyway. + +Second, there is another attribute, +\important{\PValue{increaselevel}}\OptionVName{increaselevel}{integer}. This +attribute changes the meaning of the attributes \PValue{level} and +\PValue{toclevel} (see \autoref{tab:maincls-experts.declaresection.keys}) so +that their values become starting values for the first sectioning command of +the \PName{list of names}. For all other sectioning command in the \PName{list +of names}, the values of \PValue{level} and \PValue{toclevel} are successively +increased by the value of \PValue{increaselevel}. If the +\PValue{increaselevel} attribute is used without assigning a value, 1 is +assumed.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfSectionCommandStyleIs}\Parameter{name}\Parameter{style} + \Parameter{then code}\Parameter{else code} +\end{Declaration} +In\ChangedAt{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} +rare cases, it is useful to be able to test whether a sectioning command +belongs to a specific \PName{style}. If \KOMAScript{} has defined the +sectioning command \Macro{\PName{name}} using the given \PName{style}, the +\PName{then code} will be used. Otherwise the \PName{else code} will be +executed. An error is reported if \Macro{\PName{name}} is undefined or if it +is not a \KOMAScript{} sectioning command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{chapterheadstartvskip} + \Macro{chapterheadmidvskip} + \Macro{chapterheadendvskip} + \Macro{partheadstartvskip} + \Macro{partheadmidvskip} + \Macro{partheadendvskip} + \Macro{partheademptypage} +\end{Declaration} +These\important[i]{\DescRef{maincls.cmd.chapter}\\ + \DescRef{maincls.cmd.part}\\ + \DescRef{maincls.cmd.addchap}\\ + \DescRef{maincls.cmd.addpart}\\ + \DescRef{maincls.cmd.chapter*}\\ + \DescRef{maincls.cmd.part*}\\ + \DescRef{maincls.cmd.addchap*}\\ + \DescRef{maincls.cmd.addpart*}} commands are used inside the headings of the +previously described \PValue{chapter} and \PValue{part} styles and thus for +the definitions of \DescRef{maincls.cmd.chapter}\IndexCmd{chapter}, +\DescRef{maincls.cmd.part}\IndexCmd{part}, +\DescRef{maincls.cmd.addchap}\IndexCmd{addchap}, and +\DescRef{maincls.cmd.addpart}\IndexCmd{addpart}, as well as their starred +variants \DescRef{maincls.cmd.chapter*}\IndexCmd{chapter*}, +\DescRef{maincls.cmd.part*}\IndexCmd{part*}, +\DescRef{maincls.cmd.addchap*}\IndexCmd{addchap*}, and +\DescRef{maincls.cmd.addpart*}\IndexCmd{addpart*}. +The \Macro{chapterheadstartvskip} command is intended to insert a +vertical skip before the chapter heading. Similarly, +\Macro{chapterheadendvskip} is a command intended to insert a vertical +skip after the chapter heading. If\ChangedAt{v3.15}{\Class{scrbook}\and + \Class{scrreprt}} the chapter heading has a prefix number line (see option +\DescRef{maincls.option.chapterprefix} in \autoref{sec:maincls.structure}, +\DescPageRef{maincls.option.chapterprefix}), \Macro{chapterheadmidvskip} +is also used between the number line and the heading text. + +The \Macro{partheadstartvskip} and \Macro{partheadendvskip} commands insert +vertical skips above and below part headings. A page break is interpreted as +part of the vertical distance. Such a page break is part of the default +definitions of \Macro{partheadendvskip} in +\Class{scrbook}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} and +\Class{scrreprt}. The +\Macro{partheademptypage}\ChangedAt{v3.02}{\Class{scrbook}\and +\Class{scrreprt}} command produces an empty page after the part heading page +of \Class{scrbook} and \Class{scrreprt}. + +Starting with \KOMAScript~3.15\ChangedAt{v3.15}{\Class{scrbook}\and + \Class{scrreprt}\and \Class{scrartcl}}, the defaults of these seven commands +are independent from the \DescRef{maincls.option.headings} option (see +\autoref{sec:maincls.structure}, +\DescPageRef{maincls.option.headings}). The default definitions for the +chapter headings starting with +\KOMAScript~3.17\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} correspond to:\IndexLength{@tempskipa} +\begin{lstcode} + \newcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}} + \newcommand*{\chapterheadmidvskip}{\par\nobreak\vskip\@tempskipa} + \newcommand*{\chapterheadendvskip}{\vskip\@tempskipa} +\end{lstcode} +These defaults are reactivated every time you use +\OptionValueRef{maincls}{headings}{big}\IndexOption{headings}, +\OptionValueRef{maincls}{headings}{normal}, or +\OptionValueRef{maincls}{headings}{small}. As a side effect, these options may +affect not only chapter titles but all headings in the \PValue{chapter} style + +The \PValue{chapter} style automatically sets the internal length +\Length{@tempskipa} to the value that results from the +\DescRef{\LabelBase.cmd.DeclareSectionCommand}\IndexCmd{DeclareSectionCommand} +attribute \PValue{beforeskip} before calling \Macro{chapterheadstartvskip}. +Similarly, it sets this length to the value of the \PValue{afterskip} +attribute before calling \Macro{chapterheadendvskip}, and to +\PValue{innerskip} before calling \Macro{chapterheadmidvskip}. + +The default values of the distances of \DescRef{maincls.cmd.part} do not +depend on the \DescRef{maincls.option.headings} option. So the corresponding +commands will not be redefined by this option. +Their\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and +\Class{scrartcl}} default definitions in \Class{scrbook} and \Class{scrreprt} +correspond to: +\begin{lstcode} + \newcommand*{\partheadstartvskip}{% + \null\vskip-\baselineskip\vskip\@tempskipa + } + \newcommand*{\partheadmidvskip}{% + \par\nobreak + \vskip\@tempskipa + } + \newcommand*{\partheadendvskip}{% + \vskip\@tempskipa\newpage + } +\end{lstcode} +and of \Class{scrartcl}: +\begin{lstcode} + \newcommand*{\partheadstartvskip}{% + \addvspace{\@tempskipa}% + } + \newcommand*{\partheadmidvskip}{% + \par\nobreak + } + \newcommand*{\partheadendvskip}{% + \vskip\@tempskipa + } +\end{lstcode} +The \PValue{part} style once again sets the internal length +\Length{@tempskipa}\IndexLength{@tempskipa} according to the settings of +\DescRef{\LabelBase.cmd.DeclareSectionCommand}\IndexCmd{DeclareSectionCommand} +before using the commands. + +If you redefine one of the commands used for the vertical skip in the original +\Length{@tempskipa} but still want to be able to configure the lengths, for +example with \DescRef{\LabelBase.cmd.RedeclareSectionCommand}, you should also +use \Length{@tempskipa} in the new definition. +Since\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} you can more easily configure the distances above, within, +and below the headings using \DescRef{\LabelBase.cmd.RedeclareSectionCommand}, +you generally should not redefine the commands described here. Changing them +should be reserved for more complex changes that cannot be accomplished with +\DescRef{\LabelBase.cmd.RedeclareSectionCommand}. An\textnote{Example!} +example that redefines \Macro{chapterheadstartvskip} and +\Macro{chapterheadendvskip} to print extra rules above and below the chapter +heading can be found at \cite{homepage} (in German).% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{partlineswithprefixformat}% + \Parameter{level}\Parameter{number}\Parameter{text}% +\end{Declaration} +This\ChangedAt{v3.25}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} command is used by headings with the \PValue{part} style to +output the heading number and heading text. The \PName{number} and +\PName{text} arguments are already formatted, including the font +selections. Ultimately, this command controls the arrangement of the two parts +of the heading. For unnumbered headings, \PName{number} is a completely empty +argument, so it does not contain any formatting commands. + +The default definition is rather Spartan: +\begin{lstcode} + \newcommand{\partlineswithprefixformat}[3]{% + #2#3% + } +\end{lstcode} + +\begin{Example} + You want to have part headings in a light blue box with blue frame. The + box should occupy only about three quarters of full width of the text + area. So you try: +\begin{lstcode} + \documentclass{scrbook} + \usepackage{xcolor} + \renewcommand*{\partlineswithprefixformat}[3]{% + \fcolorbox{blue}{blue!25}{% + \parbox{.75\linewidth}{#2#3}% + }% + } + \begin{document} + \part{Framed Part} + \end{document} +\end{lstcode} + But surprisingly the heading is not longer centred\,---\,neither the box + itself nor the text inside the box. + + The reason for the missing centring of the box is that the end of the + paragraph is hidden in the third argument of the command. So it still + finishes the paragraph of the text inside the box but not the paragraph of + the \Macro{parbox} itself. To solve this you add a \Macro{par} at the end of + the definition. + + The reason for the missing centring inside the box is that the alignment of + \DescRef{maincls.cmd.raggedpart} is valid outside the box but not + automatically inside a \Macro{parbox}. To solve this you add + \Macro{raggedpart} inside the box. + + With +\begin{lstcode} + \documentclass{scrbook} + \usepackage{xcolor} + \renewcommand*{\partlineswithprefixformat}[3]{% + \fcolorbox{blue}{blue!25}{% + \parbox{.75\linewidth}{\raggedpart #2#3}% + }% + } + \par + \begin{document} + \part{Framed Part} + \end{document} +\end{lstcode} + you get the expected result. +\end{Example} + +As the example shows, users who redefine this command must watch out for +several side effects. In addition to preserving the text alignment, they also +must prevent page breaks within the headings, for example if they insert extra +paragraphs or space. The example above does not have this problem. Not only +does the box prevent a page breaks anyway, but \KOMAScript{} itself also +changes \Macro{interlinepenalty} as part of \PName{text} so to prevent page +breaks there. It also finishes \PName{text} with an internal paragraph break +using \Macro{@@par}. + +The default definition of \Macro{partlineswithprefixformat} does not use the +first argument, \PName{level}, nor is it needed in the example above. It is of +interest only if you want to define several commands with the \PValue{part} +style and need to distinguish the different levels. The predefined commands +\DescRef{maincls.cmd.part}, \DescRef{maincls.cmd.part*}, +\DescRef{maincls.cmd.addpart}, and \DescRef{maincls.cmd.addpart*} all share +the same \PName{level} \PName{part}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{chapterlineswithprefixformat}% + \Parameter{level}\Parameter{number}\Parameter{text}% + \Macro{chapterlinesformat}% + \Parameter{level}\Parameter{number}\Parameter{text} +\end{Declaration} +These\ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}} commands are used +by headings with the \PValue{chapter} style to output the heading number and +heading text, depending on the +\DescRef{maincls.option.chapterprefix}\IndexOption{chapterprefix}% +\textnote{\DescRef{maincls.option.chapterprefix}} option (see +\autoref{sec:maincls.structure}, +\DescPageRef{maincls.option.chapterprefix}). If the option is \PValue{true}, +\Macro{chapterlineswithprefixformat} is used. Otherwise +\Macro{chapterlinesformat} determines the ouput. + +The \PName{number} and \PName{text} arguments are already formatted, including +the font selections. Ultimately, these commands thus control the arrangement +of the two parts of the heading. For unnumbered headings, the \PName{number} +argument is completely empty, so it does not contain any formatting commands. + +The\textnote{default} defaults for these commands are: +\begin{lstcode} + \newcommand{\chapterlinesformat}[3]{% + \@hangfrom{#2}{#3}% + } + \newcommand{\chapterlineswithprefixformat}[3]{% + #2#3% + } +\end{lstcode} + +\begin{Example} + You want to have chapter headings with yellow background. For the headings + without a prefix line, you use the following definition in the document + preamble: +\begin{lstcode} + \makeatletter + \renewcommand{\chapterlinesformat}[3]{% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep}{% + \@hangfrom{#2}#3% + }% + }% + } + \makeatother +\end{lstcode} + For chapter headings with prefix line, you use: +\begin{lstcode} + \renewcommand{\chapterlineswithprefixformat}[3]{% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep}{% + #2#3% + }% + }% + } +\end{lstcode} + Unfortunately, you discover that these redefinitions result in justified + text for the headings. The reason is the \Macro{parbox} command. To change + this, you can use the \DescRef{maincls.cmd.raggedchapter} command (see + \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.raggedchapter}) + inside the argument of \Macro{parbox}. Otherwise \Macro{raggedchapter} would + be used only before \Macro{chapterlineswithprefixformat} and + \Macro{chapterlinesformat}: +\begin{lstcode} + \makeatletter + \renewcommand{\chapterlinesformat}[3]{% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep}{% + \raggedchapter + \@hangfrom{#2}#3% + }% + }% + } + \makeatother + \renewcommand{\chapterlineswithprefixformat}[3]{% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep}{% + \raggedchapter + #2#3% + }% + }% + } +\end{lstcode} + Remember to use \Macro{makeatletter} and \Macro{makeatother} only in the + document preamble. Do not use it inside your own wrapper class or package. + They are only needed here because of \Macro{@hangfrom} in the definition of + \Macro{chapterlinesformat}. +\end{Example} + +As the example shows, users who redefine this command must watch out for +several side effects. In addition to preserving the text alignment, they also +must prevent page breaks within the headings, for example if they insert extra +paragraphs or space. The example above does not have this problem. Not only +does the box prevent a page breaks anyway, but \KOMAScript{} itself also +changes \Macro{interlinepenalty} as part of \PName{text} so to prevent page +breaks there. It also finishes \PName{text} with an internal paragraph break +using \Macro{@@par}. + +Incidentally, the \DescRef{maincls.cmd.raggedchapter} command is not part of +\PName{text}, as otherwise using \Macro{MakeUppercase} inside redefined +versions of these two commands would be much more difficult. Note, however, +that typographic rules require individual adjustments of letter spacing in +capitalised text. However the \LaTeX{} \Macro{MakeUppercase} command does not +do this. + +The default definitions do not use the first argument, \PName{level}, nor is +it needed in the example above. It is of interest only if you want to define +several commands with the \PValue{chapter} style and need to distinguish the +different levels. The predefined commands \DescRef{maincls.cmd.chapter}, +\DescRef{maincls.cmd.chapter*}, \DescRef{maincls.cmd.addchap}, and +\DescRef{maincls.cmd.addchap*} all share the same \PName{level} +\PName{chapter}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{sectionlinesformat}% + \Parameter{level}\Parameter{indent}\Parameter{number}\Parameter{text}% + \Macro{sectioncatchphraseformat}% + \Parameter{level}\Parameter{indent}\Parameter{number}\Parameter{text}% +\end{Declaration} +These\ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}\and +\Class{scrartcl}} commands are used by headings with the \PValue{section} +style depending on whether the heading is run-in or on its own line. +Free-standing headings use \Macro{sectionlinesformat} for their output, while +run-in headings use \Macro{sectioncatchphraseformat}. + +In both cases \PName{indent} is the value of the horizontal indention of the +heading relative to the text area. If the value is negative, the heading can +protrude into the left margin. + +The arguments \PName{number} and \PName{text} are already formatted, including +the font settings. Ultimately, these commands thus control the arrangement of +the two parts of the heading. For unnumbered headings, the \PName{number} +argument is completely empty, so it does not contain any formatting commands. + +The default definitions are: +\begin{lstcode} +\newcommand{\sectionlinesformat}[4]{% + \@hangfrom{\hskip #2#3}{#4}% +} +\newcommand{\sectioncatchphraseformat}[4]{% + \hskip #2#3#4% +} +\end{lstcode} + +If you redefine one of these commands, you are responsible for preventing page +breaks inside heading. \KOMAScript{} itself only changes +\Macro{interlinepenalty} to impede page breaks. + +\begin{Example} + As in the previous example with chapter headings, the free-standing headings + of the \PValue{section} \PName{level} should now be printed with a + background colour. Headings of lower levels should not be changed: +\begin{lstcode} + \makeatletter + \renewcommand{\sectionlinesformat}[4]{% + \@tempswafalse + \Ifstr{#1}{section}{% + \hspace*{#2}% + \colorbox{yellow}{% + \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep-#2}{% + \raggedsection + \@hangfrom{#3}{#4}% + }% + }% + }{% + \@hangfrom{\hskip #2#3}{#4}% + }% + } + \makeatother +\end{lstcode} + With this code, area of the indention is not coloured if the heading is + indented. If, however, the heading is placed in the left margin with + negative indention, this area of the margin is also highlighted. You can + move the \Macro{hspace*} command into the \Macro{colorbox} to change this + behaviour. + + Again, remember to use \Macro{makeatletter} and \Macro{makeatother} only in + the document preamble. You should omit them inside your own wrapper class or + package. They are only needed because of \Macro{@hangfrom} in the definition + of \Macro{sectionlinesformat}. +\end{Example} + +The first argument, \PName{level}, is not used by the default definition. The +example shows how to use it to distinguish different heading levels of the +same style \PValue{section}.% +\EndIndexGroup + + +\begin{Declaration} +\DoHook{heading/preinit/\PName{name}}% +\DoHook{heading/postinit/\PName{name}}% +\DoHook{heading/branch/star/\PName{name}}% +\DoHook{heading/branch/nostar/\PName{name}}% +\DoHook{heading/begingroup/\PName{name}}% +\DoHook{heading/endgroup/\PName{name}}% +\end{Declaration} +\BeginIndex{}{hooks}% +In\ChangedAt[2019/01]{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} addition to all their attributes, +\DescRef{\LabelBase.cmd.DeclareSectionCommand}, +\DescRef{\LabelBase.cmd.DeclareNewSectionCommand}, +\DescRef{\LabelBase.cmd.ProvideSectionCommand} and +\DescRef{\LabelBase.cmd.RedeclareSectionCommand} provide several hooks in +sectioning commands that can be manipulated using +\DescRef{scrbase.cmd.AddtoDoHook}. For information about the functionality of +these \emph{do-hooks} see \autoref{sec:scrbase.hooks}, +\autopageref{sec:scrbase.hooks}. The last element of the specifier is the +\PName{name} of the sectioning command, as it is for the declaration commands +mentioned above. + +It is important\important{Attention!} to avoid adding code to these hooks that +would affect the page breaking or the position of the heading. Therefore only +advanced users should use these hooks. In case of doubt, refer to the class's +source code for information about exactly when a hook is executed. These hooks +serve as a fallback before you indeed would need to resort to redefining +a section command without using \KOMAScript{} features. + +The\textnote{\DoHHook{\dits/preinit/\dots}} hook +\DoHook{heading/preinit/\PName{name}} is executed immediately before the +sectioning command is initialised. At this point, no settings have been +initialised. Even the paragraph that precedes the heading is not +necessarily finished yet. + +The\textnote{\DoHook{\dots/postinit/\dots}} hook +\DoHook{heading/postinit/\PName{name}} is executed somewhat later. At this +point, some settings have been initialised and the previous paragraph has +already ended. + +Only\textnote{\DoHook{\dots/branch/\dots}} one of the hooks +\DoHook{heading/branch/nostar/\PName{name}} or +\DoHook{heading/branch/star/\PName{name}} is executed, after determining +whether the starred or normal variant of the section command is used. At this +point, the vertical gap above the heading has already been inserted. + +The\textnote{\DoHook{\dots/begingroup/\dots}} hook +\DoHook{heading/begingroup/\PName{name}} is executed at the beginning of +the group used to process the heading. This is also the last opportunity to +intervene before the heading is printed. + +Similarly\textnote{\DoHook{\dots/begingroup/\dots}}, the hook +\DoHook{heading/begingroup/\PName{name}} will be executed at the end of the +group used to process the heading. Currently this is the last hook inside +a section command. + +Note\textnote{\DescRef{maincls.cmd.minisec}} that +\DescRef{maincls.cmd.minisec} is not a real sectioning command and therefore +these hooks are not available for it.% +\EndIndexGroup + +\begin{Declaration} + \Macro{IfUseNumber}\Parameter{then code}\Parameter{else code} +\end{Declaration} +Strictly\ChangedAt{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} speaking, this is an internal command. It is defined +inside sectioning commands only between the \DoHook{\dots/begingroup/\dots} +and \DoHook{\dots/endgroup/\dots} hooks. In this case, the +\Parameter{then code} is executed if the sectioning heading uses the non-star +variant and should be numbered according to the value of +\DescRef{maincls.counter.secnumdepth}. If the heading should not be numbered +because the sectioning command uses the star variant or because of the value +of \DescRef{maincls.counter.secnumdepth}, the \PName{else code} is executed. +Headings in the \PValue{chapter} style also take into account whether +the headings appears in the main matter. + +If you use the command outside a sectioning command, the result is +unspecified. In this case, it will usually result in an error message and +execute neither the \PName{then code} nor the \PName{else code}.% +\EndIndexGroup + +\begin{Declaration} + \Macro{SecDef}\Parameter{star command}\Parameter{command}% + \Macro{scr@startsection}\Parameter{name}\Parameter{level}\Parameter{indent}% + \Parameter{beforeskip}\Parameter{afterskip}% + \Parameter{style commands}% + \OParameter{short version}\Parameter{heading}% + \labelsuffix[*]% + \Macro{scr@startsection}\Parameter{name}\Parameter{level}\Parameter{indent}% + \Parameter{beforeskip}\Parameter{afterskip}% + \Parameter{style commands}% + \PValue{*}\Parameter{heading}% + \labelsuffix% +\end{Declaration} +As\ChangedAt[2014/09]{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and +\Class{scrartcl}} already explained in \autoref{sec:maincls.structure} in the +description of the sectioning commands beginning with +\DescPageRef{maincls.cmd.chapter}, \KOMAScript{} provides additional features +for the optional argument of those commands. To achieve this, it was necessary +to replace some \LaTeX{} kernel commands: +\begin{itemize} +\item Instead of + \Macro{@startsection}\IndexCmd{@startsection}\important{\Macro{@startsection}} + \KOMAScript{} uses \Macro{scr@startsection}. However, the definition of + \Macro{@startsection} is checked. If the implementation differs from the + expected one, a warning is issued, several features of \KOMAScript{} + are deactivated, and \Macro{scr@startsection} uses a copy of + \Macro{@startsection} while \Macro{@startsection} is redefined to use + \Macro{scr@startsection}. +\item Instead of \Macro{@dblarg}\IndexCmd{@dblarg}\important{\Macro{@dblarg}} + \KOMAScript{} uses an internal command to define sectioning commands. +\item Instead of \Macro{secdef}\IndexCmd{secdef}\important{\Macro{secdef}}, + \KOMAScript{} uses \Macro{SecDef} to change \Macro{@dblarg} as + mentioned above. If the implementation of \Macro{secdef} differs from the + expected one, a warning is issued. +\item \Macro{@sect}\IndexCmd{@sect}\important{\Macro{@sect}} is redefined to + implement various extensions of \KOMAScript. +\item \Macro{@ssect}\IndexCmd{@ssect}\important{\Macro{@ssect}} is redefined + to implement various extensions of \KOMAScript. +\item \Macro{@xsect}\IndexCmd{@xsect}\important{\Macro{@xsect}} is redefined + to implement various extensions of \KOMAScript. +\end{itemize} +In future versions of \KOMAScript{}, consideration is being given to avoid +changing the \LaTeX{} kernel commands mentioned above and to replace them +completely with custom, internal commands. Loading truly incompatible +sectioning packages would automatically disable \KOMAScript{} extensions +and transfer the responsibility for the sectioning commands entirely +to these packages. On the other hand, extra effort would be required +to maintain compatibility with other packages. + +Package authors can use these commands as they would use the corresponding +\LaTeX{} kernel commands and therefore gain access to the additional features +of \KOMAScript. However, these commands should not be redefined, as they may +changed at any time, and then this redefinition could compromise +\KOMAScript{}'s functionality. The meaning of the parameters for these +commands can be found in the \LaTeX{} kernel manual \cite{latex:source2e}. +As\ChangedAt[2019/01]{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} an alternative to redefining such commands, \KOMAScript{} +offers the hooks described previously.% +\EndIndexGroup + +\begin{Explain} + \begin{Declaration} + \Macro{At@startsection}\Parameter{code} + \Macro{Before@ssect}\Parameter{code} + \Macro{Before@sect}\Parameter{code} + \end{Declaration} + Until\ChangedAt[2019/01]{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} \KOMAScript~v3.26b, these commands were available as an + alternative to redefine \DescRef{\LabelBase.cmd.scr@startsection} or + \DescRef{\LabelBase.cmd.SecDef}. Since\textnote{outdated \KOMAScript{} + command} \KOMAScript~v3.27, these commands are deprecated. + + Internally \Macro{At@startsection} is now implemented with the + \DescRef{\LabelBase.dohook.heading/postinit} hook. \Macro{Before@ssect} is + implemented with \DescRef{\LabelBase.dohook.heading/branch/star}, and + \Macro{Before@sect} uses + \DescRef{\LabelBase.dohook.heading/branch/nostar}. The \PName{code} is added + using \DescRef{scrbase.cmd.AddtoDoHook}. There are no provisions to remove + this code once it has been added.% + \EndIndexGroup +\end{Explain} + +% \section{Appendix} +% \seclabel{appendix} + + +\begin{Declaration} + \Macro{appendixmore} +\end{Declaration}% +The \KOMAScript{} classes have an unusual feature within the +\DescRef{maincls.cmd.appendix} command. If the \Macro{appendixmore} command +is defined, \DescRef{maincls.cmd.appendix} will also execute this +it. Internally, the \KOMAScript{} classes +\Class{scrbook}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} and +\Class{scrreprt} take advantage of this behaviour to implement the +\DescRef{maincls.option.appendixprefix} layout option (see +\autoref{sec:maincls.structure}, +\DescPageRef{maincls.option.appendixprefix}). You\textnote{Attention!} should +take note of this in case you decide to define or redefine the +\Macro{appendixmore} macro. If this option has been used, you will receive an +error message when using \verb|\newcommand{\appendixmore}{|\dots\verb|}|. This +behaviour is intended to prevent you from overriding the options without +realising it. + +\begin{Example} + You do not want the chapters in the main part of the classes \Class{scrbook} + or \Class{scrreprt} to be introduced by a prefix line (see the + \DescRef{maincls.option.chapterprefix} layout option in + \autoref{sec:maincls.structure}, + \DescPageRef{maincls.option.chapterprefix}). For consistency, you also do + not want such a line in the appendix either. Instead, you would like to see + the word ``Chapter'' in the language of your choice written in front of the + chapter letter and, simultaneously, in the page headings. Instead of using + the \DescRef{maincls.option.appendixprefix} layout option, you define the + following in the document preamble: +% +\begin{lstcode} + \newcommand*{\appendixmore}{% + \renewcommand*{\chapterformat}{% + \appendixname~\thechapter\autodot\enskip} + \renewcommand*{\chaptermarkformat}{% + \appendixname~\thechapter\autodot\enskip} + } +\end{lstcode} +% + In case you subsequently change your mind and decide to use the option + \DescRef{maincls.option.appendixprefix} at a later stage, you will get an + error message because of the already defined \Macro{appendixmore} command. + This behaviour prevents the definition made above from invisibly changing + the settings intended with the option. + + It is also possible to get a similar behaviour for the appendix of the class + \Class{scrartcl}. For example, you can write in the preamble of your + document: +\begin{lstcode}[moretexcs={ifthenelse,equal}] + \newcommand*{\appendixmore}{% + \renewcommand*{\sectionformat}{% + \appendixname~\thesection\autodot\enskip}% + \renewcommand*{\sectionmarkformat}{% + \appendixname~\thesection\autodot\enskip}} +\end{lstcode} + + The redefined commands are explained in more detail in + \autoref{sec:maincls.structure}, + \DescPageRef{maincls.cmd.chapterformat} and + \DescPageRef{maincls.cmd.chaptermarkformat}. +\end{Example} +% +\EndIndexGroup + + +\section{Bibliography} +\seclabel{bibliography} + +The information in this section is less important if you use packages like +\Package{biblatex}. In that case, the extensive features of such packages +will supersede the extensions of the \KOMAScript{} classes described here. + +\begin{Declaration} + \Macro{newbibstyle}\OParameter{parent style}\Parameter{name}%^^A + \Parameter{commands}% + \Macro{newblock}% + \Macro{@openbib@code}% + \Macro{bib@beginhook}% + \Macro{bib@endhook} +\end{Declaration} +The standard classes\textnote{standard classes} already provide the +\Macro{newblock} command to structure bibliography entries. The exact purpose +of this command depends on the class options. Using option +\Option{openbib}\important{\Option{openbib}} redefines the commands +\Macro{@openbib@code} and \Macro{newblock} itself at the end of the standard +class. The standard classes execute the \Macro{@openbib@code} command when +starting the bibliography list, or more precisely, when defining the +parameters for the list. You can assume that many packages which redefine the +bibliography will execute this command. + +The \KOMAScript{} classes\textnote{\KOMAScript} do something similar. However, +they do not redefine \Macro{@openbib@code} at the end of the class. Instead, +\Macro{newbibstyle} defines the \PValue{openstyle} bibliography style. The +\PName{commands} given in the implementation contain the appropriate +redefinition of \Macro{@openbib@code} and \Macro{newblock}. If you select this +bibliography style using the +\OptionValueRef{maincls}{bibliography}{openstyle}% +\IndexOption{bibliography~=\PValue{openstyle}}% +\important{\OptionValueRef{maincls}{bibliography}{openstyle}} option, the +\PName{commands} will be executed immediately. This will redefine +\Macro{@openbib@code} and \Macro{newblock}. + +In addition to \Macro{@openbib@code} and \Macro{newblock}, +\Macro{bib@beginhook} and \Macro{bib@endhook} can also be redefined by the +\PName{commands} of the style. The \Macro{bib@beginhook} command is executed +immediately after the heading and preamble of the bibliography but before the +beginning of the list of bibliographic entries. The \Macro{bib@endhook} +command will be executed immediately after this list, at the end of the +bibliography. If \DescRef{maincls.cmd.BreakBibliography} (see +\autoref{sec:maincls.bibliography}, +\DescPageRef{maincls.cmd.BreakBibliography}) is used to interrupt the +bibliography, these commands will also executed at the beginning and end of +each part of the bibliography, immediately before and after +\DescRef{maincls.cmd.BreakBibliography}. + +The \Macro{newblock}, \Macro{@openbib@code}, \Macro{bib@beginhook}, and +\Macro{bib@endhook} commands are initially defined to be empty when using a +new bibliography style. After this, the \PName{commands} of the \PName{parent +style} that was optionally specified when defining the style will be executed, +followed by the \PName{commands} for the bibliography style itself. As a +result, these commands must be defined, if necessary, with +\Macro{renewcommand}\IndexCmd{renewcommand}\important{\Macro{renewcommand}}, +not \Macro{newcommand}, inside the \PName{instructions} argument. + +If you use the +\DescRef{maincls.cmd.AtEndBibliography}\IndexCmd{AtEndBibliography} and +\DescRef{maincls.cmd.AfterBibliographyPreamble}% +\IndexCmd{AfterBibliographyPreamble} commands to declare additional +\PName{commands} to be executed after the preamble or at the end of the +bibliography, the \PName{commands} specified with +\DescRef{maincls.cmd.AfterBibliographyPreamble} will only be executed once, at +the beginning of the bibliography after the \Macro{bib@beginhook} +\PName{commands}, and the \PName{commands} of +\DescRef{maincls.cmd.AtEndBibliography} will be executed only once at the end +of the bibliography, before \Macro{bib@endhook}. + +For\textnote{Example!} example, the +\Package{multicol}\IndexPackage{multicol}\important{\Package{multicol}} +package (see \cite{package:multicol}) could be used to define a bibliography +style for printing the bibliography with two columns: +% Umbruchkorrektur: listings korrigiert +\begin{lstcode} + \newbibstyle{twocolumstyle}{% + \renewcommand*{\bib@beginhook}{\begin{multicols}{2}}% + \renewcommand*{\bib@endhook}{\end{multicols}}}% +\end{lstcode} +If you also want to define an open variation of this style, you can use +the possibilities of inheritance here and specify a \PName{parent style}: +% Umbruchkorrektur: listings korrigiert +\begin{lstcode} + \newbibstyle{twocolumopenstyle}[openstyle]{% + \renewcommand*{\bib@beginhook}{\begin{multicols}{2}}% + \renewcommand*{\bib@endhook}{\end{multicols}}}% +\end{lstcode} +You can then select these newly defined styles with the +\DescRef{maincls.option.bibliography} option as usual. + +Like\textnote{Achtung!} \DescRef{maincls.cmd.BreakBibliography}, these +commands lose all or part of their effect when \Environment{thebibliography} +is redefined, for example by using +\Package{biblatex}\IndexPackage{biblatex}\important{\Package{biblatex}}.% +\EndIndexGroup + + +\section{More or Less Obsolete Options and Commands} +\seclabel{obsolete} + +\LoadNonFree{scrbookreportarticle-experts}{4} +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrdate-de.tex b/macros/latex/contrib/koma-script/doc/scrdate-de.tex new file mode 100644 index 0000000000..cbe41d99c1 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrdate-de.tex @@ -0,0 +1,333 @@ +% ====================================================================== +% scrdate-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrdate of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{scrdate-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrdate, scrtime)] + +\chapter{Der Wochentag mit \Package{scrdate}} +\labelbase{scrdate} +\BeginIndexGroup +\BeginIndex{Package}{scrdate} + +\iffalse% Varianten +Ursprünglich sollte das Paket \Package{scrdate} lediglich den Wochentag zum +aktuellen Datum liefern. Inzwischen bietet es dies und etwas mehr für jedes +beliebige Datum im Gregorianischen Kalender.% +\else% +Vor \the\numexpr\year-1995\relax{} Jahren nur für die Ausgabe des aktuellen +Wochentags entwickelt, bietet \Package{scrdate} inzwischen einiges mehr. +\fi + +\begin{Declaration} + \Macro{CenturyPart}\Parameter{Jahr} + \Macro{DecadePart}\Parameter{Jahr} +\end{Declaration}% +Die\ChangedAt{v3.05a}{\Package{scrdate}} Anweisung \Macro{CenturyPart} ergibt +den Wert der Jahrhundert-Stellen eines Jahres. Die Anweisung +\Macro{DecadePart} ergibt hingegen den Wert der übrigen Stellen, also der +Einer und Zehner. Dabei darf die Jahreszahl beliebig viele Stellen aufweisen. +Der Wert kann direkt zur Zuweisung an einen Zähler oder für Berechnungen mit +Hilfe von \Macro{numexpr}\IndexCmd{numexpr} verwendet werden. Für die +Ausgabe\textnote{Achtung!} als arabische Zahl ist \Macro{the}\IndexCmd{the} +voranzustellen. +% +\begin{Example} + Sie wollen berechnen, in welchem Jahrhundert das aktuelle Jahr liegt und + dies ausgeben. +\begin{lstcode} + Das Jahr \the\year\ ist das Jahr + \the\DecadePart{\year} des + \the\numexpr \CenturyPart{\year}+1\relax. + Jahrhunderts. +\end{lstcode} + Als Ergebnis erhalten Sie: + \begin{ShowOutput} + Das Jahr \the\year\ ist das Jahr \the\DecadePart{\year} des \the\numexpr + \CenturyPart{\year}+1\relax. Jahrhunderts. + \end{ShowOutput} + Durch die Korrektur der Ordnungszahl mit \Macro{numexpr} wäre 2000 + übrigens das Jahr 0 des 21.~Jahrhunderts. +\end{Example}% +\EndIndexGroup% +\ExampleEndFix + + +\begin{Declaration} + \Macro{DayNumber}\Parameter{Jahr}\Parameter{Monat}\Parameter{Tag} + \Macro{ISODayNumber}\Parameter{ISO-Datum} +\end{Declaration}% +Diese\ChangedAt{v3.05a}{\Package{scrdate}} beiden Anweisungen geben den Wert +der Nummer des Wochentags\Index{Wochentag} zu einem Datum zurück. Sie +unterscheiden sich nur in der Art der Angabe des Datums. Während bei +\Macro{DayNumber} Jahr, Monat und Tag des gewünschten Datums eigene Parameter +sind, wird bei \Macro{ISODayNumber} das Datum in ISO-Schreibweise +\PName{Jahr}\texttt{-}\PName{Monat}\texttt{-}\PName{Tag} angegeben. Dabei +spielt es keine Rolle, ob Monat und Tag ein- oder zweistellig angegeben +werden. Der Wert kann direkt zur Zuweisung an einen Zähler oder für +Berechnungen mit Hilfe von \Macro{numexpr}\IndexCmd{numexpr} verwendet +werden. Für die Ausgabe\textnote{Achtung!} als arabische Zahl ist +\Macro{the}\IndexCmd{the} voran zu stellen. + +\begin{Example} + Sie wollen die Nummer des Wochentags des 1.~Mai~2027 wissen. +\begin{lstcode} + Der 1.~Mai~2027 hat die Wochentagsnummer + \the\ISODayNumber{2027-5-1}. +\end{lstcode} + Als Ergebnis erhalten Sie: + \begin{ShowOutput} + Der 1.~Mai~2027 hat die Wochentagsnummer + \the\ISODayNumber{2027-5-1}. + \end{ShowOutput} +\end{Example} + +Als Besonderheit ist es sogar möglich, von einem vorgegebenen Datum eine +gewünschte Anzahl an Tagen in die Zukunft oder Vergangenheit zu gehen. +\begin{Example} + Sie wollen die Nummer des Wochentags wissen, den wir in 12~Tagen haben und + den wir 24~Tage vor dem 24.~Dezember~2027 gehabt haben werden. +\begin{lstcode} + In 12~Tagen haben wir die Wochentagsnummer + \the\DayNumber{\year}{\month}{\day+12} und + 24~Tage vor dem 24.~Dezember~2027 wird es + die Nummer \the\ISODayNumber{2027-12-24-24} + gewesen sein. +\end{lstcode} + Als Ergebnis erhalten Sie beispielsweise: + \begin{ShowOutput} + In 12~Tagen haben wir die Wochentagsnummer + \the\DayNumber{\year}{\month}{\day+12} und + 24~Tage vor dem 24.~Dezember~2027 wird es + die Nummer \the\ISODayNumber{2027-12-24-24} + gewesen sein. + \end{ShowOutput} +\end{Example} + +Die Wochentage werden dabei wie folgt nummeriert: Sonntag\,=\,0, Montag\,=\,1, +Dienstag\,=\,2, Mittwoch\,=\,3, Donnerstag\,=\,4, Freitag\,=\,5 und +Samstag\,=\,6.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DayNameByNumber}\Parameter{Wochentagsnummer} + \Macro{DayName}\Parameter{Jahr}\Parameter{Monat}\Parameter{Tag} + \Macro{ISODayName}\Parameter{ISO-Datum} +\end{Declaration}% +Üblicherweise\ChangedAt{v3.05a}{\Package{scrdate}} ist man weniger an der +Nummer eines Wochentags als dem Namen des Wochentags interessiert. Daher +liefert die Anweisung \Macro{DayNameByNumber} den Namen des Wochentags zu +einer Wochentagsnummer zurück, die man beispielsweise mit einer der beiden +zuvor erklärten Anweisungen \DescRef{\LabelBase.cmd.DayNumber} oder +\DescRef{\LabelBase.cmd.ISODayNumber} bestimmt hat. Die beiden Anweisungen +\Macro{DayName} und \Macro{ISODayName} liefern entsprechend den Wochentag zu +einem bestimmten Datum. + +\begin{Example} + Sie wollen den Wochentag des 24.~Dezembers~2027 wissen. +\begin{lstcode} + Bitte zahlen Sie bis zum \ISODayName{2027-12-24}, + den 24.\,12.~2027, die Summe von \dots +\end{lstcode} + Als Ergebnis erhalten Sie: + \begin{ShowOutput} + Bitte zahlen Sie bis zum + \ISODayName{2027-12-24}, den + 24.\,12.~2027, die Summe von \dots + \end{ShowOutput} +\end{Example} + +Als Besonderheit ist es auch hier möglich, in gewissem Umfang Berechnungen +anzustellen: +\begin{Example} + Sie wollen den Wochentag wissen, den wir in 12~Tagen haben und + den wir 24~Tage vor dem 24.~Dezember~2027 gehabt haben werden. +\begin{lstcode} + In 12~Tagen haben wir einen + \DayName{\year}{\month}{\day+12} und + 24~Tage vor dem 24.~Dezember~2027 ist ein + \ISODayName{2027-12-24-24}, während zwei Wochen + und drei Tage nach einem Mittwoch ein + \DayNameByNumber{3+2*7+3} folgt. +\end{lstcode} + Als Ergebnis erhalten Sie beispielsweise: + \begin{ShowOutput} + In 12~Tagen haben wir einen + \DayName{\year}{\month}{\day+12} und + 24~Tage vor dem 24.~Dezember~2027 ist ein + \ISODayName{2027-12-24-24}, während + zwei Wochen und drei Tage nach + einem Mittwoch ein \DayNameByNumber{3+2*7+3} + folgt. + \end{ShowOutput} +\end{Example}% +% +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \Macro{ISOToday} + \Macro{IsoToday} + \Macro{todaysname} + \Macro{todaysnumber} +\end{Declaration}% +In den bisherigen Beispielen dieses Abschnitts wurde das aktuelle Datum immer +recht umständlich über die \TeX-Register \Macro{year}\IndexCmd{year}, +\Macro{month}\IndexCmd{month}, \Macro{day}\IndexCmd{day} bestimmt. Die +Anweisungen \Macro{ISOToday}\ChangedAt{v3.05a}{\Package{scrdate}} und +\Macro{IsoToday} liefern direkt das aktuelle Datum in ISO-Schreibweise. Sie +unterscheiden sich lediglich darin, dass \Macro{ISOToday} Monat und Tag immer +zweistellig ausgibt, während \Macro{IsoToday} Monat und Tag bei Werten kleiner +10 einstellig ausgibt. Die Anweisung \Macro{todaysname} bietet direkt den +aktuellen Wochentag, während \Macro{todaysnumber} den Wert des aktuellen +Wochentags liefert. Näheres zur Verwendung dieses Wertes ist den obigen +Erklärungen zu den Anweisungen \DescRef{scrdate.cmd.DayNumber} und +\DescRef{scrdate.cmd.ISODayNumber} zu entnehmen. + +\begin{Example} + Ich will Ihnen zeigen, an was für einem Wochentag dieses Dokument gesetzt + wurde. Dazu schreibe ich: +\begin{lstcode} + Dieses Dokument entstand an einem \todaysname. +\end{lstcode} + Das Ergebnis lautet: + \begin{ShowOutput} + Dieses Dokument entstand an einem \todaysname. + \end{ShowOutput} +\end{Example} + +\begin{Explain} + Wenn\textnote{Tipp!} Sie den Namen des Tages in Kleinbuchstaben benötigen, + weil das in der entsprechenden Sprache innerhalb des Satzes so üblich ist, + können Sie das erreichen, obwohl die Namen der Wochentage in + \Package{scrdate} alle groß geschrieben sind. Greifen Sie mit +\begin{lstcode} + \MakeLowercase{\todaysname} +\end{lstcode} + einfach auf die \LaTeX-Anweisung + \Macro{MakeLowercase}\IndexCmd{MakeLowercase}% + \important{\Macro{MakeLowercase}} zurück. Diese wandelt ihr Argument + komplett in Kleinbuchstaben. Natürlich funktioniert dieser Tipp auch für + obige Anweisungen + \DescRef{scrdate.cmd.DayNameByNumber}\IndexCmd{DayNameByNumber}, + \DescRef{scrdate.cmd.DayName}\IndexCmd{DayName} und + \DescRef{scrdate.cmd.ISODayName}\IndexCmd{ISODayName}.% +\end{Explain}% +\EndIndexGroup + + +\begin{Declaration} + \Macro{nameday}\Parameter{Name} +\end{Declaration}% +So wie mit \DescRef{maincls.cmd.date}\IndexCmd{date} die Ausgabe von +\Macro{today} direkt geändert werden kann, setzt \Macro{nameday} die Ausgabe +von \DescRef{scrdate.cmd.todaysname} auf den Wert \PName{Name}. +\begin{Example} + Sie setzen mit \DescRef{maincls.cmd.date} das aktuelle Datum auf einen + festen Wert. Für die Ausgabe des zugehörigen Wochentags interessiert es nur, + dass dieser Tag ein Werktag war. Daher schreiben Sie +\begin{lstcode} + \nameday{Werktag} +\end{lstcode} + und erhalten so mit dem Satz aus dem vorherigen Beispiel zu + \DescRef{scrdate.cmd.todaysname}: + \begin{ShowOutput}\nameday{Werktag} + Dieses Dokument entstand an einem {\todaysname}. + \end{ShowOutput} +\end{Example} +Für \DescRef{scrdate.cmd.ISOToday}\IndexCmd{ISOToday} und +\DescRef{scrdate.cmd.IsoToday}\IndexCmd{IsoToday} existieren keine +entsprechenden Anweisungen.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{newdaylanguage}\Parameter{Sprache} + \Parameter{Montag}\Parameter{Dienstag} + \Parameter{Mittwoch}\Parameter{Donnerstag} + \Parameter{Freitag}\Parameter{Samstag} + \Parameter{Sonntag} +\end{Declaration} +Das \Package{scrdate}-Paket beherrscht derzeit die folgenden Sprachen: +\begin{itemize}\raggedright\setlength{\itemsep}{.5\itemsep} +\item Dänisch (\PValue{danish}), +\item Deutsch (\PValue{austrian}\ChangedAt{v3.08b}{\Package{scrdate}}, + \PValue{german}, \PValue{naustrian}, \PValue{ngerman}, \PValue{nswissgerman}, + \PValue{swissgerman}\ChangedAt{v3.13}{\Package{scrdate}}), +\item Englisch (\PValue{american}\ChangedAt{v3.13}{\Package{scrdate}}, + \PValue{australian}, \PValue{british}, \PValue{canadian}, \PValue{english}, + \PValue{newzealand}, \PValue{UKenglish}, \PValue{ukenglish}, + \PValue{USenglish}, \PValue{usenglish}), +\item Finnisch (\PValue{finnish}), +\item Französisch (\PValue{acadian}, \PValue{canadien}, + \PValue{francais}\ChangedAt{v3.13}{\Package{scrdate}}, \PValue{french}), +\item Italienisch (\PValue{italian}), +\item Kroatisch (\PValue{croatian}), +\item Niederländisch (\PValue{dutch}), +\item Norwegisch (\PValue{norsk}), +\item Polnisch (\PValue{polish}\ChangedAt{v3.13}{\Package{scrdate}}), +\item Schwedisch (\PValue{swedish}), +\item Slowakisch (\PValue{slovak}), +\item Spanisch (\PValue{spanish}), +\item Tschechisch (\PValue{czech}\ChangedAt{v3.13}{\Package{scrdate}}). +\end{itemize} +Es kann aber auch für andere Sprachen konfiguriert werden. Dazu gibt man als +erstes Argument von \Macro{newdaylanguage} den Namen der Sprache an und als +weitere Parameter die Namen der entsprechenden Wochentage. + +Bei der aktuellen Version ist es auch egal, ob \Package{scrdate} vor oder nach +\Package{ngerman}\IndexPackage{ngerman}, \Package{babel}\IndexPackage{babel} +oder ähnlichen Paketen geladen wird, in jedem Falle wird die korrekte Sprache +gewählt, vorausgesetzt diese wird unterstützt. + +\begin{Explain} + Etwas genauer ausgedrückt: Solange die Sprachauswahl in einer zu + \Package{babel}\IndexPackage{babel} kompatiblen Form erfolgt und die Sprache + \Package{scrdate} bekannt ist, wird die Sprache korrekt gewählt. Ist dies + nicht der Fall, werden (US-)englische Ausdrücke verwendet. +\end{Explain} + +Natürlich ist es sinnvoll Definitionen für bisher nicht unterstützte Sprachen +an den \KOMAScript-Autor zu melden. In diesem Fall stehen die Chancen gut, +dass künftige \KOMAScript-Versionen die Sprache ebenfalls unterstützen +werden.% +\EndIndexGroup +% +\EndIndexGroup + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + + +% LocalWords: Gregorianischen Zählweise Ordnungszahl diff --git a/macros/latex/contrib/koma-script/doc/scrdate-en.tex b/macros/latex/contrib/koma-script/doc/scrdate-en.tex new file mode 100644 index 0000000000..fe66f3e05a --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrdate-en.tex @@ -0,0 +1,326 @@ +% ====================================================================== +% scrdate-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrdate of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrdate-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrdate)] +\translator{Markus Kohm\and Gernot Hassenpflug\and Karl Hagen} + +\chapter{The Day of the Week with \Package{scrdate}} +\labelbase{scrdate} +\BeginIndexGroup +\BeginIndex{Package}{scrdate} + +Originally, the \Package{scrdate} package could only give the day of the week +for the current date. Nowadays, it offers this and more for any date in the +Gregorian calendar. + +\begin{Declaration} + \Macro{CenturyPart}\Parameter{year}\\% + \Macro{DecadePart}\Parameter{year}% +\end{Declaration}% +The\ChangedAt{v3.05a}{\Package{scrdate}} \Macro{CenturyPart} command returns +the value of the century digits\,---\,thousands and hundreds\,---\,of a +\PName{year}. The \Macro{DecadePart} command, on the other hand, gives the +value of the remaining digits, i.\,e. the tens and the units. The +\PName{year} can have any number of digits. You can assign the value directly +to a counter or use it for calculations with +\Macro{numexpr}\IndexCmd{numexpr}. To output\textnote{Attention!} it as an +Arabic number, you should prefix it with \Macro{the}\IndexCmd{the}. + +\begin{Example} + You want to calculate and print the century of the current year. +\begin{lstcode} + The year \the\year\ is year \the\DecadePart{\year} + of the \engord{\numexpr\CenturyPart{\year}+1\relax} century. +\end{lstcode} + The result would be: + \begin{ShowOutput} + The year \the\year\ is year \the\DecadePart{\year} + of the \engordnumber{\numexpr\CenturyPart{\year}+1\relax} century. + \end{ShowOutput} + This example uses the \Package{engord}\IndexPackage{engord} package. + See \cite{package:engord} for more information. +\end{Example} + +Note\textnote{Attention!} that the counting method used here treats the year +2000 as year~0\,---\,and therefore the first year\,---\,of the 21st~century. +If necessary, however, you can make a correction with \Macro{numexpr}, as +shown for the ordinal number in the example.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DayNumber}\Parameter{year}\Parameter{month}\Parameter{day}\\% + \Macro{ISODayNumber}\Parameter{ISO-date}% +\end{Declaration}% +These\ChangedAt{v3.05a}{\Package{scrdate}} two commands return the value of +the day-of-the-week\Index{day>of the week} number for any date. They differ +only in the method of specifying the date. While the \Macro{DayNumber} command +requires the \PName{year}, \PName{month}, and \PName{day} as separate +parameters, the \Macro{ISODayNumber} command expects an \PName{ISO-date} as a +single argument, \PName{ISO-date}, using the ISO notation +\PName{year}\texttt{-}\PName{month}\texttt{-}\PName{day}. It does not matter +if the \PName{month} or \PName{day} have one or two digits. You can use the +result of both commands to assign directly to a counter or for calculations +using \Macro{numexpr}\IndexCmd{numexpr}. To print\textnote{Attention!} it as +an Arabic number, you should prefix it with \Macro{the}\IndexCmd{the}. + +\begin{Example} + You want to know the number of the day of the week of the 1st~May~2027. +\begin{lstcode} + The 1st~May~2027 has \the\ISODayNumber{2027-5-1} + as the number of the day of the week. +\end{lstcode} + The result will be: + \begin{ShowOutput} + The 1st~May~2027 has \the\ISODayNumber{2027-5-1} + as the number of the day of the week. + \end{ShowOutput} +\end{Example} + +It is particularly worth noting that you can even step a specified number of +days into the future or or the past from a given date. +\begin{Example} + You want to know the number of the day of the week 12~days from now + and 24~days before the 24th~December~2027. +\begin{lstcode} + In 12~days, the number of the day of the week + will be \the\DayNumber{\year}{\month}{\day+12}, and + 24~days before the 24th~December~2027 it will be + \the\ISODayNumber{2027-12-24-24}. +\end{lstcode} + The result could be, for example: + \begin{ShowOutput} + In 12~days, the number of the day of the week + will be \the\DayNumber{\year}{\month}{\day+12}, and + 24~days before the 24th~December~2027 it will be + \the\ISODayNumber{2027-12-24-24}. + \end{ShowOutput} +\end{Example} + +The days of the week are numbered as follows: Sunday\,=\,0, Monday\,=\,1, +Tuesday\,=\,2, Wednesday\,=\,3, Thursday\,=\,4, Friday\,=\,5, and +Saturday\,=\,6.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DayNameByNumber}\Parameter{number of the day of the week}\\% + \Macro{DayName}\Parameter{year}\Parameter{month}\Parameter{day}\\% + \Macro{ISODayName}\Parameter{ISO-date}% +\end{Declaration}% +Usually\ChangedAt{v3.05a}{\Package{scrdate}} you are less interested in the +number of the day of the week than in its name. Therefore, the +\Macro{DayNameByNumber} command returns the name of the day of the week +corresponding to a day-of-the-week number. This number can be the result, for +example, of \Macro{DayNumber} or \Macro{ISODayNumber}. The two commands +\Macro{DayName} and \Macro{ISODayName} directly return the name of the day of +the week of a given date. + +\begin{Example} + You want to know the name of the day of the week of the 24th~December~2027. +\begin{lstcode} + Please pay by \ISODayName{2027-12-24}, + 24th~December~2027 the amount of \dots. +\end{lstcode} + The result will be: + \begin{ShowOutput} + Please pay by \ISODayName{2027-12-24}, + 24th~December~2027 the amount of \dots. + \end{ShowOutput} +\end{Example} + +Once again, it is particularly worth noting that you can perform calculations, +to a certain extent: +\begin{Example} + You want to know the names of the day of the week 12~days from now + and 24~days before the 24th~December~2027. +\begin{lstcode} + In 12~days, the name of the day of the week + will be \DayName{\year}{\month}{\day+12}, and + 24~days before the 24th~December~2027 it will be + \ISODayName{2027-12-24-24}, while two weeks + and three days after a Wednesday will be a + \DayNameByNumber{3+2*7+3}. +\end{lstcode} + The result could be, for example: + \begin{ShowOutput} + In 12~days, the name of the day of the week + will be \DayName{\year}{\month}{\day+12}, and + 24~days before the 24th~December~2027 it will be + \ISODayName{2027-12-24-24}, while two weeks + and three days after a Wednesday will be a + \DayNameByNumber{3+2*7+3}. + \end{ShowOutput} +\end{Example}% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{ISOToday}% + \Macro{IsoToday}% + \Macro{todaysname}% + \Macro{todaysnumber}% +\end{Declaration}% +In the previous examples, the current date was always specified cumbersomely +using the \TeX{} registers \Macro{year}\IndexCmd{year}, +\Macro{month}\IndexCmd{month}, and \Macro{day}\IndexCmd{day}. The +\Macro{ISOToday}\ChangedAt{v3.05a}{\Package{scrdate}} and \Macro{IsoToday} +commands directly return the current date in ISO-notation. These commands +differ only in the fact that \Macro{ISOToday} always outputs a two-digit month +and day, while \Macro{IsoToday} outputs single-digit numbers for values less +than 10. The \Macro{todaysname} command directly returns the name of the +current day of the week, while \Macro{todaysnumber} returns the number of the +current day of the week. You can find more information about using this value +in the explanations of \DescRef{scrdate.cmd.DayNumber} and +\DescRef{scrdate.cmd.ISODayNumber}. + +\begin{Example} + I want to show you on what day of the week this document was typeset: +\begin{lstlisting} + This document was created on a \todaysname. +\end{lstlisting} + This will result, for example, in: + \begin{ShowOutput} + This document was created on a \todaysname. + \end{ShowOutput} +\end{Example} + +For languages that have a case system for nouns, note that the package cannot +decline words. The terms are given in the form appropriate for displaying a +date in a letter, which is the nominative singular for the currently supported +languages. Given this limitation, the example above will not work correctly if +translated directly into some other languages. + +\begin{Explain} + The\textnote{Hint!} names of the weekdays in \Package{scrdate} all have + initial capital letters. If you need the names completely in lower case, for + example because that is the convention in the relevant language, simply wrap + the command with the \LaTeX{} \Macro{MakeLowercase}\IndexCmd{MakeLowercase}% + \important{\Macro{MakeLowercase}} command: + % Umbruchkorrektur: listings +\begin{lstcode} + \MakeLowercase{\todaysname} +\end{lstcode} + This converts the whole argument into lower-case letters. Of course, you can + also do this for + \DescRef{scrdate.cmd.DayNameByNumber}\IndexCmd{DayNameByNumber}, + \DescRef{scrdate.cmd.DayName}\IndexCmd{DayName}, and + \DescRef{scrdate.cmd.ISODayName}\IndexCmd{ISODayName} commands described + above.% +\end{Explain}% +\EndIndexGroup + + +\begin{Declaration} + \Macro{nameday}\Parameter{name} +\end{Declaration}% +Just as you can directly modify the output of \Macro{today} with +\DescRef{maincls.cmd.date}\IndexCmd{date}, so you can change the output of +\DescRef{scrdate.cmd.todaysname} to \PName{name} with \Macro{nameday}. +\begin{Example} + You change the current date to a fixed value using + \DescRef{maincls.cmd.date}. You are not interested in the actual name of the + day, but want only to show that it is a workday. So you write: +\begin{lstlisting} + \nameday{workday} +\end{lstlisting} + After this, the previous example will result in: + \begin{ShowOutput}\nameday{workday} + This document was created on a \todaysname. + \end{ShowOutput} +\end{Example} +There's no corresponding command to change the result of +\DescRef{scrdate.cmd.ISOToday}\IndexCmd{ISOToday} or +\DescRef{scrdate.cmd.IsoToday}\IndexCmd{IsoToday}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{newdaylanguage}\Parameter{language}% + \Parameter{Monday}\Parameter{Tuesday}% + \Parameter{Wednesday}\Parameter{Thursday}% + \Parameter{Friday}\Parameter{Saturday} + \Parameter{Sunday}% +\end{Declaration} +Currently the \Package{scrdate} package recognizes the following languages: +\begin{itemize}\setlength{\itemsep}{.5\itemsep} +\item Croatian (\PValue{croatian}), +\item Czech (\PValue{czech}\ChangedAt{v3.13}{\Package{scrdate}}), +\item Danish (\PValue{danish}), +\item Dutch (\PValue{dutch}), +\item English (\PValue{american}\ChangedAt{v3.13}{\Package{scrdate}}, + \PValue{australian}, \PValue{british}, \PValue{canadian}, \PValue{english}, + \PValue{UKenglish}, and USenglish), +\item Finnish (\PValue{finnish}), +\item French (\PValue{acadian}, \PValue{canadien}, + \PValue{francais}\ChangedAt{v3.13}{\Package{scrdate}}, and \PValue{french}), +\item German (\PValue{austrian}\ChangedAt{v3.08b}{\Package{scrdate}}, + \PValue{german}, \PValue{naustrian}, \PValue{ngerman}, + \PValue{nswissgerman}, and + \PValue{swissgerman}\ChangedAt{v3.13}{\Package{scrdate}}), +\item Italian (\PValue{italian}), +\item Norwegian (\PValue{norsk}), +\item Polish (\PValue{polish}\ChangedAt{v3.13}{\Package{scrdate}}), +\item Slovak (\PValue{slovak}), +\item Spanish (\PValue{spanish}), +\item Swedish (\PValue{swedish}). +\end{itemize} +You can also configure it for additional languages. To do so, the first +argument of \Macro{newdaylanguage} is the name of the language, and the other +arguments are the names of the corresponding days of the week. + +In the current implementation, it does not matter whether you load +\Package{scrdate} before or after \Package{ngerman}\IndexPackage{ngerman}, +\Package{babel}\IndexPackage{babel}, or similar packages. In each case the +correct language will be used provided it is supported. + +\begin{Explain} + To be more precise, as long as you select a language in a way that is + compatible with \Package{babel}\IndexPackage{babel}, \Package{scrdate} will + use the correct language. If this is not the case, you will get (US) English + names. +\end{Explain} + +Of course, if you create definitions for a language that was previously +unsupported, please mail them to the author of \KOMAScript{}. There is a good +chance that future versions of \KOMAScript{} will add support for that +language.% +\EndIndexGroup +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrdate.html b/macros/latex/contrib/koma-script/doc/scrdate.html index b386b493a2..88586626ea 100644 --- a/macros/latex/contrib/koma-script/doc/scrdate.html +++ b/macros/latex/contrib/koma-script/doc/scrdate.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrdate" /> + + - + - The KOMA-Script Documentation Wrapper + The Day of the Week with scrdate -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

The Day of the Week with scrdate

+

Der Wochentag mit scrdate

- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Der Wochentag mit scrdate in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrextend-de.tex b/macros/latex/contrib/koma-script/doc/scrextend-de.tex new file mode 100644 index 0000000000..e801f21507 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrextend-de.tex @@ -0,0 +1,225 @@ +% ====================================================================== +% scrextend-de.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% Package scrextend for Document Writers +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{scrextend-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script package scrextend] + +\chapter[tocentry={Grundlegende Fähigkeiten der + \KOMAScript-Klassen\protect\linebreak + mit Hilfe des Pakets \Package{scrextend} anderen Klassen erschließen}, + head={Fähigkeiten von \KOMAScript-Klassen mit \Package{scrextend}}] +{Grundlegende Fähigkeiten der \KOMAScript-Klassen mit Hilfe des Pakets + \Package{scrextend} anderen Klassen erschließen} +\labelbase{scrextend} +\BeginIndexGroup +\BeginIndex{Package}{scrextend}% + +Es gibt einige Möglichkeiten, die allen \KOMAScript-Klassen gemeinsam +sind. Dies betrifft in der Regel nicht nur die Klassen \Class{scrbook}, +\Class{scrreprt} und \Class{scrartcl}, die als Ersatz für die Standardklassen +\Class{book}, \Class{report} und \Class{article} für Bücher, Berichte und +Artikel gedacht sind, sondern in weiten Teilen auch die \KOMAScript-Klasse +\Class{scrlttr2} für Briefe. Diese grundlegenden Möglichkeiten werden von +\KOMAScript{} teilweise auch durch Paket \Package{scrextend} +angeboten. Dieses Paket sollte nicht\textnote{Achtung!} mit +\KOMAScript-Klassen verwendet werden. Es ist ausschließlich zur Verwendung mit +anderen Klassen gedacht. Der Versuch, das Paket mit einer \KOMAScript-Klasse +zu laden, wird von \Package{scrextend} erkannt und mit einer Warnung +abgebrochen. + +Dass \hyperref[cha:scrlttr2]{\Package{scrletter}}\IndexPackage{scrletter}% +\important{\hyperref[cha:scrlttr2]{\Package{scrletter}}} nicht nur mit +\KOMAScript-Klassen, sondern auch mit den Standardklassen verwendet werden +kann, liegt übrigens teilweise an \Package{scrextend}. Stellt +\hyperref[cha:scrlttr2]{\Package{scrletter}} nämlich fest, dass es nicht mit +einer \KOMAScript-Klasse verwendet wird, so lädt es automatisch +\Package{scrextend}. Damit stehen dann alle von +\hyperref[cha:scrlttr2]{\Package{scrletter}} aktiv genutzten Möglichkeiten der +\KOMAScript-Klassen zur Verfügung. + +Es gibt natürlich keine Garantie, dass \Package{scrextend} mit jeder +beliebigen Klasse zusammenarbeitet. Das Paket ist primär für die Erweiterung +der Standardklassen und davon abgeleiteter Klassen gedacht. In jedem Fall +sollten Benutzer zunächst prüfen, ob die verwendete Klasse nicht selbst +entsprechende Möglichkeiten bereitstellt. + +\iffalse% Umruchkorrektur +Neben den in diesem Kapitel beschriebenen Möglichkeiten gibt es einige +weitere, die hauptsächlich für Klassen- und Paketautoren gedacht sind. % +Diese sind in \autoref{cha:scrbase}, ab \autopageref{cha:scrbase} zu +finden. Das dort dokumentierte Paket +\hyperref[cha:scrbase]{\Package{scrbase}}% +\important{\hyperref[cha:scrbase]{\Package{scrbase}}}\IndexPackage{scrbase} +wird von allen \KOMAScript-Klassen und dem Paket \Package{scrextend} +verwendet.% +\else% +Einige grundlegende Möglichkeiten, die hauptsächlich für Klassen- und +Paketautoren interessant sind, werden bei \KOMAScript{} von +\hyperref[cha:scrbase]{\Package{scrbase}}% +\important{\hyperref[cha:scrbase]{\Package{scrbase}}}\IndexPackage{scrbase} +bereitgestellt. Das Paket wird von allen \KOMAScript-Klassen und den meisten +\KOMAScript-Paketen geladen. Dadurch sind dessen in \autoref{cha:scrbase}, ab +\autopageref{cha:scrbase} dokumentierte Möglichkeiten bei Verwendung von +\Package{scrextend} ebenfalls verfügbar.% +\fi + +Auch das Paket \hyperref[cha:scrlfile]{\Package{scrlfile}}% +\important{\hyperref[cha:scrlfile]{\Package{scrlfile}}}\IndexPackage{scrlfile} +aus \autoref{cha:scrlfile} ab \autopageref{cha:scrlfile} wird von allen +\KOMAScript-Klassen und dem Paket \Package{scrextend} geladen. Somit stehen +auch dessen Möglichkeiten bei Verwendung von \Package{scrextend} zur +Verfügung. + +\iftrue % Umbruchkorrekturtext +Im Unterschied dazu wird das ebenfalls für Klassen- und Paketautoren gedachte +Paket \hyperref[cha:tocbasic]{\Package{tocbasic}}% +\important{\hyperref[cha:tocbasic]{\Package{tocbasic}}} (siehe +\autoref{cha:tocbasic} ab \autopageref{cha:tocbasic}) nur von den Klassen +\Class{scrbook}, \Class{scrreprt} und \Class{scrartcl} geladen, so dass die +dort definierten Möglichkeiten auch nur in diesen Klassen und nicht in +\Package{scrextend} zu finden sind. Natürlich spricht nichts dagegen, +\hyperref[cha:tocbasic]{\Package{tocbasic}} zusätzlich zu +\Package{scrextend} zu laden.% +\fi + +\LoadCommonFile{options}% \section{Frühe oder späte Optionenwahl bei \KOMAScript} + +\LoadCommonFile{compatibility}% \section{Kompatibilität zu früheren Versionen von \KOMAScript} + + +\section{Optionale, erweiterte Möglichkeiten} +\seclabel{optionalFeatures} + +Das Paket \Package{scrextend} kennt optional verfügbare, erweiterte +Möglichkeiten. Das sind Möglichkeiten, die in der Grundeinstellung nicht +vorhanden sind, aber zusätzlich ausgewählt werden können. Diese +sind beispielsweise deshalb optional, weil sie potentiell in Konflikt mit den +Möglichkeiten der Standardklassen oder häufig benutzter Pakete stehen. + +\begin{Declaration} + \OptionVName{extendedfeature}{Möglichkeit} +\end{Declaration} +Mit dieser Option kann eine optionale Möglichkeit von \Package{scrextend} +ausgewählt werden. Diese Option steht nur während des Ladens von +\Package{scrextend} zur Verfügung. Anwender geben diese Option daher als +optionales Argument von +\DescRef{\LabelBase.cmd.usepackage}\PParameter{scrextend} an. % +\iffree{% + Eine Übersicht über die verfügbaren optionalen Möglichkeiten bietet + \autoref{tab:scrextend.optionalFeatures}. + + \begin{table} + \caption[{Optional verfügbare, erweiterte Möglichkeiten + von \Package{scrextend}}]{Übersicht über die optional verfügbaren, + erweiterten Möglichkeiten von \Package{scrextend}} + \label{tab:scrextend.optionalFeatures} + \begin{desctabular} + \entry{\PName{title}}{% + die Titelseiten werden auf die Möglichkeiten der \KOMAScript-Klassen + erweitert; dies betrifft neben den Anweisungen für die Titelseiten + auch die Option \DescRef{\LabelBase.option.titlepage} (siehe + \autoref{sec:scrextend.titlepage}, ab + \autopageref{sec:scrextend.titlepage})% + } + \end{desctabular} + \end{table}% +}{% + \par% + Die derzeit einzige optionale Möglichkeit ist + \PValue{title}\IndexOption[indexmain]{extendedfeature~=\textKValue{title}}% + \important{\OptionValue{extendedfeature}{title}}. + Damit werden die Titelseiten auf die Möglichkeiten der \KOMAScript-Klassen + erweitert, wie sie in \autoref{sec:scrextend.titlepage} ab + \autopageref{sec:scrextend.titlepage} beschrieben sind.% +}% +% +\EndIndexGroup + + +\LoadCommonFile{draftmode}% \section{Entwurfsmodus} + +\LoadCommonFile{fontsize} % \section{Wahl der Schriftgröße für das Dokument} + +\LoadCommonFile{textmarkup}% \section{Textauszeichnungen} + +\LoadCommonFile{titles}% \section{Dokumenttitel} + +\LoadCommonFile{oddorevenpage}% \section{Erkennung von rechten und linken Seiten} + + +\section{Wahl eines vordefinierten Seitenstils} +\seclabel{pagestyle} + +\iffalse % Umbruchkorrektur +Eine der allgemeinen Eigenschaften eines Dokuments ist der +Seitenstil\Index[indexmain]{Seiten>Stil}. Bei {\LaTeX} versteht man unter dem +Seitenstil in erster Linie den Inhalt der Kopf- und Fußzeilen. % +\fi% +Das Paket \Package{scrextend} definiert selbst keine Seitenstile, nutzt aber +Seitenstile des \LaTeX-Kerns. + + +\begin{Declaration} + \Macro{titlepagestyle} +\end{Declaration}% +\BeginIndex{}{Titel>Seitenstil}% +Auf einigen Seiten wird mit Hilfe von +\DescRef{maincls.cmd.thispagestyle}\IndexCmd{thispagestyle} automatisch ein +anderer Seitenstil gewählt. Bei \Package{scrextend} betrifft dies bisher nur +die Titelseiten und auch dies nur, wenn mit +\OptionValueRef{\LabelBase}{extendedfeature}{title} gearbeitet wird (siehe +\autoref{sec:scrextend.optionalFeatures}, +\DescPageRef{scrextend.option.extendedfeature}). Welcher Seitenstil in diesem +Fall für einen +Titelkopf\important{\OptionValueRef{\LabelBase}{titlepage}{false}}% +\IndexOption{titlepage~=\textKValue{false}}\Index{Titel>Kopf} verwendet wird, +ist im Makro \Macro{titlepagestyle} festgelegt. In der Voreinstellung ist das +der Seitenstil \DescRef{maincls.pagestyle.plain}\IndexPagestyle{plain}. Dieser +Seitenstil wird bereits im \LaTeX-Kern vordefiniert und sollte daher immer +verfügbar sein.% +\EndIndexGroup + +\LoadCommonFile{interleafpage}% \section{Vakatseiten} + +\LoadCommonFile{footnotes}% \section{Fußnoten} + +\LoadCommonFile{dictum}% \section{Schlauer Spruch} + +\LoadCommonFile{lists}% \section{Listen} + +\LoadCommonFile{marginpar}% \section{Randnotizen} +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrextend-en.tex b/macros/latex/contrib/koma-script/doc/scrextend-en.tex new file mode 100644 index 0000000000..5027c949a0 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrextend-en.tex @@ -0,0 +1,198 @@ +% ====================================================================== +% scrextend-en.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% Package scrextend for Document Writers +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{scrextend-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script package scrextend] +\translator{Markus Kohm\and Karl Hagen} + +\chapter[{\KOMAScript{} Features for Other Classes with \Package{scrextend}}] + {Using Basic Features of the \KOMAScript{} Classes in Other Classes with the + \Package{scrextend} Package} +\labelbase{scrextend} +\BeginIndexGroup% +\BeginIndex{Package}{scrextend}% + +There are some features that are common to all \KOMAScript{} classes. This +applies not only to the \Class{scrbook}, \Class{scrreprt}, and +\Class{scrartcl} classes, which are intended to replace the standard classes +\Class{book}, \Class{report}, and \Class{article}, but also to a large extend +the \KOMAScript{} class \Class{scrlttr2}, the successor to \Class{scrlettr}, +which is intended for letters. These basic features, which can be found in the +classes mentioned above, are also provided by package \Package{scrextend} from +\KOMAScript{} version~3.00 onward. This\textnote{Attention!} package should +not be used with \KOMAScript{} classes. It is intended for use with other +classes only. If you attempt to load the package with a \KOMAScript{} class, +\Package{scrextend} will detect this and reject loading it with a warning +message. + +The fact that \hyperref[cha:scrlttr2]{\Package{scrletter}}% +\IndexPackage{scrletter} can be used not only with \KOMAScript{} classes but +also with the standard classes is partly due to \Package{scrextend}. If +\hyperref[cha:scrlttr2]{\Package{scrletter}} detects that it is not being used +with a \KOMAScript class, it automatically loads \Package{scrextend}. Doing +so makes all required \KOMAScript{} classes available. + +Of course, there is no guarantee that \Package{scrextend} will work with all +classes. The package has been designed primarily to extend the standard +classes and those derived from them. In any case, before you use +\Package{scrextend}, you should first make sure that the class you are using +does not already provide the feature you need. + +In addition to the features described in this chapter, there are a few more +that are primarily intended for authors of classes and packages. These can be +found in \autoref{cha:scrbase}, starting on \autopageref{cha:scrbase}. The +\hyperref[cha:scrbase]{\Package{scrbase}}% +\important{\hyperref[cha:scrbase]{\Package{scrbase}}}\IndexPackage{scrbase} +package documented there is used by all \KOMAScript{} classes and the +\Package{scrextend} package. + +All \KOMAScript{} classes and the \Package{scrextend} package also load the +\hyperref[cha:scrlfile]{\Package{scrlfile}}% +\important{\hyperref[cha:scrlfile]{\Package{scrlfile}}}\IndexPackage{scrlfile} +package described in \autoref{cha:scrlfile} starting on +\autopageref{cha:scrlfile}. Therefore the features of this package are also +available when using \Package{scrextend}. + +\iftrue % Umbruchkorrekturtext +In contrast, only the \KOMAScript{} classes \Class{scrbook}, \Class{scrreprt}, +and \Class{scrartcl} load the \hyperref[cha:tocbasic]{\Package{tocbasic}} +package (see \autoref{cha:tocbasic} starting on \autopageref{cha:tocbasic}), +which is designed for authors of classes and packages. For this reason, the +features defined there are found only in those classes and not in +\Package{scrextend}. Of course you can still use +\hyperref[cha:tocbasic]{\Package{tocbasic}} together with +\Package{scrextend}.% +\fi + +\LoadCommonFile{options}% \section{Early or late Selection of Options} + +\LoadCommonFile{compatibility}% \section{Compatibility with Earlier Versions of \KOMAScript} + + +\section{Optional, Extended Features} +\seclabel{optionalFeatures} + +The \Package{scrextend} package provides some optional, extended features. +These features are not available by default but can be activated. These +features are optional because, for example, they may conflict with features of +the standard classes of other commonly used packages. + +\begin{Declaration} + \OptionVName{extendedfeature}{feature} +\end{Declaration} +With this option, you can activate an extended \PName{feature} of +\Package{scrextend}. This option is available only while loading +\Package{scrextend}. You must therefore specify this option in the optional +argument of \DescRef{\LabelBase.cmd.usepackage}\PParameter{scrextend}. % +\iffree{% + An overview of all available features is shown in + \autoref{tab:scrextend.optionalFeatures}. + + \begin{table} + \caption[{Available extended features of + \Package{scrextend}}]{Overview of the optional extended + features of \Package{scrextend}} + \label{tab:scrextend.optionalFeatures} + \begin{desctabular} + \entry{\PName{title}}{% + title pages have the additional features of the \KOMAScript{} classes; + this applies not only to the commands for the title page but also to + the \DescRef{\LabelBase.option.titlepage} option (see + \autoref{sec:scrextend.titlepage}, from + \autopageref{sec:scrextend.titlepage})% + }% + \end{desctabular} + \end{table} +}{% + \par% + Currently the only available extended \PName{feature} is + \PValue{title}\IndexOption[indexmain]{extendedfeature~=\textKValue{title}}% + \important{\OptionValue{extendedfeature}{title}}. + This \PName{feature} gives title pages the features of the \KOMAScript{} + classes, as described in \autoref{sec:scrextend.titlepage} starting on + \autopageref{sec:scrextend.titlepage}.% +}% +% +\EndIndexGroup + + +\LoadCommonFile{draftmode}% \section{Draft Mode} + +\LoadCommonFile{fontsize}% + +\LoadCommonFile{textmarkup}% \section{Text Markup} + +\LoadCommonFile{titles}% \section{Document Title Pages} + +\LoadCommonFile{oddorevenpage}% \section{Detection of Odd and Even Pages} + +\section{Choosing a Predefined Page Style} +\seclabel{pagestyle} + +One of the basic features of a document is the page +style\Index[indexmain]{page>style}. In \LaTeX{}, the page style primarily +determines the content of headers and footers. The \Package{scrextend} package +does not define any page styles itself. Instead it uses the page styles of the +\LaTeX{} kernel. + + +\begin{Declaration} + \Macro{titlepagestyle} +\end{Declaration}% +\Index{title>page style}% +On some pages \DescRef{maincls.cmd.thispagestyle}\IndexCmd{thispagestyle} +automatically selects a different page style. Currently, \Package{scrextend} +only does this for title pages, and only if +\OptionValueRef{\LabelBase}{extendedfeature}{title} has been used (see +\autoref{sec:scrextend.optionalFeatures}, +\DescPageRef{scrextend.option.extendedfeature}). In this case the page style +specified in \DescRef{maincls.cmd.thispagestyle} will be used. The default for +\DescRef{maincls.cmd.thispagestyle} is +\PageStyle{plain}\IndexPagestyle{plain}. This page style is defined by the +\LaTeX{} kernel, so it should always be available.% +\EndIndexGroup + +\LoadCommonFile{interleafpage}% \section{Interleaf Pages} + +\LoadCommonFile{footnotes}% \section{Footnotes} + +\LoadCommonFile{dictum}% \section{Dicta} + +\LoadCommonFile{lists}% \section{Lists} + +\LoadCommonFile{marginpar}% \section{Margin Notes} +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrextend.html b/macros/latex/contrib/koma-script/doc/scrextend.html index b386b493a2..8f4c337a0e 100644 --- a/macros/latex/contrib/koma-script/doc/scrextend.html +++ b/macros/latex/contrib/koma-script/doc/scrextend.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrextend" /> + + - + - The KOMA-Script Documentation Wrapper + Using Basic Features of the KOMA-Script Classes in Other Classes with the scrextend Package -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

Using Basic Features of the KOMA-Script Classes in Other Classes with the scrextend Package

+

Grundlegende Fähigkeiten der KOMA-Script-Klassen mit Hilfe des Pakets scrextend anderen Klassen erschließen

- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Grundlegende Fähigkeiten der KOMA-Script-Klassen mit Hilfe des Pakets scrextend anderen Klassen erschließen” in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrguide-body.tex b/macros/latex/contrib/koma-script/doc/scrguide-body.tex new file mode 100644 index 0000000000..6349871f23 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrguide-body.tex @@ -0,0 +1,110 @@ +% ====================================================================== +% scrguide-body.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% The body of the KOMA-Script guides in all languages. +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{scrguide-body.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script (guide body file)] + +\csname ListTypeArea\endcsname + +\extratitle{\sffamily{\bfseries\Huge\GuideTitle\strut\\} + \large\GuideSubTitle\strut\\} +\title{\GuideTitle} +\subject{\GuideSubject} +\author{Markus Kohm} +\publishers{\small\GuideAuthorHeadline: + Frank Neukam, Markus Kohm, Axel Kielhorn} +\uppertitleback{% + \GuideWarrantyHeadline\\[.5\baselineskip] + \GuideWarranty} +\lowertitleback{% + \settranslator{\GuideTranslatorHeadline}{.\par\bigskip}% + \GuideCopyright} +\dedication{\GuideDedication} + +\pdfbookmark[-1]{\KOMAScript}{title} +\iffree{\bookmark[level=0,gotor=scrguide-de.pdf]{Deutsch} +\bookmark[level=0,gotor=scrguide-en.pdf]{English}}{} +\bookmarksetup{startatroot} + +\maketitle + +\cleardoublepage\csname GeneralTypeArea\endcsname +\linclude{preface} + +\cleardoublepage\csname ListTypeArea\endcsname +\cleardoublepage\pdfbookmark{\contentsname}{toc}\tableofcontents + +\cleardoublepage\pdfbookmark{\listfigurename}{lof}\listoffigures + +\cleardoublepage\pdfbookmark{\listtablename}{lot}\listoftables + +\cleardoublepage\csname GeneralTypeArea\endcsname + +\linclude{introduction} + +\linclude{authorpart} +\linclude{typearea} +\linclude{scrbookreportarticle} +\linclude{scrlttr2} +\linclude{scrlayer-scrpage} +\linclude{scrdate} +\linclude{scrtime} +\linclude{scraddr} +\linclude{scrextend} +\linclude{scrjura} +\linclude{scrlogo} + +\linclude{expertpart} +\linclude{scrbase} +\linclude{scrlfile} +\linclude{scrwfile} +\linclude{tocbasic} +\linclude{scrhack} +\linclude{scrlayer} +\linclude{scrlayer-scrpage-experts} +\linclude{scrlayer-notecolumn} +\linclude{typearea-experts} +\linclude{scrbookreportarticle-experts} +\linclude{scrlttr2-experts} + +\linclude{japanlco} + +\makeatletter +\let\toclevel@section\toclevel@chapter +\let\toclevel@chapter\toclevel@part +\makeatother +\printchangelog + +\printbibliography[prenote=bibpreamble] + +\GuideIndexSeeAlsos + +\printindex + +%%% Local Variables: +%%% mode: latex +%%% coding: utf-8 +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrguide-de.pdf b/macros/latex/contrib/koma-script/doc/scrguide-de.pdf new file mode 100644 index 0000000000..56e870c53f Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/scrguide-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/scrguide-de.tex b/macros/latex/contrib/koma-script/doc/scrguide-de.tex new file mode 100644 index 0000000000..d5c9156a6a --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrguide-de.tex @@ -0,0 +1,43 @@ +% ====================================================================== +% scrguide-de.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% The main file the English KOMA-Script guide. +% Maintained by Markus Kohm +% +% ====================================================================== + +\documentclass[ngerman]{scrguide} + +\KOMAProvidesFile{scrguide-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script (guide main file)] + +\begin{document} +\input{scrguide-body.tex} +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% TeX-engine: pdftex-dev +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrguide-en.pdf b/macros/latex/contrib/koma-script/doc/scrguide-en.pdf new file mode 100644 index 0000000000..0fbb371e87 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/scrguide-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/scrguide-en.tex b/macros/latex/contrib/koma-script/doc/scrguide-en.tex new file mode 100644 index 0000000000..3ded3de572 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrguide-en.tex @@ -0,0 +1,43 @@ +% ====================================================================== +% scrguide-en.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% The main file the English KOMA-Script guide. +% Maintained by Markus Kohm +% +% ====================================================================== + +\documentclass[english]{scrguide} + +\KOMAProvidesFile{scrguide-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script (guide main file)] + +\begin{document} +\input{scrguide-body.tex} +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% TeX-engine: pdftex-dev +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrguide.bib b/macros/latex/contrib/koma-script/doc/scrguide.bib new file mode 100644 index 0000000000..b6690530bf --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrguide.bib @@ -0,0 +1,862 @@ +% ====================================================================== +% scrguide.bib +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% Bibliography of scrguide-en and scrguide-de +% +% ====================================================================== + +@Article{ DANTE:TK0203:MJK, + language= {ngerman}, + author = {Markus Kohm}, + title = {Moderne Briefe mit {\KOMAScript}}, + journal = {Die {\TeX}nische Komödie}, + volume = {2}, + year = 2003, + pages = {32--51}, + note = {{DANTE} e.\,V.} +} + +@Article{ DANTE:TK0297:MJK1, + language= {ngerman}, + author = {Markus Kohm}, + title = {{\KOMAScript} -- Eine Alternative zu den + Standardklassen?}, + journal = {Die {\TeX}nische Komödie}, + year = 1996, + volume = {2}, + pages = {14--33}, + note = {{DANTE} e.\,V.} +} + +@Article{ DANTE:TK0402:MJK, + language= {ngerman}, + author = {Markus Kohm}, + title = {Satzspiegelkonstruktionen im Vergleich}, + journal = {Die {\TeX}nische Komödie}, + volume = {4}, + year = 2002, + pages = {28--48}, + note = {{DANTE} e.\,V.} +} + +@Book{ DUDEN, + language= {ngerman}, + author = {DUDEN}, + title = {Die deutsche Rechtschreibung}, + publisher = {DUDENVERLAG}, + year = 1996, + address = {Mannheim}, + edition = 21 +} + +@Book{ TYPO:ErsteHilfe, + language= {ngerman}, + author = {Hans Peter Willberg and Friedrich Forssman}, + title = {Erste Hilfe in Typografie}, + subtitle = {Ratgeber für Gestaltung mit Schrift}, + publisher = {Verlag Hermann Schmidt}, + year = 2000, + address = {Mainz} +} + +@Book{ JTsch87, + language= {ngerman}, + author = {Jan Tschichold}, + title = {Ausgewählte Aufsätze über Fragen der Gestalt des Buches und der Typographie}, + publisher = {Birkhäuser Verlag}, + year = 1987, + address = {Basel}, + edition = 2 +} + +@Book{ JTschErfreulich, + language = {ngerman}, + author = {Jan Tschichold}, + title = {Erfreuliche Drucksachen durch gute Typographie}, + publisher = {Ravensburger Buchverlag Otto Maier GmbH}, + year = 1960, + note = {Nachdruck bei: MaroVerlag, Augsburg, 2001}, + isbn = {3-87512-413-8} +} + +@Book{ book:komascript, + language= {ngerman}, + author = {Kohm, Markus}, + title = {{\KOMAScript}}, + subtitle= {Eine Sammlung von Klassen und Paketen für {\LaTeXe}}, + year = 2020, + edition = 7, + publisher={Lehmanns Media}, + address = {Berlin}, + series = {Edition DANTE}, + isbn = {978-3-96543-097-6}, + note = {Print-Ausgabe} +} + +@Book{ ebook:komascript, + language= {ngerman}, + author = {Kohm, Markus}, + title = {{\KOMAScript}}, + subtitle= {Eine Sammlung von Klassen und Paketen für {\LaTeXe}}, + year = 2020, + edition = 7, + publisher={Lehmanns Media}, + address = {Berlin}, + series = {Edition DANTE}, + isbn = {978-3-96543-103-4}, + note = {eBook-Ausgabe} +} + +@Book{ latexbook, + language = {ngerman}, + author = {Leslie Lamport}, + title = {Das {\LaTeX}-Handbuch}, + publisher = {Addison-Wesley Publishing Company}, + address = {Bonn, Paris {u.\,a.}}, + year = 1995 +} + +@Book{ knuth:mfbook, + language= {english}, + author = {Donald E. Knuth}, + title = {The {\MF book}}, + publisher = {Addison-Wesley Publishing Company}, + year = 1991, + address = {Reading, Mass.}, + edition = 6, + volume = {C}, + series = {Computers and Typesetting} +} + +@Book{ knuth:texbook, + language= {english}, + author = {Donald E. Knuth}, + title = {The {\TeX book}}, + publisher = {Addison-Wesley Publishing Company}, + address = {Reading, Mass.}, + year = 1990, + edition = {19}, + volume = {A}, + series = {Computers and Typesetting} +} + +@Book{ TYPO:Werkstattbuch, + language = {ngerman}, + author = {Indra Kupferschmid}, + editor = {}, + title = {Buchstaben kommen selten allein: Ein typografisches Werkstattbuch}, + publisher = {Universitätsverlag Weimar}, + year = {2000}, + note = {{ISBN} 3-86068-140-0} +} + +@InCollection{ JTschMass, + language= {ngerman}, + author = {Jan Tschichold}, + title = {Willkürfreie Maßverhältnisse der Buchseite und des Satzspiegels}, + booktitle = {Schriften 1925-1974}, + year = 1992, + publisher = {Brinkmann \& Bose}, + address = {Berlin} +} + +@InCollection{ zeitung, + language = {ngerman}, + author = {Martin Z. Schröder}, + title = {Die Anmut des Unscheinbaren}, + booktitle = {Berliner Zeitung}, + year = 1998, + month = {10. Oktober}, + url = {http://www.berliner-zeitung.de/archiv} +} + +@Manual{ btxdoc, + language= {english}, + author = {Oren Patashnik}, + title = {{Bib\TeX ing}}, + year = 1988, + month = feb, + url = {CTAN://biblio/bibtex/distribs/doc/btxdoc.tex} +} + +@Manual{ btxhak, + language= {english}, + author = {Oren Patashnik}, + title = {Designing {Bib\TeX} Styles}, + year = 1988, + month = feb, + url = {CTAN://biblio/bibtex/base/btxhak.pdf} +} + +@Manual{ latex:cfgguide, + language= {english}, + author = {{\LaTeX3} Project Team}, + title = {Configuration options for {\LaTeXe}}, + year = 2004, + month = feb, + url = {CTAN://macros/latex/doc/cfgguide.pdf} +} + +@Manual{ latex:clsguide, + language= {english}, + author = {{\LaTeX3} Project Team}, + title = {{\LaTeXe} for class and package writers}, + year = 2006, + month = feb, + url = {CTAN://macros/latex/doc/clsguide.pdf} +} + +@Manual{ latex:fntguide, + language= {english}, + author = {{\LaTeX3} Project Team}, + title = {{\LaTeXe} font selection}, + year = 2005, + month = nov, + url = {CTAN://macros/latex/doc/fntguide.pdf} +} + +@Manual{ manual:eTeX, + language = {english}, + author = {The {\NTS} Team}, + title = {The {\eTeX} manual}, + year = {1998}, + month = feb, + url = {CTAN://systems/e-tex/v2/doc/etex_man.pdf} +} + +@Manual{ l2kurz, + language = {ngerman}, + author = {Marco Daniel and Patrick Gundlach and Walter Schmidt and Jörg Knappen and Hubert Partl and Irene Hyna}, + title = {{\LaTeXe}-Kurzbeschreibung}, + year = 2012, + month = jul, + version = {3.0}, + url = {CTAN://info/lshort/german/} +} + +@Manual{ lshort, + language= {english}, + author = {Tobias Oetker and Hubert Partl and Irene Hyna and Elisabeth +Schlegl}, + title = {The Not So Short Introduction to {\LaTeXe}}, + year = 2011, + month = apr, + version = {5.01}, + url = {CTAN://info/lshort/english/} +} + +@Manual{ latex:source2e, + language = {english}, + author = {Johannes Braams and David Carlisle and Alan Jeffrey and Leslie Lamport and Frank Mittelbach and Chris Rowley and Rainer Schöpf}, + title = {The {\LaTeX2e} Source}, + year = 2005, + month = 12 +} + +@Manual{ latex:usrguide, + language= {english}, + author = {{\LaTeX3} Project Team}, + title = {{\LaTeXe} for authors}, + year = 2005, + month = nov, + url = {CTAN://macros/latex/doc/usrguide.pdf} +} + +@Manual{ xindy, + language= {english}, + author = {Roger Kehr}, + title = {XINDY, A Flexible Indexing System}, + year = 1997}, + month = mar, + edition = {1.1}, + url = {http://www.xindy.org/doc/tutorial.html} +} + +@Misc{ package:adrconv, + language= {ngerman}, + author = {Axel Kielhorn}, + title = {adrconv}, + year = 2010, + month = apr, + edition = {1.3}, + url = {CTAN://macros/latex/contrib/adrconv/} +} + +@Misc{ package:amsmath, + language = {english}, + author = {{American Mathematical Society}}, + title = {User's Guide for the {\Package{amsmath}} Package}, + year = 2002, + month = feb, + edition = {2.0}, + url = {CTAN://macros/latex/required/amslatex/math/} +} + +@Misc{ package:babel, + language= {english}, + author = {Johannes Braams and Javier Bezos}, + title = {Babel}, + year = 2013, + month = dec, + edition = {3.9h}, + url = {CTAN://macros/latex/required/babel/} +} + +@Misc{ package:caption, + language = {ngerman}, + author = {Axel Sommerfeldt}, + title = {Anpassen der Abbildungs- und Tabellenbeschriftungen mit Hilfe des {\Package{caption}}-Paketes}, + year = 2013, + month = may, + edition = {3.3}, + url = {CTAN://macros/latex/contrib/caption/} +} + +@Misc{ package:caption.engl, + language = {english}, + author = {Axel Sommerfeldt}, + title = {Customizing captions of floating environments using the {\Package{caption}} package}, + year = 2013, + month = may, + edition = {3.3}, + url = {CTAN://macros/latex/contrib/caption/} +} + +@Misc{ package:CJK, + language= {english}, + author = {Werner Lemberg}, + title = {{\Package{CJK}}}, + year = 2012, + month = may, + edition = {4.8.3}, + url = {CTAN://languages/chinese/CJK/} +} + +@Misc{ latex:classes, + language= {english}, + author = {Leslie Lamport and Frank Mittelbach and Johannes Braams}, + title = {Standard Document Classes for {\LaTeX} version 2e}, + year = 2007, + month = oct, + edition = {1.4h}, + url = {CTAN://macros/latex/base/classes.dtx} +} + +@Misc{ package:engord, + language= {english}, + author = {Heiko Oberdiek}, + title = {The {\Package{engord}} package}, + year = 2010, + month = mar, + edition = {1.8}, + url = {CTAN://macros/latex/contrib/oberdiek/} +} + +@Misc{ package:envlab, + language= {english}, + author = {Boris Veytsman}, + title = {Printing Envelopes and Labels in {\LaTeXe}: {\Package{EnvLab}} Package}, + year = 1997, + month = jul, + edition = {1.2}, + url = {CTAN://macros/latex/contrib/envlab/} +} + +@Misc{ package:eso-pic, + language = {english}, + author = {Rolf Niepraschk}, + title = {The {\Package{eso-pic}} package}, + month = jul, + year = 2015, + edition = {2.0g}, + url = {CTAN://macros/latex/contrib/eso-pic/} +} + +@Misc{ package:etoolbox, + language= {english}, + author = {Philipp Lehman}, + title = {The {\Package{etoolbox}} Package}, + year = 2011, + month = jan, + edition = {2.1}, + url = {CTAN://macros/latex/contrib/etoolbox/} +} + +@Misc{ package:etoolbox-de, + language= {ngerman}, + author = {Philipp Lehman\and Tim Enderling}, + title = {Das Paket {\Package{etoolbox}}}, + year = 2011, + month = jan, + edition = {2.1}, + url = {CTAN://macros/latex/contrib/etoolbox/} +} + +@Misc{ package:extsizes, + language= {english}, + author = {James Kilfiger}, + title = {{\Package{extsizes}}, a non standard {\LaTeX}-package}, + year = 1999, + month = nov, + edition = {1.4a}, + url = {CTAN://macros/latex/contrib/extsizes/} +} + +@Misc{ package:fancyhdr, + language= {english}, + author = {Piet van Oostrum}, + title = {Page layout in {\LaTeX}}, + year = 2004, + month = mar, + edition = {3.1}, + url = {CTAN://macros/latex/contrib/fancyhdr/} +} + +@Misc{ package:float, + language= {english}, + author = {Anselm Lingnau}, + title = {An Improved Environment for Floats}, + year = 2001, + month = nov, + edition = {1.3d}, + url = {CTAN://macros/latex/contrib/float/} +} + +@Misc{ package:floatrow, + language = {english}, + author = {Olga Lapko}, + title = {The {\Package{floatrow}} package}, + year = 2008, + month = aug, + edition = {0.3b}, + url = {CTAN://macros/latex/contrib/floatrow/} +} + +@Misc{ package:footmisc, + language= {english}, + author = {Robin Fairbairns}, + title = {{\Package{footmisc}} --- a portmanteau package for customising footnotes in {\LaTeX}}, + year = 2011, + month = jun, + edition = {5.5b}, + url = {CTAN://macros/latex/contrib/footmisc/} +} + +% I don't want the french changes! +@Misc{ package:french, + language= {english}, + author = {Bernard Gaulle}, + title = {Les distributions de fichiers de francisation pour LaTeX}, + year = 2007, + month = may, + edition = {5,9993}, + url = {CTAN://language/french/} +} + +@Misc{ package:geometry, + language= {english}, + author = {Hideo Umeki}, + title = {The {\Package{geometry}} package}, + year = 2010, + month = sep, + edition = {5.6}, + url = {CTAN://macros/latex/contrib/geometry/} +} + +@Misc{ package:german, + language = {english}, + author = {Bernd Raichle}, + title = {{\Package{german}} package}, + year = 1998, + month = jul, + edition = {2.5e}, + url = {CTAN://language/german/} +} + +@Misc{ package:graphics, + language= {english}, + author = {David P. Carlisle}, + title = {Packages in the `graphics' bundle}, + year = 2017, + month = jun, + url = {CTAN://macros/latex/required/graphics/} +} + +@Misc{ package:hyperref, + language= {english}, + author = {Sebastian Rahtz and Heiko Oberdiek}, + title = {Hypertext marks in {\LaTeX}: the {\Package{hyperref}} package}, + year = 2012, + month = nov, + edition = {6.83m}, + url = {CTAN://macros/latex/contrib/hyperref/} +} + +@Misc{ package:ifluatex, + language= {english}, + author = {Heiko Oberdiek}, + title = {The {\Package{ifluatex}} package}, + year = 2016, + month = apr, + edition = {1.4}, + url = {CTAN://macros/latex/contrib/oberdiek/} +} + +@Misc{ package:ifthen, + language= {english}, + author = {David Carlisle}, + title = {The {\Package{ifthen}} package}, + year = 2001, + month = may, + edition = {1.1c}, + url = {CTAN://macros/latex/base/} +} + +@Misc{ package:iftex, + language= {english}, + author = {{The \LaTeX{} Project Team}}, + title = {The {\Package{iftex}} package}, + year = 2019, + month = nov, + edition = {1.0c}, + url = {CTAN://macros/latex/contrib/iftex} +} + +@Misc{ package:imakeidx, + language= {english}, + author = {Enrico Gregorio}, + title = {The package {\Package{imakeidx}}}, + year = 2016, + month = oct, + edition = {1.3e}, + url = {CTAN://macros/latex/contrib/imakeidx} +} + +@Misc{ package:keyval, + language = {english}, + author = {David Carlisle}, + title = {The {\Package{keyval}} package}, + year = 1999, + month = mar, + edition = {1.13}, + url = {CTAN://macros/latex/required/graphics/} +} + +@Misc{ package:koma-script-obsolete, + language = {english}, + author = {Markus Kohm}, + title = {Deprecated Packages from {\KOMAScript}}, + year = 2013, + month = dec, + url = {CTAN://obsolete/macros/latex/contrib/koma-script-obsolete} +} + +@Misc{ package:longtable, + language = {english}, + author = {David Carlisle}, + title = {The {\Package{longtable}} package}, + year = 2004, + month = feb, + edition = {4.11}, + url = {CTAN://macros/latex/required/tools/} +} + +@Misc{ makeindex, + language= {english}, + author = {Leslie Lamport}, + title = {{\Package{MakeIndex}}: An Index Processor For {\LaTeX}}, + year = 1987, + month = feb, + url = {CTAN://indexing/makeindex/doc/makeindex.pdf} +} + +@Misc{ package:marginnote, + language= {english}, + author = {Markus Kohm}, + title = {Non-Floating Margin Notes with {\Package{marginnote}}}, + year = 2012, + month = mar, + edition = {1.1i}, + url = {CTAN://macros/latex/contrib/marginnote/} +} + +@Misc{ package:microtype, + language= {english}, + author = {R Schlicht}, + title = {The {\Package{microtype}} package: An interface to the micro-typographic extensions of pdf{\TeX}}, + year = 2013, + month = may, + edition = {2.5a}, + url = {CTAN://macros/latex/contrib/microtype/} +} + +@Misc{ package:mparhack, + language= {english}, + author = {Tom Sgouros and Stefan Ulrich}, + title = {The {\Package{mparhack}} package}, + year = 2005, + month = apr, + edition = {1.4}, + url = {CTAN://macros/latex/contrib/mparhack/} +} + +@Misc{ package:multicol, + language= {english}, + author = {Frank Mittelbach}, + title = {An environment for multicolumn output}, + year = 2011, + month = jun, + edition = {1.7a}, + url = {CTAN://macros/latex/required/tools/} +} + +@Misc{ package:mwe, + language= {english}, + author = {Martin Scharrer}, + title = {The {\Package{mwe}} Package}, + year = 2018, + month = mar, + edition = {0.5}, + url = {CTAN://macros/latex/contrib/mwe/} +} + +@Misc{ package:natbib, + language= {english}, + author = {Patrick W. Daly}, + title = {Natural Sciences Citations and References}, + year = 2010, + month = sep, + edition = {8.31b}, + url = {CTAN://macros/latex/contrib/natbib/} +} + +@Misc{ package:ngerman, + language = {english}, + author = {Bernd Raichle}, + title = {{\Package{ngerman}} package}, + year = 1998, + month = jul, + edition = {2.5e}, + url = {CTAN://language/german/} +} + +@Misc{ package:picture, + language = {english}, + author = {Heiko Oberdiek}, + title = {The {\Package{picture}} package}, + year = 2016, + month = may, + edition = {1.4}, + url = {CTAN://macros/latex/contrib/oberdiek/} +} + +@Misc{ package:ragged2e, + language = {english}, + author = {Martin Schröder}, + title = {The {\Package{Ragged2e}} package}, + year = 2009, + month = jun, + edition = {2.1}, + url = {CTAN://macros/latex/contrib/ms/} +} + +@Misc{ package:selinput, + language= {english}, + author = {Heiko Oberdiek}, + title = {The {\Package{selinput}} package}, + year = 2016, + month = may, + edition = {1.4}, + url = {CTAN://macros/latex/contrib/oberdiek/} +} + +@Misc{ package:setspace, + language= {english}, + author = {Geoffrey Tobin and Robin Fairbairns}, + title = {{\Package{setspace}} {\LaTeX} package}, + year = 2011, + month = dec, + edition = {6.7a}, + url = {CTAN://macros/latex/contrib/setspace/} +} + +@Misc{ package:splitindex, + language= {english}, + author = {Markus Kohm}, + title = {Creating More Than One Index Using {\Package{splitidx}} And {\Package{SplitIndex}}}, + year = 2014, + month = apr, + edition = {1.2a}, + url = {CTAN://macros/latex/contrib/splitindex/} +} + +@Misc{ package:supertabular, + language= {english}, + author = {Braams, Johannes L. and Jurriens, Theo}, + title = {The {\Package{supertabular}} environment}, + year = 2004, + month = feb, + edition = {4.1e}, + url = {CTAN://macros/latex/contrib/supertabular} +} + +@Misc{ package:tabu, + language = {english}, + author = {Florent Chervet}, + title = {tabu and longtabu}, + year = 2011, + month = feb, + edition = {2.8}, + url = {CTAN://macros/latex/contrib/tabu/} +} + +@Misc{ package:topcapt, + language= {english}, + author = {Robin Fairbairns}, + title = {topcapt.sty}, + year = 2004, + month = dec, + edition = {1.2}, + url = {CTAN://macros/latex/contrib/misc/topcapt.sty} +} + +@Misc{ package:tabularx, + language= {english}, + author = {David Carlisle}, + title = {The {\Package{tabularx}} package}, + year = 1999, + month = jan, + edition = {2.07}, + url = {CTAN://macros/latex/required/tools/} +} + +@Misc{ package:tocstyle, + language= {english}, + author = {Markus Kohm}, + title = {The {\KOMAScript} package {\Package{tocstyle}}}, + year = 2013, + month = aug, + edition = {0.2e}, + note = {\KOMAScript} +} + +@Misc{ package:xcolor, + language = {english}, + author = {Dr. Uwe Kern}, + title = {Extending {\LaTeX}'s color facilities: the {\Package{xcolor}} package}, + year = 2007, + month = jan, + edition = {2.11}, + url = {CTAN://macros/latex/contrib/xcolor/} +} + +@Misc{ package:xpatch, + language= {english}, + author = {Enrico Gregorio}, + title = {The {\Package{xpatch}} package, Extending {\Package{etoolbox}} patching commands}, + year = 2012, + month = oct, + edition = {0.3}, + url = {CTAN://macros/latex/contrib/xpatch/} +} + +@Misc{ homepage, + language = {ngerman}, + key = {KDP}, + title = {{\KOMAScript{}} Homepage}, + url = {http://www.komascript.de} +} + +@Misc{ https://komascript.de/comment/5070, + language= {ngerman}, + author= {Markus Kohm}, + title= {{\OptionValue{chapteratlists}{entry}} automatisch nur für Kapitel mit Einträgen}, + year= 2015, + month= jul, + url= {https://komascript.de/comment/5070#comment-5070}, +} + +@Misc{ https://komascript.de/node/2154, + language= {ngerman}, + author = {Felix999}, + title = {Paket {\Package{adrconf}} verlangt nicht vorhandene Datei {\File{scrpage.sty}}}, + year = 2017, + month = dec, + url = {https://komascript.de/node/2154}, +} + +@Misc{ www:NF.lco, + language = {english}, + author = {Jean-Marie Pacquet}, + title = {{KomaLetter2}; {E}xample by {J}ean-{M}arie {P}acquet ({F}rench style)}, + institution = {wiki.lyx.org}, + howpublished = {Wiki}, + url = {http://wiki.lyx.org/Examples/KomaLetter2#toc6} +} + +@Misc{ www:blaettery, + language = {ngerman}, + author = {Jürgen F. Schopp}, + address = {mailto: \url{jurgen.schapp@uta.fi}}, + title = {Blätter (und Tipps) zur Typografie}, + institution = {Institut für Sprach- und Translationswissenschaften}, + organization = {Universität Tampere, Finnland}, + year = 2002, + month = sep, + edition = {2}, + url = {http://www.uta.fi/~trjusc/typoblatt.htm} +} + +@Misc{ www:gutetypo, + language = {ngerman}, + author = {Hermann Rotermund}, + title = {Gute Typographie auf Papier und im Web}, + url = {http://www.weisses-rauschen.de/hero/Typographie.htm} +} + +@Misc{ www:typoclass, + language = {ngerman}, + author = {Axel Reichert}, + title = {Typografie -- Gestaltung einer Beispielklasse}, + howpublished = {Tutorium auf der Tagung DANTE'99}, + year = 1999, + month = feb, + url = {CTAN://info/german/typografie/} +} + +@Misc{ DANTE:FAQ, + language = {ngerman}, + author = {Wiki}, + title = {Deutsche {\TeX}-FAQ}, + url = {http://projekte.dante.de/DanteFAQ/WebHome} +} + +@Misc{ UK:FAQ, + language= {english}, + key = {FAQ}, + editor = {Robin Fairbairns}, + title = {TeX Frequently Asked Questions on the Web}, + year = 2013, + month = jun, + edition = {3.27}, + url = {http://www.tex.ac.uk/faq} +} + +% end of file `scrguide.bib' diff --git a/macros/latex/contrib/koma-script/doc/scrguide.cls b/macros/latex/contrib/koma-script/doc/scrguide.cls new file mode 100644 index 0000000000..e27721dd0f --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrguide.cls @@ -0,0 +1,2996 @@ +% ====================================================================== +% scrguide.cls +% Copyright (c) Markus Kohm, 2005-2022 +% +% 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.md. +% ---------------------------------------------------------------------- +% scrguide.cls +% Copyright (c) Markus Kohm, 2005-2022 +% +% 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.md aufgefuehrten Dateien. +% ====================================================================== +% +% \section{Identification} +% +% \begin{macrocode} +\ProvidesClass{scrguide}[2022/05/17 v1.27 internal KOMA-Script guide class] +% \end{macrocode} +% +% +% \section{Options on my own} +% +% This class also has options. +% +% The class knows two language options (and some aliases) +% \begin{option}{english} +% \begin{macrocode} +\DeclareOption{english}{\def\languagename{english}} +\DeclareOption{UKenglish}{% + \ClassWarning{scrguide}{Language `english' will be used instead of + `\CurrentOption'}% + \def\languagename{english}% +} +\DeclareOption{USenglish}{% + \ClassWarning{scrguide}{Language `english' will be used instead of + `\CurrentOption'}% + \def\languagename{english}% +} +\DeclareOption{british}{% + \ClassWarning{scrguide}{Language `english' will be used instead of + `\CurrentOption'}% + \def\languagename{english}% +} +\DeclareOption{american}{% + \ClassWarning{scrguide}{Language `english' will be used instead of + `\CurrentOption'}% + \def\languagename{english}% +} +\DeclareOption{ngerman}{\def\languagename{ngerman}} +\DeclareOption{german}{% + \ClassWarning{scrguide}{Language `ngerman will be used instead of + `\CurrentOption'}% + \def\languagename{ngerman}% +} +% \end{macrocode} +% \end{option} +% +% \begin{option}{pagereftolabel} +% |\autopageref| should reference the label not the page. +% \begin{option}{pagereftopage} +% |\autopageref| should reference the page not the label. +% \begin{macro}{\if@pagereftolabel} +% \begin{macrocode} +\newif\if@pagereftolabel\@pagereftolabeltrue +\DeclareOption{pagereftolabel}{\@pagereftolabeltrue} +\DeclareOption{pagereftopage}{\@pagereftolabelfalse} +% \end{macrocode} +% \end{macro} +% \end{option} +% \end{option} +% +% \begin{option}{moreindexnotes} +% Show more notes at the index. +% \begin{option}{lessindexnotes} +% Show less notes at the index. +% \begin{macro}{\if@moreindexnotes} +% \begin{macrocode} +\newif\if@moreindexnotes\@moreindexnotesfalse +\DeclareOption{moreindexnotes}{\@moreindexnotestrue} +\DeclareOption{lessindexnotes}{\@moreindexnotesfalse} +% \end{macrocode} +% \end{macro} +% \end{option} +% \end{option} +% +% Note: You have to pass options to class \textsf{scrguide}, because only +% these options will be processed by |\LoadClassWithOptions| below. +% \begin{macrocode} +\ExecuteOptions{pagereftolabel,lessindexnotes} +\PassOptionsToClass{% + bibliography=totoc, + index=totoc, + captions=tableabove, + headings=small, + headings=optiontoheadandtoc, + version=last, +}{scrguide} +\ProcessOptions\relax +% \end{macrocode} +% +% +% \section{Load the Base Class and Packages} +% +% \begin{macro}{\KOMAProvidesFile} +% \begin{macro}{\@KOMAProvidesFile} +% \changes{v1.22b}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}%^^A +% Extended version of |\ProvidesFile|, that uses the date from the +% repository. +% \begin{macrocode} +\newcommand*{\KOMAProvidesFile}{} +\def\KOMAProvidesFile#1{% + \@ifnextchar [%] + {\@KOMAProvidesFile{#1}}{\ProvidesFile{#1}\relax}% +} +\newcommand*{\@KOMAProvidesFile}{} +\def\@KOMAProvidesFile#1[$#2: #3-#4-#5 #6$#7]{% + \Ifstr{#2}{Date}{% + \ProvidesFile{#1}[#3/#4/#5 \detokenize{#6 #7}]\relax + }{% + \ClassError{scrguide}{missmatch repository date string}{% + It seams, that you haven't used $% + Date: YYYY-MM-DD $ for the date of \string\KOMAProvidesFile.}% + \ProvidesFile{#1}[$#2: #3/#4/#5 \detokenize{#6}$\detokenize{#7}]\relax + }% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macrocode} +\LoadClassWithOptions{scrbook} +\RequirePackage[TS1,T1]{fontenc} +\newcommand*{\strngerman}{ngerman} +\newcommand*{\strenglish}{english} +\edef\reserved@a{\languagename}% +\@onelevel@sanitize\reserved@a +\@onelevel@sanitize\strngerman +\@onelevel@sanitize\strenglish +\edef\languages{\ifx\reserved@a\strngerman main=\fi ngerman,% + \ifx\reserved@a\strenglish main=\fi english} +\edef\uselanguage{\languagename} +\expandafter\RequirePackage\expandafter[\languages]{babel}% +\AtBeginDocument{% + \edef\reserved@a{\languagename}% + \@onelevel@sanitize\reserved@a + \typeout{TRACE: Current language is `\reserved@a`.}% + \ifx\reserved@a\strngerman + \newcommand*{\shortlang}{de}% + \else + \newcommand*{\shortlang}{en}% + \fi +} +\newcommand*{\linclude}[1]{\include{#1-\shortlang}} +% \end{macrocode} +% In future we should use biblatex instead of babelbib, but currently some +% things are still missing: +% \begin{itemize} +% \item prefix \texttt{CTAN://}, +% \item line breaks after the author (but not full \texttt{openbib} style like +% \texttt{block=nbpar}), +% \item removing language tag \texttt{ngerman} from output. +% \end{itemize} +% So currently we still use babelbib. +% \begin{macrocode} +\newif\ifusebabelbib\usebabelbibtrue % Should be deactivated soon +\ifusebabelbib + \RequirePackage[fixlanguage]{babelbib} + \newcommand*{\printbibliography}[1][]{\bibliography{scrguide}} +\else + \RequirePackage[backend=bibtex,style=alphabetic,block=ragged]{biblatex} + \DeclareFieldFormat{url}{\url{#1}} +\fi +\RequirePackage{afterpage} +\RequirePackage{makeidx} +\RequirePackage{scrdate} +\RequirePackage{scrtime} +\RequirePackage{picture} +\RequirePackage{graphicx} +\RequirePackage{booktabs} +\RequirePackage{longtable} +\RequirePackage{amsmath} +\RequirePackage{listings} +\RequirePackage{multicol} +\RequirePackage{marginnote} +\RequirePackage{tabularx} +\RequirePackage{scrhack}% +\RequirePackage{mparhack}% +% \end{macrocode} +% +% \section{Dependence from \KOMAScript{} Version} +% +% \begin{macro}{currentversionlt} +\newcommand*{\currentversionlt}[1]{% + \expandafter\ifx\csname scr@v@#1\endcsname\relax \maxdimen + \else\csname scr@v@#1\endcsname\fi >\scr@compatibility\relax +} +% \end{macrocode} +% \end{macro} +% +% \section{Free or Non-Free Version} +% +% \begin{macrocode} +\newif\ifshortversion\shortversionfalse +\InputIfFileExists{scrnonfree.tex}{}{% + \RequirePackage[svgnames]{xcolor}% + \RequirePackage{tikz}% + \usetikzlibrary{decorations}% + \usetikzlibrary{arrows}% + \usetikzlibrary{calc}% + \RequirePackage[\uselanguage]{hyperref}% + \RequirePackage[open,openlevel=0]{bookmark}% improved pdf bookmarks + \typeout{^^J + ----------------------------------------------------------------------^^J + FREE VERSION OF THE KOMA-SCRIPT GUIDE.^^J + NOTE THAT THIS VERSION MAY BE FULL OF UGLY PARAGRAPH AND PAGE BREAKS.^^J + THIS IS BECAUSE THIS VERSION OF THE KOMA-SCRIPT GUIDE IS UNDER^^J + CONSTRUCTION FOREVER.^^J + ----------------------------------------------------------------------^^J + ^^J% + }% + \newcommand*{\iffree}{\@firstoftwo}% + \newcommand*{\important}[2][]{}% + \newcommand*{\textnote}[2][]{}% + \shortversiontrue + \newcommand*{\LoadNonFree}[2]{\par\GuideLoadNonFree\par}% + \AtBeginDocument{\InputIfFileExists{linkalias.tex}{}{}}% + \usepackage{lmodern}% + \@twosidefalse\@openrightfalse\@mparswitchfalse + \RequirePackage{geometry}% + \geometry{papersize={180mm,210mm},% + includehead,includemp,reversemp,marginparwidth=4em,% + vmargin={1.5mm,3mm},hmargin=1.75mm}% + \RequirePackage{scrlayer-scrpage}% + \clearpairofpagestyles + \ihead{% + \smash{% + \hspace*{.5em}\rule[-\dp\strutbox]{0pt}{\headheight}\headmark + }% + }% + \ohead*{\smash{\pagemark\hspace{2mm}}}% + \colorlet{headbackground}{DarkBlue}% + \colorlet{headline}{white}% + \setkomafont{pageheadfoot}{\small\sffamily\bfseries\color{headline}}% + \setkomafont{pagenumber}{}% + \DeclareNewLayer[head,background, + hoffset=0pt, + width=\paperwidth, + addheight=\dimexpr \topmargin+1in+\dp\strutbox\relax, + addvoffset=2\dp\strutbox, + contents={% + \color{headbackground}\rule{\layerwidth}{\layerheight}}] + {headbackground}% + \AddLayersAtBeginOfPageStyle{scrheadings}{headbackground}% + \renewcommand*{\chaptermark}[1]{% + \@mkdouble{\Ifnumbered{chapter}{\chaptermarkformat}{}##1}% + }% + \renewcommand*{\chaptermarkformat}{% + \makebox[\dimexpr \oddsidemargin+1in-.5em][r]{% + \chapapp~\thechapter:~% + }% + }% + \renewcommand*{\chapterformat}{}% + \renewcommand*{\chapterpagestyle}{scrheadings}% + \setlength{\@tempdimc}{\oddsidemargin}% + \addtolength{\@tempdimc}{1in}% + \KOMAoptions{headwidth=paper:-\@tempdimc}% + % Entweder: + \hypersetup{colorlinks,citecolor=Green,linkcolor=Crimson,urlcolor=Blue}% + % oder: +% \hypersetup{pdfborderstyle={/S/U/W 1}}% + \let\orig@maketitle\maketitle + \def\maketitle{% + \begingroup + \@twosidetrue + \let\cleardoublepage\clearpage + \addtolength{\oddsidemargin}{\evensidemargin}% + \setlength{\evensidemargin}{.5\oddsidemargin}% + \setlength{\oddsidemargin}{\evensidemargin}% + \orig@maketitle\relax + \endgroup + }% + \renewcommand*{\chapterheadstartvskip}{}% + \raggedbottom + \sloppy + \lstset{breaklines,prebreak=\mbox{$\hookleftarrow$}}% +}% +% \end{macrocode} +% +% Now loading the last package (better do it late than never): +% \begin{macrocode} +\RequirePackage{textcomp} +% \end{macrocode} +% +% \section{Load common paragraphs} +% +% \begin{macrocode} +\newcommand*{\ThisCommonFile}{}% +\newcommand*{\ThisCommonLabelBase}{} +\newcommand*{\IfThisCommonLabelBase}[1]{% + \expandafter\Ifstr\expandafter{\ThisCommonLabelBase}{#1}% + \@firstoftwo\@secondoftwo +} +\newcommand*{\IfThisCommonLabelBaseOneOf}[1]{% + \begingroup + \@tempswafalse + \@for \reserved@a:=#1\do{% + \expandafter\IfThisCommonLabelBase\expandafter{\reserved@a}% + {\@tempswatrue}{}% + }% + \if@tempswa + \aftergroup\@firstoftwo + \else + \aftergroup\@secondoftwo + \fi + \endgroup +} +\newcommand*{\IfThisCommonLabelBaseNotOneOf}[1]{% + \begingroup + \@tempswafalse + \@for \reserved@a:=#1\do{% + \expandafter\IfThisCommonLabelBase\expandafter{\reserved@a}% + {\@tempswatrue}{}% + }% + \if@tempswa + \aftergroup\@secondoftwo + \else + \aftergroup\@firstoftwo + \fi + \endgroup +} +\newcommand*{\ThisCommonFirstLabelBase}{% + \@nameuse{CommonFile@\ThisCommonFile @LabelBase}% +} +\newif\ifthiscommonfirst +\newcommand*{\IfThisCommonFirstRun}{% + \ifthiscommonfirst \expandafter\@firstoftwo + \else \expandafter\@secondoftwo \fi +} +\newcommand*{\LoadCommonFile}[1]{% + \Ifstr{\ThisCommonFile}{}{% + \def\ThisCommonFile{#1}% + \let\ThisCommonLabelBase\label@base + \@ifundefined{CommonFile@\ThisCommonFile @LabelBase}{% + \expandafter\let\csname CommonFile@\ThisCommonFile @LabelBase\endcsname + \ThisCommonLabelBase + \thiscommonfirsttrue + }{\thiscommonfirstfalse}% + \input{common-\ThisCommonFile-\shortlang.tex}% + \thiscommonfirstfalse + \let\ThisCommonLabelBase\@empty + \let\ThisCommonFile\@empty + }{% + \ClassError{scrguide}{recursive \string\LoadCommon}{% + You can not use \string\LoadCommon\space inside another + common file.% + }% + }% +} +\newcommand*{\InternalCommonFileUsageError}{% + \GenericError{% + (common-\ThisCommonFile-\shortlang.tex)\@spaces + }{% + Common File common-\ThisCommonFile-\shortlang.tex Error: Unprepared usage% + }{% + You have to prepare the file for the label base \ThisCommonLabelBase.% + }{}% +} +% \end{macrocode} +% +% \section{Language Dependencies} +% +% We load the language dependency file at |\begin{document}| and add some +% of the extensions to the language. +% \begin{macrocode} +\AtBeginDocument{% + \InputIfFileExists{terms-\shortlang.tex}{% + \ClassInfo{scrguide}{Loading language dependencies for \languagename}% + }{% + \ClassError{scrguide}{\languagename\space not supported}{% + You've tried to generate a guide for language `\languagename' but + language\MessageBreak + dependency file `terms-\shortlang.tex' was not found.\MessageBreak + This may result in a lot of errors and warnings, if you'll continue}% + }% + \expandafter\addto\csname extras\uselanguage\endcsname + \GuideLanguageExtensions\GuideLanguageExtensions +} +% \end{macrocode} +% +% +% \section{Breaking of Paragraphs and Pages} +% +% There are several parameters to configure the breaking. I've tried to find +% good values. First of all the placement of floats and text. +% \begin{macrocode} +\renewcommand*{\floatpagefraction}{.75}% was .6 +\renewcommand*{\textfraction}{.2}% original +\renewcommand*{\topfraction}{.75}% was .7 +\renewcommand*{\bottomfraction}{.33}% was .3 +\setcounter{topnumber}{1}% was 2 +\setcounter{bottomnumber}{1}% original +\setcounter{totalnumber}{3}% original +% \end{macrocode} +% +% +% \section{Find the Date of the Newest Documentation File} +% +% \begin{macro}{\newestfiledate} +% The latex date of the newest used file. +% \begin{macrocode} +\newcommand*{\newestfiledate}{0001-01-01} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@notonlypreamble} +% Remove commands from to be \@onlypreamble commands. +% \begin{macrocode} +\newcommand*{\@notonlypreamble}[1]{% + \begingroup + \let\new@preamblecmds\@empty% + \def\do##1{\ifx ##1#1\else + \expandafter\def\expandafter\new@preamblecmds\expandafter{% + \new@preamblecmds\do##1}\fi}% + \@preamblecmds + \global\let\@preamblecmds\new@preamblecmds + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@ifl@t@r} +% Not longer a |\@onlypreamble| command. +% \begin{macrocode} +\@notonlypreamble\@ifl@t@r +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@parse@version} +% Not longer a |\@onlypreamble| command. +% \begin{macrocode} +\@notonlypreamble\@parse@version +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@latex@version} +% Like |\@parse@version| but returns a \LaTeX{} date. +% \begin{macrocode} +\newcommand*{\@latex@version}{} +\def\@latex@version#1/#2/#3#4#5\@nil{#1/#2/#3#4} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@iso@version} +% Like |\@parse@version| but returns an iso date. +% \begin{macrocode} +\newcommand*{\@iso@version}{} +\def\@iso@version#1/#2/#3#4#5\@nil{#1-#2-#3#4} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\IsoDate} +% Converts \LaTeX{} date #1 into an iso date. +% \begin{macrocode} +\newcommand*{\IsoDate}[1]{\expandafter\@iso@version#1//00\@nil} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@CheckDate} +% Check if the provided date of file #1.tex is newer than +% \@newestfiledate. If so, write the new date to the aux file. +% \begin{macrocode} +\newcommand*{\@CheckDate}[1]{% + \begingroup + \expandafter\ifx\csname ver@#1.tex\endcsname\relax\else + \typeout{\csname ver@#1.tex\endcsname}% + \expandafter\@ifl@t@r\csname ver@#1.tex\endcsname\newestfiledate{% + \xdef\newestfiledate{% + \expandafter\expandafter\expandafter\@latex@version + \csname ver@#1.tex\endcsname//00\@nil% + }% + \write\@auxout{\noexpand\gdef\noexpand\newestfiledate{% + \newestfiledate}\@percentchar\space #1.tex}% + }{}% + \fi + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% Check the date of the jobfile: +% \begin{macrocode} +\@CheckDate\jobname +% \end{macrocode} +% +% \begin{macro}{\@providesfile} +% \begin{macro}{\SCR@providesfile} +% Redefine |\ProvidesFile| to also check the date. +% \begin{macrocode} +\newcommand*{\SCR@providesfile}{} +\AtBeginDocument{% + \let\SCR@providesfile\@providesfile + \def\@providesfile#1[#2]{% + \SCR@providesfile#1[#2]% + \expandafter\@CheckDate\expandafter{\expandafter\@BaseFileName#1.\@nil}% + }% +} +% \end{macrocode} +% \begin{macro}{\@BaseFileName} +% Split of extension of the file name. +% \begin{macrocode} +\newcommand*{\@BaseFileName}{} +\def\@BaseFileName#1.#2\@nil{#1} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% Predefine current date: +% \begin{macrocode} +\AtBeginDocument{\date{\IsoDate\newestfiledate}} +% \end{macrocode} +% +% +% \section{Collect All Translators} +% +% At the translated guides, the translators should also be shown somewhere at +% the title. +% +% \begin{macro}{\translator} +% \changes{v0.9d}{2007/09/18}{new} +% This macro is used, so save one or more translators into the aux file. +% \begin{macrocode} +\newcommand*{\translator}[1]{% + \protected@write\@auxout{\def\and{,}}{% + \protect\@addtranslators{#1}% + }% +} +% \end{macrocode} +% \begin{macro}{\@translator} +% \begin{macro}{\@addtranslator} +% And we need macros so store the translators +% \begin{macrocode} +\newcommand*{\@translator}{} +% \end{macrocode} +% and to read the translators from the aux file. +% \begin{macrocode} +\newcommand*{\@addtranslators}[1]{% + \ifx\@translator\@empty\else\g@addto@macro\@translator{,}\fi + \g@addto@macro\@translator{#1}% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \begin{macro}{\settranslator} +% \changes{v0.9d}{2007/09/18}{new} +% Last but not least, we need a macro to set the list of translators. +% \begin{macrocode} +\newcommand{\settranslator}[2]{% + \ifx\@translator\@empty\else + #1% + \begingroup +% \end{macrocode} +% Run through all translators, but store each once only. +% \begin{macrocode} + \let\@tempb\@empty + \@tempcnta=\z@ + \expandafter\@for \expandafter\@tempa\expandafter:\expandafter=% + \@translator\do {% + \ifx\@tempa\@empty\else +% \typeout{Test: `,\@tempa,' at `,\@tempb,'}% + \@expandtwoargs\in@{,\@tempa,}{,\@tempb,}% + \ifin@\else + \edef\@tempb{\@tempb\@tempa,}% + \advance\@tempcnta by 1\relax + \fi + \fi + }% +% \end{macrocode} +% Set each of the stored translators. +% \begin{macrocode} + \@tempcntb=\z@ + \expandafter\@for \expandafter\@tempa\expandafter:\expandafter=% + \@tempb\do {% + \ifx\@tempa\@empty\else + \advance\@tempcntb by 1\relax + \typeout{Translator \the\@tempcntb: \@tempa}% + \ifnum\@tempcntb >\@ne\relax + \ifnum\@tempcntb=\@tempcnta\relax + \ifnum\@tempcntb=\tw@\relax + \GuideAnd + \else + \GuideListAnd + \fi + \else + , + \fi + \fi + \@tempa + \fi + }% + \endgroup + #2% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \section{Emphasization and Fonts} +% +% The \KOMAScript{} guide uses a lot of emphasizations. Most of them are +% declared robustly to avoid problems at index, change log etc. +% +% We need some colors for emphasizing in images: +% \begin{macrocode} +\colorlet{ImageRed}{Crimson}% +\colorlet{ImageBlue}{Blue}% +\colorlet{ImageGreen}{Green}% +\colorlet{ImageYellow}{Yellow}% +% \end{macrocode} +% +% \begin{macro}{\textsfrm} +% Something like |\emph| using |\textsf| and |\textrm| instead of |\textit| +% and |\textup|. +% \begin{macrocode} +\newcommand*{\textsfrm}[1]{% + \begingroup + \edef\@tempa{\sfdefault}% + \ifx\@tempa\f@family\textrm{#1}\else\textsf{#1}\fi + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\File} +% \changes{v1.25}{2021/02/11}{usage of \cs{texorpdfstring}} +% \begin{macro}{\Class} +% \changes{v1.25}{2021/02/11}{usage of \cs{texorpdfstring}} +% \begin{macro}{\Package} +% \changes{v1.25}{2021/02/11}{usage of \cs{texorpdfstring}} +% Some markup macros for files with special meanings. +\DeclareRobustCommand*{\File}[1]{\texorpdfstring{\mbox{\texttt{#1}}}{#1}} +\DeclareRobustCommand*{\Class}[1]{\texorpdfstring{\mbox{\textsfrm{#1}}}{#1}} +\DeclareRobustCommand*{\Package}[1]{\texorpdfstring{\mbox{\textsfrm{#1}}}{#1}} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\DeclareSpecialMarkup} +% Command to declare special markup commands, that behave different in- and +% outside |Description| environment. Parameters are: +% \begin{declaration} +% \item[\arg{command}:] The the markup command, that should be defined. +% \item[\arg{outside definition}:] Definition of the markup command +% outside |Description| environment. +% \item[\arg{inside definition}:] Definition of the markup command inside +% |Description| environment. +% \item{\oarg{inside end definition}:] Definition of the \cs{end} command, +% if inside |Description| an markup environment instead of an markup +% command would be used. +% \end{declaration} +% At the end color \meta{command name} will be black and \cs{\meta{command +% name}}, \cs{text\meta{command name}, \cs{Desc\meta{command name}}, and +% optionally \cs{endDesc\meta{command name} will be defined, with +% \cs{\meta{command name}} is \meta{command}. +% \begin{macrocode} +\newcommand\DeclareSpecialMarkup[3]{% + \newcommand*#1{}% + \expandafter\colorlet\expandafter{\expandafter\@gobble\string#1}{black}% + \expandafter\newcommand\expandafter*% + \csname text\expandafter\@gobble\string #1\endcsname[1]{#2}% + \expandafter\DeclareRobustCommand\expandafter*\expandafter#1\expandafter{% + \csname text\expandafter\@gobble\string #1\endcsname}% + \expandafter\newcommand\expandafter*% + \csname Desc\expandafter\@gobble\string #1\endcsname[1]{#3}% + \kernel@ifnextchar [% + {\expandafter\@optdef + \csname endDesc\expandafter\@gobble\string #1\endcsname}% + {}%] +} +% \end{macrocode} +% \begin{macro}{\@optdef} +% Helper to define a macro via optional instead of mandatory argument +\newcommand*{\@optdef}{} +\long\def\@optdef#1[#2]{\def#1{#2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\Macro} +% \changes{v1.25}{2021/02/11}{usage of \cs{texorpdfstring}} +% \begin{macro}{\Option} +% \begin{macro}{\KOption} +% \begin{macro}{\OptionValue} +% \begin{macro}{\Environment} +% \begin{macro}{\Counter} +% \begin{macro}{\Length} +% \changes{v1.25}{2021/02/11}{usage of \cs{texorpdfstring}} +% \begin{macro}{\PLength} +% \changes{v1.17}{2019/10/24}{\cs{setplength} verschoben}%^^A +% \begin{macro}{\FloatStyle} +% \begin{macro}{\PageStyle} +% \begin{macro}{\Variable} +% \begin{macro}{\FontElement} +% \begin{macro}{\DoHook} +% \changes{v1.14}{2019/02/20}{neu}%^^A +% \begin{macro}{\PName} +% \begin{macro}{\PValue} +% \begin{macro}{\Parameter} +% \begin{macro}{\OParameter} +% \begin{macro}{\AParameter} +% \begin{macro}{\PParameter} +% \begin{macro}{\POParameter} +% \begin{description} +% \item[\cs{Macro}] \LaTeX{} or \TeX{} macro +% \item[\cs{Option}] class or package option +% \item[\cs{KOption}] |\KOMAoptions| option +% \item[\cs{Environment}] \LaTeX{} environment +% \item[\cs{Counter}] \LaTeX{} counter +% \item[\cs{Length}] \LaTeX{} length +% \item[\cs{PLength}] \KOMAScript{} pseudo length +% \item[\cs{Variable}] \KOMAScript{} variable +% \item[\cs{FontElement}] \KOMAScript{} element that has its own font +% selection +% \item[\cs{PName}] name of a parameter of a macro or environment +% \item[\cs{PValue}] value of a parameter of a macro or environment +% \item[\cs{Parameter}] the mandatory parameter of a macro or environment +% \item[\cs{OParameter}] the optional parameter of a macro or environment +% \item[\cs{AParameter}] the alternativ parameter of a macro or environment +% \item[\cs{PParameter}] the part-of-command parameter of a macro or +% environment +% \end{description} +% \begin{macrocode} +\newcommand*{\LabelMacro}[2][\label@suffix]{% + \begingroup + \protected@edef\@currentlabel{\Macro{#2}}% + \label@sanitize + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.cmd.#2#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \label{\label@desc@prefix\label@base.cmd.#2#1}% + \endgroup +} +\DeclareRobustCommand*{\DescRef}{% + \kernel@ifstar {\@DescRef*}{\@DescRef\@empty}% +} +\newcommand*{\@DescRef}[2]{\expandafter\ref#1{\label@desc@prefix#2}} +\DeclareRobustCommand*{\DescPageRef}{% + \kernel@ifstar {\@DescPageRef*}{\@DescPageRef\space}% +} +\newcommand*{\@DescPageRef}[2]{\expandafter\autopageref#1{\label@desc@prefix#2}} +\DeclareSpecialMarkup{\Macro}{% + \texorpdfstring{\mbox{\texttt{\char`\\#1}}}{\textbackslash#1}% +}{% + \par + \settowidth{\leftskip}{\textMacro{#1}}% indent from left + \hskip-\leftskip + \BeginIndex{Cmd}{#1}% index entry + \LabelMacro{#1}% + \textMacro{#1}% +} +\newcommand*{\LabelOption}[2][\label@suffix]{% + \begingroup + \protected@edef\@currentlabel{\Option{#2}}% + \label@sanitize + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.option.#2#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \expandafter\gdef + \csname \label@desc@prefix\label@base.option.#2#1\endcsname{}% + \label{\label@desc@prefix\label@base.option.#2#1}% + \endgroup +} +\DeclareSpecialMarkup{\Option}{\mbox{\texttt{#1}}}{% + \par + \leftskip\z@ + \BeginIndex{Option}{#1}% index entry + \LabelOption{#1}% + \textOption{#1}% +} +\DeclareSpecialMarkup{\KOption}{% + \mbox{\textOption{#1=}}\linebreak[0]% +}{% + \ClassWarning{scrguide}{You should replace + \string\KOption{#1}\string\PName{...}\MessageBreak + by \string\OptionVName{#1}{...}}% + \par + \leftskip\z@ + \BeginIndex{Option}{#1}% index entry + \begingroup + \@nameuse{phantomsection}% + \label@sanitize + \expandafter\gdef + \csname \label@desc@prefix\label@base.option.#1\label@suffix\endcsname{}% + \label{\label@desc@prefix\label@base.option.#1\label@suffix}% + \endgroup + \textOption{#1=}% +} +\newcommand*{\maybelinebreak}{% + \ifvmode\else + \ifnum\lastpenalty<\z@\else + \ifnum\lastpenalty<\@medpenalty + \hskip\z@skip + \fi + \fi + \fi +} +\DeclareRobustCommand*{\textKValue}[1]{\maybelinebreak\mbox{\texttt{#1}}} +\newcommand*{\KValue}{} +\let\KValue\textKValue +\newcommand*{\textOptionValue}[2]{% + \textKOption{#1}\textKValue{#2}% +} +\DeclareRobustCommand*{\OptionValue}{\textOptionValue}% +\newcommand*{\LabelOptionValue}[3][\label@suffix]{% + \begingroup + \protected@edef\@currentlabellong{\OptionValue{#2}{#3}}% + \protected@edef\@currentlabelshort{\Option{#2}}% + \label@sanitize + \scr@ifundefinedorrelax{% + \label@desc@prefix\label@base.option.#2\label@suffix + }{% + \expandafter\gdef + \csname \label@desc@prefix\label@base.option.#2\label@suffix\endcsname{}% + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.option.#2#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \let\@currentlabel\@currentlabelshort + \label{\label@desc@prefix\label@base.option.#2#1}% + }{}% + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.option.#2.#3#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \let\@currentlabel\@currentlabellong + \label{\label@desc@prefix\label@base.option.#2.#3#1}% + \endgroup +} +% \end{macrocode} +% \begin{macro}{\OptionValueRef} +% \cs{OptionValue} by reference. Use it like +% |\OptionValueRef[suffix]{maincls}{version}{3.20}|. +% \begin{macrocode} +\newcommand*{\OptionValueRef}{% + \kernel@ifstar {\@RefOptionValue0}{\@RefOptionValue1}% +} +\newcommand*{\@RefOptionValue}[1]{% + \kernel@ifnextchar [%] + {\@@RefOptionValue#1}{\@@RefOptionValue#1[]}% +} +\newcommand*{\@@RefOptionValue}{} +\def\@@RefOptionValue#1[#2]#3#4#5{% + \scr@ifundefinedorrelax{r@\label@desc@prefix#3.option.#4.#5#2}{% + \ifcase #1 + \expandafter\scr@no@hyperref + \else + \expandafter\hyperref + \fi + [\label@desc@prefix#3.option.#4#2]% + {\OptionValue{\ref*{\label@desc@prefix#3.option.#4#2}}{#5}}% + }{% + \expandafter\ref\ifcase #1 *\fi{\label@desc@prefix#3.option.#4.#5#2}% + }% +} +\newcommand*{\scr@no@hyperref}[2][]{#2} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\newcommand*{\DescOptionValue}[2]{% + \par + \leftskip\z@ + \BeginIndex{Option}{#1}% + \BeginIndex{Option}{#1~=\KValue{#2}}% + \LabelOptionValue{#1}{#2}% + \textOptionValue{#1}{#2}% +} +\newcommand*{\textOptionVName}[2]{% + \textKOption{#1}\PName{#2}% +} +\DeclareRobustCommand*{\OptionVName}{\textOptionVName}% +\newcommand*{\LabelOptionVName}[3][\label@suffix]{% + \begingroup + \protected@edef\@currentlabellong{\OptionVName{#2}{#3}}% + \protected@edef\@currentlabelshort{\Option{#2}}% + \label@sanitize + \scr@ifundefinedorrelax{% + \label@desc@prefix\label@base.option.#2\label@suffix + }{% + \expandafter\gdef + \csname \label@desc@prefix\label@base.option.#2\label@suffix\endcsname{}% + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.option.#2#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \let\@currentlabel\@currentlabelshort + \label{\label@desc@prefix\label@base.option.#2#1}% + }{}% + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.option.#2=#3#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \let\@currentlabel\@currentlabellong + \label{\label@desc@prefix\label@base.option.#2=#3#1}% + \endgroup +} +% \end{macrocode} +% \begin{macro}{\OptionVNameRef} +% \cs{OptionVName} by reference. Use it like +% |\OptionVNameRef[suffix]{maincls}{version}{value}|. +% \begin{macrocode} +\newcommand*{\OptionVNameRef}{% + \kernel@ifstar {\@RefOptionVName0}{\@RefOptionVName1}% +} +\newcommand*{\@RefOptionVName}[1]{% + \kernel@ifnextchar [%] + {\@@RefOptionVName#1}{\@@RefOptionVName#1[]}% +} +\newcommand*{\@@RefOptionVName}{} +\def\@@RefOptionVName#1[#2]#3#4#5{% + \scr@ifundefinedorrelax{r@\label@desc@prefix#3.option.#4=#5#2}{% + \ifcase #1 + \expandafter\scr@no@hyperref + \else + \expandafter\hyperref + \fi + [\label@desc@prefix#3.option.#4#2]% + {\OptionVName{\ref*{\label@desc@prefix#3.option.#4#2}}{#5}}% + }{% + \expandafter\ref\ifcase #1 *\fi{\label@desc@prefix#3.option.#4=#5#2}% + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\newcommand*{\DescOptionVName}[2]{% + \par + \leftskip\z@ +% \BeginIndex{Option}{#1}% + \BeginIndex{Option}{#1~=\PName{#2}}% + \LabelOptionVName{#1}{#2}% + \textOptionVName{#1}{#2}% +} +\newcommand*{\LabelFloatStyle}[2][\label@suffix]{% + \begingroup + \protected@edef\@currentlabel{\FloatStyle{#2}}% + \label@sanitize + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.floatstyle.#2#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \label{\label@desc@prefix\label@base.floatstyle.#2#1}% + \endgroup +} +\DeclareSpecialMarkup{\FloatStyle}{\mbox{\texttt{#1}}}{% + \par + \leftskip\z@ + \BeginIndex{Floatstyle}{#1}% + \LabelFloatStyle{#1}% + \textFloatStyle{#1}% +} +\newcommand*{\LabelPageStyle}[2][\label@suffix]{% + \begingroup + \protected@edef\@currentlabel{\PageStyle{#2}}% + \label@sanitize + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.pagestyle.#2#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \label{\label@desc@prefix\label@base.pagestyle.#2#1}% + \endgroup +} +\DeclareSpecialMarkup{\PageStyle}{\mbox{\texttt{#1}}}{% + \par + \leftskip\z@ + \BeginIndex{Pagestyle}{#1}% + \LabelPageStyle{#1}% + \scr@ifundefinedorrelax{r@\label@desc@prefix maincls.cmd.pagestyle}{% + \textMacro{pagestyle}% + }{% + \begingroup + \let\Macro\textMacro + \DescRef{maincls.cmd.pagestyle}% + \endgroup + }\PParameter{#1}% +} +\newcommand*{\LabelEnvironment}[2][\label@suffix]{% + \begingroup + \protected@edef\@currentlabel{\Environment{#2}}% + \label@sanitize + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.env.#2#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \label{\label@desc@prefix\label@base.env.#2#1}% + \endgroup +} +\DeclareSpecialMarkup{\Environment}{\mbox{\texttt{#1}}}{% + \par + \settowidth{\leftskip}{\textMacro{begin}\PParameter{#1}}% siehe Macro + \hskip-\leftskip + \BeginIndex{Env}{#1}% + \LabelEnvironment{#1}% + \textMacro{begin}\PParameter{#1}% + \def\d@EnvironmentName{#1}% Umgebungsnamen merken für das Ende +}[{% + \ifvmode\hskip-\leftskip\else \unskip\,\dots\fi% \begin{…}…\end{…} + \textMacro{end}\expandafter\PParameter\expandafter{\d@EnvironmentName}\par +}]% +\newcommand*{\LabelCounter}[2][\label@suffix]{% + \begingroup + \protected@edef\@currentlabel{\Counter{#2}}% + \label@sanitize + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.counter.#2#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \label{\label@desc@prefix\label@base.counter.#2#1}% + \endgroup +} +\DeclareSpecialMarkup{\Counter}{\mbox{\texttt{#1}}}{% + \par + \leftskip\z@ + \BeginIndex{Counter}{#1}% + \LabelCounter{#1}% + \textCounter{#1}% +} +\newcommand*{\LabelLength}[2][\label@suffix]{% + \begingroup + \protected@edef\@currentlabel{\Length{#2}}% + \label@sanitize + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.length.#2#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \label{\label@desc@prefix\label@base.length.#2#1}% + \endgroup +} +\DeclareSpecialMarkup{\Length}{% + \texorpdfstring{\mbox{\texttt{\char`\\#1}}}{\textbackslash#1}% +}{% + \par + \leftskip\z@ + \BeginIndex{Length}{#1}% index entry + \LabelLength{#1}% + \textLength{#1}% +} +\newcommand*{\LabelPLength}[2][\label@suffix]{% + \begingroup + \protected@edef\@currentlabel{\PLength{#2}}% + \label@sanitize + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.plength.#2#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \label{\label@desc@prefix\label@base.plength.#2#1}% + \endgroup +} +\DeclareSpecialMarkup{\PLength}{\mbox{\texttt{#1}}}{% + \par + \leftskip\z@ + \BeginIndex{PLength}{#1}% + \LabelPLength{#1}% + \scr@ifundefinedorrelax{% + r@\label@desc@prefix scrlttr2.cmd.setplength}{% + \textMacro{setplength}% + }{% + \begingroup + \let\Macro\textMacro + \DescRef{scrlttr2.cmd.setplength}% + \endgroup + }% + \PParameter{#1}\Parameter{\lengthname}% +} +\newcommand*{\LabelVariable}[2][\label@suffix]{% + \begingroup + \protected@edef\@currentlabel{\Variable{#2}}% + \label@sanitize + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.variable.#2#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \label{\label@desc@prefix\label@base.variable.#2#1}% + \endgroup +} +\DeclareSpecialMarkup{\Variable}{\mbox{\texttt{#1}}}{% + \par + \leftskip\z@ + \BeginIndex{Variable}{#1}% + \LabelVariable{#1}% + \scr@ifundefinedorrelax{r@\label@desc@prefix scrlttr2.cmd.setkomavar}{% + \textMacro{setkomavar}% + }{% + \begingroup + \let\Macro\textMacro + \DescRef{scrlttr2.cmd.setkomavar}% + \endgroup + }% + \PParameter{#1}\OParameter{\descriptionname}% + \Parameter{\contentname}% +} +\newcommand*{\LabelFontElement}[2][\label@suffix]{% + \begingroup + \protected@edef\@currentlabel{\FontElement{#2}}% + \label@sanitize + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.fontelement.#2#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \label{\label@desc@prefix\label@base.fontelement.#2#1}% + \endgroup +} +\DeclareSpecialMarkup{\FontElement}{\mbox{\texttt{#1}}}{% + \par + \leftskip\z@ + \BeginIndex{FontElement}{#1}% + \LabelFontElement{#1}% + \scr@ifundefinedorrelax{r@\label@desc@prefix\LabelBase.cmd.setkomafont}{% + \scr@ifundefinedorrelax{r@\label@desc@prefix maincls.cmd.setkomafont}{% + \textMacro{setkomafont}% + }{% + \begingroup + \let\Macro\textMacro + \DescRef{maincls.cmd.setkomafont}% + \endgroup + }% + }{% + \begingroup + \let\Macro\textMacro + \DescRef{\LabelBase.cmd.setkomafont}% + \endgroup + }% + \PParameter{#1}\OParameter{\fontsettingname}% +} +\newcommand*{\LabelDoHook}[2][\label@suffix]{% + \begingroup + \renewcommand*{\PName}[1]{=##1=}% + \ForDoHook{#2}{\Label@DoHook{#1}}% + \endgroup +} +\newcommand*{\Label@DoHook}[3]{% + \IfArgIsEmpty{#3}{\@firstofone}{% + \scr@ifundefinedorrelax{dhr@\label@desc@prefix\label@base.dohook.#2#1}{% + \@firstofone + }{% + \@gobble + }% + }{% + \protected@edef\@currentlabel{\DoHook{#2}}% + \label@sanitize + \Hy@MakeCurrentHref{\label@desc@prefix\label@base.dohook.#2#1}% + \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + \label{\label@desc@prefix\label@base.dohook.#2#1}% + \expandafter\gdef + \csname dhr@\label@desc@prefix\label@base.dohook.#2#1\endcsname{#3}% + }% +} +\DeclareSpecialMarkup{\DoHook}{\mbox{\texttt{#1}}}{% + \par + \leftskip\z@ + \BeginIndex{DoHook}{#1}% + \LabelDoHook{#1}% + \scr@ifundefinedorrelax{r@scrbase.cmd.ExecuteDoHook}{% + \textMacro{ExecuteDoHook}% + }{% + \begingroup + \let\Macro\textMacro + \DescRef{scrbase.cmd.ExecuteDoHook}% + \endgroup + }% + \PParameter{#1}% +} +\DeclareRobustCommand*{\PName}[1]{\texttt{\textit{#1}}} +\DeclareRobustCommand*{\PValue}[1]{\texttt{#1}} +\DeclareRobustCommand*{\Parameter}[1]{% + \maybelinebreak\texttt{\{}\PName{#1}\texttt{\}}} +\DeclareRobustCommand*{\OParameter}[1]{% + \maybelinebreak\texttt{[%] + }\PName{#1}\texttt{%[ + ]}} +\DeclareRobustCommand*{\AParameter}[1]{% + \maybelinebreak\texttt{(%) + }\PName{#1}\texttt{%( + )}} +\DeclareRobustCommand*{\PParameter}[1]{\maybelinebreak\texttt{\{#1\}}} +\DeclareRobustCommand*{\POParameter}[1]{\maybelinebreak\texttt{[#1]}} +\newcommand\label@sanitize{% + \renewcommand*{\"}[1]{##1e}% + \renewcommand*{\IeC}[1]{\expandafter\@gobble\string##1}% + \renewcommand*{\textup}[1]{##1}% + \renewcommand*{\PName}[1]{/##1/}% +} +\newcommand*{\label@desc@prefix}{desc:} +\newcommand*{\label@suffix}{} +\newcommand*{\labelsuffix}[1][]{% Werden Dinge mehrfach dokumentiert benötigen + % sie ein zusätzliches Unterscheidungsmerkmal + % beim gesetzten Label. + \IfArgIsEmpty{#1}{\let\label@suffix\@empty}{\edef\label@suffix{.#1}}% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\EMail} +% An email adress. +% \begin{macrocode} +\DeclareRobustCommand*{\EMail}[1]{\textless #1\textgreater} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\TextEMail} +% EMail address at the text. +% \begin{macrocode} +\DeclareRobustCommand*{\TextEMail}[1]{{\small\EMail{#1}}} +% \end{macrocode} +% \end{macro} +% +% Setup fonts for table and figure captions: +% \begin{macrocode} +\setkomafont{caption}{\normalcolor\small} +% \end{macrocode} +% +% +% \section{Footnotes} +% +% \begin{macro}{\thempfootnote} +% \begin{macrocode} +\renewcommand*{\thempfootnote}{\textit{\@arabic{\c@mpfootnote}}} +% \end{macrocode} +% \end{macro} +% +% \section{Math} +% +% I will not use real math. But there will be some »pseudo math code«. So I +% need some macros for this. +% +% \begin{macro}{\Var} +% Variables (in real math simply |$a$| will be |\Var{a}| in my math: +% \begin{macrocode} +\newcommand*{\Var}[1]{\ensuremath{\textit{#1}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Unit} +% The unit of a length. +% \begin{macrocode} +\newcommand*{\Unit}[1]{\,\ifmmode \textrm{#1}\else #1\fi} +% \end{macrocode} +% \end{macro} +% +% Wie allow page breaks at display math. +% \begin{macrocode} +\allowdisplaybreaks[1] +% \end{macrocode} +% +% +% \section{Acronyms} +% +% \begin{macro}{\Script} +% \begin{macro}{\ScriptII} +% \begin{macrocode} +\DeclareRobustCommand{\Script}{\Package{Script}} +\DeclareRobustCommand{\ScriptII}{\Package{Script-2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\eTeX} +% \changes{v1.25}{2021/02/16}{workaround for (temporary) changes in +% \textsf{hyperref}} +% This may already be defined. +% \begin{macrocode} +\providecommand*{\eTeX}{\ensuremath{\varepsilon}-\TeX} +\AtBeginDocument{% + \@ifundefined{textepsilon}{% + \@ifundefined{pdfstringdef}{}{% + \pdfstringdef{\textepsilon}{\ifHy@unicode\83\265\else e\fi}% + }%% + }{}% +} +\providecommand*{\NTS}{% + \leavevmode\hbox{$\cal N\kern-0.35em\lower0.5ex\hbox{$\cal T$}% + \kern-0.2emS$}} +% \end{macrocode} +% \end{macro} +% +% +% \section{Identification} +% +% \begin{macro}{\LabelBase} +% \begin{macro}{\labelbase} +% \changes{v1.22b}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}%^^A +% \begin{macrocode} +\newcommand*{\labelbase}[1]{% + \Ifstr{\label@base@sec}{unknown}{}{% + \labelofbase[sec]{\label@base@sec.next}% + \gdef\label@base@sec{}% + }% + \renewcommand*{\label@base}{#1}% + \label{cha:#1}% +} +% \end{macrocode} +% \begin{macro}{\label@base} +% \begin{macro}{\label@base.sec} +% \begin{macrocode} +\newcommand*{\label@base}{unknown} +\newcommand*{\label@base@sec}{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\labelofbase} +% Sets a label depending on \cs{label@base}. First optional argument is the +% label prefix, second is the the label postfix. +% \begin{macrocode} +\newcommand*{\labelofbase}[2][lab]{% + \label{#1:\label@base.#2}% +} +% \end{macrocode} +% \begin{macro}{\prefix@ref} +% Internal command to set a \cs{ref}, \cs{pageref}, or \cs{autoref} to an +% label with prefix. Use it, e.g., like +% |\label@base@ref{\autoref}{sec}{maincls.cmd.foo}|. +% \begin{macrocode} +\newcommand*{\prefix@ref}[3]{% + #1{#2:#3}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\seclabel} +% Sets a label of type section. +% \begin{macrocode} +\newcommand*{\seclabel}[1]{% + \ifx\label@base@sec\@empty\else + \labelofbase[sec]{\label@base@sec.next}% + \fi + \xdef\label@base@sec{#1}% + \labelofbase[sec]{#1}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\xmpllabel} +% \begin{macro}{\Refxmpl} +% \begin{macro}{\PageRefxmpl} +% Sets a label of type example. +% \begin{macrocode} +\newcommand*{\xmpllabel}[1]{% + \labelofbase[xmpl]{#1}% +} +\newcommand*{\Refxmpl}{% + \kernel@ifstar {\prefix@ref{\autoref*}{xmpl}}% + {\prefix@ref{\autoref}{xmpl}}% +} +\newcommand*{\PageRefxmpl}{% + \kernel@ifstar {\prefix@ref{\autopageref*}{xmpl}}% + {\prefix@ref{\autopageref}{xmpl}}% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% User command to get the current label base. +% \begin{macrocode} +\newcommand*{\LabelBase}{\@nameuse{label@base}} +% \end{macrocode} +% \end{macro} +% +% \section{Special Environments} +% +% \begin{environment}{Declaration} +% Declaration of macros, environments, options, lengths, counters, pseudo +% length, variables etc.\footnote{TODO: Redefining most declaration commands +% to also write labels.} +% \begin{macrocode} +\colorlet{Declaration}{PaleTurquoise} +\newsavebox\Declaration@Box +\newcommand*{\Declaration@Width}{\linewidth} +\newcommand*{\Declaration@LeftIndent}{-2\fboxsep} +\newcommand*{\Declaration@UseBox}[1]{% + \colorbox{Declaration}{\usebox\Declaration@Box}% +} +\newenvironment{Declaration}[1][2]{% + \def\Declare@Lines{#1\baselineskip}% + % Als erstes wird eine neue Index-Gruppe begonnen. Dagegen darf die + % vorherige Index-Gruppe hier nicht automatisch geschlossen werden, weil + % beispielsweise ein Abschnitt oder ein Kapitel ebenfalls eine Index-Gruppe + % sein könnte (aber nicht muss). + \BeginIndexGroup + % Die Absatzformatierung anpassen. Eigentlich hier noch nicht notwendig, + % schadet aber auch nichts. + \parindent\z@ + \parfillskip\@flushglue + \parskip\z@ + % \Macro, \Environment, etc. so umdefinieren, dass sie passend für die + % Umgebung formatiert werden und auch gleich Label und Index-Einträge + % erzeugt werden. + \scr@Desc@let\Macro + \scr@Desc@let\Option + \scr@Desc@let\KOption + \scr@Desc@let\OptionValue + \scr@Desc@let\OptionVName + \scr@Desc@let\Variable + \scr@Desc@let\Environment + \let\endEnvironment\endDescEnvironment + \scr@Desc@let\Counter + \scr@Desc@let\Length + \scr@Desc@let\PageStyle + \scr@Desc@let\PLength + \scr@Desc@let\FontElement + \scr@Desc@let\FloatStyle + \scr@Desc@let\DoHook + % Todo: Replace the following by the correct definitions: + \let\XMacro\textMacro + \let\XEnvironment\textEnvironment + \let\XOption\textOption + \let\XOptionValue\textOptionValue + \newenvironment{Body}{% Umgebung für den (vertikalen) Inhalt einer Umgebung + \\ + \setlength{\leftskip}{1em}% + \minipage{\dimexpr\linewidth-\leftskip}% + \raggedright + \newcommand*{\BodyDots}{% + \par + \hskip-\leftskip + \raisebox{0pt}[1.1\ht\strutbox][.5\dp\strutbox]{$\vdots$}% + \par + }% + }{% + \par + \endminipage + \\ + }% + % Todo: Behandlung für Optionen, Längen, Zähler, Font-Elemente, Seitenstile, + % etc. + % Maybe: Vielleicht wäre es besser, die \X…-Definitionen von hier direkt zur + % Definition der entsprechenden Elemente zu verlagern und sie \D… zu + % nennen. Das wird dann eventuell übersichtlicher als alles hier zu + % machen. Hier gäbe es dann nur noch für jedes Element genau ein + % \let\…\D…. + % Jetzt wird der ganze Inhalt der Umgebung linksbündig in eine Box gepackt + \begin{lrbox}{\Declaration@Box}% + \minipage{\Declaration@Width}% + \raggedright + \parskip\baselineskip + \small + \addtolength{\parskip}{-\baselineskip}% + \catcode`\^^M=9 % ignore line ends +}{% + \par + \endminipage + \end{lrbox} + \vskip 1\baselineskip \@plus .75\baselineskip \@minus .25\baselineskip + % Hier darf ein Seitenumbruch ohne vertikalen Ausgleich erfolgen, wenn nicht + % mindestens für die Deklaration und einige Zeilen Platz ist. + \vskip \dimexpr\ht\Declaration@Box+\dp\Declaration@Box+\Declare@Lines\relax + \penalty-\@medpenalty + \vskip -\dimexpr\ht\Declaration@Box+\dp\Declaration@Box+\Declare@Lines\relax + \begingroup% Dann wird die erzeugte Box farbig hinterlegt leicht im linken + % Rand ausgegeben. + \parfillskip\@flushglue + \parindent\z@ + \leavevmode + \hspace*{\Declaration@LeftIndent}% + \Declaration@UseBox{\Declaration@Box}% + \par\nobreak\vskip\fboxsep + \endgroup\nobreak + % Der nachfolgende Text soll wie bei einer Überschrift behandelt werden. + \aftergroup\@afterindentfalse\aftergroup\@afterheading +} +% \end{macrocode} +% \begin{macro}{\scr@Desc@let} +% Redefine the internal command of a robust command. +% \begin{macrocode} +\newcommand*{\scr@Desc@let}[1]{% + \expandafter\def + \csname \expandafter\@gobble\string #1 \expandafter\endcsname\expandafter{% + \csname Desc\expandafter\@gobble\string #1\endcsname}% +} +% \end{macrocode} +% \end{macro} +% \end{environment} +% +% \begin{environment}{Example} +% \changes{v1.15a}{2019/10/17}{Space removed}% +% This environment is used for all examples at the \KOMAScript{} guide. +% \begin{macrocode} +\newenvironment{Example}{% + \lstset{belowskip=0pt plus 1pt minus .5pt}% + \labeling{{\usekomafont{disposition}\GuideExample:}} + \item[{\usekomafont{disposition}\GuideExample:}]% +}{% + \endlabeling +} +% \end{macrocode} +% \end{environment} +% \begin{macro}{\ExampleEndFix} +% \changes{v1.18}{2019/10/25}{New}%^^A +% If an example is at the end of a description and before a new description +% the vertical spacing is suboptimal. Sorry, but this cannot be fixed +% automatically currently. But here is a manual fix: +% \begin{macrocode} +\newcommand*{\ExampleEndFix}{\vskip -1\ht\strutbox plus .75\strutbox} +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{ShowOutput} +% This environment is used for the output of examples. It shows the middle +% part of a page\footnote{TODO: optional arguments for printing a top or +% bottom part of a page}. It uses |\scalebox| so you should never use a +% DVI preview or a raw DVI printing. +% \begin{macrocode} +\newsavebox\ShowOutputBox +\newenvironment{ShowOutput}[1][0pt]{\par + \begin{lrbox}{\ShowOutputBox}% + \minipage{.9\linewidth}% + \vspace*{\baselineskip}\vspace{-#1}% +}{% + \endminipage + \end{lrbox}% + \setlength{\unitlength}{1pt}% + \setlength{\@tempdima}{\ht\ShowOutputBox}% + \addtolength{\@tempdima}{\dp\ShowOutputBox}% + \setlength{\@tempdima}{.75\@tempdima}% + \edef\MidY{\strip@pt\@tempdima}% + \addtolength{\@tempdima}{5pt}% + \edef\HighY{\strip@pt\@tempdima}% + \addtolength{\@tempdima}{-10pt}% + \edef\LowY{\strip@pt\@tempdima}% + \addtolength{\@tempdima}{5pt}% + \setlength{\@tempdima}{.9\linewidth}\edef\QuadIV{\strip@pt\@tempdima}% + \setlength{\@tempdima}{.675\linewidth}\edef\QuadIII{\strip@pt\@tempdima}% + \setlength{\@tempdima}{.45\linewidth}\edef\QuadII{\strip@pt\@tempdima}% + \setlength{\@tempdima}{.225\linewidth}\edef\QuadI{\strip@pt\@tempdima}% + \centering + \begin{picture}(\QuadIV,\MidY) + \qbezier(0,\MidY)(\QuadI,\HighY)(\QuadII,\MidY)% + \qbezier(\QuadII,\MidY)(\QuadIII,\LowY)(\QuadIV,\MidY) + \put(0,0){\makebox(\QuadIV,\MidY)[c]{% + \scalebox{.75}{\usebox{\ShowOutputBox}}% + }% + }% + \put(0,-5){\line(0,1){\HighY}}% + \put(\QuadIV,-5){\line(0,1){\HighY}}% + \qbezier(0,-5)(\QuadI,0)(\QuadII,-5)% + \qbezier(\QuadII,-5)(\QuadIII,-10)(\QuadIV,-5) + \end{picture}\par + \vspace{1ex plus 1ex minus .5ex}% +} +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{Explain} +% Some parts of the documentation are importing for understanding +% \KOMAScript{} but not important for using \KOMAScript. +% \begin{macrocode} +\newenvironment{Explain}{% + \par\sffamily\ignorespaces +}{% + \par +} +% \end{macrocode} +% \end{environment} +% +% +% \subsection{Used by Jens-Uwe only} +% +% There are some example visualizations used only by Jens-Uwe.\footnote{TODO: +% All these should be merged with \texttt{ShowOutputBox}.} +% +% \begin{environment}{XmpTopPage} +% Output of the top of a page. +% \begin{macrocode} +\newenvironment{XmpTopPage} + {% + \begin{center} + \iffree{\setlength{\unitlength}{1mm}}{\setlength{\unitlength}{.833mm}}% + \begin{picture}(100,39) + \thinlines + \qbezier(0,5)(25,7)(50,5)\qbezier(50,5)(75,3)(100,5) + \put(0,5){\line(0,1){34}} + \thicklines + \put(100,5){\line(0,1){34}}\put(0,39){\line(1,0){100}} + \footnotesize + }{% + \end{picture} + \end{center}\vspace{-1.5\baselineskip}% +} +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{XmpBotPage} +% Output of the bottom of a page. +% \begin{macrocode} +\newenvironment{XmpBotPage} + {\begin{center} + \iffree{\setlength{\unitlength}{1mm}}{\setlength{\unitlength}{.833mm}}% + \begin{picture}(100,40)% + \thinlines + \qbezier(0,38)(25,40)(50,38)\qbezier(50,38)(75,36)(100,38) + \put(0,5){\line(0,1){33}} + \thicklines + \put(100,5){\line(0,1){33}}\put(0,5){\line(1,0){100}} + \footnotesize +}{% + \end{picture}\end{center}\vspace{-1.5\baselineskip}% +} +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\XmpSetText} +% Output some text at \texttt{XmpTopPage} or \texttt{XmpBotPage}. +% \begin{macrocode} +\newcommand{\XmpSetText}[2][\XmpText]{% + \put(#2){\makebox(0,0)[tl]{\parbox{70\unitlength}{\parfillskip=0pt + #1}}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\XmpMarginNote} +% Output a margin note at \texttt{XmpTopPage} or \texttt{XmpBotPage}. +% \begin{macrocode} +\newcommand{\XmpMarginNote}[1]{% + \put(#1){\makebox(0,5)[tl]{\scriptsize\XmpMarginTextA}} + \put(#1){\makebox(0,5)[bl]{\scriptsize\XmpMarginTextB}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\XmpRule} +% Output a horizonal rule at a \texttt{XmpTopPage} or \texttt{XmpBotPage}. +% \begin{macrocode} +\newcommand{\XmpRule}[2]{\put(#1){\line(1,0){#2}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\XmpHeading} +% Output a head line at a \texttt{XmpTopPage} or \texttt{XmpBotPage}. +% \begin{macrocode} +\newcommand{\XmpHeading}[3][\KOMAScript\hfill 3]{% + \put(#2){\makebox(#3,0)[l]{#1}}} +% \end{macrocode} +% \end{macro} +% +% +% \section{Margin Notes} +% +% \begin{macro}{\OnlyAt} +% Some things are not available at every \KOMAScript{} class. To show the +% differences we'll put a margin note. If more than one class or package +% should be noted, |\and| will be used to separate them. +% \begin{macrocode} +\newcommand*{\OnlyAt}[1]{% + \marginline{\def\and{,\\}\footnotesize #1\par}% +} +% \end{macrocode} +% \end{macro} +% +% +% \section{Change Log} +% +% Not all features are part of every old \KOMAScript{} release. New features +% will be marked and these marks are referenced at a kind of index. +% +% \begin{macro}{\ChangedAt} +% \changes{v1.22b}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}%^^A +% Set the margin note and write an entry to the change log.\footnote{TODO: +% Don't use the glossary, use a file by my own.} +% \begin{macrocode} +\providecommand*{\ChangedAt}[3][]{% + \Ifstr{#1}{}{% + \marginnote{\tiny\fbox{\strut#2}}% + }{% + \def\reserved@a##1/##2\@nil{% + \count@\year + \advance\count@-##1\relax + \multiply\count@ by 12\relax + \advance\count@\month + \advance\count@-##2\relax + }\reserved@a#1\@nil + \ifnum\count@<13 + \marginnote{\tiny Beta-Feature}% + \else + \marginnote{\tiny\fbox{\strut #2}}% + \fi + }% + \begingroup + \let\@tempa\@empty + \Ifstr{#2}{v2.9i}{\def\@tempa{v2.90i=}}{}% + \Ifstr{#2}{v2.9t}{\def\@tempa{v2.90t=}}{}% + \let\and\ignorespaces + \def\Package##1{% + \glossary{##1=\string\Package{##1}>\@tempa#2|indexrm}% + \glossary{\@tempa#2>##1=\string\Package{##1}|indexrm}% + \ignorespaces + }% + \def\Class##1{% + \glossary{##1=\string\Class{##1}>\@tempa#2|indexrm}% + \glossary{\@tempa#2>##1=\string\Class{##1}|indexrm}% + \ignorespaces + }% + \ignorespaces #3% + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% While I currently use the glossary, we have to make it: +% \begin{macrocode} +\makeglossary +% \end{macrocode} +% +% \begin{macro}{\printchangelog} +% We don't want to generate the change log only. We also have to print it. +% \begin{macrocode} +\newcommand*{\printchangelog}{\@input@{\jobname.gls}} +% \end{macrocode} +% \end{macro} +% \begin{environment}{thechangelog} +% And this will be used at the \texttt{gls} file. The change log index will +% always generate an entry to the table of contents. +% \begin{macrocode} +\newenvironment{thechangelog}{% + \setchapterpreamble{\GuideChangeLogPreamble\par\bigskip}% + \addchap{\changelogname}% + \markboth{\changelogname}{\changelogname}% + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus .3pt}% + \setlength{\parfillskip}{0pt plus 1fil}% + \def\and{,\ }% + \let\item\@idxitem +}{% + \clearpage +} +% \end{macrocode} +% The macros |\GuideChangeLogPreamble| and |\changelogname| have to be +% defined at the language file. +% \end{environment} +% +% +% \section{Special Tabulars and Tables} +% +% I need some special tabulars and tables. These are used for describing +% single topics. +% +% \begin{environment}{desctabular} +% \changes{v1.13d}{2019/02/01}{\cs{addlinespace} removed from end code}^^A +% This kind of tabluar has primary one column but uses two columns in +% declaration. It's something like a \texttt{description} environment with +% line break after the item. I've used a \texttt{tabular} at the definition +% because of full compatibitlity with \texttt{desctable}. +% \begin{length}{\descwidth} +% I need a length of local usage. I could have used |\@tempdima| or +% another local length from kernel. But I've decided not to try to find a +% unused length at \texttt{tabular} environment. +% \begin{length}{\descdefaultindent} +% And I need a length of global usage. +% \begin{macrocode} +\newlength{\descwidth} +\newlength{\descdefaultindent}\setlength{\descdefaultindent}{2em} +% \end{macrocode} +% \end{length} +% \end{length} +% The definition of \texttt{desctabular} is very simple, because the main +% work will be done by a \emph{worker} macro that will be defined later. +% \begin{macrocode} +\newenvironment{desctabular}[1][c]{% + \start@desctab{\descdefaultindent}% + \tabular[#1]{lp{\descwidth}} + \toprule +}{% + \bottomrule + \endtabular +} +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{desctable} +% \textbf{Deprecated! Use \texttt{desclist} instead of!} +% This is almost the same like \texttt{desctabular} but it uses a longtable +% to allow page breaks. +% \begin{macrocode} +\newenvironment{desctable}[1][\descdefaultindent]{% + \ClassError{scrguide}{deprecated environment}{% + please replace desctable by desclist}% + \onelinecaptionsfalse + \start@desctab{#1}% + \newcommand{\Endfirsthead}{\toprule\endfirsthead}% + \newcommand{\Endhead}{\midrule\endhead}% + \newcommand*{\standardfoot}{% + \addlinespace[-.5\normalbaselineskip]\midrule + \multicolumn{2}{r@{}}{\dots}\\ + \endfoot + \addlinespace[-.5\normalbaselineskip]\bottomrule + \endlastfoot + }% + \longtable{lp{\descwidth}}% +}{% + \endlongtable +} +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\start@desctab} +% \changes{v1.7c}{2013/10/13}{\cs{leavevmode}\cs{ignorespaces} added to +% \cs{nentry}}%^^A +% \changes{v1.16}{2019/10/23}{links for plengths added}%^^A +% \changes{v1.17}{2019/10/23}{links for variables added}%^^A +% This is the \emph{worker} macro of \texttt{desctable} and +% \texttt{desctabular}. It does the complete calculations and definition of +% the entry (something like |\item|) commands. +% \begin{macrocode} +\newcommand*{\start@desctab}[1]{% + \setlength{\descwidth}{\linewidth}% + \addtolength{\descwidth}{-4\tabcolsep}% + \addtolength{\descwidth}{-#1}% + \setlength{\labelwidth}{\linewidth}% + \addtolength{\labelwidth}{-2\tabcolsep}% + \newcommand{\nentry}[2]{% + \multicolumn{2}{p{\labelwidth}}{\raggedright##1}\tabularnewline*% + \hspace*{#1} & \leavevmode\ignorespaces ##2\tabularnewline% + }% + \newcommand{\entry}[2]{\nentry{##1}{##2}[.5\baselineskip]}% + \newcommand*{\pentry}[1]{% + \entry{% + \scr@ifundefinedorrelax{r@\label@desc@prefix\LabelBase.plength.##1}{% + \ClassWarning{scrguide}{% + Reference `\label@desc@prefix\LabelBase.plength.##1' undefined}% + \PLength{##1}% + }{% + \DescRef{\LabelBase.plength.##1}% + }% + \IndexPLength[indexmain]{##1}}}% + \newcommand*{\pventry}[1]{\entry{\PValue{##1}}}% + \newcommand*{\mentry}[1]{\entry{\Macro{##1}}}% + \newcommand*{\ventry}[1]{% + \entry{% + \scr@ifundefinedorrelax{r@\label@desc@prefix\LabelBase.variable.##1}{% + \ClassWarning{scrguide}{% + Reference `\label@desc@prefix\LabelBase.variable.##1 undefined}% + \Variable{##1}% + }{% + \DescRef{\LabelBase.variable.##1}% + }% + \IndexVariable[indexmain]{##1}% + }% + }% + \newcommand*{\feentry}[1]{% + \entry{% + \scr@ifundefinedorrelax{r@\label@desc@prefix\LabelBase.fontelement.##1}{% + \ClassWarning{scrguide}{% + Reference `\label@desc@prefix\LabelBase.fontelement.##1' undefined}% + \FontElement{##1}% + }{% + \DescRef{\LabelBase.fontelement.##1}% + }% + \IndexFontElement[indexmain]{##1}}% + }% + \newcommand*{\oentry}[1]{% + \entry{\Option{##1}\IndexOption[indexmain]{##1}}% + }% +} +% \end{macro} +% +% \begin{environment}{desclist} +% This is similar to \texttt{desctable} but it has been build by single +% tabulars instead of longtable. +% \begin{macro}{\desccaptionb@xfirst} +% \begin{macro}{\desccaptionb@xother} +% \begin{macro}{\descfootb@x} +% \begin{macro}{\descentryb@x} +% \begin{macro}{\desccaptiob@xnext} +% \begin{macrocode} +\newsavebox\desccaptionb@xfirst +\newsavebox\desccaptionb@xother +\newsavebox\descfootb@x +\newsavebox\descentryb@x +\newif\ifdescpage@dd +\newcommand*{\desccaptionb@xnext}{} +\newcommand*{\abovecaptionskipcorrection}{} +\newenvironment{desclist}[1][\descdefaultindent]{% + \par + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\selectfont% + \vskip\intextsep + \start@desctab{#1}% + \csname @desclistinithook\endcsname + \def\@captype{table}% + \newcommand{\desccaption}{\@dblarg{\@desccaption}}% + \newcommand{\@desccaption}[3][]{% + \setbox\desccaptionb@xfirst\vbox{% + \tabular{p{\labelwidth}}% + \multicolumn{1}{@{}p{\dimexpr\labelwidth+2\tabcolsep}@{}}{% + \captionaboveof{table}[##1]{##2\unskip\strut}% + }\tabularnewline[% + \dimexpr \abovecaptionskip-\normalbaselineskip\relax +% \dimexpr \abovecaptionskip-\abovecaptionskipcorrection\relax + ] + \toprule\tabularnewline + \endtabular + \vskip -\baselineskip + }% + \let\abovecaptionskipcorrection\@empty + \setbox\desccaptionb@xother\vbox{% + \tabular{p{\labelwidth}} + \multicolumn{1}{@{}p{\dimexpr\labelwidth+2\tabcolsep}@{}}{% + \@@makecaption\@firstofone{\fnum@table}{\ignorespaces ##3}% + }\tabularnewline[-\normalbaselineskip] + \addlinespace[\abovecaptionskip] + \toprule\tabularnewline + \endtabular + \vskip -\baselineskip + }% + \let\desccaptionb@xnext\desccaptionb@xfirst + }% + \setbox\descfootb@x\vbox{% + \tabular{p{\labelwidth}}% + \addlinespace[-.5\normalbaselineskip]\midrule + \addlinespace[-\dp\strutbox] + \raggedleft\dots\hspace*{-\tabcolsep}\tabularnewline + \endtabular + }% + \newcommand*{\entryskip}[1][]{% + \ifx\relax##1\relax\else\vskip##1\relax\fi + }% + \renewcommand{\nentry}[2]{% + \typeout{TRACE: Generate entry}% + \setbox\descentryb@x\vbox{% + \ifx\desccaptionb@xnext\desccaptionb@xfirst\copy\desccaptionb@xnext\fi + \makebox[\linewidth][l]{\begin{tabular}{lp{\descwidth}}% + \multicolumn{2}{p{\labelwidth}}{\raggedright##1}\tabularnewline + \hspace*{#1} & ##2\tabularnewline + \end{tabular}}% + }% + \typeout{TRACE: entry done}% + \begingroup + \dimen@ \ht\descentryb@x + \advance \dimen@ \dp\descentryb@x + \ifdim \ht\descfootb@x>\ht\strutbox + \advance \dimen@ \ht\descfootb@x + \else + \advance \dimen@ \ht\strutbox + \fi + \ifdim \dp\descfootb@x>\dp\strutbox + \advance \dimen@ \dp\descfootb@x + \else + \advance \dimen@ \dp\strutbox + \fi + \advance \dimen@ \baselineskip + \dimen@ii \pagegoal \advance \dimen@ii -\pagetotal + \typeout{TRACE: \the\dimen@>\the\dimen@ii\space (footbox + ht=\the\ht\descfootb@x, dp=\the\dp\descfootb@x; strutbox + ht=\the\ht\strutbox, dp=\the\dp\strutbox)?}% + \ifdim \dimen@>\dimen@ii + \typeout{TRACE: Break table \thetable}% + \ifx\desccaptionb@xnext\@empty + \csname @desclistentryhook\endcsname + {\copy\descfootb@x}% + \fi + \newpage + \ifx\desccaptionb@xnext\@empty + \typeout{TRACE: switch page}% + \ifdescpage@dd + \aftergroup\descpage@ddfalse + \expandafter\descpage@ddfalse + \else + \aftergroup\descpage@ddtrue + \expandafter\descpage@ddtrue + \fi + \csname @desclistentryhook\endcsname + {\copy\desccaptionb@xother}% + \fi + \fi + \endgroup + \ifx\desccaptionb@xnext\desccaptionb@xfirst + \Ifthispageodd{\descpage@ddtrue}{\descpage@ddfalse}% + \fi + \csname @desclistentryhook\endcsname + {\copy\descentryb@x}% + \let\desccaptionb@xnext\@empty + \entryskip + }% +}{% + \vskip -.5\baselineskip + \setbox\descfootb@x\vbox{% + \tabular{p{\labelwidth}} + \bottomrule\tabularnewline + \endtabular + }% + \csname @desclistentryhook\endcsname + {\copy\descfootb@x}% + \par\nobreak + \vskip -\baselineskip \vskip \intextsep +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{environment} +% +% +% \section{Listings} +% +% Setup listings: +% \begin{macrocode} +\lstset{% + basicstyle=\ttfamily,% + columns=fullflexible,keepspaces,% + aboveskip=.4\baselineskip,% + belowskip=\dp\strutbox plus 1pt minus .5pt,% + literate=% + {Ö}{{\"O}}1 + {Ä}{{\"A}}1 + {Ü}{{\"U}}1 + {ß}{{\ss}}1 + {ü}{{\"u}}1 + {ä}{{\"a}}1 + {ö}{{\"o}}1 + {»}{{\guillemetright}}1 + {«}{{\guillemetleft}}1 +}% +\lstdefinestyle{code}{% + language=[LaTeX]TeX,% + moretexcs={% + @auxout,@currext,@dottedtocline,@empty,@float, + @gobble,@gobbletwo, + @hangfrom,@ifpackagelater, + @ifundefined,@mkboth, + @rightmark,@secondoftwo, + @tempskipa,@tempdima,@tempswafalse,@tempswatrue, + @undefined, + AtBeginDocument,AtEndDocument, appendix, ClassWarningNoLine,CurrentOption, + color,colorbox, + DeclareOption,DeclareRobustCommand,dimexpr,end@float,ExecuteOptions, + gluexpr, + if@filesw,if@tempswa,if@twoside,includegraphics, + labelformat, + MessageBreak, + numexpr, + onehalfspacing, + PackageError,PackageInfo,PackageWarning,PassOptionsToPackage, + ProcessOptions,protected@edef,protected@write, + ProvidesFile,ProvidesPackage, + providecommand, + RequirePackage,RequirePackageWithOptions,setkey,setlength, + SelectInputMappings,setkeys, + textsuperscript}% +}% +\lstdefinestyle{output}{% + breaklines,prebreak=\mbox{$\hookleftarrow$}% +}% +\lstdefinestyle{KOMA}{% + style=code,% + moretexcs={% + @addtoplength,@setplength,@newplength, activateareas, + addchap,addrentry,Address,addcontentslinetoeachtocfile, + addxcontentslinetoeachtocfile,addsec, + addtoeachtocfile, + addtokomafont,addtolengthplength,addtoplength,addtoreffields,addtotoclist, + addxcontentsline, + adrchar,adrentry, + AddLayersAtBeginOfPageStyle,AddLayersToPageStyle, + AddtoDoHook,AddtoOneTimeDoHook, + AfterBibliographyPreamble,AfterCalculatingTypearea, + AfterFile,AfterPackage,AfterStartingTOC,AfterTOCHead, + appendixmore,appendixname,areaset,autodot,automark,AtAddToTocList, + AtBeginLetter,At@startsection, + Before@sect,Before@ssect, + BeforeFamilyProcessOptions, + BeforeClosingMainAux,BeforePackage,BeforeStartingTOC, + bib@beginhook,bib@endhook, + blinddocument,blindtext,Blinddocument,Blindtext, + cc,captionabove,captionaboveof,captionbelow,captionbelowof,captionformat, + captionof,cefoot,cfoot,chapapp, chapappifchapterprefix, + chapterheadstartvskip,chapterheadmidvskip,chapterheadendvskip, + chapter,chapterlinesformat,chapterlineswithprefixformat, + chapterformat,chaptermarkformat,chapternumdepth,chaptertocdepth, + chapterpagestyle,chead, + Clause, + cleardoubleevenemptypage,cleardoubleoddpage, + clearscrheadfoot,closing,cofoot,Comment, + CloneTOCEntryStyle, + DeclareNewJuraEnvironment, + DeclareLayer,DeclareNewLayer,DeclareNewPageStyleByLayers, + DeclarePageStyleByLayers, + DeclareTOCStyleEntry,DeclareTOCEntryStyle, + DeclareNewNoteColumn,DeclareNewPageStyleAlias, + DeclareNewTOC,DeclareSectionCommand,DeclareNewSectionCommand, + RedeclareSectionCommand,ProvideSectionCommand, + dedication,defcaptionname,deffootnote,deffootnotemark, + DefineFamily,DefineFamilyKey,DefineFamilyMember, + DefineTOCEntryOption,DefineTOCEntryBooleanOption, + DefineTOCEntryCommandOption,DefintTOCEntryIfOption, + DefineTOCEntryLengthOption,DefineTOCEntryNumberOption, + DestroyLayer,defpagestyle,deftripstyle, + dictum,dictumauthorformat,dictumrule,dictumwidth,doforeachtocfile, + ellipsispar, + encl,ExecuteDoHook,extratitle,FamilyBoolKey,FamilyExecuteOptions, + FamilyKeyState,FamilyKeyStateUnknown,FamilyKeyStateProcessed, + FamilyKeyStateUnknownValue,FamilyKeyStateNeedValue, + FamilyNumericalKey,% + FamilyOption,FamilyOptions,FamilyProcessOptions,FamilySetBool, + FamilyStringKey,FamilyUnknownKeyValue, + figureformat,figurename,firstfoot,firsthead,FirstName,footfont,footref, + ForDoHook,ForEachLayerOfPageStyle, + FreeI,FreeII,FreeIII,FreeIV, + GenericMarkFormat, + headfont,headmark, + Ifattoclist,Ifkomavar,Ifkomavarempty,Ifstr,Ifstrstart,Ifthispageodd, + Ifundefinedorrelax,IfUsePrefixLine, + ifundefinedorrelax, + ifattoclist,ifoot,ihead,ifkomavarempty,ifstr,ifthispageodd, + IfActiveMkBoth,InputAddressFile, + KOMAoption,KOMAoptions,KOMAScript, l@addto@macro, + LastName,layerwidth,layerheight,lefoot,lefttopmark,leftbotmark, + leftfirstmark,lehead,LetterOptionNeedsPapersize, + LenToUnit, + lipsum,listoffigures, + listoftables,listoftoc,LoadLetterOption,lofoot,lohead,lowertitleback, + MakeMarkcase,makenote,maketitle,manualmark,marginline,markleft,markdouble, + minisec, + multfootsep,multiplefootnoteseparator, + Name,nameday,newbibstyle,newcaptionname,newkomavar,nexthead, + ofoot,ohead,opening,othersectionlevelsformat, + p@section,pagemark,paragraphformat,subparagraphformat, + paragraphnumdepth,paragraphtocdepth, + subparagraphnumdepth,subparagraphtocdepth, + parellipsis,parformat,parname,parshortname, + part,partformat,partlineswithprefixformat, + partname,partnumdepth,partpagestyle,partnumdepth, + partheadstartvskip,partheadmidvskip,partheadendvskip, + pnumfont, + PreventPackageFromLoading,providecaptionname,publishers,ps, + putLL,putLR,putUL,putUR,putC, + raggedcaption,raggedchapter,raggedfootnote,raggedsection,raggedpart, + raggedsignature, + recalctypearea, + refL,refS,refN,refoot, + refParagraph,refParagraphN,refPar,refParL,refParS,refParN, + refSentence,refSentenceL,refSentenceS,refSentenceN,rehead, + RelaxFamilyKey, + removereffields,renewcaptionname, + RedeclarePageStyleAlias,RedeclareTOCStyleEntry, + ReplaceInput,ReplacePackage,ResetPreventPackageFromLoading, + rightbotmark,righttopmark,rightfirstmark, + rohead, + sectionformat,subsectionformat,subsubsectionformat, + sectionnumdepth,sectiontocdepth, + subsectionnumdepth,subsectiontocdepth, + subsubsectionnumdepth,subsubsectiontocdepth, + sectionmarkformat,sectioncatchphraseformat,sectionlinesformat, + Sentence,sentencename,sentenceshortname, + setbibpreamble,setcapindent,setcapwidth,setcaptionalignment, + setchapterpreamble,setfootbotline,setfootsepline,setfootwidth, + setheadsepline,setheadtopline,setheadwidth,setindexpreamble,setkomafont, + setkomavar,setlengthtoplength,setparsizes,setpartpreamble, + setplength,setuptoc, + showfields,showenvelope,showISOenvelope,showUScommercial,showUScheck, + SplitDoHook, + storeareas,StorePreventPackageFromLoading, + subject,SubClause,subsectionmarkformat,subtitle,syncwithnotecolumn, + tableformat,tablename,tableofcontents,textsubscript,thechapter,thefigure, + thefootnotemark,thepar,thepart,thesection,thesentence,thesubsection, + thesubsubsection,theparagraph,thesubparagraph, + thetable,thistime, + titlehead,tocbasic@extend@babel,TOCclone,todaysname,typearea,% + TOCEntryStyleInitCode,TOCEntryStyleStartInitCode,TOCLineLeaderFill, + UnPreventPackageFromLoading,unitfactor, + unsettoc,usekomafont,useplength,usekomavar,uppertitleback% + }% +}% +\lstnewenvironment{lstoutput}[1][]{% + \lstset{style=output,basicstyle=\ttfamily\codesize,#1}% +}{}% +\lstnewenvironment{lstcode}[1][]{% + \lstset{style=KOMA,basicstyle=\ttfamily\codesize,#1}% +}{}% +\newcommand*{\lstinputcode}[1][]{% + \lstinputlisting[style=KOMA,basicstyle=\ttfamily\codesize,#1]% +} +\newcommand*{\codesize}{\small} +% \end{macrocode} +% +% +% \section{hyperref Addons} +% +% \begin{macro}{\KOMAScript} +% \begin{macro}{\Guide@KOMAScript} +% We need some additions to \textsf{hyperref}. +% \begin{macrocode} +\newcommand*{\Guide@KOMAScript}{} +\expandafter\let\csname Guide@KOMAScript\expandafter\endcsname\csname +KOMAScript \endcsname +\DeclareRobustCommand*{\KOMAScript}{% + \texorpdfstring{\Guide@KOMAScript}{KOMA-Script}% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\url@} +% \changes{v1.9b}{2015/09/30}{\cs{GuideCTANserver} not needed and removed}%^^A +% \changes{v1.22a}{2019/11/18}{https instead of http}%^^A +% Redefine to make \texttt{CTAN://} be an alias for +% \texttt{https://mirror.ctan.org/}. +% \begin{macrocode} +\def\url@#1{\expandafter\url@@#1\@nil} +\def\url@@#1://#2\@nil{% + \def\@tempa{#1}\def\@tempb{CTAN}\ifx\@tempa\@tempb + \hyper@linkurl{\Hurl{#1://#2}}{https://mirror.ctan.org/#2}% + \else + \hyper@linkurl{\Hurl{#1://#2}}{#1://#2}% + \fi +} +% \end{macrocode} +% \end{macro} +% +% We have to setup \textsf{hyperref}: +% \begin{macrocode} +\AtBeginDocument{% + \iffree{% + \hypersetup{% + plainpages=false, + pdftitle={\GuideTitle}, + pdfauthor={Markus Kohm}, + pdfsubject={\GuideSubject}, + pdfkeywords={\KOMAScript, scrbook, scrreprt, scrartcl, + typearea, scrlfile, scrlayer, scrlayer-scrpage, scrlayer-notecolumn, + scrletter, scrlttr2, scraddr, scrtime, scrdate, scrwfile}, + pdfcreator={\KOMAScript, hyperref} + }% + }{}% +} +% \end{macrocode} +% +% \begin{macro}{\autopageref} +% This is something like |\autoref| but with page reference. A simple +% definition would use |\hyperref| and |\pageref*|. But I want to allow to +% decide if the reference is the page or the label. So this definition is +% more like |\autoref|. +% \begin{macrocode} +\DeclareRobustCommand{\autopageref}[1]{% + \expandafter\auto@setpageref\csname r@#1\endcsname + \@secondoffive + {#1}% +} +% \end{macrocode} +% \begin{macro}{\auto@setpageref} +% This is the \emph{worker} macro. It checks for the label and trys to set +% either a reference to the page or a reference to the label. +% \begin{macrocode} +\newcommand*{\auto@setpageref}[3]{% + \@safe@activestrue + \ifx#1\relax + \protect\G@refundefinedtrue + \nfss@text{\reset@font\bfseries ??}% + \@latex@warning{% + Reference `#3' on page \thepage \space undefined% + }% + \else + \def\@currentHtag{\pageautorefname~}% + \if@pagereftolabel + \hyper@@link + {\expandafter\@fifthoffive#1}% + {\expandafter\@fourthoffive#1\@empty\@empty}% + {\@currentHtag\expandafter#2#1\@empty\@empty\null}% + \else + \hyper@@link + {\expandafter\@fifthoffive#1}% + {page.\expandafter\@secondoffive#1\@empty\@empty}% + {\@currentHtag\expandafter#2#1\@empty\@empty\null}% + \fi + \fi + \@safe@activesfalse +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \section{Entries to \contentsname, \figurelistname, etc.} +% +% We have large page numbers, so better setup the needed width. And we like +% other dot seperation. +% \begin{macrocode} +\RedeclareSectionCommand[% + tocdynnumwidth,% + tocbreakafternumber=true,% + tocentrynumberformat=\partnumberwithprefix,% + tocpagenumberformat=\@firstofone +]{part}% +\newcommand*{\partnumberwithprefix}[1]{\let\autodot:\partname~#1}% +\RedeclareSectionCommand[% + tocnumwidth=21pt,% + tocpagenumberformat=\@firstofone,% + tocraggedentrytext=true% +]{chapter}% +\RedeclareSectionCommand[tocindent=21pt,tocnumwidth=34pt]{section}% +\RedeclareSectionCommand[tocindent=55pt,tocnumwidth=36pt]{subsection}% +\DeclareTOCStyleEntries[dynnumwidth]{default}{figure,table}% +\renewcommand*{\@pnumwidth}{1.8em}% 1.67 +\renewcommand*\@tocrmarg {2.70em}% 2.55em +\renewcommand*\@dotsep{2.5}% +% \end{macrocode} +% +% \section{Part} +% +% We want another vertical spacing at part headings. +% \begin{macrocode} +\renewcommand*{\partheadstartvskip}{\vspace*{.1\textheight}} +\renewcommand*{\partheadmidvskip}{\par\nobreak\vspace{.5\baselineskip}} +\renewcommand*{\partpagestyle}{empty} +% \end{macrocode} +% +% +% \section{Logos} +% +% I don't want to use package \textsf{hologo} for only one logo: +% \begin{macrocode} +\DeclareRobustCommand{\XeTeX}{% + X\kern-.125em\lower.5ex\hbox{\reflectbox{E}}\kern-.10em\TeX% +}% +\DeclareRobustCommand{\XeLaTeX}{% + X\kern-.125em\lower.5ex\hbox{\reflectbox{E}}\kern-.10em\LaTeX% +}% +% \end{macrocode} +% +% \section{Appendix} +% +% \begin{macro}{\appendix} +% Use only first if used more than once. With this, every appendix file may +% start with |\appendix|. +% \begin{macrocode} +\g@addto@macro\appendix{\global\let\appendix\relax} +% \end{macrocode} +% \end{macro} +% +% \section{Bibliography} +% +% \begin{macro}{\BibTeX} +% I use the same hack like the \LaTeX{} team uses at \texttt{ltlogos.dtx} +% for |\LaTeX|: +% \begin{macrocode} +\DeclareRobustCommand{\BibTeX}{B\kern-.05em% + \hbox{$\m@th$% + \csname S@\f@size\endcsname \fontsize\sf@size\z@ + \math@fontsfalse\selectfont + I\kern-.025emB}% + \kern-.08em% + \-\TeX% +} +% \end{macrocode} +% \end{macro} +% +% Use of a preamble and sime other usefull changes. +% \begin{macrocode} +\ifusebabelbib + \AtBeginDocument{% + \setbibpreamble{\GuideBibPreamble\bigskip}% + \bibliographystyle{babalpha-fl}% + \nocite{homepage}% added because of l3build + \renewcommand*{\@openbib@code}{% + \setlength{\parsep}{0pt}% + \renewcommand*{\btxauthorcolon}[1]{:\par\nobreak}% + \renewcommand*{\btxurlfont}{\par\nobreak\url}% + \raggedright + }% + } +% \end{macrocode} +% +% The generated argument of thebibliography is to short: +% \begin{macrocode} + \newcommand*{\OrigTheBibliography}{} + \let\OrigTheBibliography\thebibliography + \renewcommand*{\thebibliography}[1]{% + \selectbiblanguage{\languagename}% + \OrigTheBibliography{XXXX99}% + } +\else + \AtBeginDocument{% + \defbibnote{bibpreamble}{\GuideBibPreamble}% + }% + \addbibresource{guide.bib} +\fi +% \end{macrocode} +% +% +% \section{Index} +% +% This is realy tricky. The index depends on an external perl script, which +% splits the one index into several indexes. But first of all, we need to make +% the raw index. +% \begin{macrocode} +\makeindex +% \end{macrocode} +% +% Use of a preamble: +% \begin{macrocode} +\AtBeginDocument{\setindexpreamble{\GuideIndexPreamble\bigskip}} +% \end{macrocode} +% +% \begin{macro}{\ifusemultiindex} +% Now let's decide wether to use one index or to use a multi part index. +% \begin{macrocode} +\newif\ifusemultiindex +\IfFileExists{\jobname-gen.ind}{\usemultiindextrue}{\usemultiindexfalse} +\ifusemultiindex +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\printmultiindex} +% \changes{v1.11a}{2016/11/02}{index label generation delayed}^^A +% Print one part of the multi part index. +% \begin{macrocode} + \newcommand*{\printmultiindex}[3][]{% + \begingroup + \def\indexname{#2}% +% \end{macrocode} +% \begin{macro}{\CrossIndex} +% Produce a reference from one index to another. The macro |\UseIndex| tells +% the external splitt processor the index to be used for that entry. The +% first argument is the entry to the index. The second is the shortcut of +% the source index and the third is the shortcut of the index with the main +% entry for the entry from first argument. This macro should be used at the +% preamble of one part of the multi part index only. Because of this, it's +% defined here only. +% \begin{macrocode} + \newcommand*{\CrossIndex}[3]{% + \Index{##1=\UseIndex{##2}\protect##1>##3=\UseIndex{##2}\SeeSign + \protect##3}% + }% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} + \ifx\relax#1\relax\let\index@preamble=\relax + \else\def\index@preamble{#1}% + \fi + \def\index@setlabel{\label{idx:#3}}% + \@input@{\jobname-#3.ind}% + \endgroup + } +% \end{macrocode} +% \begin{environment}{theindex} +% I don't want every part of the index starting a new page. So I'll use the +% \textsf{multicol} package to generate the two columns instead of +% |\twocolumn|. +% \begin{macrocode} + \renewenvironment{theindex}{% + \setchapterpreamble{\index@preamble} + \begin{multicols}{2}[\idx@heading\vspace{-1\baselineskip}][.2\textheight]% + \parindent\z@ + \setlength{\parskip}{\z@ \@plus .3\p@}% + \setlength{\parfillskip}{\z@ \@plus 1fil}% + \let\item\@idxitem + \small\csname index@setlabel\endcsname + }{% + \end{multicols}% + } +% \end{macrocode} +% \end{environment} +% \end{macro} +% +% \begin{macro}{\printindex} +% Print the full index. +% \begin{macrocode} + \renewcommand*{\printindex}{% + \setchapterpreamble{\index@preamble}% + \addchap{\indexname}% + \let\index@preamble=\relax + \renewcommand*\idx@heading{% + \addsec{\indexname}% + \ifx\index@preamble\relax + \else\index@preamble\let\index@preamble=\relax\fi + }% + \printmultiindex{\GuidegenIndex}{gen}% + \printmultiindex[% + \CrossIndex{\GuideMacro}{gen}{\GuidecmdIndexShort}% + \CrossIndex{\GuideEnvironment}{gen}{\GuidecmdIndexShort}% + \CrossIndex{\GuideCounter}{gen}{\GuidecmdIndexShort}% + \CrossIndex{\GuideLength}{gen}{\GuidecmdIndexShort}% + ]{\GuidecmdIndex}{cmd}% + \printmultiindex[% + \CrossIndex{\GuideLength}{gen}{\GuidelenIndexShort}% + \CrossIndex{\GuidePLength}{gen}{\GuidelenIndexShort}% + \CrossIndex{\GuideCounter}{gen}{\GuidelenIndexShort}% + ]{\GuidelenIndex}{len}% + \printmultiindex[% + \CrossIndex{\GuideFontElement}{gen}{\GuideelmIndexShort}% + ]{\GuideelmIndex}{elm}% + \printmultiindex[% + \CrossIndex{\GuideFile}{gen}{\GuidefilIndexShort}% + \CrossIndex{\GuidePackage}{gen}{\GuidefilIndexShort}% + \CrossIndex{\GuideClass}{gen}{\GuidefilIndexShort}% + ]{\GuidefilIndex}{fil}% + \printmultiindex[% + \CrossIndex{\GuideOption}{gen}{\GuideoptIndexShort}% + ]{\GuideoptIndex}{opt}% + \printmultiindex[% + \CrossIndex{\GuideHook}{gen}{\GuidehokIndexShort}% + ]{\GuidehokIndex}{hok} + } +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\indexsection} +% Heading of the next section (e.g. the next character) at an index. +% \begin{macrocode} +\newcommand*{\indexsection}[1]{% + \ifx\empty#1\empty\else + \hspace{0pt plus 2fil}{{\usekomafont{disposition} #1}}\hspace{0pt plus + 1fil}\nopagebreak + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\indexdelim} +% \begin{macro}{\indexdelimi} +% \begin{macro}{\indexdelimii} +% The delimiter after the index topic but before the page number. There are +% three index levels, so there are three delimiters too. +% \begin{macrocode} +\newcommand*{\indexdelim}{\ \hspace{0pt plus 1fil}\penalty0\null\nobreak + \dotfill~} +\newcommand*{\indexdelimi}{~\dotfill\penalty0\ } +\newcommand*{\indexdelimii}{~\dotfill\penalty0\ } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\UseIndex} +% This macro does nothing but shows the external index split processor the +% destination index. +% \begin{macrocode} +\DeclareRobustCommand*{\UseIndex}[1]{\ignorespaces} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\SeeSign} +% The symbol used to sign a reference at an index. +% \begin{macrocode} +\DeclareRobustCommand*{\SeeSign}{\ensuremath{\protect\rightarrow}~} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\AddSeeIndex} +% Add »\emph{see another index}« entry to an index. First argument is an +% index entry to the index with shortcut of second argument. The third +% argument is the name of another index given also by the shortcut at the +% fourth argument. +% \begin{macrocode} +\newcommand*{\AddSeeIndex}[4]{% + \ifusemultiindex + \Index[seeindex{#4}]{#1=\UseIndex{#2}#1>#3=\UseIndex{#2}\SeeSign#3}% + \fi +} +% \end{macrocode} +% \begin{macro}{\seeindex} +% Page number style of references to another index. This eats the page +% number of the index entry and set's a page number reference to the label +% of the other index. Don't use this on your own. This is need by +% |\AddSeeIndex|. +% \begin{macrocode} +\newcommand*{\seeindex}[2]{\pageref{idx:#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\IndexSeeAt} +% A more general version of |\AddSeeIndex|. First (optional) argument is a +% entry note (e.g. |\GuidePagestyle|). This is only used if option +% \texttt{moreindexnotes} was set. Second argument is the entry. Third is +% the shortcut of the source index, the index the entry should be set. +% Fourth is the shortcut of the destination index, the index the entry +% should reference. Fifth is the name of that index. Sixth is the output +% command (e.g. |\Macro|) for the entry. +% \begin{macrocode} +\newcommand*{\IndexSeeAt}[6][\relax]{% + \ifusemultiindex + \if@moreindexnotes + \edef\@tempa{idx@f@\string#1.\string#2.#3.#4}% + \else + \edef\@tempa{idx@f@\string#2.#3.#4}% + \fi + \expandafter\ifx\csname \@tempa\endcsname\relax + \expandafter\gdef\csname \@tempa\endcsname{}% + \begingroup + \@tempswatrue + \if@moreindexnotes + \ifx\relax#1\relax\else\@tempswafalse + \Index[seeindex{#4}]{% + #2 (#1)=\UseIndex{#3}#6{#2} (\protect#1)>% + #5=\UseIndex{#3}\SeeSign\protect#5}% + \fi + \fi + \if@tempswa + \Index[seeindex{#4}]{% + #2=\UseIndex{#3}#6{#2}>#5=\UseIndex{#3}\SeeSign\protect#5}% + \fi + \endgroup + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Index} +% Primary index command. First (optional) argument is the page number style +% of the entry. Second argument is the entry. The page number style should +% be either \texttt{indexother} or \texttt{indexmain}. Default is +% \texttt{indexother}. +% \begin{macrocode} +\newcommand*{\Index}[2][indexother]{\index{#2|#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\BeginIndex} +% \begin{macro}{\EndIndex} +% \changes{v1.22b}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}%^^A +% Its also usefull to define index range entries. These have three +% arguments. First (optiona) argument is the page number style. Default of +% this parameter is \texttt{indexmain}. See |\Index| for more information +% about this parameter. The second parameter is the kind of index +% entry. This is not the same like the name or shortcut of an index! See +% |\Define|\dots|Index| for more information about the kind of an index +% entry. The third argument is the index entry. +% \begin{macrocode} +\newif\ifnolabel +\def\nolabelfalse{\global\let\ifnolabel\iffalse}% +\def\nolabeltrue{\global\let\ifnolabel\iftrue}% +\newcommand*{\BeginIndex}[3][indexmain]{% + \expandafter\ifx\csname Index#2\endcsname\relax + \GenericError{(scrguide)\@spaces\@spaces\@spaces\@spaces}{% + Document scrguide Error: \string\BeginIndex\space with unknown + index% + }{Check the \string\BeginIndex-command or add a new index type + ``#2''.}{% + See scrguide.cls for more information.}% + \else + \csname Index#2\endcsname[(%) + #1]{#3}% + \push@IndexStack{{\do{#1}{#2}{#3}}}% + \fi + % \ifnolabel\nolabelfalse\else + % \ifx\relax#2\relax\else + % \begingroup + % \def\SplitIndexValue##1~=##2~=##3\@nil{% + % ##1\expandafter\ifx\expandafter\relax##2\relax\else.##2\fi + % }% + % \let\PName\@gobble + % \let\PValue\@firstofone + % \let\ensuremath\@firstofone + % \let\textit\@firstofone + % \def~{\string~}% + % \lowercase{\def\@tempa{#2}}% + % \edef\@tempa{\label@base.\@tempa.\SplitIndexValue#3~=~=\@nil}% + % \pdfstringdef\@tempb{\@tempa}% + % \expandafter\ifx\csname \@tempb\endcsname\relax + % \expandafter\xdef\csname \@tempb\endcsname{\the\inputlineno}% + % \xdef\@currentHref{\@tempb}% + % \ClassInfo{scrguide}{Anchor: `\@currentHref'}% + % \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% + % \label{desc:\@tempa}% + % \else + % \ClassWarning{scrguide}{% + % Label \@tempa\space already defined at \csname + % \@tempb\endcsname,\MessageBreak + % ignored}% + % \fi + % \endgroup + % \fi + % \fi + \penalty\@M\ignorespaces +} +\newlength\PreserveSkip +\newcount\PreservePenalty +\newcommand*{\CloseIndex}[3][indexmain]{% + \PreservePenalty\lastpenalty + \ifvmode\PreserveSkip\lastskip\else\unskip\PreserveSkip\z@\fi + \ifdim \PreserveSkip>\z@ + \vskip -\PreserveSkip + \fi + \penalty\@M + \expandafter\ifx\csname Index#2\endcsname\relax + \GenericError{(scrguide)\@spaces\@spaces\@spaces\@spaces}{% + Document scrguide Error: \string\EndIndex\space with unknown + index% + }{Check the \string\BeginIndex-command or add a new index type + ``#2''.}{% + See scrguide.cls for more information.}% + \else + \csname Index#2\endcsname[%( + )#1]{#3}% + \fi + \ifdim\PreserveSkip >\z@ + \vskip\PreserveSkip + \fi + \penalty\PreservePenalty +} +\newcommand*{\EndIndex}[3][indexmain]{% + \begingroup + \@tempswatrue + \def\do##1##2##3{% + \Ifstr{#1}{##1}{% + \Ifstr{#2}{##2}{% + \Ifstr{\detokenize{#3}}{\detokenize{##3}}{}{\@tempswafalse}% + }{\@tempswafalse}% + }{\@tempswafalse}% + \if@tempswa + \else + \ClassError{scrguide}{Index stack error}{% + Should pop \string\do{#1}{#2}{\detokenize{#3}}\MessageBreak + but have \string\do{##1}{##2}{\detokenize{##3}}% + }% + \push@IndexStack{{\do{##1}{##2}{##3}}}% + \fi + }% + \def\StopIndexGroup{% + \ClassError{scrguide}{Index stack error}{% + Should pop \string\do{#1}{#2}{\detokenize{#3}}\MessageBreak + but have \string\StopIndexGroup + }% + \push@IndexStack{\StopIndexGroup}% + }% + \expandafter\pop@IndexStack\@IndexStack\@nil + \endgroup + \CloseIndex[#1]{#2}{#3}% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +\let\@IndexStack\@empty +\newcommand*{\push@IndexStack}[1]{% Einen Eintrag auf den Index Stapel werfen. + \xdef\@IndexStack{\unexpanded{#1}\unexpanded\expandafter{\@IndexStack}}% +} +\newcommand*{\BeginIndexGroup}{% Am Anfang einer Gruppe auf den Stack die + % Index-Gruppen-Trennmarke packen. + \push@IndexStack{\StopIndexGroup}% +} +\newcommand*{\EndIndexGroup}{% Den Stapel bis zur nächsten Stop-Marke + % verarbeiten. + \ifx\@IndexStack\@empty + \ClassError{scrguide}{cannot end index group}{% + You've told me to end the current index group,\MessageBreak + but there is no more index group open% + }% + \else + \begingroup + \let\StopIndexGroup\@tempswafalse + \@tempswatrue%( + \def\do##1##2##3{% + \CloseIndex[##1]{##2}{##3}% + }% + \@whilesw \if@tempswa \fi {% + \expandafter\pop@IndexStack\@IndexStack\@nil + }% + \endgroup + \fi +} +\def\pop@IndexStack#1#2\@nil{% Ein Argument von Stapel holen und verarbeiten. + \gdef\@IndexStack{#2}#1% +} +\newcommand*\CleanUpIndexStack{% + \ifx\@IndexStack\@empty\else + \ClassError{scrguide}{Index stack error}{% + The index stack should be empty\MessageBreak + but it still contains: \MessageBreak + \expandafter\detokenize\expandafter{\@IndexStack}% + }% + \begingroup + \let\StopIndexGroup\relax + \def\do##1##2##3{% + \CloseIndex[##1]{##2}{##3}% + }% + \@IndexStack + \global\let\@IndexStack\@empty + \endgroup + \fi +} +\AtEndDocument{\CleanUpIndexStack} +\l@preto@macro\chapter{\CleanUpIndexStack} +\l@preto@macro\part{\CleanUpIndexStack} +% +% Now we have to define different kinds of index entries. We have entries that +% will be added to only one index. We have entries that will be added to one +% index with reference to that index at another index. And there are even +% entries that will be added to one index with reference to that index from +% another index and from the main index. +% \begin{macro}{\DefineSingleIndex} +% \changes{v1.22}{2019/11/14}{support \cs{PName} in second argument}%^^A +% This defines a single index entry, e.g. of commands. A macro will be +% defined that addes the entry only to one index. First (optional) +% agrument is a not, which shows the kind of entry (e.g. |\GuideMacro|). The +% second is the macro postfix (e.g. \texttt{Cmd} would define |\IndexCmd|). +% The third is the shortcut of the index to bee used +% (e.g. \texttt{cmd}). The fourth argument is the command to be used to +% output (format) the index entries (e.g. |\Macro|). +% \begin{macrocode} +\newcommand*{\DefineSingleIndex}[4][\relax]{% + \ifx\relax#1\relax + \expandafter\newcommand\expandafter*% + \csname Index#2\endcsname[2][indexother]{% + \begingroup + \let\PName\@firstofone + \protected@edef\reserved@a{% + \unexpanded{\endgroup\Index[##1]}% + {##2\unexpanded{=\UseIndex{#3}#4{##2}}}% + }% + \reserved@a + }% + \else + \expandafter\newcommand\expandafter*% + \csname Index#2\endcsname[2][indexother]{% + \begingroup + \let\PName\@firstofone + \protected@edef\reserved@a{% + \unexpanded{\endgroup\Index[##1]}% + {##2 \unexpanded{(#1)=\UseIndex{#3}#4{##2} (\protect #1)}}% + }% + \reserved@a + }% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\DefineDoubleIndex} +% This defines a double index entry, e.g. of page styles. A macro will be +% defined that adds the entry to an index and also adds a reference entry to +% the main index. See |\DefineSingleIndex| for informations about the +% parameters. If a note was given (first optional argument) it will be used +% to make a top level entry to the main index with the corresponding +% subentry. +% \begin{macrocode} +\newcommand*{\DefineDoubleIndex}[4][\relax]{% + % #1 = optional entry note (\GuidePagestyle) + % #2 = index macro postfix (Pagestyle) + % #3 = see-from-index to be used (cmd) + % #4 = output command (\Macro) + \ifx\relax#1\relax + \expandafter\newcommand\expandafter*% + \csname Index#2\endcsname[2][indexother]{% + \Index[##1]{##2=\UseIndex{gen}#4{##2}}% + \IndexSeeAt{##2}{#3}{gen}{\GuidegenIndex}{#4}% + }% + \else + \expandafter\newcommand\expandafter*% + \csname Index#2\endcsname[2][indexother]{% + \Index[##1]{##2 (#1)=\UseIndex{gen}#4{##2} (\protect #1)}% + \Index[##1]{\csname Guide#2IndexCategoryExpanded\endcsname=\UseIndex{gen}\expandafter\protect\csname Guide#2IndexCategory\endcsname>##2=\UseIndex{gen}#4{##2}}% + \IndexSeeAt[#1]{##2}{#3}{gen}{\GuidegenIndex}{#4}% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\DefineTripleIndex} +% This defines a triple index entry, e.g. of lengths. A macro will be +% defined that adds the entry to an index and also adds a reference entry to +% another index and the main index. The first (optional) argument is a note +% (e.g. (|\GuideLength|) that will be used to generate a top level index +% entry to the main index. The second argument is the macro postfix +% (e.g. \texttt{Length} to define |\IndexLength|). The third argument is the +% shortcut of the primary index (e.g. \texttt{len}). The fourth argument is +% the short name of that index (e.g. |\GuidelenIndexShort|). The fifth +% argument is the shortcut of the index to put the reference into +% (e.g. \texttt{cmd}). The sixth argument is the output command of the index +% entry (e.g. |\Length|). +% \begin{macrocode} +\newcommand*{\DefineTripleIndex}[6][\relax]{% + % #1 = optional entry note (\GuideLength) + % #2 = index macro postfix (Length) + % #3 = index to be used (len) + % #4 = index name (\GuidelenIndexShort) + % #5 = also-from-index to be used (cmd) + % #6 = output command (\Macro) + \ifx\relax#1\relax + \expandafter\newcommand\expandafter*% + \csname Index#2\endcsname[2][indexother]{% + \IndexSeeAt{##2}{gen}{#3}{#4}{#6}% + \IndexSeeAt{##2}{#5}{#3}{#4}{#6}% + \Index[##1]{##2=\UseIndex{#3}#6{##2}}% + \IndexSeeAt{##2}{#3}{gen}{\GuidegenIndex}{#4}% + }% + \else + \expandafter\newcommand\expandafter*% + \csname Index#2\endcsname[2][indexother]{% +% \IndexSeeAt[#1]{##2}{gen}{#3}{#4}{#6}% +% \Index[##1]{#1=\UseIndex{gen}\protect#1>##2=\UseIndex{gen}#6{##2}}% + \IndexSeeAt[#1]{##2}{#5}{#3}{#4}{#6}% + \Index[##1]{##2 (#1)=\UseIndex{#3}#6{##2} (\protect #1)}% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% +% After this, let's define all used kinds of index entries: +% \begin{macrocode} +\DefineSingleIndex{Cmd}{cmd}{\Macro} +\DefineDoubleIndex[\GuidePagestyle]{Pagestyle}{cmd}{\PValue} +\DefineDoubleIndex[\GuideFloatstyle]{Floatstyle}{cmd}{\PValue} +\DefineTripleIndex[\GuideCounter]{Counter} + {len}{\GuidelenIndexShort}{cmd}{\Counter} +\DefineTripleIndex[\GuideLength]{Length} + {len}{\GuidelenIndexShort}{cmd}{\Length} +\ifusemultiindex + \DefineSingleIndex[\GuideEnvironment]{Env}{cmd}{\Environment} + \DefineSingleIndex{Option}{opt}{\Option} + \DefineSingleIndex[\GuidePackage]{Package}{fil}{\Package} + \DefineSingleIndex[\GuideClass]{Class}{fil}{\Class} + \DefineSingleIndex{File}{fil}{\File} + \DefineSingleIndex[\GuideVariable]{Variable}{cmd}{\Variable} + \DefineSingleIndex{FontElement}{elm}{\FontElement} + \DefineSingleIndex{PLength}{len}{\PLength} + \DefineSingleIndex{DoHook}{hok}{\DoHook} +\else + \DefineDoubleIndex[\GuideEnvironment]{Env}{cmd}{\Environment} + \DefineDoubleIndex{Option}{opt}{\Option} + \DefineDoubleIndex[\GuidePackage]{Package}{fil}{\Package} + \DefineDoubleIndex[\GuideClass]{Class}{fil}{\Class} + \DefineDoubleIndex{File}{fil}{\File} + \DefineDoubleIndex[\GuideVariable]{Variable}{cmd}{\Variable} + \DefineDoubleIndex{FontElement}{elm}{\FontElement} + \DefineDoubleIndex{PLength}{len}{\PLength} + \DefineDoubleIndex{DoHook}{hok}{\DoHook} +\fi +% \end{macrocode} +% +% \begin{macro}{\indexrm} +% \begin{macro}{\indexother} +% \begin{macro}{\indexit} +% \begin{macro}{\indexbf} +% \begin{macro}{\indexmain} +% \begin{macro}{\indexsl} +% \begin{macro}{\indexsf} +% \begin{macro}{\indexsc} +% Some helpers to get page numbers with different fontification but hyper +% links. +% \begin{macrocode} +\newcommand*{\indexrm}[1]{\textrm{\hyperpage{#1}}} +\newcommand*{\indexother}{}\let\indexother\indexrm +\newcommand*{\indexit}[1]{\textit{\hyperpage{#1}}} +\newcommand*{\indexbf}[1]{\textbf{\hyperpage{#1}}} +\newcommand*{\indexmain}{}\let\indexmain\indexbf +\newcommand*{\indexsl}[1]{\textsl{\hyperpage{#1}}} +\newcommand*{\indexsf}[1]{\textsf{\hyperpage{#1}}} +\newcommand*{\indexsc}[1]{\textsc{\hyperpage{#1}}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +\endinput +% +%%% Local Variables: +%%% mode: doctex +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_US" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrguide.gst b/macros/latex/contrib/koma-script/doc/scrguide.gst new file mode 100644 index 0000000000..f7825eebc9 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrguide.gst @@ -0,0 +1,63 @@ +% ====================================================================== +% scrguide.gst +% Copyright (c) Markus Kohm, 2002-2012 +% +% 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.md. +% ---------------------------------------------------------------------- +% scrguide.gst +% Copyright (c) Markus Kohm, 2002-2012 +% +% 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.md aufgefuehrten Dateien. +% ====================================================================== +% MakeIndex style for change log generation based on `scrguide.ist'. +% +% Usage: makeindex -r -s scrguide.gst -o scrguide.chn scrguide.glo +% ---------------------------------------------------------------------- +% MakeIndex-Style fuer die Aenderungsliste der KOMA-Script-Anleitung +% Dies basiert auf "scrguide.ist" +% +% Verwendung: makeindx -r -s scrguide.gst -o scrguide.chn scrguide.glo +% ====================================================================== +% +level '>' +actual '=' +encap '|' +quote '~' +% +preamble "\\begin{thechangelog}\n" +postamble "\n\\end{thechangelog}\n" +% +delim_0 "~\\dotfill~" +delim_1 "~\\dotfill~" +delim_2 "~\\dotfill~" +% +headings_flag 0 +% +keyword "\\glossaryentry" +% +% Ende der Datei `scrguide.gst' diff --git a/macros/latex/contrib/koma-script/doc/scrguide.html b/macros/latex/contrib/koma-script/doc/scrguide.html deleted file mode 100644 index ccd2abc1ac..0000000000 --- a/macros/latex/contrib/koma-script/doc/scrguide.html +++ /dev/null @@ -1,999 +0,0 @@ - - -Index - - - -

Index der KOMA-Script-Anleitung

-

Dies ist ein Index der in KOMA-Script definierten Elemente. Dieser Index bezieht sich auf die KOMA-Script-Anleitung. Zur besseren Übersicht ist der Index in mehrere Funktionsgruppen unterteilt:

- -

Optionen

- -

Anweisungen

- -

Umgebungen

- -

Längen

- -

Pseudolängen

- -

Variablen

- -

Seitenstile

- -

Zähler

- -

Stile für das float-Paket

- -

- - \ No newline at end of file diff --git a/macros/latex/contrib/koma-script/doc/scrguide.ist b/macros/latex/contrib/koma-script/doc/scrguide.ist new file mode 100644 index 0000000000..a7ca6ae075 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrguide.ist @@ -0,0 +1,52 @@ +% ---------------------------------------------------------------------- +% scrguide.ist +% Copyright (c) Markus Kohm, 2002-2012 +% +% 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.md. +% ---------------------------------------------------------------------- +% scrguide.ist +% Copyright (c) Markus Kohm, 2002-2012 +% +% 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.md aufgefuehrten Dateien. +% ====================================================================== +% +% See `man makeindex` for informations about makeindex styles. +% +level '>' +actual '=' +encap '|' +quote '~' +delim_0 "\\indexdelim" +delim_1 "\\indexdelimi" +delim_2 "\\indexdelimii" +heading_prefix "\\indexsection{" +heading_suffix "}\n" +headings_flag 1 +symhead_positive "" +% +% end of file `scrguide.ist' diff --git a/macros/latex/contrib/koma-script/doc/scrguide.pdf b/macros/latex/contrib/koma-script/doc/scrguide.pdf deleted file mode 100644 index 7ef0df9add..0000000000 Binary files a/macros/latex/contrib/koma-script/doc/scrguide.pdf and /dev/null differ diff --git a/macros/latex/contrib/koma-script/doc/scrguien.html b/macros/latex/contrib/koma-script/doc/scrguien.html deleted file mode 100644 index 44c64b7cae..0000000000 --- a/macros/latex/contrib/koma-script/doc/scrguien.html +++ /dev/null @@ -1,1000 +0,0 @@ - - -Index - - - -

Index of the KOMA-Script Guide

-

This is an index of the elements defined at KOMA-Script. This index is related to the KOMA-Script guide. To improve the survey this index has serveral functional sections:

- -

Options

- -

Commands

- -

Environments

- -

Lengths

- -

Pseudolengths

- -

Variables

- -

Page Styles

- -

Counter

- -

Styles for the float Package

- -

- - \ No newline at end of file diff --git a/macros/latex/contrib/koma-script/doc/scrguien.pdf b/macros/latex/contrib/koma-script/doc/scrguien.pdf deleted file mode 100644 index 2b6719bbbe..0000000000 Binary files a/macros/latex/contrib/koma-script/doc/scrguien.pdf and /dev/null differ diff --git a/macros/latex/contrib/koma-script/doc/scrhack-de.tex b/macros/latex/contrib/koma-script/doc/scrhack-de.tex new file mode 100644 index 0000000000..a426a28a6f --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrhack-de.tex @@ -0,0 +1,313 @@ +% ====================================================================== +% scrhack-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrhack of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrhack-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrhack)] + +\chapter{Fremdpakete verbessern mit \Package{scrhack}} +\labelbase{scrhack} + +\BeginIndexGroup +\BeginIndex{Package}{scrhack} +Einige Pakete außerhalb von \KOMAScript{} arbeiten nicht sehr gut mit +\KOMAScript{} zusammen. Für den \KOMAScript-Autor ist es dabei oftmals sehr +mühsam, die Autoren der jeweiligen Pakete von einer Verbesserung zu +überzeugen. Das betrifft auch Pakete, deren Entwicklung eingestellt +wurde. Deshalb wurde das Paket \Package{scrhack} begonnen. Dieses Paket ändert +Anweisungen und Definitionen anderer Pakete, damit sie besser mit +\KOMAScript{} zusammenarbeiten. Einige Änderungen sind auch bei +Verwendung anderer Klassen nützlich. + +Es wird empfohlen, das Paket \Package{scrhack} so früh wie möglich zu +laden. Insbesondere sollte das Laden vor den betroffenen Paketen erfolgen. + +\section{Entwicklungsstand} +\seclabel{draft} + +Obwohl das Paket bereits seit längerer Zeit Teil von \KOMAScript{} ist und +von vielen Anwendern genutzt wird, hat es auch ein Problem: Bei +der Umdefinierung von Makros fremder Pakete ist es von der genauen Definition +und Verwendung dieser Makros abhängig. Damit ist es gleichzeitig auch von +bestimmten Versionen dieser Pakete abhängig. Wird eine unbekannte Version +eines der entsprechenden Pakete verwendet, kann \Package{scrhack} den +notwendigen Patch eventuell nicht ausführen. Im Extremfall kann aber umgekehrt +der Patch einer unbekannten Version auch zu einem Fehler führen. + +Da also \Package{scrhack} immer wieder an neue Versionen fremder Pakete +angepasst werden muss, kann es niemals als fertig angesehen werden. Daher +existiert von \Package{scrhack} dauerhaft nur eine Beta-Version. Obwohl die +Benutzung in der Regel einige Vorteile mit sich bringt, kann die Funktion +nicht dauerhaft garantiert werden. + +\LoadCommonFile{options} + +\section{Verwendung von \Package{tocbasic}} +\seclabel{improvement} + +In den Anfängen von \KOMAScript{} gab es von Anwenderseite den Wunsch, dass +Verzeichnisse von Gleitumgebungen, die mit dem Paket +\Package{float}\IndexPackage{float}\important{\Package{float}} erzeugt werden, +genauso behandelt werden wie das Abbildungsverzeichnis oder das +Tabellenverzeichnis, das von den \KOMAScript-Klassen selbst angelegt +wird. Damals setzte sich der \KOMAScript-Autor mit dem Autor von +\Package{float} in Verbindung, um diesem eine Schnittstelle für entsprechende +Erweiterungen zu unterbreiten. In etwas abgewandelter Form wurde diese in +Gestalt der beiden Anweisungen +\Macro{float@listhead}\IndexCmd[indexmain]{float@listhead} und +\Macro{float@addtolists}\IndexCmd[indexmain]{float@addtolists} realisiert. + +Später zeigte sich, dass diese beiden Anweisungen nicht genug Flexibilität für +eine umfangreiche Unterstützung aller \KOMAScript-Möglichkeiten boten. Leider +hatte der Autor von \Package{float} die Entwicklung aber bereits eingestellt, +so dass hier keine Änderungen mehr zu erwarten sind. + +Andere Paketautoren haben die beiden Anweisungen ebenfalls übernommen. Dabei +zeigte sich, dass die Implementierung in einigen Paketen, darunter auch +\Package{float}, dazu führt, dass all diese Pakete nur in einer bestimmten +Reihenfolge geladen werden können, obwohl sie ansonsten in keinerlei Beziehung +zueinander stehen. + +Um all diese Nachteile und Probleme zu beseitigen, unterstützt \KOMAScript{} +diese alte Schnittstelle offiziell nicht mehr. Stattdessen wird bei Verwendung +dieser Schnittstelle von \KOMAScript{} gewarnt. Gleichzeitig wurde in +\KOMAScript{} das Paket +\Package{tocbasic}\IndexPackage{tocbasic}\important{\Package{tocbasic}} (siehe +\autoref{cha:tocbasic}) als zentrale Schnittstelle für die Verwaltung von +Verzeichnissen entworfen und realisiert. Die Verwendung dieses Pakets bietet +\iffalse weit \fi % Umbruchkorrektur +mehr Vorteile und Möglichkeiten als die +\iffalse beiden \fi % Umbruchkorrektur +alten Anweisungen. + +Obwohl der Aufwand zur Verwendung dieses Pakets gering ist, haben bisher +die Autoren der Pakete, die auf die veralteten Anweisungen gesetzt haben, +keine Anpassung vorgenommen. Daher bietet \Package{scrhack} +entsprechende Anpassungen für die Pakete +\Package{float}\IndexPackage{float}\important{\Package{float}, + \Package{floatrow}, \Package{listings}}, +\Package{floatrow}\IndexPackage{floatrow} und +\Package{listings}\IndexPackage{listings}. Allein durch das Laden von +\Package{scrhack} reagieren diese Pakete dann nicht nur auf die Einstellungen +von Option +\DescRef{maincls.option.listof}\IndexOption{listof~=\PName{Einstellung}}, +sondern beachten auch Sprachumschaltungen durch +\Package{babel}\IndexPackage{babel}. Näheres zu den Möglichkeiten, die +durch die Umstellung der Pakete auf \Package{tocbasic} zur Verfügung +stehen, ist \autoref{sec:tocbasic.toc} zu entnehmen. + +Sollte diese Änderung für eines der Pakete nicht erwünscht sein oder zu +Problemen führen, so kann sie selektiv mit den Einstellungen +\OptionValue{float}{false}\IndexOption[indexmain]{float~=\textKValue{false}}, +\OptionValue{floatrow}{false}% +\IndexOption[indexmain]{floatrow~=\textKValue{false}} und +\OptionValue{listings}{false}% +\IndexOption[indexmain]{listings~=\textKValue{false}} abgeschaltet +werden. Wichtig\textnote{Achtung!} dabei ist, dass eine Änderung der Optionen +nach dem Laden des zugehörigen Pakets keinen Einfluss mehr hat! + + +\section{Falsche Erwartungen an \Macro{@ptsize}} +\seclabel{ptsize} + +Einige Pakete gehen \iffalse grundsätzlich \fi % Umbruchkorrektur +davon aus, dass das klasseninterne Makro \Macro{@ptsize}\IndexCmd{@ptsize} +sowohl definiert ist als auch zu einer ganzen Zahl expandiert. Aus +Kompatibilitätsgründen definiert \KOMAScript{} \Macro{@ptsize} auch bei +anderen Grundschriftgrößen als 10\Unit{pt}, 11\Unit{pt} oder 12\Unit{pt}. Da +\KOMAScript{} außerdem auch gebrochene Schriftgrößen erlaubt, kann +\iffalse dabei \fi % Umbruchkorrektur +\Macro{@ptsize} natürlich auch zu einem Dezimalbruch expandieren. + +Eines\ChangedAt{v3.17}{\Package{scrhack}} der Pakete, die damit nicht zurecht +kommen, ist das Paket \Package{setspace}\IndexPackage[indexmain]{setspace}% +\important{\Package{setspace}}. Darüber hinaus sind die von diesem Paket +eingestellten Werte immer von der Grundschriftgröße abhängig, auch wenn die +Einstellung im Kontext einer anderen Schriftgröße erfolgt. Paket +\Package{scrhack} löst beide Probleme, indem es die Einstellungen von +\Macro{onehalfspacing} und \Macro{doublespacing} immer relativ zur aktuellen, +tatsächlichen Schriftgröße vornimmt. + +Sollte diese Änderung nicht erwünscht sein oder zu Problemen führen, so kann +sie selektiv mit der Einstellung +\OptionValue{setspace}{false}\IndexOption[indexmain]{setspace~=\textKValue{false}} +abgeschaltet werden. Wichtig\textnote{Achtung!} dabei ist, dass eine Änderung +der Option nach dem Laden von \Package{setspace} keinen Einfluss mehr hat! +Ebenso muss \Package{scrhack} vor \Package{setspace} geladen werden, falls +\Package{setspace} mit einer der Optionen \Option{onehalfspacing} oder +\Option{doublespacing} geladen wird und dieser Hack sich bereits darauf +auswirken soll. + + +\section{Sonderfall \Package{hyperref}} +\seclabel{hyperref} + +Ältere Versionen von +\Package{hyperref}\IndexPackage{hyperref}\important{\Package{hyperref}} vor +6.79h haben bei den Sternformen der Gliederungsbefehle hinter statt vor oder +auf die Gliederungsüberschriften verlinkt. Inzwischen ist dieses Problem auf +Vorschlag des \KOMAScript-Autors beseitigt. Da die entsprechende Änderung aber +über ein Jahr auf sich warten ließ, wurde in \Package{scrhack} ein +entsprechender Patch aufgenommen. Zwar kann dieser ebenfalls durch +\OptionValue{hyperref}{false} deaktiviert werden, empfohlen wird jedoch +stattdessen die aktuelle Version von \Package{hyperref} zu verwenden. In +diesem Fall wird die Änderung durch \Package{scrhack} automatisch verhindert. + + +\section{Inkonsistente Behandlung von \Length{textwidth} und \Length{textheight}} +\seclabel{lscape} + +Das\ChangedAt{v3.18}{\Package{scrhack}} Paket +\Package{lscape}\IndexPackage[indexmain]{lscape}% +\important{\Package{lscape}} definiert eine Umgebung +\Environment{landscape}\IndexEnv{landscape}, um den Inhalt einer Seite aber +nicht deren Kopf und Fuß quer zu setzen. Innerhalb dieser Umgebung wird +\Length{textheight}\IndexLength{textheight} auf den Wert von +\Length{textwidth} gesetzt. Umgekehrt wird jedoch \Length{textwidth} nicht auf +den vorherigen Wert von \Length{textheight} gesetzt. Das ist +inkonsistent. Meines Wissens wird \Length{textwidth} nicht entsprechend +geändert, weil andere Pakete oder Anwenderanweisungen gestört werden +könnten. Jedoch hat auch die Änderung von \Length{textheight} dieses Potential +und in der Tat beschädigt sie die Funktion beispielsweise der Pakete +\Package{showframe}\IndexPackage{showframe} und +\Package{scrlayer}\IndexPackage{scrlayer}. Daher wäre es am besten, wenn +\Length{textheight} ebenfalls unverändert bliebe. \Package{scrhack} verwendet +Paket \Package{xpatch} (siehe \cite{package:xpatch}), um die Startanweisung +\Macro{landscape} der gleichnamigen Umgebung entsprechend zu ändern. + +Falls diese Änderung nicht gewünscht wird oder Probleme verursacht, kann sie +mit Option +\OptionValue{lscape}{false}\IndexOption[indexmain]{lscape~=\textKValue{false}} +deaktiviert werden. Es ist zu beachten\textnote{Achtung!}, dass eine +nachträgliche Zuweisung an Option \Option{lscape} mit +\DescRef{\LabelBase.cmd.KOMAoption}\IndexCmd{KOMAoption} oder +\DescRef{\LabelBase.cmd.KOMAoptions}\IndexCmd{KOMAoptions} nur eine Wirkung +hat, wenn sie während des Ladens von \Package{lscape} nicht \PValue{false} +war. + +Im übrigens wird \Package{lscape} auch von dem Paket +\Package{pdflscape}\IndexPackage[indexmain]{pdflscape}% +\important{\Package{pdflscape}} verwendet, so dass \Package{scrhack} sich auch +auf die Funktion dieses Pakets auswirkt.% + + +\section{Sonderfall \Package{nomencl}} +\seclabel{nomencl} + +Eine\ChangedAt{v3.23}{\Package{scrhack}} Besonderheit stellt der Hack für das +Paket +\Package{nomencl}\IndexPackage[indexmain]{nomencl}\important{\Package{nomencl}} +dar. Dieser rüstet einerseits nach, dass der optionale +Inhaltsverzeichniseintrag für die Nomenklatur Option +\OptionValueRef{maincls}{toc}{indentunnumbered} beachtet. Quasi nebenbei +werden über das Paket \Package{tocbasic} auch gleich die Endungen \File{nlo} +und \File{nls} für den Besitzer \PValue{nomencl} reserviert (siehe +\DescRef{tocbasic.cmd.addtotoclist}, \autoref{sec:tocbasic.basics}, +\DescPageRef{tocbasic.cmd.addtotoclist}). + +Außerdem wird die Umgebung +\Environment{thenomenclature}\IndexEnv{thenomenclature} so geändert, +dass \DescRef{tocbasic.cmd.tocbasic@listhead}\IndexCmd{tocbasic@listhead} für +die Überschrift verwendet wird (siehe \autoref{sec:tocbasic.internals}, +\DescPageRef{tocbasic.cmd.tocbasic@listhead}). Dadurch können mit dem Hack +diverse Attribute für die Endung \File{nls} über +\DescRef{tocbasic.cmd.setuptoc}\IndexCmd{setuptoc}% +\important{\DescRef{tocbasic.cmd.setuptoc}} gesetzt werden. So ist es +beispielsweise möglich, mit +\DescRef{tocbasic.cmd.setuptoc}\PParameter{nls}\PParameter{numbered} die +Nomenklatur nicht nur ins Inhaltsverzeichnis einzutragen, sondern auch gleich +zu nummerieren. Näheres zu \DescRef{tocbasic.cmd.setuptoc} und den damit +möglichen Einstellungen ist in \autoref{sec:tocbasic.toc}, ab +\DescPageRef{tocbasic.cmd.setuptoc} zu finden. Als kleiner aber wichtiger +Nebeneffekt erhält die Nomenklatur mit diesem Patch außerdem einen passenden +Kolumnentitel, falls lebende Kolumnentitel beispielsweise durch Verwendung von +Seitenstil \DescRef{maincls.pagestyle.headings} aktiviert wurden. + +Dieser eher simple Patch ist damit ein Beispiel dafür, wie auch Pakete, die +keine Gleitumgebungen definieren, Nutzen aus der Verwendung von +\Package{tocbasic} ziehen könnten. Falls diese Änderung jedoch nicht +gewünscht wird oder Probleme verursacht, kann sie mit Option +\OptionValue{nomencl}{false}\IndexOption[indexmain]{nomencl~=\textKValue{false}} +deaktiviert werden. Entscheidend\textnote{Achtung!} ist dabei die Einstellung +der Option zum Zeitpunkt, zu dem \Package{nomencl} geladen wird! Spätere +Änderungen der Option mit \DescRef{\LabelBase.cmd.KOMAoption} oder +\DescRef{\LabelBase.cmd.KOMAoptions} haben also keinen Einfluss und führen zu +einer entsprechenden Warnung.% + + +\section{Sonderfall Überschriften} +\seclabel{sections} + +Diverse\ChangedAt{v3.27}{\Package{scrhack}} Pakete gehen davon aus, dass +Überschriften auf eine ganz bestimmte Weise definiert sind, die weitgehend den +Definitionen der Standardklassen entsprechen. Dies ist jedoch nicht bei allen +Klassen der Fall. Beispielsweise sind bei den \KOMAScript-Klassen die +Überschriften komplett anders definiert, um viele zusätzliche Möglichkeiten zu +bieten. Das kann einige wenige Pakete aus dem Tritt bringen. Ab Version~3.27 +bietet \Package{scrhack} daher die Möglichkeit, zwangsweise die +Überschriftenbefehle \DescRef{maincls.cmd.part}\IndexCmd{part}, +\DescRef{maincls.cmd.chapter}\IndexCmd{chapter}, +\DescRef{maincls.cmd.section}\IndexCmd{section}, +\DescRef{maincls.cmd.subsection}\IndexCmd{subsection}, +\DescRef{maincls.cmd.subsubsection}\IndexCmd{subsubsection}, +\DescRef{maincls.cmd.paragraph}\IndexCmd{paragraph} und +\DescRef{maincls.cmd.subparagraph}\IndexCmd{subparagraph} kompatibel zu den +Standardklassen zu definieren. Dabei werden im Fall, dass +\DescRef{maincls.cmd.chapter} definiert ist, die Definitionen von \Class{book} +zugrunde gelegt. Ist \DescRef{maincls.cmd.chapter} nicht definiert, so werden +die Definitionen von \Class{article} herangezogen. + +Bei Verwendung einer \KOMAScript-Klasse werden als Seiteneffekt zusätzlich +diverse Möglichkeiten dieser Klassen deaktviert. Beispielsweise stehen dann +die Befehle zur Neudefinition oder Änderung der Gliederungsbefehle aus +\autoref{sec:maincls-experts.sections} oder Option +\DescRef{maincls.option.headings} nicht mehr zur Verfügung und Befehle wie +\DescRef{maincls.cmd.partformat} erhalten eine neue Voreinstellung. + +Da dieser Hack häufig mehr Schaden als Nutzen bringt, erzeugt er eine größere +Anzahl an Warnungen. Außerdem ist er nicht bereits durch das Laden von Paket +\Package{scrhack} aktiv, sondern muss beim Laden des Pakets mit Option +\Option{standardsections}\IndexOption[indexmain]{standardsections} explizit +aktiviert werden. Eine nachträgliche Aktivierung oder Deaktivierung ist nicht +möglich. + +Da es für die eingangs erwähnten Probleme oft weniger invasive Lösungen gibt, +wird die Verwendung des Hacks ausdrücklich nicht empfohlen, sondern lediglich +als letzte Rettungschance für Notfälle angeboten.% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Eindateiensystem Schreibdatei Zieldatei Zielendung Quellendung +% LocalWords: Verzeichnisüberschrift Dateiendung Zielendungen Verzeichnisdatei +% LocalWords: Benutzeranweisungen Dokumentpräambel Kapitelebene Sternformen +% LocalWords: Sprachumschaltungen Gliederungsüberschriften Gliederungsbefehle +% LocalWords: Paketautoren diff --git a/macros/latex/contrib/koma-script/doc/scrhack-en.tex b/macros/latex/contrib/koma-script/doc/scrhack-en.tex new file mode 100644 index 0000000000..74b1999c00 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrhack-en.tex @@ -0,0 +1,285 @@ +% ====================================================================== +% scrhack-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrhack of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrhack-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrhack)] +\translator{Markus Kohm\and Karl Hagen} + +\chapter{Improving Third-Party Packages with \Package{scrhack}} +\labelbase{scrhack} + +\BeginIndexGroup +\BeginIndex{Package}{scrhack} +Some packages from other authors do not work well with \KOMAScript{}. It is +often very tedious for the author of \KOMAScript{} to convince the authors of +these packages to make specific improvements. This also applies to packages +whose development has been discontinued. That's why the \Package{scrhack} was +created. This package alters the commands and definitions of other to work +better with \KOMAScript{}. Some changes are also useful when using other +classes. + +It is recommended to load the \Package{scrhack} package as early as +possible. In particular, loading should be done before the affected packages. + +\section{Development Status} +\label{scr:scrhack.draft} + +Although this package has been part of \KOMAScript{} for long time and is used +by many users, there's one problem with it. Redefining macros from third-party +packages depends on knowing the exact definition and use of those macros. This +also means that it depends on specific versions of those packages. If you use +a unknown version of such a package, \Package{scrhack} may not be able to +execute the required patch. In extreme cases, patching an unknown version can +lead to an error. + +Because \Package{scrhack} must be continuously modified to accommodate new +releases of third-party packages, it can never be considered complete. +Therefore \Package{scrhack} will remain permanently in a beta version. +Although its use will generally be a benefit, its correct functioning cannot +be permanently guaranteed. + +\LoadCommonFile{options}% \section{Early or late Selection of Options} + +\section{Using \Package{tocbasic}} +\seclabel{improvement} + +In the early days of \KOMAScript{}, users wanted to handle lists of floating +environments created with the +\Package{float}\IndexPackage{float}\important{\Package{float}} package in the +same way as the list of figures and list of tables created by \KOMAScript{} +itself. At that time the author of \KOMAScript{} contacted the author of +\Package{float} to propose an interface to support such an extension. A +somewhat modified form of that interface was implemented with the +\Macro{float@listhead}\IndexCmd[indexmain]{float@listhead} and +\Macro{float@addtolists}\IndexCmd[indexmain]{float@addtolists} commands. + +Later it became apparent that these two commands were not flexible enough to +fully support all of \KOMAScript's capabilities. Unfortunately, the author of +\Package{float} had already ceased development by that point, so further +changes to this package cannot be expected. + +Other package authors have also adopted these two commands, and it became +apparent that the implementation in some packages, including \Package{float}, +means that all these packages can only be loaded in a specific order, even +though they are otherwise unrelated to each other. + +To overcome all these disadvantages and problems, \KOMAScript{} no longer +officially supports this old interface. Instead, \KOMAScript{} warns if the +old interface is used. At the same time, the +\Package{tocbasic}\IndexPackage{tocbasic}\important{\Package{tocbasic}} +package (see \autoref{cha:tocbasic}) has been designed and implemented as a +central interface for managing of table of contents and similar content lists. +This package provides many more advantages and features than the two old +commands. + +Although the effort to use this package is very small, so far the authors of +most of the packages that use the old interface have not made any adjustments. +Therefore \Package{scrhack} contains appropriate modifications of the +\Package{float}\IndexPackage{float}\important{\Package{float}, +\Package{floatrow}, \Package{listings}}, +\Package{floatrow}\IndexPackage{floatrow}, and +\Package{listings}\IndexPackage{listings} packages. Merely loading +\Package{scrhack} is sufficient to make these packages recognize not only the +setting of the \KOMAScript{} option +\DescRef{maincls.option.listof}\IndexOption{listof~=\PName{setting}}, but also +to react to the language switching features of the +\Package{babel}\IndexPackage{babel} package. You can find more information +about the features available by switching packages to \Package{tocbasic} in +\autoref{sec:tocbasic.toc}. + +If you do not want this modification for any of the packages, or if it causes +problems, you can deactivate it selectively with the +\OptionValue{float}{false}\IndexOption[indexmain]{float~=\textKValue{false}}, +\OptionValue{floatrow}{false}\IndexOption[indexmain]{floatrow~=\textKValue{false}}, +or +\OptionValue{listings}{false}\IndexOption[indexmain]{listings~=\textKValue{false}} +option. Note\textnote{Attention!} that changing these options after loading +the associated package has no effect! + + +\section{Incorrect Assumptions about \Macro{@ptsize}} +\seclabel{ptsize} + +Some packages assume that the class-internal macro +\Macro{@ptsize}\IndexCmd{@ptsize} both is defined and expands to an integer. +For compatibility, \KOMAScript{} defines \Macro{@ptsize} even if the basic +font size is something other than 10\Unit{pt}, 11\Unit{pt}, or 12\Unit{pt}. +\KOMAScript{} also allows non-integer font sizes. So \Macro{@ptsize} can, of +course, also expand to a non-integer number. + +One\ChangedAt{v3.17}{\Package{scrhack}} of the packages that cannot cope with +a non-integer \Macro{@ptsize} is +\Package{setspace}\IndexPackage[indexmain]{setspace}. Additionally, the values +set by this package are always dependent on the basic font size, even if the +setting is made in the context of another font size. The \Package{scrhack} +package solves both problems by redefining \Macro{onehalfspacing} and +\Macro{doublespacing} to set the spacing relative to the actual font size. + +If you do not want this modification for the package, or if it causes +problems, you can deactivate it selectively with the +\OptionValue{setspace}{false}\IndexOption[indexmain]{setspace~=\textKValue{false}} +option. Note\textnote{Attention!} that changing this option after loading +\Package{setspace} has no effect! Likewise, if you use \Package{setspace} with +either the \Option{onehalfspacing} or \Option{doublespacing} option, you must +load \Package{scrhack} first. + + +\section{Older Versions of \Package{hyperref}} +\seclabel{hyperref} + +Versions of \Package{hyperref} before 6.79h set the link +anchors after the heading of the starred versions of commands like +\DescRef{maincls.cmd.part*}, \DescRef{maincls.cmd.chapter*}, etc. instead of +before them. Since then, this problem has been resolved at the suggestion of +\KOMAScript{}'s author. But because the change took more than a year, a patch +was added to \Package{scrhack}. Although this can also be deactivated with +\OptionValue{hyperref}{false}, you should instead use the current +\Package{hyperref} release. In this case \Package{scrhack} automatically +deactivates this unnecessary patch.% + + +\section{Inconsistent Handling of \Length{textwidth} and \Length{textheight}} +\seclabel{lscape} + +The\ChangedAt{v3.18}{\Package{scrhack}} +\Package{lscape}\IndexPackage[indexmain]{lscape} package defines a +\Environment{landscape}\IndexEnv{landscape} environment to set the page +contents, but not the header or footer in landscape mode. Inside this +environment, \Length{textheight}\IndexLength{textheight} is set to the value +of \Length{textwidth}, but \Length{textwidth} is not set to the former value +of \Length{textheight}. This is inconsistent. As far as I know, +\Length{textwidth} is left unchanged because setting it to \Length{textheight} +could interfere with other packages or user commands. But changing +\Length{textheight} also has this potential, and indeed it breaks, for +example, \Package{showframe}\IndexPackage{showframe} and +\Package{scrlayer}\IndexPackage{scrlayer}. Thus it would be best if +\Length{textheight} too remained unchanged. \Package{scrhack} uses the +\Package{xpatch} package (see \cite{package:xpatch}) to modify the +\Macro{landscape} environment's start macro appropriately. + +If you do not want this modification, or if it causes problems, you can +deactivate it with the +\OptionValue{lscape}{false}\IndexOption[indexmain]{lscape~=\textKValue{false}} +option. Note\textnote{Attention!} that changing \Option{lscape} subsequently +with \DescRef{\LabelBase.cmd.KOMAoption}\IndexCmd{KOMAoption} or +\DescRef{\LabelBase.cmd.KOMAoptions}\IndexCmd{KOMAoptions} has an effect only +if it was not \PValue{false} while loading \Package{lscape}. + +Incidentally, the \Package{pdflscape}\IndexPackage[indexmain]{pdflscape} +package also uses \Package{lscape}, so \Package{scrhack} affects the +functioning of this package too.% + + +\section{Special Case for \Package{nomencl}} +\label{sec:nomencl} + +The\ChangedAt{v3.23}{\Package{scrhack}} hack for the +\Package{nomencl}\IndexPackage[indexmain]{nomencl} represents a somewhat +special case. First, it ensures that the optional table of contents entry for +the nomenclature observes the \OptionValueRef{maincls}{toc}{indentunnumbered} +option. Somewhat incidentally, it also reserves the file extensions \File{nlo} +and \File{nls} for the owner \PValue{nomencl} (see +\DescRef{tocbasic.cmd.addtotoclist}, \autoref{sec:tocbasic.basics}, +\DescPageRef{tocbasic.cmd.addtotoclist}). + +It also changes the \Environment{thenomenclature}\IndexEnv{thenomenclature} +environment to use +\DescRef{tocbasic.cmd.tocbasic@listhead}\IndexCmd{tocbasic@listhead} for the +heading (see \autoref{sec:tocbasic.internals}, +\DescPageRef{tocbasic.cmd.tocbasic@listhead}). In this way, the hack lets you +set various attribute for the \File{nls} extension using +\DescRef{tocbasic.cmd.setuptoc}\IndexCmd{setuptoc}% +\important{\DescRef{tocbasic.cmd.setuptoc}}. For example, not only can you +enter the nomenclature in the table of contents with +\DescRef{tocbasic.cmd.setuptoc}\PParameter{nls}\PParameter{numbered}, but you +can also number it immediately. You can find more about +\DescRef{tocbasic.cmd.setuptoc} and its available settings in +\autoref{sec:tocbasic.toc}, starting on \DescPageRef{tocbasic.cmd.setuptoc}. +As a small but important side effect, this patch also gives the nomenclature +also matching running head, if automatic running heads are activated, for +example by using the \DescRef{maincls.pagestyle.headings} page style. + +This rather simple patch is an example of how packages that do not define +floating environments can still benefit from \Package{tocbasic}. However, you +do not want this change, or if it causes problems, you can deactivate it with +the \OptionValue{nomencl}{false}% +\IndexOption[indexmain]{nomencl~=\textKValue{false}} option. +The\textnote{Achtung!} setting of the option when \Package{nomencl} is loaded +is crucial! Later changes to the option with +\DescRef{\LabelBase.cmd.KOMAoption} or \DescRef{\LabelBase.cmd.KOMAoptions} +have no influence and will lead to a corresponding warning.% + + +\section{Special Case for Section Headings} +\seclabel{sections} + +Various\ChangedAt{v3.27}{\Package{scrhack}} packages assume that the +sectioning commands are defined in a specific way, corresponding to the +definitions in the standard classes. But for some classes this is not the +case. For example, the \KOMAScript{} classes use a completely different +implementation to provide many additional features. But this can cause +problems for packages that depend on the definition of the standard classes. +As of version~3.27, \Package{scrhack} offers the option to force the +sectioning commands \DescRef{maincls.cmd.part}\IndexCmd{part}, +\DescRef{maincls.cmd.chapter}\IndexCmd{chapter}, +\DescRef{maincls.cmd.section}\IndexCmd{section}, +\DescRef{maincls.cmd.subsection}\IndexCmd{subsection}, +\DescRef{maincls.cmd.subsubsection}\IndexCmd{subsubsection}, +\DescRef{maincls.cmd.paragraph}\IndexCmd{paragraph}, and +\DescRef{maincls.cmd.subparagraph}\IndexCmd{subparagraph} to be compatible +with those in the standard classes. When \DescRef{maincls.cmd.chapter} is +defined, the definitions are based on those in \Class{book}. When +\DescRef{maincls.cmd.chapter} is undefined, the definitions of +\Class{article} are used. + +If you are using a \KOMAScript{} class, several features of these classes are +also deactivated as side effect. For example, the commands to define or +modify sectioning commands described in +\autoref{sec:maincls-experts.sections} or option +\DescRef{maincls.option.headings} are no longer available, and commands like +\DescRef{maincls.cmd.partformat} have different defaults. + +Because this hack has the potential to do more harm than good, it issues +several warnings. Also it is not activated simply by loading the +\Package{scrhack} package. If you want to use it, you must explicitly activate +it with the \Option{standardsections}\IndexOption[indexmain]{standardsections} +option when you load the package. Late activation or deactivation is not +supported. + +Since there are often less invasive solutions to fix the problem of package +incompatibilities, using this hack is not recommended. It is provided only as +a last resort for emergencies.% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrhack.html b/macros/latex/contrib/koma-script/doc/scrhack.html index b386b493a2..7c0bdd13d4 100644 --- a/macros/latex/contrib/koma-script/doc/scrhack.html +++ b/macros/latex/contrib/koma-script/doc/scrhack.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrhack" /> + + - + - The KOMA-Script Documentation Wrapper + Improving Third-Party Packages with scrhack -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

Improving Third-Party Packages with scrhack

+

Fremdpakete verbessern mit scrhack

- I think you are searching for the KOMA-Script documentation. You - may find the Englisch documentation - at scrguien.pdf and an index of it - at scrguien.html. + I think you are searching for the chapter + “Improving Third-Party Packages with scrhack in the + KOMA-Script documentation.
- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Fremdpakete verbessern mit scrhack in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrjura-de.tex b/macros/latex/contrib/koma-script/doc/scrjura-de.tex new file mode 100644 index 0000000000..bc0ff85eab --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrjura-de.tex @@ -0,0 +1,1282 @@ +% ====================================================================== +% scrjura-de.tex +% Copyright (c) Markus Kohm, 2011-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrjura of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{scrjura-de.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrjura)] + +\chapter{Unterstützung für die Anwaltspraxis durch \Package{scrjura}} +\labelbase{scrjura} +\BeginIndexGroup +\BeginIndex{Package}{scrjura} + +Will man einen Vertrag\Index{Vertraege=Verträge}, die Satzung einer +Gesellschaft oder eines Vereins, ein Gesetz oder gleich einen +Gesetzeskommentar schreiben, so übernimmt das Paket \Package{scrjura} den +typografischen Teil der Unterstützung für diese Tätigkeit. Obwohl +\Package{scrjura} als allgemeine Hilfe für anwaltliche Schriftstücke angedacht +ist, hat sich gezeigt, dass der Vertrag dabei ein ganz zentrales Element +ist. Besonderes Augenmerk gilt hier dem +Paragraphen\Index{Paragraphen>juristische} mit Nummer, Titel, nummerierten +Absätzen -- falls es mehrere davon in einem Paragraphen gibt --, bedarfsweise +nummerierten Sätzen, Einträgen in das Inhaltsverzeichnis und Querverweisen in +den deutschen Gepflogenheiten entsprechenden Formen. + +Das Paket ist in Zusammenarbeit mit Rechtsanwalt Dr.\,Alexander Willand, +Karlsruhe, entstanden. Viele der Möglichkeiten gehen außerdem auf konstruktive +Nachfragen von Prof.\,Heiner Richter von der Hochschule Stalsund zurück. + +\iffalse % Umbruchkorrektur +Es ist zu beachten, dass das Paket mit +\Package{hyperref}\IndexPackage{hyperref}\important{\Package{hyperref}} +zusammenarbeitet. % +\else% +Das Paket arbeitet auch mit +\Package{hyperref}\IndexPackage{hyperref}\important{\Package{hyperref}} +zusammen. % +\fi% +Es ist dabei jedoch wichtig, dass \Package{hyperref} wie üblich nach +\Package{scrjura} geladen wird! + +\LoadCommonFile{options}% \section{Frühe oder späte Optionenwahl} + +\LoadCommonFile{textmarkup}% \section{Textauszeichnungen} + +\section{Verzeichnisse} +\seclabel{toc} + +Die Überschriften juristischer Paragraphen können auf Wunsch automatisch +ins Inhaltsverzeichnis eingetragen +werden. Dazu\ChangedAt{v3.27}{\Package{scrjura}} definiert das Paket mit Hilfe +von \DescRef{tocbasic.cmd.DeclareTOCStyleEntry} (siehe +\autoref{sec:tocbasic.tocstyle} ab +\DescPageRef{tocbasic.cmd.DeclareTOCStyleEntry})\IndexCmd{DeclareTOCStyleEntry} +die Verzeichnisebene \PValue{cpar}. + +\begin{Declaration} + \OptionVName{juratotoc}{Ein-Aus-Wert} + \OptionVName{juratotoc}{Ebenennummer} +\end{Declaration} +Im Inhaltsverzeichnis angezeigt werden +Paragraphen\Index{Paragraphen>juristische} nur, wenn ihre \PName{Ebenennummer} +kleiner oder gleich dem Zähler \DescRef{maincls.counter.tocdepth}% +\important{\DescRef{maincls.counter.tocdepth}}\IndexCounter{tocdepth} ist +(siehe \autoref{sec:maincls.toc}, +\DescPageRef{maincls.counter.tocdepth}). Voreingestellt\textnote{Voreinstellung} +ist für \PName{Ebenennummer} der Wert \Length{maxdimen}, der auch verwendet +wird, wenn die Option über einen +\PName{Ein-Aus-Wert}\important{\OptionValue{juratotoc}{false}} (siehe +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}) +ausgeschaltet wird. Da der Zähler \DescRef{maincls.counter.tocdepth} +üblicherweise einen kleinen, einstelligen Wert besitzt, werden die +Paragraphen-Einträge im Inhaltsverzeichnis daher normalerweise nicht +angezeigt. + +Wird die Option hingegen über einen +\PName{Ein-Aus-Wert}\important{\OptionValue{juratotoc}{true}} eingeschaltet, +so wird als \PName{Ebenennummer} 2 voreingestellt. Damit werden sie in +Inhaltsverzeichnissen bei allen \KOMAScript-Klassen auf derselben Ebene wie +\DescRef{maincls.cmd.subsection}\IndexCmd{subsection}% +\important{\DescRef{maincls.cmd.subsection}} eingeordnet. In der +Voreinstellung von \DescRef{maincls.counter.tocdepth} werden sie dann auch bei +allen \KOMAScript-Klassen im Inhaltsverzeichnis angezeigt. + +Intern\ChangedAt{v3.27}{\Package{scrjura}} führt die Verwendung der Option zu +einem erneuten Aufruf von +\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}\IndexCmd{DeclareTOCStyleEntry} +mit dem \PName{Stil} \PValue{default} und entsprechender Einstellung für +\Option{level} in der \PName{Optionenlist}.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{juratocindent}{Einzug} + \OptionVName{juratocnumberwidth}{Nummernbreite} +\end{Declaration} +Mit diesen beiden Optionen kann für die Einträge der Paragraphen ins +Inhaltsverzeichnis sowohl der Einzug als auch die Breite, die für Nummern +reserviert wird, festgelegt werden. Voreingestellt\textnote{Voreinstellung} +sind dieselben Werte wie für +\DescRef{maincls.cmd.subsection}-Einträge\IndexCmd{subsection}% +\important{\DescRef{maincls.cmd.subsection}} bei \Class{scrartcl}, also +\OptionValue{juratocindent}{1.5em} und \OptionValue{juratocnumberwidth}{2em}. + +Intern\ChangedAt{v3.27}{\Package{scrjura}} führt die Verwendung der Optionen +zu einem erneuten Aufruf von +\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}\IndexCmd{DeclareTOCStyleEntry} mit +dem \PName{Stil} \PValue{default} und \OptionVName{indent}{Einzug} +beziehungsweise \OptionVName{numwidth}{Nummernbreite} in der +\PName{Optionenlist}.% +\EndIndexGroup + + +\section{Umgebung für Verträge} +\seclabel{contract} + +\BeginIndexGroup +\BeginIndex{}{Vertraege=Verträge} +Die wesentlichen Mechanismen von \Package{scrjura} stehen ausschließlich +innerhalb von Verträgen der zugehörigen Umgebung zur Verfügung. + +\begin{Declaration} + \begin{Environment}{contract}\end{Environment} +\end{Declaration} +Dies ist die erste und bisher einzige Umgebung für Juristen, die +\Package{scrjura} bereitstellt. Durch ihre Verwendung wird die automatische +Absatznummerierung aktiviert und die Anweisungen +\DescRef{\LabelBase.cmd.Clause} und \DescRef{\LabelBase.cmd.SubClause} mit +einer konkreten Form versehen, die später näher dokumentiert wird. + +Die\textnote{Achtung!} Umgebung \Environment{contract} darf nicht in sich +selbst geschachtelt werden. Innerhalb eines Dokuments dürfen jedoch mehrere +dieser Umgebungen verwendet werden. Dabei werden die Paragraphen innerhalb +dieser Umgebungen so behandelt, als stünden sie innerhalb einer einzigen +Umgebung. Durch das Beenden der Umgebung wird diese also quasi +unterbrochen und durch den Beginn einer neuen Umgebung wird sozusagen die alte +Umgebung fortgesetzt. Dabei sind allerdings keine Unterbrechungen innerhalb +eines Paragraphen möglich. + +Sollten Sie stattdessen Umgebungen für voneinander unabhängige Verträgen +innerhalb desselben Dokuments benötigen, so sei auf die Möglichkeit der +Definition weiterer Vertragsumgebungen mit +\DescRef{\LabelBase.cmd.DeclareNewJuraEnvironment} in +\autoref{sec:\LabelBase.newenv}, +\DescPageRef{\LabelBase.cmd.DeclareNewJuraEnvironment}) verwiesen.% +\EndIndexGroup + +\begin{Declaration} + \Option{contract} +\end{Declaration} +Durch Angabe dieser Option beim Laden des Pakets, beispielsweise mit +\DescRef{\LabelBase.cmd.usepackage}% +\important{\DescRef{\LabelBase.cmd.usepackage}} oder als globale Option bei +\DescRef{\LabelBase.cmd.documentclass}% +\important{\DescRef{\LabelBase.cmd.documentclass}}, wird das gesamte Dokument +zu einem Vertrag. Das Dokument verhält sich dann also genauso, als würde es +genau eine \DescRef{\LabelBase.env.contract}-Umgebung enthalten. + +Es\textnote{Achtung!} wird darauf hingewiesen, dass Option \Option{contract} +weder mit \DescRef{\LabelBase.cmd.KOMAoption} noch +\DescRef{\LabelBase.cmd.KOMAoptions} gesetzt werden kann! Damit ist es auch +nicht möglich die Option wieder abzuschalten. Außerdem würde mit der Option +beispielsweise ein Dokumenttitel innerhalb der Vertragsumgebung +gesetzt werden, was zu vermeiden ist. Verwenden Sie in solchen Fällen +besser eine explizite \DescRef{\LabelBase.env.contract}-Umgebung.% +\EndIndexGroup + + +\subsection{Juristische Paragraphen} +\label{sec:scrjura.clause} +\BeginIndexGroup +\BeginIndex{}{Paragraphen>juristische} + +Paragraphen im juristischen Sinn sind bei \Package{scrjura} nur innerhalb von +Verträgen, also innerhalb der Umgebung \DescRef{\LabelBase.env.contract} oder +weiteren mit \DescRef{\LabelBase.cmd.DeclareNewJuraEnvironment} (siehe +\autoref{sec:\LabelBase.newenv}, +\DescPageRef{\LabelBase.cmd.DeclareNewJuraEnvironment}) erstellten Umgebungen, +definiert. Um Verwechslungen\textnote{Hinweis!} von juristischen Paragraphen +mit Gliederungsbefehlen für typografische Paragraphen oder Abschnitte zu +vermeiden, leiten sich die Bezeichnungen von \Package{scrjura} nicht vom dem +eigentlich korrekten englischen Begriff »\emph{section}«, sondern von +»\emph{clause}« ab. + +\begin{Declaration} + \phantomsection\label{desc:scrjura.contract.macro.Clause}% + \Macro{Clause}\Parameter{Einstellungen} + \phantomsection\label{desc:scrjura.contract.macro.SubClause}% + \Macro{SubClause}\Parameter{Einstellungen} +\end{Declaration} +Dies sind die wichtigsten Anweisungen innerhalb eines Vertrags. Ohne +zusätzliche \PName{Einstellungen} erzeugt \Macro{Clause} eine +Paragraphenüberschrift, die nur aus dem Paragraphenzeichen, gefolgt von einer +fortlaufenden Nummer besteht. Dagegen erzeugt \Macro{SubClause} eine +Paragraphenüberschrift, bei der an die zuletzt mit \Macro{Clause} gesetzte +Nummer noch ein fortlaufender Kleinbuchstabe angehängt wird. Gedacht ist +\Macro{SubClause} vor allem für den Fall, dass bei der Novellierung von +Gesetzen oder Verträgen nicht nur Paragraphen umformuliert oder gestrichen +werden, sondern zwischen existierenden Paragraphen neue eingefügt werden, ohne +dass eine komplett neue Nummerierung erfolgt. Bezüglich der generellen +Formatierung oder beispielsweise der Erzeugung von Inhaltsverzeichniseinträgen +wird jedoch nicht zwischen \Macro{Clause} und \Macro{SubClause} unterschieden. + +Als \PName{Einstellungen} kann bei beiden Anweisungen eine durch Komma +separierte Liste von Eigenschaften angegeben werden. Eine Übersicht über die +möglichen Eigenschaften bietet \autoref{tab:scrjura.Clause.options}. Auf die +wichtigsten soll noch näher eingegangen werden.% +\begin{table} + \caption{Mögliche Eigenschaften für die optionalen Argumente der Anweisungen + \Macro{Clause} und \Macro{SubClause}} + \label{tab:scrjura.Clause.options} + \begin{desctabular} + \entry{\Option{dummy}}{% + Die Überschrift wird nicht gesetzt, aber gezählt.% + }\\[-1.7ex] + \entry{\OptionVName{head}{Kolumnentitel}}{% + Sind Kolumnentitel aktiviert, wird unabhängig von einem Titel für den + Paragraphen dieser Kolumnentitel verwendet.% + }\\[-1.7ex] + \entry{\Option{nohead}}{% + Es wird kein neuer Kolumnentitel gesetzt.% + }\\[-1.7ex] + \entry{\Option{notocentry}}{% + Es wird kein Eintrag ins Inhaltsverzeichnis vorgenommen.% + }\\[-1.7ex] + \entry{\OptionVName{number}{Nummer}}{% + Die Nummer für den Paragraphen wird direkt angegeben.% + }\\[-1.7ex] + \entry{\OptionVName{preskip}{Abstand}}{% + Neuer Abstand vor den Überschriften der Paragraphen.% + }\\[-1.7ex] + \entry{\OptionVName{postskip}{Abstand}}{% + Neuer Abstand nach den Überschrift der Paragraphen.% + }\\[-1.7ex] + \entry{\OptionVName{title}{Überschrift}}{% + Der Paragraph wird zusätzlich zur Nummer mit einem Titel versehen. Dies + ist gleichzeitig die Grundeinstellung für die Einträge in den + Kolumnentitel und das Inhaltsverzeichnis.% + }\\[-1.7ex] + \entry{\OptionVName{tocentry}{Inhaltsverzeichniseintrag}}{% + Unabhängig von einem Titel für den Paragraphen wird dieser Eintrag ins + Inhaltsverzeichnis vorgenommen.% + }% + \end{desctabular} +\end{table} + +In der Voreinstellung\textnote{Voreinstellung} wird vor der Überschrift ein +Abstand von zwei Zeilen und danach ein Abstand von einer Zeile eingefügt. Über +die Eigenschaften \Option{preskip}\important[i]{\Option{preskip}, + \Option{postskip}} und \Option{postskip} kann dieser Abstand verändert +werden. Die neue Einstellung gilt dann aber nicht nur für den aktuellen +Paragraphen, sondern ab dem aktuellen Paragraphen bis zum Ende der aktuellen +Umgebung. Es ist auch möglich, die entsprechende Einstellung bereits vorab mit +Hilfe von +\begin{lstcode}[escapeinside=><] + \setkeys{contract}{preskip=>\PName{Abstand}<,postskip=>\PName{Abstand}<} +\end{lstcode} +unabhängig von einem konkreten Paragraphen, außerhalb einer +\DescRef{\LabelBase.env.contract}-Umgebung vorzunehmen. Auch das Setzen +innerhalb der Präambel nach dem Laden von \Package{scrjura} ist so +möglich. Dagegen ist es nicht möglich, diese beiden Optionen bereits beim +Laden des Pakets anzugeben oder sie per \DescRef{\LabelBase.cmd.KOMAoptions} +oder \DescRef{\LabelBase.cmd.KOMAoption} zu setzen. + +\BeginIndex{FontElement}{contract.Clause}\LabelFontElement{contract.Clause}% +\BeginIndex{FontElement}{Clause}\LabelFontElement{Clause}% +In der Voreinstellung\textnote{Voreinstellung} wird für die Überschrift des +Paragraphen als Schrift \Macro{sffamily}\Macro{bfseries}\Macro{large} +verwendet. Über das Element +\FontElement{contract.Clause}\important{\FontElement{contract.Clause}} kann +diese Schrift jederzeit mit Hilfe der Anweisungen +\DescRef{\LabelBase.cmd.setkomafont}% +\important[i]{\DescRef{\LabelBase.cmd.setkomafont}, + \DescRef{\LabelBase.cmd.addtokomafont}} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) +geändert werden. Innerhalb der \DescRef{\LabelBase.env.contract}-Umgebung kann +statt \FontElement{contract.Clause} auch +\FontElement{Clause}\important{\FontElement{Clause}} verwendet werden.% +\EndIndex{FontElement}{Clause}% +\EndIndex{FontElement}{contract.Clause} + +Mit Hilfe der Einstellungen \Option{title}\important[i]{\Option{title}, + \Option{head}, \Option{tocentry}}, \Option{head} und \Option{tocentry} +können Paragraphen zusätzlich zur Nummer mit einem Titel versehen +werden. Dabei\textnote{Achtung!} wird empfohlen, den Wert der jeweiligen +Eigenschaft in geschweifte Klammern zu setzen. Anderenfalls führen +beispielsweise Kommata zu Verwechslungen mit den Trennzeichen zwischen +unterschiedlichen Eigenschaften. Leere Werte für \Option{head} und +\Option{tocentry} führen zu leeren Einträgen. Will man hingegen keine Einträge +vornehmen, so sind \Option{nohead}\important[i]{\Option{nohead}, + \Option{notocentry}} und \Option{notocentry} zu verwenden. + +Statt der fortlaufenden Nummer kann mit Hilfe der Eigenschaft +\Option{number}\important{\Option{number}} auch manuell eine Nummer vergeben +werden. Dies hat jedoch keinen Einfluss auf die Nummern der nachfolgenden +Paragraphen. Die Angabe einer leeren Nummer ist nicht +vorgesehen. Zerbrechliche Anweisungen in \PName{Nummer} sollten mit +\Macro{protect} geschützt werden. Es\textnote{Achtung!} wird empfohlen als +\PName{Nummer} nur Ziffern und Buchstaben anzugeben. + +Mit der Eigenschaft \Option{dummy}\important{\Option{dummy}} kann man die +Ausgabe der kompletten Überschrift des Paragraphen unterdrücken. In der +automatischen Zählung wird der Paragraph aber dennoch berücksichtigt. Auf +diese Weise kann man beispielsweise\textnote{Beispiel} mit +\begin{lstcode} + \Clause{dummy} +\end{lstcode} +einen Paragraphen in der automatischen Zählung überspringen, falls der +entsprechende Paragraph in einer späteren Fassung eines Vertrags gestrichen +wurde. + +Es\textnote{Achtung!} ist zu beachten, dass die Eigenschaft \Option{dummy} als +Wert allenfalls \PValue{true} und \PValue{false} versteht. Andere Werte +können zu einer Fehlermeldung führen.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Clauseformat}\Parameter{Nummer} +\end{Declaration} +Wie bereits in der vorausgehenden Erklärung erwähnt, werden juristische +Paragraphen und Unterparagraphen normalerweise nummeriert. Die Formatierung +der Nummer erfolgt dabei mit Hilfe der Anweisung \Macro{Clauseformat}, die als +einziges Argument die Nummer erwartet. Bei der +Vordefinierung\textnote{Voreinstellung} als +\begin{lstcode} + \newcommand*{\Clauseformat}[1]{\S~#1} +\end{lstcode} +wird der Nummer mit \Macro{S}\IndexCmd{S} lediglich das Paragraphensymbol, +gefolgt von einem nicht trennbaren Leerzeichen +vorangestellt. Bei\textnote{Achtung!} Umdefinierungen ist auf die +Expandierbarkeit zu achten!% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{juratitlepagebreak}{Ein-Aus-Wert} +\end{Declaration}% +Normalerweise sind Seitenumbrüche innerhalb von Überschriften aller Art +verboten. Einige Juristen benötigen jedoch Seitenumbrüche innerhalb von +Paragraphentiteln. Daher kann ein solcher Umbruch mit +\Option{juratitlepagebreak}\important{\Option{juratitlepagebreak}} erlaubt +werden. Die möglichen Einstellungen für \PName{Ein-Aus-Wert} sind +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} zu +entnehmen. + +Bitte beachten Sie\textnote{Achtung!}, dass es sich hier nicht um eine Option +für \DescRef{\LabelBase.cmd.Clause} oder \DescRef{\LabelBase.cmd.SubClause}, +sondern um eine \KOMAScript-Option handelt. Außer beim Laden des Pakets kann +sie auch jederzeit mit \DescRef{\LabelBase.cmd.KOMAoptions} oder +\DescRef{\LabelBase.cmd.KOMAoption} geändert werden und gilt dann bis zum Ende +der aktuellen Umgebung.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{clausemark}{Einstellung} +\end{Declaration}% +Da Paragraphen eine untergeordnete Gliederung mit unabhängiger Nummerierung +sind, erzeugen sie in der Voreinstellung\textnote{Voreinstellung} keine +Kolumnentitel. Über alternative Einstellungen können jedoch auch Kolumnentitel +erzeugt werden. Die möglichen Werte und ihre Bedeutung sind +\autoref{tab:scrjura.clausemark} zu entnehmen.% +% +\begin{table} + \caption{Mögliche Werte für Option \Option{clausemark} zur Erzeugung von + Kolumnentiteln durch Paragraphen} + \label{tab:scrjura.clausemark}% + \begin{desctabular} + \entry{\PValue{both}}{% + Paragraphen erzeugen linke und rechte Marken für Kolumnentitel, wenn das + Dokument die Verwendung von lebenden Kolumnentiteln vorsieht.% + \IndexOption{clausemark~=\textKValue{both}}% + }\\[-1.7ex] + \entry{\PValue{false}, \PValue{off}, \PValue{no}}{% + Paragraphen erzeugen keine Kolumnentitel.% + \IndexOption{clausemark~=\textKValue{false}}% + }\\[-1.7ex] + \entry{\PValue{forceboth}}{% + Paragraphen erzeugen mit \DescRef{maincls.cmd.markboth} linke und rechte + Marken für Kolumnentitel unabhängig davon, ob das Dokument + beispielsweise über den Seitenstil überhaupt lebende Kolumnentitel + verwendet.% + \IndexOption{clausemark~=\textKValue{forceboth}}% + }\\[-1.7ex] + \entry{\PValue{forceright}}{% + Paragraphen erzeugen mit \DescRef{maincls.cmd.markright} rechte Marken + für Kolumnentitel unabhängig davon, ob das Dokument beispielsweise über + den Seitenstil überhaupt lebende Kolumnentitel verwendet.% + \IndexOption{clausemark~=\textKValue{forceright}}% + }\\[-1.7ex] + \entry{\PValue{right}}{% + Paragraphen erzeugen rechte Marken für Kolumnentitel, wenn das Dokument + die Verwendung von lebenden Kolumnentiteln vorsieht.% + \IndexOption{clausemark~=\textKValue{right}}% + }% + \end{desctabular} +\end{table} + +Bitte beachten Sie\textnote{Achtung!}, dass es sich hier nicht um eine Option +für \DescRef{\LabelBase.cmd.Clause} oder \DescRef{\LabelBase.cmd.SubClause}, +sondern um eine \KOMAScript-Option handelt. Außer beim Laden des Pakets kann +sie auch jederzeit mit \DescRef{\LabelBase.cmd.KOMAoptions} oder +\DescRef{\LabelBase.cmd.KOMAoption} geändert werden und gilt dann bis zum Ende +der aktuellen Umgebung.% +\EndIndexGroup \EndIndexGroup + +\subsection{Absätze} +\label{sec:scrjura.par} +\BeginIndexGroup +\BeginIndex{}{Absatz>Nummerierung}% +Innerhalb von Paragraphen werden Absätze von \Package{scrjura} normalerweise +automatisch nummeriert. Sie sind damit ein stark gliederndes Element, ähnlich +\DescRef{maincls.cmd.paragraph} oder \DescRef{maincls.cmd.subparagraph} in +normalen Texten. Innerhalb von Verträgen wird deshalb häufig auch gerne mit +Abstand zwischen den Absätzen gearbeitet. Das Paket \Package{scrjura} bietet +keinen eigenen Mechanismus hierfür. Stattdessen sei auf die Option +\DescRef{maincls.option.parskip}% +\IndexOption{parskip}\important{\DescRef{maincls.option.parskip}} der +\KOMAScript-Klassen verwiesen (siehe \autoref{sec:maincls.parmarkup}, +\DescPageRef{maincls.option.parskip}). + +\begin{Declaration} + \OptionVName{parnumber}{Einstellung} +\end{Declaration} +Die automatische\textnote{Voreinstellung} Nummerierung der Absätze entspricht +den beiden Einstellungen \OptionValue{parnumber}{auto} und +\OptionValue{parnumber}{true}. Manchmal ist es notwendig, die automatische +Nummerierung abzuschalten. Das ist mit \OptionValue{parnumber}{false}% +\important{\OptionValue{parnumber}{false}}% +\IndexOption{parnumber~=\textKValue{false}} möglich. In diesem Fall wird nur die +Satznummer automatisch zurückgesetzt. + +Zur Realisierung dieser Option war es notwendig, in den Absatzmechanismus von +\LaTeX{} einzugreifen. In einigen seltenen Fällen kann sich das negativ +auswirken. Dann bleibt nur, diese Änderung mit +\OptionValue{parnumber}{manual}% +\important{\OptionValue{parnumber}{manual}}% +\IndexOption{parnumber~=\textKValue{manual}} zurückzunehmen. Umgekehrt hebt +\LaTeX{} selbst den Eingriff manchmal auf. In diesem Fällen kann er mit +\OptionValue{parnumber}{auto}% +\important{\OptionValue{parnumber}{auto}}% +\IndexOption{parnumber~=\textKValue{auto}} erneut aktiviert werden. + +Paragraphen, die nur aus einem einzigen Absatz bestehen, werden normalerweise +nicht automatisch nummeriert. Damit dies funktioniert, dürfen sich keine zwei +Paragraphen mit identischer Nummer in einem Dokument befinden. Sollten Sie +dies dennoch einmal benötigen, weichen Sie bitte auf eine weitere +Vertragsumgebung aus (siehe +\DescRef{\LabelBase.cmd.DeclareNewJuraEnvironment}, +\autoref{sec:\LabelBase.newenv}, +\DescPageRef{\LabelBase.cmd.DeclareNewJuraEnvironment}). Da\textnote{Achtung!} +die Information erst am Ende eines Paragraphen zur Verfügung steht, werden in +der Regel zwei \LaTeX-Läufe benötigt, bis die automatische Absatznummerierung +korrekt erfolgt.% +\EndIndexGroup + +\begin{Declaration} + \Counter{par} + \Macro{thepar} + \Macro{parformat} + \Macro{parformatseparation} +\end{Declaration}% +Für die Nummerierung der Absätze wird der Zähler \Counter{par} +verwendet. Seine Darstellung \Macro{thepar} ist mit +\Macro{arabic}\PParameter{par} als arabische Zahl +voreingestellt. Die\textnote{Voreinstellung} Ausgabe als automatische +Absatznummer erfolgt mit \Macro{parformat}. Dabei wird \Macro{thepar} in runde +Klammern gesetzt. Will man einem Absatz manuell eine Absatznummer +voranstellen, so sollte das ebenfalls mit \Macro{parformat} geschehen. Dabei +ist es sinnvoll, auf \Macro{parformat} noch \Macro{parformatseparation} oder +zumindest ein nicht trennbares Leerzeichen mit +\Macro{nobreakspace}\IndexCmd{nobreakspace} oder der Tilde folgen zu lassen. + +Bei\ChangedAt{v0.7}{\Package{scrjura}} der automatischen Nummerierung wird +\Macro{parformat} ebenfalls noch \Macro{parformatseparation} als Trennzeichen +angehängt. Voreinstellt\textnote{Voreinstellung} ist derzeit mit +\Macro{nobreakspace}\IndexCmd{nobreakspace} ein nicht umbrechbarer +Wortabstand. + +\BeginIndex{FontElement}{parnumber}\LabelFontElement{parnumber}% +Die Absatznummer wird normalerweise\textnote{Voreinstellung} in der +aktuellen Schrift gesetzt. Diese Voreinstellung für das Element +\FontElement{parnumber} kann jederzeit mit Hilfe der Anweisungen +\DescRef{\LabelBase.cmd.setkomafont}% +\important[i]{\DescRef{\LabelBase.cmd.setkomafont}, + \DescRef{\LabelBase.cmd.addtokomafont}} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) +geändert werden.% +\EndIndex{FontElement}{parnumber}% + +Es\textnote{Achtung!} wird darauf hingewiesen, dass \Package{scrjura} intern +davon ausgeht, dass \Macro{thepar} eine arabische Zahl ist. Daher sollte +diese Anweisung keinesfalls umdefiniert werden!% +\EndIndexGroup + + +\begin{Declaration} + \Macro{withoutparnumber} +\end{Declaration} +Wird keine Absatznummer ausgegeben, wird am Anfang des Absatzes ersatzweise +die Anweisung \Macro{withoutparnumber} lokal +ausgeführt. Diese\textnote{Voreinstellung} ist in der Voreinstellung leer, tut +also weiter nichts. Sie wurde auf speziellen Wunsch in \Package{scrjura} +eingebaut, ist für den normalen Anwender aber ohne Belang.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{ellipsispar}\OParameter{Anzahl} + \Macro{parellipsis} +\end{Declaration} +Manchmal\ChangedAt{v0.7}{\Package{scrjura}} -- insbesondere in vergleichenden +Kommentaren -- ist es wünschenswert, wenn man Absätze in Gesetzen auslassen, +aber gleichzeitig die Auslassung\Index{Absatz>Auslassung} markieren kann. Die +Absätze sollen dann auch in der Zählung der übrigen Absätze berücksichtigt +werden. Das Paket \Package{scrjura} stellt dafür die Anweisung +\Macro{ellipsispar} bereit. + +In der Voreinstellung\textnote{Voreinstellung} lässt \Macro{ellipsispar} genau +einen Absatz aus. Über das optionale Argument \PName{Anzahl} können jedoch +auch mehrere Absätze ausgelassen werden. In jedem Fall erscheint in der +Ausgabe stattdessen genau ein nicht nummerierter Absatz, der nur die +Auslassungszeichen \Macro{parellipsis} enthält. Bei der Entscheidung für eine +automatische Nummerierung der übrigen Absätze eines juristischen Paragraphen +werden die ausgelassenen Absätze jedoch mitgezählt. Dies gilt ebenso für die +Nummern etwaiger nachfolgender Absätze. +\begin{Example} + Angenommen, Sie kommentieren das Strafgesetzbuch, wollen aber in \S~2 nur + Absatz~3 kommentieren. Dennoch soll auf die übrigen Absätze indirekt + hingewiesen werden. Sie erreichen das beispielsweise mit: +\begin{lstcode} + \documentclass[parskip=half]{scrartcl} + \usepackage{scrjura} + \begin{document} + \begin{contract} + \Clause{title={Zeitliche Geltung},number=2} + \ellipsispar[2] + + Wird das Gesetz, das bei Beendigung der Tat + gilt, vor der Entscheidung geändert, so ist + das mildeste Gesetz anzuwenden. + + \ellipsispar[3] + \end{contract} + \end{document} +\end{lstcode} + Wenn\textnote{Achtung!} Sie dieses Beispiel ausprobieren wollen, verwenden + Sie bitte eine \LaTeX-Version ab 2018-04-01 und einen Editor mit der + Codierungseinstellung UTF-8. Dies ist bei aktuellen \TeX-Distributionen und + aktuellen \LaTeX-Editoren die Voreinstellung. Bei Verwendung einer + veralteten \TeX-Distribution oder einer anderen Einstellung des Editor, + müssen Sie die verwendete Codierung mit Hilfe des Pakets + \Package{inputenc}\IndexPackage{inputenc} deklarieren.% +\end{Example} + +Die Auslassungszeichen sind so vordefiniert\textnote{Voreinstellung}, dass +\Macro{textellipsis}\IndexCmd{textellipsis} verwendet wird, falls eine solche +Anweisung definiert ist. Anderenfalls wird \Macro{dots}\IndexCmd{dots} +verwendet. Eine Umdefinierung von \Macro{parellipsis} ist mit +\Macro{renewcommand} jederzeit möglich.% +\EndIndexGroup + + +\subsection{Sätze} +\label{sec:scrjura.sentence} + +\BeginIndexGroup% +\BeginIndex{}{Satz>Nummerierung}% +Absätze in Verträgen bestehen aus einem oder mehreren Sätzen, die teilweise +ebenfalls nummeriert werden. Da eine automatische Nummerierung problematisch +und fehleranfällig ist, wird nur eine halbautomatische Nummerierung +unterstützt. + +\begin{Declaration} + \Counter{sentence} + \Macro{thesentence} + \Macro{sentencenumberformat} + \Macro{Sentence} +\end{Declaration} +Die Nummerierung von Sätzen erfolgt manuell mit der Anweisung +\Macro{Sentence}. Dabei wird der Zähler \Counter{sentence} automatisch erhöht +und in der Voreinstellung von +\Macro{sentencenumberformat}\ChangedAt{v3.26}{\Package{scrjura}} die arabische +Zahl von \Macro{thesentence} hochgestellt ausgegeben. + +\BeginIndex{FontElement}{sentencenumber}\LabelFontElement{sentencenumber}% +Die\ChangedAt{v3.26}{\Package{scrjura}} Satznummer wird +normalerweise\textnote{Voreinstellung} in der aktuellen Schrift gesetzt. Diese +Voreinstellung für das Element \FontElement{sentencenumber} kann mit +Hilfe der Anweisungen \DescRef{\LabelBase.cmd.setkomafont}% +\important[i]{\DescRef{\LabelBase.cmd.setkomafont}, + \DescRef{\LabelBase.cmd.addtokomafont}} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) +geändert werden.% +\EndIndex{FontElement}{sentencenumber} + +Bei\textnote{Tipp!} Verwendung von Paket +\Package{babel}\IndexPackage{babel}\important{\Package{babel}} ist es einfach +möglich, eine Abkürzung für \Macro{Sentence} zu definieren:% +\phantomsection\label{sec:scrjura.shorthandexample}% +\begin{lstcode}[moretexcs={useshorthands,defineshorthand}] + \useshorthands{'} + \defineshorthand{'S}{\Sentence\ignorespaces} +\end{lstcode} +Dabei werden Leerzeichen nach +\lstinline|'S| ignoriert. Auch eine +Abkürzung für einen Punkt, gefolgt von einer neuen Satznummer ist möglich: +\begin{lstcode}[moretexcs={useshorthands,defineshorthand}] + \defineshorthand{'.}{. \Sentence\ignorespaces} +\end{lstcode} +Näheres zu \Macro{useshorthands}\IndexCmd{useshorthands} und +\Macro{defineshorthand}\IndexCmd{defineshorthands} ist der Anleitung zum Paket +\Package{babel} zu entnehmen (siehe \cite{package:babel}). Ein +Anwendungsbeispiel finden Sie in \autoref{sec:scrjura.example} ab +\autopageref{sec:scrjura.example}.% +\EndIndexGroup +% +\EndIndexGroup +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Querverweise} +\seclabel{ref} + +Für Paragraphen, Absätze und Sätze reicht der normale Mechanismus für +Querverweise mit \Macro{label}\IndexCmd{label}\important{\Macro{label}}, +\Macro{ref} und \Macro{pageref} nicht mehr aus. Daher wird dieser von +\Package{scrjura} um weitere Anweisungen ergänzt. + +\begin{Declaration} + \Macro{ref}\Parameter{Label} + \Macro{refL}\Parameter{Label} + \Macro{refS}\Parameter{Label} + \Macro{refN}\Parameter{Label} +\end{Declaration} +Die Anweisungen \Macro{refL}, \Macro{refS} und \Macro{refN} +referenzieren Paragraph, Absatz und Satz immer vollständig. \Macro{refL} +verwendet dabei eine textuelle Langform, während \Macro{refS} eine textuelle +Kurzform bietet. \Macro{refN} ist eine rein numerische Kurzform. \Macro{ref} +entspricht in der Voreinstellung\textnote{Voreinstellung} \Macro{refL}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{refSentence}\Parameter{Label} + \Macro{refSentenceL}\Parameter{Label} + \Macro{refSentenceS}\Parameter{Label} + \Macro{refSentenceN}\Parameter{Label} +\end{Declaration} +Der Satz ohne Paragraph und Absatz kann mit \Macro{refSentenceL}, +\Macro{refSentenceS} oder \Macro{refSentenceN} referenziert werden. Auch hier +gibt es wieder eine textuelle Langform, eine textuelle Kurzform und eine rein +numerische Form. \Macro{refSentence} entspricht in der +Voreinstellung\textnote{Voreinstellung} \Macro{refSentenceL}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{refPar}\Parameter{Label} + \Macro{refParL}\Parameter{Label} + \Macro{refParS}\Parameter{Label} + \Macro{refParN}\OParameter{Zahlenformat}\Parameter{Label} +\end{Declaration} +Nur den Absatz kann man mit \Macro{refParL}, \Macro{refParS} und +\Macro{refParN} referenzieren. Die Formen unterscheiden sich dabei wie bereits +für \DescRef{\LabelBase.cmd.refL}, \DescRef{\LabelBase.cmd.refN} und +\DescRef{\LabelBase.cmd.refS} angegeben. Eine Besonderheit stellt das +optionale Argument von \Macro{refParN} dar. Normalerweise werden Absätze in +rein numerischer Form als römische Zahlen referenziert. Über das optionale +Argument kann jedoch auch ein anderes Format vorgegeben werden. Sinnvoll ist +hier in erster Linie das \PValue{Zahlenformat} \PValue{arabic} für eine +arabische Absatznummer. \Macro{refPar} entspricht in der +Voreinstellung\textnote{Voreinstellung} \Macro{refParL}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{refClause}\Parameter{Label} + \Macro{refClauseN}\Parameter{Label} +\end{Declaration} +Für die Referenzierung von Paragraphen ohne Absatz und Satz, unterscheiden +sich \Macro{refClause} und \Macro{refClauseN} nur darin, dass ersteres +automatisch ein Paragraphenzeichen voran stellt.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{ref}{Einstellung} +\end{Declaration} +Die Ergebnisse von \DescRef{\LabelBase.cmd.ref}, +\DescRef{\LabelBase.cmd.refPar} und \DescRef{\LabelBase.cmd.refSentence} sind +von der \PName{Einstellung} für Option \Option{ref} abhängig. In der +Voreinstellung\textnote{Voreinstellung} entsprechen diese +\DescRef{\LabelBase.cmd.refL}, \DescRef{\LabelBase.cmd.refParL} und +\DescRef{\LabelBase.cmd.refSentenceL}. Mögliche Werte und ihre Bedeutung sind +\autoref{tab:scrjura.ref} zu entnehmen.% +% +\begin{table} +%\begin{desclist} +% \desccaption + \caption[{% + Mögliche Werte für Option \Option{ref} zur Einstellung der + Referenzierungsformate% + }]{% + Mögliche Werte für Option \Option{ref} zur Einstellung des Formats von + \DescRef{\LabelBase.cmd.ref}, \DescRef{\LabelBase.cmd.refPar} und + \DescRef{\LabelBase.cmd.refSentence}% + \label{tab:scrjura.ref}% + }% +% {% +% Mögliche Werte für Option \Option{ref} \emph{(Fortsetzung)}% +% }% + \begin{desctabular} + \entry{\PValue{long}}{% + Die Einstellungen \PValue{parlong} und \PValue{sentencelong} werden + kombiniert.% + \IndexOption{ref~=\textKValue{long}}% + }\\[-1.7ex] + \entry{\PValue{numeric}}{% + Die Einstellungen \PValue{parnumeric} und \PValue{sentencenumeric} + werden kombiniert.% + \IndexOption{ref~=\textKValue{numeric}}% + }\\[-1.7ex] + \entry{\PValue{clauseonly}, \PValue{onlyclause}, \PValue{ClauseOnly}, + \PValue{OnlyClause}}{% + Die Einstellungen \PValue{paroff} und \PValue{sentenceoff} werden + kombiniert. Es ist zu beachten, dass dadurch sowohl + \DescRef{\LabelBase.cmd.refPar} als auch + \DescRef{\LabelBase.cmd.refSentence} ein leeres Ergebnis erzeugen!% + \IndexOption{ref~=\textKValue{long}}% + }\\[-1.7ex] + \entry{\PValue{parlong}, \PValue{longpar}, \PValue{ParL}}{% + Der Absatz wird in der textuellen Langform referenziert.% + \IndexOption{ref~=\textKValue{parlong}}% + }\\[-1.7ex] + \entry{\PValue{parnumeric}, \PValue{numericpar}, \PValue{ParN}}{% + Der Absatz wird in der rein numerischen Form referenziert.% + \IndexOption{ref~=\textKValue{parnumeric}}% + }\\[-1.7ex] + \entry{\PValue{paroff}, \PValue{nopar}}{% + Der Absatz wird nicht mit referenziert. Es ist zu beachten, dass dadurch + \DescRef{\LabelBase.cmd.refPar} ein leeres Ergebnis erzeugt!% + \IndexOption{ref~=\textKValue{paroff}}% + }\\[-1.7ex] + \entry{\PValue{parshort}, \PValue{shortpar}, \PValue{ParS}}{% + Der Absatz wird in der textuellen Kurzform referenziert.% + \IndexOption{ref~=\textKValue{parshort}}% + }\\[-1.7ex] + \entry{\PValue{sentencelong}, \PValue{longsentence}, \PValue{SentenceL}}{% + Der Satz wird in der textuellen Langform referenziert.% + \IndexOption{ref~=\textKValue{parlong}}% + }\\[-1.7ex] + \entry{\PValue{sentencenumeric}, \PValue{numericsentence}, + \PValue{SentenceN}}{% + Der Satz wird in der rein numerischen Form referenziert.% + \IndexOption{ref~=\textKValue{sentencenumeric}}% + }\\[-1.7ex] + \entry{\PValue{sentenceoff}, \PValue{nosentence}}{% + Der Satz wird nicht mit referenziert. Es ist zu beachten, dass dadurch + von \DescRef{\LabelBase.cmd.refSentence} ein leeres Ergebnis erzeugt + wird!% + \IndexOption{ref~=\textKValue{sentenceoff}}% + }\\[-1.7ex] + \entry{\PValue{sentenceshort}, \PValue{shortsentence}, + \PValue{SentenceS}}{% + Der Satz wird in der textuellen Kurzform referenziert.% + \IndexOption{ref~=\textKValue{sentenceshort}}% + }\\[-1.7ex] + \entry{\PValue{short}}{% + Die Einstellungen \PValue{parshort} und \PValue{sentenceshort} werden + kombiniert.% + \IndexOption{ref~=\textKValue{short}}% + }% +\end{desctabular} +\end{table} + +\begin{Example} + Angenommen, Sie wollen, dass auf Absätze immer in der Form »Absatz 1 in + Paragraph 1« verwiesen wird. Da es hierfür keine vordefinierte Anweisung + gibt, müssen Sie sich Ihre eigene Definition aus den vorhanden Möglichkeiten + zusammenbauen. Dies können Sie mit% +\begin{lstcode} + \newcommand*{\refParM}[1]{% + Absatz~\refParN[arabic]{#1} + in Paragraph~\refClauseN{#1}% + } +\end{lstcode} + sehr einfach erreichen. Die so neu definierte Anweisung ist genau wie + \DescRef{\LabelBase.cmd.refParL} zu verwenden.% +\end{Example}% + +Beispiele für die Ergebnisse der nicht konfigurierbaren, grundlegenden +Anweisungen finden sich in \autoref{tab:scrjura.refexamples}. +% +\begin{table} + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside}{Beispielausgaben der von Option \Option{ref} + unabhängigen Anweisungen für Querverweise}[l] + \begin{tabular}[t]{ll} + \toprule + Anweisung & Beispielausgabe \\ + \midrule + \DescRef{\LabelBase.cmd.refL}\Parameter{Label} & § 1 Absatz 1 Satz 1 \\ + \DescRef{\LabelBase.cmd.refS}\Parameter{Label} & § 1 Abs. 1 S. 1 \\ + \DescRef{\LabelBase.cmd.refN}\Parameter{Label} & § 1 I 1. \\ + \DescRef{\LabelBase.cmd.refClause}\Parameter{Label} & § 1 \\ + \DescRef{\LabelBase.cmd.refClauseN}\Parameter{Label} & 1 \\ + \DescRef{\LabelBase.cmd.refParL}\Parameter{Label} & Absatz 1 \\ + \DescRef{\LabelBase.cmd.refParS}\Parameter{Label} & Abs. 1 \\ + \DescRef{\LabelBase.cmd.refParN}\Parameter{Label} & I \\ + \DescRef{\LabelBase.cmd.refParN}\POParameter{arabic}\Parameter{Label} & 1 \\ + \DescRef{\LabelBase.cmd.refParN}\POParameter{roman}\Parameter{Label} & i \\ + \DescRef{\LabelBase.cmd.refSentenceL}\Parameter{Label} & Satz 1 \\ + \DescRef{\LabelBase.cmd.refSentenceS}\Parameter{Label} & S. 1 \\ + \DescRef{\LabelBase.cmd.refSentenceN}\Parameter{Label} & 1. \\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:scrjura.refexamples} +\end{table} +\EndIndexGroup + + +\section{Zusätzliche Vertragsumgebungen} +\seclabel{newenv} + +Einige Anwender setzen mit \Package{scrjura} keine Verträge oder Kommentare +zu einzelnen Gesetzen, sondern Werke, in denen unterschiedliche Arten von +Gesetzen behandelt werden. Es ist daher erforderlich, dass ein Paragraph +nicht immer mit demselben Präfix »\S« versehen wird, sondern beispielsweise +als »Art.« oder »IAS« oder was auch immer bezeichnet wird. Darüber hinaus wird +eine unabhängige Zählung der unterschiedlichen Paragraphen benötigt. + +\begin{Declaration} + \Macro{DeclareNewJuraEnvironment}\Parameter{Name}\OParameter{Optionen} + \Parameter{Start-Anweisungen} + \Parameter{End-Anweisungen} +\end{Declaration} +Über\ChangedAt{v0.9}{\Package{scrjura}} diese Anweisung können weitere, +voneinander unabhängige Umgebungen für Vertrags- oder Gesetzestexte deklariert +werden. Das Argument \PName{Name} ist dabei der Name der neuen +Umgebung. \PName{Start-Anweisungen} sind Anweisungen, die immer am Anfang der +Umgebung ausgeführt werden, ganz als ob man sie jedes Mal unmittelbar hinter +\Macro{begin}\Parameter{Name} einfügen würde. Entsprechend werden +\PName{End-Anweisungen} immer am Ende der Umgebung ausgeführt, ganz als ob man +sie jedes Mal unmittelbar vor \Macro{end}\Parameter{Name} einfügen würde. Ohne +\PName{Optionen} entspricht die neue Umgebung \PName{Name} einer +\DescRef{\LabelBase.env.contract}-Umgebung mit eigenen Zählern. Es besteht +jedoch die Möglichkeit über eine mit Komma separierte Liste an +\PName{Optionen} darauf Einfluss zu +nehmen. \autoref{tab:\LabelBase.DeclareNewJuraEnvironment} führt die derzeit +unterstützen \PName{Optionen} auf.% +\begin{Example} + Um beispielsweise die in der Einleitung zu diesem Abschnitt erwähnte + Umgebung für Artikel zu definieren, genügt: +\begin{lstcode} + \DeclareNewJuraEnvironment{Artikel} + [ClauseNumberFormat=Art.~]{}{} +\end{lstcode} + Sollen die Artikel unter Verwendung einer \KOMAScript-Klasse mit + Absatzabstand statt Absatzeinzug gesetzt werden, kann +\begin{lstcode} + \DeclareNewJuraEnvironment{Artikel} + [ClauseNumberFormat=Art.~] + {\KOMAoptions{parskip}}{} +\end{lstcode} + verwendet werden. Natürlich wird dann auch bei der Referenzierung + automatisch »Art.« anstelle von »\S« vorangestellt.% + + Angewendet wird die neue Umgebung wie + \DescRef{\LabelBase.env.contract}: +\begin{lstcode} + \begin{Artikel} + \Clause{} + Die Würde des Menschen ist unantastbar. Sie zu + achten und zu schützen ist Verpflichtung aller + staatlichen Gewalt. + \end{Artikel} +\end{lstcode} +\end{Example}% +% +\begin{desclist} + \desccaption{Von \Macro{DeclareNewJuraEnvironment} unterstützte Optionen zur + Konfigurierung neuer + Vertragsumgebungen\label{tab:\LabelBase.DeclareNewJuraEnvironment}}% + {Optionen für \Macro{DeclareNewJuraEnvironment} (\emph{Fortsetzung})}% + \entry{\OptionVName{Clause}{Anweisung}}{% + \DescRef{\LabelBase.cmd.Clause} wird innerhalb der neuen Umgebung auf + \PName{Anweisung} abgebildet. Die \PName{Anweisung} sollte wie die für + \DescRef{\LabelBase.env.contract} dokumentierte Anweisung genau ein + Argument erwarten. Für eine korrekte Anwendung dieser Option sind + erweiterte Kenntnisse über die interne Funktion von \Package{scrjura} + notwendig. Außerdem können sich die Anforderungen an die \PName{Anweisung} + von Version zu Version noch ändern. Daher wird derzeit empfohlen, die + Option nicht zu verwenden!% + }% + \entry{\OptionVName{ClauseFont}{Anweisungen}}{% + \leavevmode\BeginIndex{FontElement}{\PName{Name}.Clause}% + \LabelFontElement{\PName{Name}.Clause}% + Ist diese Option angegeben, so wird eine neues Element + \FontElement{\PName{Name}.Clause}\IndexFontElement{\PName{Name}.Clause} + mit \DescRef{maincls-experts.cmd.newkomafont} definiert und + \PName{Anweisungen} für dessen Voreinstellung verwendet. Sollte das + Element bisher als Alias definiert gewesen sein (siehe + \DescRef{maincls-experts.cmd.aliaskomafont} in + \autoref{sec:maincls-experts.fonts}, + \DescPageRef{maincls-experts.cmd.aliaskomafont}), so wird es stattdessen + zu einem selbstständigen Element. Sollte das Element bereits definiert + gewesen sein, so werden lediglich die \PName{Anweisungen} mit + \DescRef{\LabelBase.cmd.setkomafont} als neue Einstellung gesetzt. Bitte + beachten Sie die in \autoref{sec:\LabelBase.textmarkup}, + \DescPageRef{\LabelBase.cmd.setkomafont} erklärten Einschränkungen + bezüglich der erlaubten \PName{Anweisungen}!% + \EndIndex{FontElement}{\PName{Name}.Clause}% + }% + \entry{\OptionVName{SubClause}{Anweisung}}{% + \DescRef{\LabelBase.cmd.SubClause} wird innerhalb der Umgebung auf + \PName{Anweisung} abgebildet. Die \PName{Anweisung} sollte wie die für + \DescRef{\LabelBase.env.contract} dokumentierte Anweisung genau ein + Argument erwarten. Für eine korrekte Anwendung dieser Option sind + erweiterte Kenntnisse über die interne Funktion von \Package{scrjura} + notwendig. Außerdem können sich die Anforderungen an die \PName{Anweisung} + von Version zu Version noch ändern. Daher wird derzeit empfohlen, die + Option nicht zu verwenden!% + }% + \entry{\OptionVName{Sentence}{Anweisung}}{% + \DescRef{\LabelBase.cmd.Sentence} wird innerhalb der Umgebung auf + \PName{Anweisung} abgebildet. Die \Macro{Anweisung} sollte kein Argument + besitzen. Normalerweise sollte sie den Zähler + \Counter{sentence}\IndexCounter{sentence} mit + \Macro{refstepcounter}\IndexCmd{refstepcounter} erhöhen und dann in + geeigneter Form ausgeben. Dabei ist besonders darauf zu achten, dass keine + unerwünschten Leerzeichen eingebaut werden!% + }% + \entry{\OptionVName{ClauseNumberFormat}{Anweisung}}{% + \PName{Anweisung} legt die Formatierung für Paragraphen-Nummern innerhalb + der Umgebung fest. Es wird eine \PName{Anweisung} mit genau einem Argument + erwartet, der Nummer des Paragraphen. Falls diese Nummer das letzte + Argument einer Kette von Anweisungen ist, so kann diese Kette an + Anweisungen auch direkt angegeben werden.% + }% +\end{desclist} +\EndIndexGroup + + +\section{Unterstützung verschiedener Sprachen} +\seclabel{babel} + +Das Paket \Package{scrjura} wurde in Zusammenarbeit mit einem Anwalt für +Deutsches Recht entwickelt. Daher unterstützte es zunächst auch nur die +Sprachen \PValue{german}, \PValue{ngerman}, \PValue{austrian} und +\PValue{naustrian}. Das Paket wurde aber so entworfen, dass es mit üblichen +Sprachpaketen wie +\Package{babel}\important{\Package{babel}}\IndexPackage{babel} +zusammenarbeitet. Anwender können solche Anpassungen einfach mit +\DescRef{scrbase.cmd.providecaptionname} (siehe +\autoref{sec:scrbase.languageSupport}, +\DescPageRef{scrbase.cmd.providecaptionname}) vornehmen. Sollten Sie über +gesicherte Informationen zu den im juristischen Umfeld gebräuchlichen +Begriffen in anderen Sprachen verfügen, würde sich der Autor über +entsprechende Rückmeldungen freuen. Auf diesem Weg ist inzwischen auch +Unterstützung für \PValue{english}, \PValue{american}, \PValue{british}, +\PValue{canadian}, \PValue{USenglish} und \PValue{UKenglish} hinzugekommen. + +\begin{Declaration} + \Macro{parname} + \Macro{parshortname} + \Macro{sentencename} + \Macro{sentenceshortname} +\end{Declaration} +Dies sind die sprachabhängigen Bezeichnungen, die von \Package{scrjura} +verwendet werden. Die Bedeutung und die im Deutschen vordefinierten Werte sind +\autoref{tab:scrjura.captionnames} zu entnehmen. Dabei nimmt \Package{scrjura} +die entsprechenden Definitionen innerhalb von +\Macro{begin}\PParameter{document} nur vor, wenn nicht bereits andere Vorgaben +getroffen wurden. Wird \Package{scrjura} mit einer nicht unterstützten Sprache +verwendet, so wird eine entsprechende Fehlermeldung ausgegeben.% +% +\begin{table} + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside} + [{% + Bedeutungen und Voreinstellungen sprachabhängiger Begriffe% + }]{% + Bedeutungen und Voreinstellungen für die sprachabhängigen Begriffe + soweit nicht bereits definiert% + } + [l] + \begin{tabular}[t]{lll} + \toprule + Anweisung & Bedeutung & Voreinstellung \\ + \midrule + \Macro{parname} & Langform »Absatz« & Absatz \\ + \Macro{parshortname} & Kurzform »Absatz« & Abs. \\ + \Macro{sentencename} & Langform »Satz« & Satz \\ + \Macro{sentenceshortname} & Kurzform »Satz« & S. \\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:scrjura.captionnames} +\end{table} +% +\EndIndexGroup + + +\section{Ein ausführliches Beispiel} +\seclabel{example} + +Erinnern wir uns an den Brief aus \autoref{cha:scrlttr2}, in dem ein +Vereinsmitglied die überfällige Mitgliederversammlung in Erinnerung bringen +wollte. Damit so etwas möglich ist, muss es auch einen Verein mit einer +Satzung geben, die das vorschreibt. Eine Vereinssatzung ist letztlich eine Art +Vertrag und kann mit \Package{scrjura} gesetzt werden. + +\lstinputcode[{xleftmargin=2em,% + linerange=1-2}]{scrjura-example-de.tex}% +Als Klasse wird \Class{scrartcl} verwendet. Da es bei Satzungen eher üblich +ist, die Absätze mit einem Abstand zu setzen, wird Option +\OptionValueRef{maincls}{parskip}{half} verwendet (siehe +\autoref{sec:maincls.parmarkup}, \DescPageRef{maincls.option.parskip}). + +\lstinputcode[{xleftmargin=2em,% + linerange=4-4}]{scrjura-example-de.tex}% +Die Satzung soll in Deutsch verfasst werden. Daher wird das Paket +\Package{babel} mit Option \Option{ngerman} geladen. + +\iffree{% +\lstinputcode[{xleftmargin=2em,% + linerange={6-6,8-8}}]{scrjura-example-de.tex}% +}{% +\lstinputcode[{xleftmargin=2em,% + linerange={6-6,9-9}}]{scrjura-example-de.tex}% +}% +Es werden einige Standardeinstellungen für die Schrift vorgenommen. In +früheren Versionen wurde im Beispiel außerdem das Paket \Package{textcomp} +geladen, um für einige Schriften ein verbessertes Paragraphenzeichen zu +erhalten. Diese Funktionalität ist seit \LaTeX{} 2020/02/01 jedoch in den +\LaTeX-Kern integriert. + +Wie Sie am Laden von \Package{fontenc} erkennen können, wird für das Beispiel +PDF\LaTeX{} verwendet. Soll stattdessen Lua\LaTeX{} oder \XeLaTeX{} verwendet +werden, entfallen alle drei Zeilen. Wahlweise kann dann \Package{fontspec} +geladen oder einfach mit den Voreinstellungen gearbeitet werden. + +\lstinputcode[{xleftmargin=2em,% + linerange=11-11}]{scrjura-example-de.tex}% +Später sollen Listen nicht mit arabischen Zahlen, sondern mit Kleinbuchstaben +nummeriert werden. Dies ist beispielsweise mit dem Paket \Package{enumerate} +möglich. + +\lstinputcode[{moretexcs={useshorthands,defineshorthand},% + xleftmargin=2em,% + linerange=13-20}]{scrjura-example-de.tex}% +Nun ist es Zeit für \Package{scrjura}. Mit Option +\OptionValueRef{\LabelBase}{clausemark}{forceboth} wird für Paragraphen das +Setzen von linken und rechten Marken für Kolumnentitel erzwungen. Da +andererseits nicht erwünscht ist, dass \DescRef{maincls.cmd.section} +Kolumnentitel erzeugen, wird Seitenstil \PageStyle{myheadings} verwendet, der +normalerweise keine lebenden Kolumnentitel aktiviert. + +Es soll später auch ein Inhaltsverzeichnis erstellt werden, in das die +Paragraphen ebenfalls aufgenommen werden. Das wird mit +\DescRef{\LabelBase.option.juratotoc} erreicht. Später werden wir feststellen, +dass die voreingestellte Breite für die Paragraphennummern im +Inhaltsverzeichnis nicht genügt. Daher wird mit +\OptionValueRef{\LabelBase}{juratocnumberwidth}{2.5em} für etwas mehr Platz +gesorgt. + +Die Definition der Abkürzungen wurde bereits in +\autoref{sec:scrjura.shorthandexample} erklärt. Im Beispiel wurde sie +übernommen, um später die Eingabe zu vereinfachen. + +\lstinputcode[{xleftmargin=2em,% + linerange=22-22}]{scrjura-example-de.tex}% +Es ist Zeit, das eigentliche Dokument zu beginnen. + +\lstinputcode[{xleftmargin=2em,% + linerange=24-28}]{scrjura-example-de.tex}% +Wie jedes Dokument hat auch eine Satzung einen Titel. Dieser wird mit den +gewohnten \KOMAScript-Mitteln (siehe \autoref{sec:maincls.titlepage}, ab +\autopageref{sec:maincls.titlepage}) erstellt. + +\lstinputcode[{xleftmargin=2em,% + linerange=30-30}]{scrjura-example-de.tex}% +Wie bereits erwähnt, soll ein Inhaltsverzeichnis erstellt werden. + +\lstinputcode[{xleftmargin=2em,% + linerange=32-36}]{scrjura-example-de.tex}% +Präambeln sind in Satzungen nicht ungewöhnlich. Hier wird sie mit +\DescRef{maincls.cmd.addsec} gesetzt, damit sie auch einen Eintrag ins +Inhaltsverzeichnis erhält. + +\lstinputcode[{xleftmargin=2em,% + linerange=38-38}]{scrjura-example-de.tex}% +Hier wird ein kleiner Trick angewendet. Die einzelnen Artikel der Satzung +sollen nicht mit arabischen Zahlen, sondern mit Großbuchstaben nummeriert +werden -- genau wie dies auch im Anhang eines Artikels mit \Class{scrartcl} +der Fall ist. + +\lstinputcode[{xleftmargin=2em,% + linerange=40-42}]{scrjura-example-de.tex}% +Mit dem ersten Artikel beginnt auch der Vertrag. + +\lstinputcode[{xleftmargin=2em,% + linerange=43-52}]{scrjura-example-de.tex}% +Der erste Paragraph erhält neben der Nummer auch einen Titel. Dies wird auch +bei den nachfolgenden Paragraphen so sein. + +Der erste Absatz des Vertrags enthält nichts ungewöhnliches. Da es nicht der +einzige Absatz ist, werden bei der Ausgabe jedem Absatz automatisch +Absatznummern voran gestellt werden. Damit dies auch beim ersten Absatz +geschieht, sind allerdings zwei \LaTeX-Läufe notwendig. Da dies für das +Inhaltsverzeichnis ohnehin der Fall sein wird, stört das aber auch nicht +weiter. + +Im zweiten Absatz stehen zwei Sätze. Hier finden zum ersten Mal die +Abkürzungen \texttt{'S} und +\texttt{'.} Anwendung. Mit der ersten wird lediglich eine Satznummer +erzeugt. Mit der zweiten wird nicht nur ein Punkt, sondern nachfolgend +auch eine Satznummer erzeugt. Beide Sätze des Absatzes sind somit nummeriert. + +\lstinputcode[{xleftmargin=2em,% + linerange=53-68}]{scrjura-example-de.tex}% +Der zweite Paragraph: Auch dieser enthält wieder mehrere Absätze, die +teilweise auch mehrere Sätze umfassen. Im zweiten Absatz ist darüber hinaus +eine Aufzählung zu finden. Beim letzten Absatz wurde ein Label gesetzt, da auf +diesen später noch verwiesen werden soll. + +\lstinputcode[{xleftmargin=2em,% + linerange=70-77}]{scrjura-example-de.tex}% +Der dritte Paragraph enthält als Besonderheit einen Querverweis. In diesem +Fall wird in der Langform mit Paragraph, Absatz und Satz referenziert. Soll +der Satz später doch entfallen, so kann dies global durch Setzen der Option +\OptionValueRef{\LabelBase}{ref}{nosentence} erreicht werden. + +\lstinputcode[{xleftmargin=2em,% + linerange=79-80}]{scrjura-example-de.tex}% +Hier gibt es nun einen ersten Spezialfall eines Paragraphen. Dieser Paragraph +war in einer früheren Fassung der Satzung noch enthalten, wurde dann aber +entfernt. Dabei sollen jedoch die nachfolgenden Paragraphen nicht neu +nummeriert werden, sondern ihre alte Nummer behalten. Deshalb wurde die +\DescRef{\LabelBase.cmd.Clause}-Anweisung nicht entfernt, sondern lediglich um +die Eigenschaft \Option{dummy} erweitert. Außerdem kann so auch weiterhin ein +Label für diesen Paragraphen gesetzt werden, obwohl der Paragraph selbst nicht +angezeigt wird. + +\lstinputcode[{xleftmargin=2em,% + linerange=81-85}]{scrjura-example-de.tex}% +Es wird ein weiterer Artikel begonnen. Damit Probleme mit der +Absatznummerierung ausgeschlossen sind, wird dazu kurzzeitig die +\DescRef{\LabelBase.env.contract}-Umgebung unterbrochen. + +\lstinputcode[{xleftmargin=2em,% + linerange=86-86}]{scrjura-example-de.tex}% +Auch der erste Paragraph im nächsten Artikel wurde gestrichen. + +\lstinputcode[{xleftmargin=2em,% + linerange=88-98}]{scrjura-example-de.tex}% +Hier haben wir wieder einen echten Paragraphen. Darin wird zum einen auf einen +der gestrichenen Paragraphen verwiesen. Zum anderen wird auch wieder ein Label +gesetzt. + +\lstinputcode[{xleftmargin=2em,% + linerange=100-105}]{scrjura-example-de.tex}% +Hier haben wir den zweiten Spezialfall eines Paragraphen. In diesem Fall wurde +kein Paragraph gestrichen, sondern ein neuer Paragraph eingefügt, ohne dass +nachfolgend Paragraphen neu nummeriert werden. Dazu wurde +\DescRef{\LabelBase.cmd.SubClause} verwendet. Somit erhält dieser Paragraph +die Nummer des vorherigen Paragraphen, die zur Unterscheidung um ein kleines +»a« erweitert wurde. + +\lstinputcode[{xleftmargin=2em,% + linerange=107-127}]{scrjura-example-de.tex}% +Die übrigen Paragraphen dieses Artikels enthalten nur bereits bekannte +Anweisungen und keine neuen Besonderheiten. + +\lstinputcode[{xleftmargin=2em,% + linerange=129-143}]{scrjura-example-de.tex}% +Es folgt noch ein weiterer Artikel ohne Besonderheiten. + +\lstinputcode[{xleftmargin=2em,% + linerange=145-145}]{scrjura-example-de.tex}% +Danach endet das \LaTeX-Dokument, dessen vordere drei Seiten +\autoref{fig:scrjura.example} zeigt.% +% +\begin{figure} + \setcapindent{0pt}% + \iffree{% + {\hfill + \frame{\includegraphics[page=1,width=.482\textwidth,% + height=.49\textheight,keepaspectratio]{scrjura-example-de}}\enskip + \frame{\includegraphics[page=2,width=.482\textwidth,% + height=.49\textheight,keepaspectratio]{scrjura-example-de}}\par + \smallskip} + \begin{captionbeside}[{% + Beispiel: Drei Seiten einer Beispielsatzung% + }]{% + Die ersten drei Seiten der Beispielsatzung aus + \protect\autoref{sec:scrjura.example}% + }% + [l] + \frame{\includegraphics[page=3,width=.482\textwidth,% + height=.49\textheight,keepaspectratio]{scrjura-example-de}}\enskip + \end{captionbeside} + }{% + {\hfill + \frame{\includegraphics[page=1,width=.482\textwidth]{scrjura-example-de}}% + \enskip + \frame{\includegraphics[page=2,width=.482\textwidth]{scrjura-example-de}}\par + \smallskip} + \begin{captionbeside}[{% + Beispiel: Drei Seiten einer Beispielsatzung% + }]{% + Die ersten drei Seiten der Beispielsatzung aus + \protect\autoref{sec:scrjura.example}% + }% + [l] + \frame{\includegraphics[page=3,width=.482\textwidth]{scrjura-example-de}}% + \enskip + \end{captionbeside} + }% + \label{fig:scrjura.example} +\end{figure} + + +\section{Entwicklungsstand} +\seclabel{draft} + +Seit \KOMAScript~3.24 teilt \Package{scrjura} die Versionsnummer der Klassen +und anderer wichtiger Pakete. Dennoch sei auf einen wichtigen Punkt +hingewiesen: Bisher ist weder das Zusammenspiel mit vielen anderen Paketen +noch die Funktion der \DescRef{\LabelBase.env.contract}-Umgebung mit allen +möglichen \LaTeX-Umgebungen und Einstellungen verschiedener Klassen und Pakete +getestet. Dies liegt nicht zuletzt daran, dass es sich bei \Package{scrjura} +um ein sehr spezielles Paket handelt, das weit außerhalb der täglichen Praxis +des Autors liegt. Damit ist der Autor diesbezüglich in hohem Maße auf +ausführliche Rückmeldungen durch die Anwender angewiesen.% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Seitenstil bedarfsweise Ebenennummer Absatznummerierung +% LocalWords: Paragraphenüberschrift Präambeln renewcommand Gesetzestexte +% LocalWords: Grundgesetzartikel Absatzabstand umbrechbaren Wortabstand +% LocalWords: Beispielsatzung Paragraphensymbol Vordefinierung Absatznummer +% LocalWords: Expandierbarkeit umbrechbarer Satznummer Paragraphenzeichen diff --git a/macros/latex/contrib/koma-script/doc/scrjura-en.tex b/macros/latex/contrib/koma-script/doc/scrjura-en.tex new file mode 100644 index 0000000000..a918873861 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrjura-en.tex @@ -0,0 +1,1164 @@ +% ====================================================================== +% scrjura-en.tex +% Copyright (c) Markus Kohm, 2011-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrjura of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{scrjura-en.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrjura)] + +\translator{Alexander Willand\and Markus Kohm\and Karl Hagen} + +\chapter{Support for the Law Office with \Package{scrjura}} +\labelbase{scrjura} +\BeginIndexGroup +\BeginIndex{Package}{scrjura} + +If you want to write a contract\Index{contract}, the articles of association +for a company or an association, a law, or a legal commentary, the package +\Package{scrjura} will provide typographical support. Although +\Package{scrjura} is intended to provide general help for legal documents, the +contract is the central element of the package. Particular attention is paid +to clauses, titles, and numbered provisions\,---\,if there are several of +them in a clause\,---, numbered sentences, entries in the table of +contents, and cross references according to German standards. + +The package has been developed in cooperation with Dr Alexander Willand of +Karlsruhe. Many of its features go back to constructive inquiries from Prof +Heiner Richter of the Hochschule Stralsund University of Applied Sciences. + +Note\textnote{Attention!} that the package works with +\Package{hyperref}\IndexPackage{hyperref}. Nevertheless, \Package{hyperref} +has to be loaded after \Package{scrjura} as usual. + +\LoadCommonFile{options}% \section{Early or late Selection of Options} + +\LoadCommonFile{textmarkup}% \section{Text Markup} + +\section{Table of Contents} +\seclabel{toc} + +The headings of clauses can also be added automatically to the table of +contents, if desired. +% TODO: Fix new translation +Therefore\ChangedAt{v3.27}{\Package{scrjura}} the package uses +\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}\IndexCmd{DeclareTOCStyleEntry} +(see \autoref{sec:tocbasic.tocstyle}, +\DescPageRef{tocbasic.cmd.DeclareTOCStyleEntry}) to define an \PName{entry + level} named \PValue{cpar}. +% :ODOT + + +\begin{Declaration} + \OptionVName{juratotoc}{simple switch}% + \OptionVName{juratotoc}{level number} +\end{Declaration} +Clauses\Index{clause} are shown in the table of contents only if their +\PName{level number} is less than or equal to the +\DescRef{maincls.counter.tocdepth}% +\important{\DescRef{maincls.counter.tocdepth}}\IndexCounter{tocdepth} counter +(see \autoref{sec:maincls.toc}, \DescPageRef{maincls.counter.tocdepth}). By +default, the \PName{level number} is \Length{maxdimen}, which is also used if +the option is switched off with the \PName{simple + switch}\important{\OptionValue{juratotoc}{false}} (see +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}). Because the +\DescRef{maincls.counter.tocdepth} counter usually has a one-digit value, +clause entries are therefore not normally displayed in the table of contents. + +If you switch on the option using the \PName{simple switch}% +\important{\OptionValue{juratotoc}{true}}, the \PName{level number} 2 is used +so that clauses are shown in the table of contents on the same level as +subsections. For the default setting of \DescRef{maincls.counter.tocdepth}, +clauses are then shown in all \KOMAScript{} classes. + +% TODO: Fix new translation +Internally\ChangedAt{v3.27}{\Package{scrjura}} usage of this option results in +a call of +\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}\IndexCmd{DeclareTOCStyleEntry} +with the \PName{style} \PValue{default} and a corresponding value of +\Option{level} in the \PName{option list}.% +% :ODOT +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{juratocindent}{indent}% + \OptionVName{juratocnumberwidth}{number width} +\end{Declaration} +These two options can be used to determine the indentation for the clause +entries in the table of contents as well as the space reserved for the numbers +there. The defaults are the same as for subsection entries in +\Class{scrartcl}. + +% TODO: Fix new translation +Internally\ChangedAt{v3.27}{\Package{scrjura}} usage of these options results +in calls of +\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}\IndexCmd{DeclareTOCStyleEntry} +with the \PName{style} \PValue{default} and \OptionVName{indent}{indent} +respectively \OptionVName{numwidth}{number width} in the \PName{option list}.% +% :ODOT +\EndIndexGroup + + +\section{Environment for Contracts} +\seclabel{contract} + +\BeginIndexGroup +\BeginIndex{}{contract} +The essential mechanisms of \Package{scrjura} are available only inside the +contract environment. + +\begin{Declaration} + \begin{Environment}{contract}\end{Environment} +\end{Declaration} +Currently, this is the one and only environment for \Package{scrjura}. Using +it activates automatic numbering of paragraphs and the +\DescRef{\LabelBase.cmd.Clause} and \DescRef{\LabelBase.cmd.SubClause} +commands, which will be documented below, are given concrete form. + +The\textnote{Attention!} \DescRef{\LabelBase.env.contract} environment must +not be nested within itself. Within a document, however, you can use the +environment several times. The clauses within these environments are treated +as if they were within a single environment. As a result, ending the +environment really only temporarily interrupts it, and the old environment is +continued by the beginning of a new environment. However, you cannot end the +environment within a clause.% +\EndIndexGroup + + +\begin{Declaration} + \Option{contract} +\end{Declaration} +The whole document becomes a contract if you use this option while loading the +package with \DescRef{\LabelBase.cmd.usepackage}% +\important{\DescRef{\LabelBase.cmd.usepackage}} or as a global option with +\DescRef{\LabelBase.cmd.documentclass}% +\important{\DescRef{\LabelBase.cmd.documentclass}}. The document then behaves +exactly as if it contained one \DescRef{\LabelBase.env.contract} environment. + +Note\textnote{Attention!} that you cannot set the \Option{contract} option +with \DescRef{\LabelBase.cmd.KOMAoption} or +\DescRef{\LabelBase.cmd.KOMAoptions}. Thus you cannot switch the option off +again. Instead, you should use a \DescRef{\LabelBase.env.contract} environment +directly.% +\EndIndexGroup + + +\subsection{Clauses} +\label{sec:scrjura.clause} +\index{section|seealso{clause}} + +Clauses\footnote{% + In English, a ``clause'' in a legal document is a section, paragraph, or + phrase that relates to a particular point. Although it is common in English + to also use the terms ``article'' or ``section'' for what we here call a + ``clause'', we use the latter term throughout to avoid confusion with the + \Class{article} class and the \DescRef{maincls.cmd.section} and + \DescRef{maincls.cmd.paragraph} sectioning divisions of most document + classes.} in a legal sense are defined in \Package{scrjura} only within +contracts, that is inside the \DescRef{\LabelBase.env.contract} environment or +other environments declared with +\DescRef{\LabelBase.cmd.DeclareNewJuraEnvironment} (see +\autoref{sec:\LabelBase.newenv}, +\DescPageRef{\LabelBase.cmd.DeclareNewJuraEnvironment}). + +\begin{Declaration} + \Macro{Clause}\OParameter{options}% + \Macro{SubClause}\OParameter{options} +\end{Declaration} +These are the most important commands inside of a contract. Without using any +additional \PName{options}, \Macro{Clause} creates the heading of a clause, +which consists of the sign ``\S'', followed by its number. In contrast, +\Macro{SubClause} creates the heading of a clause with the last number used by +\Macro{Clause} and adds a lower-case letter. \Macro{SubClause} is mainly +intended for cases where an act or a contract is amended and not only are +clauses changed or deleted but new clauses are inserted between existing ones +without completely changing the numbering. + +Both commands accept a a comma-separated list of \PName{options}. An overview +of the available properties is shown in \autoref{tab:scrjura.Clause.options}. +The most important of them will be discussed in more detail. + +\begin{table} + \caption{Available properties for the optional argument of \Macro{Clause} and + \Macro{SubClause}} + \label{tab:scrjura.Clause.options} + \begin{desctabular} + \entry{\Option{dummy}}{% + The heading will not be printed but is counted in the automatic + numbering.% + }% + \entry{\OptionVName{head}{running head}}{% + If running heads are active, this \PName{running head} is used instead of + the clause \PName{title}.% + }% + \entry{\Option{nohead}}{% + The running head stays unchanged.% + }% + \entry{\Option{notocentry}}{% + Does not make an entry into the table of contents.% + }% + \entry{\OptionVName{number}{number}}{% + Uses \PName{number} for the output of the clause number.% + }% + \entry{\OptionVName{preskip}{skip}}{% + Changes the vertical \PName{skip} before the clause heading.% + }% + \entry{\OptionVName{postskip}{skip}}{% + Changes the vertical \PName{skip} after the clause heading.% + }% + \entry{\OptionVName{title}{title}}{% + The clause \PName{title} will be printed in addition to the clause + number. This is also used as the default for the \PName{running head} + and the \PName{entry} in the table of contents.% + }% + \entry{\OptionVName{tocentry}{entry}}{% + Regardless of the clause \PName{title}, an \PName{entry} into the + table of contents will be made, if such entries are activated.% + }% + \end{desctabular} +\end{table} + +By default, a skip of two lines is inserted before the heading and a skip of +one line afterwards. You can change the size of these skips with the +\Option{preskip}\important[i]{\Option{preskip}, \Option{postskip}} and +\Option{postskip} options. The new values apply not only to the current +clause but from the current clause until the end of the current contract +environment. You can also make the appropriate settings in advance with +\begin{flushleft}\quad\small + \textbf{\Macro{setkeys}}\PParameter{contract}% + \PParameter{preskip=\PName{skip},\\ + \normalsize\quad\small + \hspace{11.5em}postskip=\PName{skip}} +\end{flushleft} +regardless of the specific clause and outside of a contract environment. You +can also set these options inside the preamble after loading +\Package{scrjura}, but you cannot set them while loading the package or by +using \DescRef{\LabelBase.cmd.KOMAoptions} or +\DescRef{\LabelBase.cmd.KOMAoption}. + +\BeginIndex{FontElement}{contract.Clause}\LabelFontElement{contract.Clause}% +\BeginIndex{FontElement}{Clause}\LabelFontElement{Clause}% +By default, clause headings use the font style +\Macro{sffamily}\Macro{bfseries}\Macro{large}. You can change this font style +at any time using the +\FontElement{contract.Clause}\important{\FontElement{contract.Clause}} element +with \DescRef{\LabelBase.cmd.setkomafont}% +\important[i]{\DescRef{\LabelBase.cmd.setkomafont}, +\DescRef{\LabelBase.cmd.addtokomafont}} and +\DescRef{\LabelBase.cmd.addtokomafont} (see \autoref{sec:maincls.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}). Inside the +\DescRef{\LabelBase.env.contract} environment, you can also use +\FontElement{Clause}\important{\FontElement{Clause}} instead of +\FontElement{contract.Clause}.% +\EndIndex{FontElement}{Clause}% +\EndIndex{FontElement}{contract.Clause} + +With the \Option{title}\important[i]{\Option{title}, \Option{head}, + \Option{tocentry}}, \Option{head}, and \Option{tocentry} options, you can +title a clause in addition to the number. You\textnote{Attention!} should put +the value of each options inside curly brackets. Otherwise, for example, +commas which are meant to be part of the value will be confused with the +delimiters between different options. Empty values for \Option{head} and +\Option{tocentry} cause empty entries. If you want to avoid an entry, use the +\Option{nohead}\important[i]{\Option{nohead}, \Option{notocentry}} and +\Option{notocentry} options. + +Instead of consecutive numbers, you can also set a clause number manually with +the \Option{number}\important{\Option{number}} option. However, this does not +affect the numbers of the subsequent clauses. Empty numbers are not possible. +Fragile commands inside \PName{number} have to be protected with +\Macro{protect}. You\textnote{Attention!} should use only numbers and letters +as a \Option{number}. + +With the \Option{dummy}\important{\Option{dummy}} option, you can suppress the +output of the whole heading of a clause. The automatic numbering, however, +will still count this clause. In this way, you can skip an automatically +numbered clause with\textnote{Example} +\begin{lstcode} + \Clause{dummy} +\end{lstcode} +in case the clause corresponding clause has been deleted in a later version of +a contract. + +Note\textnote{Attention!} that the \Option{dummy} option only accepts the +values \PValue{true} and \PValue{false}. All other values are usually ignored, +but can lead to an error message in the worst case scenario.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Clauseformat}\Parameter{number} +\end{Declaration} +As already mentioned, clauses and subclauses are normally numbered. The number +is formatted with the help of the \Macro{Clauseformat} command, which expects +the number as the only argument. The default is the following: +\begin{lstcode} + \newcommand*{\Clauseformat}[1]{\S~#1} +\end{lstcode} +This produces the section mark, \Macro{S}\IndexCmd{S} (\S), followed by a +non-breaking space and the number. If you redefine this command, be sure it +remains expandable.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{juratitlepagebreak}{simple switch} +\end{Declaration}% +Usually, page breaks are prohibited within heading of all kinds. However, some +lawyers require page breaks within clause headings. You can allow such a break +by using \Option{juratitlepagebreak}\important{\Option{juratitlepagebreak}}. +You can find the available values for \PName{simple switch} in +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}.% +\EndIndexGroup + +\begin{Declaration} + \OptionVName{clausemark}{value} +\end{Declaration}% +Since clauses are a subordinate structure with independent numbering, they do +not produce running heads by default. You can, however, create running heads +with various settings. You can find the available \PName{values} and their +meanings in \autoref{tab:scrjura.clausemark}.% +% +\begin{table} + \caption{Available values for the \Option{clausemark} option to activate + running heads}% + \label{tab:scrjura.clausemark}% + \begin{desctabular} + \entry{\PValue{both}}{% + Clauses generate left and right marks for running heads, if the document + provides automatic running heads.% + \IndexOption{clausemark~=\textKValue{both}}% + }% + \entry{\PValue{false}, \PValue{off}, \PValue{no}}{% + Clauses do not generate marks for running heads and therefore do not + change running heads.% + \IndexOption{clausemark~=\textKValue{false}}% + }% + \entry{\PValue{forceboth}}{% + Clauses use \DescRef{maincls.cmd.markboth} to generate left and right + marks for running heads even if the document does not provide automatic + running heads for the current page style.% + \IndexOption{clausemark~=\textKValue{forceboth}}% + }% + \entry{\PValue{forceright}}{% + Clauses use \DescRef{maincls.cmd.markright} to generate right marks for + running heads even if the document does not provide automatic running + heads for the current page style.% + \IndexOption{clausemark~=\textKValue{forceright}}% + }% + \entry{\PValue{right}}{% + Clauses generate right marks for running heads, if the document provides + automatic running heads.% + \IndexOption{clausemark~=\textKValue{right}}% + }% + \end{desctabular} +\end{table} +% +\EndIndexGroup + + +\subsection{Paragraphs} +\label{sec:scrjura.par} +\BeginIndexGroup +\BeginIndex{}{paragraph>numbering}% +Within clauses, \Package{scrjura} usually numbers paragraphs automatically. +With this, the paragraphs provide a powerful structuring element, similar to +\DescRef{maincls.cmd.paragraph} or \DescRef{maincls.cmd.subparagraph} in +normal documents. For this reason, contracts usually use a vertical skip +between paragraphs. The \Package{scrjura} package does not provide its own +mechanism for this. Instead, it uses the \DescRef{maincls.option.parskip}% +\IndexOption{parskip}\important{\DescRef{maincls.option.parskip}} option of +the \KOMAScript{} classes (see \autoref{sec:maincls.parmarkup}, +\DescPageRef{maincls.option.parskip}). + + +\begin{Declaration} + \OptionVName{parnumber}{value} +\end{Declaration} +The default numbering of paragraphs is \OptionValue{parnumber}{auto} and +\OptionValue{parnumber}{true}. Sometimes you may need to disable the automatic +numbering. You can do this with \OptionValue{parnumber}{false}% +\important{\OptionValue{parnumber}{false}}% +\IndexOption{parnumber~=\textKValue{false}}. In this case, only the sentence +numbering is reset. + +To implement this option, it has been necessary to hook into the +paragraph-building mechanism of \LaTeX. In some rare cases, this can have a +negative effect. If so, you can undo the change with +\OptionValue{parnumber}{manual}% +\important{\OptionValue{parnumber}{manual}}% +\IndexOption{parnumber~=\textKValue{manual}}. On the other hand, \LaTeX{} +itself sometimes undoes the change. In those cases you can activate it again +with \OptionValue{parnumber}{auto}% +\important{\OptionValue{parnumber}{auto}}% +\IndexOption{parnumber~=\textKValue{auto}}. + +Clauses that consist of a single paragraph do not automatically receive a +paragraph number. For this to work, there must not be two clauses with an +identical number in a document. However should you ever need such numbering, +you should switch to another contract environment (see +\DescRef{\LabelBase.cmd.DeclareNewJuraEnvironment}, +\autoref{sec:\LabelBase.newenv}, +\DescPageRef{\LabelBase.cmd.DeclareNewJuraEnvironment}). +Note\textnote{Attention!} that the number of paragraphs in a clause is not +available before the end of the clause. Therefore you need a least two +\LaTeX{} runs before the automatic paragraph numbering is correct.% +\EndIndexGroup + + +\begin{Declaration} + \Counter{par}% + \Macro{thepar}% + \Macro{parformat}% + \Macro{parformatseparation} +\end{Declaration}% +For numbering the paragraphs inside a clause we use the \Counter{par} counter. +The output of \Macro{thepar} will display an Arabic number, because the +default is \Macro{arabic}\PParameter{par}. \Macro{parformat} provides the +format, which is \Macro{thepar} in rounded brackets. When numbering a +paragraph manually, you should also use \Macro{parformat}. It makes sense to +call \Macro{parformat} with a subsequent \Macro{parformatseparation}, or at +least a \Macro{nobreakspace} or tilde. + +With\ChangedAt{v0.7}{\Package{scrjura}} automatic numbering, \Macro{parformat} +is followed by \Macro{parformatseparation}, which currently consists of +\Macro{nonbreakspace}, the non-breakable space. + +\BeginIndex{FontElement}{parnumber}\LabelFontElement{parnumber}% +The paragraph number is usually printed using the currently active font. +However, you can change this default for the \FontElement{parnumber} element +at any time with \DescRef{\LabelBase.cmd.setkomafont}% +\important[i]{\DescRef{\LabelBase.cmd.setkomafont}, +\DescRef{\LabelBase.cmd.addtokomafont}} and +\DescRef{\LabelBase.cmd.addtokomafont} (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}).% +\EndIndex{FontElement}{parnumber}% + +Note\textnote{Attention!} that \Package{scrjura} assumes internally that +\Macro{thepar} is an Arabic number. Therefore you should definitely not +redefine it!% +\EndIndexGroup + + +\begin{Declaration} + \Macro{withoutparnumber} +\end{Declaration} +If the paragraph number is not printed, \Package{scrjura} executes the +\Macro{withoutparnumber} command at the beginning of the new paragraph. The +initial definition of this command is empty. This means it is a kind of dummy +command that does nothing. It has been implemented because of a user request. +Most users can ignore this command.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{ellipsispar}\OParameter{number}% + \Macro{parellipsis} +\end{Declaration} +Sometimes\ChangedAt{v0.7}{\Package{scrjura}}\,---\,particularly in comparative +commentaries\,---\,it is desirable to omit paragraphs but to mark the +omission. Those omitted paragraphs\Index{paragraph>omission} should be taken +into account by the paragraph counter. The package \Package{scrjura} provides +the command \Macro{ellipsispar} to do this. + +By default, \Macro{ellipsispar} omits precisely one paragraph. Using the +optional argument, you can omit multiple paragraphs. In any case, the output +shows just one unnumbered paragraph, which consists only of the ellipsis +defined by \Macro{parellipsis}. The automatic numbering of paragraphs takes +the \PName{number} of omitted paragraphs into account. +\begin{Example} + Suppose you are writing a comment on the German\footnote{Please remember, + this translation does not refer to an existing law but is only an example + of how you might realise such a commentary with \Package{scrjura}.} penal + code, but only on paragraph 3 of \S~2. Nevertheless, you'd like to indicate + the omission indirectly. You can do this with: +\begin{lstcode} + \documentclass[parskip=half]{scrartcl} + \usepackage{scrjura} + \begin{document} + \begin{contract} + \Clause{title={Temporal application},number=2} + \ellipsispar[2] + + If the law that applies at the time the criminal act is + committed is changed before the verdict, then the most + lenient law shall be applicable. + + \ellipsispar[3] + \end{contract} + \end{document} +\end{lstcode} + To see the result, just give it a try. +\end{Example} + +The ellipsis is by default \Macro{textellipsis}\IndexCmd{textellipsis}, if +such a command is defined. If not, \Macro{dots} is used. You can redefine +\Macro{parellipsis} at any time with \Macro{renewcommand}.% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Sentences} +\label{sec:scrjura.sentence} + +\BeginIndexGroup% +\BeginIndex{}{sentence>number}% +Paragraphs in contracts consist of one or more sentences, some of which may +also be numbered. However, as automatic numbering is cumbersome and +error-prone, it has not yet been implemented in +\Package{scrjura}. Semi-automatic numbering, however, is supported. + +\begin{Declaration} + \Counter{sentence} + \Macro{thesentence} + \Macro{sentencenumberformat} + \Macro{Sentence} +\end{Declaration} +Manual numbering of sentences is done with the \Macro{Sentence} command. It +adds one to the \Counter{sentence} counter. By default, +\Macro{sentencenumberformat}\ChangedAt{v3.26}{\Package{scrjura}} prints +\Macro{thesentence} as an Arabic number in superscript. + +\BeginIndex{FontElement}{sentencenumber}\LabelFontElement{sentencenumber}% +The\ChangedAt{v3.26}{\Package{scrjura}} sentence number is usually printed +using the currently active font. However, you can change this default for the +\FontElement{parnumber} element at any time with +\DescRef{\LabelBase.cmd.setkomafont}% +\important[i]{\DescRef{\LabelBase.cmd.setkomafont}, + \DescRef{\LabelBase.cmd.addtokomafont}} and +\DescRef{\LabelBase.cmd.addtokomafont} (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}).% +\EndIndex{FontElement}{sentencenumber}% + +Using\textnote{Hint!} \Package{babel}\IndexPackage{babel} offers an easy way +to define a shorthand for \Macro{Sentence}:% +\phantomsection\label{sec:scrjura.shorthandexample}% +\begin{lstcode}[moretexcs={useshorthands,defineshorthand}] + \useshorthands{'} + \defineshorthand{'S}{\Sentence\ignorespaces} +\end{lstcode} +With this definition, any space after \lstinline|'S| will be ignored. You can +even use the dot as an abbreviation for a dot and a new sentence number: +\begin{lstcode}[moretexcs={useshorthands,defineshorthand}] + \defineshorthand{'.}{. \Sentence\ignorespaces} +\end{lstcode} +For details regarding \Macro{useshorthands} and \Macro{defineshorthands}, +please consult the manual of the \Package{babel} package (see +\cite{package:babel}). You can find an example of their application in +\autoref{sec:scrjura.example}, \autopageref{sec:scrjura.example}.% +\EndIndexGroup +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Cross-References} +\seclabel{ref} + +The conventional mechanism to set cross-references using +\Macro{label}\IndexCmd{label}\important{\Macro{label}}, \Macro{ref}, and +\Macro{pageref} does not suffice for clauses, paragraphs, and sentences. +Therefore \Package{scrjura} provides additional commands. + +\begin{Declaration} + \Macro{ref}\Parameter{label}% + \Macro{refL}\Parameter{label}% + \Macro{refS}\Parameter{label}% + \Macro{refN}\Parameter{label} +\end{Declaration} +The commands \Macro{refL}, \Macro{refS}, and \Macro{refN} give a full +reference to clause, paragraph and sentence. \Macro{refL} is a long text, +\Macro{refS} a short text, and \Macro{refN} an abbreviated, numeric form. +\Macro{ref} defaults to \Macro{refL}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{refClause}\Parameter{label}% + \Macro{refClauseN}\Parameter{label} +\end{Declaration} +These commands reference a clause without displaying the paragraph or +sentences. \Macro{refClause} puts a section mark (\S) in front of the +reference, while \Macro{refClauseN} does not.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{refPar}\Parameter{label}% + \Macro{refParL}\Parameter{label}% + \Macro{refParS}\Parameter{label}% + \Macro{refParN}\OParameter{number format}\Parameter{label} +\end{Declaration} +You can reference just a paragraph with \Macro{refParL}, \Macro{refParS} and +\Macro{refParN}. The differences between the forms correspond to the +differences between \DescRef{\LabelBase.cmd.refL}, +\DescRef{\LabelBase.cmd.refN} and \DescRef{\LabelBase.cmd.refS}. A feature +worth noting is the optional argument of \Macro{refParN}. Usually the numeric +reference to a paragraph uses a Roman number. You can, however, specify a +different \PName{number format} in the optional argument. This option +primarily makes sense to use Arabic numbers. By default, \Macro{refPar} is +\Macro{refParL}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{refSentence}\Parameter{label}% + \Macro{refSentenceL}\Parameter{label}% + \Macro{refSentenceS}\Parameter{label}% + \Macro{refSentenceN}\Parameter{label} +\end{Declaration} +You can reference a sentence with \Macro{refSentenceL}, \Macro{refSentenceS}, +or \Macro{refSentenceN}. Again, there is a long text form, a short text form, +and a numerical form. By default, \Macro{refSentence} is +\Macro{refSentenceL}.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{ref}{value} +\end{Declaration} +The results of \DescRef{\LabelBase.cmd.ref}, \DescRef{\LabelBase.cmd.refPar}, +and \DescRef{\LabelBase.cmd.refSentence} depend on the \PName{value} of the +\Option{ref} option. The defaults are \DescRef{\LabelBase.cmd.refL}, +\DescRef{\LabelBase.cmd.refParL} and \DescRef{\LabelBase.cmd.refSentenceL}. +You can find the available values and their meaning in +\autoref{tab:scrjura.ref}.% +% +\begin{table} +%\begin{desclist} +% \desccaption + \caption[{% + Available values for the \Option{ref} option to configure the + cross-reference format% + }]{% + Available values for the \Option{ref} option to configure the + cross-reference format of \DescRef{\LabelBase.cmd.ref}, + \DescRef{\LabelBase.cmd.refPar}, and \DescRef{\LabelBase.cmd.refSentence}% + \label{tab:scrjura.ref}% + }% + \begin{desctabular} + \entry{\PValue{long}}{% + A combination of \PValue{parlong} and \PValue{sentencelong}.% + \IndexOption{ref~=\textKValue{long}}% + }% + \entry{\PValue{numeric}}{% + A combination of \PValue{parnumeric} and \PValue{sentencenumeric}.% + \IndexOption{ref~=\textKValue{numeric}}% + }% + \entry{\PValue{clauseonly}, \PValue{onlyclause}, \PValue{ClauseOnly}, + \PValue{OnlyClause}}{% + A combination of \PValue{paroff} and \PValue{sentenceoff}. Note that + \DescRef{\LabelBase.cmd.refPar} and \DescRef{\LabelBase.cmd.refSentence} + produce empty results!% + \IndexOption{ref~=\textKValue{long}}% + }% + \entry{\PValue{parlong}, \PValue{longpar}, \PValue{ParL}}{% + Paragraphs are referenced in long textual form.% + \IndexOption{ref~=\textKValue{parlong}}% + }% + \entry{\PValue{parnumeric}, \PValue{numericpar}, \PValue{ParN}}{% + Paragraphs are referenced in simple numerical form.% + \IndexOption{ref~=\textKValue{parnumeric}}% + }% + \entry{\PValue{paroff}, \PValue{nopar}}{% + Paragraphs have no reference. Note that \DescRef{\LabelBase.cmd.refPar} + produces an empty result!% + \IndexOption{ref~=\textKValue{paroff}}% + }% + \entry{\PValue{parshort}, \PValue{shortpar}, \PValue{ParS}}{% + Paragraphs are referenced in short textual form.% + \IndexOption{ref~=\textKValue{parshort}}% + }% + \entry{\PValue{sentencelong}, \PValue{longsentence}, \PValue{SentenceL}}{% + Sentences are referenced in long textual form.% + \IndexOption{ref~=\textKValue{parlong}}% + }% + \entry{\PValue{sentencenumeric}, \PValue{numericsentence}, + \PValue{SentenceN}}{% + Sentences are referenced in simple numeric form.% + \IndexOption{ref~=\textKValue{sentencenumeric}}% + }% + \entry{\PValue{sentenceoff}, \PValue{nosentence}}{% + Sentences have no reference. Note that + \DescRef{\LabelBase.cmd.refSentence} produces an empty result!% + \IndexOption{ref~=\textKValue{sentenceoff}}% + }% + \entry{\PValue{sentenceshort}, \PValue{shortsentence}, + \PValue{SentenceS}}{% + Sentences are referenced in short textual form.% + \IndexOption{ref~=\textKValue{sentenceshort}}% + }% + \entry{\PValue{short}}{% + A combination of \PValue{parshort} and \PValue{sentenceshort}.% + \IndexOption{ref~=\textKValue{value}}% + }% +\end{desctabular} +\end{table} + +\begin{Example} + Suppose you always want to reference paragraphs in the form ``paragraph 1 + in clause 1''. As there is no predefined command for this, you have + to create your own definition from the available options. You can achieve + this easily with:% +\begin{lstcode} + \newcommand*{\refParM}[1]{% + paragraph~\refParN[arabic]{#1} + in clause~\refClauseN{#1}% + } +\end{lstcode} + This new command can be used in the same way as + \DescRef{\LabelBase.cmd.refParL}.% +\end{Example}% + +You can find examples of results of the basic commands in +\autoref{tab:scrjura.refexamples}.% +% +\begin{table} + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside}{Example outputs of the \Option{ref}-independent + cross-reference commands}[l] + \begin{tabular}[t]{ll} + \toprule + Command & Example output \\ + \midrule + \DescRef{\LabelBase.cmd.refL}\Parameter{label} & \S{} 1 paragraph 1 sentence 1 \\ + \DescRef{\LabelBase.cmd.refS}\Parameter{label} & \S{} 1 par. 1 sent. 1 \\ + \DescRef{\LabelBase.cmd.refN}\Parameter{label} & \S{} 1 I 1. \\ + \DescRef{\LabelBase.cmd.refClause}\Parameter{label} & \S{} 1 \\ + \DescRef{\LabelBase.cmd.refClauseN}\Parameter{label} & 1 \\ + \DescRef{\LabelBase.cmd.refParL}\Parameter{label} & paragraph 1 \\ + \DescRef{\LabelBase.cmd.refParS}\Parameter{label} & par. 1 \\ + \DescRef{\LabelBase.cmd.refParN}\Parameter{label} & I \\ + \DescRef{\LabelBase.cmd.refParN}\POParameter{arabic}\Parameter{label} & 1 \\ + \DescRef{\LabelBase.cmd.refParN}\POParameter{roman}\Parameter{label} & i \\ + \DescRef{\LabelBase.cmd.refSentenceL}\Parameter{label} & sentence 1 \\ + \DescRef{\LabelBase.cmd.refSentenceS}\Parameter{label} & sent. 1 \\ + \DescRef{\LabelBase.cmd.refSentenceN}\Parameter{label} & 1. \\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:scrjura.refexamples} +\end{table} +\EndIndexGroup + + +\section{Additional Environments} +\seclabel{newenv} + +Some users do not use \Package{scrjura} to draft contracts or commentaries on +individual laws but to examine different types of laws, which may not +necessarily use the section prefix (\S) before the title of each clause but +perhaps something like ``Art.'' or ``IAS'', and so forth. An independent +counter is also required for each of these different clause types. + +\begin{Declaration} + \Macro{DeclareNewJuraEnvironment}\Parameter{name}\OParameter{options}% + \Parameter{start commands}\Parameter{end commands} +\end{Declaration} +You\ChangedAt{v0.9}{\Package{scrjura}} can use this command to define new and +independent environments for contracts or other legal texts. The argument +\PName{name} is the name of the new environment, of course. The \PName{start +commands} are commands which will be executed at the beginning of the +environment, as if they were added directly after +\Macro{begin}\Parameter{name}. Correspondingly \PName{end commands} will be +executed at the end of the environment, as if added directly before +\Macro{end}\Parameter{name}. Without any \PName{options} the new environment +behaves like the \DescRef{\LabelBase.env.contract} environment, but with its +own counters. It is possible to set \PName{options} in a comma-separated list. +See \autoref{tab:\LabelBase.DeclareNewJuraEnvironment} for the currently +supported \PName{options}. + +\begin{desclist} + \desccaption{Options provided by \Macro{DeclareNewJuraEnvironment} for new + contract environments\label{tab:\LabelBase.DeclareNewJuraEnvironment}}% + {Options of \Macro{DeclareNewJuraEnvironment} (\emph{continued})}% + \entry{\OptionVName{Clause}{command}}{% + Defines the \PName{command} to which the \DescRef{\LabelBase.cmd.Clause} + command is mapped within the environment. This \PName{command}, like the + one documented for \DescRef{\LabelBase.env.contract}, expects exactly one + argument. To use it correctly requires advanced knowledge of the + \Package{scrjura}'s internal functioning. Furthermore, the requirements + for the \PName{command} may change in future versions. Therefore it is + recommended not to use this option!% + }% + \entry{\OptionVName{ClauseFont}{commands}}{% + \leavevmode\BeginIndex{FontElement}{\PName{Name}.Clause}% + \LabelFontElement{\PName{Name}.Clause}% + If this option is used, a new + \FontElement{\PName{Name}.Clause}\IndexFontElement{\PName{Name}.Clause} + element is defined using + \DescRef{maincls-experts.cmd.newkomafont}\IndexCmd{newkomafont}, with the + \PName{commands} used as its default setting. If the element was + previously defined as an alias (see + \DescRef{maincls-experts.cmd.aliaskomafont} in + \autoref{sec:maincls-experts.fonts}, + \DescPageRef{maincls-experts.cmd.aliaskomafont}), it will become an + independent element instead. If it has already been defined as an + independent element, \DescRef{\LabelBase.cmd.setkomafont} is used to set + the \PName{commands} a new font settings. Please note the limitations for + font settings in \autoref{sec:\LabelBase.textmarkup}, + \DescPageRef{\LabelBase.cmd.setkomafont}. + \EndIndex{FontElement}{\PName{Name}.Clause}% + }% + \entry{\OptionVName{SubClause}{command}}{% + Defines the \PName{command} to which the + \DescRef{\LabelBase.cmd.SubClause} command is mapped within the + environment. This \PName{command}, like the one documented for + \DescRef{\LabelBase.env.contract}, expects exactly one argument. To use it + correctly requires advanced knowledge of the \Package{scrjura}'s internal + functioning. Furthermore, the requirements for the \PName{command} may + change in future versions. Therefore it is recommended not to use this + option!% + }% + \entry{\OptionVName{Sentence}{command}}{% + Defines the \PName{command} to which the + \DescRef{\LabelBase.cmd.Sentence} is mapped within the environment. This + \PName{command} must not have an argument. Typically it should add one to + the \Counter{sentence}\IndexCounter{sentence} (using + \Macro{refstepcounter}\IndexCmd{refstepcounter}) counter and display it + appropriately. It is particularly important to avoid adding unwanted + spaces.% + }% + \entry{\OptionVName{ClauseNumberFormat}{command}}{% + Formats the numbers of clauses within the environment. The \PName{command} + should expect exactly one argument: the number of the clause. If the + \PName{command} implements a series of commands and the number is the last + argument of a that series, you can directly use the series of commands as + \PName{command}.% + } +\end{desclist} +\begin{Example} + To define the environment for articles we mentioned in the preface of this + section, it is sufficient to write: +\begin{lstcode} + \DeclareNewJuraEnvironment{Article}[ClauseNumberFormat=Art.~]{}{} +\end{lstcode} + If we are using a \KOMAScript{} class and want to separate the paragraphs in + this environment with space instead of using paragraph indentation, we can + use: +\begin{lstcode} + \DeclareNewJuraEnvironment{Article}[ClauseNumberFormat=Art.~] + {\KOMAoptions{parskip}}{} +\end{lstcode} + In cross-references, ``Art.'' will of course be used instead of ``\S''.% + + The new environment is used like \DescRef{\LabelBase.env.contract}: +\begin{lstcode} + \begin{Article} + \Clause{} + Human dignity is inviolable. To respect and protect people is a + duty of all state authority. + \end{Article} +\end{lstcode} +\end{Example}% +\EndIndexGroup + + +\section{Support for Different Languages} +\seclabel{babel} + +The \Package{scrjura} package has been developed in cooperation with a German +lawyer. Therefore it initially supported only the languages \PValue{german}, +\PValue{ngerman}, \PValue{austrian}, and \PValue{naustrian}. Nevertheless, it +has been designed to support common language packages like +\Package{babel}\important{\Package{babel}}\IndexPackage{babel}. Users can +easily make changes by using \DescRef{scrbase.cmd.providecaptionname} (see +\autoref{sec:scrbase.languageSupport}, +\DescPageRef{scrbase.cmd.providecaptionname}). If you have definitive +information about the correct legal terms and conventions of a language, +please contact the \KOMAScript{} author. Support for English has been added in +this way, and so \Package{scrjura} now also provides terms for the languages +\PValue{english}, \PValue{american}, \PValue{british}, \PValue{canadian}, +\PValue{USenglish}, and \PValue{UKenglish}. + +\begin{Declaration} + \Macro{parname}% + \Macro{parshortname}% + \Macro{sentencename}% + \Macro{sentenceshortname} +\end{Declaration} +These are the language-dependent terms used by \Package{scrjura}. The meaning +of the terms and their English defaults are shown in +\autoref{tab:scrjura.captionnames}. The package itself defines them by using +\DescRef{scrbase.cmd.providecaptionname} inside +\Macro{begin}\PParameter{document} only if other requirements have not already +been met. If you use \Package{scrjura} with an unsupported language, the +package will throw an error.% +% +\begin{table} + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside} + [{% + Meanings and English defaults of language-dependent terms% + }]{% + Meanings and English defaults of language-dependent terms, if not + already defined% + } [l] + \begin{tabular}[t]{lll} + \toprule + Command & Meaning & Default \\ + \midrule + \Macro{parname} & long form ``paragraph'' & paragraph \\ + \Macro{parshortname} & short form ``paragraph'' & par. \\ + \Macro{sentencename} & long form ``sentence'' & sentence \\ + \Macro{sentenceshortname} & short form ``sentence'' & sent. \\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:scrjura.captionnames} +\end{table} +% +\EndIndexGroup + + +\section{A Detailed Example} +\seclabel{example} + +You may remember the letter from \autoref{cha:scrlttr2}, in which a club +member wanted to remind the board about an overdue meeting that was prescribed +by the club's by-laws. Such club by-laws are a kind of contract, and you can +create them using \Package{scrjura}. + +\lstinputcode[{xleftmargin=2em,% + linerange=1-2}]{scrjura-example-en.tex}% +We use class \Class{scrartcl}. Because paragraph distance instead of paragraph +indentation is usual in club by-laws, we load the class with option +\OptionValueRef{maincls}{parskip}{half} (see \autoref{sec:maincls.parmarkup}, +\DescPageRef{maincls.option.parskip}). + +\lstinputcode[{xleftmargin=2em,% + linerange=4-4}]{scrjura-example-en.tex}% +The club rules are in British English. Therefore we load the \Package{babel} +package with the \Option{british} option too. + +\iffree{% +\lstinputcode[{xleftmargin=2em,% + linerange={6-6,8-8}}]{scrjura-example-en.tex}% +}{% +\lstinputcode[{xleftmargin=2em,% + linerange={6-6,9-9}}]{scrjura-example-en.tex}% +}% +We make some default font settings. Earlier versions of the example also +loaded the \Package{textcomp} package here for an improved section mark +(\S). Since \LaTeX{} 2020/02/01, however, the desired functionality is directly +integrated in the \LaTeX{} kernel. + +\lstinputcode[{xleftmargin=2em,% + linerange=11-11}]{scrjura-example-en.tex}% +Later in the document, we want lists numbered not with Arabic numbers but with +lower-case letters. We can do this easily with the \Package{enumerate} +package. Alternatively, we could have used the \Package{enumitem} package. + +\lstinputcode[{moretexcs={useshorthands,defineshorthand},% + xleftmargin=2em,% + linerange=13-21}]{scrjura-example-en.tex}% +Now it is time for \Package{scrjura}. The +\OptionValueRef{\LabelBase}{clausemark}{forceboth} option forces clauses to +create left and right marks for the running head. On the other hand, we do not +want \DescRef{maincls.cmd.section} to change the marks for the running head. +Therefore we use the \PageStyle{myheadings} page style. This page style +generally does not provide automatic running heads. + +Later, we also want a table of contents with the clauses. This can be achieved +with the \DescRef{\LabelBase.option.juratotoc} option. Doing so we will see +that the default width for these numbers is insufficient for the clause +numbers in the table of contents. With +\OptionValueRef{\LabelBase}{juratocnumberwidth}{2.5em}, we reserve more space. + +The definition of shorthands has already been explained in +\autoref{sec:scrjura.shorthandexample}. In this example we do the same thing +to simplify the input. + +\lstinputcode[{xleftmargin=2em,% + linerange=23-23}]{scrjura-example-en.tex}% +It is time to begin the actual document. + +\lstinputcode[{xleftmargin=2em,% + linerange=25-29}]{scrjura-example-en.tex}% +Like other documents, the by-laws have a title. We created it with the usual +\KOMAScript{} commands (see \autoref{sec:maincls.titlepage}, starting on +\autopageref{sec:maincls.titlepage}). + +\lstinputcode[{xleftmargin=2em,% + linerange=31-31}]{scrjura-example-en.tex}% +As already mentioned, we want to create a table of contents. + +\lstinputcode[{xleftmargin=2em,% + linerange=33-37}]{scrjura-example-en.tex}% +Preambles are not unusual in club by-laws. Here we use +\DescRef{maincls.cmd.addsec} to create one because we want it to have an entry +in the table of contents. + +\lstinputcode[{xleftmargin=2em,% + linerange=39-39}]{scrjura-example-en.tex}% +Here we use a small trick. The articles of the club by-laws should be numbered +with upper-case letters instead of Arabic numbers, just as +the appendix sections of an article using \Class{scrartcl} are. + +\lstinputcode[{xleftmargin=2em,% + linerange=41-43}]{scrjura-example-en.tex}% +We begin the contract with the first article. + +\lstinputcode[{xleftmargin=2em,% + linerange=44-54}]{scrjura-example-en.tex}% +The first clause has a number and a title. We will do the same with all +following clauses. + +The first paragraph of the clause contains nothing unusual. Because it is not +the only paragraph, every paragraph will be automatically preceded by a +paragraph number. Note that the numbering the first paragraph requires at +least two \LaTeX{} runs. Since this is the case for the table of contents as +well, this does not create any additional problems. + +In the second paragraph we have two sentences. Here we can see the shorthands +\texttt{'S} and \texttt{'.} in action. The first one only generates the +sentence number. The second one generates not only the full stop but also the +sentence number. With this, both sentences are numbered. + +\lstinputcode[{xleftmargin=2em,% + linerange=55-70}]{scrjura-example-en.tex}% +The second clause: again this contains several paragraphs, some of which +include several sentences. The second paragraph also has a numbered list. In +the last paragraph, we set a label, because we want to reference it later. + +\lstinputcode[{xleftmargin=2em,% + linerange=72-78}]{scrjura-example-en.tex}% +The third clause contains something special: a cross-reference. Here we use +the long form with clause, paragraph, and sentence. If we decided later that +sentences should not be included in the reference, we could use the +\OptionValueRef{\LabelBase}{ref}{nosentence} option to set this globally. + +\lstinputcode[{xleftmargin=2em,% + linerange=80-81}]{scrjura-example-en.tex}% +Here we have a special kind of clause. In earlier versions of the club by-laws, +this was a real clause, but it was later removed. However, the +numbering of the following clauses should not be changed by removing this +one. Therefore the \DescRef{\LabelBase.cmd.Clause} statement has not been +removed but supplemented by option \Option{dummy}. With this, we also can set +a label even though the clause will not be printed. + +\lstinputcode[{xleftmargin=2em,% + linerange=82-86}]{scrjura-example-en.tex}% +Another article begins. To avoid problems with the paragraph numbering, we +interrupt the \DescRef{\LabelBase.env.contract} environment. + +\lstinputcode[{xleftmargin=2em,% + linerange=87-87}]{scrjura-example-en.tex}% +The first clause of the next article also has been deleted. + +\lstinputcode[{xleftmargin=2em,% + linerange=89-98}]{scrjura-example-en.tex}% +Here we have a real clause again. We cross-reference one of the deleted +clauses and also set a label. + +\lstinputcode[{xleftmargin=2em,% + linerange=100-104}]{scrjura-example-en.tex}% +Once more, this is a special kind of clause. This time we have not removed a +clause but added one without renumbering the following clauses. To do so, +we use \DescRef{\LabelBase.cmd.SubClause}. Therefore the clause number is the +same like the previous one but with an appended ``a''. + +\lstinputcode[{xleftmargin=2em,% + linerange=106-126}]{scrjura-example-en.tex}% +The other clauses of this article are very usual. You already know all the +features used for them. + +\lstinputcode[{xleftmargin=2em,% + linerange=128-141}]{scrjura-example-en.tex}% +There follows another article no special features. + +\lstinputcode[{xleftmargin=2em,% + linerange=143-143}]{scrjura-example-en.tex}% +Then the \LaTeX{} document ends. You can see first three pages in +\autoref{fig:scrjura.example}.% +% +\begin{figure} + \setcapindent{0pt}% + \iffree{% + {\hfill + \frame{\includegraphics[page=1,width=.482\textwidth,% + height=.49\textheight,keepaspectratio]{scrjura-example-en}}\enskip + \frame{\includegraphics[page=2,width=.482\textwidth,% + height=.49\textheight,keepaspectratio]{scrjura-example-en}}\par + \smallskip} + \begin{captionbeside}[{% + Example: First three pages of the example club by-laws of + \protect\autoref{sec:scrjura.example}% + }]{% + First three pages of the example club by-laws of + \protect\autoref{sec:scrjura.example}% + }% + [l] + \frame{\includegraphics[page=3,width=.482\textwidth,% + height=.49\textheight,keepaspectratio]{scrjura-example-en}}\enskip + \end{captionbeside} + }{% + {\hfill + \frame{\includegraphics[page=1,width=.482\textwidth]{scrjura-example-en}}% + \enskip + \frame{\includegraphics[page=2,width=.482\textwidth]{scrjura-example-en}}\par + \smallskip} + \begin{captionbeside}[{% + Example: First three pages of the example club by-laws of + \protect\autoref{sec:scrjura.example}% + }]{% + First three pages of the example club by-laws of + \protect\autoref{sec:scrjura.example}% + }% + [l] + \frame{\includegraphics[page=3,width=.482\textwidth]{scrjura-example-en}}% + \enskip + \end{captionbeside} + }% + \label{fig:scrjura.example} +\end{figure} + +\section{State of Development} +\seclabel{draft} + +Since \KOMAScript~3.24, the \Package{scrjura} package has shared the version +number of the classes and other important packages of \KOMAScript. +Nevertheless, you should note that so far, the interaction of the +\DescRef{\LabelBase.env.contract} environment with the many different settings +possible with other \LaTeX{} environments, packages, or classes has not been +tested. The main reason for this is that \Package{scrjura} is very specialised +and far beyond the author's ordinary practice. So the author mostly relies on +detailed user feedback.% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrjura-example-de.pdf b/macros/latex/contrib/koma-script/doc/scrjura-example-de.pdf new file mode 100644 index 0000000000..7fe178b6f3 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/scrjura-example-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/scrjura-example-de.tex b/macros/latex/contrib/koma-script/doc/scrjura-example-de.tex new file mode 100644 index 0000000000..89cb106474 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrjura-example-de.tex @@ -0,0 +1,145 @@ +\documentclass[fontsize=12pt,parskip=half] + {scrartcl} + +\usepackage[ngerman]{babel} + +\usepackage[T1]{fontenc} +% Hinweis: Nur einer der beiden folgenden Zeilen wird benötigt. +\usepackage{lmodern} +\usepackage{charter,helvet} + +\usepackage{enumerate} + +\usepackage[clausemark=forceboth, + juratotoc, juratocnumberwidth=2.5em] + {scrjura} +\useshorthands{'} +\defineshorthand{'S}{\Sentence\ignorespaces} +\defineshorthand{'.}{. \Sentence\ignorespaces} + +\pagestyle{myheadings} + +\begin{document} + +\subject{Satzung} +\title{VfVmai} +\subtitle{Verein für Vereinsmaierei mit ai n.e.V.} +\date{11.\,11.\,2011} +\maketitle + +\tableofcontents + +\addsec{Präambel} + +Die Vereinslandschaft in Deutschland ist vielfältig. +Doch leider mussten wir feststellen, dass es dabei oft +am ernsthaften Umgang mit der Ernsthaftigkeit krankt. + +\appendix + +\section{Allgemeines} + +\begin{contract} +\Clause{title={Name, Rechtsform, Sitz des Vereins}} + +Der Verein führt den Namen »Verein für Vereinsmaierei mit +ai n.e.V.« und ist in keinem Vereinsregister eingetragen. + +'S Der Verein ist ein nichtwirtschaftlicher, unnützer +Verein'. Er hat keinen Sitz und muss daher stehen. + +Geschäftsjahr ist vom 31.~März bis zum 1.~April. + +\Clause{title={Zweck des Vereins}} + +'S Der Verein ist zwar sinnlos, aber nicht zwecklos'. +Vielmehr soll er den ernsthaften Umgang mit der +Ernsthaftigkeit auf eine gesunde Basis stellen. + +Zu diesem Zweck kann der Verein +\begin{enumerate}[\qquad a)] +\item in der Nase bohren, +\item Nüsse knacken, +\item am Daumen lutschen. +\end{enumerate} + +Der Verein ist selbstsüchtig und steht dazu. + +Der Verein verfügt über keinerlei Mittel.\label{a:mittel} + +\Clause{title={Vereinsämter}} + +Die Vereinsämter sind Ehrenämter. + +'S Würde der Verein über Mittel verfügen +(siehe \ref{a:mittel}), so könnte er einen +hauptamtlichen Geschäftsführer bestellen'. Ohne +die notwendigen Mittel ist dies nicht möglich. + +\Clause{title={Vereinsmaier},dummy} +\label{p.maier} +\end{contract} + +\section{Mitgliedschaft} + +\begin{contract} +\Clause{title={Mitgliedsarten},dummy} + +\Clause{title={Erwerb der Mitgliedschaft}} + +Die Mitgliedschaft kann jeder zu einem angemessenen +Preis von einem der in \refClause{p.maier} +genannten Vereinsmaier erwerben.\label{a.preis} + +'S Zum Erwerb der Mitgliedschaft ist ein formloser +Antrag erforderlich'. Dieser Antrag ist in grüner +Tinte auf rosa Papier einzureichen. + +Die Mitgliedschaft kann nicht abgelehnt werden. + +\SubClause{title={Ergänzung zu vorstehendem + Paragraphen}} + +'S Mit Abschaffung von \refClause{p.maier} verliert +\ref{a.preis} seine Umsetzbarkeit'. Mitgliedschaften +können ersatzweise vererbt werden. + +\Clause{title={Ende der Mitgliedschaft}} + +'S Die Mitgliedschaft endet mit dem Leben'. Bei nicht +lebenden Mitgliedern endet die Mitgliedschaft nicht. + +\Clause{title={Mitgliederversammlung}} + +Zweimal jährlich findet eine Mitgliederversammlung statt. + +Der Abstand zwischen zwei Mitgliederversammlungen +beträgt höchstens 6~Monate, 1~Woche und 2~Tage. + +Frühestens 6~Monate nach der letzten Mitgliederversammlung +hat die Einladung zur nächsten Mitgliederversammlung zu +erfolgen. + +\SubClause{title={Ergänzung zur Mitgliederversammlung}} + +Die Mitgliederversammlung darf frühstens 2~Wochen nach +letztem Eingang der Einladung abgehalten werden. +\end{contract} + +\section{Gültigkeit} + +\begin{contract} +\Clause{title={In Kraft treten}} + +Diese Satzung tritt am 11.\,11.\,2011 um 11:11~Uhr +in Kraft. + +'S Sollten irgendwelche Bestimmungen dieser Satzung im +Widerspruch zueinander stehen, tritt die Satzung am +11.\,11.\,2011 um 11:11~Uhr und 11~Sekunden wieder +außer Kraft'. Der Verein ist in diesem Fall als +aufgelöst zu betrachten. + +\end{contract} + +\end{document} diff --git a/macros/latex/contrib/koma-script/doc/scrjura-example-en.pdf b/macros/latex/contrib/koma-script/doc/scrjura-example-en.pdf new file mode 100644 index 0000000000..69f373dbd1 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/scrjura-example-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/scrjura-example-en.tex b/macros/latex/contrib/koma-script/doc/scrjura-example-en.tex new file mode 100644 index 0000000000..fbc009ca8a --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrjura-example-en.tex @@ -0,0 +1,143 @@ +\documentclass[fontsize=12pt,parskip=half] + {scrartcl} + +\usepackage[british]{babel} + +\usepackage[T1]{fontenc} +% Note: Only one of the following two lines is needed. +\usepackage{lmodern} +\usepackage{charter,helvet} + +\usepackage{enumerate} + +\usepackage[clausemark=forceboth, + juratotoc, + juratocnumberwidth=2.5em] + {scrjura} +\useshorthands{'} +\defineshorthand{'S}{\Sentence\ignorespaces} +\defineshorthand{'.}{. \Sentence\ignorespaces} + +\pagestyle{myheadings} + +\begin{document} + +\subject{By-Laws} +\title{CfCH} +\subtitle{Club for Club Hoppers} +\date{11.\,11.\,2011} +\maketitle + +\tableofcontents + +\addsec{Preamble} + +The club landscape in England is diverse. But we have +unfortunately been forced to conclude that it often +suffers seriously when dealing with seriousness. + +\appendix + +\section{Overview} + +\begin{contract} +\Clause{title={Name, Legal Form, Headquarters}} + +The name of this club shall be the ``Club for Club +Hoppers'' and is not registered in any club register. + +'S The club is a non-economic, useless club'. It has no +headquarters because its members heads are in their +hindquarters. + +The fiscal year is from March 31st through April 1st. + +\Clause{title={Purpose of the Club}} + +'S The club is pointless but not useless'. Rather, +it should put the serious handling of seriousness on a +sound footing. + +For this purpose, the club members can +\begin{enumerate}[\qquad a)] +\item pick their noses, +\item crack nuts, +\item such their thumbs. +\end{enumerate} + +The club is selfish and stands by it. + +The club has no financial means.\label{a:mittel} + +\Clause{title={Club Officers}} + +The club officers hold honorary positions. + +'S If the club had resources (see \ref{a:mittel}), it +could afford a full-time manager'. Without the necessary +funds, this is not possible. + +\Clause{title={Club Hopper},dummy} +\label{p.maier} +\end{contract} + +\section{Membership} + +\begin{contract} +\Clause{title={Types of Members},dummy} + +\Clause{title={Becoming a Member}} + +Everyone can purchase a membership from one of the +associations listed in \refClause{p.maier}.\label{a.preis} + +'S To become a member, an informal application is +required'. This application should be submitted in green +ink on pink paper. + +Membership applications cannot be rejected. + +\SubClause{title={Amendment to the Previous Clause}} + +'S With the repeal of \refClause{p.maier}, +\ref{a.preis} has become impractical'. In its place, +memberships can be inherited. + +\Clause{title={Termination of Membership}} + +'S Membership ends with one's life'. For non-living +members, membership does not end. + +\Clause{title={General Meeting}} + +A general meeting shall take place twice per year. + +The interval between two general meetings shall be +no more than 6~months, 1~week, and 2~days. + +The invitation to the next general meeting shall be sent +no earlier than 6~months from the previous general +meeting. + +\SubClause{title={Amendment to the General Meeting}} + +The general meeting may be held at the earliest 2~weeks after +the invitation is received. +\end{contract} + +\section{Validity} + +\begin{contract} +\Clause{title={Effective Date}} + +These articles will enter into force on 11.\,11.\,2011 at +11:11~am. + +'S If any provision of these by-laws is in conflict with +any other, the by-laws will be repealed on +11.\,11.\,2011 at 11:11~am and 11~seconds'. The club is +considered to be dissolved in this case. + +\end{contract} + +\end{document} diff --git a/macros/latex/contrib/koma-script/doc/scrjura.html b/macros/latex/contrib/koma-script/doc/scrjura.html new file mode 100644 index 0000000000..90f5d48891 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrjura.html @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + Support for the Law Office with scrjura + + + +

Support for the Law Office with scrjura

+

Unterstützung für die Anwaltspraxis durch scrjura

+
+
+ Ich nehme an, Sie suchen nach dem Kapitel + „Unterstützung für die Anwaltspraxis durch scrjura in der + KOMA-Script-Anleitung. +
+
+ Markus Kohm, 2022-06-03 +

Valid XHTML 1.1

+
+ + + diff --git a/macros/latex/contrib/koma-script/doc/scrkbase.html b/macros/latex/contrib/koma-script/doc/scrkbase.html new file mode 100644 index 0000000000..6259516171 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrkbase.html @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + KOMA-Script Package scrkbase + + + +

KOMA-Script Package scrkbase

+

KOMA-Script-Paket scrkbase

+
+ There is no information about scrkbase in the + KOMA-Script user manual. +It is an internal package only. Is is used by all KOMA-Script classes and most of the other KOMA-Script packages. Neither users nor developers of third party classes or packages should load this package on their own.
+
+ Es gibt keine Informationen zu scrkbase in der + KOMA-Script Benutzeranleitung. +Es handelt sich hierbei um ein rein internes Paket. Dieses wird von allen KOMA-Script-Klassen und den meisten anderen KOMA-Script-Paketen verwendet. Weder Benutzer noch Entwickler anderer Klassen oder Pakete sollten dieses Paket selbst laden.
+
+ Markus Kohm, 2022-06-03 +

Valid XHTML 1.1

+
+ + + diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-de.tex b/macros/latex/contrib/koma-script/doc/scrlayer-de.tex new file mode 100644 index 0000000000..4b10d91728 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlayer-de.tex @@ -0,0 +1,1835 @@ +% ====================================================================== +% scrlayer-de.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrlayer of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrlayer-de.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter:scrlayer)] + +\chapter[{Definition von Ebenen und Seitenstilen mit \Package{scrlayer}}] + {Definition\ChangedAt{v3.12}{\Package{scrlayer}} von Ebenen und Seitenstilen + mit \Package{scrlayer}} +\labelbase{scrlayer} + +\BeginIndexGroup +\BeginIndex{Package}{scrlayer}% +\BeginIndex{}{Ebenen}% +Anwender von Grafikprogrammen sind mit dem Modell der Ebenen für eine Seite +bereits vertraut. \LaTeX{} selbst ist ein solches Modell jedoch eher +fremd. Dennoch gibt es bereits einige Pakete wie \Package{eso-pic} oder +\Package{textpos}, mit denen eine Art Hintergrund- oder +Vor\-der\-grund\-ebe\-ne in \LaTeX{} verfügbar gemacht wurden. Das Paket +\Package{scrlayer} ist ein weiteres Paket, das solche Hintergrund- und +Vordergrundebenen zur Verfügung stellt. Im Unterschied zu den anderen +genannten Paketen sind die Ebenen bei \Package{scrlayer} jedoch Teil des +Seitenstils. Dadurch ist eine Umschaltung zwischen der Verwendung +unterschiedlicher Ebenen einfach durch die Umschaltung des Seitenstils möglich. + +Um dies zu erreichen, stellt das Paket eine Schnittstelle für die Verwaltung +Seitenstilen bereit, die auf Ebenen basieren. Über diese können neue +Seitenstil als Stapel oder Listen von Ebenen definiert werden. Ebenen können +wahlweise am Anfang oder Ende dieser Listen eingefügt werden. Das Einfügen ist +ebenfalls vor oder nach einer anderen Ebene in einer solchen Liste +möglich. Ebenen können auch wieder aus den Listen entfernt oder Listen von +Dupletten bereinigt werden. Natürlich gibt es außerdem Schnittstellen zur +Definition und Manipulation der Ebenen selbst. + +Nichtsdestoweniger wird die direkte Verwendung der Ebenen nur erfahrenen +Anwendern empfohlen. Schnittstellen für Anfänger und durchschnittliche +Anwender werden als zusätzliche Pakete wie +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} angeboten, die +dann ihrerseits \Package{scrlayer} laden. Siehe hierzu +\autoref{cha:scrlayer-scrpage} ab \autopageref{cha:scrlayer-scrpage} in +\autoref{part:forAuthors} diese\iffree{r Anleitung}{s Buches}. + + +\LoadCommonFile{options} % \section{Frühe oder späte Optionenwahl} + + +\section{Einige grundlegende Informationen} +\seclabel{generic.information} + +Das Paket benötigt einige grundlegende Informationen über die +verwendete Klasse. Autoren von Klassen können \Package{scrlayer} helfen, indem +sie entsprechende Angaben machen. Anderenfalls versucht das Paket diese +Informationen selbst zu ermitteln. Das funktioniert beispielsweise für die +Standardklassen oder für die \KOMAScript-Klassen. Mit anderen Klassen kann es +funktionieren oder auch ganz oder teilweise fehlschlagen. +\iffalse \par\fi% Umbruchkorrektur +Dieser Abschnitt beschreibt einige der Informationen, die Autoren von Klassen +bereitstellen können.\iffalse Anwender sollten sich im Normalfall nicht darum zu +kümmern brauchen.\fi + +\begin{Declaration} + \Macro{if@chapter}\ \PName{Dann-Code}\ % + \textMacro{else}\ \PName{Sonst-Code}\ \textMacro{fi} +\end{Declaration} +Wenn \Macro{if@chapter} definiert ist und \Macro{iftrue}\IndexCmd{iftrue} +entspricht, berücksichtigt \Package{scrlayer} bei seiner Arbeit die +Kapitel-Ebene beispielsweise bei Verwendung von Option +\DescRef{\LabelBase.option.automark}. Wenn es definiert ist, aber nicht +\Macro{iftrue} entspricht, behandelt \Package{scrlayer} nur die Ebenen der +Befehle \DescRef{maincls.cmd.part}, \DescRef{maincls.cmd.section}, +\DescRef{maincls.cmd.subsection}, \Macro{sub\dots subsection}, +\DescRef{maincls.cmd.paragraph}, \DescRef{maincls.cmd.subparagraph}, +\Macro{sub\dots subparagraph}. Wenn das Makro nicht definiert ist, macht +\Package{scrlayer} die Frage, ob auch die Kapitel-Ebene zu behandeln ist, an +der Anweisung \DescRef{maincls.cmd.chapter} fest. Ist diese Anweisung +definiert und entspricht sie nicht \Macro{relax}, dann definiert +\Package{scrlayer} das Makro \Macro{if@chapter} selbst als Synonym für +\Macro{iftrue}. Anderenfalls definiert es \Macro{if@chapter} als Synonym für +\Macro{iffalse}\IndexCmd{iffalse}.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{if@mainmatter}\ \PName{Dann-Code}\ % + \textMacro{else}\ \PName{Sonst-Code}\ \textMacro{fi} +\end{Declaration} +Klassen wie \Class{book} oder \Class{scrbook} bieten +\DescRef{maincls.cmd.frontmatter}\IndexCmd{frontmatter}, +\DescRef{maincls.cmd.mainmatter}\IndexCmd{mainmatter} und +\DescRef{maincls.cmd.backmatter}\IndexCmd{backmatter}, um zwischen Vorderteil, +Hauptteil und Endteil eines Buches umschalten zu können. In der Regel +verwenden diese Klassen intern \Macro{if@mainmatter}, um entscheiden zu +können, ob gerade im Hauptteil des Dokuments gearbeitet wird oder +nicht. Klassen wie \Class{report} oder \Class{article} haben kein +\DescRef{maincls.cmd.frontmatter}, \DescRef{maincls.cmd.mainmatter} oder +\DescRef{maincls.cmd.backmatter} und deshalb auch kein +\Macro{if@mainmatter}. Stattdessen gehen sie davon aus, dass es nur einen +Hauptteil gibt. + +Für \Package{scrlayer} ist es aber einfacher, nicht ständig erneut die +Existenz und Verwendung der Umschaltanweisungen zu erkennen und damit zu +entscheiden, ob nun gerade im Hauptteil gearbeitet wird oder nicht, sondern +stattdessen auch bei Klassen wie \Class{report} oder \Class{article} mit +\Macro{if@mainmatter} zu arbeiten. Das sollte bei den genannten Klassen dann +schlicht \Macro{iftrue}\IndexCmd{iftrue} entsprechen. Wenn also +\Macro{if@mainmatter} nicht definiert ist, dann definiert \Package{scrlayer} +es als Synonym für \Macro{iftrue}. + +Einige Klassen definieren jedoch \DescRef{maincls.cmd.frontmatter}, +\DescRef{maincls.cmd.mainmatter} oder \DescRef{maincls.cmd.backmatter} und +trotzdem kein \Macro{if@mainmatter}. In diesem Fall definiert +\Package{scrlayer} \Macro{if@mainmatter} ebenfalls als Synonym für +\Macro{iftrue} und erweitert darüber hinaus die gefundenen Definitionen von +\DescRef{maincls.cmd.frontmatter}, \DescRef{maincls.cmd.mainmatter} und +\DescRef{maincls.cmd.backmatter} so, dass diese \Macro{if@mainmatter} passend +umdefinieren. Falls es jedoch weitere, vergleichbare Befehle zur Umschaltung +zwischen unterschiedlichen Dokumentteilen gibt, so kennt \Package{scrlayer} +diese nicht, testet nicht auf diese und erweitert sie daher auch nicht +passend. In diesem Fall ist \Package{scrlayer} also auf die Mitarbeit des +Klassenautors angewiesen.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DeclareSectionNumberDepth}\Parameter{Name~der~Gliederungsebene} + \Parameter{Tiefe~der~Gliederungsebene} +\end{Declaration} +Jeder Gliederungsebene ist normalerweise eine numerische Tiefe +zugeordnet. Das ist notwendig, damit \LaTeX{} die Hierarchie der +Gliederungsebenen verwalten kann. Allerdings sind die Werte +nur der jeweiligen Klasse bekannt, in der die Gliederungsbefehle definiert +sind. Diese setzt dann in den entsprechenden \LaTeX-Befehlen selbst die +zugehörigen Nummern ein. + +{\setlength{\emergencystretch}{1em}% Umbruchkorrektur +Das Paket \Package{scrlayer} benötigt ebenfalls Informationen über die +Hierarchie. Mit Hilfe von \Macro{DeclareSectionNumberDepth} kann +\Package{scrlayer} zum Namen einer Gliederungsebene die zugehörige numerische +Tiefe bekannt gemacht werden. Für die Standardklassen wäre \PName{Name der + Gliederungsebene} beispielsweise \PValue{part}, \PValue{chapter}, +\PValue{section}, \PValue{subsection}, \PValue{subsubsection}, +\PValue{paragraph}, \PValue{subparagraph} und die jeweilige +\PName{Tiefe der Gliederungsebene} -1, 0, 1, 2, 3, 4, 5.\par} + +Das Paket \Package{scrlayer} versucht, diese numerischen Werte zunächst beim +Laden des Pakets und noch einmal während \Macro{begin}\PParameter{document} +selbst zu ermitteln. Aber für den Fall, dass dies einmal nicht zu einem +korrekten Ergebnis führt, beispielsweise falls es vollkommen andere +Gliederungsbefehle gibt, kann man die Zuordnung eben mit +\Macro{DeclareSectionNumberDepth} auch explizit vornehmen.% +% +\EndIndexGroup + + +\section{Deklaration von Ebenen} +\seclabel{layers} + +Eine Ebene (engl. \emph{layer}) ist ein Denkmodell für eine Seite. Im +Gegensatz zu echtem, physischem Papier ist diese Seite vollständig +transparent. Üblicherweise werden mehrere Ebenen übereinander gestapelt und +undurchsichtiges Material auf einer Ebene überdeckt Material auf den Ebenen +darunter. Ein solcher Stapel von Ebenen wird dann auf eine reale Seite Papier +abgebildet. Das Paket \Package{scrlayer} stellt zwei solche Stapel für jede +Seite zur Verfügung: einen Hintergrundstapel und einen Vordergrundstapel. Der +Hintergrundstapel befindet sich unter oder hinter dem normalen Seiteninhalt, +während der Vordergrundstapel über oder vor dem normalen Seiteninhalt +ausgegeben wird. Der normale Seiteninhalt ist daher eine Art von Trennebene +zwischen den beiden Ebenenstapeln. + +Eine Ebene hat mehrere Eigenschaften, die als Antworten auf grundlegende +Fragen verstanden werden können: +\iffree{\begin{description}}{% + \begingroup + \RedeclareSectionCommand[beforeskip=.5\baselineskip plus .25\baselineskip + minus .1\baselineskip]{paragraph}% + \renewcommand*\item[4][]{\paragraph*{#3{#4}#1}}% +}% +\item[Gehört die Ebene zum Vordergrund oder zum Hintergrund?]% + \leavevmode\textnote{Vorder- oder Hintergrund}\hskip 0pt + Hintergrundebenen werden ausgegeben, bevor der normale Inhalt der Seite + gedruckt wird. Optisch erscheinen sie daher \emph{hinter} oder \emph{unter} + dem normalen Inhalt der Seite. Vordergrundebenen werden an den normalen + Inhalt anschließend ausgegeben. Optisch erscheinen sie daher \emph{vor}, + \emph{auf} oder \emph{über} dem normalen Inhalt der Seite. In der + Voreinstellung ist eine Ebene sowohl eine Hintergrundebene als auch eine + Vordergrundebene und wird daher zweimal ausgegeben. In der Regel ist es + deshalb sinnvoll, dies explizit einzuschränken. +\item[Wie groß ist die Ebene?]% + \leavevmode\textnote{horizontale und vertikale Größe}\hskip 0pt + Eine Ebene kann auch kleiner oder größer als das Papier sein. Damit werden + Eigenschaften für die horizontale und vertikale Ausdehnung der Ebene + benötigt. +\item[An welcher Position soll die Ebene ausgegeben werden?]% + \leavevmode\textnote{horizontale und vertikale Position}\hskip 0pt + Diese Frage stellt sich nicht nur aufgrund der von der Papiergröße + möglichweise abweichenden Ausdehnung der Ebene. Auch gleich große Ebenen + können gegeneinander verschoben sein. Ihre Beantwortung führt zu + Eigenschaften für die Festlegung der horizontalen und vertikalen Position + der Ebene. +\item[Wie werden die horizontale und die vertikale Position + gemessen?]% + \leavevmode\textnote{Ausrichtung}\hskip 0pt + \iftrue% Umbruchkorrektur + Diese Frage ergibt sich unmittelbar aus der vorherigen. Die Antwort darauf + \else% + Die Antwort auf diese Frage % + \fi% + ist die Eigenschaft der Ausrichtung. Man kann von der linken Papierkante zur + linken Kante der Ebene, zur Mitte der Ebene oder zur rechten Kante der Ebene + messen. Entsprechend kann man von der oberen Kante des Papiers zur oberen + Kante der Ebene, zur Mitte der Ebene oder zur unteren Kante der Ebene + messen. +\item[Ist die Ebene für Textausgabe oder für Grafik vorgesehen?]% + \leavevmode\textnote{Text oder Grafik}\hskip 0pt + Auch diese Frage ist eng mit der Position verknüpft. Während der Anwender + bei der Grafikausgabe davon ausgeht, dass der Ursprung in der + linken unteren Ecke der Ebene liegt, wäre dies bei der Textausgabe eher + ungünstig. Daher liegt der Ursprung für Textebenen um die Höhe einer + Standardtextzeile unterhalb der oberen, linken Ecke der Ebene. Grafikebenen + wiederum spannen von sich aus bereits eine + \Environment{picture}-Umgebung\IndexEnv{picture} auf, in der zusätzliche + Befehle zur Positionierung zur Verfügung stehen. +\item[Soll die Ebene auf linken oder rechten Seiten eines Dokuments gedruckt + werden?]% + \leavevmode\textnote{linke oder rechte Seite}\hskip 0pt + In der Voreinstellung wird eine Ebene auf allen Seiten gedruckt. Es ist zu + beachten, dass \LaTeX{} im doppelseitigen Satz Seiten mit geraden + Seitenzahlen als linke Seiten und Seiten mit ungeraden Seitenzahlen als + rechte Seiten behandelt, dass es jedoch im einseitigen Modus unabhängig von + der Nummer nur rechte Seiten gibt. \LaTeX{} bezeichnet, den Gepflogenheiten + der englischen Sprache entsprechend, linke Seiten auch als gerade Seiten + und rechte Seiten als ungerade Seiten. Dies erfolgt ungeachtet der Tatsache, + dass im einseitigen Satz ungerade Seiten dann auch gerade Nummern tragen + können. +\item[Soll die Ebene in einseitigen oder in doppelseitigen Dokumenten + verwendet werden?]% + \leavevmode\textnote{einseitig oder doppelseitig}\hskip 0pt + In der Voreinstellung ist die Ebene diesbezüglich unbeschränkt, wird also + sowohl im einseitigen als auch im doppelseitigen Modus + ausgegeben. Nichtsdestotrotz wird eine Ebene, die auf gerade Seiten + beschränkt ist, im einseitigen Modus niemals ausgegeben werden und ist daher + auch keine einseitige Ebene. +\item[Soll die Ebene auf Gleitseiten oder auf Normalseiten ausgegeben + werden?]% + \leavevmode\textnote{Gleitseiten oder Normalseiten}\hskip 0pt + \LaTeX{} erzeugt Gleitseiten für Objekte aus Umgebungen wie + \Environment{table} oder \Environment{figure}, wenn diesen erlaubt wurde, + auf eigenen Seiten ohne Teile des normalen Dokumentinhalts ausgegeben zu + werden (siehe Option \PValue{p} für \Environment{table} oder + \Environment{figure}). In gewisser Weise ist es so der gesamten Seite + erlaubt, im Dokument zu gleiten. Normalseiten in diesem Sinne sind alle + Seiten, die keine Gleitseiten sind. Normalseiten können ebenfalls + Gleitumgebungen am Anfang, im Inneren oder am Ende enthalten. Sehr große + Gleitumgebungen können auch den Eindruck einer Gleitseite erzeugen, obwohl + es sich bei ihnen in Wirklichkeit um oben auf einer Normalseite platzierte + Gleitumgebungen handelt. +\item[Welchen Inhalt hat die Ebene?] + \leavevmode\textnote{Inhalt}\hskip 0pt + Die zugehörige Eigenschaft gibt schlicht an, was gedruckt werden soll, wann + immer die Ebene ausgegeben wird. +\iffree{\end{description}}{% + \endgroup\par\bigskip\noindent\ignorespaces +}% +Damit haben wir derzeit acht Fragen an die Ebenen, aus denen sich unmittelbar +eine Reihe von Eigenschaften ergeben. Später +\iffree{in dieser Anleitung }{}% Umbruchkorrektur +werden wir weitere Eigenschaften kennenlernen, die jedoch auf diese primären +Eigenschaften abgebildet werden können. + +\begin{Declaration} + \Macro{DeclareLayer}\OParameter{Optionenliste}\Parameter{Name der Ebene} + \Macro{DeclareNewLayer}\OParameter{Optionenliste}\Parameter{Name der Ebene} + \Macro{ProvideLayer}\OParameter{Optionenliste}\Parameter{Name der Ebene} + \Macro{RedeclareLayer}\OParameter{Optionenliste}\Parameter{Name der Ebene} + \Macro{ModifyLayer}\OParameter{Optionenliste}\Parameter{Name der Ebene} +\end{Declaration} +Diese Anweisungen können verwendet werden, um Ebenen zu definieren oder zu +verändern. Der \PName{Name der Ebene} muss voll expandierbar sein. Die +Expansion sollte in ASCII-Buchstaben resultieren. Einige zusätzliche Zeichen +werden ebenfalls akzeptiert, ihre Verwendung wird jedoch nur erfahrenen +Anwendern empfohlen. + +Bei Verwendung von \Macro{DeclareLayer}\important{\Macro{DeclareLayer}} spielt +es keine Rolle, ob eine Ebene \PName{Name der Ebene} bereits existiert oder +nicht. Sie wird in jedem Fall mit den über die \PName{Optionenliste} +angegebenen Eigenschaften definiert. Einzelne Optionen bestehen entweder nur +aus einem Schlüssel oder aus einem Schlüssel, gefolgt von einem +Gleichheitszeichen und einem Wert. Die Optionen sind durch Komma voneinander +getrennt. Um innerhalb der Werte einer Option ein Komma oder ein Leerzeichen +verwenden zu können, muss der entsprechende Wert in geschweifte Klammern +gesetzt werden. Eine Übersicht über die Optionen und die Eigenschaften, die +sie repräsentieren, findet sich in \autoref{tab:scrlayer.layerkeys}. +% +% Umbruchkorrektur: Tabelle verschoben +\begin{desclist} + \desccaption{% + Optionen für die Beschreibung von Seiten-Ebenen mit ihrer jeweiligen + Bedeutung als Ebenen-Eigenschaft\label{tab:scrlayer.layerkeys}% + }{% + Optionen für die Beschreibung von Ebenen (\emph{Fortsetzung})% + }% + \entry{% + \ChangedAt{v3.16}{\Package{scrlayer}}% + \OptionVName{addcontents}{Code}}{% + Der angegebene Wert wird an den aktuellen Wert des Attributs + \Option{contents} angehängt. Es wird also ein zusätzlicher Inhalt + generiert. Zu näheren Informationen über die Behandlung von \PName{Code} + siehe Option \Option{contents}.% + }% + \entry{% + \ChangedAt{v3.16}{\Package{scrlayer}}% + \OptionVName{addheight}{zusätzliche Höhe}}{% + Der aktuelle Wert von Attribut \Option{height} wird um den Wert dieser + Option erhöht. Als Wert sind die gleichen Angaben wie bei + \Option{height} möglich.% + }% + \entry{% + \ChangedAt{v3.16}{\Package{scrlayer}}% + \OptionVName{addhoffset}{zusätzlicher horizontaler Abstand}}{% + Der aktuelle Wert von Attribut \Option{hoffset} wird um den Wert dieser + Option erhöht. Als Wert sind die gleichen Angaben wie bei + \Option{hoffset} möglich.% + }% + \entry{% + \ChangedAt{v3.16}{\Package{scrlayer}}% + \OptionVName{addvoffset}{zusätzlicher vertikaler Abstand}}{% + Der aktuelle Wert von Attribut \Option{voffset} wird um den Wert dieser + Option erhöht. Als Wert sind die gleichen Angaben wie bei + \Option{voffset} möglich.% + }% + \entry{% + \ChangedAt{v3.16}{\Package{scrlayer}}% + \OptionVName{addwidth}{zusätzliche Breite}}{% + Der aktuelle Wert von Attribut \Option{width} wird um den Wert dieser + Option erhöht. Als Wert sind die gleichen Angaben wie bei + \Option{width} möglich.% + }% + \nentry{\OptionVName{align}{Ausrichtungszeichen}}{% + Über die \PName{Ausrichtungszeichen} wird die gewünschte Ausrichtung der + Ebene bestimmt. Dabei steht jedes einzelne \PName{Ausrichtungszeichen} für + eine mögliche Anwendung der Werte \PName{Abstand} der Optionen + \Option{hoffset} oder \Option{voffset}. Mehrere + \PName{Ausrichtungszeichen} können ohne Leerzeichen oder Komma direkt + hintereinander geschrieben werden und werden in der Reihenfolge ihres + Auf"|tretens ausgewertet. Makros sind im Wert der Option jedoch + nicht zulässig. Zulässige \PName{Ausrichtungszeichen} sind: + \begin{description} + \item[\PValue{b} --] der Wert der Option \Option{voffset} ist der Abstand + der Unterkante der Ebene von der Oberkante des Papiers. + \item[\PValue{c} --] die Werte der Optionen \Option{hoffset} und + \Option{voffset} sind die Abstände des Zentrums der Ebene von der linken + und der oberen Kante des Papiers. + \item[\PValue{l} --] der Wert der Option \Option{hoffset} ist der Abstand + der linken Kante der Ebene von der linken Kante des Papiers. + \item[\PValue{r} --] der Wert der Option \Option{hoffset} ist der Abstand + der rechten Kante der Ebene von der linken Kante des Papiers. + \item[\PValue{t} --] der Wert der Option \Option{voffset} ist der Abstand + der Oberkante der Ebene von der Oberkante des Papiers. + \end{description} + }% + \entry{\KOption{area}\Parameter{horizontaler Abstand}\Parameter{vertikaler + Abstand}\Parameter{Breite}\Parameter{Höhe}}{% + Die zusammengesetzte Eigenschaft resultiert in den primären Eigenschaften + \OptionVName{hoffset}{horizontaler Abstand}, + \OptionVName{voffset}{vertikaler Abstand}, + \OptionVName{width}{Breite}, \KOption{height}{Höhe}.% + }% + \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% + \Option{backandforeground}}{% + Mit dieser Option wird die Einschränkung der Ebene auf den Vorder- oder + Hintergrund wieder aufgehoben und diesbezüglich die Grundeinstellung + wiederhergestellt. In der Regel ist dies wenig sinnvoll, daher existiert + die Option nur aus Gründen der Vollständigkeit. Diese Option erwartet und + erlaubt keinen Wert.% + }% + \entry{\Option{background}}{% + Mit dieser Option wird die Ebene zu einer reinen Hintergrundebene. Sie + wird also im Gegensatz zur Grundeinstellung nicht mehr gleichzeitig im + Hintergrund und im Vordergrund, sondern nur noch im Hintergrund + ausgegeben. Diese Option erwartet und erlaubt keinen Wert.% + }% + \entry{\Option{bottommargin}}{% + Die zusammengesetzte Eigenschaft setzt die primären Eigenschaften + \Option{hoffset}, \Option{voffset}, \Option{width}, \Option{height} und + \Option{align} so, dass die Ebene horizontal von der linken Kante bis zur + rechten Kante des Papiers reicht und vertikal den gesamten Bereich unter + dem Seitenfuß bis zur unteren Papierkante abdeckt. Diese Option erwartet + und erlaubt keinen Wert.% + }% + \entry{\OptionVName{clone}{Name einer Ebene}}{% + Die zusammengesetzte Eigenschaft setzt alle primären Eigenschaften + entsprechend der aktuellen, primären Eigenschaften der Ebene mit dem + angegebenen \PName{Name einer Ebene}. Bezüglich \PName{Name + einer Ebene} siehe die Hinweise zu \PName{Name der Ebene} am Anfang der + Erklärung zu \Macro{DeclareLayer}. Darüber hinaus muss die zu klonende + Ebene bereits definiert sein.% + }% + \entry{\OptionVName{contents}{Code}}{% + Der angegebene \PName{Code} wird immer dann expandiert und ausgeführt, + wenn die Ebene ausgegeben wird. Damit definiert \PName{Code} das, was auf + der Ebene zu sehen ist. Es werden keine Tests durchgeführt, ob + \PName{Code} gültig und korrekt ist. Fehler in \PName{Code} können daher + zu verschiedenen Fehlermeldungen auf jeder Seite führen, auf der die Ebene + ausgegeben wird.% + }% + \entry{\Option{evenpage}}{% + Mit dieser Option wird die Ebene zu einer Ebene für linke Seiten. Sie wird + also im Gegensatz zur Grundeinstellung nicht mehr sowohl auf linken als + auch auf rechten Seiten ausgegeben. Da es linke Seiten nur im + doppelseitigen Satz gibt, schließt diese Eigenschaft quasi + \Option{twoside} mit ein. Diese Option erwartet und erlaubt keinen Wert.% + }% + \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% + \Option{everypage}}{% + Dies ist eine Kombination von \Option{oddorevenpage} und + \Option{floatornonfloatpage}. Diese Option erwartet und erlaubt keinen + Wert.% + }% + \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% + \Option{everyside}}{% + Mit dieser Option wird die Einschränkung der Ebene auf den einseitigen + oder den doppelseitigen Satz aufgehoben. Sie wird damit wie in der + Voreinstellung wieder sowohl im einseitigen als auch im doppelseitigen + Satz ausgegeben. Diese Option erwartet und erlaubt keinen Wert.% + }% + \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% + \Option{floatornonfloatpage}}{% + Mit dieser Option wird die Einschränkung der Ebene auf Gleitseiten oder + Seiten, die keine Gleitseiten sind, aufgehoben und diesbezüglich die + Voreinstellung wiederhergestellt. Diese Option erwartet und erlaubt + keinen Wert.% + }% + \entry{\Option{floatpage}}{% + Mit dieser Option wird die Ebene zu einer Gleitseitenebene. Sie wird also + im Gegensatz zur Grundeinstellung nicht mehr auf allen Seiten, sondern nur + noch auf Gleitseiten ausgegeben. Näheres zu Gleitseiten ist der Einleitung + zu diesem Abschnitt zu entnehmen. Diese Option erwartet und erlaubt keinen + Wert.% + }% + \entry{\Option{foot}}{% + Die zusammengesetzte Eigenschaft setzt die primären Eigenschaften + \Option{hoffset}, \Option{voffset}, \Option{width}, \Option{height} und + \Option{align} so, dass die Ebene den Seitenfuß in der Breite des + Textbereichs überdeckt. Diese Option erwartet und erlaubt keinen Wert.% + }% + \entry{\Option{footskip}}{% + Die zusammengesetzte Eigenschaft setzt die primären Eigenschaften + \Option{hoffset}, \Option{voffset}, \Option{width}, \Option{height} und + \Option{align} so, dass die Ebene vertikal den Bereich zwischen dem + Textbereich und dem Seitenfuß in Breite des Textbereichs überdeckt. Es ist + zu beachten, dass die Höhe dieses Bereichs zwar von der Länge + \Length{footskip} abhängt, dieser jedoch nicht entspricht. Diese Option + erwartet und erlaubt keinen Wert.% + }% + \entry{\Option{foreground}}{% + Mit dieser Option wird die Ebene zu einer reinen Vordergrundebene. Sie + wird also im Gegensatz zur Grundeinstellung nicht mehr gleichzeitig im + Hintergrund und im Vordergrund, sondern nur noch im Vordergrund + ausgegeben. Diese Option erwartet und erlaubt keinen Wert.% + }% + \entry{\Option{head}}{% + Die zusammengesetzte Eigenschaft setzt die primären Eigenschaften + \Option{hoffset}, \Option{voffset}, \Option{width}, \Option{height} und + \Option{align} so, dass die Ebene den Seitenkopf in der Breite des + Textbereichs überdeckt. Diese Option erwartet und erlaubt keinen Wert.% + }% + \entry{\Option{headsep}}{% + Die zusammengesetzte Eigenschaft setzt die primären Eigenschaften + \Option{hoffset}, \Option{voffset}, \Option{width}, \Option{height} und + \Option{align} so, dass die Ebene den Abstand zwischen dem Seitenkopf und + dem Textbereich in der Breite des Textbereichs überdeckt. Ihre Höhe + entspricht damit der Länge \Length{headsep}. Diese Option erwartet und + erlaubt keinen Wert.% + }% + \entry{\OptionVName{height}{Höhe}}{% + Setzt die \PName{Höhe} der Ebene. Beachten Sie, dass \PName{Höhe} + wahlweise eine \LaTeX-Länge sein kann, die mit \Macro{newlength} definiert + wurde, eine \TeX-Länge, die mit \Macro{newdimen} oder \Macro{newskip} + definiert wurde, ein Längenwert wie 10\Unit{pt} oder ein Längenausdruck + unter Verwendung von +, -, /, *, (, und ). Die genaue Syntax eines + Längenausdrucks ist \cite[Abschnitt~3.5]{manual:eTeX} zu entnehmen.% + }% + \entry{\OptionVName{hoffset}{Abstand}}{% + Setzt den \PName{Abstand} der Ebene von der linken Kante des Papiers. Wie + der \PName{Abstand} gemessen wird, hängt von Eigenschaft \Option{align} + ab. Beachten Sie, dass \PName{Abstand} wahlweise eine \LaTeX-Länge sein + kann, die mit \Macro{newlength} definiert wurde, eine \TeX-Länge, die mit + \Macro{newdimen} oder \Macro{newskip} definiert wurde, ein Längenwert wie + 10\Unit{pt} oder ein Längenausdruck unter Verwendung von +, -, /, *, (, + und ). Die genaue Syntax eines Längenausdrucks ist + \cite[Abschnitt~3.5]{manual:eTeX} zu entnehmen.% + }% + \entry{\Option{innermargin}}{% + Die zusammengesetzte Eigenschaft setzt die primären Eigenschaften + \Option{hoffset}, \Option{voffset}, \Option{width}, \Option{height} und + \Option{align} so, dass die Ebene den inneren Rand der Seite von der + Papieroberkante bis zur Papierunterkante überdeckt. Der innere Rand + entspricht im einseitigen Satz dem linken Rand. Diese Option erwartet und + erlaubt keinen Wert.% + }% + \entry{\Option{leftmargin}}{% + Die zusammengesetzte Eigenschaft setzt die primären Eigenschaften + \Option{hoffset}, \Option{voffset}, \Option{width}, \Option{height} und + \Option{align} so, dass die Ebene den linken Rand der Seite von der + Papieroberkante bis zur Papierunterkante überdeckt. Diese Option erwartet + und erlaubt keinen Wert.% + }% + \entry{\ChangedAt{v3.19}{\Package{scrlayer}}% + \OptionVName{mode}{Modus}}{% + Diese primäre Eigenschaft bestimmt, in welchem \PName{Modus} der Inhalt der + Ebene ausgegeben wird. Die Voreinstellung ist \PValue{text}. Dabei wird + die oberste Grundlinie um die Höhe einer Standardtextzeile unterhalb der + Oberkante der Ebene platziert. Damit ist Text normalerweise sauber am + oberen Rand der Ebene ausgerichtet. Im \PValue{picture}-\PName{Modus} wird + hingegen eine \Environment{picture}-Umgebung mit dem Ursprung in der + linken, unteren Ecke der Ebene aufgespannt. Der ebenfalls vordefinierte + \PName{Modus} \PValue{raw} entspricht in der Voreinstellung \PValue{text}. + + Die %\textnote{Achtung!} + Änderung des \PName{Modus} einer Ebene führt in der Regel zu einer + Verschiebung des Inhalts. Außerdem stehen beispielsweise im \PName{Modus} + \PValue{picture} zusätzliche Platzierungsbefehle zur Verfügung, die in + einem anderen \PName{Modus} zu Fehlermeldungen führen. Daher ist es + normalerweise nicht sinnvoll, den \PName{Modus} einer Ebene nachträglich + zu ändern!% + }% + \entry{\Option{nonfloatpage}}{% + Mit dieser Option wird die Ebene auf Seiten beschränkt, die keine + Gleitseiten sind. Sie wird also im Gegensatz zur Grundeinstellung nicht + mehr auf allen Seiten, sondern nur noch auf Nichtgleitseiten + ausgegeben. Näheres zu Gleitseiten und Nichtgleitseiten ist der Einleitung + zu diesem Abschnitt zu entnehmen. Diese Option erwartet und erlaubt keinen + Wert.% + }% + \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% + \Option{oddorevenpage}}{% + Mit dieser Option werden Beschränkungen der Ebene auf rechte oder linke + Seiten aufgehoben. Damit wird die Ebene wie in der Voreinstellung sowohl + auf linken als auch rechten Seiten ausgegeben. Diese Option erwartet und + erlaubt keinen Wert.% + }% + \entry{\Option{oddpage}}{% + Mit dieser Option wird die Ebene zu einer Ebene für rechte Seiten. Sie + wird also im Gegensatz zur Grundeinstellung nicht mehr sowohl auf linken + als auch auf rechten Seiten ausgegeben. Es ist zu beachten, dass im + einseitigen Satz alle Seiten unabhängig von der Seitenzahl rechte Seiten + sind. Diese Option erwartet und erlaubt keinen Wert.% + }% + \entry{\Option{oneside}}{% + Mit dieser Option wird die Ebene zu einer Ebene für den einseitigen + Satz. Sie wird also im Gegensatz zur Grundeinstellung nicht mehr sowohl im + einseitigen als auch im doppelseitigen Satz ausgegeben. Diese Option + erwartet und erlaubt keinen Wert.% + }% + \entry{\Option{outermargin}}{% + Die zusammengesetzte Eigenschaft setzt die primären Eigenschaften + \Option{hoffset}, \Option{voffset}, \Option{width}, \Option{height} und + \Option{align} so, dass die Ebene den äußeren Rand der Seite von der + Papieroberkante bis zur Papierunterkante überdeckt. Der äußere Rand + entspricht im einseitigen Satz dem rechten Rand. Diese Option erwartet und + erlaubt keinen Wert.% + }% + \entry{\Option{page}}{% + Die zusammengesetzte Eigenschaft setzt die primären Eigenschaften + \Option{hoffset}, \Option{voffset}, \Option{width}, \Option{height} und + \Option{align} so, dass die Ebene die komplette Seite überdeckt. Diese + Option erwartet und erlaubt keinen Wert.% + }% + \entry{\ChangedAt{v3.16}{\Package{scrlayer}}% + \OptionVName{pretocontents}{Code}}{% + Der angegebene Wert wird dem aktuellen Wert des Attributs + \Option{contents} vorangestellt. Es wird also ein zusätzlicher Inhalt vor + dem bisherigen Inhalt generiert. Zu näheren Informationen über die + Behandlung von \PName{Code} siehe Option \Option{contents}.% + }% + \entry{\Option{rightmargin}}{% + Die zusammengesetzte Eigenschaft setzt die primären Eigenschaften + \Option{hoffset}, \Option{voffset}, \Option{width}, \Option{height} und + \Option{align} so, dass die Ebene den rechten Rand der Seite von der + Papieroberkante bis zur Papierunterkante überdeckt. Diese Option erwartet + und erlaubt keinen Wert.% + }% + \entry{\Option{textarea}}{% + Die zusammengesetzte Eigenschaft setzt die primären Eigenschaften + \Option{hoffset}, \Option{voffset}, \Option{width}, \Option{height} und + \Option{align} so, dass die Ebene den kompletten Textbereich + überdeckt. Diese Option erwartet und erlaubt keinen Wert.% + }% + \entry{\Option{topmargin}}{% + Die zusammengesetzte Eigenschaft setzt die primären Eigenschaften + \Option{hoffset}, \Option{voffset}, \Option{width}, \Option{height} und + \Option{align} so, dass die Ebene den oberen Rand der Seite von der linken + Kante des Papiers bis zu dessen rechter Kante überdeckt. Diese Option + erwartet und erlaubt keinen Wert.% + }% + \entry{\Option{twoside}}{% + Mit dieser Option wird die Ebene zu einer Ebene für den doppelseitigen + Satz. Sie wird also im Gegensatz zur Grundeinstellung nicht mehr sowohl im + einseitigen als auch im doppelseitigen Satz ausgegeben. Diese Option + erwartet und erlaubt keinen Wert.% + }% + \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% + \Option{unrestricted}}{% + Hebt alle Ausgabebeschränkungen auf. Damit ist die Option eine Kombination + von \Option{backandforeground}, \Option{everyside} und + \Option{floatornonfloatpage}. Diese Option erwartet und erlaubt keinen + Wert.% + }% + \entry{\OptionVName{voffset}{Abstand}}{% + Setzt den \PName{Abstand} der Ebene von der Papieroberkante. Wie der + \PName{Abstand} gemessen wird, hängt von Eigenschaft \Option{align} + ab. Beachten Sie, dass \PName{Abstand} wahlweise eine \LaTeX-Länge sein + kann, die mit \Macro{newlength} definiert wurde, eine \TeX-Länge, die mit + \Macro{newdimen} oder \Macro{newskip} definiert wurde, ein Längenwert wie + 10\Unit{pt} oder ein Längenausdruck unter Verwendung von +, -, /, *, (, + und ). Die genaue Syntax eines Längenausdrucks ist + \cite[Abschnitt~3.5]{manual:eTeX} zu entnehmen.% + }% + \entry{\OptionVName{width}{Breite}}{% + Setzt die \PName{Breite} der Ebene. Beachten Sie, dass \PName{Breite} + wahlweise eine \LaTeX-Länge sein kann, die mit \Macro{newlength} definiert + wurde, eine \TeX-Länge, die mit \Macro{newdimen} oder \Macro{newskip} + definiert wurde, ein Längenwert wie 10\Unit{pt} oder ein Längenausdruck + unter Verwendung von +, -, /, *, (, und ). Die genaue Syntax eines + Längenausdrucks ist \cite[Abschnitt~3.5]{manual:eTeX} zu entnehmen.% + }% +\end{desclist} + +\iffree{}{\clearpage}% Umbruchkorrektur +Im Unterschied zu \Macro{DeclareLayer} meldet +\Macro{DeclareNewLayer}\important{\Macro{DeclareNewLayer}} einen Fehler, falls +eine Ebene mit dem angegebenen Namen bereits existiert. Damit wird der +Anwender davor bewahrt, versehentlich mehrmals denselben Namen zu +verwenden. Dies ist insbesondere auch dann nützlich, wenn Klassen oder Pakete +intern ebenfalls Ebenen definieren. + +Dagegen definiert \Macro{ProvideLayer}\important{\Macro{ProvideLayer}} die +Ebene nur, wenn nicht bereits eine Ebene mit dem angegebenen Namen +existiert. Wird der Name hingegen bereits für eine andere Ebene verwendet, so +wird die neuerliche Definition ignoriert. Die Anweisung hat also die +Bedeutung: \emph{Definiere die Ebene, falls sie noch nicht existiert.} + +Soll eine bereits existierende Ebene umdefiniert werden, so kann wahlweise +\Macro{RedeclareLayer} oder \Macro{ModifyLayer} verwendet werden. Während mit +\Macro{RedeclareLayer}\important{\Macro{RedeclareLayer}} die Ebene zunächst +auf die Grundeinstellungen zurückgesetzt und damit über die angegebene +\PName{Optionenliste} komplett neu definiert wird, unterbleibt bei +\Macro{ModifyLayer}\important{\Macro{ModifyLayer}} das Zurücksetzen. Es werden +dann nur die Eigenschaften geändert, für die in der \PName{Optionenliste} auch +Angaben vorhanden sind. Die Anwendung auf eine zuvor noch nicht definierte +Ebene stellt bei beiden Anweisungen einen Fehler dar.% +\EndIndexGroup + +\begin{Declaration} + \Macro{ModifyLayers}\OParameter{Optionenliste}\Parameter{Ebenenliste} +\end{Declaration} +Diese\ChangedAt{v3.26}{\Package{scrlayer}} Anweisung führt +\DescRef{\LabelBase.cmd.ModifyLayer}\Parameter{Optionenliste}\Parameter{Ebene} +für jede \PName{Ebene} aus, die in der durch Komma separierten +\PName{Ebenenliste} angegeben ist. Sie dient also dazu, die Eigenschaften +einer ganzen Reihe von Ebenen gleichzeitig auf gleiche Weise zu ändern.% +\EndIndexGroup + +\begin{Declaration} + \Macro{layerhalign} + \Macro{layervalign} + \Macro{layerxoffset} + \Macro{layeryoffset} + \Macro{layerwidth} + \Macro{layerheight} +\end{Declaration} +Diese Anweisungen sind nur im mit \Option{contents}, \Option{addcontents} oder +\Option{pretocontents} angegebenen \PName{Code} gültig. Sie enthalten die +tatsächlich verwendete Ausrichtung, Position und Ausdehnung der Ebene während +deren Ausgabe. Dies ist jedoch nicht zwangsläufig auch die tatsächliche +Ausdehnung des Inhalts, falls dieser beispielsweise überbreit oder überhoch +ist oder die Ebene nicht komplett ausfüllt. + +Die primäre Ebeneneigenschaft \PValue{align} wird auf +\Macro{layerhalign}\ChangedAt{v3.19}{\Package{scrlayer}} und +\Macro{layervalign} abgebildet. Dabei werden die horizontalen Werte \PValue{l} +und \PValue{r} nur in \Macro{layerhalign} übernommen, während die vertikalen +Werte \PValue{t} und \PValue{b} nur in \Macro{layervalign} übernommen +werden. \iffree{Der sowohl horizontale als auch vertikale }{}% Umbruchkorrektur +Wert \PValue{c} wird in +beide Anweisungen übernommen. Sind bei \PValue{align} mehrere, +widersprüchliche Angaben zu finden, so gewinnt die jeweils letzte. Damit ist +also \Macro{layerhalign} immer entweder \PValue{l}, \PValue{c} oder \PValue{r} +und \Macro{layervalign} immer entweder \PValue{t}, \PValue{c} oder \PValue{b}. + +Eine\textnote{Achtung!} Umdefinierung der Anweisungen und damit Änderung der in +ihnen gespeicherten Werte ist nicht gestattet und führt zu unvorhersehbaren +Ergebnissen.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{LenToUnit}\Parameter{Länge} +\end{Declaration} +Diese\ChangedAt{v3.19}{\Package{scrlayer}} Anweisung stammt ursprünglich von +\Package{eso-pic}\IndexPackage{eso-pic}\iffree{ ab + Version~2.0f}{}%Umbruchkorrektur +. Sie rechnet Längen-Werte in Vielfache von \Length{unitlength} um und kann +daher anstelle von Koordinaten oder anderen von \Length{unitlength} abhängigen +Werten einer \Environment{picture}-Umgebung verwendet werden. Siehe dazu auch +\cite{package:eso-pic} und die nachfolgende Erklärung zu +\DescRef{\LabelBase.cmd.putUL} bis \DescRef{\LabelBase.cmd.putC}. Die +Anweisung wird nur definiert, wenn sie nicht bereits, beispielsweise durch das +Laden von \Package{eso-pic}, definiert ist.% +\iffalse% Umbruchkorrekturtext +\par +Es sei an dieser Stelle darauf hingewiesen, dass man bei Verwendung von Paket +\Package{picture}\IndexPackage{picture}\textnote{\Package{picture}} (siehe +\cite{package:picture}) die Anweisung \Macro{LenToUnit} in der Regel nicht +mehr benötigt. Das Paket erweitert die \Environment{picture}-Umgebung und +deren Anweisung so, dass man für Koordinaten auch direkt \LaTeX-Längen +verwenden kann.% +\fi +\EndIndexGroup + + +\begin{Declaration} + \Macro{putUL}\Parameter{Inhalt} + \Macro{putUR}\Parameter{Inhalt} + \Macro{putLL}\Parameter{Inhalt} + \Macro{putLR}\Parameter{Inhalt} + \Macro{putC}\Parameter{Inhalt} +\end{Declaration} +Diese\ChangedAt{v3.19}{\Package{scrlayer}} Anweisungen können innerhalb der +primären Ebeneneigenschaft \PValue{contents} verwendet werden, wenn die Ebene +mit \OptionValue{mode}{picture} erstellt wurde. In diesem Fall platziert +\Macro{putUL} den \PName{Inhalt} relativ zur oberen, linken Ecke der Ebene und +entspricht damit +\lstinline[breaklines=false]|\put(0,\LenToUnit{\layerheight})|. \Macro{putUR} +platziert \PName{Inhalt} relativ zur oberen, rechten Ecke der Ebene und +entspricht damit +\lstinline[breaklines=false] +|\put(\LenToUnit{\layerwidth},\LenToUnit{\layerheight})|. +\iffree{}{\unskip\linebreak}% Umbruchkorrektur +\Macro{putLL} platziert \PName{Inhalt} relativ zur unteren, linken Ecke der +Ebene und entspricht damit +\lstinline[breaklines=false]|\put(0,0)|. \Macro{putLR} platziert +\PName{Inhalt} relativ zur unteren, rechten Ecke der Ebene und entspricht +damit +\lstinline[breaklines=false]|\put(\LenToUnit{\layerwidth},0)|. \Macro{putC} +schlussendlich platziert \PName{Inhalt} relativ zur Mitte der Ebene.% +% +\begin{Example} + Sie wollen feststellen, wie genau die Höhe des Textbereichs bei + \OptionValueRef{typearea}{DIV}{classic} tatsächlich der Breite der Seite + entspricht, und erstellen dazu eine Ebene, die sowohl den Textbereich + umrandet als auch einen Kreis mit der Papierbreite als Durchmesser im + Zentrum des Textbereichs platziert: +\begin{lstcode} +\documentclass[DIV=classic]{scrartcl} +\usepackage{pict2e} +\usepackage{scrlayer} +\DeclareNewLayer[% + textarea,background,mode=picture, + contents={% + \putLL{\line(1,0){\LenToUnit{\layerwidth}}}% + \putLR{\line(0,1){\LenToUnit{\layerheight}}}% + \putUR{\line(-1,0){\LenToUnit{\layerwidth}}}% + \putUL{\line(0,-1){\LenToUnit{\layerheight}}}% + \putC{\circle{\LenToUnit{\paperwidth}}}% + } +]{showtextarea} +\DeclareNewPageStyleByLayers{test}{showtextarea} +\pagestyle{test} +\begin{document} +\null +\end{document} +\end{lstcode} + Wie Sie sehen werden, passt die von \Package{typearea} vorgenommene + Abbildung auf einen ganzzahligen \PName{DIV}-Wert im Beispiel sehr gut. +\end{Example} +Näheres zu dem im Beispiel skizzierten spätmittelalterlichen Buchseitenkanon +finden Sie übrigens in \autoref{sec:typearea.circleConstruction}, +\autopageref{sec:typearea.circleConstruction}. + +Die Anweisung +\Macro{DeclareNewPageStyleByLayers}\IndexCmd{DeclareNewPageStyleByLayers}, die +im Beispiel bereits verwendet wurde, dient der Definition eines Seitenstils, +der die neu definiert Ebene ausgibt. Sie wird in +\autoref{sec:scrlayer.pagestyles}, +\DescPageRef{scrlayer.cmd.DeclareNewPageStyleByLayers} erklärt werden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{GetLayerContents}\Parameter{Name~der~Ebene} +\end{Declaration} +Mit\ChangedAt{v3.16}{\Package{scrlayer}} dieser Anweisung kann der aktuelle +Inhalt einer Ebene ermittelt werden. Es\textnote{Achtung!} ist unbedingt zu +beachten, dass bei Verwendung dieser Anweisung im \PName{Code} der +Ebenen-Attribute \Option{contents}, \Option{addcontents} oder +\Option{pretocontents} unendliche Rekursionen entstehen können, wenn dabei auf +den Inhalt der aktuellen Ebene zugegriffen wird. Der Anwender ist selbst dafür +verantwortlich, solche Situationen zu vermeiden!% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfLayerExists}\Parameter{Name~der~Ebene} + \Parameter{Dann-Code}\Parameter{Sonst-Code} +\end{Declaration} +Diese Anweisung kann dazu verwendet werden, Code in Abhängigkeit davon, ob +eine Ebene existiert oder nicht, auszuführen. Wenn die Ebene \PName{Name der + Ebene} existiert, so wird der \PName{Dann-Code} ausgeführt, anderenfalls der +\PName{Sonst-Code}. Bitte beachten Sie, dass die Anweisung nicht wirklich +testen kann, ob eine Ebene existiert. Sie verwendet stattdessen Heuristiken, +die niemals falsch-negativ sein können, jedoch im Extremfall falsch-positiv +sein könnten. % +\iffalse% Umbruchvarianten +Nichtsdestotrotz: Falls der Test falsch-positiv ist, läuft etwas +schief. Beispielsweise könnte dies ein Indikator für die Verwendung eines +inkompatiblen Pakets oder dafür sein, dass der Anwender etwas tut, was er +besser nicht tun sollte.% +\else +Falsch-positive Entscheidungen weisen auf ein Problem, beispielsweise die +Verwendung eines inkompatiblen Pakets oder ungünstige Wahl von internen +Makronamen durch den Anwender.% +\fi +\EndIndexGroup + + +\begin{Declaration} + \Macro{DestroyLayer}\Parameter{Name~der~Ebene} +\end{Declaration} +Existiert eine Ebene \PName{Name der Ebene}, so werden alle zu dieser Ebene +gehörenden Makros zu \Macro{relax}. Die Ebene kann nicht länger verwendet +werden. In bereits mit \Package{scrlayer} definierten Seitenstils werden +derart zerstörte Ebenen ignoriert. Zerstörte Ebenen können mit +\DescRef{\LabelBase.cmd.DeclareNewLayer} oder +\DescRef{\LabelBase.cmd.ProvideLayer} neu definiert werden. Sie können jedoch +vor einer neuerlichen Definition nicht länger mit +\DescRef{\LabelBase.cmd.RedeclareLayer} oder +\DescRef{\LabelBase.cmd.ModifyLayer} verändert werden.% +\iffalse % Siehe Hinweis zur Interface-Schnittstelle +\par +Die Anweisung ist dazu bestimmt, innerhalb des Arguments \PName{Code} von +\DescRef{\LabelBase.cmd.scrlayerOnAutoRemoveInterface} (siehe +\autoref{sec:scrlayer.enduserinterfaces}, +\DescPageRef{scrlayer.cmd.scrlayerOnAutoRemoveInterface}) verwendet zu +werden. Damit können Ebenen, die unter Verwendung von entfernbaren Anweisungen +einer entfernbaren Benutzerschnittstelle definiert wurden, zusammen mit dieser +Benutzerschnittstelle entfernt werden.% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{draft}{Ein-Aus-Wert} + \Macro{layercontentsmeasure} +\end{Declaration} +Mit Hilfe der \KOMAScript-Option \Option{draft} kann für das Paket +\Package{scrlayer} ein Entwurfsmodus aktiviert werden. In diesem Entwurfsmodus +wird hinter jeder Ebene zunächst eine Bemaßung der Ebene ausgegeben. Diese +Bemaßung erfolgt mit \Macro{layercontentsmeasure}. Diese Anweisung zeigt am +oberen und linken Rand der Ebene ein Maßband in Zentimeter und am rechten und +unteren Rand der Ebene ein Maßband in Zoll. Die Anweisung +\Macro{layercontentsmeasure} kann statt über die Option auch schlicht als +alleiniger \PName{Code} für die Eigenschaft \Option{contents} einer Ebene +verwendet werden.% +% +\EndIndexGroup + + +\section{Deklaration und Verwaltung von Seitenstilen} +\seclabel{pagestyles} + +\BeginIndexGroup% +\BeginIndex{}{Seiten>Stil}% +Wir kennen nun Ebenen und wissen, wie diese definiert und verwaltet +werden. Aber bisher wissen wir kaum, wie sie verwendet werden. Die +möglicherweise überraschende Antwort lautet: mit Hilfe von +Seitenstilen. Üblicherweise werden Seitenstile in \LaTeX{} zur Definition von +Kopf und Fuß der Seite verwendet. + +Kopf und Fuß für ungerade oder rechte Seiten\textnote{gerade oder ungerade + Seite} werden im doppelseitigen Modus auf Seiten mit ungerader Seitenzahl +ausgegeben. Im einseitigen Modus werden sie auf allen Seiten verwendet. Das +ist unmittelbar mit den +Optionen\important[i]{\Option{evenpage}\\\Option{oddpage}} \Option{oddpage} +und \Option{evenpage} für Ebenen vergleichbar. + +Der Seitenkopf\textnote{Kopf oder Fuß} wird vor dem normalen Seiteninhalt +ausgegeben. Der Seitenfuß wird entsprechend nach dem normalen Seiteninhalt +ausgegeben. Dies korrespondiert also unmittelbar mit den +Optionen\important[i]{\Option{background}\\\Option{foreground}} +\Option{background} und \Option{foreground} für Ebenen. + +Daher liegt es nahe, Seitenstile als Listen von Ebenen zu definieren. Aber +statt nur den genannten vier Optionen können dabei alle Eigenschaften +verwendet werden, die in \autoref{sec:scrlayer.layers}, +\autoref{tab:scrlayer.layerkeys}, ab \autopageref{tab:scrlayer.layerkeys} +erklärt wurden. + +Als Ergebnis dieser Überlegungen ist eine Form von Seitenstilen, die +\Package{scrlayer} bietet, der Ebenen-Seitenstil\textnote{Ebenen-Seitenstil}% +\Index{Seitenstil>Ebenen-}\Index{Ebenen>Seitenstil}\Index{Seiten>Stil}. Ein +solcher Ebenen-Seitenstil besteht aus Ebenen und zusätzlich aus mehreren Haken +(engl. \emph{hooks}). Die Ebenen wurden bereits in +\autoref{sec:scrlayer.layers} beschrieben. Die +Haken\Index[indexmain]{Haken}\textnote{Haken} sind Punkte in der Expansion +oder Anwendung von Seitenstilen, zu denen zusätzlicher Code hinzugefügt werden +kann. Erfahrene Anwender kennen dieses Konzept bereits von beispielsweise +\Macro{AtBeginDocument} (siehe \cite{latex:usrguide}) oder +\DescRef{scrlfile.cmd.BeforeClosingMainAux} (siehe +\DescPageRef{scrlfile.cmd.BeforeClosingMainAux}). + +Eine zweite Form von Seitenstilen, die \Package{scrlayer} bietet, ist der +Alias-Seitenstil\textnote{Alias-Seitenstil}% +\Index{Seitenstil>Alias-}\Index{Alias>Seitenstil}\Index{Seiten>Stil} oder +Seitenstil-Alias. Ein Seitenstil-Alias besteht in Wirklichkeit aus einem +anderen Seitenstil. Anders ausgedrückt ist der Name eines Seitenstil-Alias ein +Alias-Name für einen anderen Seitenstil-Alias oder einen primären +Seitenstil. Daher führt die Manipulation an einem Seitenstil-Alias zu einer +Manipulation am originären Seitenstil. Ist der originäre Seitenstil selbst +ebenfalls ein Seitenstil-Alias, so führt dessen Manipulation wiederum zu einer +Manipulation dessen originären Seitenstils und immer so weiter, bis +schließlich ein realer Seitenstil verändert wird. Der Ausdruck \emph{realer + Seitenstil}\textnote{realer Seitenstil} wird zur Unterscheidung von einem +Seitenstil-Alias verwendet. Alle Seitenstile, die kein Seitenstil-Alias sind, +sind reale Seitenstile. Seitenstil-Aliase können nicht nur für Seitenstile +definiert werden, die mit \Package{scrlayer} definiert wurden, sondern für +alle Seitenstile. + + +\begin{Declaration} + \Macro{currentpagestyle} + \Macro{toplevelpagestyle} +\end{Declaration} +Das Paket \Package{scrlayer} erweitert die \LaTeX-Anweisung +\DescRef{maincls.cmd.pagestyle}\IndexCmd{pagestyle} so, dass diese +\Macro{currentpagestyle} als den Namen des jeweils aktiven Seitenstils +definiert. Es\textnote{Achtung!} ist zu beachten, dass +\DescRef{maincls.cmd.thispagestyle}\IndexCmd{thispagestyle} selbst +\Macro{currentpagestyle} nicht verändert. Wird +\DescRef{maincls.cmd.thispagestyle} verwendet, so kann sich +\Macro{currentpagestyle} aber innerhalb der \LaTeX-Ausgabefunktion +verändern. Dies hat jedoch nur dann Auswirkungen, wenn +\Macro{currentpagestyle} bis in die \LaTeX-Ausgabefunktion geschützt verwendet +wird. + +Es sei darauf hingewiesen, dass die später in diesem Abschnitt dokumentierten +Ebenen-Seitenstile nicht auf diese Erweiterung von +\DescRef{maincls.cmd.pagestyle} angewiesen sind, da sie selbst auch +\Macro{currentpagestyle} umdefinieren. Die Erweiterung wurde für die +Verwendung von anderen Seitenstilen, die nicht auf \Package{scrlayer} +basieren, vorgenommen. Es ist außerdem zu beachten\textnote{Achtung!}, dass +\Macro{currentpagestyle} vor der ersten Verwendung von +\DescRef{maincls.cmd.pagestyle} nach dem Laden von \Package{scrlayer} leer +ist. Bei der Definition einer Endanwender-Schnittstelle dürfte es daher +nützlich sein, mit einer impliziten \DescRef{maincls.cmd.pagestyle}-Anweisung +den aktuellen Seitenstil auf eine Voreinstellung zu setzen.% + +Wird mit \DescRef{maincls.cmd.pagestyle} ein Alias-Seitenstils aktiviert, so +liefert \Macro{currentpagestyle} nicht den Alias-Namen, sondern den des +originären Seitenstils. Den\ChangedAt{v3.16}{\Package{scrlayer}} Alias-Namen +kann man in diesem Fall mit \Macro{toplevelpagestyle} erhalten. Es wird davon +abgeraten, Seitenstile zu definieren, die beispielsweise per +\DescRef{scrbase.cmd.Ifstr} abhängig von \Macro{toplevelpagestyle} +unterschiedliche Ergebnisse liefern, da dies bei Aktivierung per +\DescRef{maincls.cmd.thispagestyle} zu falschen Resultaten führen kann.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{BeforeSelectAnyPageStyle}\Parameter{Code} + \Macro{AfterSelectAnyPageStyle}\Parameter{Code} +\end{Declaration} +Die Anweisung \Macro{BeforeSelectAnyPageStyle} fügt einem Haken\Index{Haken} +(engl. \emph{hook}) \PName{Code} hinzu, der innerhalb der Ausführung von +Anweisung \DescRef{maincls.cmd.pagestyle}% +\important{\DescRef{maincls.cmd.pagestyle}}\IndexCmd{pagestyle}, unmittelbar +vor der Auswahl des Seitenstils ausgeführt wird. Innerhalb von \PName{Code} +kann \texttt{\#1} als Platzhalter für das Argument von +\DescRef{maincls.cmd.pagestyle} verwendet werden. + +Die Anweisung \Macro{AfterSelectAnyPageStyle} arbeitet ähnlich. Allerdings +wird hier \PName{Code} ausgeführt, nachdem der Seitenstil gewählt und +\DescRef{\LabelBase.cmd.currentpagestyle} auf den Namen des realen Seitenstils +gesetzt wurde. + +Es ist zu beachten\textnote{Achtung!}, dass \PName{Code} jeweils nur bei der +Wahl eines Seitenstils mit Hilfe von \DescRef{maincls.cmd.pagestyle} +ausgeführt wird. Wird ein Seitenstil auf andere Art, beispielsweise mit Hilfe +von \DescRef{maincls.cmd.thispagestyle}, gewählt, so wird \PName{Code} nicht +ausgeführt. Es ist außerdem zu beachten\textnote{Achtung!}, dass einmal +hinzugefügter \PName{Code} nicht mehr entfernt werden kann. Allerdings wird +der \PName{Code} lokal hinzugefügt. Sein Gültigkeitsbereich kann daher mit +einer Gruppe beschränkt werden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DeclarePageStyleAlias}\Parameter{Seitenstil-Alias-Name} + \Parameter{originärer~Seitenstil-Name} + \Macro{DeclareNewPageStyleAlias}\Parameter{Seitenstil-Alias-Name} + \Parameter{originärer~Seitenstil-Name} + \Macro{ProvidePageStyleAlias}\Parameter{Seitenstil-Alias-Name} + \Parameter{originärer~Seitenstil-Name} + \Macro{RedeclarePageStyleAlias}\Parameter{Seitenstil-Alias-Name} + \Parameter{originärer~Seitenstil-Name} +\end{Declaration} +\BeginIndex{}{Seitenstil>Alias-}% +\BeginIndex{}{Alias>Seitenstil}% +Diese Anweisungen können verwendet werden, um einen Seitenstil mit dem Namen +\PName{Seitenstil-Alias-Name} zu definieren, der einfach nur ein Alias für +einen bereits existierenden Seitenstil mit dem Namen \PName{originärer + Seitenstil-Name} ist. Falls bereits ein Seitenstil mit dem Namen +\PName{Seitenstil-Alias-Name} existiert, wird dieser vor der Erzeugung des +Alias mit \Macro{DeclarePageStyleAlias} oder \Macro{RedeclarePageStyleAlias} +zerstört. + +Die Anweisung \Macro{DeclareNewPageStyleAlias} erzeugt eine Fehlermeldung, +falls zuvor bereits ein Seitenstil \PName{Seitenstil-Alias-Name} +definiert wurde. Dabei spielt es keine Rolle, ob der existierende Seitenstil +selbst ein Alias-Seitenstil, ein Ebenen-Seitenstil oder eine andere Art von +Seitenstil ist. + +Die Anweisung \Macro{ProvidePageStyleAlias} definiert den Seitenstil-Alias +nur, falls nicht bereits ein Seitenstil +\PName{Seitenstil-Alias-Name} existiert. Falls ein solcher Seitenstil +existiert, bleibt dieser erhalten und die Anweisung tut schlicht nichts. + +Im Gegensatz zu den drei vorgenannten Anweisungen erwartet +\Macro{RedeclarePageStyleAlias}, dass bereits ein Seitenstil mit dem Namen +\PName{Seitenstil-Alias-Name} existiert. Anderenfalls erzeugt die Anweisung +eine Fehlermeldung. +\iffree{\csname @tempswafalse\endcsname}{\csname @tempswatrue\endcsname}% +\csname if@tempswa\endcsname% Umbruchkorrekturtext +\begin{Example} + Angenommen, Sie schreiben eine Klasse und verwenden darin für + Kapitelanfangsseiten den Seitenstil \PageStyle{chapter}. In der + Voreinstellung soll dieser Seitenstil dem Seitenstil \PageStyle{plain} + entsprechen. Daher verwenden Sie das Paket \Package{scrlayer} und definieren + mit +\begin{lstcode} + \DeclareNewPageStyleAlias{chapter}{plain} +\end{lstcode} + den Seitenstil \PageStyle{chapter} als Alias für den Seitenstil + \PageStyle{plain}. Will hingegen der Anwender später, dass der Seitenstil + \PageStyle{chapter} dem Seitenstil \PageStyle{empty} entspricht, so erreicht + er dies mit: +\begin{lstcode} + \RedeclarePageStyleAlias{chapter}{empty} +\end{lstcode}% +\end{Example}% +\ExampleEndFix% +\fi +\EndIndexGroup + + +\begin{Declaration} + \Macro{DestroyPageStyleAlias}\Parameter{Seitenstil-Alias-Name}% +\end{Declaration} +\BeginIndex{}{Seitenstil>Alias-}% +\BeginIndex{}{Alias>Seitenstil}% +Mit dieser Anweisung wird der Seitenstil-Alias mit dem angegebenen Namen +\PName{Seitenstil-Alias-Name} für \LaTeX{} wieder undefiniert, wenn es +tatsächlich einen Alias-Seitenstil dieses Namens gibt. Anschließend kann der +Seitenstil auch mit \DescRef{\LabelBase.cmd.DeclareNewPageStyleAlias} oder +\DescRef{\LabelBase.cmd.ProvidePageStyleAlias} neu definiert werden.% +\iffalse % Siehe Hinweis zur Interface-Schnittstelle +\par +Die Anweisung ist dazu bestimmt, innerhalb des Arguments \PName{Code} von +\DescRef{\LabelBase.cmd.scrlayerOnAutoRemoveInterface} (siehe +\autoref{sec:scrlayer.enduserinterfaces}, +\DescPageRef{scrlayer.cmd.scrlayerOnAutoRemoveInterface}) verwendet zu +werden, um Seitenstile, die als Teil eines Endanwender-Interfaces definiert +wurden, beim automatischen Entfernen dieses Interfaces mit zu entfernen.% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{GetRealPageStyle}\Parameter{Seitenstil-Name}% +\end{Declaration} +\BeginIndex{}{Seitenstil>Alias-}% +\BeginIndex{}{Alias>Seitenstil}% +Diese Anweisung sucht rekursiv nach dem tatsächlichen Namen eines +Seitenstils, wenn der angegebene \PName{Seitenstil-Name} zu einem +Alias-Seitenstil gehört. Ist \PName{Seitenstil-Name} nicht der Name eines +Alias-Seitenstils, so ist das Ergebnis \PName{Seitenstil-Name} selbst. Das +gilt auch, falls ein Seitenstil namens \PName{Seitenstil-Name} gar nicht +existiert. Die Anweisung ist voll expandierbar und kann damit beispielsweise +auch im zweiten Argument einer \Macro{edef}-Anweisung verwendet werden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DeclarePageStyleByLayers}\OParameter{Optionenliste} + \Parameter{Seitenstil-Name} + \Parameter{Ebenenliste} + \Macro{DeclareNewPageStyleByLayers}\OParameter{Optionenliste} + \Parameter{Seitenstil-Name} + \Parameter{Ebenenliste} + \Macro{ProvidePageStyleByLayers}\OParameter{Optionenliste} + \Parameter{Seitenstil-Name} + \Parameter{Ebenenliste} + \Macro{RedeclarePageStyleByLayers}\OParameter{Optionenliste} + \Parameter{Seitenstil-Name} + \Parameter{Ebenenliste} +\end{Declaration} +\BeginIndex{}{Seitenstil>Ebenen-}% +\BeginIndex{}{Ebenen>Seitenstil}% +Diese Anweisungen deklarieren einen Seitenstil mit dem Namen +\PName{Seitenstil-Name}. Der Seitenstil besteht aus einer Anzahl von Ebenen, +die in der mit Komma separierten \PName{Ebenenliste} angegeben sind. Es ist zu +beachten\textnote{Achtung!}, dass sowohl \PName{Seitenstil-Name} als auch +\PName{Ebenenliste} voll expandierbar sein müssen und die Expansion zu einer +Reihe von Buchstaben führen sollte. Einige zusätzliche Zeichen werden +ebenfalls akzeptiert, ihre Verwendung wird jedoch nur erfahrenen Anwendern +empfohlen. + +Die \PName{Optionenliste} ist eine mit Komma separierte Liste von Optionen der +Form \texttt{\PName{Schlüssel}=\PName{Code}}. Diese Optionen können verwendet +werden, um zusätzliche Eigenschaften zu setzen und zusätzliche Möglichkeiten +zu nutzen. Derzeit werden sie verwendet, um \mbox{Code} an bestimmten Stellen +der Aktivierung oder Verwendung eines Seitenstils über Haken\Index{Haken} +(engl. \emph{hooks}) auszuführen. Für allgemeine Informationen zu Haken sei +auf die Einleitung zu diesem Abschnitt verwiesen. Details zu den Haken und +ihrer Bedeutung sind \autoref{tab:scrlayer.pagestyle.hooks} zu entnehmen. Es +ist zu beachten, dass die Haken auch für den nachfolgend erklärten +Pseudo-Seitenstil +\DescRef{\LabelBase.pagestyle.@everystyle@}\IndexPagestyle{@everystyle@}% +\important{\DescRef{\LabelBase.pagestyle.@everystyle@}} ausgeführt werden. + +\begin{desclist} + \desccaption{% + Optionen und gleichnamige Haken für Ebenen-Seitenstile (in der Reihenfolge + ihrer Abarbeitung)\label{tab:scrlayer.pagestyle.hooks}% + }{% + Optionen für die Haken von Ebenen-Seitenstilen (\emph{Fortsetzung})% + }% + \entry{\OptionVName{onselect}{Code}}{% + Der \PName{Code} dieses Hakens\Index{Haken} wird immer dann ausgeführt, + wenn der Seitenstil, beispielsweise mit \DescRef{maincls.cmd.pagestyle}, + ausgewählt wird. Es ist zu beachten, dass + \DescRef{maincls.cmd.thispagestyle} selbst keinen Seitenstil unmittelbar + auswählt, sondern der Seitenstil in diesem Fall erst innerhalb der + Ausgaberoutine von \LaTeX{} aktiviert wird.% + }% + \entry{\OptionVName{oninit}{Code}}{% + Der \PName{Code} dieses Hakens\Index{Haken} wird immer dann ausgeführt, + wenn die Ausgabe der Ebenen für den Seitenstil initialisiert + wird. Beachten Sie, dass dies für jede Seite zweimal geschieht: einmal für + Hintergrund-Ebenen und einmal für Vordergrund-Ebenen.% + }% + \entry{\OptionVName{ononeside}{Code}}{% + Der \PName{Code} dieses Hakens\Index{Haken} wird immer dann ausgeführt, + wenn im einseitigen Modus die Ausgabe der Ebenen für den Seitenstil + initialisiert wird. Beachten Sie, dass dies für jede Seite zweimal + geschieht: einmal für Hintergrund-Ebenen und einmal für + Vordergrund-Ebenen.% + }% + \entry{\OptionVName{ontwoside}{Code}}{% + Der \PName{Code} dieses Hakens\Index{Haken} wird immer dann ausgeführt, + wenn im doppelseitigen Modus die Ausgabe der Ebenen für den Seitenstil + initialisiert wird. Beachten Sie, dass dies für jede Seite zweimal + geschieht: einmal für Hintergrund-Ebenen und einmal für + Vordergrund-Ebenen.% + }% + \entry{\OptionVName{onoddpage}{Code}}{% + Der \PName{Code} dieses Hakens\Index{Haken} wird immer dann ausgeführt, + wenn die Ausgabe der Ebenen für den Seitenstil auf einer rechten Seite + initialisiert wird. Beachten Sie, dass dies für jede Seite zweimal + geschieht: einmal für Hintergrund-Ebenen und einmal für + Vordergrund-Ebenen. Beachten Sie außerdem, dass im einseitigen Modus alle + Seiten rechte Seiten sind.% + }% + \entry{\OptionVName{onevenpage}{Code}}{% + Der \PName{Code} dieses Hakens\Index{Haken} wird immer dann ausgeführt, + wenn die Ausgabe der Ebenen für den Seitenstil auf einer linken Seite + initialisiert wird. Beachten Sie, dass dies für jede Seite zweimal + geschieht: einmal für Hintergrund-Ebenen und einmal für + Vordergrund-Ebenen. Beachten Sie außerdem, dass im einseitigen Modus keine + linken Seiten existieren.% + }% + \entry{\OptionVName{onfloatpage}{Code}}{% + Der \PName{Code} dieses Hakens\Index{Haken} wird immer dann ausgeführt, + wenn die Ausgabe der Ebenen für den Seitenstil auf einer + Gleitumgebungsseite initialisiert wird. Beachten Sie, dass dies für jede + Seite zweimal geschieht: einmal für Hintergrund-Ebenen und einmal für + Vordergrund-Ebenen. Beachten Sie außerdem, dass Gleitumgebungsseiten nur + diejenigen Seiten sind, auf denen eine oder mehrere p-platzierte + Gleitumgebungen ausgegeben werden.% + }% + \entry{\OptionVName{onnonfloatpage}{Code}}{% + Der \PName{Code} dieses Hakens\Index{Haken} wird immer dann ausgeführt, + wenn die Ausgabe der Ebenen für den Seitenstil auf einer Seite + initialisiert wird, die keine Gleitumgebungsseite ist. Beachten Sie, dass + dies für jede Seite zweimal geschieht: einmal für Hintergrund-Ebenen und + einmal für Vordergrund-Ebenen. Beachten Sie außerdem, dass + Gleitumgebungsseiten nur diejenigen Seiten sind, auf denen eine oder + mehrere p-platzierte Gleitumgebungen ausgegeben werden, und auf anderen + Seiten sehr wohl t-, b- oder h-platzierte Gleitumgebungen stehen können.% + }% + \entry{\OptionVName{onbackground}{Code}}{% + Der \PName{Code} dieses Hakens\Index{Haken} wird immer dann ausgeführt, + wenn die Ausgabe der Ebenen für den Hintergrund einer Seite initialisiert + wird. Beachten Sie, dass dies auf jeder Seite genau einmal der Fall ist.% + }% + \entry{\OptionVName{onforeground}{Code}}{% + Der \PName{Code} dieses Hakens\Index{Haken} wird immer dann ausgeführt, + wenn die Ausgabe der Ebenen für den Vordergrund einer Seite initialisiert + wird. Beachten Sie, dass dies auf jeder Seite genau einmal der Fall ist.% + }% +\end{desclist} + +\iffalse% Umbruchvarianten +Während die Anweisung +\Macro{DeclarePageStyleByLayers} %\important{\Macro{DeclarePageStyleByLayers}}% + % Leider zu lang. Deshalb auch auf alle + % weiteren verzichtet. +den Seitenstil immer definiert, erzeugt \Macro{DeclareNewPageStyleByLayers} +eine Fehlermeldung, falls bereits ein Seitenstil gleichen Namens +existiert. Beachten\textnote{Achtung!} Sie, dass die Deklaration eines +Seitenstils, der bereits ein Alias für einen anderen Seitenstil ist (siehe +beispielsweise \Macro{DeclareAliasPageStyle} zuvor in diesem Abschnitt) nicht +zu der Umdefinierung des angegebenen Alias-Seitenstils, sondern des realen +Seitenstils (siehe \DescRef{\LabelBase.cmd.GetRealPageStyle} zuvor in diesem +Abschnitt) führt.% +\else% +Die Anweisung \Macro{DeclarePageStyleByLayers} definiert den Seitenstil +unabhängig davon, ob bereits ein Seitenstil des Namens \PName{Seitenstil-Name} +existiert. Gegebenenfalls wird der existierende Seitenstil komplett neu +definiert. Falls bereits ein Alias-Seitenstil \PName{Seitenstil-Name} +existiert wird jedoch nicht der Alias-Seitenstil selbst neu definiert, sondern +der zugehörige reale Seitenstil (siehe +\DescRef{\LabelBase.cmd.GetRealPageStyle} zuvor in diesem Abschnitt). + +Die Anweisung \Macro{DeclareNewPageStyleByLayers} unterscheidet sich in dem +Fall, dass bereits ein gleichnamiger Seitenstil existiert. Unabhängig davon, +ob es sich um einen realen Seitenstil oder einen Alias-Seitenstil handelt, +wird in diesem Fall ein Fehler gemeldet.% +\fi + +Im Unterschied dazu wird bei \Macro{ProvidePageStyleByLayers} der Seitenstil +unverändert erhalten, wenn bereits ein Seitenstil des Namens +\PName{Seitenstil-Name} existiert. Existiert kein solcher Seitenstil, so wird +er wie bei \Macro{DeclarePageStyleByLayers} definiert. + +Die Anweisung \Macro{RedeclarePageStyleByLayers} wiederum erwartet, dass +bereits ein Seitenstil des Namens \PName{Seitenstil-Name} existiert und +definiert dessen realen Seitenstil dann um. Existiert jedoch noch kein +Seitenstil des angegebenen Namens, so resultiert daraus eine Fehlermeldung.% +\iffalse % Umbruchkorrektur +\par +Beachten Sie des Weiteren die nachfolgenden Anmerkungen zum Pseudo-Seitenstil +\PageStyle{@everystyle@}.% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \PageStyle{@everystyle@} + \PageStyle{empty} +\end{Declaration} +\BeginIndex{}{Seitenstil>Ebenen-}% +\BeginIndex{}{Ebenen>Seitenstil}% +Das Paket \Package{scrlayer} definiert von sich aus bereits zwei in gewisser +Weise spezielle Seitenstile. Der erste davon ist +\PageStyle{@everystyle@}\important{\PageStyle{@everystyle@}}. Dieser +Seitenstil sollte niemals als normaler Seitenstil, beispielsweise mit +\DescRef{maincls.cmd.pagestyle} oder \DescRef{maincls.cmd.thispagestyle}, oder +als Ziel eines Alias-Seitenstils verwendet werden. Stattdessen werden die +Ebenen und Haken\Index{Haken} dieses Seitenstils von allen anderen +Ebenen-Seitenstilen mit verwendet. Dabei werden die Haken von +\PageStyle{@everystyle@} jeweils vor den entsprechenden Haken und die Ebenen +jeweils vor den entsprechenden Ebenen des aktiven Seitenstils ausgeführt. + +Damit ist das Hinzufügen einer Ebene zum Pseudo-Seitenstil +\PageStyle{@everystyle@} oder von Code zu einem Haken dieses Seitenstils +vergleichbar mit dem Hinzufügen einer Ebene beziehungsweise von Haken-Code zu +allen Ebenen-Seitenstile. Der eine entscheidende Unterschied ist: Befehle, die +sich auf die Ebenen eines Seitenstils beziehen, das sind neben +\DescRef{\LabelBase.cmd.ForEachLayerOfPageStyle} beispielsweise auch die +Anweisungen \DescRef{\LabelBase.cmd.AddLayersToPageStyleBeforeLayer} oder +\DescRef{\LabelBase.cmd.AddLayersToPageStyleAfterLayer}, lassen die Ebenen des +Seitenstils \PageStyle{@everystyle@} unberücksichtigt, wenn sie auf einen +anderen Ebenen-Seitenstil angewendet werden. + +Der zweite etwas andere Ebenen-Seitenstil ist +\PageStyle{empty}\important{\PageStyle{empty}}. Bereits vom \LaTeX-Kern wird +ein Seitenstil dieses Namens definiert, der einen leeren Kopf und Fuß hat. Das +Paket \Package{scrlayer} definiert diesen Seitenstil als Ebenen-Seitenstil +ohne Ebenen um. \iffalse % Umbruchkorrektur +Nichtsdestotrotz kann er wie jeder andere Ebenen-Seitenstil verwendet +werden. % +\fi% +Der Hauptvorteil dieses Ebenen-Seitenstils gegenüber dem ursprünglichen +Seitenstil aus dem \LaTeX-Kern ist, dass er ebenfalls die Haken\Index{Haken} +und Ebenen des Pseudo-Seitenstils \PageStyle{@everystyle@} ausführt.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{onpsselect}{Code} + \OptionVName{onpsinit}{Code} + \OptionVName{onpsoneside}{Code} + \OptionVName{onpstwoside}{Code} + \OptionVName{onpsoddpage}{Code} + \OptionVName{onpsevenpage}{Code} + \OptionVName{onpsfloatpage}{Code} + \OptionVName{onpsnonfloatpage}{Code} + \OptionVName{onpsbackground}{Code} + \OptionVName{onpsforeground}{Code} +\end{Declaration} +\BeginIndex{}{Seitenstil>Ebenen-}% +\BeginIndex{}{Ebenen>Seitenstil}% +Für jeden der Haken\Index{Haken} aus \autoref{tab:scrlayer.pagestyle.hooks} +existiert außerdem eine \KOMAScript-Option% +\iffalse% +. Die Namen der \KOMAScript-Optionen ähneln den Namen der Optionen für die +Befehle zur Deklaration von Ebenen-Seitenstilen. Es wird lediglich ein +»\texttt{ps}« nach dem »\texttt{on}« am Anfang des Namens eingefügt% +\else% +, in deren Namen lediglich ein \texttt{ps} eingefügt wurde% +\fi% +. Die Werte dieser \KOMAScript-Optionen werden als Anfangswerte für die +entsprechenden Haken verwendet. Dieser Anfangswert wird dann um alle Werte, +die dem entsprechenden Haken in der \PName{Optionenliste} der +Deklarationsbefehle zugewiesen werden, erweitert. Der Anfangswert kann mit +Hilfe der Anweisung \DescRef{\LabelBase.cmd.ModifyLayerPageStyleOptions}, die +später in diesem Abschnitt erklärt wird, entfernt werden.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{singlespacing}{Ein-Aus-Wert} +\end{Declaration} +Wird\ChangedAt{v3.24}{\Package{scrlayer}\and \Package{scrlayer-scrpage}} ein +Dokument, beispielsweise mit Hilfe von Paket +\Package{setspace}\IndexPackage{setspace}\important{\Package{setspace}}, mit +erhöhtem Zeilenabstand gesetzt, ist es oft dennoch nicht erwünscht, dass Kopf +und Fuß der Seite ebenfalls mit diesem erhöhten Zeilenabstand gesetzt +werden. Das gilt umso mehr, wenn Kopf und Fuß nur aus jeweils einer Zeile +bestehen. In diesem Fall kann man \KOMAScript-Option \Option{singlespacing} +setzen. In der Voreinstellung\textnote{Voreinstellung} ist die Option jedoch +nicht gesetzt! Die Option wirkt generell für alle Ebenen-Seitenstile. Will man +hingegen nur einige Ebenen-Seitenstil einzeilig gesetzt haben, so sollte man +stattdessen für diese Seitenstile +\OptionValue{oninit}{\Macro{linespread}\PParameter{1}\Macro{selectfont}} +verwenden.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{deactivatepagestylelayers}{Ein-Aus-Wert} + \Macro{ForEachLayerOfPageStyle}\Parameter{Seitenstil-Name} + \Parameter{Code} + \Macro{ForEachLayerOfPageStyle*}\Parameter{Seitenstil-Name} + \Parameter{Code} +\end{Declaration} +\BeginIndex{}{Seitenstil>Ebenen-}% +\BeginIndex{}{Ebenen>Seitenstil}% +Solange \KOMAScript-Option \Option{deactivatepagestylelayers} nicht +aktiviert ist, kann mit \Macro{ForEachLayerOfPageStyle} für jede Ebene des +Seitenstils mit dem Namen \PName{Seitenstil-Name} beliebiger \PName{Code} +ausgeführt werden. Innerhalb von \PName{Code} dient dabei \PValue{\#1} als +Platzhalter für den Namen der gerade abgearbeiteten Ebene. +\begin{Example} + Angenommen, Sie wollen die Namen aller Ebenen des Seitenstils + \PValue{scrheadings} als Komma-separierte Liste, so können Sie dies mit +\begin{lstcode} + \newcommand*\commaatlist{} + \ForEachLayerOfPageStyle{scrheadings}{% + \commaatlist#1\gdef\commaatlist{, }} + \let\commaatlist\relax +\end{lstcode} + erreichen. +\end{Example} +Die Verwendung von \Macro{gdef} anstelle von \Macro{def} ist im Beispiel +notwendig\textnote{Achtung!}, weil \PName{Code} innerhalb einer Gruppe +ausgeführt wird, um unerwünschte Seiteneffekte zu minimieren. Die Anweisung +\Macro{gdef} definiert \Macro{commaatlist} jedoch global um, so dass beim +Aufruf des Codes für die nächste Ebene die Änderung Bestand hat. + +Alternativ\ChangedAt{v3.18}{\Package{scrlayer}} hätte man auch zwar mit +\Macro{def}, dafür aber mit der Sternvariante \Macro{ForEachLayerOfPageStyle*} +arbeiten können. Diese Form verzichtet bei der Ausführung von \PName{Code} auf +eine Gruppe. Allerdings muss der Anwender dann selbst +sicherstellen, dass \PName{Code} keine unerwünschten Seiteneffekte +hat. Insbesondere würde die Deaktivierung der Ebenen mit +\OptionValue{deactivatepagestylelayers}{true} innerhalb von \PName{Code} dann +über den Aufruf von \Macro{ForEachLayerOfPageStyle*} hinaus Bestand haben. + +Diverse Anweisungen von \Package{scrlayer} setzen intern selbst ebenfalls +\Macro{ForEachLayerOfPageStyle} ein. Auch deren Funktion kann daher über die +\KOMAScript-Option \Option{deactivatepagestylelayers} verändert werden. Diese +Option kann also verwendet werden, um alle Ebenen aller Seitenstile temporär +zu deaktivieren und damit zu verstecken.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AddLayersToPageStyle}\Parameter{Seitenstil-Name} + \Parameter{Ebenenliste} + \Macro{AddLayersAtBeginOfPageStyle}\Parameter{Seitenstil-Name} + \Parameter{Ebenenliste} + \Macro{AddLayersAtEndOfPageStyle}\Parameter{Seitenstil-Name} + \Parameter{Ebenenliste} + \Macro{RemoveLayersFromPageStyle}\Parameter{Seitenstil-Name} + \Parameter{Ebenenliste} +\end{Declaration} +\BeginIndex{}{Seitenstil>Ebenen-}% +\BeginIndex{}{Ebenen>Seitenstil}% +Diese Anweisungen können verwendet werden, um Ebenen zu einem Seitenstil +hinzuzufügen oder davon zu entfernen. Der Seitenstil wird dabei über +\PName{Seitenstil-Name} referenziert. Die Ebenen werden in einer durch Komma +separierten \PName{Ebenenliste} angegeben. + +Sowohl die Anweisung \Macro{AddLayersToPageStyle} als auch die Anweisung +\Macro{AddLayersAtEndOfPageStyle}\textnote{hinzufügen am Ende} fügt die Ebenen +am Ende der Ebenenliste des Seitenstils ein. Logisch liegen die neu +hinzugefügten Ebenen also über oder vor den bereits vorhandenen Ebenen, wobei +Hintergrund-Ebenen natürlich weiterhin logisch hinter der Textebene und damit +auch hinter allen Vordergrund-Ebenen liegen. + +Die Anweisung \Macro{AddLayersAtBeginOfPageStyle}\textnote{hinzufügen am + Anfang} fügt die Ebenen hingegen am Anfang der Ebenenliste des Seitenstils +ein. Dabei werden die Ebenen in der Reihenfolge am Anfang eingefügt, in der +sie auch in der \PName{Ebenenliste} stehen. Damit wird die Ebene, die ganz am +Ende von \PName{Ebenenliste} steht, nach dem Einfügen die erste und damit die +unterste oder hinterste Ebene (jeweils entweder der Vordergrund- oder der +Hintergrundebenen) sein. + +Werden\textnote{unbekannte Ebenen} nicht existente Ebenen zu einem Seitenstil +hinzugefügt, werden diese bei der Anwendung des Stils ignoriert. + +\iffalse% Umbruchkorrekturtext (beim Aktiveren muss unten \textnote{entfernen} + % entfernt werden!) +Die Anweisung \Macro{RemoveLayersFromPageStyle} dient dem genauen +Gegenteil. Sie entfernt\textnote{entfernen} die angegebenen Ebenen von +Seitenstil.% +\fi + +Der Versuch, mit Hilfe von +\Macro{RemoveLayersFromPageStyle}\textnote{entfernen} Ebenen von einem +Seitenstil zu entfernen, die gar nicht Teil des Seitenstils sind, wird +ignoriert, führt also nicht zu einer Fehlermeldung. Dagegen ist der Versuch, +Ebenen zu einem Seitenstil, der kein Ebenen-Seitenstil ist und auch kein +Alias-Seitenstil, der zu einem Ebenen-Seitenstil führt, hinzuzufügen oder von +einem solchen zu entfernen, ein Fehler und wird als solcher gemeldet.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AddLayersToPageStyleBeforeLayer}\Parameter{Seitenstil-Name} + \Parameter{Ebenenliste} + \Parameter{Referenzebenen-Name} + \Macro{AddLayersToPageStyleAfterLayer}\Parameter{Seitenstil-Name} + \Parameter{Ebenenliste} + \Parameter{Referenzebenen-Name}% +\end{Declaration} +\BeginIndex{}{Seitenstil>Ebenen-}% +\BeginIndex{}{Ebenen>Seitenstil}% +\iffalse% Umbruchvarianten +Diese beiden Befehle ähneln den vorangegangenen. Allerdings wird hier +zusätzlich ein \PName{Referenzebenen-Name} angegeben. Die Ebenen des über den +\PName{Seitenstil-Name} angegebenen Seitenstils werden nach dieser +Referenzebene durchsucht. % +\else% +Die Befehle ähneln den vorherigen. Die existierenden Ebenen des Seitenstils +werden jedoch nach \PName{Referenzebenen-Name} durchsucht. % +\fi% +Die Ebenen der \PName{Ebenenliste} werden dann +vor\textnote{hinzufügen vor/nach Ebene} +respektive nach jedem Auf"|treten der Referenzebene % +\iffalse% Umbruchkorrekturtext +in die Ebenen des Seitenstils % +\fi% +eingefügt. Dabei bleibt die Reihenfolge der Ebenen der +\PName{Ebenenliste} erhalten. + +Ist die Referenzebene nicht Bestandteil des Seitenstils, so wird auch nichts +eingefügt. Ist der Seitenstil hingegen kein Ebenen-Seitenstil und auch kein +Alias-Seitenstil, der zu einem Ebenen-Seitenstil führt, so wird ein Fehler +gemeldet.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{UnifyLayersAtPageStyle}\Parameter{Seitenstil-Name} +\end{Declaration} +\BeginIndex{}{Seitenstil>Ebenen-}% +\BeginIndex{}{Ebenen>Seitenstil}% +Bei den Befehlen zur Definition eines Seitenstils oder zum Hinzufügen von +Ebenen zu einem Seitenstil wird nicht darauf geachtet, ob eine Ebene mehrfach +Bestandteil eines Seitenstils ist oder wird. Dies ist also durchaus +zulässig. In den meisten Fällen hat es allerdings keinen Sinn, eine Ebene +mehrfach als Bestandteil eines Seitenstils zu haben. Daher kann mit Hilfe von +\Macro{UnifyLayersAtPageStyle} dafür gesorgt werden, dass alle +Ebenen-Dubletten vom Seitenstil mit dem angegebenen \PName{Seitenstil-Name} +entfernt werden. + +Es ist zu beachten\textnote{Achtung!}, dass sich dabei die Reihenfolge der +Ebenen ändern kann. Wird also eine spezielle Reihenfolge gewünscht, sollten +stattdessen alle Ebenen entfernt und die gewünschten Ebenen in der erwarteten +Reihenfolge neu hinzugefügt werden. In einem solchen Fall ist +\Macro{UnifyLayersAtPageStyle} also nicht geeignet.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{ModifyLayerPageStyleOptions}\Parameter{Seitenstil-Name} + \Parameter{Optionenliste} + \Macro{AddToLayerPageStyleOptions}\Parameter{Seitenstil-Name} + \Parameter{Optionenliste} +\end{Declaration} +\BeginIndex{}{Seitenstil>Ebenen-}% +\BeginIndex{}{Ebenen>Seitenstil}% +Mit diesen beiden Anweisungen können die Optionen und damit die +Haken\Index{Haken} eines Ebenen-Seitenstils nachträglich verändert werden. Bei +\Macro{ModifyLayerPageStyleOptions}\textnote{Seitenstil-Optionen ändern} +werden dabei genau die Optionen, die in der durch Komma separierten +\PName{Optionenliste} angegeben sind, auf die dortigen neuen Werte +gesetzt. Die bisherigen Werte gehen dabei verloren. Es sind alle Optionen aus +\autoref{tab:scrlayer.pagestyle.hooks}, +\autopageref{tab:scrlayer.pagestyle.hooks} erlaubt. Optionen +\iffree{beziehungsweise}{oder} Haken, die nicht in der \PName{Optionenliste} +angegeben sind, bleiben hingegen unverändert. Diese Anweisung ist +\iffree{damit auch }{}% Umbruchkorrektur +die einzige Möglichkeit, die globalen Voreinstellungen der +\KOMAScript-Optionen von einem Seitenstil zu entfernen. + +Die Anweisung \Macro{AddToLayerPageStyleOptions}\textnote{Seitenstil-Optionen + erweitern} überschreibt dagegen die bisher vorhandenen Werte nicht, sondern +fügt die neuen zu den bisherigen hinzu oder -- genauer gesagt -- hängt die +neuen Werte an die alten an.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfLayerPageStyleExists}\Parameter{Seitenstil-Name} + \Parameter{Dann-Code} + \Parameter{Sonst-Code} + \Macro{IfRealLayerPageStyleExists}\Parameter{Seitenstil-Name} + \Parameter{Dann-Code} + \Parameter{Sonst-Code} +\end{Declaration} +\BeginIndex{}{Seitenstil>Ebenen-}% +\BeginIndex{}{Ebenen>Seitenstil}% +Mit den Anweisungen kann Code in Abhängigkeit davon ausgeführt werden, ob +ein Seitenstil ein Ebenen-Seitenstil ist oder nicht. Dabei führt +\Macro{IfLayerPageStyleExists} den \PName{Dann-Code} nur dann aus, wenn +\PName{Seitenstil-Name} der Name eines Ebenen-Seitenstils oder der Name eines +Alias-Seitenstils ist, der zu einem Ebenen-Seitenstil führt. Anderenfalls +führt die Anweisung den \PName{Sonst-Code} aus. + +\iffree{Die Anweisung }{}%Umbruchvarianten +\Macro{IfRealLayerPageStyleExists} geht einen Schritt weiter und führt +\iffree{den }{}% Umbruchvarianten +\PName{Dann-Code} nur dann aus, wenn der über \PName{Seitenstil-Name} +angegebene Seitenstil selbst ein Ebenen-Seitenstil ist. Im Falle eines +Alias-Seitenstils führt diese Anweisung also selbst dann \PName{Sonst-Code} +aus, wenn dieser Alias-Seitenstil zu einem Ebenen-Seitenstil führt.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfLayerAtPageStyle}\Parameter{Seitenstil-Name} + \Parameter{Ebenen-Name} + \Parameter{Dann-Code} + \Parameter{Sonst-Code} + \Macro{IfSomeLayersAtPageStyle}\Parameter{Seitenstil-Name} + \Parameter{Ebenenliste} + \Parameter{Dann-Code} + \Parameter{Sonst-Code} + \Macro{IfLayersAtPageStyle}\Parameter{Seitenstil-Name} + \Parameter{Ebenenliste} + \Parameter{Dann-Code} + \Parameter{Sonst-Code} +\end{Declaration} +\BeginIndex{}{Seitenstil>Ebenen-}% +\BeginIndex{}{Ebenen>Seitenstil}% +Mit diesen Anweisungen kann überprüft werden, ob ein oder mehrere Ebenen +Bestandteil eines Seitenstils sind. \Macro{IfLayerAtPageStyle} erwartet dabei +den \PName{Seitenstil-Name} im ersten Argument und im zweiten Argument +genau\textnote{genau eine Ebene} einen \PName{Ebenen-Name}. Ist die +entsprechende Ebene Bestandteil des Seitenstils, so wird der \PName{Dann-Code} +ausgeführt, anderenfalls der \PName{Sonst-Code}. + +Im Unterschied dazu erlauben \Macro{IfSomeLayersAtPageStyle} und +\Macro{IfLayersAtPageStyle} im zweiten Argument eine durch Komma separierte +\PName{Ebenenliste}. Dabei führt +\Macro{IfSomeLayersAtPageStyle}\textnote{mindestens eine Ebene} den +\PName{Dann-Code} bereits aus, wenn \emph{mindestens eine} der Ebenen +Bestandteil des Seitenstils ist. Dagegen führt +\Macro{IfLayersAtPageStyle}\textnote{alle Ebenen} den \PName{Dann-Code} nur +aus, wenn \emph{alle} Ebenen Bestandteil des Seitenstils sind. \iffree{Ist die + Bedingung nicht erfüllt, so}{Anderenfalls} wird jeweils \PName{Sonst-Code} +ausgeführt. + +Durch geeignete Schachtelung sind auch komplexe Bedingungen abbildbar. Gibt +man statt einer \PName{Ebenenliste} jeweils nur einen \PName{Ebenen-Name} an, +so sind alle drei Anweisungen gleichbedeutend.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DestroyRealLayerPageStyle}\Parameter{Ebenen-Seitenstil-Name} +\end{Declaration} +\BeginIndex{}{Seitenstil>Ebenen-}% +\BeginIndex{}{Ebenen>Seitenstil}% +\iffalse% Umbruchkorrektur +Mit der Anweisung wird ein Ebenen-Seitenstil aus \LaTeX-Sicht undefiniert. +Wurde statt eines Ebenen-Seitenstils ein Alias-Seitenstil, ein anderer +Seitenstil oder ein unbekannter Seitenstil angegeben, so wird die Anweisung +ignoriert.% +\else% +Mit dieser Anweisung kann ein Ebenen-Seitenstil aus \LaTeX-Sicht wieder +undefiniert werden. Dies gilt jedoch nur, wenn es einen Ebenen-Seitenstil mit +dem Namen \PName{Ebenen-Seitenstil-Name} auch tatsächlich gibt. Handelt es sich +stattdessen um einen Alias-Seitenstil -- auch wenn dieser zu einem +Ebenen-Seitenstil führt -- oder um einen anderen Seitenstil oder ist gar kein +Seitenstil mit dem Namen \PName{Ebenen-Seitenstil-Name} bekannt, so geschieht +nichts, die Anweisung wird ignoriert.% +\fi + +Falls \PName{Ebenen-Seitenstil-Name} der Name des aktuellen Seitenstils ist, +so wird dieser auf eine Art leeren Seitenstil gesetzt. Falls der mit +\DescRef{maincls.cmd.thispagestyle} gesetzte Seitenstil +\PName{Ebenen-Seitenstil-Name} lautet, so wird dieser einfach nur +zurückgesetzt. Die vorherige Anweisung \DescRef{maincls.cmd.thispagestyle} +verliert damit ihre aktuelle Auswirkung. + +Es ist zu beachten\textnote{Achtung!}, dass die Ebenen des Seitenstils nicht +automatisch mit vernichtet werden. Falls Sie die Ebenen ebenfalls vernichten +möchten, so können Sie dies beispielsweise mit +\begin{lstcode} + \ForEachLayerOfPageStyle{...}{\DestroyLayer{#1}} +\end{lstcode} +vor der Vernichtung des Seitenstils selbst erreichen.% +\iffalse % Siehe Hinweis zur Interface-Schnittstelle +\par +Die Anweisung ist dazu bestimmt, innerhalb des Arguments \PName{Code} von +\DescRef{\LabelBase.cmd.scrlayerOnAutoRemoveInterface} (siehe +\autoref{sec:scrlayer.enduserinterfaces}, +\DescPageRef{scrlayer.cmd.scrlayerOnAutoRemoveInterface}) verwendet zu +werden, um Seitenstile, die als Teil eines Endanwender-Interfaces definiert +wurden, beim automatischen Entfernen dieses Interfaces mit zu entfernen.% +\fi % +\EndIndexGroup +\EndIndexGroup + +\LoadCommonFile{headfootheight}% \section{Höhe von Kopf und Fuß} + +\LoadCommonFile{pagestylemanipulation}% \section{Beeinflussung der Inhalte von Seitenstilen} + +\section{Definition und Verwaltung von Schnittstellen für Endanwender} +\seclabel{enduserinterfaces} + +\iftrue% Der komplette Mechanismus ist überholt und sollte nicht mehr + % verwendet werden. Daher wird die Doku dazu deaktiviert. +%\begin{sloppypar} +Bis Version 3.27\ChangedAt{v3.28}{\Package{scrlayer}} stellte das Paket +\Package{scrlayer} noch einen als experimentell dokumentierten Mechanismus zur +Verwaltung konkurrierender Benutzerschnittstellen zur Verfügung. Da der Nutzen +dieses lediglich von \KOMAScript{} selbst eingesetzten Mechanismus sehr +begrenzt war, ist er inzwischen als überholt gekennzeichnet. Die Befehle +\Macro{scrlayerInitInterface}\IndexCmd{scrlayerInitInterface}, +\Macro{scrlayerOnAutoRemoveInterface}\IndexCmd{scrlayerOnAutoRemoveInterface}, +\Macro{scrlayerAddToInterface}\IndexCmd{scrlayerAddToInterface} und +\Macro{scrlayerAddCsToInterface}\IndexCmd{scrlayerAddCsToInterface} und die +Optionen \Option{forceoverwrite}\IndexOption{forceoverwrite} und +\Option{autoremoveinterfaces}\IndexOption{autoremoveinterfaces} sollten daher +nicht mehr verwendet werden.% +%\end{sloppypar}% +\else% +Das Paket \Package{scrlayer} stellt eine experimentelle Benutzerschnittstelle +zur Verfügung um (konkurrierende) Schnittstellen für Endanwender definieren +und verwalten zu können. \iffree{% Umbruchvarianten + Möglicherweise wird diese Schnittstelle langfristig wieder aus + \Package{scrlayer} verschwinden und dann stattdessen von \Package{scrbase} + übernommen werden. }{}% +Derzeit ist die Schnittstelle aber noch hoch +experimentell\iffree{% Umbruchvariante + und wird daher von eigenen Befehlen innerhalb von \Package{scrlayer} nur für + Unterpakete von \Package{scrlayer} bereit gestellt}{}% +. Es empfiehlt sich beim aktuellen Entwicklungsstand nicht, sich darauf zu +verlassen, dass die automatische Entfernung einer konkurrierenden +Schnittstelle funktioniert. Stattdessen sollte die Verwendung konkurrierender +Schnittstellen vermieden werden. + +Dieser Abschnitt beschreibt lediglich die Schnittstellen"=Anweisungen für die +Definition einer Endanwender-Schnittstelle. Für Endanwender selbst ist er +damit von geringem Interesse. Vielmehr richtet sich dieser Teil der Anleitung +an Autoren von Paketen und Klassen, die auf \Package{scrlayer} +aufbauen. Endanwender finden Informationen zu konkreten +Endanwender-Schnittstellen in \autoref{cha:scrlayer-scrpage}, +\autoref{cha:scrlayer-scrpage-experts} und \autoref{cha:scrlayer-notecolumn}. + + +\begin{Declaration} + \Macro{scrlayerInitInterface}\OParameter{Schnittstellen-Name} +\end{Declaration} +Mit dieser Anweisung wird eine neue Schnittstelle mit dem Namen +\PName{Schnittstellen-Name} registriert. Der +\PName{Schnittstellen-Name} muss einzigartig sein. Das bedeutet, dass eine +Schnittstelle gleichen Namens noch nicht registriert sein darf. Sollte dies +doch der Fall sein, so wird ein Fehler ausgegeben. + +Diese Anweisung sollte immer ganz am Anfang einer Endanwender-Schnittstelle +stehen. Daher wird sie hier auch zuerst erklärt. Wird das optionale Argument +-- einschließlich der eckigen Klammern -- weggelassen, so wird dafür +\PValue{\Macro{@currname}.\Macro{@currext}} verwendet. Für Klassen und +Pakete ist dies der Dateiname der Klasse respektive des Pakets. Aber +selbstverständlich kann jede andere Zeichenfolge der Kategorie \emph{letter} +oder \emph{other} verwendet werden. Dies ist beispielsweise sinnvoll, wenn +eine Klasse oder ein Paket mehrere Endanwender-Schnittstellen definiert.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{forceoverwrite}{Ein-Aus-Wert} + \OptionVName{autoremoveinterfaces}{Ein-Aus-Wert} + \Macro{scrlayerAddToInterface}\OParameter{Schnittstellen-Name} + \Parameter{Befehl}\Parameter{Code} + \Macro{scrlayerAddCsToInterface}\OParameter{Schnittstellen-Name} + \Parameter{Befehlssequenz}\Parameter{Code} +\end{Declaration} +Eine der besonderen Eigenschaften der Endanwender-Schnittstellen von +\Package{scrlayer} ist es, dass die Schnittstelle verwendete Befehle (auch +bekannt als \emph{Makros} oder engl. \emph{macros}) registrieren sollte. Dies +kann mit \Macro{scrlayerAddToInterface} erfolgen. Das optionale Argument +\PName{Schnittstellen-Name} entspricht hier dem Namen, der mit +\DescRef{\LabelBase.cmd.scrlayerInitInterface} zuvor registriert wurde. + +Werden\textnote{Achtung!} Anweisungen nicht nur während des Ladens einer +Klasse oder eines Pakets, sondern auch zur Laufzeit definiert, so ist das +optionale Argument auch dann zu verwenden, wenn es dem Dateinamen der Klasse +beziehungsweise des Pakets entspricht, da die Werte von \Macro{@currname} und +\Macro{@currext} nur während des Ladens Gültigkeit besitzen. + +Das erste obligatorische Argument ist der +\PName{Befehl}\footnote{\PName{Befehl} besteht aus einem umgekehrten + Schrägstrich (engl. \emph{backslash}), gefolgt von einer + \PName{Befehlssequenz}, die entweder aus Zeichen der Kategorie \emph{letter} + oder aus genau einem Zeichen der Kategorie \emph{other} besteht, oder aus + einem Zeichen der Kategorie \emph{active} (ohne umgekehrten Schrägstrich + davor).}, der zu der Endanwender-Schnittstelle hinzugefügt werden +soll. Falls der Befehl definiert werden kann, erfolgt dies. Außerdem wird dann +der Befehl auf \Macro{relax} gesetzt und \PName{Code} wird +ausgeführt. Innerhalb von \PName{Code} kann der \PName{Befehl} dann +beispielsweise mit Hilfe von \Macro{newcommand} definiert werden. + +Wann aber kann ein \PName{Befehl}\textnote{definierbare Befehle} definiert +werden? Ist ein \PName{Befehl} undefiniert oder \Macro{relax}, so kann er +immer definiert werden. Wurde ein \PName{Befehl} bereits definiert \emph{und} +für eine andere Endanwender-Schnittstelle registriert \emph{und} wurde auch die +\KOMAScript-Option \Option{autoremoveinterfaces} aktiviert, so wird diese +andere Endanwender-Schnittstelle automatisch entfernt, der \PName{Befehl} auf +\Macro{relax} gesetzt und für die angegebene neue Endanwender-Schnittstelle +registriert. Damit ist \PName{Befehl} auch dann definierbar. Falls ein +\PName{Befehl} bereits definiert ist, \emph{aber nicht} Teil einer anderen +Endanwender-Schnittstelle ist, \emph{und} falls die \KOMAScript-Option +\Option{forceoverwrite} aktiviert wurde, wird \PName{Befehl} ebenfalls +\Macro{relax} und für die angegebene Endanwender-Schnittstelle +registriert. Der \PName{Befehl} ist also auch in diesem Fall definierbar. In +allen anderen Fällen ist er jedoch nicht definierbar, also insbesondere, falls +er bereits definiert ist und die \KOMAScript-Optionen +\Option{autoremoveinterfaces} und \Option{forceoverwrite} deaktiviert sind. + +Die Anweisung \Macro{scrlayerAddCsToInterface} arbeitet ganz ähnlich der +vorgenannten Anweisung \Macro{scrlayerAddToInterface}. Allerdings erwartet sie +als erstes Argument keinen \PName{Befehl}, sondern eine +\PName{Befehlssequenz}\footnote{Eine \PName{Befehlssequenz} muss voll + expandierbar sein und ihre Expansion muss zu Zeichen der Kategorie + \emph{letter}, \emph{other} oder \emph{space} führen.}.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{scrlayerOnAutoRemoveInterface}\OParameter{Schnittstellen-Name} + \Parameter{Code} +\end{Declaration} +Für den Fall, dass die Endanwender-Schnittstelle mit dem angegebenen +\PName{Schnittstellen-Name} automatisch entfernt wird (siehe +\KOMAScript-Option \DescRef{\LabelBase.option.autoremoveinterfaces} zuvor in +diesem Abschnitt) kann zusätzlich \PName{Code} ausgeführt werden. Dies kann +beispielsweise verwendet werden, um Ebenen oder Seitenstile automatisch mit zu +vernichten (siehe \DescRef{\LabelBase.cmd.DestroyLayer}, +\DescRef{\LabelBase.cmd.DestroyPageStyleAlias}, and +\DescRef{\LabelBase.cmd.DestroyRealLayerPageStyle}), die auf Befehlen der +Endanwender-Schnittstelle beruhen. Bezüglich der Voreinstellung für das +optionale Argument sei auf die Erklärung zu +\DescRef{\LabelBase.cmd.scrlayerInitInterface} verwiesen.% +\EndIndexGroup% +\fi% +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Vordergrundebene Sternvariante Gleitseiten Hintergrundebenen +% LocalWords: Ausgabebeschränkungen Grafikausgabe Textausgabe Textebenen +% LocalWords: Standardgrundlinie Grafikebenen Standardtextzeile überhoch +% LocalWords: Platzierungsbefehle Ebeneneigenschaft Satzspiegelkonstruktion +% LocalWords: Kreisschlagen Buchseitenkanon spätmittelalterlichen +% LocalWords: Makronamen diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-en.tex b/macros/latex/contrib/koma-script/doc/scrlayer-en.tex new file mode 100644 index 0000000000..94e9846397 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlayer-en.tex @@ -0,0 +1,1605 @@ +% ====================================================================== +% scrlayer-en.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrlayer of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrlayer-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter:scrlayer)] + +\translator{Markus Kohm\and Karl Hagen} + +\chapter[{Defining Layers and Page Styles with \Package{scrlayer}}] + {Defining\ChangedAt{v3.12}{\Package{scrlayer}} Layers and Page Styles with + \Package{scrlayer}} +\labelbase{scrlayer} + +\BeginIndexGroup +\BeginIndex{Package}{scrlayer}% +\BeginIndex{}{layer}% +Most users of graphics software are already familiar with the layer model for +a page. Such a model is rather alien to \LaTeX{} itself, but some packages, +like \Package{eso-pic} or \Package{textpos}, provide a kind of +background or foreground layer. \Package{scrlayer} is another package that +provides such background and foreground layers, but unlike the packages +mentioned above, these layers are part of the page style. As a result, you can +switch between different layers simply by switching the page style. + +To do so, the package also supports a low-level interface for defining page +styles that are based on a stack or list of layers, for adding layers to such +a layer stack, either at the top or the bottom, or before or after a specific +layer, and for removing individual layers and duplicates from a stack. In a +nutshell, the page style interface of \Package{scrlayer} provides commands to +define page styles based on a stack of layers and to manage those stacks. + +Nevertheless, using the layers directly is recommended for advanced users +only. Interfaces for beginners and average users are provided by additional +packages that in turn load \Package{scrlayer}. See +\autoref{cha:scrlayer-scrpage} in \autoref{part:forAuthors} of this +\iffree{manual}{book}. + + +\LoadCommonFile{options} % \section{Early or Late Selection of Options} + +\section{Generic Information} +\seclabel{generic.information} + +The package needs some generic information about the class being used. Class +authors can help \Package{scrlayer} by providing the appropriate information. +Otherwise the package will try to determine this information for itself. This +works, for example, for the standard and the \KOMAScript{} classes. It may +work with other classes, or it may fail in whole or in part. + +This section describes some of the information that class authors can provide. +Normally, users should not have to worry about it. + +\begin{Declaration} + \Macro{if@chapter}\ \PName{then code}\ \textMacro{else}\ % + \PName{else code}\ \textMacro{fi}% +\end{Declaration} +If \Macro{if@chapter} is defined and corresponds to +\Macro{iftrue}\IndexCmd{iftrue}, \Package{scrlayer} takes the chapter level +into account when, for example, processing the +\DescRef{\LabelBase.option.automark} option. If it is defined but is not +\Macro{iftrue}, \Package{scrlayer} handles only the +\DescRef{maincls.cmd.part}, \DescRef{maincls.cmd.section}, +\DescRef{maincls.cmd.subsection}, \Macro{sub\dots subsection}, +\DescRef{maincls.cmd.paragraph}, \DescRef{maincls.cmd.subparagraph}, +\Macro{sub\dots subparagraph} sectioning units. If the macro is undefined, +\Package{scrlayer} searches for \DescRef{maincls.cmd.chapter}. If +\DescRef{maincls.cmd.chapter} is defined and does not correspond to +\Macro{relax}, \Package{scrlayer} defines \Macro{if@chapter} to +\Macro{iftrue}. Otherwise \Macro{if@chapter} becomes +\Macro{iffalse}\IndexCmd{iffalse}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{if@mainmatter}\ \PName{then code}\ % + \textMacro{else}\ \PName{else code}\ \textMacro{fi}% +\end{Declaration} +Classes like \Class{book} or \Class{scrbook} provide +\DescRef{maincls.cmd.frontmatter}\IndexCmd{frontmatter}, +\DescRef{maincls.cmd.mainmatter}\IndexCmd{mainmatter}, and +\DescRef{maincls.cmd.backmatter}\IndexCmd{backmatter} to switch between the +front, main, and end parts of a book. Typically, these classes also use +\Macro{if@mainmatter} internally to decide whether the current text is part of +the main body of the document or not. Classes like \Class{report} and +\Class{article} have no \DescRef{maincls.cmd.frontmatter}, +\DescRef{maincls.cmd.mainmatter}, or \DescRef{maincls.cmd.backmatter} and +therefore also lack \Macro{if@mainmatter}. + +It is easier for \Package{scrlayer} to avoid constantly testing for the +existence of these commands to decide whether to work in the main matter or +not, and instead to use \Macro{if@mainmatter}\IndexCmd{iftrue} with classes +like \Class{report} and \Class{article}. So if \Macro{if@mainmatter} is not +defined, \Package{scrlayer} defines it as a synonym for \Macro{iftrue}. + +Some classes, however, define \DescRef{maincls.cmd.frontmatter}, +\DescRef{maincls.cmd.mainmatter}, or \DescRef{maincls.cmd.backmatter} but not +\Macro{if@mainmatter}. In this case, \Package{scrlayer} also defines +\Macro{if@mainmatter} to be \Macro{iftrue} and it extends definition of +\DescRef{maincls.cmd.frontmatter}, \DescRef{maincls.cmd.mainmatter}, and +\DescRef{maincls.cmd.backmatter} to set \Macro{if@mainmatter} properly. +However, if there are other, comparable commands for switching between +different document parts. \Package{scrlayer} will not recognize them, does not +test for them, and therefore cannot extend them appropriately. In this case, +\Package{scrlayer} needs help of the class author to set \Macro{if@mainmatter} +correctly.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DeclareSectionNumberDepth}\Parameter{level name}% + \Parameter{level depth} +\end{Declaration} +Generally each section level is assigned an integer number indicating its +depth in the document structure. \LaTeX{} needs this to manage the hierarchy +of the section levels. But normally these values are known only to the +particular class that defines the section commands. This class then uses the +appropriate numbers inside the corresponding commands. + +The \Package{scrlayer} package also needs information about the section +hierarchy. With the help of \Macro{DeclareSectionNumberDepth}, you can map the +name of a heading level to a corresponding \PName{level depth}. For example, +for the standard \Class{book} class, the \PName{level name}s would be +\PValue{part}, \PValue{chapter}, \PValue{section}, \PValue{subsection}, +\PValue{subsubsection}, \PValue{paragraph}, and \PValue{subparagraph}, and the +corresponding \PName{level depth}s would be -1, 0, 1, 2, 3, 4, and 5. + +The \Package{scrlayer} package tries to determine the \PName{level depth}s on +its own while loading and again during \Macro{begin}\PParameter{document}. But +if this fails, for example because you use completely different sectioning +commands, you can define the relationship explicitly with +\Macro{DeclareSectionNumberDepth}.% +\EndIndexGroup + + +\section{Declaring Layers} +\seclabel{layers} + +A layer is an abstract model of a page. Unlike a real, physical sheet of +paper, this page is completely transparent. Typically, multiple layers are +stacked atop one another and opaque material on one layer hides material on +the layers below. The stack of layers is then merged to form the physical +page. The \Package{scrlayer} package provides two such stacks for each page: a +background stack and a foreground stack. The background stack is printed +beneath the normal page content, while the foreground stack is printed above +it. The normal page content is therefore a kind of a dividing layer between +the two layer stacks. + +A layer has several attributes that can be understood as answers to some basic +questions: +\iffree{\begin{description}}{% + \begingroup + \RedeclareSectionCommand[beforeskip=.5\baselineskip plus .25\baselineskip + minus .1\baselineskip]{paragraph}% + \renewcommand*\item[4][]{\paragraph*{#3{#4}#1}}% + }% +\item[Does the layer belong to the foreground or the background?]% + \leavevmode\textnote{foreground or background}\hskip 0pt + Background layers are output before the normal content of the page. + Therefore they appear behind or beneath the normal content of the page. + Foreground layers are then output after the normal content. Therefore they + appear on top of the normal content of the page. By default, a layer is both + a background layer \emph{and} a foreground layer and therefore is printed + twice. Usually it makes sense to limit the layer explicitly to either the + foreground or the background. +\item[What is the position of the layer?]% + \leavevmode\textnote{horizontal and vertical position}\hskip 0pt + To answer this question, there are attributes to define the layer's + horizontal and vertical position. +\item[How big is the layer?\textnote{horizontal and vertical size}]% + As with the position, there are also attributes to define the width and + height of a layer. Thus a layer can be smaller or larger than the paper + and it can be placed at different positions on the paper. +\item[How are the horizontal and vertical positions measured?]% + \leavevmode\textnote{alignment}\hskip 0pt + This question is answered by the alignment attribute. The horizontal + position can be measured from the left edge of the paper to the left edge of + the layer, to the centre of the layer, to the right edge of the layer. + Similarly, the vertical position can be measured from the top edge of the + paper to the top edge of the layer, the centre of the layer, or the bottom + edge of the layer. +\item[Is the layer intended for text or picture output?]% + \leavevmode\textnote{text or picture}\hskip 0pt + This question is closely related to the position. For example, users often + expect the origin for a picture to be at the lower left corner of the layer. + But this would not be suitable for text output. Therefore the origin of a + text layer is the height of a standard text line below the top left corner + of the layer. Picture layers, on the other hand, create a + \Environment{picture}\IndexEnv{picture} environment in which additional + positioning commands are available. +\item[Should the layer be printed on left or right pages?]% + \leavevmode\textnote{left or right page}\hskip 0pt + By default a layer will be printed on all pages. Note that \LaTeX{} treats + even pages as left-side pages and odd pages as right-side pages, but in + one-sided printing, only right-hand pages exist regardless of the page + number. +\item[Should the layer be printed in one-sided or two-sided mode?]% + \leavevmode\textnote{one-sided or two-sided}\hskip 0pt + By default a layer will be printed in both one-sided and two-sided + printing. Nonetheless, a layer that is restricted to even pages will never + be printed in one-sided printing and therefore is not a one-sided layer. +\item[Should the layer be printed on float pages or normal pages?]% + \leavevmode\textnote{float page or normal page}\hskip 0pt + \LaTeX{} produces float pages for objects from environments like tables or + figures if they are allowed to appear on a page without normal page contents + (see option \PValue{p} for \Environment{figure} or \Environment{table}). In + effect, the entire page is allowed to float within the document. Normal + pages in this sense are all pages that are not float pages. Normal pages can + also contain floats at the top, in the middle, or at the bottom of the page. + Very large floats can give the impression of being page floats, while in + reality they are floating environments placed at the top of a normal page. +\item[What are the contents of the layer?]% + \leavevmode\textnote{contents}\hskip 0pt + The corresponding attribute simply contains what should be printed whenever + the layer is output. +\iffree{\end{description}}{% + \endgroup\par\bigskip\noindent\ignorespaces +}% +These eight questions immediately give rise to a number of attributes. Later +\iffree{in this guide}, we will describe additional attributes. However, they +are only defined for convenience and can be expressed by a combination of +these primary attributes. + + +\begin{Declaration} + \Macro{DeclareLayer}\OParameter{option list}\Parameter{layer name}% + \Macro{DeclareNewLayer}\OParameter{option list}\Parameter{layer name}% + \Macro{ProvideLayer}\OParameter{option list}\Parameter{layer name}% + \Macro{RedeclareLayer}\OParameter{option list}\Parameter{layer name}% + \Macro{ModifyLayer}\OParameter{option list}\Parameter{layer name} +\end{Declaration} +These commands can be used to define layers. The \PName{layer name} must be +fully expandable and should expand to ASCII letters only. Some additional +characters are accepted, but their use is only recommended for advanced users. + +The \Macro{DeclareLayer} command does not care whether or not a layer with the +given \PName{layer name} already exists. It will under all circumstances +define the layer with the attributes specified in the \PName{option list}. An +\PName{option} can be either a key or a key followed by an equal sign and +a value. Multiple options are separated by commas. To use a comma or a white +space within the value of an option, you must put the value inside curly +brackets. See \autoref{tab:scrlayer.layerkeys} for more information on keys, +values, and the corresponding attributes. + +Unlike \Macro{DeclareLayer}, \Macro{DeclareNewLayer} reports an error if a +layer with the same \PName{layer name} already exists. This prevents the user +from accidentally using the same \PName{layer name} more than once. This +is especially useful when classes or packages also define layers internally. + +In contrast, \Macro{ProvideLayer} only defines a layer if there is no layer +with the same name already. If the name is in use for another layer, the new +definition is ignored. Therefore this command has the meaning, \emph{define + the layer only if it does not already exist.} + +If you want to redefine an existing layer, you can use \Macro{RedeclareLayer} +or \Macro{ModifyLayer}. With \Macro{RedeclareLayer}, the layer is first reset +to the default settings and then completely redefined via the specified +options list. In contrast, \Macro{ModifyLayer} does not reset the layer. +Only those attributes which are explicitly set in the \PName{option list} will +be changed. Applying either command to a previously undefined \PName{layer + name} results in an error. + +\begin{desclist} + \desccaption{% + Options for defining page layers and the meaning of the + corresponding layer attribute\label{tab:scrlayer.layerkeys}% + }{% + Options for defining layers (\emph{continued})% + }% + \entry{% + \ChangedAt{v3.16}{\Package{scrlayer}}% + \OptionVName{addcontents}{Code}}{% + The specified \PName{code} will be appended to the current value of the + \Option{contents} attribute, so the new content will appear at the end of + the existing content. For more information about the handling of + \PName{code} see the \Option{contents} option.% + }% + \entry{% + \ChangedAt{v3.16}{\Package{scrlayer}}% + \OptionVName{addheight}{additional height}}{% + The current value of the \Option{height} attribute will be increased by + the value of this option. You can use the same kind of values as for + \Option{height}.% + }% + \entry{% + \ChangedAt{v3.16}{\Package{scrlayer}}% + \OptionVName{addhoffset}{additional horizontal offset}}{% + The current value of the \Option{hoffset} attribute will be increased by + the value of this option. You can use the same kind of values as for + \Option{hoffset}.% + }% + \entry{% + \ChangedAt{v3.16}{\Package{scrlayer}}% + \OptionVName{addvoffset}{additional vertical offset}}{% + The current value of the \Option{voffset} attribute will be increased by + the value of this option. You can use the same kind of values as for + \Option{voffset}.% + }% + \entry{% + \ChangedAt{v3.16}{\Package{scrlayer}}% + \OptionVName{addwidth}{additional width}}{% + The current value of the \Option{width} attribute will be increased by + the value of this option. You can use the same kind of values as for + \Option{width}.% + }% + \nentry{\KOption{align}{\PName{alignment characters}}}{% + The \PName{alignment characters} define the desired alignment of the + layer. Each \PName{alignment character} determines how the \PName{length} + of either the \Option{hoffset} or the \Option{voffset} option is + interpreted. Multiple \PName{alignment character}s can be used together + (without spaces or commas) and are evaluated in the order they occur. + Macros are not permitted in the value of the option. Valid + \PName{alignment character}s are: + \begin{description} + \item[\PValue{b} --] align the layer at its bottom edge; the value of + \Option{voffset} is the distance from the top edge of the paper to the + bottom of the layer. + \item[\PValue{c} --] align the layer at its centre; the values of + \Option{voffset} and \Option{hoffset} are interpreted as the distance + from the top left corner of the paper to the centre of the layer. + \item[\PValue{l} --] align the layer at its left edge; the value of + \Option{hoffset} is interpreted as the distance from the left edge of + the paper to the left edge of the layer. + \item[\PValue{r} --] align the layer at its right edge; the value of + \Option{hoffset} is interpreted as the distance from the left edge of + the paper to the right edge of the layer. + \item[\PValue{t} --] align the layer at its top edge; the value of + \Option{voffset} is interpreted as the distance from the top edge of the + paper to the top edge of the layer. + \end{description}% + }% + \entry{\KOption{area}{% + \Parameter{hoffset}\Parameter{voffset}% + \Parameter{width}\Parameter{height}}}{% + This composite option sets the primary attributes + \OptionValue{hoffset}{horizontal offset}, \OptionValue{voffset}{vertical + offset}, \OptionValue{width}{width}, \OptionValue{height}{height}.% + }% + \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% + \Option{backandforeground}}{% + This option removes the restriction of a layer to the foreground or the + background. In general, this option makes little sense, but it is provided + for the sake of a complete user interface. This option does not expect or + allow a value.% + }% + \entry{\Option{background}}{% + This option displays the layer in the background only. The default is to + display layers in both the background and the foreground. This option does + not expect or allow a value.% + }% + \entry{\Option{bottommargin}}{% + This composite option sets the primary attributes \Option{hoffset}, + \Option{voffset}, \Option{width}, \Option{height}, and \Option{align} so + that the layer spans the paper horizontally from the left edge to the + right and vertically from immediately beneath the footer to the bottom + edge of the paper.% + }% + \entry{\KOption{clone}{\PName{layer name}}}{% + This composite option sets all primary attributes of the layer to the same + values as the primary attributes of the layer with the given \PName{layer + name}. See the notes on the \PName{layer name} at the beginning of the + explanation for \Macro{DeclareLayer}. The layer to be cloned must also + already exist.% + }% + \entry{\KOption{contents}{\PName{code}}}{% + The specified \PName{code} will be expanded whenever the layer is printed. + This \PName{code} defines what you see for the layer. No tests are made to + see if the code is valid. Errors in the \PName{code} can therefore lead to + multiple error messages on each page that prints the layer.% + }% + \entry{\Option{evenpage}}{% + This option causes the layer to appear on even pages only, unlike the + default, where a layer will appear on both even and odd pages. Since even + pages only appear in two-sided printing, this option implies + \Option{twoside}. This option does not expect or allow a value.% + }% + \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% + \Option{everypage}}{% + This option is a combination of \Option{oddorevenpage} and + \Option{floatornonfloatpage}. This option does not expect or allow a + value.% + }% + \entry{\Option{everyside}}{% + This option removes any restriction of the layer to one-sided or two-sided + printing. This is the default setting. This option does not expect or + allow a value.% + }% + \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% + \Option{floatornonfloatpage}}{% + This option removes any restriction of the layer to float or non-float + pages and restores the default setting. This option does not expect or + allow a value.% + }% + \entry{\Option{floatpage}}{% + This option restricts the layer to appearing on float pages only. The + default setting is for layers to appear on both float and non-float pages. + This option does not expect or allow a value.% + }% + \entry{\Option{foot}}{% + This composite option sets \Option{hoffset}, \Option{voffset}, + \Option{width}, \Option{height}, and \Option{align} so that the layer + spans the page footer over the width of the text area. This option does + not expect or allow a value.% + }% + \entry{\Option{footskip}}{% + This composite option sets \Option{hoffset}, \Option{voffset}, + \Option{width}, \Option{height}, and \Option{align} so that the layer + spans the vertical distance between the text area and the page footer over + the width of the text area. Note, however, that although the height of + this area depends on \Length{footskip}, it is not the same. This option + does not expect or allow a value.% + }% + \entry{\Option{foreground}}{% + This option displays the layer in the foreground only. The default is to + display layers in both the background and the foreground. The option does + not expect or allow a value.% + }% + \entry{\Option{head}}{% + This composite option sets \Option{hoffset}, \Option{voffset}, + \Option{width}, \Option{height}, and \Option{align} so that the layer + spans the vertical area of the page header for the width of the text area. + The height corresponds to the length \Length{headheight}. This option does + not expect or allow a value.% + }% + \entry{\Option{headsep}}{% + This composite option sets \Option{hoffset}, \Option{voffset}, + \Option{width}, \Option{height}, and \Option{align} so that the layer + spans the vertical distance between the page header and the text area for + the width of the text area. The height corresponds to the length + \Length{headsep}. This option does not expect or allow a value.% + }% + \entry{\KOption{height}{\PName{length}}}{% + Sets the height of the layer. Note that the \PName{length} can be a + \LaTeX{} length declared with \Macro{newlength}, a \TeX{} length declared + with \Macro{newdimen} or \Macro{newskip}, a length value like 10\,pt, or a + dimensional expression using +, -, /, *, (, and ). For more information + about valid dimensional expressions see \cite[section~3.5]{manual:eTeX}.% + }% + \entry{\KOption{hoffset}{\PName{length}}}{% + Sets the distance of the layer from the left edge of the paper. How the + distance is measured depends on the \Option{align} option. See the + \Option{height} option for more information about valid expressions for + \PName{length}.% + }% + \entry{\Option{innermargin}}{% + This composite option sets \Option{hoffset}, \Option{voffset}, + \Option{width}, \Option{height}, and \Option{align} so that the layer + spans the inner margin, from the edge of the page to the edge of the text + area and from the top to the bottom of the page. In one-sided printing, + the inner margin corresponds to the left margin. This option does not + expect or allow a value.% + }% + \entry{\Option{leftmargin}}{% + This composite option sets \Option{hoffset}, \Option{voffset}, + \Option{width}, \Option{height}, and \Option{align} so that the layer + spans the left margin, from the left edge of the paper to the left edge of + the text area and from the top of the paper to the bottom. This option + does not expect or allow a value.% + }% + \entry{\ChangedAt{v3.19}{\Package{scrlayer}}% + \OptionVName{mode}{mode}}{% + This primary option defines the \PName{mode} in which the layer's content + is output. The default is \OptionValue{mode}{text}. The baseline of the + first text line is placed the height of one standard text line below the + top edge of the layer, so the text is usually neatly aligned with the top + of the layer. In \PValue{picture} \PName{mode}, on the other hand, the + layer spans a \Environment{picture} environment with the origin at the + bottom left corner of the layer. The \PValue{raw} \PName{mode} is also + also defined. By default it corresponds to \PValue{text} \PName{mode}. + Changing\textnote{Attention!} the \PName{mode} of a layer usually results + the contents shifting. Furthermore, the \PValue{picture} \PName{mode} + provides additional commands that result in errors with another + \PName{mode}. Therefore it usually makes no sense to change the + \PName{mode} of a layer after its initial declaration!% + }% + \entry{\Option{nonfloatpage}}{% + This option restricts the layer to pages that are not float pages. The + default is for the layer to appear on both float and non-float pages. This + option does not expect or allow a value.% + }% + \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% + \Option{oddorevenpage}}{% + This option removes any restriction of the layer to odd or even pages, + restoring the default behaviour that the layer should appear on both odd + and even pages. The option does not expect or allow a value.% + }% + \entry{\Option{oddpage}}{% + This option restricts the layer to odd pages only. The default is for + layers to appear on both odd pages and on even pages. Note that in + one-sided printing, all pages are odd, regardless of the page number. This + option does not expect or allow a value.% + }% + \entry{\Option{oneside}}{% + This option restricts the layer to one-sided printing only. The default is + for layers to appear in both one-sided and two-sided printing. This option + does not expect or allow a value.% + }% + \entry{\Option{outermargin}}{% + The composite option sets \Option{hoffset}, \Option{voffset}, + \Option{width}, \Option{height}, and \Option{align} so that the layer + spans the outer margin of the page, from the top to the bottom of the + paper. The outer margin corresponds to the right margin in one-sided + printing. This option does not expect or allow a value.% + }% + \entry{\Option{page}}{% + This composite option sets \Option{hoffset}, \Option{voffset}, + \Option{width}, \Option{height}, and \Option{align} so that the layer + spans the the whole paper. This option does not expect or allow a value.% + }% + \entry{\ChangedAt{v3.16}{\Package{scrlayer}}% + \OptionVName{pretocontents}{code}}{% + The value of \PName{code} is prefixed the current value of the + \Option{contents} attribute, so the new content will appear before the + existing content. For more information about the handling of \PName{code}, + see the \Option{contents} option.% + }% + \entry{\Option{rightmargin}}{% + This composite option sets \Option{hoffset}, \Option{voffset}, + \Option{width}, \Option{height}, and \Option{align} so that the layer + spans the right margin, from the right edge of the text area to the right + edge of the paper and from the top to the bottom edge of the paper. This + option does not expect or allow a value.% + }% + \entry{\Option{textarea}}{% + This composite option sets \Option{hoffset}, \Option{voffset}, + \Option{width}, \Option{height}, and \Option{align} so that the layer + spans the entire text area. This option does not expect or allow a value.% + }% + \entry{\Option{topmargin}}{% + This composite option sets \Option{hoffset}, \Option{voffset}, + \Option{width}, \Option{height}, and \Option{align} so that the layer + spans the vertical distance between the top edge of the paper to the + header for the entire width of the paper. This option does not expect or + allow a value.% + }% + \entry{\Option{twoside}}{% + This option restricts the layer to two-sided printing. The default is for + layers to appear in both one-sided and two-sided printing. This option + does not expect or allow a value.% + }% + \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% + \Option{unrestricted}}{% + This option removes all output restrictions. It is a combination of + \Option{backandforeground}, \Option{everyside}, and + \Option{floatornonfloatpage}. This option does not expect or allow a + value.% + }% + \entry{\KOption{voffset}{\PName{length}}}{% + Sets the distance of the layer from the top of the paper. How the distance + is measured depends on the \Option{align} option. See the \Option{height} + option for more information about valid expressions for \PName{length}.% + }% + \entry{\KOption{width}{\PName{length}}}{% + Sets the width of the layer. See the \Option{height} option for more + information about valid expressions for \PName{length}.% + }% +\end{desclist} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{ModifyLayers}\OParameter{option list}\Parameter{layer list} +\end{Declaration} +This\ChangedAt{v3.26}{\Package{scrlayer}} command executes +\DescRef{\LabelBase.cmd.ModifyLayer} with the given \PName{option list} for +all layers of the comma-separated layer list. Therefore the option can be used +to change attributes of several layers simultaneously.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{layerhalign}% + \Macro{layervalign}% + \Macro{layerxoffset}% + \Macro{layeryoffset}% + \Macro{layerwidth}% + \Macro{layerheight}% +\end{Declaration} +These commands are only valid in the \PName{code} specified with +\Option{contents}, \Option{addcontents}, or \Option{pretocontents}. In this +case, they contain the layer's actual alignment, position, and dimensions that +will be used for the output. However, this is not necessarily the actual +dimensions of the layer's contents, e.\,g., if the contents are oversized or +do not fill the layer completely. + +The primary layer attribute \PValue{align} is mapped to +\Macro{layerhalign}\ChangedAt{v3.19}{\Package{scrlayer}} and +\Macro{layervalign}. The horizontal values \PValue{l} and \PValue{r} are +copied to \Macro{layerhalign}. The vertical values \PValue{t} and \PValue{b} +are copied to \Macro{layervalign}. The value \PValue{c}, which is both +horizontal and vertical, is copied to both commands. If there are several +conflicting values for \PValue{align}, only the last one is copied. Thus the +resulting \Macro{layerhalign} is either \PValue{l}, \PValue{c}, or \PValue{r}, +and the resulting \Macro{layervalign} is either \PValue{t}, \PValue{c}, or +\PValue{b}. + +Redefining\textnote{Attention!} these instructions to change the values stored +in them is not permitted, as it would lead to unpredictable results.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{LenToUnit}\Parameter{length} +\end{Declaration} +This\ChangedAt{v3.19}{\Package{scrlayer}} command originally came from +\Package{eso-pic}\IndexPackage{eso-pic}~2.0f. It converts lengths into +multiples of \Length{unit length} and can therefore be used everywhere \LaTeX{} +expects \Environment{picture} coordinates or \Length{unit length}-dependent +values. For more information, see \cite{package:eso-pic} and the descriptions +of \Macro{putUR}, \Macro{putLL}, and \Macro{putLR} below. If the command is +already defined, e.\,g., by loading \Package{eso-pic} before +\Package{scrlayer}, the package does not define it again.% +\iffalse% Umbruchkorrekturtext +\par +It should be noted at this point that using package +\Package{picture}\IndexPackage{picture}\textnote{\Package{picture}} (see +\cite{package:picture}) supersedes \Macro{LenToUnit} more or less. The package +extends environment \Environment{picture} and the picture commands so that you +can use \LaTeX{} lengths directly for coordinates.% +\fi +\EndIndexGroup + + +\begin{Declaration} + \Macro{putUL}\Parameter{content}% + \Macro{putUR}\Parameter{content}% + \Macro{putLL}\Parameter{content}% + \Macro{putLR}\Parameter{content}% + \Macro{putC}\Parameter{content} +\end{Declaration} +You\ChangedAt{v3.19}{\Package{scrlayer}} can use these commands inside the +value of \PValue{contents} layer option if the layer is declared with +\OptionValue{mode}{picture}. In this case, \Macro{putUL} places the +\PName{content} relative to the upper left corner of the layer and therefore +is the same as +\lstinline[breaklines=false]|\put(0,\LenToUnit{\layerheight})|. \Macro{putUR} +places the \PName{content} relative to the upper right corner of the layer and +therefore is the same as +\lstinline[breaklines=false] +|\put(\LenToUnit{\layerwidth},\LenToUnit{\layerheight})|. +\Macro{putLL} places the \PName{content} relative to the lower left corner of +the layer and therefore is the same as +\lstinline[breaklines=false]|\put(0,0)|. \Macro{putLR} places the +\PName{content} relative to the lower right corner and therefore is the same +as \lstinline[breaklines=false]|\put(\LenToUnit{\layerwidth},0)|. Last but +not least, \Macro{putC} places the \PName{content} relative to the centre of +the layer.% +\begin{Example} + You want to determine exactly how accurately + \OptionValueRef{typearea}{DIV}{classic} sets the height of the text area to + the width of the page size. You declare a layer that both borders the text + area and places a circle with a diameter of the paper width in the centre of + the text area: +\begin{lstcode} + \documentclass[DIV=classic]{scrartcl} + \usepackage{pict2e} + \usepackage{scrlayer} + \DeclareNewLayer[% + textarea,background,mode=picture, + contents={% + \putLL{\line(1,0){\LenToUnit{\layerwidth}}}% + \putLR{\line(0,1){\LenToUnit{\layerheight}}}% + \putUR{\line(-1,0){\LenToUnit{\layerwidth}}}% + \putUL{\line(0,-1){\LenToUnit{\layerheight}}}% + \putC{\circle{\LenToUnit{\paperwidth}}}% + } + ]{showtextarea} + \DeclareNewPageStyleByLayers{test}{showtextarea} + \pagestyle{test} + \begin{document} + \null + \end{document} +\end{lstcode} + You will notice that \Package{typearea}'s mapping to an integer \PName{DIV} + value is very accurate in this example. +\end{Example} +Incidentally, you will find more information about late medieval book-page +canon sketched in the example in \autoref{sec:typearea.circleConstruction}, +\autopageref{sec:typearea.circleConstruction}. + +The \Macro{DeclareNewPageStyleByLayers}\IndexCmd{DeclareNewPageStyleByLayers} +command just used in the example defines a new page style using the newly +declared layer. It will be explained in \autoref{sec:scrlayer.pagestyles}, +\DescPageRef{scrlayer.cmd.DeclareNewPageStyleByLayers}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{GetLayerContents}\Parameter{layer~name} +\end{Declaration} +This\ChangedAt{v3.16}{\Package{scrlayer}} command returns the whole contents +of a layer. It is important to note\textnote{Attention!} that using this +command inside the \PName{code} of the layer attributes \Option{contents}, +\Option{addcontents}, or \Option{pretocontents} can result in +infinite recursion when referencing the contents of the current layer. You +are responsible for avoiding such situations!% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfLayerExists}\Parameter{layer~name} + \Parameter{then-code}\Parameter{else-code} +\end{Declaration} +This command can be used to execute code depending on whether or not a layer +with the specified \PName{layer name} exists. If the layer exists, the +\PName{then-code} will be executed; otherwise, the \PName{else-code} will be +executed. Note that the command cannot really test whether a layer exists. +Instead it uses a heuristic which will never yield a false negative but which, +in extreme cases, could yield a false positive. +\iffalse% Umbruchvarianten +Nevertheless, if the test yields a false positive, something has gone wrong. +For example, this could indicate an incompatible package or that the user is +doing something he or she should not.% +\else +False positives indicate a problem, such as the use of an incompatible package +or a bad choice of internal macro names by the user. +\fi +\EndIndexGroup + + +\begin{Declaration} + \Macro{DestroyLayer}\Parameter{layer~name} +\end{Declaration} +If a layer with the given \PName{layer name} exists, all macros belonging to +it will be set to \Macro{relax}. In page styles already defined with +\Package{scrlayer}, such destroyed layers are ignored. Destroyed layers can be +redefined using \DescRef{\LabelBase.cmd.DeclareNewLayer} or +\DescRef{\LabelBase.cmd.ProvideLayer}, but they can no longer be changed using +\DescRef{\LabelBase.cmd.RedeclareLayer} or +\DescRef{\LabelBase.cmd.ModifyLayer}.% +\iffalse % See the note at the beginning of the end user interface section +\par +The command is intended to be used inside +\DescRef{\LabelBase.cmd.scrlayerOnAutoRemoveInterface} (see +\autoref{sec:scrlayer.enduserinterfaces}, +\DescPageRef{scrlayer.cmd.scrlayerOnAutoRemoveInterface}) +to remove layers defined using removable macros of an interface along with +that interface.% +\fi +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{draft}{simple switch} + \Macro{layercontentsmeasure}% +\end{Declaration} +The \KOMAScript{} option \Option{draft} can be used to active the draft mode +of \Package{scrlayer}. The draft mode uses the \Macro{layercontentsmeasure} +command to print a ruler at each layer edge, of which the top and left one is +labelled in centimetres and the right and bottom one in inches. The rulers are +drawn behind the content of each layer. This command can also be used as +exclusive content of a layer.% +\EndIndexGroup + + +\section{Declaring and Managing Page Styles} +\seclabel{pagestyles} + +\BeginIndexGroup +\BeginIndex{}{page>style}% +We now understand how to define and manage layers, but so far we do not know +how they are used. The possibly surprising answer is, with page styles. In +\LaTeX{}, page styles usually define headers and footers of the page. + +The header and footer of odd or right-hand pages\textnote{even or odd page} +are printed on pages with odd page numbers in two-sided printing or on all +pages in one-sided printing. This is directly comparable to the layer +options\important[i]{\Option{evenpage}\\\Option{oddpage}} \Option{oddpage} and +\Option{evenpage}. + +The page header\textnote{header or footer} is output before the main page +contents. The page footer is output after the main page contents. This +corresponds directly to the layer +options\important[i]{\Option{background}\\\Option{foreground}} +\Option{background} and \Option{foreground}. + +Therefore it makes sense to define page styles as lists of layers. But instead +of just the four options mentioned above, you can use all the properties +explained in \autoref{sec:scrlayer.layers}, \autoref{tab:scrlayer.layerkeys}, +on \autopageref{tab:scrlayer.layerkeys}. + +As a result of these considerations, layer page +styles\textnote{layer page style}\Index{page style>layer}% +\Index{layer>page style}\Index{page>style} are one type of page style that +\Package{scrlayer} provides. A layer page style consists of layers as well as +several hooks. The layers have already been described in +\autoref{sec:scrlayer.layers}. The hooks\Index[indexmain]{hooks}% +\textnote{hooks} are points in the expansion or execution of page styles to +which you can add code. Experienced users already know this concept from +commands like \Macro{AtBeginDocument} (see \cite{latex:usrguide}) or +\DescRef{scrlfile.cmd.BeforeClosingMainAux} (see +\DescPageRef{scrlfile.cmd.BeforeClosingMainAux}). + +Page-style aliases are another type of page style which \Package{scrlayer} +provides. A page-style alias is actually a different page style. In other +words, the name of a page-style alias is an alternative name for another +page-style alias or for a page style. As a result, manipulating a page-style +alias results in manipulating the original page style. If the original page +style is itself an alias, its manipulation again results in the manipulation +of the alias's original page style, and so on until a real page style is +finally changed. The term \emph{real page style}\textnote{real page style} is +used to distinguish it from a page-style alias. All page styles that are not +page-style aliases are real page styles. Aliases can be defined for all page +styles, not just those defined with \Package{scrlayer}. + +\begin{Declaration} + \Macro{currentpagestyle} + \Macro{toplevelpagestyle} +\end{Declaration} +The \Package{scrlayer} package patches the \DescRef{maincls.cmd.pagestyle} +command so that it sets \Macro{currentpagestyle} to the currently active page +style. Note that \DescRef{maincls.cmd.thispagestyle} does not change +\Macro{currentpagestyle}. If you use \DescRef{maincls.cmd.thispagestyle}, +however, \Macro{currentpagestyle} can change within the \LaTeX{} output +routine. However, this change will only occur if \Macro{currentpagestyle} has +been actively protected from expansion until the execution of the output +routine. + +Note that the layer page styles described later in this section do not rely on +this \DescRef{maincls.cmd.pagestyle} extension because they redefine +\Macro{currentpagestyle} themselves. This patch was made so that other, +non-\Package{scrlayer} page styles can use \Macro{currentpagestyle}. +Additionally, \Macro{currentpagestyle} is empty after loading +\Package{scrlayer} and before using \DescRef{maincls.cmd.pagestyle} for the +first time. Therefore, when defining an end-user interface, you may find it +useful to set the current page style to a default with an implicit +\DescRef{maincls.cmd.pagestyle} statement. + +If \DescRef{maincls.cmd.pagestyle} activates an alias page style, +\Macro{currentpagestyle} shows not the alternative name but the name of +the real page style. You\ChangedAt{v3.16}{\Package{scrlayer}} can get the +alternative name using \Macro{toplevelpagestyle}. However, it is not +recommended to define page styles that produce different results depending on +\Macro{toplevelpagestyle}, e.\,g., using \DescRef{scrbase.cmd.Ifstr}. If you +were to activate such a page style using \DescRef{maincls.cmd.thispagestyle} +you could get the wrong result.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{BeforeSelectAnyPageStyle}\Parameter{code}% + \Macro{AfterSelectAnyPageStyle}\Parameter{code}% +\end{Declaration} +The \Macro{BeforeSelectAnyPageStyle} command adds \PName{code} to the hook% +\textnote{hook} that will be executed inside \DescRef{maincls.cmd.pagestyle}, +just before the page style is selected. Within the \PName{code}, you can use +\texttt{\#1} as a place-holder for the argument of +\DescRef{maincls.cmd.pagestyle}. + +The \Macro{AfterSelectAnyPageStyle} command works similarly, but the +\PName{code} will be executed just after the page style has been selected and +after \DescRef{\LabelBase.cmd.currentpagestyle} has been set to the name of +the real page style. + +Note\textnote{Attention!} that the \PName{code} of both commands is executed +only if a page style is selected with \DescRef{maincls.cmd.pagestyle} and not +if it is chosen in a different way, e.\,g., using +\DescRef{maincls.cmd.thispagestyle}. Note also that you cannot remove +\PName{code} from the hook after adding it. But the \PName{code} will be added +locally, so you can use a group to limit the scope of the \PName{code}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DeclarePageStyleAlias}\Parameter{page~style~alias~name} + \Parameter{original~page~style~name} + \Macro{DeclareNewPageStyleAlias}\Parameter{page~style~alias~name} + \Parameter{original~page~style~name} + \Macro{ProvidePageStyleAlias}\Parameter{page~style~alias~name} + \Parameter{original~page~style~name} + \Macro{RedeclarePageStyleAlias}\Parameter{page~style~alias~name} + \Parameter{original page style name} +\end{Declaration} +\BeginIndex{}{page style>alias}% +\BeginIndex{}{alias>page style}% +These commands can be used to define a page style with name \PName{page style + alias name} that is simply an alias for an existing page style with the +name \PName{original page style name}. If there is already a page style +\PName{page style alias name}, using \Macro{DeclarePageStyleAlias} or +\Macro{RedeclarePageStyleAlias} will destroy the alias before recreating it. + +\Macro{DeclareNewPageStyleAlias} will throw an error message if a page style +\PName{page style alias name} has already been defined. It does not matter if +the previously defined page style is a layer-page style, a page style alias, +or another page style. + +\Macro{ProvidePageStyleAlias} will define the alias only if the +\PName{page style alias name} page style has not been defined before. If the +\PName{page style alias name} page style already exists, nothing will be done. + +\Macro{RedeclarePageStyleAlias} expects an existing +\PName{page style alias name} page style. It will destroy that page style and +afterwards define the alias. If the \PName{page style alias name} page style +does not exist, you will get an error.% +\iffree{\csname @tempswafalse\endcsname}{\csname @tempswatrue\endcsname}% +\csname if@tempswa\endcsname% Umbruchkorrekturtext + \begin{Example} + Suppose you write a class and use the \PageStyle{chapter} page style for the + first page of each chapter. By default, this page style should match the + \PageStyle{plain} page style. Therefore, you can use the \Package{scrlayer} + package and use +\begin{lstcode} + \DeclareNewPageStyleAlias{chapter}{plain} +\end{lstcode} + to define the \PageStyle{chapter} page style as an alias for the + \PageStyle{plain} page style. If, on the other hand, you later decide that + the \PageStyle{chapter} plage style should correspond to the + \PageStyle{empty} page style, you can achieve this with: +\begin{lstcode} + \RedeclarePageStyleAlias{chapter}{empty} +\end{lstcode}% + \end{Example}% +\fi +\EndIndexGroup + + +\begin{Declaration} + \Macro{DestroyPageStyleAlias}\Parameter{page~style~name}% +\end{Declaration} +\BeginIndex{}{page style>alias}% +\BeginIndex{}{alias>page style}% +This command renders the page style named \PName{page style name} undefined +for \LaTeX{} if it is an alias for another page style. Afterwards, the page +style can be newly defined with +\DescRef{\LabelBase.cmd.DeclareNewPageStyleAlias} or +\DescRef{\LabelBase.cmd.ProvidePageStyleAlias}.% +\iffalse % See the note at the beginning of the end user interface section +\par +This command is intended to be used inside the argument code of +\DescRef{\LabelBase.cmd.scrlayerOnAutoRemoveInterface} to remove page styles +that have been declared as part of an end-user interface when removing this +interface automatically.% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{GetRealPageStyle}\Parameter{page~style~name}% +\end{Declaration} +\BeginIndex{}{page style>alias}% +\BeginIndex{}{alias>page style}% +This command will result in the (recursive) real page name of the page style +if \PName{page style name} is an alias of another page style. In all other +cases, even if there's no alias and no page style named \PName{page style + name}, the result is simply \PName{page style name}. The command is fully +expandable and may be used, e.g., in the second argument of \Macro{edef}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DeclarePageStyleByLayers}\OParameter{option list} + \Parameter{page style name} + \Parameter{layer list} + \Macro{DeclareNewPageStyleByLayers}\OParameter{option list} + \Parameter{page style name} + \Parameter{layer list} + \Macro{ProvidePageStyleByLayers}\OParameter{option list} + \Parameter{page style name} + \Parameter{layer list} + \Macro{RedeclarePageStyleByLayers}\OParameter{option list} + \Parameter{page style name} + \Parameter{layer list} +\end{Declaration} +\BeginIndex{}{page style>layers}% +\BeginIndex{}{layers>page style}% +These commands declare a page style named \PName{page style name}. The page +style will consist of the layers given in \PName{layer list}, a comma +separated list of layer names. Note\textnote{Attention!} that the \PName{page + style name} and the layer names in the \PName{layer list} must be fully +expandable and should expand to letters. Several other characters are also +accepted, but their use is recommended only for experienced users. + +The \PName{option list} is a comma-separated list of options in the form +\texttt{\PName{key}=\PName{value}}. These options may be used to set +additional features. Currently they are used to set the code that should be +expanded or executed at several hooks\Index{hooks}. See the introduction to +this section for more general information about hooks. See +\autoref{tab:scrlayer.pagestyle.hooks} for detailed information on specific +hooks. + +\begin{desclist} + \desccaption{% + Hook options for page styles (in order of + execution)\label{tab:scrlayer.pagestyle.hooks}% + }{% + Hook options for page styles (\emph{continued})% + }% + \entry{\OptionVName{onselect}{code}}{% + The \PName{code} of this hook\Index{hook} is executed whenever the page + style is selected, for example with \DescRef{maincls.cmd.pagestyle}. Note + that \DescRef{maincls.cmd.thispagestyle} itself does not directly select a + page style. In this case, the page style is only activated within \LaTeX's + output routine.% + }% + \entry{\OptionVName{oninit}{code}}{% + The \PName{code} of this hook\Index{hook} is executed whenever the output + of the page style's layers is initialised. Note that this happens twice + for each page: once for background layers and once for foreground layers.% + }% + \entry{\OptionVName{ononeside}{code}}{% + The \PName{code} of this hook\Index{hook} is executed whenever the output + of the page style's layers in one-sided printing is initialised. Note that + this happens twice for each page: once for background layers and once for + foreground layers.% + }% + \entry{\OptionVName{ontwoside}{code}}{% + The \PName{code} of this hook\Index{hook} is executed whenever the output + of the page style's layers in two-sided printing is initialised. Note that + this happens twice for each page: once for background layers and once for + foreground layers.% + }% + \entry{\OptionVName{onoddpage}{code}}{% + The \PName{code} of this hook\Index{hook} is executed whenever the output + of the page style's layers on an odd page is initialised. Note that this + happens twice for each page: once for background layers and once for + foreground layers. Note also that in one-sided printing all pages are odd + pages, not just those with odd page numbers.% + }% + \entry{\OptionVName{onevenpage}{code}}{% + The \PName{code} of this hook\Index{hook} is executed whenever the output + of the page style's layers on an even page is initialised. Note that this + happens twice for each page: once for background layers and once for + foreground layers. Note also that in one-sided printing there are no even + pages. Instead, all pages are treated as odd pages, not just those with + odd page numbers.% + }% + \entry{\OptionVName{onfloatpage}{code}}{% + The \PName{code} of this hook\Index{hook} is executed whenever the output + of the page style's layers on a float page is initialised. Note that this + happens twice for each page: once for background layers and once for + foreground layers. Note also that float pages are only those pages with + one or more p-placed floating environments.% + }% + \entry{\OptionVName{onnonfloatpage}{code}}{% + The \PName{code} of this hook\Index{hook} is executed whenever the output + of the page style's layers on a non-float page is initialised. Note that + this happens twice for each page: once for background layers and once for + foreground layers. Note also that float pages are only the pages on which + one or more p-placed floating environments are output. Other pages may + well have t-, h-, or b-placed floating environments.% + }% + \entry{\OptionVName{onbackground}{code}}{% + The \PName{code} of this hook\Index{hook} is executed whenever the output + of the page style's background layers is initialised. Note that this + happens once each page.% + }% + \entry{\OptionVName{onforeground}{code}}{% + The \PName{code} of this hook\Index{hook} is executed whenever the output + of the page style's foreground layers is initialised. Note that this + happens once each page.% + }% +\end{desclist} + +\iffalse% Umbruchvarianten + While the \Macro{DeclarePageStyleByLayers} command always defines the page + style, \Macro{DeclareNewPageStyleByLayers} generates an error message if a + page style with the same name already exists. Note\textnote{Attention!} that + the declaration of a page style that is already an alias for another page + style (see, for example, \Macro{DeclareAliasPageStyle} earlier in this + section) will redefine not the specified page style alias but the real page + style (see \DescRef{\LabelBase.cmd.GetRealPageStyle} earlier in this + section).% +\else% + The \Macro{DeclarePageStyleByLayers} command defines the page style + regardless of whether a page style of \PName{page style name} already + exists. If necessary, the existing page style is completely + redefined. However, if a page style alias \PName{page style name} already + exists, the associated real page style, not the page style alias itself, is + redefined (see \DescRef{\LabelBase.cmd.GetRealPageStyle} earlier in this + section). + + The \Macro{DeclareNewPageStyleByLayers} command differs if a page style of + the same name already exists. Regardless of whether it is a real or an alias + page style, an error will be reported in this case. +\fi + +In contrast, \Macro{ProvidePageStyleByLayers} preserves the page style +unchanged if a page style with name \PName{page style name} already exists. If +no such page style exists, it is defined as in +\Macro{DeclarePageStyleByLayers}. + +The \Macro{RedeclarePageStyleByLayers} in turn expects that a page style of +of the name \PName{page style name} already exists and then redefines its real +page style. However, if no page style of the specified name exists, an error +message results. + +Also note the remarks below about the pseudo-page style +\PageStyle{@everystyle@}.% +\EndIndexGroup + + +\begin{Declaration} + \PageStyle{@everystyle@}% + \PageStyle{empty} +\end{Declaration} +\BeginIndex{}{page style>layers}% +\BeginIndex{}{layers>page style}% +The \Package{scrlayer} package defines two specific page styles worth noting. +The first of these is \PageStyle{@everystyle@}% +\important{\PageStyle{@everystyle@}}. This page style should never be used +like a normal page style, for example with \DescRef{maincls.cmd.pagestyle} or +\DescRef{maincls.cmd.thispagestyle}, or as the target of a page-style alias. +Instead, the layers and hooks\Index{hooks} of this page style are used by all +other layer page styles. The hooks of \PageStyle{@everystyle@} are placed in +front of their respective hooks, and the layers in front of the respective +layers, of the active page style. + +Thus adding a layer to the pseudo-page style \PageStyle{@everystyle@} or code +to a hook of this page style is like adding a layer or hook code to all layer +page styles, even the empty one. There's one crucial difference: commands that +reference the layers of a page style which include +\DescRef{\LabelBase.cmd.ForEachLayerOfPageStyle}, e.\,g., the commands +\DescRef{\LabelBase.cmd.AddLayersToPageStyleBeforeLayer} or +\DescRef{\LabelBase.cmd.AddLayersToPageStyleAfterLayer}, disregard the layers +of the page style \PageStyle{@everystyle@} when applied to a different layer +page style. + +The second, slightly different page style is \PageStyle{empty}. Normally the +\LaTeX{} kernel defines the \PageStyle{empty} page style to have an empty +header and footer. The \Package{scrlayer} package redefines this page style as +a layerless page style. Nonetheless, you can use it like any other layer page +style. The main advantage of the layer page style over the original page +style from the \LaTeX{} kernel is that it also executes the hooks and layers +of the psuedo-layer page style \PageStyle{@everystyle@}.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{onpsselect}{code}% + \OptionVName{onpsinit}{code}% + \OptionVName{onpsoneside}{code}% + \OptionVName{onpstwoside}{code}% + \OptionVName{onpsoddpage}{code}% + \OptionVName{onpsevenpage}{code}% + \OptionVName{onpsfloatpage}{code}% + \OptionVName{onpsnonfloatpage}{code}% + \OptionVName{onpsbackground}{code}% + \OptionVName{onpsforeground}{code} +\end{Declaration} +\BeginIndex{}{page style>layers}% +\BeginIndex{}{layers>page style}% +There is also a \KOMAScript{} option for each of the hooks\Index{hooks} in +\autoref{tab:scrlayer.pagestyle.hooks}% +\iftrue +. The names of the \KOMAScript{} options are similar to those for declaring +page style layers, except that a ``\texttt{ps}'' is inserted after +``\texttt{on}'' at the beginning of the name +\else +, into the names of which a ``\texttt{ps}'' is inserted +\fi +. The values of these \KOMAScript{} options are used as the initial values for +the corresponding hooks. These initial values are then extended by all the +values assigned to the corresponding hooks in the \PName{option list} of the +declaration commands. You can remove the default with +\DescRef{\LabelBase.cmd.ModifyLayerPageStyleOptions}, which is explained later +in this section.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{singlespacing}{simple switch} +\end{Declaration} +If\ChangedAt{v3.24}{\Package{scrlayer}\and \Package{scrlayer-scrpage}} a +document is printed with increased line spacing, e.\,g., using the +\Package{setspace}\IndexPackage{setspace}\important{\Package{setspace}} +package, it is often undesirable for the header and footer to be printed with +this increased spacing. This is particularly true if the header and footer +consist of only a single line. In this case you can use \KOMAScript{} option +\Option{singlespacing}. However, the default\textnote{default} is +\OptionValue{singlespacing}{false}! The option generally applies to all layer +page styles. If you want single-spacing for only some page styles, use +\OptionValue{oninit}{\Macro{linespread}\PParameter{1}\Macro{selectfont}} for +those page styles.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{deactivatepagestylelayers}{simple switch}% + \Macro{ForEachLayerOfPageStyle}\Parameter{page style name}\Parameter{code}% + \Macro{ForEachLayerOfPageStyle*}\Parameter{page style name}\Parameter{code} +\end{Declaration} +\BeginIndex{}{page style>layers}% +\BeginIndex{}{layers>page style}% +As long as the \KOMAScript{} option \Option{deactivatepagestylelayers} is not +enabled, the \Macro{ForEachLayerOfPageStyle} command can execute arbitrary +\PName{code} for each layer of the page style named \PName{page style name}. +Inside of \PName{code}, the place holder \PValue{\#1} serves as a +reference to the name of the current layer. +\begin{Example} + If you want to print the names of all layers of the \PValue{scrheadings} + page style as a comma-separated list, you can use: +\begin{lstcode} + \let\commaatlist\empty + \ForEachLayerOfPageStyle{scrheadings}{% + \commaatlist#1\gdef\commaatlist{, }} +\end{lstcode} +\end{Example} +In\textnote{Attention!} the example above, we had to use \Macro{gdef} instead +of \Macro{def} because \Macro{ForEachLayerOfPageStyle} executes the +\PName{code} inside a group to minimise side effects. However, \Macro{gdef} +redefines \Macro{commaatlist} globally so the change will persist when the +\PName{code} for the next layer is executed. + +Alternatively,\ChangedAt{v3.18}{\Package{scrlayer}} you can use \Macro{def} +with the starred variant \Macro{ForEachLayerOfPageStyle*}. This form dispenses +with the extra group when executing \PName{code}. However, the user then has +to take make sure that the \PName{code} has no unwanted side effects. In +particular, deactivating all layers using +\OptionValue{deactivatepagestylelayers}{true} within \PName{code} would +persist beyond the call to \Macro{ForEachLayerOfPageStyle*}. + +Various \Package{scrlayer} commands also use \Macro{ForEachLayerOfPageStyle} +internally. Their behaviour can therefore also be changed using the +\KOMAScript{} option \Option{deactivatepagestylelayers}. With this option, +you can temporarily disable and thus hide all layers of all layer page +styles.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AddLayersToPageStyle}% + \Parameter{page style name}\Parameter{layer list}% + \Macro{AddLayersAtBeginOfPageStyle}% + \Parameter{page style name}\Parameter{layer list}% + \Macro{AddLayersAtEndOfPageStyle}% + \Parameter{page style name}\Parameter{layer list}% + \Macro{RemoveLayersFromPageStyle}% + \Parameter{page style name}\Parameter{layer list}% +\end{Declaration} +\BeginIndex{}{page style>layers}% +\BeginIndex{}{layers>page style}% +You can use these commands to add layers to a layer page style or to remove +layers from a layer page style. The page style is referenced by its +\PName{page style name}. The layers are given by a comma-separated +\PName{layer list}. + +Both the \Macro{AddLayersToPageStyle} and the +\Macro{AddLayersAtEndOfPageStyle}\textnote{add at the end} commands insert the +new layers at the bottom of the page style's layer list. Logically, the newly +added layers lie above or in front of the old layers. Background layers, of +course, still are logically behind the text layer and thus behind all +foreground layers. + +In contrast, the \Macro{AddLayersAtBeginOfPageStyle}\textnote{add at the + beginning} command inserts the new layers at the top of the page style's +layer list. The layers are separately inserted to the top of the list in the +same order they appear in the \PName{layer list} parameter. This means that +the last layer in the \PName{layer list} parameter will become the first, and +thus the lowest, layer of the page style. + +\iffalse% Umbruchkorrekturtext (beim Aktiveren muss unten \textnote{remove} +% entfernt werden!) +The \Macro{RemoveLayersFromPageStyle} command is exactly the opposite. It +removes\textnote{remove} the specified page-style levels.% +\fi + +The \Macro{RemoveLayersFromPageStyle}\textnote{remove} command removes layers +from the layer list of the page style named \PName{page style name}. +Attempting to remove layers which are not part of the page style's layer list +will be ignored. But attempting to add layers to or remove layers from a page +style that is neither a layer page style nor a page-style alias is an error +and will be reported as such.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AddLayersToPageStyleBeforeLayer}% + \Parameter{page style name}\Parameter{layer list}% + \Parameter{reference layer name}% + \Macro{AddLayersToPageStyleAfterLayer}% + \Parameter{page style name}\Parameter{layer list}% + \Parameter{reference layer name} +\end{Declaration} +\BeginIndex{}{page style>layers}% +\BeginIndex{}{layers>page style}% +\iffalse% Umbruchvarianten +These two commands are similar to the previous ones, but they take an +additional parameter, \Parameter{reference layer name}. The layer list of +the page style named in \Parameter{page style name} is searched for this +reference layer. % +\else% +These commands are similar to the previous ones. The existing layers of the +page style, however, are searched for the \PName{reference layer name}. % +\fi% +The layers in the \Parameter{layer list} parameter are then inserted +before\textnote{add before/after layer} or after this reference layer% +\iffalse% Umbruchkorrekturtext +in the layers of the page style% +\fi% +. The order of the layers in the \PName{layer list} is retained. + +If the reference layer named \PName{reference layer name} is not part of the +given page style, nothing is inserted. On the other hand, if the page style is +neither a layer page style nor a page-style alias, an error will be reported.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{UnifyLayersAtPageStyle}\Parameter{page style name} +\end{Declaration} +\BeginIndex{}{page style>layers}% +\BeginIndex{}{layers>page style}% +The commands for defining page styles or adding layers to a page style do not +care how many times a layer appears in a page style, so it is quite +permissible for a layer to appear multiple times. In most cases, however, it +does not make sense to use the same layer several times in one page style. +Therefore, you can use \Macro{UnifyLayersAtPageStyle} to remove all layer +duplicates from the layer page style of the specified \Parameter{page style + name}. + +Note\textnote{Attention!} that this function can change the order of layers. +So if you need a specific order, you should remove all layers and add the +layers in the order you want instead of using \Macro{UnifyLayersAtPageStyle}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{ModifyLayerPageStyleOptions}% + \Parameter{page style name}\Parameter{option list}% + \Macro{AddToLayerPageStyleOptions}% + \Parameter{page style name}\Parameter{option list} +\end{Declaration} +\BeginIndex{}{page style>layers}% +\BeginIndex{}{layers>page style}% +These two commands can be used to modify the options, and thus the +hooks\Index{hooks}, of a layer page style. With +\Macro{ModifyLayerPageStyleOptions}\textnote{change page-style options}, only +the options in the comma-separated \PName{option list} will be set to the new +values given there. The previous values are lost. All options from +\autoref{tab:scrlayer.pagestyle.hooks}, +\autopageref{tab:scrlayer.pagestyle.hooks} are allowed. Options or hooks that +are not specified in the \PName{option list} will remain unchanged. If you +want to set an option to do nothing you can set it to the value \Macro{relax}. +Setting an option to a new value using \Macro{ModifyLayerPageStyleOptions} +will remove the previous value, including the global default value. This +statement is the only way to remove the global defaults of the \KOMAScript{} +options from a page style. + +\Macro{AddToLayerPageStyleOptions}\textnote{extend page-style options}, on the +other hand, does not overwrite the previous values. Instead it adds\,---\,or, +more precisely, concatenates\,---\, the new values to old ones.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfLayerPageStyleExists}% + \Parameter{page style name}\Parameter{then code}\Parameter{else code}% + \Macro{IfRealLayerPageStyleExists}%^ + \Parameter{page style name}\Parameter{then code}\Parameter{else code}% +\end{Declaration} +\BeginIndex{}{page style>layers}% +\BeginIndex{}{layers>page style}% +With these commands, you can execute code depending on whether a page style is +a layer page style or not. The \Macro{IfLayerPageStyleExists} command executes +the \PName{then code} if \PName{page style name} is the name of a layer page +style or a page-style alias that results in a layer page style. Otherwise, the +command executes the \PName{else code}. Internally, this command is often used +to throw an error message if you use one of the layer page style commands with +an \PName{page style name} that does not correspond to a layer page style. + +The \Macro{IfRealLayerPageStyleExists} command goes one step further and +executes the \PName{then code} only if the page style specified by \PName{page + style name} is itself a layer page style. So if \PName{page style name} is a +page-style alias, this command executes the \PName{else code} even if the +alias resolves to a real layer page style.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{IfLayerAtPageStyle}% + \Parameter{page style name}\Parameter{layer name}% + \Parameter{then code}\Parameter{else code}% + \Macro{IfSomeLayerAtPageStyle}% + \Parameter{page style name}\Parameter{layer list}%^ + \Parameter{then code}\Parameter{else code}% + \Macro{IfLayersAtPageStyle}% + \Parameter{page style name}\Parameter{layer list}% + \Parameter{then code}\Parameter{else code}% +\end{Declaration} +\BeginIndex{}{page style>layers}% +\BeginIndex{}{layers>page style}% +These commands can be used to test whether one or more layers are part of a +page style. The \Macro{IfLayerAtPageStyle} command expects exactly one +\PName{layer name}\textnote{exactly one layer} as the second argument. If this +layer is part of the page style specified in \PName{page style name}, the +\PName{then code} will be executed. Otherwise, the \PName{else code} will be +executed. + +The \Macro{IfSomeLayerAtPageStyle} and \Macro{IfLayersAtPageStyle} commands +allow a comma-separated \PName{layer list}. \Macro{IfSomeLayerAtPageStyle} +will execute the \PName{then code} if \emph{at least one} of the layers in the +\PName{layer list} parameter is part of the layer list of \PName{page style + name}. In contrast, \Macro{IfLayersAtPageStyle} executes the \PName{then + code} only if \emph{all} the layers in the \PName{layer list} parameter are +part of the page style. If the condition is not met, the \PName{else code} +will be executed. + +With suitable nesting of these commands, you can construct complex conditions. +If you use only one \PName{layer name} in the \PName{layer list}, all three +statements are synonymous.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DestroyRealLayerPageStyle}\Parameter{page style name} +\end{Declaration} +\BeginIndex{}{page style>layers}% +\BeginIndex{}{layers>page style}% +\iftrue +This statement makes a layer page style undefined. If a page-style alias or +ordinary page style is specified, the command is ignored. +\else +With this command you can remove a the definition of a layer page style. +However, this only occurs if a layer page style named \PName{page style name} +exists. If, instead, it is a page-style alias, a different (non-layer) page +style, or not a page style at all, nothing happens; the command is ignored.% +\fi + +If \PName{page style name} is the name of the current page style, the current +page style will becomes a kind of empty page style. If the page style set with +\DescRef{maincls.cmd.thispagestyle} is \PName{page style name}, it will simply +be reset. The previous \DescRef{maincls.cmd.thispagestyle} command loses its +current effect. + +Note\textnote{Attention!} that the layers of the page style are not destroyed +automatically. If you want to destroy the layers too, you can do this with: +\begin{lstcode} + \ForEachLayerOfPageStyle{...}{\DestroyLayer{#1}} +\end{lstcode} +before destroying the layer page style itself.% +\iffalse % See the note at the beginning of the end user interface section +\par +The command is intended to be used within the \PName{code} argument of +\DescRef{\LabelBase.cmd.scrlayerOnAutoRemoveInterface} to remove page styles +that are defined as part of an end-user interface. See +\autoref{sec:scrlayer.enduserinterfaces} below for more information about +auto-removal code.% +\fi% +\EndIndexGroup +\EndIndexGroup + +\LoadCommonFile{headfootheight}% \section{Height of Page Head and Foot} + +\LoadCommonFile{pagestylemanipulation}% \section{Manipulation of Defined Page Styles} + +\section{Defining and Managing Interfaces for End Users} +\seclabel{enduserinterfaces} + +\iftrue% The whole mechanism is deprecated and should not be used any + % longer. So the documentation is also deactivated. +% TODO: Fix new translation +Until version 3.27\ChangedAt{v3.28}{\Package{scrlayer}} package +\Package{scrlayer} provided mechanism to manage concurrent end user +interfaces. The mechanism has been marked as experimental and the usability +limited. Only \KOMAScript{} itself has used this mechanism and from version +3.28 it is marked as deprecated. So the commands +\Macro{scrlayerInitInterface}\IndexCmd{scrlayerInitInterface}, +\Macro{scrlayerAddToInterface}\IndexCmd{scrlayerAddToInterface}, +\Macro{scrlayerAddCsToInterface}\IndexCmd{scrlayerAddCsToInterface}, +\Macro{scrlayerOnAutoRemoveInterface}\IndexCmd{scrlayerOnAutoRemoveInterface}% +\important{\Macro{scrlayerOnAutoRemoveInterface}} +and the options +\Option{forceoverwrite}\IndexOption{forceoverwrite}, +\Option{autoremoveinterfaces}\IndexOption{autoremoveinterfaces} +should not be used any longer.% +% :ODOT +\else% +The \Package{scrlayer} package provides an experimental interface to define +and manage (concurrent) interfaces for end users. \iffree{In the long run, + this interface may disappear from \Package{scrlayer} and be taken over by + \Package{scrbase} instead.}{} Currently, this interface is highly +experimental% +\iffree{ and therefore \Package{scrlayer} provides these interface commands + only for the use of subpackages of \Package{scrlayer}}{}% +. Given the current state of development, you should not depend on automatic +removal of a concurrent interface to work. Instead, you should avoid using +concurrent end-user interfaces. + +This section only describes the interface commands for defining an end-user +interface. For end users themselves, it is of little interest. Rather, this +section is intended for authors of packages and classes that build on +\Package{scrlayer}. End users will find information about specific end-user +interfaces in \autoref{cha:scrlayer-scrpage}, +\autoref{cha:scrlayer-scrpage-experts}, and \autoref{cha:scrlayer-notecolumn}. + +\begin{Declaration} + \Macro{scrlayerInitInterface}\OParameter{interface name} +\end{Declaration} +The \Macro{scrlayerInitInterface} command registers a new interface named +\PName{interface name}. The \PName{interface name} must be unique. If an +interface with the same name has already been registered, an error will occur. + +This command should always appear as the first command when defining an +end-user interface and therefore is described here first. If the optional +argument\,---\,including the square brackets\,---\,is omitted, +\PValue{\Macro{@currname}.\Macro{@currext}} will be used instead. For classes +and packages, this is the file name of the class or package. But of course you +can use any other sequence of characters with a category of \emph{letter} or +\emph{other}. This is useful, for example, when a class or package defines +multiple end-user interfaces% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{forceoverwrite}{simple switch}% + \OptionVName{autoremoveinterfaces}{simple switch}% + \Macro{scrlayerAddToInterface}% + \OParameter{interface name}\Parameter{command}\Parameter{code}% + \Macro{scrlayerAddCsToInterface}% + \OParameter{interface name}\Parameter{command sequence}\Parameter{code} +\end{Declaration} +One of the special features of \Package{scrlayer}'s end user interfaces is +that they should register all interface-dependent commands (also known as +\emph{macros}). You can do this using \Macro{scrlayerAddToInterface}. The +optional argument \PName{interface name} must be an interface name previously +registered with \DescRef{\LabelBase.cmd.scrlayerInitInterface}. An error will +occur if the interface has not been initialised. + +If\textnote{Attention!} your interface defines macros not just when the class +or package is being loaded but also at runtime, you must provide the interface +name in the optional argument even if it corresponds to the file name of the +class or package, since the values of \Macro{@currname} and \Macro{@currext} +are only valid while the class or package is being loaded. + +The first mandatory argument is the \PName{command}\footnote{The + \PName{command} consists of a backslash followed by a \PName{command + sequence} that consists of characters of the category code \emph{letter}, + or of exactly one character of the category \emph{other}, or of a character + of the category \emph{active} (without the backslash).} to be added to the +interface. If the command can be defined, this will be done. In addition, it +will set to \Macro{relax} and \PName{code} will be executed. Within +\PName{code}, you can then define \PName{command}, e.\,g., using +\Macro{newcommand}. + +But when can a command be defined? If a command is undefined or \Macro{relax}, +it can always be defined. If a command has already been defined \emph{and} +registered for another interface \emph{and} if the \KOMAScript{} option +\Option{autoremoveinterfaces} has been activated, the other interface will be +removed automatically, and the \PName{command} will be set to \Macro{relax} +and registered for the new interface specified. If a \PName{command} is +already defined but is \emph{not} part of another interface, \emph{and} if the +\KOMAScript{} option \Option{forceoverwrite} has been activated, the +\PName{command} is also set to \Macro{relax} and registered for the specified +interface. In all other cases, however, the command is not definable, in +particular if it is already defined and the \KOMAScript{} options +\Option{autoremoveinterfaces} and \Option{forceoverwrite} are deactivated. + +The \Macro{scrlayerAddCsToInterface} command is similar to +\Macro{scrlayerAddToInterface} but it expects the first argument to be not a +\PName{command} but a command sequence\footnote{A command sequence must be + fully expandable and its expansion must result in characters of the category + code \emph{letter}, \emph{other}, or \emph{space}.}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{scrlayerOnAutoRemoveInterface}% + \OParameter{interface name}\Parameter{code} +\end{Declaration} +The \Macro{scrlayerOnAutoRemoveInterface} command registers \PName{code} to be +executed in the event that the end-user interface with the specified +\PName{interface name} is automatically removed (see +\DescRef{\LabelBase.option.autoremoveinterfaces} earlier in this section). +This can be used, for example, to automatically destroy layers or page styles +that rely on commands from the end-user interface (see +\DescRef{\LabelBase.cmd.DestroyLayer}, +\DescRef{\LabelBase.cmd.DestroyPageStyleAlias}, and +\DescRef{\LabelBase.cmd.DestroyRealLayerPageStyle}). Regarding the default for +the optional argument, please refer to the explanation for +\DescRef{\LabelBase.cmd.scrlayerInitInterface}.% +\EndIndexGroup% +\fi% +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-de.tex b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-de.tex new file mode 100644 index 0000000000..e1da0d969b --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-de.tex @@ -0,0 +1,802 @@ +% ====================================================================== +% scrlayer-notecolumn-de.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrlayer-notecolumn of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ---------------------------------------------------------------------- +% +% Kapitel über scrlayer-notecolumn in der KOMA-Script-Anleitung +% Verwaltet von Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrlayer-notecolumn.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter:scrlayer-notecolumn)] + +\chapter{Notizspalten mit \Package{scrlayer-notecolumn}} +\labelbase{scrlayer-notecolumn} + +\BeginIndexGroup +\BeginIndex{Package}{scrlayer-notecolumn}% +Bis einschließlich Version~3.11b unterstützte \KOMAScript{} Notizspalten nur +in Form der Marginalienspalte, die mit \DescRef{maincls.cmd.marginpar} und +\DescRef{maincls.cmd.marginline} (siehe \autoref{sec:maincls.marginNotes}, +\DescPageRef{maincls.cmd.marginline}) mit Inhalt versehen werden +können. Jene Art der Randnotizen hat allerdings einige Nachteile: +\begin{itemize} +\item Randnotizen können nur vollständig auf einer einzelnen Seite gesetzt + werden. Seitenumbrüche\textnote{Seitenumbruch} innerhalb von Randnotizen + sind nicht möglich. Dies führt teilweise dazu, dass die Randnotizen bis in + den unteren Rand hineinragen. +\item Randnotizen in der Nähe des Seitenumbruchs können auf die nächste Seite + rutschen und dort im Falle des doppelseitigen Layouts mit alternierenden + Marginalienspalten im falschen Rand\textnote{Zuordnung zum richtigen Rand} + ausgegeben werden. Dieses Problem ist mit dem Zusatzpaket + \Package{mparhack}\IndexPackage{mparhack} oder durch Verwendung von + \Macro{marginnote} aus dem Paket + \Package{marginnote}\IndexPackage{marginnote} (siehe + \cite{package:marginnote}) lösbar. +\item Randnotizen innerhalb von Gleitumgebungen\textnote{Gleitumgebungen} oder + Fußnoten\textnote{Fußnoten} sind nicht möglich. Auch dieses Problem ist mit + \Package{marginnote} lösbar. +\item Es gibt nur eine Marginalienspalte\textnote{mehrere Notizspalten} oder + allenfalls zwei, wenn mit \Macro{reversemarginpar} und + \Macro{normalmarginpar} gearbeitet wird, wobei \Macro{reversemarginpar} bei + doppelseitigen Dokumenten kaum zu gebrauchen ist. +\end{itemize} +Die Verwendung von \Package{marginnote}\IndexPackage{marginnote} führt zu +einem weiteren Problem. Da das Paket keine Kollisionserkennung besitzt, können +sich Randnotizen, die in unmittelbarer Nähe veranlasst wurden, gegenseitig +ganz oder teilweise überdecken. Darüber hinaus führt \Macro{marginnote}, je +nach den gewählten Einstellungen von \Package{marginnote}, manchmal zu +Veränderungen beim Zeilenabstand des normalen Textes. + +Das Paket \Package{scrlayer-notecolumn} tritt an, all diese Probleme zu +lösen. Dazu stützt es sich auf die Grundfunktionalität von +\hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer}% +\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}}. Damit geht aber +auch ein Nachteil einher:\textnote{Achtung!} Notizen können nur auf den Seiten +ausgegeben werden, die einen auf \hyperref[cha:scrlayer]{\Package{scrlayer}} +basierenden Seitenstil besitzen. Dieser Nachteil lässt sich mit Hilfe von +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% +\IndexPackage{scrlayer-scrpage} jedoch leicht auf"|lösen oder sogar in einen +Vorteil verwandeln. + + +\section{Hinweise zum Entwicklungsstand} +\seclabel{draft} + +Das Paket wurde ausschließlich zur Demonstration des Potentials von +\hyperref[cha:scrlayer]{\Package{scrlayer}}\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}} +als sogenannter\textnote{Proof of Concept} \emph{Proof of Concept} +entwickelt. Obwohl es sich derzeit noch in einem recht frühen +Entwicklungsstadium befindet, ist die Stabilität von weiten Teilen weniger +eine Frage von \Package{scrlayer-notecolumn} als von +\hyperref[cha:scrlayer]{\Package{scrlayer}}. Dennoch ist davon auszugehen, +dass sich auch in \Package{scrlayer-notecolumn} noch Fehler befinden. Es wird +darum gebeten, diese bei Auf"|finden zu melden. Einige +\emph{Unzulänglichkeiten} des Pakets sind jedoch auch der Minimierung des +Aufwands geschuldet. So können Notizspalten zwar über Seiten hinweg umbrochen +werden, allerdings findet dabei kein neuerlicher Absatzumbruch statt. Dies ist +bei \TeX{} schlicht nicht vorgesehen. + +Da das Paket eher als experimentell\textnote{experimentell} gilt, findet sich +die Anleitung hier im zweiten Teil \iffree{der \KOMAScript-Anleitung}{dieses + Buches}. Dementsprechend richtet sie sich auch in erster Linie an erfahrene +Anwender. Für Anfänger oder Anwender, die sich bereits deutlich auf dem Weg +zum \LaTeX-Experten\textnote{für \LaTeX-Experten} befinden, mag daher einiges +in den nachfolgenden Erklärungen unklar oder gar unverständlich +sein. \iffree{Ich bitte um Nachsicht, dass ich bei experimentellen Paketen den + Aufwand für die Anleitung halbwegs erträglich halten will.}{Sie sollten + jedoch genügen, um einfache Aufgaben mit \Package{scrlayer-notecolumn} lösen + zu können. Gleichzeitig finden Entwickler hoffentlich nützliche Anregungen + für eigene Ideen.} + +\iffalse% Umbruchoptimierung +Es sei auch darauf\textnote{Achtung!} hingewiesen, dass der \KOMAScript-Autor +nicht für die Weiterentwicklung des Pakets garantiert und nur eingeschränkten +Support dafür bietet. Das liegt in der Natur eines Pakets, das nur zu +Demonstrationszwecken geschrieben wurde.% +\fi + +\LoadCommonFile{options}% \section{Frühe oder späte Optionenwahl} + +\LoadCommonFile{textmarkup}% \section{Textauszeichnungen} + +\section{Deklaration neuer Notizspalten} +\seclabel{declaration} + +Beim Laden des Pakets wird bereits automatisch eine Notizspalte namens +\PValue{marginpar} deklariert. Wie der Name andeutet, liegt diese Notizspalte +im Bereich der normalen Marginalienspalte von \DescRef{maincls.cmd.marginpar} +und \DescRef{maincls.cmd.marginline}. Dabei werden auch die Einstellungen +\Macro{reversemarginpar} und \Macro{normalmarginpar} beachtet, allerdings +nicht für die einzelnen Notizen, sondern nur für die gesamten Notizen einer +Seite. Maßgeblich ist die Einstellung, die am Ende der Seite, nämlich +bei der Ausgabe der Notizspalte, gilt. Will man hingegen innerhalb einer Seite +sowohl Notizen links als auch rechts neben dem Haupttext haben, so sollte man +sich eine zweite Notizspalte definieren. + +Die Voreinstellungen für alle neu deklarierten Notizspalten entsprechen im +Übrigen \iffree{}{\pagebreak}% Umbruchkorrektur +den erwähnten Einstellungen für die vordefinierte +\PValue{marginpar}. % +\iftrue% Umbruchoptimierung +Diese können bei der Deklaration jedoch leicht geändert werden.% +\fi + +Es ist zu beachten\textnote{Achtung!}, dass Notizspalten nur auf Seiten +ausgegeben werden, deren Seitenstil auf dem Paket +\hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer}% +\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}} basiert. Das Paket +\hyperref[cha:scrlayer]{\Package{scrlayer}} wird von +\Package{scrlayer-notecolumn} automatisch geladen und stellt in der +Voreinstellung lediglich den Seitenstil +\PageStyle{empty}\IndexPagestyle{empty} bereit. Werden weitere Seitenstile +benötigt, wird zusätzlich das Paket +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} +empfohlen. + +\begin{Declaration} + \Macro{DeclareNoteColumn}\OParameter{Liste~der~Einstellungen} + \Parameter{Name~der~Notizspalte} + \Macro{DeclareNewNoteColumn}\OParameter{Liste~der~Einstellungen} + \Parameter{Name~der~Notizspalte} + \Macro{ProvideNoteColumn}\OParameter{Liste~der~Einstellungen} + \Parameter{Name~der~Notizspalte} + \Macro{RedeclareNoteColumn}\OParameter{Liste~der~Einstellungen} + \Parameter{Name~der~Notizspalte}% +\end{Declaration} +Mit Hilfe dieser Anweisungen können Notizspalten angelegt werden. Dabei +erzeugt \Macro{DeclareNoteColumn} die Notizspalte ungeachtet der Tatsache, ob +sie bereits existiert, während \Macro{DeclareNewNoteColumn} einen +Fehler ausgibt, falls der \PName{Name der Notizspalte} bereits für eine andere +Notizspalte vergeben ist, und \Macro{ProvideNoteColumn} in eben diesem Fall +schlicht nichts tut. Mit \Macro{RedeclareNoteColumn} wiederum kann nur eine +bereits existierende Notiz-Spalte neu konfiguriert werden. + +Bei der Neukonfigurierung bereits existierender Notizspalten mit +\Macro{DeclareNoteColumn} oder \Macro{RedeclareNoteColumn} gehen im Übrigen +die bereits erzeugten Notizen für diese Spalte nicht verloren, sondern bleiben +erhalten. + +\BeginIndex{FontElement}{notecolumn.\PName{Name der Notizspalte}}% +\BeginIndex{FontElement}{notecolumn.marginpar}% +Für neue Notizspalten wird immer ein Element zur Änderung der Schriftattribute +mit \DescRef{\LabelBase.cmd.setkomafont} und \DescRef{\LabelBase.cmd.addtokomafont} angelegt, +falls dieses noch nicht existiert. Als Name für das Element wird +\PValue{notecolumn.}\PName{Name der Notizspalte} verwendet. Dementsprechend +existiert für die vordefinierte Notizspalte \PValue{marginpar} das +Element\textnote{Name des Elements} \PValue{notecolumn.marginpar}. Die +Voreinstellung kann bei der Deklaration einer Notizspalte direkt über die +Option \Option{font} innerhalb der optionalen \PName{Liste der Einstellungen} +angegeben werden.% +\EndIndex{FontElement}{notecolumn.marginpar}% +\EndIndex{FontElement}{notecolumn.\PName{Name der Notizspalte}}% + +Die \PName{Liste der Einstellungen} ist eine durch Komma separierte Liste von +Einstellungen oder Optionen. Die verfügbaren Optionen sind in +\autoref{tab:scrlayer-notecolumn.note.column.options} % +\iffalse % Umbruchkorrektur +\unskip, \autopageref{tab:scrlayer-notecolumn.note.column.options} % +\fi% +zu finden. Als\textnote{Voreinstellung: Option \Option{marginpar}} +Voreinstellung ist \Option{marginpar} immer gesetzt, kann aber durch +individuelle Einstellungen überschrieben werden. + +% +%\begin{table}% Umbruchoptimierung: Tabelle hinter das Beispiel verschoben +\begin{desclist} + \desccaption{% +% \caption[Mögliche Einstellungen für die Deklaration von Notizspalten]{% + Mögliche Einstellungen für die Deklaration von Notizspalten% +% }% + \label{tab:scrlayer-notecolumn.note.column.options}% + }{% + Mögliche Einstellungen für die Deklaration von Notizspalten + (\emph{Fortsetzung})% + }% +% \begin{desctabular} + \entry{\OptionVName{font}{Schriftattribute}}{% + Einstellung der \PName{Schriftattribute} der Notizspalte mit Hilfe von + \DescRef{\LabelBase.cmd.setkomafont}. Für erlaubte Werte sei auf + \autoref{sec:\LabelBase.textmarkup}, + \DescPageRef{\LabelBase.cmd.setkomafont} verwiesen.\par% + Voreinstellung: \emph{leer}% + }% + \entry{\Option{marginpar}}{% + Position und Breite der Notizspalte werden so eingestellt, dass sie der + Marginalienspalte von \DescRef{maincls.cmd.marginpar} entsprechen. Eine + Umschaltung zwischen \Macro{reversemarginpar}\IndexCmd{reversemarginpar} + und \Macro{normalmarginpar}\IndexCmd{normalmarginpar} wird immer nur am + Ende der Seite bei der Ausgabe der Notizspalte beachtet. Es wird darauf + hingewiesen, dass diese Option kein Argument erwartet oder erlaubt.\par% + Voreinstellung: \emph{ja}% + }% + \entry{\Option{normalmarginpar}}{% + Position und Breite der Notizspalte werden so eingestellt, dass sie der + Marginalienspalte von \DescRef{maincls.cmd.marginpar} bei Einstellung + \Macro{normalmarginpar} entsprechen. Es wird darauf hingewiesen, dass + diese Option kein Argument erwartet oder erlaubt.\par% + Voreinstellung: \emph{nein}% + }% + \entry{\OptionVName{position}{Abstand}}{% + Die Notizspalte wird mit \PName{Abstand} vom linken Rand des Papiers + gesetzt. Dabei sind für \PName{Abstand} auch komplexe Ausdrücke + gestattet, solange diese voll expandierbar sind und zum Zeitpunkt der + Ausgabe der Notizspalte zu einer Länge oder zu einem Längenwert oder + einem Längenausdruck expandieren. Siehe + \cite[Abschnitt~3.5]{manual:eTeX} für weitere Informationen zu + Längenausdrücken.\par% + Voreinstellung: \emph{durch Option \Option{marginpar}}% + }% + \entry{\Option{reversemarginpar}}{% + Position und Breite der Notizspalte werden so eingestellt, dass sie der + Marginalienspalte von \DescRef{maincls.cmd.marginpar} bei Einstellung + \Macro{reversemarginpar} entsprechen. Es wird darauf hingewiesen, dass + diese Option kein Argument erwartet oder erlaubt.\par% + Voreinstellung: \emph{nein}% + }% + \entry{\OptionVName{width}{Breite}}{% + Die Notizspalte wird mit der angegebenen Breite gesetzt. Dabei sind für + \PName{Breite} auch komplexe Ausdrücke gestattet, solange diese voll + expandierbar sind und zum Zeitpunkt der Ausgabe der Notizspalte zu einer + Länge oder einem Längenwert oder einem Längenausdruck expandieren. Siehe + \cite[Abschnitt~3.5]{manual:eTeX} für weitere Informationen zu + Längenausdrücken.\par% + Voreinstellung: \emph{durch Option \Option{marginpar}}% + }% +% \end{desctabular} +%\end{table} +\end{desclist} + +Da die Notizspalten mit Hilfe von \hyperref[cha:scrlayer]{\Package{scrlayer}}% +\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}} definiert werden, wird +auch für jede Notizspalte eine Ebene\Index{Ebenen} angelegt. Als +Name\textnote{Name der Ebene} für diese Ebene wird ebenfalls +\PValue{notecolumn.}\PName{Name der Notizspalte} verwendet. Näheres zu Ebenen +ist \autoref{sec:scrlayer.layers}, ab \autopageref{sec:scrlayer.layers} zu +entnehmen. +% +\begin{Example} + Angenommen, Sie sind Professor für ulkiges Recht und wollen eine Abhandlung + über das neue »Gesetz über die ausgelassene Verbreitung allgemeiner Späße«, + kurz GüdaVaS, schreiben. Der Hauptaugenmerk soll dabei jeweils auf dem + Kommentar zu einzelnen Paragraphen liegen. Sie entscheiden sich für ein + zweispaltiges Layout, wobei der Kommentar in der Hauptspalte enthalten sein + soll und die Paragraphen jeweils klein\iffree{ und in Farbe}{} in einer + schmaleren Notizspalte rechts daneben. +\begin{lstcode} + \documentclass{scrartcl} + \usepackage[ngerman]{babel} + + \usepackage[T1]{fontenc} + \usepackage{lmodern} + \usepackage{xcolor} + + \usepackage{scrjura} + \setkomafont{contract.Clause}{\bfseries} + \setkeys{contract}{preskip=-\dp\strutbox} + + \usepackage{scrlayer-scrpage} + \usepackage{scrlayer-notecolumn} + + \newlength{\paragraphscolwidth} + \AfterCalculatingTypearea{% + \setlength{\paragraphscolwidth}{% + .333\textwidth}% + \addtolength{\paragraphscolwidth}{% + -\marginparsep}% + } + \recalctypearea + \DeclareNewNoteColumn[% + position=\oddsidemargin+1in + +.667\textwidth + +\marginparsep, + width=\paragraphscolwidth, + font=\raggedright\footnotesize + \color{blue} + ]{paragraphs} +\end{lstcode} + Es wird ein einseitiger Artikel verfasst. Dazu wird die + Sprache\textnote{Sprache mit \Package{babel}} mit Hilfe + des \Package{babel}\IndexPackage{babel}-Pakets auf Deutsch (neue + Rechtschreibung) festgelegt. Bezüglich der Eingabecodierung wird von UTF-8 + und einer \LaTeX-Version ab 2018-04-01 ausgegangen. Als Schrift + wird Latin Modern in 8-Bit-Codierung verwendet.\iffree{ Für die + Farbeinstellungen wird das Paket \Package{xcolor}\IndexPackage{xcolor} + genutzt.}{} + + Bezüglich des Setzens von Gesetzestexten\textnote{Gesetz mit + \hyperref[cha:scrjura]{\Package{scrjura}}} mit + \hyperref[cha:scrjura]{\Package{scrjura}}\IndexPackage{scrjura} sei auf + \iffree{dessen Anleitung}{\autoref{cha:scrjura}} verwiesen. + + Da ein Seitenstil\textnote{Seitenstil mit + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} mit + Seitenzahl verwendet werden soll, wird das Paket + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + \IndexPackage{scrlayer-scrpage} geladen. Somit können Notizspalten auf allen + Seiten ausgegeben werden. + + Dann wird das Paket \Package{scrlayer-notecolumn}\textnote{Notizspalte mit + \Package{scrlayer-notecolumn}} für die Notizspalten geladen. Die + gewünschte Breite der Notizspalte wird über + \DescRef{typearea-experts.cmd.AfterCalculatingTypearea}% + \IndexPackage{typearea}% + \IndexCmd{AfterCalculatingTypearea} nach jeder etwaigen Neuberechnung des + Satzspiegels\textnote{Satzspiegel mit + \hyperref[cha:typearea]{\Package{typearea}}}% + \IndexPackage{typearea} neu berechnet. Sie soll jeweils ein Drittel der + Satzspiegelbreite betragen, wobei der Abstand zwischen Text und Notizspalte + zu Lasten der Notizspalte geht. % + \iftrue% Umbruchoptimierung + Diese ist also effektiv um \Length{marginparsep}\IndexLength{marginparsep} + schmaler.% + \fi + + Mit dieser Information kann dann die neue Notizspalte definiert werden. Bei + der Festlegung der Position wird ein einfacher Längenausdruck genutzt. Dabei + ist zu beachten, dass \Length{oddsidemargin} nicht der gesamte linke Rand + ist, sondern aus historischen Gründen der linke Rand abzüglich + 1\Unit{inch}. Daher muss dieser Wert noch hinzugezählt werden. + + Damit ist die Deklaration abgeschlossen. Es ist zu beachten, dass die + Notizspalte bisher im Textbereich ausgegeben wird. Die Notizspalte würde + also den Text überschreiben. + +\begin{lstcode} + \begin{document} + + \title{Kommentar zum GüdaVaS} + \author{Professor R. O. Tenase} + \date{11.\,11.~2011} + \maketitle + \tableofcontents + + \section{Vormerkung} + Das GüdaVaS ist ohne jeden Zweifel das wichtigste + Gesetz, das in Spaßmanien in den letzten eintausend + Jahren verabschiedet wurde. Die erste Lesung fand + bereits am 11.\,11.~1111 im obersten spaßmanischen + Kongress statt, wurde aber vom damaligen Spaßvesier + abgelehnt. Erst nach Umwandlung der spaßmanischen, + aberwitzigen Monarchie in eine repräsentative, + witzige Monarchie durch W. Itzbold, + den Urkomischen, am 9.\,9.~1999 war der Weg für + dieses Gesetz endlich frei. +\end{lstcode} +Dadurch,\textnote{Achtung!} dass der Textbereich nicht verkleinert wurde, wird +hier der ganze Vorspann über die Gesamtbreite ausgegeben. Um das Beispiel zu +testen, können Sie vorübergehend +\begin{lstcode} + \end{document} +\end{lstcode} + ergänzen. +\end{Example} +% +Offen blieb in dem Beispiel die Frage, wie der Text für den Kommentar schmaler +gesetzt werden kann. Dies werden Sie bei der Fortsetzung des Beispiels +erfahren.% +\EndIndexGroup + + +\section{Erstellen einer Notiz} +\seclabel{makenote} + +Nachdem eine Notizspalte deklariert wurde, können Notizen für diese Spalte +erstellt werden. Diese Notizen werden allerdings nicht unmittelbar ausgegeben, +sondern zunächst nur in eine Hilfsdatei mit Endung »\File{.slnc}« +geschrieben. Ganz genau werden die Notizen sogar zunächst in die +\File{aux}-Datei geschrieben und erst beim Lesen der \File{aux}-Datei +innerhalb von \Macro{end}\PParameter{document} in die \File{slnc}-Datei +übertragen. Dabei wird gegebenenfalls auch die Einstellung +\Macro{nofiles}\IndexCmd{nofiles} beachtet. Beim nächsten \LaTeX-Lauf wird +diese Hilfsdatei dann Stück für Stück je nach Fortschritt des Dokuments wieder +eingelesen und am Ende der Seite werden die Notizen für die jeweilige Seite +ausgegeben. + +Es ist jedoch zu beachten\textnote{Achtung!}, dass Notizspalten nur auf Seiten +ausgegeben werden, deren Seitenstil auf dem Paket +\hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer}% +\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}} basiert. Das Paket +\hyperref[cha:scrlayer]{\Package{scrlayer}} wird von +\Package{scrlayer-notecolumn} automatisch geladen und stellt in der +Voreinstellung lediglich den Seitenstil +\PageStyle{empty}\IndexPagestyle{empty} bereit. Werden weitere Seitenstile +benötigt, wird zusätzlich das Paket +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} +empfohlen. + + +\begin{Declaration} + \Macro{makenote}\OParameter{Name der Notizspalte}\Parameter{Notiz}\\ + \Macro{makenote*}\OParameter{Name der Notizspalte}\Parameter{Notiz} +\end{Declaration} +Mit Hilfe dieser Anweisungen kann eine \PName{Notiz} erstellt werden. Dabei +wird die aktuelle vertikale Position als vertikale Position für den Anfang der +\PName{Notiz} verwendet. Die horizontale Position für die Notiz ergibt sich +aus der definierten Position der Notizspalte. Für die korrekte Funktion ist +das Paket dabei auf \Macro{pdfsavepos}\IndexCmd{pdfsavepos}, +\Macro{pdflastypos}\IndexCmd{pdflastypos} und +\Macro{pdfpageheight}\IndexLength{pdfpageheight} beziehungsweise deren +Entsprechungen bei neueren Lua\TeX-Versionen angewiesen. Ohne diese Befehle +funktioniert \Package{scrlayer-notecolumn} nicht. % +\iffalse % Umbruchkorrektur +Dabei wird außerdem davon ausgegangen, dass die genannten Primitiven exakt +die Ergebnisse von PDF\TeX{} liefern.% +\fi + +Wird allerdings bei der Ausgabe der \PName{Notiz} eine +Kollision\textnote{Kollisionsauf"|lösung} mit einer früheren Notiz in derselben +Notizspalte erkannt, so wird die \PName{Notiz} bis unter diese frühere Notiz +verschoben. Passt die \PName{Notiz} nicht mehr auf die +Seite\textnote{Seitenumbruch}\Index{Seiten>Umbruch}, so wird sie ganz oder +teilweise auf die nächste Seite umbrochen. + +Für welche Notizspalte die \PName{Notiz} erstellt werden soll, wird über das +optionale Argument \PName{Name der Notizspalte} bestimmt. Ist kein optionales +Argument angegeben, so wird die vordefinierte Notizspalte \PValue{marginpar} +verwendet.% +\begin{Example} + Fügen wir nun dem Beispiel aus dem vorherigen Abschnitt einen kommentierten + Paragraphen hinzu, wobei der Paragraph selbst in der neu definierten + Notizspalte gesetzt werden soll. +\begin{lstcode} + \section{Analyse} + \begin{addmargin}[0pt]{.333\textwidth} + \makenote[paragraphs]{% + \protect\begin{contract} + \protect\Clause{% + title={Kein Witz ohne Publikum}% + } + Ein Witz kann nur dort witzig sein, wo er + auf ein Publikum trifft. + \protect\end{contract}% + } + Dies ist eine der zentralsten Aussagen des + Gesetzes. Sie ist derart elementar, dass es + durchaus angebracht ist, sich vor der Weisheit + der Verfasser zu verbeugen. +\end{lstcode} + Die in \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.addmargin} + dokumentierte Umgebung + \DescRef{maincls.env.addmargin}\IndexEnv{addmargin}\textnote{Spaltenbreite + mit \DescRef{maincls.env.addmargin}} wird genutzt, um den + Haupttext in der Breite um die Spalte für die Paragraphen zu + vermindern. + + Hier ist auch eines der wenigen Probleme bei Verwendung von \Macro{makenote} + zu erkennen. Da das obligatorische Argument in Dateien geschrieben wird, + können Befehle\textnote{zerbrechliche Befehle} innerhalb des Arguments + leider \emph{zerbrechen}. Um das zu verhindern, wird empfohlen, vor alle + Befehle ein \Macro{protect} zu setzen. Anderenfalls kann die Verwendung von + Befehlen innerhalb dieses Arguments zu Fehlermeldungen führen. + + Prinzipiell könnten Sie das Beispiel nun bereits mit +\begin{lstcode} + \end{addmargin} + \end{document} +\end{lstcode} + beenden, wenn Sie ein Ergebnis sehen wollen. +\end{Example}% + +Beim Testen des Beispiels, werden Sie feststellen, dass die Gesetzes\-spalte +tiefer hinunter reicht als der Kommentartext. Wenn\textnote{Achtung!} Sie +zwecks Übung einen weiteren Abschnitt mit einem weiteren Paragraphen +hinzufügen, ergibt sich eventuell das Problem, dass der Kommentar nicht +unterhalb des Gesetzestextes, sondern direkt im Anschluss an den bisherigen +Kommentar fortgesetzt wird. Eine Lösung für dieses Problem werden Sie gleich +kennenlernen. + +Das\ChangedAt{v0.1.2583}{\Package{scrlayer-notecolumn}} im Beispiel erwähnte +Problem mit dem Zerbrechen von Befehlen tritt bei der +Sternvariante\important{\Macro{makenote*}} normalerweise nicht auf. Diese +verwendet \Macro{detokenize}, um die Expansion zu verhindern. Das bedeutet +aber auch, dass man in der \PName{Notiz} keine Befehle verwenden sollte, die +ihre Bedeutung innerhalb des Dokuments verändern. + +Allerdings treten bei beiden Formen zwei andere Probleme\textnote{Achtung!} +auf. Das erste betrifft die Verwendung von Farbe mit Hilfe von +\Package{color}\IndexPackage{color} oder \Package{xcolor}\IndexPackage{xcolor} +innerhalb der Notizspalten. Um Farbumschaltungen innerhalb der Notizspalten zu +ermöglichen, wäre für jede Notizspalte eine eigene Farbverwaltung mit einem +sogenannten \emph{Color Stack} notwendig. Da das Paket lediglich als +Machbarkeitsstudie entworfen ist und \XeTeX{} nicht mehrere \emph{Color + Stacks} unterstützt, sind mit \XeTeX{} Farbumschaltungen nur eingeschränkt +über die Schriftattribute des Elements \FontElement{notecolumn.\PName{Name der + Notizspalte}} möglich, wodurch der Aufwand für die Implementierung einer +eigenen Farbverwaltung umgangen wurde. + +Das zweite, eher konzeptionelle Problem\textnote{Achtung!} ist, dass die +Hilfsdatei mit den Informationen zum Inhalt der Notizspalte während der +Verarbeitung der Kopfzeile einer Seite eingelesen wird. Das hat vor allem dann +Auswirkungen, wenn dies geschieht, während eine Umgebung wie +\Environment{verbatim} aktiv ist. In diesem Fall wären während des Einlesens +der Hilfsdatei die \Macro{catcode}-Einstellungen dieser Umgebung aktiv. Das +würde zwangsläufig zu Fehlern in der Verarbeitung und Ausgabe führen. Um dies +abzumildern, werden während \Macro{begin}\PParameter{document} die +\Macro{catcode}-Einstellungen der in \Macro{dospecials}\IndexCmd{dospecials} +gespeicherten Zeichen gespeichert und während dem Einlesen der Hilfsdatei +explizit wiederhergestellt.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{syncwithnotecolumn}\OParameter{Name der Notizspalte} +\end{Declaration} +Mit Hilfe dieser Anweisung wird in einer Notizspalte und im Haupttext des +Dokuments je ein +Synchronisierungspunkt\textnote{Synchronisation}\Index{Synchronisation} +erstellt. Wann immer bei der Ausgabe einer Notizspalte oder des Haupttextes +ein solcher Synchronisierungspunkt erreicht wird, wird eine Marke angelegt, +deren Inhalt die aktuelle Seite und die aktuelle vertikale Position ist. + +Parallel zum Erstellen der Synchronisierungspunkte wird ermittelt, ob in +der Notizspalte und im Haupttext beim letzten \LaTeX-Lauf eine Marke angelegt +wurde. Falls das der Fall ist, werden deren Werte miteinander +verglichen. Liegt die Marke der Notizspalte tiefer auf der Seite oder auf +einer späteren Seite, so wird im Haupttext bis zu der Stelle der Notizspalte +vorgerückt. + +In der Regel sollten Synchronisierungspunkte\textnote{Hinweis!} nicht +innerhalb eines Absatzes des Haupttextes, sondern nur zwischen diesen gesetzt +werden. Wird \Macro{syncwithnotecolumn} dennoch innerhalb eines Absatzes +verwendet, so wird der Synchronisierungspunkt im Haupttext tatsächlich erst +nach der aktuellen Zeile eingefügt. In dieser Hinsicht ähnelt +\Macro{syncwithnotecolumn} also beispielsweise +\Macro{vspace}\IndexCmd{vspace}. + +Dadurch, dass Synchronisierungspunkte in den Notizspalten erst beim nächsten +\LaTeX-Lauf\textnote{mehrere \LaTeX-Läufe} erkannt werden, benötigt der +Mechanismus mindestens drei \LaTeX-Läufe. Aus jeder neuen Synchronisierung +können sich außerdem Verschiebungen für spätere Synchronisierungspunkte +ergeben, was wiederum die Notwendigkeit weiterer \LaTeX-Läufe nach sich +zieht. Zu erkennen sind solche Verschiebungen in der Regel an der Meldung: +»\LaTeX{} Warning: Label(s) may have changed. Rerun to get cross-references +right.« Aber auch Meldungen über undefinierte \emph{Labels} können auf die +Notwendigkeit eines weiteren \LaTeX-Laufs hinweisen. + +Wird das optionale Argument nicht angegeben, so wird an seiner Stelle +\PValue{marginpar}, also die vordefinierte Notizspalte +verwendet. Es\textnote{Achtung!} sei an dieser Stelle darauf hingewiesen, dass +ein leeres optionales Argument nicht gleichbedeutend mit dem Weglassen eines +optionalen Arguments ist! + +Es ist nicht\textnote{Achtung!} erlaubt, \Macro{syncwithnotecolumn} innerhalb +einer Notiz selbst, also im obligatorischen Argument von +\Macro{makenote}\IndexCmd{makenote} zu verwenden! Dieser Fehler kann derzeit +nicht abgefangen werden und führt dazu, dass mit jedem \LaTeX-Lauf neue +Verschiebungen auf"|treten, so dass nie ein endgültiger Zustand erreicht +wird. Um zwei oder mehrere Notizspalten miteinander zu synchronisieren, sind +sie stattdessen mit dem Haupttext zu synchronisieren, da dabei auch die +Spalten miteinander synchronisiert werden. Die hierzu empfohlene Anweisung +wird nachfolgend beschrieben.% +% +\begin{Example} + Führen wir nun das obige Beispiel fort, indem wir zunächst einen + Synchronisationspunkt und dann einen weiteren Paragraphen + mit Kommentar hinzufügen: +\begin{lstcode} + \syncwithnotecolumn[paragraphs]\bigskip + \makenote[paragraphs]{% + \protect\begin{contract} + \protect\Clause{title={Komik der Kultur}} + \setcounter{par}{0}% + Die Komik eines Witzes kann durch das + kulturelle Umfeld, in dem er erzählt wird, + bestimmt sein. + + Die Komik eines Witzes kann durch das + kulturelle Umfeld, in dem er spielt, + bestimmt sein. + \protect\end{contract} + } + Die kulturelle Komponente eines Witzes ist + tatsächlich nicht zu vernachlässigen. Über die + politische Korrektheit der Nutzung des + kulturellen Umfeldes kann zwar treff"|lich + gestritten werden, nichtsdestotrotz ist die + Treffsicherheit einer solchen Komik im + entsprechenden Umfeld frappierend. Auf der + anderen Seite kann ein vermeintlicher Witz im + falschen kulturellen Umfeld auch zu einer + echten Gefahr für den Witzeerzähler werden. +\end{lstcode} + Außer dem Synchronisationspunkt wurde hier auch noch ein vertikaler + Abstand mit \Macro{bigskip} eingefügt, um die einzelnen Paragraphen und ihre + Kommentare besser voneinander abzusetzen. + + Außerdem\textnote{Achtung!} wird hier ein weiterer Punkt, der zu einem + Problem werden kann, sichtbar. Da die Notizspalten mit Boxen arbeiten, die + zusammengebaut und zerlegt werden, kann es bei Zählern\textnote{Zähler in + Notizspalten} innerhalb der Notizspalten teilweise zu Verschiebungen + kommen. Im Beispiel würde daher der erste Absatz nicht mit 1, sondern mit 2 + nummeriert. Dies kann jedoch mit einem beherzten Zurücksetzen des + entsprechenden Zählers leicht korrigiert werden. + + Das Beispiel ist damit fast fertig, was noch fehlt, ist das Ende der + Umgebungen: +\begin{lstcode} + \end{addmargin} + \end{document} +\end{lstcode} + Tatsächlich wären natürlich auch noch die restlichen Paragraphen des + Gesetzes zu kommentieren. Dies sei mir hier jedoch erlassen. +\end{Example}% +Doch halt! Was wäre, wenn in diesem Beispiel der Paragraph nicht mehr auf die +Seiten passen würde? Würde er dann auf der nächsten Seite ausgegeben? Diese +Frage wird im nächsten Abschnitt beantwortet werden. +\EndIndexGroup + + +\begin{Declaration} + \Macro{syncwithnotecolumns}\OParameter{Liste von Notizspalte} +\end{Declaration} +Diese Anweisung führt eine Synchronisierung des Haupttextes mit allen in der +mit Komma separierten \PName{Liste von Notizspalten} angegebenen Notitzspalten +durch. Dabei wird der Haupttext mit der Notizspalte synchronisiert, deren +Marke am weitesten hinten im Dokument steht. Somit werden als Nebeneffekt auch +die Notizspalten untereinander synchronisiert. + +Wird das optionale Argument nicht angegeben oder ist es leer, so wird mit +allen deklarierten Notizspalten synchronisiert.% +\EndIndexGroup + + +\section{Erzwungene Ausgabe von Notizspalten} +\seclabel{clearnotes} + +\iftrue % Umbruchkorrektur +Im vorherigen Abschnitt wurde dokumentiert, wie die Ausgabe der Notitzspalten +normalerweise erfolgt. Manchmal ist es aber % +\else% +Neben der normalen Ausgabe der Notizspalten, wie sie im vorherigen Abschnitt +beschrieben ist, ist es manchmal % +\fi % +auch erforderlich, alle aufgesammelten Notizen, die noch nicht ausgegeben +wurden, unmittelbar auszugeben. Das ist insbesondere dann sinnvoll, wenn +längere Notizen dazu führen, dass immer mehr Notizen nach unten und auf neue +Seiten verschoben werden. Ein guter Zeitpunkt für eine solche erzwungene +Ausgabe\Index{Ausgabe>erzwungene} ist beispielsweise das Ende eines Kapitels +oder das Ende des Dokuments. + +\begin{Declaration} + \Macro{clearnotecolumn}\OParameter{Name der Notizspalte} +\end{Declaration} +Mit dieser Anweisung werden alle Notizen einer bestimmen Notizspalte +ausgegeben, die\textnote{anhängige Notizen}\Index{Notiz>anhaengige=anhängige} +bis zum Ende der aktuellen Seite noch nicht ausgegeben sind, aber auf dieser +oder einer vorherigen Seite erstellt wurden. Zur Ausgabe dieser noch +anhängigen Notizen werden nach Bedarf Leerseiten erstellt. Während der Ausgabe +der anhängigen Notizen dieser Notizspalte werden gegebenenfalls auch anhängige +Notizen anderer Notizspalten ausgegeben, jedoch nur so lange, wie dies zur +Ausgabe der anhängigen Notizen der angegebenen Notizspalte notwendig ist. + +Während der Ausgabe der anhängigen Notizen kann es auch geschehen, dass +irrtümlich Notizen\textnote{irrtümliche + Notizen}\Index{Notiz>irrtuemliche=irrtümliche} ausgegeben werden, die im +vorherigen \LaTeX-Lauf auf den Seiten erstellt wurden, die nun durch die +eingefügten Leerseiten ersetzt werden. Dies normalisiert sich in einem der +nächsten \LaTeX-Läufe. Zu erkennen sind solche Verschiebungen in der Regel an +der Meldung: »\LaTeX{} Warning: Label(s) may have changed. Rerun to get +cross-references right.« + +Die Notizspalte, deren anhängige Notizen ausgegeben werden soll, ist über das +optionale Argument \PName{Name der Notizspalte} angegeben. Ist kein solches +Argument angegeben, so wird die vordefinierte Notizspalte \PValue{marginpar} +verwendet. + +Dem aufmerksamen Leser wird nicht entgangen sein, dass die +erzwungene\textnote{erzwungene Ausgabe vs. Synchronisation} Ausgabe einer +Notizspalte der Synchronisierung nicht unähnlich ist. Allerdings befindet man +sich nach der erzwungenen Ausgabe im Fall, dass tatsächlich eine Ausgabe +stattfindet, am Anfang der Seite nach der letzten Ausgabe und nicht +unmittelbar unterhalb der letzten Ausgabe. Dafür terminiert die erzwungene +Ausgabe in der Regel mit weniger \LaTeX-Läufen.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{clearnotecolumns}\OParameter{Liste von Notizspalten-Namen} +\end{Declaration} +Diese Anweisung arbeitet vergleichbar mit +\DescRef{\LabelBase.cmd.clearnotecolumn}. Allerdings kann hier als optionales +Argument nicht nur eine Notizspalte angegeben werden, sondern es ist eine +durch Komma getrennte Liste mehrerer Namen von Notizspalten erlaubt. Es werden +dann die anhängigen Notizen all dieser Spalten ausgegeben. + +Wurde das optionale Argument nicht angegeben oder ist es leer, so werden die +anhängigen Notizen aller Notizspalten ausgegeben.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{autoclearnotecolumns}{Ein-Aus-Wert} +\end{Declaration} +In der Regel wird man anhängige Notizen immer dann ausgeben lassen, wenn im +Dokument explizit oder implizit -- beispielsweise in Folge von +\DescRef{maincls.cmd.chapter} -- die Anweisung \DescRef{maincls.cmd.clearpage} +ausgeführt wird. Dies ist auch am Ende eines Dokuments innerhalb von +\Macro{end}\PParameter{document} der Fall. Über die Option +\Option{autoclearnotecolumns} kann daher gesteuert werden, ob bei Ausführung +von \DescRef{maincls.cmd.clearpage} automatisch auch +\DescRef{\LabelBase.cmd.clearnotecolumns} ohne Argument ausgeführt werden +soll. Da davon ausgegangen wird, dass dies in der Regel erwünscht ist, ist die +Option in der Voreinstellung aktiv. Man kann sie jedoch über die +entsprechenden Werte für einfache Schalter (siehe +\autoref{tab:truefalseswitch} auf \autopageref{tab:truefalseswitch}) jederzeit +aus- und auch wieder einschalten. + +Es ist zu beachten\textnote{Achtung!}, dass im Falle der Deaktivierung der +automatischen Ausgabe anhängiger Notizen am Ende des Dokuments Notizen ganz +oder teilweise verloren gehen können. Daher sollte man in diesem Fall vor +\Macro{end}\PParameter{document} sicherheitshalber ein +\DescRef{\LabelBase.cmd.clearnotecolumns} einfügen. + +Damit ist nun auch die Frage nach dem Beispiel im letzten Abschnitt +beantwortet, ob der Paragraph auch komplett ausgegeben würde, wenn er auf die +nächste Seite umbrochen werden müsste. Dies ist in der Voreinstellung +selbstverständlich der Fall. Da es jedoch nach dem Ende der +\DescRef{maincls.env.addmargin}-Umgebung geschehen würde, könnte es eventuell +noch zu Überlappungen durch nachfolgenden Text kommen. Daher wäre es im +Beispiel durchaus sinnvoll, nach der \DescRef{maincls.env.addmargin}-Umgebung +einen weiteren Synchronisationspunkt einzufügen. + +Das Ergebnis des Beispiels ist übrigens in +\autoref{fig:scrlayer-notecolumn.example} zu sehen.\iffree{}{ Dabei wurde + lediglich die Farbeinstellung für die \PValue{paragraphs}-Spalte von Blau in + Grau geändert.} + +\begin{figure} + \KOMAoptions{captions=bottombeside}% + \setcapindent{0pt}% + \begin{captionbeside}[{Eine Ergebnisseite zu dem Beispiel aus dem Kapitel}]% + {Eine Ergebnisseite zu dem Beispiel aus diesem + Kapitel\label{fig:scrlayer-notecolumn.example}}[l] + \frame{\includegraphics[width=.667\textwidth,keepaspectratio]% + {scrlayer-notecolumn-example-de}} + \end{captionbeside} +\end{figure} +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Randnotizen Entwicklungsstadium Notizspalte Notizspalten +% LocalWords: Neukonfigurierung Synchronisierungspunkt marginpar marginline +% LocalWords: Haupttext Demonstrationszwecken Längenausdruck Gesetzestexten +% LocalWords: Längenausdrücken Satzspiegels typearea scrlayer notecolumn +% LocalWords: AfterCalculatingTypearea scrjura scrpage Farbeinstellung +% LocalWords: Sternvariante diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-en.tex b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-en.tex new file mode 100644 index 0000000000..5e502c9823 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-en.tex @@ -0,0 +1,700 @@ +% ====================================================================== +% scrlayer-notecolumn-en.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrlayer-notecolumn of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrlayer-notecolumn-en.tex} + [$Date: 2018-02-05 01:50:56 -0800 (Mon, 05 Feb 2018) $ + KOMA-Script guide (chapter:scrlayer-notecolumn)] + +\translator{Markus Kohm\and Arndt Schubert\and Karl Hagen} + +\chapter{Note Columns with \Package{scrlayer-notecolumn}} +\labelbase{scrlayer-notecolumn} + +\BeginIndexGroup +\BeginIndex{Package}{scrlayer-notecolumn}% +Through version~3.11b, \KOMAScript{} supported note columns only in the form +of marginal notes that get their contents from \DescRef{maincls.cmd.marginpar} +and \DescRef{maincls.cmd.marginline} (see \autoref{sec:maincls.marginNotes}, +\DescPageRef{maincls.cmd.marginline}). This kind of note column has several +disadvantages: +\begin{itemize} +\item Marginal notes must be set completely on a single page. Page + breaks\textnote{page break} inside marginal notes are not possible. This + sometimes causes the marginal notes to protrude into the lower margin. +\item Marginal notes near page breaks sometimes float to the next page and + then, in the case of two-sided printing, cause alternate marginal columns to + appear in the wrong margin.\textnote{assignment to the correct margin}. This + problem can be solved with the additional package + \Package{mparhack}\IndexPackage{mparhack} or by using \Macro{marginnote} + from the \Package{marginnote}\IndexPackage{marginnote} package (see + \cite{package:marginnote}). +\item Marginal notes inside floating environments\textnote{floating + environments} or footnotes\textnote{footnotes} are not possible. This + problem can also be solved with \Macro{marginnote} of the + \Package{marginnote}\IndexPackage{marginnote} package. +\item There is only one marginal note column\textnote{several note columns}, + or at most two if you use \Macro{reversemarginpar} and + \Macro{normalmarginpar}. Note that \Macro{reversemarginpar} is of less + utility with two-sided documents. +\end{itemize} +Using \Package{marginnote}\IndexPackage{marginnote} leads to one more problem. +Because the package does not have any collision detection, marginal notes that +are set near to each other can partially or totally overlap. Moreover, +depending on the settings used, \Macro{marginnote} sometimes changes the +baseline distance of the normal text. + +The \Package{scrlayer-notecolumn} package should solve all these problems. To +do so, it relies on the basic functionality of +\hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer}% +\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}}. However, using this +package has a drawback:\textnote{Attention!} you can only output notes on +pages that use a page style based on +\hyperref[cha:scrlayer]{\Package{scrlayer}}. This disadvantage, however, can +easily be resolved, or even turned into an advantage, with the help of +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% +\IndexPackage{scrlayer-scrpage}. + +\section{Note about the State of Development} +\seclabel{draft} + +This package was originally developed as a so-called \emph{proof of + concept}\textnote{proof of concept} to demonstrate the potential of +\hyperref[cha:scrlayer]{\Package{scrlayer}}% +\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}}. Although it is still +in its early stages of development, most of its stability is less a question +of \Package{scrlayer-notecolumn} than of +\hyperref[cha:scrlayer]{\Package{scrlayer}}. Nevertheless, you can assume that +there are still bugs in \Package{scrlayer-notecolumn}. Please report such bugs +whenever you find them. Some of the package's shortcomings are caused by the +attempt to minimise complexity. For example, although note columns can break +across several pages, there is no new paragraph break. \TeX{} itself does not +provide this. + +Because the package is rather experimental\textnote{experimental}, its +instructions are found here in the second part of \iffree{the \KOMAScript{} +manual}{this book}. Accordingly, it is primarily directed towards experienced +users. If you are a beginner or a user on the way to become an +expert\textnote{for experts}, some of the following explanations may be +unclear or even incomprehensible. +\iffree{Please understand that I want to keep the effort spent on the manual + to something halfway bearable when it comes to experimental packages.}{% + However, this should be enough to solve simple tasks with + \Package{scrlayer-notecolumn}. At the same time, developers will hopefully + find useful stimulus for their own ideas.} + +\iffalse% Umbruchoptimierung +Note also\textnote{Attention!} that the author of \KOMAScript{} does not +guarantee the further development of this package and offers only limited +support for it. This is the nature of a package written solely for the +purposes of demonstration.% +\fi + +\LoadCommonFile{options}% \section{Early or late Selection of Options} + +\LoadCommonFile{textmarkup}% \section{Text Markup} + +\section{Declaring New Note Columns} +\seclabel{declaration} + +Loading the package automatically declares a note column named +\PValue{marginpar}. As the name implies, this note column is placed in the +area of the normal marginal column used by \DescRef{maincls.cmd.marginpar} and +\DescRef{maincls.cmd.marginline}. The \Macro{reversemarginpar} and +\Macro{normalmarginpar} settings are also taken into account, but only for all +the notes on a page instead of note by note. The relevant setting is the one +that applies at the end of the page, namely during the output of the note +column. If you want to have notes in both the left and right margin of the +same page, you should define a second note column. + +The default settings for all newly declared note columns are the same as the +defaults for \PValue{marginpar}. % +\iftrue% Umbruchoptimierung +But you can easily change them during their initialisation.% +\fi + +Note\textnote{Attention!} that note columns can be output only on pages that +use a page style based on the +\hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer}% +\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}} package. The +\Package{scrlayer-notecolumn} package automatically loads +\hyperref[cha:scrlayer]{\Package{scrlayer}}, which by default provides only +\PageStyle{empty}\IndexPagestyle{empty} page style. If you need additional +page styles, \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} is +recommended. + +\begin{Declaration} + \Macro{DeclareNoteColumn}% + \OParameter{option~list}\Parameter{note~column~name}% + \Macro{DeclareNewNoteColumn}% + \OParameter{option~list}\Parameter{note~column~name}% + \Macro{ProvideNoteColumn}% + \OParameter{option~list}\Parameter{note~column~name}% + \Macro{RedeclareNoteColumn}% + \OParameter{option~list}\Parameter{note~column~name}% +\end{Declaration} +You can use these commands to create note columns. \Macro{DeclareNoteColumn} +creates the note column regardless of whether it already exists. +\Macro{DeclareNewNoteColumn} throws an error if the \PName{note column name} +has already been used for another note column. \Macro{ProvideNoteColumn} +simply does nothing in that case. You can use \Macro{RedeclareNoteColumn} only +to reconfigure an existing note column. + +By the way, when reconfiguring existing note columns with +\Macro{DeclareNoteColumn} or \Macro{RedeclareNoteColumn}, the notes that have +already been generated for this column are retained. + +\BeginIndex{FontElement}{notecolumn.\PName{note column name}}% +\BeginIndex{FontElement}{notecolumn.marginpar}% +Declaring a new note column always defines a new element for changing its font +attributes with \DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont}, if such an element does not yet exist. +The name of the element is \PValue{notecolumn.}\PName{note column name}. For +this reason, the default note column \PValue{marginnote} has the +element\textnote{element name} \FontElement{notecolumn.marginpar}. You can +directly specify the initial setting of the element's font when declaring a +note column by using the \Option{font} option within the \PName{option list}.% +\EndIndex{FontElement}{notecolumn.marginpar}% +\EndIndex{FontElement}{notecolumn.\PName{note column name}}% + +The \PName{option list} is a comma-separated list of keys with or without +values, also known as options. The available options are listed in +\autoref{tab:scrlayer-notecolumn.note.column.options}, +\autopageref{tab:scrlayer-notecolumn.note.column.options}. +The\textnote{default: option \Option{marginpar}} \Option{marginpar} option is +set by default, but you can overwrite this default with your individual +settings. + +Because note columns are implemented using \Package{scrlayer}, a +layer\Index{layer} is created for each note column. The layer +name\textnote{layer name} is the same as the name of the element, +\PValue{notecolumn.}\PName{note column name}. For more information about +layers see \autoref{sec:scrlayer.layers}, starting on +\autopageref{sec:scrlayer.layers}. +% +\begin{Example} + Suppose you are a professor of comedy law and want to write a treatise on + the new ``Statute Concerning the Riotous Airing of Common Humour'', SCRACH + for short. The better part of the work will consist of commentary on + individual paragraphs of the statute. You decide on a two-column layout, + with the comments in the main column and the paragraphs placed in a smaller + note column on the right of the main column using a font that is + smaller\iffree{ and in a different colour}{}. +\begin{lstcode} + \documentclass{scrartcl} + \usepackage{lmodern} + \usepackage{xcolor} + + \usepackage{scrjura} + \setkomafont{contract.Clause}{\bfseries} + \setkeys{contract}{preskip=-\dp\strutbox} + + \usepackage{scrlayer-scrpage} + \usepackage{scrlayer-notecolumn} + + \newlength{\paragraphscolwidth} + \AfterCalculatingTypearea{% + \setlength{\paragraphscolwidth}{% + .333\textwidth}% + \addtolength{\paragraphscolwidth}{% + -\marginparsep}% + } + \recalctypearea + \DeclareNewNoteColumn[% + position=\oddsidemargin+1in + +.667\textwidth + +\marginparsep, + width=\paragraphscolwidth, + font=\raggedright\footnotesize + \color{blue} + ]{paragraphs} +\end{lstcode} + The treatise should be a one-sided article. The font is Latin Modern, and + the colour selection uses the \Package{xcolor}\IndexPackage{xcolor} package. + + For formatting legal texts\textnote{legal texts with + \hyperref[cha:scrjura]{\Package{scrjura}}} with the + \hyperref[cha:scrjura]{\Package{scrjura}}\IndexPackage{scrjura} package, see + \autoref{cha:scrjura}. + + Since this document uses a page style\textnote{page style with + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} with a + page number, the + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + \IndexPackage{scrlayer-scrpage} package is loaded. Thus, note columns can be + output on all pages. + + Next, the \Package{scrlayer-notecolumn}\textnote{note columns with + \Package{scrlayer-notecolumn}} package is loaded. The required width of the + note column is calculated with + \DescRef{typearea-experts.cmd.AfterCalculatingTypearea}% + \IndexPackage{typearea}\IndexCmd{AfterCalculatingTypearea} after any + recalculation\textnote{type area with + \hyperref[cha:typearea]{\Package{typearea}}}% + \IndexPackage{typearea} of the type area. It should be one third of the type + area minus the distance between the main text and the note column. % + + With this information, we define the new note column. For the positions, we + use a simple dimension expression. Note that \Length{oddsidemargin} is not + the total left margin but for historical reasons the left margin minus + 1\Unit{inch}. So we have to add this value. + + This concludes the definition. Note that the note column would currently be + placed inside the type area. This means that the note column would overwrite + the text. + +\begin{lstcode} + \begin{document} + + \title{Commentary on the SCRACH} + \author{Professor R. O. Tenase} + \date{11/11/2011} + \maketitle + \tableofcontents + + \section{Preamble} + The SCRACH is without doubt the most important law + on the manners of humour that has been passed in + the last thousand years. The first reading took + place on 11/11/1111 in the Supreme Manic Fun + Congress, but the law was rejected by the Vizier + of Fun. Only after the ludicrous, Manic Fun + monarchy was transformed into a representative, + witty monarchy by W. Itzbold, on 9/9/1999 was + the way finally clear for this law. +\end{lstcode} + Because\textnote{Attention!} the text area was not reduced, the preamble is + output extending over the whole width of the type area. To test this, you + can temporarily add: +\begin{lstcode} + \end{document} +\end{lstcode} +\end{Example} +% +In the example, the question of how the text for the commentary can be set in +a narrower column remains unresolved. You will discover how to do this by +continuing the example below.% +% +%\begin{table}% Umbruchoptimierung: Tabelle hinter das Beispiel verschoben +\begin{desclist} + \desccaption{% +% \caption[Available settings for declaring note columns]{% + Available settings for declaring note columns% +% }% + \label{tab:scrlayer-notecolumn.note.column.options}% + }{% + Available settings for declaring note columns + (\emph{continued})% + }% +% \begin{desctabular} + \entry{\OptionVName{font}{font attribute}}{% + The font attributes of the note column set with + \DescRef{\LabelBase.cmd.setkomafont}. For possible values, refer to + \autoref{sec:maincls.textmarkup}, + \DescPageRef{maincls.cmd.setkomafont}.\par% + Default: \emph{empty}% + }% + \entry{\Option{marginpar}}{% + Sets \Option{position} and \Option{width} to correspond to the marginal + note column of \DescRef{maincls.cmd.marginpar}. Switching between + \Macro{reversemarginpar}\IndexCmd{reversemarginpar} and + \Macro{normalmarginpar}\IndexCmd{normalmarginpar} is only considered at + the end of the page when the note column is output. Note that this + option does not expect or allow any value.\par% + Default: \emph{yes}% + }% + \entry{\Option{normalmarginpar}}{% + Sets \Option{position} and \Option{width} to use the normal marginal + note column and ignore \Macro{reversemarginpar} and + \Macro{normalmarginpar}. Note that this option does not expect or allow + a value.\par% + Default: \emph{no}% + }% + \entry{\OptionVName{position}{offset}}{% + Sets the horizontal offset of the note column from the left edge of the + paper. The \PName{offset} can be a complex expression as long as it is + fully expandable and expands to a length or a dimensional expression at + the time the note column is output. See \cite[section~3.5]{manual:eTeX} + for more information about dimensional expressions.\par% + Default: \emph{through the \Option{marginpar} option}% + }% + \entry{\Option{reversemarginpar}}{% + Sets \Option{position} and \Option{width} to use the reverse marginal + note column of \DescRef{maincls.cmd.marginpar} with the + \Macro{reversemarginpar} setting. Note that this option does not expect + or allow a value.\par% + Default: \emph{no}% + }% + \entry{\OptionVName{width}{length}}{% + Sets the width of the note column. The \PName{length} can be a complex + expression as long as it is fully expandable and expands to a length or + a dimensional expression at the time the note column is output. See + \cite[section~3.5]{manual:eTeX} for more information about dimensional + expressions.\par% + Default: \emph{through the \Option{marginpar} option}% + }% +% \end{desctabular} +%\end{table} +\end{desclist} +\EndIndexGroup + + +\section{Making a Note} +\seclabel{makenote} + +After you declare a note column, you can create notes for this column. But +these notes are not be output immediately. Initially, they are written to an +auxiliary file with extension ``\File{.slnc}''. Specifically, they are first +written to the \File{aux}-file and, when the \File{aux}-file is read inside +\Macro{end}\PParameter{document}, they are copied to the \File{slnc}-file. If +necessary, the \Macro{nofiles}\IndexCmd{nofiles} setting is also taken into +account. At the next \LaTeX{} run, this auxiliary file will be read piece by +piece, according to the progress of the document, and at the end of the page +the notes for that page will be output. + +Note\textnote{Attention!}, however, that note columns are output only on pages +whose page style is based on the \Package{scrlayer}\IndexPackage{scrlayer} +package. This package is loaded automatically by \Package{scrlayer-notecolumn} +and by default provides only the \PageStyle{empty}\IndexPagestyle{empty} page +style. If you need additional page styles, the +\Package{scrlayer-scrpage}\IndexPackage{scrlayer-scrpage} package is +recommended. + +\begin{Declaration} + \Macro{makenote}\OParameter{note-column name}\Parameter{note}\\ + \Macro{makenote*}\OParameter{note-column name}\Parameter{note}\\ +\end{Declaration} +You can use this command to make a new \PName{note}. The current vertical +position is used as the vertical position for the start of the \PName{note}. +The horizontal position for the note results from the defined position of the +note column. To work correctly, the package relies on +\Macro{pdfsavepos}\IndexCmd{pdfsavepos}, +\Macro{pdflastypos}\IndexCmd{pdflastypos}, and +\Macro{pdfpageheight}\IndexLength{pdfpageheight} or their equivalent in newer +Lua\TeX{} versions. Without these commands, \Package{scrlayer-notecolumn} will +not work. The primitives should act exactly as they would using pdf\TeX. + +However, if the package detects a collision\textnote{collision avoidance} with +a previous \PName{note} in the same note column, the new \PName{note} is moved +below that earlier \PName{note}. If the \PName{note} does not fit on the +page\textnote{page break}\Index{page>break}, it will be moved completely or +partially to the next page. + +The optional argument \PName{note column name} determines which note column +should be used for the \PName{note}. If the optional argument is omitted, the +default note column \PValue{marginpar} is used.% +\begin{Example} + Let's add a commented paragraph to the example of the previous section. The + paragraph itself should be placed in the newly defined note column: +\begin{lstcode} + \section{Analysis} + \begin{addmargin}[0pt]{.333\textwidth} + \makenote[paragraphs]{% + \protect\begin{contract} + \protect\Clause{% + title={No Joke without an Audience}% + } + A joke can only be funny if is has an + audience. + \protect\end{contract}% + } + This is one of the most central statements of + the law. It is so fundamental that it is quite + appropriate to bow to the wisdom of the authors. +\end{lstcode} + The \DescRef{maincls.env.addmargin}\IndexEnv{addmargin}% + \textnote{column width with \DescRef{maincls.env.addmargin}} environment, + which is described in \autoref{sec:maincls.lists}, + \DescPageRef{maincls.env.addmargin}, is used to reduce the width of the main + text by the width of the column for the paragraphs. + + Here you can see one of the few problems of using \Macro{makenote}. Because + the mandatory argument is written to an auxiliary file, + commands\textnote{fragile commands} inside this argument can, unfortunately, + \emph{break}. To avoid this, you should use \Macro{protect} in front of all + commands that should not expand when written to the auxiliary file. + Otherwise, using a command inside this argument could result in error + messages. + + In principle you could now finish this example with +\begin{lstcode} + \end{addmargin} + \end{document} +\end{lstcode} + to see a preliminary result. +\end{Example} +If you test this example, you will see that the column for the legal text is +longer than that of the commentary. If\textnote{Attention!} you add another +section with another paragraph, you may encounter the problem that the +commentary will not continue below the legal text but immediately after the +previous comment. Next you will find a solution to this problem. + +The\ChangedAt{v0.1.2583}{\Package{scrlayer-notecolumn}} problem with fragile +commands mentioned in the example above does not occur with the starred +variant\important{\Macro{makenote*}}. It uses \Macro{detokenize} to prevent +the expansion of commands. But this also means that you should not use +commands in the \PName{note} that change their definition within the +document. + +Unfortunately, both commands have two other known +limitations\textnote{Attention!}. The first issue is related to colours using +\Package{color}\IndexPackage{color} or \Package{xcolor}\IndexPackage{xcolor} +within the note columns. To make such colour changes possible each note column +requires its own colour management using so-called \emph{colour stacks}. +Because the package was designed only as a \emph{proof of concept} and because +\XeTeX{} does not support multiple colour stacks, \XeTeX{} colour switching is +restricted to the attributes of the font element +\FontElement{notecolumn.\PName{note column name}}, a limitation which +eliminates the time and effort required to implement custom colour management. + +The second issue is of a more conceptual nature. The content of the auxiliary +file that contains the note-column information is read while processing the +page header. This has consequences in particular if the read occurs while +an environment like \Environment{verbatim} is active. In this case, the +\Macro{catcode} settings of this environment would be active while reading the +auxiliary file. This will inevitably lead to errors in processing and output. +To attenuate this risk, the \Macro{catcodes} of the characters from +\Macro{dospecials}\IndexCmd{dospecials} are stored during +\Macro{begin}\PParameter{document} and explicitly restored when reading from +the auxiliary file.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{syncwithnotecolumn}\OParameter{note column name} +\end{Declaration} +This command adds a +synchronisation\textnote{synchronisation}\Index{synchronisation} point in a +note column and in the main text of the document. Whenever a synchronisation +point is reached during the output of a note column or the main text, a mark +will be generated that consists of the current page and the current vertical +position. + +In parallel with the generation of synchronisation points, +\Package{scrlayer-notecolumn} determines whether a mark has been set in the +note column or the main text during the previous \LaTeX{} run. If so, it +compares their values. If the mark of the note column is lower on the current +page or on a later page, the main text will be moved down to the position of +the mark. + +As a rule,\textnote{Hint!} you should not place synchronisation points within +paragraphs of the main text but only between them. If you nonetheless use +\Macro{syncwithnotecolumn} inside a paragraph, the synchronisation point will +be delayed until the current line has been output. This behaviour is similar +to that of, e.\,g., \Macro{vspace}\IndexCmd{vspace} in this respect. + +Because synchronisation points are not recognized until the next \LaTeX{} +run\textnote{several \LaTeX{} runs}, this mechanism requires at least three +\LaTeX{} runs. Any new synchronisation may also result in shifts of later +synchronisation points, which in turn will require additional \LaTeX{} runs. +Such shifts are usually indicated by the message: ``\LaTeX{} Warning: Label(s) +may have changed. Rerun to get cross-references right.'' But reports about +undefined labels may also indicate the need for another \LaTeX{} run. + +If you omit the optional argument, the default note column \PValue{marginpar} +will be used. Note\textnote{Attention!} that an empty optional argument is not +the same as omitting the optional argument! + +You cannot use\textnote{Attention!} \Macro{syncwithnotecolumn} inside a note +itself, that is, inside the mandatory argument of +\Macro{makenote}\IndexCmd{makenote}! Currently the package cannot recognise +such a mistake, and it causes new shifts of the synchronisation point with +each \LaTeX{} run, so the process will never terminate. To synchronise two or +more note columns, you have to synchronise each of them with the main text. +The recommended command for this is described below.% +% +\begin{Example} + Let's extend the example above by first adding a synchronisation point + and then another paragraph with a comment: +\begin{lstcode} + \syncwithnotecolumn[paragraphs]\bigskip + \makenote[paragraphs]{% + \protect\begin{contract} + \protect\Clause{title={Humor of a Culture}} + \setcounter{par}{0}% + The humour of a joke can be determined by the + cultural environment in which it is told. + + The humour of a joke can be determined by the + cultural environment in which it acts. + \protect\end{contract} + } + The cultural component of a joke is, in fact, not + negligible. Although the political correctness of + using the cultural environment can easily be + disputed, nonetheless the accuracy of such comedy + in the appropriate environment is striking. On + the other hand, a supposed joke in the wrong + cultural environment can also be a real danger + for the joke teller. +\end{lstcode} + In addition to the synchronisation point, a vertical skip has been added + with \Macro{bigskip} to better distinguish each paragraph and the + corresponding comments. + + Further\textnote{Attention}, this example illustrates another potential + problem. Because the note columns uses boxes that are assembled and + disassembled, counters\textnote{counter in note column} inside note columns + can sometimes jitter. In the example, therefore, the first paragraph would + be numbered 2 instead of 1. This, however, can easily be fixed by a direct + reset of the corresponding counter. + + The example is almost complete. You just have to close the environments: +\begin{lstcode} + \end{addmargin} + \end{document} +\end{lstcode} + In reality, of course, all the remaining section of the law should also be + commented. But let us focus on the main purpose. +\end{Example} +But stop! What if, in this example, the \PName{paragraphs} would no longer fit +on the page? Would it be printed on the next page? We will answer this +question in the next section.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{syncwithnotecolumns}\OParameter{list of note column names} +\end{Declaration} +This command synchronises the main text with all note columns of the +comma-separated \PName{list of note column names}. The main text +will be synchronised with the note column whose mark is closest to the +end of the document. As a side effect, the note columns will be synchronised +with each other. + +If the optional argument is omitted or empty (or begins with \Macro{relax}), +synchronisation will be done with all currently declared note columns.% +\EndIndexGroup + + +\section{Forced Output of Note Columns} +\seclabel{clearnotes} + +In addition to the normal output of note columns described in the previous +section, you may sometimes need to output all collected notes that have +not yet been output. This is especially useful when large notes cause more and +more notes to be moved down to new pages. A good time to force the +output\textnote{force output} is, for example, the end of a chapter or the end +of the document. + +\begin{Declaration} + \Macro{clearnotecolumn}\OParameter{note column name} +\end{Declaration} +This command prints all notes\textnote{pending notes} of a particular note +column that have not yet been output by the end of the current page but which +were created on that or a previous page. Blank pages are generated as needed +to output these pending notes. During the output of the pending notes of this +note column, notes of other note columns may also be output, but only as +necessary to output the pending notes of the specified note column. + +During the output of the pending notes, notes created in the previous \LaTeX{} +run on the pages that are now replaced by the inserted blank pages may be +output by mistake. This will be corrected automatically in one of the +subsequent \LaTeX{} runs. Such shifts are usually indicated by the message: +``\LaTeX{} Warning: Label(s) may have changed. Rerun to get cross-references +right.'' + +The note column whose pending notes are to be output is indicated by the +optional argument \PName{note column name}. If this argument is omitted, the +notes of the default note column \PValue{marginpar} will be output. + +The attentive reader\textnote{forced output vs. synchronisation} will have +noticed that the forced output of a note column is not unlike synchronisation. +But if the forced output actually results in an output, it will be at the +start of a new page and not just below the previous output. Nonetheless, a +forced output usually results in fewer \LaTeX{} runs.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{clearnotecolumns}\OParameter{list of note column names} +\end{Declaration} +This command is similar to \DescRef{\LabelBase.cmd.clearnotecolumn}, but the +the optional argument here can be not only the name of one note column but a +comma-separated \PName{list of note column names}. The pending notes of all +these note columns are then ouput. + +If you omit the optional argument or leave it empty, all pending notes of all +note columns will be output.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{autoclearnotecolumns}{simple switch} +\end{Declaration} +As a rule, pending notes will always be output if a document +implicitly\,---\,e.\,g. because of a \DescRef{maincls.cmd.chapter} +command\,---\,or explicitly executes \DescRef{maincls.cmd.clearpage}. This is +also the case at the end of the document within +\Macro{end}\PParameter{document}. The \Option{autoclearnotecolumns} option can +be used to control whether \DescRef{\LabelBase.cmd.clearnotecolumns} should be +executed automatically without arguments when running +\DescRef{maincls.cmd.clearpage}. + +Since this is generally the desired behaviour, the option is active by +default. But you can change this with the appropriate value for a simple +switch (see \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}) +at any time. + +Note\textnote{Attention!} that disabling the automatic output of pending notes +can result in lost notes at the end of the document. So in this case you +should insert \DescRef{\LabelBase.cmd.clearnotecolumns} before +\Macro{end}\PParameter{document} fore safety's sake. + +The question from the end of the last section should now be answered. If the +paragraph is to be completely output, it had to be wrapped to the next page. +This is, of course, the default setting. However, since this would happen +after the end of the \DescRef{maincls.env.addmargin} environment, the forced +output could still overlap with subsequent text. So in the example it would +make sense to add another synchronisation point after the +\DescRef{maincls.env.addmargin} environment. + +The result of the example is shown in +\autoref{fig:scrlayer-notecolumn.example}.\iffree{}{ Only the colour has been +changed from blue to grey.} + +\begin{figure} + \KOMAoptions{captions=bottombeside}% + \setcapindent{0pt}% + \begin{captionbeside}[{A sample page for the example in + \autoref{cha:scrlayer-notecolumn}}]{A sample page for the example in + this chapter\label{fig:scrlayer-notecolumn.example}}[l] + \frame{\includegraphics[width=.5\textwidth,keepaspectratio]% + {scrlayer-notecolumn-example-en}} + \end{captionbeside} +\end{figure} +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-de.pdf b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-de.pdf new file mode 100644 index 0000000000..2734b618b5 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-de.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-de.tex b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-de.tex new file mode 100644 index 0000000000..263fba4598 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-de.tex @@ -0,0 +1,111 @@ +% ====================================================================== +% scrlayer-notecolumn-example-de.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% +% Example file for the chapter about scrlayer-notecolumn +% of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ +\documentclass{scrartcl} +\usepackage[ngerman]{babel} +\usepackage[T1]{fontenc} +\usepackage{lmodern} +\usepackage{xcolor} + +\usepackage{scrjura} +\setkomafont{contract.Clause}{\bfseries} +\setkeys{contract}{preskip=-\dp\strutbox} + +\usepackage{scrlayer-scrpage} +\usepackage{scrlayer-notecolumn} + +\newlength{\paragraphscolwidth} +\AfterCalculatingTypearea{% + \setlength{\paragraphscolwidth}{.333\textwidth}% + \addtolength{\paragraphscolwidth}{-\marginparsep}% +} +\recalctypearea +\DeclareNewNoteColumn[% + position=\oddsidemargin+1in + +.667\textwidth + +\marginparsep, + width=\paragraphscolwidth, + font=\raggedright\footnotesize + \color{blue} +]{paragraphs} + +\begin{document} + +\title{Kommentar zum GüdaVaS} +\author{Professor R. O. Tenase} +\date{11.\,11.\,2011} +\maketitle +\tableofcontents + +\section{Vormerkung} +Das GüdaVaS ist ohne jeden Zweifel das wichtigste Gesetz, das in +Spaßmaniern in den letzten eintausend Jahren verabschiedet wurde. +Die erste Lesung fand bereits am 11.\,11\,1111 im obersten +spaßmanischen Kongress statt, wurde aber vom damalige Spaßvesier +abgelehnt. Erst nach Umwandlung der spaßmanischen, aberwitzigen Monarchie +in eine repräsentative, witzige Monarchie durch W. Itzbold, den +urkomischen, am 9.\,9.\,1999 war der Weg für dieses Gesetz endlich frei. + +\section{Analyse} + +\begin{addmargin}[0pt]{.333\textwidth} + \makenote[paragraphs]{% + \protect\begin{contract} + \protect\Clause{title={Kein Witz ohne Publikum}} + Ein Witz kann nur dort witzig sein, wo er auf ein Publikum trifft. + \protect\end{contract} + } + Dies ist eine der zentralsten Aussagen des Gesetzes. Sie ist derart + elementar, dass es durchaus angebracht ist, sich vor der Weisheit der + Verfasser zu verbeugen. + + \syncwithnotecolumn[paragraphs]\bigskip + \makenote[paragraphs]{% + \protect\begin{contract} + \protect\Clause{title={Komik der Kultur}} + \setcounter{par}{0}Die Komik eines Witzes kann durch das kulturelle + Umfeld, in dem er erzählt wird, bestimmt sein. + + Die Komik eines Witzes kann durch das kulturelle Umfeld, in dem er + spielt, bestimmt sein. + \protect\end{contract} + } + Die kulturelle Komponente eines Witzes ist tatsächlich nicht zu + vernachlässigen. Über die politische Korrektheit der Nutzung des kulturellen + Umfeldes kann zwar treff"|lich gestritten werden, nichtsdestotrotz ist die + Treffsicherheit einer solchen Komik im entsprechenden Umfeld frappierend. Auf + der anderen Seite kann ein vermeintlicher Witz im falschen kulturellen + Umfeld auch zu einer echten Gefahr für den Witzeerzähler werden. +\end{addmargin} + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-en.pdf b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-en.pdf new file mode 100644 index 0000000000..1d254dbec2 Binary files /dev/null and b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-en.pdf differ diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-en.tex b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-en.tex new file mode 100644 index 0000000000..c624244cf7 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn-example-en.tex @@ -0,0 +1,106 @@ +% ====================================================================== +% scrlayer-notecolumn-example-en.tex +% Copyright (c) Markus Kohm, 2018-2022 +% +% 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.md. +% ====================================================================== +% +% Example file for the chapter about scrlayer-notecolumn +% of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ +\documentclass{scrartcl} +\usepackage{lmodern} +\usepackage{xcolor} + +\usepackage{scrjura} +\setkomafont{contract.Clause}{\bfseries} +\setkeys{contract}{preskip=-\dp\strutbox} + +\usepackage{scrlayer-scrpage} +\usepackage{scrlayer-notecolumn} + +\newlength{\paragraphscolwidth} +\AfterCalculatingTypearea{% + \setlength{\paragraphscolwidth}{.333\textwidth}% + \addtolength{\paragraphscolwidth}{-\marginparsep}% +} +\recalctypearea +\DeclareNewNoteColumn[% + position=\oddsidemargin+1in + +.667\textwidth + +\marginparsep, + width=\paragraphscolwidth, + font=\raggedright\footnotesize + \color{blue} +]{paragraphs} + +\begin{document} + +\title{Commentary on the SCRACH} +\author{Professor R. O. Tenase} +\date{11/11/2011} +\maketitle +\tableofcontents + +\section{Preamble} +The SCRACH is without doubt the most important law on the manners of humour +that has been passed in the last thousand years. The first reading took place +on 11/11/1111 in the Supreme Manic Fun Congress, but the law was rejected by +the Vizier of Fun. Only after the ludicrous, Manic Fun monarchy was +transformed into a representative, witty monarchy by W. Itzbold, on 9/9/1999 +was the way finally clear for this law. + +\section{Analysis} + +\begin{addmargin}[0pt]{.333\textwidth} + \makenote[paragraphs]{% + \protect\begin{contract} + \protect\Clause{title={No Joke without an Audience}} + A joke can only be funny if is has an audience. + \protect\end{contract} + } + This is one of the most central statements of the law. It is so fundamental + that it is quite appropriate to bow to the wisdom of the authors. + + \syncwithnotecolumn[paragraphs]\bigskip + \makenote[paragraphs]{% + \protect\begin{contract} + \protect\Clause{title={Humor of a Culture}} + \setcounter{par}{0}The humour of a joke can be determined by the + cultural environment in which it is told. + + The humour of a joke can be determined by the cultural environment in + which it acts. + \protect\end{contract} + } + The cultural component of a joke is, in fact, not negligible. Although the + political correctness of using the cultural environment can easily be + disputed, nonetheless the accuracy of such comedy in the appropriate + environment is striking. On the other hand, a supposed joke in the wrong + cultural environment can also be a real danger for the joke teller. +\end{addmargin} + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn.html b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn.html index b386b493a2..d5a722b766 100644 --- a/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn.html +++ b/macros/latex/contrib/koma-script/doc/scrlayer-notecolumn.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrlayer-notecolumn" /> + + - + - The KOMA-Script Documentation Wrapper + Note Columns with scrlayer-notecolumn -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

Note Columns with scrlayer-notecolumn

+

Notizspalten mit scrlayer-notecolumn

- I think you are searching for the KOMA-Script documentation. You - may find the Englisch documentation - at scrguien.pdf and an index of it - at scrguien.html. + I think you are searching for the chapter + “Note Columns with scrlayer-notecolumn in the + KOMA-Script documentation.
- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Notizspalten mit scrlayer-notecolumn in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-scrpage-de.tex b/macros/latex/contrib/koma-script/doc/scrlayer-scrpage-de.tex new file mode 100644 index 0000000000..7cf7502ba6 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlayer-scrpage-de.tex @@ -0,0 +1,1316 @@ +% ====================================================================== +% scrlayer-scrpage-de.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrlayer-scrpage of the KOMA-Script guide +% +% ============================================================================ + +\KOMAProvidesFile{scrlayer-scrpage-de.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter:scrlayer-scrpage)] + +\chapter[{Kopf- und Fußzeilen mit \Package{scrlayer-scrpage}}] + {Kopf-\ChangedAt{v3.12}{\Package{scrlayer-scrpage}} und Fußzeilen mit + \Package{scrlayer-scrpage}} +\labelbase{scrlayer-scrpage} +% +\BeginIndexGroup% +\BeginIndex{Package}{scrlayer-scrpage}% +Das Paket \hyperref[cha:scrlayer]{\Package{scrlayer}}% +\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}}% +\IndexPackage{scrlayer} ist einer der grundlegenden Bausteine in +\KOMAScript{}. Es bietet ein Ebenenmodell und darauf basierend ein +Seitenstil-Modell. Für die direkte Verwendung durch den durchschnittlichen +Anwender ist die Schnittstelle dieses Pakets in seiner Mächtigkeit jedoch +nicht leicht zu durchschauen. Aufbauend auf +\hyperref[cha:scrlayer]{\Package{scrlayer}} bietet +\Package{scrlayer-scrpage}\important{\Package{scrlayer-scrpage}} eine +Benutzerschnittstelle, die einigen Anwendern teilweise vielleicht noch vom +veralteten Paket +\Package{scrpage2}\important{\Package{scrpage2}}\IndexPackage{scrpage2} +vertraut ist. Allerdings wurde jene Schnittstelle stark erweitert, +vereinheitlicht und auf allgemeine Neuerungen in \KOMAScript~3 angepasst. +Einige wenige Möglichkeiten, die eigentlich zu +\hyperref[cha:scrlayer]{\Package{scrlayer}} und daher in +\autoref{cha:scrlayer} gehören, sind auch in diesem Kapitel dokumentiert, da +sie für die Verwendung von \Package{scrlayer-scrpage} ebenfalls wichtig +sind. Wer bereits mit \Package{scrpage2} vertraut ist und dort keine +unsauberen Rückgriffe auf interne Anweisungen getätigt hat, kann % +\iffalse in der Regel \fi% Umbruchkorrektur +\Package{scrpage2} recht einfach durch \Package{scrlayer-scrpage} ersetzen. + +Neben \Package{scrlayer-scrpage} ist auch beispielsweise +\Package{fancyhdr}\important{\Package{fancyhdr}}% +\IndexPackage[indexmain]{\Package{fancyhdr}} (siehe \cite{package:fancyhdr}) +grundsätzlich geeignet, um Kopf und Fuß der Seiten zu +konfigurieren. Allerdings\textnote{Achtung!} unterstützt dieses Paket diverse +Möglichkeiten von \KOMAScript{}, angefangen von Änderungen der Schrift über +das Elemente-Modell (siehe \DescRef{\LabelBase.cmd.setkomafont}, +\DescRef{\LabelBase.cmd.addtokomafont} und +\DescRef{\LabelBase.cmd.usekomafont} in +\autoref{sec:scrlayer-scrpage.textmarkup}, ab +\DescPageRef{\LabelBase.cmd.setkomafont}) bis hin zum konfigurierbaren Format +der Gliederungsnummern in Kolumnentiteln (siehe Option +\DescRef{maincls.option.numbers} und beispielsweise Anweisung +\DescRef{\LabelBase.cmd.chaptermarkformat} in \autoref{sec:maincls.structure}, +\DescPageRef{maincls.option.numbers} und +\DescPageRef{maincls.cmd.chaptermarkformat}), +nicht. Daher\textnote{Empfehlung!} wird für die Verwendung mit den +\KOMAScript-Klassen \Package{scrlayer-scrpage} empfohlen. Natürlich ist +\Package{scrlayer-scrpage} auch mit anderen Klassen, beispielsweise den +Standardklassen, eine gute Wahl. + +Über die in diesem Kapitel erklärten Möglichkeiten hinaus bietet das Paket +\Package{scrlayer-scrpage} weiteres, das jedoch nur für einige wenige +Anwender von Interesse sein dürfte und daher in +\autoref{cha:scrlayer-scrpage-experts} von \autoref{part:forExperts} ab +\autopageref{cha:scrlayer-scrpage-experts} ausgeführt wird. Dennoch: Falls die +hier in \autoref{part:forAuthors} dokumentierten Möglichkeiten für Sie nicht +ausreichen, sei Ihnen auch jenes Kapitel nahegelegt. + +\LoadCommonFile{options} % \section{Frühe oder späte Optionenwahl} + +\LoadCommonFile{headfootheight} % \section{Höhe von Kopf und Fuß} + +\LoadCommonFile{textmarkup} % \section{Textauszeichnung} + +\section{Verwendung vordefinierter Seitenstile} +\seclabel{predefined.pagestyles} + +Die einfachste Möglichkeit, mit \Package{scrlayer-scrpage} zu seinem +Wunschdesign für Kopf und Fuß der Seite zu gelangen, ist die Verwendung eines +vorgefertigten Seitenstils. +% +\iftrue % Umbruchoptimierung + In diesem Abschnitt werden diese vom Paket \Package{scrlayer-scrpage} bereits + beim Laden definierten Seitenstile vorgestellt. Darüber hinaus werden + diejenigen Befehle erklärt, mit denen grundlegende Einstellungen bei diesen + Seitenstilen vorgenommen werden können. Weitere Optionen, Befehle und + Hintergründe sind in den nachfolgenden Abschnitten, aber auch in + \autoref{sec:scrlayer-scrpage-experts.pagestyle.pairs} in + \autoref{part:forExperts} zu finden.% +\fi + +\begin{Declaration} + \PageStyle{scrheadings} + \PageStyle{plain.scrheadings} +\end{Declaration} +Das Paket \Package{scrlayer-scrpage} stellt zwei Seitenstile zur Verfügung, +die nach eigenen Wünschen umgestaltet werden +können. Als\textnote{Voreinstellung} erstes wäre der voreingestellte +Seitenstil \PageStyle{scrheadings}\important{\PageStyle{scrheadings}} zu +nennen. Dieser ist als Seitenstil mit Kolumnentitel vorgesehen. Er ähnelt in +der Voreinstellung dem Seitenstil +\DescRef{maincls.pagestyle.headings}\IndexPagestyle{headings} der Standard- +oder der \KOMAScript-Klassen. Was genau im Kopf und Fuß ausgegeben wird, ist +über die nachfolgend beschriebenen Befehle und Optionen einstellbar. + +Als zweites ist der Seitenstil +\PageStyle{plain.scrheadings}\important{\PageStyle{plain.scrheadings}} zu +nennen. Dieser ist als Seitenstil ohne Kolumnentitel vorgesehen. Er ähnelt in +der Voreinstellung dem Seitenstil +\DescRef{maincls.pagestyle.plain}\IndexPagestyle{plain} der Standard- oder der +\KOMAScript-Klassen. Was genau im Kopf und Fuß ausgegeben wird, ist auch hier +über die nachfolgend beschriebenen Befehle und Optionen einstellbar. + +Natürlich kann auch \PageStyle{scrheadings} als Seitenstil ohne Kolumnentitel +und \PageStyle{plain.scrheadings} als Seitenstil mit Kolumnentitel +konfiguriert werden. Es ist jedoch zweckmäßig, sich an die vorgenannte +Konvention zu halten. Die beiden Seitenstile beeinflussen sich nämlich in +gewisser Weise gegenseitig. Sobald einer der Seitenstile einmal ausgewählt +wurde, ist \PageStyle{scrheadings} auch unter dem Namen +\PageStyle{headings}\important{\PageStyle{headings}}% +\IndexPagestyle[indexmain]{headings} und der Seitenstil +\PageStyle{plain.scrheadings} auch unter dem Namen +\PageStyle{plain}\important{\PageStyle{plain}}% +\IndexPagestyle[indexmain]{plain} aktivierbar. Das hat den Vorteil, dass bei +Klassen, die automatisch zwischen \PageStyle{headings} und \PageStyle{plain} +umschalten, durch einmalige Auswahl von \PageStyle{scrheadings} oder +\PageStyle{plain.scrheadings} nun zwischen diesen beiden Stilen umgeschaltet +wird. Direkte Anpassungen der entsprechenden Klassen sind nicht +erforderlich. Die beiden Seitenstile stellen also quasi ein Paar dar, das als +Ersatz für \PageStyle{headings} und \PageStyle{plain} verwendet werden +kann. Sollten weitere solche Paare benötigt werden, so sei auf +\autoref{sec:scrlayer-scrpage-experts.pagestyle.pairs} in +\autoref{part:forExperts} verwiesen.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{lehead}\OParameter{Inhalt plain.scrheadings}% + \Parameter{Inhalt scrheadings} + \Macro{cehead}\OParameter{Inhalt plain.scrheadings}% + \Parameter{Inhalt scrheadings} + \Macro{rehead}\OParameter{Inhalt plain.scrheadings}% + \Parameter{Inhalt scrheadings} + \Macro{lohead}\OParameter{Inhalt plain.scrheadings}% + \Parameter{Inhalt scrheadings} + \Macro{cohead}\OParameter{Inhalt plain.scrheadings}% + \Parameter{Inhalt scrheadings} + \Macro{rohead}\OParameter{Inhalt plain.scrheadings}% + \Parameter{Inhalt scrheadings} +\end{Declaration} +\iffalse% Umbruchvarianten +Was in den Kopf der Seitenstile +\DescRef{\LabelBase.pagestyle.plain.scrheadings} und +\DescRef{\LabelBase.pagestyle.scrheadings} % +\else% +Was bei \DescRef{\LabelBase.pagestyle.scrheadings} und +\DescRef{\LabelBase.pagestyle.plain.scrheadings} in den Kopf der Seite % +\fi% +geschrieben wird, ist mit Hilfe dieser Befehle einstellbar. Dabei setzt das +optionale Argument jeweils den Inhalt eines Elements in +\DescRef{\LabelBase.pagestyle.plain.scrheadings}% +\iffalse% Umbruchvarianten +\iffree{}{ beziehungsweise \PageStyle{scrplain}} \fi , während das +obligatorische Argument jeweils einen Inhalt in +\DescRef{\LabelBase.pagestyle.scrheadings} setzt. + +Die Inhalte für gerade, also linke Seiten\textnote{linke Seite} werden mit den +Befehlen \Macro{lehead}, \Macro{cehead} und \Macro{rehead} gesetzt. Das +»\texttt{e}« an zweiter Stelle des Befehlsnamens steht % +\iffalse dabei \fi % Umbruchkorrektur (analog im nächsten Absatz!) +für »\emph{even}« (engl. für »gerade«). + +Die Inhalte für ungerade, also rechte Seiten\textnote{rechte Seite} werden mit +den Befehlen \Macro{lohead}, \Macro{cohead} und \Macro{rohead} gesetzt. Das +»\texttt{o}« an zweiter Stelle des Befehlsnamens steht % +\iffalse dabei \fi % Umbruchkorrektur (analog im vorherigen Absatz!) +für »\emph{odd}« (engl. für »ungerade«). + +Es\textnote{Achtung!} sei an dieser Stelle noch einmal darauf hingewiesen, +dass im einseitigen Satz nur rechte Seiten existieren und diese von \LaTeX{} +unabhängig von ihrer Nummer als ungerade Seiten bezeichnet werden. + +Jeder Kopf eines Seitenstils besitzt ein linksbündiges\textnote{linksbündig} +Element, das mit \Macro{lehead} respektive \Macro{lohead} gesetzt werden +kann. Das »\texttt{l}« am Anfang des Befehlsnamens steht hier für »\emph{left + aligned}« (engl. für »linksbündig«). + +Ebenso besitzt jeder Kopf eines Seitenstils ein zentriert\textnote{zentriert} +gesetztes Element, das mit \Macro{cehead} respektive \Macro{cohead} gesetzt +werden kann. Das »\texttt{c}« am Anfang des Befehlsnamens steht hier für +»\emph{centered}« (engl. für »zentriert«). + +Entsprechend besitzt jeder Kopf eines Seitenstils auch ein +rechtsbündiges\textnote{rechtsbündig} Element, das mit \Macro{rehead} +respektive \Macro{rohead} gesetzt werden kann. Das »\texttt{r}« am Anfang des +Befehlsnamens steht hier für »\emph{right aligned}« (engl. für +»rechtsbündig«). + +Die\textnote{Achtung!} drei vorgenannten Elemente nehmen im Kopf denselben +Raum ein. Sie sind lediglich unterschiedlich ausgerichtet. Werden also mehrere +dieser Elemente verwendet, so muss der Anwender selbst Sorge tragen, dass sie +sich nicht gegenseitig überdecken. + +\BeginIndexGroup +\BeginIndex{FontElement}{pagehead}\LabelFontElement{pagehead}% +\BeginIndex{FontElement}{pageheadfoot}\LabelFontElement{pageheadfoot}% +Diese Elemente besitzen auch nicht jedes für sich eine Schriftzuordnung mit +Hilfe der Befehle \DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:scrlayer-scrpage.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}), sondern alle zusammen über das +Element \FontElement{pagehead}\important{\FontElement{pagehead}}. Vor diesem +wird außerdem noch das Element +\FontElement{pageheadfoot}\important{\FontElement{pageheadfoot}} +angewandt. Die Voreinstellungen für diese beiden Elemente sind +\autoref{tab:scrlayer-scrpage.fontelements}, +\autopageref{tab:scrlayer-scrpage.fontelements} zu entnehmen.% +\EndIndexGroup + +In \autoref{fig:scrlayer-scrpage.head} ist die Bedeutung der einzelnen Befehle +für den Kopf der Seiten im doppelseitigen Modus noch einmal skizziert.% +% +\begin{figure}[tp] + \centering + \begin{picture}(\textwidth,30mm)(0,-10mm) + \thinlines + \small\ttfamily + % linke Seite + \put(0,20mm){\line(1,0){.49\textwidth}}% + \put(0,0){\line(0,1){20mm}}% + \multiput(0,0)(0,-1mm){10}{\line(0,-1){.5mm}}% + \put(.49\textwidth,5mm){\line(0,1){15mm}}% + \put(.05\textwidth,10mm){% + \color{ImageRed}% + \put(-.5em,0){\line(1,0){4em}}% + \multiput(3.5em,0)(.25em,0){5}{\line(1,0){.125em}}% + \put(-.5em,0){\line(0,1){\baselineskip}}% + \put(-.5em,\baselineskip){\line(1,0){4em}}% + \multiput(3.5em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \makebox(4em,5mm)[l]{\Macro{lehead}}% + }% + \put(.465\textwidth,10mm){% + \color{ImageBlue}% + \put(-4em,0){\line(1,0){4em}}% + \multiput(-4em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(0,0){\line(0,1){\baselineskip}}% + \put(-4em,\baselineskip){\line(1,0){4em}}% + \multiput(-4em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-4.5em,0){\makebox(4em,5mm)[r]{\Macro{rehead}}}% + }% + \put(.2525\textwidth,10mm){% + \color{ImageGreen}% + \put(-2em,0){\line(1,0){4em}}% + \multiput(2em,0)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,\baselineskip){\line(1,0){4em}}% + \multiput(2em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,0){\makebox(4em,5mm)[c]{\Macro{cehead}}}% + }% + % rechte Seite + \put(.51\textwidth,20mm){\line(1,0){.49\textwidth}}% + \put(.51\textwidth,5mm){\line(0,1){15mm}}% + \put(\textwidth,0){\line(0,1){20mm}}% + \multiput(\textwidth,0)(0,-1mm){10}{\line(0,-1){.5mm}}% + \put(.5325\textwidth,10mm){% + \color{ImageBlue}% + \put(0,0){\line(1,0){4em}}% + \multiput(4em,0)(.25em,0){5}{\line(1,0){.125em}}% + \put(0,0){\line(0,1){\baselineskip}}% + \put(0em,\baselineskip){\line(1,0){4em}}% + \multiput(4em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \put(.5em,0){\makebox(4em,5mm)[l]{\Macro{lohead}}}% + }% + \put(.965\textwidth,10mm){% + \color{ImageRed}% + \put(-4em,0){\line(1,0){4em}}% + \multiput(-4em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(0,0){\line(0,1){\baselineskip}}% + \put(-4em,\baselineskip){\line(1,0){4em}}% + \multiput(-4em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-4.5em,0){\makebox(4em,5mm)[r]{\Macro{rohead}}}% + }% + \put(.75\textwidth,10mm){% + \color{ImageGreen}% + \put(-2em,0){\line(1,0){4em}}% + \multiput(2em,0)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,\baselineskip){\line(1,0){4em}}% + \multiput(2em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,0){\makebox(4em,5mm)[c]{\Macro{cohead}}}% + }% + % Befehle für beide Seiten + \color{ImageBlue}% + \put(.5\textwidth,0){\makebox(0,\baselineskip)[c]{\Macro{ihead}}}% + \color{ImageGreen}% + \put(.5\textwidth,-5mm){\makebox(0,\baselineskip)[c]{\Macro{chead}}} + \color{ImageRed}% + \put(.5\textwidth,-10mm){\makebox(0,\baselineskip)[c]{\Macro{ohead}}} + \put(\dimexpr.5\textwidth-2em,.5\baselineskip){% + \color{ImageBlue}% + \put(0,0){\line(-1,0){1.5em}}% + \put(-1.5em,0){\vector(0,1){5mm}}% + \color{ImageGreen}% + \put(0,-1.25\baselineskip){\line(-1,0){\dimexpr .25\textwidth-2em\relax}}% + \put(-\dimexpr + .25\textwidth-2em\relax,-1.25\baselineskip){\vector(0,1){\dimexpr + 5mm+1.25\baselineskip\relax}} + \color{ImageRed}% + \put(0,-2.5\baselineskip){\line(-1,0){\dimexpr .45\textwidth-4em\relax}}% + \put(-\dimexpr + .45\textwidth-4em\relax,-2.5\baselineskip){\vector(0,1){\dimexpr + 5mm+2.5\baselineskip\relax}} + }% + \put(\dimexpr.5\textwidth+2em,.5\baselineskip){% + \color{ImageBlue}% + \put(0,0){\line(1,0){1.5em}}% + \put(1.5em,0){\vector(0,1){5mm}}% + \color{ImageGreen}% + \put(0,-1.25\baselineskip){\line(1,0){\dimexpr .25\textwidth-2em\relax}} + \put(\dimexpr + .25\textwidth-2em\relax,-1.25\baselineskip){\vector(0,1){\dimexpr + 5mm+1.25\baselineskip\relax}} + \color{ImageRed}% + \put(0,-2.5\baselineskip){\line(1,0){\dimexpr .45\textwidth-4em\relax}} + \put(\dimexpr + .45\textwidth-4em\relax,-2.5\baselineskip){\vector(0,1){\dimexpr + 5mm+2.5\baselineskip\relax}} + }% + \end{picture} + \caption[Befehle zum Setzen des Seitenkopfes]% + {Die Bedeutung der Befehle zum Setzen der Inhalte des Kopfes eines + Seitenstils für die Seitenköpfe einer schematischen Doppelseite} + \label{fig:scrlayer-scrpage.head} +\end{figure} +% +\begin{Example} + Angenommen, Sie verfassen einen kurzen Artikel und wollen, dass im Kopf der + Seiten links der Name des Autors und rechts der Titel des Artikels + steht. Sie schreiben daher beispielsweise:% + {\phantomsection\xmpllabel{loheadrohead}}% +\begin{lstcode} + \documentclass{scrartcl} + \usepackage{scrlayer-scrpage} + \lohead{Peter Musterheinzel} + \rohead{Seitenstile mit \KOMAScript} + \pagestyle{scrheadings} + \begin{document} + \title{Seitenstile mit \KOMAScript} + \author{Peter Musterheinzel} + \maketitle + \end{document} +\end{lstcode} + Doch, was ist das? Auf der ersten Seite erscheint nur eine Seitenzahl im + Fuß, der Kopf hingegen bleibt leer! + + Die Erklärung dafür ist einfach: Die Klasse \Class{scrartcl} schaltet wie + auch die Standardklasse \Class{article} für die Seite mit dem Titelkopf in + der Voreinstellung auf den Seitenstil \PageStyle{plain}. Nach der Anweisung + \DescRef{maincls.cmd.pagestyle}\PParameter{scrheadings} in der Präambel + unseres Beispiels führt dies tatsächlich zur Verwendung des Seitenstils + \DescRef{\LabelBase.pagestyle.plain.scrheadings} für die Seite mit dem + Titelkopf. Dieser Seitenstil ist bei Verwendung einer \KOMAScript-Klasse mit + leerem Kopf und Seitenzahl im Fuß vorkonfiguriert. Da im Beispiel das + optionale Argument von \Macro{lohead} und \Macro{rohead} gar nicht verwendet + wird, bleibt der Seitenstil \DescRef{\LabelBase.pagestyle.plain.scrheadings} + unverändert. Das Ergebnis ist für die erste Seite also tatsächlich korrekt. + + Fügen Sie jetzt im Beispiel nach \DescRef{maincls.cmd.maketitle} so viel + Text ein, dass eine zweite Seite ausgegeben wird. Sie können dazu auch + einfach \Macro{usepackage}\PParameter{lipsum}\IndexPackage{lipsum} in der + Dokumentpräambel und \Macro{lipsum}\IndexCmd{lipsum} nach + \DescRef{maincls.cmd.maketitle} ergänzen. Wie Sie sehen werden, enthält der + Kopf der zweiten Seite nun, genau wie gewünscht, den Namen des Autors und + den Titel des Dokuments. + + Zum Vergleich sollten Sie zusätzlich das optionale Argument der Anweisungen + \Macro{lohead} und \Macro{rohead} mit einem Inhalt versehen. Ändern Sie das + Beispiel dazu wie folgt ab: +\begin{lstcode} + \documentclass{scrartcl} + \usepackage{scrlayer-scrpage} + \lohead[Peter Musterheinzel] + {Peter Musterheinzel} + \rohead[Seitenstile mit \KOMAScript] + {Seitenstile mit \KOMAScript} + \pagestyle{scrheadings} + \usepackage{lipsum} + \begin{document} + \title{Seitenstile mit \KOMAScript} + \author{Peter Musterheinzel} + \maketitle + \lipsum + \end{document} +\end{lstcode} + Jetzt haben Sie den Kopf auch auf der ersten Seite \iffree{direkt}{\unskip} + über dem Titelkopf\iffree{ selbst}{}. Das kommt daher, dass Sie mit den + beiden optionalen Argumenten \iffree{den Seitenstil}{\unskip} + \DescRef{\LabelBase.pagestyle.plain.scrheadings} nun ebenfalls + entsprechend konfiguriert haben. Wie Sie am Ergebnis vermutlich auch + erkennen, ist es jedoch besser, diesen Seitenstil unverändert zu lassen, da + der Kolumnentitel über dem Titelkopf doch eher störend ist. + + Alternativ zur Konfigurierung von + \DescRef{\LabelBase.pagestyle.plain.scrheadings} hätte man bei Verwendung + einer \KOMAScript-Klasse übrigens auch den Seitenstil für Seiten mit + Titelkopf ändern können. Siehe dazu \DescRef{maincls.cmd.titlepagestyle}% + \important{\DescRef{maincls.cmd.titlepagestyle}}% + \IndexCmd{titlepagestyle} in \autoref{sec:maincls.pagestyle}, + \DescPageRef{maincls.cmd.titlepagestyle}. +\end{Example} + +\iftrue% Umbruchoptimierung +\leavevmode\textnote{Achtung!}% +\else Erlauben Sie mir einen wichtigen Hinweis:\textnote{Achtung!} % +\fi% +Sie sollten niemals die Überschrift oder die Nummer einer +Gliederungsebene mit Hilfe einer dieser Anweisungen als Kolumnentitel in den +Kopf der Seite setzen. Aufgrund der Asynchronizität von Seitenaufbau und +Seitenausgabe kann % +\iffalse% Umbruchoptimierung +es sonst leicht geschehen, dass die falsche Nummer oder die falsche +Überschrift im Kolumnentitel ausgegeben wird% +\else% +sonst die falsche Nummer oder die falsche Überschrift im Kolumnentitel +ausgegeben werden% +\fi% +. Stattdessen ist der Mark-Mechanismus, idealer Weise in Verbindung mit den +Automatismen aus dem nächsten Abschnitt, zu verwenden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{lehead*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{cehead*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{rehead*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{lohead*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{cohead*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{rohead*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} +\end{Declaration} +Die Sternvarianten\ChangedAt{v3.14}{\Package{scrlayer-scrpage}} der zuvor +erklärten Befehle unterscheiden sich von der Form ohne Stern lediglich bei +Weglassen des optionalen Arguments \OParameter{Inhalt + plain.scrheadings}. Während die Form ohne Stern in diesem Fall den Inhalt +von \DescRef{\LabelBase.pagestyle.plain.scrheadings} unangetastet lässt, wird +bei der Sternvariante dann das obligatorische Argument \PName{Inhalt + scrheadings} auch für \DescRef{\LabelBase.pagestyle.plain.scrheadings} +verwendet. Sollen also beide Argumente gleich sein, so kann man einfach die +Sternvariante mit nur einem Argument verwenden.% +% +\begin{Example} + Mit der Sternform von \DescRef{\LabelBase.cmd.lohead} und + \DescRef{\LabelBase.cmd.rohead} lässt sich das + Beispiel aus der vorherigen Erklärung etwas verkürzen: +\begin{lstcode} + \documentclass{scrartcl} + \usepackage{scrlayer-scrpage} + \lohead*{Peter Musterheinzel} + \rohead*{Seitenstile mit \KOMAScript} + \pagestyle{scrheadings} + \usepackage{lipsum} + \begin{document} + \title{Seitenstile mit \KOMAScript} + \author{Peter Musterheinzel} + \maketitle + \lipsum + \end{document} +\end{lstcode}% +\end{Example}% +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \Macro{lefoot}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{cefoot}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{refoot}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{lofoot}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{cofoot}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{rofoot}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} +\end{Declaration} +Was bei \DescRef{\LabelBase.pagestyle.scrheadings} und +\DescRef{\LabelBase.pagestyle.plain.scrheadings} in den Fuß der Seite +geschrieben wird, ist mit Hilfe dieser Befehle einstellbar. Dabei setzt das +optionale Argument jeweils den Inhalt eines Elements in +\DescRef{\LabelBase.pagestyle.plain.scrheadings}, während das obligatorische +Argument jeweils einen Inhalt in \DescRef{\LabelBase.pagestyle.scrheadings} +setzt. + +Die Inhalte für gerade, also linke Seiten\textnote{linke Seite} werden mit den +Befehlen \Macro{lefoot}, \Macro{cefoot} und \Macro{refoot} gesetzt. Das +»\texttt{e}« an zweiter Stelle des Befehlsnamens steht % +\iffalse dabei \fi % Umbruchkorrektur (enstprechend im nächsten Absatz) +für »\emph{even}« (engl. für »gerade«). + +Die Inhalte für ungerade, also rechte Seiten\textnote{rechte Seite} werden mit +den Befehlen \Macro{lofoot}, \Macro{cofoot} und \Macro{rofoot} gesetzt. Das +»\texttt{o}« an zweiter Stelle des Befehlsnamens steht % +\iffalse dabei \fi % Umbruchkorrektur (enstprechend im vorherigen Absatz) +für »\emph{odd}« (engl. für »ungerade«). + +Es\textnote{Achtung!} sei an dieser Stelle noch einmal darauf hingewiesen, +dass im einseitigen Satz nur rechte Seiten existieren und diese von \LaTeX{} +unabhängig von ihrer Nummer als ungerade Seiten bezeichnet werden. + +Jeder Fuß eines Seitenstils besitzt ein linksbündiges\textnote{linksbündig} +Element, das mit \Macro{lefoot} respektive \Macro{lofoot} gesetzt werden +kann. Das »\texttt{l}« am Anfang des Befehlsnamens steht hier für »\emph{left + aligned}« (engl. für »linksbündig«). + +Ebenso besitzt jeder Fuß eines Seitenstils ein zentriert\textnote{zentriert} +gesetztes Element, das mit \Macro{cefoot} respektive \Macro{cofoot} gesetzt +werden kann. Das »\texttt{c}« am Anfang des Befehlsnamens steht hier für +»\emph{centered}« (engl. für »zentriert«). + +Entsprechend besitzt jeder Fuß eines Seitenstil auch ein +rechtsbündiges\textnote{rechtsbündig} Element, das mit \Macro{refoot} +respektive \Macro{rofoot} gesetzt werden kann. Das »\texttt{r}« am Anfang des +Befehlsnamens steht hier für »\emph{right aligned}« (engl. für +»rechtsbündig«). + +Die\textnote{Achtung!} drei vorgenannten Elemente nehmen im Fuß denselben +Raum ein. Sie sind lediglich unterschiedlich ausgerichtet. Werden also mehrere +dieser Elemente verwendet, so muss der Anwender selbst Sorge tragen, dass sie +sich nicht gegenseitig überdecken. + +\BeginIndexGroup +\BeginIndex{FontElement}{pagefoot}\LabelFontElement{pagefoot}% +\BeginIndex{FontElement}{pageheadfoot}\LabelFontElement[.foot]{pageheadfoot}% +Diese Elemente besitzen auch nicht jedes für sich eine Schriftzuordnung mit +Hilfe der Befehle \DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:scrlayer-scrpage.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}), sondern alle zusammen über das +Element \FontElement{pagefoot}\important{\FontElement{pagefoot}}. Vor diesem +wird außerdem noch das Element +\FontElement{pageheadfoot}\important{\FontElement{pageheadfoot}} +angewandt. Die Voreinstellungen für diese beiden Elemente sind +\autoref{tab:scrlayer-scrpage.fontelements}, +\autopageref{tab:scrlayer-scrpage.fontelements} zu entnehmen.% +\EndIndexGroup + +In \autoref{fig:scrlayer-scrpage.foot} ist die Bedeutung der einzelnen Befehle +für den Fuß der Seiten im doppelseitigen Modus noch einmal skizziert. +% +\begin{figure}[bp] + \centering + \begin{picture}(\textwidth,30mm) + \thinlines + \small\ttfamily + % linke Seite + \put(0,0){\line(1,0){.49\textwidth}}% + \put(0,0){\line(0,1){20mm}}% + \multiput(0,20mm)(0,1mm){10}{\line(0,1){.5mm}}% + \put(.49\textwidth,0){\line(0,1){15mm}}% + \put(.05\textwidth,5mm){% + \color{ImageRed}% + \put(-.5em,0){\line(1,0){4em}}% + \multiput(3.5em,0)(.25em,0){5}{\line(1,0){.125em}}% + \put(-.5em,0){\line(0,1){\baselineskip}}% + \put(-.5em,\baselineskip){\line(1,0){4em}}% + \multiput(3.5em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \makebox(4em,5mm)[l]{\Macro{lefoot}}% + }% + \put(.465\textwidth,5mm){% + \color{ImageBlue}% + \put(-4em,0){\line(1,0){4em}}% + \multiput(-4em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(0,0){\line(0,1){\baselineskip}}% + \put(-4em,\baselineskip){\line(1,0){4em}}% + \multiput(-4em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-4.5em,0){\makebox(4em,5mm)[r]{\Macro{refoot}}}% + }% + \put(.2525\textwidth,5mm){% + \color{ImageGreen}% + \put(-2em,0){\line(1,0){4em}}% + \multiput(2em,0)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,\baselineskip){\line(1,0){4em}}% + \multiput(2em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,0){\makebox(4em,5mm)[c]{\Macro{cefoot}}}% + }% + % rechte Seite + \put(.51\textwidth,0){\line(1,0){.49\textwidth}}% + \put(.51\textwidth,0){\line(0,1){15mm}}% + \put(\textwidth,0){\line(0,1){20mm}}% + \multiput(\textwidth,20mm)(0,1mm){10}{\line(0,1){.5mm}}% + \put(.5325\textwidth,5mm){% + \color{ImageBlue}% + \put(0,0){\line(1,0){4em}}% + \multiput(4em,0)(.25em,0){5}{\line(1,0){.125em}}% + \put(0,0){\line(0,1){\baselineskip}}% + \put(0em,\baselineskip){\line(1,0){4em}}% + \multiput(4em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \put(.5em,0){\makebox(4em,5mm)[l]{\Macro{lofoot}}}% + }% + \put(.965\textwidth,5mm){% + \color{ImageRed}% + \put(-4em,0){\line(1,0){4em}}% + \multiput(-4em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(0,0){\line(0,1){\baselineskip}}% + \put(-4em,\baselineskip){\line(1,0){4em}}% + \multiput(-4em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-4.5em,0){\makebox(4em,5mm)[r]{\Macro{rofoot}}}% + }% + \put(.75\textwidth,5mm){% + \color{ImageGreen}% + \put(-2em,0){\line(1,0){4em}}% + \multiput(2em,0)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,\baselineskip){\line(1,0){4em}}% + \multiput(2em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,0){\makebox(4em,5mm)[c]{\Macro{cofoot}}}% + }% + % Befehle für beide Seiten + \color{ImageBlue}% + \put(.5\textwidth,15mm){\makebox(0,\baselineskip)[c]{\Macro{ifoot}}}% + \color{ImageGreen}% + \put(.5\textwidth,20mm){\makebox(0,\baselineskip)[c]{\Macro{cfoot}}} + \color{ImageRed}% + \put(.5\textwidth,25mm){\makebox(0,\baselineskip)[c]{\Macro{ofoot}}} + \put(\dimexpr.5\textwidth-2em,.5\baselineskip){% + \color{ImageBlue}% + \put(0,15mm){\line(-1,0){1.5em}}% + \put(-1.5em,15mm){\vector(0,-1){5mm}}% + \color{ImageGreen}% + \put(0,20mm){\line(-1,0){\dimexpr .25\textwidth-2em\relax}}% + \put(-\dimexpr .25\textwidth-2em\relax,20mm){\vector(0,-1){10mm}}% + \color{ImageRed}% + \put(0,25mm){\line(-1,0){\dimexpr .45\textwidth-4em\relax}}% + \put(-\dimexpr .45\textwidth-4em\relax,25mm){\vector(0,-1){15mm}}% + }% + \put(\dimexpr.5\textwidth+2em,.5\baselineskip){% + \color{ImageBlue}% + \put(0,15mm){\line(1,0){1.5em}}% + \put(1.5em,15mm){\vector(0,-1){5mm}}% + \color{ImageGreen}% + \put(0,20mm){\line(1,0){\dimexpr .25\textwidth-2em\relax}}% + \put(\dimexpr .25\textwidth-2em\relax,20mm){\vector(0,-1){10mm}}% + \color{ImageRed}% + \put(0,25mm){\line(1,0){\dimexpr .45\textwidth-4em\relax}}% + \put(\dimexpr .45\textwidth-4em\relax,25mm){\vector(0,-1){15mm}}% + }% + \end{picture} + \caption[Befehle zum Setzen des Seitenfußes]% + {Die Bedeutung der Befehle zum Setzen der Inhalte des Fußes eines + Seitenstils für die Seitenfüße einer schematischen Doppelseite.} + \label{fig:scrlayer-scrpage.foot} +\end{figure} +% +\begin{Example} + Kommen wir zu dem Beispiel des kurzen Artikels zurück. Angenommen Sie wollen + nun links im Fuß \iffree{zusätzlich}{\unskip} den Verlag angegeben + haben. Daher ergänzen Sie das Beispiel von + \PageRefxmpl{\LabelBase.loheadrohead} zu: +\begin{lstcode} + \documentclass{scrartcl} + \usepackage{scrlayer-scrpage} + \lohead{Peter Musterheinzel} + \rohead{Seitenstile mit \KOMAScript} + \lofoot{Verlag Naseblau, Irgendwo} + \pagestyle{scrheadings} + \usepackage{lipsum} + \begin{document} + \title{Seitenstile mit \KOMAScript} + \author{Peter Musterheinzel} + \maketitle + \lipsum + \end{document} +\end{lstcode} + Der Verlag wird dabei aber nicht auf der Seite mit dem + Titelkopf ausgegeben. Die Begründung ist dieselbe wie beim Beispiel zu + \DescRef{\LabelBase.cmd.lohead}. Ebenso ist die Lösung, um den Verlag auch + auf diese Seite zu bekommen, entsprechend: +\begin{lstcode} + \lofoot[Verlag Naseblau, Irgendwo] + {Verlag Naseblau, Irgendwo} +\end{lstcode} + \iffalse% Umbruchvarianten + Nun entscheiden Sie noch, dass + statt\textnote{Fontänderung}\important{\FontElement{pageheadfoot}}% + \IndexFontElement{pageheadfoot} der schrägen Schrift in Kopf und Fuß eine + aufrechte, aber kleinere Schrift verwendet werden soll% + \else% + Jetzt soll + statt\textnote{Fontänderung}\important{\FontElement{pageheadfoot}}% + \IndexFontElement{pageheadfoot} der schrägen Schrift in Kopf und Fuß eine + aufrechte, aber kleinere Schrift verwendet werden% + \fi% + % Umbruchoptimierung: + \iffalse% + \iffree{}{. Dies erreichen + Sie, indem Sie in der Dokumentpräambel die folgende Codezeile ergänzen}% + \fi% + \iftrue% + \iffree{}{. Dies erreichen Sie mit folgender Ergänzung}% + \fi% + : +\begin{lstcode} + \setkomafont{pageheadfoot}{\small} +\end{lstcode} + + Darüber hinaus soll + \iffalse% Umbruchvarianten + der Kopf\important{\FontElement{pagehead}}\IndexFontElement{pagehead}, nicht + jedoch der Fuß + \else% + nur der Kopf\important{\FontElement{pagehead}}\IndexFontElement{pagehead} + \fi% + fett gesetzt werden: +\begin{lstcode} + \setkomafont{pagehead}{\bfseries} +\end{lstcode} + Bei dieser Anweisung ist wichtig\textnote{Achtung!}, dass sie nach + dem Laden von \Package{scrpage-scrlayer} erfolgt, weil davor + \FontElement{pagehead} und \FontElement{pageheadfoot} + \iffalse% Umbruchvarianten + zwar vorhanden sind, aber dasselbe Element, nämlich + \FontElement{pageheadfoot}, % + \else% + dasselbe Element % + \fi + bezeichnen. Erst durch \iffree{Laden von }{}\Package{scrpage-scrlayer} + werden daraus \iffree{zwei }{}unabhängige Elemente. + + Ergänzen Sie nun das Beispiel einmal durch ein weiteres \Macro{lipsum} und + fügen Sie gleichzeitig Option + \Option{twoside}\IndexOption{twoside}\important{\Option{twoside}} beim Laden + von \Class{scrartcl} hinzu. Zum einen wandert die Seitenzahl im Fuß nun von + der Mitte nach außen. Das liegt an der geänderten Voreinstellung für + \DescRef{\LabelBase.pagestyle.scrheadings} und + \DescRef{\LabelBase.pagestyle.plain.scrheadings} für doppelseitige Dokumente + mit einer \KOMAScript-Klasse. + + Gleichzeitig verschwinden aber auch Autor, Dokumenttitel und Verlag von + Seite~2. Diese finden sich erst auf Seite~3 wieder. Das liegt daran, dass + wir bisher nur Befehle für ungerade Seiten\textnote{rechte Seite} + verwendet haben. Zu erkennen ist das am »\texttt{o}« für \emph{odd} an der + zweiten Stelle der Befehlsnamen. + + Nun könnten wir die Befehle einfach kopieren und in der Kopie dieses + »\texttt{o}« durch ein »\texttt{e}« für \emph{even}\textnote{linke Seite} + ersetzen. Allerdings ist es bei doppelseitigen Dokumenten meist sinnvoller, + wenn die Elemente spiegelverkehrt verwendet werden, dass also Elemente, die + auf linken Seiten links stehen, auf rechten Seiten rechts platziert werden + und umgekehrt. Daher vertauschen wir auch noch beim ersten Buchstaben + »\texttt{l}« mit »\texttt{r}« und umgekehrt: +\begin{lstcode} + \documentclass[twoside]{scrartcl} + \usepackage{scrlayer-scrpage} + \lohead{Peter Musterheinzel} + \rohead{Seitenstile mit \KOMAScript} + \lofoot[Verlag Naseblau, Irgendwo] + {Verlag Naseblau, Irgendwo} + \rehead{Peter Musterheinzel} + \lehead{Seitenstile mit \KOMAScript} + \refoot[Verlag Naseblau, Irgendwo] + {Verlag Naseblau, Irgendwo} + \pagestyle{scrheadings} + \setkomafont{pageheadfoot}{\small} + \setkomafont{pagehead}{\bfseries} + \usepackage{lipsum} + \begin{document} + \title{Seitenstile mit \KOMAScript} + \author{Peter Musterheinzel} + \maketitle + \lipsum\lipsum + \end{document} +\end{lstcode} +\end{Example}% + +Da es etwas umständlich ist, die Angaben bei doppelseitigen Dokumenten wie im +letzten Beispiel immer getrennt für linke und rechte Seiten zu machen, wird +später noch eine schönere Lösung für diesen Standardfall eingeführt. + +\iftrue% Umbruchoptimierung +\leavevmode\textnote{Achtung!}% +\else Erlauben Sie mir erneut einen wichtigen Hinweis:\textnote{Achtung!} % +\fi% +Sie sollten niemals die Überschrift oder die Nummer einer +Gliederungsebene mit Hilfe einer dieser Anweisungen als Kolumnentitel in den +Fuß der Seite setzen. Aufgrund der Asynchronizität von Seitenaufbau und +Seitenausgabe kann % +\iffalse% Umbruchoptimierung +es sonst leicht geschehen, dass die falsche Nummer oder die falsche +Überschrift im Kolumnentitel ausgegeben wird% +\else% +sonst die falsche Nummer oder die falsche Überschrift im Kolumnentitel +ausgegeben werden% +\fi% +. Stattdessen ist der Mark-Mechanismus, idealer Weise in Verbindung mit den +Automatismen aus dem nächsten Abschnitt, zu verwenden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{lefoot*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{cefoot*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{refoot*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{lofoot*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{cofoot*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{rofoot*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} +\end{Declaration} +Die Sternvarianten\ChangedAt{v3.14}{\Package{scrlayer-scrpage}} der zuvor +erklärten Befehle unterscheiden sich von der Form ohne Stern lediglich bei +Weglassen des optionalen Arguments \OParameter{Inhalt + plain.scrheadings}. Während die Form ohne Stern in diesem Fall den Inhalt +von \DescRef{\LabelBase.pagestyle.plain.scrheadings} unangetastet lässt, wird +bei der Sternvariante dann das obligatorische Argument \PName{Inhalt + scrheadings} auch für \DescRef{\LabelBase.pagestyle.plain.scrheadings} +verwendet. Sollen also beide Argumente gleich sein, so kann man einfach die +Sternvariante mit nur einem Argument verwenden.% +% +\begin{Example} + Mit der Sternform von \DescRef{\LabelBase.cmd.lofoot} und + \DescRef{\LabelBase.cmd.rofoot} lässt sich das + Beispiel aus der vorherigen Erklärung etwas verkürzen: +\begin{lstcode} + \documentclass[twoside]{scrartcl} + \usepackage{scrlayer-scrpage} + \lohead{Peter Musterheinzel} + \rohead{Seitenstile mit \KOMAScript} + \lofoot*{Verlag Naseblau, Irgendwo} + \rehead{Peter Musterheinzel} + \lehead{Seitenstile mit \KOMAScript} + \refoot*{Verlag Naseblau, Irgendwo} + \pagestyle{scrheadings} + \setkomafont{pageheadfoot}{\small} + \setkomafont{pagehead}{\bfseries} + \usepackage{lipsum} + \begin{document} + \title{Seitenstile mit \KOMAScript} + \author{Peter Musterheinzel} + \maketitle + \lipsum\lipsum + \end{document} +\end{lstcode} +\end{Example}% +% +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \Macro{ohead}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{chead}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{ihead}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{ofoot}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{cfoot}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{ifoot}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} +\end{Declaration} +Um Kopf und Fuß im doppelseitigen Layout zu konfigurieren, müsste man mit den +zuvor erklärten Befehlen die linken und die rechten Seiten getrennt +voneinander konfigurieren. Meist ist es jedoch so, dass linke und rechte Seite +mehr oder weniger symmetrisch zueinander sind. Ein Element das auf linken +Seiten links steht, steht auf rechten Seiten rechts% +\iffalse% Umbruchvarianten +. Ein Element, das auf linken Seiten rechts steht, steht auf rechten Seiten +links. +Mittig angeordnete Elemente sind normalerweise auf beiden Seiten mittig +angeordnet.% +\else% +\ und umgekehrt. Mittig bleibt mittig.% +\fi% + +Zur Vereinfachung der Einstellungen für diesen Standardfall gibt es bei +\Package{scrlayer-scrpage} sozusagen Abkürzungen. Der Befehl \Macro{ohead} +entspricht einem Aufruf sowohl von \DescRef{\LabelBase.cmd.lehead} als auch +\DescRef{\LabelBase.cmd.rohead}. Der Befehl \Macro{chead} entspricht sowohl +\DescRef{\LabelBase.cmd.cehead} als auch \DescRef{\LabelBase.cmd.cohead}. Und +Befehl \Macro{ihead} entspricht \DescRef{\LabelBase.cmd.rehead} und +\DescRef{\LabelBase.cmd.lohead}. Gleiches gilt für die Anweisungen des +Fußes. In \autoref{fig:scrlayer-scrpage.head} auf +\autopageref{fig:scrlayer-scrpage.head} und +\autoref{fig:scrlayer-scrpage.foot} auf +\autopageref{fig:scrlayer-scrpage.foot} werden auch diese Beziehungen +skizziert. +% +\begin{Example} + \iffalse% Umbruchvarianten + Das letzte Beispiel lässt sich so vereinfachen: + \else + Mit Hilfe der neuen Befehle, lässt sich das letzte Beispiel wie folgt + vereinfachen: + \fi +\begin{lstcode} + \documentclass[twoside]{scrartcl} + \usepackage{scrlayer-scrpage} + \ihead{Peter Musterheinzel} + \ohead{Seitenstile mit \KOMAScript} + \ifoot[Verlag Naseblau, Irgendwo] + {Verlag Naseblau, Irgendwo} + \pagestyle{scrheadings} + \setkomafont{pageheadfoot}{\small} + \setkomafont{pagehead}{\bfseries} + \usepackage{lipsum} + \begin{document} + \title{Seitenstile mit \KOMAScript} + \author{Peter Musterheinzel} + \maketitle + \lipsum\lipsum + \end{document} +\end{lstcode} +\iffalse% Umbruchkorrekturtext + Wie zusehen ist, konnte die Hälfte der Befehle eingespart und trotzdem + dasselbe Ergebnis erzielt werden. +\fi +\end{Example}% + +\iftrue% Umbruchoptimierung +Da im einseitigen Layout alle Seiten als ungerade oder rechte Seiten behandelt +werden, können \iffree{im einseitigen Layout}{dann} diese Befehle auch als +Synonyme für die entsprechenden Befehle für rechte Seiten verwendet werden.% +\else% +Im einseitigen Layout können diese Befehle auch als Synonym für die +entsprechenden Befehle für rechte Seiten verwendet werden, da dann alle Seiten +rechte Seiten sind.% +\fi% +\iffalse% Umbruchoptimierung +In den meisten Fällen wird man daher eher diese sechs als die zwölf zuvor +vorgestellten Befehle verwenden. +\fi + +% Umbruchoptimierung +\iffree{Erlauben Sie mir noch einmal einen wichtigen + Hinweis:\textnote{Achtung!} }{\leavevmode\textnote{Achtung!}}% +Sie sollten niemals die Überschrift oder die Nummer einer Gliederungsebene mit +Hilfe einer dieser Anweisungen als Kolumnentitel in den Kopf oder Fuß der +Seite setzen. Aufgrund der Asynchronizität von Seitenaufbau und Seitenausgabe +kann % +\iffalse% Umbruchoptimierung +es sonst leicht geschehen, dass die falsche Nummer oder die falsche +Überschrift im Kolumnentitel ausgegeben wird% +\else% +sonst die falsche Nummer oder die falsche Überschrift im Kolumnentitel +ausgegeben werden% +\fi% +. Stattdessen ist der Mark-Mechanismus, idealer Weise in Verbindung mit den +Automatismen aus dem nächsten Abschnitt, zu verwenden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{ohead*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{chead*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{ihead*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{ofoot*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{cfoot*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} + \Macro{ifoot*}\OParameter{Inhalt plain.scrheadings} + \Parameter{Inhalt scrheadings} +\end{Declaration} +Die Sternvarianten\ChangedAt{v3.14}{\Package{scrlayer-scrpage}} der zuvor +erklärten Befehle unterscheiden sich von der Form ohne Stern lediglich bei +Weglassen des optionalen Arguments \OParameter{Inhalt + plain.scrheadings}. Während die Form ohne Stern in diesem Fall den Inhalt +von \DescRef{\LabelBase.pagestyle.plain.scrheadings} unangetastet lässt, wird +bei der Sternvariante dann das obligatorische Argument \PName{Inhalt + scrheadings} auch für \DescRef{\LabelBase.pagestyle.plain.scrheadings} +verwendet. Sollen also beide Argumente gleich sein, so kann man einfach die +Sternvariante mit nur einem Argument verwenden.% +% +\begin{Example} + Mit der Sternform von \DescRef{\LabelBase.cmd.ifoot} lässt sich das + Beispiel aus der vorherigen Erklärung weiter verkürzen: +\begin{lstcode} + \documentclass[twoside]{scrartcl} + \usepackage{scrlayer-scrpage} + \ihead{Peter Musterheinzel} + \ohead{Seitenstile mit \KOMAScript} + \ifoot*{Verlag Naseblau, Irgendwo} + \pagestyle{scrheadings} + \setkomafont{pageheadfoot}{\small} + \setkomafont{pagehead}{\bfseries} + \usepackage{lipsum} + \begin{document} + \title{Seitenstile mit \KOMAScript} + \author{Peter Musterheinzel} + \maketitle + \lipsum\lipsum + \end{document} +\end{lstcode}% +\end{Example}% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{pagestyleset}{Einstellung} +\end{Declaration} +\BeginIndex{Option}{pagestyleset~=KOMA-Script}% +\BeginIndex{Option}{pagestyleset~=standard}% +In den zurückliegenden Beispielen wurde bereits mehrfach auf die +Voreinstellung der Seitenstile +\DescRef{\LabelBase.pagestyle.scrheadings}\IndexPagestyle{scrheadings} und +\DescRef{\LabelBase.pagestyle.plain.scrheadings}% +\IndexPagestyle{plain.scrheadings} hingewiesen. Tatsächlich unterstützt +\Package{scrlayer-scrpage} derzeit zwei unterschiedliche +Voreinstellungen. Diese sind von Hand über Option \Option{pagestyleset} +auswählbar. + +Mit der \PName{Einstellung} +\PValue{KOMA-Script}\important{\OptionValue{pagestyleset}{KOMA-Script}} wird +die Voreinstellung gewählt, die auch automatisch eingestellt wird, falls die +Option nicht angegeben ist und eine \KOMAScript-Klasse erkannt wurde. Dabei +werden für \DescRef{\LabelBase.pagestyle.scrheadings} im doppelseitigen Satz +Kolumnentitel außen im Kopf und Seitenzahlen außen im Fuß gesetzt. Im +einseitigen Satz wird der Kolumnentitel stattdessen mittig im Kopf und die +Seitenzahl mittig im Fuß platziert. Für die automatischen Kolumnentitel werden +Groß- und Kleinbuchstaben wie vorgefunden verwendet. Dies entspricht Option +\OptionValueRef{\LabelBase}{markcase}{used}\IndexOption{markcase~=used}% +\important{\OptionValueRef{\LabelBase}{markcase}{used}}. Für +\DescRef{\LabelBase.pagestyle.plain.scrheadings} entfallen die +Kolumnentitel. Die Seitenzahlen werden jedoch identisch platziert. + +Wird allerdings \hyperref[cha:scrlttr2]{\Class{scrlttr2}}% +\important{\hyperref[cha:scrlttr2]{\Class{scrlttr2}}}% +\IndexClass{scrlttr2} als Klasse erkannt, so werden die Voreinstellungen an +die Seitenstile jener Klasse angelehnt. Siehe dazu +\autoref{sec:scrlttr2.pagestyle}, ab \autopageref{sec:scrlttr2.pagestyle}. + +Mit der \PName{Einstellung} +\PValue{standard}\important{\OptionValue{pagestyleset}{standard}} wird die +Voreinstellung gewählt, die den Standard-Klassen entspricht. Diese wird auch +automatisch eingestellt, falls die Option nicht angegeben ist und keine +\KOMAScript-Klasse erkannt wurde. Dabei wird für +\DescRef{\LabelBase.pagestyle.scrheadings} im doppelseitigen Satz der +Kolumnentitel im Kopf innen und die Seitenzahl -- ebenfalls im Kopf -- außen +ausgerichtet platziert. Im einseitigen Satz werden dieselben Einstellungen +verwendet. Da hierbei nur rechte Seiten existieren, steht der Kolumnentitel +dann immer linksbündig im Kopf, die Seitenzahl entsprechend rechtsbündig. Die +automatischen Kolumnentitel werden -- trotz erheblicher typografischer +Bedenken -- entsprechend +\OptionValueRef{\LabelBase}{markcase}{upper}\IndexOption{markcase~=upper}% +\important{\OptionValueRef{\LabelBase}{markcase}{upper}} in Großbuchstaben +umgewandelt. Von \DescRef{\LabelBase.pagestyle.scrheadings} deutlich +abweichend hat \DescRef{\LabelBase.pagestyle.plain.scrheadings} die Seitenzahl +im einseitigen Satz mittig im Fuß. Im Unterschied\textnote{\KOMAScript{} + vs. Standardklassen} zum Seitenstil \PageStyle{plain} der Standardklassen +entfällt die Seitenzahl im doppelseitigen Modus. Die Standardklassen setzen +die Seitenzahl stattdessen mittig im Fuß, was im doppelseitigen Satz nicht zum +übrigen Stil der Seiten passt. % ← Leerzeichen ist wichtig +\iftrue % Umbruchkorrekturtext +Wer die Seitenzahl zurück haben will, kann dies mit +\begin{lstcode} + \cfoot[\pagemark]{} +\end{lstcode} +erreichen. % ← Leerzeichen ist wichtig +\fi% +Der Kolumnentitel entfällt bei +\DescRef{\LabelBase.pagestyle.plain.scrheadings}. + +Es ist zu beachten\textnote{Achtung!}, dass mit der Verwendung dieser Option +gleichzeitig der Seitenstil +\DescRef{\LabelBase.pagestyle.scrheadings}\IndexPagestyle{scrheadings}% +\important{\DescRef{\LabelBase.pagestyle.scrheadings}} aktiviert wird. +\iftrue% Umbruchkorrektur +Dies gilt auch, wenn die Option innerhalb eines Dokuments verwendet wird.% +\fi +% +\EndIndexGroup + + +\LoadCommonFile{pagestylemanipulation}% \section{Beeinflussung von Seitenstilen} + + +\begin{Declaration} + \OptionVName{headwidth}{Breite\textup{:}Offset\textup{:}Offset} + \OptionVName{footwidth}{Breite\textup{:}Offset\textup{:}Offset} +\end{Declaration} +In der Voreinstellung sind Kopf\Index{Kopf>Breite} und +Fuß\Index{Fuss=Fuß>Breite} genauso breit wie der Satzspiegel. Mit Hilfe dieser +beiden \KOMAScript-Optionen lässt sich das jedoch ändern. Die \PName{Breite} +ist dabei die gewünschte Breite des Kopfes beziehungsweise Fußes. Der +\PName{Offset} gibt an, wie weit der Kopf respektive Fuß in Richtung des +äußeren Randes -- im einseitigen Satz entsprechend in Richtung des rechten +Randes -- verschoben werden soll. Dabei sind alle +drei\ChangedAt{v3.14}{\Package{scrlayer-scrpage}} Werte optional, können also +auch weggelassen werden. Falls ein Wert weggelassen wird, kann auch ein +zugehöriger Doppelpunkt links davon entfallen. Ist nur ein \PName{Offset} +angegeben, so wird dieser sowohl für linke als auch für rechte Seiten +verwendet. Ansonsten wird im doppelseitigen Satz der erste \PName{Offset} für +ungerade, also rechte Seiten und der zweite für gerade, also linke Seiten +verwendet. Ist insgesamt nur ein Wert und kein Doppelpunkt angegeben, so +handelt es sich um die \PName{Breite}. + +Sowohl für \PName{Breite} als auch für \PName{Offset} kann jeder gültige +Längenwert aber auch jede \LaTeX-Länge oder \TeX-Länge oder \TeX-Abstand +eingesetzt werden. Darüber hinaus sind für beides auch \eTeX-Längen\-ausdrücke +mit den Grundrechenarten \texttt{+}, \texttt{-}, \texttt{*}, \texttt{/} und +runden Klammern erlaubt. Näheres zu solchen Längenausdrücken ist +\cite[Abschnitt~3.5]{manual:eTeX} zu entnehmen. Für \PName{Breite} sind +außerdem einige symbolische Werte zulässig. Diese sind +\autoref{tab:scrlayer-scrpage.symbolic.values} zu entnehmen. +% +\begin{table} + \centering + \caption[Symbolische Werte für Option \Option{headwidth} und + \Option{footwidth}]{Erlaubte symbolische Werte für \PName{Breite} bei den + Optionen \Option{headwidth} und \Option{footwidth}} + \label{tab:scrlayer-scrpage.symbolic.values} + \begin{desctabular} + \entry{\PValue{foot}}{% + die aktuelle Breite des Fußes% + }\\[-1.7ex] + \entry{\PValue{footbotline}}{% + die aktuelle Länge der horizontalen Linie unterhalb des Fußes% + }\\[-1.7ex] + \entry{\PValue{footsepline}}{% + die aktuelle Länge der horizontalen Linie zwischen dem Textbereich und + dem Fuß% + } \entry{\PValue{head}}{% + die aktuelle Breite des Kopfes% + }\\[-1.7ex] + \entry{\PValue{headsepline}}{% + die aktuelle Länge der horizontalen Linie zwischen dem Kopf und dem + Textbereich% + }\\[-1.7ex] + \entry{\PValue{headtopline}}{% + die aktuelle Länge der horizontalen Linie über dem Kopf% + }\\[-1.7ex] + \entry{\PValue{marginpar}}{% + die Breite der Marginalienspalte einschließlich des Abstandes zwischen + dem Textbereich und der Marginalienspalte% + }\\[-1.7ex] + \entry{\PValue{page}}{% + die Breite der Seite unter Berücksichtigung einer eventuell mit Hilfe + des Pakets \Package{typearea} definierten Bindekorrektur (siehe Option + \DescRef{typearea.option.BCOR} in \autoref{sec:typearea.typearea}, + \DescPageRef{typearea.option.BCOR})% + }\\[-1.7ex] + \entry{\PValue{paper}}{% + die Breite des Papiers ohne Berücksichtigung einer etwaigen + Bindekorrektur% + }\\[-1.7ex] + \entry{\PValue{text}}{% + die Breite des Textbereichs% + }\\[-1.7ex] + \entry{\PValue{textwithmarginpar}}{% + die Breite des Textbereichs einschließlich der Marginalienspalte und + natürlich des Abstandes zwischen den beiden (Achtung: Nur in diesem Fall + ist die Voreinstellung für \PName{Offset} Null)% + }% + \end{desctabular} +\end{table} + +Die Voreinstellung für \PName{Breite} ist die Breite des Textbereichs. Die +Voreinstellung für \PName{Offset} hängt von der gewählten \PName{Breite} +ab. In der Regel wird im einseitigen Satz die Hälfte des Unterschieds zwischen +\PName{Breite} und der Breite des Textbereichs verwendet. Damit wird der Kopf +über dem Textbereich zentriert. Im doppelseitigen Satz wird hingegen nur ein +Drittel des Unterschieds zwischen \PName{Breite} und der Breite des +Textbereichs verwendet. Ist \PName{Breite} jedoch die Breite des Textbereichs +zuzüglich der Marginalienspalte, so ist die Voreinstellung von \PName{Offset} +immer Null. Falls Ihnen das zu kompliziert ist, sollten Sie den gewünschten +\PName{Offset} einfach selbst angeben.% +\EndIndexGroup + +\iffree{}{\clearpage}% Umbruchkorrektur (brutal aber effektiv) + + +\begin{Declaration} + \OptionVName{headtopline}{Dicke\textup{:}Länge} + \OptionVName{headsepline}{Dicke\textup{:}Länge} + \OptionVName{footsepline}{Dicke\textup{:}Länge} + \OptionVName{footbotline}{Dicke\textup{:}Länge} +\end{Declaration} +\BeginIndex{Option}{headtopline~=\PName{Dicke\textup{:}Länge}}% +\BeginIndex{Option}{headsepline~=\PName{Dicke\textup{:}Länge}}% +\BeginIndex{Option}{footsepline~=\PName{Dicke\textup{:}Länge}}% +\BeginIndex{Option}{footbotline~=\PName{Dicke\textup{:}Länge}}% +Während die \KOMAScript-Klassen nur eine Trennlinie unter dem Kopf und eine +weitere über dem Fuß unterstützen und man diese nur wahlweise ein- und +ausschalten kann, erlaubt das Paket \Package{scrlayer-scrpage} auch noch eine +Linie über dem Kopf und unter dem Fuß und man kann sowohl +die \PName{Länge} als auch die \PName{Dicke} einstellen. + +Beide Werte sind optional. Lässt man die \PName{Dicke} weg, so wird +0,4\Unit{pt} angenommen, also eine Haarlinie produziert. Verzichtet man auf +eine Angabe der \PName{Länge}, so wird die Breite des Kopfes respektive +Fußes als gewünschter Wert angenommen. Wird beides weggelassen, so kann auch +der Doppelpunkt entfallen. Wird nur ein Wert ohne Doppelpunkt angegeben, so +ist dies die \PName{Dicke}. + +Natürlich darf die \PName{Länge} nicht nur kürzer als die aktuelle Breite des +Kopfes respektive Fußes sein. Sie darf auch länger sein. Siehe dazu auch +die Optionen \DescRef{\LabelBase.option.ilines}\IndexOption{ilines}% +\important{\DescRef{\LabelBase.option.ilines}, + \DescRef{\LabelBase.option.clines}, \DescRef{\LabelBase.option.olines}}, +\DescRef{\LabelBase.option.clines}\IndexOption{clines} und +\DescRef{\LabelBase.option.olines}\IndexOption{olines}, die später in diesem +Abschnitt erklärt werden. + +\BeginIndexGroup +\BeginIndex{FontElement}{headtopline}\LabelFontElement{headtopline}% +\BeginIndex{FontElement}{headsepline}\LabelFontElement{headsepline}% +\BeginIndex{FontElement}{footsepline}\LabelFontElement{footsepline}% +\BeginIndex{FontElement}{footbotline}\LabelFontElement{footbotline}% +Neben der Dicke und der Länge kann man auch die Farben der Linien +ändern. Zunächst richtet sich diese natürlich nach der Farbe, die für den Kopf +und den Fuß eingestellt ist. Davon unabhängig werden aber auch noch die +Einstellungen für die gleich benannten +\important[i]{\FontElement{headtopline}\\ + \FontElement{headsepline}\\ + \FontElement{footsepline}\\ + \FontElement{footbotline}}Elemente \FontElement{headtopline}, +\FontElement{headsepline}, \FontElement{footsepline} und +\FontElement{footbotline} angewendet. Diese können mit den Anweisungen +\DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} geändert werden (siehe +\autoref{sec:scrlayer-scrpage.textmarkup}, ab +\DescPageRef{\LabelBase.cmd.setkomafont}). In der Voreinstellung sind die +Einstellungen für diese Elemente leer, so dass sie zu keiner Änderung der +Schrift oder Farbe führen. Änderungen der Schrift sind im Gegensatz zu +Farbänderungen an dieser Stelle ohnehin nicht sinnvoll und werden daher nicht +empfohlen.% +\EndIndexGroup +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{plainheadtopline}{Ein-Aus-Wert} + \OptionVName{plainheadsepline}{Ein-Aus-Wert} + \OptionVName{plainfootsepline}{Ein-Aus-Wert} + \OptionVName{plainfootbotline}{Ein-Aus-Wert} +\end{Declaration} +Mit diesen Optionen können die Einstellungen für die Linien auch für den +\PageStyle{plain}-Seitenstil übernommen werden. Als \PName{Ein-Aus-Wert} +stehen die Standardwerte für einfache Schalter, die in +\autoref{tab:truefalseswitch} auf \autopageref{tab:truefalseswitch} angegeben +sind, zur Verfügung. Bei aktivierter Option werden die entsprechenden +Linieneinstellungen übernommen. Bei deaktivierter Option wird die +entsprechende Linie im \PageStyle{plain}-Seitenstil hingegen nicht angezeigt. +% +\EndIndexGroup + + +\begin{Declaration} + \Option{ilines} + \Option{clines} + \Option{olines} +\end{Declaration} +Wie bereits zuvor erklärt wurde, können Trennlinien für den Kopf oder Fuß +konfiguriert werden, die länger oder kürzer als die Breite des Kopfes +beziehungsweise des Fußes sind. Bisher blieb die Frage offen, wie diese Linien +dann ausgerichtet werden. In der Voreinstellung sind sie im einseitigen Satz +linksbündig und im doppelseitigen Satz bündig mit dem Anfang des inneren +Randes. Dies entspricht Option \Option{ilines}. Alternativ können sie jedoch +mit Option \Option{clines} auch horizontal bezüglich der Breite des Kopfes +beziehungsweise Fußes zentriert werden. Ebenso ist mit Hilfe von Option +\Option{olines} eine Ausrichtung am äußeren beziehungsweise rechten Rand +möglich.% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Paketoptionen Ebenenmodell Sternvariante Sternform Längenwert +% LocalWords: Titelkopf Automatismen Bindekorrektur diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-scrpage-en.tex b/macros/latex/contrib/koma-script/doc/scrlayer-scrpage-en.tex new file mode 100644 index 0000000000..73b71c1523 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlayer-scrpage-en.tex @@ -0,0 +1,1161 @@ +% ====================================================================== +% scrlayer-scrpage-en.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrlayer-scrpage of the KOMA-Script guide +% +% ============================================================================ + +\KOMAProvidesFile{scrlayer-scrpage-en.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrlayer-scrpage)] +\translator{Markus Kohm\and Jana Schubert\and Jens H\"uhne\and Karl Hagen} + +\chapter[{Headers and Footers with \Package{scrlayer-scrpage}}] + {Headers\ChangedAt{v3.12}{\Package{scrlayer-scrpage}} and + Footers with \Package{scrlayer-scrpage}} +\labelbase{scrlayer-scrpage} +% +\BeginIndexGroup +\BeginIndex{Package}{scrlayer-scrpage}% +\begin{Explain} + Until version 3.11b of \KOMAScript, the \Package{scrpage2}% + \IndexPackage[indexmain]{scrpage2}\important{\Package{scrpage2}} package was + the recommended way to customise headers and footers beyond the options + provided by the \PageStyle{headings}, \PageStyle{myheadings}, + \PageStyle{plain}, and \PageStyle{empty} page styles of the \KOMAScript{} + classes. + \iffalse% + The still older \Package{scrpage}\IndexPackage{scrpage} package was marked + obsolete in 2001 and removed from the regular \KOMAScript{} distribution in + 2013.\par + \fi% + Since 2013, the \hyperref[cha:scrlayer]{\Package{scrlayer}}% + \important{\hyperref[cha:scrlayer]{\Package{scrlayer}}}% + \IndexPackage{scrlayer} package has been included as a basic module of + \KOMAScript. This package provides a layer model and a new page-style model + based upon it. However, the package's interface is almost too flexible and + consequently not easy for the average user to comprehend. For more + information about this interface, see \autoref{cha:scrlayer} in + \autoref{part:forExperts}. However, a few of the options that are actually + part of \Package{scrlayer}, and which are therefore taken up again in that + chapter, are also documented here because they are required to use + \Package{scrlayer-scrpage}. + + Many users are already familiar with the commands from \Package{scrpage2}. + For this reason, \Package{scrlayer-scrpage} provides a method for + manipulating headers and footers which is based on \Package{scrlayer}, is + largely compatible with \Package{scrpage2}, and at the same time greatly + expands the user interface. If you are already familiar with + \Package{scrpage2} and refrain from direct calls to its internal commands, + you can usually use \Package{scrlayer-scrpage} as a drop-in replacement. + This also applies to most examples using \Package{scrpage2} found in + \LaTeX{} books or on the Internet.% + \iffalse% + \iffree{}{\par With the release of this book, \Package{scrlayer-scrpage} + for \KOMAScript{} is recommended as the tool of choice when it comes to + changing the predefined page styles. Using the obsolete package + \Package{scrpage2}\IndexPackage[indexmain]{scrpage2}% + \important{\Package{scrpage2}} is now deprecated. Therefore, the + commands for this outdated package are no longer part of this book. If + you encounter older documents that still use \Package{scrpage2}, + consider switching to \Package{scrlayer-scrpage}. Notwithstanding, this + chapter does contain some hints for using \Package{scrpage2}.}% + \fi +\end{Explain} + +In addition to \Package{scrlayer-scrpage}\iffree{ or \Package{scrpage2}}{}, +you could also use \Package{fancyhdr}\IndexPackage{fancyhdr} (see +\cite{package:fancyhdr}) to configure the headers and footers of pages. +However, this package has no support for several \KOMAScript{} features, +for example the element scheme (see \DescRef{\LabelBase.cmd.setkomafont}, +\DescRef{\LabelBase.cmd.addtokomafont}, and +\DescRef{\LabelBase.cmd.usekomafont} in \autoref{sec:maincls.textmarkup}, +\DescPageRef{maincls.cmd.setkomafont}) or the configurable numbering format +for dynamic headers (see the \DescRef{maincls.option.numbers} option and, +for example, \DescRef{\LabelBase.cmd.chaptermarkformat} in +\autoref{sec:maincls.structure}, \DescPageRef{maincls.option.numbers} and +\DescPageRef{maincls.cmd.chaptermarkformat}). Hence, if you are using a +\KOMAScript{} class, you should use the new \Package{scrlayer-scrpage} +package. \iffree{If you have problems, you can still use +\Package{scrpage2}.}{\ignorespaces} Of course, you can also use +\Package{scrlayer-scrpage} with other classes, such as the standard \LaTeX{} +ones. + +Apart from the features described in this chapter, \Package{scrlayer-scrpage} +provides several more functions that are likely only of interest to a very +small number of users and therefore are described in +\autoref{cha:scrlayer-scrpage-experts} of \autoref{part:forExperts}, starting +at \autopageref{cha:scrlayer-scrpage-experts}. Nevertheless, if the options +described in \autoref{part:forAuthors} are insufficient for your purposes, you +should examine \autoref{cha:scrlayer-scrpage-experts}. + +\LoadCommonFile{options} % \section{Early or late Selection of Options} + +\LoadCommonFile{headfootheight} % \section{Header and Footer Height} + +\LoadCommonFile{textmarkup} % \section{Text Markup} + +\section{Using Predefined Page Styles} +\seclabel{predefined.pagestyles} + +The easiest way to create custom headers and footers with +\Package{scrlayer-scrpage} is to use one of the predefined page styles. +% +\iffalse % Umbruchoptimierung + This section introduces the page styles defined by the + \Package{scrlayer-scrpage} package as it loads. It also explains the + commands that you can use to create basic settings for these page + styles. You can find further options, commands, and background information + in the following sections and in + \autoref{sec:scrlayer-scrpage-experts.pagestyle.pairs} in + \autoref{part:forExperts}.% +\fi + +\begin{Declaration} + \PageStyle{scrheadings}% + \PageStyle{plain.scrheadings} +\end{Declaration} +The \Package{scrlayer-scrpage} package provides two page styles that you can +reconfigure to your liking. The first page style is +\PageStyle{scrheadings}\important{\PageStyle{scrheadings}}, which is intended +as a page style with running heads. Its defaults are similar to the page style +\PageStyle{headings}\IndexPagestyle{headings} of the standard \LaTeX{} or +\KOMAScript{} classes. You can configure exactly what appears in the header or +footer with the commands and options described below. + +The second page style is \PageStyle{plain.scrheadings}% +\important{\PageStyle{plain.scrheadings}}, which is intended to be a style +with no running head. Its defaults resemble those of the +\PageStyle{plain}\IndexPagestyle{plain} page style of the standard or +\KOMAScript{} classes. You can configure exactly what appears in the header or +footer with the commands and options described below. + +You could, of course, configure \PageStyle{scrheadings} to be a page style +without a running head and \PageStyle{plain.scrheadings} to be a page style +with a running head. It is, however, advisable to adhere to the conventions +mentioned above. The two page styles mutually influence one another. Once you +apply one of these page styles, \PageStyle{scrheadings} will become accessible +as \PageStyle{headings}\important{\PageStyle{headings}}% +\IndexPagestyle{headings} and the page style \PageStyle{plain.scrheadings} +will become accessible as \PageStyle{plain}\important{\PageStyle{plain}}% +\IndexPagestyle{plain}. Thus, if you use a class or package that automatically +switches between \PageStyle{headings} and \PageStyle{plain}, you only need to +select \PageStyle{scrheadings} or \PageStyle{plain.scrheadings} once. Direct +patches to the corresponding classes or packages are not necessary. This pair +of page styles can thus serve as a drop-in replacement for +\PageStyle{headings} and \PageStyle{plain}. If you need more such pairs, +please refer to \autoref{sec:scrlayer-scrpage-experts.pagestyle.pairs} in +\autoref{part:forExperts}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{lehead}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{cehead}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{rehead}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{lohead}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{cohead}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{rohead}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content} +\end{Declaration} +You can set the contents of the header for the +\DescRef{\LabelBase.pagestyle.plain.scrheadings} and +\DescRef{\LabelBase.pagestyle.scrheadings} page styles with these commands. +The optional argument sets the content of an element of the +\DescRef{\LabelBase.pagestyle.plain.scrheadings} page style, while the +mandatory argument sets the content of the corresponding element of the +\DescRef{\LabelBase.pagestyle.scrheadings} page style. + +The contents of even\,---\,or left-hand\,---\,pages\textnote{left-hand pages} +can be set with \Macro{lehead}, \Macro{cehead}, and \Macro{rehead}. The +``\texttt{e}'' appearing as the second letter of the commands' names stands +for ``\emph{even}''. + +The contents of odd\,---\,or right-hand\,---\,pages\textnote{right-hand pages} +can be set with \Macro{lohead}, \Macro{cohead}, and \Macro{rohead}. The +``\texttt{o}'' appearing as the second letter of the commands' names stands +for ``\emph{odd}''. + +Note\textnote{Attention!} that in one-sided printing, only right-hand pages +exist, and \LaTeX{} designates these as odd pages regardless of their page +number. + +Each header consists of a left-aligned\textnote{left aligned} element that can +be set with \Macro{lehead} or \Macro{lohead}. The ``\texttt{l}'' appearing as +the first letter of the commands' names stands for ``\emph{left aligned}''. + +Similarly, each header has a centred\textnote{centred} element that can be set +with \Macro{cehead} or \Macro{cohead}. The ``\texttt{c}'' appearing as the +first letter of the command' names stands for ``\emph{centred}''. + +Likewise, each header has a right-aligned\textnote{right aligned} element that +can be set with \Macro{rehead} or \Macro{rohead}. The ``\texttt{r}'' appearing +as the first letter of the commands' names stands for ``\emph{right +aligned}''. + +\BeginIndexGroup +\BeginIndex{FontElement}{pagehead}\LabelFontElement{pagehead}% +\BeginIndex{FontElement}{pageheadfoot}\LabelFontElement{pageheadfoot}% +These elements do not have individual font attributes that you can +change using the commands \DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont} (see \autoref{sec:maincls.textmarkup}, +\DescPageRef{maincls.cmd.setkomafont}). Instead, they use an element named +\FontElement{pagehead}. Before this element is applied, the +\FontElement{pageheadfoot} element will also be applied. See +\autoref{tab:scrlayer-scrpage.fontelements} for the defaults of these +elements.% +\EndIndexGroup + +The meaning of each command for headers in two-sided printing is illustrated +in \autoref{fig:scrlayer-scrpage.head}.% +% +\begin{figure}[tp] + \centering + \begin{picture}(\textwidth,30mm)(0,-10mm) + \thinlines + \small\ttfamily + % left/even page + \put(0,20mm){\line(1,0){.49\textwidth}}% + \put(0,0){\line(0,1){20mm}}% + \multiput(0,0)(0,-1mm){10}{\line(0,-1){.5mm}}% + \put(.49\textwidth,5mm){\line(0,1){15mm}}% + \put(.05\textwidth,10mm){% + \color{ImageRed}% + \put(-.5em,0){\line(1,0){4em}}% + \multiput(3.5em,0)(.25em,0){5}{\line(1,0){.125em}}% + \put(-.5em,0){\line(0,1){\baselineskip}}% + \put(-.5em,\baselineskip){\line(1,0){4em}}% + \multiput(3.5em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \makebox(4em,5mm)[l]{\Macro{lehead}}% + }% + \put(.465\textwidth,10mm){% + \color{ImageBlue}% + \put(-4em,0){\line(1,0){4em}}% + \multiput(-4em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(0,0){\line(0,1){\baselineskip}}% + \put(-4em,\baselineskip){\line(1,0){4em}}% + \multiput(-4em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-4.5em,0){\makebox(4em,5mm)[r]{\Macro{rehead}}}% + }% + \put(.2525\textwidth,10mm){% + \color{ImageGreen}% + \put(-2em,0){\line(1,0){4em}}% + \multiput(2em,0)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,\baselineskip){\line(1,0){4em}}% + \multiput(2em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,0){\makebox(4em,5mm)[c]{\Macro{cehead}}}% + }% + % right/odd page + \put(.51\textwidth,20mm){\line(1,0){.49\textwidth}}% + \put(.51\textwidth,5mm){\line(0,1){15mm}}% + \put(\textwidth,0){\line(0,1){20mm}}% + \multiput(\textwidth,0)(0,-1mm){10}{\line(0,-1){.5mm}}% + \put(.5325\textwidth,10mm){% + \color{ImageBlue}% + \put(0,0){\line(1,0){4em}}% + \multiput(4em,0)(.25em,0){5}{\line(1,0){.125em}}% + \put(0,0){\line(0,1){\baselineskip}}% + \put(0em,\baselineskip){\line(1,0){4em}}% + \multiput(4em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \put(.5em,0){\makebox(4em,5mm)[l]{\Macro{lohead}}}% + }% + \put(.965\textwidth,10mm){% + \color{ImageRed}% + \put(-4em,0){\line(1,0){4em}}% + \multiput(-4em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(0,0){\line(0,1){\baselineskip}}% + \put(-4em,\baselineskip){\line(1,0){4em}}% + \multiput(-4em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-4.5em,0){\makebox(4em,5mm)[r]{\Macro{rohead}}}% + }% + \put(.75\textwidth,10mm){% + \color{ImageGreen}% + \put(-2em,0){\line(1,0){4em}}% + \multiput(2em,0)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,\baselineskip){\line(1,0){4em}}% + \multiput(2em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,0){\makebox(4em,5mm)[c]{\Macro{cohead}}}% + }% + % commands for both pages + \color{ImageBlue}% + \put(.5\textwidth,0){\makebox(0,\baselineskip)[c]{\Macro{ihead}}}% + \color{ImageGreen}% + \put(.5\textwidth,-5mm){\makebox(0,\baselineskip)[c]{\Macro{chead}}} + \color{ImageRed}% + \put(.5\textwidth,-10mm){\makebox(0,\baselineskip)[c]{\Macro{ohead}}} + \put(\dimexpr.5\textwidth-2em,.5\baselineskip){% + \color{ImageBlue}% + \put(0,0){\line(-1,0){1.5em}}% + \put(-1.5em,0){\vector(0,1){5mm}}% + \color{ImageGreen}% + \put(0,-1.25\baselineskip){\line(-1,0){\dimexpr .25\textwidth-2em\relax}}% + \put(-\dimexpr + .25\textwidth-2em\relax,-1.25\baselineskip){\vector(0,1){\dimexpr + 5mm+1.25\baselineskip\relax}} + \color{ImageRed}% + \put(0,-2.5\baselineskip){\line(-1,0){\dimexpr .45\textwidth-4em\relax}}% + \put(-\dimexpr + .45\textwidth-4em\relax,-2.5\baselineskip){\vector(0,1){\dimexpr + 5mm+2.5\baselineskip\relax}} + }% + \put(\dimexpr.5\textwidth+2em,.5\baselineskip){% + \color{ImageBlue}% + \put(0,0){\line(1,0){1.5em}}% + \put(1.5em,0){\vector(0,1){5mm}}% + \color{ImageGreen}% + \put(0,-1.25\baselineskip){\line(1,0){\dimexpr .25\textwidth-2em\relax}} + \put(\dimexpr + .25\textwidth-2em\relax,-1.25\baselineskip){\vector(0,1){\dimexpr + 5mm+1.25\baselineskip\relax}} + \color{ImageRed}% + \put(0,-2.5\baselineskip){\line(1,0){\dimexpr .45\textwidth-4em\relax}} + \put(\dimexpr + .45\textwidth-4em\relax,-2.5\baselineskip){\vector(0,1){\dimexpr + 5mm+2.5\baselineskip\relax}} + }% + \end{picture} + \caption[Commands for setting the page header]% + {The meaning of the commands for setting the contents of page headers + shown on a two-page schematic} + \label{fig:scrlayer-scrpage.head} +\end{figure} +% +\begin{Example} + Suppose you're writing a short article and you want the author's name to + appear on the left side of the page and the article's title to appear + right. You can write, for example: +\begin{lstcode} + \documentclass{scrartcl} + \usepackage{scrlayer-scrpage} + \lohead{John Doe} + \rohead{Page style with \KOMAScript} + \begin{document} + \title{Page styles with \KOMAScript} + \author{John Doe} + \maketitle + \end{document} +\end{lstcode} + But what happens? On the first page there's only a page number in the + footer, while the header remains empty! + + The explanation is simple: The \Class{scrartcl} class, like the default + \Class{article} class, switches to the \PageStyle{plain} page style for the + page which contains the title. After the command + \DescRef{maincls.cmd.pagestyle}\PParameter{scrheadings} in the preamble of + our example, this actually refers to the + \DescRef{\LabelBase.pagestyle.plain.scrheadings} page style. The default for + this page style when using a \KOMAScript{} class is an empty page header and + a page number in the footer. In the example, the optional arguments of + \Macro{lohead} and \Macro{rohead} are omitted, so the + \DescRef{\LabelBase.pagestyle.plain.scrheadings} page style remains + unchanged and the result for the first page is actually correct. + + Now add enough text to the example after \DescRef{maincls.cmd.maketitle} + so that a second page is printed. You can simply add + \Macro{usepackage}\PParameter{lipsum}\IndexPackage{lipsum} to the document + preamble and \Macro{lipsum}\IndexCmd{lipsum} below + \DescRef{maincls.cmd.maketitle}. You will see that the header of the second + page now contains the author and the document title as we wanted. + + For comparison, you should also add the optional argument to + \Macro{lohead} and \Macro{rohead}. Change the example as follows: +\begin{lstcode} + \documentclass{scrartcl} + \usepackage{scrlayer-scrpage} + \lohead[John Doe] + {John Doe} + \rohead[Page style with \KOMAScript] + {Page style with \KOMAScript} + \begin{document} + \title{Page styles with \KOMAScript} + \author{John Doe} + \maketitle + \end{document} +\end{lstcode} + Now you have a header on the first page just above the title itself. + That is because you have reconfigured page style + \DescRef{\LabelBase.pagestyle.plain.scrheadings} with the two optional + arguments. As you probably appreciate, it would be better to leave this page + style unchanged, as a running head above the document title is rather + annoying. + + By the way, as an alternative to configuring + \DescRef{\LabelBase.pagestyle.plain.scrheadings} you could, if you were + using a \KOMAScript{} class, have changed the page style for pages that + contain title headers. See \DescRef{maincls.cmd.titlepagestyle}% + \important{\DescRef{maincls.cmd.titlepagestyle}}% + \IndexCmd{titlepagestyle} in \autoref{sec:maincls.pagestyle}, + \DescPageRef{maincls.cmd.titlepagestyle}. +\end{Example} + +Note\textnote{Attention!} that you should never put a section +heading or section number directly into the header using one of these +commands. Because of the asynchronous way that \TeX{} lays out and outputs +pages, doing so can easily result in the wrong number or heading text in the +running head. Instead you should use the mark mechanism, ideally in +conjunction with the procedures explained in the next section.% +\EndIndexGroup + +\begin{Declaration} + \Macro{lehead*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{cehead*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{rehead*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{lohead*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{cohead*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{rohead*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content} +\end{Declaration} +The starred versions\ChangedAt{v3.14}{\Package{scrlayer-scrpage}} of the +previously described commands differ from the ordinary versions only if you +omit the optional argument \PName{plain.scrheadings content}. In this case, +the version without the star does not change the contents of +\DescRef{\LabelBase.pagestyle.plain.scrheadings}. The starred version, on the +other hand, uses the mandatory argument \PName{scrheading content} +for \DescRef{\LabelBase.pagestyle.plain.scrheadings} as well. So if both +arguments should be the same, you can simply use the starred version with only +the mandatory argument.% + +\begin{Example} + You can shorten the previous example using the starred versions of + \DescRef{\LabelBase.cmd.lohead} and \DescRef{\LabelBase.cmd.rohead}: +\begin{lstcode} + \documentclass{scrartcl} + \usepackage{scrlayer-scrpage} + \lohead*{John Doe} + \rohead*{Page style with \KOMAScript} + \begin{document} + \title{Page styles with \KOMAScript} + \author{John Doe} + \maketitle + \end{document} +\end{lstcode}% +\end{Example}% +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \Macro{lefoot}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{cefoot}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{refoot}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{lofoot}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{cofoot}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{rofoot}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content} +\end{Declaration} +You can define the contents of the footer for +\DescRef{\LabelBase.pagestyle.scrheadings} and +\DescRef{\LabelBase.pagestyle.plain.scrheadings} with these commands. The +optional argument defines the content of an element of +\DescRef{\LabelBase.pagestyle.plain.scrheadings}, while the mandatory argument +sets the content of the corresponding element of +\DescRef{\LabelBase.pagestyle.scrheadings}. + +The contents of even\,---\,or left-hand\,---\,pages\textnote{left-hand page} +are set with \Macro{lefoot}, \Macro{cefoot}, and \Macro{refoot}. The +``\texttt{e}'' appearing as the second letter of the commands' names stands +for ``\emph{even}''. + +The contents of odd\,---\,or right-hand\,---\,pages\textnote{right-hand page} +are set with \Macro{lofoot}, \Macro{cofoot}, and \Macro{rofoot}. The +``\texttt{o}'' appearing as the second letter of the commands' names stands +for ``\emph{odd}''. + +Note\textnote{Attention!} that in one-sided printing, only right-hand pages +exist, and \LaTeX{} designates these as odd pages regardless of their page +number. + +Each footer consists of a left-aligned\textnote{left aligned} element that can +be set with \Macro{lefoot} or \Macro{lofoot}. The ``\texttt{l}'' appearing as +the first letter of the commands' names stands for ``\emph{left aligned}''. + +Similarly, each footer has a centred\textnote{centred} element that can be set +with \Macro{cefoot} or \Macro{cofoot}. The ``\texttt{c}'' in the first letter +of the command' names stands for ``\emph{centred}''. + +Likewise, each footer has a right-aligned\textnote{right aligned} element that +can be set with \Macro{refoot} or \Macro{rofoot}. The ``\texttt{r}'' in the +first letter of the commands' names stands for ``\emph{right aligned}''. + +\BeginIndexGroup +\BeginIndex{FontElement}{pagefoot}\LabelFontElement{pagefoot}% +\BeginIndex{FontElement}{pageheadfoot}\LabelFontElement[foot]{pageheadfoot}% +However, these elements do not have individual font attributes that can be +changed with the \DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont} commands (see +\autoref{sec:maincls.textmarkup}, \DescPageRef{maincls.cmd.setkomafont}). +Instead, they use an element named +\FontElement{pagefoot}\important{\FontElement{pagefoot}}. Before this element +is applied, the font element +\FontElement{pageheadfoot}\important{\FontElement{pageheadfoot}} is also +applied. See \autoref{tab:scrlayer-scrpage.fontelements} for the defaults of +the fonts of these elements.% +\EndIndexGroup + +The meaning of each command for footers in two-sided printing is illustrated +in \autoref{fig:scrlayer-scrpage.foot}.% +% +\begin{figure}[bp] + \centering + \begin{picture}(\textwidth,30mm) + \thinlines + \small\ttfamily + % left page + \put(0,0){\line(1,0){.49\textwidth}}% + \put(0,0){\line(0,1){20mm}}% + \multiput(0,20mm)(0,1mm){10}{\line(0,1){.5mm}}% + \put(.49\textwidth,0){\line(0,1){15mm}}% + \put(.05\textwidth,5mm){% + \color{ImageRed}% + \put(-.5em,0){\line(1,0){4em}}% + \multiput(3.5em,0)(.25em,0){5}{\line(1,0){.125em}}% + \put(-.5em,0){\line(0,1){\baselineskip}}% + \put(-.5em,\baselineskip){\line(1,0){4em}}% + \multiput(3.5em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \makebox(4em,5mm)[l]{\Macro{lefoot}}% + }% + \put(.465\textwidth,5mm){% + \color{ImageBlue}% + \put(-4em,0){\line(1,0){4em}}% + \multiput(-4em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(0,0){\line(0,1){\baselineskip}}% + \put(-4em,\baselineskip){\line(1,0){4em}}% + \multiput(-4em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-4.5em,0){\makebox(4em,5mm)[r]{\Macro{refoot}}}% + }% + \put(.2525\textwidth,5mm){% + \color{ImageGreen}% + \put(-2em,0){\line(1,0){4em}}% + \multiput(2em,0)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,\baselineskip){\line(1,0){4em}}% + \multiput(2em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,0){\makebox(4em,5mm)[c]{\Macro{cefoot}}}% + }% + % right page + \put(.51\textwidth,0){\line(1,0){.49\textwidth}}% + \put(.51\textwidth,0){\line(0,1){15mm}}% + \put(\textwidth,0){\line(0,1){20mm}}% + \multiput(\textwidth,20mm)(0,1mm){10}{\line(0,1){.5mm}}% + \put(.5325\textwidth,5mm){% + \color{ImageBlue}% + \put(0,0){\line(1,0){4em}}% + \multiput(4em,0)(.25em,0){5}{\line(1,0){.125em}}% + \put(0,0){\line(0,1){\baselineskip}}% + \put(0em,\baselineskip){\line(1,0){4em}}% + \multiput(4em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \put(.5em,0){\makebox(4em,5mm)[l]{\Macro{lofoot}}}% + }% + \put(.965\textwidth,5mm){% + \color{ImageRed}% + \put(-4em,0){\line(1,0){4em}}% + \multiput(-4em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(0,0){\line(0,1){\baselineskip}}% + \put(-4em,\baselineskip){\line(1,0){4em}}% + \multiput(-4em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-4.5em,0){\makebox(4em,5mm)[r]{\Macro{rofoot}}}% + }% + \put(.75\textwidth,5mm){% + \color{ImageGreen}% + \put(-2em,0){\line(1,0){4em}}% + \multiput(2em,0)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,0)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,\baselineskip){\line(1,0){4em}}% + \multiput(2em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% + \multiput(-2em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% + \put(-2em,0){\makebox(4em,5mm)[c]{\Macro{cofoot}}}% + }% + % both pages + \color{ImageBlue}% + \put(.5\textwidth,15mm){\makebox(0,\baselineskip)[c]{\Macro{ifoot}}}% + \color{ImageGreen}% + \put(.5\textwidth,20mm){\makebox(0,\baselineskip)[c]{\Macro{cfoot}}} + \color{ImageRed}% + \put(.5\textwidth,25mm){\makebox(0,\baselineskip)[c]{\Macro{ofoot}}} + \put(\dimexpr.5\textwidth-2em,.5\baselineskip){% + \color{ImageBlue}% + \put(0,15mm){\line(-1,0){1.5em}}% + \put(-1.5em,15mm){\vector(0,-1){5mm}}% + \color{ImageGreen}% + \put(0,20mm){\line(-1,0){\dimexpr .25\textwidth-2em\relax}}% + \put(-\dimexpr .25\textwidth-2em\relax,20mm){\vector(0,-1){10mm}}% + \color{ImageRed}% + \put(0,25mm){\line(-1,0){\dimexpr .45\textwidth-4em\relax}}% + \put(-\dimexpr .45\textwidth-4em\relax,25mm){\vector(0,-1){15mm}}% + }% + \put(\dimexpr.5\textwidth+2em,.5\baselineskip){% + \color{ImageBlue}% + \put(0,15mm){\line(1,0){1.5em}}% + \put(1.5em,15mm){\vector(0,-1){5mm}}% + \color{ImageGreen}% + \put(0,20mm){\line(1,0){\dimexpr .25\textwidth-2em\relax}}% + \put(\dimexpr .25\textwidth-2em\relax,20mm){\vector(0,-1){10mm}}% + \color{ImageRed}% + \put(0,25mm){\line(1,0){\dimexpr .45\textwidth-4em\relax}}% + \put(\dimexpr .45\textwidth-4em\relax,25mm){\vector(0,-1){15mm}}% + }% + \end{picture} + \caption[Commands for setting the page footer]% + {The meaning of the commands for setting the contents of page + footers shown on a two-page schematic}% + \label{fig:scrlayer-scrpage.foot} +\end{figure} +% +\begin{Example} + Let's return to the example of the short article. Let's say you want to + specify the publisher in the left side of the footer. You would change the + example above to: +\begin{lstcode} + \documentclass{scrartcl} + \usepackage{scrlayer-scrpage} + \lohead{John Doe} + \rohead{Page style with \KOMAScript} + \lofoot{Smart Alec Publishing} + \usepackage{lipsum} + \begin{document} + \title{Page styles with \KOMAScript} + \author{John Doe} + \maketitle + \lipsum + \end{document} +\end{lstcode} + Once again the publisher is not printed on the first page with the title. + The reason is the same as in the example with + \DescRef{\LabelBase.cmd.lohead} above. And the solution for getting the + publisher on the first page is similar: +\begin{lstcode} + \lofoot[Smart Alec Publishing] + {Smart Alec Publishing} +\end{lstcode} + Now you decide\textnote{font change}\important{\FontElement{pageheadfoot}}% + \IndexFontElement{pageheadfoot} that the header and footer should use an + upright but smaller font in place of the default slanted font: +\begin{lstcode} + \setkomafont{pageheadfoot}{\small} +\end{lstcode} + In addition, the header, but not the footer, should be bold: +\begin{lstcode} + \setkomafont{pagehead}{\bfseries} +\end{lstcode} + It is important\textnote{Attention!} that this command does not occur until + after \Package{scrpage-scrlayer} has been loaded because the \KOMAScript{} + class defines \DescRef{\LabelBase.fontelement.pagehead} as an alias for + \DescRef{\LabelBase.fontelement.pageheadfoot}. Only by loading + \Package{scrpage-scrlayer} will \DescRef{\LabelBase.fontelement.pagehead} + become an element independent of + \DescRef{\LabelBase.fontelement.pageheadfoot}. + + Now add one more \Macro{lipsum} and the + \Option{twoside}\IndexOption{twoside}\important{\Option{twoside}} option + when loading \Class{scrartcl}. First of all, you will see the page number + moves from the centre to the outer margin of the page footer, due to the + changed defaults of \DescRef{\LabelBase.pagestyle.scrheadings} and + \DescRef{\LabelBase.pagestyle.plain.scrheadings} for two-sided printing with + a \KOMAScript{} class. + + Simultaneously, the author, document title, and publisher will vanish from + page~2. They only appear on page~3. That's because we've only used + commands for odd pages. You can recognise this by the ``\texttt{o}'' in the + second position of the command names. + + Now, we could simply copy those commands and replace the ``\texttt{o}'' with + an ``\texttt{e}'' to define the contents of \emph{even} pages. But with + two-sided printing, it makes more sense to use mirror-inverted elements, + i.\,e. the left element of an even page should become the right element of + the odd page and visa versa. To achieve this, we also replace the first + letter ``\texttt{l}'' with ``\texttt{r}'': +\begin{lstcode} + \documentclass[twoside]{scrartcl} + \usepackage{scrlayer-scrpage} + \lohead{John Doe} + \rohead{Page style with \KOMAScript} + \lofoot[Smart Alec Publishing] + {Smart Alec Publishing} + \rehead{John Doe} + \lohead{Page style with \KOMAScript} + \refoot[Smart Alec Publishing] + {Smart Alec Publishing} + \usepackage{lipsum} + \begin{document} + \title{Page styles with \KOMAScript} + \author{John Doe} + \maketitle + \lipsum\lipsum + \end{document} +\end{lstcode} +\end{Example} +% +Since it is a bit cumbersome to define left and right pages separately in +cases such as the previous example, a simpler solution for this common case is +introduced below. + +Allow me once again an important note:\textnote{Attention!} you should +never put a section heading or section number directly into the footer using +one of these commands. Because of the asynchronous way that \TeX{} lays out and +outputs pages, doing so can easily result in the wrong number or heading text +in the running head. Instead you should use the mark mechanism, ideally in +conjunction with the procedures explained in the next section.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{lefoot*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{cefoot*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{refoot*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{lofoot*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{cofoot*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{rofoot*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content} +\end{Declaration} +The starred versions\ChangedAt{v3.14}{\Package{scrlayer-scrpage}} of the +previously described commands differ only if you omit the optional argument +\OParameter{plain.scrheadings content}. In this case, the version without the +star does not change the contents of +\DescRef{\LabelBase.pagestyle.plain.scrheadings}. The starred version, on the +other hand, uses the mandatory argument \PName{scrheading content} for +\DescRef{\LabelBase.pagestyle.plain.scrheadings} as well. So if both arguments +should be the same, you can simply use the starred version with just the +mandatory argument.% + +\begin{Example} + You can shorten the previous example using the star versions of + \DescRef{\LabelBase.cmd.lofoot} and \DescRef{\LabelBase.cmd.refoot}: +\begin{lstcode} + \documentclass[twoside]{scrartcl} + \usepackage{scrlayer-scrpage} + \lohead{John Doe} + \rohead{Page style with \KOMAScript} + \lofoot*{Smart Alec Publishing} + \rehead{John Doe} + \lohead{Page style with \KOMAScript} + \refoot*{Smart Alec Publishing} + \usepackage{lipsum} + \begin{document} + \title{Page styles with \KOMAScript} + \author{John Doe} + \maketitle + \lipsum\lipsum + \end{document} +\end{lstcode} +\end{Example} +% +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \Macro{ohead}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{chead}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{ihead}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{ofoot}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{cfoot}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{ifoot}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content} +\end{Declaration} +To configure the headers and footers for two-sided printing with the +previously described commands, you would have to configure the left and right +sides separately from one another. In most cases, however, the left and right +sides are more or less symmetrical. An item that appears on the left of an +even page should appear on the right of an odd page and vice versa. Centred +elements are usually centred on both sides. + +To simplify the definition of such symmetric page styles, +\Package{scrlayer-scrpage} has shortcuts. The \Macro{ohead} command +corresponds to a call to both \DescRef{\LabelBase.cmd.lehead} and +\DescRef{\LabelBase.cmd.rohead}. The \Macro{chead} command corresponds to a +call to both \DescRef{\LabelBase.cmd.cehead} and +\DescRef{\LabelBase.cmd.cohead}. And the \Macro{ihead} command corresponds to +a call to both \DescRef{\LabelBase.cmd.rehead} and +\DescRef{\LabelBase.cmd.lohead}. The same applies to the equivalent commands +for the page footer. An outline of these relationships can also be found in +\autoref{fig:scrlayer-scrpage.head} on \autopageref{fig:scrlayer-scrpage.head} +and \autoref{fig:scrlayer-scrpage.foot} on +\autopageref{fig:scrlayer-scrpage.foot}. +% +\begin{Example} + You can simplify the previous example using the new commands: +\begin{lstcode} + \documentclass[twoside]{scrartcl} + \usepackage{scrlayer-scrpage} + \ihead{John Doe} + \ohead{Page style with \KOMAScript} + \ifoot[Smart Alec Publishing] + {Smart Alec Publishing} + \usepackage{lipsum} + \begin{document} + \title{Page styles with \KOMAScript} + \author{John Doe} + \maketitle + \lipsum\lipsum + \end{document} +\end{lstcode} +\iffalse% + As you can see, you can use half the number of commands but get the same + result. % +\fi% +\end{Example}% +Because one-sided printing treats all pages as odd pages, these commands are +synonymous with the corresponding right-side commands when in one-sided mode. +Therefore in most cases you will only need these six commands instead of the +twelve described before. + +Allow me once again an important note:\textnote{Attention!} you should never +put a section heading or section number directly into the footer using one of +these commands. Because of the asynchronous way that \TeX{} lays out and +outputs pages, doing so can easily result in the wrong number or heading text +in the running head. Instead you should use the mark mechanism, ideally in +conjunction with the procedures explained in the next section.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{ohead*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{chead*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{ihead*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{ofoot*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{cfoot*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content}% + \Macro{ifoot*}\OParameter{plain.scrheadings content}% + \Parameter{scrheadings content} +\end{Declaration} +The previously described commands also have starred +versions\ChangedAt{v3.14}{\Package{scrlayer-scrpage}} that differ only if you +omit the optional argument \OParameter{plain.scrheadings content}. In this +case, the version without a star does not change the content of +\DescRef{\LabelBase.pagestyle.plain.scrheadings}. The version with the star, +on the other hand, also uses the mandatory argument \PName{scrheadings +content} for \DescRef{\LabelBase.pagestyle.plain.scrheadings}. So if both +arguments should be the same, you can simply use the starred version with only +the mandatory argument.% + +\begin{Example} + You can shorten the previous example using the star version of + \DescRef{\LabelBase.cmd.ifoot}: +\begin{lstcode} + \documentclass[twoside]{scrartcl} + \usepackage{scrlayer-scrpage} + \ihead{John Doe} + \ohead{Page style with \KOMAScript} + \ifoot*{Smart Alec Publishing} + \usepackage{lipsum} + \begin{document} + \title{Page styles with \KOMAScript} + \author{John Doe} + \maketitle + \lipsum\lipsum + \end{document} +\end{lstcode}% +\end{Example}% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{pagestyleset}{setting} +\end{Declaration} +\BeginIndex{Option}{pagestyleset~=KOMA-Script}% +\BeginIndex{Option}{pagestyleset~=standard}% +The examples above refer several times to the default settings of the page +styles \DescRef{\LabelBase.pagestyle.scrheadings}\IndexPagestyle{scrheadings} +and \DescRef{\LabelBase.pagestyle.plain.scrheadings}% +\IndexPagestyle{plain.scrheadings}. In fact, \Package{scrlayer-scrpage} +currently provides two different defaults for these page styles. You can +select them manually with the \Option{pagestyleset} option. + +The +\PValue{KOMA-Script}\important{\OptionValue{pagestyleset}{KOMA-Script}} +\PName{setting} selects the defaults, which are also set automatically if the +option is not specified and a \KOMAScript{} class is detected. In two-sided +printing, \DescRef{\LabelBase.pagestyle.scrheadings} uses outer-aligned +running heads in the header and outer-aligned page numbers in the footer. +In one-sided printing, the running head will be printed in the +middle of the header and the page number in the middle of the footer. Upper- +and lower-case letters are used in the automatic running heads as they +actually appear in the sectioning headings. This corresponds to the +\OptionValueRef{\LabelBase}{markcase}{used}\IndexOption{markcase~=used}% +\important{\OptionValueRef{\LabelBase}{markcase}{used}} option. The +\DescRef{\LabelBase.pagestyle.plain.scrheadings} page style has no running +heads, but the page numbers are printed in the same manner. + +However, if the \hyperref[cha:scrlttr2]{\Class{scrlttr2}}% +\important{\hyperref[cha:scrlttr2]{\Class{scrlttr2}}}% +\IndexClass{scrlttr2} class is detected, the default settings are based on the +page styles of that class. See \autoref{sec:scrlttr2.pagestyle}, +\autopageref{sec:scrlttr2.pagestyle}. + +The +\PValue{standard}\important{\OptionValue{pagestyleset}{standard}} +\PName{setting} selects defaults that match the page styles of the standard +classes. This is also activated automatically if the option has not been +specified and no \KOMAScript{} class is detected. In this case, for two-sided +printing \DescRef{\LabelBase.pagestyle.scrheadings} uses running heads +inner-aligned in the header, and the page numbers will be printed\,---\,also +in the header\,---\,outer-aligned. One-sided printing uses the same settings, +but since only right-hand pages exist in this mode, the running head will +always be left-aligned and the page number right-aligned. The automatic +running heads\,---\,despite considerable typographic objections\,---\,are +converted to capital letters, as they would be with +\OptionValueRef{\LabelBase}{markcase}{upper}\IndexOption{markcase~=upper}% +\important{\OptionValueRef{\LabelBase}{markcase}{upper}}. In one-sided +printing, the \DescRef{\LabelBase.pagestyle.plain.scrheadings} page style +differs considerably from \DescRef{\LabelBase.pagestyle.scrheadings} because +the page number is printed in the middle of the footer. +Unlike\textnote{\KOMAScript{} vs. standard classes} the \PageStyle{plain} page +style in the standard classes, +\DescRef{\LabelBase.pagestyle.plain.scrheadings} omits the page number in +two-sided printing. The standard classes print the page number in the middle +of the footer, which does not match the rest of the page styles in two-sided +printing. +\iffalse % Umbruchkorrekturtext + If you want the page number back +\begin{lstcode} + \cfoot[\pagemark]{} +\end{lstcode} + will restore it. % +\fi% +The running head is omitted in \DescRef{\LabelBase.pagestyle.plain.scrheadings}. + +Note\textnote{Attention!} that using this option activates the +\DescRef{\LabelBase.pagestyle.scrheadings}\IndexPagestyle{scrheadings}% +\important{\DescRef{\LabelBase.pagestyle.scrheadings}} page style. +\iffalse% Umbruchkorrektur + This also applies if you use the option within the document.% +\fi +% +\EndIndexGroup + + +\LoadCommonFile{pagestylemanipulation} % \section{Manipulating Defined Page Styles} + +\begin{Declaration} + \OptionVName{headwidth}{width\textup{:}offset\textup{:}offset}% + \OptionVName{footwidth}{width\textup{:}offset\textup{:}offset} +\end{Declaration} +By default the header\Index{header>width} and footer\Index{footer>width} are +as wide as the type area. However, you can change this using these +\KOMAScript{} options. The value \PName{width} is the desired width of the +header or footer. The \PName{offset} defines how far the header or footer +should be moved towards the outer\,---\,in one-sided printing to the +right\,---\,margin. All three\ChangedAt{v3.14}{\Package{scrlayer-scrpage}} +values are optional and can be omitted. If you omit a value, you can also omit +the associated colon to the left of it. If only one \PName{offset} is +specified, it is used for both odd and even pages. Otherwise, the first +\PName{offset} is used for odd and the second \PName{offset} for even pages in +two-sided mode. If you only use one value without a colon, this will be the +\PName{width}. + +For both the \PName{width} and the \PName{offset} you can use any valid length +value, \LaTeX{} length, \TeX{} dimension, or \TeX{} skip. In addition, you can +use an \eTeX{} dimension expression with the basic arithmetic operations +\texttt{+}, \texttt{-}, \texttt{*}, \texttt{/}, and parentheses. See +\cite[section~3.5]{manual:eTeX} for more information on such expressions. See +\autoref{sec:scrlayer-scrpage.options} for more information on using a +\LaTeX{} length as an option value. The \PName{width} can also be one of the +symbolic values shown in \autoref{tab:scrlayer-scrpage.symbolic.values}. + +By default the header and the footer are the width of the text area. The +default \PName{offset} depends on the selected \PName{width}. One-sided +printing typically uses half the difference between \PName{width} and the +width of the text area. This centres the header horizontally above the text +area. Two-sided printing, on the other hand, uses only a third of the +difference between \PName{width} and the width of the text area. However, if +\PName{width} is the width of the whole text area and the marginal note +column, the default \PName{offset} will be zero. If this is too complicated +for you, you should simply specify the desired \PName{offset} yourself. +% +\begin{table} + \centering + \caption[Symbolic values for the \Option{headwidth} and \Option{footwidth} + options]{Available symbolic values for the \PName{width} value of options + \Option{headwidth} and \Option{footwidth}} + \label{tab:scrlayer-scrpage.symbolic.values} + \begin{desctabular} + \entry{\PValue{foot}}{% + the current width of the footer% + }% + \entry{\PValue{footbotline}}{% + the current length of the horizontal line below the footer% + }% + \entry{\PValue{footsepline}}{% + the current length of the horizontal line above the footer% + } \entry{\PValue{head}}{% + the current width of the header% + }% + \entry{\PValue{headsepline}}{% + the current length of the horizontal line below the header% + }% + \entry{\PValue{headtopline}}{% + the current length of the horizontal line above the header% + }% + \entry{\PValue{marginpar}}{% + the width of the marginal note column including the distance + between the text area and the marginal note column% + }% + \entry{\PValue{page}}{% + the width of the page taking into account any binding correction defined + with the help of the \Package{typearea} package (see the + \DescRef{typearea.option.BCOR} option in + \autoref{sec:typearea.typearea}, \DescPageRef{typearea.option.BCOR})% + }% + \entry{\PValue{paper}}{% + the width of the paper without considering any binding correction% + }% + \entry{\PValue{text}}{% + the width of the text area% + }% + \entry{\PValue{textwithmarginpar}}{% + the width of the text area including the marginal note column and + the distance between the two (Note: only in this case is + the default for \PName{offset} zero)% + }% + \end{desctabular} +\end{table} +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{headtopline}{thickness\textup{:}length}% + \OptionVName{headsepline}{thickness\textup{:}length}% + \OptionVName{footsepline}{thickness\textup{:}length}% + \OptionVName{footbotline}{thickness\textup{:}length} +\end{Declaration} +\BeginIndex{Option}{headtopline~=\PName{thickness\textup{:}length}}% +\BeginIndex{Option}{headsepline~=\PName{thickness\textup{:}length}}% +\BeginIndex{Option}{footsepline~=\PName{thickness\textup{:}length}}% +\BeginIndex{Option}{footbotline~=\PName{thickness\textup{:}length}}% +The \KOMAScript{} classes provide only one separation line below the header +and another above the footer, and you can only switch these lines on or off. +But the \Package{scrlayer-scrpage} package also lets you place lines above the +header and below the footer. And for all four lines, you can not only switch +them on an off but also configure their \PName{length} and \PName{thickness}. + +Both values are optional. If you omit the \PName{thickness}, a default value +of 0.4\Unit{pt} is used, producing a so-called \emph{hairline}. If you omit +the \PName{length}, the width of the header or footer will be used. If you +omit both, you can also omit the colon. If you use only one value without +colon, this is the \PName{thickness}. + +Of course, the \PName{length} can be not just shorter than the current width +of the header or footer but also longer. See also the options +\DescRef{\LabelBase.option.ilines}\IndexOption{ilines}% +\important{\DescRef{\LabelBase.option.ilines}, +\DescRef{\LabelBase.option.clines}, \DescRef{\LabelBase.option.olines}}, +\DescRef{\LabelBase.option.clines}\IndexOption{clines} and +\DescRef{\LabelBase.option.olines}\IndexOption{olines} later in this section. + +\BeginIndexGroup +\BeginIndex{FontElement}{headtopline}\LabelFontElement{headtopline}% +\BeginIndex{FontElement}{headsepline}\LabelFontElement{headsepline}% +\BeginIndex{FontElement}{footsepline}\LabelFontElement{footsepline}% +\BeginIndex{FontElement}{footbotline}\LabelFontElement{footbotline}% +In addition to the length and thickness, you can also change the colour of the +lines. Initially the colour depends on the colour of the header or footer. In +addition to this, however, the settings of the corresponding elements +\important[i]{\FontElement{headtopline}\\ + \FontElement{headsepline}\\ + \FontElement{footsepline}\\ + \FontElement{footbotline}} \FontElement{headtopline}, +\FontElement{headsepline}, \FontElement{footsepline} and +\FontElement{footbotline} are applied. You can +change these using the \DescRef{\LabelBase.cmd.setkomafont} or +\DescRef{\LabelBase.cmd.addtokomafont} commands (see +\autoref{sec:maincls.textmarkup}, \DescPageRef{maincls.cmd.setkomafont}). +By default these elements are empty, so they do not change the current font or +colour. Font changes at this point, unlike colour changes, make little sense +anyway and are therefore not recommended for these elements.% +\EndIndexGroup +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{plainheadtopline}{simple switch}% + \OptionVName{plainheadsepline}{simple switch}% + \OptionVName{plainfootsepline}{simple switch}% + \OptionVName{plainfootbotline}{simple switch} +\end{Declaration} +You can use these options to apply the settings for the lines to the +\PageStyle{plain} page style. You can find the available values for +\PName{simple switch} in \autoref{tab:truefalseswitch} on +\autopageref{tab:truefalseswitch}. If one of these options is activated, the +\PageStyle{plain} page style will use the line settings given by the options +and commands described above. If the option is deactivated, the +\PageStyle{plain} will not show the corresponding line.% +\EndIndexGroup + + +\begin{Declaration} + \Option{ilines}% + \Option{clines}% + \Option{olines} +\end{Declaration} +As previously explained, dividing lines for the header or footer can be longer +or shorter than the width of the header or footer respectively. But the +question remains how these lines are aligned. By default, all lines are +aligned to the left margin in one-sided printing and to the inner margin in +two-sided printing. This corresponds to using the \Option{ilines} option. +Alternatively, you can use the \Option{clines} option to centre the lines with +respect to the width of the header or footer, or the \Option{olines} option to +align them to the outer (or right) margin.% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-scrpage-experts-de.tex b/macros/latex/contrib/koma-script/doc/scrlayer-scrpage-experts-de.tex new file mode 100644 index 0000000000..f30b4d2f1b --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlayer-scrpage-experts-de.tex @@ -0,0 +1,428 @@ +% ====================================================================== +% scrlayer-scrpage-experts-de.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% +% Expert chapter about scrlayer-scrpage of the KOMA-Script guide +% +% ============================================================================ + +\KOMAProvidesFile{scrlayer-scrpage-experts-de.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrlayer-scrpage for experts)] + +\chapter[{Zusätzliche Möglichkeiten von \Package{scrlayer-scrpage}}] +{Zusätzliche Möglichkeiten des + Pakets\ChangedAt{v3.12}{\Package{scrlayer-scrpage}} + \Package{scrlayer-scrpage}} +\labelbase{scrlayer-scrpage-experts} +% +\BeginIndexGroup +\BeginIndex{Package}{scrlayer-scrpage}% +Über die Erklärungen in \autoref{cha:scrlayer-scrpage} von +\autoref{part:forAuthors} diese\iffree{r Anleitung}{s Buches} hinaus bietet +das Paket \Package{scrlayer-scrpage} viele weitere Möglichkeiten. Diese +stellen jedoch Erweiterungen dar, die der durchschnittliche Anwender +nicht zwingend benötigt oder die nur aus Gründen der Kompatibilität zu +\Package{scrpage2} existieren. Ihre Dokumentation hier in +\autoref{part:forExperts} dient der Vertiefung und der Erweiterung des +Wissens. Ihre Beherrschung geht über grundlegende Fähigkeiten hinaus. + +\LoadCommonFile{pagestylemanipulation}% \section{Beeinflussung von definierten Seitenstilen} + +\section{Definition eigener Seitenstil-Paare} +\seclabel{pagestyle.pairs} + +In \autoref{sec:scrlayer-scrpage.predefined.pagestyles} wurden die beiden +Seitenstile \PageStyle{scrheadings} und \PageStyle{plain.scrheadings} +vorgestellt. Diese bilden quasi ein Paar, bei dem \PageStyle{scrheadings} als +Haupt-Seitenstil mit Kolumnentitel vorgesehen ist, während +\PageStyle{plain.scrheadings} ein dazu passender \PageStyle{plain}-Seitenstil +ohne Kolumnentitel, aber üblicherweise mit Paginierung, also mit Seitenzahl +ist. Neben der Konfiguration dieses vordefinierten Paares bietet +\Package{scrlayer-scrpage} auch die Möglichkeit, zusätzliche Paare zu +definieren. Der Name des Haupt-Seitenstils, beispielsweise +\PageStyle{scrheadings}, dient dabei quasi auch als Name des Seitenstil-Paares. + +\iffree{Die allermeisten Anwender werden in der Regel mit dem einen + vordefinierten Seitenstil-Paar \PageStyle{scrheadings} auskommen. Die in + diesem Abschnitt dokumentierten Anweisungen sind daher eher Ergänzungen für + besondere Fälle. Da mir während des Abfassens dieser Anleitung keine + handlichen Anwendungsbeispiele eingefallen sind, gibt es auch keine + ausführlichen Beispiele. Sollte mir im Support einmal eine besonders schöne + Anwendung begegnen, werde ich solche aber in zukünftigen Fassungen gerne + aufgreifen. Ich bin jedoch gleichzeitig sicher, dass sich all diese Fälle + auch mit dem einen Paar \PageStyle{scrheadings} lösen lassen.}{} + +\begin{Declaration} + \Macro{defpairofpagestyles}\OParameter{Eltern-Paar} + \Parameter{Name}\Parameter{Definition} + \Macro{newpairofpagestyles}\OParameter{Eltern-Paar} + \Parameter{Name}\Parameter{Definition} + \Macro{renewpairofpagestyles}\OParameter{Eltern-Paar} + \Parameter{Name}\Parameter{Definition} + \Macro{providepairofpagestyles}\OParameter{Eltern-Paar} + \Parameter{Name}\Parameter{Definition} +\end{Declaration} +Mit diesen Anweisungen können Paare von Seitenstilen vergleichbar zu +\PageStyle{scrheadings} und \PageStyle{plain.scrheadings} definiert +werden. Dabei ist \PName{Name} der Name des zu \PageStyle{scrheadings} +vergleichbaren Hauptseitenstils, der für die Verwendung mit Kolumnentiteln +ausgelegt ist. Für den Namen des zugehörigen \PageStyle{plain}-Seitenstil wird +\PName{Name} automatisch \PValue{plain.} vorangestellt. \PName{Name} ist also +gleichzeitig der Name des Paares und des Hauptseitenstils dieses Paares, während +\PValue{plain.}\PName{Name} der Name des \PageStyle{plain}-Seitenstils dieses +Paares ist. + +Ist das optionale Argument \PName{Eltern-Paar} angegeben, so ist dies der Name +eines Seitenstil-Paares, mit dessen Einstellungen das neue Paar initialisiert +werden soll. Das neue Paar erbt also quasi die Konfiguration des +Eltern-Paares. + +{\setlength{\emergencystretch}{1em}% +Während in \autoref{sec:scrlayer-scrpage.predefined.pagestyles} der Eindruck +entstanden sein mag, dass sich die dort erläuterten Anweisungen nur auf +\PageStyle{scrheadings} und \PageStyle{plain.scrheadings} beziehen, gilt das +tatsächlich nur, solange diese beiden Seitenstile das einzige Seitenstil-Paar +darstellen. Sobald es mehrere Seitenstil-Paare gibt, beziehen sich +\DescRef{scrlayer-scrpage.cmd.lehead}, \DescRef{scrlayer-scrpage.cmd.cehead}, +\DescRef{scrlayer-scrpage.cmd.rehead}, \DescRef{scrlayer-scrpage.cmd.lohead}, +\DescRef{scrlayer-scrpage.cmd.cohead}, \DescRef{scrlayer-scrpage.cmd.rohead}, +\DescRef{scrlayer-scrpage.cmd.lefoot}, \DescRef{scrlayer-scrpage.cmd.cefoot}, +\DescRef{scrlayer-scrpage.cmd.refoot}, \DescRef{scrlayer-scrpage.cmd.lofoot}, +\DescRef{scrlayer-scrpage.cmd.cofoot}, \DescRef{scrlayer-scrpage.cmd.rofoot}, +\DescRef{scrlayer-scrpage.cmd.ihead}, \DescRef{scrlayer-scrpage.cmd.chead}, +\DescRef{scrlayer-scrpage.cmd.ohead}, \DescRef{scrlayer-scrpage.cmd.ifoot}, +\DescRef{scrlayer-scrpage.cmd.cfoot} und \DescRef{scrlayer-scrpage.cmd.ofoot} +auf das zuletzt aktive Paar.\par} + +{\setlength{\emergencystretch}{1em}% + Neben den achtzehn vorgenannten sind auch die drei nachfolgend + dokumentierten Anweisungen + \DescRef{scrlayer-scrpage-experts.cmd.clearmainofpairofpagestyles}, + \DescRef{scrlayer-scrpage-experts.cmd.clearplainofpairofpagestyles} und + \DescRef{scrlayer-scrpage-experts.cmd.clearpairofpagestyles} für die + Verwendung im letzten Parameter, \PName{Definition}, gedacht. In diesem Fall + stellen sie eine Art Grundkonfiguration des Seitenstil-Paares dar, die immer + dann ausgeführt wird, wenn das Seitenstil-Paar aktiviert wird. Ein + Seitenstil-Paar wird aktiviert, indem einer der beiden Seitenstile des + Paares aktiviert wird. Dies geschieht in der Regel mit Hilfe von + \DescRef{maincls.cmd.pagestyle}\IndexCmd{pagestyle}.\par} + +Es sei darauf hingewiesen, dass die Anweisungen aus +\autoref{sec:scrlayer-scrpage.pagestyle.content} ab +\autopageref{sec:scrlayer-scrpage.pagestyle.content} ohnehin allgemeiner Natur +sind und für alle mit \PageStyle{scrlayer-scrpage} definierten Seitenstile +gelten. + +Während\textnote{Unterschiede} \Macro{defpairofpagestyles} das Seitenstil-Paar +unabhängig davon, ob entsprechende Seitenstile bereits existieren, definiert, +tun \Macro{newpairofpagestyles} und \Macro{providepairofpagestyles} dies nur, +wenn die Seitenstile noch nicht definiert sind. Ist mindestens einer der +beiden Seitenstile des Paares bereits definiert, so wird die neuerliche +Definition bei \Macro{providepairofpagestyles} ignoriert, wohingegen sie bei +\Macro{newpairofpagestyles} zu einem Fehler führt. Für die Umdefinierung +bereits existierender Paare kann \Macro{renewpairofpagestyles} verwendet +werden. Hier wird ein Fehler gemeldet, wenn einer der beiden Seitenstile oder +beide Seitenstile des Paares noch nicht existieren.% + +An dieser Stelle sei auch noch darauf hingewiesen, dass jedes Paar aus einer +Reihe von mit \hyperref[cha:scrlayer]{\Package{scrlayer}} definierten Ebenen +besteht. Interessierte Anwender werden die Namen\textnote{Ebenennamen} der +Ebenen im nachfolgenden Abschnitt in +\autoref{tab:scrlayer-scrpage-experts.layersperstyle} auf +\autopageref{tab:scrlayer-scrpage-experts.layersperstyle} kennenlernen. Die +dort angebenen Ebenen werden für ein Seitenstilpaar durch die Tatsache +verdoppelt, dass sie sowohl für \PName{Name} als auch +für \PValue{plain.}\PName{Name} definiert werden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{clearmainofpairofpagestyles} + \Macro{clearplainofpairofpagestyles} + \Macro{clearpairofpagestyles} +\end{Declaration} +Mit \Macro{clearmainofpairofpagestyles} wird der Hauptseitenstil des zuletzt +aktivierten Seitenstil-Paares leer konfiguriert. Dagegen wird mit der +Anweisung \Macro{clearplainofpairofpagestyles} der +\PageStyle{plain}-Seitenstil des entsprechenden Seitenstil-Paares leer +konfiguriert. Die Anweisung \Macro{clearpairofpagestyles} konfiguriert +schließlich beide Seitenstile des entsprechenden Paares als leer. + +Es ist jedoch zu beachten\textnote{Achtung!}, dass keine dieser Anweisungen +die Definitionen aus dem Parameter \PName{Definition}, der bei der Definition +des Seitenstil-Paares angegeben wurde (siehe oben), entfernt. Bei der erneuten +Auswahl eines Seitenstils des Paares werden jene Einstellungen also erneut +ausgeführt! + +Die Anweisungen können ebenfalls innerhalb von \PName{Definition} bei der +zuvor erklärten Definition eines Seitenstil-Paares verwendet werden. Sie +können aber auch jederzeit außerhalb der Definition eines Seitenstil-Paares +verwendet werden. In diesem Fall beziehen sie sich auf das zuletzt aktivierte +Paar.% +\EndIndexGroup + + +\section{Definition komplexer Seitenstile} +\seclabel{pagestyle.experts} + +\iffree{}{\enlargethispage{-.8\baselineskip}}% Umbruchkorrektur Doppelseite +Neben den vordefinierten Seitenstilen bietet \Package{scrlayer-scrpage} auch +noch eine eher grundlegende Schnittstelle zur Definition von Seitenstilen. Die +bisher erläuterten Konzepte greifen bei der Implementierung % +\iftrue ebenso wie die von \autoref{sec:\LabelBase.pagestyle.triple} \fi % +auf diese Möglichkeit zurück. % +\iftrue % Umbruchkorrektur +Aufgrund ihrer hohen Komplexität wird sie jedoch nur erfahrenen Anwendern +empfohlen. Weniger erfahrene Anwender können mit den vorgenannten +Möglichkeiten bereits nahezu alles erreichen, was auch mit dieser +grundlegenden Schnittstelle möglich ist. % +\else % +Sie ist jedoch hoch komplex und wird von Anwender nur sehr selten benötigt. +\fi + +\begin{Declaration} + \Macro{defpagestyle}\Parameter{Name} + \Parameter{Kopfdefinition} + \Parameter{Fußdefinition} + \Macro{newpagestyle}\Parameter{Name} + \Parameter{Kopfdefinition} + \Parameter{Fußdefinition} + \Macro{providepagestyle}\Parameter{Name} + \Parameter{Kopfdefinition} + \Parameter{Fußdefinition} + \Macro{renewpagestyle}\Parameter{Name} + \Parameter{Kopfdefinition} + \Parameter{Fußdefinition} +\end{Declaration} +Diese Anweisungen dienen der Definition eines einzelnen Seitenstils mit +maximaler Flexibilität. Dabei ist \PName{Name} der Name des Seitenstils, der +definiert werden soll. + +Die beiden Parameter \PName{Kopfdefinition} und \PName{Fußdefinition} haben +den identischen Aufbau: +\begin{flushleft} +\begin{addmargin}{1em}\raggedright\small + \texttt{(\PName{Länge der oberen Linie},\PName{Dicke der oberen Linie})\%\\ + \Parameter{Definition für linke Seiten im doppelseitigen Layout}\%\\ + \Parameter{Definition für rechte Seiten im doppelseitigen Layout}\%\\ + \Parameter{Definition für Seiten im einseitigen Layout}\%\\ + (\PName{Länge der unteren Linie},\PName{Dicke der unteren Linie})% + } +\end{addmargin} +\end{flushleft} +Dabei sind die Argumente in den runden Klammern optional, das heißt, sie +können zusammen mit den Klammern weggelassen +werden. In\important[i]{\DescRef{scrlayer-scrpage.option.headtopline}\\ + \DescRef{scrlayer-scrpage.option.headsepline}\\ + \DescRef{scrlayer-scrpage.option.footsepline}\\ + \DescRef{scrlayer-scrpage.option.footbotline}} diesem Fall richten sich die +Längen und Dicken je nach Linie nach den Angaben der Optionen +\DescRef{scrlayer-scrpage.option.headtopline}\IndexOption{headtopline}, +\DescRef{scrlayer-scrpage.option.headsepline}\IndexOption{headsepline}, +\DescRef{scrlayer-scrpage.option.footsepline}\IndexOption{footsepline} und +\DescRef{scrlayer-scrpage.option.footbotline}\IndexOption{footbotline} (siehe +\autoref{sec:scrlayer-scrpage.pagestyle.content}, +\DescPageRef{scrlayer-scrpage.option.headtopline}). + +Die drei Argumente mit den Definitionen sind obligatorisch und werden je nach +Seite und Layouteinstellung verwendet. Der Inhalt der Definitionen ist frei +wählbar. Für Seitenstile mit Kolumnentitel wird jedoch die Verwendung von +\DescRef{scrlayer-scrpage.cmd.headmark}, +\DescRef{scrlayer-scrpage.cmd.leftmark} oder +\DescRef{scrlayer-scrpage.cmd.rightmark} innerhalb der Definitionen +empfohlen. Keinesfalls\textnote{Achtung!} sollte man hier direkt eine +Gliederungsnummer oder einen Überschriftentext als Kolumnentitel +angeben. Aufgrund des asynchronen Seitenaufbaus von \LaTeX{} können sonst die +falsche Nummer oder der falsche Text im Seitenkopf oder Seitenfuß erscheinen. + +Bei\textnote{Unterschiede} \Macro{defpagestyle} wird der Seitenstil unabhängig +davon, ob er bereits existiert oder nicht, neu definiert. Demgegenüber meldet +\Macro{newpagestyle} einen Fehler, wenn bereits ein Seitenstil gleichen Namens +existiert. Im Unterschied dazu wird die Definition bei +\Macro{providepagestyle} ignoriert, falls der \PName{Name} bereits für einen +Seitenstil verwendet wurde. Umgekehrt kann mit \Macro{renewpagestyle} nur ein +bereits vorhandener Seitenstil umdefiniert werden. Für einen neuen Namen +meldet diese Anweisung dagegen einen Fehler. + +Alle vier Anweisungen basieren auf +\DescRef{scrlayer.cmd.DeclarePageStyleByLayers}% +\IndexCmd{DeclarePageStyleByLayers} des Pakets +\hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer}. Die dabei +für einen Seitenstil \PName{Name} definierten Ebenen sind in +\autoref{tab:scrlayer-scrpage-experts.layersperstyle} aufgeführt. Näheres zu +Ebenen und Ebenen-Seitenstilen ist \autoref{cha:scrlayer} ab +\autopageref{cha:scrlayer} zu entnehmen.% + +\begin{table} +% \KOMAoptions{captions=topbeside} +% \setcapindent{0pt} +% \begin{captionbeside} + \caption + [{Von \Package{scrlayer-scrpage} zu einem Seitenstil definierte + Ebenen}] + {Die von \Package{scrlayer-scrpage} zu einem Seitenstil \PName{Name} + definierten Ebenen\label{tab:scrlayer-scrpage-experts.layersperstyle}} +% [l] + \begin{tabular}{ll} + \toprule + Name der Ebene & Bedeutung der Ebene \\ + \midrule + \PName{Name}\PValue{.head.above.line} & die Linie über dem Kopf\\ + \PName{Name}\PValue{.head.odd} & der Kopf von rechten Seiten im + doppelseitigen Layout\\ + \PName{Name}\PValue{.head.even} & der Kopf von linken Seiten im + doppelseitigen Layout\\ + \PName{Name}\PValue{.head.oneside} & der Kopf von Seiten im + einseitigen Layout\\ + \PName{Name}\PValue{.head.below.line} & die Linie unter dem Kopf\\ + \PName{Name}\PValue{.foot.above.line} & die Linie über dem Fuß\\ + \PName{Name}\PValue{.foot.odd} & der Fuß von rechten Seiten im + doppelseitigen Layout\\ + \PName{Name}\PValue{.foot.even} & der Fuß von linken Seiten im + doppelseitigen Layout\\ + \PName{Name}\PValue{.foot.oneside} & der Fuß von Seiten im + einseitigen Layout\\ + \PName{Name}\PValue{.foot.below.line} & die Linie unter dem Fuß\\ + \bottomrule + \end{tabular} +% \end{captionbeside} +\end{table} + +\begin{Example} + Angenommen, Sie wollen den gesamten Kopf des Seitenstil + \PageStyle{scrheadings} mit einer Farbe hinterlegen. Aufgrund der Einleitung + zu diesem Kapitel und \autoref{tab:scrlayer-scrpage-experts.layersperstyle}, + wissen Sie, dass \PageStyle{scrheadings} ein Ebenen-Seitenstil + ist, der unter anderem aus den Ebenen \PValue{scrheadings.head.oneside}, + \PValue{scrheadings.head.odd} und \PValue{scrheadings.head.even} + besteht. Sie definieren nun drei weitere Ebenen für deren Hintergrund und + fügen diese am Anfang des Seitenstils ein: +\begin{lstcode} + \documentclass{scrartcl} + \usepackage[automark]{scrlayer-scrpage} + \usepackage{xcolor} + \usepackage{blindtext} + \DeclareLayer[clone=scrheadings.head.oneside, + contents={% + \color{yellow}% + \rule[-\dp\strutbox]% + {\layerwidth}{\layerheight}% + }% + ]{scrheadings.head.oneside.background} + \DeclareLayer[clone=scrheadings.head.odd, + contents={% + \color{yellow}% + \rule[-\dp\strutbox]% + {\layerwidth}{\layerheight}% + }% + ]{scrheadings.head.odd.background} + \DeclareLayer[clone=scrheadings.head.even, + contents={% + \color{yellow}% + \rule[-\dp\strutbox]% + {\layerwidth}{\layerheight}% + }% + ]{scrheadings.head.even.background} + \AddLayersAtBeginOfPageStyle{scrheadings}{% + scrheadings.head.oneside.background,% + scrheadings.head.odd.background,% + scrheadings.head.even.background% + } + \pagestyle{scrheadings} + \begin{document} + \blinddocument + \end{document} +\end{lstcode} + Wie Sie sehen, wurden in dem Beispiel drei Ebenen verwendet, damit Position + und Größe der Hintergrund-Ebenen per Option + \Option{clone}\important{\Option{clone}} einfach jeweils von der Ebene für + den Kopf kopiert werden konnten. Das ist einfacher, als nur eine + Hintergrundebene zu verwenden und für diese die Position umständlich + dynamisch zu bestimmen. + + Der farbige Hintergrund selbst wurde in diesem Beispiel mit einer + \Macro{rule}-Anweisung gesetzt. Für die Größe wurden dabei mit + \DescRef{scrlayer.cmd.layerwidth}\IndexCmd{layerwidth}% + \important[i]{\DescRef{scrlayer.cmd.layerwidth}\\ + \DescRef{scrlayer.cmd.layerheight}} und + \DescRef{scrlayer.cmd.layerheight}\IndexCmd{layerheight} die aktuelle Breite + und Höhe der Ebene verwendet. Per optionalem Argument von \Macro{rule} wurde + der Hintergrund um die Höhe der Unterlängen, \Macro{dp}\Macro{strutbox}, + nach unten verschoben. +\end{Example} +% +Statt wie im Beispiel für die Hintergrundfarbe neue Ebenen hinzuzufügen, hätte +man das Problem übrigens auch mit \Macro{colorbox} und +\DescRef{scrlayer-scrpage.cmd.chead} lösen können. Es wird empfohlen, eine +entsprechende Lösung als Übung zu erarbeiten. Ebenso +hätte man die Hintergrundebenen auch einzeln und jeweils unmittelbar vor der +entsprechenden Inhaltsebene einfügen können. Eine entsprechende Umsetzung +bietet sich als weitere Übung an.% +\EndIndexGroup + +\section{Definition einfacher Seitenstile mit dreigeteiltem Kopf und Fuß} +\seclabel{pagestyle.triple} + +\LoadNonFree{scrlayer-scrpage-experts}{1} + +\section{Das obsolete Erbe von \Package{scrpage2}} +\seclabel{obsolete} + +\begin{Explain} + Das Paket \Package{scrlayer-scrpage} enthält auch noch einige Altlasten, die + von \Package{scrpage2} stammen und nur existieren, um möglichst kompatibel + mit jenem Paket zu sein. Kenntnisse dazu benötigen Anwender nur, wenn sie + ein altes Dokument, das noch auf \Package{scrpage2} basiert, bearbeiten + wollen. Für\textnote{Achtung!} neue Dokumente sollten die hier dokumentieren + Dinge dagegen nicht verwendet werden! +\end{Explain} + +\begin{Declaration} + \OptionVName{hmode}{Ein-Aus-Wert} +\end{Declaration} +Bei \Package{scrpage2} wurden die Köpfe und Füße der Seitenstile noch +grundsätzlich im horizontalen Modus ausgegeben. Bei \Package{scrlayer-scrpage} +wird hingegen in der Voreinstellung erst durch entsprechende Ausgaben selbst +in den horizontalen Modus geschaltet. Aktiviert man jedoch Option +\Option{hmode} verhält sich \Package{scrlayer-scrpage} auch in dieser Hinsicht +kompatibel mit \Package{scrpage2} und schaltet bereits vor der Ausgabe in den +horizontalen Modus. Dies kann Auswirkungen sowohl auf die Verarbeitung von +Leerzeichen am Anfang der Ausgabe als auch auf die vertikale Ausrichtung +haben. + +Die Option versteht die Standardwerte für einfache Schalter, die in +\autoref{tab:truefalseswitch} auf \autopageref{tab:truefalseswitch} angegeben +sind. In der Voreinstellung ist der Schalter deaktiviert.% +\EndIndexGroup + +\LoadNonFree{scrlayer-scrpage-experts}{0} +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Hintergrundebene Seitenkopf Seitenstils Kopfelement Seitenfuß +% LocalWords: Seitenstile Seitenstilen diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-scrpage-experts-en.tex b/macros/latex/contrib/koma-script/doc/scrlayer-scrpage-experts-en.tex new file mode 100644 index 0000000000..8a9a43fa25 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlayer-scrpage-experts-en.tex @@ -0,0 +1,370 @@ +% ====================================================================== +% scrlayer-scrpage-experts-en.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% +% Expert chapter about scrlayer-scrpage of the KOMA-Script guide +% +% ============================================================================ + +\KOMAProvidesFile{scrlayer-scrpage-experts-en.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrlayer-scrpage-experts)] +\translator{Markus Kohm\and Karl Hagen} + +\chapter[{Additional Features of \Package{scrlayer-scrpage}}] + {Additional Features\ChangedAt{v3.12}{\Package{scrlayer-scrpage}} with + the \Package{scrlayer-scrpage} package} +\labelbase{scrlayer-scrpage-experts} +% +\BeginIndexGroup +\BeginIndex{Package}{scrlayer-scrpage}% +The \Package{scrlayer-scrpage} package offers many features beyond what has +been described in \autoref{cha:scrlayer-scrpage} of \autoref{part:forAuthors} +of this \iffree{guide}{book}. However, the average user will not normally need +these extensions, and some of them are only provided for compatibility with +\Package{scrpage2}. The documentation here in \autoref{part:forExperts} serves +to deepen and broaded your knowledge, and its mastery goes beyond basic +skills. + +\LoadCommonFile{pagestylemanipulation}% \section{Manipulating Defined Page Styles} + +\section{Defining New Pairs of Page Styles} +\seclabel{pagestyle.pairs} + +The two page styles \PageStyle{scrheadings} and \PageStyle{plain.scrheadings} +were described in \autoref{sec:scrlayer-scrpage.predefined.pagestyles}. You +can view them as a kind of pair, with \PageStyle{scrheadings} intended as the +main page style for a running head and \PageStyle{plain.scrheadings} the +corresponding \PageStyle{plain} page style without a running head but +generally with pagination. In addition to configuring this predefined pair, +\Package{scrlayer-scrpage} also lets you define additional pairs of page +styles. The name of the main page style, for example \PageStyle{scrheadings}, +also serves as the name of the page-style pair. + +\iffree{ + The vast majority of users will not need more than the one predefined + page-style pair, \PageStyle{scrheadings}. So the commands documented in this + section are therefore extensions for special cases. Since I have not come + across any suitable applications while writing this manual, there are no + detailed examples. Should I ever run across a particularly nice application + while providing support, I will happily include it in future versions. At + the same time, however, I'm virtually certain that all such cases could also + be solved using the predefined pair only.}{} + +\begin{Declaration} + \Macro{defpairofpagestyles}% + \OParameter{parent pair}\Parameter{name}\Parameter{definition}% + \Macro{newpairofpagestyles}% + \OParameter{parent pair}\Parameter{name}\Parameter{definition}% + \Macro{renewpairofpagestyles}% + \OParameter{parent pair}\Parameter{name}\Parameter{definition}% + \Macro{providepairofpagestyles}% + \OParameter{parent pair}\Parameter{name}\Parameter{definition} +\end{Declaration} +You can use these commands to define pairs of page styles similar to +\PageStyle{scrheadings} and \PageStyle{plain.scrheadings}, where \PName{name} +is the name of the main page style corresponding to \PageStyle{scrheadings}. +The name of the equivalent \PageStyle{plain} page style will be prefixed by +\PValue{plain.} automatically. So \PName{name} is not only the name of the +pair of page styles, but also the name of the main page style of that pair, +while \PValue{plain.}\PName{name} is the name of the \PageStyle{plain} page +style of this pair. + +If you provide the optional \PName{parent pair} argument, this is the name of +a page-style pair whose settings are used to initialise the new page-style +pair. So the new pair inherits the configuration of the \PName{parent pair}. + +Although \autoref{sec:scrlayer-scrpage.predefined.pagestyles} might have +created the impression that the commands described there apply only to +\PageStyle{scrheadings} and \PageStyle{plain.scrheadings} only, this is true +only so long as those two page styles are the only defined page-style pair. As +soon as there are multiple page-style pairs, +\DescRef{scrlayer-scrpage.cmd.lehead}, \DescRef{scrlayer-scrpage.cmd.cehead}, +\DescRef{scrlayer-scrpage.cmd.rehead}, \DescRef{scrlayer-scrpage.cmd.lohead}, +\DescRef{scrlayer-scrpage.cmd.cohead}, \DescRef{scrlayer-scrpage.cmd.rohead}, +\DescRef{scrlayer-scrpage.cmd.lefoot}, \DescRef{scrlayer-scrpage.cmd.cefoot}, +\DescRef{scrlayer-scrpage.cmd.refoot}, \DescRef{scrlayer-scrpage.cmd.lofoot}, +\DescRef{scrlayer-scrpage.cmd.cofoot}, \DescRef{scrlayer-scrpage.cmd.rofoot}, +\DescRef{scrlayer-scrpage.cmd.ihead}, \DescRef{scrlayer-scrpage.cmd.chead}, +\DescRef{scrlayer-scrpage.cmd.ohead}, \DescRef{scrlayer-scrpage.cmd.ifoot}, +\DescRef{scrlayer-scrpage.cmd.cfoot}, and \DescRef{scrlayer-scrpage.cmd.ofoot} +all refer to page-style pair that was most recently activated. + +In addition to those eighteen commands mentioned above, the three commands +described below, \DescRef{\LabelBase.cmd.clearmainofpairofpagestyles}, +\DescRef{\LabelBase.cmd.clearplainofpairofpagestyles}, and +\DescRef{\LabelBase.cmd.clearpairofpagestyles}, are designed to be used inside +the \PName{definition} argument. In this case, they represent a kind of +default configuration of the page-style pair that is executed each time the +pair is activated. You activate a page-style pair by activating either one two +page styles in the pair. Typically, you do so with +\DescRef{maincls.cmd.pagestyle}\IndexCmd{pagestyle}. + +Note that the commands of \autoref{sec:scrlayer-scrpage.pagestyle.content} on +\autopageref{sec:scrlayer-scrpage.pagestyle.content} are general in nature and +apply to all page styles defined with \Package{scrlayer-scrpage}. + +Although \Macro{defpairofpagestyles} defines a page-style pair regardless of +whether the corresponding page styles already exist, +\Macro{newpairofpagestyles} and \Macro{providepairofpagestyles} do so only if +the page styles are currently undefined. If at least one of the page styles is +already defined, the new definition of \Macro{providepairofpagestyles} will be +ignored, whereas using \Macro{newpairofpagestyles} results in an error +message. To redefine existing page-style pairs, you can use +\Macro{renewpairofpagestyles}. With this an is thrown if either one of the two +page styles of the pair does not already exist.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{clearmainofpairofpagestyles}% + \Macro{clearplainofpairofpagestyles}% + \Macro{clearpairofpagestyles} +\end{Declaration} +The \Macro{clearmainofpairofpagestyles} command sets the main page style of +the most recently activated page-style pair to be empty. In contrast, the +\Macro{clearplainofpairofpagestyles} command sets the \PageStyle{plain} page +style of the active page-style pair to be empty. Finally, +\Macro{clearpairofpagestyle} sets both page styles of the activate pair to be +empty. + +But note\textnote{Attention!} that none of these commands removes the +definitions of the \PName{definition} argument that was specified when +defining the page-style pair (see above). So if you activate the pair of page +styles again, those definitions will be used again! + +You can use these commands inside the \PName{definition} of the page-style +pair explained above. But you can also use them outside this definition. In +this case, they refer to the most recently activated page-style pair.% +\EndIndexGroup + + +\section{Defining Complex Page Styles} +\seclabel{pagestyle.experts} + +In addition to the predefined page styles, \Package{scrlayer-scrpage} also +provides a more basic interface for defining new page styles. The page-style +definitions discussed so far use this interface internally, as do the obsolete +commands in \autoref{sec:\LabelBase.pagestyle.triple}. +\Package{scrlayer-scrpage}. Because of its complexity, however, only advanced +users should try to use it directly. Less experienced users can already +achieve almost everything possible with this low-level interface by using the +possibilities described previously. + +\begin{Declaration} + \Macro{defpagestyle}% + \Parameter{name}\Parameter{header specification}\Parameter{footer specification}% + \Macro{newpagestyle}% + \Parameter{name}\Parameter{header specification}\Parameter{footer specification}% + \Macro{providepagestyle}% + \Parameter{name}\Parameter{header specification}\Parameter{footer specification}% + \Macro{renewpagestyle}% + \Parameter{name}\Parameter{header specification}\Parameter{footer specification}% +\end{Declaration} +You can use these commands to define a single page style with maximum +flexibility, where \PName{name} is the name of the page style that you want to +define. + +The parameters \PName{header specification} and \PName{footer specification} +have identical structure: +\begin{quote}\raggedright + \texttt{% + (\PName{length of the line above},\PName{thickness of the line above})\%\\ + \Parameter{specification for the left page in two-side layout}\%\\ + \Parameter{specification for the right page in two-side layout}\%\\ + \Parameter{specification for all pages in one-side laypout}\%\\ + (\PName{length of the line below},\PName{thickness of the line below})% + } +\end{quote} +The arguments in the round brackets are optional. That is, you can omit them +together with the brackets. In that case, the length and thickness of the +corresponding horizontal rules are based on the \KOMAScript{} options +\DescRef{scrlayer-scrpage.option.headtopline}, +\DescRef{scrlayer-scrpage.option.headsepline}, +\DescRef{scrlayer-scrpage.option.footsepline}, and +\DescRef{scrlayer-scrpage.option.footbotline} (see +\autoref{sec:scrlayer-scrpage.pagestyle.content}, +\DescPageRef{scrlayer-scrpage.option.headtopline}). + +All three arguments in curly brackets are mandatory and are used depending on +the page and the layout settings. Their content can be anything you want. For +page styles with running heads, however, you should use +\DescRef{scrlayer-scrpage.cmd.headmark}, +\DescRef{scrlayer-scrpage.cmd.leftmark}, or +\DescRef{scrlayer-scrpage.cmd.rightmark} inside the specification. Under no +circumstances should you directly put the number or text of a sectioning +command here. Because of the \LaTeX{}'s asynchronous page construction, the +wrong numbers or text can appear in the header or footer if you do so. + +The \Macro{defpagestyle} command defines the page style regardless of whether +it already exists or not. In contrast, \Macro{newpagestyle} throws an error if +a page style of the same \PName{name} already exists. On the other hand, +\Macro{providepagestyle} simply ignores the definition if the \PName{name} has +already been used for a page style. Conversely, \Macro{renewpagestyle} can +only redefine an existing page style. For a new \PName{name}, it throws an +error. + +All four commands are based on the +\DescRef{scrlayer.cmd.DeclarePageStyleByLayers}% +\IndexCmd{DeclarePageStyleByLayers} command of the +\hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer} package. +You can find the layers that are defined for a page style \PName{name} in +\autoref{tab:scrlayer-scrpage-experts.layersperstyle}, and more information +about layers and layer-page in \autoref{cha:scrlayer}, starting on +\autopageref{cha:scrlayer}.% + +\begin{table} +% \KOMAoptions{captions=topbeside} +% \setcapindent{0pt} +% \begin{captionbeside} + \caption + [{The layers \Package{scrlayer-scrpage} defines for a page style}] + {The layers \Package{scrlayer-scrpage} defines for a \PName{name} page + style\label{tab:scrlayer-scrpage-experts.layersperstyle}} +% [l] + \begin{tabular}{ll} + \toprule + Name of the layer & Meaning of the layer \\ + \midrule + \PName{name}\PValue{.head.above.line} + & horizontal line above the header\\ + \PName{name}\PValue{.head.odd} + & header of odd pages in two-sided printing\\ + \PName{name}\PValue{.head.even} + & header of even pages in two-sided printing\\ + \PName{name}\PValue{.head.oneside} + & header in one-sided printing\\ + \PName{name}\PValue{.head.below.line} + & horizontal line below the header\\ + \PName{name}\PValue{.foot.above.line} + & horizontal line above the footer\\ + \PName{name}\PValue{.foot.odd} + & footer of odd pages in two-sided printing\\ + \PName{name}\PValue{.foot.even} + & footer of even pages in two-sided printing\\ + \PName{name}\PValue{.foot.oneside} + & footer in one-sided printing\\ + \PName{name}\PValue{.foot.below.line} + & horizontal line below the footer\\ + \bottomrule + \end{tabular} +% \end{captionbeside} +\end{table} + +\begin{Example} + Suppose you want to set a background colour for the header of the + \PageStyle{scrheadings} page style. From the introduction to this chapter + and \autoref{tab:scrlayer-scrpage-experts.layersperstyle}, you know that + \PageStyle{scrheadings} is a layer page style that includes the layers + \PValue{scrheadings.head.even}, \PValue{scrheadings.head.odd}, and + \PValue{scrheadings.head.oneside}. You now define three more layers for + their backgrounds and add them at the beginning of the page style: +\begin{lstcode} + \documentclass{scrartcl} + \usepackage[automark]{scrlayer-scrpage} + \usepackage{xcolor} + \usepackage{blindtext} + \DeclareLayer[clone=scrheadings.head.oneside, + contents={% + \color{yellow}\rule[-\dp\strutbox]{\layerwidth}{\layerheight}% + }% + ]{scrheadings.head.oneside.background} + \DeclareLayer[clone=scrheadings.head.odd, + contents={% + \color{yellow}\rule[-\dp\strutbox]{\layerwidth}{\layerheight}% + }% + ]{scrheadings.head.odd.background} + \DeclareLayer[clone=scrheadings.head.even, + contents={% + \color{yellow}\rule[-\dp\strutbox]{\layerwidth}{\layerheight}% + }% + ]{scrheadings.head.even.background} + \AddLayersAtBeginOfPageStyle{scrheadings}{% + scrheadings.head.oneside.background,% + scrheadings.head.odd.background,% + scrheadings.head.even.background% + } + \pagestyle{scrheadings} + \begin{document} + \blinddocument + \end{document} +\end{lstcode} + As you can see, the example uses three layers so that the position and size + of the background layers could simply be copied from the corresponding + header layer using the \Option{clone} option. This is easier than using only + one background layer and dynamically calculating its position each time. + + The coloured background itself was created using a \Macro{rule} command. The + size arguments of this \Macro{rule} are given by + \DescRef{scrlayer.cmd.layerwidth} and \DescRef{scrlayer.cmd.layerheight} + which contain the current width and height of the layer itself. The optional + argument of \Macro{rule} is used to move the rule down by the height of a + descender. +\end{Example} +% +Instead of using new layers to colour the background in the example above, +\Macro{colorbox} and \DescRef{scrlayer-scrpage.cmd.chead} could have been +used. You can work out a solution using this method as an exercise. Likewise, +you could have added the background layers individually just before the +corresponding content layer. You can implement this as an exercise too.% +\EndIndexGroup + +\section{Defining Simple Page Styles with a Tripartite Header and Footer} +\seclabel{pagestyle.triple} + +\LoadNonFree{scrlayer-scrpage-experts}{1} + +\section{Legacy Features of \Package{scrpage2}} +\seclabel{obsolete} + +\begin{Explain} + The \Package{scrlayer-scrpage} package contains some legacy features that + derive from \Package{scrpage2} and exist only to be as compatible as possible + with that package. Users only need to understand these features if they want + to edit an old document based on \Package{scrpage2}. You\textnote{Attention!} + should not use the items documented here in new documents! +\end{Explain} + +\begin{Declaration} + \OptionVName{hmode}{simple switch} +\end{Declaration} +The \Package{scrpage2} package always outputs headers and footers in +horizontal mode. In contrast, \Package{scrlayer-scrpage} in the default +setting only switches into horizontal mode when horizontal material is output. +However, if you activate the \Option{hmode} option, \Package{scrlayer-scrpage} +will behave like \Package{scrpage2} and switch to horizontal mode before any +output. This can affect both the processing of white space at the beginning of +the output and vertical alignment. + +The options recognizes the standard values for simple switches listed in +\autoref{tab:truefalseswitch} on \autopageref{tab:truefalseswitch}. The option +is deactivated by default.% +\EndIndexGroup + +\LoadNonFree{scrlayer-scrpage-experts}{0} +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrlayer-scrpage.html b/macros/latex/contrib/koma-script/doc/scrlayer-scrpage.html index b386b493a2..f8468b8c78 100644 --- a/macros/latex/contrib/koma-script/doc/scrlayer-scrpage.html +++ b/macros/latex/contrib/koma-script/doc/scrlayer-scrpage.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrlayer-scrpage" /> + + - + - The KOMA-Script Documentation Wrapper + Headers and Footers with scrlayer-scrpage -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

Headers and Footers with scrlayer-scrpage

+

Kopf- und Fußzeilen mit scrlayer-scrpage

- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Kopf- und Fußzeilen mit scrlayer-scrpage in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrlayer.html b/macros/latex/contrib/koma-script/doc/scrlayer.html index b386b493a2..318e212638 100644 --- a/macros/latex/contrib/koma-script/doc/scrlayer.html +++ b/macros/latex/contrib/koma-script/doc/scrlayer.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrlayer" /> + + - + - The KOMA-Script Documentation Wrapper + Defining Layers and Page Styles with scrlayer -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

Defining Layers and Page Styles with scrlayer

+

Definition von Ebenen und Seitenstilen mit scrlayer

- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Definition von Ebenen und Seitenstilen mit scrlayer in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrletter.html b/macros/latex/contrib/koma-script/doc/scrletter.html index b386b493a2..4efa858900 100644 --- a/macros/latex/contrib/koma-script/doc/scrletter.html +++ b/macros/latex/contrib/koma-script/doc/scrletter.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrletter" /> + + - + - The KOMA-Script Documentation Wrapper + Letters with the scrlttr2 Class or the scrletter Package -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

Letters with the scrlttr2 Class or the scrletter Package

+

Briefe mit Klasse scrlttr2 oder Paket scrletter

- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Briefe mit Klasse scrlttr2 oder Paket scrletter in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrlfile-de.tex b/macros/latex/contrib/koma-script/doc/scrlfile-de.tex new file mode 100644 index 0000000000..6b161cdf07 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlfile-de.tex @@ -0,0 +1,749 @@ +% ====================================================================== +% scrlfile-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrlfile of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrlfile-de.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrlfile)] + +\chapter{Paketabhängigkeiten mit \Package{scrlfile} + beherrschen} +\labelbase{scrlfile} + +\BeginIndexGroup +\BeginIndex{Package}{scrlfile} + +Die Einführung von \LaTeXe{} brachte 1994 eine Menge Neuerungen im Umgang mit +\LaTeX-Erweiterungen. So stehen dem Paketautor heute eine ganze Reihe von +Befehlen zur Verfügung, um festzustellen, ob ein anderes Paket oder eine +bestimmte Klasse verwendet wird und ob dabei bestimmte Optionen zur Anwendung +kommen. Der Paketautor kann selbst andere Pakete laden oder diesen Optionen +mit auf den Weg geben für den Fall, dass sie später noch geladen werden. Es +bestand daher die Hoffnung, dass es künftig unerheblich wäre, in welcher +Reihenfolge Pakete geladen werden. Diese Hoffnung hat sich leider nicht +erfüllt. + +%\section{Die Sache mit den Paketabhängigkeiten} +%\seclabel{dependency} +%\begin{Explain} +Immer\textnote{Problem} häufiger definieren unterschiedliche Pakete den +gleichen Befehl neu oder um. Dabei ist es dann sehr entscheidend, in welcher +Reihenfolge die Pakete geladen werden. Manchmal ist das für den Anwender kaum +zu überschauen. Teilweise ist es auch notwendig, in irgendeiner Form auf das +Laden eines anderen Pakets zu reagieren. + +Nehmen\textnote{Beispiel} wir als einfaches Beispiel das Laden des +\Package{longtable}-Pakets bei Verwendung von \KOMAScript{}. Das +\Package{longtable}-Paket definiert seine eigene Form von +Tabellenüberschriften. Diese passen perfekt zu den Standardklassen. Sie passen +aber überhaupt nicht zu den Voreinstellungen für die Tabellenüberschriften von +\KOMAScript{} und reagieren auch nicht auf die entsprechenden Möglichkeiten +der Konfiguration. Um dieses Problem zu lösen, müssen die Befehle von +\Package{longtable}, die für die Tabellenüberschriften zuständig sind, von +\KOMAScript{} umdefiniert werden. Allerdings sind die \KOMAScript{}-Klassen +bereits abgearbeitet, wenn das Paket geladen wird. + +Ursprünglich\textnote{ursprünglicher Ansatz} bestand die einzige % +\iffalse% Umbruchkorrektur +Möglichkeit, dieses Problem zu lösen % +\else% +Lösungsmöglichkeit % +\fi% +darin, die Umdefinierung mit Hilfe von \Macro{AtBeginDocument} auf einen +späteren Zeitpunkt zu verschieben. Will der Anwender die entsprechende +Anweisung jedoch selbst umdefinieren, so sollte er dies eigentlich ebenfalls +in der Präambel tun. Das kann er jedoch nicht, weil \KOMAScript{} ihm dabei in +die Quere kommt. Er müsste die Umdefinierung also ebenfalls mit Hilfe von +\Macro{AtBeginDocument} durchführen. + +Aber\textnote{Potential} eigentlich müsste \KOMAScript{} die Abarbeitung gar +nicht auf den Zeitpunkt von \Macro{begin}\PParameter{document} verschieben. Es +würde genügen, wenn sie bis unmittelbar nach dem Laden von \Package{longtable} +verzögert werden könnte. Leider fehlen entsprechende Anweisungen im +\LaTeX-Kern. Das Paket \Package{scrlfile} bringt hier Abhilfe. + +Ebenso\textnote{weitere Anwendungen} wäre es denkbar, dass man vor dem Laden +eines bestimmten Pakets gerne die Bedeutung eines Makros in einem Hilfsmakro +retten und nach dem Laden des Pakets wieder restaurieren will. Auch das geht +mit \Package{scrlfile}. + +Die Anwendung von \Package{scrlfile} ist nicht auf die Abhängigkeit von +Paketen beschränkt. Auch Abhängigkeiten von anderen Dateien, die mit +\Macro{input} oder \Macro{InputIfFileExists} geladen werden, können +berücksichtigt werden.% +\iffalse% Stimmt so nur noch bedingt +So kann beispielsweise dafür gesorgt werden, dass das nicht unkritische Laden +einer Datei wie \File{french.ldf} automatisch zu einer Warnung führt.% +\fi + +Obwohl das Paket in erster Linie für andere Paketautoren interessant sein +dürfte, gibt es durchaus auch Anwendungen für normale \LaTeX-Benutzer. Deshalb +sind in diesem Kapitel auch für beide Gruppen Beispiele aufgeführt. +%\end{Explain} + +\begin{Declaration} + \Option{withdeprecated} +\end{Declaration} +Mit\ChangedAt{v3.32}{\Package{scrlfile}} \LaTeX{} 2020-10-01 steht ein +komplett neuer \emph{Hook}-Mechanismus zur Verfügung. Statt Makros des +\LaTeX-Kerns umzudefinieren, macht \Package{scrlfile} ab Version 3.32 davon +auch Gebrauch. Dazu lädt es das interne Paket +\Package{scrlfile-hook}\IndexPackage[indexmain]{scrlfile-hook}. Bei älteren +\LaTeX-Versionen wird dagegen je\ChangedAt{v3.35}{\Package{scrlfile}} + nach Kernel-Version das interne Paket +\Package{scrlfile-hook-3.34}\IndexPackage[indexmain]{scrlfile-hook-3.34} +beziehungsweise \Package{scrlfile-patcholdkernel}% +\IndexPackage[indexmain]{scrlfile-patcholdkernel} verwendet. Da mit dem neuen +Mechanismus in \LaTeX{} jedoch keine identische Funktionalität zu erreichen +war, wurden einige Anweisungen von \Package{scrlfile} als veraltet +markiert. Darüber hinaus wurde die Gelegenheit genutzt, den Wildwuchs an +Befehlsvarianten zu ordnen. Sollte ein Anwender eine Klasse oder Pakete +verwenden, die noch auf den dadurch nicht mehr unterstützten Befehlen +basieren, so kann vor \Package{scrlfile} vor dem Laden der Klasse mit +\begin{lstcode} + \RequirePackage[withdeprecated]{scrlfile} +\end{lstcode} +geladen werden. \Package{scrlfile} emuliert dann zusätzlich einige der +veralteten Befehle in einer Weise, die in den meisten Fällen ausreichend sein +sollte. In jedem Fall sollte jedoch der Autor der entsprechenden Klasse oder +des entsprechenden Pakets verständigt werden, damit dieser eine Anpassung an +die aktuelle Version von \Package{scrlfile} oder direkt an \LaTeX{} ab Version +2021-11-15 vornimmt.% +% +\EndIndexGroup + + +\section{Aktionen vor und nach dem Laden} +\seclabel{macros} + +Mit \Package{scrlfile} können vor und nach dem Laden von Dateien Aktionen +ausgelöst werden. Bei den dazu verwendeten Befehlen wird zwischen allgemeinen +Dateien, Klassen und Paketen unterschieden. + + +\begin{Declaration} + \Macro{BeforeFile}\Parameter{Datei}\OParameter{Label}\Parameter{Anweisungen} + \Macro{AfterFile}\Parameter{Datei}\OParameter{Label}\Parameter{Anweisungen} +\end{Declaration}% +Mit Hilfe von \Macro{BeforeFile} kann dafür gesorgt werden, dass die +\PName{Anweisungen} vor dem nächsten Laden einer bestimmten \PName{Datei} +ausgeführt werden. Vergleichbar arbeitet \Macro{AfterFile}. Nur werden die +\PName{Anweisungen} hier erst nach dem Laden der \PName{Datei} +ausgeführt. Wird die Datei nie geladen, so werden die \PName{Anweisungen} in +beiden Fällen natürlich auch nie ausgeführt. Bei \PName{Datei} sind etwaige +Dateiendungen wie bei \Macro{input} als Teil des Dateinamens anzugeben. + +Um die Funktionalität für \LaTeX{} vor Version 2020-10-01 bereitstellen zu +können, bedient sich \Package{scrlfile-patcholdlatex} der bekannten +\LaTeX-Anweisung \Macro{InputIfFileExists}. Diese\textnote{Achtung!} wird +hierzu umdefiniert. Falls die Anweisung nicht die erwartete Definition hat, +gibt \Package{scrlfile-patcholdlatex} eine Warnung aus. Dies geschieht für +den Fall, dass die Anweisung bereits von einem inkompatiblen Paket umdefiniert +wurde. + +Bei\ChangedAt{v3.32}{\Package{scrlfile}}\IndexCmd{AddToHook} \LaTeX{} ab +Version 2020-10-01 wird von \Package{scrlfile-hook} hingegen +\Macro{AddToHook}\PParameter{file/before/\PName{Datei}}\OParameter{Label}\Parameter{Anweisungen} +beziehungsweise +\Macro{AddToHook}\PParameter{file/after/\PName{Datei}}\OParameter{Label}\Parameter{Anweisungen} +verwendet. Näheres zur Bedeutung des optionalen Arguments \PName{Label} ist +der zugehörigen Anleitung zur \LaTeX-Kern-Anweisung \Macro{AddToHook} zu +entnehmen. Empfohlen wird in der Regel der Verzicht auf das optionale +Argument. Bei älteren \LaTeX-Versionen wird dieses ohnehin ignoriert. + +Die Anweisung \Macro{InputIfFileExists} wird von \LaTeX{} immer verwendet, +wenn eine Datei geladen werden soll. Dies geschieht unabhängig davon, ob die +Datei mit \Macro{LoadClass}, \Macro{documentclass}, \Macro{usepackage}, +\Macro{RequirePackage}, \Macro{include} oder vergleichbaren Anweisungen +geladen wird. Lediglich +% Umbruchkorrektur: listings korrigieren +\begin{lstcode} + \input foo +\end{lstcode} +lädt die Datei \texttt{foo} ohne Verwendung von \Macro{InputIfFileExists}. Sie +sollten daher stattdessen immer +% Umbruchkorrektur: listings korrigieren +\begin{lstcode} + \input{foo} +\end{lstcode} +verwenden. Beachten Sie die Klammern um den Dateinamen!% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{BeforeClass}\Parameter{Klasse}\OParameter{Label}\Parameter{Anweisungen} + \Macro{BeforePackage}\Parameter{Paket}\OParameter{Label}\Parameter{Anweisungen} +\end{Declaration}% +Diese beiden Befehle arbeiten vergleichbar zu +\DescRef{\LabelBase.cmd.BeforeFile} mit dem einen Unterschied, dass die +\PName{Klasse} beziehungsweise das \PName{Paket} mit seinem Namen und nicht +mit seinem Dateinamen angegeben wird. Die Endungen »\File{.cls}« und +»\File{.sty}« entfallen hier also. + +Es ist zu beachten\important{Achtung!}, dass hier von \Package{scrlfile-hook} +ebenfalls \PValue{file} und nicht \PValue{class} respektive \PValue{package} +für den Hook verwendet wird. Nur so ist sichergestellt, dass die Ausführung +der \PName{Anweisungen} bereits im Kontext der Klasse beziehungsweise des +Pakets erfolgt. Zur Bedeutung des optionalen Arguments \PName{label} sei +wiederum auf die Anleitung der \LaTeX-Kernanweisung +\Macro{AddToHook}\IndexCmd{AddToHook} verwiesen. Empfohlen wird in der Regel +der Verzicht auf das optionale Argument. Bei älteren \LaTeX-Versionen wird +dieses ohnehin ignoriert.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AfterClass}\Parameter{Klasse}\OParameter{Label}\Parameter{Anweisungen} + \Macro{AfterClass*}\Parameter{Klasse}\OParameter{Label}\Parameter{Anweisungen} + \Macro{AfterAtEndOfClass}\Parameter{Klasse}\OParameter{Label}\Parameter{Anweisungen} + \Macro{AfterAtEndOfClass*}\Parameter{Klasse}\OParameter{Label}\Parameter{Anweisungen} + \Macro{AfterPackage}\Parameter{Paket}\OParameter{Label}\Parameter{Anweisungen} + \Macro{AfterPackage*}\Parameter{Paket}\OParameter{Label}\Parameter{Anweisungen} + \Macro{AfterAtEndOfPackage}\Parameter{Paket}\OParameter{Label}\Parameter{Anweisungen} + \Macro{AfterAtEndOfPackage*}\Parameter{Paket}\OParameter{Label}\Parameter{Anweisungen} +\end{Declaration}% +Die\important[i]{\Macro{AfterClass}\\\Macro{AfterPackage}} Anweisungen +\Macro{AfterClass} und \Macro{AfterPackage} arbeiten weitgehend wie +\DescRef{\LabelBase.cmd.AfterFile}, mit dem winzigen Unterschied, dass die +\PName{Klasse} beziehungsweise das \PName{Paket} mit seinem Namen und nicht +mit seinem Dateinamen angegeben wird. Die Endungen »\File{.cls}« und +»\File{.sty}« entfallen hier also. + +Bei\important[i]{\Macro{AfterClass*}\\\Macro{AfterPackage*}} den +Sternvarianten \Macro{AfterClass*} und \Macro{AfterPackage*} gibt es eine +zusätzliche Funktionalität. Wurde oder wird die entsprechende Klasse oder das +entsprechende Paket bereits geladen, so werden die \PName{Anweisungen} nicht +nach dem nächsten Laden, sondern unmittelbar ausgeführt. + +Code,\ChangedAt{v3.09}{\Package{scrlfile}}% +\important[i]{\Macro{AfterAtEndOfClass}\\\Macro{AfterAtEndOfPackage}} +dessen Ausführung per \Macro{AtEndOfClass}\IndexCmd{AtEndOfClass} oder +\Macro{AtEndOfPackage}\IndexCmd{AtEndOfPackage} innerhalb der Klasse +respektive des Pakets verzögert wird, wird allerdings erst danach +ausgeführt. Mit \Macro{AfterAtEndOfClass} beziehungsweise +\Macro{AfterAtEndOfPackage} wird dagegen sichergestellt, dass +\PName{Anweisungen} erst nach solchem Code ausgeführt wird. + +Auch\ChangedAt{v3.32}{\Package{scrlfile}}% +\important[i]{\Macro{AfterAtEndOfClass*}\\\Macro{AfterAtEndOfPackage*}} +hierzu gibt es Sternvarianten, die dafür sorgen, dass \PName{Anweisungen} +sofort ausgeführt werden, falls die Klasse beziehungsweise das Paket bereits +vollständig geladen ist. Wird eine Klasse oder ein Paket gerade geladen, so +wird die Ausführung wie bei der Version ohne Stern verzögert. + +Es ist zu beachten, dass \Package{scrlfile-hook} für \Macro{AfterClass}, +\Macro{AfterPackage} und deren Sternvarianten einen \PValue{file/after}-Hook +verwendet. Dagegen setzen \Macro{AfterAtEndOfClass} und dessen Sternvariante +einen \PValue{class/after}-Hook und \Macro{AfterAtEndOfPackage} und dessen +Sternvariante entsprechend einen \PValue{package/after}-Hook. Zur Bedeutung +des optionalen Arguments \PName{label} sei wiederum auf die Anleitung der +\LaTeX-Kernanweisung \Macro{AddToHook}\IndexCmd{AddToHook} +verwiesen. Empfohlen wird in der Regel der Verzicht auf das optionale +Argument. Bei älteren \LaTeX-Versionen wird dieses ohnehin ignoriert. + +\begin{Example} + Als Beispiel für Paket- oder Klassenautoren will ich zunächst + erklären, wie \KOMAScript{} selbst Gebrauch von den neuen + Anweisungen macht. Dazu findet sich beispielsweise in \Class{scrbook} + Folgendes: +\begin{lstcode} + \AfterPackage{hyperref}{% + \@ifpackagelater{hyperref}{2001/02/19}{}{% + \ClassWarningNoLine{scrbook}{% + You are using an old version of the hyperref + package!\MessageBreak% + This version has a buggy hack in many + drivers,\MessageBreak% + causing \string\addchap\space to behave + strangely.\MessageBreak% + Please update hyperref to at least version + 6.71b}% + }% + } +\end{lstcode} + Alte Versionen von \Package{hyperref} definierten ein Makro von + \Class{scrbook} in einer Weise um, die mit neueren Versionen + von \KOMAScript{} nicht mehr funktioniert. Neuere Versionen von + \Package{hyperref} unterlassen dies, wenn sie eine neuere Version + von \KOMAScript{} erkennen. Für den Fall, dass \Package{hyperref} + zu einem späteren Zeitpunkt geladen wird, sorgt also \Class{scrbook} + dafür, dass unmittelbar nach dem Laden des Pakets überprüft wird, ob + es sich um eine verträgliche Version handelt. Falls dies nicht der + Fall ist, wird eine Warnung ausgegeben. + + An anderer Stelle findet sich in drei der \KOMAScript-Klassen folgendes: +\begin{lstcode} + \AfterPackage{caption2}{% + \renewcommand*{\setcapindent}{% +\end{lstcode}% }} + Nach dem Laden von \Package{caption2} und nur falls das Paket + geladen wird, wird hier die \KOMAScript{} eigene Anweisung + \DescRef{maincls.cmd.setcapindent} umdefiniert. Der Inhalt der Umdefinierung + ist für dieses Beispiel unerheblich. Es sei nur erwähnt, dass + \Package{caption2} die Kontrolle über die + \DescRef{maincls.cmd.caption}-Anweisung übernimmt und daher die normale + Definition von \DescRef{maincls.cmd.setcapindent} keinerlei Wirkung mehr + hätte. Die Umdefinierung verbessert dann die Zusammenarbeit mit dem + veralteten \Package{caption2}. + + Es gibt aber auch Beispiele für den sinnvollen Einsatz der neuen + Anweisungen durch normale Anwender. Angenommen, Sie erstellen ein + Dokument, aus dem sowohl eine PS-Datei mit \LaTeX{} und dvips als auch + eine PDF-Datei mit \mbox{pdf\LaTeX} erstellt werden soll. Das Dokument soll + außerdem Hyperlinks aufweisen. Im Tabellenverzeichnis haben Sie + Einträge, die über mehrere Zeilen gehen. Nun gibt es zwar mit + \mbox{pdf\LaTeX} bei der PDF-Ausgabe keine Probleme, da dort Links + umbrochen werden können. Bei Verwendung des + \Package{hyperref}-Treibers für dvips oder + \mbox{hyper\TeX} ist dies jedoch nicht + möglich. In diesem Fall hätten Sie gerne, dass bei + \Package{hyperref} die Einstellung \Option{linktocpage} verwendet + wird. Die Entscheidung, welcher Treiber geladen wird, wird von + \Package{hyperref} automatisch getroffen. + + Alles weitere kann nun \DescRef{\LabelBase.cmd.AfterFile} überlassen werden: +\begin{lstcode}[moretexcs={hypersetup}] + \documentclass{article} + \usepackage[ngerman]{babel} + \usepackage{scrlfile} + \AfterFile{hdvips.def}{\hypersetup{linktocpage}} + \AfterFile{hypertex.def}{\hypersetup{linktocpage}} + \usepackage{hyperref} + \begin{document} + \listoffigures + \clearpage + \begin{figure} + \caption{Dies ist ein Beispiel mit einer + Abbildungsunterschrift, die mehrere Zeile + umfasst und bei der trotzdem auf die + Verwendung des optionalen Arguments verzichtet + wurde.} + \end{figure} + \end{document} +\end{lstcode} + Egal, ob nun der \Package{hyperref}-Treiber \Option{hypertex} oder + \Option{dvips} zur Anwendung kommt, wird die dann nützliche Einstellung + \Option{linktocpage} verwendet. Wenn Sie jedoch mit \mbox{pdf\LaTeX} eine + PDF-Datei erstellen, wird darauf verzichtet, da dann der + \Package{hyperref}-Treiber \File{hpdftex.def} verwendet wird. Das bedeutet, + dass weder die Treiberdatei \File{hdvips.def} noch \File{hypertex.def} + geladen wird. +\end{Example} +\iffalse% Umbruchkorrekturtext (der besser nicht mehr verwendet wird!) +Übrigens\textnote{Tipp!} können Sie das Laden von \Package{scrlfile} und die +obigen Anweisungen \DescRef{\LabelBase.cmd.AfterFile} auch in Ihre private +\File{hyperref.cfg} (siehe oben) einfügen. Verwenden Sie dabei jedoch zum +Laden des Pakets besser \Macro{RequirePackage} anstelle von +\Macro{usepackage} (siehe \cite{latex:clsguide}). Die neuen Zeilen müssen in +obigem Beispiel unmittelbar nach der \Macro{ProvidesFile}-Zeile, also +unbedingt vor der Ausführung der Optionen \Option{dvips} oder \Option{pdftex}, +eingefügt werden.% +\fi% +Übrigens\textnote{Tipp!} kann \Package{scrlfile} auch bereits vor +\DescRef{maincls.cmd.documentclass}\IndexCmd{documentclass} geladen werden. In +diesem Fall ist allerdings \Macro{RequirePackage}\IndexCmd{RequirePackage} +anstelle von \DescRef{maincls.cmd.usepackage} zu verwenden (siehe +\cite{latex:clsguide}).% +\EndIndexGroup + + +\begin{Declaration} + \Macro{BeforeClosingMainAux}\Parameter{Anweisungen} + \Macro{AfterReadingMainAux}\Parameter{Anweisungen} +\end{Declaration} +\iffalse% Umbruchkorrektur +Diese Anweisungen unterscheiden sich in einem Detail von den zuvor erklärten +Anweisungen. Jene ermöglichen Aktionen vor und nach dem Laden von Dateien. Das +ist hier nicht der Fall. % +\fi% +Paketautoren haben des Öfteren das Problem, dass sie Anweisungen in die +\File{aux}-Datei schreiben wollen, nachdem die letzte Seite des Dokuments +ausgegeben wurde. Dazu wird -- in Unkenntnis der dadurch verursachten Probleme +-- häufig Code wie der folgende eingesetzt: +\begin{lstcode}[escapechar=\$] + \AtEndDocument{%$\textnote{Nicht nachmachen!}$ + \if@filesw + \write\@auxout{\protect\writethistoaux}% + \fi + } +\end{lstcode} +Dies ist jedoch keine wirkliche Lösung. Wurde die letzte +Seite vor \Macro{end}\PParameter{document} bereits ausgegeben, so führt obiges +zu keiner Ausgabe in die \File{aux}-Datei. Würde man zur Lösung dieses +Problems nun ein \Macro{immediate} vor \Macro{write} setzen, so hätte man das +umgekehrte Problem: wurde die letzte Seite bei +\Macro{end}\PParameter{document} noch nicht ausgegeben, so wird +\Macro{writethistoaux} zu früh in die \File{aux}-Datei geschrieben. Man sieht +daher häufig auch Lösungsversuche wie: +\begin{lstcode}[escapechar=\$] + \AtEndDocument{%$\textnote{Nicht nachmachen!}$ + \if@filesw + \clearpage + \immediate\write\@auxout{\protect\writethistoaux}% + \fi + } +\end{lstcode} +Diese Lösung hat jedoch den Nachteil, dass damit die Ausgabe der letzten Seite +erzwungen wird. Eine Anweisung wie +\begin{lstcode} + \AtEndDocument{% + \par + \vspace*{\fill}% + Hinweis am Ende des Dokuments. + \par + } +\end{lstcode} +führt dann nicht mehr dazu, dass der Hinweis am Ende der letzten Seite des +Dokuments ausgegeben wird, sie würde stattdessen am Ende der nächsten Seite +ausgegeben. Gleichzeitig würde \Macro{writethistoaux} wieder eine Seite zu +früh in die \File{aux}-Datei geschrieben. + +Die beste Lösung des Problems wäre nun, wenn man unmittelbar in die +\File{aux}-Datei schreiben könnte, nachdem das finale +\DescRef{maincls.cmd.clearpage} innerhalb von \Macro{end}\PParameter{document} +ausgeführt, aber bevor die \File{aux}-Datei geschlossen wird. Dies ist das +Ziel von \Macro{BeforeClosingMainAux}: +\begin{lstcode} + \BeforeClosingMainAux{% + \if@filesw + \immediate\write\@auxout{\protect\writethistoaux}% + \fi + } +\end{lstcode} +Das ist auch dann erfolgreich, wenn das finale \DescRef{maincls.cmd.clearpage} +innerhalb von \Macro{end}\PParameter{document} tatsächlich zu keiner Ausgabe +einer Seite mehr führt oder wenn -- sei es korrekt verwendet oder in +Unkenntnis der oben erläuterten Probleme -- \DescRef{maincls.cmd.clearpage} +innerhalb einer \Macro{AtEndDocument}-Anweisung zum Einsatz kam. + +Es gibt jedoch für \Macro{BeforeClosingMainAux} eine Einschränkung: Im +Argument \PName{Anweisungen} sollte keine Satzanweisung verwendet +werden. Es darf also mit \Macro{BeforeClosingMainAux} kein zusätzliches +Material gesetzt werden! Wird diese Einschränkung nicht beachtet, so ist das +Ergebnis ebenso unvorhersehbar wie bei den gezeigten Problemen mit +\Macro{AtEndDocument}. + +Die Anweisung \Macro{AfterReadingMainAux}\ChangedAt{v3.03}{\Package{scrlfile}} +führt sogar \PName{Anweisungen} nach dem Schließen und Einlesen der +\File{aux}-Datei innerhalb von \Macro{end}\PParameter{document} aus. Dies ist +nur in einigen wenigen, sehr seltenen Fällen sinnvoll, beispielsweise, wenn +man statistische Informationen in die \File{log}-Datei schreiben will, die +erst nach dem Einlesen der \File{aux}-Datei gültig sind, oder zur +Implementierung zusätzlicher +\mbox{\emph{Rerun}}-\mbox{Auf"|forderungen}. Satzanweisungen sind an dieser +Stelle noch kritischer zu betrachten als bei \Macro{BeforeClosingMainAux}.% +% +\EndIndexGroup + + +\section{Dateien beim Einlesen ersetzen} +\seclabel{replace} + +In den bisherigen Abschnitten wurden Anweisungen erklärt, mit denen es möglich +ist, vor oder nach dem Einlesen einer bestimmten Datei, eines bestimmten +Pakets oder einer Klasse Aktionen auszuführen. Es ist mit \Package{scrlfile} +aber auch möglich, eine ganz andere Datei als die angeforderte einzulesen. + +\begin{Declaration}[0] + \Macro{ReplaceInput}\Parameter{Dateiname}\Parameter{Ersatzdatei} +\end{Declaration} +Mit\ChangedAt{v2.96}{\Package{scrlfile}} dieser Anweisung wird eine Ersetzung +der Datei mit dem als erstes angegebenen \PName{Dateiname} definiert. Wenn +\LaTeX{} anschließend angewiesen wird, diese Datei zu laden, wird stattdessen +\PName{Ersatzdatei} geladen. Die Definition der Ersatzdatei wirkt sich auf +alle Dateien aus, die vom Anwender oder intern von \LaTeX{} mit Hilfe von +\Macro{InputIfFileExists} geladen werden. + +Bei\ChangedAt{v3.32}{\Package{scrlfile}} Verwendung eines \LaTeX-Version bis +2020-04-01 muss dass Paket \Package{scrlfile-patcholdlatex} dazu die Anweisung +\Macro{InputIfFileExists} umdefinieren. Bei Verwendung von \LaTeX{} ab Version +2020-10-01 wird hingegen von \Package{scrlfile-hook} die interne +\LaTeX-Anweisung \Macro{declare@file@substitution} verwendet. Das +\LaTeX{}-Team bittet darum, eine derartige Dateiersetzung nur vorzunehmen, +wenn es keine andere Möglichkeit gibt, zu dem gewünschten Ergebnis zu +gelangen, beispielsweise wenn eine solche Ersetzung zum Erhalt der +Kompatibilität unabdingbar ist und dabei die \PName{Ersatzdatei} die gleiche +Funktionalität bereitstellt. + +\begin{Example} + Sie wollen, dass anstelle der Datei \File{\Macro{jobname}.lot}, die Datei + \File{\Macro{jobname}.tol} geladen wird. Dazu verwenden Sie: +\begin{lstcode} + \ReplaceInput{\jobname.lot}{\jobname.tol} +\end{lstcode} + Wenn Sie nun zusätzlich \File{\Macro{jobname}.tol} auch noch durch + \File{\Macro{jobname}.tlo} ersetzen: +\begin{lstcode} + \ReplaceInput{\jobname.tol}{\jobname.tlo} +\end{lstcode} + dann wird \File{\Macro{jobname}.lot} am Ende durch + \File{\Macro{jobname}.tlo} ersetzt. Es wird also die komplette + Ersetzungskette abgearbeitet. + + Einer Ersetzung im Kreis: +\begin{lstcode} + \ReplaceInput{\jobname.lot}{\jobname.tol} + \ReplaceInput{\jobname.tol}{\jobname.lot} +\end{lstcode} + würde jedoch zu einem Fehler führen. Es ist also nicht möglich, eine einmal + ersetzte Datei wieder durch ihren Ursprung zu ersetzen. +\end{Example} + +Theoretisch wäre es auch möglich, auf diesem Wege ein Paket durch ein anderes +oder eine Klasse durch eine andere zu ersetzen. Es wird jedoch empfohlen, für +das Ersetzen eines Pakets oder einer Klasse die nachfolgenden Anweisungen zu +verwenden. Bei älteren \LaTeX-Versionen ist dies sogar zwingend.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{ReplaceClass}\Parameter{Klasse}\Parameter{Ersatzklasse} + \Macro{ReplacePackage}\Parameter{Paket}\Parameter{Ersatzpaket} +\end{Declaration} +Eine\ChangedAt{v2.96}{\Package{scrlfile}}\textnote{Achtung!} Klasse oder ein +Paket sollte niemals mit Hilfe der oben erklärten Anweisung +\DescRef{\LabelBase.cmd.ReplaceInput} ersetzt werden. Stattdessen sollte für +Paketersetzungen \Macro{ReplacePackage} und für Klassenersetzungen +\Macro{ReplaceClass} verwendet werden. Es ist zu beachten, dass wie bei +\Macro{documentclass} und \Macro{usepackage} der Name der Klasse oder des +Pakets und nicht deren kompletter Dateiname anzugeben ist. + +Die Ersetzung funktioniert für Klassen, die mit \Macro{documentclass}, +\Macro{LoadClassWithOptions} oder \Macro{LoadClass} geladen werden. Für Pakete +funktioniert die Ersetzung beim Laden mit \Macro{usepackage}, +\Macro{RequirePackageWithOptions} und \Macro{RequirePackage}. + +Es\textnote{Achtung!} ist zu beachten, dass die \PName{Ersatzklasse} oder das +\PName{Ersatzpaket} mit denselben Optionen geladen wird, mit denen die +ursprünglich geforderte Klasse oder das ursprünglich geforderte Paket geladen +würden. Wird ein Paket oder eine Klasse durch ein Paket oder eine Klasse +ersetzt, die eine geforderte Option nicht unterstützt, würde das zu den +üblichen Warnungen und Fehlern führen. + +Damit Klassen mit \Macro{ReplaceClass} ersetzt werden können, ist es natürlich +erforderlich \Package{scrlfile} vor der Klasse zu laden. Dazu ist +\Macro{RequirePackage}\IndexCmd{RequirePackage} anstelle von +\DescRef{maincls.cmd.usepackage} zu verwenden (siehe \cite{latex:clsguide}). + +Bei\ChangedAt{v3.32}{\Package{scrlfile}} Verwendung eines \LaTeX-Version bis +2020-04-01 muss dass Paket \Package{scrlfile-patcholdlatex} die internen +Anweisung \Macro{@onefilewithoptions} und \Macro{@loadwithoptions} +umdefinieren. Bei Verwendung von \LaTeX{} ab Version 2020-10-01 wird hingegen +von \Package{scrlfile-hook} die interne \LaTeX-Anweisung +\Macro{declare@file@substitution} verwendet. Das \LaTeX{}-Team bittet darum, +eine derartige Ersetzung nur vorzunehmen, wenn es keine andere Möglichkeit +gibt, zu dem gewünschten Ergebnis zu gelangen, beispielsweise wenn eine solche +Ersetzung zum Erhalt der Kompatibilität unabdingbar ist und dabei die +\PName{Ersatzpaket} beziehungsweise \PName{Ersatzklasse} die gleiche +Funktionalität bereitstellt.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{UnReplaceInput}\Parameter{Datei} + \Macro{UnReplacePackage}\Parameter{Paket} + \Macro{UnReplaceClass}\Parameter{Klasse} +\end{Declaration} +Eine\ChangedAt{v3.12}{\Package{scrlfile}} Ersetzung kann auch wieder +aufgehoben werden. Dabei sollten Ersetzungen von Dateien immer mit +\Macro{UnReplaceInput}, Ersetzungen von Paketen mit \Macro{UnReplacePackage} +und Ersetzungen von Klassen mit \Macro{UnReplaceClass} aufgehoben werden. Nach +der Aufhebung der Ersetzung führen Ladebefehle für die entsprechende +\PName{Datei}, das entsprechende \PName{Paket} oder die entsprechende +\PName{Klasse} dann wieder dazu, dass die \PName{Datei}, das \PName{Paket} +oder die \PName{Klasse} selbst anstelle der Ersatzdatei, des Ersatzpakets oder +der Ersatzklasse geladen wird.% +\EndIndexGroup + + +\section{Dateien gar nicht erst einlesen} +\seclabel{prevent} + +Gerade\ChangedAt{v3.08}{\Package{scrlfile}} in Klassen und Paketen, die +innerhalb von Firmen oder Instituten verwendet werden, findet man häufig, dass +sehr viele Pakete nur deshalb geladen werden, weil die Anwender diese Pakete +oft verwenden. Wenn es dann mit einem dieser automatisch geladenen Pakete zu +einem Problem kommt, muss man irgendwie das Laden des problematischen Pakets +verhindern. Auch hier bietet \Package{scrlfile} eine einfache Lösung. + +\begin{Declaration} + \Macro{PreventPackageFromLoading}\OParameter{Stattdessencode} + \Parameter{Paketliste} + \Macro{PreventPackageFromLoading*}\OParameter{Stattdessencode} + \Parameter{Paketliste} +\end{Declaration} +Wird diese Anweisung\ChangedAt{v3.08}{\Package{scrlfile}} vor dem +Laden eines Pakets mit \Macro{usepackage}\IndexCmd{usepackage}, +\Macro{RequirePackage}\IndexCmd{RequirePackage} oder +\Macro{RequirePackageWithOptions}\IndexCmd{RequirePackageWithOptions} +aufgerufen, so wird das Laden des Pakets effektiv verhindert, falls es in +der \PName{Paketliste} zu finden ist. +% +\begin{Example} + Angenommen, Sie arbeiten in einer Firma, in der alle Dokumente mit + Latin~Modern erzeugt werden. In der Firmenklasse, \Class{firmenci}, befinden + sich daher die Zeilen: +\begin{lstcode} + \RequirePackage[T1]{fontenc} + \RequirePackage{lmodern} +\end{lstcode} + Nun wollen Sie zum ersten Mal ein Dokument mit + X\kern-.125em\lower.5ex\hbox{\reflectbox{E}}\LaTeX{} oder Lua\LaTeX{} + setzen. Da beim hierbei empfohlenen Paket \Package{fontspec} ohnehin + Latin-Modern voreingestellt ist und das Laden von \Package{fontenc} eher + störend wäre, wollen Sie das Laden beider Pakete verhindern. Sie laden die + Klasse deshalb nun in Ihrem eigenen Dokument wie folgt: +\begin{lstcode} + \RequirePackage{scrlfile} + \PreventPackageFromLoading{fontenc,lmodern} + \documentclass{firmenci} +\end{lstcode} +\end{Example} +Wie im Beispiel zu sehen ist, kann man das Paket \Package{scrlfile} auch +bereits vor der Klasse laden. In diesem Fall muss das Laden dann aber mit +Hilfe von \Macro{RequirePackage}\IndexCmd{RequirePackage} erfolgen, da +\Macro{usepackage} vor \Macro{documentclass} verboten ist (siehe +\cite{latex:clsguide}). + +Wird eine leere \PName{Paketliste} angegeben oder wird ein Paket angegeben, +das bereits geladen ist, gibt \Macro{PreventPackageFromLoading} eine +Warnung aus, während +\Macro{PreventPackageFromLoading*}\ChangedAt{v3.12}{\Package{scrlfile}} +lediglich einen entsprechenden Hinweis in die Log-Datei schreibt. + +Das optionale Argument\ChangedAt{v3.12}{\Package{scrlfile}} kann verwendet +werden, wenn anstelle des Ladens des Pakets etwas anderes getan werden +soll. Innerhalb des \PName{Stattdessencode}s dürfen jedoch keine anderen +Pakete und keine Dateien geladen werden. Zum Laden eines anderen Pakets siehe +\DescRef{\LabelBase.cmd.ReplacePackage} in \autoref{sec:scrlfile.replace} auf +\DescPageRef{\LabelBase.cmd.ReplacePackage}. Beachten\textnote{Achtung!} Sie +bitte auch, dass der \PName{Stattdessencode} mehrfach ausgeführt wird, falls +Sie versuchen, das Paket mehrfach zu laden!% +\EndIndexGroup + + +\begin{Declaration} + \Macro{StorePreventPackageFromLoading}\Parameter{\textMacro{Anweisung}} + \Macro{ResetPreventPackageFromLoading} +\end{Declaration} +\Macro{Anweisung} wird mit +\Macro{StorePreventPackageFromLoading}\ChangedAt{v3.08}{\Package{scrlfile}} +als die aktuelle Liste der Pakete definiert, für die das Laden verhindert +werden soll. Dagegen setzt +\Macro{ResetPreventPackageFromLoading}\ChangedAt{v3.08}{\Package{scrlfile}} +die Liste der Pakete, für die das Laden verhindert werden soll, zurück. Danach +können wieder alle Pakete geladen werden. +\begin{Example} + Angenommen, Sie sind innerhalb eines Pakets unbedingt auf das Laden eines + anderen Pakets angewiesen und wollen nicht, dass der Anwender das Laden + dieses Pakets mit + \DescRef{\LabelBase.cmd.PreventPackageFromLoading}% + \IndexCmd{PreventPackageFromLoading} + verhindern kann. Also setzen Sie die Paketliste für die Ausnahmen zuvor + zurück: +\begin{lstcode} + \ResetPreventPackageFromLoading + \RequirePackage{foo} +\end{lstcode} + Allerdings hat dies den Nachteil, dass ab diesem Zeitpunkt die komplette + Ausnahmeliste des Anwenders verloren ist. Also speichern Sie die Liste + zunächst zwischen und reaktivieren sie später wieder: +\begin{lstcode} + \newcommand*{\Users@PreventList}{}% + \StorePreventPackageFromLoading\Users@PreventList + \ResetPreventPackageFromLoading + \RequirePackage{foo} + \PreventPackageFromLoading{\Users@PreventList} +\end{lstcode} + Es ist zu beachten, dass\textnote{Achtung!} \Macro{Users@PreventList} durch + die Anweisung \Macro{StorePreventPackageFromLoading} auch definiert + werden würde, wenn diese bereits anderweitig definiert wäre. Eine vorhandene + Definition würde also ohne Rücksicht überschrieben werden. In diesem + Beispiel wurde deshalb mit einem vorherigen \Macro{newcommand*} + sichergestellt, dass in dem Fall zur Sicherheit eine Fehlermeldung + ausgegeben wird. +\end{Example} +An dieser Stelle sei darauf hingewiesen, dass Sie bei Manipulationen an der mit +\Macro{StorePreventPackageFromLoading} zwischengespeicherten Liste selbst die +Verantwortung für eine korrekte Wiederherstellbarkeit tragen. So muss die +Liste unbedingt mit Komma separiert sein, sollte keine Leerzeichen oder +Gruppenklammern enthalten und muss voll expandierbar sein.% + +Beachten\textnote{Achtung!} Sie bitte, dass +\Macro{ResetPreventPackageFromLoading} den \PName{Stattdessencode} für ein +Paket nicht löscht, sondern nur vorübergehend dessen Ausführung nicht mehr +erfolgt.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{UnPreventPackageFromLoading}\Parameter{Paketliste} + \Macro{UnPreventPackageFromLoading*}\Parameter{Paketliste} +\end{Declaration} +Statt\ChangedAt{v3.12}{\Package{scrlfile}} die Liste der Pakete, für die das +Laden verhindert werden soll, komplett zurückzusetzen, kann man auch +einzelne oder mehrere Pakete gezielt von dieser Liste entfernen. Die +Sternvariante des Befehls löscht außerdem den \PName{Stattdessencode}, der für +das Paket gespeichert ist. Falls die Verhinderungsliste beispielsweise aus +einer gespeicherten Liste wiederhergestellt wird, wird dann der +\PName{Stattdessencode} trotzdem nicht mehr ausgeführt.% +% +\begin{Example} + Angenommen, Sie wollen zwar verhindern, dass ein Paket \Package{foo} + geladen wird, wollen aber nicht, dass ein eventuell bereits gespeicherter + \PName{Stattdessencode} ausgeführt wird. Stattdessen soll nur Ihr neuer + \PName{Stattdessencode} ausgeführt werden. Dies ist wie folgt möglich: +\begin{lstcode} + \UnPreventPackageFromLoading*{foo} + \PreventPackageFromLoading[% + \typeout{Stattdessencode}% + ]{foo} +\end{lstcode} + Für die Anweisung \Macro{UnPreventPackageFromLoading*} ist es unerheblich, + ob das Paket zuvor überhaupt vom Laden ausgenommen war. + + Natürlich können Sie die Anweisung indirekt auch nutzen, um den + \PName{Stattdessencode} aller Pakete zu löschen: +\begin{lstcode} + \StorePreventPackageFromLoading\TheWholePreventList + \UnPreventPackageFromLoading*{\TheWholePreventList} + \PreventPackageFromLoading{\TheWholePreventList} +\end{lstcode} + Die Pakete werden dann zwar noch immer nicht geladen, ihr + \PName{Stattdessencode} existiert aber nicht mehr und wird nicht mehr + ausgeführt.% +\end{Example}% +\EndIndexGroup +%\ExampleEndFix % Am Ende des Kapitels nicht ausführen +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrlfile-en.tex b/macros/latex/contrib/koma-script/doc/scrlfile-en.tex new file mode 100644 index 0000000000..ece18e8881 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlfile-en.tex @@ -0,0 +1,678 @@ +% ====================================================================== +% scrlfile-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrlfile of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrlfile-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrlfile)] +\translator{Gernot Hassenpflug\and Markus Kohm\and Karl Hagen} + +\chapter{Controlling Package Dependencies with \Package{scrlfile}} +\labelbase{scrlfile} +\BeginIndexGroup +\BeginIndex{Package}{scrlfile} + +The introduction of \LaTeXe{} in 1994 brought many changes in the handling of +\LaTeX{} extensions. The package author today has a whole series of macros +available to determine if another package or class has been loaded and whether +specific options are being used. The package author can even load other +packages or specify certain options in case the package is loaded later. This +has led to the expectation that the order in which package are loaded would +not be important. Sadly, this hope has not been fulfilled. + +\section{About Package Dependencies} +\seclabel{dependency} +%\begin{Explain} +More and more often, different packages either newly define or redefine the +same macro. In such a case, the order in which a package is loaded becomes +very important. Sometimes, users find it very difficult to understand the +resulting behaviour. Sometimes it is necessary to react in a specific way when +another package is loaded. + +As a simple example, consider loading the \Package{longtable} package with a +\KOMAScript{} document class. The \Package{longtable} package defines its own +table captions. These are perfectly suited to the standard classes, but they +do not match the default settings for \KOMAScript{} captions, nor do they +react to the relevant configuration options. To solve this problem, the +\Package{longtable} package commands which are responsible for the table +captions need to be redefined. However, by the time the \Package{longtable} +package is loaded, the \KOMAScript{} class has already been processed. + +Previously, the only way to solve this problem was to delay the redefinition +until the beginning of the document using \Macro{AtBeginDocument}. However, if +users want to change the relevant commands themselves, they should do so in +the preamble of the document. But this is impossible because \KOMAScript{} +will overwrite the users' definitions at \Macro{begin}\PParameter{document}. +They would also need to perform the redefinition with \Macro{AtBeginDocument}. + +But \KOMAScript{} does not actually need to wait for +\Macro{begin}\PParameter{document} to redefine the macros. It would be +sufficient to postpone the redefinition until after the \Package{longtable} +package has been loaded. Unfortunately, the \LaTeX{} kernel does not define +necessary commands. The \Package{scrlfile} package provides a remedy for this +problem. + +It is also conceivable that you would like to save the definition of a macro +in a temporary macro before a package is loaded and restore it after the +package has been loaded. The \Package{scrlfile} package allows this, too. + +The use of \Package{scrlfile} is not limited to package dependencies. +Dependencies can also be considered for any other file. For example, you can +ensure that loading the not unimportant file \File{french.ldf} automatically +leads to a warning. + +Although the package is particularly of interest for package authors, there +are also applications for normal \LaTeX{} users. Therefore, this chapter +gives examples for both groups. +%\end{Explain} + +\begin{Declaration} + \Option{withdeprecated} +\end{Declaration} +With\ChangedAt{v3.32}{\Package{scrlfile}} \LaTeX{} 2020-10-01 a completely new +hook mechanism is available. Instead of redefining macros of the \LaTeX{} +kernel, \Package{scrlfile} 3.32 and newer makes use of it. For this purpose it +loads the internal package +\Package{scrfile-hook}\IndexPackage[indexmain]{scrlfile-hook}. With older +\LaTeX{} versions, depending\ChangedAt{v3.35}{\Package{scrlfile}} on the +kernel version, either the internal package +\Package{scrlayer-hook-3.34}\IndexPackage[indexmain]{scrlfile-hook-3.34} or +\Package{scrlayer-patcholdkernel}% +\IndexPackage[indexmain]{scrlfile-patcholdkernel} is used. However, since it +was not possible to achieve identical functionality with the new mechanism in +\LaTeX, some commands of \Package{scrlfile} were marked as +deprecated. Furthermore, the opportunity was taken to organize the +proliferation of command variants. If a user uses a class or package that is +still based on the commands that are no longer supported by +\Package{scrlfile}, the package \Package{scrlfile} can be loaded with +\begin{lstcode} + \RequirePackage[withdeprecated]{scrlfile} +\end{lstcode} +before loading the class. \Package{scrlfile} then additionally emulates some +of the deprecated commands in a way that should be sufficient in most +cases. In any case, the author of the corresponding class or package should be +informed, so that he or she can make an adaptation to the current version of +\Package{scrlfile} or directly to \LaTeX{} from version 2021-11-15.% +% +\EndIndexGroup + +\section{Actions Before and After Loading} +\seclabel{macros} + +The \Package{scrlfile} package can execute actions both before and after +loading files. The commands used to do so distinguish between ordinary files, +classes, and packages. + +\begin{Declaration} + \Macro{BeforeFile}\Parameter{file}\OParameter{label}\Parameter{commands}% + \Macro{AfterFile}\Parameter{file}\OParameter{label}\Parameter{commands} +\end{Declaration}% +\Macro{BeforeFile} ensures that the \PName{commands} are executed before the +next time \PName{file} is loaded. \Macro{AfterFile} works in a similar +fashion, and the \PName{commands} will be executed after the \PName{file} has +been loaded. Of course, if \PName{file} is never loaded, the \PName{commands} +will never be executed. For \PName{file}, you should specify any extensions as +part of the file name, as you would with \Macro{input}. + +To implement those featuresfor \LaTeX{} before version 2020-10-01, +\Package{scrlfile-patcholdlatex} redefines the well-known \LaTeX{} command +\Macro{InputIfFileExists}. If this command does not have the expected +definition, \Package{scrlfile-patcholdlatex} issues a warning. This occurs in +case the command has already been redefined by an incompatible package. + +With\ChangedAt{v3.32}{\Package{scrlfile}}\IndexCmd{AddToHook} \LaTeX{} from +version 2020-10-01 on, \Package{scrlfile-hook} uses +\Macro{AddToHook}\PParameter{file/before/\PName{file}}\OParameter{label}\Parameter{commands} +or +\Macro{AddToHook}\PParameter{file/after/\PName{file}}\OParameter{label}\Parameter{commands}. +For more information on the meaning of the optional argument \PName{label}, +please refer to the corresponding manual of the \LaTeX{} core statement +\Macro{AddToHook}. As a rule, the omission of the optional argument is +recommended. With older \LaTeX{} versions this is ignored anyway. + +\LaTeX{} uses the \Macro{InputIfFileExists} command every time it loads a +file. This occurs regardless of whether the file is loaded with +\Macro{include}, \Macro{LoadClass}, \Macro{documentclass}, \Macro{usepackage}, +\Macro{RequirePackage}, or similar commands. Only +\begin{lstcode} + \input foo +\end{lstcode} +loads the file \texttt{foo} without using +\Macro{InputIfFileExists}. You should therefore always use +\begin{lstcode} + \input{foo} +\end{lstcode} +instead. Notice the parentheses surrounding the file name!% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{BeforeClass}\Parameter{class}\OParameter{label}\Parameter{commands}% + \Macro{BeforePackage}\Parameter{package}\OParameter{label}\Parameter{commands} +\end{Declaration}% +These two commands work the same way as \DescRef{\LabelBase.cmd.BeforeFile}. +The only difference is that the \PName{class} or \PName{package} is specified +with its class or package name and not with its file name. That means you +should omit the file extensions \File{.cls} or \File{.sty}. + +Note,\important{Attention!} \Package{scrlfile-hook} also uses \PValue{file} +and not \PValue{class} or \PValue{package} for the hook. This is the only way +to ensure that the execution of the \PName{commands} already takes place in +the context of the class or package. For the meaning of the optional argument +\PName{label} please refer to the \LaTeX{} core statement +\Macro{AddToHook}\IndexCmd{AddToHook}. As a rule, the omission of the optional +argument is recommended. With older \LaTeX{} versions this is ignored anyway.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AfterClass}\Parameter{class}\OParameter{label}\Parameter{commands}% + \Macro{AfterClass*}\Parameter{class}\OParameter{label}\Parameter{commands}% + \Macro{AfterAtEndOfClass}\Parameter{class}\OParameter{label}\Parameter{commands}% + \Macro{AfterAtEndOfClass*}\Parameter{class}\OParameter{label}\Parameter{commands}% + \Macro{AfterPackage}\Parameter{package}\OParameter{label}\Parameter{commands}% + \Macro{AfterPackage*}\Parameter{package}\OParameter{label}\Parameter{commands}% + \Macro{AfterAtEndOfPackage}\Parameter{package}\OParameter{label}\Parameter{commands} + \Macro{AfterAtEndOfPackage*}\Parameter{package}\OParameter{label}\Parameter{commands} +\end{Declaration}% +The \Macro{AfterClass} and \Macro{AfterPackage} commands work much like +\DescRef{\LabelBase.cmd.AfterFile}. The only difference is that the +\PName{class} or \PName{package} is specified with its class or package name +and not with its file name. That means you should omit the file extensions +\File{.cls} or \File{.sty}. + +The\important[i]{\Macro{AfterClass*}\\\Macro{AfterPackage*}} starred versions +function somewhat differently. If the class or package has already been +loaded, they execute the \PName{commands} immediately rather than waiting +until the next time the class or package is loaded. + +However\ChangedAt{v3.09}{\Package{scrlfile}}% +\important[i]{\Macro{AfterAtEndOfClass}\\\Macro{AfterAtEndOfPackage}}, code +whose execution is delayed by \Macro{AtEndOfClass} or \Macro{AtEndOfPackage} +within the class or package is first executed afterwards. In contrast, +\Macro{AfterAtEndOfClass} or \Macro{AfterAtEndOfPackage} ensures that +\PName{commands} are executed after such code. + +Again\ChangedAt{v3.32}{\Package{scrlfile}}% +\important[i]{\Macro{AfterAtEndOfClass*}\\\Macro{AfterAtEndOfPackage*}}, there +are star variants that ensure that \PName{commands} are executed immediately +if the class or package is already completely loaded. If a class or package is +currently loaded, the execution is delayed like in the version without star. + +Note that \Package{scrlfile-hook} uses a \PValue{file/after} hook for +\Macro{AfterClass}, \Macro{AfterPackage} and their star variants. In contrast +\Macro{AfterAtEndOfClass} and its star variant set a \PValue{class/after} hook +and \Macro{AfterAtEndOfPackage} and its star variant set a +\PValue{package/after} hook accordingly. For the meaning of the optional +argument \PName{label} please refer to the \LaTeX{} core statement +\Macro{AddToHook}\IndexCmd{AddToHook}. As a rule, the omission of the optional +argument is recommended. With older \LaTeX{} versions this is ignored anyway. + +\begin{Example} + The following example for class and package authors shows how \KOMAScript{} + itself makes use of the new commands. The class \Class{scrbook} contains the + following: +\begin{lstcode} + \AfterPackage{hyperref}{% + \@ifpackagelater{hyperref}{2001/02/19}{}{% + \ClassWarningNoLine{scrbook}{% + You are using an old version of the hyperref + package!\MessageBreak% + This version has a buggy hack in many + drivers,\MessageBreak% + causing \string\addchap\space to behave + strangely.\MessageBreak% + Please update hyperref to at least version + 6.71b}}} +\end{lstcode} + Old versions of the \Package{hyperref} package redefine a macro of the + \Class{scrbook} class in a way that is incompatible with newer \KOMAScript{} + versions. Newer versions of \Package{hyperref} refrain from making this + change if a newer version of \KOMAScript{} is detected. In case + \Package{hyperref} is loaded at a later stage, \Class{scrbook} ensures that + a check for an acceptable version of \Package{hyperref} is performed + immediately after the package is loaded. If this is not the case, a warning + is issued. + + Elsewhere in three of the \KOMAScript{} classes, you can find the following: +\begin{lstcode} + \AfterPackage{caption2}{% + \renewcommand*{\setcapindent}{% +\end{lstcode} + After loading \Package{caption2}, and only if it has been loaded, + \KOMAScript{} redefines its own \DescRef{maincls.cmd.setcapindent} command. + The exact code of the redefinition is irrelevant. The important thing to + note is that \Package{caption2} takes control of the + \DescRef{maincls.cmd.caption} macro and that therefore the normal definition + of the \DescRef{maincls.cmd.setcapindent} command would have no effect. The + redefinition thus improves interoperability with \Package{caption2}. + + There are also, however, instances where these commands are useful to normal + \LaTeX{} users. For example, suppose you create a document from which you + want to generate both a PostScript file, using \LaTeX{} and dvips, and a PDF + file, using \mbox{pdf{\LaTeX}}. The document should also contain hyperlinks. + In the table of contents, you have entries that span several lines. This is + not a problem for the \mbox{pdf{\LaTeX}} method, since here hyperlinks can + be broken across multiple lines. However, this is not possible with the + \Package{hyperref} driver for dvips or \mbox{hyper{\TeX}}. In this case, you + would like \Package{hyperref} to use the \Option{linktocpage} option. The + decision as to which driver is loaded is made automatically by + \File{hyperref}. + + Everything else can now be left to \DescRef{\LabelBase.cmd.AfterFile}: +\begin{lstcode} + \documentclass{article} + \usepackage{scrlfile} + \AfterFile{hdvips.def}{\hypersetup{linktocpage}} + \AfterFile{hypertex.def}{\hypersetup{linktocpage}} + \usepackage{hyperref} + \begin{document} + \listoffigures + \clearpage + \begin{figure} + \caption{This is an example of a fairly long figure caption, but + one that does not use the optional caption argument that would + allow you to write a short caption in the list of figures.} + \end{figure} + \end{document} +\end{lstcode} + If either of the \Package{hyperref} drivers \Option{hypertex} or + \Option{dvips} is used, the useful \Package{hyperref} option + \Option{linktocpage} will be set. However, if you create a PDF file + with \mbox{pdf{\LaTeX}}, the option + will not be set because then the \Package{hyperref} driver + \File{hpdftex.def} will be used. This means that neither \File{hdvips.def} + nor \File{hypertex.def} will be loaded. +\end{Example} +\iffalse% Umbruchkorrekturtext (der besser nicht mehr verwendet wird!) + Furthermore\textnote{Hint!}, you can also load \Package{scrlfile} and the + \DescRef{\LabelBase.cmd.AfterFile} command into a private + \File{hyperref.cfg}. In this case, however, you should use + \Macro{RequirePackage} instead of \Macro{usepackage} to load the package + (see \cite{latex:clsguide}). In the example above, the new lines have to be + inserted directly after the \Macro{ProvidesFile} line, that is, immediately + before the \Option{dvips} or \Option{pdftex} options are executed.% +\fi +Incidentally\textnote{Hint!}, you can also load \Package{scrlfile} before +\DescRef{maincls.cmd.documentclass}\IndexCmd{documentclass}. In this case, +however, you should use \Macro{RequirePackage}\IndexCmd{RequirePackage} +instead of \DescRef{maincls.cmd.usepackage} (see \cite{latex:clsguide}).% +\EndIndexGroup + + +\begin{Declaration} + \Macro{BeforeClosingMainAux}\Parameter{commands}% + \Macro{AfterReadingMainAux}\Parameter{commands}% +\end{Declaration}% +These commands differ in one detail from the commands explained previously. +Those commands enable actions before or after loading files. That is not the +case here. Package authors often want to write something to the \File{aux} +file after the last document page has been shipped out. To do so, ignoring the +resulting problems they create, they often use code such as the following: +\begin{lstcode} + \AtEndDocument{% + \if@filesw + \write\@auxout{% + \protect\writethistoaux% + }% + \fi + } +\end{lstcode} +However, this does not really solve the problem. If the last page of the +document has already been shipped out before \Macro{end}\PParameter{document}, +the code above will not result in any output to the \File{aux} file. If you +try to fix this new problem using \Macro{immediate} just before \Macro{write}, +you would have the opposite problem: if the last page has not yet been shipped +out before \Macro{end}\PParameter{document}, \Macro{writethistoaux} would be +written to the \File{aux} file too early. Therefore you often see solutions +like: +\begin{lstcode} + \AtEndDocument{% + \if@filesw + \clearpage + \immediate\write\@auxout{% + \protect\writethistoaux% + }% + \fi + } +\end{lstcode} +However, this solution has the disadvantage that it forces the last page to be +shipped out. A command such as +\begin{lstcode} + \AtEndDocument{% + \par\vspace*{\fill}% + Note at the end of the document.\par + } +\end{lstcode} +will no longer cause the note to appear beneath the text of the last real page +of the document but at the end of one additional page. Furthermore, +\Macro{writethistoaux} will again be written to the \File{aux} file one page +too early. + +The best solution for this problem would be if you could write directly to the +\File{aux} file immediately after the final \DescRef{maincls.cmd.clearpage} +that is part of \Macro{end}\PParameter{document} but before closing the +\File{aux} file. This is the purpose of \Macro{BeforeClosingMainAux}: +\begin{lstcode} + \BeforeClosingMainAux{% + \if@filesw + \immediate\write\@auxout{% + \protect\writethistoaux% + }% + \fi + } +\end{lstcode} +This will be successful even if the final \DescRef{maincls.cmd.clearpage} +inside of \Macro{end}\PParameter{document} does not actually ship out any page +or if \DescRef{maincls.cmd.clearpage} is used within an \Macro{AtEndDocument} +command. + +However, there one important limitation using \Macro{BeforeClosingMainAux}: +you should not use any typesetting commands inside the \PName{commands} of +\Macro{BeforeClosingMainAux}! If you ignore this restriction, the result is +just as unpredictable as the results of the problematic suggestions above that +use \Macro{AtEndDocument}. + +The \Macro{AfterReadingMainAux}\ChangedAt{v3.03}{\Package{scrlfile}} command +actually executes the \PName{commands} after closing and reading the +\File{aux} file inside \Macro{end}\PParameter{document}. This is only useful +in a few very rare cases, for example to write statistical information to the +\File{log} file which is valid only after reading the \File{aux} file, or to +implement additional \emph{rerun} requests. Typesetting commands are even more +dangerous inside these \PName{commands} than inside the argument of +\Macro{BeforeClosingMainAux}.% +% +\EndIndexGroup + + +\section{Replacing Files at Input} +\seclabel{replace} + +The previous sections in this chapter have explained commands to perform +actions before or after loading a particular file, package, or class. You can +also use \Package{scrlfile} to input a completely different file than the one +that was requested. + +\begin{Declaration} + \Macro{ReplaceInput}\Parameter{original file}% + \Parameter{replacement file}% +\end{Declaration}% +This command\ChangedAt{v2.96}{\Package{scrlfile}} defines a replacement +for the file specified in the first argument, \PName{original file}. If +\LaTeX{} is instructed to load this file, the \PName{replacement file} will be +loaded instead. The replacement-file definition affects all files loaded using +\Macro{InputIfFileExists}, whether they are loaded by the user or internally +by \LaTeX{}. To do so, \Package{scrlfile} redefines \Macro{InputIfFileExists}. + +When\ChangedAt{v3.32}{\Package{scrlfile}} using a \LaTeX{} version up to +2020-04-01, the package \Package{scrlfile-patcholdlatex} must redefine the +\Macro{InputIfFileExists} statement for this purpose. When using \LaTeX{} from +version 2020-10-01 on, \Package{scrlfile-hook} uses the internal \LaTeX{} +statement \Macro{declare@file@substitution}. The \LaTeX{} team asks to make +such a substitution only if there is no other way to achieve the desired +result, for example if such a substitution is indispensable to maintain +compatibility and if the \PName{replacement file} provides the same +functionality. + +\begin{Example} + You want to input the \File{\Macro{jobname}.tol} file instead of the + \File{\Macro{jobname.lot}} file. To do this, you use +\begin{lstcode} + \ReplaceInput{\jobname.tol}{\jobname.lot} +\end{lstcode} + If additionally you replace \File{\Macro{jobname}.tol} by + \File{\Macro{jobname}.tlo} using +\begin{lstcode} + \ReplaceInput{\jobname.tol}{\jobname.tlo} +\end{lstcode} + then \File{\Macro{jobname}.tol} will also be replaced by + \File{\Macro{jobname}.tlo}. In this way, you can process the whole + replacement chain. + + However, a replacement that results in a loop such as +\begin{lstcode} + \ReplaceInput{\jobname.lot}{\jobname.tol} + \ReplaceInput{\jobname.tol}{\jobname.lot} +\end{lstcode} + will cause an error. So it is not possible to replace + a file that has already been replaced once by itself again. +\end{Example} + +In theory, it would also be possible to use this command to replace one +package or class with another .However, it is recommended to use the following +instructions for replacing a package or class. For older \LaTeX{} versions +this is even mandatory.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{ReplaceClass}\Parameter{original class}% + \Parameter{replacement class}% + \Macro{ReplacePackage}\Parameter{original package}% + \Parameter{replacement package}% +\end{Declaration}% +You\ChangedAt{v2.96}{\Package{scrlfile}}\textnote{Attention!} should never +replace a class or package using the \DescRef{\LabelBase.cmd.ReplaceInput} +command described above. Instead, \Macro{ReplacePackage} should be used for +package replacements and \Macro{ReplaceClass} for class replacements. Note +that in this case, as with \Macro{documentclass} and \Macro{usepackage}, you +should give the name of the class or package and not the complete file name. + +The replacement class works for all classes loaded with +\Macro{documentclass}, \Macro{LoadClassWithOptions}, or \Macro{LoadClass}. The +replacement package works for all packages loaded with +\Macro{usepackage}, \Macro{RequirePackageWithOptions}, or +\Macro{RequirePackage}. + +Please\textnote{Attention!} note that the \PName{replacement class} or the +\PName{replacement package} will be loaded with the same options that would +have been passed to the \PName{original class} or \PName{original package}. If +you replace a class or package with one that does not support a requested +option, you will receive the usual warnings and errors. + +Of course, to replace classes, you must load \Package{scrlfile} before the +class using \Macro{RequirePackage} instead of \Macro{usepackage}. + +When\ChangedAt{v3.32}{\Package{scrlfile}} using a \LaTeX{} version up to +2020-04-01 the package \Package{scrlfile-patcholdlatex} must redefine the +internal statements \Macro{@onefilewithoptions} and +\Macro{@loadwithoptions}. When using \LaTeX{} from version 2020-10-01 on, +\Package{scrlfile-hook} uses the internal \LaTeX{} statement +\Macro{declare@file@substitution}. The \LaTeX{} Team asks to perform such a +substitution only if there is no other way to achieve the desired result, +e.g. if such a substitution is indispensable to maintain compatibility and the +\PName{replacement package} or \PName{replacement class} provides the same +functionality.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{UnReplaceInput}\Parameter{file name}% + \Macro{UnReplacePackage}\Parameter{package}% + \Macro{UnReplaceClass}\Parameter{class}% +\end{Declaration} +You\ChangedAt{v3.12}{\Package{scrlfile}} can also remove a replacement. You +should remove the replacement definition for an input file using +\Macro{UnReplaceInput}, for a package using \Macro{UnReplacePackage}, and for +a class using \Macro{UnReplaceClass}.% +\EndIndexGroup + + +\section{Preventing File Loading} +\seclabel{prevent} + +Classes\ChangedAt{v3.08}{\Package{scrlfile}} and packages written for use +within companies or academic institutions often load many packages only +because users need them frequently, not because they are required by the class +or package itself. If a problem occurs with one of these automatically loaded +packages, you somehow have to keep the problematic package from being loaded. +Once again, \Package{scrlfile} provides a simple solution. + +\begin{Declaration} + \Macro{PreventPackageFromLoading}\OParameter{alternate code}% + \Parameter{package list}% + \Macro{PreventPackageFromLoading*}\OParameter{alternate code}% + \Parameter{package list} +\end{Declaration} +Calling this command\ChangedAt{v3.08}{\Package{scrlfile}} before loading a +package with \Macro{usepackage}\IndexCmd{usepackage}, +\Macro{RequirePackage}\IndexCmd{RequirePackage}, or +\Macro{RequirePackageWithOptions}\IndexCmd{RequirePackageWithOptions} +effectively prevents the package from being loaded if it is found in the the +\PName{package list}. +% +\begin{Example} + Suppose you work at a company where all documents are created using Latin + Modern. The company class, \Class{compycls}, therefore contains these lines: +\begin{lstcode} + \RequirePackage[T1]{fontenc} + \RequirePackage{lmodern} +\end{lstcode} + But now, for the first time, you want to use \XeLaTeX{} or Lua\LaTeX{}. + Since the recommended \Package{fontspec} package uses Latin Modern as the + default font anyway, and loading \Package{fontenc} would not be a good idea, + you want to prevent both packages from being loaded. Therefore, you load the + class in your own document as follows: +\begin{lstcode} + \RequirePackage{scrlfile} + \PreventPackageFromLoading{fontenc,lmodern} + \documentclass{firmenci} +\end{lstcode} +\end{Example} +The example above also shows that you can load \Package{scrlfile} before the +class. In this case, you must use +\Macro{RequirePackage}\IndexCmd{RequirePackage} because \Macro{usepackage} +before \Macro{documentclass} is not permitted. + +If you specify an empty \PName{package list} or if it contains a package that +has already been loaded, \Macro{PreventPackageFromLoading} issues a warning, +while\ChangedAt{v3.12}{\Package{scrlfile}} \Macro{PreventPackageFromLoading*} +merely writes a note to the log file only. + +You\ChangedAt{v3.12}{\Package{scrlfile}} can use the optional argument to +execute code instead of loading the package. But you cannot load any other +packages or files inside \PName{alternate code}. To load another package, see +\DescRef{\LabelBase.cmd.ReplacePackage} in \autoref{sec:scrlfile.macros} on +\DescPageRef{\LabelBase.cmd.ReplacePackage}. Note also that the +\PName{alternate code} will be executed several times if you try to load the +package more than once!% +\EndIndexGroup + + +\begin{Declaration} + \Macro{StorePreventPackageFromLoading}\Parameter{\textMacro{command}}% + \Macro{ResetPreventPackageFromLoading} +\end{Declaration} +\Macro{StorePreventPackageFromLoad}\ChangedAt{v3.08}{\Package{scrlfile}} +defines \Macro{command} to be the current list of packages that should not be +loaded. In contrast, +\Macro{ResetPreventPackageFromLoading}\ChangedAt{v3.08}{\Package{scrlfile}} +resets the list of packages that should not be loaded. After +\Macro{ResetPreventPackageFromLoading}, you can load all packages again. +\begin{Example} + Suppose you need to load a package inside another package and you do not + want the user to be able to prevent that package from being loaded with + \DescRef{\LabelBase.cmd.PreventPackageFromLoading}% + \IndexCmd{PreventPackageFromLoading}. So you reset the do-not-load list + before you load this package: +\begin{lstcode} + \ResetPreventPackageFromLoading + \RequirePackage{foo} +\end{lstcode} + Unfortunately, from this point on the user's entire do-not-load list would + be lost. To avoid this, you first store the list and then restore it later: +\begin{lstcode} + \newcommand*{\Users@PreventList}{}% + \StorePreventPackageFromLoading\Users@PreventList + \ResetPreventPackageFromLoading + \RequirePackage{foo} + \PreventPackageFromLoading{\Users@PreventList} +\end{lstcode} + Note\textnote{Attention!} that \Macro{StorePreventPackageFromLoading} + defines the \Macro{Users@PreventList} macro even if it has already been + defined. In other words, calling \Macro{StorePreventPackageFromLoading} + overwrites existing \Macro{command} definitions without checking. Therefore + this example uses \Macro{newcommand*} to get an error message if + \Macro{Users@PreventList} has already been defined. +\end{Example} +Note that when you manipulate the list stored by +\Macro{StorePreventPackageFromLoading}, you are responsible for making sure it +can be restored. For example, the list elements must be separated by comma, +must not contain white space or group braces, and must be fully expandable. + +Also note\textnote{Attention!}, that \Macro{ResetPreventPackageFromLoading} +does not clear the \PName{alternate code} for a package. But this code +will not be executed so long as the package is not added again to the +do-not-load list.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{UnPreventPackageFromLoading}\Parameter{package list}% + \Macro{UnPreventPackageFromLoading*}\Parameter{package list} +\end{Declaration} +Instead\ChangedAt{v3.12}{\Package{scrlfile}} of completely resetting the list +of packages that should not be loaded, you can also specify individual +packages to remove from the list. The starred version of the command also +deletes the \PName{alternate code}. For example, restoring packages to the +do-not-load list from a stored list will not reactivate their \PName{alternate +code} in this case.% +% +\begin{Example} + Suppose you want to prevent a \Package{foo} package from being loaded, but + you do not want to execute any outdated \PName{alternate code} that may + exist. Instead, only your new \PName{alternate code} should be executed. You + can do this as follows: +\begin{lstcode} + \UnPreventPackageFromLoading*{foo} + \PreventPackageFromLoading[\typeout{alternate code}]{foo} +\end{lstcode} + For the \Macro{UnPreventPackageFromLoading} command, it does not matter + whether or not the package has been prevented from being loaded before. + + Of course you can also use the command to indirectly delete the + \PName{alternate code} of all packages: +\begin{lstcode} + \StorePreventPackageFromLoading\TheWholePreventList + \UnPreventPackageFromLoading*{\TheWholePreventList} + \PreventPackageFromLoading{\TheWholePreventList} +\end{lstcode} + In this case the packages that have been prevented from being loaded are + still prevented from being loaded, but their \PName{alternate code} has been + deleted and will no longer be executed.% +\end{Example}% +\EndIndexGroup +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrlfile-hook-3.34.html b/macros/latex/contrib/koma-script/doc/scrlfile-hook-3.34.html new file mode 100644 index 0000000000..de3d5761c1 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlfile-hook-3.34.html @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + KOMA-Script Package scrlfile-hook-3.34 + + + +

KOMA-Script Package scrlfile-hook-3.34

+

KOMA-Script-Paket scrlfile-hook-3.34

+
+ There is no information about scrlfile-hook-3.34 in the + KOMA-Script user manual. +It is an internal package, that should never be used directly. You should load scrlfile instead.
+
+ Es gibt keine Informationen zu scrlfile-hook-3.34 in der + KOMA-Script Benutzeranleitung. +Es handelt sich hierbei im ein internes Paket, das niemals direkt geladen werden sollte. Stattdessen sollte scrlfile geladen werden.
+
+ Markus Kohm, 2022-06-03 +

Valid XHTML 1.1

+
+ + + diff --git a/macros/latex/contrib/koma-script/doc/scrlfile-hook.html b/macros/latex/contrib/koma-script/doc/scrlfile-hook.html new file mode 100644 index 0000000000..2835dcd31d --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlfile-hook.html @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + KOMA-Script Package scrlfile-hook + + + +

KOMA-Script Package scrlfile-hook

+

KOMA-Script-Paket scrlfile-hook

+
+ There is no information about scrlfile-hook in the + KOMA-Script user manual. +It is an internal package, that should never be used directly. You should load scrlfile instead.
+
+ Es gibt keine Informationen zu scrlfile-hook in der + KOMA-Script Benutzeranleitung. +Es handelt sich hierbei im ein internes Paket, das niemals direkt geladen werden sollte. Stattdessen sollte scrlfile geladen werden.
+
+ Markus Kohm, 2022-06-03 +

Valid XHTML 1.1

+
+ + + diff --git a/macros/latex/contrib/koma-script/doc/scrlfile-patcholdlatex.html b/macros/latex/contrib/koma-script/doc/scrlfile-patcholdlatex.html new file mode 100644 index 0000000000..4d32d66681 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlfile-patcholdlatex.html @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + KOMA-Script Package scrlfile-patcholdlatex + + + +

KOMA-Script Package scrlfile-patcholdlatex

+

KOMA-Script-Paket scrlfile-patcholdlatex

+
+ There is no information about scrlfile-patcholdlatex in the + KOMA-Script user manual. +It is an internal package, that should never be used directly. You should load scrlfile instead.
+
+ Es gibt keine Informationen zu scrlfile-patcholdlatex in der + KOMA-Script Benutzeranleitung. +Es handelt sich hierbei im ein internes Paket, das niemals direkt geladen werden sollte. Stattdessen sollte scrlfile geladen werden.
+
+ Markus Kohm, 2022-06-03 +

Valid XHTML 1.1

+
+ + + diff --git a/macros/latex/contrib/koma-script/doc/scrlfile.html b/macros/latex/contrib/koma-script/doc/scrlfile.html index b386b493a2..3a0ce795d0 100644 --- a/macros/latex/contrib/koma-script/doc/scrlfile.html +++ b/macros/latex/contrib/koma-script/doc/scrlfile.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrlfile" /> + + - + - The KOMA-Script Documentation Wrapper + Controlling Package Dependencies with scrlfile -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

Controlling Package Dependencies with scrlfile

+

Paketabhängigkeiten mit scrlfile beherrschen

- I think you are searching for the KOMA-Script documentation. You - may find the Englisch documentation - at scrguien.pdf and an index of it - at scrguien.html. + I think you are searching for the chapter + “Controlling Package Dependencies with scrlfile in the + KOMA-Script documentation.
- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Paketabhängigkeiten mit scrlfile beherrschen” in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrlogo-de.tex b/macros/latex/contrib/koma-script/doc/scrlogo-de.tex new file mode 100644 index 0000000000..06f4540ee8 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlogo-de.tex @@ -0,0 +1,66 @@ +% ====================================================================== +% scrlogo-de.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% Package scrlogo +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{scrlogo-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script package scrlogo] + +\chapter{Das \KOMAScript-Logo mit Paket \Package{scrlogo}} +\labelbase{scrlogo} +\BeginIndexGroup +\BeginIndex{Package}{scrlogo}% + +Das Paket \Package{scrlogo} ist das kleinste \KOMAScript-Paket, das derzeit +nur eine einzige Anweisung bereitstellt. Dafür wird das Paket von allen anderen +\KOMAScript-Paketen und den \KOMAScript-Klassen geladen. Die Anweisunge steht +also bei Verwendung aller \KOMAScript-Pakete und \KOMAScript-Klassen zur +Verfügung. + +\begin{Declaration} + \Macro{KOMAScript} +\end{Declaration} +Diese Anweisung gibt die Wortmarke »\KOMAScript« in serifenloser Schrift und +mit leichter Sperrung des in Versalien gesetzten Teils aus. Die Definition +erfolgt mit \Macro{DeclareRobustCommand}. Da auch Pakete, die nicht zu +\KOMAScript{} gehören, diese Wortmarke definieren können, sollte man die +Anweisung jedoch nicht als Indiz für die Verwendung eines \KOMAScript-Pakets +verstehen. Als Besonderheit\ChangedAt{v3.36}{\Package{scrlogo}} enthält +\Package{scrlogo} außerdem Code, um bei Verwendung von +\Package{hyperref}\IndexPackage{hyperref}\important{\Package{hyperref}} +sicherzustellen, dass im PDF-Kontext, also beispielsweise im Text der +Lesezeichen keine Warnungen aufgrund der dann nicht verfügbaren Sperrung +auftreten. Dabei spielt es keine Rolle, ob \Package{hyperref} vor oder nach +\Package{scrbase} geladen wird.% +\EndIndexGroup +\EndIndexGroup +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrlogo-en.tex b/macros/latex/contrib/koma-script/doc/scrlogo-en.tex new file mode 100644 index 0000000000..b4ba29dcae --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlogo-en.tex @@ -0,0 +1,66 @@ +% ====================================================================== +% scrlogo-en.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% Package scrlogo +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{scrlogo-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script package scrlogo] + +\translator{Markus Kohm} + +\chapter{The \KOMAScript{} Logo with Package \Package{scrlogo}} +\labelbase{scrlogo} +\BeginIndexGroup +\BeginIndex{Package}{scrlogo}% + +The \Package{scrlogo} package is the smallest \KOMAScript{} package that +currently provides only a single command. On the other hand, the package +is loaded by all other \KOMAScript{} packages and \KOMAScript{} classes. So +the command is available when using any \KOMAScript{} package or +\KOMAScript{} class. + +\begin{Declaration} + \Macro{KOMAScript} +\end{Declaration} +This command outputs the word mark ``\KOMAScript'' in sans-serif font and with +slight letter spacing of the part set in uppercase. The definition is robust +unsing \Macro{DeclareRobustCommand}. Since packages that do not belong to +\KOMAScript{} can also define this command, its existence should not be +interpreted as an indication that a \KOMAScript{} package is in use. As a +special feature\ChangedAt{v3.36}{\Package{scrlogo}}, \Package{scrlogo} +contains code to ensure that when +\Package{hyperref}\IndexPackage{hyperref}\important{\Package{hyperref}} is +used no warnings occur in the PDF context, e.g. in a bookmark text, due to +the then unavailable letter spacing occur.% +\EndIndexGroup +\EndIndexGroup +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrlogo.html b/macros/latex/contrib/koma-script/doc/scrlogo.html new file mode 100644 index 0000000000..1240ff8fb8 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlogo.html @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + The KOMA - Script Logo with Package scrlogo + + + +

The KOMA - Script Logo with Package scrlogo

+

Das KOMA - Script-Logo mit Paket scrlogo

+
+
+ Ich nehme an, Sie suchen nach dem Kapitel + „Das KOMA - Script-Logo mit Paket scrlogo in der + KOMA-Script-Anleitung. +
+
+ Markus Kohm, 2022-06-03 +

Valid XHTML 1.1

+
+ + + diff --git a/macros/latex/contrib/koma-script/doc/scrlttr2-de.tex b/macros/latex/contrib/koma-script/doc/scrlttr2-de.tex new file mode 100644 index 0000000000..d61ed4adc0 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlttr2-de.tex @@ -0,0 +1,5207 @@ +% ====================================================================== +% scrlttr2-de.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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 +% https://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.md. +% ====================================================================== +% +% Chapter about scrlttr2 of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrlttr2-de.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrlttr2)] + +\chapter{Briefe mit Klasse \Class{scrlttr2} oder Paket \Package{scrletter}} +\labelbase{scrlttr2} + +\BeginIndexGroup +\BeginIndex{Class}{scrlttr2}\BeginIndex{Package}{scrletter}% +\BeginIndex{}{Briefe}% +\iffalse% Wird eigentlich nicht mehr als Einleitung benötigt +Briefe sind in vielerlei Hinsicht etwas ganz anderes als Artikel, Berichte, +Bücher oder Ähnliches. Schon allein deshalb gibt es für Briefe ein eigenes +Kapitel.% +\iffalse% Umbruchkorrektur +Aber auch aus weiteren Gründen ist ein eigenes Kapitel für +\Class{scrlttr2} und \Package{scrletter} gerechtfertigt.% +\fi% +\fi% + +\iffalse% Braucht nach 17 Jahren kein Mensch mehr +Die Klasse \Class{scrlttr2}\important{\Class{scrlttr2}} wurde 2002 von Grund +auf neu entwickelt. Sie hat daher auch ein komplett anderes Bedienkonzept als +alle übrigen mir bekannten Klassen. Die neue Art der Bedienung ist +möglicherweise etwas ungewohnt, bietet jedoch nicht nur dem geübten Anwender +einige Vorteile.% +\fi% + +Das Paket \Package{scrletter}\important{\Package{scrletter}}% +\ChangedAt{v3.15}{\Package{scrletter}} verstärkt \KOMAScript{} seit Version +3.15. Es stellt die auf Briefe ausgelegte Funktionalität von \Class{scrlttr2} +auch für andere Klassen bereit. Empfohlen wird die Verwendung mit einer der +\KOMAScript-Klassen \Class{scrbook}, \Class{scrreprt} oder \Class{scrartcl}, +die im vorherigen Kapitel erklärt sind. % +\iffalse % +Mit geringfügigen Einschränkungen funktioniert \Package{scrletter}% +\else % +Auf Anwenderwunsch funktioniert \Package{scrletter} mit geringfügigen +Einschränkungen % +\fi % +aber auch mit den Standardklassen. + +Ausgangspunkt für die Entwicklung von \Package{scrletter} waren +Nachfragen von Anwendern, die Elemente wie +Gliederungsüberschriften,\textnote{Überschriften, Gleitumgebungen, + Verzeichnisse} Gleitumgebungen oder ein Literaturverzeichnis auch in Briefen +haben wollten. Umgekehrt gab es auch Wünsche nach der Verwendung der Variablen +von \Class{scrlttr2} in den übrigen \KOMAScript-Klassen. Beides ist durch eine +Kombination der gewünschten \KOMAScript-Klasse mit \Package{scrletter} +möglich. + +Gegenüber der Briefklasse hat das Briefpaket einige, kleine Änderungen, die +notwendig waren, um Konflikte mit den anderen Klassen zu vermeiden. Diese +betreffen vor allem die Seitenstile und sind explizit dokumentiert (siehe +\autoref{sec:\LabelBase.pagestyle}, ab +\autopageref{sec:\LabelBase.pagestyle}). % +\iffalse % Umbruchkorrektur +Wo \Package{scrletter} nicht explizit erwähnt ist, gilt dafür alles, was für +\Class{scrlttr2} dokumentiert ist, ohne Änderung. % +\fi% + +\LoadCommonFile{options} % \section{Frühe oder späte Optionenwahl} + +\LoadCommonFile{compatibility} % \section{Kompatibilität zu früheren Versionen von \KOMAScript} + +%\iffree{}{\vfill}% Umbruchoptimierung! + +\LoadCommonFile{draftmode} % \section{Entwurfsmodus} + +\LoadCommonFile{typearea} % \section{Seitenauf"|teilung} + +Die Unterscheidung zwischen ein- und doppelseitigem Satz ist bei Briefen +jedoch in der Regel nicht sinnvoll. Da Briefe normalerweise nicht gebunden +werden, betrachtet man bei Briefen jede Seite für sich. Das gilt auch dann, +wenn ausnahmsweise Vorder- und Rückseite bedruckt werden. Daher spielt bei +Briefen normalerweise auch der vertikale Ausgleich keine Rolle. Sollten Sie +diesen trotzdem benötigen +\iffalse% +% Umbruchkorrekturtext +oder wissen wollen, was das ist, % +\fi% +sei auf die in \autoref{sec:maincls.typearea}, +\DescPageRef{maincls.cmd.flushbottom} erklärten Anweisungen +\DescRef{maincls.cmd.raggedbottom}\IndexCmd{raggedbottom} und +\DescRef{maincls.cmd.flushbottom}\IndexCmd{flushbottom} verwiesen.% +% +\EndIndexGroup + + +\section{Variablen} +\seclabel{variables}% +\BeginIndexGroup +\BeginIndex{}{Variablen}% + +Neben Optionen, Anweisungen (oder Befehlen), Umgebungen, Zählern und Längen +wurden in \autoref{cha:maincls} für \KOMAScript{} bereits zusätzlich Elemente +eingeführt. Eine typische Eigenschaft eines Elements ist seine Schriftart und +die Möglichkeit, diese zu ändern (siehe \autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}). An dieser Stelle werden nun +zusätzlich Variablen eingeführt. Variablen haben einen +Namen\Index{Variablen>Name}\textnote{Namen}, über den sie angesprochen werden, +und einen Inhalt\Index{Variablen>Inhalt}\textnote{Inhalt}. Der Inhalt einer +Variablen kann zeitlich bzw. räumlich getrennt von ihrer Verwendung gesetzt +werden, so wie der Inhalt einer Anweisung getrennt von ihrer Ausführung +definiert werden kann. Hauptunterschied zwischen Variablen und Anweisungen +ist, dass Anweisungen üblicherweise Aktionen auslösen, während der Inhalt +einer Variablen normalerweise aus einem Text besteht, der dann von einer +Anweisung ausgegeben wird. Er kann aber auch von mehreren Anweisungen an +unterschiedlichen Stellen verwendet und so mehrfach ausgegeben +werden. Außerdem kann eine Variable zusätzlich eine +Bezeichnung\Index{Variablen>Bezeichnung}\textnote{Bezeichnung} besitzen, die +ebenfalls gesetzt und ausgegeben werden kann. + +Dieser Abschnitt beschränkt sich bewusst auf die Einführung des Begriffs der +Variablen. Die zur Verdeutlichung verwendeten Beispiele sind ohne tiefere +Bedeutung. Konkretere Anwendungsbeispiele gibt es bei der Erläuterung der in +der Klasse und dem Paket bereits definierten und von ihnen verwendeten +Variablen in den nachfolgenden Abschnitten. \autoref{tab:\LabelBase.variables} +gibt eine Übersicht über alle definierten Variablen. +% +\begin{desclist} + \desccaption{Von \Class{scrlttr2} und \Package{scrletter} unterstützte + Variablen\label{tab:\LabelBase.variables}}% + {Von \Class{scrlttr2} und \Package{scrletter} unterstützte Variablen + (\emph{Fortsetzung})}% + \ventry{addresseeimage}{Anweisungen, die zum Setzen + des Port-Payé-Kopfes bei der Einstellung + \OptionValueRef{\LabelBase}{addrfield}{backgroundimage} oder der + Port-Payé-Anschrift bei der Einstellung + \OptionValueRef{\LabelBase}{addrfield}{image}, verwendet werden + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.addresseeimage})}% + \ventry{backaddress}{Rücksendeadresse für Fensterbriefumschläge + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.backaddress})}% + \ventry{backaddressseparator}{Trennzeichen innerhalb der Rücksendeadresse + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.backaddressseparator})}% + \ventry{ccseparator}{Trennzeichen zwischen Verteilertitel und Verteiler + (\autoref{sec:\LabelBase.document}, + \DescPageRef{\LabelBase.variable.ccseparator})}% + \ventry{customer}{Geschäftszeilenfeld »Kundennummer« + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.customer})}% + \ventry{date}{Datum (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.date})}% + \ventry{emailseparator}{Trennzeichen zwischen E-Mail-Bezeichnung und + E-Mail-Adresse (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.emailseparator})}% + \ventry{enclseparator}{Trennzeichen zwischen Anlagetitel und Anlagen + (\autoref{sec:\LabelBase.document}, + \DescPageRef{\LabelBase.variable.enclseparator})}% + \ventry{faxseparator}{Trennzeichen zwischen Faxbezeichner und Faxnummer + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.faxseparator})}% + \ventry{firstfoot}{% + Seitenfuß\ChangedAt{v3.08}{\Class{scrlttr2}} des Briefbogens + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.firstfoot})}% + \ventry{firsthead}{% + Kopf\ChangedAt{v3.08}{\Class{scrlttr2}} des Briefbogens + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.firsthead})}% + \ventry{fromaddress}{Absenderadresse ohne Absendername + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromaddress})}% + \ventry{frombank}{Bankverbindung des Absenders + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.frombank})}% + \ventry{fromemail}{E-Mail-Adresse des Absenders + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromemail})}% + \ventry{fromfax}{Faxnummer des Absenders + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromfax})}% + \ventry{fromlogo}{Anweisungen zum Setzen des Absenderlogos + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromlogo})}% + \ventry{frommobilephone}{% + \ChangedAt{v3.12}{\Class{scrlttr2}}% + Handynummer des Absenders (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.frommobilephone})}% + \ventry{fromname}{vollständiger Absendername + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromname})}% + \ventry{fromphone}{Telefonnummer des Absenders + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromphone})}% + \ventry{fromurl}{eine URL des Absenders (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromurl})}% + \ventry{fromzipcode}{Postleitzahl des Absenders für den Port-Payé-Kopf bei + \OptionValueRef{\LabelBase}{addrfield}{PP} + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromzipcode})}% + \ventry{invoice}{Geschäftszeilenfeld »Rechnungsnummer« + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.invoice})}% + \ventry{location}{erweiterte Absenderangabe + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.location})}% + \ventry{mobilephoneseparator}{Trennzeichen zwischen Handybezeichner und + Handynummer (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.mobilephoneseparator})}% + \ventry{myref}{Geschäftszeilenfeld »Mein Zeichen« + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.myref})}% + \ventry{nextfoot}{Seitenfuß\ChangedAt{v3.08}{\Class{scrlttr2}} im Seitenstil + \DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings} oder + \DescRef{\LabelBase.pagestyle.myheadings}\IndexPagestyle{myheadings} + (\autoref{sec:\LabelBase.pagestyle}, + \DescPageRef{\LabelBase.variable.nextfoot})}% + \ventry{nexthead}{Kopf\ChangedAt{v3.08}{\Class{scrlttr2}} im Seitenstil + \DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings} oder + \DescRef{\LabelBase.pagestyle.myheadings}\IndexPagestyle{myheadings} + (\autoref{sec:\LabelBase.pagestyle}, + \DescPageRef{\LabelBase.variable.nexthead})}% + \ventry{phoneseparator}{Trennzeichen zwischen Telefonbezeichner und + Telefonnummer (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.phoneseparator})}% + \ventry{place}{Ort (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.place})}% + \ventry{placeseparator}{Trennzeichen zwischen Ort und Datum + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.placeseparator})}% + \ventry{PPdatamatrix}{Anweisungen zum Setzen einer Data-Matrix bei der + Einstellung \OptionValueRef{\LabelBase}{addrfield}{PP} + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.PPdatamatrix})}% + \ventry{PPcode}{Code zur Identifizierung des Absenders bei Einstellung + \OptionValueRef{\LabelBase}{addrfield}{PP} + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.PPcode})}% + \ventry{signature}{Signatur unter Unterschrift und Grußformel + (\autoref{sec:\LabelBase.closing}, + \DescPageRef{\LabelBase.variable.signature})}% + \ventry{specialmail}{Versandart (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.specialmail})}% + \ventry{subject}{Betreff (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.subject})}% + \ventry{subjectseparator}{Trennzeichen zwischen Betreff"|titel und Betreff + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.subjectseparator})}% + \ventry{title}{Brief"|titel (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.title})}% + \ventry{toaddress}{Empfängeradresse ohne Empfängername + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.toaddress})}% + \ventry{toname}{vollständiger Empfängername + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.toname})}% + \ventry{yourmail}{Geschäftszeilenfeld »Ihr Schreiben« + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.yourmail})}% + \ventry{yourref}{Geschäftszeilenfeld »Ihr Zeichen« + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.yourref})}% + \ventry{zipcodeseparator}{Trennzeichen zwischen der Bezeichnung und dem + Inhalt der Variablen \DescRef{\LabelBase.variable.fromzipcode} + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.zipcodeseparator})}% +\end{desclist} + + +\begin{Declaration} + \Macro{setkomavar} + \Parameter{Name}\OParameter{Bezeichnung}\Parameter{Inhalt} + \Macro{setkomavar*}\Parameter{Name}\Parameter{Bezeichnung} +\end{Declaration} +Mit der Anweisung \Macro{setkomavar} wird der \PName{Inhalt} der Variablen +\PName{Name} gesetzt. Dabei kann per optionalem Argument gleichzeitig auch die +\PName{Bezeichnung} der Variablen mit geändert werden. Mit der +Sternvariante \Macro{setkomavar*} kann auch nur die \PName{Bezeichnung} der +Variablen \PName{Name} gesetzt werden. +\begin{Example} + In Briefen ist es üblich, den Absender im Briefkopf stehen zu haben. Dazu + muss \KOMAScript{} den Absender aber erst einmal mit Namen kennen. Für + »Peter Musterfrau« ginge das einfach mit: +\begin{lstcode} + \setkomavar{fromname}{Peter Musterfrau} +\end{lstcode} + Die voreingestellte Bezeichnung für den Namen des Absenders ist + »Von«. Angenommen, Herr Musterfrau will % + \iffalse aber \fi % Umbruchkorrektur + an den Stellen, an denen \KOMAScript{} diese Bezeichnung verwendet, lieber + »Absender« haben, so müsste er zusätzlich +\begin{lstcode} + \setkomavar*{fromname}{Absender} +\end{lstcode} + setzen oder aber die beiden Angaben zu einer Anweisung zusammenfassen: +\begin{lstcode} + \setkomavar{fromname}[Absender]{Peter Musterfrau} +\end{lstcode} + Damit schlägt er sozusagen zwei Fliegen mit einer Klappe. +\end{Example} +Übrigens kann mit einem leeren obligatorischen Argument \PName{Inhalt} +der Inhalt der Variable gelöscht werden. Selbstverständlich kann in +gleicher Weise mit einem leeren Argument \PName{Bezeichnung} auch die +Bezeichnung der Variablen gelöscht werden. +\begin{Example} + Angenommen, Herr Musterfrau will gar keine Bezeichnung für den Namen des + Absenders haben. Dann könnte er diese entweder für sich mit: +\begin{lstcode} + \setkomavar*{fromname}{} +\end{lstcode} + löschen. Er könnte aber auch wieder zwei Fliegen mit einer Klappe + schlagen und +\begin{lstcode} + \setkomavar{fromname}[]{Peter Musterfrau} +\end{lstcode} + verwenden. Dadurch wird gleichzeitig der Inhalt der Variablen gesetzt und + ihre Bezeichnung gelöscht.% +\end{Example}% +\iftrue% Umbruchkorrektur +Ein\textnote{Achtung!} leeres optionales Argument ist also nicht +gleichbedeutend mit dem Weglassen des optionalen Arguments.% +\else % +\vskip -1\ht\strutbox plus .75\strutbox% Beispiel am Ende der Bechreibung +\fi% +\EndIndexGroup + +\begin{Declaration} + \Macro{usekomavar}\OParameter{Anweisung}\Parameter{Name} + \Macro{usekomavar*}\OParameter{Anweisung}\Parameter{Name} +\end{Declaration} +In\ChangedAt{v2.9i}{\Class{scrlttr2}} manchen Fällen wird es notwendig sein, +selbst auf den Inhalt oder die Bezeichnung einer Variablen zuzugreifen, dies +also nicht allein der Klasse zu überlassen. Das gilt insbesondere dann, wenn +Sie eigene Variablen definiert haben, die nicht zur Geschäftszeile +hinzugefügt werden. Mit der Anweisung \Macro{usekomavar} können Sie auf den +Inhalt der Variablen \PName{Name} zugreifen, während Sie mit der Sternvariante +\Macro{usekomavar*} ihre Bezeichnung erhalten. Näheres zur Definition eigener +Variablen ist \autoref{sec:scrlttr2-experts.variables}, +\DescPageRef{scrlttr2-experts.cmd.newkomavar} zu entnehmen.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifkomavar}\Parameter{Name}\Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Mit\ChangedAt{v3.03}{\Class{scrlttr2}}% +\ChangedAt{v3.28}{\Class{scrlttr2}\and \Package{scrletter}} dieser Anweisung +kann man feststellen, ob eine Variable definiert ist. Der \PName{Dann-Teil} +wird nur dann ausgeführt, wenn die Variable existiert. Dabei wird der Inhalt +der Variablen nicht getestet, kann also auch leer sein. Der \PName{Sonst-Teil} +wird hingegen ausgeführt, wenn die Variable nicht existiert. Solche Tests +können beispielsweise dann sinnvoll sein, wenn eigene Variablen in einer +\File{lco}-Datei\Index{lco-Datei=\File{lco}-Datei} (siehe +\autoref{sec:\LabelBase.lcoFile} ab \autopageref{sec:\LabelBase.lcoFile}) +definiert werden und in einer anderen \File{lco}-Datei diese Variable nur dann +verwendet werden soll, wenn sie existiert. \EndIndexGroup + + +\begin{Declaration} + \Macro{Ifkomavarempty} + \Parameter{Name}\Parameter{Dann-Teil}\Parameter{Sonst-Teil} + \Macro{Ifkomavarempty*} + \Parameter{Name}\Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Mit\ChangedAt{v2.9i}{\Class{scrlttr2}}% +\ChangedAt{v3.28}{\Class{scrlttr2}\and \Package{scrletter}} Hilfe dieser +Anweisungen kann man feststellen, ob der Inhalt oder die Bezeichnung einer +Variablen leer ist oder nicht. Der \PName{Dann-Teil} wird nur dann ausgeführt, +wenn der expandierte Inhalt oder die expandierte Bezeichnung der Variablen +\PName{Name} leer ist. Anderenfalls wird der \PName{Sonst-Teil} ausgeführt. +Die Sternvariante der Anweisung bezieht sich dabei auf die Bezeichnung der +Variablen, während die normale Variante den Inhalt behandelt.% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Pseudolängen} +\seclabel{pseudoLength} +\BeginIndexGroup +\BeginIndex{}{Pseudolängen} + +Längen werden bei \LaTeX{} mit den drei Anweisungen +\Macro{newlength}\IndexCmd{newlength}, \Macro{setlength}\IndexCmd{setlength} +und \Macro{addtolength}\IndexCmd{addtolength} verarbeitet. Sehr viele Pakete +nutzen aber auch Makros, also Anweisungen, um Längen zu +speichern. \KOMAScript{} erweitert dieses Verfahren um die Möglichkeit, solche +in Makros gespeicherten Längen mit ähnlichen Anweisungen zu verarbeiten wie +echte Längen. Diese eigentlich in Makros abgelegten Längen heißen bei +\KOMAScript{} daher Pseudolängen. + +Bitte beachten\textnote{Achtung!} Sie unbedingt, dass die Pseudolängen zwar +intern als Makros implementiert sind, bei den Befehlen zur Nutzung der +Pseudolängen jedoch nur die Namen anzugeben sind. Diese werden wie die Namen +von \LaTeX-Zählern und im Gegensatz zu Makros oder echten Längen ohne +umgekehrten Schrägstrich geschrieben! + +\begin{Explain} + Historisch gesehen arbeitet \TeX{} mit einem festen Satz an Registern. Es + gibt jeweils 256~Register für Token, Boxen, Zähler, Abstände (englisch: + \emph{skip}) und Größen (englisch: \emph{dimension}). Für \LaTeX{}-Längen, + die mit \Macro{newlength} angefordert werden, werden Abstandsregister + belegt. Sind alle diese Register verbraucht, kann man keine weiteren Längen + definieren. Sowohl \Class{scrlttr2} als auch \Package{scrletter} würden + normalerweise allein für die erste Seite mehr als 20 solche Register + verbrauchen. \LaTeX{} selbst belegt bereits 40 dieser Register. Das + \hyperref[cha:typearea]{\Package{typearea}}% + \IndexPackage{typearea}-Paket benötigt ebenfalls einige, so dass ein Viertel + der kostbaren Register verbraucht wäre. Dies war 2002 der Hauptgrund für die + Einführung der Pseudolängen bei \Class{scrlttr2}. + + Wer nun einwenden will, dass \LaTeX{} in der empfohlenen und für + \KOMAScript{} benötigten Installation mit \eTeX{} inzwischen das oben + genannte Beschränkungsproblem nicht mehr besitzt, hat recht. Allerdings kam + diese Entscheidung für \Class{scrlttr2} ein wenig zu spät. Bei + \Package{scrletter} wurde das Konzept der Pseudolängen aus Gründen der + Kompatibilität übernommen. +\end{Explain} + +Eine Auf"|listung aller von \KOMAScript{} definierten und verwendeten +Pseudolängen ist \autoref{tab:\LabelBase.pseudoLengths} zu +entnehmen. Dabei ist auch angegeben, wo in den nachfolgenden Abschnitten +nähere Erklärungen zu der jeweiligen Pseudolänge zu finden +sind.% + +\autoref{fig:\LabelBase.pseudoLengths} auf +\autopageref{fig:\LabelBase.pseudoLengths} zeigt eine schematische +Darstellung der wichtigsten Abstände auf dem Briefbogen. Dabei sind neben den +Pseudolängen für die veränderbaren Abstände zusätzlich in heller Schrift +die Längen angegeben, die für einige wenige fest programmierte Abstände +verwendet werden. Aus Gründen der Übersichtlichkeit wurde in der Darstellung +auf einige weniger häufig benötigte Pseudolängen jedoch verzichtet. +% +\begin{desclist} + \renewcommand{\abovecaptionskipcorrection}{-\normalbaselineskip}% + \desccaption{% + Von \Class{scrlttr2} und \Package{scrletter} verwendete Pseudolängen% + \label{tab:\LabelBase.pseudoLengths}% + }{% + Von \Class{scrlttr2} und \Package{scrletter} verwendete Pseudolängen + (\emph{Fortsetzung})% + }% + \pentry{backaddrheight}{% + Höhe der Rücksendeadresse am oberen Rand des Anschriftfeldes + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.backaddrheight})% + }% + \pentry{bfoldmarklength}{% + Länge der unteren horizontalen Faltmarke + (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.bfoldmarkvpos})% + }% + \pentry{bfoldmarkvpos}{% + Abstand der unteren horizontalen Faltmarke von der oberen Kante des + Papiers (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.bfoldmarkvpos})% + }% + \pentry{firstfoothpos}{% + Abstand des Brief"|fußes von der linken Kante des Papiers; Werte größer + der Breite oder kleiner der negativen Breite des Papiers werden gesondert + behandelt (\autoref{sec:\LabelBase.firstFoot}, + \DescPageRef{\LabelBase.plength.firstfoothpos})%| + }% + \pentry{firstfootvpos}{% + Abstand des Brief"|fußes von der oberen Kante des Papiers + (\autoref{sec:\LabelBase.firstFoot}, + \DescPageRef{\LabelBase.plength.firstfootvpos})%| + }% + \pentry{firstfootwidth}{% + Breite des Brief"|fußes (\autoref{sec:\LabelBase.firstFoot}, + \DescPageRef{\LabelBase.plength.firstfootwidth})%| + }% + \pentry{firstheadhpos}{% + Abstand des Briefkopfes von der linken Kante des Papiers; Werte größer der + Breite oder kleiner der negativen Breite des Papiers werden gesondert + behandelt (\autoref{sec:\LabelBase.firstHead}, + \DescPageRef{\LabelBase.plength.firstheadhpos})% + }%\iffree{}{\enlargethispage*{\baselineskip}}% Umbruchkorrektur!!! + \pentry{firstheadvpos}{% + Abstand des Briefkopfes von der oberen Kante des Papiers + (\autoref{sec:\LabelBase.firstHead}, + \DescPageRef{\LabelBase.plength.firstheadvpos})% + }% + \pentry{firstheadwidth}{% + Breite des Briefkopfes (\autoref{sec:\LabelBase.firstHead}, + \DescPageRef{\LabelBase.plength.firstheadwidth})% + }% + \pentry{foldmarkhpos}{% + Abstand der horizontalen Faltmarken von der linken Kante des Papiers + (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.foldmarkhpos})% + }% + \pentry{foldmarkvpos}{% + Abstand der vertikalen Faltmarken von der oberen Kante des Papiers + (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.foldmarkvpos})% + }% + \pentry{fromrulethickness}{% + Dicke einer optionalen \iftrue horizontalen \fi% Umbruchkorrektur + Linie im Briefkopf (\autoref{sec:\LabelBase.firstHead}, + \DescPageRef{\LabelBase.plength.fromrulethickness})% + }% + \pentry{fromrulewidth}{% + Länge einer optionalen \iftrue horizontalen \fi% Umbruchkorrektur + Linie im Briefkopf (\autoref{sec:\LabelBase.firstHead}, + \DescPageRef{\LabelBase.plength.fromrulewidth})% + }% + \pentry{lfoldmarkhpos}{% + Abstand der vertikalen Faltmarke von der linken Kante des Papiers + (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.lfoldmarkhpos})% + }% + \pentry{lfoldmarklength}{% + Länge der vertikalen Faltmarke (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.lfoldmarklength})% + }% + \pentry{locheight}{% + Höhe der Absenderergänzung, falls der Wert nicht 0 ist; bei 0 wird + stattdessen \DescRef{\LabelBase.plength.toaddrheight} verwendet + (\autoref{sec:\LabelBase.locationField}, + \DescPageRef{\LabelBase.plength.locheight})% + }% + \pentry{lochpos}{% + Abstand der Absenderergänzung von der rechten Papierkante, falls der Wert + positiv ist, oder negativer Abstand der Absenderergänzung von der linken + Papierkante, falls der Wert negativ ist; bei 0 wird stattdessen der + negative Wert von \DescRef{\LabelBase.plength.toaddrhpos} verwendet + (\autoref{sec:\LabelBase.locationField}, + \DescPageRef{\LabelBase.plength.lochpos})% + }% + \pentry{locvpos}{% + Abstand der Absenderergänzung von der oberen Papierkante, falls der Wert + nicht 0 ist; bei 0 wird stattdessen + \DescRef{\LabelBase.plength.toaddrvpos} verwendet + (\autoref{sec:\LabelBase.locationField}, + \DescPageRef{\LabelBase.plength.locvpos})% + }% + \pentry{locwidth}{% + Breite des Feldes für die Absenderergänzung, wobei bei einem Wert von 0 + die Breite automatisch aufgrund der in \autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.option.locfield} beschriebenen Option + \DescRef{\LabelBase.option.locfield} berechnet wird + (\autoref{sec:\LabelBase.locationField}, + \DescPageRef{\LabelBase.plength.locwidth})% + }%\iffree{}{\enlargethispage*{\baselineskip}}% Umbruchkorrektur!!!% + \pentry{mfoldmarklength}{% + Länge der mittleren horizontalen Faltmarke + (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.mfoldmarklength})% + }% + \pentry{mfoldmarkvpos}{% + Abstand der mittleren horizontalen Faltmarke von der oberen Kante des + Papiers (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.mfoldmarkvpos})% + }% + \pentry{pfoldmarklength}{% + Länge der Lochermarke (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.pfoldmarklength})% + }% + \pentry{PPdatamatrixvskip}{% + vertikaler Abstand zwischen Port-Payé-Kopf und Data-Matrix bei + \OptionValueRef{scrlttr2}{addrfield}{PP} + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.PPdatamatrixvskip})% + }% + \pentry{PPheadheight}{% + Höhe für den Port-Payé-Kopf (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.PPheadheight})% + }% + \pentry{PPheadwidth}{% + Breite des linken Port-Payé-Feldes bei + \OptionValueRef{scrlttr2}{addrfield}{PP} + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.PPheadwidth})% + }% + \pentry{refaftervskip}{% + vertikaler Abstand nach der Geschäftszeile + (\autoref{sec:\LabelBase.refLine}, + \DescPageRef{\LabelBase.plength.refaftervskip})% + }% + \pentry{refhpos}{% + Abstand der Geschäftszeile von der linken Papierkante, wobei bei einem + Wert von 0 automatisch relativ zur Papierbreite zentriert wird + (\autoref{sec:\LabelBase.refLine}, + \DescPageRef{\LabelBase.plength.refhpos})% + }% + \pentry{refvpos}{% + Abstand der Geschäftszeile von der oberen Kante des Papiers + (\autoref{sec:\LabelBase.refLine}, + \DescPageRef{\LabelBase.plength.refvpos})% + }% + \pentry{refwidth}{% + Breite der Geschäftszeile (\autoref{sec:\LabelBase.refLine}, + \DescPageRef{\LabelBase.plength.refwidth})% + }% + \pentry{sigbeforevskip}{% + vertikaler Abstand zwischen Gruß und Signatur + (\autoref{sec:\LabelBase.closing}, + \DescPageRef{\LabelBase.plength.sigbeforevskip})% + }% + \pentry{sigindent}{% + Einzug der Signatur gegenüber dem Textkörper + (\autoref{sec:\LabelBase.closing}, + \DescPageRef{\LabelBase.plength.sigindent})% + }% + \pentry{specialmailindent}{% + linker Einzug der Versandart innerhalb des Anschriftfeldes + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.specialmailindent})% + }% + \pentry{specialmailrightindent}{% + rechter Einzug der Versandart innerhalb des Anschriftfeldes + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.specialmailrightindent})% + }% + \pentry{subjectaftervskip}{% + vertikaler Abstand nach dem Betreff (\autoref{sec:\LabelBase.subject}, + \DescPageRef{\LabelBase.plength.subjectaftervskip})% + }% + \pentry{subjectbeforevskip}{% + zusätzlicher vertikaler Abstand vor dem Betreff + (\autoref{sec:\LabelBase.subject}, + \DescPageRef{\LabelBase.plength.subjectbeforevskip})% + }% + \pentry{subjectvpos}{% + Abstand des Betreffs von der oberen Kante des Papiers, wobei ein Wert von + 0 stattdessen den Betreff gemäß Option \DescRef{\LabelBase.option.subject} + setzt (\autoref{sec:\LabelBase.subject}, + \DescPageRef{\LabelBase.plength.subjectaftervskip})% + }% + \pentry{tfoldmarklength}{% + Länge der oberen horizontalen Faltmarke + (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.tfoldmarklength})% + }% + \pentry{tfoldmarkvpos}{% + Abstand der oberen horizontalen Faltmarke von der oberen Kante des Papiers + (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.tfoldmarkvpos})% + }% + \pentry{toaddrheight}{% + Höhe des Anschriftfeldes (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.toaddrheight})% + }% + \pentry{toaddrhpos}{% + Abstand des Anschriftfeldes von der linken Papierkante, falls der Wert + positiv ist, oder negativer Abstand des Anschriftfeldes von der rechten + Papierkante, falls der Wert negativ ist + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.toaddrhpos})% + }% + \pentry{toaddrindent}{% + linker und rechter Einzug der Anschrift innerhalb des Anschrift\-feldes + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.toaddrindent})% + }%\iffree{}{\enlargethispage*{\baselineskip}}% Umbruchoptimierung!!! + \pentry{toaddrvpos}{% + Abstand des Anschriftfeldes von der oberen Kante des Papiers + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.toaddrvpos})% + }% + \pentry{toaddrwidth}{% + Breite des Anschriftfeldes (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.toaddrwidth})% + }% +\end{desclist} + +\begin{figure} + \centering + \tikzset{x=.56mm,y=-.56mm} + \tiny + \input{plength-tikz.tex} + \caption[{Schematische Darstellung der wichtigsten Pseudolängen für den + Briefbogen}]{Schematische Darstellung der wichtigsten Pseudolängen für den + Briefbogen angelehnt an das Ergebnis bei Verwendung von \File{DIN.lco}} + \label{fig:\LabelBase.pseudoLengths} +\end{figure} + +%\iffree{}{\clearpage}% Im Buch erst Tabelle und Abbildung vollständig ausgeben. + +\begin{Declaration} + \Macro{newplength}\Parameter{Name} +\end{Declaration} +Mit\ChangedAt{v3.26}{\Class{scrlttr2}\and \Package{scrletter}} Hilfe dieser +Anweisung wird eine neue Pseudolänge definiert. Die neue Pseudolänge ist dann +über ihren \PName{Namen} eindeutig identifiziert. Jeder Name kann also nur +einmal vergeben werden. +% +\iffalse % Umbruchoptimierungstext +Es wird sichergestellt, dass jeder \PName{Name} nur +einmal vergeben wird.% +\else +\iffalse +Wird versucht, eine bereits vorhandene Pseudolänge erneut +zu definieren, so wird dies mit einer Fehlermeldung quittiert.% +\fi +% +\fi + +\BeginIndex{Cmd}{@newplength}% +\iffree{% + Da der Anwender selbst normalerweise keine eigenen Pseudolängen definieren + muss, handelte es sich bei diesem Befehl bis \KOMAScript~3.25 um keine + Benutzeranweisung. Stattdessen existierte bis dahin nur \Macro{@newplength} + mit derselben Funktionalität. Diese sollte nicht mehr verwendet werden. }{% + \iffalse% Umbruchkorrektur + Ausschließlich aus Gründen der Kompatibilität zu älteren + \KOMAScript-Versionen existiert für Paketautoren auch die interne Anweisung + \Macro{@newplength} mit identischer Bedeutung.% + \else% + \begin{Explain}% + Die\textnote{obsolete} interne Anweisung \Macro{@newplength} sollte nicht + mehr verwendet werden.% + \end{Explain}% + \fi% +}% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifplength}\Parameter{Pseudolänge}% + \Parameter{Dann-Code}\Parameter{Sonst-Code} +\end{Declaration} +Mit\ChangedAt{v3.27}{\Class{scrlttr2}\and \Package{scrletter}} dieser Anweisung +kann geprüft werden, ob eine \PName{Pseudolänge} definiert ist. Ist dies der +Fall, so wird der \PName{Dann-Code} ausgeführt, anderenfalls wird der +\PName{Sonst-Code} ausgeführt.% +\iffree{}{\par% + \BeginIndex{Cmd}{if@plength}% + \iffalse% Umbruchkorrektur + Ausschließlich aus Konsistenzgründen existiert für Paketautoren auch die + interne Anweisung \Macro{if@plength} mit identischer Bedeutung.% + \else% + \begin{Explain}% + Die\textnote{obsolete} interne Anweisung \Macro{if@plength} sollte nicht + mehr verwendet werden.% + \end{Explain}% + \fi% +}% +\EndIndexGroup + + +\begin{Declaration} + \Macro{useplength}\Parameter{Name} +\end{Declaration} +Mit Hilfe dieser Anweisung wird auf den Wert der Pseudolänge mit dem +angegebenen \PName{Namen} zugegriffen. Anwender benötigen dies eher +selten. Innerhalb von \File{lco}-Dateien\Index{lco-Datei=\File{lco}-Datei} +(siehe \autoref{sec:\LabelBase.lcoFile} ab +\autopageref{sec:\LabelBase.lcoFile}) wird die Anweisung häufig bei der +Berechnung abhängiger Pseudolängen verwendet.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setplength}% + \OParameter{Faktor}\Parameter{Pseudolänge}\Parameter{Wert} + \Macro{addtoplength}% + \OParameter{Faktor}\Parameter{Pseudolänge}\Parameter{Wert} +\end{Declaration} +Mit\ChangedAt{v3.26}{\Class{scrlttr2}\and \Package{scrletter}} Hilfe von +\Macro{setplength} kann einer \PName{Pseudolänge} das Vielfache eines +\PName{Wertes} zugewiesen werden. Der \PName{Faktor} wird dabei als optionales +Argument übergeben (siehe auch \DescRef{\LabelBase.cmd.setlengthtoplength}, +\DescPageRef{\LabelBase.cmd.setlengthtoplength}). + +Mit \Macro{addtoplength} kann man zu einer \PName{Pseudolänge} das Vielfache +eines \PName{Wertes} addieren. Auch dabei wird der \PName{Faktor} als +optionales Argument übergeben. + +Um einer \PName{Pseudolänge} das Vielfache einer anderen Pseudolänge +zuzuweisen oder zu ihr zu addieren, verwendet man innerhalb von \PName{Wert} +die Anweisung \DescRef{\LabelBase.cmd.useplength}. Um von einer +\PName{Pseudolänge} den Wert einer anderen \PName{Pseudolänge} zu +subtrahieren, verwendet man gleichzeitig als \PName{Faktor} ein Minuszeichen +oder \PValue{-1} oder einen anderen negativen Faktor. + +\BeginIndex{Cmd}{@setplength}% +\BeginIndex{Cmd}{@addtoplength}% +\iffree{% + Da der Anwender selbst normalerweise keine Pseudolängen ändern muss, + handelte es sich bis \KOMAScript~3.25 bei diesen Befehlen um keine + Benutzeranweisungen. Stattdessen existierten bis dahin nur + \Macro{@setplength} und \Macro{@addtoplength} mit derselben + Funktionalität. Diese sollten nicht mehr verwendet werden. +}{% + \iffalse% Umbruchkorrektur + Ausschließlich aus Gründen der Kompatibilität zu älteren + \KOMAScript-Versionen existieren für Paketautoren auch die internen + Anweisungen \Macro{@setplength} und \Macro{@addtoplength} mit identischen + Bedeutungen.% + \else% + \begin{Explain}% + Die\textnote{obsolete} internen Anweisungen + \Macro{@setplength} und \Macro{@addtoplength} sollten nicht mehr verwendet + werden.% + \end{Explain}% + \fi% +}% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setplengthtowidth} + \OParameter{Faktor}\Parameter{Pseudolänge}\Parameter{Inhalt} + \Macro{setplengthtoheight} + \OParameter{Faktor}\Parameter{Pseudolänge}\Parameter{Inhalt} + \Macro{setplengthtodepth} + \OParameter{Faktor}\Parameter{Pseudolänge}\Parameter{Inhalt} + \Macro{setplengthtototalheight} + \OParameter{Faktor}\Parameter{Pseudolänge}\Parameter{Inhalt} +\end{Declaration} +Die\ChangedAt{v3.26}{\Class{scrlttr2}\and \Package{scrletter}} ersten drei +Anweisungen sind vergleichbar mit \Macro{settowidth}, +\Macro{settoheight} und \Macro{settodepth} aus dem \LaTeX-Kern, setzen aber +keine Länge, sondern eine \PName{Pseudolänge}. Entsprechend +\DescRef{\LabelBase.cmd.setplength} sind sie ebenfalls um einen optionalen +\PName{Faktor} erweitert. Sie setzen also eine \PName{Pseudolänge} auf die +Breite, Höhe oder Tiefe von \PName{Inhalt} multipliziert mit dem optional +angegebenen \PName{Faktor}. Die zusätzliche Anweisung +\Macro{setplengthtototalheight} setzt die \PName{Pseudolänge} auf die Summe +der Höhe und Tiefe von \PName{Inhalt} multipliziert mit dem optionalen +\PName{Faktor}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setlengthtoplength} + \OParameter{Faktor}\Parameter{Länge}\Parameter{Pseudolänge} + \Macro{addtolengthplength} + \OParameter{Faktor}\Parameter{Länge}\Parameter{Pseudolänge} +\end{Declaration} +Mit der Anweisung +\Macro{setlengthtoplength}\important{\Macro{setlengthtoplength}} kann man +einer \LaTeX-\PName{Länge} das Vielfache einer \PName{Pseudolänge} zuweisen. +Auch hier wird ein \PName{Faktor} nicht direkt der \PName{Pseudolänge} +vorangestellt, sondern als optionales Argument übergeben. +\iffalse % Umbruchkorrektur +Man sollte diese +Anweisung auch verwenden, wenn man einer \PName{Länge} den negativen Wert +einer \PName{Pseudolänge} zuweisen will. % +\iffalse % Umbruchkorrektur + Als \PName{Faktor} kann dann wahlweise ein Minuszeichen oder \PValue{-1} + verwendet werden. +% +\else % + \PName{Faktor} ist dann \PValue{-1}. +% +\fi % +\fi % +% +\iffalse % Umbruchkorrektur +Die Anweisung\important{\Macro{addtolengthplength}} \Macro{addtolengthplength} +arbeitet ähnlich. Nur wird die mit \PName{Faktor} multiplizierte +\PName{Pseudolänge} zur \PName{Länge} addiert.% +\else % +Mit \Macro{addtolengthplength}\important{\Macro{addtolengthplength}} wird die +mit \PName{Faktor} multiplizierte \PName{Pseudolänge} zur \PName{Länge} +addiert.% +\fi % +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Genereller Aufbau eines Briefdokuments} +\seclabel{document} +\BeginIndexGroup +\BeginIndex{}{Briefe>Aufbau} + +Der generelle Aufbau eines Briefdokuments weicht etwas vom Aufbau eines +normalen Dokuments ab. Während ein Buchdokument normalerweise nur ein Buch +enthält, kann ein Briefdokument mehrere Briefe enthalten. Wie in +\autoref{fig:\LabelBase.document} veranschaulicht, besteht ein +Briefdokument aus einem Vorspann, den einzelnen Briefen und dem Abschluss. + +\begin{figure} + \KOMAoptions{captions=bottombeside}% + \setcapindent{0pt}% + \begin{captionbeside}[{Genereller Aufbau eines Briefdokuments mit beliebig + vielen einzelnen Briefen}]{% + Genereller Aufbau eines Briefdokuments mit + beliebig vielen einzelnen Briefen (den Aufbau eines einzelnen + Briefs zeigt \autoref{fig:\LabelBase.letter})% + \label{fig:\LabelBase.document}}[l] + \begin{minipage}[b]{.667\linewidth} + \centering\small\setlength{\fboxsep}{1.5ex}% + \addtolength{\linewidth}{-\dimexpr2\fboxrule+2\fboxsep\relax}% + \setlength{\topsep}{.5\topsep}% + \fbox{\parbox{\linewidth}{\raggedright% + \Macro{documentclass}\OParameter{\dots}\PParameter{scrlttr2}\\ + \begin{center} + \emph{Einstellungen für alle Briefe} + \end{center} + \Macro{begin}\PParameter{document} + }}\\[1pt] + \fbox{\parbox{\linewidth}{\raggedright% + \begin{center} + \emph{Einstellungen ab dem nächsten Brief} + \end{center} + \Macro{begin}\PParameter{letter}\Parameter{Empfänger}\\ + \begin{center} + \emph{Inhalt eines einzelnen Briefs} + \end{center} + \Macro{end}\PParameter{letter}\\ + }}\\[2pt] + \parbox{\linewidth}{\raggedright\vspace{-.5ex}\vdots\vspace{1ex}}\\ + \fbox{\parbox{\linewidth}{\raggedright% + \Macro{end}\PParameter{document} + }}\\[\dimexpr\fboxsep+\fboxrule\relax] + \end{minipage} + \end{captionbeside} +\end{figure} + +Der Vorspann beinhaltet dabei alle Einstellungen, die generell alle Briefe +betreffen. Diese können in den Einstellungen der einzelnen Briefe jedoch +zumindest teilweise überschrieben werden. + +Bei Verwendung von \Package{scrletter}\important{scrletter} ändert sich +lediglich, dass eine andere Klasse geladen und dafür zusätzlich +\DescRef{\LabelBase.cmd.usepackage}\PParameter{scrletter} noch vor den +Einstellungen für alle Briefe einzufügen ist. Für das Setzen von Optionen für +\Package{scrletter} sei auf \autoref{sec:\LabelBase.options}, ab +\autopageref{sec:\LabelBase.options} verwiesen. + +Ich empfehle, vor \Macro{begin}\PParameter{document} nur allgemeine +Einstellungen wie das Laden von Paketen und das Setzen von Optionen +vorzunehmen. Alle Einstellungen, die das Setzen einer Variablen oder sonstige +Textangaben beinhalten, sollten nach \Macro{begin}\PParameter{document} +vorgenommen werden. Dies empfiehlt\textnote{Tipp!} sich umso mehr, wenn das +Babel-Paket\IndexPackage{babel} (siehe \cite{package:babel}) verwendet wird +oder sprachabhängige Variablen von \Class{scrlttr2} oder \Package{scrletter} +verändert werden sollen. + +Der Abschluss besteht in der Regel nur aus +\Macro{end}\PParameter{document}. Natürlich können Sie dort aber auch +zusätzliche Kommentare einfügen. + +\begin{figure} + \KOMAoptions{captions=bottombeside}% + \setcapindent{0pt}% + \begin{captionbeside}[{Genereller Aufbau eines einzelnen Briefes innerhalb + eines Briefdokuments}]{Genereller Aufbau eines einzelnen Briefes + innerhalb eines Briefdokuments (siehe + \autoref{fig:\LabelBase.document})% + \label{fig:\LabelBase.letter}}[l] + \begin{minipage}[b]{.667\linewidth}% + \centering\small\setlength{\fboxsep}{1.5ex}% + \addtolength{\linewidth}{-\dimexpr2\fboxrule+2\fboxsep\relax}% + \setlength{\topskip}{.5\topskip}% + \fbox{\parbox{\linewidth}{\raggedright% + \begin{center} + \emph{Einstellungen ab diesem Brief} + \end{center} + \Macro{begin}\PParameter{letter}% + \OParameter{Optionen}\Parameter{Empfänger} + \begin{center} + \emph{(Einstellungen für diesen Brief)} + \end{center} + \DescRef{\LabelBase.cmd.opening}\Parameter{Anrede} + }}\\[1pt] + \fbox{\parbox{\linewidth}{\raggedright% + \begin{center} + \emph{Brief"|text} + \end{center} + }}\\[1pt] + \fbox{\parbox{\linewidth}{\raggedright% + \DescRef{\LabelBase.cmd.closing}\Parameter{Grußformel}\\ + \DescRef{\LabelBase.cmd.ps} + \begin{center} + \emph{Postscriptum} + \end{center} + \DescRef{\LabelBase.cmd.encl}\Parameter{Anlagen}\\ + \DescRef{\LabelBase.cmd.cc}\Parameter{Verteiler}\\ + \Macro{end}\PParameter{letter} + }}\\[\dimexpr\fboxsep+\fboxrule\relax] + \end{minipage} + \end{captionbeside} +\end{figure} + +Wie in \autoref{fig:\LabelBase.letter} verdeutlicht wird, bestehen die +einzelnen Briefe wiederum aus einer Einleitung, dem eigentlichen Brief"|text +und einem Schlussteil. In der Einleitung werden alle Einstellungen +vorgenommen, die ab diesem oder nur für diesen einen Brief gelten sollen. Es +sei ausdrücklich darauf hingewiesen, dass Einstellungen, die vor oder zwischen +den einzelnen Briefen getroffen werden, für alle nachfolgenden Briefe +gelten. Entscheidend ist hierbei, dass diese Einleitung immer mit +\DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} endet. Ebenso beginnt der +Schlussteil immer mit +\DescRef{\LabelBase.cmd.closing}\IndexCmd{closing}. Gegebenenfalls können die +Argumente \PName{Anrede} und \PName{Grußformel} der beiden Anweisungen leer +bleiben, die Anweisungen müssen jedoch gesetzt werden und haben immer ein +Argument. + +Bei Verwendung von \Package{scrletter} spricht nichts dagegen, vor, +zwischen oder nach Briefen weitere Dokumentteile einzufügen, die nicht im +Briefkontext stehen sollen. So kann man beispielsweise Anschreiben und +Lebenslauf in einem Dokument zusammenfassen. + +\begin{Declaration} + \begin{Environment}{letter}\OParameter{Optionen}\Parameter{Empfänger} + \end{Environment} +\end{Declaration} +\BeginIndex{}{Anschrift}% +\iffalse% Umbruchkorrektur +Die Briefumgebung \Environment{letter} ist einer der zentralen Dreh- und +Angelpunkte der Briefklasse und des Briefpakets. Als +Besonderheit\textnote{\KOMAScript{} vs. Standardklassen} kann man bei +\Class{scrlttr2} und \Package{scrletter} der Briefumgebung zusätzliche +\PName{Optionen} mit auf den Weg geben. Diese werden dann intern per +\DescRef{\LabelBase.cmd.KOMAoptions}-Anweisung ausgeführt.% +\else% +Die Briefumgebung \Environment{letter} ist der Hauptzweck der Briefklasse und +des Briefpakets. Bei\textnote{\KOMAScript{} vs. Standardklassen} +\Class{scrlttr2} und \Package{scrletter} kann man der Briefumgebung +\PName{Optionen} mit auf den Weg geben, die dann per +\DescRef{\LabelBase.cmd.KOMAoptions} nur für diese Umgebung ausgeführt +werden.% +\fi% + +Der \PName{Empfänger} wird als obligatorischer Parameter an die Umgebung +übergeben. Dabei\textnote{Achtung!} dient der doppelte Backslash als +Trennzeichen zwischen einzelnen Teilen der Anschrift. Diese Teile +werden im Anschriftfeld als einzelne Zeilen ausgegeben. Dennoch sollte der +doppelte Backslash hier nicht als fester Zeilenumbruch verstanden +werden. Absätze, vertikaler Leerraum und Ähnliches sind in der Anschrift nicht +erlaubt. Sie können zu unerwarteten Effekten und Fehlermeldungen führen. Dies +ist übrigens bei der Standardbriefklasse genauso. + +\begin{Example} + \phantomsection\label{desc:\LabelBase.env.letter.example}% + Angenommen, jemand wollte einen Brief an Petra Mustermann schreiben. + Ein minimalistisches Briefdokument dafür würde so aussehen: +\begin{lstcode} + \documentclass[version=last]{scrlttr2} + \usepackage[ngerman]{babel} + \begin{document} + \begin{letter}{Petra Mustermann\\ + Vor dem Berg 1\\ + 12345 Musterhausen} + \end{letter} + \end{document} +\end{lstcode} + Allerdings\textnote{Achtung!} würde dabei noch keinerlei Ausgabe + entstehen. Es würde noch nicht einmal die Anschrift auf dem Briefbogen + ausgegeben. Warum das so ist, erfahren Sie bei der Erklärung zur Anweisung + \DescRef{\LabelBase.cmd.opening} auf \DescPageRef{\LabelBase.cmd.opening}. +\end{Example} + +Briefe\ChangedAt{v3.27}{\Class{scrlttr2}\and \Package{scrletter}} werden immer +einspaltig und ohne vertikalen Ausgleich gesetzt. Letzteres kann man mit Hilfe +von \DescRef{\LabelBase.cmd.AtBeginLetter} und der in +\autoref{sec:maincls.typearea}, \DescPageRef{maincls.cmd.flushbottom} +erklärten Anweisungen \DescRef{maincls.cmd.flushbottom}\IndexCmd{flushbottom} +ändern.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AtBeginLetter}\Parameter{Anweisungen} + \Macro{AtEndLetter}\Parameter{Anweisungen} +\end{Declaration} +\iffalse% Umbruchvarianten +Wie\textnote{Haken}\Index[indexmain]{Haken} in \cite{latex:clsguide} erwähnt, +gibt es bei \LaTeX{} die Möglichkeit, zu bestimmten Gelegenheiten während des +\LaTeX-Laufs eines Dokuments zusätzliche \PName{Anweisungen} ausführen zu +lassen. Zu diesem Zweck stellt der \LaTeX-Kern beispielsweise die Anweisungen +\Macro{AtEndOfClass}\IndexCmd{AtEndOfClass} und +\Macro{AtBeginDocument}\IndexCmd{AtBeginDocument} zur Verfügung. Man nennt +solche Eingriffspunkte auch \emph{hooks}\Index{hook=\emph{hook}}, also +Haken. Die Klasse \Class{scrlttr2} und das Paket \Package{scrletter} fügen +zwei weitere Haken hinzu, die mit \Macro{AtBeginLetter} und +\Macro{AtEndLetter}\ChangedAt{v2.95}{\Class{scrlttr2}} mit Inhalt versehen +werden können. Wie man schon daran erkennt, dass die \LaTeX-Kern-Anweisungen +für Haken nicht in \cite{latex:usrguide} sondern in \cite{latex:clsguide} +dokumentiert sind, sind diese Anweisungen eigentlich eher für Paket- und +Klassenautoren gedacht. Bei der Briefklasse und dem Briefpaket kann es jedoch +sinnvolle Anwendungen für die beiden neuen Haken auch auf Benutzerebene +geben.\Index[indexmain]{Haken} Das folgende Beispiel zeigt dies.% +% +\begin{Example} + Angenommen, Sie haben mehrere Briefe in einem Dokument. Sie verwenden + außerdem eine eigene Anweisung, um in den Briefen einen Fragebogen + zu setzen. Dabei werden die Fragen automatisch mit Hilfe eines + Zählers nummeriert. Da \KOMAScript{} dieser Zähler nicht bekannt + ist, würde er auch im Gegensatz etwa zur Seitenzahl am Anfang eines + neuen Briefes nicht zurückgesetzt. Wenn jeder Brief zehn Fragen + beinhaltet, hätte damit die erste Frage im fünften Brief die Nummer + 41 statt der Nummer 1. Sie lösen das, indem Sie \KOMAScript{} + mitteilen, dass am Anfang jedes Briefes der Zähler zurückgesetzt + werden soll: +\begin{lstcode} + \newcounter{Frage} + \newcommand{\Frage}[1]{% + \par + \refstepcounter{Frage}% + \noindent + \begin{tabularx}{\textwidth}{l@{}X} + \theFrage:~ & #1\\ + \end{tabularx}% + }% + \AtBeginLetter{\setcounter{Frage}{0}} +\end{lstcode} + Damit hat dann auch die erste Frage im 1001.~Brief wieder die Nummer + Eins. Die hier angegebene Definition benötigt übrigens das + \Package{tabularx}-Paket\IndexPackage{tabularx} (siehe + \cite{package:tabularx}). +\end{Example} +\else% + Wie\Index[indexmain]{Haken} in \cite{latex:clsguide} erwähnt, gibt es bei + \LaTeX{} die Möglichkeit, während des \LaTeX-Laufs eines Dokuments zusätzliche + \PName{Anweisungen} ausführen zu lassen. Zu diesem Zweck stellt der + \LaTeX-Kern die Anweisungen \Macro{AtEndOfClass}\IndexCmd{AtEndOfClass} und + \Macro{AtBeginDocument}\IndexCmd{AtBeginDocument} zur Verfügung. Man nennt + solche Eingriffspunkte auch \emph{hooks}\Index{hook=\emph{hook}}, also + Haken. \KOMAScript{} fügt zwei weitere Haken hinzu, die mit + \Macro{AtBeginLetter} und + \Macro{AtEndLetter}\ChangedAt{v2.95}{\Class{scrlttr2}} mit Inhalt versehen + werden können. Wie man schon daran erkennt, dass die \LaTeX-Kern-Anweisungen + für Haken nicht in \cite{latex:usrguide} sondern in \cite{latex:clsguide} + dokumentiert sind, sind diese Anweisungen eigentlich eher für Paket- und + Klassenautoren gedacht. Bei Briefen kann es jedoch sinnvolle Anwendungen für + die beiden neuen Haken auch auf Benutzerebene geben.\Index[indexmain]{Haken}% + % + \begin{Example} + Angenommen, Sie haben mehrere Briefe in einem Dokument und verwenden + eine eigene Anweisung, um in den Briefen einen Fragebogen + zu setzen. Die Fragen werden mit Hilfe eines + Zählers nummeriert. Da \KOMAScript{} diesen Zähler nicht kennt, + würde er auch im Gegensatz zur Seitenzahl am Anfang eines + neuen Briefes nicht zurückgesetzt. Bei 10 Fragen je Brief, hätte damit die + erste Frage im fünften Brief die Nummer 41 statt der Nummer 1. Sie lösen + das, indem Sie am Anfang jedes Briefes den Zähler zurücksetzen lassen: +\begin{lstcode} + \newcounter{Frage} + \newcommand{\Frage}[1]{% + \refstepcounter{Frage}\par + \noindent\begin{tabularx}{\textwidth}{l@{}X} + \theFrage:~ & #1\\ + \end{tabularx}% + }% + \AtBeginLetter{\setcounter{Frage}{0}} +\end{lstcode} + Damit hat dann auch die erste Frage im 1001.~Brief wieder die Nummer + Eins. Die hier angegebene Definition benötigt übrigens das + \Package{tabularx}-Paket\IndexPackage{tabularx} (siehe + \cite{package:tabularx}). + \end{Example}% +\fi +% +\EndIndexGroup +\ExampleEndFix% Beispiel am Ende der Beschreibung + + +\begin{Declaration} + \Counter{letter} + \Macro{thisletter} + \Macro{letterlastpage} +\end{Declaration} +Für\ChangedAt{v3.19}{\Class{scrlttr2}\and \Package{scrletter}} den Fall, dass +sich mehrere Briefe in einem Dokument befinden, werden die Briefe intern von +\KOMAScript{} durchnummeriert. Hierfür ist seit Version~3.19 der Zähler +\Counter{letter} definiert, der mit jedem \Macro{begin}\PParameter{letter} +referenzierbar um eins erhöht wird. +\begin{Example} + Kommen wir auf das Beispiel zu \DescRef{\LabelBase.cmd.AtBeginLetter} + zurück. Statt den Zähler explizit innerhalb von + \Macro{begin}\PParameter{letter} zurückzusetzen, kann dies auch implizit + erfolgen, indem der Zähler \Counter{Frage} abhängig von \Counter{letter} + definiert wird: +\iffalse % Umbruchkorrektur entsprechende der Beispielauswahl oben! +\begin{lstcode} + \newcounter{Frage}[letter] + \newcommand{\Frage}[1]{% + \par + \refstepcounter{Frage}% + \noindent + \begin{tabularx}{\textwidth}{l@{}X} + \theFrage:~ & #1\\ + \end{tabularx}% + }% +\end{lstcode} +\else % +\begin{lstcode} + \newcounter{Frage}[letter] + \newcommand{\Frage}[1]{% + \refstepcounter{Frage}\par + \noindent\begin{tabularx}{\textwidth}{l@{}X} + \theFrage:~ & #1\\ + \end{tabularx}% + }% +\end{lstcode} +\fi % + Damit wird der Zähler automatisch zu Beginn jedes Briefs wieder auf Null + zurückgesetzt, so dass die erste Frage in jedem Brief wieder mit der Nummer + Eins beginnt. +\end{Example} + +Will man sich den aktuellen Wert von \Counter{letter} ausgeben lassen, so ist +das wie gewohnt mit \Macro{theletter} möglich. Wie bereits erwähnt, ist der +Zähler aber auch referenzierbar. Das bedeutet, man könnte am Anfang eines +Briefes mit \Macro{label}\Parameter{Labelname} ein Label +setzen und mit \Macro{ref}\Parameter{Labelname} dann an beliebiger Stelle im +Dokument darauf verweisen. Innerhalb des Briefes selbst erhält man dasselbe +Ergebnis auch ganz ohne Label mit \Macro{thisletter}. + +Für Label innerhalb von Serienbriefen ist es notwendig, diesen einen über alle +Briefe hinweg eindeutigen Namen zu geben. Auch dafür kann \Macro{thisletter} +verwendet werden. Intern arbeitet \KOMAScript{} für diesen Zweck ebenfalls mit +\Macro{thisletter}, um auf der letzten Seite eines jeden Briefes ein Label zu +setzen. Dadurch ist es möglich, mit +\Macro{letterlastpage}\IndexCmd{label}\IndexCmd{pageref} jederzeit innerhalb +des Briefes die Nummer der letzten Seite des Briefes auszugeben. Da +\Macro{letterlastpage} über \Macro{label} und \Macro{pageref} arbeitet, ist +die Ausgabe allerdings erst nach mehreren \LaTeX-Läufen -- meist zwei oder +drei -- gültig. Achten Sie gegebenenfalls auf entsprechende +\emph{Rerun}-Meldungen in der Terminal-Ausgabe oder der \File{log}-Datei.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{opening}\Parameter{Anrede} +\end{Declaration} +Dies ist eine der wichtigsten Anweisungen in Briefen. Vordergründig +wird damit die \PName{Anrede}\Index{Anrede}, beispielsweise »Sehr +geehrte Frau~\dots«, gesetzt. Tatsächlich\textnote{Achtung!} setzt diese +Anweisung aber auch alle Elemente des Briefbogens wie die +Faltmarken\Index{Faltmarke}, den Briefkopf\Index{Briefkopf}, die +Anschrift\Index{Anschrift}, die Absenderergänzung, die +Geschäftszeile\Index{Geschaeftszeile=Geschäftszeile}, den Titel\Index{Titel}, +den Betreff\Index{Betreff} und den +Seitenfuß\Index{Kopf}\Index{Fuss=Fuß}. Kurz\textnote{Ohne Anrede kein Brief!} +gesagt: ohne Anrede kein Brief. Soll tatsächlich einmal ein Brief ohne Anrede +gesetzt werden, so muss eben das Argument von \Macro{opening} leer bleiben. + +\begin{Example} + Kommen wir auf das Beispiel von + \DescPageRef{\LabelBase.env.letter.example} zurück. Wird dieses + um eine Anrede ergänzt, dann ergibt sich aus + \lstinputcode[xleftmargin=1em]{letter-example-00-de.tex} + der Briefbogen von \autoref{fig:\LabelBase.letter-0}. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Beispiel: Brief mit + Anschrift und Anrede}]{Ergebnis eines minimalistischen Briefes nur mit + Anschrift und Anrede (Datum und Faltmarken entstammen den + Voreinstellungen für DIN-Briefe)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-00-de}} + \end{captionbeside} + \label{fig:\LabelBase.letter-0} + \end{figure} +\end{Example} +\iffalse % Umbruchkorrekturtext +\begin{Explain} + Bei\textnote{Tipp!} maschinell erstellten Briefen wurde früher meist auf + eine Anrede verzichtet, da individualisierte Serienbriefe kaum möglich + waren. Heute sind persönliche Anreden auch bei Massensendungen üblich.% +\end{Explain}% +\else +\ExampleEndFix% Beispiel am Ende der Beschreibung +\fi +\EndIndexGroup + + +\begin{Declaration} + \Macro{closing}\Parameter{Grußfloskel} +\end{Declaration} +Mit der Anweisung \Macro{closing} wird in erster Linie die +\PName{Grußfloskel}\Index{Gruss=Gruß}\Index{Schlussgruss=Schlussgruß} +gesetzt. Diese kann auch mehrzeilig sein. Die einzelnen Zeilen sollten dann +mit doppeltem Backslash voneinander getrennt werden. Absätze innerhalb der +\PName{Grußfloskel} sind jedoch nicht gestattet. + +Darüber hinaus setzt diese Anweisung % +\iffalse% Umbruchkorrekturgelabler +aber auch noch gleich % +\fi% +den Inhalt der Variablen \DescRef{\LabelBase.variable.signature} als +Signatur. Näheres zur Signatur und deren Konfiguration ist +\autoref{sec:\LabelBase.closing} ab +\DescPageRef{\LabelBase.variable.signature} zu entnehmen. + +\begin{Example} + Erweitern wir unser Beispiel um einige Zeilen Brieftext und eine Grußfloskel + zu: + \lstinputcode[xleftmargin=1em]{letter-example-01-de.tex} + Damit sieht das Ergebnis wie in \autoref{fig:\LabelBase.letter-1} aus. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Beispiel: Brief mit Anschrift, + Anrede, Text und Grußfloskel}]{Ergebnis eines kleinen + Briefes mit Anschrift, Anrede, Text und Grußfloskel (Datum und + Faltmarken entstammen den Voreinstellungen für DIN-Briefe)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-01-de}} + \end{captionbeside} + \label{fig:\LabelBase.letter-1} + \end{figure} +\end{Example} +% +\EndIndexGroup +\ExampleEndFix% Beispiel am Ende der Beschreibung + + +\begin{Declaration} + \Macro{ps} +\end{Declaration}% +Diese Anweisung schaltet auf das +Postskriptum\Index{Postskriptum} um. Dazu wird ein neuer Absatz +begonnen und ein vertikaler Abstand -- in der Regel zur Signatur -- +eingefügt. Auf die Anweisung \Macro{ps} kann beliebiger Text folgen. +Dabei muss der Anwender auch selbst entscheiden, ob er den Nachsatz +etwa mit der Abkürzung »PS:«, die übrigens ohne Punkt gesetzt wird, +beginnen will. \KOMAScript{} setzt diese Abkürzung weder +automatisch noch optional. + +\begin{Example} + Unser Beispielbrief, um ein Postskriptum erweitert, + \lstinputcode[xleftmargin=1em]{letter-example-02-de.tex} + sieht dann wie in \autoref{fig:\LabelBase.letter-2} aus. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Beispiel: Brief mit Anschrift, + Anrede, Text, Grußfloskel und Postskriptum}]{Ergebnis eines kleinen + Briefes mit Anschrift, Anrede, Text, Grußfloskel und Postskriptum + (Datum und Faltmarken entstammen den Voreinstellungen für + DIN-Briefe)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-02-de}} + \end{captionbeside} + \label{fig:\LabelBase.letter-2} + \end{figure} +\end{Example}% +\iffalse % Umbruchkorrektur +\begin{Explain}% + Als Briefe noch von Hand geschrieben wurden, war das Postskriptum + sehr beliebt. Es handelte sich bei diesen Nachsätzen ursprünglich um + Angaben, die im eigentlichen Brief vergessen wurden. Bei Briefen, + die mit \LaTeX{} geschrieben werden, ist es natürlich einfach, + Vergessenes nachträglich in den Brief einzuarbeiten. % +\iftrue % Umbruchkorrektur + Trotzdem ist das Postskriptum noch immer sehr beliebt, kann man damit doch + sehr schön noch einmal auf ganz andere äußerst wichtige oder eigentlich + ganz unwichtige Dinge hinweisen.% +\fi% +\iffalse % Umbruchkorrektur + Heutzutage verwendet man das Postskriptum dagegen eher für + Hinweise, die mit dem eigentlichen Briefinhalt wenig zu tun haben. +\fi% +\end{Explain}% +\else% +\ExampleEndFix% Beispiel am Ende +\fi% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{cc}\Parameter{Verteiler} + \Variable{ccseparator} +\end{Declaration} +Ein \PName{Verteiler}\Index{Verteiler} kann mit der Anweisung \Macro{cc} +gesetzt werden. % +\iftrue% Umbruchkorrektur +Der \PName{Verteiler} wird der Anweisung dabei als Argument übergeben. % +\fi% +Wenn der \PName{Inhalt} der Variablen +\Variable{ccseparator}\Index{Trennzeichen} nicht leer ist, wird dem +\PName{Verteiler} die \PName{Bezeichnung} und der \PName{Inhalt} dieser +Variablen vorangestellt. Der \PName{Verteiler} selbst wird dann um die +entsprechende Breite eingerückt ausgegeben. Es empfiehlt\textnote{Tipp!} +sich, den \PName{Verteiler} \Macro{raggedright}\IndexCmd{raggedright} zu +setzen und die einzelnen Angaben durch doppelten Backslash voneinander zu +trennen. +\begin{Example} + Der Beispielbrief soll dieses Mal nicht nur an die Vorsitzende, sondern mit + Verteiler auch an alle Mitglieder des Vereins gehen: + \lstinputcode[xleftmargin=1em]{letter-example-03-de.tex}% + \iftrue % Umbruchkorrektur (siehe auch unten) + Das Ergebnis ist in \autoref{fig:\LabelBase.letter-3} zu sehen.% + \fi% + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Beispiel: Brief mit Anschrift, + Anrede, Text, Grußfloskel, Postskriptum und Verteiler}]{Ergebnis eines + kleinen Briefes mit Anschrift, Anrede, Text, Grußfloskel, Postskriptum + und Verteiler (Datum und Faltmarken entstammen den Voreinstellungen + für DIN-Briefe)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-03-de}} + \end{captionbeside} + \label{fig:\LabelBase.letter-3} + \end{figure} +\end{Example} +\iftrue% Umbruchkorrektur in Korrelation zu der im Beispiel +Vor dem Verteiler wird automatisch ein Abstand eingefügt.% +\else% +Wie in \autoref{fig:\LabelBase.letter-3} zu sehen, wird vor dem Verteiler +automatisch ein Abstand eingefügt.% +\fi% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{encl}\Parameter{Anlagen} + \Variable{enclseparator} +\end{Declaration} +Die \PName{Anlagen}\Index{Anlagen} sind genauso aufgebaut wie der +Verteiler. Der einzige Unterschied besteht darin, dass die Einleitung +hier von der \PName{Bezeichnung} und dem \PName{Inhalt} der Variablen +\Variable{enclseparator}\Index{Trennzeichen} bestimmt wird. +\begin{Example} + Dem Beispielbrief wird nun als Anlage noch ein Auszug aus der Satzung + beigefügt. Da es nur eine Anlage gibt, wird auch die voreingestellte + Bezeichnung passend geändert: + \lstinputcode[xleftmargin=1em]{letter-example-04-de.tex} + Das Ergebnis ist in \autoref{fig:\LabelBase.letter-4} zu sehen. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Beispiel: Brief mit Anschrift, + Anrede, Text, Grußfloskel, Postskriptum, Anlagen und + Verteiler}]{Ergebnis eines kleinen Briefes mit Anschrift, Anrede, + Text, Grußfloskel, Postskriptum, Anlagen und Verteiler (Datum und + Faltmarken entstammen den Voreinstellungen für DIN-Briefe)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-04-de}} + \end{captionbeside} + \label{fig:\LabelBase.letter-4} + \end{figure} +\end{Example} +% +\EndIndexGroup +% +\EndIndexGroup + +\LoadCommonFile{fontsize} % \section{Wahl der Schriftgröße für das Dokument} + +\LoadCommonFile{textmarkup} % \section{Textauszeichnungen} + +\section{Briefbogen} +\seclabel{firstpage} +\BeginIndexGroup +\BeginIndex{}{Briefbogen} + +Der Briefbogen ist die erste Seite und damit das Aushängeschild jedes +Briefes. Im geschäftlichen Bereich handelt es sich dabei oft um einen +Vordruck, auf dem viele Elemente, wie ein Briefkopf mit Absenderinformationen +und Logo, bereits enthalten sind. Bei \KOMAScript{} sind diese Elemente frei +positionierbar. Damit ist es nicht nur möglich, einen Briefbogen direkt +nachzubilden, sondern auch vorgesehene Felder, wie die Anschrift, unmittelbar +auszufüllen. Die freie Positionierbarkeit wird über Pseudolängen (siehe +\autoref{sec:\LabelBase.pseudoLength} ab +\autopageref{sec:\LabelBase.pseudoLength}) erreicht. Eine schematische +Darstellung des Briefbogens und der dafür verwendeten Variablen ist in +\autoref{fig:\LabelBase.variables} zu finden. Dabei sind die Namen der +Variablen zur besseren Unterscheidung von Anweisungen und deren Argumenten +fett gedruckt. + +Folgeseiten\Index{Folgeseite} sind vom Briefbogen zu +unterscheiden. Folgeseiten im Sprachgebrauch dieser Anleitung sind alle +Briefseiten abgesehen von der ersten. + + +\begin{figure} + \centering + \tikzset{x=.56mm,y=-.56mm} + \tiny + \input{variables-tikz.tex} + \caption{Schematische Darstellung des Briefbogens mit den wichtigsten + Anweisungen und Variablen für die skizzierten Elemente} + \label{fig:\LabelBase.variables} +\end{figure} + + +\subsection{Faltmarken} +\seclabel{foldmarks} +\BeginIndexGroup +\BeginIndex{}{Faltmarke}% + +Falt- oder Falzmarken sind kleine horizontale Striche am linken und kleine +vertikale Striche am oberen Rand. \KOMAScript{} unterstützt für den Briefbogen +derzeit drei konfigurierbare horizontale und eine konfigurierbare vertikale +Faltmarke. Dazu wird noch eine horizontale Loch- oder Seitenmittenmarke +unterstützt, die nicht in der Vertikalen verschoben werden kann. + +\begin{Declaration} + \OptionVName{foldmarks}{Einstellung} +\end{Declaration} +Mit der Option \Option{foldmarks} können Faltmarken\Index{Faltmarke} für eine +vertikale Zwei"~, Drei- oder Vierteilung und eine horizontale Zweiteilung +aktiviert oder deaktiviert werden. Die einzelnen Teile müssen dabei nicht +äquidistant sein. Die Positionen von drei der vier horizontalen und der +vertikalen Marke sind über Pseudolängen konfigurierbar (siehe +\autoref{sec:\LabelBase.pseudoLength}, +\autopageref{sec:\LabelBase.pseudoLength}). + +Über die Option \Option{foldmarks} können entweder mit den Standardwerten für +einfache Schalter, die in \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} angegeben sind, alle konfigurierten +Faltmarken am linken und oberen Rand ein- und ausgeschaltet werden, +oder\ChangedAt{v2.97e}{\Class{scrlttr2}} es kann durch die Angabe eines oder +mehrerer Buchstaben aus \autoref{tab:\LabelBase.foldmark} die Verwendung der +einzelnen Faltmarken gezielt konfiguriert werden. Auch in diesem Fall werden +die Faltmarken nur dann angezeigt, wenn die Faltmarken nicht mit +\PValue{false}, \PValue{off} oder \PValue{no} generell abgeschaltet +wurden. Die genaue Position der Faltmarken ist von den Einstellungen des +Anwenders beziehungsweise der \File{lco}-Dateien (siehe +\autoref{sec:\LabelBase.lcoFile} ab \autopageref{sec:\LabelBase.lcoFile}) +abhängig. Voreingestellt sind \PValue{true} und +\PValue{TBMPL}.\textnote{Voreinstellung} +% +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside}[{% + Kombinierbare Werte für die Konfiguration der Faltmarken mit der + Option \Option{foldmarks}% + }]{% + \hspace{0pt plus 1ex}% + Kombinierbare Werte für die Konfiguration der Faltmarken mit der + Option \Option{foldmarks}\label{tab:\LabelBase.foldmark}% + }[l] + \begin{tabular}[t]{ll} + \toprule + \PValue{B} & untere, horizontale Faltmarke am linken Rand aktivieren\\% + \PValue{b} & untere, horizontale Faltmarke am linken Rand deaktivieren\\% + \PValue{H} & alle horizontalen Faltmarken am linken Rand aktivieren\\% + \PValue{h} & alle horizontalen Faltmarken am linken Rand deaktivieren\\% + \PValue{L} & linke, vertikale Faltmarke am oberen Rand aktivieren\\% + \PValue{l} & linke, vertikale Faltmarke am oberen Rand deaktivieren\\% + \PValue{M} & mittlere, horizontale Faltmarke am linken Rand aktivieren\\% + \PValue{m} & mittlere, horizontale Faltmarke am linken Rand deaktivieren\\% + \PValue{P} & Locher- bzw. Seitenmittenmarke am linken Rand aktivieren\\% + \PValue{p} & Locher- bzw. Seitenmittenmarke am linken Rand deaktivieren\\% + \PValue{T} & obere, horizontale Faltmarke am linken Rand aktivieren\\% + \PValue{t} & obere, horizontale Faltmarke am linken Rand deaktivieren\\% + \PValue{V} & alle vertikalen Faltmarken am oberen Rand aktivieren\\% + \PValue{v} & alle vertikalen Faltmarken am oberen Rand deaktivieren\\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} +\begin{Example} + Angenommen, Sie wollen alle Faltmarken außer der Lochermarke + abschalten. Wenn die Voreinstellung zuvor noch nicht geändert wurde, können + Sie das Abschalten wie folgt erreichen: +\begin{lstcode} + \KOMAoptions{foldmarks=blmt} +\end{lstcode} + Besteht die Möglichkeit, dass die Voreinstellung bereits geändert wurde, so + sollten Sie lieber auf Nummer Sicher gehen. Unser Beispiel ist dann + entsprechend abzuändern.% + \lstinputcode[xleftmargin=1em]{letter-example-07-de.tex}% + Das Ergebnis ist in \autoref{fig:\LabelBase.letter-7} zu sehen. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Beispiel: Brief mit Anschrift, + Anrede, Text, Grußfloskel, Postskriptum, Anlagen, Verteiler und + Lochermarke}]{Ergebnis eines kleinen Briefes mit Anschrift, Anrede, + Text, Grußfloskel, Postskriptum, Anlagen, Verteiler und Lochermarke + (das Datum entstammt den Voreinstellungen für DIN-Briefe)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-07-de}} + \end{captionbeside} + \label{fig:\LabelBase.letter-7} + \end{figure} +\end{Example} +\BeginIndex{FontElement}{foldmark}\LabelFontElement{foldmark}% +Über\ChangedAt{v2.97c}{\Class{scrlttr2}} das Element \FontElement{foldmark} +kann die Farbe der Faltmarken geändert werden. Dazu werden die Anweisungen +\DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) +verwendet. Voreingestellt ist keine Änderung.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{tfoldmarkvpos} + \PLength{mfoldmarkvpos} + \PLength{bfoldmarkvpos} +\end{Declaration} +\KOMAScript{} kennt für Briefe \Class{scrlttr2} insgesamt drei in der vertikalen +Platzierung konfigurierbare Faltmarken. Die Position der oberen Faltmarke vom +oberen Papierrand wird von der Pseudolänge \PLength{tfoldmarkvpos} +bestimmt. Für die Position der mittleren Faltmarke ist Pseudolänge +\PLength{mfoldmarkvpos}\ChangedAt{v2.97e}{\Class{scrlttr2}}, für die untere +Faltmarke \PLength{bfoldmarkvpos} zuständig. Mit der +Locher-\Index{Lochermarke} oder Seitenmittenmarke kommt noch eine weitere +horizontale Marke dazu. Diese wird jedoch immer in der vertikalen Seitenmitte +platziert. +\iffalse% Umbruchkorrekturtext! +Da ihre vertikale Position also nicht konfigurierbar ist, existiert +auch keine Pseudolänge dafür. +\fi + +Die\important{Achtung!} obere und untere Faltmarke dienen nicht der exakten +Drittelung des Papiers beim Falten. Vielmehr soll das Papier mit ihrer Hilfe +so geknickt werden können, dass das Feld für die Anschrift in einem +Fensterbriefumschlag zu sehen ist. Die Einstellungen sind daher von den +\File{lco}-Dateien\textnote{\File{lco}-Datei}% +\Index{lco-Datei=\File{lco}-Datei} abhängig. Eine +Besonderheit\textnote{Achtung!} stellt \Option{DINmtext} dar. Hier wird +von einem Briefumschlag im Format C6/5 (auch »C6 lang« genannt) +ausgegangen. Briefe, die mit dieser Option erstellt wurden, sind normalerweise +nicht für Fensterbriefumschläge im Format C5 oder C4 geeignet. + +Die mittlere Faltmarke wird für abendländische Briefe normalerweise nicht +benötigt. Beispielsweise in Japan gibt es jedoch so unterschiedliche +Briefumschläge, dass eine weitere Faltmarke benötigt wurde (siehe die +japanischen \File{lco}-Dateien). An dieser Stelle sei darauf hingewiesen, dass +die Bezeichnungen »obere«, »mittlere« und »untere« Faltmarke lediglich eine +Sprachkonvention darstellen. Tatsächlich ist nicht festgelegt, dass +\PLength{tfoldmarkvpos} kleiner als \PLength{mfoldmarkvpos} und dieses kleiner +als \PLength{bfoldmarkvpos} sein muss. Ist\textnote{Achtung!} eine der +Pseudolängen hingegen Null, so wird die entsprechende Faltmarke auch dann +nicht gesetzt, wenn sie per Option \DescRef{\LabelBase.option.foldmarks}% +\IndexOption{foldmarks~=\PName{Einstellung}}% +\important{\DescRef{\LabelBase.option.foldmarks}} (siehe +\DescPageRef{\LabelBase.option.foldmarks}) explizit aktiviert wurde.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{tfoldmarklength} + \PLength{mfoldmarklength} + \PLength{bfoldmarklength} + \PLength{pfoldmarklength} +\end{Declaration} +Diese\ChangedAt{v2.97e}{\Class{scrlttr2}} vier Pseudolängen bestimmen die +Länge der vier horizontalen Marken. Dabei gilt eine +Besonderheit. Ist\textnote{Achtung!} die Länge nämlich mit Null angegeben, so +werden bei den Pseudolängen \PLength{tfoldmarklength}, +\PLength{mfoldmarklength} und \PLength{bfoldmarklength} für die drei in der +vertikalen Position konfigurierbaren Faltmarken stattdessen 2\Unit{mm} als +Länge verwendet. Die Länge der Lochermarke, \PLength{pfoldmarklength}, wird +hingegen auf 4\Unit{mm} gesetzt.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{foldmarkhpos} +\end{Declaration} +Diese Pseudolänge gibt den Abstand aller horizontalen Faltmarken vom linken +Papier\-rand an. Normalerweise sind das 3{,}5\Unit{mm}. Sie\textnote{Tipp!} +können den Wert aber auch in Ihrer eigenen \File{lco}-Datei ändern, falls Sie +einen Drucker verwenden, der einen breiteren unbedruckbaren linken Rand +hat. Ob die Faltmarken überhaupt gesetzt werden, hängt außerdem von der Option +\DescRef{\LabelBase.option.foldmarks}% +\important{\DescRef{\LabelBase.option.foldmarks}}% +\IndexOption{foldmarks~=\PName{Einstellung}} ab (siehe +\DescPageRef{\LabelBase.option.foldmarks}).% +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{lfoldmarkhpos} +\end{Declaration} +Neben\ChangedAt{v2.97e}{\Class{scrlttr2}} den horizontalen Faltmarken gibt es +auch noch eine vertikale Faltmarke. Deren Abstand von der linken Papierkante +wird über die Pseudolänge \PLength{lfoldmarkhpos} bestimmt. Diese Faltmarke +wird beispielsweise bei Briefen für einige japanische Chou- oder You-Umschläge +benötigt, wenn man diese für A4-Papier verwenden +will. In\textnote{Voreinstellung} den japanischen +\File{lco}-Dateien\Index{lco-Datei=\File{lco}-Datei} (siehe +\autoref{sec:\LabelBase.lcoFile} ab \autopageref{sec:\LabelBase.lcoFile}) ist +daher ein Wert von 202\Unit{mm} voreingestellt. Mit der Voreinstellung Null +der übrigen \File{lco}-Dateien wird auch dann keine Marke ausgegeben, wenn sie +per Option \DescRef{\LabelBase.option.foldmarks}% +\important{\DescRef{\LabelBase.option.foldmarks}}% +\IndexOption{foldmarks~=\PName{Einstellung}} (siehe +\DescPageRef{\LabelBase.option.foldmarks}) aktiviert wird.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{lfoldmarklength} +\end{Declaration} +Die Pseudolänge \PLength{lfoldmarklength} bestimmt +die\ChangedAt{v2.97e}{\Class{scrlttr2}} Länge der vertikalen +Faltmarke. Auch\textnote{Achtung!} hier gibt es die Besonderheit, dass bei +einer angegebenen Länge von Null stattdessen 4\Unit{mm} verwendet werden.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{foldmarkvpos} +\end{Declaration} +Die\ChangedAt{v2.97e}{\Class{scrlttr2}} Pseudolänge gibt den Abstand +\iffree{aller}{der} vertikalen Faltmarke\iffree{n}{} vom oberen Papier\-rand +an. Normalerweise\textnote{Voreinstellung} sind das 3{,}5\Unit{mm}. % +\iffalse% Umbruchkorrektur +Sie\textnote{Tipp!} können den Wert aber auch in Ihrer eigenen +\File{lco}-Datei ändern, falls Sie einen Drucker verwenden, der einen +breiteren unbedruckbaren oberen Rand hat. % +\fi% +Ob die Faltmarke\iffree{n}{} überhaupt gesetzt \iffree{werden}{wird}, hängt +außerdem von der Option \DescRef{\LabelBase.option.foldmarks}% +\important{\DescRef{\LabelBase.option.foldmarks}}% +\IndexOption{foldmarks~=\PName{Einstellung}} ab (siehe +\DescPageRef{\LabelBase.option.foldmarks}).\iffree{ Derzeit gibt es nur eine + einzige vertikale Faltmarke, die als linke vertikale Faltmarke bezeichnet + wird.}{}% +\EndIndexGroup + + +\begin{Declaration} + \PLength{foldmarkthickness} +\end{Declaration} +Diese\ChangedAt{v2.97c}{\Class{scrlttr2}} Pseudolänge gibt die Dicke aller +Faltmarken an. Voreingestellt\textnote{Voreinstellung} sind 0,2\Unit{pt}, also +eine sehr dünne Haarlinie. Insbesondere wenn die Farbe der Faltmarken +geändert wird, kann dies zu wenig sein!% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Briefkopf} +\seclabel{firstHead} +\BeginIndexGroup +\BeginIndex{}{Briefkopf}% + +Unter dem Briefkopf verstehen wir alle Angaben, die den Absender betreffen und +die über der Anschrift stehen. Normalerweise würde man erwarten, dass diese +über den Seitenstil gesetzt werden. % +\iffalse% Umruchkorrektur +Bei der alten Briefklasse \Class{scrlettr} war dies auch so. % +\fi% +Bei\textnote{Achtung!} \Class{scrlttr2} und \Package{scrletter} wird der +Briefkopf jedoch unabhängig vom Seitenstil von der Anweisung +\DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} ausgegeben. +\iffalse% Umbruchkorrektur +Dabei wird der Briefkopf absolut positioniert, ist also vom Satzspiegel +unabhängig. Die erste Seite eines Briefes, also die Seite mit dem Briefkopf, +wird tatsächlich mit dem Seitenstil +\DescRef{\LabelBase.pagestyle.empty}\IndexPagestyle{empty} gesetzt.% +\fi + +\begin{Declaration} + \OptionVName{firsthead}{Ein-Aus-Wert} +\end{Declaration} +\iffalse% Umbruchkorrekturtext +Das\ChangedAt{v2.97e}{\Class{scrlttr2}} oberste Element eines Briefbogens ist +normalerweise der Briefkopf. Bei +\else% +Bei\ChangedAt{v2.97e}{\Class{scrlttr2}} +\fi% +\KOMAScript{} kann mit der Option +\Option{firsthead} gewählt werden, ob der Briefkopf auf dem Briefbogen +überhaupt gesetzt werden soll. Als \PName{Ein-Aus-Wert} kann dabei einer der +Standardwerte für einfache Schalter aus \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} verwendet werden. In der Voreinstellung ist +der Briefkopf aktiviert.\textnote{Voreinstellung}%% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{fromalign}{Methode} +\end{Declaration} +\BeginIndex{}{Briefkopf}% +Die\important{\Option{fromalign}} Option \Option{fromalign} bestimmt, wo der +Absender\Index{Absender} auf der ersten Seite platziert werden soll. Neben +verschiedenen Platzierungen im Briefkopf gibt es +auch\ChangedAt{v2.97e}{\Class{scrlttr2}} die Möglichkeit, den Absender in der +Absenderergänzung\Index{Absenderergaenzung=Absenderergänzung} +unterzubringen. Gleichzeitig\textnote{Achtung!} dient diese Option als +zentraler Schalter, um die Erweiterungen der Briefkopfgestaltung überhaupt zu +aktivieren oder zu deaktivieren. Sind die Erweiterungen deaktiviert, so +bleiben % +\iffalse % Umbruchkorrektur +die Optionen \DescRef{\LabelBase.option.fromrule}, +\DescRef{\LabelBase.option.fromphone}, +\DescRef{\LabelBase.option.frommobilephone}, +\DescRef{\LabelBase.option.fromemail}, \DescRef{\LabelBase.option.fromurl} und +\DescRef{\LabelBase.option.fromlogo} % +\else% +diverse Optionen für den Absender % +\fi % +ohne Wirkung. Mögliche Werte für \Option{fromalign} sind +\autoref{tab:\LabelBase.fromalign} zu entnehmen. Voreingestellt ist der Wert +\PValue{left}.\textnote{Voreinstellung}% +\EndIndexGroup +% +\begin{table} + \Index{Briefkopf}% + \caption[{Mögliche Werte für Option + \Option{fromalign} zur Platzierung des Absenders auf dem Briefbogen}] + {Mögliche Werte für Option + \Option{fromalign} zur Platzierung des Absenders auf dem Briefbogen} + \label{tab:\LabelBase.fromalign} + \begin{desctabular} + \entry{\PValue{center}, \PValue{centered}, \PValue{middle}}{% + Der Absender wird innerhalb des Briefkopfes zentriert; ein Logo wird + gegebenenfalls am Anfang der erweiterten Absenderangabe platziert; die + Erweiterungen der Briefkopfgestaltung werden + aktiviert.}\\[-1.7ex] + \entry{\PValue{false}, \PValue{no}, \PValue{off}}{% + Die einfache Form des Absender wird verwendet; die Erweiterungen der + Briefkopfgestaltung werden deaktiviert; die Optionen + \DescRef{\LabelBase.option.fromrule}, + \DescRef{\LabelBase.option.fromphone}, + \DescRef{\LabelBase.option.frommobilephone}, + \DescRef{\LabelBase.option.fromemail}, + \DescRef{\LabelBase.option.fromurl} und + \DescRef{\LabelBase.option.fromlogo} werden + wirkungslos.}\\[-1.7ex] + \entry{\PValue{left}}{% + Der Absender steht linksbündig im Briefkopf; ein Logo wird + gegebenenfalls rechtsbündig platziert; die Erweiterungen der + Briefkopfgestaltung werden + aktiviert.}\\[-1.7ex] + \entry{\PValue{locationleft}, \PValue{leftlocation}}{% + Der Absender steht linksbündig in der Absenderergänzung; ein Logo wird + gegebenenfalls darüber platziert; der Briefkopf wird automatisch + deaktiviert, kann aber über Option \DescRef{\LabelBase.option.firsthead} + wieder aktiviert werden.}\\[-1.7ex] + \entry{\PValue{locationright}, \PValue{rightlocation}, + \PValue{location}}{% + Der Absender steht rechtsbündig in der Absenderergänzung; ein Logo wird + gegebenenfalls darüber platziert; der Briefkopf wird automatisch + deaktiviert, kann aber über Option \DescRef{\LabelBase.option.firsthead} + wieder aktiviert werden.}\\[-1.7ex] + \entry{\PValue{right}}{% + Der Absender steht rechtsbündig im Briefkopf; ein Logo wird + gegebenenfalls linksbündig platziert; die Erweiterungen der + Briefkopfgestaltung werden aktiviert.}% + \end{desctabular} +\end{table} + + +\begin{Declaration} + \PLength{firstheadvpos} +\end{Declaration} +Die Pseudolänge \PLength{firstheadvpos} gibt den Abstand des Briefkopfes von +der oberen Papierkante an. Der Wert wird in den vordefinierten +\File{lco}-Dateien\textnote{\File{lco}-Datei}\Index{lco-Datei=\File{lco}-Datei} +unterschiedlich gesetzt. Ein typischer Wert ist 8\Unit{mm}.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{firstheadhpos} +\end{Declaration} +Die Pseudolänge \PLength{firstheadhpos}\ChangedAt{v3.05}{\Class{scrlttr2}} +gibt bei einem positiven Wert den Abstand des Briefkopfes von der linken +Papierkante an. Ist\textnote{Achtung!} der Wert sogar größer oder gleich der +Breite des Papiers, +\Length{paperwidth}\important{\Length{paperwidth}}\IndexLength{paperwidth}, so +wird der Briefkopf horizontal zentriert auf dem Briefbogen platziert. Ein +negativer Wert gibt den Abstand des Briefkopfes von der rechten Papierkante +an. Ist der Wert jedoch kleiner oder gleich der negativen Breite des Papiers, +so wird der Briefkopf bündig zum linken Rand des Satzspiegels platziert. +Voreingestellt\textnote{Voreinstellung} ist typischerweise ein Wert von +\Length{maxdimen}\IndexLength{maxdimen}% +\iffalse % Umbruchkorrektur +, also der größtmögliche Wert für eine Länge% +\fi% +\ und infolge dessen horizontale Zentrierung.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{firstheadwidth} +\end{Declaration} +Die Pseudolänge \PLength{firstheadwidth} gibt die Breite des Briefkopfes +an. Der Wert wird in den vordefinierten +\File{lco}-Dateien\textnote{\File{lco}-Datei}\Index{lco-Datei=\File{lco}-Datei} +unterschiedlich gesetzt. Während er normalerweise\textnote{Voreinstellung} von +der Papierbreite und dem horizontalen Abstand der Empfängeradresse vom linken +Papierrand abhängt, entspricht er bei \Option{KOMAold} der Breite des +Satzspiegels und ist bei \Option{NF} fest auf 170\Unit{mm} eingestellt.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{fromrule}{Position} + \Variable{fromname} + \Variable{fromaddress} +\end{Declaration} +Der\important{\Variable{fromname}} Name des Absenders wird über die Variable +\Variable{fromname} bestimmt. Im Briefkopf wird dabei die \PName{Bezeichnung} +(siehe auch \autoref{tab:\LabelBase.fromTerm}, +\autopageref{tab:\LabelBase.fromTerm}) nicht gesetzt. + +Optional\important{\OptionValue{fromrule}{aftername}} kann mit Einstellung +\OptionValue{fromrule}{aftername} im erweiterten Briefkopf auf den Namen eine +horizontale Linie +folgen. Alternativ\important{\OptionValue{fromrule}{afteraddress}} kann die +Linie mit \OptionValue{fromrule}{afteraddress} auch unterhalb des kompletten +Absenders gesetzt werden. Eine Übersicht über alle möglichen Einstellungen für +die Linie bietet \autoref{tab:\LabelBase.fromrule}. Die Länge der Linie wird +über die Pseudolänge +\DescRef{\LabelBase.plength.fromrulewidth}\IndexPLength{fromrulewidth} +bestimmt (siehe \DescPageRef{\LabelBase.plength.fromrulewidth}). + +\begin{table} + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside} + [{% + Mögliche Werte für Option \Option{fromrule}% + }]{% + \label{tab:\LabelBase.fromrule}% + Mögliche Werte für Option \Option{fromrule} zur + Platzierung einer horizontalen Linie im Absender des erweiterten + Briefkopfes von \Class{scrlttr2} und \Package{scrletter}% + }% + [l]% +% \label{tab:\LabelBase.fromrule}% + \begin{minipage}[t]{.6\linewidth}% + \begin{desctabular}[t] + \entry{% + \PValue{afteraddress}, \PValue{below}, \PValue{on}, \PValue{true}, + \PValue{yes}}{% + Linie unterhalb des kompletten Absenders}% + \entry{\PValue{aftername}}{% + Linie direkt unter dem Namen des Absenders}% + \entry{\PValue{false}, \PValue{no}, \PValue{off}}{% + keine Linie}% + \end{desctabular} + \end{minipage} + \end{captionbeside} +\end{table} + +In der Voreinstellung\textnote{Voreinstellung} ist die Linie im erweiterten +Briefkopf nicht aktiviert. Im einfachen Briefkopf wird die Linie immer nach +dem Namen gesetzt. + +Unter\important{\Variable{fromaddress}} dem Namen folgt die Anschrift des +Absenders. Diese wird über die Variable \Variable{fromaddress} bestimmt. Im +Briefkopf wird dabei die \PName{Bezeichnung} (siehe auch +\autoref{tab:\LabelBase.fromTerm}, \autopageref{tab:\LabelBase.fromTerm}) nicht +gesetzt. + +\BeginIndexGroup +\BeginIndex{FontElement}{fromaddress}\LabelFontElement{fromaddress}% +\BeginIndex{FontElement}{fromname}\LabelFontElement{fromname}% +\BeginIndex{FontElement}{fromrule}\LabelFontElement{fromrule}% +Die Schrift, die für den Absender verwendet wird, kann über das Element +\FontElement{fromaddress}\IndexFontElement{fromaddress}% +\important{\FontElement{fromaddress}} eingestellt werden. Abweichungen davon +können für den Absendernamen über das Element +\FontElement{fromname}\IndexFontElement{fromname}% +\important{\FontElement{fromname}} und für die % +\iffalse% Umbruchkorrektur +mit \Option{fromrule} gesetzte % +\else % +optionale % +\fi% +Linie über das Element \FontElement{fromrule}\IndexFontElement{fromrule}% +\important{\FontElement{fromrule}} eingestellt werden. In der Voreinstellung +erfolgt keinerlei Schriftumschaltung. Bei der Linie ist die Möglichkeit der +Schriftumschaltung hauptsächlich dazu gedacht, die Farbe % +\iffalse % Umbruchkorrektur +der Linie % +\fi +ändern zu können% +\iffalse% Umbruchkorrektur +, um etwa Grau anstelle von Schwarz zu verwenden% +\fi% +. Siehe hierzu \cite{package:xcolor}.% +% +\EndIndexGroup +% +\begin{Example} + Geben wir nun dem Absender + \iffalse % Umbruchkorrektur + aus den bisherigen Beispielen + \fi % + einen Namen. + \lstinputcode[xleftmargin=1em]{letter-example-08-de.tex} + \begin{figure} + \centering + \frame{\includegraphics[width=.4\textwidth]{letter-example-08-de}}\quad + \frame{\includegraphics[width=.4\textwidth]{letter-example-09-de}} + \caption[{Beispiel: Brief mit Absender, Anschrift, Anrede, + Text, Grußfloskel, Signatur, Postskriptum, Anlagen und Verteiler}] + {Ergebnis eines kleinen Briefes mit Absender, Anschrift, Anrede, Text, + Grußfloskel, Signatur, Postskriptum, Anlagen und Verteiler (Datum und + Faltmarken entstammen den Voreinstellungen für DIN-Briefe); links der + einfache Briefkopf mit \OptionValueRef{\LabelBase}{fromalign}{false}, + rechts der + erweiterte Briefkopf mit \OptionValueRef{\LabelBase}{fromalign}{center}} + \label{fig:\LabelBase.letter-8-9} + \end{figure} + Dabei wird zunächst % + \iffalse % Umbruchkorrektur + einmal nicht der erweiterte Briefkopf, sondern % + \fi % + nur der einfache Briefkopf verwendet. Das Ergebnis ist in + \autoref{fig:\LabelBase.letter-8-9} links zu sehen. Im Vergleich dazu ist + rechts daneben das gleiche Beispiel, jedoch mit Option + \OptionValueRef{\LabelBase}{fromalign}{center}, also mit den aktivierten + Erweiterungen für den Briefkopf, abgebildet. Wie zu sehen ist, hat diese + Variante zunächst einmal keine Linie. + + In \autoref{fig:\LabelBase.letter-8-9} taucht nun auch erstmals eine Signatur + unter dem Gruß auf. Diese wird automatisch aus dem Absendername + gewonnen. Wie sie konfiguriert werden kann, ist in + \autoref{sec:\LabelBase.closing} ab \autopageref{sec:\LabelBase.closing} zu + finden. + + Nun soll der Brief mit aktivierter Erweiterung für den Briefkopf mit Hilfe + der Option \Option{fromrule} auch noch eine Linie unter dem Namen erhalten:% + \lstinputcode[xleftmargin=1em]{letter-example-11-de.tex}% + Das Ergebnis ist in \autoref{fig:\LabelBase.letter-10-11} rechts zu sehen. % + \iffalse % Umbruchkorrektur + Im Vergleich dazu ist links daneben das gleiche Beispiel noch einmal mit dem + einfachen Briefkopf und ohne Reaktion auf die zusätzliche Option. + % + \else % + Links steht zum Vergleich ein Beispiel mit dem einfachen Briefkopf. + % + \fi + % + \begin{figure} + \centering + \frame{\includegraphics[width=.4\textwidth]{letter-example-10-de}}\quad + \frame{\includegraphics[width=.4\textwidth]{letter-example-11-de}} + \caption[{Beispiel: Brief mit Absender, Trennlinie, Anschrift, Anrede, Text, + Grußfloskel, Signatur, Postskriptum, Anlagen, Verteiler und + Lochermarke}]{Ergebnis eines kleinen Briefes mit Absender, Trennlinie, + Anschrift, Anrede, Text, Grußfloskel, Signatur, Postskriptum, Anlagen, + Verteiler und Lochermarke (das Datum entstammt den Voreinstellungen für + DIN-Briefe); links der einfache Briefkopf mit + \OptionValueRef{\LabelBase}{fromalign}{false}, rechts der erweiterte + Briefkopf mit \OptionValueRef{\LabelBase}{fromalign}{center}} + \label{fig:\LabelBase.letter-10-11} + \end{figure} +\end{Example} + +Ein\textnote{Achtung!} wichtiger Hinweis betrifft \iffree{noch}{\unskip} die +Absenderadresse: Innerhalb der Absenderadresse werden einzelne Teilangaben +durch doppelten Backslash voneinander getrennt. Solche Teilangaben sind +beispielsweise Straße und Hausnummer, Postleitzahl und Ort oder eine +Länderangabe. Dieser doppelte Backslash wird je nach Verwendung der +Absenderadresse unterschiedlich interpretiert und ist nicht zwangsläufig als +Zeilenumbruch zu verstehen. Absätze, vertikale Abstände und Ähnliches sind +innerhalb der Absenderangaben normalerweise nicht gestattet% +\iffalse % Umbruchkorrektur +. Man muss \KOMAScript{} schon sehr genau kennen, um solche Mittel +gegebenenfalls sinnvoll im Absender einsetzen zu können. Außerdem sollte man +in dem Fall unbedingt die Variablen für Rücksendeadresse (siehe Variable +\DescRef{\LabelBase.variable.backaddress}, +\DescPageRef{\LabelBase.variable.backaddress}) und Signatur (siehe Variable +\DescRef{\LabelBase.variable.signature}, +\DescPageRef{\LabelBase.variable.signature}) selbst setzen.% +\else % +\ und hätten außerdem gegebenenfalls Auswirkungen auf die Rücksendeadresse +(siehe Variable \DescRef{\LabelBase.variable.backaddress}, +\DescPageRef{\LabelBase.variable.backaddress}) und Signatur (siehe Variable +\DescRef{\LabelBase.variable.signature}, +\DescPageRef{\LabelBase.variable.signature}).% +\fi % +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{fromrulethickness} + \PLength{fromrulewidth} +\end{Declaration} +Wie bereits bei Option +\DescRef{\LabelBase.option.fromrule}\IndexOption{fromrule} auf +\DescPageRef{\LabelBase.option.fromrule} erwähnt wurde, kann in den +vordefinierten Briefköpfen eine Linie im oder unter dem Absender gesetzt +werden. Hat\textnote{Achtung!} die Pseudolänge \PLength{fromrulewidth} die +Länge 0, so wird dabei die Länge dieser Linie automatisch bestimmt. Dies ist +die Voreinstellung\textnote{Voreinstellung} bei den vordefinierten +\File{lco}-Dateien. % +\iffalse % Umbruchkorrekturtext +Der Wert kann mit \DescRef{\LabelBase.cmd.setplength} (siehe +\DescPageRef{\LabelBase.cmd.setplength}) in eigenen \File{lco}-Dateien aber +auch abweichend gesetzt werden. % +\fi% +Die voreingestellte Dicke\ChangedAt{v2.97c}{\Class{scrlttr2}}, +\PLength{fromrulethickness}, der Linie beträgt 0,4\Unit{pt}.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{symbolicnames}{Wert} + \OptionVName{fromphone}{Ein-Aus-Wert} + \OptionVName{frommobilephone}{Ein-Aus-Wert} + \OptionVName{fromfax}{Ein-Aus-Wert} + \OptionVName{fromemail}{Ein-Aus-Wert} + \OptionVName{fromurl}{Ein-Aus-Wert} + \Variable{fromphone} + \Variable{frommobilephone} + \Variable{fromfax} + \Variable{fromemail} + \Variable{fromurl} + \Variable{phoneseparator} + \Variable{mobilephoneseparator} + \Variable{faxseparator} + \Variable{emailseparator} + \Variable{urlseparator} +\end{Declaration}% +Mit Hilfe der fünf Optionen \Option{fromphone}, +\Option{frommobilephone}\ChangedAt{v3.12}{\Class{scrlttr2}}, \Option{fromfax}, +\Option{fromemail} und \Option{fromurl} kann bestimmt werden, ob die +Telefonnummer\Index{Telefon}, die +Mobiltelefonnummer\Index{Mobiltelefon}\Index{Handy}, die Faxnummer\Index{Fax}, +die E-Mail-Adresse und die URL im Absender\Index{Absender} gesetzt werden +soll. Als \PName{Ein-Aus-Wert} kann dabei einer der Standardwerte für einfache +Schalter aus \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} +verwendet werden. Voreingestellt\textnote{Voreinstellung} ist jeweils +\PValue{false}. Die Inhalte selbst werden über die gleichnamigen Variablen +bestimmt. Die Voreinstellungen für die dabei verwendeten Bezeichnungen sind +\autoref{tab:\LabelBase.fromTerm} zu entnehmen, die verwendeten Trennzeichen, +die zwischen der \PName{Bezeichnung} und dem \PName{Inhalt} einer Variablen +eingefügt werden, \autoref{tab:\LabelBase.fromSeparator}. + +Mit\ChangedAt{v3.12}{\Class{scrlttr2}}\important{\Option{symbolicnames}} +Option \Option{symbolicnames} kann diese Voreinstellung auf einen Schlag +geändert werden. Die Option versteht die +Ein-Aus-Werte für einfache Schalter, wie sie in +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} angegeben +sind. Die\ChangedAt{v3.27}{\Class{scrlttr2}\and \Package{scrletter}} +Aktivierung der Option entspricht dabei dem \PName{Wert} \PValue{marvosym}, +wodurch statt der sprachabhängigen Bezeichner +\DescRef{scrlttr2-experts.cmd.emailname}, +\DescRef{scrlttr2-experts.cmd.faxname}, +\DescRef{scrlttr2-experts.cmd.mobilephonename} und +\DescRef{scrlttr2-experts.cmd.phonename} Symbole aus dem +\Package{marvosym}\IndexPackage{marvosym}-Paket verwendet werden. Gleichzeitig +entfällt der Doppelpunkt bei der Definition der Trennzeichen. Für die URL +entfallen in diesem Fall sowohl der sprachabhängige Bezeichner als auch das +Trennzeichen. Mit \OptionValue{symbolicnames}{fontawesome} oder +\OptionValue{symbolicnames}{awesome} werden stattdessen Symbole von Paket +\Package{fontawesome}\IndexPackage{fontawesome} verwendet. Dabei wird auch für +die URL ein passendes Symbol aktiviert. Es ist zu beachten\textnote{Achtung!}, +dass das Paket \Package{marvosym} oder \Package{fontawesome} gegebenenfalls +selbst in der Dokumentpräambel zu laden ist, falls mit der Option erst nach +\Macro{begin}\PParameter{document} die Verwendung eines dieser Pakete +aktiviert wird. + +\begin{table} + \centering + \caption[{Vordefinierte Bezeichnungen der Variablen für die\newline + Absenderangaben im Briefkopf}]{Vordefinierte Bezeichnungen der Variablen + für die Absenderangaben im Briefkopf (die Bezeichnungen und Inhalte der + verwendeten Variablen für Trennzeichen sind + \autoref{tab:\LabelBase.fromSeparator} zu entnehmen)} + \begin{desctabular}[1.8em] + \ventry{fromemail}{% + \DescRef{\LabelBase.cmd.usekomavar*}\PParameter{emailseparator}% + \DescRef{\LabelBase.cmd.usekomavar}\PParameter{emailseparator}}% + \ventry{fromfax}{% + \DescRef{\LabelBase.cmd.usekomavar*}\PParameter{faxseparator}% + \DescRef{\LabelBase.cmd.usekomavar}\PParameter{faxseparator}}% + \ventry{frommobilephone}{% + \DescRef{\LabelBase.cmd.usekomavar*}\PParameter{mobilephoneseparator}% + \DescRef{\LabelBase.cmd.usekomavar}\PParameter{mobilephoneseparator}}% + \ventry{fromname}{\DescRef{scrlttr2-experts.cmd.headfromname}}% + \ventry{fromphone}{% + \DescRef{\LabelBase.cmd.usekomavar*}\PParameter{phoneseparator}% + \DescRef{\LabelBase.cmd.usekomavar}\PParameter{phoneseparator}}% + \ventry{fromurl}{% + \DescRef{\LabelBase.cmd.usekomavar*}\PParameter{urlseparator}% + \DescRef{\LabelBase.cmd.usekomavar}\PParameter{urlseparator}}% + \end{desctabular} + \label{tab:\LabelBase.fromTerm} +\end{table} + +\begin{table}[tp] + \centering +% \KOMAoptions{captions=topbeside}% +% \setcapindent{0pt}% + \caption +% \begin{captionbeside} + {Vordefinierte Bezeichnungen und Inhalte der Trennzeichen + für die Absenderangaben im Briefkopf ohne Option + \Option{symbolicnumbers}} +% [l] + \begin{tabularx}{\textwidth}{llX} + \toprule + Name & Bezeichnung & Inhalt \\ + \midrule + \Variable{emailseparator} & \DescRef{scrlttr2-experts.cmd.emailname} & \texttt{:\~} \\ + \Variable{faxseparator} & \DescRef{scrlttr2-experts.cmd.faxname} & \texttt{:\~} \\ + \Variable{mobilephoneseparator} & \DescRef{scrlttr2-experts.cmd.mobilephonename} & + \DescRef{\LabelBase.cmd.usekomavar}\PParameter{phoneseparator} \\ + \Variable{phoneseparator} & \DescRef{scrlttr2-experts.cmd.phonename} & \texttt{:\~} \\ + \Variable{urlseparator} & \DescRef{scrlttr2-experts.cmd.wwwname} & \texttt{:\~} \\ + \bottomrule + \end{tabularx} +% \end{captionbeside} + \label{tab:\LabelBase.fromSeparator} +\end{table} + +\begin{Example} + Herr Musterfrau aus unserem Beispiel hat auch Telefon und eine + E-Mail-Adresse. Diese möchte er ebenfalls im Briefkopf haben. Gleichzeitig + soll die Trennlinie nun nach dem Briefkopf stehen. Also gibt er die + entsprechenden Optionen an und setzt auch die zugehörigen Variablen:% + \lstinputcode[xleftmargin=1em]{letter-example-12-de.tex}% + Das Ergebnis aus \autoref{fig:\LabelBase.letter-12-13} links ist jedoch + ernüchternd. Die Optionen werden ignoriert. Das liegt % + \iffalse% Umbruchkorrektur + daran, dass diese zusätzlichen Variablen und Optionen nur im erweiterten + Briefkopf verwendet werden. % + \else% + an Option \OptionValueRef{\LabelBase}{fromalign}{false}. % + \fi% + Es muss also, wie in \autoref{fig:\LabelBase.letter-12-13}, rechts + beispielsweise Option \OptionValueRef{\LabelBase}{fromalign}{center} + verwendet werden:% + \begin{figure} + \centering + \frame{\includegraphics[width=.4\textwidth]{letter-example-12-de}}\quad + \frame{\includegraphics[width=.4\textwidth]{letter-example-13-de}} + \caption[{Beispiel: Brief mit erweitertem Absender, Trennlinie, Anschrift, + Anrede, Text, Grußfloskel, Signatur, Postskriptum, Anlagen, Verteiler + und Lochermarke; Standard- vs. erweiterter Briefkopf}]{Ergebnis eines + kleinen Briefes mit erweitertem Absender, Trennlinie, Anschrift, Anrede, + Text, Grußfloskel, Signatur, Postskriptum, Anlagen, Verteiler und + Lochermarke (das Datum entstammt den Voreinstellungen für DIN-Briefe); + links der einfache Briefkopf mit + \OptionValueRef{\LabelBase}{fromalign}{false}, rechts der erweiterte + Briefkopf mit \OptionValueRef{\LabelBase}{fromalign}{center}} + \label{fig:\LabelBase.letter-12-13} + \end{figure} + \lstinputcode[xleftmargin=1em]{letter-example-13-de.tex} + + Den Vergleich zweier weiterer Alternativen mit linksbündigem Absender durch + Einstellung \OptionValueRef{\LabelBase}{fromalign}{left} und rechtsbündigem + Absender durch Einstellung \OptionValueRef{\LabelBase}{fromalign}{right} zeigt + \autoref{fig:\LabelBase.letter-14-15}. + \begin{figure} + \centering + \frame{\includegraphics[width=.4\textwidth]{letter-example-14-de}}\quad + \frame{\includegraphics[width=.4\textwidth]{letter-example-15-de}} + \caption[{Beispiel: Brief mit erweitertem Absender, Trennlinie, Anschrift, + Anrede, Text, Grußfloskel, Signatur, Postskriptum, Anlagen, Verteiler + und Lochermarke; links- vs. rechtsbündiger Briefkopf}]{Ergebnis eines + kleinen Briefes mit erweitertem Absender, Trennlinie, Anschrift, Anrede, + Text, Grußfloskel, Signatur, Postskriptum, Anlagen, Verteiler und + Lochermarke (das Datum entstammt den Voreinstellungen für DIN-Briefe); + links mit linksbündigem Kopf durch + \OptionValueRef{\LabelBase}{fromalign}{left}, rechts mit Option + \OptionValueRef{\LabelBase}{fromalign}{right} und damit rechtsbündigem + Kopf} + \label{fig:\LabelBase.letter-14-15} + \end{figure} +\end{Example} +% +\EndIndexGroup +\ExampleEndFix% Beispiel am Ende + + +\begin{Declaration} + \OptionVName{fromlogo}{Ein-Aus-Wert} + \Variable{fromlogo} +\end{Declaration} +\BeginIndex{Option}{fromlogo~=\PName{Ein-Aus-Wert}}% +\BeginIndex{Variable}{fromlogo}% +Mit der Option \Option{fromlogo} kann bestimmt werden, ob ein Logo\Index{Logo} +im Briefkopf gesetzt werden soll. Als \PName{Ein-Aus-Wert} kann dabei einer +der Standardwerte für einfache Schalter aus \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} verwendet +werden. Voreingestellt\textnote{Voreinstellung} ist \PValue{false}, also kein +Logo. Das Logo selbst wird über die Variable \Variable{fromlogo} +definiert. Die \PName{Bezeichnung} für das Logo ist in der Voreinstellung leer +und wird von \KOMAScript{} auch nicht verwendet.% +\begin{Example} + Herr Musterfrau findet es besonders schick, wenn er seine Briefe mit einem + Logo versieht. Sein Logo hat er als Grafikdatei gespeichert, die er gerne + mit Hilfe der Anweisung \Macro{includegraphics} laden würde. Dazu bindet er + zusätzlich das Paket \Package{graphics}\IndexPackage{graphics} (siehe + \cite{package:graphics}) ein.% + \lstinputcode[xleftmargin=1em]{letter-example-16-de}% + Das Ergebnis ist in \autoref{fig:\LabelBase.letter-16-18} + % ,\autopageref{fig:\LabelBase.letter-16-18} + links oben zu sehen. Die beiden anderen Bilder in dieser Abbildung zeigen + das Ergebnis bei rechtsbündigem und bei zentriertem Absender. + \begin{figure} + \setcapindent{0pt}% + {\hfill + \frame{\includegraphics[width=.4\textwidth]{letter-example-16-de}}\quad + \frame{\includegraphics[width=.4\textwidth]{letter-example-17-de}}\par\bigskip} + \begin{captionbeside}[{Beispiel: Brief mit erweitertem Absender, Logo, + Trennlinie, Anschrift, Anrede, Text, Grußfloskel, Signatur, + Postskriptum, Anlagen, Verteiler und Lochermarke; Absender links + vs. rechts vs. zentriert}]{Ergebnis eines kleinen Briefes mit + erweitertem Absender, Logo, Trennlinie, Anschrift, Anrede, Text, + Grußfloskel, Signatur, Postskriptum, Anlagen, Verteiler und + Lochermarke (das Datum entstammt den Voreinstellungen für + DIN-Briefe); links, oben mit linksbündigem Absender, rechts daneben + mit zentriertem Absender und rechts mit rechtsbündigem Absender}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-18-de}}\quad + \end{captionbeside} + \label{fig:\LabelBase.letter-16-18} + \end{figure} +\end{Example}% +% +\EndIndexGroup +\ExampleEndFix% Beispiel am Ende + + +\begin{Declaration} + \Variable{firsthead} +\end{Declaration} +In vielen Fällen reichen die Möglichkeiten aus, die \Class{scrlttr2} über +Optionen und obige Variablen für die Gestaltung des Briefkopfes bietet. In +einigen Fällen will man jedoch den Briefkopf freier gestalten können. In +diesen Fällen muss man auf die Möglichkeiten der vordefinierten Briefköpfe, +die über die oben erwähnten Option ausgewählt werden können, +verzichten. Stattdessen gestaltet man sich seinen Briefkopf frei. Dazu +definiert man den gewünschten Aufbau über den \PName{Inhalt} der Variablen +\Variable{firsthead}. Dabei können beispielsweise mit Hilfe der +\Macro{parbox}-Anweisung (siehe \cite{latex:usrguide}) mehrere Boxen neben- +und untereinander gesetzt werden. Einem versierten Anwender sollte es so +möglich sein, seinen eigenen Briefkopf zu gestalten. Natürlich kann und sollte +man dabei auch Zugriff auf andere Variablen mit Hilfe von +\DescRef{\LabelBase.cmd.usekomavar} nehmen. Die \PName{Bezeichnung} der +Variablen \Variable{firsthead} wird von \KOMAScript{} nicht verwendet. +\iffree{Ein ausführliches Beispiel für die Definition eines Briefkopfes ist + beispielsweise im Anhang von \cite{book:komascript} und + \cite{ebook:komascript} zu finden.% +}{Ein ausführliches Beispiel für die Definition eines Briefkopfes wird in + \autoref{cha:modernletters} behandelt.}% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Anschrift} +\seclabel{addressee}% +\BeginIndexGroup +\BeginIndex{}{Anschrift}% + +% Verschiedene Umbruchvarianten +Unter der Anschrift versteht man normalerweise nur den Namen und die Adresse +des Empfängers. % +\iffalse% +Als \iffree{erste }{}Erweiterung zur Anschrift kann die +Versandart betrachtet werden, die etwa bei \iffree{Einschreiben oder +}{}Infobriefen zur Anwendung kommt. Bei Fensterbriefumschlägen wird auch die +sogenannte Rücksendeadresse \iffree{zur Anschrift}{dazu} gezählt, da sie im +Anschriftfenster zu sehen \iffree{sein wird}{ist}. Die Anschrift folgt +unmittelbar auf den Briefkopf.% +\else% +Aber auch die Versandart, beispielsweise bei Infobriefen, oder die +Rücksendeadresse werden als Teil des Anschriftfeldes gesetzt.% +\fi + + +\begin{Declaration} + \OptionVName{addrfield}{Modus} + \OptionVName{backaddress}{Wert} + \OptionVName{priority}{Priorität} + \Variable{toname} + \Variable{toaddress} + \Variable{backaddress} + \Variable{backaddressseparator} + \Variable{specialmail} + \Variable{fromzipcode} + \Variable{zipcodeseparator} + \Variable{place} + \Variable{PPcode} + \Variable{PPdatamatrix} + \Variable{addresseeimage} +\end{Declaration}% +\BeginIndex{}{Anschrift}% +Mit der Option \Option{addrfield} kann gewählt werden, ob ein Anschriftfeld +gesetzt werden soll oder nicht. Voreingestellt\textnote{Voreinstellung} ist +mit \PValue{true} die Verwendung eines Anschriftfeldes. Die Option versteht +die in \autoref{tab:\LabelBase.addrfield}\ChangedAt{v3.03}{\Class{scrlttr2}} +%, \autopageref{tab:\LabelBase.addrfield} +angegebenen Werte für den \PName{Modus}. Bei den Werten \PValue{true}, +\PValue{topaligned}\ChangedAt{v3.17}{\Class{scrlttr2}\and + \Package{scrletter}}, \PValue{PP} und \PValue{backgroundimage} werden Name +und Adresse des Empfängers, die im Anschriftfeld gesetzt werden, über das +Argument der Umgebung \DescRef{\LabelBase.env.letter} (siehe +\autoref{sec:\LabelBase.document}, \DescPageRef{\LabelBase.env.letter}) +bestimmt. Diese Angaben werden außerdem in die Variablen \Variable{toname} und +\Variable{toaddress} kopiert. + +\BeginIndexGroup +\BeginIndex{FontElement}{addressee}\LabelFontElement{addressee}% +\BeginIndex{FontElement}{toname}\LabelFontElement{toname}% +\BeginIndex{FontElement}{toaddress}\LabelFontElement{toaddress}% +Die voreingestellten Schriftarten können\ChangedAt{v2.97c}{\Class{scrlttr2}} +über die Anweisungen \DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, ab +\DescPageRef{\LabelBase.cmd.setkomafont}) verändert werden. Dabei existieren +drei Elemente. Zunächst gibt es das Element +\FontElement{addressee}\IndexFontElement{addressee}% +\important{\FontElement{addressee}}, das generell für die Anschrift zuständig +ist. Dazu gibt es die Elemente +\FontElement{toname}\IndexFontElement{toname}\important{\FontElement{toname}} +und \FontElement{toaddress}\IndexFontElement{toaddress}% +\important{\FontElement{toaddress}}, die sich nur auf den Namen bzw. die +Adresse des Empfängers beziehen. Für \FontElement{toname} und +\FontElement{toaddress} können also Abweichungen von der Einstellung für +\FontElement{addressee} definiert werden.% +\EndIndexGroup +% +\begin{table} + \caption[{Mögliche Werte für Option \Option{addrfield}}]% + {Mögliche Werte für Option \Option{addrfield} zur + Auswahl der Art der Anschrift% + \label{tab:\LabelBase.addrfield}}% + \begin{desctabular} + \entry{\PValue{backgroundimage}, \PValue{PPbackgroundimage}, + \PValue{PPBackgroundImage}, \PValue{PPBackGroundImage}, + \PValue{ppbackgroundimage}, \PValue{ppBackgroundImage}, + \PValue{ppBackGroundImage}}{% + Es wird eine Anschrift mit einer in Variable \Variable{addresseeimage} + abgelegten Hintergrundgrafik als Port-Payé-Kopf (P.\,P.-Kopf), aber ohne + Rücksendeadresse und Versandart gesetzt.}\\[-1.7ex] + \entry{\PValue{false}, \PValue{off}, \PValue{no}}{% + Es wird keine Anschrift gesetzt.}\\[-1.7ex] + \entry{\PValue{image}, \PValue{Image}, \PValue{PPimage}, \PValue{PPImage}, + \PValue{ppimage}, \PValue{ppImage}}{% + Eine in Variable \Variable{addresseeimage} abgelegte Abbildung wird als + Anschrift mit Port-Payé gesetzt. Adressinformationen und Angaben für + Rücksendeadresse, Versandart oder Priorität werden ignoriert.}\\[-1.7ex] + \entry{\PValue{PP}, \PValue{pp}, \PValue{PPexplicite}, + \PValue{PPExplicite}, \PValue{ppexplicite}, \PValue{ppExplicite}}{% + Es wird eine Anschrift mit explizit über die Variablen + \Variable{fromzipcode}, \Variable{place} und \Variable{PPcode} + ausgefülltem Port-Payé-Kopf (P.\,P.-Kopf), gegebenenfalls mit Priorität + und über Variable \Variable{PPdatamatrix} gesetzter Data-Matrix, aber + ohne Rücksendeadresse und Versandart gesetzt.}\\[-1.7ex] + \entry{\PValue{topaligned}, \PValue{alignedtop}% + \ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}}}{% + Es wird eine Anschrift mit Rücksendeadresse und Versandart oder + Priorität gesetzt. Die Anschrift wird dabei unter der Versandart nicht + vertikal zentriert.}\\[-1.7ex] + \entry{\PValue{true}, \PValue{on}, \PValue{yes}}{% + Es wird eine Anschrift mit Rücksendeadresse und Versandart oder + Priorität gesetzt.}% + \end{desctabular} +\end{table}% + +Im Anschriftfeld wird in der Voreinstellung \OptionValue{addrfield}{true} +zusätzlich noch die unterstrichene Rücksendeadresse gesetzt. Mit Option +\Option{backaddress} kann gewählt werden, ob und in welcher Form die +Rücksendeadresse\Index{Ruecksendeadresse=Rücksendeadresse} für +Fensterbriefumschläge im Anschriftfeld gesetzt werden soll. Die +Option\important{\OptionValue{backaddress}{false}} versteht dazu einerseits +die Standardwerte für einfache Schalter, die in \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} angegeben sind. Dabei bleibt der Stil der +Rücksendeadresse unverändert. Beim Einschalten der Rücksendeadresse kann +andererseits\ChangedAt{v2.96}{\Class{scrlttr2}} gleichzeitig auch der Stil der +Rücksendeadresse gewählt werden. So aktiviert der Wert +\PValue{underlined}\important{\OptionValue{backaddress}{underlined}} die +unterstrichene Rücksendeadresse, während +\PValue{plain}\important{\OptionValue{backaddress}{plain}} den Stil ohne +Unterstreichung auswählt. Voreingestellt\textnote{Voreinstellung} ist +\PValue{underlined}, also das Setzen der unterstrichenen Rücksendeadresse. + +Die Rücksendeadresse selbst wird über den \PName{Inhalt} der Variable +\Variable{backaddress} bestimmt. Voreingestellt ist hier der über +\DescRef{\LabelBase.variable.fromname} angegebene Name und die über +\DescRef{\LabelBase.variable.fromaddress} angegebene Adresse, wobei der +Doppelbackslash in diesem Fall durch den Inhalt der Variablen +\Variable{backaddressseparator} ersetzt wird. Für diese ist ein Komma, gefolgt +von einem nicht umbrechbaren Leerzeichen vordefiniert. Die \PName{Bezeichnung} +der Variablen \Variable{backaddress} wird von \KOMAScript{} nicht genutzt. +\BeginIndexGroup\BeginIndex{FontElement}{backaddress}% +\LabelFontElement{backaddress}% +Die Schriftart der Rücksendeadresse ist über das Element +\FontElement{backaddress}\important{\FontElement{backaddress}} +konfigurierbar. Voreingestellt ist hierbei \Macro{sffamily} (siehe +\autoref{tab:\LabelBase.AddresseeElements}). Vor der Anwendung der +konfigurierten Schriftumschaltung wird noch \Macro{scriptsize} ausgeführt.% +\EndIndexGroup + +Während die Adresse in der Voreinstellung +\OptionValue{addrfield}{true}\ChangedAt{v3.17}{\Class{scrlttr2}\and + \Package{scrletter}} im für die Anschrift verfügbaren Platz vertikal +zentriert wird, entfällt die Zentrierung mit +\OptionValue{addrfield}{topaligned}% +\important{\OptionValue{addrfield}{topaligned}}. Sie wird dann oben bündig im +verfügbaren Platz gesetzt. + +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside}[{% + Schriftvoreinstellungen für die Elemente des Anschriftfensters% + }]{% + \hspace{0pt plus 1ex}% + Voreinstellungen für die Schrift der Elemente des Anschriftfensters% + \label{tab:\LabelBase.AddresseeElements}% + }% + [l] + \begin{tabular}[t]{ll} + \toprule + Element & Voreinstellung \\ + \midrule + \DescRef{\LabelBase.fontelement.addressee}\IndexFontElement{addressee} & + \\ + \DescRef{\LabelBase.fontelement.backaddress}\IndexFontElement{backaddress} & + \Macro{sffamily}% + \\ + \DescRef{\LabelBase.fontelement.PPdata}\IndexFontElement{PPdata} & + \Macro{sffamily}% + \\ + \DescRef{\LabelBase.fontelement.PPlogo}\IndexFontElement{PPlogo} & + \Macro{sffamily}\Macro{bfseries}% + \\ + \DescRef{\LabelBase.fontelement.priority}\IndexFontElement{priority} & + \Macro{fontsize}\PParameter{10pt}\PParameter{10pt}% + \Macro{sffamily}\Macro{bfseries}% + \\ + \DescRef{\LabelBase.fontelement.prioritykey}\IndexFontElement{prioritykey} & + \Macro{fontsize}\PParameter{24.88pt}\PParameter{24.88pt}% + \Macro{selectfont}% + \\ + \DescRef{\LabelBase.fontelement.specialmail}\IndexFontElement{specialmail} & + \\ + \DescRef{\LabelBase.fontelement.toaddress}\IndexFontElement{toaddress} & + \\ + \DescRef{\LabelBase.fontelement.toname}\IndexFontElement{toname} & + \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} + +\BeginIndexGroup +\BeginIndex{FontElement}{specialmail}\LabelFontElement{specialmail} Zwischen +Rücksendeadresse und Empfängeradresse kann bei der Standardeinstellung +\OptionValue{addrfield}{true}\important{\OptionValue{addrfield}{true}} noch +eine optionale Versandart\Index{Versandart} gesetzt werden. Diese wird genau +dann gesetzt, wenn die Variable \Variable{specialmail} einen \PName{Inhalt} +hat und +\OptionValue{priority}{manual}\important{\OptionValue{priority}{manual}}% +\ChangedAt{v3.03}{\Class{scrlttr2}} gewählt wird, was der Voreinstellung +entspricht. Die \PName{Bezeichnung} von \Variable{specialmail} wird durch +\Class{scrlttr2} nicht genutzt. Die Ausrichtung wird mit Hilfe der +Pseudolängen \DescRef{\LabelBase.plength.specialmailindent} und +\DescRef{\LabelBase.plength.specialmailrightindent} (siehe +\DescPageRef{\LabelBase.plength.specialmailindent}) festgelegt. Die +voreingestellte Schriftart des Elements\ChangedAt{v2.97c}{\Class{scrlttr2}} +\FontElement{specialmail}\important{\FontElement{specialmail}}, die Sie +\autoref{tab:\LabelBase.AddresseeElements} entnehmen können, kann mit Hilfe +der Anweisungen \DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) +verändert werden.% +\EndIndexGroup + +\BeginIndexGroup +\BeginIndex{FontElement}{priority}\LabelFontElement{priority}% +\BeginIndex{FontElement}{prioritykey}\LabelFontElement{prioritykey}% +Wird\ChangedAt{v3.03}{\Class{scrlttr2}}% +\important[i]{\normalcolor\OptionValue{priority}{A}\\ + \normalcolor\OptionValue{priority}{B}} hingegen mit +\OptionValue{priority}{A} oder \OptionValue{priority}{B} (siehe +\autoref{tab:\LabelBase.priority}) eine internationale Priorität ausgewählt, +so wird diese bei \OptionValue{addrfield}{true} als Versandart und bei +\OptionValue{addrfield}{PP} an entsprechender Stelle im Port-Payé-Kopf +gesetzt. Dabei wird die +Grundschrift\important{\FontElement{priority}\\ + \FontElement{prioritykey}} über das Element \FontElement{priority} und die +davon abweichende Schrift für den Prioritätsschlüssel, »A« oder »B«, über das +Element \FontElement{prioritykey} bestimmt. Die voreingestellten Schriftarten +der beiden Elemente, die Sie \autoref{tab:\LabelBase.AddresseeElements} +entnehmen können, lassen sich mit den Anweisungen +\DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) +ändern.% +\EndIndexGroup + +\begin{table} + \caption[{Mögliche Werte für Option \Option{priority}}] + {Mögliche Werte für Option \Option{priority} zur + Auswahl einer internationalen Priorität im Adressfeld} + \label{tab:\LabelBase.priority} + \begin{desctabular} + \entry{\PValue{false}, \PValue{off}, \PValue{no}, \PValue{manual}}{% + Es wird keine Priorität gesetzt.}\\[-1.7ex] + \entry{\PValue{B}, \PValue{b}, \PValue{economy}, \PValue{Economy}, + \PValue{ECONOMY}, \PValue{B-ECONOMY}, \PValue{B-Economy}, + \PValue{b-economy}}{% + Es wird die internationale Priorität B-Economy gesetzt. Bei + \OptionValue{addrfield}{true} erfolgt dies anstelle der + Versandart.}\\[-1.7ex] + \entry{\PValue{A}, \PValue{a}, \PValue{priority}, \PValue{Priority}, + \PValue{PRIORITY}, \PValue{A-PRIORITY}, \PValue{A-Priority}, + \PValue{a-priority}}{% + Es wird die internationale Priorität A-Priority gesetzt. Bei + \OptionValue{addrfield}{true} erfolgt dies anstelle der Versandart.}% + \end{desctabular} +\end{table} + +Bei\ChangedAt{v3.03}{\Class{scrlttr2}}\important{\OptionValue{addrfield}{PP}} +\OptionValue{addrfield}{PP} wird im Port-Payé-Kopf die Postleitzahl aus der +Variablen \Variable{fromzipcode} und der Ort aus der Variablen +\Variable{place} gesetzt. Dabei wird der Postleitzahl, also dem \PName{Inhalt} +von \Variable{fromzipcode}, die \PName{Bezeichnung} der Variablen +\Variable{fromzipcode}, gefolgt vom \PName{Inhalt} von +\Variable{zipcodeseparator} vorangestellt. Für diese +\PName{Bezeichnung}\textnote{Voreinstellung} hängt die Voreinstellung von der +verwendeten \File{lco}-Datei (siehe \autoref{sec:\LabelBase.lcoFile} ab +\autopageref{sec:\LabelBase.lcoFile}) ab. Für den \PName{Inhalt} von +\Variable{zipcodeseparator} ist hingegen % +\iffalse % Umbruchvarianten +ein kleiner Abstand, gefolgt von einem Streckenstrich, gefolgt von einem +kleinen Abstand (\Macro{,}\texttt{-{}-}\Macro{,}) % +\else% +»\Macro{,}\texttt{-{}-}\Macro{,}« % +\fi% +voreingestellt. + +Darüber\ChangedAt{v3.03}{\Class{scrlttr2}} hinaus wird bei +\OptionValue{addrfield}{PP}\important{\OptionValue{addrfield}{PP}} im +Port-Payé-Kopf auch noch ein Code gesetzt, der den Absender eindeutig +identifiziert. Dieser ist in Variable \Variable{PPcode} abgelegt. Rechts von +der Anschrift kann zusätzlich eine Data-Matrix gesetzt werden, die in Variable +\Variable{PPdatamatrix} abgelegt ist. + +\BeginIndexGroup +\BeginIndex{FontElement}{PPdata}\LabelFontElement{PPdata} +Postleitzahl\ChangedAt{v3.03}{\Class{scrlttr2}}, Ort und Code werden in der +Voreinstellung mit einer Schrift der Größe 8\,pt gesetzt. Dabei wird die +Schrift des Elements \FontElement{PPdata}% +\important{\FontElement{PPdata}} verwendet. Dessen Voreinstellung ist +\autoref{tab:\LabelBase.AddresseeElements} zu entnehmen und kann mit Hilfe der +Anweisungen \DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) +verändert werden.% +\EndIndexGroup + +\BeginIndexGroup +\BeginIndex{FontElement}{PPlogo}\LabelFontElement{PPlogo} +Für den Port-Payé-Schriftzug »P.P.« kommt dagegen die Schrift des Elements +\FontElement{PPlogo}\important{\FontElement{PPlogo}} zur Anwendung. Dessen +Voreinstellung ist ebenfalls Tabelle +\autoref{tab:\LabelBase.AddresseeElements} zu entnehmen.% +\EndIndexGroup + +Bei\important{\OptionValue{addrfield}{backgroundimage}\\ + \OptionValue{addrfield}{image}} den beiden Einstellungen +\OptionValue{addrfield}{backgroundimage}\ChangedAt{v3.03}{\Class{scrlttr2}} +und \OptionValue{addrfield}{image} wird eine Abbildung in das Adressfenster +gesetzt. Diese ist im \PName{Inhalt} der Variablen \Variable{addresseeimage} +abgelegt. Die \PName{Bezeichnung} dieser Variablen wird von \KOMAScript{} +nicht genutzt. Während bei Einstellung \OptionValue{addrfield}{image} außer der +Abbildung nichts gesetzt wird, wird bei +\OptionValue{addrfield}{backgroundimage} zusätzlich noch die Anschrift aus dem +obligatorischen Argument der \DescRef{\LabelBase.env.letter}-Umgebung +ausgegeben. + +Die Anordnung des Port-Payé-Kopfes wird ebenso wie die Anordnung der +Port-Payé-Anschrift über die Pseudolängen +\DescRef{\LabelBase.plength.toaddrindent} (siehe +\DescPageRef{\LabelBase.plength.toaddrindent}) sowie +\DescRef{\LabelBase.plength.PPheadwidth} und +\DescRef{\LabelBase.plength.PPheadheight} (siehe +\DescPageRef{\LabelBase.plength.PPheadheight}) bestimmt. Für die Anordnung der +Data-Matrix ist die Pseudolänge \DescRef{\LabelBase.plength.PPdatamatrixvskip} +(siehe \DescPageRef{\LabelBase.plength.PPdatamatrixvskip}) zuständig. + +Es\textnote{Achtung!} wird an dieser Stelle ausdrücklich darauf hingewiesen, +dass \KOMAScript{} selbst keine externen Abbildungen setzen kann. % +\iffalse % Umbruchkorrektur +Verwenden Sie für solche Abbildungen beispielsweise das Paket +\Package{graphicx}\IndexPackage{graphicx} und dessen Anweisung +\Macro{includegraphics}.% +\else% +Sollen also über die Variablen \Variable{addresseeimage} oder +\Variable{PPdatamatrix} externe Abbildungen gesetzt werden, so ist +beispielsweise das Grafikpaket \Package{graphics}\IndexPackage{graphics} oder +\Package{graphicx}\IndexPackage{graphicx} zu laden und in den Variablen dessen +Anweisung \Macro{includegraphics} zu verwenden.% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \PLength{toaddrvpos} + \PLength{toaddrhpos} +\end{Declaration} +Diese Pseudolängen geben den Abstand des Anschriftfensters eines +Fensterbriefumschlags vom oberen und vom linken Rand des Papiers an. Sie +werden in den vordefinierten +\File{lco}-Dateien\textnote{\File{lco}-Datei}\Index{lco-Datei=\File{lco}-Datei} +unterschiedlich eingestellt. Für \PLength{toaddrhpos} gilt außerdem eine +Besonderheit. Ist\textnote{Achtung!} der Wert \iffree{}{wie bei \Option{SN} + oder \Option{NF} }negativ, so ist sein Betrag der Abstand des +Anschriftfeldes vom rechten Rand des Papiers. % +\iffree{% + Sie\textnote{Beispiele!} finden dies beispielsweise bei \Option{SN} oder + \Option{NF}. Am kleinsten ist der Wert \PLength{toaddrvpos} bei + \Option{DINmtext}. Hier kann es schnell passieren, dass der Briefkopf in das + Anschriftfenster ragt.% +}{% + Große Briefköpfe\textnote{Achtung!} können bei kleinem \PLength{toaddrvpos}, + beispielsweise bei \Option{DINmtext}, bis in das Anschriftfeld ragen.% +} Ob das Anschriftfenster überhaupt gesetzt wird, hängt von der Option +\DescRef{\LabelBase.option.addrfield}\IndexOption{addrfield} ab (siehe +\DescPageRef{\LabelBase.option.addrfield}).% +\EndIndexGroup + + +\begin{Declaration} + \PLength{toaddrheight} +\end{Declaration} +Diese Pseudolänge gibt die Höhe des Anschriftfeldes einschließlich der +Versandart an. Ob Name und Adresse des Empfängers unter Berücksichtigung der +Versandart im Anschriftfeld vertikal zentriert werden, hängt von Option +\DescRef{\LabelBase.option.addrfield}\IndexOption{addrfield} ab.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{toaddrwidth} +\end{Declaration} +Diese Pseudolänge gibt die Breite des Anschriftfensters an. Sie wird in den +vordefinierten +\File{lco}-Dateien\textnote{\File{lco}-Datei}\Index{lco-Datei=\File{lco}-Datei} +entsprechend der unterschiedlichen Normen unterschiedlich +eingestellt. Typische Werte liegen zwischen 70\Unit{mm} und 100\Unit{mm}. + +\begin{Example} + Angenommen, Sie haben das Problem, dass Ihr Drucker einen \iffree{sehr + breiten }{}unbedruckbaren rechten \iffree{oder linken }{}Rand von + 15\Unit{mm} besitzt. Dadurch kann bei Option \Option{SN} der Briefkopf, die + Absenderergänzung und die Anschrift nicht komplett gedruckt werden. Sie + erstellen daher eine neue \iffree{\File{lco}-Datei mit folgendem Inhalt}{Datei + \File{SNmmarg.lco}, die Sie anstelle von \Option{SN} verwenden}: +\begin{lstcode} + \ProvidesFile{SNmmarg.lco} + [2002/06/04 v0.1 my own lco] + \LoadLetterOption{SN} + \addtoplength{toaddrwidth}{% + -\useplength{toaddrhpos}} + \setplength{toaddrhpos}{-15mm} + \addtoplength{toaddrwidth}{% + \useplength{toaddrhpos}} + \endinput +\end{lstcode}% + \iffree{ Bis Sie sich einen Drucker mit kleineren Rändern zugelegt haben, + verwenden Sie \Option{SNmmarg} anstelle von + \Option{SN}.}{}% Umbruchoptimierung +\end{Example} +% +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \PLength{toaddrindent} +\end{Declaration} +Manchmal will man, dass die Anschrift nicht am linken Rand des +Anschriftfensters beginnt und bis zum rechten Rand des Fensters reicht, +sondern ein wenig eingezogen wird. Der Wert dieses Einzugs kann über die +Pseudolänge \PLength{toaddrindent} festgelegt +werden. Typischerweise\textnote{Voreinstellung} ist dieser Wert jedoch +0\Unit{pt}. + +Bei\textnote{Achtung!} jeder der +Einstellungen\ChangedAt{v3.03}{\Class{scrlttr2}} +\OptionValueRef{scrlttr2}{addrfield}{PP}\important{% + \OptionValueRef{scrlttr2}{addrfield}{PP}\\ + \OptionValueRef{scrlttr2}{addrfield}{image}\\ + \OptionValueRef{scrlttr2}{addrfield}{backgroundimage} +}\IndexOption{addrfield~=\textKValue{PP}}, +\OptionValueRef{scrlttr2}{addrfield}{image}% +\IndexOption{addrfield~=\textKValue{image}} und +\OptionValueRef{scrlttr2}{addrfield}{backgroundimage}% +\IndexOption{addrfield~=\textKValue{backgroundimage}} (siehe +\DescPageRef{\LabelBase.option.addrfield}) wird beim Wert 0\Unit{pt} +stattdessen ein Einzug von 8\Unit{mm} verwendet. Soll hier tatsächlich kein +Einzug verwendet werden, so kann mit 1\Unit{sp} ein vernachlässigbar kleiner +Einzug gesetzt werden. Des Weiteren wird \PLength{toaddrindent} bei den +genannten Einstellungen für +\DescRef{\LabelBase.option.addrfield}\IndexOption{addrfield} auch für den +Abstand zum rechten Rand des Anschriftfensters verwendet.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{backaddrheight} +\end{Declaration} +Bei Fensterbriefumschlägen wird der Absender häufig in einer kleinen Schrift +einzeilig über der Empfängeradresse ausgegeben. Diese Absenderangabe nennt man +Rücksendeadresse\textnote{Rücksendeadresse}% +\Index{Ruecksendeadresse=Rücksendeadresse}, da sie \iffree{im Anschriftfenster + sichtbar ist und }{}der Post bei unzustellbaren Briefen für die Rücksendung +an den Absender dient. In dieser Adresse muss daher auch nur die Information +enthalten sein, die zur Rücksendung notwendig ist. + +Die Höhe, die innerhalb des Anschriftfensters für die Rücksendeadresse zur +Verfügung steht, ist in der Pseudolänge \PLength{backaddrheight} abgelegt. Der +Wert\textnote{Voreinstellung} wird in den vordefinierten \File{lco}-Dateien +typischerweise auf 5\Unit{mm} eingestellt. Ob die Rücksendeadresse überhaupt +gesetzt wird, bestimmt der Anwender mit den Optionen +\DescRef{\LabelBase.option.addrfield}\IndexOption{addrfield} (siehe +\DescPageRef{\LabelBase.option.addrfield}) und +\DescRef{\LabelBase.option.backaddress} (siehe +\DescPageRef{\LabelBase.option.backaddress}).% +\iftrue% Umbruchkorrektur +\ Ein Abschalten der Rücksendeadresse ist beispielsweise sinnvoll, wenn gar +keine Fensterbriefumschläge verwendet werden.% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \PLength{specialmailindent} + \PLength{specialmailrightindent} +\end{Declaration} +Zwischen Rücksendeadresse und Empfängeradresse kann noch eine optionale +Versandart\Index{Versandart} gesetzt werden\iffree{. Diese wird genau dann + gesetzt}{}, wenn die Variable \DescRef{\LabelBase.variable.specialmail} +einen Inhalt hat. Die Ausrichtung wird mit Hilfe der Pseudolängen +\PLength{specialmailindent} und \PLength{specialmailrightindent} +festgelegt. Diese geben den linken und rechten Einzug der Zeile an. In den +vordefinierten\textnote{Voreinstellung} \File{lco}-Dateien ist +\PLength{specialmailindent} auf den dehnbaren Wert \Macro{fill} gesetzt, +während \PLength{specialmailrightindent} auf 1\Unit{em} eingestellt ist. Damit +wird die Versandart 1\Unit{em} vom rechten Rand des Anschriftfensters +gesetzt.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{PPheadheight} + \PLength{PPheadwidth} +\end{Declaration} +Die Pseudolänge \PLength{PPheadheight} gibt bei den beiden +Einstellungen\ChangedAt{v3.03}{\Class{scrlttr2}} +\OptionValueRef{scrlttr2}{addrfield}{PP}\important{% + \OptionValueRef{scrlttr2}{addrfield}{PP}\\ + \OptionValueRef{scrlttr2}{addrfield}{backgroundimage}}% +\IndexOption{addrfield~=\textKValue{PP}} und +\OptionValueRef{scrlttr2}{addrfield}{backgroundimage}% +\IndexOption{addrfield~=\textKValue{backgroundimage}} die Höhe an, die am +Anfang des Adressfeldes für den Port-Payé-Kopf reserviert wird. Die +Pseudolänge \PLength{PPheadwidth} wird nur bei +\OptionValueRef{scrlttr2}{addrfield}{PP} (siehe +\DescPageRef{\LabelBase.option.addrfield}) verwendet und gibt die Breite des +linken Feldes des Port-Payé-Kopf mit dem P.\,P.-Logo, der Postleitzahl und dem +Ort an. Die Breite des rechten Feldes mit dem Code für den Absender und der +Priorität ist durch die Restbreite bestimmt. + +Den\textnote{Achtung!\\Voreinstellung} normalerweise voreingestellten Wert von +0\Unit{mm} für Pseudolänge \PLength{PPheadheight} ändert \KOMAScript{} +selbstständig in 20,74\Unit{pt}. Den normalerweise voreingestellten Wert von +0\Unit{mm} für \PLength{PPheadwidth} ändert \KOMAScript{} selbstständig in +42\Unit{mm}.% +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{PPdatamatrixvskip} +\end{Declaration} +Durch\ChangedAt{v3.03}{\Class{scrlttr2}} diese Pseudolänge wird der vertikale +Abstand zwischen dem Port-Payé-Kopf und der Data-Matrix bei +\OptionValueRef{scrlttr2}{addrfield}{PP}% +\important{\OptionValueRef{scrlttr2}{addrfield}{PP}}% +\IndexOption{addrfield~=\textKValue{PP}} (siehe +\DescPageRef{\LabelBase.option.addrfield}) +festgelegt. Den\textnote{Achtung!\\Voreinstellung} normalerweise +voreingestellten Wert von 0\Unit{mm} ändert \KOMAScript{} selbstständig in +9\Unit{mm}. Die Data-Matrix wird rechtsbündig zum Port-Payé-Kopf gesetzt.% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Absenderergänzung} +\seclabel{locationField} +\BeginIndexGroup +\BeginIndex{}{Absenderergaenzung=Absenderergänzung}% + +\iffalse% Umbruchvarianten +Insbesondere bei Geschäftsbriefen reicht der Platz im Briefkopf und im +Seitenfuß oftmals nicht aus, um alle Angaben des Absenders unterzubringen. Für +die zusätzlichen Informationen kann der Platz neben der Anschrift +genutzt werden. In dieser Anleitung wird dieses Feld \emph{Absenderergänzung} +genannt.% +\else% +\iffalse% +Reicht der Raum in Briefkopf und Seitenfuß nicht aus, um alle Angaben zum +Absender unterzubringen, kann der Platz neben der Anschrift als +\emph{Absenderergänzung} genutzt werden.% +\else% +Der freie Platz neben der Anschrift kann für zusätzliche Angaben zum Absender +genutzt werden.% +\fi% +\fi + +\begin{Declaration} + \OptionVName{locfield}{Einstellung} +\end{Declaration} +\BeginIndex{}{Absenderergaenzung=Absenderergänzung}% +Der Inhalt der Absenderergänzung neben der Anschrift ist frei wählbar. +Je\important{% + \OptionValueRef{\LabelBase}{fromalign}{locationleft}\\ + \OptionValueRef{\LabelBase}{fromalign}{center}\\ + \OptionValueRef{\LabelBase}{fromalign}{locationright}} nach Einstellung der +oben erklärten Option \DescRef{\LabelBase.option.fromalign} wird sie außerdem +für das Logo des Absenders oder den Absender selbst mitverwendet. Die Breite +dieses Feldes kann beispielsweise in einer \File{lco}-Datei (siehe +\autoref{sec:\LabelBase.lcoFile}) gesetzt werden. Wird dort die Breite 0 +gesetzt, so kann über die Option \Option{locfield} zwischen zwei +unterschiedlichen Voreinstellungen für die Breite dieses Feldes gewählt +werden. Dies ist bei der Mehrzahl der \File{lco}-Dateien der Fall, die +\KOMAScript{} beiliegen. Siehe hierzu auch die Erklärungen zur Pseudolänge +\DescRef{\LabelBase.plength.locwidth}, +\DescPageRef{\LabelBase.plength.locwidth}. Mögliche Werte für die Option +sind \autoref{tab:\LabelBase.locfield} zu +entnehmen. Voreingestellt\textnote{Voreinstellung} ist \PValue{narrow}. +% +\begin{table} +% \caption + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside} + [{Mögliche Werte für Option \Option{locfield}}] + {Mögliche Werte für Option \Option{locfield} zur Wahl der Breite des + Feldes für die Absenderergänzung (Erklärung im Text beachten!)% + \label{tab:\LabelBase.locfield}}% + [l] + \begin{minipage}[t]{.58\linewidth} + \begin{desctabular}[t] + \pventry{narrow}{schmales Feld für die Absenderergänzung}% + \pventry{wide}{breites Feld für die Absenderergänzung}% + \end{desctabular} + \end{minipage} + \end{captionbeside} +\end{table} + + +\begin{Declaration} + \Variable{location} +\end{Declaration} +Der Inhalt der Absenderergänzung, soweit er nicht durch Logo oder den Absender +selbst belegt ist, wird mit der Variablen \Variable{location} festgelegt. Für +den \PName{Inhalt} dieser Variablen dürfen auch Formatierungsanweisungen wie +\Macro{raggedright} verwendet werden. Die \PName{Bezeichnung} dieser Variablen +wird von \KOMAScript{} nicht genutzt. + +\begin{Example} + Herr Musterfrau möchte ein paar zusätzliche Informationen zu seiner + Mitgliedschaft angeben. Er wählt dazu die Absenderergänzung:% + \lstinputcode[xleftmargin=1em]{letter-example-19-de.tex}% + Das entsprechende Feld neben der Anschrift wird dann wie in + \autoref{fig:\LabelBase.letter-19} gesetzt. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Beispiel: Brief mit erweitertem Absender, Logo, + Anschrift, Absenderergänzung, Anrede, Text, Grußfloskel, + Signatur, Postskriptum, Anlagen, Verteiler und Lochermarke}]{Ergebnis + eines kleinen Briefes mit erweitertem Absender, Logo, + Anschrift, Absenderergänzung, Anrede, Text, Grußfloskel, Signatur, + Postskriptum, Anlagen, Verteiler und Lochermarke (das Datum entstammt + den Voreinstellungen für DIN-Briefe)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-19-de}} + \end{captionbeside} + \label{fig:\LabelBase.letter-19} + \end{figure} +\end{Example} +% +\EndIndexGroup +\EndIndexGroup +\ExampleEndFix % Beispiel am Ende der Beschreibung + + +\begin{Declaration} + \PLength{locheight} + \PLength{lochpos} + \PLength{locvpos} + \PLength{locwidth} +\end{Declaration} +Die Pseudolängen \PLength{locwidth} und +\PLength{locheight}\ChangedAt{v2.97d}{\Class{scrlttr2}} geben die Breite und +Höhe der Absenderergänzung an. Die Pseudolängen \PLength{lochpos} und +\PLength{locvpos} geben die Abstände von der rechten, oberen +Papierecke an. Die Werte werden in den vordefinierten \File{lco}-Dateien +typischerweise auf 0\Unit{pt} gesetzt. Dieser\textnote{Achtung!} Wert nimmt +eine Sonderstellung ein. Er bedeutet, dass die Werte erst bei +\DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} anhand der Breite des +Papiers, der Breite des Anschriftfensters, des Abstandes des +Anschriftfensters von der linken, oberen Papierecke und +Option \DescRef{\LabelBase.option.locfield} (siehe +\DescPageRef{\LabelBase.option.locfield}) +gesetzt werden. Wie\textnote{Achtung!} bei \PLength{toaddrhpos} nehmen +negative Werte für \PLength{lochpos} eine Sonderstellung ein. Es wird dann +statt des Abstandes vom rechten Papierrand der Betrag von \PLength{lochpos} +als Abstand vom linken Papierrand verwendet. Die Bedeutung ist also genau +umgekehrt zu der bei \PLength{toaddrhpos} (siehe +\DescPageRef{\LabelBase.plength.toaddrhpos}).% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Geschäftszeilen} +\seclabel{refLine}% +\BeginIndexGroup +\BeginIndex{}{Geschaeftszeile=Geschäftszeile}% + +\iftrue % Umbruchkorrektur +Die Geschäftszeilen enthalten typischerweise Angaben wie Namenskürzel oder +Durchwahlnummern. \KOMAScript{} setzt automatisch nur nicht leere Felder. Ist +nur das Datum nicht leer, wird die Geschäftzeile zur Datumszeile. +\else% +Die Geschäftszeile kann auch länger als eine Zeile sein. Sie wird nur gesetzt, +wenn mindestens eine der Variablen für die Geschäftszeile nicht leer ist. Es +werden nur nicht leere Felder gesetzt. Um\textnote{Tipp!} ein scheinbar leeres +Feld zu setzen, kann man einen scheinbar leeren Variableninhalt wie +\Macro{mbox}\Parameter{} verwenden. Wird auf die Geschäftszeile verzichtet, so +werden an ihrer Stelle Bezeichnung und Inhalt der Variablen +\DescRef{\LabelBase.variable.date} ausgegeben. % +\iffalse% Umbruchoptimierung +Informationen, wie Variablen zur Geschäftszeile hinzugefügt oder entfernt +werden, sind in \autoref{sec:scrlttr2-experts.variables}, +\DescPageRef{scrlttr2-experts.cmd.removereffields} zu finden.% +\fi% +\fi + +\begin{Declaration} + \OptionVName{numericaldate}{Ein-Aus-Wert} +\end{Declaration} +Mit dieser Option kann zwischen der sprachabhängigen Standarddarstellung des +Datums\Index{Datum} in +\Macro{today}\IndexCmd[indexmain]{today}\important{\Macro{today}} und einem +ebenfalls sprachabhängigen rein numerischen Datum umgeschaltet werden. Die +Standarddarstellung wird nicht von \KOMAScript{} bereitgestellt. Sie kann +wahlweise vom \LaTeX-Kern oder einem Paket wie +\Package{babel}\IndexPackage{babel} oder +\Package{isodate}\IndexPackage{isodate} +stammen. Das\important{\OptionValue{numericaldate}{true}} kurze numerische +Datum wird hingegen von \Class{scrlttr2} selbst erzeugt. Die Option versteht +die Standardwerte für einfache Schalter, die in \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} angegeben +sind. Voreingestellt\textnote{Voreinstellung} ist mit \PValue{false} die +Verwendung der Standarddarstellung. + +\begin{Declaration} + \Variable{date} +\end{Declaration} +Das Datum \iffalse % Umbruchkorektur (stimmt das so?) +in der gewählten Darstellung % +\fi % +wird im \PName{Inhalt} der Variablen \Variable{date} +abgelegt. Voreingestellt\textnote{Voreinstellung} ist das mit +\Macro{date}\IndexCmd{date} gesetzte Datum, das selbst mit +\Macro{today}\important{\Macro{date}, \Macro{today}}\IndexCmd{today} +voreingestellt ist. Damit ist der \PName{Inhalt} der Variablen nur indirekt +von Option \DescRef{\LabelBase.option.numericaldate}% +\important{\DescRef{\LabelBase.option.numericaldate}} abhängig. + +Gesetzt wird das Datum normalerweise +als Teil der Geschäftszeile. Wenn die Geschäftszeile ansonsten leer bleibt, +wird allerdings nur eine Datumszeile, bestehend aus dem Ort und dem Datum, +gesetzt. Trotzdem haben auch in diesem Fall die Einstellungen der nachfolgend +beschriebenen Option \DescRef{\LabelBase.option.refline} Auswirkungen auf +diese Datumszeile. Weitere Informationen zum Ort finden Sie in der +Beschreibung zur Variablen +\DescRef{\LabelBase.variable.placeseparator}\IndexVariable{placeseparator} auf +\DescPageRef{\LabelBase.variable.placeseparator}.% +% +\EndIndexGroup +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{refline}{Einstellung} +\end{Declaration} +\BeginIndex{}{Geschaeftszeile=Geschäftszeile}% +\iffalse% Überflüssig +Insbesondere bei Geschäftsbriefen findet sich häufig eine Zeile mit Angaben +wie Namenskürzeln\Index{Kuerzel=Kürzel}, Durchwahl\Index{Durchwahl}, +Kunden-\Index{Kundennummer} und Rechnungsnummer\Index{Rechnungsnummer} oder +zur Bezugnahme auf ein früheres Schreiben. Diese Zeile wird in dieser +Anleitung \emph{Geschäftszeile}\textnote{Geschäftszeile} genannt. + +\fi% +Bei \Class{scrlttr2} und \Package{scrletter} können Kopf, Fuß, Anschrift und +das Feld mit der Absenderergänzung links und rechts aus dem normalen +Satzspiegel herausragen. Über +\OptionValue{refline}{wide}\important{\OptionValue{refline}{wide}} kann +gewählt werden, dass dies auch für die Geschäftszeile gelten soll. % +\iffalse% Hier überflüssig +Die Geschäftszeile enthält normalerweise zumindest das Datum, kann aber auch +weitere Angaben aufnehmen. % +\fi% +Mögliche Werte für diese Option sind \autoref{tab:\LabelBase.refline} zu +entnehmen. Voreingestellt\textnote{Voreinstellung} sind \PValue{narrow} und +\PValue{dateright}\ChangedAt{v3.09}{\Class{scrlttr2}}.% +% +\begin{table} + \caption[{Mögliche Werte für Option \Option{refline}}] + {Mögliche Werte für Option \Option{refline} zur + Konfiguration der Geschäftszeile} + \label{tab:\LabelBase.refline} + \begin{desctabular} + \pventry{dateleft}{\ChangedAt{v3.09}{\Class{scrlttr2}}% + Das Datum steht automatisch links in der Geschäftszeile.}% + \pventry{dateright}{\ChangedAt{v3.09}{\Class{scrlttr2}}% + Das Datum steht automatisch rechts in der Geschäftszeile.}% + \pventry{narrow}{Die Breite der Geschäftszeile richtet sich nach dem + Satzspiegel.}% + \pventry{nodate}{\ChangedAt{v3.09}{\Class{scrlttr2}}% + Das Datum wird nicht automatisch in die Geschäftszeile gesetzt.}% + \pventry{wide}{Die Breite der Geschäftszeile richtet sich nach Anschrift + und Absenderergänzung.}% + \end{desctabular} +\end{table} + + +\begin{Declaration} + \Variable{yourref} + \Variable{yourmail} + \Variable{myref} + \Variable{customer} + \Variable{invoice} +\end{Declaration} +Typische Felder der Geschäftszeile werden über die fünf Variablen +\Variable{yourref}, \Variable{yourmail}, \Variable{myref}, \Variable{customer} +und \Variable{invoice} verwaltet. % +\iffalse % Umbruchkorrektur +Die Bedeutung dieser Felder % +\else % +Ihre Bedeutung % +\fi % +ist \autoref{tab:\LabelBase.variables}, \autopageref{tab:\LabelBase.variables} +zu entnehmen. Jede dieser Variablen hat auch eine vordefinierte +\PName{Bezeichnung}, die in \autoref{tab:\LabelBase.reflineTerm} zu finden +ist. Wie weitere Variablen zur Geschäftszeile hinzugefügt werden können, ist +in \autoref{sec:scrlttr2-experts.variables} ab +\DescPageRef{scrlttr2-experts.cmd.newkomavar} erklärt. + +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside} + [{Vordefinierte Bezeichnungen der Variablen der + Geschäftszeile}] + {Vordefinierte Bezeichnungen der typischen Variablen der + Geschäftszeile unter Verwendung sprachabhängiger Anweisungen% + \label{tab:\LabelBase.reflineTerm}% + } + [l] + \begin{tabular}[t]{lll} + \toprule + Name & Bezeichnung & bei deutscher Sprache \\ + \midrule + \Variable{yourref} & \DescRef{scrlttr2-experts.cmd.yourrefname} & Ihr Zeichen \\ + \Variable{yourmail} & \DescRef{scrlttr2-experts.cmd.yourmailname} & Ihr Schreiben vom \\ + \Variable{myref} & \DescRef{scrlttr2-experts.cmd.myrefname} & Unser Zeichen \\ + \Variable{customer} & \DescRef{scrlttr2-experts.cmd.customername} & Kundennummer \\ + \Variable{invoice} & \DescRef{scrlttr2-experts.cmd.invoicename} & Rechnungsnummer \\ + \DescRef{\LabelBase.variable.date} & \DescRef{scrlttr2-experts.cmd.datename} & Datum \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} + +\BeginIndexGroup +\BeginIndex{FontElement}{refname}\LabelFontElement{refname}% +\BeginIndex{FontElement}{refvalue}\LabelFontElement{refvalue}% +Schriftart und Farbe\ChangedAt{v2.97c}{\Class{scrlttr2}} der Feldbezeichnung +und des Feldinhalts können über die beiden Elemente +\FontElement{refname}\important{\FontElement{refname}, \FontElement{refvalue}} +und \FontElement{refvalue} geändert werden. Dazu werden die Anweisungen +\DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) +verwendet. Die Voreinstellungen der \iffree{beiden }{}Elemente sind +\autoref{tab:\LabelBase.refnamerefvalue} zu entnehmen.% +\begin{table}[tp] +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside} + [{Schriftvoreinstellungen für die Elemente der Geschäftszeile}] + {Voreinstellungen für die Schrift der Elemente der Geschäftszeile% + \label{tab:\LabelBase.refnamerefvalue}} + [l] + \begin{tabular}[t]{ll} + \toprule + Element & Voreinstellung \\ + \midrule + \FontElement{refname} & \Macro{sffamily}\Macro{scriptsize} \\ + \FontElement{refvalue} & \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table}% +% +\EndIndexGroup + + +\begin{Declaration} + \Variable{placeseparator} +\end{Declaration}% +Sind bis auf \DescRef{\LabelBase.variable.date}% +\important{\DescRef{\LabelBase.variable.date}}\IndexVariable{date} alle +Variablen der Geschäftszeile leer, so wird keine echte Geschäftszeile +gesetzt. Stattdessen\textnote{Datumszeile} werden dann nur Ort\Index{Ort} und +Datum\Index{Datum} ausgegeben. Dabei bestimmt der \PName{Inhalt} der Variablen +\DescRef{\LabelBase.variable.place}\IndexVariable{place}% +\important{\DescRef{\LabelBase.variable.place}} den Ort. Für das Trennzeichen, +das in diesem Fall nach dem Ort gesetzt wird, ist der \PName{Inhalt} der +Variablen \Variable{placeseparator} zuständig. Der +vordefinierte\textnote{Voreinstellung} \PName{Inhalt} des Trennzeichens ist +dabei ein Komma, gefolgt von einem nicht umbrechbaren Leerzeichen. Ist der Ort +leer, so wird auch das Trennzeichen nicht gesetzt.% +\iffalse % Umbruchkorrektur +\ Der vordefinierte \PName{Inhalt} der Variablen +\DescRef{\LabelBase.variable.date} ist +\Macro{today}\IndexCmd{today}\important{\Macro{today}} und hängt indirekt von +der Einstellung der Option \DescRef{\LabelBase.option.numericaldate}% +\important{\DescRef{\LabelBase.option.numericaldate}}% +\IndexOption{numericaldate} ab (siehe +\DescPageRef{\LabelBase.option.numericaldate}).% +\fi % + +\BeginIndexGroup +\BeginIndex{FontElement}{placeanddate}\LabelFontElement{placeanddate}% +Für\ChangedAt{v3.12}{\Class{scrlttr2}} eine solche Datumszeile mit Ort findet +nicht die Schrifteinstellung des Elements +\DescRef{\LabelBase.fontelement.refvalue} Anwendung. Stattdessen wird das +Element \FontElement{placeanddate}\important{\FontElement{placeanddate}} +verwendet, dessen leere Voreinstellung mit Hilfe der Anweisungen +\DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) +geändert werden kann.% +\EndIndexGroup + +\iffalse% Umbruchkorrektur +Seit Version~3.09\ChangedAt{v3.09}{\Class{scrlttr2}} werden Ort und Datum +nicht mehr zwingend rechtsbündig ausgegeben. Stattdessen findet auch im Falle +der Datumszeile die Datumseinstellung von Option +\DescRef{\LabelBase.option.refline}\IndexOption{refline}% +\important{\DescRef{\LabelBase.option.refline}}, wie sie in +\autoref{tab:\LabelBase.refline} angegeben ist, Anwendung.% +\else% +Die in \autoref{tab:\LabelBase.refline} angegebenen Datumseinstellungen +\iffree{für \DescRef{\LabelBase.option.refline}\IndexOption{refline}% + \important{\DescRef{\LabelBase.option.refline}} }{}% Umbruchkorrektur +werden auch von der Datumszeile +beachtet. Voreingestellt\textnote{Voreinstellung} ist rechtsbündig.% +\fi + +\begin{Example} + Herr Musterfrau setzt nun auch die Variable für den Ort: + \lstinputcode[xleftmargin=1em]{letter-example-20-de.tex}% + \iffalse% Umbruchkorrektur + Damit erscheint vor dem Datum, wie in \autoref{fig:\LabelBase.letter-20} zu + sehen, % + \else% + In \autoref{fig:\LabelBase.letter-20} erscheint damit % + \fi % + der Ort, gefolgt von den automatischen Trennzeichen vor dem Datum. Dieses + Datum wurde im Beispielcode über Variable \DescRef{\LabelBase.variable.date} + explizit gesetzt, damit bei einem späteren \LaTeX-Durchlauf des Briefes das + ursprüngliche Datum erhalten bleibt und nicht automatisch das Datum des + \LaTeX-Laufs verwendet wird. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Beispiel: Brief mit erweitertem Absender, Logo, + Anschrift, Absenderergänzung, Ort, Datum, Anrede, Text, + Grußfloskel, Signatur, Postskriptum, Anlagen, Verteiler und + Lochermarke}]{Ergebnis eines kleinen Briefes mit erweitertem Absender, + Logo, Anschrift, Absenderergänzung, Ort, Datum, Anrede, + Text, Grußfloskel, Signatur, Postskriptum, Anlagen, Verteiler und + Lochermarke}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-20-de}} + \end{captionbeside} + \label{fig:\LabelBase.letter-20} + \end{figure} +\end{Example}% +\EndIndexGroup +\EndIndexGroup +\EndIndexGroup +\ExampleEndFix% Beispiel am Ende der Beschreibung + + +\begin{Declaration} + \PLength{refvpos} +\end{Declaration} +Diese Pseudolänge gibt den Abstand der Geschäftszeile von der Oberkante des +Papiers an. Ihr Wert wird in den vordefinierten +\File{lco}-Dateien\textnote{\File{lco}-Datei}\Index{lco-Datei=\File{lco}-Datei} +unterschiedlich eingestellt. % +\iffalse% +Typische Werte liegen zwischen 80{,}5\Unit{mm} und 98{,}5\Unit{mm}.% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \PLength{refwidth} + \PLength{refhpos} +\end{Declaration} +Die Pseudolänge \PLength{refwidth} gibt die Breite an, die für die +Geschäftszeile zur Verfügung steht. Ihr Wert wird in den vordefinierten +\File{lco}-Dateien typischerweise auf 0\Unit{pt} +gesetzt. Dieser\textnote{Achtung!} Wert hat eine besondere Bedeutung. % +\iffalse% Umbruchoptimierung +Es wird damit keineswegs festgelegt, dass für die Geschäftszeile keine Breite +zur Verfügung steht. Vielmehr bedeutet der Wert% +\else% +Damit wird festgelegt% +\fi% +, dass die verfügbare Breite erst innerhalb von +\DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} ermittelt wird. Die% +\iffalse% Umbruchoptimierung +\ dort ermittelte % +\else% +se % +\fi% +Breite richtet sich \iffree{dann }{}nach der Einstellung der Option +\DescRef{\LabelBase.option.refline}\important{\DescRef{\LabelBase.option.refline}}% +\IndexOption{refline~=\PName{Einstellung}} (siehe +\DescPageRef{\LabelBase.option.refline}). Gleichzeitig wird +\PLength{refhpos} entsprechend der Option gesetzt. Bei +\OptionValueRef{scrlttr2}{refline}{wide}% +\IndexOption{refline~=\textKValue{wide}} wird die Geschäftszeile zentriert, +wohingegen sie bei \OptionValueRef{scrlttr2}{refline}{narrow}% +\IndexOption{refline~=\textKValue{narrow}} am Satzspiegel links ausgerichtet +wird. + +Ist \PLength{refwidth} von Null verschieden, wird die Breite der +Geschäftszeile nicht von der Option \DescRef{\LabelBase.option.refline} +bestimmt, sondern \PLength{refhpos} ist der Abstand der Geschäftszeile von der +linken Papierkante. Ist\textnote{Achtung!} dieser Abstand Null, so wird die +Geschäftszeile so ausgerichtet, dass das Verhältnis zwischen ihrem Abstand von +der linken Papierkante zu ihrem Abstand von der rechten Papierkante dem +Verhältnis zwischen den Abständen des Satzspiegels von der linken und rechten +Papierkante entspricht. Bei auf dem Papier horizontal zentriertem Satzspiegel +wird also auch die Geschäftszeile zentriert. + +In der Regel werden diese Sonderfälle für die % +\iffalse% Umbruchkorrektur +häufigsten Anwendungen % +\else % +meisten Anwender % +\fi % +von geringem Interesse sein. Die\textnote{Tipp!} einfachste Regel lautet hier: +Entweder wird \PLength{refwidth} auf Null belassen und die Breite und +Ausrichtung der Geschäftszeile über die Option +\DescRef{\LabelBase.option.refline} bestimmt oder sowohl \PLength{refwidth} als +auch \PLength{refhpos} werden vom Anwender vorgegeben.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{refaftervskip} +\end{Declaration} +Diese Pseudolänge gibt den vertikalen Abstand an, der nach der Geschäftszeile +eingefügt werden soll. Der Wert wird in den vordefinierten +\File{lco}-Dateien\textnote{\File{lco}-Datei}\Index{lco-Datei=\File{lco}-Datei} +eingestellt. Er wirkt sich unmittelbar auf die Höhe des Textbereichs der +ersten Seite aus.% +\iffalse % Umbruchkorrektur +\ Der typische Wert liegt zwischen einer und zwei Zeilen.% +\fi % +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Titel und Betreff} +\seclabel{subject}% +\BeginIndexGroup +\BeginIndex{}{Betreff} + +Der Betreff eine Briefes wird in unterschiedlichen Ländern unterschiedlich +gesetzt. Die einen haben ihn gerne vor der Anrede, die anderen setzen ihn +danach. Einige Berufsgruppen wollen ihn teilweise sogar vor der Geschäftszeile +haben. + + +\begin{Declaration} + \Variable{title} +\end{Declaration} +Bei \KOMAScript{} kann ein Brief zusätzlich mit einem Titel\Index{Titel} +versehen werden. Der Titel wird zentriert in der Schriftgröße \Macro{LARGE} +unterhalb der Geschäftszeile ausgegeben. + +\BeginIndex{FontElement}{lettertitle}\LabelFontElement{lettertitle}% +\BeginIndex{FontElement}{title}\LabelFontElement{title}% +Die Schriftart für das Element\ChangedAt{v3.17}{\Class{scrlttr2}\and + \Package{scrletter}} \FontElement{lettertitle}% +\important{\FontElement{lettertitle}} kann mit den Anweisungen +\DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup} ab +\DescPageRef{\LabelBase.cmd.setkomafont}) geändert werden. Dabei sind auch +Größenangaben erlaubt. Die Größe \Macro{LARGE} wird der Schriftauswahl +innerhalb von \KOMAScript{} immer vorangestellt und ist daher auch nicht +Teil\textnote{Voreinstellung} der Voreinstellung +\Macro{normalcolor}\Macro{sffamily}\Macro{bfseries}. Bei +\Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} kann als Alias für +\FontElement{lettertitle} auch +\FontElement{title}\important{\FontElement{title}} verwendet werden. Bei +Verwendung von \Package{scrletter} mit einer \KOMAScript-Klasse ist das +nicht\textnote{Achtung!} möglich, da bei diesen Klassen bereits ein Element +\FontElement{title} mit abweichender Einstellung für den Dokumenttitel +existiert.% +\EndIndex{FontElement}{title}% +\EndIndex{FontElement}{lettertitle}% +\begin{Example} + Angenommen, Sie schreiben eine Mahnung. Sie setzen einen + entsprechenden Titel: +\begin{lstcode} + \setkomavar{title}{Mahnung} +\end{lstcode} + Damit sollte der Empfänger die Mahnung als solche erkennen. +\end{Example} +Während der \PName{Inhalt} der Variablen, wie im Beispiel gezeigt, den Titel +definiert, wird die \PName{Bezeichnung} der Variablen \Variable{title} von +\KOMAScript{} nicht genutzt. +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{subject}{Einstellung} + \Variable{subject} + \Variable{subjectseparator} +\end{Declaration} +\BeginIndex{}{Betreff}% +Um einen Betreff zu setzen, legt man den \PName{Inhalt} der Variablen +\Variable{subject} entsprechend fest. Mit Option +\OptionValue{subject}{titled}\important{\OptionValue{subject}{titled}} kann +dann zum einen gewählt werden, dass der Betreff mit einem Titel versehen +werden soll oder nicht. Der Titel wird über die Bezeichnung der Variablen +\Variable{subject} bestimmt (siehe \autoref{tab:\LabelBase.subjectTerm}). +Der\textnote{Voreinstellung} vordefinierte Inhalt des +Trennzeichens\Index{Trennzeichen} \Variable{subjectseparator} besteht aus +einem Doppelpunkt, gefolgt von einem Leerzeichen. Zum% +\important{\OptionValue{subject}{afteropening}\\ + \OptionValue{subject}{beforeopening}} +anderen kann über +\OptionValue{subject}{afteropening} +gewählt werden, dass der Betreff +abweichend von der Voreinstellung \OptionValue{subject}{beforeopening} erst +nach der Anrede gesetzt werden soll. Eine% +\important{\OptionValue{subject}{underlined}\\ + \OptionValue{subject}{centered}\\ + \OptionValue{subject}{right}} andere Formatierung kann mit +\OptionValue{subject}{underlined} und \OptionValue{subject}{centered} oder +\OptionValue{subject}{right}\ChangedAt{v2.97c}{\Class{scrlttr2}} eingestellt +werden. + +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside} + [{Vordefinierte Bezeichnungen der Variablen für den Betreff}] + {\hspace{0pt plus 1ex}% + Vordefinierte Bezeichnungen der Variablen für den Betreff} + [l] + \begin{tabular}[t]{lll} + \toprule + Name & Bezeichnung \\ + \midrule + \Variable{subject} & \DescRef{\LabelBase.cmd.usekomavar*}\PParameter{subjectseparator}% + \texttt{\%} \\ + & \texttt{\quad}% + \DescRef{\LabelBase.cmd.usekomavar}\PParameter{subjectseparator} \\ + \Variable{subjectseparator} & \DescRef{scrlttr2-experts.cmd.subjectname} \\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:\LabelBase.subjectTerm} +\end{table} + +Mögliche Werte für Option \Option{subject} sind +\autoref{tab:\LabelBase.subject} zu entnehmen. % +\iffalse% Umbruchkorrektur +Es wird ausdrücklich\textnote{Achtung!} darauf hingewiesen, dass bei der +Einstellung \OptionValue{subject}{underlined} der Betreff komplett in eine +Zeile passen muss!% +\else% +Es wird\textnote{Achtung!} darauf hingewiesen, dass bei Einstellung +\OptionValue{subject}{underlined} der Betreff in eine Zeile passen muss!% +\fi% +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside} + [{Mögliche Werte für Option \Option{subject}}] + {\hspace{0pt plus 1ex}% + Mögliche Werte für Option \Option{subject} zur Platzierung und + Formatierung eines Betreffs% + \label{tab:\LabelBase.subject}} + [l] + \begin{minipage}[t]{.667\linewidth} + \begin{desctabular}[t] + \pventry{afteropening}{Betreff nach der Anrede setzen.}\\[-1.7ex] + \pventry{beforeopening}{Betreff vor der Anrede setzen + (Voreinstellung).}\\[-1.7ex] + \pventry{centered}{Betreff zentrieren.}\\[-1.7ex] + \pventry{left}{Betreff linksbündig setzen (Voreinstellung).}\\[-1.7ex] + \pventry{right}{Betreff rechtsbündig setzen.}\\[-1.7ex] + \pventry{titled}{Betreff mit Titel versehen.}\\[-1.7ex] + \pventry{underlined}{Betreff unterstreichen. (Hinweis im Text + beachten!)}\\[-1.7ex] + \pventry{untitled}{Betreff nicht mit Titel versehen (Voreinstellung).}% + \end{desctabular} + \end{minipage} + \end{captionbeside} +\end{table} + +\BeginIndexGroup +\BeginIndex{FontElement}{lettersubject}\LabelFontElement{lettersubject}% +\BeginIndex{FontElement}{subject}\LabelFontElement{subject}% +Der Betreff wird in einer eigenen Schriftart\Index{Schrift>Art} gesetzt. Um +diese zu ändern, verwenden Sie die Anweisungen +\DescRef{\LabelBase.cmd.setkomafont} und +\DescRef{\LabelBase.cmd.addtokomafont} (siehe +\autoref{sec:\LabelBase.textmarkup} ab +\DescPageRef{\LabelBase.cmd.setkomafont}). Für das +Element\ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}} +\FontElement{lettersubject}\important{\FontElement{lettersubject}} ist als +Schrift \Macro{normalcolor}\Macro{bfseries} voreingestellt. Bei Klasse +\Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} kann als Alias für +\FontElement{lettersubject} auch +\FontElement{subject}\important{\FontElement{subject}} verwendet werden. Bei +Verwendung von Paket \Package{scrletter} mit einer \KOMAScript-Klasse ist das +nicht\textnote{Achtung!} möglich, da bei diesen Klassen bereits ein Element +\FontElement{subject} mit abweichender Einstellung für den Dokumenttitel +existiert. +\EndIndexGroup + +\begin{Example} + Herr Musterfrau setzt nun auch den Betreff. % + \iftrue % Umbruchkorrektur + Als eher traditioneller veranlagter Mensch möchte er % + \else % + Er möchte % + \fi % + außerdem, dass der Betreff mit einer % + \iftrue % Umbruchkorrektur + entsprechenden % + \fi % + Spitzmarke versehen wird, und setzt deshalb auch die zugehörige Option:% + \lstinputcode[xleftmargin=1em]{letter-example-21-de.tex}% + Das Ergebnis ist in \autoref{fig:\LabelBase.letter-21} zu sehen. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Beispiel: Brief mit erweitertem Absender, Logo, + Anschrift, Absenderergänzung, Ort, Datum, Betreff, Anrede, Text, + Grußfloskel, Signatur, Postskriptum, Anlagen, Verteiler und + Lochermarke}]{Ergebnis eines kleinen Briefes mit erweitertem Absender, + Logo, Anschrift, Absenderergänzung, Ort, Datum, Betreff, + Anrede, Text, Grußfloskel, Signatur, Postskriptum, Anlagen, Verteiler + und Lochermarke}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-21-de}} + \end{captionbeside} + \label{fig:\LabelBase.letter-21} + \end{figure} +\end{Example} +Voreingestellt\textnote{Voreinstellung} sind +\OptionValue{subject}{beforeopening}, \OptionValue{subject}{left} sowie +\OptionValue{subject}{untitled}.% +\EndIndexGroup + +\begin{Declaration} + \PLength{subjectvpos} +\end{Declaration} +\ChangedAt{v3.01}{\Class{scrlttr2}}% +Ist\textnote{Achtung!} der Wert dieser Pseudolänge 0\Unit{pt}, so bestimmt die +Option +\DescRef{\LabelBase.option.subject}\important{\DescRef{\LabelBase.option.subject}}% +\IndexOption{subject~=\PName{Einstellung}} (siehe +\DescPageRef{\LabelBase.option.subject}) die +Position des Betreffs. Dabei spielen dann auch die nachfolgend erklärten +Pseudolängen \DescRef{\LabelBase.plength.subjectbeforevskip} und \DescRef{\LabelBase.plength.subjectaftervskip} ihre +Rolle. Bei allen anderen Werten wird der Betreff mit dem entsprechenden +Abstand von der oberen Papierkante platziert. Es\textnote{Tipp!} wird +empfohlen in diesem Fall darauf zu achten, dass genügend Platz zur Verfügung +steht, damit Überschneidungen mit anderen Elementen unwahrscheinlich sind. +\begin{Example} + Einige wenige Berufsgruppen ziehen es vor, wenn der Betreff noch vor der + Geschäftszeile steht. Hierzu kann man die Position wie folgt wählen, wobei + auch die Position der Geschäftszeile angepasst wird: +\begin{lstcode} + \ProvidesFile{lawsubj.lco} + [2008/11/03 lawyers lco file] + \setplength{subjectvpos}{\useplength{refvpos}} + \addtoplength{refvpos}{3\baselineskip} + \endinput +\end{lstcode} + Will man, dass zwischen Betreff und Geschäftszeile noch mindestens eine + Zeile frei bleibt, hat man so Platz für maximal zwei Zeilen Betreff.% + \iftrue % Umbruchkorrektur + \ Das sollte in den allermeisten Fällen genügen.% + \fi% +\end{Example} +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \PLength{subjectbeforevskip} + \PLength{subjectaftervskip} +\end{Declaration} +\ChangedAt{v3.01}{\Class{scrlttr2}}% +Wird der Betreff nicht absolut platziert, sondern vor oder nach der Anrede, so +kann vor und nach dem Betreff ein zusätzlicher Abstand eingefügt werden. Der +Abstand vor dem Betreff trifft dabei gegebenenfalls mit anderen Abständen, +etwa dem automatischen Abstand von einer Zeile nach dem Titel, zusammen. In +der Voreinstellung\textnote{Voreinstellung} wird daher in der Regel kein +weiterer Abstand an dieser Stelle eingefügt. Der Abstand nach dem Betreff +beträgt in der Voreinstellung von Klasse und Paket zwei Zeilen.% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Schlussgruß} +\seclabel{closing} +\BeginIndexGroup +\BeginIndex{}{Schlussgruss=Schlussgruß}% +\BeginIndex{}{Gruss=Gruß} + +Dass der Schlussgruß mit \DescRef{\LabelBase.cmd.closing}\IndexCmd{closing} +gesetzt wird, wurde bereits in \autoref{sec:\LabelBase.document}, +\DescPageRef{\LabelBase.cmd.closing} erklärt. % +\iffalse % Umbruchkorrektur +Unter dem Schlussgruß wird häufig noch eine Signatur, eine Art Erläuterung zur +Unterschrift, gesetzt. Die Unterschrift wiederum findet Platz zwischen dem +Schlussgruß und der Signatur.% +\else% +Unter Schlussgruß und Unterschrift wird häufig noch eine Signatur als eine Art +Erläuterung oder Klartext der Unterschrift gesetzt.% +\fi% + +\begin{Declaration} + \Variable{signature} +\end{Declaration} +Die Variable \Variable{signature}\Index{Signatur} nimmt eine Art Erläuterung +zur Unterschrift\Index{Unterschrift} auf. Ihr \PName{Inhalt} ist mit +\DescRef{\LabelBase.cmd.usekomavar}\PParameter{fromname} vordefiniert. Eine +solche Erläuterung kann auch mehrzeilig sein. Die einzelnen Zeilen sollten +dann mit doppeltem Backslash voneinander getrennt +werden. Absätze\textnote{Achtung!} innerhalb der Erläuterung sind jedoch nicht +gestattet.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{raggedsignature} +\end{Declaration} +Grußfloskel\Index{Gruss=Gruß}\Index{Signatur} und Erläuterung der +Unterschrift\Index{Unterschrift} werden innerhalb einer gemeinsamen Box +gesetzt. Die Breite dieser Box wird durch die längste Zeile innerhalb von +Grußfloskel und Erläuterung bestimmt. + +Wo genau diese Box platziert wird, ist durch die Pseudolängen +\DescRef{\LabelBase.plength.sigindent}\IndexPLength{sigindent} und +\DescRef{\LabelBase.plength.sigbeforevskip}\IndexPLength{sigbeforevskip} +(siehe \DescPageRef{\LabelBase.plength.sigindent}) bestimmt. Durch den Befehl +\Macro{raggedsignature} wird die Ausrichtung innerhalb der Box bestimmt. In +den vordefinierten\textnote{Voreinstellung} \File{lco}-Dateien ist die +Anweisung entweder auf \Macro{centering} oder +auf \Macro{raggedright} (nur \Option{KOMAold}) gesetzt. Um innerhalb der Box +beispielsweise eine linksbündige oder rechtsbündige Ausrichtung zu erhalten, +kann der Befehl in gleicher Weise umdefiniert werden wie +\DescRef{maincls.cmd.raggedsection} (siehe % +\iffalse % Umbruchkorrektur +das entsprechende Beispiel in % +\fi % +\autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.raggedsection}). + +\begin{Example} + Herr Musterfrau will sich nun wirklich wichtig machen und deshalb in der + Signatur nochmals darauf hinweisen, dass er selbst schon Vereinsvorsitzender + war. Deshalb ändert er die Variable + \DescRef{\LabelBase.variable.signature}. Außerdem will er, dass die Signatur + linksbündig unter dem Schlussgruß steht, und definiert dazu + \Macro{raggedsignature} um:% + {\phantomsection\xmpllabel{letterwithoutlco}}% + \lstinputcode[xleftmargin=1em]{letter-example-22-de}% + Das Ergebnis ist in \autoref{fig:\LabelBase.letter-22} zu sehen.% + \iffalse % Umbruchkorrektur (Achtung wegen unten!) + Dieses Beispiel zeigt die wichtigsten Elemente des Briefbogens und kann so + als Muster für eigene Briefe dienen.% + \fi % + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Beispiel: Brief mit erweitertem Absender, Logo, + Anschrift, Absenderergänzung, Ort, Datum, Betreff, Anrede, Text, + Grußfloskel, geänderter Signatur, Postskriptum, Anlagen, Verteiler und + Lochermarke}]{Ergebnis eines kleinen Briefes mit erweitertem Absender, + Logo, Anschrift, Absenderergänzung, Ort, Datum, Betreff, + Anrede, Text, Grußfloskel, geänderter Signatur, Postskriptum, Anlagen, + Verteiler und Lochermarke}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-22-de}} + \end{captionbeside} + \label{fig:\LabelBase.letter-22} + \end{figure} +\end{Example} +\iffalse% Umbruchkorrekturtext (Achtung wegen oben!) + Das vorausgehende Beispiel zeigt die wichtigsten, aber nicht alle möglichen + Elemente eines Briefes. Es kann jedoch sehr gut als allgemeines Muster + dienen.% +\else + \ExampleEndFix% Beispiel am Ende der Erklärung +\fi +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{sigindent} + \PLength{sigbeforevskip} +\end{Declaration} +Grußfloskel\Index{Gruss=Gruß}\Index{Signatur} und Erläuterung der +Unterschrift\Index{Unterschrift} werden innerhalb einer Box gesetzt. Die +Breite dieser Box wird durch die längste Zeile innerhalb von Grußfloskel und +Erläuterung bestimmt. + +Die Box wird mit dem durch die Pseudolänge \PLength{sigindent} festgelegten +Einzug gesetzt. In den vordefinierten\textnote{Voreinstellung} +\File{lco}-Dateien ist der Einzug auf 0\Unit{mm} gesetzt. + +Zwischen Grußfloskel und Erläuterung wird ein vertikaler Abstand eingefügt, +der mit der Pseudolänge \PLength{sigbeforevskip} festgelegt ist. In den +vordefinierten\textnote{Voreinstellung} \File{lco}-Dateien ist der Wert auf +zwei Zeilen eingestellt. In diese Lücke setzen Sie dann Ihre Unterschrift.% +\iffalse% Umbruchkorrekturtext +\ Sollten\textnote{Tipp!} Sie sich dazu entschließen in die Variable +\DescRef{\LabelBase.variable.signature}\IndexVariable{signature}% +\important{\DescRef{\LabelBase.variable.signature}} mit Paket +\Package{graphicx}\IndexPackage{graphicx} ein Faksimile Ihrer Unterschrift +einzufügen, wäre es also sinnvoll den Wert von \PLength{sigbeforevskip} und +damit die Lücke zwischen Schlussgruß und Signatur zu verringern.% +\fi% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Briefbogenfuß} +\seclabel{firstFoot}% +\BeginIndexGroup +\BeginIndex{}{Briefbogenfuss=Briefbogenfuß}% + +Die erste Seite eines Briefes, der Briefbogen, enthält nicht nur einen eigenen +Kopf, den Briefkopf. Diese Seite enthält auch einen eigenen +Fuß\Index{Fuss=Fuß}, den Briefbogenfuß. % +\iftrue% Umbruchvarianten +Dieser wird ebenfalls nicht über den Seitenstil% +\else% +Genau wie der Briefkopf wird der Briefbogenfuß nicht über den Seitenstil% +\fi% +, sondern unmittelbar von \DescRef{\LabelBase.cmd.opening}\IndexCmd{opening}% +\important{\DescRef{\LabelBase.cmd.opening}} ausgegeben. + + +\begin{Declaration} + \OptionVName{enlargefirstpage}{Ein-Aus-Wert} +\end{Declaration} +\begin{Explain} + Die erste Seite eines Briefes fällt % + \iftrue % Umbruchkorrektur + aufgrund der vielen Konsultationselemente, wie dem Briefkopf oder der + Anschrift, + % + \fi % + immer aus dem normalen Satzspiegel. Von \KOMAScript{} werden Mechanismen + bereitgestellt, um die Höhe und vertikale Ausrichtung von Kopf und Fuß der + ersten Seite unabhängig von den Folgeseiten zu bestimmen. Würde dadurch der + Fuß der ersten Seite in den Textbereich\Index{Text>Bereich} ragen, so wird + der Textbereich der ersten Seite automatisch mit Hilfe von + \Macro{enlargethispage}\IndexCmd{enlargethispage} verkleinert. +\end{Explain} +Soll der Textbereich auch automatisch mit \Macro{enlargethispage} vergrößert +werden, falls der Fuß der ersten Seite dies erlaubt, so kann das mit dieser +Option erreicht werden. Es passt dann bestenfalls etwas mehr Text auf die +erste Seite. Siehe hierzu auch die Erklärung zur Pseudolänge +\DescRef{\LabelBase.plength.firstfootvpos} auf +\DescPageRef{\LabelBase.plength.firstfootvpos}. Als \PName{Ein-Aus-Wert} kann +einer der Standardwerte für einfache Schalter aus +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} verwendet +werden. Voreingestellt\textnote{Voreinstellung} ist +\PValue{false}.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{firstfoot}{Ein-Aus-Wert} +\end{Declaration} +\BeginIndex{}{Briefbogenfuss=Briefbogenfuß}% +Diese\ChangedAt{v2.97e}{\Class{scrlttr2}} Option bestimmt, ob der +Briefbogenfuß überhaupt gesetzt wird. Das Abschalten mit +\OptionValue{firstfoot}{false}\important{\OptionValue{firstfoot}{false}} hat +Auswirkungen wenn gleichzeitig die zuvor dokumentierte Option +\DescRef{\LabelBase.option.enlargefirstpage} verwendet wird, da sich +dadurch die Seite logisch nach unten verlängert. Zwischen dem Ende des +Satzspiegels und dem Seitenende bleibt dann nur der normale Abstand zwischen +Satzspiegel und Seitenfuß. + +Die Option versteht die Standardwerte für einfache Schalter, die in +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} angegeben +sind. Voreingestellt\textnote{Voreinstellung} ist das Setzen des +Briefbogenfußes.% +\EndIndexGroup + + +\begin{Declaration} + \Variable{firstfoot} +\end{Declaration}% +\BeginIndex{}{Briefbogenfuss=Briefbogenfuß}% +\iffalse % Umbruchkorrektur +Der Fuß der ersten Seite ist in der Voreinstellung\textnote{Voreinstellung} +leer. Es besteht jedoch die Möglichkeit, über den \PName{Inhalt} der +Variablen\ChangedAt{v3.08}{\Class{scrlttr2}} \Variable{firstfoot} einen neue +Festlegung zu treffen. % +\else % +Der Inhalt der Variablen\ChangedAt{v3.08}{\Class{scrlttr2}} +\Variable{firstfoot} und damit des Fußes der ersten Seite ist in der +Voreinstellung\textnote{Voreinstellung} leer. % +\fi % +Die \PName{Bezeichnung} der Variablen wird von \KOMAScript{} nicht genutzt. + +\BeginIndex{Variable}{frombank}% +\begin{Example} + Sie wollen den Inhalt der Variablen \DescRef{\LabelBase.variable.frombank}, + also die Bankverbindung, im Fuß der ersten Seite ausgeben. Der doppelte + Backslash soll dabei durch ein Komma ersetzt werden: +\begin{lstcode} + \setkomavar{firstfoot}{% + \parbox[b]{\linewidth}{% + \centering\def\\{, }\usekomavar{frombank}% + }% + } +\end{lstcode} + Natürlich können Sie für das Trennzeichen auch eine eigene Variable + definieren.% + \iffalse % Umbruchkorrektunr + Ich überlasse dem Leser dies als Übung.% + \fi% + + Will man eine Art Brief"|fuß als Gegengewicht zum Briefkopf verwenden, so + kann dieser beispielsweise wie folgt definiert werden: +\begin{lstcode} + \setkomavar{firstfoot}{% + \parbox[t]{\textwidth}{\footnotesize + \begin{tabular}[t]{l@{}}% + \multicolumn{1}{@{}l@{}}{Gesellschafter:}\\ + Hugo Mayer\\ + Bernd Müller + \end{tabular}% + \hfill + \begin{tabular}[t]{l@{}}% + \multicolumn{1}{@{}l@{}}{Geschäftsführung:}\\ + Liselotte Mayer\\[1ex] + \multicolumn{1}{@{}l@{}}{Gerichtsstand:}\\ + Hinterdupfeldingen + \end{tabular}% + \Ifkomavarempty{frombank}{}{% + \hfill + \begin{tabular}[t]{l@{}}% + \multicolumn{1}{@{}l@{}}{% + \usekomavar*{frombank}:}\\ + \usekomavar{frombank} + \end{tabular}% + }% + }% + } +\end{lstcode} + Das Beispiel stammt ursprünglich von Torsten Krüger. Es wird empfohlen, eine + solche Definition für die mehrfache Verwendung in unterschiedlichen + Dokumenten in einer eigenen + \File{lco}-Datei\Index{lco-Datei=\File{lco}-Datei} abzulegen. Mit +\begin{lstcode} + \setkomavar{frombank}{IBAN DE21~87654321~13456789\\ + bei der HansWurstBank\\ + BIC GRMLDEHD000} +\end{lstcode} + kann die Bankverbindung dann im Dokument passend dazu gesetzt werden.% +\iffalse% Umbruchkorrekturmöglichkeit + \ Abhängig\textnote{Achtung!} von den Voreinstellungen ist ein solch hoher + Fuß jedoch eventuell nicht vorgesehen und wird deshalb möglicherweise zu + tief platziert. In einem solchen Fall kann die vertikale Position über die + Pseudolänge \DescRef{\LabelBase.plength.firstfootvpos}% + \important{\DescRef{\LabelBase.plength.firstfootvpos}}% + \IndexPLength{firstfootvpos} angepasst werden (siehe + \DescPageRef{\LabelBase.plength.firstfootvpos}).% +\fi +\end{Example} + +Im\textnote{Achtung!} Beispiel wurde ein mehrzeiliger Fuß gesetzt. Bei einer +Kompatibilitätseinstellung ab Version +2.9u\important{\OptionValueRef{\LabelBase}{version}{2.9u}} (siehe +\DescRef{\LabelBase.option.version} in +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}) reicht der Platz dafür in der Regel +nicht aus. Sie sollten dann \DescRef{\LabelBase.plength.firstfootvpos} (siehe +\DescPageRef{\LabelBase.plength.firstfootvpos}) entsprechend +verringern.% +\EndIndexGroup + +\begin{Declaration} + \Variable{frombank} +\end{Declaration}% +\BeginIndex{}{Briefbogenfuss=Briefbogenfuß} Die im vorherigen Beispiel +verwendete Variable \Variable{frombank} nimmt derzeit eine Sonderstellung +ein. Sie wird intern bisher nicht verwendet. Sie kann jedoch vom Anwender +verwendet werden, um die Bankverbindung\Index{Bankverbindung} in das +Absenderergänzungsfeld (siehe Variable \DescRef{\LabelBase.variable.location}, +\DescPageRef{\LabelBase.variable.location}) oder wie im Beispiel in den Fuß zu +setzen.% +% +\EndIndexGroup + +\begin{Declaration} + \PLength{firstfootvpos} +\end{Declaration} +Diese Pseudolänge gibt den Abstand des Fußes der ersten Briefseite von der +Oberkante des Papiers an. Es wird außerdem dafür gesorgt, dass der Textbereich +nicht in den Fuß hineinragt. Hierzu wird auf der ersten Seite gegebenenfalls +die Höhe des Textbereichs mit Hilfe von +\Macro{enlargethispage}\IndexCmd{enlargethispage}% +\important{\Macro{enlargethispage}} verkleinert. Mit Hilfe der Option +\DescRef{\LabelBase.option.enlargefirstpage}% +\important{\DescRef{\LabelBase.option.enlargefirstpage}} (siehe +\DescPageRef{\LabelBase.option.enlargefirstpage}) kann dafür gesorgt werden, +dass die Höhe des Textbereichs umgekehrt gegebenenfalls auch vergrößert +wird. Damit kann dann der Abstand zwischen Textbereich und Fuß der ersten +Seite auf den Wert der Länge +\Length{footskip}\IndexLength{footskip}\important{\Length{footskip}} +verringert werden. + +Bei\textnote{\OptionValueRef{\LabelBase}{version}{2.9t}} +Kompatibilitätseinstellungen\ChangedAt{v2.9t}{\Class{scrlttr2}} bis +Version~2.9t (siehe \DescRef{\LabelBase.option.version} in +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}) wird außer bei \Option{KOMAold} und +\Option{NF} in allen vordefinierten +\File{lco}-Dateien\textnote{\File{lco}-Datei}\Index{lco-Datei=\File{lco}-Datei} +(siehe \autoref{sec:\LabelBase.lcoFile}) der Fuß abhängig vom Satzspiegel +gesetzt% +\iffalse % Umbruchkorrektur +. Damit hat dann auch \DescRef{\LabelBase.option.enlargefirstpage}% +\important{\DescRef{\LabelBase.option.enlargefirstpage}} keine Wirkung. % +\else % +\ und \DescRef{\LabelBase.option.enlargefirstpage}% +\important{\DescRef{\LabelBase.option.enlargefirstpage}} ignoriert. % +\fi % +Ab +Version 2.9u bekommt der Fuß eine Position am unteren Ende des Papiers. Damit +ist dann die Höhe des Satzspiegels des Briefbogens eventuell auch von der +Option \DescRef{\LabelBase.option.enlargefirstpage} abhängig. + +Wird der Briefbogenfuß mit Option +\OptionValueRef{scrlttr2}{firstfoot}{false}% +\important{\OptionValueRef{scrlttr2}{firstfoot}{false}}% +\IndexOption{firstfoot~=\textKValue{false}}\ChangedAt{v2.97e}{\Class{scrlttr2}} +(siehe \DescPageRef{\LabelBase.option.firstfoot}) abgeschaltet, so wird +\PLength{firstfootvpos} ignoriert und stattdessen +\Length{paperheight}\IndexLength{paperheight} angenommen. Es bleibt dann +ein minimaler unterer Rand von \Length{footskip}\IndexLength{footskip}.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{firstfoothpos} +\end{Declaration} +Die\textnote{Achtung!} Pseudolänge +\PLength{firstfoothpos}\ChangedAt{v3.05}{\Class{scrlttr2}} gibt bei einem +positiven Wert den Abstand des Briefbogenfußes von der linken Papierkante +an. Ist der Wert sogar größer oder gleich der Breite des Papiers, +\Length{paperwidth}\IndexLength{paperwidth}, so wird der Fuß horizontal +zentriert auf dem Briefbogen platziert. Ein negativer Wert gibt den Abstand +des Fußes von der rechten Papierkante an. Ist der Wert jedoch kleiner oder +gleich der negativen Breite des Papiers, so wird der Fuß bündig zum linken +Rand des Satzspiegels platziert. + +Voreingestellt\textnote{Voreinstellung} ist typischerweise ein Wert von +\Length{maxdimen}\IndexLength{maxdimen}% +\iffalse % Umbruchkorrektur +, also der größtmögliche Wert für eine Länge% +\fi% +\ und infolge dessen horizontale Zentrierung.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{firstfootwidth} +\end{Declaration} +Diese Pseudolänge gibt die Breite des Fußes der ersten Briefseite, also des +Briefbogens, an. Der Wert stimmt in den vordefinierten \File{lco}-Dateien mit +\DescRef{\LabelBase.plength.firstheadwidth}\important{\DescRef{\LabelBase.plength.firstheadwidth}}% +\IndexPLength{firstheadwidth} überein.% +% +\EndIndexGroup +% +\EndIndexGroup +% +\EndIndexGroup + +\iffree{}{\clearpage}% Umbruchkorrektur +\LoadCommonFile{parmarkup}% \section{Absatzauszeichnung} + +\LoadCommonFile{oddorevenpage}% \section{Erkennung von rechten und linken Seiten} + + +\section{Kopf und Fuß bei vordefinierten Seitenstilen} +\seclabel{pagestyle} +\BeginIndexGroup +\BeginIndex{}{Seiten>Stil} + +Eine der allgemeinen Eigenschaften eines Dokuments ist der Seitenstil. Bei +{\LaTeX} versteht man unter dem Seitenstil in erster Linie den Inhalt der +Kopf- und Fußzeilen. Wie\textnote{Achtung!} bereits in +\autoref{sec:\LabelBase.firstpage} erwähnt, werden Kopf und Fuß des Briefbogens +als Elemente des Briefbogens betrachtet und unterliegen damit nicht den +Einstellungen für den Seitenstil. Es geht also hier im Wesentlichen um den +Seitenstil der weiteren Briefseiten nach dem Briefbogen. Bei einseitigen +Briefen ist das der Seitenstil des Zweitbogens. Bei doppelseitigen Briefen ist +auch der Seitenstil aller Rückseiten betroffen. + + +\begin{Declaration} + \Macro{letterpagestyle} +\end{Declaration} +Der\ChangedAt{v3.19}{\Class{scrlttr2}\and \Package{scrletter}} für Briefe +voreingestellte Seitenstil wird durch den Inhalt dieser Anweisung bestimmt. In +der Voreinstellung\textnote{Voreinstellung} von +\Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} ist die Anweisung leer +definiert. Das bedeutet, dass der Seitenstil von Briefen dem des restlichen +Dokuments entspricht. Dies ist deshalb sinnvoll, weil \Class{scrlttr2} für +reine Briefdokumente gedacht ist und es dafür einfacher ist, den Seitenstil +wie gewohnt mit \DescRef{\LabelBase.cmd.pagestyle} global einzustellen. + +Da sowohl Seitenstil \DescRef{\LabelBase.pagestyle.plain} als auch der Stil +\DescRef{\LabelBase.pagestyle.headings} anderer Klassen vom gewünschten +Seitenstil für Briefe abweicht, ist für das Paket +\Package{scrletter}\OnlyAt{\Package{scrletter}}\textnote{Voreinstellung} der +Seitenstil +\DescRef{\LabelBase.pagestyle.plain.letter}\IndexPagestyle{plain.letter}% +\important{\DescRef{\LabelBase.pagestyle.plain.letter}} in der Anweisung +\Macro{letterpagestyle} gespeichert. Damit werden alle Briefe mit dem zum +Seitenstil \DescRef{\LabelBase.pagestyle.letter}\IndexPagestyle{letter} +gehörenden +\hyperref[desc:\LabelBase.pagestyle.plain.letter]{\PageStyle{plain}}-Seitenstil +gesetzt unabhängig davon, was für das restliche Dokument als Seitenstil +eingestellt ist. +\begin{Example} + Sie wollen auch bei Verwendung von Paket \Package{scrletter}, dass die + Briefe in dem Seitenstil gesetzt werden, der für das Dokument selbst mit + \DescRef{\LabelBase.cmd.pagestyle} eingestellt wurde. Dazu schreiben sie die + Anweisung +\begin{lstcode} + \renewcommand*{\letterpagestyle}{} +\end{lstcode} + in die Dokumentpräambel. Dabei\textnote{Achtung!} ist übrigens der Stern bei + \Macro{renewcommand*} wichtig!% +\end{Example} +Natürlich haben die Anweisung \DescRef{\LabelBase.cmd.pagestyle} und +\DescRef{\LabelBase.cmd.thispagestyle} innerhalb eines Briefes Vorrang vor dem +innerhalb von \Macro{begin}\PParameter{letter} über \Macro{letterpagestyle} +eingestellten Seitenstil.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{headsepline}{Ein-Aus-Wert} + \OptionVName{footsepline}{Ein-Aus-Wert} +\end{Declaration}% +Mit diesen Optionen kann bei \Class{scrlttr2}\OnlyAt{scrlttr2} eingestellt +werden, ob eine Trennlinie\Index{Trennlinie}\Index{Linie} unter dem +Kopf\Index{Seiten>Kopf} oder über dem Fuß\Index{Seiten>Fuss=Fuß} von +Folgeseiten gewünscht wird. Als \PName{Ein-Aus-Wert} kann einer der +Standardwerte für einfache Schalter aus \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} verwendet +werden. Ein\important{\OptionValue{headsepline}{true}} Aktivieren der Option +\Option{headsepline} schaltet die Linie unter dem Kopf +ein. Ein\important{\OptionValue{footsepline}{true}} Aktivieren der Option +\Option{footsepline} schaltet die Linie über dem Fuß ein. Die Deaktivierung +der Optionen schaltet die jeweilige Linie aus. + +Beim Seitenstil \DescRef{\LabelBase.pagestyle.empty}% +\important{\DescRef{\LabelBase.pagestyle.empty}} (siehe +\DescPageRef{\LabelBase.pagestyle.empty}) % später in diesem Abschnitt) +haben die beiden Optionen \Option{headsepline} und +\Option{footsepline} selbstverständlich keine Auswirkung. Bei diesem +Seitenstil soll ja auf Seitenkopf\Index{Seiten>Kopf} und +Seitenfuß\Index{Seiten>Fuss=Fuß} ausdrücklich verzichtet werden. + +Typografisch\important{\DescRef{\LabelBase.pagestyle.headings}\\ + \DescRef{\LabelBase.pagestyle.myheadings}\\ + \DescRef{\LabelBase.pagestyle.plain}} betrachtet hat eine solche Linie immer +die Auswirkung, dass der Kopf oder Fuß optisch näher an den Text heranrückt. +Dies bedeutet aber nicht, dass Kopf oder Fuß räumlich weiter vom +Textkörper\Index{Text>Bereich} weggerückt werden müssten. Stattdessen sollten +sie bei der Berechnung des Satzspiegels als zum Textkörper gehörend +betrachtet werden. Dies wird bei \Class{scrlttr2} dadurch erreicht, dass bei +Verwendung der Klassenoption \Option{headsepline} automatisch die Paketoption +\DescRef{typearea.option.headinclude}% +\important{\DescRef{typearea.option.headinclude}} mit gleichem Wert an das +\hyperref[cha:typearea]{\Package{typearea}}-Paket weitergereicht +wird. Entsprechendes gilt bei \DescRef{\LabelBase.option.footsepline} für +\DescRef{typearea.option.footinclude}% +\important{\DescRef{typearea.option.footinclude}}. + +Die Optionen führen selbst keine automatische Neuberechnung des Satzspiegels +aus. Zur Neuberechnung des Satzspiegels siehe Option +\DescRef{typearea.option.DIV} mit den Werten \PValue{last} oder +\PValue{current} (\DescPageRef{typearea.option.DIV.last}) oder Anweisung +\DescRef{typearea.cmd.recalctypearea} +(\DescPageRef{typearea.cmd.recalctypearea}) in \autoref{cha:typearea}. + +Das Paket \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} (siehe +\autoref{cha:scrlayer-scrpage}) bietet weitere Einflussmöglichkeiten für +Linien im Kopf und Fuß und kann auch mit \Class{scrlttr2} kombiniert +werden. Das Paket \Package{scrletter} verwendet hingegen automatisch +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} zur Definition der +Seitenstile \DescRef{\LabelBase.pagestyle.letter} und +\DescRef{\LabelBase.pagestyle.plain.letter}. Die von +\Package{scrletter}\OnlyAt{\Package{scrletter}} definierten Seitenstile +unterliegen damit den Regeln jenes Pakets. Dies betrifft insbesondere das +Setzen der Linien in Kopf und Fuß des +\hyperref[desc:\LabelBase.pagestyle.plain.letter]{\PageStyle{plain}}-Seitenstils +\DescRef{\LabelBase.pagestyle.plain.letter}. Siehe dazu in +\autoref{sec:scrlayer-scrpage.pagestyle.content}, +\DescPageRef{scrlayer-scrpage.option.headsepline} und +\DescPageRef{scrlayer-scrpage.option.plainheadsepline} die Optionen +\DescRef{scrlayer-scrpage.option.headsepline} und +\DescRef{scrlayer-scrpage.option.plainheadsepline}. Auch Einstellungen wie +\DescRef{scrlayer-scrpage.option.automark} sind für den Seitenstil +\DescRef{\LabelBase.pagestyle.letter} von einiger Bedeutung.% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{pagenumber}{Position} +\end{Declaration} +Mit Hilfe dieser Option kann bestimmt werden, ob und wo eine Seitenzahl auf +Folgeseiten gesetzt werden soll. Die Option wirkt sich bei +\Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} auf die +Seitenstile\important{\DescRef{\LabelBase.pagestyle.headings}\\ + \DescRef{\LabelBase.pagestyle.myheadings}\\ + \DescRef{\LabelBase.pagestyle.plain}} +\DescRef{\LabelBase.pagestyle.headings}, +\DescRef{\LabelBase.pagestyle.myheadings} und +\DescRef{\LabelBase.pagestyle.plain} und bei +\Package{scrletter}\OnlyAt{\Package{scrletter}} auf +\DescRef{\LabelBase.pagestyle.letter} und +\DescRef{\LabelBase.pagestyle.plain.letter} aus. Sie beeinflusst außerdem die +Voreinstellung der Seitenstile des Pakets +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% +\IndexPackage{scrlayer-scrpage}, soweit sie vor dem Laden des Pakets gesetzt +wird (siehe \autoref{cha:scrlayer-scrpage}). Es gibt Werte, die sich nur auf +die horizontale Position auswirken, Werte, die nur die vertikale Position +beeinflussen, und Werte, die zugleich die vertikale und die horizontale +Position festlegen. Mögliche Werte sind \autoref{tab:\LabelBase.pagenumber} zu +entnehmen. Voreingestellt\textnote{Voreinstellung} ist \PValue{botcenter}.% +% +\begin{table}[t!]% Umbruchkorrektur + \caption[{Mögliche Werte für Option \Option{pagenumber}}]% + {Mögliche Werte für Option \Option{pagenumber} zur Positionierung der + Paginierung innerhalb der Seitenstile} + \label{tab:\LabelBase.pagenumber} + \begin{desctabular} + \entry{\PValue{bot}, \PValue{foot}}{% + Seitenzahl im Fuß ohne Änderung der horizontalen Position}\\[-1.7ex] + \entry{\PValue{botcenter}, \PValue{botcentered}, \PValue{botmittle}, + \PValue{footcenter}, \PValue{footcentered}, \PValue{footmiddle}}{% + Seitenzahl zentriert innerhalb des Fußes}\\[-1.7ex] + \entry{\PValue{botleft}, \PValue{footleft}}{% + Seitenzahl links im Fuß}\\[-1.7ex] + \entry{\PValue{botright}, \PValue{footright}}{% + Seitenzahl rechts im Fuß}\\[-1.7ex] + \entry{\PValue{center}, \PValue{centered}, \PValue{middle}}{% + Seitenzahl zentriert ohne Änderung der vertikalen Position}\\[-1.7ex] + \entry{\PValue{false}, \PValue{no}, \PValue{off}}{% + keine Seitenzahl}\\[-1.7ex] + \entry{\PValue{head}, \PValue{top}}{% + Seitenzahl im Kopf ohne Änderung der horizontalen Position}\\[-1.7ex] + \entry{\PValue{headcenter}, \PValue{headcentered}, \PValue{headmiddle}, + \PValue{topcenter}, \PValue{topcentered}, \PValue{topmiddle}}{% + Seitenzahl zentriert innerhalb des Kopfes}\\[-1.7ex] + \entry{\PValue{headleft}, \PValue{topleft}}{% + Seitenzahl links im Kopf}\\[-1.7ex] + \entry{\PValue{headright}, \PValue{topright}}{% + Seitenzahl rechts im Kopf}\\[-1.7ex] + \entry{\PValue{left}}{% + Seitenzahl links ohne Änderung der vertikalen Position}\\[-1.7ex] + \entry{\PValue{right}}{% + Seitenzahl rechts ohne Änderung der vertikalen Position}% + \end{desctabular} +\end{table} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{pagestyle}\Parameter{Seitenstil} + \Macro{thispagestyle}\Parameter{lokaler Seitenstil} +\end{Declaration}% +\BeginIndex{Pagestyle}{empty}% +\BeginIndex{Pagestyle}{plain}% +\BeginIndex{Pagestyle}{headings}% +\BeginIndex{Pagestyle}{myheadings}% +Bei Briefen mit \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} wird zwischen vier +verschiedenen Seitenstilen unterschieden. Dagegen definiert +\Package{scrletter}\OnlyAt{\Package{scrletter}} nur zwei eigene Seitenstile. +\begin{description}\setkomafont{descriptionlabel}{} +\item[{\PageStyle{empty}}] \LabelPageStyle{empty}% + ist der Seitenstil, bei dem Kopf- und Fußzeile von Folgeseiten vollständig + leer bleiben. Dieser Seitenstil wird auch automatisch für die erste + Briefseite verwendet, da auf dieser Seite Kopf und Fuß über + \DescRef{\LabelBase.cmd.opening}\IndexCmd{opening}% + \important{\DescRef{\LabelBase.cmd.opening}} (siehe + \autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.cmd.opening}) + mit anderen Mitteln gesetzt werden. Die Klasse \Class{scrlttr2} verlässt + sich bei diesem Seitenstil auf den \LaTeX-Kern, während bei + \Package{scrletter} der Stil von \hyperref[cha:scrlayer]{\Package{scrlayer}} + bereitgestellt wird. +\item[{\PageStyle{headings}}] \LabelPageStyle{headings}% + ist bei \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} der Seitenstil für + automatische Kolumnentitel auf Folgeseiten. Dabei werden als automatisch + gesetzte Marken der Absendername aus der Variablen + \DescRef{\LabelBase.variable.fromname}\IndexVariable{fromname} und der + Betreff aus der Variablen + \DescRef{\LabelBase.variable.subject}\IndexVariable{subject} verwendet + (siehe \autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromname} und + \DescPageRef{\LabelBase.variable.subject}). Wo genau diese Marken und die + Seitenangabe ausgegeben werden, hängt von der oben erklärten Option + \DescRef{\LabelBase.option.pagenumber} und dem Inhalt der Variablen + \DescRef{\LabelBase.variable.nexthead}\IndexVariable{nexthead}% + \important{\DescRef{\LabelBase.variable.nexthead}} und + \DescRef{\LabelBase.variable.nextfoot}\IndexVariable{nextfoot}% + \important{\DescRef{\LabelBase.variable.nextfoot}} ab. Der Autor kann die + Marken aber auch noch nach \DescRef{\LabelBase.cmd.opening} manuell + beeinflussen. Hierzu stehen wie üblich die Anweisungen + \DescRef{\LabelBase.cmd.markboth} und \DescRef{\LabelBase.cmd.markright}, + bei Verwendung von + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + \IndexPackage{scrlayer-scrpage}% + \important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} auch + \DescRef{scrlayer-scrpage.cmd.markleft} und + \DescRef{scrlayer-scrpage.cmd.markdouble} (siehe + \autoref{sec:scrlayer-scrpage.pagestyle.content}, + \DescPageRef{scrlayer-scrpage.cmd.markleft}), zur Verfügung. + + Da \Package{scrletter}\OnlyAt{scrletter} intern + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} verwendet, wird + ein eventuell von der Klasse bereitgestellter Seitenstil + \DescRef{maincls.pagestyle.headings} als Alias von + \DescRef{scrlayer-scrpage.pagestyle.scrheadings} umdefiniert. Näheres zu + diesem Seitenstil ist in \autoref{cha:scrlayer-scrpage} auf + \DescPageRef{scrlayer-scrpage.pagestyle.scrheadings} zu erfahren. +\item[{\PageStyle{letter}}] \LabelPageStyle{letter}% + wird nur von \Package{scrletter}\OnlyAt{scrletter} definiert, da der + Seitenstil \PageStyle{headings} im allgemeinen bereits von den Klassen + belegt ist. Dies geschieht mit Hilfe von + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} aus + \autoref{cha:scrlayer-scrpage}, \autopageref{cha:scrlayer-scrpage}. Bei der + Einstellung \OptionValueRef{scrlayer-scrpage}{automark}{true}% + \important{\OptionValueRef{scrlayer-scrpage}{automark}{true}}% + \IndexOption{automark} übernimmt \PageStyle{letter} dann die Rolle, die bei + \Class{scrlttr2} von \DescRef{\LabelBase.pagestyle.headings} ausgefüllt + wird. Bei \OptionValueRef{scrlayer-scrpage}{automark}{false}% + \important{\OptionValueRef{scrlayer-scrpage}{automark}{false}}% + \IndexOption{automark} übernimmt \PageStyle{letter} dagegen die Rolle von + \DescRef{\LabelBase.pagestyle.myheadings}. + + Durch\textnote{Achtung!} die Verwendung von + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} kann das + veraltete Paket \Package{scrpage2}\IndexPackage{scrpage2} oder das mit + \KOMAScript{} wenig kompatible \iffalse Paket \fi% Umbruchkorrektur + \Package{fancyhdr}\IndexPackage{fancyhdr} nicht zusammen mit + \Package{scrletter} verwendet werden. +\item[{\PageStyle{myheadings}}] \LabelPageStyle{myheadings}% + ist bei \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} der Seitenstil für + manuelle Kolumnentitel auf Folgeseiten. Im Unterschied zu \PValue{headings} + müssen die Marken vom Anwender gesetzt werden. Er verwendet dazu die + Anweisungen \DescRef{\LabelBase.cmd.markboth}\IndexCmd{markboth} und + \DescRef{\LabelBase.cmd.markright}\IndexCmd{markright}. Bei Verwendung von + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} stehen außerdem + \DescRef{scrlayer-scrpage.cmd.markleft}\IndexCmd{markleft} und + \DescRef{scrlayer-scrpage.cmd.markdouble}\IndexCmd{markdouble} zur + Verfügung. + + Bei \Package{scrletter}\OnlyAt{\Package{scrletter}} übernimmt der + Seitenstil \DescRef{\LabelBase.pagestyle.letter} ebenfalls die Rolle von + \PageStyle{myheadings}. +\item[{\PageStyle{plain}}] + \LabelPageStyle{plain}% + ist bei \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} + der voreingestellte Seitenstil, bei dem auf Folgeseiten keinerlei + Kolumnentitel verwendet, sondern nur eine Seitenangabe ausgegeben wird. Wo + diese gesetzt wird, hängt von der oben erklärten Option + \DescRef{\LabelBase.option.pagenumber} ab. + + Da \Package{scrletter}\OnlyAt{scrletter} intern + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} verwendet, wird + der Seitenstil \DescRef{maincls.pagestyle.plain} als Alias von + \DescRef{scrlayer-scrpage.pagestyle.plain.scrheadings} umdefiniert. Näheres + zu diesem Seitenstil ist in \autoref{cha:scrlayer-scrpage} auf + \DescPageRef{scrlayer-scrpage.pagestyle.scrheadings} zu erfahren. +\item[{\PageStyle{plain.letter}}]% + \LabelPageStyle{plain.letter}% + wird von \Package{scrletter}\OnlyAt{scrletter} zusammen mit + \DescRef{\LabelBase.pagestyle.letter} definiert. Dies geschieht mit Hilfe + von \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}. Nach der + Aktivierung von \DescRef{\LabelBase.pagestyle.letter} bis zum Ende des + Briefes ist \PageStyle{plain} dann ein Alias für diesen Stil. + \iffalse% Umbruchkorrektur (steht auch schon oben bei letter) + + Durch\textnote{Achtung!} die Verwendung von + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + \IndexPackage{scrlayer-scrpage} kann das veraltete Pakete + \Package{scrpage2}\IndexPackage{scrpage2} oder das mit \KOMAScript{} wenig + kompatible \iffalse Paket \fi% Umbruchkorrektur + \Package{fancyhdr}\IndexPackage{fancyhdr} nicht zusammen mit + \Package{scrletter} verwendet werden.% + \fi% +\end{description} + +Die Form der Seitenstile wird außerdem durch die oben erklärten +Optionen\important{\DescRef{\LabelBase.option.headsepline}\\ + \DescRef{\LabelBase.option.footsepline}} +\DescRef{\LabelBase.option.headsepline}\IndexOption{headsepline} und +\DescRef{\LabelBase.option.footsepline}\IndexOption{footsepline} +beeinflusst. Der Seitenstil ab der aktuellen Seite wird mit \Macro{pagestyle} +umgeschaltet. Demgegenüber verändert \Macro{thispagestyle} nur den Seitenstil +der aktuellen Seite. \KOMAScript\textnote{Achtung!} verwendet +\Macro{thispagestyle}\PParameter{empty} selbst innerhalb von +\DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} für die erste Briefseite. + +\BeginIndexGroup \BeginIndex[indexother]{}{Schrift>Art}% +\BeginIndex{FontElement}{pageheadfoot}\LabelFontElement{pageheadfoot}% +\BeginIndex{FontElement}{pagehead}\LabelFontElement{pagehead}% +\BeginIndex{FontElement}{pagefoot}\LabelFontElement{pagefoot}% +\BeginIndex{FontElement}{pagenumber}\LabelFontElement{pagenumber}% +\iffalse % Umbruchkorrektur +Um die Schriftart von Kopf und Fuß der Seite oder der Seitenangabe zu ändern, +verwenden Sie die Benutzerschnittstelle, die in +\autoref{sec:\LabelBase.textmarkup} beschrieben ist. Für den Kopf und den +Fuß % +\else % +Für die Schriftart von Kopf und Fuß der Seite % +\fi % +gibt es das gemeinsame Element +\FontElement{pagehheadfoot}\important{\iffree{}{\normalcolor}% Linkfarbe + % blutet in die Marginalienspalte aus + \FontElement{pageheadfoot}}. Bei +Verwendung von \hyperref[cha:scrlayer-scrpage]{scrlayer-scrpage} und damit +auch bei Verwendung von \Package{scrletter} wird im Kopf zusätzlich das +Element \FontElement{pagehead}\important{\FontElement{pagehead}} +verwendet. Ohne das Paket ist bei \Class{scrlttr2} hingegen +\FontElement{pagehead} eine alternative Bezeichnung für +\FontElement{pageheadfoot}. Für den Fuß\ChangedAt{v3.00}{\Class{scrlttr2}} ist +zusätzlich das Element +\FontElement{pagefoot}\important{\FontElement{pagefoot}} zuständig, das nach +\FontElement{pageheadfoot} in mit Variable +\DescRef{\LabelBase.variable.nextfoot}\IndexVariable{nextfoot} oder per Paket +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} (siehe +\autoref{cha:scrlayer-scrpage}, +\DescPageRef{scrlayer-scrpage.fontelement.pagefoot}) definierten Seitenstilen +zur Anwendung kommt. Das Element für die Seitenzahl innerhalb des Kopfes oder +Fußes heißt \FontElement{pagenumber}\important{\FontElement{pagenumber}}. Die +Voreinstellungen sind in \autoref{tab:maincls.defaultFontsHeadFoot}, +\autopageref{tab:maincls.defaultFontsHeadFoot} zu finden. Beachten Sie dazu +auch das Beispiel aus \autoref{sec:maincls.pagestyle}, +\PageRefxmpl{maincls.cmd.pagestyle}.% +% +\EndIndexGroup +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{markboth}\Parameter{linke Marke}\Parameter{rechte Marke} + \Macro{markright}\Parameter{rechte Marke} +\end{Declaration} +In den meisten Fällen werden die Möglichkeiten, die \KOMAScript{} über +Optionen und Variablen für die Gestaltung des Seitenkopfes\Index{Kopf} und +-fußes\Index{Fuss=Fuß} auf Folgeseiten\Index{Folgeseite} zur Verfügung stellt, +vollkommen ausreichen. Dies gilt umso mehr, als man zusätzlich mit +\Macro{markboth} und \Macro{markright} die Möglichkeit hat, die Angaben zu +ändern, die \KOMAScript{} in den Kopf setzt. Die Anweisungen +\Macro{markboth}\IndexCmd{markboth} und \Macro{markright}\IndexCmd{markright} +können insbesondere mit dem Seitenstil +\DescRef{\LabelBase.pagestyle.myheadings}\IndexPagestyle{myheadings}% +\important{\DescRef{\LabelBase.pagestyle.myheadings}, + \DescRef{\LabelBase.pagestyle.letter}} beziehungsweise +\DescRef{\LabelBase.pagestyle.letter}\IndexPagestyle{letter} genutzt +werden. Bei Verwendung des Pakets% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}\\ + \DescRef{scrlayer-scrpage.pagestyle.scrheadings}} +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage} +gilt dies auch für den +Seitenstil \DescRef{scrlayer-scrpage.pagestyle.scrheadings}% +\IndexPagestyle{scrheadings}. Außerdem stehen dann die Anweisungen +\DescRef{scrlayer-scrpage.cmd.markleft}% +\IndexCmd{markleft}\important{\DescRef{scrlayer-scrpage.cmd.markleft}\\ + \DescRef{scrlayer-scrpage.cmd.markdouble}} und +\DescRef{scrlayer-scrpage.cmd.markdouble}% +\IndexCmd{markdouble} zur Verfügung (siehe +\autoref{sec:scrlayer-scrpage.pagestyle.content}, +\DescPageRef{scrlayer-scrpage.cmd.markleft}). + +\begin{Declaration} + \Variable{nexthead} + \Variable{nextfoot} +\end{Declaration} +In einigen wenigen Fällen will man den Kopf oder Fuß der Folgeseiten ähnlich +dem Briefbogen freier gestalten. In\textnote{Achtung!} diesen Fällen muss auf +die vordefinierten Möglichkeiten, die per oben erklärter Option +\DescRef{\LabelBase.option.pagenumber}\IndexOption{pagenumber} auswählbar +sind, verzichtet werden. Stattdessen gestaltet man sich den Kopf und Fuß der +Folgeseiten bei \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} im Seitenstil +\DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings}% +\important{\DescRef{\LabelBase.pagestyle.headings}, + \DescRef{\LabelBase.pagestyle.myheadings}} oder +\DescRef{\LabelBase.pagestyle.myheadings}\IndexPagestyle{myheadings} und bei +\Package{scrletter}\OnlyAt{\Package{scrletter}} im Seitenstil +\DescRef{\LabelBase.pagestyle.letter}% +\IndexPagestyle{letter}\important{\DescRef{\LabelBase.pagestyle.letter}} +frei. Dazu setzt man den gewünschten Aufbau als \PName{Inhalt} der +Variablen\ChangedAt{v3.08}{\Class{scrlttr2}} \Variable{nexthead} +beziehungsweise \Variable{nextfoot}. Innerhalb des Inhalts von +\Variable{nexthead} und \Variable{nextfoot} können beispielsweise mit Hilfe +der \Macro{parbox}-Anweisung (siehe \cite{latex:usrguide}) mehrere Boxen +neben- und untereinander gesetzt werden. Einem versierten Anwender sollte es +so möglich sein, eigene Seitenköpfe und "~füße zu gestalten. Natürlich kann +und sollte im \PName{Inhalt} mit Hilfe von \DescRef{\LabelBase.cmd.usekomavar} +auch auf weitere Variablen zugegriffen werden. Die \PName{Bezeichnung} wird +von \KOMAScript{} bei beiden Variablen nicht genutzt.% +\EndIndexGroup \EndIndexGroup +% +\EndIndexGroup + + +\LoadCommonFile{interleafpage}% \section{Vakatseiten} + +\LoadCommonFile{footnotes}% \section{Fußnoten} + +\LoadCommonFile{lists}% \section{Listen} + + +\section{Mathematik} +\seclabel{math}% +\BeginIndexGroup +\BeginIndex{}{Mathematik}% +\BeginIndex{}{Formeln}% +\BeginIndex{}{Gleichungen}% + +\iffalse % Umbruchkorrektur + Die \KOMAScript-Klassen stellen keine eigenen Umgebungen für mathematische + Formeln, Gleichungssysteme oder ähnliche Elemente der Mathematik + bereit. Stattdessen stützt sich \KOMAScript{} im Bereich der Mathematik voll + und ganz auf den \LaTeX-Kern. Da\textnote{Achtung!} jedoch Mathematik in Form + von nummerierten Gleichungen und Formeln in Briefen eher ungewöhnlich ist, % + \iffalse % Umbruchkorrektur + unterstützt \Class{scrlttr2} dies nicht aktiv. Daher gibt es auch % + \else% + gibt es bei \Class{scrlttr2} % + \fi% + nicht die Optionen \DescRef{maincls.option.leqno} und + \DescRef{maincls.option.fleqn}, die in \autoref{sec:maincls.math}, + \autopageref{sec:maincls.math} für \Class{scrbook}, \Class{scrreprt} und + \Class{scrartcl} dokumentiert sind.% + \iffalse% Umbruchkorrekturtext + \ Bei \Package{scrletter} ist für dergleichen ohnehin die verwendete + Klasse zuständig.% + \par + Auf eine Beschreibung der Mathematikumgebungen des \LaTeX-Kerns, also + \Environment{displaymath}\IndexEnv{displaymath}, + \Environment{equation}\IndexEnv{equation} und + \Environment{eqnarray}\IndexEnv{eqnarray}, wird an dieser Stelle + verzichtet. Wer diese verwenden möchte, sei auf \cite{l2kurz} verwiesen. Für + mehr als nur einfachste mathematische Formeln und Gleichungen sei jedoch die + Verwendung von \Package{amsmath}\IndexPackage{amsmath} empfohlen (siehe + \cite{package:amsmath}).% + \fi% +\else% + Da in Briefen ausladende Mathematik in Form nummerierter Gleichungen und + Formeln eher ungewöhnlich ist, gibt es bei \Class{scrlttr2} die Optionen + \DescRef{maincls.option.leqno} und \DescRef{maincls.option.fleqn}, die in + \autoref{sec:maincls.math}, \autopageref{sec:maincls.math} für + \Class{scrbook}, \Class{scrreprt} und \Class{scrartcl} dokumentiert sind, + nicht. Dennoch können die vom \LaTeX-Kern oder von Zusatzpaketen wie + \Package{amsmath}\IndexPackage{amsmath} bereitgestellten + Mathematikumgebungen verwendet werden.% +\fi% +% +\EndIndexGroup + + +\section{Gleitumgebungen für Tabellen und Abbildungen} +\seclabel{floats} + +Gleitumgebungen für Tabellen und Abbildungen sind in Briefen normalerweise +fehl am Platz. Daher\textnote{Achtung!} werden sie von \Class{scrlttr2} auch +nicht unterstützt. Wenn solche dennoch benötigt werden, deutet dies häufig auf +einen Missbrauch der Briefklasse hin. In solchen Fällen ist stattdessen zu +raten, eine der \KOMAScript-Klassen aus \autoref{cha:maincls} mit dem Paket +\Package{scrletter}\important{\Package{scrletter}} zu kombinieren. In diesem +Fall können Gleitumgebungen, wie für die Klasse dokumentiert, auch in Briefen +verwendet werden. Die Möglichkeiten zur Definition eigener Gleitumgebungen mit +Hilfe von \hyperref[cha:tocbasic]{\Package{tocbasic}}\IndexPackage{tocbasic}% +\important{\hyperref[cha:tocbasic]{\Package{tocbasic}}}, wie sie in +\autoref{cha:tocbasic} dokumentiert sind, können ebenfalls genutzt werden. + + +\LoadCommonFile{marginpar}% \section{Randnotizen} + + +\section{\emph{Letter-Class-Option}-Dateien} +\seclabel{lcoFile}% +\BeginIndexGroup +\BeginIndex{}{lco-Datei=\File{lco}-Datei}% +\BeginIndex{}{Letter-Class-Option}% + +Normalerweise wird man Einstellungen wie den Absender nicht in jedem Brief neu +wählen, sondern diverse Parameter für bestimmte Gelegenheiten immer wieder +verwenden. Ganz Ähnliches gilt für die verwendeten Briefköpfe und den +Fußbereich der ersten Seite. Es ist deshalb sinnvoll, diese Einstellungen in +einer eigenen Datei zu speichern. \KOMAScript{} bietet +hierfür die \File{lco}-Dateien an. Die Endung \File{lco} steht +für \emph{\emph{l}etter \emph{c}lass \emph{o}ption}, also +Briefklassenoption. Dennoch finden diese Dateien für \Package{scrletter} +ebenso Anwendung. + +In \File{lco}-Dateien können alle Anweisungen verwendet werden, die auch an +der Stelle im Dokument verwendet werden könnten, an der +sie mit \DescRef{\LabelBase.cmd.LoadLetterOption} +geladen werden. Außerdem können interne Anweisungen verwendet werden, die für +Paketautoren freigegeben sind.% +\iffalse % Das ist hier Unfug, der durch die Umwandlung interner Anweisungen + % entstanden ist. +Bei \Class{scrlttr2} und \Package{scrletter} +sind dies insbesondere die Anweisungen +\DescRef{\LabelBase.cmd.newplength}\IndexCmd{newplength}, +\DescRef{\LabelBase.cmd.setplength}\IndexCmd{setplength} und +\DescRef{\LabelBase.cmd.addtoplength}\IndexCmd{addtoplength} (siehe +\autoref{sec:\LabelBase.pseudoLength}).% +\fi + +\KOMAScript{} liegen bereits einige \File{lco}-Dateien bei. Die Dateien +\File{DIN.lco}, \File{DINmtext.lco}, +\File{DIN5008A.lco}\ChangedAt{v3.26}{\File{DIN5008A.lco}}, +\File{DIN5008B.lco}\ChangedAt{v3.26}{\File{DIN5008B.clo}}, \File{SN.lco}, +\File{SNleft.lco}, \File{UScommercial9}, \File{UScommercial9DW} und +\File{NF.lco}\ChangedAt{v3.04}{\Class{scrlttr2}} dienen dazu, \Class{scrlttr2} +und \Package{scrletter} an verschiedene Normen\Index{Norm} anzupassen. Sie +können von angehenden Experten sehr gut als Vorlage für eigene Parametersätze +verwendet werden. Die Datei \File{KOMAold.lco} dient hingegen dazu, die +Kompatibilität zu \Class{scrlettr}\IndexClass{scrlettr} zu verbessern. Diese +Klasse wurde schon vor über \the\numexpr \year-2002\relax~Jahren aus +\KOMAScript{} entfernt. Es wird daher nicht mehr näher darauf eingegangen. Da +hierbei auch auf Anweisungen zurückgegriffen wird, die nicht für Paketautoren +freigegeben sind, sollte man sie nicht als Vorlage für eigene +\File{lco}-Dateien verwenden. Eine Liste aller vordefinierten +\File{lco}-Dateien ist in \autoref{tab:lcoFiles}, \autopageref{tab:lcoFiles} +zu finden. + +Wenn Sie einen Parametersatz für eine Briefnorm, die bisher nicht von +\KOMAScript{} unterstützt wird, erstellt haben, so sind Sie ausdrücklich +gebeten, diesen Parametersatz an die Supportadresse von \KOMAScript{} zu +schicken. Bitte geben Sie dabei auch die Erlaubnis zur Weiterverbreitung unter +den Lizenzbedingungen von \KOMAScript{} (siehe dazu die Datei +\href{https://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/lppl-de.txt}% +{\File{lppl-de.txt}} im \KOMAScript-Paket). Wenn Sie zwar über die notwendigen +Maße aus einer bisher nicht unterstützen Briefnorm verfügen, sich jedoch nicht +in der Lage sehen, selbst eine passende \File{lco}-Datei zu erstellen, so +können Sie sich ebenfalls mit dem \KOMAScript-Autor in Verbindung +setzen. Beispiele für teilweise sehr komplexe \File{lco}-Dateien finden sich +unter anderem unter \cite{homepage} und in \cite{DANTE:TK0203:MJK}. + + +\begin{Declaration} + \Macro{LoadLetterOption}\Parameter{Name} + \Macro{LoadLetterOptions}\Parameter{Liste von Namen} +\end{Declaration} +Bei \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} können \File{lco}-Dateien direkt +über \DescRef{\LabelBase.cmd.documentclass} geladen werden. Dazu gibt man den +Namen der \File{lco}-Datei ohne die Endung als Option\Index{Optionen} an. Das +Laden der \File{lco}-Datei erfolgt dann direkt nach der Klasse. Das Paket +\Package{scrletter}\textnote{Achtung!} bietet diese Möglichkeit nicht! Hier +bleibt nur \File{lco}-Dateien über \Macro{LoadLetterOption} +oder \Macro{LoadLetterOptions}\ChangedAt{v3.14}{\Class{scrlttr2}} zu +laden. Für\textnote{Empfehlung!} \Class{scrlttr2} wird dies ebenfalls +ausdrücklich empfohlen! + +\Macro{LoadLetterOption} und \Macro{LoadLetterOptions} können auch zu einem +späteren Zeitpunkt, selbst nach \Macro{begin}\PParameter{document} und sogar +innerhalb einer anderen \File{lco}-Datei verwendet werden. Der \PName{Name} +der \File{lco}-Datei wird in diesen Fällen ebenfalls ohne Endung +übergeben. Während als Argument von \Macro{LoadLetterOption} der \PName{Name} +von genau einer \File{lco}-Datei erwartet wird, versteht +\Macro{LoadLetterOptions} eine durch Komma separierte \PName{Liste von + Namen}. Die zu den Namen gehörenden \File{lco}-Dateien werden dann in der +Reihenfolge der Angabe in der Liste geladen. +\begin{Example} + Peter Musterfrau erstellt auch ein Dokument, in dem mehrere Briefe enthalten + sind. Die Mehrzahl der Briefe soll nach DIN erstellt werden. Also + beginnt er (siehe auch den Tipp auf \autopageref{tipp:\LabelBase.DIN}): +\begin{lstcode} + \documentclass{scrlttr2} +\end{lstcode} + Allerdings soll bei einem Brief stattdessen die Variante + \File{DINmtext} verwendet werden. Bei dieser steht das Adressfeld + weiter oben, damit mehr Text auf die erste Seite passt. Dafür ist + die Faltung so angepasst, dass das Adressfeld bei + DIN~C6/5-Umschlägen trotzdem in das Adressfenster passt. Er + erreicht das so: +\begin{lstcode} + \begin{letter}{% + Petra Mustermann\\ + Vor dem Berg 1\\ + 12345 Musterhausen} + \LoadLetterOption{DINmtext} + \opening{Hallo,} +\end{lstcode} + Da der Aufbau der ersten Seite erst mit + \DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} wirklich beginnt, genügt + es, wenn die \File{lco}-Datei vor \DescRef{\LabelBase.cmd.opening} geladen + wird. Dies muss also nicht vor \Macro{begin}\PParameter{letter} + erfolgen. Die Änderungen durch das Laden der \File{lco}-Datei sind dann auch + lokal zu dem entsprechenden Brief. +\end{Example} + +Wird\ChangedAt{v2.97}{\Class{scrlttr2}} eine \File{lco}-Datei über +\Macro{documentclass} geladen, so darf sie nicht den Namen einer Option +haben. + +\begin{Example} + Da Herr Musterfrau regelmäßig Briefe mit immer gleichen Einstellungen + schreibt, findet er es ziemlich lästig, diese Angaben immer wieder in jeden + neuen Brief kopieren zu müssen. Zu seiner Erleichterung schreibt er deshalb + eine \File{lco}-Datei, die ihm die Arbeit erleichtert:% + \lstinputcode[xleftmargin=1em]{ich.lco}% + Damit schrumpft sein Brief aus dem Beispiel von + \PageRefxmpl{\LabelBase.letterwithoutlco} erheblich zusammen: + \lstinputcode[xleftmargin=1em]{letter-example-23-de.tex}% + Das Ergebnis ändert sich dabei natürlich nicht, wie ein Vergleich von + \autoref{fig:\LabelBase.letter-22}, \autopageref{fig:\LabelBase.letter-22} + mit \autoref{fig:\LabelBase.letter-23} zeigt. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Beispiel: Brief mit erweitertem Absender, Logo, + Anschrift, Absenderergänzung, Ort, Datum, Betreff, Anrede, + Text, Grußfloskel, geänderter Signatur, Postskriptum, Anlagen, + Verteiler und Lochermarke mit \File{lco}-Datei}]{Ergebnis eines + kleinen Briefes mit erweitertem Absender, Logo, Anschrift, + Absenderergänzung, Ort, Datum, Betreff, Anrede, Text, Grußfloskel, + geänderter Signatur, Postskriptum, Anlagen, Verteiler und Lochermarke + bei Verwendung einer \File{lco}-Datei}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-23-de}} + \end{captionbeside} + \label{fig:\LabelBase.letter-23} + \end{figure} +\end{Example} + +Bitte\textnote{Achtung!} beachten Sie, dass im Beispiel in der Bankverbindung +der Datei \File{ich.lco} für »ß« die \TeX-Schreibweise »\Macro{ss}« verwendet +wurde. Dies hat seinen Grund darin, dass während des Ladens der Klasse weder +ein Paket zur Sprachumschaltung, beispielsweise für die neue, deutsche +Rechtschreibung mit \Macro{usepackage}\POParameter{ngerman}\PParameter{babel}, +noch bei älteren \LaTeX-Versionen ein Paket für die Eingabecodierung, +beispielsweise mit \Macro{usepackage}\POParameter{utf8}\PParameter{inputenc} +für moderne Editoren, geladen ist. Wird mit Sicherheit eine \LaTeX-Version ab +April~2018 verwendet und wird die \File{lco}-Datei UTF-8 codiert, so können +Umlaute und Sonderzeichen natürlich auch direkt eingegeben werden. + +In \autoref{tab:lcoFiles} finden Sie eine Liste aller vordefinierten +\File{lco}-Dateien. Falls\textnote{Achtung!} Sie einen Drucker verwenden, der +einen sehr großen unbedruckbaren Rand links oder rechts besitzt, werden Sie +mit der Option \Option{SN}\IndexOption{SN} möglicherweise Probleme +bekommen. Da die Schweizer Norm SN~101\,130 vorsieht, dass das Adressfeld +8\Unit{mm} vom rechten Papierrand gesetzt wird, werden bei Schweizer Briefen +auch die Kopfzeile und die Absenderergänzung mit einem entsprechend geringen +Abstand zum Papierrand gesetzt. Dies betrifft ebenfalls die Geschäftszeile bei +der Einstellung +\OptionValueRef{\LabelBase}{refline}{wide}% +\IndexOption{refline~=\textKValue{wide}} +(siehe \autoref{sec:\LabelBase.firstpage}, +\DescPageRef{\LabelBase.option.refline}). Sollten\textnote{Tipp!} Sie damit +ein Problem haben, erstellen Sie sich eine eigene \File{lco}-Datei, die +zunächst \Option{SN} lädt und in der +\DescRef{\LabelBase.plength.toaddrhpos}\IndexPLength{toaddrhpos} (siehe +\DescPageRef{\LabelBase.plength.toaddrvpos}) dann auf einen kleineren +Wert gesetzt wird. Verringern Sie dann außerdem +\DescRef{\LabelBase.plength.toaddrwidth}\IndexPLength{toaddrwidth} +entsprechend. + +Die\textnote{Tipp!}\phantomsection\label{tipp:\LabelBase.DIN} \File{lco}-Datei +\File{DIN}\important{\Option{DIN}} wird übrigens immer als erste +\File{lco}-Datei automatisch geladen, damit alle Pseudolängen mehr oder +weniger sinnvoll vordefiniert sind. Es ist daher nicht notwendig diese +voreingestellte Datei selbst zu laden. + +Zu den \File{lco}-Dateien \File{DIN5008A}\important{\File{DIN5008A}, + \File{DIN5008B}} und \File{DIN5008B} sei angemerkt, dass die entsprechenden +Vorschriften gewisse Spielräume aufweisen und, wie diversen Anfragen beim +Autor zu entnehmen ist, viele Anwender diese nicht nur auszureizen wünschen, +sondern auch die eine oder andere Abweichung von der Norm bevorzugen. Die +beiden Dateien implementieren jedoch jeweils nur eine einzige Interpretation +der Norm. Der Leser sei daher daran erinnert, dass diese Dateien lediglich als +Vorlagen zu begreifen sind, um das Erstellen eigener angepasster +\File{lco}-Dateien zu erleichtern.% +% +\begin{desclist} + \renewcommand*{\abovecaptionskipcorrection}{-\normalbaselineskip}% + \desccaption{% + Vordefinierte \File{lco}-Dateien\label{tab:lcoFiles}% + }{% + Vordefinierte \File{lco}-Dateien (\emph{Fortsetzung})% + }% + \oentry{DIN}{% + \leavevmode% + \IndexOption[indexmain]{DIN}\IndexFile[indexmain]{DIN.lco}% + voreingestellter Parametersatz für Briefe im Format A4 nach DIN~676; + geeignet für Fensterbriefumschläge in den Formaten C4, C5, C6 und C6/5 (C6 + lang)}% + \oentry{DIN5008A}{% + \leavevmode% + \IndexOption[indexmain]{DIN5008A}\IndexFile[indexmain]{DIN5008A.lco}% + experimenteller Parametersatz für Briefe angelehnt an Variante~A im Format + A4 nach DIN~5008; geeignet für Fensterbriefumschläge in den Formaten C4, + C5, C6 und C6/5 (C6 lang)}% + \oentry{DIN5008B}{% + \leavevmode% + \IndexOption[indexmain]{DIN5008B}\IndexFile[indexmain]{DIN5008B.lco}% + experimenteller Parametersatz für Briefe angelehnt an Variante~B im Format + A4 nach DIN~5008; geeignet für Fensterbriefumschläge in den Formaten C6 + und C6/5 (C6 lang)}% + \oentry{DINmtext}{% + \leavevmode% + \IndexOption[indexmain]{DINmtext}\IndexFile[indexmain]{DINmtext.lco}% + Parametersatz für Briefe im Format A4 nach DIN~676, wobei die Alternative + für mehr Text auf der ersten Briefseite verwendet wird; nur geeignet für + Fensterbriefumschläge in den Formaten C6 und C6/5 (C6 lang)}% + \oentry{KakuLL}{% + \leavevmode% + \IndexOption[indexmain]{KakuLL}\IndexFile[indexmain]{KakuLL.lco}% + Parametersatz für japanische Briefe im Format A4; geeignet für japanische + Fensterbriefumschläge des Typs Kaku A4, bei denen das Fenster in etwa + 90\Unit{mm} breit, 45\Unit{mm} hoch, 25\Unit{mm} vom linken und + 24\Unit{mm} vom oberen Rand entfernt ist (siehe dazu auch \iffree{den + Anhang der englischen \KOMAScript-Anleitung}{\autoref{cha:japanlco}})}% + \oentry{KOMAold}{% + \leavevmode% + \IndexOption[indexmain]{KOMAold}\IndexFile[indexmain]{KOMAold.lco}% + \iftrue% + existiert nur noch aus Kompatibilitätsgründen; die Verwendung wird nicht + mehr empfohlen% + \else% + Parametersatz für Briefe im Format A4 mit Annäherung an das Aussehen von + Briefen der obsoleten Briefklasse \Class{scrlettr}; geeignet für + Fensterbriefumschläge in den Formaten C4, C5, C6 und C6/5 (C6 lang); es + werden einige zusätzliche Anweisungen zur Verbesserung der Kompatibilität + mit der obsoleten Briefklasse \Class{scrlettr}\IndexClass{scrlettr} + definiert; \Class{scrlttr2} verhält sich mit dieser \File{lco}-Datei + möglicherweise nicht genau wie bei Verwendung der übrigen + \File{lco}-Dateien% + \fi }% + \oentry{NF}{% + \leavevmode% + \IndexOption[indexmain]{NF}\IndexFile[indexmain]{NF.lco}% + Parametersatz für französische Briefe nach NF~Z~11-001; geeignet für + Fensterbriefumschläge im Format DL (110\Unit{mm} auf 220\Unit{mm}) mit + einem Fenster von 45\Unit{mm} Breite und 100\Unit{mm} Höhe ca. jeweils + 20\Unit{mm} entfernt vom rechten unteren Rand; diese Datei wurde + ursprünglich von Jean-Marie Pacquet entwickelt, der auf \cite{www:NF.lco} + neben einer Erweiterung auch eine LyX-Einbindung bereitstellt.}% + \oentry{NipponEH}{% + \leavevmode% + \IndexOption[indexmain]{NipponEH}\IndexFile[indexmain]{NipponEH.lco}% + Parametersatz für japanische Briefe im Format A4; geeignet für japanische + Fensterbriefumschläge der Typen Chou oder You 3 oder 4, bei denen das + Fenster in etwa 90\Unit{mm} breit, 55\Unit{mm} hoch, 22\Unit{mm} vom + linken und 12\Unit{mm} vom oberen Rand entfernt ist (siehe dazu auch + \iffree{den Anhang der englischen + \KOMAScript-Anleitung}{\autoref{cha:japanlco}})}% + \oentry{NipponEL}{% + \leavevmode% + \IndexOption[indexmain]{NipponEL}\IndexFile[indexmain]{NipponEL.lco}% + Parametersatz für japanische Briefe im Format A4; geeignet für japanische + Fensterbriefumschläge der Typen Chou oder You 3 oder 4, bei denen das + Fenster in etwa 90\Unit{mm} breit, 45\Unit{mm} hoch, 22\Unit{mm} vom + linken und 12\Unit{mm} vom oberen Rand entfernt ist (siehe dazu auch + \iffree{den Anhang der englischen + \KOMAScript-Anleitung}{\autoref{cha:japanlco}})}% + \oentry{NipponLH}{% + \leavevmode% + \IndexOption[indexmain]{NipponLH}\IndexFile[indexmain]{NipponLH.lco}% + Parametersatz für japanische Briefe im Format A4; geeignet für japanische + Fensterbriefumschläge der Typen Chou oder You 3 oder 4, bei denen das + Fenster in etwa 90\Unit{mm} breit, 55\Unit{mm} hoch, 25\Unit{mm} vom + linken und 12\Unit{mm} vom oberen Rand entfernt ist (siehe dazu auch + \iffree{den Anhang der englischen + \KOMAScript-Anleitung}{\autoref{cha:japanlco}})}% + \oentry{NipponLL}{% + \leavevmode% + \IndexOption[indexmain]{NipponLL}\IndexFile[indexmain]{NipponLL.lco}% + Parametersatz für japanische Briefe im Format A4; geeignet für japanische + Fensterbriefumschläge der Typen Chou oder You 3 oder 4, bei denen das + Fenster in etwa 90\Unit{mm} breit, 45\Unit{mm} hoch, 25\Unit{mm} vom + linken und 12\Unit{mm} vom oberen Rand entfernt ist (siehe dazu auch + \iffree{den Anhang der englischen + \KOMAScript-Anleitung}{\autoref{cha:japanlco}})}% + \oentry{NipponRL}{% + \leavevmode% + \IndexOption[indexmain]{NipponRL}\IndexFile[indexmain]{NipponRL.lco}% + Parametersatz für japanische Briefe im Format A4; geeignet für japanische + Fensterbriefumschläge der Typen Chou oder You 3 oder 4, bei denen das + Fenster in etwa 90\Unit{mm} breit, 45\Unit{mm} hoch, 22\Unit{mm} vom + rechten und 28\Unit{mm} vom oberen Rand entfernt ist (siehe dazu auch + \iffree{den Anhang der englischen + \KOMAScript-Anleitung}{\autoref{cha:japanlco}})}% + \oentry{SN}{% + \leavevmode% + \IndexOption[indexmain]{SN}\IndexFile[indexmain]{SN.lco}% + Parametersatz für Schweizer Briefe nach SN~010\,130 mit Anschrift rechts; + geeignet für Schweizer Fensterbriefumschläge in den Formaten C4, C5, C6 + und C6/5 (C6 lang)}% + \oentry{SNleft}{% + \leavevmode% + \IndexOption[indexmain]{SNleft}\IndexFile[indexmain]{SNleft.lco}% + Parametersatz für Schweizer Briefe mit Anschrift links; geeignet für + Schweizer Fensterbriefumschläge mit dem Fenster links in den Formaten C4, + C5, C6 und C6/5 (C6 lang)}% + \oentry{UScommercial9}{% + \leavevmode% + \IndexOption[indexmain]{UScommercial9}% + \IndexFile[indexmain]{UScommercial9.lco}% + Parametersatz für US-amerikanische Briefe im Format letter; geeignet für + US-amerikanische Fensterbriefumschläge der Größe \emph{commercial~No.\,9} + mit einem Anschriftfenster der Breite 4\,1/2\Unit{in} und Höhe + 1\,1/8\Unit{in} an einer Position 7/8\Unit{in} von links und 1/2\Unit{in} + von unten ohne Rücksendeadresse im Fenster; bei Faltung zunächst an der + Mittelmarke und dann an der oberen Faltmarke kann auch Papier im Format + legal verwendet werden, führt dann jedoch zu einer Papiergrößen-Warnung}% + \oentry{UScommercial9DW}{% + \leavevmode% + \IndexOption[indexmain]{UScommercial9DW}% + \IndexFile[indexmain]{UScommercial9DW.lco}% + Parametersatz für US-amerikanische Briefe im Format letter; geeignet für + US-amerikanische Fensterbriefumschläge der Größe \emph{commercial~No.\,9} + mit einem Anschriftfenster der Breite 3\,5/8\Unit{in} und Höhe + 1\,1/8\Unit{in} an einer Position 3/4\Unit{in} von links und 1/2\Unit{in} + von unten mit einem Absenderfenster der Breite 3\,1/2\Unit{in} und Höhe + 7/8\Unit{in} an einer Position 5/16\Unit{in} von links und 2\,1/2\Unit{in} + von unten, jedoch ohne Rücksendeadresse im Fenster; bei Faltung zunächst + an der Mittelmarke und dann an der oberen Faltmarke kann auch Papier im + Format legal verwendet werden, führt dann jedoch zu einer + Papiergrößen-Warnung}% +\end{desclist} +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Adressdateien und Serienbriefe} +\seclabel{addressFile}% +\BeginIndexGroup +\BeginIndex{}{Adressdatei}\BeginIndex{}{Serienbriefe}% + +Als besonders lästig wird bei Briefen immer das Eintippen der Adressen und das +Erstellen von Serienbriefen betrachtet. \KOMAScript{} bietet +hierfür% +\iffalse% Umbruchkorrekturtext + , wie schon die obsolete Klasse \Class{scrlettr},% +\fi% +\ eine minimalistische Unterstützung.% +\iffalse% Umbruchkorrekturtext + \ Eine stark verbesserte Serienbrief"|funktion ist bereits seit längerem in + Planung.% +\fi + +\begin{Declaration} + \Macro{adrentry}\Parameter{Name}\Parameter{Vorname}\Parameter{Adresse} + \Parameter{Tel.}\Parameter{F1}\Parameter{F2}\Parameter{Kommentar} + \Parameter{Kürzel} +\end{Declaration} +Mit \Class{scrlttr2} und \Package{scrletter} können +Adressdateien\Index[indexmain]{Adressdatei} ausgewertet werden. Dies ist +beispielsweise für Serienbriefe sehr nützlich. Eine Adressdatei muss +die Endung \File{.adr} haben und besteht aus einer Reihe von +\Macro{adrentry}-Einträgen. Ein solcher Eintrag besteht aus acht +Elementen und kann beispielsweise wie folgt aussehen: +\begin{lstcode} + \adrentry{Maier} + {Herbert} + {Wiesenweg 37\\ 09091 Blumental} + {0\,23\,34 / 91\,12\,74} + {Bauunternehmer} + {} + {kauft alles} + {MAIER} +\end{lstcode} +Die Elemente fünf und sechs, \PName{F1} und \PName{F2}, können frei +bestimmt werden. Denkbar wären neben Hinweisen auf das Geschlecht oder +akademische Grade auch der Geburtstag oder das Eintrittsdatum in einen +Verein. Um das Überschreiben von \TeX- oder \LaTeX-Anweisungen zu +vermeiden, ist es empfehlenswert, für \PName{Kürzel} ausschließlich +Großbuchstaben zu verwenden. + +\begin{Example} + Herr Maier gehört zu Ihren engeren Geschäftspartnern. Da Sie eine + rege Korrespondenz mit ihm pflegen, ist es Ihnen auf Dauer zu + mühsam, jedesmal alle Empfängerdaten aufs Neue einzugeben. + \KOMAScript{} nimmt Ihnen diese Arbeit ab. Angenommen, Sie haben + Ihre Kundenkontakte in der Datei \File{partner.adr} gespeichert und + Sie möchten Herrn Maier einen Brief schreiben, dann sparen Sie sich + viel Tipparbeit, wenn Sie Folgendes eingeben: +\begin{lstcode} + \input{partner.adr} + \begin{letter}{\MAIER} + Der Brief ... + \end{letter} +\end{lstcode} + Achten Sie bitte darauf, dass Ihr \TeX-System auch auf die + \File{.adr}-Dateien zugreifen kann, da sonst eine Fehlermeldung + von \Macro{input} verursacht wird. Entweder Sie legen die Brief- + und Adressdateien im selben Verzeichnis an, oder Sie binden ein + Adressverzeichnis fest in Ihr \TeX-System ein. +\end{Example} +% +\EndIndexGroup +\vskip-\ht\strutbox% Wegen Beispiel am Ende der Erklärung + + +\begin{Declaration} + \Macro{addrentry}\Parameter{Name}\Parameter{Vorname}\Parameter{Adresse} + \Parameter{Telefon}\Parameter{F1}\Parameter{F2}\Parameter{F3} + \Parameter{F4}\Parameter{Kürzel} +\end{Declaration} +Bevor Klagen aufkommen, dass insgesamt nur zwei freie Felder zu wenig seien: +\KOMAScript{} verfügt alternativ über die Anweisung \Macro{addrentry}. Mit dem +zusätzlichen »\texttt{d}« im Namen sind hier auch zwei weitere freie Felder +hinzugekommen, dafür ist jedoch der Kommentar entfallen. Ansonsten kann die +Anweisung genau wie \DescRef{\LabelBase.cmd.adrentry} verwendet werden. + +In einer \File{adr}-Datei können die beiden Anweisungen +\DescRef{\LabelBase.cmd.adrentry} und \Macro{addrentry} nebeneinander +verwendet werden. Ich\textnote{Achtung!} weise jedoch darauf hin, dass +Zusatzpakete eventuell nicht auf die Verwendung von \Macro{addrentry} ausgelegt +sind. Hier muss der Anwender gegebenenfalls selbst entsprechende +Erweiterungen vornehmen.% +% +\EndIndexGroup + + +Neben dem vereinfachten Zugriff auf Kundendaten können die +\File{.adr}-Dateien auch für Serienbriefe\Index[indexmain]{Serienbriefe} +genutzt werden. So ist es ohne die komplizierte Anbindung an +Datenbanksysteme möglich, solche Massenpostsendungen zu erstellen. +% +\begin{Example} + Sie wollen einen Serienbrief an alle Mitglieder Ihres + Anglervereins schicken, um zur nächsten Mitgliederversammlung + einzuladen. +\begin{lstcode} + \documentclass{scrlttr2} + \usepackage[ngerman]{babel} + + \begin{document} + \renewcommand*{\adrentry}[8]{% + \begin{letter}{#2 #1\\#3} + \opening{Liebe Vereinsmitglieder,} + unsere nächste Mitgliederversammlung findet am + Montag, dem 12.~August 2002, statt. + + Folgende Punkte müssen besprochen werden... + \closing{Petri Heil,} + \end{letter} + } + + \input{mitglieder.adr} + \end{document} +\end{lstcode} + Sind in Ihrer \File{adr}-Datei auch + \DescRef{\LabelBase.cmd.addrentry}-Anweisungen + enthalten, müssen Sie dafür eine entsprechende Definition vor dem + Einladen der Adressdatei ergänzen: +\begin{lstcode} + \renewcommand*{\addrentry}[9]{% + \adrentry{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#9}% + } +\end{lstcode} + Bei diesem Beispiel wird kein Gebrauch von dem zusätzlichen freien + Feld gemacht und deshalb \DescRef{\LabelBase.cmd.addrentry} mit Hilfe von + \DescRef{\LabelBase.cmd.adrentry} definiert. +\end{Example} + +Natürlich kann der Brief"|inhalt auch von den Adressatenmerkmalen +abhängig gemacht werden. Als Bedingungsfelder können die frei +bestimmbaren Elemente fünf oder sechs eines +\DescRef{\LabelBase.cmd.adrentry}-Eintrages oder die frei bestimmbaren +Elemente fünf bis acht eines \DescRef{\LabelBase.cmd.addrentry}-Eintrags +genutzt werden. +\begin{Example} + Angenommen, Sie verwenden das Element fünf, um das Geschlecht eines + Vereinsmitgliedes zu hinterlegen (\PValue{m/w}) und das sechste + Element weist auf einen Rückstand der Mitgliedsbeiträge hin. Wollen + Sie nun alle säumigen Mitglieder anschreiben und persönlich anreden, + so hilft Ihnen folgendes Beispiel weiter: +\begin{lstcode} + \renewcommand*{\adrentry}[8]{ + \ifdim #6pt>0pt\relax + % #6 ist ein Betrag (Gleitkommazahl) größer 0. + % Es werden also die Säumigen erfasst. + \begin{letter}{#2 #1\\#3} + \if #5m \opening{Lieber #2,} \fi + \if #5w \opening{Liebe #2,} \fi + + Leider mussten wir feststellen, dass du mit + der Zahlung deiner Mitgliedsbeiträge im + Rückstand bist. + + Wir möchten Dich bitten, den offenen Betrag + von #6~EUR auf das Vereinskonto einzuzahlen. + \closing{Petri Heil,} + \end{letter} + \fi + } +\end{lstcode} +\end{Example} +Es ist also möglich, den Brieftext auf bestimmte Empfängermerkmale +gezielt abzustimmen und so den Eindruck eines persönlichen +Schreibens zu erwecken. Die Anwendungsbreite ist lediglich durch +die maximale Anzahl von zwei freien \DescRef{\LabelBase.cmd.adrentry}-Elementen +beziehungsweise vier freien \DescRef{\LabelBase.cmd.addrentry}-Elementen +begrenzt. + + +\begin{Declaration} + \Macro{adrchar}\Parameter{Anfangsbuchstaben} + \Macro{addrchar}\Parameter{Anfangsbuchstaben} +\end{Declaration} +\Index[indexmain]{Adressverzeichnis}\Index[indexmain]{Telefonliste}% +Es ist auch möglich, die Informationen einer \File{.adr}-Datei in +Adressverzeichnisse oder Telefonlisten umzuwandeln. Sie benötigen dazu +zusätzlich das \Package{adrconv}\IndexPackage{adrconv}-Paket von Axel Kielhorn +(siehe \cite{package:adrconv}). In diesem Paket sind interaktive +\LaTeX-Dokumente enthalten, mit deren Hilfe sehr einfach entsprechende Listen +erstellt werden können. + +Damit die Listen alphabetisch sortiert ausgegeben werden, muss bereits die +Adressdatei sortiert gewesen sein. Es empfiehlt sich dabei, vor jedem neuen +Anfangsbuchstaben eine Anweisung \Macro{adrchar} mit diesem Buchstaben als +Argument einzufügen. \Class{scrlttr2} und \Package{scrletter} selbst +ignorieren diese Anweisung ebenso wie \Macro{addrchar}. +% +\begin{Example} + Angenommen Sie haben folgende, eher winzige Adressdatei, für die ein + Adressbuch erstellt werden soll: +% In der folgenden lstcode-Umgebung je nach Umbruchbedarf einzelne +% Elemente löschen oder hinzufügen. MICHAEL und GABRIEL sollten jedoch +% erhalten bleiben. +% Umbruchkorrektur: Dies kann noch dazu: + % \adrentry{Engel}{Raphael} + % {Wolke 3b\\12345 Himmelreich} + % {000\,01\,02\,05}{}{}{Erzengel} + % {RAPHAEL} + % \adrchar{T} + % \adrentry{Teufel}{Luzifer} + % {Hinter der Flamme 1\\ + % 66666 H\"ollenschlund} + % {}{}{}{Gefallener Engel ohne Telefon} + % {LUZIFER} +\begin{lstcode} + \adrchar{E} + \adrentry{Engel}{Gabriel} + {Wolke 3\\12345 Himmelreich} + {000\,01\,02\,03}{}{}{Erzengel} + {GABRIEL} + \adrentry{Engel}{Michael} + {Wolke 3a\\12345 Himmelreich} + {000\,01\,02\,04}{}{}{Erzengel} + {MICHAEL} + \adrchar{K} + \adrentry{Kohm}{Markus} + {Freiherr-von-Drais-Stra\ss e 66\\ + 68535 Edingen-Neckarhausen} + {+49~62\,03~1\,??\,??}{}{} + {\"Uberhaupt kein Engel} + {KOMA} +\end{lstcode} + Diese verarbeiten Sie nun unter Verwendung des Dokuments \File{adrdir.tex} + aus \cite{package:adrconv}. Eine Seite des Ergebnisses sieht dann etwa so aus: + \begin{center} + \setlength{\unitlength}{1mm} + \begin{picture}(80,58) + \put(0,58){\line(1,0){80}} + \put(0,3){\line(0,1){55}} + \put(80,3){\line(0,1){55}} + \thicklines + \put(10,43){\line(1,0){60}} + \put(70,46){\makebox(0,0)[r]{\textsf{\textbf{E}}}} + \put(10,23){\makebox(0,20)[l]{\parbox{5cm}{\raggedright + \textsc{Engel}, Gabriel\\\quad\small Wolke 3\\ + \quad 12345 Himmelreich\\ + \quad (Erzengel)}}} + \put(70,23){\makebox(0,20)[r]{\parbox{2cm}{\raggedright~\\ + \small~\\{\footnotesize GABRIEL}\\000\,01\,02\,03}}} + \put(10,4){\makebox(0,20)[l]{\parbox{5cm}{\raggedright + \textsc{Engel}, Michael\\\quad\small Wolke 3a\\ + \quad 12345 Himmelreich\\ + \quad (Erzengel)}}} + \put(70,4){\makebox(0,20)[r]{\parbox{2cm}{\raggedright~\\ + \small~\\{\footnotesize MICHAEL}\\000\,01\,02\,04}}} + \qbezier(0,3)(10,6)(40,3)\qbezier(40,3)(60,0)(80,3) + \end{picture} + \end{center} + Dabei wird der Buchstabe in der Kopfzeile von \Macro{adrchar} + erzeugt, wenn man die Frage »Namen in der Kopfzeile?« verneint. Siehe dazu + die Definition in \File{adrdir.tex}.% +\end{Example}% + +Das Paket \Package{adrconv}\IndexPackage{adrconv} kann auch dazu verwendet +werden, um aus Adressdatenbanken im \BibTeX-Format mit Einträgen wie: +\begin{lstlisting}[morekeywords={@address}] + @address{HMUS, + name = {Hans Mustermann}, + title = {Mag. art.}, + city = {Heimstatt}, + zip = 01234, + country = {Germany}, + street = {Mauerstra{\ss}e 1}, + phone = {01234 / 5 67 89}, + note = {Alles nur Erfindung}, + key = {HMUS}, + } +\end{lstlisting} +Adressdateien für die \KOMAScript-Briefklasse oder das \KOMAScript-Briefpaket +zu erzeugen. Näheres zum \Package{adrconv}\IndexPackage{adrconv}-Paket ist der +zugehörigen Anleitung zu entnehmen.% +% +\EndIndexGroup +% +\EndIndexGroup +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Paketoption Satzspiegels Briefklasse Seitenkopf Seitenfuß +% LocalWords: Versandart Zentrierung Dokumenttitel Serienbriefen Seitenstil +% LocalWords: Dokumentpräambel Grafikpaket Briefbogenfuß Briefbogenfußes +% LocalWords: Standardklassen Briefpaket Dokumentteile Briefkontext Torsten +% LocalWords: Briefumgebung neckische Briefinhalt Absenderinformationen +% LocalWords: Falzmarken Faltmarken Adressfeld Geschäftszeile Feldinhalts +% LocalWords: Feldbezeichnung Seitenstilen Paginierung Briefklassenoption +% LocalWords: Bedingungsfelder Schriftauswahl Spitzmarke diff --git a/macros/latex/contrib/koma-script/doc/scrlttr2-en.tex b/macros/latex/contrib/koma-script/doc/scrlttr2-en.tex new file mode 100644 index 0000000000..075d9173d5 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlttr2-en.tex @@ -0,0 +1,4535 @@ +% ====================================================================== +% scrlttr2-en.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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 +% https://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.md. +% ====================================================================== +% +% Chapter about scrlttr2 of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrlttr2-en.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrlttr2)] + +\translator{Harald Bongartz\and Georg Grandke\and Raimund Kohl\and Jens-Uwe + Morawski\and Stephan Hennig\and Gernot Hassenpflug\and Markus Kohm\and + Karl Hagen} + +\chapter{Letters with the \Class{scrlttr2} Class or the \Package{scrletter} + Package} +\labelbase{scrlttr2} + +\BeginIndexGroup +\BeginIndex{Class}{scrlttr2}\BeginIndex{Package}{scrletter}% +\BeginIndex{}{letters}% +Letters are quite different in many ways from articles, reports, books, and +the like. That alone justifies a separate chapter on letters. But there are +other reasons for a separate chapter on \Class{scrlttr2} and +\Package{scrletter}. + +The \Class{scrlttr2}\important{\Class{scrlttr2}} class was developed from +scratch in 2002. It provides a completely new user interface, different from +every other class I know. This new user interface may be unusual, but it +offers benefits to both new and experienced {\KOMAScript} users. + +The \Package{scrletter}\important{\Package{scrletter}}% +\ChangedAt{v3.15}{\Package{scrletter}} package has supplemented \KOMAScript{} +since Version~3.15. It also provides all the letter-based functionality of +\Class{scrlttr2} to the other classes. I recommend you use one of the +\KOMAScript{} classes\,---\,\Class{scrbook}, \Class{scrreprt} or +\Class{scrartcl}\,---\, which are explained in the previous chapter. With +minor limitations, \Package{scrletter} also works well with the standard +classes. + +The starting point for developing \Package{scrletter} was, on the one hand, +requests from users who also wanted to have elements such as +section\textnote{headings, floating environments, indexes} headings, floating +environments, or a bibliography in letters. On the other hand, there were also +requests to use \Class{scrlttr2} variables in the remaining \KOMAScript{} +classes. You can achieve both by combining the desired \KOMAScript{} class +with \Package{scrletter}. + +Compared to the letter class, the letter package has a few small changes that +were necessary to avoid conflicts with other classes. These changes mainly +affect the page styles and are explicitly documented (see +\autoref{sec:\LabelBase.pagestyle}, starting at +\autopageref{sec:\LabelBase.pagestyle}). Where \Package{scrletter} is not +explicitly mentioned, everything that is documented for \Class{scrlttr2} +applies without change. + +\LoadCommonFile{options} % \section{Early or Late Selection of Options} + +\LoadCommonFile{compatibility} % \section{Compatibility with Earlier Versions of + % \KOMAScript{}} + +\LoadCommonFile{draftmode} % \section{Draft-Mode} + +\LoadCommonFile{typearea} % \section{Page Layout} + +For letters, it is normally not useful to distinguish one-sided and two-sided +printing. Since letters are not usually bound, each page of a letter will be +viewed on its own. This is also true even if both the letter is printed on +both sides of the paper. Vertical adjustment usually does not matter for +letters either. If you nevertheless need it, or want to understand what it is, +please refer to the commands +\DescRef{maincls.cmd.raggedbottom}\IndexCmd{raggedbottom} and +\DescRef{maincls.cmd.flushbottom}\IndexCmd{flushbottom} explained in +\autoref{sec:maincls.typearea} on \DescPageRef{maincls.cmd.flushbottom}.% +% +\EndIndexGroup + + +\section{Variables} +\seclabel{variables}% +\BeginIndexGroup +\BeginIndex{}{variables} + +In addition to options, commands, environments, counters, and lengths, +\autoref{cha:maincls} introduced the concept of additional elements for +\KOMAScript{}. A typical property of an element is its font style and the +ability to change it (see \autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}). In this section we introduce +variables. Variables can have a label used to identify them when they are +output in the document as well as their actual content. To avoid confusion +with labels used for cross-references, this guide refers to such labels as the +``description'' of the variable. The content of a variable can be set +independently of the time and place it is used the same way that the content +of a command can be defined separately from its use. The main difference +between a command and a variable is that a command usually triggers an action, +whereas a variable usually consists of plain text which is then output by a +command. In addition, a variable can also have a description which can be +customised and output. + +This section deliberately confines itself to introducing the concept of +variables. The examples below have no special meaning. More detailed +examples can be found in the explanation of predefined variables used in the +class and the package. An overview of all defined variables is given in +\autoref{tab:\LabelBase.variables}. +% +\begin{desclist} + %\renewcommand*{\abovecaptionskipcorrection}{-\normalbaselineskip}% + \desccaption{Supported variables in \Class{scrlttr2} and + \Package{scrletter}\label{tab:\LabelBase.variables}}% + {Supported variables in \Class{scrlttr2} and \Package{scrletter} + (\emph{continued})}% + \ventry{addresseeimage}{% + commands used to print the postpaid postmark for the + \OptionValueRef{\LabelBase}{addrfield}{backgroundimage} option or the + postpaid address for the \OptionValueRef{\LabelBase}{addrfield}{image} + option (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.addresseeimage})}% + \ventry{backaddress}{% + return address for window envelopes % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.backaddress})}% + \ventry{% + backaddressseparator}{separator within the return address % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.backaddressseparator})}% + \ventry{ccseparator}{% + separator between title of additional addresses (cc list) + and additional addresses % + (\autoref{sec:\LabelBase.document}, + \DescPageRef{\LabelBase.variable.ccseparator})}% + \ventry{customer}{% + customer number % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.customer})}% + \ventry{date}{% + date % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.date})}% + \ventry{emailseparator}{% + separator between email name and email address % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.emailseparator})}% + \ventry{enclseparator}{% + separator between title of enclosure and enclosures % + (\autoref{sec:\LabelBase.document}, + \DescPageRef{\LabelBase.variable.enclseparator})}% + \ventry{faxseparator}{% + separator between title of fax and fax number % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.faxseparator})}% + \ventry{firstfoot}{% + footer\ChangedAt{v3.08}{\Class{scrlttr2}} of the letterhead page % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.firstfoot})}% + \ventry{firsthead}{% + header\ChangedAt{v3.08}{\Class{scrlttr2}} of the letterhead page % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.firsthead})}% + \ventry{fromaddress}{% + sender's address without sender name % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromaddress})}% + \ventry{frombank}{% + sender's bank details % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.frombank})}% + \ventry{fromemail}{% + sender's e-mail % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromemail})}% + \ventry{fromfax}{% + sender's fax number % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromfax})}% + \ventry{fromlogo}{% + commands for inserting the sender's logo % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromlogo})}% + \ventry{frommobilephone}{% + \ChangedAt{v3.12}{\Class{scrlttr2}}% + sender's mobile telephone number % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.frommobilephone})}% + \ventry{fromname}{% + complete name of sender % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromname})}% + \ventry{fromphone}{% + sender's telephone number % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromphone})}% + \ventry{fromurl}{% + URL of the sender, e.\,g. of the sender's homepage % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromurl})}% + \ventry{fromzipcode}{% + ZIP code (postal code) of the sender for the postpaid postmark of the + \OptionValueRef{\LabelBase}{addrfield}{PP} option % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromzipcode})}% + \ventry{invoice}{% + invoice number % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.invoice})}% + \ventry{location}{% + extra details of the sender % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.location})}% + \ventry{myref}{% + sender's reference % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.myref})}% + \ventry{nextfoot}{% + footer\ChangedAt{v3.08}{\Class{scrlttr2}} using page style + \PageStyle{headings}\IndexPagestyle{headings} or + \PageStyle{myheadings}\IndexPagestyle{myheadings} % + (\autoref{sec:\LabelBase.pagestyle}, + \DescPageRef{\LabelBase.variable.nextfoot})}% + \ventry{nexthead}{% + header\ChangedAt{v3.08}{\Class{scrlttr2}} using page style + \PageStyle{headings}\IndexPagestyle{headings} or + \PageStyle{myheadings}\IndexPagestyle{myheadings} % + (\autoref{sec:\LabelBase.pagestyle}, + \DescPageRef{\LabelBase.variable.nexthead})}% + \ventry{phoneseparator}{% + separator between title of telephone and telephone number % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.phoneseparator})}% + \ventry{place}{% + sender's location; used next to date % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.place})}% + \ventry{placeseparator}{% + separator between location and date % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.placeseparator})}% + \ventry{PPdatamatrix}{% + command to print the data array for the + \OptionValueRef{\LabelBase}{addrfield}{PP} option % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.PPdatamatrix})}% + \ventry{PPcode}{% + commands for the sender's identification code for the + \OptionValueRef{\LabelBase}{addrfield}{PP} option % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.PPcode})}% + \ventry{signature}{% + signature annotation beneath the closing text of the letter % + (\autoref{sec:\LabelBase.closing}, + \DescPageRef{\LabelBase.variable.signature})}% + \ventry{specialmail}{% + delivery method % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.specialmail})}% + \ventry{subject}{% + letter's subject % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.subject})}% + \ventry{subjectseparator}{% + separator between subject title and subject % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.subjectseparator})}% + \ventry{title}{% + letter title % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.title})}% + \ventry{toaddress}{% + address of recipient without recipient name % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.toaddress})}% + \ventry{toname}{% + complete name of recipient % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.toname})}% + \ventry{yourmail}{% + date of recipient's referenced mail % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.yourmail})}% + \ventry{yourref}{% + recipient's reference % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.yourref})}% + \ventry{zipcodeseparator}{% + separator between the title of ZIP code (postal code) and the code itself % + (\autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.zipcodeseparator})}% +\end{desclist} + +\begin{Declaration} + \Macro{setkomavar}% + \Parameter{name}\OParameter{description}\Parameter{content}% + \Macro{setkomavar*}\Parameter{name}\Parameter{description} +\end{Declaration} +The \Macro{setkomavar} command sets the \PName{content} of the \PName{name} +variable. Using the optional argument, you can change the \PName{description} +of the variable at the same time. In contrast, \Macro{setkomavar*} sets only +the \PName{description} of the \PName{name} variable. +\begin{Example} + It is customary for letters to indicate the sender in the letterhead. + First, \KOMAScript{} must know the name of the sender. For + ``Joe Public'' that would be done with: +\begin{lstcode} + \setkomavar{fromname}{Joe Public} +\end{lstcode} + The default for the description of the sender is ``From''. Assuming, + however, that Mr Public wants to have ``Sender'' in the places where + \KOMAScript{} outputs his name, he would have to add +\begin{lstcode} + \setkomavar*{fromname}{Sender} +\end{lstcode} + or combine the two commands into one: +\begin{lstcode} + \setkomavar{fromname}[Sender]{Joe Public} +\end{lstcode} + He thus kills two birds with one stone, so to speak. +\end{Example} +By the way, you can delete the content of the variable by providing an empty +\PName{content} argument. Of course, you can delete the \PName{description} of +the variable in the same way, with an empty argument for the description. +\begin{Example} + Suppose Mr Public wants to have no label for the name of the sender. He can + either delete it for himself with +\begin{lstcode} + \setkomavar*{fromname}{} +\end{lstcode} + or he could again kill two birds with one stone and use +\begin{lstcode} + \setkomavar{fromname}[]{Joe Public} +\end{lstcode} + This will simultaneously set the contents of the variable and delete its + description. +\end{Example} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{usekomavar}\OParameter{command}\Parameter{name}% + \Macro{usekomavar*}\OParameter{command}\Parameter{name} +\end{Declaration} +In\ChangedAt{v2.9i}{\Class{scrlttr2}} some cases, it is necessary to access +the content or description of a variable and not to leave this solely to the +class. This is especially important if you have defined a variable which is +not added to the reference fields line. Using the command \Macro{usekomavar} +you have access to the content of the \PName{name} variable, whereas the +starred version \Macro{usekomavar*} allows you to access the description or +title. In \autoref{sec:scrlttr2-experts.variables}, +\DescPageRef{scrlttr2-experts.cmd.newkomavar} you can find more information +about defining your own variables.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifkomavar}\Parameter{name}\Parameter{then code}\Parameter{else code} +\end{Declaration} +With\ChangedAt{v3.03}{\Class{scrlttr2}}% +\ChangedAt{v3.28}{\Class{scrlttr2}\and \Package{scrletter}} this command, you +can determine if a variable has already been defined. The \PName{then code} +will be executed only if the variable already exists. The variable's contents +will not be examined and so can be empty. The \PName{else code} will be +executed if the variable does not exist. Such tests can be useful, for +example, if your own variables are defined in one \File{lco} file\Index{lco + file=\File{lco} file} (see \autoref{sec:\LabelBase.lcoFile} starting at +\autopageref{sec:\LabelBase.lcoFile}) but used in another \File{lco} file only +if they exist.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifkomavarempty}\Parameter{name}\Parameter{then code}% + \Parameter{else code}% + \Macro{Ifkomavarempty*}\Parameter{name}\Parameter{then code}% + \Parameter{else code} +\end{Declaration} +With\ChangedAt{v2.9i}{\Class{scrlttr2}}% +\ChangedAt{v3.28}{\Class{scrlttr2}\and \Package{scrletter}} these commands, +you can determine whether either the content or the description of a variable +is empty. The \PName{then code} will be executed if the expanded content or +the expanded description of the \PName{name} variable is empty. Otherwise, the +\PName{else code} will be executed. The starred variant tests the variable's +description, while the normal variant tests its contents.% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Pseudo-lengths} +\seclabel{pseudoLength} +\BeginIndexGroup +\BeginIndex{}{pseudo-lengths} + +\LaTeX{} processes lengths with three commands: +\Macro{newlength}\IndexCmd{newlength}, \Macro{setlength}\IndexCmd{setlength} +and \Macro{addtolength}\IndexCmd{addtolength}. Many packages also use macros, +which are commands, to store lengths. \KOMAScript{} extends this method with +the ability to process such lengths stored in macros with commands similar to +those used to handle real lengths. \KOMAScript{} calls lengths that are +actually stored in macros \emph{pseudo-lengths}. + +Note\textnote{Attention!} that even though these pseudo-lengths are internally +implemented as macros, the commands for pseudo-length management expect only +the names of the pseudo-lengths not the macros representing the +pseudo-lengths. The names of pseudo-lengths are written without the initial +backslash, like the names of \LaTeX{} counters and unlike macros or \LaTeX{} +lengths. + +\begin{Explain} + Historical \TeX{} works with a fixed number of registers. There are + registers for tokens, for boxes, for counters, for skips, and for + dimensions. Overall there are 256 registers for each of these + categories. For \LaTeX{} lengths, which are defined with \Macro{newlength}, + skip registers are used. Once all these registers are in use, you can not + define any more lengths. Both \Class{scrlttr2} and \Package{scrletter} would + normally use more than 20 of these registers for the first page + alone. \LaTeX{} itself already uses 40 of these registers. The + \hyperref[cha:typearea]{\Package{typearea}}% + \IndexPackage{typearea} package needs some of them too; thus, approximately + a quarter of these precious registers would already be in use. For this + reason, in 2002 \Class{scrlttr2} stores letter-specific lengths in macros + instead of lengths. + + Anyone who wants to argue that the recommended \LaTeX{} installation with + \eTeX{}, which is required for \KOMAScript{} anyway, no longer suffers from + the above-mentioned limitation would be right. However, that improvement + came too late for \Class{scrlttr2}. With \Package{scrletter}, the concept of + psuedo-lengths was adopted for reasons of compatibility. +\end{Explain} + +The pseudo-lengths defined and uses by \KOMAScript{} are listed in +\autoref{tab:\LabelBase.pseudoLength}, which also provides cross +references to the detailed descriptions of each pseudo-lengths in the +following sub-sections. + +A schematic display of the most important distances of the letterhead page is +shown in \autoref{fig:\LabelBase.pseudoLength} on +\autopageref{fig:\LabelBase.pseudoLength}. In addition to the +pseudo-lengths for the configurable distances, some non-configurable lengths +are also shown in light gray. For the sake of clarity, however, some rarely +required pseudo-lengths have been omitted. +% +\begin{desclist} + \renewcommand{\abovecaptionskipcorrection}{-\normalbaselineskip}% + \desccaption{% + Pseudo-lengths provided by \Class{scrlttr2} and \Package{scrletter}% + \label{tab:\LabelBase.pseudoLength}% + }{% + Pseudo-lengths provided by \Class{scrlttr2} and \Package{scrletter} + (\emph{continued})% + }% + \pentry{backaddrheight}{% + the height of the return address at the upper edge of the address field + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.backaddrheight})% + }% + \pentry{bfoldmarklength}{% + the length of the bottommost fold mark + (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.bfoldmarkvpos})% + }% + \pentry{bfoldmarkvpos}{% + the vertical distance of the bottommost fold mark from the top edge of the + paper (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.bfoldmarkvpos})% + }% + \pentry{firstfoothpos}{% + the horizontal distance of the letterhead page footer from the left edge + of the paper; values greater than the width of the paper or less than the + negative value of the width of the paper activate special handling % + (\autoref{sec:\LabelBase.firstFoot}, + \DescPageRef{\LabelBase.plength.firstfoothpos})% + }% + \pentry{firstfootvpos}{% + the vertical distance of letterhead page footer from the top edge of the + paper (\autoref{sec:\LabelBase.firstFoot}, + \DescPageRef{\LabelBase.plength.firstfootvpos})% + }% + \pentry{firstfootwidth}{% + the width of the letterhead page footer + (\autoref{sec:\LabelBase.firstFoot}, + \DescPageRef{\LabelBase.plength.firstfootwidth})% + }% + \pentry{firstheadhpos}{% + the horizontal distance of the letterhead from the left edge of the paper; + values greater than the width of the paper or less than the negative value + of the width of the paper activate special handling + (\autoref{sec:\LabelBase.firstHead}, + \DescPageRef{\LabelBase.plength.firstheadhpos})% + }% + \pentry{firstheadvpos}{% + the vertical distance of the letterhead from the top edge of the paper + (\autoref{sec:\LabelBase.firstHead}, + \DescPageRef{\LabelBase.plength.firstheadvpos})% + }% + \pentry{firstheadwidth}{% + the width of the letterhead (\autoref{sec:\LabelBase.firstHead}, + \DescPageRef{\LabelBase.plength.firstheadwidth})% + }% + \pentry{foldmarkhpos}{% + the horizontal distance of the horizontal fold marks from the left edge of + the paper (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.foldmarkhpos})% + }% + \pentry{foldmarkvpos}{% + the vertical distance of the vertical fold marks from the top edge of the + paper (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.foldmarkvpos})% + }% + \pentry{fromrulethickness}{% + the thickness of an optional horizontal rule in the letterhead + (\autoref{sec:\LabelBase.firstHead}, + \DescPageRef{\LabelBase.plength.fromrulethickness})% + }% + \pentry{fromrulewidth}{% + the length of an optional horizontal rule in the letterhead + (\autoref{sec:\LabelBase.firstHead}, + \DescPageRef{\LabelBase.plength.fromrulewidth})% + }% + \pentry{lfoldmarkhpos}{% + the horizontal distance of the vertical fold mark from the left edge of + the paper (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.lfoldmarkhpos})% + }% + \pentry{lfoldmarklength}{% + the length of the vertical fold mark + (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.lfoldmarklength})% + }% + \pentry{locheight}{% + the height of the field containing the additional sender information if + the value is not 0; if it is 0, \PLength{toaddrheight} is used instead + (\autoref{sec:\LabelBase.locationField}, + \DescPageRef{\LabelBase.plength.locheight})% + }% + \pentry{lochpos}{% + the horizontal distance of the field containing the additional sender + information; if the value is positive, the distance is measured from the + right paper edge; if negative, from the left paper edge; if 0, the + negative value of \PLength{toaddrhpos} is used instead + (\autoref{sec:\LabelBase.locationField}, + \DescPageRef{\LabelBase.plength.lochpos})% + }% + \pentry{locvpos}{% + the vertical distance of the field containing the additional sender + information from the top edge of the paper if the value is not 0; if it is + 0, \PLength{toaddrvpos} is used instead + (\autoref{sec:\LabelBase.locationField}, + \DescPageRef{\LabelBase.plength.locvpos})% + }% + \pentry{locwidth}{% + the width of the field containing the additional sender information; if it + is 0, the width is calculated automatically based on the + \DescRef{\LabelBase.option.locfield} option described in + \autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.locfield} % + (\autoref{sec:\LabelBase.locationField}, + \DescPageRef{\LabelBase.plength.locwidth})% + }% + \pentry{mfoldmarklength}{% + the length of the middle horizontal fold mark + (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.mfoldmarklength})% + }% + \pentry{mfoldmarkvpos}{% + the vertical distance of the middle horizontal fold mark from the top edge + of the paper (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.mfoldmarkvpos})% + }% + \pentry{pfoldmarklength}{% + the length of the hole-punch mark + (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.pfoldmarklength})% + }% + \pentry{PPdatamatrixvskip}{% + the vertical distance between the postpaid header and the data array with + \OptionValueRef{scrlttr2}{addrfield}{PP} + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.PPdatamatrixvskip})% + }% + \pentry{PPheadheight}{% + the height of the postpaid header + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.PPheadheight})% + }% + \pentry{PPheadwidth}{% + the width of the left postpaid field with + \OptionValueRef{scrlttr2}{addrfield}{PP} + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.PPheadwidth})% + }% + \pentry{refaftervskip}{% + vertical skip below reference-field line % + (\autoref{sec:\LabelBase.refLine}, + \DescPageRef{\LabelBase.plength.refaftervskip})% + }% + \pentry{refhpos}{% + the horizontal distance of reference-field line from the left + edge of the paper; if the value is 0, the reference-field line is centred + horizontally on the letterhead page + (\autoref{sec:\LabelBase.refLine}, + \DescPageRef{\LabelBase.plength.refhpos})% + }% + \pentry{refvpos}{% + the vertical distance of reference-field line from the top + edge of the paper (\autoref{sec:\LabelBase.refLine}, + \DescPageRef{\LabelBase.plength.refvpos})% + }% + \pentry{refwidth}{% + the width of the reference-field line + (\autoref{sec:\LabelBase.refLine}, + \DescPageRef{\LabelBase.plength.refwidth})% + }% + \pentry{sigbeforevskip}{% + the vertical skip between the closing and the signature + (\autoref{sec:\LabelBase.closing}, + \DescPageRef{\LabelBase.plength.sigbeforevskip})% + }% + \pentry{sigindent}{% + the indentation of the signature with respect to the text body + (\autoref{sec:\LabelBase.closing}, + \DescPageRef{\LabelBase.plength.sigindent})% + }% + \pentry{specialmailindent}{% + the left indentation of the delivery method within the address field + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.specialmailindent})% + }% + \pentry{specialmailrightindent}{% + the right indentation of the delivery method within the address field + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.specialmailrightindent})% + }% + \pentry{subjectaftervskip}{% + the vertical skip after the subject + (\autoref{sec:\LabelBase.subject}, + \DescPageRef{\LabelBase.plength.subjectaftervskip})% + }% + \pentry{subjectbeforevskip}{% + additional vertical skip before the subject + (\autoref{sec:\LabelBase.subject}, + \DescPageRef{\LabelBase.plength.subjectbeforevskip})% + }% + \pentry{subjectvpos}{% + the vertical distance of the subject from the top edge of the paper; if it + is 0, the position is calculated based on the + \DescRef{\LabelBase.option.subject} option + (\autoref{sec:\LabelBase.subject}, + \DescPageRef{\LabelBase.plength.subjectaftervskip})% + }% + \pentry{tfoldmarklength}{% + the length of the topmost horizontal fold mark + (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.tfoldmarklength})% + }% + \pentry{tfoldmarkvpos}{% + the vertical distance of the topmost horizontal folding mark from the top + edge of the paper (\autoref{sec:\LabelBase.foldmarks}, + \DescPageRef{\LabelBase.plength.tfoldmarkvpos})% + }% + \pentry{toaddrheight}{% + the height of the address field (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.toaddrheight})% + }% + \pentry{toaddrhpos}{% + the horizontal distance of the address field from left edge of the paper, + if the value is positive; if it is negative, the negative horizontal + distance of the address field from the right edge of the paper + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.toaddrhpos})% + }% + \pentry{toaddrindent}{% + the left and right indentation of the address within the address field + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.toaddrindent})% + }% + \pentry{toaddrvpos}{% + the vertical distance of the address field from the the top edge of the + paper (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.toaddrvpos})% + }% + \pentry{toaddrwidth}{% + the width of the address field % + (\autoref{sec:\LabelBase.addressee}, + \DescPageRef{\LabelBase.plength.toaddrwidth})% + }% +\end{desclist} + +\begin{figure} + \centering + \tikzset{x=.56mm,y=-.56mm} + \tiny + \input{plength-tikz.tex} + \caption{Schematic of the pseudo-lengths for a letter} + \label{fig:\LabelBase.pseudoLength} +\end{figure} + + +\begin{Declaration} + \Macro{newplength}\Parameter{name} +\end{Declaration} +This\ChangedAt{v3.26}{\Class{scrlttr2}\and \Package{scrletter}} command +defines a new pseudo-length. The new pseudo-length is uniquely identified by +its \PName{name}. Each name can therefore be assigned only once. If you +attempt to redefine an existing pseudo-length, the commands exits with an +error message. + +\BeginIndex{Cmd}{@newplength}% +Since the ordinary user does not normally need to define pseudo-lengths, this +command was not a user instruction until \KOMAScript~3.26. Before then, +\Macro{@newplength} existed with the same functionality. This instruction still +exists for package authors.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifplength}\Parameter{pseudo-length}% + \Parameter{then-code}\Parameter{else-code} +\end{Declaration} +This\ChangedAt{v3.27}{\Class{scrlttr2}\and \Package{scrletter}} command can be +used to determine whether a \PName{pseudo-length} has been defined. The +\PName{then-code} is executed if the \PName{pseudo-length} is defined and not +\Macro{relax}. Otherwise the \PName{else-code} is executed. + +% Note: In the English manual this information is not \iffree{}{...}! +\BeginIndex{Cmd}{if@plength}% +For reasons of consistency only, the internal command \Macro{if@plength}, +with the identical meaning, exists for the use of package authors.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{useplength}\Parameter{name} +\end{Declaration} +Using this command you can access the value of the pseudo-length of +the given \PName{name}. This is one of the few user commands in +connection with pseudo-lengths. Of course this command can also be +used with an \File{lco} file\Index{lco file=\File{lco} file} (see +\autoref{sec:\LabelBase.lcoFile} ab \autopageref{sec:\LabelBase.lcoFile}).% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setplength}% + \OParameter{factor}\Parameter{pseudo-length}\Parameter{value}% + \Macro{addtoplength}% + \OParameter{factor}\Parameter{pseudo-length}\Parameter{value} +\end{Declaration} +Using \Macro{setplength}, you can assign the multiple of a +\PName{value} to a \PName{pseudo-length}. The \PName{factor} is given as an +optional argument (see also \DescRef{\LabelBase.cmd.setlengthtoplength}, +\autoref{sec:\LabelBase.pseudoLength}, +\DescPageRef{\LabelBase.cmd.setlengthtoplength}). + +With \Macro{addtoplength} you can add the multiple of a \PName{value} to a +\PName{pseudo-length}. Again, you can pass a \PName{factor} as an optional +argument. + +To assign or to add the multiple of one \PName{pseudo-length} to another +pseudo-length, use the \Macro{useplength} command (see +\autoref{sec:\LabelBase.pseudoLength}, \DescPageRef{\LabelBase.cmd.useplength}) +within the \PName{value}. To subtract the value of one \PName{pseudo-length} +from another \PName{pseudo-length}, you use should use at the same time a +minus sign or \PValue{-1} as the \PName{factor}. + +\BeginIndex{Cmd}{@setplength}% +\BeginIndex{Cmd}{@addtoplength}% +Since the ordinary user does not normally need to define pseudo-lengths, these +commands were not user instructions until \KOMAScript~3.26. Before then, +\Macro{@setplength} and \Macro{@addtoplength} existed with the +same functionality. These commands still exist for the use of package authors.% +\EndIndexGroup + +\begin{Declaration} + \Macro{setplengthtowidth} + \OParameter{factor}\Parameter{pseudo-length}\Parameter{content}% + \Macro{setplengthtoheight} + \OParameter{factor}\Parameter{pseudo-length}\Parameter{content}% + \Macro{setplengthtodepth} + \OParameter{factor}\Parameter{pseudo-length}\Parameter{content}% + \Macro{setplengthtototalheight} + \OParameter{factor}\Parameter{pseudo-length}\Parameter{content}% +\end{Declaration} +The\ChangedAt{v3.26}{\Class{scrlttr2}\and \Package{scrletter}} first three +commands essentially correspond with \Macro{settowidth}, +\Macro{settoheight}, and \Macro{settodepth} from the \LaTeX{} kernel, but set +\PName{pseudo-length}s instead of lengths. Like +\DescRef{\LabelBase.cmd.setplength}, these commands extend their \LaTeX{} +kernel equivalents with an optional \PName{factor}. They set a +\PName{pseudo-length} to the natural width, height or depth of the given +\PName{content}, multiplied by the optional \PName{factor}. The additional +command \Macro{setplengthtototalheight} sets the \PName{pseudo-length} to the +sum of the height and depth of \PName{content} multiplied by the optional +\PName{factor}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setlengthtoplength}% + \OParameter{factor}\Parameter{length}\Parameter{pseudo-length}% + \Macro{addtolengthplength}% + \OParameter{factor}\Parameter{length}\Parameter{pseudo-length} +\end{Declaration} +With the \Macro{setlengthtoplength} command, you can assign a multiple of a +\PName{pseudo-length} to a real \PName{length}. The \PName{factor} is given +as an optional argument instead of directly preceding the +\PName{pseudo-length}. You should also use this command when you want to +assign the negative of a \PName{pseudo-length} to a \PName{length}. In this +case, you can use either a minus sign or \PValue{-1} as the \PName{factor}. +The \Macro{addtolengthplength} command works very similarly. It adds the +\PName{pseudo-length} multiplied by the \PName{factor} to the \PName{length}.% +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{General Structure of Letter Documents} +\seclabel{document} +\BeginIndexGroup +\BeginIndex{}{letter>structure} + +The general structure of a letter document differs somewhat from the structure +of a normal document. Whereas a book document usually contains only one book, +a letter document can contain several letters. As illustrated in +\autoref{fig:\LabelBase.document}, a letter document consists of a preamble, +the individual letters, and the closing. + +\begin{figure} + \KOMAoptions{captions=bottombeside}% + \setcapindent{0pt}% + \begin{captionbeside}[{% + General structure of a letter document containing several individual letters% + }]{% + General structure of a letter document containing several individual letters + (the structure of a single letter is shown in + \autoref{fig:\LabelBase.letter})% + \label{fig:\LabelBase.document}% + }[l] + \begin{minipage}[b]{.667\linewidth} + \centering\small\setlength{\fboxsep}{1.5ex}% + \addtolength{\linewidth}{-\dimexpr2\fboxrule+2\fboxsep\relax}% + \fbox{\parbox{\linewidth}{\raggedright% + \Macro{documentclass}\OParameter{\dots}\PParameter{scrlttr2}\\ + \dots\\ + {\centering\emph{settings for all letters}\\} + \dots\\ + \Macro{begin}\PParameter{document}\\ + \dots\\ + {\centering\emph{settings for all letters}\\} + \dots\\ + }}\\ + \fbox{\parbox{\linewidth}{\raggedright% + \Macro{begin}\PParameter{letter}\Parameter{recipient}\\ + \dots\\ + {\centering\emph{content of the individual letter}\\} + \dots\\ + \Macro{end}\PParameter{letter}\\ + }}\\[2pt] + \parbox{\linewidth}{\raggedright\vspace{-.5ex}\vdots\vspace{1ex}}\\ + \fbox{\parbox{\linewidth}{\raggedright% + \Macro{end}\PParameter{document}\\ + }}\\[\dimexpr\fboxsep+\fboxrule\relax] + \end{minipage} + \end{captionbeside} +\end{figure} + +The preamble contains all the settings that apply generally to all letters. +Most of them can also be overwritten in the settings of the individual +letters. The only setting which cannot currently be changed within a single +letter is the version of \Class{scrlttr2} for which compatibility is required +(see the \DescRef{\LabelBase.option.version} option in +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}). + +If you use \Package{scrletter}\important{scrletter}, the only difference is +that another class is loaded, with +\DescRef{\LabelBase.cmd.usepackage}\PParameter{scrletter} added before the +settings for all letters. For setting options with \Package{scrletter}, see +\autoref{sec:\LabelBase.options}, on \autopageref{sec:\LabelBase.options}. + +I recommended that you place only general settings such as loading packages +and setting options before \Macro{begin}\PParameter{document}. You should +initialise all variables or other textual features after +\Macro{begin}\PParameter{document}, particularly when you use the +\Package{babel} package\IndexPackage{babel} (see \cite{package:babel}) or +change language-dependent variables of \Class{scrlttr2}. + +The closing usually consists only of \Macro{end}\PParameter{document}. Of +course you can also add additional comments at this point. + +\begin{figure} + \KOMAoptions{captions=bottombeside}% + \setcapindent{0pt}% + \begin{captionbeside}[{% + General structure of a single letter within a letter document% + }]{% + General structure of a single letter within a letter document (see also + \autoref{fig:\LabelBase.document})% + \label{fig:\LabelBase.letter}}[l] + \begin{minipage}[b]{.667\linewidth}% + \centering\small\setlength{\fboxsep}{1.5ex}% + \addtolength{\linewidth}{-\dimexpr2\fboxrule+2\fboxsep\relax}% + \fbox{\parbox{\linewidth}{\raggedright% + \Macro{begin}\PParameter{letter}% + \OParameter{options}\Parameter{recipient}\\ + \dots\\[\dp\strutbox] + {\centering\emph{settings for this letter}\\} + \dots\\ + \DescRef{\LabelBase.cmd.opening}\Parameter{salutation}\\ + }}\\[1pt] + \fbox{\parbox{\linewidth}{\raggedright% + \dots\\[\dp\strutbox] + {\centering\emph{letter text}\\} + \dots\\ + }}\\[1pt] + \fbox{\parbox{\linewidth}{\raggedright% + \DescRef{\LabelBase.cmd.closing}\Parameter{concluding text}\\ + \DescRef{\LabelBase.cmd.ps}\\ + \dots\\[\dp\strutbox] + {\centering\emph{postscript}\\} + \dots\\ + \DescRef{\LabelBase.cmd.encl}\Parameter{enclosures}\\ + \DescRef{\LabelBase.cmd.cc}\Parameter{additional recipients}\\ + \Macro{end}\PParameter{letter}\\ + }}\\[\dimexpr\fboxsep+\fboxrule\relax] + \end{minipage} + \end{captionbeside} +\end{figure} + +As detailed in \autoref{fig:\LabelBase.letter}, individual letters each +consist of an introduction, the body of the letter, and the closing. In the +introduction, all settings pertaining to the current letter alone are defined. +It is important that this introduction always ends with +\DescRef{\LabelBase.cmd.opening}\IndexCmd{opening}. Similarly, the closing +always starts with \DescRef{\LabelBase.cmd.closing}\IndexCmd{closing}. The +\PName{opening} and \PName{closing} arguments of the two commands can be left +empty, but both commands must be used and must have an argument. + +Note that you can change additional settings between the individual letters. +Such changes then apply to all subsequent letters. However, to keep your +letter documents clear and maintainable, you should think carefully before +actually placing further general settings of limited scope between the +letters. I cannot recommend this practice. However, if you use +\Package{scrletter2}, there is nothing wrong with inserting additional parts +of the document between or after letters that should not be in the same scope. +For example, you can combine a cover letter and a CV in one document. + +\begin{Declaration} + \begin{Environment}{letter}\OParameter{options}\Parameter{recipient} + \end{Environment} +\end{Declaration} +\BeginIndex{}{address}% +The \Environment{letter} environment is one of the key environments of the +letter class. A noteworthy\textnote{\KOMAScript{} vs. standard classes} +feature of \Class{scrlttr2} and \Package{scrletter} is that they can provide +additional \PName{options} for the \Environment{letter} environment. These +\PName{options} are executed internally using the +\DescRef{\LabelBase.cmd.KOMAoptions} command. + +The \PName{recipient}, or addressee, is a mandatory argument passed to the +\Environment{letter} environment and includes both the name and the address of +the recipient of the letter. Double\textnote{Attention!} backslashes serve to +separate the individual parts of the address. These parts are output on +individual lines in the address field. Nevertheless, you should not interpret +the double backslash as a mandatory line break. Vertical material such as new +paragraphs or vertical space is not permitted within the address. They can +lead to unexpected results and error messages. Incidentally, this is the same +for the standard letter class. + +\begin{Example} + \phantomsection\label{desc:\LabelBase.env.letter.example}% + Suppose you want to write a letter to Joanna Public. A minimalist + letter document would look like this: +\begin{lstcode} + \documentclass[version=last]{scrlttr2} + \usepackage[british]{babel} + \begin{document} + \begin{letter}{Joanna Public\\ + 1 Hillside\\ + SAMPLESTEAD\\ + WX12 3YZ} + \end{letter} + \end{document} +\end{lstcode} + However, this would not result in any output. It would not even print the + recipient on the letterhead page. Why this is the case is explained in the + description of the \DescRef{\LabelBase.cmd.opening} command on + \DescPageRef{\LabelBase.cmd.opening}. +\end{Example} + +Letters\ChangedAt{v3.27}{\Class{scrlttr2}\and \Package{scrletter}} are always +printed in single-column mode and without vertical adjustment. You can use +\DescRef{maincls.cmd.flushbottom}, explained in \autoref{sec:maincls.typearea} +on \DescPageRef{maincls.cmd.flushbottom}\IndexCmd{flushbottom}, together with +\DescRef{\LabelBase.cmd.AtBeginLetter} to force a vertical adjustment.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AtBeginLetter}\Parameter{code}% + \Macro{AtEndLetter}\Parameter{code} +\end{Declaration} +As mentioned in \cite{latex:clsguide}, \LaTeX{} lets the user declare +additional \PName{code} to be executed at certain points in a \LaTeX{} run. +For this purpose, the \LaTeX{} kernel provides, for example, +\Macro{AtBeginDocument}\IndexCmd{AtBeginDocument} and +\Macro{AtEndOfClass}\IndexCmd{AtEndOfClass}. Such points are called +\emph{hooks}\Index{hook}. The \Class{scrlttr2} class and the +\Package{scrletter} package provide two additional hooks. You can declare the +\PName{code} for these using \Macro{AtBeginLetter} and +\Macro{AtEndLetter}\ChangedAt{v2.95}{\Class{scrlttr2}}. Originally, hooks were +intended for package and class authors, so they are documented only in +\cite{latex:clsguide} and not in \cite{latex:usrguide}. However, with letters +there are useful applications at the user level for both new hooks, as the +following example illustrates. +% +\begin{Example} + Suppose you have several letters in a document that use their own commands + to insert a questionnaire in the letters. The questions are numbered + automatically using a counter. Since \KOMAScript{} is unaware of this + counter, it would not be reset at the start of each new letter, unlike the + page number. If each questionnaire contains ten questions, the first + question in the fifth letter would get the number~41. You can solve this + problem by telling \KOMAScript{} to reset this counter at the beginning of + each letter: +\begin{lstlisting} + \newcounter{Question} + \newcommand{\Question}[1]{% + \refstepcounter{Question}\par + \noindent\begin{tabularx}{\textwidth}{l@{}X} + \theQuestion:~ & #1\\ + \end{tabularx}% + }% + \AtBeginLetter{\setcounter{Question}{0}} +\end{lstlisting} + This way first question remains question~1, even in the 1001st letter. Of + course the definition in this example requires the + \Package{tabularx}\IndexPackage{tabularx} package (see + \cite{package:tabularx}). +\end{Example}% +% +\EndIndexGroup + + +\begin{Declaration} + \Counter{letter}% + \Macro{thisletter}% + \Macro{letterlastpage} +\end{Declaration} +If\ChangedAt{v3.19}{\Class{scrlttr2}\and \Package{scrletter}} you have more +than one letter in a document, it is useful to have a letter number. For this +purpose, \KOMAScript{} has provided the \Counter{letter} counter, which +is incremented by one at each \Macro{begin}\PParameter{letter}, since +version~3.19. +\begin{Example} + Let's return to the \DescRef{\LabelBase.cmd.AtBeginLetter} + example. Instead of resetting the counter explicitly at + \Macro{begin}\PParameter{letter}, we can do so implicitly by defining + counter \Counter{Question} to depend on counter \Counter{letter}: +\begin{lstlisting} + \newcounter{Question}[letter] + \newcommand{\Question}[1]{% + \refstepcounter{Question}\par + \noindent\begin{tabularx}{\textwidth}{l@{}X} + \theQuestion:~ & #1\\ + \end{tabularx}% + }% +\end{lstlisting} + Now the new counter will be reset at every start of each letter so that + the first question in each letter will be number one. +\end{Example} + +If you want to display the current value of \Counter{letter}, this is +possible, as usual, with \Macro{theletter}. The counter can also be used for +cross-references. So you can use \Macro{label}\Parameter{name} to generate a +label immediately after \Macro{begin}\PParameter{letter} and reference it +somewhere in the document using \Macro{ref}\Parameter{name}. Inside the same +letter you can get the same result by simply using \Macro{thisletter} without +creating a label. + +For labels in form letters, it is necessary to give them a unique name across +all letters. Once again, you can use \Macro{thisletter} for this purpose. +\KOMAScript{} also uses \Macro{thisletter} internally to put a label on the +last page of each letter. This makes it possible to use +\Macro{letterlastpage}\IndexCmd{label}\IndexCmd{pageref} to reference the +number of the last page of the current letter at any point within the letter. +Since \Macro{letterlastpage} uses \Macro{label} and \Macro{pageref}, it is +only valid after several \LaTeX{} runs\,---\,usually two or three. If you use +\Macro{letterlastpage}, pay attention to the \emph{Rerun} messages in the +terminal output or \File{log} file messages about labels that have been +changed.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{opening}\Parameter{salutation} +\end{Declaration} +This is one of the most important commands for letters. On the surface, it may +seem that only the \PName{salutation}\Index{letter>salutation}, for example +``Dear Mrs~\dots'', is printed. Actually\textnote{Attention!}, this command +also prints the fold marks\Index{fold marks}, the +letterhead\Index{letterhead}, the address\Index{address}, the extra sender +information, the reference line\Index{reference line}, the title\Index{title}, +the subject\Index{subject}, and the footer\Index{page>footer}. In short, +without \Macro{opening} there is no letter. If, in fact, you want to print a +letter without a salutation, you have to use an \Macro{opening} command with +an empty argument. + +\begin{Example} + Let's return to the example of + \DescPageRef{\LabelBase.env.letter.example} and add a salutation: + \lstinputcode[xleftmargin=1em]{letter-example-00-en.tex} + This will result in the letterhead shown in + \autoref{fig:\LabelBase.letter-00}. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Example: letter with recipient and salutation}]{% + result of a minimalist letter with recipient and salutation only + (the date is set by default)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-00-en}} + \end{captionbeside} + \label{fig:\LabelBase.letter-00} + \end{figure} +\end{Example} +\iffalse% Umbruchkorrekturtext +\begin{Explain} + In the early days of computer-generated letters, a salutation was normally + omitted, since individualised form letters were hardly possible. Today + personalised greetings are common in mass mailings.% +\end{Explain} +\fi +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{closing}\Parameter{concluding text} +\end{Declaration} +The main purpose of the command \Macro{closing} is to typeset the +\PName{concluding text}\Index{closing}. This can even consist of multiple +lines. In that case, the individual lines should be separated by a double +backslash. Paragraph breaks inside the \PName{concluding text} are not +allowed. + +In addition, this command also prints the content of the +\DescRef{\LabelBase.variable.signature} variable. You can find more +information about the signature and its configuration in +\autoref{sec:\LabelBase.closing} on +\DescPageRef{\LabelBase.variable.signature}. + +\begin{Example} + Let's extend the our example with a few lines of text and a closing phrase: + \lstinputcode[xleftmargin=1em]{letter-example-01-en.tex} + This will result in a the letter shown in \autoref{fig:\LabelBase.letter-01}. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Example: letter with recipient, opening, text, and + closing}]{% + result of a short letter with recipient, opening, text, and closing + % The refernce to DIN-letters in the German guide isn't relevant for + % English-language letters + (the date is set by default)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-01-en}} + \end{captionbeside} + \label{fig:\LabelBase.letter-01} + \end{figure} +\end{Example} +% +\EndIndexGroup + +\begin{Declaration} + \Macro{ps} +\end{Declaration}% +This instruction merely switches to the postscript. To do so, a new paragraph +begins, and a vertical gap\,---\,usually below the signature\,---\,is +inserted. The \Macro{ps} text can be followed by any text. If you want the +postscript to be introduced with the acronym ``PS:'', which in most current +usage is written without full stops, you have to type this yourself. This +abbreviation is printed neither automatically nor optionally by the +\Class{scrlttr2} class. + +\begin{Example} + The sample letter with the addition of a postscript + \lstinputcode[xleftmargin=1em]{letter-example-02-en.tex} + results in \autoref{fig:\LabelBase.letter-02}. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Example: letter with recipient, opening, text, + closing, and postscript}]{% + result of a short letter with recipient, opening, text, closing, and + postscript (the date is set by default)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-02-en}} + \end{captionbeside} + \label{fig:\LabelBase.letter-02} + \end{figure} +\end{Example} + +\begin{Explain} + When letters were written still by hand, it was quite common to use a + postscript because this was the only way to add information which had been + forgotten in the main part of the letter. For letters written with \LaTeX{}, + of course, you can easily insert additional lines. Nevertheless, postscripts + remain popular. They can be useful to emphasize important points once more, + or even to mention the less important matters. +\end{Explain} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{cc}\Parameter{distribution list}% + \Variable{ccseparator}% +\end{Declaration} +You can print a \PName{distribution list}\Index{recipient>additional}% +\Index{distribution list}\Index{carbon copy} with the \Macro{cc} command. The +command takes the \PName{distribution list} as its argument. If the content of +the variable \Variable{ccseparator}\Index{separator}\Index{delimiter} is not +empty, the name and content of this variable are inserted before the +\PName{distribution list}. In this case, the \PName{distribution list} will be +indented appropriately. It's a good idea\textnote{Hint!} to set the +\PName{distribution list} \Macro{raggedright}\IndexCmd{raggedright} and to +separate the individual entries with a double backslash. +\begin{Example} + This time, the sample letter should go not only to the chairman but also to + all club members: + \lstinputcode[xleftmargin=1em]{letter-example-03-en.tex}% + The result is shown in \autoref{fig:\LabelBase.letter-03}. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Example: letter with recipient, opening, text, + closing, postscript, and distribution list}]{% + result of a short letter with recipient, opening, text, closing, + postscript, and distribution list (the date is set by default)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-03-en}} + \end{captionbeside} + \label{fig:\LabelBase.letter-03} + \end{figure} +\end{Example} +A vertical gap is inserted automatically before the distribution list.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{encl}\Parameter{enclosures}% + \Variable{enclseparator}% +\end{Declaration} +The \PName{enclosures} have the same structure as the distribution list. The +only difference is that the list of enclosures begins with the name and +content of the \Variable{enclseparator}\Index{separator}\Index{delimiter} +variable. +\begin{Example} + To the sample letter we will attach an excerpt from the club's articles of + association. These will be added as an enclosure. Because there is only one + enclosure, we change the description title accordingly: + \lstinputcode[xleftmargin=1em]{letter-example-04-en.tex} + This will result in \autoref{fig:\LabelBase.letter-04}. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Example: letter with recipient, opening, text, + closing, postscript, distribution list, and enclosure}]{% + result of a short letter with recipient, opening, text, closing, + postscript, distribution list, and enclosure (the date is set by + default)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-04-en}} + \end{captionbeside} + \label{fig:\LabelBase.letter-04} + \end{figure} +\end{Example} +% +\EndIndexGroup +% +\EndIndexGroup + + +\LoadCommonFile{fontsize} % \section{Choosing the Document Font Size} + +\LoadCommonFile{textmarkup} % \section{Text Markup} + +\section{Letterhead Page} +\seclabel{firstpage} +\BeginIndexGroup +\BeginIndex{}{letterhead page}% + +The letterhead page is the first page of, and therefore the signpost for, each +letter. In a business context, the paper for this page is often preprinted +stationery containing elements such as a header with the sender's information +and logo. This header itself is also known as a letterhead. \KOMAScript{} lets +you position these elements freely, and so you can not only replicate the +letterhead page directly but also fill in the required fields instantaneously. +This free positioning is achieved with pseudo-lengths (see +\autoref{sec:\LabelBase.pseudoLength} starting on +\autopageref{sec:\LabelBase.pseudoLength}). You can find a schematic +representation of the letterhead page and the variables used for it in +\autoref{fig:\LabelBase.variables}. The names of the variables are printed in +bold to better distinguish the commands from their arguments. + +Subsequent pages\Index{page>subsequent}\Index{subsequent pages} should be +distinguished from the letterhead page. For the purposes of this manual, +subsequent pages are all pages of a letter except the first one. + +\begin{figure} + \centering + \tikzset{x=.56mm,y=-.56mm} + \tiny + \input{variables-tikz.tex} + \caption{schematic display of the letterhead page outlining the most + important commands and variables} + \label{fig:\LabelBase.variables} +\end{figure} + + +\subsection{Fold Marks} +\seclabel{foldmarks} +\BeginIndexGroup +\BeginIndex{}{fold marks}% +\index{marks>folding|see{fold marks}} + +Fold marks, or folding marks, are short horizontal lines at the left edge, and +short vertical lines at the upper edge of the paper. \KOMAScript{} currently +supports three configurable horizontal and one configurable vertical fold +marks. In addition, there is support for a hole-punch mark, or centre mark, +which cannot be shifted vertically. + +\begin{Declaration} + \OptionVName{foldmarks}{setting} +\end{Declaration} +The \Option{foldmarks} option activates or deactivates fold marks for two, +three, or four vertical divisions and one horizontal division. The individual +parts do not have to be of equal size. The positions of three of the four +horizontal marks and the single vertical mark are configurable via +pseudo-lengths (see \autoref{sec:\LabelBase.pseudoLength}, +\autopageref{sec:\LabelBase.pseudoLength}). + +With the \Option{foldmarks} option, you can either use the default values for +simple switches described in \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} in order to activate or deactivate all +configured fold marks on the left and upper edges of the paper at once, +or\ChangedAt{v2.97e}{\Class{scrlttr2}} you can configure the individual fold +marks independently by specifying one or more letters, as listed in +\autoref{tab:\LabelBase.foldmark}. In the latter case, the fold marks are only +shown if they have not been deactivated globally with \PValue{false}, +\PValue{off}, or \PValue{no}. The exact position of the fold marks is depends +on the user settings or the \File{lco} files (see +\autoref{sec:\LabelBase.lcoFile} starting on +\autopageref{sec:\LabelBase.lcoFile}). The default values are \PValue{true} +and \PValue{TBMPL}.\textnote{default} +% +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside}{% + Combinable values for configuring fold marks with the + \Option{foldmarks} option% + }[l] + \begin{tabular}[t]{ll} + \toprule + \PValue{B} & activate bottom horizontal fold mark on left paper edge\\% + \PValue{b} & deactivate bottom horizontal fold mark on left paper edge\\% + \PValue{H} & activate all horizontal fold marks on left paper edge\\% + \PValue{h} & deactivate all horizontal fold marks on left paper edge\\% + \PValue{L} & activate left vertical fold mark on upper paper edge\\% + \PValue{l} & deactivate left vertical fold mark on upper paper edge\\% + \PValue{M} & activate middle horizontal fold mark on left paper edge\\% + \PValue{m} & deactivate middle horizontal fold mark on left paper edge\\% + \PValue{P} & activate hole-punch or centre mark on left paper edge\\% + \PValue{p} & deactivate hole-punch or centre mark on left paper edge\\% + \PValue{T} & activate top horizontal fold mark on left paper edge\\% + \PValue{t} & deactivate top horizontal fold mark on left paper edge\\% + \PValue{V} & activate all vertical fold marks on upper paper edge\\% + \PValue{v} & deactivate all vertical fold marks on upper paper edge\\% + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:\LabelBase.foldmark} +\end{table} +% +\begin{Example} + Suppose you want to deactivate all fold marks except the hole-punch mark. If + the default has not already been changed, you can deactivate it as follows: +\begin{lstlisting} + \KOMAoptions{foldmarks=blmt} +\end{lstlisting} + If there is a chance that the default has already been changed, you should + use a safer method. This changes our example a little bit: + \lstinputcode[xleftmargin=1em]{letter-example-07-en.tex}% + The result is shown in \autoref{fig:\LabelBase.letter-07}. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Example: letter with recipient, opening, text, + closing, postscript, distribution list, enclosure, and hole-punch + mark}]{% + result of a short letter with recipient, opening, text, closing, + postscript, distribution list, enclosure, and hole-punch mark + (the date is set by default)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-07-en}} + \end{captionbeside} + \label{fig:\LabelBase.letter-07} + \end{figure} +\end{Example} +\BeginIndex{FontElement}{foldmark}\LabelFontElement{foldmark}% +You\ChangedAt{v2.97c}{\Class{scrlttr2}} can change the colour of the fold mark +with the \DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) +with the \FontElement{foldmark} element. The default is no change.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{tfoldmarkvpos}% + \PLength{mfoldmarkvpos}% + \PLength{bfoldmarkvpos} +\end{Declaration} +\KOMAScript{} recognises a total of three fold marks whose vertical position +can be configured. The distance of the top fold mark from the upper edge of +the paper is determined by the \PLength{tfoldmarkvpos} pseudo-length; the +distance of the middle fold mark, by the +\PLength{mfoldmarkvpos}\ChangedAt{v2.97e}{\Class{scrlttr2}} pseudo-length; the +distance of the bottommost fold mark, by \PLength{bfoldmarkvpos} +pseudo-length. With the addition of the hole-punch\Index{hole-punch mark} or +centre\Index{centre mark|see{hole-punch mark}} mark, there is yet a fourth +horizontal mark. This one is however always placed at the vertical centre of +the paper. +\iftrue% Umbruchkorrekturtext +There is no pseudo-length for this last mark because its vertical position is +not configurable. +\fi + +The\textnote{Attention!} top and bottom fold marks do not serve to divide the +paper exactly into equal thirds. Instead, the paper should be folded with +their help such that the address field can be seen in a window envelope. The +settings are therefore different depending on the \File{lco} file chosen. +Several such files are available offering predefined formats. One format +particularly worth noting is \Option{DINmtext}. This format assumes an +envelope format of C6/5 (also known as ``C6 long''). Letters written with this +option are typically not suited for C5 or C4 envelopes. + +The middle fold mark is not normally required for Western letters. In Japan, +however, a larger number of envelope formats exists, requiring one more fold +mark (see the Japanese \File{lco} files). Note that the terms ``top'', +``middle'', and ``bottom'' fold marks only represent a naming convention. In +fact, it is not required that \PLength{tfoldmarkvpos} must be smaller than +\PLength{mfoldmarkvpos}, which in turn must be smaller than +\PLength{bfoldmarkvpos}. If, though, one of the pseudo-lengths is zero, then +the corresponding fold mark will not be set even if the +\DescRef{\LabelBase.option.foldmarks}\IndexOption{foldmarks~=\PName{setting}}% +\important{\DescRef{\LabelBase.option.foldmarks}} option (see +\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.foldmarks}) is +explicitly activated. +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{tfoldmarklength}% + \PLength{mfoldmarklength}% + \PLength{bfoldmarklength}% + \PLength{pfoldmarklength} +\end{Declaration} +These\ChangedAt{v2.97e}{\Class{scrlttr2}} four pseudo-lengths determine the +lengths of the four horizontal fold marks. One\textnote{Attention!} feature is +particularly worth noting. If the length is given as zero, then the three +vertically configurable pseudo-lengths \PLength{tfoldmarklength}, +\PLength{mfoldmarklength} and \PLength{bfoldmarklength} are set to 2\Unit{mm}. +The length of the hole-punch mark, \PLength{pfoldmarklength}, however, is set +to 4\Unit{mm}.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{foldmarkhpos} +\end{Declaration} +This pseudo-length gives the distance of all horizontal fold marks from the +left edge of the paper. Normally, this is 3.5\Unit{mm}. You\textnote{Hint!} +can change this value in your own \File{lco} file if you are using a printer +that has a wider unprintable left margin. Whether the fold marks are typeset +at all depends on the option \DescRef{\LabelBase.option.foldmarks}% +\important{\DescRef{\LabelBase.option.foldmarks}}% +\IndexOption{foldmarks~=\PName{setting}} (see +\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.foldmarks}). +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{lfoldmarkhpos} +\end{Declaration} +In\ChangedAt{v2.97e}{\Class{scrlttr2}} addition to the horizontal fold marks, +there is also a vertical fold mark. Its distance from the left margin is set +via the \PLength{lfoldmarkhpos} pseudo-length. This fold mark is used, for +example, in Japanese Chou- or You-format envelopes if you want to use them +with A4 paper. It can also be useful for envelopes in C6 format.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{lfoldmarklength} +\end{Declaration} +The\ChangedAt{v2.97e}{\Class{scrlttr2}} \PLength{lfoldmarklength} +pseudo-length determines the length of the vertical fold mark. Once again, a +feature worth noting is that if the length is given as zero, a length of +4\Unit{mm} is actually used.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{foldmarkvpos} +\end{Declaration} +This\ChangedAt{v2.97e}{\Class{scrlttr2}} pseudo-length determines the distance of +all vertical fold marks from the upper edge of the paper. Normally this is +3.5\Unit{mm}, but\textnote{Hint!} you can change the value in your own +\File{lco} file in case your printer has a wider unprintable +top margin. Whether or not the foldmarks are actually typeset depends on the +\DescRef{\LabelBase.option.foldmarks}% +\important{\DescRef{\LabelBase.option.foldmarks}}% +\IndexOption{foldmarks~=\PName{setting}} option (see +\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.foldmarks}). +\iffree{At present there is only one vertical fold mark, called the left + vertical fold mark.}{}% +\EndIndexGroup + + +\begin{Declaration} + \PLength{foldmarkthickness} +\end{Declaration} +This\ChangedAt{v2.97c}{\Class{scrlttr2}} pseudo-length determines the +thickness of all fold marks. The default is 0.2\Unit{pt}, in other words a +very thin hairline. In\textnote{Hint!} particular, if the colour of the fold +marks is changed, this may not be enough.% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Letterhead} +\seclabel{firstHead} +\BeginIndexGroup +\BeginIndex{}{letterhead}% + +The term letterhead refers here to all of the information concerning the +sender that appears above the recipient's address. Normally you would expect +that this information would be set through the page-style settings. In fact, +this was the case with the old letter class, \Class{scrlettr}. +But\textnote{Attention!} \Class{scrlttr2} and \Package{scrletter} output the +letterhead independently of the page style by means of the +\DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} command. +% Fuellmaterial +\iftrue% + The letterhead is positioned absolutely, so that it is independent of the + type area. In fact, the first page of a letter, the page that holds the + letterhead, is set using the page style + \DescRef{\LabelBase.pagestyle.empty}\IndexPagestyle{empty}.% +\fi +% Ende des Fuellmaterials + + +\begin{Declaration} + \OptionVName{firsthead}{simple switch} +\end{Declaration} +\BeginIndex{}{letterhead}% +\BeginIndex{}{letter>header}% +The\ChangedAt{v2.97e}{\Class{scrlttr2}} letterhead is usually the topmost +element of the letterhead page. With the \Option{firsthead} option, you can +choose whether the letterhead will be typeset at all. The option accepts the +standard values for simple switches given in \autoref{tab:truefalseswitch} on +\autopageref{tab:truefalseswitch}. The default is to typeset the letterhead.% +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{firstheadvpos} +\end{Declaration} +The \PLength{firstheadvpos} pseudo-length gives the distance between the top +edge of the paper and the start of the letterhead. This value is set +differently in the various predefined +\File{lco} files\textnote{\File{lco} file}\Index{lco file=\File{lco} file}. A +typical value is 8\Unit{mm}.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{firstheadhpos} +\end{Declaration} +A positive value of the +\PLength{firstheadhpos}\ChangedAt{v3.05}{\Class{scrlttr2}} pseudo-length gives +the distance between the left edge of the paper and the start of the +letterhead. If\textnote{Attention!} the value is actually greater than or +equal to the paper width, +\Length{paperwidth}\important{\Length{paperwidth}}\IndexLength{paperwidth}, +the letterhead will be centred horizontally on the letterhead paper. A +negative value gives the distance between the right edge of the paper and the +right edge of the letterhead. If the value actually less than or equal to the +negative value of the width of the paper, the letterhead is placed flush with +the left edge of the type area. + +The default\textnote{Attention!} value is typically +\Length{maxdimen}\IndexLength{maxdimen}, which is the maximum allowed value of +a length. This results in horizontal centring.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{firstheadwidth} +\end{Declaration} +The \PLength{firstheadwidth} pseudo-length gives the width of the letterhead. +This value is set differently in the various predefined \File{lco} +files\textnote{\File{lco} file}\Index{lco file=\File{lco} file}. While this +value usually depends on the paper width and the distance between the left +edge of the paper and the recipient's address field, it was the width of the +type area in \Option{KOMAold} and has a fixed value of 170\Unit{mm} in +\Option{NF}.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{fromalign}{method} +\end{Declaration} +\BeginIndex{}{letterhead}% +\BeginIndex{}{letter>head}% +The\important{\Option{fromalign}} \Option{fromalign} option determines where +the sender information should be placed on the first page. In addition to the +various placement options in the letterhead, you also have the +ability\ChangedAt{v2.97e}{\Class{scrlttr2}} to accommodate extra sender +information\Index{extra sender information}. At the same +time\textnote{Attention!}, this option serves as a central switch to activate +or deactivate letterhead extensions. If these extensions are deactivated, some +other options will have no effect. This will be noted in the explanations of +the respective options. Available values for \Option{fromalign} are shown in +\autoref{tab:\LabelBase.fromalign}. The default value is \PValue{left}.% +% +\begin{table} + \caption[{Available values for the \Option{fromalign} option with + \Class{scrlttr2}}]{Available values for the \Option{fromalign} option to + define the position of the from address in the letterhead with + \Class{scrlttr2}} + \label{tab:\LabelBase.fromalign} + \begin{desctabular} + \entry{\PValue{center}, \PValue{centered}, \PValue{middle}}{% + Sender information is centred inside the letterhead; a logo is + placed at the beginning of the extra sender information, if + applicable; letterhead extensions are activated.}% + \entry{\PValue{false}, \PValue{no}, \PValue{off}}{% + The default design will be used for the sender information; the + letterhead extensions are deactivated.}% + \entry{\PValue{left}}{% + Sender information is left-aligned in the letterhead; a logo is + placed right-aligned, if applicable; letterhead extensions are + activated.}% + \entry{\PValue{locationleft}, \PValue{leftlocation}}{% + Sender information is left-justified and uses the extra sender + information; a logo is placed at the top of it, if applicable; the + letterhead is automatically deactivated but can be reactivated using the + \DescRef{\LabelBase.option.firsthead} option.}% + \entry{\PValue{locationright}, \PValue{rightlocation}, + \PValue{location}}{% + Sender information is right-justified and uses the extra sender + information; a logo is placed at the top of it, if applicable; the + letterhead is automatically deactivated but can be reactivated using the + \DescRef{\LabelBase.option.firsthead} option.}% + \entry{\PValue{right}}{% + Sender information is right-justified; a logo is placed left-justified, + if applicable; letterhead extensions are activated}% + \end{desctabular} +\end{table} +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{fromrule}{position}% + \Variable{fromname}% + \Variable{fromaddress}% +\end{Declaration} +\BeginIndex{}{letterhead}% +\BeginIndex{}{letter>head}% +The\important{\Variable{fromname}} sender's name is determined by the +\Variable{fromname} variable. Its \PName{description} (see also +\autoref{tab:\LabelBase.fromTerm}, \autopageref{tab:\LabelBase.fromTerm}) is +not used in the default letterheads. + +In\important{\OptionValue{fromrule}{aftername}} the extended letterhead, you +can create a horizontal rule below the sender's name with +\OptionValue{fromrule}{aftername}. +Alternatively\important{\OptionValue{fromrule}{afteraddress}} you can place +this rule below the complete sender information with +\OptionValue{fromrule}{afteraddress}. A summary of all available settings for +the rule position is shown in \autoref{tab:\LabelBase.fromrule}. The length of +this rule is determined by the +\PLength{fromrulewidth}\IndexPLength[indexmain]{fromrulewidth} pseudo-length. + +\begin{table} + \caption[{Available values for the \Option{fromrule} option with + \Class{scrlttr2}}]{Available values for the \Option{fromrule} option for the + position of the rule in the sender information with + \Class{scrlttr2}} + \label{tab:\LabelBase.fromrule} + \begin{desctabular} + \entry{\PValue{afteraddress}, \PValue{below}, \PValue{on}, \PValue{true}, + \PValue{yes}}{% + rule below the sender's address}% + \entry{\PValue{aftername}}{% + rule directly below the sender's name}% + \entry{\PValue{false}, \PValue{no}, \PValue{off}}{% + no rule}% + \end{desctabular} +\end{table} + +The default\textnote{default} for the rule with the extended letterhead is +\PValue{false}. But in the standard letterhead, the rule will always be placed +below the sender's name. + +The\important{\Variable{fromaddress}} sender's address follows below the name. +The \PName{content} of variable \Variable{fromaddress} determines this +address. The address \PName{description} (see also +\autoref{tab:\LabelBase.fromTerm}) is not used in the default letterheads + +\BeginIndexGroup +\BeginIndex{FontElement}{fromaddress}\LabelFontElement{fromaddress}% +\BeginIndex{FontElement}{fromname}\LabelFontElement{fromname}% +\BeginIndex{FontElement}{fromrule}\LabelFontElement{fromrule}% +You can set the font used for the complete sender information with the +\FontElement{fromaddress}\IndexFontElement{fromaddress}% +\important{\FontElement{fromaddress}} element. You can define modifications to +this with the \FontElement{fromname}\IndexFontElement{fromname}% +\important{\FontElement{fromname}} element for the sender's name, and with the +\FontElement{fromrule}\IndexFontElement{fromrule}% +\important{\FontElement{fromrule}} element for the rule created with the +\Option{fromrule} option. The default setting does not change the font. For +the rule, font switching is mainly intended to change the colour of the rule, +for example to use grey instead of black. See \cite{package:xcolor} for +information about colours.% +% +\EndIndexGroup + +\begin{Example} + Now let's give the sender of our sample letter a name: + \lstinputcode[xleftmargin=1em]{letter-example-08-en.tex} + \begin{figure} + \centering + \frame{\includegraphics[width=.4\textwidth]{letter-example-08-en}}\quad + \frame{\includegraphics[width=.4\textwidth]{letter-example-09-en}} + \caption[{Example: letter with sender, recipient, opening, text, closing, + postscript, distribution list, and enclosure}] + {result of a short letter with sender, recipient, opening, text, closing, + postscript, distribution list, and enclosure (the date is set by + default): on the left, the standard letterhead using + \OptionValueRef{\LabelBase}{fromalign}{false}; on the right, the + extended letterhead using \OptionValueRef{\LabelBase}{fromalign}{center}} + \label{fig:\LabelBase.letter-08-09} + \end{figure} + Initially, the standard rather than the extended letterhead is used. The + result can be seen in \autoref{fig:\LabelBase.letter-08-09} on the left. For + comparison, the same example is shown on the right with + \OptionValueRef{\LabelBase}{fromalign}{center} (that is, with the extended + letterhead). You can see that this variation initially has no rule. + + For the first time, \autoref{fig:\LabelBase.letter-08-09} also shows a + signature below the closing phrase. This is generated automatically from the + sender's name. You can find more information about how to configure the + signature in \autoref{sec:\LabelBase.closing}, starting on + \autopageref{sec:\LabelBase.closing}. + + Next, the letter with the extended letterhead should use the + \Option{fromrule} option to print a rule below the sender's name:% + \lstinputcode[xleftmargin=1em]{letter-example-11-en.tex}% + You can see the result on the right in + \autoref{fig:\LabelBase.letter-10-11}. By comparison, the same example on + the left uses the standard letterhead, which ignores the additional options. + % + \begin{figure} + \centering + \frame{\includegraphics[width=.4\textwidth]{letter-example-10-en}}\quad + \frame{\includegraphics[width=.4\textwidth]{letter-example-11-en}} + \caption[{Example: letter with sender, rule, recipient, + opening, text, closing, signature, postscript, distribution list, + enclosure, and hole-punch mark}] + {result of a short letter with sender, rule, recipient, + opening, text, closing, signature, postscript, distribution list, + enclosure and hole-punch mark (the date is set by default): + at left one the standard letterhead using + \OptionValueRef{\LabelBase}{fromalign}{false}, at right one the extended letterhead + using \OptionValueRef{\LabelBase}{fromalign}{center}} + \label{fig:\LabelBase.letter-10-11} + \end{figure} +\end{Example} + +An\textnote{Attention!} important note concerns the sender's address: within +the sender's address, individual parts such as house number and street, city +and postal code, etc., are separated with a double backslash. This double +backslash is interpreted differently depending on how the sender's address is +used and therefore is not necessarily a line break. Paragraphs, vertical +spacing, and the like are usually not allowed within the sender's information. +You have to know \KOMAScript{} very well to put such things into the sender +information, if necessary. In addition, note that if you do so, you should +definitely set the variables for return address (see +\DescRef{\LabelBase.variable.backaddress}, +\DescPageRef{\LabelBase.variable.backaddress}) and signature (see +\DescRef{\LabelBase.variable.signature}, +\DescPageRef{\LabelBase.variable.signature}) yourself.% +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{fromrulethickness}% + \PLength{fromrulewidth} +\end{Declaration} +As mentioned in the explanation of the +\DescRef{\LabelBase.option.fromrule}\IndexOption{fromrule} option in +\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.fromrule}, you +can put a horizontal rule within or below the sender's address in the +predefined letterheads. If\textnote{Attention!} the \PLength{fromrulewidth} +pseudo-length has a value of 0\Unit{pt}, which is the default in the +predefined \File{lco} files, the length of this rule is calculated +automatically taking into account, for example, letterhead width or an +optional logo. You can adjust rule length manually in your own \File{lco} +files by setting this pseudo-length to positive values using +\Macro{setplength} (see \DescPageRef{\LabelBase.cmd.setplength}). The +default thickness of the line\ChangedAt{v2.97c}{\Class{scrlttr2}}, +\PLength{fromrulethickness}, is 0.4\Unit{pt}.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{symbolicnames}{value}% + \OptionVName{fromphone}{simple switch}% + \OptionVName{frommobilephone}{simple switch}% + \OptionVName{fromfax}{simple switch}% + \OptionVName{fromemail}{simple switch}% + \OptionVName{fromurl}{simple switch}% + \Variable{fromphone}% + \Variable{frommobilephone}% + \Variable{fromfax}% + \Variable{fromemail}% + \Variable{fromurl}% + \Variable{phoneseparator}% + \Variable{mobilephoneseparator}% + \Variable{faxseparator}% + \Variable{emailseparator}% + \Variable{urlseparator}% +\end{Declaration} +\BeginIndex{}{letterhead}% +\BeginIndex{}{letter>header}% +You can use the five options \Option{fromphone}, +\Option{frommobilephone}\ChangedAt{v3.12}{\Class{scrlttr2}}, \Option{fromfax}, +\Option{fromemail}, and \Option{fromurl} to specify whether to include the +phone number\Index{telephone}\Index{phone}, +mobile\ChangedAt{v3.12}{\Class{scrlttr2}} phone number\Index{mobile + phone}\Index{cell phone}\Index{cellphone}, fax number\Index{fax}, e-mail +address\Index{e-mail}, or URL should be as part of the sender's +information. You can assign any standard value for simple switches from +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} to these +options. The default for all of them is \PValue{false}. The \PName{contents} +themselves are determined by the variables of the same name. You can find the +defaults for the \PName{description} or title of each variable in +\autoref{tab:\LabelBase.fromTerm}. You can find the separators that will be +inserted between the \PName{description} and the \PName{content} in +\autoref{tab:\LabelBase.fromSeparator}. + +You can\ChangedAt{v3.12}{\Class{scrlttr2}}\important{\Option{symbolicnames}} +change the defaults for describing the variables all at once with the +\Option{symbolicnames} option. This option understands the values for simple +switches found in \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch}. +Activating\ChangedAt{v3.27}{\Class{scrlttr2}\and \Package{scrletter}} the +option corresponds to \PName{value} \PValue{marvosym} and replaces the +descriptions from the language-dependent labels of +\DescRef{scrlttr2-experts.cmd.emailname}, +\DescRef{scrlttr2-experts.cmd.faxname}, +\DescRef{scrlttr2-experts.cmd.mobilephonename}, and +\DescRef{scrlttr2-experts.cmd.phonename} with symbols from the +\Package{marvosym}\IndexPackage{marvosym} package. At the same time, the colon +is omitted when defining the separators. In this case, both the description +and the content of the URL separator will be empty. With +\OptionValue{symbolicnames}{fontawesome} or +\OptionValue{symbolicnames}{awesome}, symbols of package +\Package{fontawesome}\IndexPackage{fontawesome} are used. In this case there +is also a symbol for the URL. Note\textnote{Attention!} that you may need to +load the \Package{marvosym} or \Package{fontawesome} package in your document +preamble if you activate the option for the corresponding package for the +first time after \Macro{begin}\PParameter{document}. + +\begin{table} + \centering + \caption[{Default descriptions of the letterhead variables}]{Default + descriptions of the letterhead variables (you can find the description and + contents of the separator variables in + \autoref{tab:\LabelBase.fromSeparator}} + \begin{desctabular}[1.8em] + \ventry{fromemail}{\DescRef{\LabelBase.cmd.usekomavar*}\PParameter{emailseparator}% + \DescRef{\LabelBase.cmd.usekomavar}\PParameter{emailseparator}}% + \ventry{fromfax}{\DescRef{\LabelBase.cmd.usekomavar*}\PParameter{faxseparator}% + \DescRef{\LabelBase.cmd.usekomavar}\PParameter{faxseparator}}% + \ventry{frommobilephone}{% + \ChangedAt{v3.12}{\Class{scrlttr2}}% + \DescRef{\LabelBase.cmd.usekomavar*}\PParameter{mobilephoneseparator}% + \DescRef{\LabelBase.cmd.usekomavar}\PParameter{mobilephoneseparator}}% + \ventry{fromname}{\DescRef{scrlttr2-experts.cmd.headfromname}}% + \ventry{fromphone}{\DescRef{\LabelBase.cmd.usekomavar*}\PParameter{phoneseparator}% + \DescRef{\LabelBase.cmd.usekomavar}\PParameter{phoneseparator}}% + \ventry{fromurl}{\DescRef{\LabelBase.cmd.usekomavar*}\PParameter{urlseparator}% + \DescRef{\LabelBase.cmd.usekomavar}\PParameter{urlseparator}}% + \end{desctabular} + \label{tab:\LabelBase.fromTerm} +\end{table} + +\begin{table}[tp] + \centering +% \KOMAoptions{captions=topbeside}% +% \setcapindent{0pt}% + \caption{Default descriptions and contents of the letterhead + separators without the \Option{symbolicnames} option} +% [l] + \begin{tabular}[t]{lll} + \toprule + variable name & description & content \\ + \midrule + \Variable{emailseparator} & \DescRef{scrlttr2-experts.cmd.emailname} & \texttt{:\~} \\ + \Variable{faxseparator} & \DescRef{scrlttr2-experts.cmd.faxname} & \texttt{:\~} \\ + \Variable{mobilephoneseparator} & \DescRef{scrlttr2-experts.cmd.mobilephonename} & \Macro{usekomavaer}\PParameter{phoneseparator} \\ + \Variable{phoneseparator} & \DescRef{scrlttr2-experts.cmd.phonename} & \texttt{:\~} \\ + \Variable{urlseparator} & \DescRef{scrlttr2-experts.cmd.wwwname} & \texttt{:\~} \\ + \bottomrule + \end{tabular} +% \end{captionbeside} + \label{tab:\LabelBase.fromSeparator} +\end{table} + +\begin{Example} + Mr Public from our sample letter has a telephone and an e-mail address. He + also wants to show these in the letterhead. At the same time, the separation + rule should now be placed after the letterhead. So he uses the appropriate + options and also sets the required variables:% + \lstinputcode[xleftmargin=1em]{letter-example-12-en.tex}% + The results on the left side of \autoref{fig:\LabelBase.letter-12-13}, + however, are confounding: the options are ignored. That's because the + additional variables and options are only used in the extended letterhead. + So the \DescRef{\LabelBase.option.fromalign} option must be used, as it is + in the right side of + \autoref{fig:\LabelBase.letter-12-13}. + \begin{figure} + \centering + \frame{\includegraphics[width=.4\textwidth]{letter-example-12-en}}\quad + \frame{\includegraphics[width=.4\textwidth]{letter-example-13-en}} + \caption[{Example: letter with extra sender information, rule, + recipient, opening, text, closing, signature, postscript, distribution + list, enclosure, and hole-punch mark; standard vs. extended letterhead}] + {result of a short letter with sender, rule, recipient, opening, text, + closing, signature, postscript, distribution list, enclosure and + hole-punch mark (the date is set by default): the left one uses the + standard letterhead with + \OptionValueRef{\LabelBase}{fromalign}{false}; the right one uses the + extended letterhead with \OptionValueRef{\LabelBase}{fromalign}{center}} + \label{fig:\LabelBase.letter-12-13} + \end{figure} + \lstinputcode[xleftmargin=1em]{letter-example-13-en.tex} + + You can compare two other alternatives with left-aligned sender information using + \OptionValueRef{\LabelBase}{fromalign}{left} and right-aligned sender information + using \OptionValueRef{\LabelBase}{fromalign}{right} in + \autoref{fig:\LabelBase.letter-14-15}. + \begin{figure} + \centering + \frame{\includegraphics[width=.4\textwidth]{letter-example-14-en}}\quad + \frame{\includegraphics[width=.4\textwidth]{letter-example-15-en}} + \caption[{Example: letter with extra sender information, rule, + recipient, opening, text, closing, signature, postscript, distribution + list, enclosure, and hole-punch mark; left- vs. right-aligned + letterhead}] + {result of a short letter with extra sender information, rule, + recipient, opening, text, closing, signature, postscript, distribution + list, enclosure and hole-punch mark (the date is set by default): + the left one uses a left-aligned letterhead with + \OptionValueRef{\LabelBase}{fromalign}{left}; the right one uses a + right-aligned letterhead using + \OptionValueRef{\LabelBase}{fromalign}{right}} + \label{fig:\LabelBase.letter-14-15} + \end{figure} +\end{Example} +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{fromlogo}{simple switch}% + \Variable{fromlogo}% +\end{Declaration} +\BeginIndex{}{letterhead}% +\BeginIndex{}{letter>head}% +You can use the \Option{fromlogo} to configure whether to put a +logo\Index{Logo} in the letterhead. You can use any of the default values from +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} for the +\PName{simple switch}. The default is \PValue{false}, which means no logo. The +logo itself is defined by the \PName{content} of the \Variable{fromlogo} +variable. The \PName{description} of the logo is empty by default and +\KOMAScript{} does not use it in the default letterhead pages.% +\begin{Example} + Mr Public finds it particularly stylish when he provides his letterhead with + a logo. He has saved his logo as a graphics file, which he would like to + load using \Macro{includegraphics}. To do this, he loads the + \Package{graphics}\IndexPackage{graphics} package (see + \cite{package:graphics}).% + \lstinputcode[xleftmargin=1em]{letter-example-16-en.tex}% + You can see the result in the top left of + \autoref{fig:\LabelBase.letter-16-18}. The other two images in this figure + show the results with right-aligned and centred sender information. + \begin{figure} + \setcapindent{0pt}% + {\hfill + \frame{\includegraphics[width=.4\textwidth]{letter-example-16-en}}\quad + \frame{\includegraphics[width=.4\textwidth]{letter-example-17-en}}\par\bigskip} + \begin{captionbeside}[{Example: letter with extra sender information, + logo, rule, recipient, opening, text, closing, signature, postscript, + distribution list, enclosure, and hole-punch mark; left-aligned vs. + right-aligned vs. centred sender information}] + {result of a short letter with extra sender information, logo, rule, + recipient, opening, text, closing, signature, postscript, distribution + list, enclosure and hole-punch mark (the date is set by default): + at top left the sender is left-aligned, at top right the sender is + centred, and at bottom right the sender is right-aligned + sender}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-18-en}}\quad + \end{captionbeside} + \label{fig:\LabelBase.letter-16-18} + \end{figure} +\end{Example}% +% +\EndIndexGroup + + +\begin{Declaration} + \Variable{firsthead}% +\end{Declaration} +In many cases, the capabilities that \Class{scrlttr2} offers with the +foregoing options and variables will be sufficient to design a letterhead. In +some cases, however, you may want even more flexibility. In those situations, +you will have to do without the possibilities offered by the predefined +letterhead, which you can select via the options described above. Instead, you +must create your own letterhead from scratch. To do so, you must specify the +desired structure as the \PName{contents} of the \Variable{firsthead} +variable. For example, you can set several boxes side by side or one beneath +the other using the \Macro{parbox} command (see \cite{latex:usrguide}). +Experienced users should thus be able to create their own a letterheads. Of +course you can and should use other variables with +\DescRef{\LabelBase.cmd.usekomavar}. \KOMAScript{} does not use the +\PName{description} of variable \Variable{firsthead}. \iffree{}{You can find + a detailed example of a letterhead definition in + \autoref{cha:modernletters}.}% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Addressee} +\seclabel{addressee}% +\BeginIndexGroup +\BeginIndex{}{addressee} +\index{recipient|seealso{addressee}} + +The term \emph{addressee} normally refers only to the recipient's name and +address, which are output in an address field. Additional information, +however, can be placed within this address field, including the delivery +method, for example registered mail or special delivery. For window envelopes, +the return address also counts as part of the address field, as it will be +displayed in the address window. The address field directly follows the +letterhead. + +\begin{Declaration} + \OptionVName{addrfield}{format}% + \OptionVName{backaddress}{value}% + \OptionVName{priority}{priority}% + \Variable{toname}% + \Variable{toaddress}% + \Variable{backaddress}% + \Variable{backaddressseparator}% + \Variable{specialmail}% + \Variable{fromzipcode}% + \Variable{zipcodeseparator}% + \Variable{place}% + \Variable{PPcode}% + \Variable{PPdatamatrix}% + \Variable{addresseeimage}% +\end{Declaration}% +\BeginIndex{}{address}% +The \Option{addrfield} option determines whether or not to print an address +field. The default\textnote{default} is to include an address field. The +option recognizes the formats described in +\autoref{tab:\LabelBase.addrfield}\ChangedAt{v3.03}{\Class{scrlttr2}}. With +the values \PValue{true}, +\PValue{topaligned}\ChangedAt{v3.17}{\Class{scrlttr2}\and +\Package{scrletter}}, \PValue{PP}, and \PValue{backgroundimage}, the name and +address of the recipient are determined by the mandatory argument of the +\DescRef{\LabelBase.env.letter} environment (see +\autoref{sec:\LabelBase.document}, \DescPageRef{\LabelBase.env.letter}). This +information is also copied into the variables \Variable{toname} and +\Variable{toaddress}. + +\BeginIndexGroup +\BeginIndex{FontElement}{addressee}\LabelFontElement{addressee}% +\BeginIndex{FontElement}{toname}\LabelFontElement{toname}% +\BeginIndex{FontElement}{toaddress}\LabelFontElement{toaddress}% +You can change the default font styles\ChangedAt{v2.97c}{\Class{scrlttr2}} +with the \DescRef{\LabelBase.cmd.setkomafont} or +\DescRef{\LabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}). There are three elements. First, +the \FontElement{addressee}\important{\FontElement{addressee}} element is +responsible for the overall style of the recipient's name and address. The +elements \FontElement{toname}\important{\FontElement{toname}} and +\FontElement{toaddress}\important{\FontElement{toaddress}} are responsible +only for the name and the address of the recipient, respectively. You can use +\FontElement{toname} and \FontElement{toaddress} to define modifications from +the basic \FontElement{addressee} configuration.% +\EndIndexGroup +% +\begin{table} + \caption[{Available values for the \Option{addrfield} option with + \Class{scrlttr2}}]{Available values for the \Option{addrfield} option to + change the recipient format of \Class{scrlttr2}}% + \label{tab:\LabelBase.addrfield}% + \begin{desctabular} + \entry{\PValue{backgroundimage}, \PValue{PPbackgroundimage}, + \PValue{PPBackgroundImage}, \PValue{PPBackGroundImage}, + \PValue{ppbackgroundimage}, \PValue{ppBackgroundImage}, + \PValue{ppBackGroundImage}}{% + Prints an address with a background image stored in the + \Variable{addresseimage} variable as the postpaid postmark, but without + a return address or delivery type.}% + \entry{\PValue{false}, \PValue{off}, \PValue{no}}{% + Does not print an address.}% + \entry{\PValue{image}, \PValue{Image}, \PValue{PPimage}, \PValue{PPImage}, + \PValue{ppimage}, \PValue{ppImage}}{% + Prints an image stored in the \Variable{addresseeimage} variable as an + address with a postpaid postmark. Recipient information, return address, + and delivery type or priority are ignored.}% + \entry{\PValue{PP}, \PValue{pp}, \PValue{PPexplicite}, + \PValue{PPExplicite}, \PValue{ppexplicite}, \PValue{ppExplicite}}{% + Prints an address with a postage print impression (pospaid) header + filled in with the variables \Variable{fromzipcode}, \Variable{place}, + and \Variable{PPcode}, and when applicable with a priority and a data + array defined by \Variable{PPdatamatrix}, but without a return address + or delivery type.}% + \entry{\PValue{topaligned}, \PValue{alignedtop}% + \ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}}}{% + Prints an address including a return address and a delivery type + or priority. The address is not centred vertically beneath the delivery + type.}% + \entry{\PValue{true}, \PValue{on}, \PValue{yes}}{% + Prints an address field including a return address and delivery type + or priority.}% + \end{desctabular} +\end{table}% + +The default \OptionValue{addrfield}{true} also prints an underlined return +address in the address field. The \Option{backaddress} option defines if and +in what form a return address will be printed for window envelopes. On the one +hand, this option\important{\OptionValue{backaddress}{false}} accepts the +standard values for simple switches listed in \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch}. These values do not change style of the +return address. On the other hand, when\ChangedAt{v2.96}{\Class{scrlttr2}} the +return address is enabled, you can select its format at the same time. For +example, the \PValue{underlined} option value enables an underlined return +address, while \PValue{plain}\important{\OptionValue{backaddress}{plain}} +selects a style without underlining. The default is \PValue{underlined} and +thus prints an underlined return address. + +The return address itself is defined by the \PName{content} of the +\Variable{backaddress} variable. The default is the name specified in +\DescRef{\LabelBase.variable.fromname} and the address specified in +\DescRef{\LabelBase.variable.fromaddress}. The double backslash is also +replaced with the \PName{content} of the \Variable{backaddressseparator} +variable. The default separator is a comma followed by a non-breaking space. +\KOMAScript{} does not use the \PName{description} of the +\Variable{backaddress} variable. +\BeginIndexGroup\BeginIndex{FontElement}{backaddress}% +\LabelFontElement{backaddress}% +You can configure the font style of the return address via the +\FontElement{backaddress}\important{\FontElement{backaddress}} element. The +default is \Macro{sffamily} (see \autoref{tab:\LabelBase.AddresseeElements}). +Before applying the element's font style \KOMAScript{} switches to +\Macro{scriptsize}.% +\EndIndexGroup + +The default \OptionValue{addrfield}{true}, centres the address vertically +within the space available for the address. +In\ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}} contrast, +\OptionValue{addrfield}{topaligned}% +\important{\OptionValue{addrfield}{topaligned}} will not centre the address +but place it flush with the top of the available space.% + +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside}{% + Default font styles for the elements of the address field.% + }% + [l] + \begin{tabular}[t]{ll} + \toprule + element & font style \\ + \midrule + \DescRef{\LabelBase.fontelement.addressee}\IndexFontElement{addressee} & + \\ + \DescRef{\LabelBase.fontelement.backaddress}\IndexFontElement{backaddress} & + \Macro{sffamily}% + \\ + \DescRef{\LabelBase.fontelement.PPdata}\IndexFontElement{PPdata} & + \Macro{sffamily}% + \\ + \DescRef{\LabelBase.fontelement.PPlogo}\IndexFontElement{PPlogo} & + \Macro{sffamily}\Macro{bfseries}% + \\ + \DescRef{\LabelBase.fontelement.priority}\IndexFontElement{priority} & + \Macro{fontsize}\PParameter{10pt}\PParameter{10pt}% + \Macro{sffamily}\Macro{bfseries}% + \\ + \DescRef{\LabelBase.fontelement.prioritykey}\IndexFontElement{prioritykey} & + \Macro{fontsize}\PParameter{24.88pt}\PParameter{24.88pt}% + \Macro{selectfont}% + \\ + \DescRef{\LabelBase.fontelement.specialmail}\IndexFontElement{specialmail} & + \\ + \DescRef{\LabelBase.fontelement.toaddress}\IndexFontElement{toaddress} & + \\ + \DescRef{\LabelBase.fontelement.toname}\IndexFontElement{toname} & + \\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:\LabelBase.AddresseeElements}% +\end{table} + +\BeginIndexGroup +\BeginIndex{FontElement}{specialmail}\LabelFontElement{specialmail} +With the default \OptionValue{addrfield}{true} setting, you can output an +optional delivery type\Index{delivery type} between the return address and the +recipient address. This will be output only if the \Variable{specialmail} +variable has non-empty content and +\OptionValue{priority}{manual}\ChangedAt{v3.03}{\Class{scrlttr2}} has been +selected, which is the default. The \Class{scrlttr2} class itself does not use +the \PName{description} of the \Variable{specialmail} variable. The alignment +is defined by the \PLength{specialmailindent} and +\PLength{specialmailrightindent} pseudo-lengths (see +\DescPageRef{\LabelBase.plength.specialmailindent}). You can change the +default font style of the\ChangedAt{v2.97c}{\Class{scrlttr2}} +\FontElement{specialmail}\important{\FontElement{specialmail}} element, which +is listed in \autoref{tab:\LabelBase.AddresseeElements}, with the +\DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}).% +\EndIndexGroup + +\BeginIndexGroup +\BeginIndex{FontElement}{priority}\LabelFontElement{priority}% +\BeginIndex{FontElement}{prioritykey}\LabelFontElement{prioritykey}% +However\ChangedAt{v3.03}{\Class{scrlttr2}}\important{\normalcolor + \OptionValue{priority}{A}\\ + \normalcolor\OptionValue{priority}{B}}, selecting an international priority +with \OptionValue{priority}{A} or \OptionValue{priority}{B} (see +\autoref{tab:\LabelBase.priority}) together with +\OptionValue{addrfield}{true}, prints the priority as the delivery type. Using +it together with +\OptionValue{addrfield}{PP}\important{\OptionValue{addrfield}{PP}} prints the +priority at the corresponding position in the postpaid postmark (also known as +the postage print impression or \emph{port pay\'e}). The \FontElement{priority} +element defines the basic font style, and \FontElement{prioritykey} defines +the modification of the basic font style for the priority keys ``A'' or ``B''. +You can find the default font styles listed in +\autoref{tab:\LabelBase.AddresseeElements} and can change then using the +\DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}).% +\EndIndexGroup + +\begin{table} + \caption[{Available values for the \Option{priority} option in + \Class{scrlttr2}}]{Available values for the \Option{priority} option to + select the international priority in the address field of\Class{scrlttr2}} + \label{tab:\LabelBase.priority} + \begin{desctabular} + \entry{\PValue{false}, \PValue{off}, \PValue{no}, \PValue{manual}}{% + Priority will not be printed.}% + \entry{\PValue{B}, \PValue{b}, \PValue{economy}, \PValue{Economy}, + \PValue{ECONOMY}, \PValue{B-ECONOMY}, \PValue{B-Economy}, + \PValue{b-economy}}{% + Use international priority B-Economy. With + \OptionValue{addrfield}{true}, this is printed instead of the delivery + type.}% + \entry{\PValue{A}, \PValue{a}, \PValue{priority}, \PValue{Priority}, + \PValue{PRIORITY}, \PValue{A-PRIORITY}, \PValue{A-Priority}, + \PValue{a-priority}}{% + Use international priority A-Priority. With + \OptionValue{addrfield}{true}, this is printed instead of the delivery + type.}% + \end{desctabular} +\end{table} + +With\ChangedAt{v3.03}{\Class{scrlttr2}}\important{\OptionValue{addrfield}{PP}} +\OptionValue{addrfield}{PP}, the postal code in the \Variable{fromzipcode} +variable and the location from the \Variable{place} pariable will be output in +the postpaid postmark. The postal code (that is, the \PName{content} of +\Variable{fromzipcode}) is preceded by the \PName{description} of the +\Variable{fromzipcode} variable and the \PName{content} of +\Variable{zipcodeseparator}. The default for the \PName{description} depends +on the \File{lco} file used (see \autoref{sec:\LabelBase.lcoFile} starting on +\autopageref{sec:\LabelBase.lcoFile}). On the other hand, the default +\PName{content} of the \Variable{zipcodeseparator} variable is a thin space +followed by an en rule followed by another thin space +(\Macro{,}\texttt{-{}-}\Macro{,}). + +With\ChangedAt{v3.03}{\Class{scrlttr2}} +\OptionValue{addrfield}{PP}\important{\OptionValue{addrfield}{PP}}, a code is +placed in the postpaid postmark that uniquely identifies the sender. This is +stored in the \Variable{PPcode} variable. You can also print an additional +data array to the right of the address, which is stored in the +\Variable{PPdatamatrix} variable. + +\BeginIndexGroup +\BeginIndex{FontElement}{PPdata}\LabelFontElement{PPdata} +The ZIP code\ChangedAt{v3.03}{\Class{scrlttr2}} (postal code), place, and +sender code will be printed by default in an 8\Unit{pt} font. The the font +style of the \FontElement{PPdata}\important{\FontElement{PPdata}} is used to +do so. The default is listed in \autoref{tab:\LabelBase.AddresseeElements} and +can be changed with the \DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}).% +\EndIndexGroup + +\BeginIndexGroup +\BeginIndex{FontElement}{PPlogo}\LabelFontElement{PPlogo} For the postpaid +logo ``P.P.'', however, the font style of the +\FontElement{PPlogo}\important{\FontElement{PPlogo}} element is used. Its +default can also be found in \autoref{tab:\LabelBase.AddresseeElements}.% +\EndIndexGroup + +With\important{\OptionValue{addrfield}{backgroundimage}\\ + \OptionValue{addrfield}{image}} the two settings +\OptionValue{addrfield}{backgroundimage}\ChangedAt{v3.03}{\Class{scrlttr2}} +and \OptionValue{addrfield}{image}, an image is print inside the address +window. This image is stored in the \PName{content} of variable +\Variable{addresseeimage}. \KOMAScript{} does not use the \PName{description} +of this variable. Although only the image is printed with the +\OptionValue{addrfield}{image} option, the recipient's name and address from +the mandatory argument of the \DescRef{\LabelBase.env.letter} environment will +be printed with the \OptionValue{addrfield}{backgroundimage} option. + +The position of the postpaid postmark and that of the +postpaid address is defined by the \PLength{toaddrindent} pseudo-length (see +\DescPageRef{\LabelBase.plength.toaddrindent}) as well as +\PLength{PPheadwidth} and \PLength{PPheadheight} (see +\DescPageRef{\LabelBase.plength.PPheadheight}). The position of +the data array is defined by the \PLength{PPdatamatrixvskip} pseudo-length +(see \DescPageRef{\LabelBase.plength.PPdatamatrixvskip}). + +Note\textnote{Attention!} that \KOMAScript{} cannot print any external +graphics or pictures by itself. So if you want to put external picture files +into variables like \Variable{addresseeimage} or \Variable{PPdatamatrix}, you +must load an additional graphics package like +\Package{graphics}\IndexPackage{graphics} or +\Package{graphicx}\IndexPackage{graphicx} and use, for instance, the +\Macro{includegraphics} command in the \PName{content} of the variables.% +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{toaddrvpos}% + \PLength{toaddrhpos} +\end{Declaration} +These pseudo-lengths define the vertical and horizontal distance of the +address field from the top-left corner of the paper. Values are set +differently in the various predefined \File{lco} files\textnote{\File{lco} +file}\Index{lco file=\File{lco} file}, according to standard envelope window +measures. For \PLength{toaddrhpos}, one property worth noting is that with +negative values, the offset is the distance from the right edge of the address +field to the right edge of the paper. You will find this, for instance, in +\Option{SN} or \Option{NF}. The smallest value of \PLength{toaddrvpos} is +found with \Option{DINmtext}. With this setting, the letterhead can easily +protrude into the address window. Whether the address field is output or not +depends on the \Option{addrfield} option (see +\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.addrfield}).% +\EndIndexGroup + + +\begin{Declaration} + \PLength{toaddrheight} +\end{Declaration} +This pseudo-length defines the height of the address field, including the +delivery method. Whether the name and address of the recipient are vertically +centred in the address field, taking into account the presence or absence of +the delivery method, depends on the \DescRef{\LabelBase.option.addrfield} +option.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{toaddrwidth} +\end{Declaration} +This pseudo-length defines the width of the address field. The various +predefined \File{lco} files\textnote{\File{lco} files}\Index{lco +file=\File{lco} files} use different settings according to the different +standards for window envelopes. Typical values are between 70\Unit{mm} and +100\Unit{mm}. +\begin{Example} + Suppose your printer has very wide, non-printable left and right margins of 15\Unit{mm}. + This means that the letterhead, the additional sender information, and the address field cannot + be completely printed if you use the \Option{SN} option. You therefore + create a new \File{lco} file with the following content: +\begin{lstcode} + \ProvidesFile{SNmmarg.lco} + [2002/06/04 v0.1 my lco] + \LoadLetterOption{SN} + \addtoplength{toaddrwidth}{% + -\useplength{toaddrhpos}} + \setplength{toaddrhpos}{-15mm} + \addtoplength{toaddrwidth}{% + \useplength{toaddrhpos}} + \endinput +\end{lstcode} + Then, until you can obtain a printer with smaller page margins, you + simply use the option \Option{SNmmarg} instead of \Option{SN}.% +\end{Example}% +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{toaddrindent} +\end{Declaration} +Sometimes you do not want the address field to extend the full width of the +address window but to be indented a bit. You can set the amount of this +indentation with the \PLength{toaddrindent} pseudo-length. Typically, the +default value is 0\Unit{pt}. + +For\textnote{Attention!} the\ChangedAt{v3.03}{\Class{scrlttr2}} +\OptionValueRef{scrlttr2}{addrfield}{PP}\important{% + \OptionValueRef{scrlttr2}{addrfield}{PP}\\ + \OptionValueRef{scrlttr2}{addrfield}{image}\\ + \OptionValueRef{scrlttr2}{addrfield}{backgroundimage} +}\IndexOption{addrfield~=\textKValue{PP}}, +\OptionValueRef{scrlttr2}{addrfield}{image}% +\IndexOption{addrfield~=\textKValue{image}}, and +\OptionValueRef{scrlttr2}{addrfield}{backgroundimage}% +\IndexOption{addrfield~=\textKValue{backgroundimage}} settings (see +\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.addrfield}) a +value of 0\Unit{pt} will be replaced by a value of 8\Unit{mm}. If you really +do not want any indentation, you can use a value of 1\Unit{sp} to set a +negligibly small indentation. Furthermore, \PLength{toaddrindent} is also used +for the distance to the right edge of the address window with the these +\Option{addrfield} settings.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{backaddrheight} +\end{Declaration} +For window envelopes, the sender is often printed in a small font on one line +above the addressee. This sender information is called the return +address\textnote{return address}\Index{return address}, because it is visible +in the address window and will be used by the post office to return an +undeliverable letter to the sender. This return address, therefore, requires +only the information necessary for that purpose. + +The height reserved for the return address within the address window is given +by the \PLength{backaddrheight} pseudo-length. This value is typically +5\Unit{mm} in the predefined \File{lco} files\textnote{\File{lco} +file}\Index{}{lco file=\File{lco} file}. Whether to print the return address +at all depends on the \Option{addrfield} (see +\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.addrfield}) and +\DescRef{\LabelBase.option.backaddress} options (see +\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.backaddress}).% +\EndIndexGroup + + +\begin{Declaration} + \PLength{specialmailindent}% + \PLength{specialmailrightindent} +\end{Declaration} +You can print an optional delivery method between the return address and the +recipient's address. This field is printed only if the +\DescRef{\LabelBase.variable.specialmail} variable has non-empty contents. Its +alignment is determined by the \PLength{specialmailindent} and +\PLength{specialmailrightindent} pseudo-lengths, which specify the left and +right indentation, respectively. In the predefined \File{lco} +files\textnote{\File{lco} file}\Index{lco file=\File{lco} file}, +\PLength{specialmailindent} is set to rubber length \Macro{fill}, while +\PLength{specialmailrightindent} is set to 1\Unit{em}. Thus the delivery +method is set 1\Unit{em} from the address field's right margin.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{PPheadheight}% + \PLength{PPheadwidth} +\end{Declaration} +The \PLength{PPheadheight}\ChangedAt{v3.03}{\Class{scrlttr2}} pseudo-length +specifies the height reserved for the postpaid header at the start of the +address field for the two options +\OptionValueRef{scrlttr2}{addrfield}{PP}\important{% + \OptionValueRef{scrlttr2}{addrfield}{PP}\\ + \OptionValueRef{scrlttr2}{addrfield}{backgroundimage}}% +\IndexOption{addrfield~=\textKValue{PP}} and +\OptionValueRef{scrlttr2}{addrfield}{backgroundimage}% +\IndexOption{addrfield~=\textKValue{backgroundimage}}. The +\PLength{PPheadwidth} pseudo-length is used only with +\OptionValueRef{scrlttr2}{addrfield}{PP} (see +\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.addrfield}) and +gives the width of the left-hand field within the postpaid header, which +contains the postpaid logo, the postal code, and the location. The width of +the right-hand field containing the sender's code and the priority is the +remaining width. + +\KOMAScript{}\textnote{Attention!} automatically changes the default value of +0\Unit{mm} for the \PLength{PPheadheight} pseudo-length to 20.74\Unit{pt}, and +\PLength{PPheadwidth}'s default from 0\Unit{mm} to 42\Unit{mm}.% +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{PPdatamatrixvskip} +\end{Declaration} +This\ChangedAt{v3.03}{\Class{scrlttr2}} pseudo-length specifies the vertical +distance between the postpaid header and the data array used with +\OptionValueRef{scrlttr2}{addrfield}{PP}% +\important{\OptionValueRef{scrlttr2}{addrfield}{PP}}% +\IndexOption{addrfield~=\PValue{PP}} (see \autoref{sec:\LabelBase.firstpage}, +\DescPageRef{\LabelBase.option.addrfield}). \KOMAScript{}\textnote{Attention!} +automatically changes the default value of 0\Unit{mm} to 9\Unit{mm}. The data +matrix is flush right within the postpaid header.% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Extra Sender Information} +\seclabel{locationField} +\BeginIndexGroup +\BeginIndex{}{extra sender information} +\index{sender>extra information|see{extra sender information}} + +Often, especially with business letters, there is not enough space in the +letterhead and footer to accommodate all the information about the sender that +you want to include. For such additional information, you can use the space +next to the addressee. In this manual, this field is called the +\emph{extra sender information}. In earlier versions of this manual, it +was called the \emph{sender's extension} or the \emph{location field}. + + +\begin{Declaration} + \OptionVName{locfield}{setting} +\end{Declaration} +\BeginIndex{}{extra sender information}% +The content ot the field with extra sender attributes next to the address +field can be anything you want, for example a location, a bank-account number, +or other information. Depending\important{% + \OptionValueRef{\LabelBase}{fromalign}{locationleft}\\ + \OptionValueRef{\LabelBase}{fromalign}{center}\\ + \OptionValueRef{\LabelBase}{fromalign}{locationright}} on the +\DescRef{\LabelBase.option.fromalign} option, it will also be used for the +sender's logo. The width of this field can be specified in an \File{lco} file +(see \autoref{sec:\LabelBase.lcoFile}). If the width is set to zero there, the +\Option{locfield} option can toggle between two defaults for the field width. +This is the case for most of the \File{lco} files that come with +\KOMAScript{}. See also the explanation on the \PLength{locwidth} +pseudo-length in \autoref{sec:\LabelBase.locationField}, +\DescPageRef{\LabelBase.plength.locwidth}. Available values for this +option are shown in \autoref{tab:\LabelBase.locfield}. The default is +\PValue{narrow}.% +% +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside} + [{Available values for the \Option{locfield} option with + \Class{scrlttr2}}]{Available values for the \Option{locfield} option to + set the width of the field for extra sender information with + \Class{scrlttr2}% + \label{tab:\LabelBase.locfield}}% + [l] + \begin{minipage}[t]{.45\linewidth} + \begin{desctabular}[t] + \pventry{narrow}{narrow extra sender information field}% + \pventry{wide}{wide extra sender information field}% + \end{desctabular} + \end{minipage} + \end{captionbeside} +\end{table} + +\begin{Declaration} + \Variable{location}% +\end{Declaration} +The contents of the extra sender information field, unless it contains +the logo or the basic sender information itself, are specified by the +\Variable{location} variable. You can use formatting commands like +\Macro{raggedright} within this variable's \PName{content}. \KOMAScript{} does +not use the \PName{description} of this variable. + +\begin{Example} + Mr Public would like to provide some additional information about his + membership. Therefore he uses the \Variable{location} variable:% + \lstinputcode[xleftmargin=1em]{letter-example-19-en.tex}% + This will place the corresponding field beside the recipient's address, as + shown in \autoref{fig:\LabelBase.letter-19}. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Example: letter with extended sender, logo, + recipient, extra sender information, opening, text, closing, + signature, postscript, distribution list, enclosure, and hole-punch + mark}] + {result of a short letter with extended sender, logo, recipient, + extra sender information, opening, text, closing, signature, + postscript, distribution list, enclosure, and hole-punch mark (the + date is set by default)}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-19-en}} + \end{captionbeside} + \label{fig:\LabelBase.letter-19} + \end{figure} +\end{Example} +\EndIndexGroup +\EndIndexGroup + + +\begin{Declaration} + \PLength{locheight}% + \PLength{lochpos}% + \PLength{locvpos}% + \PLength{locwidth} +\end{Declaration} +The \PLength{locwidth} and +\PLength{locheight}\ChangedAt{v2.97d}{\Class{scrlttr2}} pseudo-lengths set the +width and height of the extra-sender-information field. The \PLength{lochpos} +and \PLength{locvpos} pseudo-lengths determine the distances from the +top-right edge of the paper. These values are typically set to 0\Unit{pt} in +the predefined \File{lco} files. These\textnote{Attention!} zero-length values +have a special meaning. They result in the actual values being set within +\DescRef{\LabelBase.cmd.opening} based on the paper width, the address-window +width, the address window's distance from the top-left edge of the paper, and +the \DescRef{\LabelBase.option.locfield} option (see +\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.locfield}). As +is the case for \PLength{toaddrhpos}, negative values of \PLength{lochpos} +also take on a special meaning. Instead of referring to the distance from the +right edge of the paper, \PLength{lochpos} then refers to the distance from +the left edge of the paper. The meaning is thus the opposite of that of +\PLength{toaddrhpos} (see \autoref{sec:\LabelBase.addressee}, +\DescPageRef{\LabelBase.plength.toaddrhpos}).% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Reference Line} +\seclabel{refLine}% +\BeginIndexGroup +\BeginIndex{}{reference line} +\index{business line|see{reference line}} + +The reference line can actually be longer than just one line. It is printed +only if at least one of variables for the reference line is not empty. Only +non-empty fields will be printed. To\textnote{Hint!} set a seemingly empty +field, you can provide content for the variable that appears empty, such as +\Macro{mbox}\Parameter{}. If the reference line is omitted, the description +and contents of the \DescRef{\LabelBase.variable.date} variable are printed in +its place. You can find information about adding variables to or removing them +from the reference line in \autoref{sec:scrlttr2-experts.variables}, +\DescPageRef{scrlttr2-experts.cmd.removereffields}. + + +\begin{Declaration} + \OptionVName{numericaldate}{simple switch} +\end{Declaration} +This option toggles between the standard, language-dependent +date\Index{date}\Index{reference line} presentation, and a short, numerical +one. \KOMAScript{} does not provide the standard date format. It should be +defined by a package such as \Package{ngerman}\IndexPackage{ngerman}, +\Package{babel}\IndexPackage{babel}, or +\Package{isodate}\IndexPackage{isodate}. +The\important{\OptionValue{numericaldate}{true}} short, numerical +representation, however, is produced by \Class{scrlttr2} itself. The option +recognizes the standard values for simple switches as listed in +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. The default +is \PValue{false}, which results in standard date format. + +\begin{Declaration} + \Variable{date}% +\end{Declaration} +The date in the selected format is stored as \PName{content} of the +\Variable{date} variable. Setting the +\DescRef{\LabelBase.option.numericaldate} option has no effect if this +variable is overridden. The date is usually output as part of the reference +line. If all other elements of the reference line are empty, a date line +consisting of the location and the date is printed instead. However in this +case, the settings of the \DescRef{\LabelBase.option.refline} option described +below also affect the date line. See the description of variable +\DescRef{\LabelBase.variable.place} on +\DescPageRef{\LabelBase.variable.placeseparator} for more information about +the location. +% +\EndIndexGroup +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{refline}{selection} +\end{Declaration} +\BeginIndex{}{reference line}% +\index{business line|see{reference line}}% +Business letters in particular often contain an area with information such as +an identification code\Index{identification code}, phone +extension\Index{phone>extension}, customer number\Index{customer number}, +invoice number\Index{invoice number}, or references to previous letters. This +guide calls this area the \emph{reference-field line}\textnote{reference-field + line}, or simply the \emph{reference line}. + +With \Class{scrlttr2} and \Package{scrletter}, the header, footer, address, +and extra sender information can extend left and right beyond the normal +type area. The +\OptionValue{refline}{wide}\important{\OptionValue{refline}{wide}} option +specifies that this should also apply to the reference-field line. Normally, +the reference-field line contains at least the date, but it can hold +additional data. Available values for this option are shown in +\autoref{tab:\LabelBase.refline}. The default is \PValue{narrow} and +\PValue{dateright}\ChangedAt{v3.09}{\Class{scrlttr2}}.% +% +\begin{table} + \caption[{Available values for the \Option{refline} option with + \Class{scrlttr2}}]{Available values for the \Option{refline} option to set + the width of the reference line with \Class{scrlttr2}} + \label{tab:\LabelBase.refline} + \begin{desctabular} + \pventry{dateleft}{\ChangedAt{v3.09}{\Class{scrlttr2}}% + The date is placed leftmost in the reference line.}% + \pventry{dateright}{\ChangedAt{v3.09}{\Class{scrlttr2}}% + The date is placed rightmost in the reference line.}% + \pventry{narrow}{The reference line is restricted to the type area.}% + \pventry{nodate}{\ChangedAt{v3.09}{\Class{scrlttr2}}% + The date is not placed automatically into the reference line.}% + \pventry{wide}{The width of the reference line depends on the positions of + the address and extra sender information.}% + \end{desctabular} +\end{table} + +\begin{Declaration} + \Variable{yourref}% + \Variable{yourmail}% + \Variable{myref}% + \Variable{customer}% + \Variable{invoice}% +\end{Declaration} +You can manage the typical contents of the reference-field line with five +variables: \Variable{yourref}, \Variable{yourmail}, \Variable{myref}, +\Variable{customer} and \Variable{invoice}. Their meanings are listed in +\autoref{tab:\LabelBase.variables} on \autopageref{tab:\LabelBase.variables}. +Each variable has also a predefined \PName{description}, shown in +\autoref{tab:\LabelBase.reflineTerm}. How to add more variables to the +reference-field line is explained in \autoref{sec:scrlttr2-experts.variables} +starting on \DescPageRef{scrlttr2-experts.cmd.newkomavar}.% +% +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside}[{Default descriptions of variables in the + reference line}]{Default descriptions of typical variables in the + reference line using language-dependent commands}% + [l] + \begin{tabular}[t]{lll} + \toprule + name & description & English default text\\ + \midrule + \Variable{yourref} & \DescRef{scrlttr2-experts.cmd.yourrefname} & Your reference \\ + \Variable{yourmail} & \DescRef{scrlttr2-experts.cmd.yourmailname} & Your letter from \\ + \Variable{myref} & \DescRef{scrlttr2-experts.cmd.myrefname} & Our reference \\ + \Variable{customer} & \DescRef{scrlttr2-experts.cmd.customername} & Customer No.: \\ + \Variable{invoice} & \DescRef{scrlttr2-experts.cmd.invoicename} & Invoice No.: \\ + \DescRef{\LabelBase.variable.date} & \DescRef{scrlttr2-experts.cmd.datename} & date \\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:\LabelBase.reflineTerm} +\end{table} + +\BeginIndexGroup +\BeginIndex{FontElement}{refname}\LabelFontElement{refname}% +\BeginIndex{FontElement}{refvalue}\LabelFontElement{refvalue}% +You\ChangedAt{v2.97c}{\Class{scrlttr2}} can change the font style and colour +of the \PName{description} and \PName{content} of the fields in the reference +line with the \FontElement{refname}% +\important[i]{\FontElement{refname}\\\FontElement{refvalue}} and +\FontElement{refvalue} elements using the \DescRef{\LabelBase.cmd.setkomafont} +and \DescRef{\LabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}). The defaults for both elements are +listed in \autoref{tab:\LabelBase.refnamerefvalue}.% +\begin{table}[tp] +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside} + [{Default font styles for elements in the reference line}]{Default font + style settings for the elements in the reference line% + \label{tab:\LabelBase.refnamerefvalue}} + [l] + \begin{tabular}[t]{ll} + \toprule + element & default configuration \\ + \midrule + \DescRef{\LabelBase.fontelement.refname} & \Macro{sffamily}\Macro{scriptsize} \\ + \DescRef{\LabelBase.fontelement.refvalue} & \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table}% +% +\EndIndexGroup + + +\begin{Declaration} + \Variable{placeseparator}% +\end{Declaration}% +\BeginIndex{Variable}{place}% +If all variables in the reference-field line, with the exception of +\DescRef{\LabelBase.variable.date}% +\important{\DescRef{\LabelBase.variable.date}}\IndexVariable{date}, are empty, +no actual reference line is output. Instead, a date line consisting only of a +location\Index{location} and a date\Index{date} is output. The \PName{content} +of the \DescRef{\LabelBase.variable.place} variable contains the location. The +delimiter, which in this case is placed after the location, is specified by +the \PName{content} of the \Variable{placeseparator} variable. The +default\textnote{default} \PName{content} of the delimiter is a comma followed +by a non-breaking space. If the location is empty, the delimiter is not +output. The default \PName{content} of \DescRef{\LabelBase.variable.date} is +\Macro{today}\IndexCmd{today} and depends on the setting of the +\DescRef{\LabelBase.option.numericaldate} option (see +\DescPageRef{\LabelBase.option.numericaldate}). + +Starting with version~3.09\ChangedAt{v3.09}{\Class{scrlttr2}}, the location +and date are no longer required to be right-aligned. Instead, when a date +line is used, its alignment is specified by the date setting of the +\DescRef{\LabelBase.option.refline} option, as listed in +\autoref{tab:\LabelBase.refline}. + +\BeginIndexGroup +\BeginIndex{FontElement}{placeanddate}\LabelFontElement{placeanddate}% +If\ChangedAt{v3.12}{\Class{scrlttr2}} such a date line is output with a +location rather than a reference-field line, the font setting of the +\DescRef{\LabelBase.fontelement.refvalue} element does not apply. In this +case, the \FontElement{placeanddate}\important{\FontElement{placeanddate}} +element is used. You can change the empty default of this font element as +usual with the \DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}).% +\EndIndexGroup + +\begin{Example} + Now Mr Public also sets the variable for the location:% + \lstinputcode[xleftmargin=1em]{letter-example-20-en.tex}% + As seen in \autoref{fig:\LabelBase.letter-20}, the location appears + in front of the date, followed by the automatic delimiter. This date has + been defined explicitly so that the original date is maintained in any later + \LaTeX{} run rather than using the date of the \LaTeX{} run. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Example: letter with extended sender, logo, + recipient, extra sender information, location, date, opening, + text, closing, signature, postscript, distribution list, enclosure, + and hole-punch mark}] + {result of a short letter with extended sender, logo, recipient, + extra sender information, location, date, opening, text, closing, + signature, postscript, distribution list, enclosure and hole-punch + mark}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-20-en}} + \end{captionbeside} + \label{fig:\LabelBase.letter-20} + \end{figure} +\end{Example} +% +\EndIndexGroup +\EndIndexGroup +\EndIndexGroup + + +\begin{Declaration} + \PLength{refvpos} +\end{Declaration} +This pseudo-length specifies the distance from the upper edge of the paper to +the reference line. Its value is set differently in the various predefined +\File{lco} files\textnote{\File{lco} file}\Index{lco file=\File{lco} file}. +Typical values are between 80.5\Unit{mm} and 98.5\Unit{mm}.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{refwidth}% + \PLength{refhpos} +\end{Declaration} +The \PLength{refwidth} pseudo-length specifies the width available for the +reference line. Its value is typically set to 0\Unit{pt} in the predefined +\File{lco} files\textnote{\File{lco} file}\Index{lco file=\File{lco} file}. +This\textnote{Attention!} value has a special meaning. In no way does it +indicate that there is no available width for the reference line. Instead, it +indicates that the width will be calculated within the +\DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} command. This calculated +width then depends on the value of the \DescRef{\LabelBase.option.refline}% +\important{\DescRef{\LabelBase.option.refline}}% +\IndexOption{refline~=\PName{setting}} options (see +\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.refline}). At +the same time, \PLength{refhpos} will also be set according to this option. +With \OptionValueRef{scrlttr2}{refline}{wide}% +\IndexOption{refline~=\textKValue{wide}}, the reference fields line is +centred, while with \OptionValueRef{scrlttr2}{refline}{narrow}% +\IndexOption{refline~=\textKValue{narrow}} it is aligned flush left with the +type area. + +If \PLength{refwidth} is not zero, the width of the reference line is not +determined by the \DescRef{\LabelBase.option.refline} option, and so +\PLength{refhpos} specifies the distance of the reference line from the left +edge of the paper. If\textnote{Attention!} this distance is zero, the the +reference line is placed so that the ratio between its distances from the left +and right edges of the paper corresponds to the ratio of distance of the type +area from the left and right edges of the paper. Thus, for a type area +horizontally centred on the paper, the reference line will also be centred. + +As a rule, these special cases are likely of little interest to the normal +user. The\textnote{Attention!} simplest rule is as follows: either +\PLength{refhpos} remains zero, and so the width and alignment of the +reference line are determined with the \DescRef{\LabelBase.option.refline} +option, or the user sets both \PLength{refwidth} and \PLength{refhpos}.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{refaftervskip} +\end{Declaration} +This pseudo-length specifies the vertical skip to be inserted beneath the +reference line. The value is set in the predefined \File{lco} +files\textnote{\File{lco} file}\Index{lco file=\File{lco} file}. It directly +affects the height of the text area on the first page. A typical value is +between one and two lines.% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Subject} +\seclabel{subject}% +\BeginIndexGroup +\BeginIndex{}{subject} + +Different countries have different conventions for placing the subject line of +a letter. Some place it before the opening phrase; others place it after. Some +professional groups even want it before the reference line. + + +\begin{Declaration} + \Variable{title}% +\end{Declaration} +With \KOMAScript{}, you can also give a letter a title\Index{title}. The title +is centred, using the \Macro{LARGE} font size, and placed directly beneath the +reference-field line. + +\BeginIndex{FontElement}{lettertitle}\LabelFontElement{lettertitle}% +\BeginIndex{FontElement}{title}\LabelFontElement{title}% +You can change the font style for the +\FontElement{lettertitle}\important{\FontElement{lettertitle}} element with +the \DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}). Font size declarations are +allowed. The \Macro{LARGE} font size always precedes the font selection in +\KOMAScript{}, and is therefore not part of the default setting +\Macro{normalcolor}\Macro{sffamily}\Macro{bfseries}. With \Class{scrlttr2}, +you can also use \FontElement{title}\important{\FontElement{title}} as an +alias for \FontElement{lettertitle}. This is not possible when using +\Package{scrletter} with a \KOMAScript{} class because these classes already +define a \FontElement{title} element for the document title with different +setting.% +\EndIndex{FontElement}{title}% +\EndIndex{FontElement}{lettertitle}% +\begin{Example} + Suppose you are writing a reminder letter. You set a corresponding title: +\begin{lstlisting} + \setkomavar{title}{Reminder} +\end{lstlisting} + This way the recipient should recognize the reminder as such. +\end{Example} +As shown in the example, the \PName{content} of the variable defines the +title. \KOMAScript{} does not use the \PName{description}.% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{subject}{selection}% + \Variable{subject}% + \Variable{subjectseparator}% +\end{Declaration} +\BeginIndex{}{subject}% +To include a subject, define the \PName{content} of the \Variable{subject} +variable accordingly. First of all, you can use the +\OptionValue{subject}{true}\important{\OptionValue{subject}{titled}} option, +to choose whether the subject should be preceded with a \PName{description} or +not. If you use the \PName{description} the \PName{content} of the +\Variable{subjectseparator}\Index{separator} variable is output between the +\PName{description} and the \PName{content} of the \Variable{subject} +variable. The default \PName{content} of \PName{subjectseparator} consists of +a colon followed by a space. + +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside}{Default descriptions of variables for the subject} + [l] + \begin{tabular}[t]{lll} + \toprule + variable name & description \\ + \midrule + \Variable{subject} & \DescRef{\LabelBase.cmd.usekomavar*}\PParameter{subjectseparator}% + \texttt{\%} \\ + & \texttt{\quad}% + \DescRef{\LabelBase.cmd.usekomavar}\PParameter{subjectseparator} \\ + \Variable{subjectseparator} & \DescRef{scrlttr2-experts.cmd.subjectname} \\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:\LabelBase.subjectTerm} +\end{table} + +Additionally, you can use \OptionValue{subject}{afteropening}% +\important{\OptionValue{subject}{afteropening}\\ + \OptionValue{subject}{beforeopening}} to place the subject after the letter +opening instead of the default \OptionValue{subject}{beforeopening}. You can +also specify other formatting\important{\OptionValue{subject}{underlined}\\ + \OptionValue{subject}{centered}\\ + \OptionValue{subject}{right}} for the subject with +\OptionValue{subject}{underlined}, \OptionValue{subject}{centered}, or +\OptionValue{subject}{right}\ChangedAt{v2.97c}{\Class{scrlttr2}}. The +available values are listed in \autoref{tab:\LabelBase.subject}. +Note\textnote{Attention!} that with the \OptionValue{subject}{underlined} +option, the whole subject must fit onto one line. The defaults are +\OptionValue{subject}{left}, \OptionValue{subject}{beforeopening}, and +\OptionValue{subject}{untitled}.% +% +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside} + [{Available values for the \Option{subject} option with \Class{scrlttr2}}] + {Available values for the \Option{subject} option for the position and + formatting of the subject with + \Class{scrlttr2}\label{tab:\LabelBase.subject}}% + [l] + \begin{minipage}[t]{.6\linewidth} + \begin{desctabular}[t] + \pventry{afteropening}{subject after opening}% + \pventry{beforeopening}{subject before opening}% + \pventry{centered}{subject centred}% + \pventry{left}{subject left-justified}% + \pventry{right}{subject right-justified}% + \pventry{titled}{add title/description to subject}% + \pventry{underlined}{set subject underlined (see note in text)}% + \pventry{untitled}{do not add title/description to subject}% + \end{desctabular} + \end{minipage} + \end{captionbeside} +\end{table} + +\BeginIndexGroup +\BeginIndex{FontElement}{lettersubject}\LabelFontElement{lettersubject}% +\BeginIndex{FontElement}{subject}\LabelFontElement{subject}% +The subject line is set in a separate font\Index{font>style}. To change this, +use the \DescRef{\LabelBase.cmd.setkomafont} and +\DescRef{\LabelBase.cmd.addtokomafont} commands (see +\autoref{sec:\LabelBase.textmarkup}, +\DescPageRef{\LabelBase.cmd.setkomafont}). For the +\FontElement{lettersubject}\important{\FontElement{lettersubject}} element, +the default font is \Macro{normalcolor}\Macro{bfseries}. With the +\Class{scrlttr2} class, you can also use +\FontElement{subject}\important{\FontElement{subject}} as an alias of +\FontElement{lettersubject}. This is not possible with the \Package{scrletter} +package when using a \KOMAScript{} class, because these classes already define +a \FontElement{subject} element for the document title with different +settings.% +\EndIndexGroup + +\begin{Example} + Mr Public now includes a subject. As a traditionalist, he also wants the + subject to be labelled accordingly and therefore sets the corresponding + option:% + \lstinputcode[xleftmargin=1em]{letter-example-21-en.tex}% + The result is shown in \autoref{fig:\LabelBase.letter-21}. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Example: letter with extended sender, logo, + recipient, extra sender information, place, date, subject, + opening, text, closing, signature, postscript, distribution list, + enclosure, and hole-punch mark}] + {result of a short letter with extended sender, logo, recipient, + extra sender information, place, date, subject, opening, text, + closing, signature, postscript, distribution list, enclosure and + hole-punch mark}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-21-en}} + \end{captionbeside} + \label{fig:\LabelBase.letter-21} + \end{figure} +\end{Example} +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{subjectvpos} +\end{Declaration} +\ChangedAt{v3.01}{\Class{scrlttr2}}% +If\textnote{Attention!} the value of this pseudo-length is 0\Unit{pt}, the +\DescRef{\LabelBase.option.subject}\important{\DescRef{\LabelBase.option.subject}}% +\IndexOption{subject~=\PName{Einstellung}} option (see +\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.subject}) +determines the position of the subject. Any other value defines the distance +between the top edge of the paper and the subject. In this +case\textnote{Hint!}, you should ensure that there is enough space available +that overlapping with other elements is unlikely. +\begin{Example} + A few professionals prefer to have the subject above the reference line. For + this, you can specify the position as follows, which also changes the + position of the reference line itself: +\begin{lstcode} + \ProvidesFile{lawsubj.lco} + [2008/11/03 lawyers lco file] + \setplength{subjectvpos}{\useplength{refvpos}} + \addtoplength{refvpos}{3\baselineskip} + \endinput +\end{lstcode} + If you want to leave at least one empty line between the subject and the + reference, you have space for a maximum of two lines. +\end{Example} +\EndIndexGroup + + +\begin{Declaration} + \PLength{subjectbeforevskip}% + \PLength{subjectaftervskip} +\end{Declaration} +\ChangedAt{v3.01}{\Class{scrlttr2}}% +If the subject is placed not absolutely but before or after the salutation, +you can insert additional vertical space before and after the subject. The +space before the subject may interfere with other distances, such as the +automatic distance of one line after the title. Therefore the default is to +use no additional space here. The default of the class and the package for the +space after the subject is two lines.% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Closing} +\seclabel{closing} +\BeginIndexGroup +\BeginIndex{}{closing} + +\BeginIndex{}{letter>closing}% +\BeginIndex{}{signature}% +\BeginIndex{}{letter>signature}% + +It has already been mentioned in \autoref{sec:\LabelBase.document}, +\DescPageRef{\LabelBase.cmd.closing} that the letter's closing text is +provided by \DescRef{\LabelBase.cmd.closing}\IndexCmd{closing}. Beneath the +closing text, there is often a space for a handwritten signature, beneath +which there can be a printed name, which serves as a kind of annotation to the +actual signature. + + +\begin{Declaration} + \Variable{signature}% +\end{Declaration} +The \Variable{signature} variable contains the printed name or annotation for +the handwritten signature. Its default \PName{content} is the +\DescRef{\LabelBase.cmd.usekomavar}\PParameter{fromname}. This annotation can +consist of multiple lines. In that case, you should separate the individual +lines with double backslashes. Paragraph\textnote{Attention!} breaks in the +signature annotation, however, are not permitted.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{raggedsignature} +\end{Declaration} +The closing phrase and the signature will be typeset in a box. The width of +the box is determined by the length of the longest line in the closing +phrase or signature. + +The \PLength{sigindent}\IndexPLength{sigindent} and +\PLength{sigbeforevskip}\IndexPLength{sigbeforevskip} pseudo-lengths determine +exactly where this box is placed (see \autoref{sec:\LabelBase.closing}, +\DescPageRef{\LabelBase.plength.sigindent}). The \Macro{raggedsignature} +command defines the alignment inside the box. In the default \File{lco} files, +the command is either defined as \Macro{centering} (all besides +\Option{KOMAold}) or \Macro{raggedright} (\Option{KOMAold}). In order to +obtain flush-right or flush-left alignment inside the box, you can redefine +the command in the same way as \DescRef{maincls.cmd.raggedsection} (see the +example in \autoref{sec:maincls.structure}, +\DescPageRef{maincls.cmd.raggedsection}). + +\begin{Example} + Now Mr Public wants to make himself seem really important, and therefore he uses the + signature to show once again that he was formerly a chairman himself. So + he changes \PName{contents} of the + \DescRef{\LabelBase.variable.signature} variable. He also wants the signature + be aligned flush-left and so he also redefines \Macro{raggedsignature}:% + \lstinputcode[xleftmargin=1em]{letter-example-22-en.tex}% + See \autoref{fig:\LabelBase.letter-22} for the result. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Example: letter with extended sender, logo, + recipient, extra sender information, place, date, subject, + opening, text, closing, modified signature, postscript, distribution + list, enclosure, and hole-punch mark}] + {result of a short letter with extended sender, logo, recipient, + extra sender information, place, date, subject opening, text, + closing, modified signature, postscript, distribution list, enclosure + and hole-punch mark}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-22-en}} + \end{captionbeside} + \label{fig:\LabelBase.letter-22} + \end{figure} +\end{Example} +\iftrue% Umbruchkorrekturtext + The preceding example shows the most important, although not all possible, + elements of a letter. It can, however, serve quite well as a general + template.% +\else + \vskip -1\ht\strutbox plus .75\ht\strutbox% example at end of description +\fi +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{sigindent}% + \PLength{sigbeforevskip} +\end{Declaration} +The closing phrase\Index{closing>phrase}\Index{signature} and signature +explanation are typeset in a box whose width is determined by the length of +the longest line of the closing phrase or explanation. + +The box will be indented by the distance specified in the \PLength{sigindent} +pseudo-length. In the predefined \File{lco} files\textnote{\File{lco} +file}\Index{lco file=\File{lco} file}, this length is set to 0\Unit{mm}. + +Between the closing phrase and the signature explanation, a vertical skip is +inserted whose height is defined in the \PLength{sigbeforevskip} +pseudo-length. In the predefined \File{lco} files\textnote{\File{lco} +file}\Index{lco file=\File{lco} file} this value is set to two lines. In this +space you can then write your signature.% +\iffalse% Umbruchkorrekturtext +\ If you decide to include a facsimile of your signature in the +\DescRef{\LabelBase.variable.signature}\IndexVariable{signature}% +\important{\DescRef{\LabelBase.variable.signature}} with the +\Package{graphicx}\IndexPackage{graphicx} package, it would be useful +to reduce the value of \PLength{sigbeforevskip} and thus the gap between +the closing phrase and the signature.% +\fi% +\EndIndexGroup +% +\EndIndexGroup + + +\subsection{Letterhead Page Footer} +\seclabel{firstFoot}% +\BeginIndexGroup +\BeginIndex{}{letterhead page>footer}% + +The first page of a letter, the letterhead page, contains not just its own +header, the letterhead, but also its own footer\Index{footer>letterhead +page}\Index{footer}. Just like the letterhead, it will be set not by the page +style but directly within \DescRef{\LabelBase.cmd.opening}\IndexCmd{opening}% +\important{\DescRef{\LabelBase.cmd.opening}}. + + +\begin{Declaration} + \OptionVName{enlargefirstpage}{simple switch} +\end{Declaration} +\begin{Explain} + The first page of a letter always uses a different page layout because of + the many predefined elements such as the letterhead or the address. The + \Class{scrlttr2} class provides a mechanism to calculate height and vertical + alignment of header and footer of the first page independently of the + subsequent pages. If, as a result, the footer of the first page would + protrude into the text area, this text area of the first page is + automatically reduced using + \Macro{enlargethispage}\IndexCmd{enlargethispage}. +\end{Explain} +If the text area should become larger, assuming the footer on the first page +permits this, you can use this option. At best, a little more text will then +fit on the first page. See also the description of the \PLength{firstfootvpos} +pseudo-length on \DescPageRef{\LabelBase.plength.firstfootvpos}. This +option takes the standard values for simple switches, as listed in +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. The default +is \PValue{false}.\textnote{default}% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{firstfoot}{simple switch} +\end{Declaration} +\BeginIndex{}{letterhead page>footer}% +This\ChangedAt{v2.97e}{\Class{scrlttr2}} option determines whether the footer +for the letterhead page is output. Switching off the letterhead page footer +with \OptionValue{firstfoot}{false}\important{\OptionValue{firstfoot}{false}}, +has an effect when the \DescRef{\LabelBase.option.enlargefirstpage} option +(see \DescPageRef{\LabelBase.option.enlargefirstpage}) is used at the same +time, as this will logically extend the page downwards. In this case, the +distance that is ordinarily between type area and the footer becomes the +distance between the end of the type area and the bottom of the page. + +The option recognizes the standard values for simple switches listed in +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. The default +is to include the letterhead page footer. +\EndIndexGroup + + +\begin{Declaration} + \Variable{firstfoot}% +\end{Declaration}% +\BeginIndex{}{letterhead page>footer}% +The footer of the first page is empty by default. +However\ChangedAt{v3.08}{\Class{scrlttr2}}, you can specify a new footer +in the \PName{content} of the \Variable{firstfoot} variable. \KOMAScript{} +does not use the \PName{description} of the variable. + +\BeginIndex{Variable}{frombank}% +\begin{Example} + You want to put the \PName{content} of the \Variable{frombank} variable + (i.\,e. the bank account details) in the footer of the first page. The + double backslash should be replaced with a comma: +\begin{lstcode} + \setkomavar{firstfoot}{% + \parbox[b]{\linewidth}{% + \centering\def\\{, }\usekomavar{frombank}% + }% + } +\end{lstcode} + You can also define your own variable for the separator. I leave + this as an exercise for the reader. + + If you want to create a footer in order to counterbalance the letterhead, you + can do so, for example, as follows: +\begin{lstcode} + \setkomavar{firstfoot}{% + \parbox[t]{\textwidth}{\footnotesize + \begin{tabular}[t]{l@{}}% + \multicolumn{1}{@{}l@{}}{Partners:}\\ + Jim Smith\\ + Russ Mayer + \end{tabular}% + \hfill + \begin{tabular}[t]{l@{}}% + \multicolumn{1}{@{}l@{}}{Managing Director:}\\ + Lisa Mayer\\[1ex] + \multicolumn{1}{@{}l@{}}{Court Jurisdiction:}\\ + Great Plains + \end{tabular}% + \Ifkomavarempty{frombank}{}{% + \hfill + \begin{tabular}[t]{l@{}}% + \multicolumn{1}{@{}l@{}}{\usekomavar*{frombank}:}\\ + \usekomavar{frombank} + \end{tabular}% + }% + }% + } +\end{lstcode} + This example originally came from Torsten Kr\"uger. You should + consider placing a definition intended for multiple use in different + documents in a separate \File{lco} file\Index{lco file=\File{lco} file}. +\begin{lstcode} + \setkomavar{frombank}{Account No. 12345678\\ + Buffoon Bank\\ + Bank Code: 65-43-21} +\end{lstcode} + can then be used to set the bank details in the document. +% However depending on your settings, there may not be sufficient space +% for such a large footer, and it may therefore be placed too low on the +% page. In such a case, you can adjust its vertical position with the +% pseudo-length \PLength{firstfootvpos}\IndexPLength{firstfootvpos}. +\end{Example} + +The previous example uses a multi-line footer. With a compatibility setting +of version 2.9u (see \DescRef{\LabelBase.option.version} in +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}) the space is generally insufficient. +In this case, you should reduce \PLength{firstfootvpos} (see +\DescPageRef{\LabelBase.plength.firstfootvpos}) appropriately.% +\EndIndexGroup + +\begin{Declaration} + \Variable{frombank} +\end{Declaration}% +\BeginIndex{}{letterhead page>footer}% +The \Variable{frombank} variable used in the previous example +occupies a special position. It is not currently used internally. However, you +can use it to put the bank information\Index{bank information} in the +extra sender information field or in the footer, as in the example (see +the variable \DescRef{\LabelBase.variable.location}, +\DescPageRef{\LabelBase.variable.location}).% +% +\EndIndexGroup + + +\begin{Declaration} + \PLength{firstfootvpos} +\end{Declaration} +This pseudo-length gives the distance from the top of the paper to the footer +of the letterhead page. It also ensures that the text area does not protrude +into the footer. To do so, the height of the text area on the first page will +be decreased, if necessary, using +\Macro{enlargethispage}\IndexCmd{enlargethispage}% +\important{\Macro{enlargethispage}}. The +\DescRef{\LabelBase.option.enlargefirstpage}% +\important{\DescRef{\LabelBase.option.enlargefirstpage}} option (see +\autoref{sec:\LabelBase.firstpage}, +\DescPageRef{\LabelBase.option.enlargefirstpage}) can also ensure that the +height of the text area is increased, if necessary. Thus, the distance between +text area and the letterhead page footer can be reduced to the value of the +\Length{footskip}\IndexLength{footskip}\important{\Length{footskip}} length. + +With\textnote{Attention!} the compatibility option +set\ChangedAt{v2.9t}{\Class{scrlttr2}} to versions up to +2.9t\IndexOption{version~=\PValue{2.9t}} (see +\DescRef{\LabelBase.option.version} in +\autoref{sec:\LabelBase.compatibilityOptions}, +\DescPageRef{\LabelBase.option.version}) the footer is set independently of the +type area in all predefined \File{lco} files\textnote{\File{lco} +file}\Index{lco file=\File{lco} file} (see \autoref{sec:\LabelBase.lcoFile}) +except for \Option{KOMAold} and \Option{NF}. Thus the +\DescRef{\LabelBase.option.enlargefirstpage}% +\important{\DescRef{\LabelBase.option.enlargefirstpage}} option has no effect. +From version 2.9u on, the footer is placed at the bottom edge of the paper. +Thus, the height of the letterhead page's type area may also depend on the +\DescRef{\LabelBase.option.enlargefirstpage} option. + +If the letter footer is deactivated with the +\OptionValueRef{scrlttr2}{firstfoot}{false}% +\important{\OptionValueRef{scrlttr2}{firstfoot}{false}}% +\IndexOption{firstfoot~=\PValue{false}}\ChangedAt{v2.97e}{\Class{scrlttr2}} +option (see \autoref{sec:\LabelBase.firstpage}, +\DescPageRef{\LabelBase.option.firstfoot}), the setting of +\PLength{firstfootvpos} is ignored, and instead +\Length{paperheight}\IndexLength{paperheight} is applied. There remains then a +minimum bottom margin of length \Length{footskip}\IndexLength{footskip}.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{firstfoothpos} +\end{Declaration} +\ChangedAt{v3.05}{\Class{scrlttr2}}% +A\textnote{Attention!} positive value of the \PLength{firstfoothpos} +pseudo-length specifies the distance from the left edge of the paper to the +letterhead page footer. If the value is greater than or equal to the paper +width, \Length{paperwidth}\IndexLength{paperwidth}, the footer is centred +horizontally on the letterhead page. But if the value is less than or equal to +the negative width of the paper, the footer is placed flush with the left edge +of the typing area. + +The typical default for this value is \Length{maxdimen}\IndexLength{maxdimen}, +which is the maximum possible value for a length. This results in horizontal +centring.% +\EndIndexGroup + + +\begin{Declaration} + \PLength{firstfootwidth} +\end{Declaration} +This pseudo-length specifies the width of the footer of the first page of the +letter, that is the letterhead page. The value in the predefined \File{lco} +files\textnote{\File{lco} file}\Index{lco file=\File{lco} file} matches +\PLength{firstheadwidth}\important{\PLength{firstheadwidth}}% +\IndexPLength{firstheadwidth}.% +% +\EndIndexGroup +% +\EndIndexGroup +% +\EndIndexGroup + +\LoadCommonFile{parmarkup} % \section{Paragraph Markup} + +\LoadCommonFile{oddorevenpage} % \section{Detection of Odd and Even Pages} + + +\section{Headers and Footers with the Default Page Style} +\seclabel{pagestyle} +\BeginIndexGroup +\BeginIndex{}{page>style}% +\BeginIndex{}{page>header}% +\BeginIndex{}{page>footer}% + +One of the general properties of a document is its page style. In \LaTeX{} +this mostly consists of the contents of headers and footers. +As\textnote{Attention!} already mentioned in +\autoref{sec:\LabelBase.firstpage}, the header and footer of the letterhead +page are treated as elements of the letterhead page. Therefore they do not +depend on the settings of the page style. So this section describes the page +styles of the subsequent pages of a letter after the letterhead page. For +one-sided letters, this is the page style of the second sheet. For two-sided +letters, this is also the page style of all verso pages. + + +\begin{Declaration} + \Macro{letterpagestyle} +\end{Declaration} +The\ChangedAt{v3.19}{\Class{scrlttr2}\and \Package{scrletter}} default page +style for letters is specified by the contents of the \Macro{letterpagestyle} +command. By default\textnote{default}, +\Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} leaves this command empty. This +means that the page style of letters is the same as in the rest of the +document. This is useful because \Class{scrlttr2} is intended for letter-only +documents, and it is easier to define the page style for all letters globally, +using \DescRef{\LabelBase.cmd.pagestyle} as usual. + +Since both the \DescRef{\LabelBase.pagestyle.plain} and the +\DescRef{\LabelBase.pagestyle.headings} page styles of other classes differs +from the page style necessary for letters, the +\Package{scrletter}\OnlyAt{\Package{scrletter}}\textnote{default} package +defines \Macro{letterpagestyle} with to be +\DescRef{\LabelBase.pagestyle.plain.letter}\IndexPagestyle{plain.letter}% +\important{\DescRef{\LabelBase.pagestyle.plain.letter}}. This causes all +letters to use the +\hyperref[desc:\LabelBase.pagestyle.plain.letter]{\PageStyle{plain}} style of +the \DescRef{\LabelBase.pagestyle.letter}\IndexPagestyle{letter} page style +pair, regardless of the page style of the rest of the document. See +\autoref{sec:scrlttr2-experts.pagestyleatscrletter} for more information about +the characteristics of the page style of the \Package{scrletter} package. +\begin{Example} + You are using the \Package{scrletter} package and want letters to use the + same page style that was set for the rest of the document with + \DescRef{\LabelBase.cmd.pagestyle}. To do this, put the command +\begin{lstcode} + \renewcommand*{\letterpagestyle}{} +\end{lstcode} + in your document preamble. Notice the star in \Macro{renewcommand*}. +\end{Example} +Of course, if you use \DescRef{\LabelBase.cmd.pagestyle} or +\DescRef{\LabelBase.cmd.thispagestyle} inside a letter, this will take +precedence over the page style set in \Macro{begin}\PParameter{letter} with +\Macro{letterpagestyle}.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{headsepline}{simple switch}% + \OptionVName{footsepline}{simple switch} +\end{Declaration} +With these options \Class{scrlttr2}\OnlyAt{scrlttr2} can select whether to put +a separator rule\Index{line>separator}\Index{rule>separator} below the header +or above the footer, respectively, on subsequent pages. This option acccepts +the standard values for simple switches listed in +\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. +Activating\important{\OptionValue{headsepline}{true}} the \Option{headsepline} +option enables a rule below the header. +Activating\important{\OptionValue{footsepline}{true}} the \Option{footsepline} +option enables a rule above the footer. Deactivating the options disables the +corresponding rules. + +Of course, the \Option{headsepline} and \Option{footsepline} options have no +effect on the \DescRef{\LabelBase.pagestyle.empty}% +\important{\DescRef{\LabelBase.pagestyle.empty}} page style (see later in this +section). This page style explicitly does not use headers or footers. + +Typographically\important{\DescRef{\LabelBase.pagestyle.headings}\\ + \DescRef{\LabelBase.pagestyle.myheadings}\\ + \DescRef{\LabelBase.pagestyle.plain}} speaking, such a rule creates an +optical effect of making the header or footer appear to be closer to the text +area. This does not mean that the distance between the header or footer and +the text should be increased. Instead, they should be seen as part of the text +body\Index{text>body} when calculating the type area. To achieve this +\Class{scrlttr2} uses the \Option{headsepline} class option to automatically +pass the \DescRef{typearea.option.headinclude}% +\important{\DescRef{typearea.option.headinclude}} package option to the +\hyperref[cha:typearea]{\Package{typearea}} package. The same applies to +\DescRef{\LabelBase.option.footsepline} for +\DescRef{typearea.option.footinclude}% +\important{\DescRef{typearea.option.footinclude}}. + +The options themselves do not automatically recalculate the type area. To +recalculate the type area, see the \DescRef{typearea.option.DIV} option with +the \PValue{last} or \PValue{current} values (see +\DescPageRef{typearea.option.DIV.last}), or the +\DescRef{typearea.cmd.recalctypearea} command (see +\DescPageRef{typearea.cmd.recalctypearea}) in \autoref{cha:typearea}. + +The \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} +package (see \autoref{cha:scrlayer-scrpage}) provides further control over +header and footer rules and you can also combine it with \Class{scrlttr2}. The +\Package{scrletter} package automatically uses +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} to +define the \DescRef{\LabelBase.pagestyle.letter} and +\DescRef{\LabelBase.pagestyle.plain.letter} page styles. + +The\OnlyAt{\Package{scrletter}} \DescRef{\LabelBase.pagestyle.letter} and +\DescRef{\LabelBase.pagestyle.plain.letter} page styles defined by +\Package{scrletter} follow the rules of +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}. This particularly +applies to setting the header and footer rules of the \PageStyle{plain} page +style \DescRef{\LabelBase.pagestyle.plain.letter}. See in +\autoref{sec:scrlayer-scrpage.pagestyle.content}, +\DescPageRef{scrlayer-scrpage.option.headsepline} and +\DescPageRef{scrlayer-scrpage.option.plainheadsepline} the options +\DescRef{scrlayer-scrpage.option.headsepline} and +\DescRef{scrlayer-scrpage.option.plainheadsepline}. Also, settings like +\DescRef{scrlayer-scrpage.option.automark} are of some importance for the +\DescRef{\LabelBase.pagestyle.letter} page style.% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{pagenumber}{position} +\end{Declaration} +With this option you can select if and where a page number should be placed on +subsequent pages. In \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} this option +affects the page styles\important{\DescRef{\LabelBase.pagestyle.headings}\\ + \DescRef{\LabelBase.pagestyle.myheadings}\\ + \DescRef{\LabelBase.pagestyle.plain}} +\DescRef{\LabelBase.pagestyle.headings}, +\DescRef{\LabelBase.pagestyle.myheadings} and +\DescRef{\LabelBase.pagestyle.plain}; in +\Package{scrletter}\OnlyAt{\Package{scrletter}}, it affects the +\DescRef{\LabelBase.pagestyle.letter} and +\DescRef{\LabelBase.pagestyle.plain.letter} page styles. It also affects the +default page styles of the +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% +\IndexPackage{scrlayer-scrpage} package, as long as it is set before that +package is loaded (see \autoref{cha:scrlayer-scrpage}). It accepts values that +influence only the horizontal position, only the vertical position, or both +positions simultaneously. Available values are listed in +\autoref{tab:\LabelBase.pagenumber}. The default is \PValue{botcenter}. + +\begin{table} + \caption[{Available values for the \Option{pagenumber} option with + \Class{scrlttr2}}]{Available values for the \Option{pagenumber} option to + position the page number in the \PageStyle{headings}, + \PageStyle{myheadings}, and \PValue{plain} page styles with + \Class{scrlttr2}} + \label{tab:\LabelBase.pagenumber} + \begin{desctabular} + \entry{\PValue{bot}, \PValue{foot}}{% + page number in footer, horizontal position unchanged}% + \entry{\PValue{botcenter}, \PValue{botcentered}, \PValue{botmittle}, + \PValue{footcenter}, \PValue{footcentered}, \PValue{footmiddle}}{% + page number in footer, centred}% + \entry{\PValue{botleft}, \PValue{footleft}}{% + page number in footer, left-justified}% + \entry{\PValue{botright}, \PValue{footright}}{% + page number in footer, right-justified}% + \entry{\PValue{center}, \PValue{centered}, \PValue{middle}}{% + page number centred horizontally, vertical position unchanged}% + \entry{\PValue{false}, \PValue{no}, \PValue{off}}{% + no page number}% + \entry{\PValue{head}, \PValue{top}}{% + page number in header, horizontal position unchanged}% + \entry{\PValue{headcenter}, \PValue{headcentered}, \PValue{headmiddle}, + \PValue{topcenter}, \PValue{topcentered}, \PValue{topmiddle}}{% + page number in header, centred}% + \entry{\PValue{headleft}, \PValue{topleft}}{% + page number in header, left-justified}% + \entry{\PValue{headright}, \PValue{topright}}{% + page number in header, right-justified}% + \entry{\PValue{left}}{% + page number left, vertical position unchanged}% + \entry{\PValue{right}}{% + page number right, vertical position unchanged}% + \end{desctabular} +\end{table} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{pagestyle}\Parameter{page style}% + \Macro{thispagestyle}\Parameter{local page style} +\end{Declaration}% +\BeginIndex{Pagestyle}{empty}% +\BeginIndex{Pagestyle}{plain}% +\BeginIndex{Pagestyle}{headings}% +\BeginIndex{Pagestyle}{myheadings}% +Letters written with \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} have four +different page styles available. In contrast, +\Package{scrletter}\OnlyAt{\Package{scrletter}} defines only two of its own +page styles. +\begin{description}\setkomafont{descriptionlabel}{} +\item[{\PageStyle{empty}}] + \LabelPageStyle{empty} is the page style where the headers and footers of + subsequent pages are completely empty. This page style is also automatically + used for the first page of the letter because the header and footer of this + page are set by other means, using + \DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} (see + \autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.cmd.opening}). +\item[{\PageStyle{headings}}] + \LabelPageStyle{headings} is, for \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}}, + the page style for automatic running heads on subsequent pages. The sender's + name from the \DescRef{\LabelBase.variable.fromname}\IndexVariable{fromname} + variable and the subject from the + \DescRef{\LabelBase.variable.subject}\IndexVariable{subject} variable are + used to set the marks (see \autoref{sec:\LabelBase.firstpage}, + \DescPageRef{\LabelBase.variable.fromname} and + \DescPageRef{\LabelBase.variable.subject}). Where exactly these marks and + page numbers are placed depends on the + \DescRef{\LabelBase.option.pagenumber} described above and the + \PName{content} of the + \DescRef{\LabelBase.variable.nexthead}\IndexVariable{nexthead} and + \DescRef{\LabelBase.variable.nextfoot}\IndexVariable{nextfoot} variables. An + author can also change these marks manually after the + \DescRef{\LabelBase.cmd.opening} command. As usual, the + \DescRef{\LabelBase.cmd.markboth} and \DescRef{\LabelBase.cmd.markright} + commands are available, as is \DescRef{scrlayer-scrpage.cmd.markleft} if you + use \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + \IndexPackage{scrlayer-scrpage}% + \important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} + (see \autoref{sec:scrlayer-scrpage.pagestyle.content}, + \DescPageRef{scrlayer-scrpage.cmd.automark}). + + Since \Package{scrletter}\OnlyAt{scrletter} uses + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} internally, any + page style \DescRef{maincls.pagestyle.headings} provided by the class are + redefined as an alias of \DescRef{scrlayer-scrpage.pagestyle.scrheadings}. + You can find more about this page style in \autoref{cha:scrlayer-scrpage} on + \DescPageRef{scrlayer-scrpage.pagestyle.scrheadings}. +\item[{\PageStyle{letter}}] + \LabelPageStyle{letter}% + Since the \PageStyle{headings} page style is generally already in use by + the classes, the \Package{scrletter}\OnlyAt{scrletter} package instead + defines the \PageStyle{letter} page style. This is accomplished with the + help of \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} in + \autoref{cha:scrlayer-scrpage}, \autopageref{cha:scrlayer-scrpage}. With the + \OptionValueRef{scrlayer-scrpage}{automark}{true}% + \important{\OptionValueRef{scrlayer-scrpage}{automark}{true}}% + \IndexOption{automark} setting enabled, \PageStyle{letter} then assumes the + role played by \PageStyle{headings} in \Class{scrlttr2}. With + \OptionValueRef{scrlayer-scrpage}{automark}{false}% + \important{\OptionValueRef{scrlayer-scrpage}{automark}{false}}% + \IndexOption{automark} set, \PageStyle{letter} assumes the role of + \PageStyle{myheadings}. + + When\textnote{Attention!} you use + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} with + \Package{scrletter}, you cannot use the obsolete + \Package{scrpage2}\IndexPackage{scrpage2} package or the + \Package{fancyhdr}\IndexPackage{fancyhdr} package, which is incompatible + with \KOMAScript{}. +\item[{\PageStyle{myheadings}}] + \LabelPageStyle{myheadings}% + in \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} is the page style for manual + running heads on subsequent pages. Unlike \PValue{headings}, you must set + the marks yourself with the + \DescRef{\LabelBase.cmd.markboth}\IndexCmd{markboth} and + \DescRef{\LabelBase.cmd.markright}\IndexCmd{markright} commands. When you + use \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}, + \DescRef{scrlayer-scrpage.cmd.markleft}\IndexCmd{markleft} is also + available. + + With the \Package{scrletter}\OnlyAt{\Package{scrletter}} package, the + \PageStyle{letter} page style also assumes the role of + \PageStyle{myheadings}. +\item[{\PageStyle{plain}}] + \LabelPageStyle{plain}% + is the default page style for \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}}, + which does not use any headers on subsequent pages and only outputs + a single page number. Where this is placed depends on the + \DescRef{\LabelBase.option.pagenumber} option explained above. + + Since \Package{scrletter}\OnlyAt{scrletter} uses + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} internally, the + \DescRef{maincls.pagestyle.plain} page style is redefined as an alias of + \DescRef{scrlayer-scrpage.pagestyle.plain.scrheadings}. You can find more + about this page style in \autoref{cha:scrlayer-scrpage} on + \DescPageRef{scrlayer-scrpage.pagestyle.scrheadings}. +\item[{\PageStyle{plain.letter}}] + \LabelPageStyle{plain.letter}% + Since the \PageStyle{plain} page style is generally already in use by the + classes, the \Package{scrletter}\OnlyAt{scrletter} defines a + \PageStyle{plain.letter} page style instead. This is accomplished with the + help of \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}. + When\textnote{Attention!} you use + \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} with + \Package{scrletter}, you cannot use the obsolete + \Package{scrpage2}\IndexPackage{scrpage2} package or the + \Package{fancyhdr}\IndexPackage{fancyhdr} package, which is incompatible + with \KOMAScript{}. +\end{description} + +The appearance of the page styles is also influenced by +the\important{\DescRef{\LabelBase.option.headsepline}\\ + \DescRef{\LabelBase.option.footsepline}} +\DescRef{\LabelBase.option.headsepline}\IndexOption{headsepline} and +\DescRef{\LabelBase.option.footsepline}\IndexOption{footsepline} options +described above. The page style beginning with the current page is changed +using \Macro{pagestyle}. In contrast, \Macro{thispagestyle} changes only the +page style of the current page. The\textnote{Attention!} letter class itself +uses \Macro{thispagestyle}\PParameter{empty} within +\DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} for the first page of the +letter. + +\BeginIndexGroup% +\BeginIndex[indexother]{}{font>style}% +\BeginIndex{FontElement}{pageheadfoot}\LabelFontElement{pageheadfoot}% +\BeginIndex{FontElement}{pagehead}\LabelFontElement{pagehead}% +\BeginIndex{FontElement}{pagefoot}\LabelFontElement{pagefoot}% +\BeginIndex{FontElement}{pagenumber}\LabelFontElement{pagenumber}% +To changing the font style of headers or footers, you should use the user +interface described in \autoref{sec:maincls.textmarkup}. The header and footer +use the same element +\FontElement{pageheadfoot}\important{\FontElement{pageheadfoot}}. +% TODO: Fix new translation +With package \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage} and therefore with \Package{scrletter} the +\FontElement{pagehead}\important{\FontElement{pagehead}} element is +additionally responsible for the header. In \Class{scrlttr2} and without +package \Package{scrlayer-scrpage} the element is an alias of +\FontElement{pageheadfoot} only. +% :ODOT +The\ChangedAt{v3.00}{\Class{scrlttr2}} +\FontElement{pagefoot}\important{\FontElement{pagefoot}} element additionally +controls the formatting of the footer. This element is applied after +\FontElement{pageheadfoot} in the +\DescRef{\LabelBase.variable.nextfoot}\IndexVariable{nextfoot} variable or +when \Package{scrlayer-scrpage}\IndexPackage{scrlayer-scrpage} page styles are +used (see \autoref{cha:scrlayer-scrpage}, +\DescPageRef{scrlayer-scrpage.fontelement.pagefoot}). The element for the page +number within the header or footer is called +\FontElement{pagenumber}\important{\FontElement{pagenumber}}. The default +settings are listed in \autoref{tab:maincls.defaultFontsHeadFoot}, +\autopageref{tab:maincls.defaultFontsHeadFoot}. Please also note the example +from \autoref{sec:maincls.pagestyle}, \PageRefxmpl{maincls.cmd.pagestyle}. +% +\EndIndexGroup +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{markboth}\Parameter{left mark}\Parameter{right mark}% + \Macro{markright}\Parameter{right mark} +\end{Declaration} +In most cases, \KOMAScript{}'s options and variables should be quite adequate +for creating headers\Index{header} and footers\Index{footer} for the +subsequent pages, all the more so because, in addition to \Macro{markboth} and +\Macro{markright}, you can change the sender information that \Class{scrlttr2} +or \Package{scrletter} puts in the header. You can, in particular, use the +\Macro{markboth}\IndexCmd{markboth} and \Macro{markright}\IndexCmd{markright} +commands with the \PageStyle{myheadings}\IndexPagestyle{myheadings}% +\important{\PageStyle{myheadings}} pagestyle. Of course, if you use the +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} +package, this is also valid for the +\PValue{scrheadings}\IndexPagestyle{scrheadings} page style. In that case, the +\DescRef{scrlayer-scrpage.cmd.markleft}\IndexCmd{markleft} command is also +available. + +\begin{Declaration} + \Variable{nexthead}% + \Variable{nextfoot}% +\end{Declaration} +At times, however, you may want to the header or the footer of subsequent pages +to more closely resemble the letterhead page. In these cases, you must dispense +with the predefined options that can be selected with the +\DescRef{\LabelBase.option.pagenumber}\IndexOption{pagenumber} option described above. +Instead, you can customise the header and footer of subsequent pages using the +\DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings}% +\important{\DescRef{\LabelBase.pagestyle.headings}, + \DescRef{\LabelBase.pagestyle.myheadings}} or +\DescRef{\LabelBase.pagestyle.myheadings}\IndexPagestyle{myheadings} page styles with \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}}, +and the \DescRef{\LabelBase.pagestyle.letter}% +\IndexPagestyle{letter}\important{\DescRef{\LabelBase.pagestyle.letter}} page style +with \Package{scrletter}\OnlyAt{\Package{scrletter}}. To do so, you create the +structure you want in the \PName{content} of +the\ChangedAt{v3.08}{\Class{scrlttr2}} \Variable{nexthead} or +\Variable{nextfoot} variables. Within the \PName{content} of +\Variable{nexthead} and \Variable{nextfoot} you can, for example, use the \Macro{parbox} +command to place several boxes next to or beneath each other (see \cite{latex:usrguide}). More advanced users should +be able to create their own headers and footers. Of course, you can +and should also make use of additional variables using +\DescRef{\LabelBase.cmd.usekomavar}. \KOMAScript{} does not use the +\PName{description} for either variable. +% +%Only\textnote{Attention!} for compatibility reason the deprecated commands +%\Macro{nexthead}\IndexCmd[indexmain]{nexthead} and +%\Macro{nextfoot}\IndexCmd[indexmain]{nextfoot} of former \Class{scrlttr2} +%releases before 3.08 are also implemented. Nevertheless, you should not use +%those.% +% +\EndIndexGroup +\EndIndexGroup +% +\EndIndexGroup + + +\LoadCommonFile{interleafpage}% \section{Interleaf Pages} + +\LoadCommonFile{footnotes}% \section{Footnotes} + +\LoadCommonFile{lists}% \section{Lists} + + +\section{Mathematics} +\seclabel{math}% +\BeginIndexGroup +\BeginIndex{}{equations}% +\BeginIndex{}{formulas}% +\BeginIndex{}{mathematics}% + +The \KOMAScript{} classes do not provide their own maths environments. +Instead, \KOMAScript{} relies completely on the maths features of the \LaTeX{} +kernel. However\textnote{Attention!}, since numbered equations and formulas +are very unusual in letters, \KOMAScript{} does not actively support them. +Therefore, the \DescRef{maincls.option.leqno} and +\DescRef{maincls.option.fleqn} options for \Class{scrbook}, \Class{scrreprt}, +and \Class{scrartcl}, documented in \autoref{sec:maincls.math}, are not +available with \Class{scrlttr2}. + +You will not find a description here of the maths environments of the \LaTeX{} +kernel, that is \Environment{displaymath}\IndexEnv{displaymath}, +\Environment{equation}\IndexEnv{equation}, and +\Environment{eqnarray}\IndexEnv{eqnarray}. If you want to use them, consult an +introduction to \LaTeX{} like \cite{lshort}. But\textnote{Hint!} if you want +more than very simple mathematics, you should use the \Package{amsmath} +package (see \cite{package:amsmath}).% +% +\EndIndexGroup + + +\section{Floating Environments for Tables and Figures} +\seclabel{floats} + +Floating environments for tables or figures are very unusual in letters. +Therefore\textnote{Attention!} \Class{scrlttr2} does not provide them. If you +still believe you need them, this often indicates a misuse of the letter +class. In such cases, it is advisable to combine one of the \KOMAScript{} +classes from \autoref{cha:maincls} with the +\Package{scrletter}\important{\Package{scrletter}} package instead. In this +case you, the floating environments documented for the class can also be used +in letters. You could also define your own floating environments with help of +\Package{tocbasic}\important{\Package{tocbasic}} (see \autoref{cha:tocbasic}). + +\LoadCommonFile{marginpar} % \section{Margin Notes} + + +\section{Letter Class Option Files} +\seclabel{lcoFile}% +\BeginIndexGroup +\BeginIndex{}{lco file=\File{lco} file}% +\BeginIndex{}{letter class option}% + +Normally, you would not redefine selections like the sender's information +every time you write a letter. Instead, you would reuse a whole set of +parameters for certain occasions. The same applies to the letterhead +and footer used on the first page. Therefore it makes sense to save these +settings in a separate file. For this purpose, \KOMAScript{} offers +\File{lco} files. The \File{lco} suffix is an abbreviation for +\emph{\emph{l}etter \emph{c}lass \emph{o}ption}. + +In an \File{lco} file, you can use all commands available to the document at +the time the \File{lco} file is loaded. You can also use internal commands +available to package writers. For \Class{scrlttr2} and \Package{scrletter}, +these are, in particular, the commands +\DescRef{\LabelBase.cmd.newplength}\IndexCmd{newplength}, +\DescRef{\LabelBase.cmd.setplength}\IndexCmd{setplength}, and +\DescRef{\LabelBase.cmd.addtoplength}\IndexCmd{addtoplength} (see +\autoref{sec:\LabelBase.pseudoLength}). + +\KOMAScript{} comes provided with some \File{lco} files. The \File{DIN.lco}, +\File{DINmtext.lco}, +\File{DIN5008A.lco}\ChangedAt{v3.26}{\File{DIN5008A.lco}}, +\File{DIN5008B.lco}\ChangedAt{v3.26}{\File{DIN5008B.clo}}, \File{SNleft.lco}, +\File{SN.lco}, \File{UScommercial9}, \File{UScommercial9DW}, and +\File{NF.lco}\ChangedAt{v3.04}{\Class{scrlttr2}} files serve to adapt +\Class{scrlttr2} and \Package{scrletter} to different standards. They are well +suited as templates for your own parameter sets as you become a \KOMAScript{} +expert. The \File{KOMAold.lco} file, on the other hand, serves to improve +compatibility with the old letter class \Class{scrlettr}. This class was +removed from \KOMAScript{} over fifteen years ago. It is therefore not +discussed in any detail. Since this file also contains internal commands that +are not released for package writers, you should not use this as a template +for your own \File{lco} files. You can find a list of predefined \File{lco} +files in \autoref{tab:lcoFiles}, \autopageref{tab:lcoFiles}. + +If you have defined a parameter set for a letter standard that is not yet +supported by \KOMAScript{}, you are explicitly requested to send this +parameter set to the \KOMAScript{} support address. Please also provide +permission for distribution under the \KOMAScript{} license (see the +\File{lppl.txt} file). If you have the necessary measurements for an +unsupported letter standard but are unable to write a corresponding \File{lco} +file yourself, you can also contact the \KOMAScript{} author, Markus Kohm, +directly. you can find further examples of \File{lco} files, some very +complex, at \cite{homepage} or in \cite{DANTE:TK0203:MJK}. Both sites are +mainly in German. + + +\begin{Declaration} + \Macro{LoadLetterOption}\Parameter{name}% + \Macro{LoadLetterOptions}\Parameter{list of names} +\end{Declaration} +With \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} you can load \File{lco} files +with the \Macro{documentclass} command. To do so, give the name of the +\File{lco} file without the extension as an option\Index{option}. The +\File{lco} file is then loaded directly after the class. The +\Package{scrletter}\textnote{Attention!} package does not offer this option. +To load \File{lco} files, you must use \Macro{LoadLetterOption} or +\Macro{LoadLetterOptions}\ChangedAt{v3.14}{\Class{scrlttr2}}. +This\textnote{Recommendation!} is also recommended for \Class{scrlttr2}. + +You can also use \Macro{LoadLetterOption} and \Macro{LoadLetterOptions} after +\Macro{begin}\PParameter{document}, or even from within another \File{lco} +file. Both commands take the \PName{name} of the \File{lco} file without the +extension. While the argument of \Macro{LoadLetterOption} should be exactly +one \File{lco} file, \Macro{LoadLetterOptions} accepts a comma-separated +\PName{list of names}. The corresponding \File{lco} files with those names are +loaded in the order given by the list. +\begin{Example} + Joe Public also writes a document containing several letters. For most of + them, the default format, which follows the format of the German Institute + for Standardisation, or \emph{Deutsches Institut f\"{u}r Normung} (DIN), is + sufficient. So he starts with: +\begin{lstcode} + \documentclass{scrlttr2} +\end{lstcode} + However, he wants to send one letter in a C6/5 envelope, and so he + uses the \File{DINmtext} variant, in which the + address field appears higher on the page, so that more text + fits on the first page. The fold marks are adjusted so that the + address field still fits the address window in a C6/5 envelope. + He achieves this as follows: +\begin{lstcode} + \begin{letter}{% + Joanna Public\\ + 1 Hillside\\ + SAMPLESTEAD\\ + WX12 3YZ} + \LoadLetterOption{DINmtext} + \opening{Hello,} +\end{lstcode} + Since construction of the first page only really begins with the + \DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} command, you only need to + load the \File{lco} file before this point. In particular, you do not need + to load it before \Macro{begin}\PParameter{letter}. That way the changes + made by loading the \File{lco} file are local to the corresponding letter. +\end{Example} + +If\ChangedAt{v2.97}{\Class{scrlttr2}} an \File{lco} file is loaded via +\Macro{documentclass}, then it must not have the same name as an option. + +\begin{Example} + Since Mr Public often writes letters with the same options and parameters, + he finds it quite annoying to copy this information to each new letter. To + simplify the effort of writing a new letter, he therefore creates an + \File{lco} file:% + \lstinputcode[xleftmargin=1em]{ich.lco}% + With this, the size of his letter from the previous example shrinks + considerably: \lstinputcode[xleftmargin=1em]{letter-example-23-en.tex}% + Nevertheless, the result does not change, as shown in + \autoref{fig:\LabelBase.letter-23}. + \begin{figure} + \setcapindent{0pt}% + \begin{captionbeside}[{Example: letter with extended sender, logo, + recipient, extra sender information, place, date, subject, + opening, text, closing, modified signature, postscript, distribution + list, enclosure, and hole-punch mark using an \File{lco} file}] + {result of a short letter with extended sender, logo, recipient, + extra sender information, place, date, subject opening, text, + closing, modified signature, postscript, distribution list, enclosure + and hole-punch mark using an \File{lco} file}[l] + \frame{\includegraphics[width=.4\textwidth]{letter-example-23-en}} + \end{captionbeside} + \label{fig:\LabelBase.letter-23} + \end{figure} +\end{Example} + +Note\textnote{Attention!} that immediately after loading the document class, +normally neither a package for the input encoding nor a language package has +been loaded. Because of this, you should use \TeX's 7-bit encoding for all +non-ASCII characters. For example, use ``\Macro{ss}'' to produce a German +``\ss''. + +In \autoref{tab:lcoFiles}, \autopageref{tab:lcoFiles} you can find a list of +all predefined \File{lco} files. If\textnote{Attention!} you use a printer +that has large unprintable areas on the left or right side, you might have +problems with the \Option{SN}\IndexOption{SN} option. Since the Swiss standard +SN~101\,130 stipulates that the address field should be placed 8\Unit{mm} from +the right edge of the paper, the headline and the sender attributes are also +placed at a correspondingly small distance from the paper edge. This also +applies to the reference line when using the +\DescRef{\LabelBase.option.refline}\PValue{=wide} option (see +\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.refline}). +If\textnote{Hint!} you have this kind of problem, create your own \File{lco} +file that loads \Option{SN} first and then changes +\PLength{toaddrhpos}\IndexPLength{toaddrhpos} (see +\autoref{sec:\LabelBase.addressee}, +\DescPageRef{\LabelBase.plength.toaddrvpos}) to a smaller value. In +addition, you should also reduce \PLength{toaddrwidth} accordingly.% + +By\textnote{Hint!} the way, the \File{DIN} \File{lco} file is always loaded +automatically as the first \File{lco} file. This ensures that all +pseudo-lengths will have more or less reasonable default values. Therefore you +do not need to load this default file on your own. + +With regard to the \File{lco} files \File{DIN5008A} and \File{DIN5008B}, it +should be noted that the corresponding regulations have certain leeway and, as +can be seen from various inquiries to the author, many users only wish to make +full use of these leeway, but also prefer one or the other deviation from the +standard. However, the two files implement only one interpretation of the +standard. The reader should therefore be reminded that these files are to be +understood only as templates, in order to facilitate the creation of own +adapted \File{lco} files.% +% +\begin{desclist} + \renewcommand*{\abovecaptionskipcorrection}{-\normalbaselineskip}% + \desccaption{% + Predefined \File{lco} files\label{tab:lcoFiles}% + }{% + Predefined \File{lco} files (\emph{continued})% + }% + \oentry{DIN}{% + \leavevmode% + \IndexOption[indexmain]{DIN}\IndexFile[indexmain]{DIN.lco}% + parameters for letters on A4 paper, complying with German standard + DIN~676; suitable for window envelopes in the sizes C4, C5, C6, and C6/5 + (C6 long).}% + \oentry{DINmtext}{% + \leavevmode% + \IndexOption[indexmain]{DINmtext}\IndexFile[indexmain]{DINmtext.lco}% + parameters for letters on A4 paper, complying with DIN~676 but using an + alternate layout with more text on the first page; only suitable for + window envelopes in the sizes C6 and C6/5 (C6 long).}% + \oentry{KakuLL}{% + \leavevmode% + \IndexOption[indexmain]{KakuLL}\IndexFile[indexmain]{KakuLL.lco}% + parameters for Japanese letters on A4 paper; suitable for Japanese + window envelopes of type Kaku A4, in which the window is approximately + 90\Unit{mm} wide by 45\Unit{mm} high, and positioned 25\Unit{mm} from the + left and 24\Unit{mm} from the top edge (see \autoref{cha:japanlco}).}% + \oentry{KOMAold}{% + \leavevmode% + \IndexOption[indexmain]{KOMAold}\IndexFile[indexmain]{KOMAold.lco}% + parameters for letters on A4 paper using a layout close to that of the + obsolete \Class{scrlettr} letter class; suitable for window envelopes in + the sizes C4, C5, C6, and C6/5 (C6 long); some additional commands to + improve compatibility with obsolete \Class{scrlettr} commands are defined; + \Class{scrlttr2} may behave slightly differently with this \File{lco} file + than with the other \File{lco} files.}% + \oentry{NF}{% + \leavevmode% + \IndexOption[indexmain]{NF}\IndexFile[indexmain]{NF.lco}% + parameters for French letters, complying with NF~Z~11-001; suitable for + window envelopes of type DL (110\Unit{mm} by 220\Unit{mm}) with a window + 45\Unit{mm} wide by 100\Unit{mm} high placed about 20\Unit{mm} from the + lower right edge; this file was originally developed by Jean-Marie + Pacquet, who also provides LyX integration in addition to extensions at + \cite{www:NF.lco}.}% + \oentry{NipponEH}{% + \leavevmode% + \IndexOption[indexmain]{NipponEH}\IndexFile[indexmain]{NipponEH.lco}% + parameters for Japanese letters on A4 paper; suitable for Japanese + window envelopes of types Chou or You 3 or 4, in which the window is + approximately 90\Unit{mm} wide by 55\Unit{mm} high, and positioned + 22\Unit{mm} from the left and 12\Unit{mm} from the top edge (see + \autoref{cha:japanlco}).}% + \oentry{NipponEL}{% + \leavevmode% + \IndexOption[indexmain]{NipponEL}\IndexFile[indexmain]{NipponEL.lco}% + parameters for Japanese letters on A4 paper; suitable for Japanese + window envelopes of types Chou or You 3 or 4, in which the window is + approximately 90\Unit{mm} wide by 45\Unit{mm} high, and positioned + 22\Unit{mm} from the left and 12\Unit{mm} from the top edge (see + \autoref{cha:japanlco}).}% + \oentry{NipponLH}{% + \leavevmode% + \IndexOption[indexmain]{NipponLH}\IndexFile[indexmain]{NipponLH.lco}% + parameters for Japanese letters on A4 paper; suitable for Japanese + window envelopes of types Chou or You 3 or 4, in which the window is + approximately 90\Unit{mm} wide by 55\Unit{mm} high, and positioned + 25\Unit{mm} from the left and 12\Unit{mm} from the top edge (see + \autoref{cha:japanlco}).}% + \oentry{NipponLL}{% + \leavevmode% + \IndexOption[indexmain]{NipponLL}\IndexFile[indexmain]{NipponLL.lco}% + parameters for Japanese letters on A4 paper; suitable for Japanese + window envelopes of types Chou or You 3 or 4, in which the window is + approximately 90\Unit{mm} wide by 45\Unit{mm} high, and positioned + 25\Unit{mm} from the left and 12\Unit{mm} from the top edge (see + \autoref{cha:japanlco}).}% + \oentry{NipponRL}{% + \leavevmode% + \IndexOption[indexmain]{NipponRL}\IndexFile[indexmain]{NipponRL.lco}% + parameters for Japanese letters on A4 paper; suitable for Japanese + window envelopes of types Chou or You 3 or 4, in which the window is + approximately 90\Unit{mm} wide by 45\Unit{mm} high, and positioned + 25\Unit{mm} from the left and 24\Unit{mm} from the top edge (see + \autoref{cha:japanlco}).}% + \oentry{SN}{% + \leavevmode% + \IndexOption[indexmain]{SN}\IndexFile[indexmain]{SN.lco}% + parameters for Swiss letters with the address field on the right side, + according to SN~010\,130; suitable for Swiss window envelopes in the sizes + C4, C5, C6, and C6/5 (C6 long).}% + \oentry{SNleft}{% + \leavevmode% + \IndexOption[indexmain]{SNleft}\IndexFile[indexmain]{SNleft.lco}% + parameters for Swiss letters with the address field on the left side; + suitable for Swiss window envelopes with the window on the left side in + the sizes C4, C5, C6, and C6/5 (C6 long).}% + \oentry{UScommercial9}{% + \leavevmode% + \IndexOption[indexmain]{UScommercial9}% + \IndexFile[indexmain]{UScommercial9.lco}% + parameters for US letters on American letter paper; suitable for + \emph{commercial~No.\,9} US window envelopes with a window 4\,1/2\Unit{in} + wide by 1\,1/8\Unit{in} high, positioned 7/8\Unit{in} from the left and + 1/2\Unit{in} from the bottom, without the return address inside the + window; when folded first at the middle mark then at the top fold mark, + legal paper can also be used but results in a paper-size warning}% + \oentry{UScommercial9DW}{% + \leavevmode% + \IndexOption[indexmain]{UScommercial9DW}% + \IndexFile[indexmain]{UScommercial9DW.lco}% + parameters for US letters on American letter paper; suitable for + \emph{commercial~No.\,9} US window envelopes with an recipient-address + window 3\,5/8\Unit{in} wide by 1\,1/8\Unit{in} high, positioned + 3/4\Unit{in} from the left and 1/2\Unit{in} from the bottom, and with a + return-address window 3\,1/2\Unit{in} wide by 7/8\Unit{in} high, + positioned 5/16\Unit{in} from the left and 2\,1/2\Unit{in} from the + bottom; when folded first at the middle mark and then at the top fold + mark, legal paper can also be used but results in a paper-size warning}% +\end{desclist} +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Address Files and Form Letters} +\seclabel{addressFile}% +\BeginIndexGroup +\BeginIndex{}{address>file}% +\BeginIndex{}{form letters}% +\index{serial letters|see form letters}% +\index{circular letters|see form letters}% + +One of the most annoying things about creating form letters is typing up +the different addresses. \KOMAScript{} provides basic support for this task% +\iffalse% Umbruchkorrekturtext +, as did its predecessor \Class{scrlettr}% +\fi% +.% +\iffalse% Umbruchkorrekturtext +\ Currently there are plans for greatly enhanced support.% +\fi + +\begin{Declaration} + \Macro{adrentry}\Parameter{last~name}\Parameter{first~name}% + \Parameter{address}\Parameter{phone}\Parameter{F1}\Parameter{F2}% + \Parameter{comment}\Parameter{key} +\end{Declaration}% +\Class{scrlttr2} and \Package{scrletter} can evaluate address files. +This can be very useful for form letters. An address file must have the +extension \File{.adr} and consists of a number \Macro{adrentry} entries. +An individual entry consists of eight parameters and may look, for example, +like this: +\begin{lstcode} + \adrentry{McEnvy} + {Flann} + {1 High Street\\ Glasgow} + {0141 123 4567} + {builder} + {} + {buys everything} + {FLANN} +\end{lstcode} +You can use the fifth and sixth elements, \PValue{F1} and \PValue{F2}, for +anything you want. Gender, academic grade, birth date, or the date the person +joined a society are all possibilities. The last parameter, \PName{key}, +should consist of more than one letter and be upper-case only so as not to +interfere with existing \TeX{} or \LaTeX{} commands. + +\begin{Example} + Mr McEnvy is one of your most important business partners. Since you + maintain a frequent correspondence with him, it is too tedious to + enter all his data again and again. \KOMAScript{} will do this work for you. + For example, if you have saved your customer contacts in the + \File{partners.adr} address file and you would like to write a letter to + Mr~McEnvy, you can save a great deal of effort by typing: + \begin{lstcode} + \input{partners.adr} + \begin{letter}{\FLANN} + Your correspondence of today \dots + \end{letter} + \end{lstcode} + Please make sure that your {\TeX} system can access your address file. + Otherwise the \Macro{input} command results in an error message. You can + either put your address file in the same directory as your letter or + configure your \TeX{} system to look for a dedicated address directory. +\end{Example} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{addrentry}\Parameter{last-name}\Parameter{first-name}% + \Parameter{address}\Parameter{phone}\Parameter{F1}\Parameter{F2}% + \Parameter{F3}\Parameter{F4}\Parameter{key} +\end{Declaration}% +Before you object that a total of two free parameters is too few, +\KOMAScript{} alternatively offers the \Macro{addrentry} command\,---\,note +the additional ``d''\,---\,which adds two more freely definable parameters but +omits the comment parameter. Otherwise, you can use this command in exactly +the same way as \DescRef{\LabelBase.cmd.adrentry}. + +Both \DescRef{\LabelBase.cmd.adrentry} and \Macro{addrentry} commands can be +freely mixed in the \File{adr} files. I should note, however, that other +packages may not be designed to use \Macro{addrentry}. If necessary, you have +to create the appropriate extensions yourself.% +% +\EndIndexGroup + +In addition to simplifying access to addresses, you can also use the +\File{adr} files to create circulars or form letters. Thus you can create such +mass mailings without a complicated connection to a database system. +% +\begin{Example} + You want to sent a form letter to all members of your fishing club to invite + them to the next general meeting. +\begin{lstcode} + \documentclass{scrlttr2} + \begin{document} + \renewcommand*{\adrentry}[8]{% + \begin{letter}{#2 #1\\#3} + \opening{Dear members,} + Our next general meeting will be on + Monday, 12 August 2002. + + The following topics are \dots + \closing{Regards,} + \end{letter} + } + \input{members.adr} + \end{document} +\end{lstcode} + If the address file also contains \DescRef{\LabelBase.cmd.addrentry} + commands, you must add a corresponding definition before loading the address + file: +\begin{lstcode} + \renewcommand*{\addrentry}[9]{% + \adrentry{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#9}% + } +\end{lstcode} + In this example, the extra freely-definable parameter is not used, and + therefore \DescRef{\LabelBase.cmd.addrentry} is defined using + \DescRef{\LabelBase.cmd.adrentry}. +\end{Example} + +Of course, the letter's contents can also be adapted to the characteristics of +the address data. You can use the free parameters of the +\DescRef{\LabelBase.cmd.adrentry} and \DescRef{\LabelBase.cmd.addrentry} +commands for this. +\begin{Example} + Suppose you use the fifth parameter of the \DescRef{\LabelBase.cmd.adrentry} + command to indicate the gender of a club member (\PValue{m/f}), and the + sixth parameter to indicate the amount of membership dues that is unpaid. + If you would like to write a reminder to each such member and address them + personally, the next example will help you: +\begin{lstcode} + \renewcommand*{\adrentry}[8]{ + \ifdim #6pt>0pt\relax + % #6 is an amount (floating-point number) greater than 0. + % Thus, this selects all members owing dues. + \begin{letter}{#2 #1\\#3} + \if #5m \opening{Dear Mr #2,} \fi + \if #5f \opening{Dear Ms #2,} \fi + + Unfortunately, we have noticed that you are in arrears + with the payment of your membership fees. + + Please remit the outstanding balance of \pounds #6 to the club + account. + \closing{Regards,} + \end{letter} + \fi + } +\end{lstcode} +\end{Example} +It is therefore possible to tailor the text of the letter to the specific +characteristics of the recipient and create the impression of a personal +letter. The extent of the customisation is only limited by the maximum number +of two free \DescRef{\LabelBase.cmd.adrentry} parameters and four free +\DescRef{\LabelBase.cmd.addrentry} parameters. + + +\begin{Declaration} + \Macro{adrchar}\Parameter{initial letter}% + \Macro{addrchar}\Parameter{initial letter} +\end{Declaration} +\Index[indexmain]{address>list}\Index[indexmain]{telephone directory}% +It is possible to create address lists and telephone directories using +\File{adr} files. You also need the \Package{adrconv}\IndexPackage{adrconv} +package by Axel Kielhorn (see \cite{package:adrconv}). This package contains +interactive \LaTeX{} documents which make it easy to create such lists. + +The address files have to be sorted already in order to obtain sorted lists. +It is advisable to insert an \Macro{adrchar} or \Macro{addrchar} command +containing the initial letter of the \PName{last name} before the point in the +list where this letter changes. \Class{scrlettr2} and \Package{scrletter} will +ignore these commands. +% +\begin{Example} + Suppose you have the following, rather tiny address file from which you + want to create an address book: +\begin{lstlisting} + \adrchar{A} + \adrentry{Angel}{Gabriel} + {Cloud 3\\12345 Heaven's Realm} + {000\,01\,02\,03}{}{}{archangel}{GABRIEL} + \adrentry{Angel}{Michael} + {Cloud 3a\\12345 Heaven's Realm} + {000\,01\,02\,04}{}{}{archangel}{MICHAEL} + \adrchar{K} + \adrentry{Kohm}{Markus} + {Freiherr-von-Drais-Stra\ss e 66\\68535 Edingen-Neckarhausen} + {+49~62\,03~1\,??\,??}{}{}{no angel at all} + {KOMA} +\end{lstlisting} + You can now process these entries using the \File{adrdir.tex} document from + \cite{package:adrconv}. The result looks something like this: + \begin{center} + \setlength{\unitlength}{1mm} + \begin{picture}(80,57) + \put(0,57){\line(1,0){80}} + \put(0,3){\line(0,1){54}} + \put(80,3){\line(0,1){54}} + \thicklines + \put(10,42){\line(1,0){60}} + \put(70,45){\makebox(0,0)[r]{\textsf{\textbf{A}}}} + \put(10,23){\makebox(0,20)[l]{\parbox{5cm}{\raggedright + \textsc{Angel}, Gabriel\\\quad\small Cloud 3\\ + \quad 12345 Heaven's Realm\\ + \quad (archangel)}}} + \put(70,23){\makebox(0,20)[r]{\parbox{2cm}{\raggedright~\\ + \small~\\\textsc{gabriel}\\000\,01\,02\,03}}} + \put(10,4){\makebox(0,20)[l]{\parbox{5cm}{\raggedright + \textsc{Angel}, Michael\\\quad\small Cloud 3a\\ + \quad 12345 Heaven's Realm\\ + \quad (archangel)}}} + \put(70,4){\makebox(0,20)[r]{\parbox{2cm}{\raggedright~\\ + \small~\\\textsc{michael}\\000\,01\,02\,04}}} + \qbezier(0,3)(10,6)(40,3)\qbezier(40,3)(60,0)(80,3) + \end{picture} + \end{center} + The letter in the header is generated by answering ``no'' to the + question ``Names in the header?'' See explanation in \File{adrdir.tex}. +\end{Example} + +Package \Package{adrconv}\IndexPackage{adrconv} can also be used to create +address files compatible with the \KOMAScript{} letter class or package or +with the \Package{scraddr} package from an address database in \BibTeX{} +format containing entries like: +\begin{lstlisting}[morekeywords={@address}] + @address{HMUS, + name = {Carl McExample}, + title = {Dr.}, + city = {Anywhere}, + zip = 01234, + country = {Great Britain}, + street = {A long Road}, + phone = {01234 / 5 67 89}, + note = {always forget his birthday}, + key = {HMUS}, + } +\end{lstlisting} +You can find more about the \Package{adrconv}\IndexPackage{adrconv} package in +its documentation.% +% +\EndIndexGroup +% +\EndIndexGroup +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrlttr2-examples.dtx b/macros/latex/contrib/koma-script/doc/scrlttr2-examples.dtx new file mode 100644 index 0000000000..c56aa1bcca --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlttr2-examples.dtx @@ -0,0 +1,409 @@ +% \iffalse +% ====================================================================== +% scrlttr2-examples.dtx +% Copyright (c) Markus Kohm, 2008-2022 +% +% 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.md. +% ====================================================================== +% +% Generation of letter example files for scrlttr2 chapter. +% +% ====================================================================== +%<*ins> +\def\batchfile{scrlttr2-examples.dtx} +\input docstrip.tex + +\keepsilent +\askforoverwritefalse + +\generate{% + \nopreamble\nopostamble + \file{musterlogo.eps}{\from{scrlttr2-examples.dtx}{logo}}% +} + +\generate{% + \nopreamble\nopostamble + \file{ich.lco}{\from{scrlttr2-examples.dtx}{lco,23,ngerman}}% + \file{me.lco}{\from{scrlttr2-examples.dtx}{lco,23,english}}% +} + +\generate{% + \nopreamble\nopostamble + \file{letter-example-00-en.tex}{% + \from{scrlttr2-examples.dtx}{example,0,english}}% + \file{letter-example-01-en.tex}{% + \from{scrlttr2-examples.dtx}{example,1,english}}% + \file{letter-example-02-en.tex}{% + \from{scrlttr2-examples.dtx}{example,2,english}}% + \file{letter-example-03-en.tex}{% + \from{scrlttr2-examples.dtx}{example,3,english}}% + \file{letter-example-04-en.tex}{% + \from{scrlttr2-examples.dtx}{example,4,english}}% + \file{letter-example-05-en.tex}{% + \from{scrlttr2-examples.dtx}{example,5,english}}% + \file{letter-example-06-en.tex}{% + \from{scrlttr2-examples.dtx}{example,6,english}}% + \file{letter-example-07-en.tex}{% + \from{scrlttr2-examples.dtx}{example,7,english}}% + \file{letter-example-08-en.tex}{% + \from{scrlttr2-examples.dtx}{example,8,english}}% + \file{letter-example-09-en.tex}{% + \from{scrlttr2-examples.dtx}{example,9,english}}% + \file{letter-example-10-en.tex}{% + \from{scrlttr2-examples.dtx}{example,10,english}}% + \file{letter-example-11-en.tex}{% + \from{scrlttr2-examples.dtx}{example,11,english}}% + \file{letter-example-12-en.tex}{% + \from{scrlttr2-examples.dtx}{example,12,english}}% + \file{letter-example-13-en.tex}{% + \from{scrlttr2-examples.dtx}{example,13,english}}% + \file{letter-example-14-en.tex}{% + \from{scrlttr2-examples.dtx}{example,14,english}}% + \file{letter-example-15-en.tex}{% + \from{scrlttr2-examples.dtx}{example,15,english}}% + \file{letter-example-16-en.tex}{% + \from{scrlttr2-examples.dtx}{example,16,english}}% + \file{letter-example-17-en.tex}{% + \from{scrlttr2-examples.dtx}{example,17,english}}% + \file{letter-example-18-en.tex}{% + \from{scrlttr2-examples.dtx}{example,18,english}}% + \file{letter-example-19-en.tex}{% + \from{scrlttr2-examples.dtx}{example,19,english}}% + \file{letter-example-20-en.tex}{% + \from{scrlttr2-examples.dtx}{example,20,english}}% + \file{letter-example-21-en.tex}{% + \from{scrlttr2-examples.dtx}{example,21,english}}% + \file{letter-example-22-en.tex}{% + \from{scrlttr2-examples.dtx}{example,22,english}}% + \file{letter-example-23-en.tex}{% + \from{scrlttr2-examples.dtx}{example,23,english}}% + \file{letter-example-label-en.tex}{% + \from{scrlttr2-examples.dtx}{example,label,english}}% + \file{letter-example-nipponA-en.tex}{% + \from{scrlttr2-examples.dtx}{example,22,nipponA,english}}% + \file{letter-example-nipponB-en.tex}{% + \from{scrlttr2-examples.dtx}{example,22,nipponB,english}}% + \file{letter-example-00-de.tex}{% + \from{scrlttr2-examples.dtx}{example,0,ngerman}}% + \file{letter-example-01-de.tex}{% + \from{scrlttr2-examples.dtx}{example,1,ngerman}}% + \file{letter-example-02-de.tex}{% + \from{scrlttr2-examples.dtx}{example,2,ngerman}}% + \file{letter-example-03-de.tex}{% + \from{scrlttr2-examples.dtx}{example,3,ngerman}}% + \file{letter-example-04-de.tex}{% + \from{scrlttr2-examples.dtx}{example,4,ngerman}}% + \file{letter-example-05-de.tex}{% + \from{scrlttr2-examples.dtx}{example,5,ngerman}}% + \file{letter-example-06-de.tex}{% + \from{scrlttr2-examples.dtx}{example,6,ngerman}}% + \file{letter-example-07-de.tex}{% + \from{scrlttr2-examples.dtx}{example,7,ngerman}}% + \file{letter-example-08-de.tex}{% + \from{scrlttr2-examples.dtx}{example,8,ngerman}}% + \file{letter-example-09-de.tex}{% + \from{scrlttr2-examples.dtx}{example,9,ngerman}}% + \file{letter-example-10-de.tex}{% + \from{scrlttr2-examples.dtx}{example,10,ngerman}}% + \file{letter-example-11-de.tex}{% + \from{scrlttr2-examples.dtx}{example,11,ngerman}}% + \file{letter-example-12-de.tex}{% + \from{scrlttr2-examples.dtx}{example,12,ngerman}}% + \file{letter-example-13-de.tex}{% + \from{scrlttr2-examples.dtx}{example,13,ngerman}}% + \file{letter-example-14-de.tex}{% + \from{scrlttr2-examples.dtx}{example,14,ngerman}}% + \file{letter-example-15-de.tex}{% + \from{scrlttr2-examples.dtx}{example,15,ngerman}}% + \file{letter-example-16-de.tex}{% + \from{scrlttr2-examples.dtx}{example,16,ngerman}}% + \file{letter-example-17-de.tex}{% + \from{scrlttr2-examples.dtx}{example,17,ngerman}}% + \file{letter-example-18-de.tex}{% + \from{scrlttr2-examples.dtx}{example,18,ngerman}}% + \file{letter-example-19-de.tex}{% + \from{scrlttr2-examples.dtx}{example,19,ngerman}}% + \file{letter-example-20-de.tex}{% + \from{scrlttr2-examples.dtx}{example,20,ngerman}}% + \file{letter-example-21-de.tex}{% + \from{scrlttr2-examples.dtx}{example,21,ngerman}}% + \file{letter-example-22-de.tex}{% + \from{scrlttr2-examples.dtx}{example,22,ngerman}}% + \file{letter-example-23-de.tex}{% + \from{scrlttr2-examples.dtx}{example,23,ngerman}}% + \file{letter-example-label-de.tex}{% + \from{scrlttr2-examples.dtx}{example,label,ngerman}}% + \file{letter-example-nipponA-de.tex}{% + \from{scrlttr2-examples.dtx}{example,22,nipponA,ngerman}}% + \file{letter-example-nipponB-de.tex}{% + \from{scrlttr2-examples.dtx}{example,22,nipponB,ngerman}}% +} + +\csname endinput\endcsname +% +% +% \begin{macrocode} +%<*lco&23> +%\ProvidesFile{me.lco}[2008/06/11 lco (Joe Public)] +%\ProvidesFile{ich.lco}[2008/06/11 lco (Peter Musterfrau)] +\KOMAoptions{foldmarks=true,foldmarks=blmtP, + fromphone,fromemail,fromlogo,subject=titled} +%<*english> +\setkomavar{fromname}{Joe Public} +\setkomavar{signature}{Joe Public\\ + (former chairman)} +% +%<*ngerman> +\setkomavar{fromname}{Peter Musterfrau} +\setkomavar{signature}{Peter Musterfrau\\ + (ehemaliger Vorsitzender)} +% +\renewcommand*{\raggedsignature}{\raggedright} +%<*english> +\setkomavar{fromaddress}{2 Valley\\ + SAMPLEBY\\ + ZY32 1XW} +% +%<*ngerman> +\setkomavar{fromaddress}{Hinter dem Tal 2\\ + 54321 Musterheim} +% +\setkomavar{fromphone}{0\,12\,34~56\,78} +%\setkomavar{fromemail}{joe@public.invalid} +%\setkomavar{fromemail}{Peter@Musterfrau.invalid} +\setkomavar{fromlogo}{% + \includegraphics{musterlogo}} +\setkomavar{location}{\raggedright +%<*english> + Club member no.~4711\\ + since 11.09.2001\\ + chairman 2003--2005} +\setkomavar{place}{Sampleby} +\setkomavar{frombank}{Bank of Friendly Greetings} +% +%<*ngerman> + Mitglied Nr.~4711\\ + seit dem 11.09.2001\\ + Vorsitzender in den Jahren 2003--2005} +\setkomavar{place}{Musterheim} +\setkomavar{frombank}{Bank freundlichen Gru\ss es} +% +% +%<*example> +%<*label> +\AtBeginDocument{% + \usepackage{xcolor,eso-pic}% + \BeforeClosingMainAux{% + \AddToShipoutPicture*{% + \thinlines\color{gray!50}% + \AtPageLowerLeft{% + \put(0,\LenToUnit{8mm}){% + \line(0,1){\LenToUnit{180mm}}% + }% + \multiput(\LenToUnit{70mm},\LenToUnit{8mm})(\LenToUnit{70mm},0){3}{% + \line(0,1){\LenToUnit{216mm}}% + }% + \multiput(0,\LenToUnit{8mm})(0,\LenToUnit{36mm}){6}{% + \line(1,0){\LenToUnit{210mm}}% + }% + \put(\LenToUnit{70mm},\LenToUnit{224mm}){% + \line(1,0){\LenToUnit{140mm}}% + }% + }\color{black}% + }% + }% +} +% +%<0|1|2|3|4|5>\documentclass[version=last]{scrlttr2} +%<6>\documentclass[version=last,fontsize=14pt]{scrlttr2} +%\documentclass[foldmarks=true,foldmarks=blmtP, +%\documentclass[foldmarks=true,locfield=wide, +%<8> fromalign=false, +%<9> fromalign=center, +%<10> fromalign=false,fromrule=aftername, +%<11> fromalign=center,fromrule=aftername, +%<12> fromalign=false,fromrule=afteraddress, +%<13|17> fromalign=center,fromrule=afteraddress, +%<14|16> fromrule=afteraddress, +%<15|18> fromalign=right,fromrule=afteraddress, +%<12|13|14|15> fromphone,fromemail, +%<16|17|18|19|20|21|22> fromphone,fromemail,fromlogo, +% fromphone=false,fromemail=false, +%<21|22> subject=titled, +% version=last]{scrlttr2} +%<23&ngerman>\documentclass[version=last,ich]{scrlttr2} +%<23&english>\documentclass[version=last,me]{scrlttr2} +%\LoadLetterOption{NipponLL} +%\LoadLetterOption{NipponEL} +%\documentclass[version=last,ich,settleford600label]{scrlttr2} +%\documentclass[version=last,me,settleford600label]{scrlttr2} +%\usepackage[ngerman]{babel} +%\usepackage[british]{babel} +%<16|17|18|19|20|21|22|23|label>\usepackage{graphics} +\begin{document} +%<*!0&!1&!2&!3&!4&!5&!6&!7&!23&!label> +%\setkomavar{fromname}{Joe Public} +%\setkomavar{fromname}{Peter Musterfrau} +%<*22> +%<*english> +\setkomavar{signature}{Joe Public\\ + (former chairman)} +% +%<*ngerman> +\setkomavar{signature}{Peter Musterfrau\\ + (ehemaliger Vorsitzender)} +% +\renewcommand*{\raggedsignature}{\raggedright} +% +%<*english> +\setkomavar{fromaddress}{2 Valley\\ + SAMPLEBY\\ + ZY32 1XW} +% +%<*ngerman> +\setkomavar{fromaddress}{Hinter dem Tal 2\\ + 54321 Musterheim} +% +%<*!9&!10&!11> +\setkomavar{fromphone}{0\,12\,34~56\,78} +%\setkomavar{fromemail}{joe@public.invalid} +%\setkomavar{fromemail}{Peter@Musterfrau.invalid} +%<*!12&!13&!14&!15> +\setkomavar{fromlogo}{\includegraphics{musterlogo}} +% +% +% +%<*19|20|21|22|23|label> +%<*!23&!label&!nipponA&!nipponB> +\setkomavar{location}{\raggedright +%<*english> + Club member no.~4711\\ + since 11.09.2001\\ + chairman 2003--2005} +% +%<*ngerman> + Mitglied Nr.~4711\\ + seit dem 11.09.2001\\ + Vorsitzender in den Jahren 2003--2005} +% +% +%<*20|21|22|23|label> +%\setkomavar{date}{29th February 2011} +%\setkomavar{date}{29. Februar 2011} +%<*!23&!label> +%\setkomavar{place}{Sampleby} +%\setkomavar{place}{Musterheim} +% +%<*21|22|23|label> +%\setkomavar{subject}{Missing general meeting} +%\setkomavar{subject}{Mitgliederversammlung vermisst} +% +% +% +%\begin{letter}{% +%<5>\begin{letter}[fontsize=14pt]{% +%<*english> + Joanna Public\\ + 1 Hillside\\ + SAMPLESTEAD\\ + WX12 3YZ% +% +%<*ngerman> + Petra Mustermann\\ + Vor dem Berg 1\\ + 12345 Musterhausen% +% + } +% +%<*!1> +%<*english> +\ps PS: I hope you do not take this request amiss. +% +%<*ngerman> +\ps PS: Ich hoffe, Du nimmst mir das nicht krumm. +% +%<*!2> +%<*!3> +%<*english> +\setkomavar*{enclseparator}{Enclosure} +\encl{Excerpt from the articles governing general + meetings} +% +%<*ngerman> +\setkomavar*{enclseparator}{Anlage} +\encl{Auszug aus der Satzung, in dem die + Mitgliederversammlungen geregelt sind} +% +% +%<*english> +\cc{executive board\\all members} +% +%<*ngerman> +\cc{Die Vereinsvorsitzende\\Alle Mitglieder} +% +% +% +% +\end{letter} +\end{document} +% +%<*logo> +%%! +%%BoundingBox: 0 0 72 72 +0 0 moveto +72 72 rlineto +72 neg 0 rlineto +72 72 neg rlineto +stroke +0 0 moveto +/Bitstream-Charter findfont +72 scalefont +setfont +(M) show +showpage +% +% \end{macrocode} +% +% \iffalse +\endinput + +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_US" +%%% eval: (flyspell-mode 1) +%%% End: +% \fi diff --git a/macros/latex/contrib/koma-script/doc/scrlttr2-experts-de.tex b/macros/latex/contrib/koma-script/doc/scrlttr2-experts-de.tex new file mode 100644 index 0000000000..15b71ccdab --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlttr2-experts-de.tex @@ -0,0 +1,943 @@ +% ====================================================================== +% scrlttr2-experts-de.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrlttr2 of the KOMA-Script guide expert part +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrlttr2-experts-de.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrlttr2 for experts)] + +\chapter{Zusätzliche Informationen zur + Klasse \Class{scrlttr2} und Paket \Package{scrletter}} +\labelbase{scrlttr2-experts} + +\BeginIndexGroup% +\BeginIndex{Class}{scrlttr2}% +In diesem Kapitel finden Sie zusätzliche Informationen zu der +\KOMAScript-Klasse \Class{scrlttr2}\important{\Class{scrlttr2}}. % +\iffree{Einige Teile des Kapitels sind dabei dem \KOMAScript-Buch + \cite{book:komascript} vorbehalten. Dies sollte kein Problem sein, denn + der}{Der} % +Anwender, der die Klasse einfach nur verwenden will, wird diese Informationen +normalerweise nicht benötigen. Ein Teil der Informationen richtet sich an +Anwender, denen die vordefinierten Möglichkeiten nicht genügen. So +befasst sich beispielsweise der erste Abschnitt ausführlich mit der Definition +und Verwendung von Variablen.% +\iffalse% Es wird Zeit das komplett rauszuwerfen! +\ Darüber hinaus finden sich in diesem Kapitel auch Informationen über +Möglichkeiten, die aus Gründen der Verbesserung der Kompatibilität zur +obsoleten \KOMAScript-Klasse \Class{scrlettr} geschaffen wurden. Es wird auch +ausführlich erklärt, wie man einen Brief dieser veralteten Klasse auf die +aktuelle Briefklasse übertragen kann. \fi + +\BeginIndex{Package}{scrletter}% +Darüber hinaus gibt es seit +\KOMAScript~3.15\ChangedAt[2014/11]{v3.15}{\Package{scrletter}} das Paket +\Package{scrletter}\important{\Package{scrletter}}, das zusammen mit einer der +\KOMAScript-Klassen \Class{scrartcl}, \Class{scrreprt} oder \Class{scrbook} +verwendet werden kann. Es stellt nahezu die komplette Funktionalität von +\Class{scrlttr2} für die drei genannten Klassen zur Verfügung. Einige wenige +Unterschiede gibt es jedoch, die ebenfalls in diesem Kapitel genannt werden.% + + +\section{Variablen für fortgeschrittene Anwender} +\seclabel{variables} +\BeginIndexGroup +\BeginIndex{}{Variablen} + +Neben der Möglichkeit, vordefinierte Variablen zu verwenden, bietet +\KOMAScript{} auch Anweisungen, um neue Variablen zu definieren oder deren +automatische Verwendung innerhalb der Geschäftszeile zu beeinflussen. + + +\begin{Declaration} + \Macro{newkomavar}\OParameter{Bezeichnung}\Parameter{Name} + \Macro{newkomavar*}\OParameter{Bezeichnung}\Parameter{Name} + \Macro{addtoreffields}\Parameter{Name} + \Macro{removereffields} + \Macro{defaultreffields} +\end{Declaration} +Mit \Macro{newkomavar} wird eine neue Variable definiert. Diese Variable wird +über \PName{Name} angesprochen. Optional kann eine \PName{Bezeichnung} für die +Variable \PName{Name} angegeben werden. Eine \PName{Bezeichnung} wird dabei im +Unterschied zu \PName{Name} nicht verwendet, um auf eine Variable +zuzugreifen. Vielmehr ist die \PName{Bezeichnung} eine Ergänzung zum Inhalt +einer Variable, die ähnlich ihrem Inhalt ausgegeben werden kann. + +Mit der Anweisung \Macro{addtoreffields} kann die Variable \PName{Name} der +Geschäftszeile\Index{Geschaeftszeile=Geschäftszeile}\textnote{Geschäftszeile} +(siehe \autoref{sec:scrlttr2.firstpage}, +\DescPageRef{scrlttr2.option.refline}) hinzugefügt werden. Dabei wird die +\PName{Bezeichnung} und der Inhalt der Variablen an das Ende der +Geschäftszeile angehängt, falls ihr Inhalt nicht leer ist. Die Sternvariante +\Macro{newkomavar*} entspricht der Variante ohne Stern mit anschließendem +Aufruf der Anweisung \Macro{addtoreffields}. Bei der Sternvariante wird die +Variable also automatisch zur Geschäftszeile hinzugefügt. +\begin{Example} + Angenommen, Sie benötigen in der Geschäftszeile ein zusätzliches Feld + für eine Durchwahl. Sie können das Feld dann wahlweise mit +\begin{lstcode} + \newkomavar[Durchwahl]{myphone} + \addtoreffields{myphone} +\end{lstcode} + oder kürzer mit +\begin{lstcode} + \newkomavar*[Durchwahl]{myphone} +\end{lstcode} + definieren. +\end{Example} +Im\textnote{Achtung!} Fall, dass eine Variable für die Geschäftszeile +definiert wird, sollten Sie immer eine Bezeichnung dafür angeben. + +Mit der Anweisung \Macro{removereffields} können alle Variablen aus der +Geschäftszeile entfernt werden. Dies betrifft auch die in der Klasse +vordefinierten Variablen. Die Geschäftszeile ist dann leer. Sie können dies +beispielsweise nutzen, wenn Sie die Reihenfolge der Variablen in der +Geschäftszeile ändern wollen. + +Zur Wiederherstellung der Reihenfolge der vordefinierten Variablen in der +Geschäftszeile dient \Macro{defaultreffields}. Dabei werden auch alle +selbst definierten Variablen aus der Geschäftszeile entfernt. + +Das\textnote{Achtung!} Datum sollte der Geschäftszeile nicht über die +Anweisung \Macro{addtoreffields} hinzugefügt werden. Stattdessen stellt man +mit Option \DescRef{scrlttr2.option.refline}% +\important{\OptionValueRef{scrlttr2}{refline}{dateleft}\\ + \OptionValueRef{scrlttr2}{refline}{dateright}\\ + \OptionValueRef{scrlttr2}{refline}{nodate}}% +\IndexOption{refline~=\textKValue{dateleft}}% +\IndexOption{refline~=\textKValue{dateright}}% +\IndexOption{refline~=\textKValue{nodate}} ein, ob das Datum links, rechts oder +gar nicht in der Geschäftszeile erscheinen soll. Diese Einstellungen haben +darüber hinaus auch einen Einfluss auf die Position des Datums, wenn gar keine +Geschäftszeile verwendet wird.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{usekomavar}\OParameter{Anweisung}\Parameter{Name} + \Macro{usekomavar*}\OParameter{Anweisung}\Parameter{Name} +\end{Declaration} +Die Anweisungen \DescRef{scrlttr2.cmd.usekomavar} und +\DescRef{scrlttr2.cmd.usekomavar*} sind wie alle Anweisungen, von denen es +eine Sternvariante gibt oder die ein optionales Argument besitzen, nicht voll +expandierbar. Bei Verwendung innerhalb von +\DescRef{scrlttr2.cmd.markboth}\IndexCmd{markboth}, +\DescRef{scrlttr2.cmd.markright}\IndexCmd{markright} oder ähnlichen +Anweisungen muss dennoch kein \Macro{protect}\IndexCmd{protect} vorangestellt +werden. Selbstverständlich gilt dies bei Verwendung von +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage} auch für +\DescRef{scrlayer-scrpage.cmd.markleft}\IndexCmd{markleft} (siehe +\autoref{sec:scrlayer-scrpage.pagestyle.content}, +\DescPageRef{scrlayer-scrpage.cmd.markleft}). Allerdings\textnote{Achtung!} +können die Anweisungen nicht innerhalb von +\Macro{MakeUppercase}\important{\Macro{MakeUppercase}}\IndexCmd{MakeUppercase} +und ähnlichen Anweisungen verwendet werden, die direkten Einfluss auf ihr +Argument haben. Diese Anweisungen können jedoch als optionales Argument +angegeben werden. So erhält man beispielsweise den Inhalt einer Variable in +Großbuchstaben mit: +\begin{lstcode}[escapeinside=><] + \usekomavar[\MakeUppercase]{>\PName{Name}<} +\end{lstcode} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifkomavarempty}\Parameter{Name}\Parameter{Wahr}\Parameter{Falsch} + \Macro{Ifkomavarempty*}\Parameter{Name}\Parameter{Wahr}\Parameter{Falsch} +\end{Declaration} +Für die exakte Funktion ist wichtig, dass der Inhalt der Variablen soweit +expandiert wird, wie dies mit \Macro{edef} möglich ist. Bleiben dabei +Leerzeichen oder unexpandierbare Makros wie \Macro{relax} übrig, so gilt der +Inhalt auch dann als nicht leer, wenn die Verwendung der Variablen zu keiner +Ausgabe führen würde. + +Auch\textnote{Achtung!} diese Anweisung kann nicht innerhalb von +\Macro{MakeUppercase} oder ähnlichen Anweisungen verwendet werden. Sie ist +jedoch robust genug, um beispielsweise als Argument von +\DescRef{scrlttr2.cmd.markboth} oder \DescRef{scrlttr2.cmd.footnote} zu +funktionieren.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{foreachkomavar}\Parameter{Variablenliste}\Parameter{Befehl} + \Macro{foreachnonemptykomavar}\Parameter{Variablenliste}\Parameter{Befehl} + \Macro{foreachemptykomavar}\Parameter{Variablenliste}\Parameter{Befehl} + \Macro{foreachkomavarifempty}\Parameter{Variablenliste} + \Parameter{Dann-Befehl}\Parameter{Sonst-Befehl} +\end{Declaration} +Mit\ChangedAt{v3.27}{\Class{scrlttr2}\and \Package{scrletter}} der Anweisung +\Macro{foreachkomavar} wird der angegebene \PName{Befehl} für jede Variable +aus der durch Komma separierten \PName{Variablenliste} ausgeführt. Dabei wird +der Name der jeweiligen Variablen als Argument an den \PName{Befehl} +angehängt. + +Die Anweisung \Macro{foreachnonemptykomavar} führt im Unterschied dazu +\PName{Befehl} nur aus, wenn \DescRef{\LabelBase.cmd.Ifkomavarempty} sie als +nicht leer erkennt. Leere Variablen in der \PName{Variablenliste} haben +dagegen keine Auswirkungen. + +Dagegen führt \Macro{foreachemptykomavar} den \PName{Befehl} aus, wenn die +Variable im Sinne von \DescRef{\LabelBase.cmd.Ifkomavarempty} leer ist. Nicht +leere Variablen in der \PName{Variablenliste} haben entsprechend keine +Auswirkungen. + +Die Anweisung \Macro{foreachkomavarifempty} ist quasi eine Verschmelzung +beider vorgenannten. Sie führt \PName{Dann-Befehl} für alle leeren Variablen +aus, während \PName{Sonst-Befehl} für die nicht leeren Variablen zur Anwendung +kommt. Wie bei \PName{Befehl} wird in beiden Fällen der Name der jeweiligen +Variable als Argument angehängt.% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Ergänzende Informationen zu den Seitenstilen} +\seclabel{pagestyleatscrletter} +\BeginIndexGroup +\BeginIndex{}{Seiten>Stil} + +\LoadNonFree{scrlttr2-experts}{0}% +\EndIndexGroup + +\iffalse% Wurde bereits in Kapitel 4.21 behandelt +\section{Unterschiede in der Behandlung von \File{lco}-Dateien bei + \Package{scrletter}} +\seclabel{lcoatscrletter} +\BeginIndexGroup +\BeginIndex{File}{lco} +\BeginIndex{}{lco-Datei=\File{lco}-Datei} + +In\ChangedAt{v3.15}{\Package{scrletter}} \autoref{sec:scrlttr2.lcoFile} wurde +erklärt, dass man \File{lco}-Dateien direkt über \Macro{documentclass} laden +kann. Für \Package{scrletter}\OnlyAt{\Package{scrlttr2}} wurde auf diese +Möglichkeit verzichtet. + +\begin{Declaration} + \Macro{LoadLetterOption}\Parameter{Name} + \Macro{LoadLetterOptions}\Parameter{Liste von Namen} +\end{Declaration} +Während für \Class{scrlttr2} lediglich empfohlen wird, \File{lco}-Dateien über +\DescRef{scrlttr2.cmd.LoadLetterOption} oder +\DescRef{scrlttr2.cmd.LoadLetterOptions} zu laden, ist dies für +\Package{scrletter} zwingend. Natürlich können die \File{lco}-Dateien auch +erst nach \Package{scrletter} geladen werden. +% +\EndIndexGroup +% +\EndIndexGroup +% +\fi + + +\section{\File{lco}-Dateien für fortgeschrittene Anwender} +\seclabel{lcoFile} +\BeginIndexGroup +\BeginIndex{File}{lco} +\BeginIndex{}{lco-Datei=\File{lco}-Datei} + +\BeginIndexGroup% +\BeginIndex{}{Papier>Format}% +Obwohl jedes von \hyperref[cha:typearea]{\Package{typearea}}% +\IndexPackage{typearea} einstellbare Format verwendbar ist, kann es bei der +Ausgabe der ersten Briefseite mit manchen Formaten zu unerwünschten +Ergebnissen kommen. Leider gibt es +keine allgemein gültigen Regeln, um die Position von Anschriftfeldern und +Ähnlichem für beliebige Papierformate zu berechnen. Vielmehr werden für +unterschiedliche Papierformate unterschiedliche Parameter benötigt.% + +%\subsection{Überwachung des Papierformats} +%\seclabel{papersize} + +Derzeit existieren Parametersätze und \File{lco}-Dateien für A4-Papier und +letter-Papier. Die Klasse \Class{scrlttr2} versteht aber theoretisch sehr viel +mehr Papierformate. Daher ist es notwendig zu überwachen, ob die korrekte +Papiergröße eingestellt ist. Dies gilt umso mehr, wenn \Package{scrletter} +verwendet wird, da die Einstellung der Papiergröße dann in erster Linie von +der verwendeten Klasse abhängt. + +\begin{Declaration} + \Macro{LetterOptionNeedsPapersize}% + \Parameter{Optionsname}\Parameter{Papiergröße} +\end{Declaration} +Damit man bei Verwendung einer in der \File{lco}-Datei nicht vorgesehenen +\PName{Papiergröße} zumindest gewarnt wird, sind in den +mit \KOMAScript{} ausgelieferten \File{lco}-Dateien +\Macro{LetterOptionNeedsPapersize}-Anweisungen zu finden. Als erstes Argument +wird dabei der Name der \File{lco}-Datei ohne die Endung »\File{.lco}« +übergeben. Als zweites Argument wird die Papiergröße übergeben, für die diese +\File{lco}-Datei gedacht ist. + +Werden \iffalse nacheinander \fi % Umbruchoptimierung +mehrere \File{lco}-Dateien geladen, so kann jede dieser +\File{lco}-Dateien eine Anweisung \Macro{LetterOptionNeedsPapersize} +enthalten. Innerhalb von \DescRef{scrlttr2.cmd.opening}\IndexCmd{opening} wird +jedoch nur auf die jeweils letzte angegebene \PName{Papiergröße} geprüft. Wie +das nachfolgende Beispiel zeigt, ist es daher für den versierten Anwender +leicht möglich, \File{lco}-Dateien mit Parametersätzen für andere +Papierformate zu schreiben. % +\iffalse% Umbruchoptimierung!!! +Wer allerdings nicht vor hat, selbst solche \File{lco}-Dateien zu schreiben, +der kann die Erklärung zu dieser Anweisung gleich wieder vergessen und auch +das Beispiel überspringen.% +\fi +\begin{Example} + \iffalse% Umbruchkorrektur + Nehmen wir einmal an, dass Sie A5-Papier in normaler Ausrichtung, also + hochkant oder portrait, für Ihre Briefe verwenden. Nehmen wir weiter an, + dass Sie diese in normale Fensterbriefumschläge im Format C6 stecken. % + \else% + Angenommen, Sie schreiben Briefe auf A5-Papier und stecken diese in + Fensterbriefumschläge im Format C6. % + \fi% + Damit wäre prinzipiell die Position des Adressfeldes die gleiche wie bei + einem % + \iffalse normalen Brief in A4 nach DIN\else Brief in A4\fi % Umbruchkorrektur + . Der Unterschied besteht \iffalse im Wesentlichen \fi% Umbruchkorrektur + darin, dass das A5-Papier nur einmal gefaltet werden muss. Sie wollen + deshalb verhindern, dass die obere und die untere Faltmarke gesetzt + wird. Dies erreichen Sie beispielsweise, indem Sie die Marken außerhalb des + Papiers platzieren. +\begin{lstcode} + \ProvidesFile{a5.lco} + [2002/05/02 letter class option] + \LetterOptionNeedsPapersize{a5}{a5} + \setplength{tfoldmarkvpos}{\paperheight} + \setplength{bfoldmarkvpos}{\paperheight} + \endinput +\end{lstcode} + Eleganter wäre es natürlich, die Marken mit Hilfe der Option + \DescRef{scrlttr2.option.foldmarks} abzuschalten. Außerdem muss auch noch + die Position des Seitenfußes, also die Pseudolänge + \DescRef{scrlttr2.plength.firstfootvpos}, + angepasst werden. Ich überlasse es dem Leser, dafür einen geeigneten Wert zu + ermitteln. Mit einer solchen \File{lco}-Datei ist es lediglich wichtig, dass + andere \File{lco}-Dateioptionen wie \File{SN} vor dem Laden von + »\File{a5.lco}«, angegeben werden. +\end{Example} +% +\EndIndexGroup% +\EndIndexGroup% +\ExampleEndFix + + +%\subsection{Positionen sichtbar machen} +%\seclabel{visualize} +%\BeginIndexGroup +\begin{Declaration} + \File{visualize.lco} +\end{Declaration} +\BeginIndex{Option}{visualize}% +Wenn man selbst \File{lco}-Dateien entwickelt, % +\iffalse beispielsweise \fi % Umbruchkorrektur +um die Positionen von % +\iffalse verschiedenen \fi % Umbruchkorrektur +Feldern des Briefbogens an eigene Wünsche % +\iffalse oder Notwendigkeiten \fi % Umbruchkorrektur +anzupassen, ist es hilfreich, wenn % +\iffalse zumindest \fi % Umbruchkorrektur +einige Elemente % +\iffalse direkt \fi % Umbruchkorrektur +sichtbar gemacht werden können. Zu diesem Zweck existiert die \File{lco}-Datei +\File{visualize.lco}\ChangedAt{v3.04}{\Class{scrlttr2}}% +\iffalse , die wie jede \File{lco}-Datei geladen werden +kann\fi % Umbruchkorrektur +. Allerdings ist das Laden dieser % +\iffalse \emph{Letter Class Option} \else \File{lco}-Datei +\fi% Umbruchkorrektur +auf die Dokumentpräambel beschränkt und seine Auswirkungen können nicht wieder +rückgängig gemacht werden. Die \File{lco}-Datei % +\iffalse bedient sich der \else benötigt die \fi % Umbruchkorrektur +Pakete \Package{eso-pic}\IndexPackage{eso-pic}% +\important[i]{\Package{eso-pic}, \Package{graphicx}} und +\Package{graphicx}\IndexPackage{graphicx}, die nicht zu \KOMAScript{} gehören. + +\begin{Declaration} + \Macro{showfields}\Parameter{Feldliste} +\end{Declaration} +Mit dieser Anweisung kann bei Verwendung von \File{visualize.lco} die +Visualisierung von Feldern des Briefbogens aktiviert werden. Das Argument +\PName{Feldliste} ist dabei eine durch Komma separierte Liste der Felder, die +visualisiert werden sollen. Folgende Felder werden derzeit unterstützt: +% \begin{labeling}[~--]{\PValue{location}} +\begin{description}\setkomafont{descriptionlabel}{} +\item[\PValue{test}] ist ein Testfeld der Größe 10\Unit{cm} auf 15\Unit{cm}, + das jeweils 1\Unit{cm} vom oberen und linken Papierrand entfernt ist. Dieses + Testfeld existiert zu Debuggingzwecken. Es dient als Vergleichsmaß für den + Fall, dass im Dokumenterstellungsprozess die Maße verfälscht werden. +\item[\PValue{head}] ist der Kopfbereich des Briefbogens. Es handelt sich hier + um ein nach unten offenes Feld. +\item[\PValue{foot}] ist der Fußbereich des Briefbogens. Es handelt sich hier + um ein nach unten offenes Feld. +\item[\PValue{address}] ist das Anschriftfenster. +\item[\PValue{location}] ist das Feld der Absenderergänzung. +\item[\PValue{refline}] ist die Geschäftszeile. Es handelt sich hier um ein + nach unten offenes Feld. +\end{description} +%\end{labeling}% +\BeginIndex{FontElement}{field}\LabelFontElement{field}% +Mit den Anweisungen \DescRef{scrlttr2.cmd.setkomafont} und +\DescRef{scrlttr2.cmd.addtokomafont} (siehe \autoref{sec:scrlttr2.textmarkup}, +\DescPageRef{scrlttr2.cmd.setkomafont}) für das Element +\FontElement{field}\important{\FontElement{field}} kann die Farbe der +Visualisierung geändert werden. Voreingestellt ist \Macro{normalcolor}.% +\EndIndex{FontElement}{field}% +% +\EndIndexGroup + + +\iffree{\begin{Declaration}}{\begin{Declaration}[0]}% Umbruchkorrektur + \Macro{setshowstyle}\Parameter{Stil} + \Macro{edgesize} +\end{Declaration} +In der Voreinstellung werden von \File{visualize.lco} die einzelnen Felder +durch Rahmen\important{\PValue{frame}} markiert. Dies entspricht dem +\PName{Stil} \PValue{frame}. Nach unten offene Felder werden nicht komplett +umrahmt, sondern unten offen mit kleinen Pfeilen dargestellt. Als Alternative +hierzu steht auch der \PName{Stil} \PValue{rule}\important{\PValue{rule}} zur +Verfügung. Dabei wird das Feld farbig hinterlegt. Hierbei kann nicht zwischen +geschlossenen und nach unten offenen Feldern unterschieden werden. Stattdessen +werden nach unten offene Felder mit einer Mindesthöhe dargestellt. Der +dritte\important{\PValue{edges}} verfügbare \PName{Stil} ist +\PValue{edges}. Dabei werden die Ecken der Felder markiert. Bei nach unten +offenen Feldern entfallen die unteren Eckmarkierungen. Die Größe der +Eckmarkierungen ist im Makro \Macro{edgesize} abgelegt und mit 1\Unit{ex} +voreingestellt.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{showenvelope}\AParameter{Breite\textup{,}Höhe} + \AParameter{HOffset\textup{,}VOffset} + \OParameter{Zusatz} + \Macro{showISOenvelope}\Parameter{Format}\OParameter{Zusatz} + \Macro{showUScommercial}\Parameter{Format}\OParameter{Zusatz} + \Macro{showUScheck}\OParameter{Zusatz} + \Macro{unitfactor} +\end{Declaration} +\iffalse% Umbruchkorrektur +Diese Anweisungen dienen bei Verwendung von \File{visualize.lco} dazu, eine +Seite mit einer Zeichnung eines Umschlags auszugeben. Der Umschlag wird dabei +immer um 90° gedreht auf einer eigenen Seite im Maßstab~1:1 ausgegeben. Das +Anschriftfenster wird automatisch aus den aktuellen Daten für die +Anschriftposition auf dem Briefbogen: \DescRef{scrlttr2.plength.toaddrvpos}, +\DescRef{scrlttr2.plength.toaddrheight}, +\DescRef{scrlttr2.plength.toaddrwidth} und +\DescRef{scrlttr2.plength.toaddrhpos}, erzeugt. Hierfür ist es notwendig zu +wissen, um welchen Wert der gefaltete Briefbogen auf jeder Seite kleiner als +die \PName{Breite} und \PName{Höhe} des Briefbogens ist. Sind diese beiden +Werte, \PName{HOffset} und \PName{VOffset}, bei \Macro{showenvelope} nicht +angegeben, so wird versucht, sie aus den Faltmarken und der Papiergröße selbst +zu berechnen.% +\else% +Diese Anweisungen von \File{visualize.lco} dienen dazu, eine Seite mit einer +um 90° gedrehten Zeichnung eines Umschlags im Maßstab~1:1 auszugeben. Das +Anschriftfenster wird automatisch aus den aktuellen Daten für die +Anschriftposition auf dem Briefbogen: \DescRef{scrlttr2.plength.toaddrvpos}, +\DescRef{scrlttr2.plength.toaddrheight}, +\DescRef{scrlttr2.plength.toaddrwidth} und +\DescRef{scrlttr2.plength.toaddrhpos}, erzeugt. Hierfür ist es notwendig zu +wissen, um welchen Wert der gefaltete Briefbogen auf jeder Seite kleiner als +die \PName{Breite} und \PName{Höhe} des Briefbogens ist. Sind diese beiden +Werte, \PName{HOffset} und \PName{VOffset}, bei \Macro{showenvelope} nicht +angegeben, so wird versucht, sie aus den Faltmarken und der Papiergröße zu +berechnen.% +\fi% + +Die Anweisungen \Macro{showISOenvelope}, \Macro{showUScommercial} und +\Macro{showUScheck} basieren auf \Macro{showenvelope}. Mit +\Macro{showISOenvelope} kann ein ISO-Umschlag im \PName{Format} C4, C5, C5/6, +DL\iffree{ (auch bekannt als C5/6)}{} oder C6 erzeugt werden. Mit +\Macro{showUScommercial} wird hingegen ein US-Commercial-Umschlag im +\PName{Format} 9 oder 10 ausgegeben. \Macro{showUScheck} schließlich ist für +Umschläge im US-Check-Format zuständig. + +\BeginIndex{FontElement}{letter}\LabelFontElement{letter}% +Innerhalb des Umschlags wird die Lage des Briefbogens gestrichelt +angedeutet. Die dabei verwendete Farbe kann mit Hilfe der Anweisungen +\DescRef{scrlttr2.cmd.setkomafont} und \DescRef{scrlttr2.cmd.addtokomafont} +(siehe \autoref{sec:scrlttr2.textmarkup}, +\DescPageRef{scrlttr2.cmd.setkomafont}) für das Element +\FontElement{letter}\important{\FontElement{letter}} verändert +werden. Voreingestellt ist \Macro{normalcolor}.% +\EndIndex{FontElement}{letter} + +\BeginIndex{FontElement}{measure}\LabelFontElement{measure}% +Die Umschlagzeichnung wird automatisch bemaßt. Die Farbe der Bemaßung und die +Größe von deren Beschriftung kann mit Hilfe der Anweisungen +\DescRef{scrlttr2.cmd.setkomafont} und \DescRef{scrlttr2.cmd.addtokomafont} +(siehe \autoref{sec:scrlttr2.textmarkup}, +\DescPageRef{scrlttr2.cmd.setkomafont}) für das Element +\FontElement{measure}\important{\FontElement{measure}} verändert +werden. Voreingestellt ist hier \Macro{normalcolor}. Die Bemaßung erfolgt in +Vielfachen von \Length{unitlength} mit einer maximalen Genauigkeit von +$1/\Macro{unitfactor}$, wobei die Genauigkeit der \TeX-Arithmetik die +tatsächliche Grenze darstellt. Voreingestellt ist 1. Eine Umdefinierung ist +mit \Macro{renewcommand} möglich.% +\EndIndex{FontElement}{measure} + +\begin{Example} + Es wird ein Beispielbrief im Format ISO~A4 erzeugt. Die unterstützten Felder + sollen zwecks Überprüfung ihrer Position mit gelben Rahmenlinien markiert + werden. Des Weiteren soll die Position des Fensters in einem Umschlag der + Größe~DL mit Hilfe einer Zeichnung überprüft werden. Die Maßlinien in dieser + Zeichnung sollen rot und die Maßzahlen in kleinerer Schrift ausgegeben + werden, wobei die Maßzahlen in cm mit einer Genauigkeit von 1\Unit{mm} + ausgegeben werden sollen. Der gestrichelte Briefbogen im Umschlag soll + hingegen grün eingefärbt werden. +\begin{lstcode} + \documentclass[visualize]{scrlttr2} + \usepackage{xcolor} + \setkomafont{field}{\color{yellow}} + \setkomafont{measure}{\color{red}\small} + \setkomafont{letter}{\color{green}} + \showfields{head,address,location,refline,foot} + \usepackage[ngerman]{babel} + \usepackage{lipsum} + \begin{document} + \setkomavar{fromname}{Peter Musterfrau} + \setkomavar{fromaddress}{Hinter dem Tal 2\\ + 54321 Musterheim} + \begin{letter}{% + Petra Mustermann\\ + Vor dem Berg 1\\ + 12345 Musterhausen% + } + \opening{Hallo,} + \lipsum[1] + \closing{Bis dann} + \end{letter} + \setlength{\unitlength}{1cm} + \renewcommand*{\unitfactor}{10} + \showISOenvelope{DL} + \end{document} +\end{lstcode} + Auf der ersten Seite findet sich nun der Briefbogen, auf der zweiten Seite + wird die Zeichnung des Umschlags ausgegeben. +\end{Example} + +Bezüglich der Bemaßung ist zu beachten, dass ungünstige Kombinationen von +\Length{unitlength} und \Macro{unitfactor} sehr schnell einen \TeX-Fehler der +Art \emph{arithmetic overflow} provozieren. Ebenso kann es geschehen, dass +ausgegebene Maßzahlen geringfügig vom tatsächlichen Wert abweichen. Beides +sind keine Fehler von \Option{visualize}, sondern lediglich +Implementierungsgrenzen. +% +\EndIndexGroup +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Unterstützung verschiedener Sprachen} +\seclabel{languages}% +\BeginIndexGroup% +\BeginIndex{}{Sprachen}% +\iffalse % Umbruchkorrektur +Die Klasse \Class{scrlttr2} und das Paket \Package{scrletter} unterstützen +viele Sprachen. Dazu zählen Deutsch (\PValue{german} für alte deutsche +Rechtschreibung, \PValue{ngerman} für neue deutsche Rechtschreibung, +\PValue{austrian} für Österreichisch mit alter deutscher Rechtschreibung und +\PValue{naustrian}\ChangedAt{v3.09}{\Class{scrlttr2}} für Österreichisch mit +neuer deutscher Rechtschreibung), +\PValue{nswissgerman}\ChangedAt{v3.13}{\Class{scrlttr2}} für Schweizer Deutsch +mit neuer Rechtschreibung und \PValue{swissgerman} für Schweizer Deutsch mit +alter Rechtschreibung, Englisch (unter anderem \PValue{english} ohne Angabe, +ob amerikanisches oder britisches Englisch, \PValue{american} und +\PValue{USenglish} für Amerikanisch, \PValue{british} und \PValue{UKenglish} +für Britisch), Französisch, Italienisch, Spanisch, Niederländisch, Kroatisch, +Finnisch, Norwegisch\ChangedAt{v3.02}{\Class{scrlttr2}}, +Schwedisch\ChangedAt{v3.08}{\Class{scrlttr2}}, +Polnisch\ChangedAt{v3.13}{\Class{scrlttr2}}, +Tschechisch\ChangedAt{v3.13}{\Class{scrlttr2}} und Slowakisch. + +Zwischen den Sprachen wird bei Verwendung des +\Package{babel}-Pakets\IndexPackage{babel} (siehe \cite{package:babel}) mit +der Anweisung \Macro{selectlanguage}\Parameter{Sprache} gewechselt. Andere +Pakete wie \Package{german}\IndexPackage{german} (siehe \cite{package:german}) +und \Package{ngerman}\IndexPackage{ngerman} (siehe \cite{package:ngerman}) +besitzen diese Anweisung ebenfalls. In der Regel erfolgt eine +Sprachumschaltung jedoch bereits aufgrund des Ladens eines solchen Pakets. +\iffalse% Umbruchkorrekturtext!!! +Näheres entnehmen Sie bitte der jeweiligen Anleitung.% +\fi% +\else% Diese neue Einleitung ist vorzuziehen! +Die Klasse \Class{scrlttr2} und das Paket \Package{scrletter} sind +multilingual angelegt. Sie unterstützen also die Verwendung von Paketen wie +\Package{babel} oder \Package{polyglossia}. Derzeit verfügbar sind Deutsch, +Englisch, Finnisch, Französisch, Italienisch, Kroatisch, Niederländisch, +Norwegisch\ChangedAt{v3.02}{\Class{scrlttr2}}, +Polnisch\ChangedAt{v3.13}{\Class{scrlttr2}}, +Schwedisch\ChangedAt{v3.08}{\Class{scrlttr2}}, Slowakisch, Spanisch und +Tschechisch\ChangedAt{v3.13}{\Class{scrlttr2}} in den Varianten, die durch die +auf \DescPageRef{\LabelBase.cmd.captionsenglish} und +\DescPageRef{\LabelBase.cmd.dateenglish} dokumentieren Befehle bestimmt sind.% +\fi% + +\iffalse% Umbruchkorrektur +Erlauben\textnote{Achtung!} Sie mir noch einen Hinweis zu den +Sprachumschaltpaketen. Das Paket +\Package{french}\IndexPackage{french}\important{\Package{french}} (siehe +\cite{package:french}) nimmt neben der Umdefinierung der Begriffe aus +\autoref{tab:\LabelBase.languageTerms}, +\autopageref{tab:\LabelBase.languageTerms} weitere Änderungen vor. So +definiert es etwa die Anweisung \DescRef{scrlttr2.cmd.opening} um. Dabei geht +es einfach davon aus, dass \DescRef{scrlttr2.cmd.opening} immer wie in der +Standardbriefklasse \Class{letter} definiert ist. Dies ist bei \KOMAScript{} +jedoch nicht der Fall. Das Paket \Package{french} zerstört deshalb die +Definition und arbeitet nicht korrekt mir \KOMAScript{} zusammen. Ich +betrachte dies als Fehler des Pakets \Package{french}, der obwohl schon vor +Jahrzehnten gemeldet, leider nie beseitigt wurde.% +\else% Diese neue Einleitung ist vorzuziehen! +Es gibt leider auch inkompatible Sprachpakete wie +\Package{french}\IndexPackage{french}\important{\Package{french}} (siehe +\cite{package:french}). Dieses definiert beispielsweise +\DescRef{scrlttr2.cmd.opening} in einer Weise um, die nicht für +\Class{scrlttr2} oder \Package{scrletter} geeignet ist. Das ist ein vor +Jahrzehnten gemeldeter Fehler von \Package{french}.% +\fi + +Wird das Paket \Package{babel}\IndexPackage{babel} für die +Umschaltung auf die Sprache verwendet, können vereinzelt ebenfalls +Probleme auftreten. Bei \Package{babel} lassen sich problematische Änderungen +einer Sprache jedoch meist gezielt abschalten.% +\iffalse% Das ist eigentlich überholt! +\ Ist das Paket \Package{french} nicht installiert, ergibt sich das Problem + mit \Package{babel} nicht. Ebenfalls existiert das Problem normalerweise + nicht, wenn man bei \Package{babel} anstelle der Sprache \PValue{french} + eine der Sprachen \PValue{acadian}, \PValue{canadien} oder \PValue{francais} + verwendet. +\fi + +\iffalse% Das ist ebenfalls überholt! +Mit Babel ab Version 3.7j tritt dieses Problem jedoch nur noch auf, wenn per +Option explizit angegeben wird, dass \Package{babel} das +\Package{french}-Paket verwenden soll. +% +\iftrue + % Umbruchoptimierungspassage + Kann nicht sicher gestellt werden, dass nicht eine alte Version von + \Package{babel} verwendet wird, so empfehle ich% + \iftrue + , mit +\begin{lstcode} + \usepackage[...,francais,...]{babel} +\end{lstcode} + französische Sprache auszuwählen. + \iffalse % + Gegebenenfalls ist dann aber trotzdem mit + \Macro{selectlanguage}\PParameter{french} auf Französisch umzuschalten.% + \fi% + \else % + \space bei \Package{babel} die Option \Option{frenchb}.% + \fi +\fi +\fi + +\iffalse + %\enlargethispage*{\baselineskip}% + Es ist nicht auszuschließen, dass mit anderen Sprachen und Paketen ähnliche + Probleme auf"|treten. +% \iffalse + \iftrue + Für Deutsch sind solche Probleme jedoch nicht bekannt und treten weder + mit den Paketen \Package{german}\IndexPackage{german} oder + \Package{ngerman}\IndexPackage{ngerman} noch mit \Package{babel} auf. + \else + Für Deutsch treten solche Probleme mit den Paketen + \Package{german}\IndexPackage{german}, + \Package{ngerman}\IndexPackage{ngerman} oder \Package{babel} jedoch nicht + auf. + \fi +% \fi +\fi + +% Hinweis: Der folgende Block kann je nach Umbruch vor oder nach +% \captions... und \date... (aber bitte nicht dazwischen) stehen. +\begin{Declaration} + \Macro{yourrefname} + \Macro{yourmailname} + \Macro{myrefname} + \Macro{customername} + \Macro{invoicename} + \Macro{subjectname} + \Macro{ccname} + \Macro{enclname} + \Macro{headtoname} + \Macro{headfromname} + \Macro{datename} + \Macro{pagename} + \Macro{mobilephonename} + \Macro{phonename} + \Macro{faxname} + \Macro{emailname} + \Macro{wwwname} + \Macro{bankname} +\end{Declaration} +Die aufgeführten Anweisungen enthalten die jeweiligen sprachtypischen +Begriffe. Diese\important[i]{% + \DescRef{scrbase.cmd.newcaptionname}\\ + \DescRef{scrbase.cmd.renewcaptionname}\\ + \DescRef{scrbase.cmd.providecaptionname}} können für die Realisierung einer +weiteren Sprache oder aber auch zur eigenen freien Gestaltung, wie in +\autoref{sec:scrbase.languageSupport} erklärt, angepasst werden. Von +\KOMAScript{} werden die Begriffe erst nach der Präambel, also bei +\Macro{begin}\PParameter{document} gesetzt. Sie sind daher vorher nicht +verfügbar und können vorher auch nicht geändert werden. In +\autoref{tab:\LabelBase.languageTerms}, +\autopageref{tab:\LabelBase.languageTerms} sind die Voreinstellungen +für \Option{english} und \Option{ngerman} zu finden.% +\begin{table}[p]% Umbruchkorrektur + \begin{minipage}{\textwidth} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + %\caption + \begin{captionbeside}[{% + Voreinstellungen für die sprachabhängigen Begriffe in Briefen% + }]{% + \hskip 0pt plus 1ex + Voreinstellung + für die sprachabhängigen Begriffe bei \iffalse Verwendung der \else + den \fi Sprachen + \Option{english} und \Option{ngerman} soweit nicht durch die Pakete + zur Sprachumschaltung bereits definiert% + \label{tab:\LabelBase.languageTerms}% + }[l] + \begin{tabular}[t]{lll} + \toprule + Anweisung & \Option{english} & \Option{ngerman} \\ + \midrule + \Macro{bankname} & Bank account & Bankverbindung \\ + \Macro{ccname}\footnotemark[1] & cc & Kopien an \\ + \Macro{customername} & Customer no. & Kundennummer \\ + \Macro{datename} & Date & Datum \\ + \Macro{emailname} & Email & E-Mail \\ + \Macro{enclname}\footnotemark[1] & encl & Anlagen \\ + \Macro{faxname} & Fax & Fax \\ + \Macro{headfromname} & From & Von \\ + \Macro{headtoname}\footnotemark[1] & To & An \\ + \Macro{invoicename} & Invoice no. & Rechnungsnummer \\ + \Macro{myrefname} & Our ref. & Unser Zeichen \\ + \Macro{pagename}\footnotemark[1] & Page & Seite \\ + \Macro{mobilephonename} & Mobile phone & Mobiltelefon \\ + \Macro{phonename} & Phone & Telefon \\ + \Macro{subjectname} & Subject & Betrifft \\ + \Macro{wwwname} & Url & URL \\ + \Macro{yourmailname} & Your letter of & Ihr Schreiben vom\\ + \Macro{yourrefname} & Your ref. & Ihr Zeichen \\ + \bottomrule + \end{tabular} + \deffootnote{1em}{1em}{1\ }% brutal aber effektiv + \footnotetext[1000]{Diese Begriffe werden normalerweise bereits von + Sprachpaketen wie \Package{babel} definiert und dann von + \KOMAScript{} nicht überschrieben. Abweichungen im Wortlaut sind + daher möglich und der Anleitung des verwendeten Sprachpakets zu + entnehmen.} + \end{captionbeside} + \end{minipage} +\end{table}% +\EndIndexGroup + + +\begin{Declaration} + \Macro{captionsacadian} + \Macro{captionsamerican} + \Macro{captionsaustralien} + \Macro{captionsaustrian} + \Macro{captionsbritish} + \Macro{captionscanadian} + \Macro{captionscanadien} + \Macro{captionscroatian} + \Macro{captionsczech} + \Macro{captionsdutch} + \Macro{captionsenglish} + \Macro{captionsfinnish} + \Macro{captionsfrancais} + \Macro{captionsfrench} + \Macro{captionsgerman} + \Macro{captionsitalian} + \Macro{captionsnaustrian} + \Macro{captionsnewzealand} + \Macro{captionsngerman} + \Macro{captionsnorsk} + \Macro{captionsnswissgerman} + \Macro{captionspolish} + \Macro{captionsslovak} + \Macro{captionsspanish} + \Macro{captionsswedish} + \Macro{captionsswissgerman} + \Macro{captionsUKenglish} + \Macro{captionsUSenglish} +\end{Declaration} +Wird die Sprache eines Briefes gewechselt, so werden über diese +Anweisungen die Begriffe aus \autoref{tab:\LabelBase.languageTerms}, +\autopageref{tab:\LabelBase.languageTerms} umdefiniert. Sollte das +verwendete Sprachumschaltpaket dies nicht unterstützen, so können die +Anweisungen notfalls auch direkt verwendet werden.% +% +\EndIndexGroup +%\iffree{}{\clearpage}% Umbruchkorrektur + + +\begin{Declaration} + \Macro{dateacadian} + \Macro{dateamerican} + \Macro{dateaustralien} + \Macro{dateaustrian} + \Macro{datebritish} + \Macro{datecanadian} + \Macro{datecanadien} + \Macro{datecroatian} + \Macro{dateczech} + \Macro{datedutch} + \Macro{dateenglish} + \Macro{datefinnish} + \Macro{datefrancais} + \Macro{datefrench} + \Macro{dategerman} + \Macro{dateitalian} + \Macro{datenaustrian} + \Macro{datenewzealand} + \Macro{datengerman} + \Macro{datenorsk} + \Macro{datenswissgerman} + \Macro{datepolish} + \Macro{dateslovak} + \Macro{datespanish} + \Macro{dateswedish} + \Macro{dateswissgerman} + \Macro{dateUKenglish} + \Macro{dateUSenglish} +\end{Declaration} +Je nach verwendeter Sprache werden die Datumsangaben\Index{Datum} des +numerischen Datums (siehe Option \DescRef{scrlttr2.option.numericaldate}, +\autoref{sec:scrlttr2.firstpage}, \DescPageRef{scrlttr2.option.numericaldate}) +in unterschiedlicher Form umgesetzt. Die genauen Angaben sind +\autoref{tab:date}, \autopageref{tab:date} zu entnehmen.% +\begin{table}[p]% Umbruchoptimierung +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside}{Sprachabhängige Ausgabeformate für das Datum}[l] + \begin{tabular}[t]{ll} + \toprule + Anweisung & Ausgabebeispiel \\ + \midrule + \Macro{dateacadian} & 24.\,12.\,1993\\ + \Macro{dateamerican} & 12/24/1993\\ + \Macro{dateaustralien}& 24/12/1993\\ + \Macro{dateaustrian} & 24.\,12.\,1993\\ + \Macro{datebritish} & 24/12/1993\\ + \Macro{datecanadian} & 1993/12/24\\ + \Macro{datecanadien} & 1993/12/24\\ + \Macro{datecroatian} & 24.\,12.\,1993.\\ + \Macro{dateczech} & 24.\,12.\,1993\\ + \Macro{datedutch} & 24.\,12.\,1993\\ + \Macro{dateenglish} & 24/12/1993\\ + \Macro{datefinnish } & 24.12.1993.\\ + \Macro{datefrancais} & 24.\,12.\,1993\\ + \Macro{datefrench} & 24.\,12.\,1993\\ + \Macro{dategerman} & 24.\,12.\,1993\\ + \Macro{dateitalian} & 24.\,12.\,1993\\ + \Macro{datenaustrian} & 24.\,12.\,1993\\ + \Macro{datenewzealand}& 24/12/1993\\ + \Macro{datengerman} & 24.\,12.\,1993\\ + \Macro{datenorsk} & 24.12.1993\\ + \Macro{datenswissgerman} & 24.\,12.\,1993\\ + \Macro{datepolish} & 24.\,12.\,1993\\ + \Macro{dateslovak} & 24.\,12.\,1993\\ + \Macro{datespanish} & 24.\,12.\,1993\\ + \Macro{dateswedish} & 24/12 1993\\ + \Macro{dateswissgerman} & 24.\,12.\,1993\\ + \Macro{dateUKenglish} & 24/12/1993\\ + \Macro{dateUSenglish} & 12/24/1993\\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:date} +\end{table}% +\EndIndexGroup% +% +\EndIndexGroup + +\iffree{}{\clearpage}% Umbruchkorrektur zwecks Ausgabe der Tabellen + +\section{Obsolete Anweisungen} +\seclabel{obsolete} +\BeginIndexGroup + +\LoadNonFree{scrlttr2-experts}{1} +\EndIndexGroup +% +\iffalse% Es wird Zeit das komplett rauszuwerfen! +\section{Von der obsoleten \Class{scrlettr} zur +aktuellen \Class{scrlttr2}} +\seclabel{fromscrlettr} +\BeginIndexGroup +\BeginIndex{Class}{scrlettr} + +Die\textnote{Achtung!} alte Briefklasse \Class{scrlettr} wurde mit Einführung +von \Class{scrlttr2} (siehe \autoref{cha:scrlttr2}) 2002 +obsolet und ist auch nicht mehr Bestandteil von \KOMAScript{}. Wer die Klasse +oder Informationen dazu dennoch benötigt, findet sie in +\cite{package:koma-script-obsolete}. + +Um den Umstieg von der alten auf die neue Klasse zu erleichtern, existiert mit +\Option{KOMAold} eine Kompatibilitätseinstellung. Grundsätzlich ist in der +neuen Klasse die gesamte alte Funktionalität enthalten. Ohne \Option{KOMAold} +ist jedoch die Benutzerschnittstelle eine andere und auch die Voreinstellungen +stimmen nicht überein. Näheres dazu ist \autoref{sec:scrlttr2.lcoFile}, +\autoref{tab:lcoFiles} zu entnehmen. + +\LoadNonFree{scrlttr2-experts}{2} +% +\EndIndexGroup +\fi +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Pseudolänge Pseudolängen Rücksendeadresse Faltmarke Briefseite +% LocalWords: Sternvariante Geschäftszeile Testfeld Kopfbereich Vergleichsmaß +% LocalWords: Dokumenterstellungsprozess Fußbereich Anschriftfenster Falt +% LocalWords: Absenderergänzung Kundennummer Rechnungsnummer Falzmarken +% LocalWords: Sprachumschaltpaketen Standardbriefklasse Seitenstilen +% LocalWords: Paginierung Paginierungen Papiergröße Anschriftfeldes +% LocalWords: Versandart Anschriftfensters Anschriftfeld Briefköpfe +% LocalWords: Variableninhalt Schlussgruß Briefbogenfuß diff --git a/macros/latex/contrib/koma-script/doc/scrlttr2-experts-en.tex b/macros/latex/contrib/koma-script/doc/scrlttr2-experts-en.tex new file mode 100644 index 0000000000..a0f0b8e1e4 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrlttr2-experts-en.tex @@ -0,0 +1,823 @@ +% ====================================================================== +% scrlttr2-experts-en.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrlttr2 of the KOMA-Script guide expert part +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrlttr2-experts-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrlttr2 for experts)] + +\translator{Harald Bongartz\and Georg Grandke\and Raimund Kohl\and Jens-Uwe + Morawski\and Stephan Hennig\and Gernot Hassenpflug\and Markus Kohm\and + Karl Hagen} + +\chapter{Additional Information about the \Class{scrlttr2} Class and the + \Package{scrletter} Package} +\labelbase{scrlttr2-experts} + +\BeginIndexGroup +\BeginIndex{Class}{scrlttr2} +This chapter provides additional information about the \KOMAScript{} class +\Class{scrlttr2}. \iffree{Some parts of the chapter are found only in the + German \KOMAScript{} book \cite{book:komascript}. This should not be a + problem, because the}{The} average user, who only wants to use the class +or package, will not normally need this information. Part of this information +is addressed to users for whom the default options are insufficient. Thus, +for example, the first section describes in detail the pseudo-lengths that +specify the letterhead page and which can be used be used to modify the its +layout.% +\iffalse% Es wird Zeit das komplett rauszuwerfen! + In addition, this chapter also describes features that exist only to + provide compatibility with the deprecated \Class{scrlettr} class. It also + explains in detail how to convert a document from this obsolete class + to the current class. +\fi + +\BeginIndex{Package}{scrletter}% +Starting with \KOMAScript~3.15\ChangedAt[2014/11]{v3.15}{\Package{scrletter}}, +you can use the \Package{scrletter} package with one of the \KOMAScript{} +classes \Class{scrartcl}, \Class{scrreprt}, or \Class{scrbook}. It provides +nearly all the features of \Class{scrlttr2} for those classes. There are, +however, a few differences described later in this chapter.% + + +\section{Variables for Experienced Users} +\seclabel{variables} +\BeginIndexGroup +\BeginIndex{}{variables} + +\KOMAScript{} provides commands not only to use predefined variables but also +to define new variables or to change their automatic use within the reference +line\Index{reference line}. + +\begin{Declaration} + \Macro{newkomavar}\OParameter{description}\Parameter{name}% + \Macro{newkomavar*}\OParameter{description}\Parameter{name}% + \Macro{addtoreffields}\Parameter{name} + \Macro{removereffields}% + \Macro{defaultreffields}% +\end{Declaration} +\Macro{newkomavar} defines a new variable. This variable is referenced as +\PName{name}. Optionally, you can define a \PName{description} for the +\PName{name} variable. Unlike the \PName{name}, the \PName{description} is not +used to reference a variable. Instead, the \PName{description} acts as a +supplement to the content of a variable that can be printed as a label along +with its content. + +You can use the \Macro{addtoreffields} command to add the \PName{name} +variable to the reference line\Index{reference line} (see +\autoref{sec:scrlttr2.firstpage}, \DescPageRef{scrlttr2.option.refline}). The +\PName{description} and the content of the variable are added to the end of +the reference line. The starred version \Macro{newkomavar*} is similar to the +unstarred version but also calls the \Macro{addtoreffields} command. Thus, the +starred version automatically adds the variable to the reference line. +\begin{Example} + Suppose you need an additional field for a telephone extension in the + reference line. You can define this field with +\begin{lstcode} + \newkomavar[Extension]{myphone} + \addtoreffields{myphone} +\end{lstcode} + or more concisely with +\begin{lstcode} + \newkomavar*[Extension]{myphone} +\end{lstcode} +\end{Example} +When\textnote{Attention!} you define a variable for the reference line, you +should always give it a description. + +You can use the \Macro{removereffields} command to remove all variables from +the reference field. This includes the predefined variables of the class. The +reference line is then empty. This can be useful, for example, if you wish to +change the order of the variables in the reference fields line. + +The \Macro{defaultreffields} command resets the reference fields line to its +predefined format. In doing so, all custom-defined variables are removed from +the reference fields line. + +You\textnote{Attention!} should not add the date to the reference line with +the \Macro{addtoreffields} command. Instead you should use the +\DescRef{scrlttr2.option.refline}% +\important{\OptionValueRef{scrlttr2}{refline}{dateleft}\\ +\OptionValueRef{scrlttr2}{refline}{dateright}\\ +\OptionValueRef{scrlttr2}{refline}{nodate}}% +\IndexOption{refline~=\textKValue{dateleft}}% +\IndexOption{refline~=\textKValue{dateright}}% +\IndexOption{refline~=\textKValue{nodate}} option to select whether the date +should appear on the left or right side of the reference line, or not at all. +These settings also affect the position of the date when no reference line is +used.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{usekomavar}\OParameter{command}\Parameter{name}% + \Macro{usekomavar*}\OParameter{command}\Parameter{name} +\end{Declaration} +The \DescRef{scrlttr2.cmd.usekomavar} and \DescRef{scrlttr2.cmd.usekomavar*} +commands are, like all commands where a starred version exists or which can +take an optional argument, not fully expandable. Nevertheless, if you use them +within \DescRef{scrlttr2.cmd.markboth}\IndexCmd{markboth}, +\DescRef{scrlttr2.cmd.markright}\IndexCmd{markright} or similar commands, you +need not insert \Macro{protect}\IndexCmd{protect} beforehand. Of course +this is also true for +\DescRef{scrlayer-scrpage.cmd.markleft}\IndexCmd{markleft} if you use the +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\IndexPackage{scrlayer-scrpage} package. These\textnote{Attention!} commands +cannot be used within commands that directly affect their argument, such as +\Macro{MakeUppercase}\important{\Macro{MakeUppercase}}% +\IndexCmd{MakeUppercase}. To avoid this problem you can use commands like +\Macro{MakeUppercase} as an optional argument to \Macro{usekomavar} or +\Macro{usekomavar*}. Then you will get the upper-case content of a variable +with +\begin{lstcode}[escapeinside=`'] + \usekomavar[\MakeUppercase]{`\PName{Name}'} +\end{lstcode} +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Ifkomavarempty}\Parameter{name}\Parameter{true}\Parameter{false}% + \Macro{Ifkomavarempty*}\Parameter{name}\Parameter{true}\Parameter{false} +\end{Declaration} +It is important to know that the content of the variable will be expanded as +far as this is possible with \Macro{edef}. If this results in spaces or +unexpandable macros like \Macro{relax}, the result will be not empty even +where the use of the variable would not result in any visible output. + +Once\textnote{Attention!} again, this command cannot be used as the argument +of \Macro{MakeUppercase}\IndexCmd{MakeUppercase} or similar commands However, +it is robust enough to be used as the argument of +\DescRef{scrlttr2.cmd.markboth} or \DescRef{scrlttr2.cmd.footnote}, for +example.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{foreachkomavar}\Parameter{list of variables}\Parameter{command} + \Macro{foreachnonemptykomavar}\Parameter{list of variables}\Parameter{command} + \Macro{foreachemptykomavar}\Parameter{list of variables}\Parameter{command} + \Macro{foreachkomavarifempty}\Parameter{list of variables} + \Parameter{then-code}\Parameter{else-code} +\end{Declaration} +The\ChangedAt{v3.27}{\Class{scrlttr2}\and \Package{scrletter}} +\Macro{foreachkomavar} command executes the specified \PName{command} for each +variable in the comma-separated \PName{list of variables}. The name of each +variable is added as parameter to the \PName{command}.% + +The \Macro{foreachnonemptykomavar} command does the same but only for those +variables that are not empty in sense of +\DescRef{\LabelBase.cmd.Ifkomavarempty}. Empty variables in the \PName{list of + variables} are ignored. + +By contrast, the \Macro{foreachemptykomavar} command executes the +\PName{command} only for variables that are empty in sense of +\DescRef{\LabelBase.cmd.Ifkomavarempty}. Accordingly, non-empty variables are +ignored. + +The \Macro{foreachkomavarifempty} command is a kind of combination of the two +previously described commands. It executes the \PName{then-command} only for +those variables in the \PName{list of variables} that are empty, and the +\PName{else-command} for the non empty variables. As with \PName{command}, the +name of each variable is added as a parameter in both cases.% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Additional Information about Page Styles} +\seclabel{pagestyleatscrletter} +\BeginIndexGroup +\BeginIndex{}{page>style} + +\LoadNonFree{scrlttr2-experts}{0}% +\EndIndexGroup + +\iffalse% Wurde bereits in Kapitel 4.21 behandelt +\section{Differences in How \Package{scrletter} Handles \File{lco} Files} +\seclabel{lcoatscrletter} +\BeginIndexGroup +\BeginIndex{File}{lco} +\BeginIndex{}{lco file=\File{lco} file} + +As\ChangedAt{v3.15}{\Package{scrletter}} explained in +\autoref{sec:scrlttr2.lcoFile}, \Class{scrlttr2} can load \File{lco} files via +the optional argument of \Macro{documentclass}. The \Package{scrletter} package +does not support this. + +\begin{Declaration} + \Macro{LoadLetterOption}\Parameter{name}% + \Macro{LoadLetterOptions}\Parameter{list of names} +\end{Declaration} +For \Class{scrlttr2}, load \File{lco} files with +\DescRef{scrlttr2.cmd.LoadLetterOption} or +\DescRef{scrlttr2.cmd.LoadLetterOptions} is only a recommendation. For +\Package{scrletter}, it is mandatory. Of course, you can only load the +\File{lco} files after you load \Package{scrletter}. +% +\EndIndexGroup +% +\EndIndexGroup +\fi + + +\section{\File{lco} Files for Experienced Users} +\seclabel{lcoFile} +\BeginIndexGroup +\BeginIndex{File}{lco} +\BeginIndex{}{lco file=\File{lco} file} + +\BeginIndexGroup% +\BeginIndex{}{paper>format}% +Although you can use any paper size that the +\hyperref[cha:typearea]{\Package{typearea}}% +\IndexPackage{typearea} package can configure, the output of the letterhead +page may produce undesirable results with some formats. Unfortunately, there +are no general rules to calculate the position of the address fields and the +like for every available paper size. Instead, different parameter sets are +needed for different paper sizes.% + +%\subsection{Verifying the Paper Size} +%\seclabel{papersize} + +At present parameter sets and \File{lco} files exist only for A4-sized and +letter-sized paper. Theoretically, however, the \Class{scrlttr2} class can +support many more paper sizes. Therefore, it's necessary to verify that the +correct paper size is used. This is even more true if you use +\Package{scrletter}, since the paper size depends on the class you use. + +\begin{Declaration} + \Macro{LetterOptionNeedsPapersize}% + \Parameter{option name}\Parameter{paper size} +\end{Declaration} +To provide at least a warning when another \PName{paper size} is used, you can +find a \Macro{LetterOptionNeedsPapersize} command in every \File{lco} file +distributed with {\KOMAScript}. The first argument is the name of the +\File{lco} file without the ``\File{.lco}'' suffix. The second argument is the +paper size for which the \File{lco} file is designed. + +If several \File{lco} files are loaded in succession, a +\Macro{LetterOptionNeedsPapersize} command can be contained in each of them, +but the \DescRef{scrlttr2.cmd.opening} command will only check the last given +\PName{paper size}. As the following example shows, an experienced user can +thus easily write \File{lco} files with parameter sets for other paper sizes. +\iffalse% Umbruchoptimierung +If you do not plan to set up such \File{lco} files yourself, you can just +forget about this option and skip the example.% +\fi +\begin{Example} + Suppose you use A5-sized paper in normal, that is upright or portrait, + orientation for your letters. Let's assume that you want to put them into + standard C6 window envelopes. In that case, the position of the address + field would be the same as for a standard letter on A4-sized paper. The main + difference is that A5 paper needs only one fold. So you want to disable the + top and bottom fold marks. You can do this, for example, by placing the + marks outside the paper area. +\begin{lstcode} + \ProvidesFile{a5.lco} + [2002/05/02 letter class option] + \LetterOptionNeedsPapersize{a5}{a5} + \setplength{tfoldmarkvpos}{\paperheight} + \setplength{bfoldmarkvpos}{\paperheight} +\end{lstcode} + Of course, it would be more elegant to deactivate the marks with the + \DescRef{scrlttr2.option.foldmarks} option. In addition, you must adjust the + position of the footer, that is, the \PLength{firstfootvpos} pseudo-length. + I leave it to the reader to find an appropriate value. When using such an + \File{lco} file, you must declare other \File{lco} file options like + \File{SN} before you load ``\File{a5.lco}''. +\end{Example} +% +\EndIndexGroup% +\EndIndexGroup% +\vskip-\ht\strutbox% Wegen Beispiel am Ende der Erklaerung + + +%\subsection{Visualizing Positions} +%\seclabel{visualize} +%\BeginIndexGroup +\begin{Declaration} + \File{visualize.lco} +\end{Declaration} +\BeginIndex{Option}{visualize}% +If you develop your own \File{lco} file, for example to modify the positions +of various fields on the letterhead page because your own desires or +requirements, it is helpful if you can make at least some elements directly +visible. The \File{lco} file +\File{visualize.lco}\ChangedAt{v3.04}{\Class{scrlttr2}} exists for this +purpose. You can load this file as you would any other \File{lco} file. But +this \emph{letter class options} file must be loaded in the document preamble, +and its effects cannot be deactivated. The \File{lco} file uses the +\Package{eso-pic}\IndexPackage{eso-pic}% +\important[i]{\Package{eso-pic}\\\Package{graphicx}} and +\Package{graphicx}\IndexPackage{graphicx} packages, which are not part of +\KOMAScript. + + +\begin{Declaration} + \Macro{showfields}\Parameter{field list} +\end{Declaration} +This command makes the space occupied by the fields on the letterhead page +visible. The \PName{field list} argument is a comma-separated list of fields +to be shown. The following fields are supported: +\begin{labeling}[~--]{\PValue{location}} +\item[\PValue{test}] is a 10\Unit{cm} by 15\Unit{cm} test field, 1\Unit{cm} + from the top and left edges of the paper. This field exists for debugging. + You can use it as a benchmark to check whether the measurements have been + distorted during the creation of the document. +\item[\PValue{head}] is the header area of the letterhead page. This field + is open at the bottom. +\item[\PValue{foot}] is the footer area of the letterhead page. This field is + open at the top. +\item[\PValue{address}] is the address window area used by window envelopes. +\item[\PValue{location}] is the field for the extra sender information. +\item[\PValue{refline}] is the reference line. This field is open at the + bottom. +\end{labeling}% +\BeginIndex{FontElement}{field}\LabelFontElement{field}% +You can change the colour of the visualisation with +the\DescRef{scrlttr2.cmd.setkomafont} and \DescRef{scrlttr2.cmd.addtokomafont} +(see \autoref{sec:scrlttr2.textmarkup}, +\DescPageRef{scrlttr2.cmd.setkomafont}) commands using the +\FontElement{field}\important{\FontElement{field}} element. The default is +\Macro{normalcolor}.% +\EndIndex{FontElement}{field}% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setshowstyle}\Parameter{style}% + \Macro{edgesize} +\end{Declaration} +By default, \File{visualize.lco} indicates the individual areas with +frames\important{\PValue{frame}}, which corresponds to the \PName{style} +\PValue{frame}. Areas open at top or bottom are not completely framed but have +an open edge with with small arrows pointing up or down. +Alternatively\important{\PValue{rule}}, you can use the \PName{style} +\PValue{rule}. In this case, the area is highlighted by a background colour. +It isnot possible to distinguish open and closed areas. Instead a minimal +height will be used for open areas. The third\important{\PValue{edges}} +available \PName{style} is \PValue{edges}, which shows the corners of the +areas. The corner marks at the open edge of open areas will be omitted. The +size of two edges of the corner marks are given by the \Macro{edgesize} macro +with a default of 1\Unit{ex}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{showenvelope}\AParameter{width\textup{,}height}% + \AParameter{h-offset\textup{,}v-offset}% + \OParameter{instructions}% + \Macro{showISOenvelope}\Parameter{format}\OParameter{instructions}% + \Macro{showUScommercial}\Parameter{format}\OParameter{instructions}% + \Macro{showUScheck}\OParameter{instructions}% + \Macro{unitfactor} +\end{Declaration} +If you have loaded \File{visualize.lco}, you can use these commands to output +a page with a drawing of an envelope. The envelope drawing is always rotated +by 90\textdegree{} on a separate page and printed in 1:1~scale. The addressee +window is generated automatically from the current data for the address +position of the letterhead page: \PLength{toaddrvpos}, \PLength{toaddrheight}, +\PLength{toaddrwidth}, and \PLength{toaddrhpos}. To do so requires knowing how +much smaller the folded letter pages are than the width and height of the +envelope. If you do not specify these two values, \PName{h-offset} and +\PName{v-offset}, when calling \Macro{showenvelope}, they are calculated from +the fold marks and the paper size itself. + +The \Macro{showISOenvelope}, \Macro{showUScommercial}, and \Macro{showUScheck} +commands are based on \Macro{showenvelope}. With \Macro{showISOenvelope}, you +can create ISO-envelopes in C4, C5, C5/6, DL (also known as C5/6) or C6 +\PName{format}. With \Macro{showUScommercial}, you can create a US commercial +envelope in the 9 or 10 \PName{format}. You can use \Macro{showUScheck} for +envelopes in US check format. + +\BeginIndex{FontElement}{letter}\LabelFontElement{letter}% +The position of the letterhead page inside the envelope is indicated with +dashed lines. You can change the colour of these lines with the +\DescRef{scrlttr2.cmd.setkomafont} and \DescRef{scrlttr2.cmd.addtokomafont} +(see \autoref{sec:scrlttr2.textmarkup}, +\DescPageRef{scrlttr2.cmd.setkomafont}) using the +\FontElement{letter}\important{\FontElement{letter}} element. The default is +\Macro{normalcolor}.% +\EndIndex{FontElement}{letter}% + +\BeginIndex{FontElement}{measure}\LabelFontElement{measure}% +The envelope drawing will be provided with dimensions automatically. You can +change the colour of these dimension labels with the commands +\DescRef{scrlttr2.cmd.setkomafont} and \DescRef{scrlttr2.cmd.addtokomafont} +(see \autoref{sec:scrlttr2.textmarkup}, +\DescPageRef{scrlttr2.cmd.setkomafont}) using the +\FontElement{measure}\important{\FontElement{measure}} element. The default is +\Macro{normalcolor}. The dimensions are given in multiples of +\Length{unitlength}, with an accuracy of $1/\Macro{unitfactor}$, where the +accuracy of \TeX{} arithmetic is the actual limits. The default is 1. You can +redefine \Macro{unitfactor} using \Macro{renewcommand}.% +\EndIndex{FontElement}{measure}% + +\begin{Example} + You are generating a sample letter using the ISO-A4 format. The supported + fields should be marked with yellow borders to check their position. + Furthermore, the position of the window for a DL-size envelope should be + checked with drawing. The dimension lines in this drawing should be red, and + the numbers should use a smaller font, with the dimensions printed in cm + with an accuracy of 1\Unit{mm}. The dashed letterhead page in the envelope + should be coloured green. +\begin{lstcode} + \documentclass[visualize]{scrlttr2} + \usepackage{xcolor} + \setkomafont{field}{\color{yellow}} + \setkomafont{measure}{\color{red}\small} + \setkomafont{letter}{\color{green}} + \showfields{head,address,location,refline,foot} + \usepackage[british]{babel} + \usepackage{lipsum} + \begin{document} + \setkomavar{fromname}{Joe Public} + \setkomavar{fromaddress}{2 Valley\\ + SAMPLEBY\\ + ZY32 1XW} + \begin{letter}{% + 1 Hillside\\ + SAMPLESTEAD\\ + WX12 3YZ% + } + \opening{Hello,} + \lipsum[1] + \closing{Good bye} + \end{letter} + \setlength{\unitlength}{1cm} + \renewcommand*{\unitfactor}{10} + \showISOenvelope{DL} + \end{document} +\end{lstcode} + This will show the letterhead page as the first page and the drawing of the + envelope on the second page. +\end{Example} + +Note that poorly chosen combinations of \Length{unitlength} and +\Macro{unitfactor} can quickly lead to a \TeX{} \emph{arithmetic overflow} +error. The dimension numbers shown may also differ slightly from the actual +values. Neither are errors in \Option{visualize} but merely implementation +limitations of \TeX. +% +\EndIndexGroup +% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Language Support} +\seclabel{languages}% +\BeginIndexGroup +\BeginIndex{}{languages}% + +% TODO: New translation of the shorter into in German manual should be used. +% :ODOT +The \Class{scrlttr2} class and the \Package{scrletter} package support many +languages. These include German\Index{language>German} (\PValue{german} for +the old German orthography, \PValue{ngerman} for the new orthography; +\PValue{austrian} for Austrian with the old German orthography, +\PValue{naustrian}\ChangedAt{v3.09}{\Class{scrlttr2}} for Austrian with the +new orthography; and \PValue{nswissgerman}\ChangedAt{v3.13}{\Class{scrlttr2}} +for Swiss German with the new orthogrphy, \PValue{swissgerman} for Swiss +German with the old orthography), English\Index{language>English} (among +others, \PValue{english} without specification as to whether American or +British should be used, \PValue{american} and \PValue{USenglish} for American +English, and \PValue{british} and \PValue{UKenglish} for British English), +French\Index{language>French}, Italian\Index{language>Italian}, +Spanish\Index{language>Spanish}, Dutch\Index{language>Dutch}, +Croatian\Index{language>Croatian}, Finnish\Index{language>Finnish}, +Norwegian\Index{language>Norwegian}\ChangedAt{v3.02}{\Class{scrlttr2}}, +Swedish\Index{language>Swedish}\ChangedAt{v3.08}{\Class{scrlttr2}}, +Polish\ChangedAt{v3.13}{\Class{scrlttr2}}, +Czech\ChangedAt{v3.13}{\Class{scrlttr2}}, and Slovak. + +You can switch languages using the \Package{babel}\IndexPackage{babel} package +(see \cite{package:babel}) with the \Macro{selectlanguage}\Parameter{language} +command. Other packages like \Package{german}\IndexPackage{german} (see +\cite{package:german}) and \Package{ngerman}\IndexPackage{ngerman} (see +\cite{package:ngerman}) also define this command. As a rule though, the +language selection occurs immediately as a direct consequence of loading such +a package. +\iffalse% Umbruchkorrekturtext +For details, please refer to the documentation of the relevant packages. +\fi + +There\textnote{Attention!} is one more point to note about language-switching +packages. The +\Package{french}\IndexPackage{french}\important{\Package{french}} package (see +\cite{package:french}) makes changes well beyond redefining the terms in +\autoref{tab:\LabelBase.languageTerms}. For instance, it redefines the +\DescRef{scrlttr2.cmd.opening} command, since the package simply assumes that +\DescRef{scrlttr2.cmd.opening} is always defined as it is in the standard +\Class{letter} class. This, however, is not the case with \KOMAScript{}. The +\Package{french} package thus overwrites the definition and does not work +correctly with \KOMAScript. I regard this as a fault in the \Package{french} +package which, although reported decades ago, was unfortunately never +eliminated. + +If you use the \Package{babel}\IndexPackage{babel} package to switch to +\PValue{french}, problems can occasionally occur. With \Package{babel}, +however, you can usually deactivate changes to a language in a targeted +manner.% +\iffalse% This is actually outdated! +\ If the package \Package{french} is not installed, the problem with + \Package{babel} does not arise. Similarly, the problem usually does not + exist when you use \Package{babel} with other varieties of French such as + \PValue{acadian}, \PValue{canadien}, \PValue{francais} or \PValue{frenchb} + instead of \PValue{french}. +\fi + +\iffalse% This is also outdated! + However, with \Package{babel} version 3.7j and above, this problem only occurs + if the option explicitly indicates that \Package{babel} should use the + \Package{french} package. +% +\iftrue + If you cannot be sure you are not using an old version of \Package{babel}, I + recommend you use +\begin{lstcode} + \usepackage[...,frenchb,...]{babel} +\end{lstcode} + to select French. + \iffalse % + If necessary, you can still switch to French with + \Macro{selectlanguage}\PParameter{french}.% + \fi% +\fi +\fi + +\iffalse + It cannot be ruled out that similar problems will not occur with other + languages or packages. For German and English, however, there are currently + no known problems with the \Package{babel} package. +\fi + + +\begin{Declaration} + \Macro{yourrefname}% + \Macro{yourmailname}% + \Macro{myrefname}% + \Macro{customername}% + \Macro{invoicename}% + \Macro{subjectname}% + \Macro{ccname}% + \Macro{enclname}% + \Macro{headtoname}% + \Macro{headfromname}% + \Macro{datename}% + \Macro{pagename}% + \Macro{mobilephonename}% + \Macro{phonename}% + \Macro{faxname}% + \Macro{emailname}% + \Macro{wwwname}% + \Macro{bankname} +\end{Declaration} +These commands contain the language-dependent terms. These\important[i]{% + \DescRef{scrbase.cmd.newcaptionname}\\ + \DescRef{scrbase.cmd.renewcaptionname}\\ + \DescRef{scrbase.cmd.providecaptionname}} definitions can be +modified to support a new language or for your private customization, as +described in +\autoref{sec:scrbase.languageSupport}. \KOMAScript{} sets these terms only in +\Macro{begin}\PParameter{document}. Therefore they are not available in the +preamble and cannot be redefined there. The default settings for +\Option{english} and \Option{ngerman} are listed in +\autoref{tab:\LabelBase.languageTerms}.% +\EndIndexGroup +%\iffree{}{\clearpage}% Siehe Kommentar zur Tabelle + +\begin{Declaration} + \Macro{captionsacadian} + \Macro{captionsamerican} + \Macro{captionsaustralien} + \Macro{captionsaustrian} + \Macro{captionsbritish} + \Macro{captionscanadian} + \Macro{captionscanadien} + \Macro{captionscroatian} + \Macro{captionsczech} + \Macro{captionsdutch} + \Macro{captionsenglish} + \Macro{captionsfinnish} + \Macro{captionsfrancais} + \Macro{captionsfrench} + \Macro{captionsgerman} + \Macro{captionsitalian} + \Macro{captionsnaustrian} + \Macro{captionsnewzealand} + \Macro{captionsngerman} + \Macro{captionsnorsk} + \Macro{captionsnswissgerman} + \Macro{captionspolish} + \Macro{captionsslovak} + \Macro{captionsspanish} + \Macro{captionsswedish} + \Macro{captionsswissgerman} + \Macro{captionsUKenglish} + \Macro{captionsUSenglish} +\end{Declaration} +If you change the language of a letter, the language-dependent terms listed in +\autoref{tab:\LabelBase.languageTerms}, +\autopageref{tab:\LabelBase.languageTerms} are redefined using these +commands. If your language-switching package does not support this, you can +also use the above commands directly. +% +\begin{table} + \begin{minipage}{\textwidth} + \centering +% \KOMAoptions{captions=topbeside}% +% \setcapindent{0pt}% + \caption[{% + Defaults for language-dependent terms + }]{% + Defaults for language-dependent terms for the languages + \Option{english} and \Option{ngerman}, if they are not already defined + by the packages used for language switching% + \label{tab:\LabelBase.languageTerms}% + }[l] + \begin{tabular}[t]{lll} + \toprule + Command & \Option{english} & \Option{ngerman} \\ + \midrule + \Macro{bankname} & Bank account & Bankverbindung \\ + \Macro{ccname}\footnotemark[1] & cc & Kopien an \\ + \Macro{customername} & Customer no. & Kundennummer \\ + \Macro{datename} & Date & Datum \\ + \Macro{emailname} & Email & E-Mail \\ + \Macro{enclname}\footnotemark[1] & encl & Anlagen \\ + \Macro{faxname} & Fax & Fax \\ + \Macro{headfromname} & From & Von \\ + \Macro{headtoname}\footnotemark[1] & To & An \\ + \Macro{invoicename} & Invoice no. & Rechnungsnummer \\ + \Macro{myrefname} & Our ref. & Unser Zeichen \\ + \Macro{pagename}\footnotemark[1] & Page & Seite \\ + \Macro{mobilephonename} & Mobile phone & Mobiltelefon \\ + \Macro{phonename} & Phone & Telefon \\ + \Macro{subjectname} & Subject & Betrifft \\ + \Macro{wwwname} & Url & URL \\ + \Macro{yourmailname} & Your letter of & Ihr Schreiben vom\\ + \Macro{yourrefname} & Your ref. & Ihr Zeichen \\ + \bottomrule + \end{tabular} + \deffootnote{1em}{1em}{1\ }% brutal aber effektiv + \footnotetext[1000]{Normally these terms are defined by language + packages like \Package{babel}. In this case, \KOMAScript{} does not + redefine them. The actual wording may therefore differ and can + be found in the documentation for the language package used.} +% \end{captionbeside} + \end{minipage} +\end{table} +% +\EndIndexGroup +\iffree{}{\clearpage}% Umbruchkorrektur + +\begin{Declaration} + \Macro{dateacadian} + \Macro{dateamerican} + \Macro{dateaustralien} + \Macro{dateaustrian} + \Macro{datebritish} + \Macro{datecanadian} + \Macro{datecanadien} + \Macro{datecroatian} + \Macro{dateczech} + \Macro{datedutch} + \Macro{dateenglish} + \Macro{datefinnish} + \Macro{datefrancais} + \Macro{datefrench} + \Macro{dategerman} + \Macro{dateitalian} + \Macro{datenaustrian} + \Macro{datenewzealand} + \Macro{datengerman} + \Macro{datenorsk} + \Macro{datenswissgerman} + \Macro{datepolish} + \Macro{dateslovak} + \Macro{datespanish} + \Macro{dateswedish} + \Macro{dateswissgerman} + \Macro{dateUKenglish} + \Macro{dateUSenglish} +\end{Declaration} +Depending on the language used, the numerical representation of the date\Index{date} (see option +\DescRef{scrlttr2.option.numericaldate} in \autoref{sec:scrlttr2.firstpage}, +\DescPageRef{scrlttr2.option.numericaldate}) is formatted in various ways. +The exact format can be found in \autoref{tab:date}.% +\EndIndexGroup +% +\EndIndexGroup +\iffree{}{\clearpage}% Umbruchkorrektur zwecks Ausgabe der Tabellen + +\begin{table}[!tp]% Umbruchoptimierung +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% +% \caption + \begin{captionbeside}{Language-dependent forms of the date}[l] + \begin{tabular}[t]{ll} + \toprule + Command & Date Example \\ + \midrule + \Macro{dateacadian} & 24.\,12.\,1993\\ + \Macro{dateamerican} & 12/24/1993\\ + \Macro{dateaustralien}& 24/12/1993\\ + \Macro{dateaustrian} & 24.\,12.\,1993\\ + \Macro{datebritish} & 24/12/1993\\ + \Macro{datecanadian} & 1993/12/24\\ + \Macro{datecanadien} & 1993/12/24\\ + \Macro{datecroatian} & 24.\,12.\,1993.\\ + \Macro{dateczech} & 24.\,12.\,1993\\ + \Macro{datedutch} & 24.\,12.\,1993\\ + \Macro{dateenglish} & 24/12/1993\\ + \Macro{datefinnish } & 24.12.1993.\\ + \Macro{datefrancais} & 24.\,12.\,1993\\ + \Macro{datefrench} & 24.\,12.\,1993\\ + \Macro{dategerman} & 24.\,12.\,1993\\ + \Macro{dateitalian} & 24.\,12.\,1993\\ + \Macro{datenaustrian} & 24.\,12.\,1993\\ + \Macro{datenewzealand}& 24/12/1993\\ + \Macro{datengerman} & 24.\,12.\,1993\\ + \Macro{datenorsk} & 24.12.1993\\ + \Macro{datenswissgerman} & 24.\,12.\,1993\\ + \Macro{datepolish} & 24.\,12.\,1993\\ + \Macro{dateslovak} & 24.\,12.\,1993\\ + \Macro{datespanish} & 24.\,12.\,1993\\ + \Macro{dateswedish} & 24/12 1993\\ + \Macro{dateswissgerman} & 24.\,12.\,1993\\ + \Macro{dateUKenglish} & 24/12/1993\\ + \Macro{dateUSenglish} & 12/24/1993\\ + \bottomrule + \end{tabular} + \end{captionbeside} + \label{tab:date} +\end{table} +% +\section{Obsolete Commands} +\seclabel{obsolete} +\BeginIndexGroup + +\LoadNonFree{scrlttr2-experts}{1} +\EndIndexGroup +% +\iffalse% Es wird Zeit das komplett rauszuwerfen! +\section{From Obsolete \Class{scrlettr} to Current \Class{scrlttr2}} +\seclabel{fromscrlettr} + +With\textnote{Attention!} the 2002 release of \Class{scrlttr2} (see +\autoref{cha:scrlttr2}), the old letter class, \Class{scrlettr}, became +obsolete, and it is no longer part of \KOMAScript. If you still need the class +or information about it, you will find it in +\cite{package:koma-script-obsolete}. + +To facilitate the transition to the new class, there is the compatibility +option \Option{KOMAold}. Basically, all the older functionality still +exists in the new class. Without \Option{KOMAold}, however, the user +interface and the defaults are different. More details on +this option are provided in \autoref{sec:scrlttr2.lcoFile}, +\autoref{tab:lcoFiles}. + +\LoadNonFree{scrlttr2-experts}{2} +% +\EndIndexGroup +\fi +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrlttr2.html b/macros/latex/contrib/koma-script/doc/scrlttr2.html index b386b493a2..ca9e378dd9 100644 --- a/macros/latex/contrib/koma-script/doc/scrlttr2.html +++ b/macros/latex/contrib/koma-script/doc/scrlttr2.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrlttr2" /> + + - + - The KOMA-Script Documentation Wrapper + Letters with the scrlttr2 Class or the scrletter Package -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

Letters with the scrlttr2 Class or the scrletter Package

+

Briefe mit Klasse scrlttr2 oder Paket scrletter

- I think you are searching for the KOMA-Script documentation. You - may find the Englisch documentation - at scrguien.pdf and an index of it - at scrguien.html. + I think you are searching for the chapter + “Letters with the scrlttr2 Class or the scrletter Package” in the + KOMA-Script documentation.
- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Briefe mit Klasse scrlttr2 oder Paket scrletter in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrreport.html b/macros/latex/contrib/koma-script/doc/scrreport.html new file mode 100644 index 0000000000..0f989c3c54 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrreport.html @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + The Main Classes: scrbook, scrreprt, and scrartcl + + + +

The Main Classes: scrbook, scrreprt, and scrartcl

+

Die Hauptklassen scrbook, scrreprt, scrartcl

+
+
+ Ich nehme an, Sie suchen nach dem Kapitel + „Die Hauptklassen scrbook, scrreprt, scrartcl in der + KOMA-Script-Anleitung. +
+
+ Markus Kohm, 2022-06-03 +

Valid XHTML 1.1

+
+ + + diff --git a/macros/latex/contrib/koma-script/doc/scrreprt.html b/macros/latex/contrib/koma-script/doc/scrreprt.html index b386b493a2..416fc89ec3 100644 --- a/macros/latex/contrib/koma-script/doc/scrreprt.html +++ b/macros/latex/contrib/koma-script/doc/scrreprt.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrreprt" /> + + - + - The KOMA-Script Documentation Wrapper + The Main Classes: scrbook, scrreprt, and scrartcl -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

The Main Classes: scrbook, scrreprt, and scrartcl

+

Die Hauptklassen scrbook, scrreprt, scrartcl

- I think you are searching for the KOMA-Script documentation. You - may find the Englisch documentation - at scrguien.pdf and an index of it - at scrguien.html. + I think you are searching for the chapter + “The Main Classes: scrbook, scrreprt, and scrartcl in the + KOMA-Script documentation.
- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Die Hauptklassen scrbook, scrreprt, scrartcl in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrtime-de.tex b/macros/latex/contrib/koma-script/doc/scrtime-de.tex new file mode 100644 index 0000000000..84b3e8c212 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrtime-de.tex @@ -0,0 +1,150 @@ +% ====================================================================== +% scrtime-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrtime of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{scrtime-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrdate, scrtime)] + +\chapter{Die aktuelle Zeit mit \Package{scrtime}} +\labelbase{scrtime} +\BeginIndexGroup +\BeginIndex{Package}{scrtime} + +Mit Hilfe dieses Pakets kann die Frage nach der aktuellen Zeit beantwortet +werden.% +\iffalse % Umbruchkorektur +\ Seit Version~3.05 unterstützt das Paket auch die von den +\KOMAScript-Klassen und diversen anderen \KOMAScript-Paketen bekannten +Möglichkeiten zur Angabe von Optionen. Siehe dazu beispielsweise +\autoref{sec:typearea.options}.% +\fi + +\begin{Declaration}% + \Macro{thistime}\OParameter{Trennung} + \Macro{thistime*}\OParameter{Trennung} +\end{Declaration}% +\Macro{thistime} liefert die aktuelle Zeit\Index{Zeit} in Stunden und +Minuten. In der Ausgabe wird zwischen den Stunden und Minuten das optionale +Argument \PName{Trennung} gesetzt. Voreingestellt ist das Zeichen +»\PValue{:}«. + +\Macro{thistime*} funktioniert fast genau wie \Macro{thistime}. Der +einzige Unterschied besteht darin, dass im Gegensatz zu +\Macro{thistime} bei \Macro{thistime*} die Minutenangaben bei Werten +kleiner 10 nicht durch eine vorangestellte Null auf zwei Stellen +erweitert wird. +\begin{Example} + Die Zeile +\begin{lstcode} + Ihr Zug geht um \thistime\ Uhr. +\end{lstcode} + liefert als Ergebnis beispielsweise eine Zeile wie + \begin{ShowOutput} + Ihr Zug geht um \thistime\ Uhr. + \end{ShowOutput} + oder + \begin{ShowOutput} + Ihr Zug geht um 23:09 Uhr. + \end{ShowOutput} + Demgegenüber liefert die Zeile +\begin{lstcode} + Beim nächsten Ton ist es \thistime*[\ Uhr,\ ] + Minuten und 42 Sekunden. +\end{lstcode} + als mögliches Ergebnis etwas wie + \begin{ShowOutput} + Beim nächsten Ton ist es 8\ Uhr,\ 41 Minuten und 42 Sekunden. + \end{ShowOutput} + oder + \begin{ShowOutput} + Beim nächsten Ton ist es 23\ Uhr,\ 9 Minuten und 42 Sekunden. + \end{ShowOutput} +\end{Example} +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration}% + \Macro{settime}\Parameter{Wert} +\end{Declaration}% +\DescRef{scrtime.cmd.settime} setzt die Ausgabe von +\DescRef{scrtime.cmd.thistime} und \DescRef{scrtime.cmd.thistime*} auf einen +festen \PName{Wert}% +%\footnote{Allerdings darf man nicht erwarten, dass nun die Zeit +% stillsteht!} +. % +Anschließend wird das optionale Argument von \DescRef{scrtime.cmd.thistime} +bzw. \DescRef{scrtime.cmd.thistime*} ignoriert, da ja die komplette +Zeichenkette, die \DescRef{scrtime.cmd.thistime} +bzw. \DescRef{scrtime.cmd.thistime*} nun liefert, hiermit explizit festgelegt +wurde.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{12h}{Ein-Aus-Wert} +\end{Declaration}% +\BeginIndex{Option}{24h}% +Mit der Option \Option{12h}\ChangedAt{v3.05a}{\Package{scrtime}} kann gewählt +werden, ob die Zeit bei \DescRef{scrtime.cmd.thistime} und +\DescRef{scrtime.cmd.thistime*} im 12-Stunden- oder 24-Stunden-Format +ausgegeben werden soll. Als \PName{Ein-Aus-Wert} kann dabei einer der +Standardwerte für einfache Schalter aus \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} verwendet werden. Wird die Option ohne +Wert-Angabe verwendet, so wird der Wert \PValue{true} angenommen, also auf das +12-Stunden-Format geschaltet. Voreingestellt\textnote{Voreinstellung} ist +hingegen das 24-Stunden-Format.% +%\footnote{Leider beherrscht das \Package{scrtime}-Paket noch nicht die +% Sternzeit nach \textsc{StarTrek}\Index{StarTrek}, ein echter +% Mangel!} + +Die Option kann wahlweise global per +\DescRef{typearea.cmd.documentclass}, als Paketoption bei +\DescRef{typearea.cmd.usepackage} oder nach dem Laden von +\Package{scrtime} per \DescRef{typearea.cmd.KOMAoptions} oder +\DescRef{typearea.cmd.KOMAoption} (siehe beispielsweise +\autoref{sec:typearea.options}, \DescPageRef{typearea.cmd.KOMAoptions}) +gesetzt werden. Sie verliert jedoch bei einem Aufruf von +\DescRef{scrtime.cmd.settime} ihre Gültigkeit. Die Uhrzeit wird nach +Verwendung dieser Anweisung nur noch mit dem dort angegebenen Wert im dort +verwendeten Format ausgegeben. + +Rein\textnote{Achtung!} aus Gründen der Kompatibilität zu früheren Versionen +von \Package{scrtime} wird bei \DescRef{typearea.cmd.documentclass} und +\DescRef{typearea.cmd.usepackage} auch noch die Option \Option{24h} zur +Umschaltung auf das 24-Stunden-Format unterstützt. Deren Verwendung wird +jedoch nicht mehr empfohlen.% +\EndIndexGroup +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + diff --git a/macros/latex/contrib/koma-script/doc/scrtime-en.tex b/macros/latex/contrib/koma-script/doc/scrtime-en.tex new file mode 100644 index 0000000000..baaae1bc9c --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrtime-en.tex @@ -0,0 +1,133 @@ +% ====================================================================== +% scrtime-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrtime of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrtime-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrtime)] +\translator{Markus Kohm\and Gernot Hassenpflug\and Karl Hagen} + +\chapter{The Current Time with \Package{scrtime}} +\labelbase{scrtime} +\BeginIndexGroup +\BeginIndex{Package}{scrtime} + +This package lets you find the current time. Starting with version~3.05, the +package also supports the option interface already familiar from the +\KOMAScript{} classes and various other \KOMAScript{} packages. See, for +example, \autoref{sec:typearea.options} for more information. + +\begin{Declaration}% + \Macro{thistime}\OParameter{delimiter}% + \Macro{thistime*}\OParameter{delimiter} +\end{Declaration}% +\Macro{thistime} returns the current time\Index{time} in hours and minutes. +The delimiter between the values of hour, minutes and seconds can be given in +the optional argument. The default is the character ``\PValue{:}''. + +\Macro{thistime*} works in almost the same way as \Macro{thistime}. The only +difference is that, unlike \Macro{thistime}, \Macro{thistime*} does not add a +leading zero to the minute field when its value is less than 10. Thus, with +\Macro{thistime} the minute field has always two places. +\begin{Example} + The line +\begin{lstlisting} + Your train departs at \thistime. +\end{lstlisting} + results, for example, in: + \begin{ShowOutput} + Your train departs at \thistime. + \end{ShowOutput} + or: + \begin{ShowOutput} + Your train departs at 23:09. + \end{ShowOutput} + \bigskip + In contrast to the previous example a line like: +\begin{lstlisting} + This day is already \thistime*[\ hours and\ ] minutes old. +\end{lstlisting} + results in: + \begin{ShowOutput} + This day is already \thistime*[\ hours and\ ] minutes old. + \end{ShowOutput} + or: + \begin{ShowOutput} + This day is already 12 hours and 25 minutes old. + \end{ShowOutput} +\end{Example} +\EndIndexGroup + + +\begin{Declaration}% + \Macro{settime}\Parameter{time} +\end{Declaration}% +\Macro{settime} sets the output of \DescRef{scrtime.cmd.thistime} and +\DescRef{scrtime.cmd.thistime*} to a fixed value. In this case, the optional +parameter of \DescRef{scrtime.cmd.thistime} or \DescRef{scrtime.cmd.thistime*} +is ignored, since the complete string returned by +\DescRef{scrtime.cmd.thistime} or \DescRef{scrtime.cmd.thistime*} has been +explicitly defined. \Macro{settime}.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{12h}{simple switch}% +\end{Declaration}% +\BeginIndex{Option}{24h}% +With the \Option{12h}\ChangedAt{v3.05a}{\Package{scrtime}} option, you can +select whether to print the time given by \DescRef{scrtime.cmd.thistime} and +\DescRef{scrtime.cmd.thistime*} in 12- or 24-hour format. The option accepts +the values for simple switches listed in \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch}. Using the option without a value is +equivalent to \OptionValue{12h}{true}, and therefore activates the +12-hour-format. The default, however, is \Option{24h}. + +You can set this option globally in the optional argument of +\DescRef{typearea.cmd.documentclass}, as a package option in the optional +argument of \DescRef{typearea.cmd.usepackage}, or even after loading the +package using \DescRef{typearea.cmd.KOMAoptions} or +\DescRef{typearea.cmd.KOMAoption} (see, e.\,g. \autoref{sec:typearea.options}, +\DescPageRef{typearea.cmd.KOMAoptions}). However the option no longer has any +effect on the if you call \DescRef{scrtime.cmd.settime}. After invoking this +command, the time is output only with the value and in the format specified +there. + +For\textnote{Attention!} the sake of compatibility with earlier versions of +\Package{scrtime}, the option \Option{24h} will switch to 24-hour format if +used in the optional argument of \Macro{documentclass} or \Macro{usepackage}. +However, you should not use this option any longer.% +\EndIndexGroup +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrtime.html b/macros/latex/contrib/koma-script/doc/scrtime.html index b386b493a2..a2e7b4d18e 100644 --- a/macros/latex/contrib/koma-script/doc/scrtime.html +++ b/macros/latex/contrib/koma-script/doc/scrtime.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrtime" /> + + - + - The KOMA-Script Documentation Wrapper + The Current Time with scrtime -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

The Current Time with scrtime

+

Die aktuelle Zeit mit scrtime

- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Die aktuelle Zeit mit scrtime in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/scrwfile-de.tex b/macros/latex/contrib/koma-script/doc/scrwfile-de.tex new file mode 100644 index 0000000000..0b3fa39841 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrwfile-de.tex @@ -0,0 +1,285 @@ +% ====================================================================== +% scrwfile-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrwfile of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrwfile-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrwfile)] + +\chapter{Dateien mit \Package{scrwfile} sparen und ersetzen} +\labelbase{scrwfile} + +\BeginIndexGroup +\BeginIndex{Package}{scrwfile} +Eines der Probleme, die auch durch die Einführung von \eTeX{} nicht gelöst +wurden, ist die Tatsache, dass \TeX{} nur 18 Dateien gleichzeitig zum Schreiben +geöffnet haben kann. Diese Zahl erscheint zunächst recht groß. Allerdings ist +zu berücksichtigen, dass bereits \LaTeX{} selbst einige dieser Dateien +belegt. Inhaltsverzeichnis, Tabellenverzeichnis, Abbildungsverzeichnis, Index, +Glossar und jedes weitere Verzeichnis, das von \LaTeX{} aus erzeugt wird, +belegt in der Regel eine weitere Datei. Dazu kommen Hilfsdateien von Paketen +wie \Package{hyperref} oder \Package{minitoc}. + +Im Endeffekt kann es daher geschehen, dass irgendwann die Meldung +\begin{lstcode} + ! No room for a new \write . + \ch@ck ...\else \errmessage {No room for a new #3} + \fi +\end{lstcode} +erscheint. Seit einiger Zeit ist die einfachste Lösung dieses Problems die +Verwendung von Lua\LaTeX{} anstelle von PDF\LaTeX{} oder \XeLaTeX. Damit +entfällt die Beschränkung und die maximale Anzahl der gleichzeitig zum +Schreiben geöffneten Dateien wird nur noch durch das Betriebssystem +bestimmt. In der Realität braucht man sich darüber dann normalerweise keine +Gedanken mehr zu machen. + +Dass \LaTeX{} bei Verzeichnissen wie dem Inhaltsverzeichnis, dem +Tabellenverzeichnis und dem Abbildungsverzeichnis immer sofort eine neue Datei +zum Schreiben öffnet, hat aber auch noch einen weiteren Nachteil. Solche +Verzeichnisse werden durch deren Befehle nicht nur direkt gesetzt, sie können +auch kein weiteres Mal gesetzt werden, da die zugehörige Hilfsdatei nach dem +jeweiligen Befehl bis zum Ende des Dokuments leer ist. + +Das Paket \Package{scrwfile} bietet hier eine grundsätzliche Änderung im +\LaTeX-Kern, durch die beide Probleme nicht nur für Lua\LaTeX{} sondern auch bei +Verwendung von PDF\LaTeX{} oder \XeLaTeX{} gelöst werden können. + + +\section{Grundsätzliche Änderungen am \LaTeX-Kern} +\seclabel{kernelpatches} + +\LaTeX-Klassen verwenden zum Öffnen eines Verzeichnisses, beispielsweise mit +\Macro{tableofcontents} oder \Macro{listoffigures}, die \LaTeX-Kern-Anweisung +\Macro{@starttoc}\IndexCmd{@starttoc}. \LaTeX{} selbst lädt bei dieser +Anweisung nicht nur die zugehörige Hilfsdatei, sondern öffnet diese Hilfsdatei +auch neu zum Schreiben. Werden anschließend mit \Macro{addtocontents} oder +\Macro{addcontentsline} Einträge in dieses Verzeichnis vorgenommen, so wird +jedoch nicht direkt in die geöffnete Hilfsdatei geschrieben. Stattdessen +schreibt \LaTeX{} \Macro{@writefile}-Anweisungen\IndexCmd{@writefile} in die +\File{aux}-Datei. Erst beim Einlesen der \File{aux}-Dateien am Ende des +Dokuments wird dann über diese \Macro{@writefile}-Anweisungen in die +tatsächlichen Hilfsdateien geschrieben. Die Hilfsdateien werden von \LaTeX{} +auch nicht explizit geschlossen. Stattdessen verlässt sich \LaTeX{} hier +darauf, dass \TeX{} die Dateien am Ende ohnehin schließt. + +Dieses Vorgehen sorgt dafür, dass die Hilfsdateien zwar erst innerhalb von +\Macro{end}\PParameter{document} tatsächlich beschrieben werden, aber trotzdem +während des gesamten \LaTeX-Laufs gleichzeitig offen sind. \Package{scrwfile} +hat nun genau hier einen Ansatzpunkt: die Umdefinierung von \Macro{@starttoc} +und \Macro{@writefile}. + +Natürlich\textnote{Achtung!} besitzen Änderungen am \LaTeX-Kern immer das +Potential, dass es zu Unverträglichkeiten mit anderen Paketen kommen +kann. Betroffen können in erster Linie Pakete sein, die ebenfalls +\Macro{@starttoc} oder \Macro{@writefile} umdefinieren. In einigen Fällen kann +es helfen, die Reihenfolge der Pakete zu ändern.% +\iffalse % Umbruchkorrektur +\ Wenn Sie auf ein solches Problem stoßen, sollten Sie sich an den +\KOMAScript-Autor wenden.5 +\fi + +\section{Das Eindateiensystem} +\seclabel{singlefilefeature} + +Bereits beim Laden des Pakets mit +% Umbruchoptimierung: listings +\begin{lstcode} + \usepackage{scrwfile} +\end{lstcode} +wird \Macro{@starttoc}\IndexCmd{@starttoc} von \Package{scrwfile} so +umdefiniert, dass davon selbst keine Datei mehr zum Schreiben angefordert und +geöffnet wird. Unmittelbar vor dem Schließen der \File{aux}-Datei in +\Macro{end}\PParameter{document} wird dann \Macro{@writefile} so umdefiniert, +dass diese Anweisung statt in die eigentlichen Hilfsdateien in eine neue +Hilfsdatei mit der Endung \File{wrt} schreibt. Nach dem Einlesen der +\File{aux}-Dateien wird schließlich die \File{wrt}-Datei abgearbeitet und zwar +ein Mal für jede der Hilfsdateien, in die mit \Macro{@writefile} geschrieben +wird. Dabei muss aber nicht jede dieser Hilfsdateien gleichzeitig +geöffnet sein. Stattdessen ist immer nur eine zum Schreiben geöffnet und wird +auch wieder explizit geschlossen. Da dabei eine interne Schreibdatei von +\LaTeX{} wiederverwendet wird, benötigt \Package{scrwfile} keine einzige +eigene Schreibdatei für diese Art von Verzeichnissen. + +Selbst wenn bisher nur mit einem Inhaltsverzeichnis gearbeitet wird, steht +nach dem Laden des Pakets bereits eine Schreibdatei mehr für +Literaturverzeichnisse, Stichwortverzeichnisse, Glossare und ähnliche +Verzeichnisse, die nicht mit \Macro{@starttoc} arbeiten, zur +Verfügung. Darüber hinaus können beliebig viele Verzeichnisse, die mit +\Macro{@starttoc}\IndexCmd{@starttoc} arbeiten, angelegt werden.% +% + +\section{Das Klonen von Dateieinträgen} +\seclabel{clonefilefeature} + +Nachdem \Macro{@writefile}\IndexCmd{@writefile} für das Eindateiensystem aus +dem vorherigen Abschnitt bereits so geändert wurde, dass es nicht direkt in +die entsprechende Hilfsdatei schreibt, lag eine weitere Idee nahe. Beim +Kopieren der \Macro{@writefile}-Anweisungen in die \File{wrt}-Datei können +diese auch für andere Zielendungen übernommen werden. Es sei ausdrücklich +darauf hingewiesen, dass dies nur in der Dokumentpräambel funktioniert. + +\begin{Declaration} + \Macro{TOCclone}\OParameter{Verzeichnisüberschrift} + \Parameter{Quellendung}\Parameter{Zielendung} + \Macro{listof\PName{Zielendung}} +\end{Declaration}% +Durch dieses Klonen von Dateieinträgen werden so ganze Verzeichnisse +geklont. Dazu muss man nur die Endung der Hilfsdatei des Verzeichnisses +kennen, dessen Einträge kopiert werden sollen. Zusätzlich muss man die Endung +einer Zieldatei angeben. In diese werden die Einträge dann kopiert. Natürlich +kann man in dieses geklonte Verzeichnis auch zusätzliche Einträge +schreiben. + +Die \PName{Zielendung} der Zieldatei wird mit Hilfe von +\hyperref[cha:tocbasic]{\Package{tocbasic}}% +\important{\hyperref[cha:tocbasic]{\Package{tocbasic}}} (siehe +\autoref{cha:tocbasic}) verwaltet. Steht eine solche Datei bereits unter +Kontrolle von \hyperref[cha:tocbasic]{\Package{tocbasic}} wird eine Warnung +ausgegeben. Anderenfalls wird mit Hilfe von +\hyperref[cha:tocbasic]{\Package{tocbasic}} ein neues Verzeichnis für diese +Endung angelegt. Die Überschrift des neuen Verzeichnisses kann man über das +optionale Argument \PName{Verzeichnisüberschrift} bestimmen. + +Ausgeben kann man dieses neue Verzeichnis dann beispielsweise über die +Anweisung \Macro{listof\PName{Zielendung}}. Die +Verzeichniseigenschaften\important{\hyperref[cha:tocbasic]{\Package{tocbasic}}} +\PValue{leveldown}, \PValue{numbered}, \PValue{onecolumn} und \PValue{totoc} +(siehe Anweisung \DescRef{tocbasic.cmd.setuptoc} in +\autoref{sec:tocbasic.toc}, \DescPageRef{tocbasic.cmd.setuptoc}) werden +automatisch in das Zielverzeichnis übernommen, falls sie für das +Quellverzeichnis bereits gesetzt waren. Die Eigenschaft \PValue{nobabel} wird +für geklonte Verzeichnisse immer gesetzt, da die entsprechenden +\Package{babel}-Einträge in das Quellverzeichnis ohnehin bereits kopiert +werden. + +\begin{Example} + Angenommen, Sie wollen zusätzlich zum normalen Inhaltsverzeichnis eine + Gliederungsübersicht, in der nur die Kapitel angezeigt werden. +\begin{lstcode} + \usepackage{scrwfile} + \TOCclone[Gliederungsübersicht]{toc}{stoc} +\end{lstcode} + Hierdurch wird zunächst ein neues Verzeichnis mit der Überschrift + »Gliederungsübersicht« angelegt. Das neue Verzeichnis verwendet die + Dateiendung \File{stoc}. Alle Einträge in die Datei mit der Endung + \File{toc} werden auch in dieses Verzeichnis kopiert. + + Damit dieses neue Verzeichnis nun nur die Kapitelebene ausgibt, verwenden + wir: +\begin{lstcode} + \addtocontents{stoc}{\protect\value{tocdepth}=0} +\end{lstcode} + Während\textnote{Achtung!} normalerweise erst ab + \Macro{begin}\PParameter{document} Einträge in ein Verzeichnis vorgenommen + werden können, funktioniert dies nach Laden von \Package{scrwfile} bereits + in der Dokumentpräambel. Durch die hier gezeigte unkonventionelle Art, den + Zähler \DescRef{maincls.counter.tocdepth} innerhalb der Verzeichnisdatei zu + ändern, bleibt diese Änderung nur für dieses Verzeichnis wirksam. + + Später im Dokument wird das Verzeichnis mit der Endung \File{stoc} dann + durch +\begin{lstcode}[moretexcs={listofstoc}] + \listofstoc +\end{lstcode} + ausgegeben und zeigt nur die Teile und Kapitel des Dokuments. + + Etwas schwieriger wird es, wenn das Inhaltsverzeichnis in der + Gliederungsübersicht angezeigt werden soll. Dies wäre zwar mit +\begin{lstcode} + \addtocontents{toc}{% + \protect\addxcontentsline + {stoc}{chapter}{\protect\contentsname}% + } +\end{lstcode} + möglich. Da jedoch alle Einträge in \File{toc} auch nach \File{stoc} kopiert + werden, würde so von der Gliederungsübersicht dieser Eintrag ebenfalls + übernommen. Also darf der Eintrag nicht aus der Verzeichnisdatei heraus + erzeugt werden. Da das Paket \hyperref[cha:tocbasic]{\Package{tocbasic}}% + \important{\hyperref[cha:tocbasic]{\Package{tocbasic}}} zum Einsatz kommt, + kann aber% + \phantomsection\xmpllabel{cmd.BeforeStartingTOC}% +\begin{lstcode} + \BeforeStartingTOC[toc]{% + \addxcontentsline{stoc}{chapter} + {\protect\contentsname}} +\end{lstcode} + verwendet werden. Natürlich\textnote{Achtung!} setzt dies voraus, dass die + Datei mit Endung \File{toc} auch unter der Kontrolle von + \hyperref[cha:tocbasic]{\Package{tocbasic}} steht. Dies ist bei allen + \KOMAScript-Klassen der Fall. Näheres zur Anweisung + \DescRef{tocbasic.cmd.BeforeStartingTOC} ist in \autoref{sec:tocbasic.toc} + auf \DescPageRef{tocbasic.cmd.BeforeStartingTOC} zu finden. Die Erklärung zu + \DescRef{tocbasic.cmd.addxcontentsline} findet sich in demselben Abschnitt + auf \DescPageRef{tocbasic.cmd.addxcontentsline}.% +\end{Example}% +\EndIndexGroup% +\ExampleEndFix + + +\section{Hinweis zum Entwicklungsstand} +\seclabel{draft} + +Obwohl das Paket bereits von mehreren Anwendern getestet wurde und vielfach im +Einsatz ist, ist es vom Autor als experimentell eingestuft. Deshalb ist es +theoretisch möglich, dass insbesondere an der internen Funktionsweise des +Pakets noch Änderungen vorgenommen werden. Teilweise befindet sich auch Code +für zusätzliche Erweiterungen im Paket. Da jedoch keine Benutzeranweisungen +existieren, mit denen diese Möglichkeiten genutzt werden könnten, wurde auf +eine Dokumentation derselben verzichtet. + + +\section{Bekannte Paketunverträglichkeiten} +\seclabel{incompatible} + +Wie in \autoref{sec:scrwfile.kernelpatches} bereits erwähnt, muss +\Package{scrwfile} einige wenige Anweisungen des \LaTeX-Kerns +umdefinieren. Dies geschieht nicht allein während des Ladens des Pakets, +sondern vielmehr zu verschiedenen Zeitpunkten während der Abarbeitung eines +Dokuments, beispielsweise vor dem Einlesen der +\File{aux}-Datei. Das\textnote{Achtung!} führt dazu, dass \Package{scrwfile} +sich nicht mit anderen Paketen verträgt, die dieselben Anweisungen ebenfalls +zur Laufzeit umdefinieren. + +Ein Beispiel für eine solche Unverträglichkeit ist +\Package{titletoc}\important{\Package{titletoc}}\IndexPackage{titletoc}. Das +Paket definiert unter gewissen Umständen \Macro{@writefile} zur Laufzeit +um. Werden \Package{scrwfile} und \Package{titletoc} zusammen verwendet, ist +die Funktion beider Paket nicht mehr gewährleistet. Dies ist weder ein Fehler +in \Package{titletoc} noch in \Package{scrwfile}.% +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Eindateiensystem Schreibdatei Zieldatei Zielendung Quellendung +% LocalWords: Verzeichnisüberschrift Dateiendung Zielendungen Verzeichnisdatei +% LocalWords: Benutzeranweisungen Dokumentpräambel Kapitelebene +% LocalWords: Paketunverträglichkeiten Verzeichniseigenschaften + diff --git a/macros/latex/contrib/koma-script/doc/scrwfile-en.tex b/macros/latex/contrib/koma-script/doc/scrwfile-en.tex new file mode 100644 index 0000000000..1782d26e65 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrwfile-en.tex @@ -0,0 +1,265 @@ +% ====================================================================== +% scrwfile-en.tex +% Copyright (c) Markus Kohm, 2010-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about scrwfile of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrwfile-en.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrwfile)] + +\translator{Markus Kohm\and Jana Schubert\and Karl Hagen} + +\chapter{Economising and Replacing Files with \Package{scrwfile}} +\labelbase{scrwfile} +\BeginIndexGroup +\BeginIndex{Package}{scrwfile} + +One of the problems not solved by the introduction of \eTeX{} is the fact that +\TeX{} can support only 18 open write handles. This number seems quite large +at first, but many of these handles are already reserved. \TeX{} itself uses +handle 0 for the log file. \LaTeX{} needs handle 1 for \Macro{@mainaux}, +handle 2 for \Macro{@partaux}, one handle for \Macro{tableofcontents}, one +handle for \Macro{listoffigures}, one handle for \Macro{listoftables}, and one +handle for \Macro{makeindex}. Every other such list generates another handle, +and packages like \Package{hyperref} or \Package{minitoc} require write +handles too. + +The bottom line is that eventually you may get the following error message: +\begin{lstcode} + ! No room for a new \write . + \ch@ck ...\else \errmessage {No room for a new #3} + \fi +\end{lstcode} + +For some time, the simplest solution to this problem has been to use +\mbox{Lua\LaTeX} instead of \mbox{pdf\LaTeX} or \XeLaTeX. This eliminates the +restriction, and the maximum number of files you can have open for writing is +then limited only by the operating system. In reality, you usually so not need +to worry about it any more. + +The fact that \LaTeX{} always opens a new file for writing every table of +contents, list of figures, list of tables, etc. has another disadvantage. Such +lists are not only output by their respective commands, they also could not be +output a second time because the associated auxiliary file\footnote{The term + \emph{auxiliary file} here refers not to the main \File{aux} file but to the + other internal files used indirectly via the \File{aux} file, e.\,g. the + \File{toc} file, the \File{lof} file, or the \File{lot} file.} is empty +after the respective command until the end of the document. + +The \Package{scrwfile} package makes a fundamental change to the \LaTeX{} +kernel, which can solve both problems not only for \mbox{Lua\LaTeX} but also +for \mbox{pdf\LaTeX} or \XeLaTeX. + +\section{Fundamental Changes to the \LaTeX{} Kernel} +\seclabel{kernelpatches} + +\LaTeX{} classes use the \LaTeX{} kernel command +\Macro{@starttoc}\IndexCmd{@starttoc} to allocate a new file handle, such as +for \Macro{tableofcontents} or \Macro{listoffigures}. This command not only +loads the associated auxiliary file but also reopens it for writing. If +entries to these lists are added using \Macro{addcontentsline}, however, the +system does not write directly to these auxiliary files. Instead, \LaTeX{} +writes \Macro{@writefile}\IndexCmd{@writefile} commands to the \File{aux} +file. Only while reading the \File{aux} file at the end of the document do +those \Macro{@writefile} commands become actual write operations in the +auxiliary files. Additionally, \LaTeX{} does not close the auxiliary files +explicitly. Instead it relies on \TeX{} to close all open files at the end. + +This procedure ensures that the auxiliary files are only written to within +\Macro{end}\PParameter{document}, but they remain open throughout the entire +\LaTeX{} run. \Package{scrwfile} takes is starting point here, by redefining +\Macro{@starttoc} and \Macro{@writefile}. + +Of course\textnote{Attention!} changes to the \LaTeX{} kernel always have the +potential to cause incompatibilities with other packages. Those primarily +affected may be those which also redefine \Macro{@starttoc} or +\Macro{@writefile}. In some cases, it may help to change the order the +packages are loaded. If you encounter such a problem, please contact the +\KOMAScript{} author. + +\section{The Single-File Method} +\seclabel{singlefilefeature} + +As soon as the package is loaded with +\begin{lstcode} + \usepackage{scrwfile} +\end{lstcode} +\Package{scrwfile} redefines \Macro{@starttoc}\IndexCmd{@starttoc} so that it +no longer allocates a write handle or opens a file for writing. +\Macro{@writefile} is redefined so that immediately before closing the +\File{aux} file in \Macro{end}\PParameter{document}, it writes not to the +usual auxiliary files but to a single new file with extension \File{wrt}. +After reading the \File{aux} file, this \File{wrt} file will be processed once +for each of the auxiliary files that \Macro{@writefile} writes information to. +However these auxiliary files do not all have to be open at the same time. +Instead, only one is open at a time and is explicitly closed afterwards. Since +\LaTeX{} reuses an internal write file, \Package{scrwfile} doesn't need its +own write handle for this type of table of contents or list of floating +environments. + +Because of this behaviour, even if you have only one table of contents, once +you load \Package{scrwfile} you will have access to a write file handle for +bibliographies, indexes, glossaries, and similar lists that do not use +\Macro{@starttoc}. Additionally, you can create any number of tables of +contents and other lists that use \Macro{@starttoc}\IndexCmd{@starttoc}. + +\section{The File Cloning Method} +\seclabel{clonefilefeature} + +Since \Macro{@writefile}\IndexCmd{@writefile} has already been modified for +the single-file method described in the previous system so that it no longer +writes directly to the corresponding auxiliary file, a further possibility +suggests itself. When copying the \Macro{@writefile} statements into the +\File{wrt} file, you can also copy them to other destinations. It should be +explicitly noted that this only works in the document preamble. + +\begin{Declaration} + \Macro{TOCclone}% + \OParameter{list heading}\Parameter{source extension}% + \Parameter{destination extension} +\end{Declaration} +This cloning of file entries copies entire tables of contents or other lists. +For this, you only need to specify the extension of the auxiliary file whose +entries should be copied and the extension of a destination file. The entries +are then copied there. Of course, you can also write additional entries to +this cloned file. + +You can manage the \PName{destination extention} using +\hyperref[cha:tocbasic]{\Package{tocbasic}}% +\important{\hyperref[cha:tocbasic]{\Package{tocbasic}}} (see +\autoref{cha:tocbasic}). If such a file is already under the control of +\hyperref[cha:tocbasic]{\Package{tocbasic}}, a warning will be issued. +Otherwise, a new list for this extension will be created using +\hyperref[cha:tocbasic]{\Package{tocbasic}}. You can set the heading for this +list with the optional argument \PName{list heading}. + +You can then output this new content list, for example, with the command +\Macro{listof\PName{destination extension}}. The content-list +attributes\important{\hyperref[cha:tocbasic]{\Package{tocbasic}}} +\PValue{leveldown}, \PValue{numbered}, \PValue{onecolumn}, and \PValue{totoc} +(see \DescRef{tocbasic.cmd.setuptoc} in \autoref{sec:tocbasic.toc}, +\DescPageRef{tocbasic.cmd.setuptoc}) are automatically copied to the +destination list if they were already set in the source list. The +\PValue{nobabel} attribute is always set for cloned content lists, because the +language-selection commands in the source content list are already copied +anyway. + +\begin{Example} + Suppose you want a short table of contents with only the chapter level in + addition to the normal the table of contents: +\begin{lstcode} + \usepackage{scrwfile} + \TOCclone[Summary Contents]{toc}{stoc} +\end{lstcode} + This creates a new table of contents with the heading ``Summary Contents''. + The new table of contents uses an auxiliary file with the extension + \File{stoc}. All entries to the auxiliary file with extension \File{toc} + will also be copied to this new auxiliary file. + + In order to have the new short table of contents display only the chapter + entries, we use: +\begin{lstcode} + \addtocontents{stoc}{\protect\value{tocdepth}=0} +\end{lstcode} + Although\textnote{Attention!} normally you cannot write to an auxiliary file + before \Macro{begin}\PParameter{document}, the code above works in the + preamble after loading \Package{scrwfile}. Owing to the unconventional way + of changing the \DescRef{maincls.counter.tocdepth} counter within the TOC + file, this change only applies to this content list. + + Later in the document, we then output the content list with the file + extension \File{stoc} with: +\begin{lstcode}[moretexcs={listofsttoc}] + \listofstoc +\end{lstcode} + and this shows only the parts and chapters of the document. + + Things become a bit more difficult if the summary contents are to be + listed in the table of contents. This would seem to be possible with +\begin{lstcode} + \addtocontents{toc}{% + \protect\addxcontentsline + {stoc}{chapter}{\protect\contentsname}% + } +\end{lstcode} +However, since all entries in \File{toc} are also copied to \File{stoc}, this +entry would also be copied from the summary contents. So we cannot generate +the entry from the content list. Because we use the +\Package{tocbasic}\important{\Package{tocbasic}} package, we can use the +following: +\phantomsection\xmpllabel{cmd.BeforeStartingTOC} +\begin{lstcode} + \BeforeStartingTOC[toc]{% + \addcontentslinedefault{stoc}{chapter} + {\protect\contentsname}% + } +\end{lstcode} +Of course, this assumes that the \File{toc} file is under the control +of the \Package{tocbasic} package, which is indeed the case for all +\KOMAScript{} classes. See \autoref{sec:tocbasic.toc} on +\DescPageRef{tocbasic.cmd.BeforeStartingTOC} for more information about +\DescRef{tocbasic.cmd.BeforeStartingTOC}.% +\end{Example} +Incidentally, the \DescRef{tocbasic.cmd.addxcontentsline} command used in the +examples is also documented in \autoref{cha:tocbasic}, +\DescPageRef{tocbasic.cmd.addxcontentsline}.% +\EndIndexGroup + + +\section{Note on the State of Development} +\seclabel{draft} + +Although this package has already been tested by many users and is often in +production use, its development is still ongoing. Therefore, it is +theoretically possible that there might be changes, especially to the internal +functionality. It is likely that the package will be extended in the future. +Some code for such extensions is already in the package. However, as there are +no user commands that make use of these features, they are currently +undocumented. + +\section{Known Package Incompatibilities} +\seclabel{incompatible} + +As mentioned in \autoref{sec:scrwfile.kernelpatches}, \Package{scrwfile} +redefines some commands of the \LaTeX{} kernel. This happens not only while +loading the package, but indeed at various times while the document is +processed, for example just before reading the \File{aux} file. +This\textnote{Attention!} results in incompatibility with packages that also +redefine these commands at run time. + +The \Package{titletoc}\important{Package{titletoc}}\IndexPackage{titletoc} +package is an example for such an incompatibility. That package redefines +\Macro{@writefile} under some conditions at run time. If you use both +\Package{scrwfile} and \Package{titletoc}, there is no warranty for the +correct behaviour of either one. This is neither an error of +\Package{titletoc} nor of \Package{scrwfile}.% +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/scrwfile.html b/macros/latex/contrib/koma-script/doc/scrwfile.html index b386b493a2..de29ea7c82 100644 --- a/macros/latex/contrib/koma-script/doc/scrwfile.html +++ b/macros/latex/contrib/koma-script/doc/scrwfile.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of scrwfile" /> + + - + - The KOMA-Script Documentation Wrapper + Economising and Replacing Files with scrwfile -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

Economising and Replacing Files with scrwfile

+

Dateien mit scrwfile sparen und ersetzen

- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Dateien mit scrwfile sparen und ersetzen” in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/terms-de.tex b/macros/latex/contrib/koma-script/doc/terms-de.tex new file mode 100644 index 0000000000..aaffde3dd6 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/terms-de.tex @@ -0,0 +1,636 @@ +% ====================================================================== +% terms-de.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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 +% https://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.md. +% ====================================================================== +% +% Language dependencies (ngerman) of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== +% +\KOMAProvidesFile{terms-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide language dependencies] +% +% \section{Title} +% +% \begin{macro}{\GuideSubject} +% \begin{macro}{\GuideTitle} +% \begin{macro}{\GuideSubTitle} +% \begin{macro}{\GuideAuthorHeadline} +% \begin{macro}{\GuideTranslatorHeadline} +% \begin{macro}{\GuideWarrantyHeadline} +% \begin{macro}{\GuideWarranty} +% \begin{macro}{\GuideCopyright} +% \begin{macro}{\GuideDedication} +% Language dependencies of all the title pages. +% \begin{macrocode} +\newcommand*{\GuideSubject}{Die Anleitung} +\newcommand*{\GuideTitle}{\KOMAScript}% +\newcommand*{\GuideSubTitle}{ein wandelbares \LaTeXe-Paket}% +\newcommand*{\GuideAuthorHeadline}{Autoren des \KOMAScript-Pakets}% +\newcommand*{\GuideTranslatorHeadline}{An der deutschen \"Ubersetzung dieser + Anleitung haben mitgewirkt: } +\newcommand*{\GuideWarrantyHeadline}{Rechtliche Hinweise:}% +\newcommand*{\GuideWarranty}{Der Autor dieser Anleitung ist in dieser + Eigenschaft nicht verantwortlich f\"ur die + Funktion oder Fehler der in dieser Anleitung beschriebenen Software. Bei der + Erstellung von Texten und Abbildungen wurde mit gro\ss er Sorgfalt + vorgegangen. Trotzdem k\"onnen Fehler nicht vollst\"andig ausgeschlossen + werden.\par\medskip% + Der Autor kann jedoch f\"ur fehlerhafte Angaben und deren Folgen weder + eine juristische Verantwortung noch irgendeine Haftung \"ubernehmen. F\"ur + Verbesserungsvorschl\"age und Hinweise auf Fehler ist der Autor + dankbar.\par\medskip% + In dieser Anleitung werden Warennamen ohne der Gew\"ahrleistung der freien + Verwendbarkeit und ohne besondere Kennzeichnung benutzt. Es ist jedoch davon + auszugehen, dass viele der Warennamen gleichzeitig eingetragene + Warenzeichnen oder als solche zu betrachten sind.}% +\newcommand*{\GuideCopyright}{Freie Bildschirm-Version ohne Optimierung des + Umbruchs\par\medskip% + Diese Anleitung ist als Bestandteil von \KOMAScript{} frei im Sinne der + \LaTeX{} Project Public License Version 1.3c. Eine f\"ur \KOMAScript{} g\"ultige + deutsche \"Ubersetzung liegt \KOMAScript{} in der Datei »\texttt{lppl-de.txt}« + bei. Diese Anleitung --~auch in gedruckter Form~-- darf nur zusammen mit den + \"ubrigen Bestandteilen von \KOMAScript{} weitergegeben und verteilt werden. + Eine Verteilung der Anleitung unabh\"angig von den \"ubrigen Bestandteilen von + \KOMAScript{} bedarf der ausdr\"ucklichen Genehmigung des + Autors.\par\medskip% + Eine umbruchoptimierte und erweiterte Ausgabe der \KOMAScript-Anleitung ist + in der dante-Edition von Lehmanns Media erschienen (siehe + \cite{book:komascript}).}% +\newcommand*{\GuideDedication}{F\"ur meine Frau ohne deren tagt\"agliche + Arbeit ich mir meine ehrenamtlichen Taten nicht leisten k\"onnte!}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \section{CTAN Server to be Used} +% +% \begin{macro}{\GuideCTANserver} +% Unused since 2015-09-30. +% \begin{macrocode} +%\newcommand*{\GuideCTANserver}{mirror.ctan.org} +% \end{macrocode} +% \end{macro} +% +% +% \section{Terms} +% +% Some terms, e.g. used at index notes. +% +% \begin{macro}{\GuideClass} +% \begin{macro}{\GuideClassIndexCategory} +% \begin{macro}{\GuideClassIndexCategoryExpanded} +% The term ``class''. +% \begin{macrocode} +\newcommand*{\GuideClass}{Klasse} +\newcommand*{\GuideClassIndexCategory}{Klassen} +\let\GuideClassIndexCategoryExpanded\GuideClassIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideCounter} +% \begin{macro}{\GuideCounterIndexCategory} +% \begin{macro}{\GuideCounterIndexCategoryExpanded} +% The term ``counter''. +% \begin{macrocode} +\newcommand*{\GuideCounter}{Z\"ahler} +\newcommand*{\GuideCounterIndexCategory}{Z\"ahler} +\let\GuideCounterIndexCategoryExpanded\GuideCounterIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideEnvironment} +% \begin{macro}{\GuideEnvIndexCategory} +% \begin{macro}{\GuideEnvIndexCategoryExpanded} +% The term ``environment''. +% \begin{macrocode} +\newcommand*{\GuideEnvironment}{Umgebung} +\newcommand*{\GuideEnvIndexCategory}{Umgebungen} +\let\GuideEnvIndexCategoryExpanded\GuideEnvIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideExample} +% The term ``Example'' used at a kind of heading, so it should be upper case. +% \begin{macrocode} +\newcommand*{\GuideExample}{Beispiel} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\GuideFile} +% \begin{macro}{\GuideFileIndexCategory} +% \begin{macro}{\GuideFileIndexCategoryExpanded} +% The term ``file''. +% \begin{macrocode} +\newcommand*{\GuideFile}{Datei} +\newcommand*{\GuideFileIndexCategory}{Dateien} +\let\GuideFileIndexCategoryExpanded\GuideFileIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideFloatstyle} +% \begin{macro}{\GuideFloatstyleIndexCategory} +% \begin{macro}{\GuideFloatstyleIndexCategoryExpanded} +% The term ``\Package{float} style''. +% \begin{macrocode} +\newcommand*{\GuideFloatstyle}{\Package{float}-Stil} +\newcommand*{\GuideFloatstyleIndexCategory}{\Package{float}-Stile} +\newcommand*{\GuideFloatstyleIndexCategoryExpanded}{float-Stile} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideFontElement} +% \begin{macro}{\GuideFontElementIndexCategory} +% \begin{macro}{\GuideFontElementIndexCategoryExpanded} +% The term ``element''. +% \begin{macrocode} +\newcommand*{\GuideFontElement}{Element} +\newcommand*{\GuideFontElementIndexCategory}{Elemente} +\let\GuideFontElementIndexCategoryExpanded\GuideFontElementIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideLength} +% \begin{macro}{\GuideLengthIndexCategory} +% \begin{macro}{\GuideLengthIndexCategoryExpanded} +% The term ``length''. +% \begin{macrocode} +\newcommand*{\GuideLength}{L\"ange} +\newcommand*{\GuideLengthIndexCategory}{L\"angen} +\let\GuideLengthIndexCategoryExpanded\GuideLengthIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideMacro} +% \begin{macro}{\GuideMacroIndexCategory} +% \begin{macro}{\GuideMacroIndexCategoryExpanded} +% \begin{macro}{\GuideCommand} +% \begin{macro}{\GuideCommandIndexCategory} +% \begin{macro}{\GuideCommandIndexCategoryExpanded} +% The term ``command''. +% \begin{macrocode} +\newcommand*{\GuideMacro}{Befehl} +\let\GuideCommand\GuideMacro +\newcommand*{\GuideMacroIndexCategory}{Befehle} +\let\GuideCommandIndexCategory\GuideMacroIndexCategory +\let\GuideMacroIndexCategoryExpanded\GuideMacroIndexCategory +\let\GuideCommandIndexCategoryExpanded\GuideCommandIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideOption} +% \begin{macro}{\GuideOptionIndexCategory} +% \begin{macro}{\GuideOptionIndexCategoryExpanded} +% The term ``option''. +% \begin{macrocode} +\newcommand*{\GuideOption}{Option} +\newcommand*{\GuideOptionIndexCategory}{Optionen} +\let\GuideOptionIndexCategoryExpanded\GuideOptionIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuidePackage} +% \begin{macro}{\GuidePackageIndexCategory} +% \begin{macro}{\GuidePackageIndexCategoryExpanded} +% The term ``package''. +% \begin{macrocode} +\newcommand*{\GuidePackage}{Paket} +\newcommand*{\GuidePackageIndexCategory}{Pakete} +\let\GuidePackageIndexCategoryExpanded\GuidePackageIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuidePagestyle} +% \begin{macro}{\GuidePagestyleIndexCategory} +% \begin{macro}{\GuidePagestyleIndexCategoryExpanded} +% The term ``page style''. +% \begin{macrocode} +\newcommand*{\GuidePagestyle}{Seitenstil} +\newcommand*{\GuidePagestyleIndexCategory}{Seitenstile} +\let\GuidePagestyleIndexCategoryExpanded\GuidePagestyleIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuidePLength} +% \begin{macro}{\GuidePLengthIndexCategory} +% \begin{macro}{\GuidePLengthIndexCategoryExpanded} +% \begin{macro}{\GuidePseudoPrefix} +% The prefix ``pseudo'' at the term ``pseudo length'' and the term itself. +% \begin{macrocode} +\newcommand*{\GuidePseudoPrefix}{Pseudo-} +\newcommand*{\GuidePLength}{Pseudol\"ange} +\newcommand*{\GuidePLengthIndexCategory}{Pseudol\"angen} +\let\GuidePLengthIndexCategoryExpanded\GuidePLengthIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideVariable} +% \begin{macro}{\GuideVariableIndexCategory} +% \begin{macro}{\GuideVariableIndexCategoryExpanded} +% The term ``variable''. +% \begin{macrocode} +\newcommand*{\GuideVariable}{Variable} +\newcommand*{\GuideVariableIndexCategory}{Variablen} +\let\GuideVariableIndexCategoryExpanded\GuideVariableIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideHook} +% \begin{macro}{\GuideHookIndexCategory} +% \begin{macro}{\GuideHookIndexCategoryEpanded} +% The term ``hook''. +% \begin{macrocode} +\newcommand*{\GuideHook}{Haken} +\newcommand*{\GuideHookIndexCategory}{Haken} +\let\GuideHookIndexCategoryExpanded\GuideHookIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideAnd} +% The ``and'' at a list of two. +% \begin{macrocode} +\newcommand*{\GuideAnd}{ und } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\GuideListAnd} +% The ``and'' at a list of more than two. +% \begin{macrocode} +\newcommand*{\GuideListAnd}{ und } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\GuideLoadNonFree} +% Note, that the non free manual contains more information. +% \begin{macrocode} +\newcommand*{\GuideLoadNonFree}{% + Im \KOMAScript-Buch \cite{book:komascript} finden sich an dieser Stelle + weitere Informationen. +} +% \end{macrocode} +% \end{macro} +% +% +% \section{Index} +% +% \begin{macro}{\GuidegenIndex} +% \begin{macro}{\GuidecmdIndex} +% \begin{macro}{\GuidecmdIndexShort} +% \begin{macro}{\GuidelenIndex} +% \begin{macro}{\GuidelenIndexShort} +% \begin{macro}{\GuideelmIndex} +% \begin{macro}{\GuideelmIndexShort} +% \begin{macro}{\GuidefilIndex} +% \begin{macro}{\GuidefilIndexShort} +% \begin{macro}{\GuideoptIndex} +% \begin{macro}{\GuideoptIndexShort} +% \begin{macro}{\GuidehokIndex} +% \begin{macro}{\GuidehokIndexShort} +% The titles and short titles of each single index. +\newcommand*{\GuidegenIndex}{Allgemeiner Index} +\newcommand*{\GuidecmdIndex}{Befehle, Umgebungen und + Variablen} +\newcommand*{\GuidecmdIndexShort}{Index der Befehle etc.} +\newcommand*{\GuidelenIndex}{L\"angen und Z\"ahler} +\newcommand*{\GuidelenIndexShort}{Index der L\"angen etc.} +\newcommand*{\GuideelmIndex}{Elemente mit + der M\"oglichkeit zur Schriftumschaltung} +\newcommand*{\GuideelmIndexShort}{Index der Elemente} +\newcommand*{\GuidefilIndex}{Dateien, Klassen und Pakete} +\newcommand*{\GuidefilIndexShort}{Index der Dateien etc.} +\newcommand*{\GuideoptIndex}{Klassen- und + Paketoptionen} +\newcommand*{\GuideoptIndexShort}{Index der Optionen} +\newcommand*{\GuidehokIndex}{Haken (\emph{do-hooks})} +\newcommand*{\GuidehokIndexShort}{Index der Haken} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideIndexPreamble} +% The preamble text of the whole index. +\newcommand*{\GuideIndexPreamble}{% + Fett hervorgehobene Zahlen geben die Seiten der Erkl\"arung zu einem + Stichwort wieder. Normal gedruckte Zahlen verweisen hingegen auf + Seiten mit zus\"atzlichen Informationen zum jeweiligen Stichwort.% +} +% \end{macro} +% +% \begin{macro}{\GuideIndexSees} +% These are all see index entries. +\newcommand*{\GuideIndexSees}{% + \Index{Seitenmittenmarke|see{Lochermarke}}% + \Index{Falzmarke|see{Faltmarke}}% + \Index{in-page-Titel=\emph{in-page}-Titel|see{Titelkopf}}% + \Index{Index|see{Stichwortverzeichnis}}% + \Index{Register|see{Stichwortverzeichnis}}% +} +% \end{macro} +% +% \begin{macro}{\GuideIndexSeeAlsos} +% These are all see also index entries. +\newcommand*{\GuideIndexSeeAlsos}{% + \Index{Ueberschriften=Überschriften|seealso{Abschnitt, Gliederung, Kapitel}}% + \Index{Gliederung|seealso{Abschnitt, Kapitel, Überschriften}}% + \Index{Bindeanteil|seealso{Bindekorrektur}}% + \Index{Bindung|seealso{Bindekorrektur}}% +} +% \end{macro} +% +% +% \section{Bibliography} +% +% \begin{macro}{\GuideBibPreamble} +% \begin{macrocode} +\newcommand*{\GuideBibPreamble}{% + Sie finden im Folgenden eine ganze Reihe von Literaturangaben. Auf + all diese wird im Text verwiesen. In vielen F\"allen handelt es sich + um Dokumente oder ganze Verzeichnisse, die im Internet verf\"ugbar + sind. In diesen F\"allen ist statt eines Verlages eine URL angegeben. + Wird auf ein \LaTeX-Paket verwiesen, so findet der Verweis in der + Regel in der Form \glqq \url{CTAN://}\emph{Verweis}\grqq{} statt. + Der Pr\"afix \glqq \url{CTAN://}\grqq{} steht dabei f\"ur das + \TeX-Archiv eines jeden CTAN-Servers oder -Spiegels. Sie k\"onnen + den Pr\"afix beispielsweise durch + \url{https://mirror.ctan.org/} ersetzen. Bei + \LaTeX-Paketen ist au\ss erdem zu beachten, dass versucht wurde, + die Version anzugeben, auf die im Text Bezug genommen wurde. Bei + einigen Paketen war es mehr ein Ratespiel, eine einheitliche + Versionsnummer und ein Erscheinungsdatum zu finden. Auch muss die + angegebene Version nicht immer die neuste verf\"ugbare Version sein. + Wenn Sie sich ein Paket neu besorgen und installieren, sollten Sie + jedoch zun\"achst immer die aktuelle Version ausprobieren. Bevor Sie + ein Dokument oder Paket von einem Server herunterladen, sollten Sie + au\ss erdem \"uberpr\"ufen, ob es sich nicht bereits auf Ihrem + Rechner befindet. +} +% \end{macrocode} +% \end{macro} +% +% +% \section{Change Log} +% +% \begin{macro}{\GuideChangeLogPreamble} +% The preamble of the change log index. +% \begin{macrocode} +\newcommand*{\GuideChangeLogPreamble}{% + Sie finden im folgenden eine Auf\/listung aller wesentlichen \"Anderungen + der Benutzerschnittstelle im \KOMAScript-Paket der neueren Zeit. Die Liste + ist sowohl nach Versionen als auch nach Paket- und Klassennamen sortiert. Zu + jeder Version, jedem Paket und jeder Klasse ist jeweils angegeben, auf + welchen Seiten dieser Dokumentation die \"Anderungen zu finden sind. Auf den + entsprechenden Seiten finden Sie dazu passende Randmarkierungen.% +} +% \end{macrocode} +% \end{macro} +% +% +% \section{Language Extensions} +% +% Some terms should be part of the captions of the language. +% \begin{macro}{\GuideLanguageExtensions} +% This macro has to be defined, because the class will add it to the language +% at |\begin{document}| and it will also call it. +% \begin{macrocode} +\newcommand*{\GuideLanguageExtensions}{% +% \end{macrocode} +% \begin{macro}{\pageautorefname} +% The term ``page'' that will be put before the reference of a page set by +% |\autopageref|. +% \begin{macrocode} + \let\pageautorefname\pagename +% \end{macrocode} +% \end{macro} +% \begin{macro}{\subsectionautorefname} +% \begin{macro}{\subsubsectionautorefname} +% \begin{macro}{\paragraphautorefname} +% \begin{macro}{\subparagraphautorefname} +% I'll call them all ``section''. +% \begin{macrocode} + \let\subsectionautorefname=\sectionautorefname + \let\subsubsectionautorefname=\sectionautorefname + \let\paragraphautorefname=\sectionrefname + \let\subparagraphautorefname=\sectionrefname +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\changelogname} +% The name of the change log index. +% \begin{macrocode} + \def\changelogname{\"Anderungsliste}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\descriptionname} +% \begin{macro}{\contentsname} +% \begin{macrocode] + \def\descriptionname{Bezeichnung}% + \def\contentname{Inhalt}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\lengthname} +% \begin{macrocode} + \def\lengthname{L\"ange}% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +} +% \end{macrocode} +% \end{macro} +% +% +% \section{The Pseudo-Length Figure} +% +% \begin{macro}{\letterheadname} +% \begin{macrocode} +\newcommand*{\letterheadname}{Briefkopf} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\letterfootname} +% \begin{macrocode} +\newcommand*{\letterfootname}{Brief"|fuß} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\backaddressname} +% \begin{macrocode} +\newcommand*{\backaddressname}{Rücksendeadresse} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\specialmailname} +% \begin{macrocode} +\newcommand*{\specialmailname}{Versandart} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\toaddrname} +% \begin{macrocode} +\newcommand*{\toaddrname}{Empfängeradresse} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\reflinename} +% \begin{macrocode} +\newcommand*{\reflinename}{Geschäftszeile} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\titlename} +% \begin{macrocode} +\newcommand*{\titlename}{Titel} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\subjectname} +% \begin{macrocode} +\newcommand*{\subjectname}{Betreff} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\openingname} +% \begin{macro}{\openingargumentname} +% \begin{macrocode} +\newcommand*{\openingname}{Anrede} +\newcommand*{\openingargumentname}{Anrede} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\letterbodyname} +% \begin{macrocode} +\newcommand*{\letterbodyname}{Brieftext} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\closingname} +% \begin{macro}{\closingargumentname} +% \begin{macrocode} +\newcommand*{\closingname}{Grußfloskel} +\newcommand*{\closingargumentname}{Floskel} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\signaturename} +% \begin{macrocode} +\newcommand*{\signaturename}{Signatur} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\locationname} +% \begin{macrocode} +\newcommand*{\locationname}{Absender-\\ergänzung} +% \end{macrocode} +% \end{macro} +% +% +% \section{Hyphenation} +% +% This is not realy a good place to put them~-- but better late than never: +% \begin{macrocode} +\hyphenation{% + Ab-schnitts-ebe-ne + Back-slash + Brief-um-ge-bung Brief-um-ge-bun-gen + Da-tei-na-me Da-tei-na-men Da-tei-na-mens + Da-tei-na-men-er-wei-te-rung Da-tei-na-men-er-wei-te-rung-en + Ein-trags-ebe-ne Ein-trags-ebe-nen + Farb-um-schal-tung Farb-um-schal-tung-en + Gleich-zei-tig + Hin-ter-grund-ebe-ne Hin-ter-grund-ebe-nen + In-halts-ver-zeich-nis-ein-trag In-halts-ver-zeich-nis-ein-trä-ge + Ka-pi-tel-ebe-ne Ka-pi-tel-ebe-nen + Pa-ket-au-to-ren + Pa-pier-rand Pa-pier-ran-des + Rand-ein-stel-lung Rand-ein-stel-lung-en + Schrift-ein-stel-lung Schrift-ein-stel-lung-en + Sei-ten-um-bruch Schrift-um-schal-tung Schrift-um-schal-tun-gen + Stan-dard-an-wei-sung Stan-dard-an-wei-sun-gen + Stan-dard-ein-stel-lung Stan-dard-ein-stel-lun-gen + Text-ebe-ne Text-ebe-nen + Unix + Zei-len-um-bruch Zei-len-um-bruchs Zei-len-um-brü-che Zei-len-um-brü-chen + } +% \end{macrocode} +% +% +% +\endinput +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/terms-en.tex b/macros/latex/contrib/koma-script/doc/terms-en.tex new file mode 100644 index 0000000000..9a879f16ea --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/terms-en.tex @@ -0,0 +1,606 @@ +% ====================================================================== +% terms-en.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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 +% https://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.md. +% ====================================================================== +% +% Language dependencies (english) of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== +% +\KOMAProvidesFile{terms-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide language dependencies] +% +% \section{Extra Packages} +% +\RequirePackage[normal]{engord} +% +% \section{Title} +% +% \begin{macro}{\GuideSubject} +% \begin{macro}{\GuideTitle} +% \begin{macro}{\GuideSubTitle} +% \begin{macro}{\GuideAuthorHeadline} +% \begin{macro}{\GuideTranslatorHeadline} +% \begin{macro}{\GuideWarrantyHeadline} +% \begin{macro}{\GuideWarranty} +% \begin{macro}{\GuideCopyright} +% \begin{macro}{\GuideDedication} +% Language dependencies of all the title pages. +% \begin{macrocode} +\newcommand*{\GuideSubject}{The Guide}% +\newcommand*{\GuideTitle}{\KOMAScript}% +\newcommand*{\GuideSubTitle}{a versatile {\LaTeXe} bundle% + % Ugly note + \vfill + \noindent Note: This document is a translation of the German \KOMAScript{} + manual. Several authors have been involved to this translation. Some of them + are native English speakers. Others, like me, are not. Improvements of the + translation by native speakers or experts are welcome at all times!% +}% +\newcommand*{\GuideAuthorHeadline}{Authors of the {\KOMAScript} Bundle}% +\newcommand*{\GuideTranslatorHeadline}{English translation of this manual by: +} \newcommand*{\GuideWarrantyHeadline}{Legal Notes:}% +\newcommand*{\GuideWarranty}{There is no warranty for any part of the + documented software. The authors have taken care in the preparation of this + guide, but make no expressed or implied warranty of any kind and assume no + responsibility for errors or omissions. No liability is assumed for + incidental or consequential damages in connection with or arising out of the + use of the information or programs contained here.\par\medskip% + Many of the designations used by manufacturers and sellers to distinguish + their products are claimed as trademarks. Where those designations appear in + this book, and the authors were aware of a trademark claim, the designations + have been printed with initial capital letters or in all capitals.}% +\newcommand*{\GuideCopyright}{Free screen version without any optimization of + paragraph and page breaks\par\medskip% + This guide is part of {\KOMAScript}, which is free under the terms and + conditions of {\LaTeX} Project Public License Version 1.3c. A version of + this license, which is valid for {\KOMAScript}, is part of {\KOMAScript} (see + \File{lppl.txt}). Distribution of this manual\,---\,even if it is + printed\,---\,is allowed provided that all parts of {\KOMAScript} are + distributed with it. Distribution without the other parts of {\KOMAScript} + requires an explicit, additional authorization by the authors.}% +\newcommand*{\GuideDedication}{To all my friends all over the world!}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \section{CTAN Server to be Used} +% +% \begin{macro}{\GuideCTANserver} +% Unused since 2015-09-30. +% \begin{macrocode} +%\newcommand*{\GuideCTANserver}{ftp.ctan.org} +% \end{macrocode} +% \end{macro} +% +% +% \section{Terms} +% +% Some terms, e.g. used at index notes. +% +% \begin{macro}{\GuideClass} +% \begin{macro}{\GuideClassIndexCategory} +% \begin{macro}{\GuideClassIndexCategoryExpanded} +% The term ``class''. +% \begin{macrocode} +\newcommand*{\GuideClass}{class} +\newcommand*{\GuideClassIndexCategory}{classes} +\let\GuideClassIndexCategoryExpanded\GuideClassIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideCounter} +% \begin{macro}{\GuideCounterIndexCategory} +% \begin{macro}{\GuideCounterIndexCategoryExpanded} +% The term ``counter''. +% \begin{macrocode} +\newcommand*{\GuideCounter}{counter} +\newcommand*{\GuideCounterIndexCategory}{counters} +\let\GuideCounterIndexCategoryExpanded\GuideCounterIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideEnvironment} +% \begin{macro}{\GuideEnvIndexCategory} +% \begin{macro}{\GuideEnvIndexCategoryExpanded} +% The term ``environment''. +% \begin{macrocode} +\newcommand*{\GuideEnvironment}{environment} +\newcommand*{\GuideEnvIndexCategory}{environments} +\let\GuideEnvIndexCategoryExpanded\GuideEnvIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideExample} +% The term ``Example'' used at a kind of heading, so it should be upper case. +% \begin{macrocode} +\newcommand*{\GuideExample}{Example} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\GuideFile} +% \begin{macro}{\GuideFileIndexCategory} +% \begin{macro}{\GuideFileIndexCategoryExpanded} +% The term ``file''. +% \begin{macrocode} +\newcommand*{\GuideFile}{file} +\newcommand*{\GuideFileIndexCategory}{files} +\let\GuideFileIndexCategoryExpanded\GuideFileIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideFloatstyle} +% \begin{macro}{\GuideFloatstyleIndexCategory} +% \begin{macro}{\GuideFloatstyleIndexCategoryExpanded} +% The term ``\Package{float} style''. +% \begin{macrocode} +\newcommand*{\GuideFloatstyle}{\Package{float} style} +\newcommand*{\GuideFloatstyleIndexCategory}{\Package{float} styles} +\newcommand*{\GuideFloatstyleIndexCategoryExpanded}{float styles} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideFontElement} +% \begin{macro}{\GuideFontElementIndexCategory} +% \begin{macro}{\GuideFontElementIndexCategoryExpanded} +% The term ``element''. +% \begin{macrocode} +\newcommand*{\GuideFontElement}{element} +\newcommand*{\GuideFontElementIndexCategory}{elements} +\let\GuideFontElementIndexCategoryExpanded\GuideFontElementIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideLength} +% \begin{macro}{\GuideLengthIndexCategory} +% \begin{macro}{\GuideLengthIndexCategoryExpanded} +% The term ``length''. +% \begin{macrocode} +\newcommand*{\GuideLength}{length} +\newcommand*{\GuideLengthIndexCategory}{lengths} +\let\GuideLengthIndexCategoryExpanded\GuideLengthIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideMacro} +% \begin{macro}{\GuideMacroIndexCategory} +% \begin{macro}{\GuideMacroIndexCategoryExpanded} +% \begin{macro}{\GuideCommand} +% \begin{macro}{\GuideCommandIndexCategory} +% \begin{macro}{\GuideCommandIndexCategoryExpanded} +% The term ``command''. +% \begin{macrocode} +\newcommand*{\GuideMacro}{command} +\let\GuideCommand\GuideMacro +\newcommand*{\GuideMacroIndexCategory}{commands} +\let\GuideCommandIndexCategory\GuideMacroIndexCategory +\let\GuideMacroIndexCategoryExpanded\GuideMacroIndexCategory +\let\GuideCommandIndexCategoryExpanded\GuideCommandIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideOption} +% \begin{macro}{\GuideOptionIndexCategory} +% \begin{macro}{\GuideOptionIndexCategoryExpanded} +% The term ``option''. +% \begin{macrocode} +\newcommand*{\GuideOption}{option} +\newcommand*{\GuideOptionIndexCategory}{options} +\let\GuideOptionIndexCategoryExpanded\GuideOptionIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuidePackage} +% \begin{macro}{\GuidePackageIndexCategory} +% \begin{macro}{\GuidePackageIndexCategoryExpanded} +% The term ``package''. +% \begin{macrocode} +\newcommand*{\GuidePackage}{package} +\newcommand*{\GuidePackageIndexCategory}{packages} +\let\GuidePackageIndexCategoryExpanded\GuidePackageIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuidePagestyle} +% \begin{macro}{\GuidePagestyleIndexCategory} +% \begin{macro}{\GuidePagestyleIndexCategoryExpanded} +% The term ``page style''. +% \begin{macrocode} +\newcommand*{\GuidePagestyle}{page style} +\newcommand*{\GuidePagestyleIndexCategory}{page styles} +\let\GuidePagestyleIndexCategoryExpanded\GuidePagestyleIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuidePLength} +% \begin{macro}{\GuidePLengthIndexCategory} +% \begin{macro}{\GuidePLengthIndexCategoryExpanded} +% \begin{macro}{\GuidePseudoPrefix} +% The prefix ``pseudo'' at the term ``pseudo length'' and the term itself. +% \begin{macrocode} +\newcommand*{\GuidePseudoPrefix}{pseudo-} +\newcommand*{\GuidePLength}{\GuidePseudoPrefix\GuideLength} +\newcommand*{\GuidePLengthIndexCategory}{\GuidePseudoPrefix\GuideLengthIndexCategory} +\let\GuidePLengthIndexCategoryExpanded\GuidePLengthIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideVariable} +% \begin{macro}{\GuideVariableIndexCategory} +% \begin{macro}{\GuideVariableIndexCategoryExpanded} +% The term ``variable''. +% \begin{macrocode} +\newcommand*{\GuideVariable}{variable} +\newcommand*{\GuideVariableIndexCategory}{variables} +\let\GuideVariableIndexCategoryExpanded\GuideVariableIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideHook} +% \begin{macro}{\GuideHookIndexCategory} +% \begin{macro}{\GuideHookIndexCategoryEpanded} +% The term ``hook''. +% \begin{macrocode} +\newcommand*{\GuideHook}{hook} +\newcommand*{\GuideHookIndexCategory}{hooks} +\let\GuideHookIndexCategoryExpanded\GuideHookIndexCategory +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideAnd} +% The ``and'' at a list of two. +% \begin{macrocode} +\newcommand*{\GuideAnd}{ and } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\GuideListAnd} +% The ``and'' at a list of more than two. +% \begin{macrocode} +\newcommand*{\GuideListAnd}{, and } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\GuideLoadNonFree} +% Note, that the non free manual contains more information. +% \begin{macrocode} +\newcommand*{\GuideLoadNonFree}{% + Currently, additional information on this topic can be found at the same + point in the German \KOMAScript{} book \cite{book:komascript} only. +} +% \end{macrocode} +% \end{macro} +% +% +% \section{Index} +% +% \begin{macro}{\GuidegenIndex} +% \begin{macro}{\GuidecmdIndex} +% \begin{macro}{\GuidecmdIndexShort} +% \begin{macro}{\GuidelenIndex} +% \begin{macro}{\GuidelenIndexShort} +% \begin{macro}{\GuideelmIndex} +% \begin{macro}{\GuideelmIndexShort} +% \begin{macro}{\GuidefilIndex} +% \begin{macro}{\GuidefilIndexShort} +% \begin{macro}{\GuideoptIndex} +% \begin{macro}{\GuideoptIndexShort} +% \begin{macro}{\GuidehokIndex} +% \begin{macro}{\GuidehokIndexShort} +% The titles and short titles of each single index. +\newcommand*{\GuidegenIndex}{General Index}% +\newcommand*{\GuidecmdIndex}{Index of Commands, Environments, and Variables}% +\newcommand*{\GuidecmdIndexShort}{Index of Commands, etc.}% +\newcommand*{\GuidelenIndex}{Index of Lengths and Counters}% +\newcommand*{\GuidelenIndexShort}{Index of Lengths, etc.}% +\newcommand*{\GuideelmIndex}{Index of Elements Capable of + Adjusting Fonts}% +\newcommand*{\GuideelmIndexShort}{Index of Elements}% +\newcommand*{\GuidefilIndex}{Index of Files, Classes, and Packages}% +\newcommand*{\GuidefilIndexShort}{Index of Files, etc.}% +\newcommand*{\GuideoptIndex}{Index of Class and Package Options}% +\newcommand*{\GuideoptIndexShort}{Index of Options}% +\newcommand*{\GuidehokIndex}{Index of Do-Hooks} +\let\GuidehokIndexShort\GuidehokIndex +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GuideIndexPreamble} +% The preamble text of the whole index. +\newcommand*{\GuideIndexPreamble}{% + There are two kinds of page numbers in this index. The numbers in bold + show the pages where the topic is defined or explained. The numbers in + ordinary type show the pages of where the topic is mentioned.% +} +% \end{macro} +% +% +% \begin{macro}{\GuideIndexSees} +% These are all see index entries. +\newcommand*{\GuideIndexSees}{% +} +% \end{macro} +% +% \begin{macro}{\GuideIndexSeeAlsos} +% These are all see also index entries. +\newcommand*{\GuideIndexSeeAlsos}{% +} +% \end{macro} +% +% \section{Bibliography} +% +% \begin{macro}{\GuideBibPreamble} +% \begin{macrocode} +\newcommand*{\GuideBibPreamble}{% + In the following, you will find many references. All of them are referenced + in the main text. In many cases the reference points to documents or + directories which can be accessed via the Internet. In these cases, the + reference includes a URL instead of a publisher. If the reference points to + a {\LaTeX} package then the URL is written in the form + ``\url{CTAN://}\emph{destination}''. The prefix ``\url{CTAN://}'' means the + \TeX{} archive on a CTAN server or mirror. For example, you can replace the + prefix with \url{https://mirror.ctan.org/}. For {\LaTeX} packages, it is also + important to mention that we have tried to give a version number appropriate + to the text that cites the reference. But for some packages is is very + difficult to find a consistent version number and release date. + Additionally, the given version is not always the current version. If you + want install new packages, be sure that the package is the most up-to-date + version and check first if the package is already available on your system.% +} +% \end{macrocode} +% \end{macro} +% +% +% \section{Change Log} +% +% \begin{macro}{\GuideChangeLogPreamble} +% The preamble of the change log index. +% \begin{macrocode} +\newcommand*{\GuideChangeLogPreamble}{% + In this list of changes, you will find all significant changes to the user + interface of the {\KOMAScript} bundle at the last few versions. The list was + sorted by the names of the classes and packages and their version. The + numbers after the version are the pages where the changes are described. In + the margins of these pages, you will find corresponding version marks.% +} +% \end{macrocode} +% \end{macro} +% +% +% \section{Language Extensions} +% +% Some terms should be part of the captions of the language. +% \begin{macro}{\GuideLanguageExtensions} +% This macro has to be defined, because the class will add it to the language +% at |\begin{document}| and it will also call it. +% \begin{macrocode} +\newcommand*{\GuideLanguageExtensions}{% +% \end{macrocode} +% \begin{macro}{\pageautorefname} +% The term ``page'' that will be put before the reference of a page set by +% |\autopageref|. +% \begin{macrocode} + \def\pageautorefname{page}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\partautorefname} +% \begin{macro}{\figureautorefname} +% \begin{macro}{\tableautorefname} +% \begin{macro}{\subsectionautorefname} +% \begin{macro}{\subsubsectionautorefname} +% \begin{macro}{\paragraphautorefname} +% \begin{macro}{\subparagraphautorefname} +% I'll call them all ``section''. +% \begin{macrocode} + \def\partautorefname{part}% + \def\figureautorefname{figure}% + \def\tableautorefname{table}% + \def\appendixautorefname{appendix}% + \let\subsectionautorefname=\sectionautorefname + \let\subsubsectionautorefname=\sectionautorefname + \let\paragraphautorefname=\sectionrefname + \let\subparagraphautorefname=\sectionrefname +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\changelogname} +% The name of the change log index. +% \begin{macrocode} + \def\changelogname{Change Log}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\descriptionname} +% \begin{macro}{\contentsname} +% \begin{macrocode] + \def\descriptionname{description}% + \def\contentname{contents}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\lengthname} +% \begin{macrocode} + \def\lengthname{length}% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +} +% \end{macrocode} +% \end{macro} +% +% +% \section{The Pseudo-Length Figure} +% +% \begin{macro}{\letterheadname} +% \begin{macrocode} +\newcommand*{\letterheadname}{letterhead} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\letterfootname} +% \begin{macrocode} +\newcommand*{\letterfootname}{letter footer} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\backaddressname} +% \begin{macrocode} +\newcommand*{\backaddressname}{return address} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\specialmailname} +% \begin{macrocode} +\newcommand*{\specialmailname}{mode~of~dispatch} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\toaddrname} +% \begin{macrocode} +\newcommand*{\toaddrname}{addressee} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\reflinename} +% \begin{macrocode} +\newcommand*{\reflinename}{reference fields line} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\titlename} +% \begin{macrocode} +\newcommand*{\titlename}{title} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\subjectname} +% \begin{macrocode} +\newcommand*{\subjectname}{subject} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\openingname} +% \begin{macro}{\openingargumentname} +% \begin{macrocode} +\newcommand*{\openingname}{opening} +\newcommand*{\openingargumentname}{opening term} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\letterbodyname} +% \begin{macrocode} +\newcommand*{\letterbodyname}{letter body} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\closingname} +% \begin{macro}{\closingargumentname} +% \begin{macrocode} +\newcommand*{\closingname}{closing} +\newcommand*{\closingargumentname}{closing term} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\signaturename} +% \begin{macrocode} +\newcommand*{\signaturename}{signature} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\locationname} +% \begin{macrocode} +\newcommand*{\locationname}{supplemental\\data} +% \end{macrocode} +% \end{macro} +% +% +% \section{Hyphenation} +% +% This is not realy a good place to put them~-- but better late than never: +% \begin{macrocode} +\hyphenation{% +} +% \end{macrocode} +% +\endinput +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/tocbasic-de.tex b/macros/latex/contrib/koma-script/doc/tocbasic-de.tex new file mode 100644 index 0000000000..06a53bad82 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/tocbasic-de.tex @@ -0,0 +1,2881 @@ +% ====================================================================== +% tocbasic-de.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% Package tocbasic for Package and Class Authors +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{tocbasic-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (package tocbasic)] + +\chapter{Verzeichnisse verwalten mit Hilfe von \Package{tocbasic}} +\labelbase{tocbasic} + +\BeginIndexGroup +\BeginIndex{Package}{tocbasic}% +\BeginIndex{}{Verzeichnis}% +\BeginIndex{}{Dateierweiterung}% +\index{Dateiendung|see{Dateierweiterung}}%| +Der Hauptzweck des Pakets \Package{tocbasic} besteht darin, Paket- und +Klassenautoren die Möglichkeit zu geben, eigene Verzeichnisse vergleichbar mit +dem Abbildungs- und Tabellenverzeichnis zu erstellen und dabei Klassen und +anderen Paketen einen Teil der Kontrolle über diese Verzeichnisse zu +erlauben. Dabei sorgt das Paket \Package{tocbasic} auch dafür, dass diese +Verzeichnisse von \Package{babel}\IndexPackage{babel} (siehe +\cite{package:babel}) bei der Sprachumschaltung mit berücksichtigt +werden. Durch Verwendung von \Package{tocbasic} soll dem Paketautor die Mühe +genommen werden, selbst solche Anpassungen an andere Pakete oder an Klassen +vornehmen zu müssen. + +Als kleiner Nebeneffekt kann das Paket auch verwendet werden, um neue +Gleitumgebungen oder den Gleitumgebungen ähnliche nicht gleitende Umgebungen +für Konsultationsobjekte zu definieren. Näheres dazu wird nach der Erklärung +der grundlegenden Anweisungen in den folgenden vier Abschnitten durch ein +Beispiel in \autoref{sec:tocbasic.example} verdeutlicht, das in kompakter Form +noch einmal in \autoref{sec:tocbasic.declarenewtoc} aufgegriffen wird. + +\KOMAScript{} verwendet \Package{tocbasic} sowohl für das Inhaltsverzeichnis +als auch für die bereits erwähnten Verzeichnisse für Abbildungen und Tabellen. + + +\section{Grundlegende Anweisungen} +\seclabel{basics} + +Die grundlegenden Anweisungen dienen in erster Linie dazu, eine Liste aller +bekannten Dateierweiterungen\textnote{Dateierweiterung, Verzeichnis}, die für +Verzeichnisse stehen, zu verwalten. Einträge in Dateien mit solchen +Dateierweiterungen werden typischerweise mit +\Macro{addtocontents}\important{\Macro{addtocontents}, + \DescRef{\LabelBase.cmd.addxcontentsline}} oder +\DescRef{\LabelBase.cmd.addxcontentsline} vorgenommen. Darüber hinaus gibt es +Anweisungen, mit denen Aktionen für all diese Dateierweiterungen durchgeführt +werden können. Außerdem gibt es Anweisungen, um Einstellungen für die Datei +vorzunehmen, die zu einer gegebenen Dateierweiterung gehört. Typischerweise +hat so eine Dateierweiterung auch einen +Besitzer\textnote{Dateibesitzer}. Dieser Besitzer kann eine Klasse oder ein +Paket oder die Bezeichnung einer Kategorie sein, die der Autor der Klasse oder +des Pakets, das \Package{tocbasic} verwendet, frei gewählt hat. \KOMAScript{} +selbst verwendet beispielsweise die Kategorie \PValue{float} für die +Dateierweiterungen \File{lof} und \File{lot}, die für das Abbildungs- und das +Tabellenverzeichnis stehen. Für das Inhaltsverzeichnis verwendet \KOMAScript{} +als Besitzer den Dateinamen der Klasse. + +\begin{Declaration} + \Macro{Ifattoclist}\Parameter{Dateierweiterung} + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Mit\ChangedAt{v3.28}{\Package{tocbasic}} dieser Anweisung wird überprüft, ob +die \PName{Dateierweiterung} bereits in der Liste der bekannten +Dateierweiterungen vorhanden ist oder nicht. Ist die \PName{Dateierweiterung} +bereits über diese Liste bekannt, so wird der \PName{Dann-Teil} +ausgeführt. Anderenfalls wird der \PName{Sonst-Teil} ausgeführt. +\begin{Example} + Angenommen, Sie wollen wissen, ob die Dateierweiterung »\File{foo}« bereits + verwendet wird, um in diesem Fall eine Fehlermeldung auszugeben, weil diese + damit nicht mehr verwendet werden kann: +\begin{lstcode} + \Ifattoclist{foo}{% + \PackageError{bar}{% + extension `foo' already in use% + }{% + Each extension may be used only + once.\MessageBreak + The class or another package already + uses extension `foo'.\MessageBreak + This error is fatal!\MessageBreak + You should not continue!}% + }{% + \PackageInfo{bar}{using extension `foo'}% + } +\end{lstcode} +\end{Example} +\EndIndexGroup% +\ExampleEndFix + + +\begin{Declaration} + \Macro{addtotoclist}\OParameter{Besitzer}\Parameter{Dateierweiterung} +\end{Declaration} +Diese Anweisung fügt die \PName{Dateierweiterung} der Liste der bekannten +Dateierweiterungen hinzu. Ist die \PName{Dateierweiterung} bereits bekannt, so +wird hingegen ein Fehler gemeldet, um die doppelte Verwendung derselben +\PName{Dateierweiterung} zu verhindern. + +Wenn das optionale Argument \OParameter{Besitzer} angegeben wurde, wird der +angegebene \PName{Besitzer} für diese Dateierweiterung mit gespeichert. Wurde +das optionale Argument weggelassen, dann versucht \Package{tocbasic} den +Dateinamen der aktuell abgearbeiteten Klasse oder des Pakets herauszufinden +und als \PName{Besitzer} zu speichern. Dies\textnote{Achtung!} funktioniert +nur, wenn \Macro{addtotoclist} während des Ladens der Klasse oder des Pakets +aufgerufen wird. Es funktioniert nicht, wenn \Macro{addtotoclist} erst später +aufgrund der Verwendung einer Anweisung durch den Benutzer aufgerufen wird. In +diesem Fall wird ein leerer \PName{Besitzer} eingetragen. + +Beachten\textnote{Achtung!} Sie, dass ein leeres Argument \PName{Besitzer} +nicht immer das Gleiche ist wie das Weglassen des kompletten optionalen +Arguments einschließlich der eckigen Klammern. Ein leeres Argument würde immer +einen leeren \PName{Besitzer} ergeben. +\begin{Example} + Angenommen, Sie wollen die Dateierweiterung »\File{foo}« der Liste der + bekannten Dateierweiterungen hinzufügen, während Ihr Paket mit dem + Dateinamen »\File{bar.sty}« geladen wird: +\begin{lstcode} + \addtotoclist{foo} +\end{lstcode} + Dies fügt die Dateierweiterung »\PValue{foo}« mit dem Besitzer + »\PValue{bar.sty}« der Liste der bekannten Dateierweiterung hinzu, wenn diese + Erweiterung nicht bereits in der Liste ist. Wenn die verwendete + Klasse oder ein anderes Paket diese Dateierweiterung schon angemeldet hat, + erhalten Sie den Fehler: +\begin{lstoutput}[breakatwhitespace] + Package tocbasic Error: file extension `foo' cannot be used twice + + See the tocbasic package documentation for explanation. + Type H for immediate help. +\end{lstoutput} + Wenn Sie dann tatsächlich die Taste »\texttt{H}«, gefolgt von der + Eingabe-Taste drücken, erhalten Sie als Hilfe: +\begin{lstoutput}[breakatwhitespace] + File extension `foo' is already used by a toc-file, while bar.sty + tried to use it again for a toc-file. + This may be either an incompatibility of packages, an error at a package, + or a mistake by the user. +\end{lstoutput} + + Vielleicht stellt Ihr Paket auch eine Anweisung bereit, die ein + Verzeichnis dynamisch erzeugt. In diesem Fall sollten Sie das + optionale Argument von \Macro{addtotoclist} verwenden, um den + \PName{Besitzer} anzugeben: +\begin{lstcode} + \newcommand*{\createnewlistofsomething}[1]{% + \addtotoclist[bar.sty]{#1}% + % Weitere Aktionen, um dieses Verzeichnis + % verfügbar zu machen + } +\end{lstcode} + Wenn jetzt der Anwender diese Anweisung aufruft, beispielsweise mit +\begin{lstcode} + \createnewlistofsomething{foo} +\end{lstcode} + dann wird die Dateierweiterung »\PValue{foo}« ebenfalls mit dem Besitzer + »\PValue{bar.sty}« zur Liste der bekannten Dateierweiterungen hinzugefügt + oder aber ein Fehler gemeldet, wenn diese Dateierweiterung bereits verwendet + wird. +\end{Example} + +Sie können als \PName{Besitzer} angeben, was immer Sie wollen, aber es sollte +eindeutig sein! Wenn Sie beispielsweise der Autor des Pakets \Package{float} +wären, könnten Sie als \PName{Besitzer} auch die Kategorie »\PValue{float}« +anstelle von »\PValue{float.sty}« angeben. In diesem Fall würden die +\KOMAScript-Optionen\important{\DescRef{maincls.option.listof}}% +\IndexOption{listof~=\PName{Einstellung}} für das Verzeichnis der Abbildungen +und das Verzeichnis der Tabellen auch Ihre Verzeichnisse betreffen. Das liegt +daran, dass \KOMAScript{} die Dateierweiterungen »\PValue{lof}« für das +Abbildungsverzeichnis und »\PValue{lot}« für das Tabellenverzeichnis mit der +Kategorie »\PValue{float}« als \PName{Besitzer} anmeldet und die Optionen für +diesen Besitzer setzt. + +Das Paket \hyperref[cha:scrhack]{\Package{scrhack}}\IndexPackage{scrhack}% +\important{ \hyperref[cha:scrhack]{\Package{scrhack}}} enthält übrigens +Patches für mehrere Pakete wie \Package{float} oder \Package{listings}, die +eigene Verzeichnisse bereitstellen. Bei Verwendung von +\hyperref[cha:scrhack]{\Package{scrhack}} wird unter anderem die jeweilige +Dateierweiterung der Liste der bekannten Dateierweiterungen hinzugefügt. Dabei +wird als \PName{Besitzer} »\PValue{float}« verwendet. Dies ist sozusagen der +grundlegende Baustein, um die Möglichkeiten von \Package{tocbasic} und der +\KOMAScript-Klassen auch für diese Verzeichnisse automatisch nutzen zu +können.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AtAddToTocList}\OParameter{Besitzer}\Parameter{Anweisungen} +\end{Declaration} +Auf diese Weise können die \PName{Anweisungen} zu einer internen Liste von +Anweisungen hinzugefügt werden, die immer dann auszuführen sind, wenn eine +Dateierweiterung mit dem angegebenen \PName{Besitzer} zur Liste der bekannten +Dateierweiterungen hinzugefügt wird. Bezüglich des optionalen Arguments wird +wie in der Erklärung von \DescRef{\LabelBase.cmd.addtotoclist} beschrieben +verfahren. Wird das optionale Argument leer gelassen, werden in diesem Fall +die Aktionen unabhängig vom Besitzer immer ausgeführt, wenn die +Dateierweiterung zu der Liste der bekannten Dateierweiterungen hinzugefügt +wird. Während der Ausführung der \PName{Anweisungen} ist außerdem +\Macro{@currext}\IndexCmd{@currext}\important{\Macro{@currext}} die +Dateierweiterung, die gerade hinzugefügt wird. +\begin{Example} + \Package{tocbasic} selbst verwendet + % Umbruchkorrektur (schließende Klammer verschoben) +\begin{lstcode} + \AtAddToTocList[]{% + \expandafter\tocbasic@extend@babel + \expandafter{\@currext}} +\end{lstcode} + um jede Dateierweiterung zu der in \Package{tocbasic} vorhandenen + Erweiterung für das Paket \Package{babel} hinzuzufügen. +\end{Example} + +Die\textnote{Achtung!} zweimalige Verwendung von \Macro{expandafter} ist im +Beispiel erforderlich, weil das Argument von +\DescRef{\LabelBase.cmd.tocbasic@extend@babel} zwingend bereits expandiert +sein muss. Siehe dazu auch die Erklärung zu +\DescRef{\LabelBase.cmd.tocbasic@extend@babel} in +\autoref{sec:tocbasic.internals}, +\DescPageRef{\LabelBase.cmd.tocbasic@extend@babel}. +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{removefromtoclist}\OParameter{Besitzer}\Parameter{Dateierweiterung} +\end{Declaration} +Man kann eine \PName{Dateierweiterung} auch wieder aus der Liste der bekannten +Dateierweiterungen entfernen. Ist das optionale Argument \OParameter{Besitzer} +angegeben, so wird die Dateierweiterung nur entfernt, wenn sie für den +angegebenen \PName{Besitzer} angemeldet wurde. Das gilt auch für den leeren +\PName{Besitzer}. Wird dagegen gar kein \OParameter{Besitzer} angegeben, +entfallen also auch die eckigen Klammern, findet kein Besitzertest statt, +sondern die \PName{Dateierweiterung} wird unabhängig vom Besitzer entfernt.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{doforeachtocfile}\OParameter{Besitzer}\Parameter{Anweisungen} +\end{Declaration} +Bisher haben Sie nur Anweisungen kennengelernt, die für Klassen- und +Paketautoren zwar zusätzliche Sicherheit, aber auch eher zusätzlichen Aufwand +bedeuten. Mit \Macro{doforeachtocfile} kann man die erste Ernte dafür +einfahren. Diese Anweisung erlaubt es, die angegebenen \PName{Anweisungen} für +jede mit dem \PName{Besitzer} angemeldete Dateierweiterung +auszuführen. Während der Ausführung der \PName{Anweisungen} ist +\Macro{@currext}\IndexCmd{@currext}\important{\Macro{@currext}} die aktuell +verarbeitete Dateierweiterung. Wird das optionale Argument +\OParameter{Besitzer} weggelassen, so werden alle Dateierweiterungen +unabhängig vom Besitzer abgearbeitet. Ein leeres optionales Argument würde +hingegen nur die Dateierweiterungen mit leerem Besitzer verarbeiten. +\begin{Example} + Wenn Sie die Liste aller bekannten Dateierweiterungen auf das Terminal und + in die \File{log}-Datei ausgeben wollen, ist dies einfach mit +\begin{lstcode} + \doforeachtocfile{\typeout{\@currext}} +\end{lstcode} + möglich. Sollen hingegen nur die Dateierweiterungen des Besitzers + »\PValue{foo}« ausgegeben werden, geht das einfach mit: +\begin{lstcode} + \doforeachtocfile[foo]{\typeout{\@currext}} +\end{lstcode} +\end{Example} +Die \KOMAScript-Klassen \Class{scrbook} und \Class{scrreprt} verwenden die +Anweisung, um für Verzeichnisse, für die Eigenschaft \PValue{chapteratlist} +gesetzt ist, optional einen vertikalen Abstand oder die Kapitelüberschrift in +das Verzeichnis einzutragen. Wie Sie diese Eigenschaft setzen können, ist +in \autoref{sec:tocbasic.toc} ab \DescPageRef{\LabelBase.cmd.setuptoc} zu +finden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasicautomode} +\end{Declaration} +Diese Anweisung definiert das vom \LaTeX-Kern für Klassen- und Paketautoren +bereitgestellte +\Macro{@starttoc}\IndexCmd{@starttoc}\important{\Macro{\@starttoc}} so um, +dass bei jedem Aufruf von \Macro{@starttoc} die dabei angegebene +Dateierweiterung in die Liste der bekannten Dateierweiterungen eingefügt wird, +soweit sie dort noch nicht vorhanden ist. Außerdem wird dann +\DescRef{\LabelBase.cmd.tocbasic@starttoc} anstelle von \Macro{@starttoc} +verwendet. Näheres zu \DescRef{\LabelBase.cmd.tocbasic@starttoc} und +\Macro{@starttoc} ist \autoref{sec:tocbasic.internals}, +\DescPageRef{\LabelBase.cmd.tocbasic@starttoc} zu entnehmen. + +Mit Hilfe von \Macro{tocbasicautomode} wird also jedes Verzeichnis, das mit +Hilfe von \Macro{@starttoc} erstellt wird, automatisch unter die Kontrolle von +\Package{tocbasic} gestellt. Ob das zum gewünschten Ergebnis führt, hängt +jedoch sehr von den jeweiligen Verzeichnissen ab. Immerhin funktioniert damit +schon einmal die Erweiterung für das \Package{babel}-Paket für alle +Verzeichnisse. Es ist jedoch vorzuziehen, wenn der Paketautor selbst +\Package{tocbasic} explizit verwendet. Er kann dann auch die weiteren Vorteile +nutzen, die ihm das Paket bietet und die in den nachfolgenden Abschnitten +beschrieben werden.% +\EndIndexGroup + + +\section{Erzeugen eines Verzeichnisses} +\seclabel{toc} + +Im vorherigen Abschnitt haben Sie erfahren, wie eine Liste bekannter +Dateierweiterungen verwaltet werden kann\iffree{ und wie automatisch Anweisungen + beim Hinzufügen von Dateierweiterungen zu dieser Liste ausgeführt werden + können}{}. Des Weiteren haben Sie eine Anweisung kennengelernt, mit der man +für jede einzelne bekannte Dateierweiterung oder einen spezifischen Teil davon +Anweisungen ausführen kann. In diesem Abschnitt werden Sie Anweisungen +kennenlernen, die sich auf die Datei beziehen, die mit dieser Dateierweiterung +verbunden ist. + + +\begin{Declaration} + \Macro{addtoeachtocfile}\OParameter{Besitzer}\Parameter{Inhalt} +\end{Declaration} +Die Anweisung \Macro{addtoeachtocfile} schreibt \PName{Inhalt} mit Hilfe von +\Macro{addtocontents}\IndexCmd{addtocontents}\important{\Macro{addtocontents}}% +\iffree{ aus dem \LaTeX-Kern}{} in jede Datei, die mit dem angegebenen +\PName{Besitzer} in der Liste der bekannten Dateierweiterungen \iffree{zu + finden ist}{steht}. Wird das optionale Argument weggelassen, wird in jede +Datei aus der Liste der bekannten Dateierweiterungen geschrieben.\iffree{ Der + konkrete Dateiname setzt sich dabei übrigens aus \Macro{jobname} und der + Dateierweiterung zusammen.}{} Während des Schreibens von \PName{Inhalt} ist +\Macro{@currext}\IndexCmd{@currext}\important{\Macro{@currext}} die +Dateierweiterung der Datei, in die aktuell geschrieben wird. +\begin{Example} + Sie wollen einen vertikalen Abstand von einer Zeile in alle Dateien aus der + Liste der bekannten Dateierweiterungen schreiben. +\begin{lstcode} + \addtoeachtocfile{% + \protect\addvspace{\protect\baselineskip}% + }% +\end{lstcode} + Wenn Sie das hingegen nur für die Dateien mit dem definierten Besitzer + »\PValue{foo}« machen wollen, verwenden Sie: +\begin{lstcode} + \addtoeachtocfile[foo]{% + \protect\addvspace{\protect\baselineskip}% + } +\end{lstcode}% +\end{Example}% +\iffree{Anweisungen, die nicht bereits beim Schreiben expandiert werden + sollen, sind wie bei \Macro{addtocontents} mit \Macro{protect} zu + schützen.}{\ExampleEndFix}% +\EndIndexGroup + + +\begin{Declaration} + \Macro{addxcontentsline}\Parameter{Dateierweiterung}\Parameter{Ebene} + \OParameter{Gliederungsnummer}\Parameter{Inhalt} +\end{Declaration} +Diese\ChangedAt{v3.12}{\Package{tocbasic}} Anweisung ähnelt sehr der Anweisung +\Macro{addcontentsline}\IndexCmd{addcontentsline} aus dem +\LaTeX-Kern. Allerdings besitzt sie ein zusätzliches optionales Argument für +die \PName{Gliederungsnummer} des Eintrags, während diese bei +\Macro{addcontentsline} im Argument \PName{Inhalt} mit angegeben wird. Sie +wird verwendet, um nummerierte oder nicht nummerierte Einträge in das über die +\PName{Dateierweiterung} spezifizierte Verzeichnis aufzunehmen. Dabei ist +\PName{Ebene} der symbolische Name der Gliederungsebene und \PName{Inhalt} der +entsprechende Eintrag. Die Seitenzahl wird automatisch bestimmt. + +Im Unterschied zu \Macro{addcontentsline} testet \Macro{addxcontentsline} +zunächst, ob Anweisung \Macro{add\PName{Ebene}\PName{Dateierweiterung}entry} +definiert ist. In diesem Fall wird sie für den Eintrag verwendet, wobei +\PName{Gliederungsnummer} als optionales Argument und \PName{Inhalt} als +obligatorisches Argument übergeben wird. Ein Beispiel für eine solche +Anweisung, die von den \KOMAScript-Klassen bereitgestellt wird, wäre +\DescRef{maincls-experts.cmd.addparttocentry} (siehe +\autoref{sec:maincls-experts.toc}, +\DescPageRef{maincls-experts.cmd.addparttocentry}). Ist die entsprechende +Anweisung nicht definiert, wird stattdessen die interne Anweisung +\DescRef{\LabelBase.cmd.tocbasic@addxcontentsline} verwendet. Diese erhält +alle vier Argumente als obligatorische Argumente und verwendet dann +ihrerseits \Macro{addcontentsline}, um den gewünschten Eintrag +vorzunehmen. Näheres zu \DescRef{\LabelBase.cmd.tocbasic@addxcontentsline} ist +\autoref{sec:tocbasic.internals}, +\DescPageRef{\LabelBase.cmd.tocbasic@addxcontentsline} zu entnehmen. + +Ein Vorteil der Verwendung von \Macro{addxcontentsline} gegenüber +\Macro{addcontentsline} ist zum einen, dass die Eigenschaft +\PValue{numberline} (siehe \DescPageRef{\LabelBase.cmd.setuptoc}) beachtet +wird. Zum anderen kann die Form der Einträge über die Definition +entsprechender, für die \PName{Ebene} und \PName{Dateierweiterung} +spezifischer Anweisungen konfiguriert werden.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{addxcontentslinetoeachtocfile}\OParameter{Besitzer} + \Parameter{Ebene} + \OParameter{Gliederungsnummer}% + \Parameter{Inhalt} + \Macro{addcontentslinetoeachtocfile}\OParameter{Besitzer} + \Parameter{Ebene}\Parameter{Inhalt}% +\end{Declaration} +Diese beiden Anweisungen stehen in direkter Beziehung zu dem oben erklärten +\DescRef{\LabelBase.cmd.addxcontentsline}\ChangedAt{v3.12}{\Package{tocbasic}} +beziehungsweise zum im \LaTeX-Kern definierten \Macro{addcontentsline}. Der +Unterschied besteht darin, dass diese Anweisungen \PName{Inhalt} nicht nur in +eine einzelne Datei, sondern in alle Dateien eines angegebenen +\PName{Besitzers} und bei Verzicht auf das erste optionale Argument in alle +Dateien aus der Liste der bekannten Dateierweiterungen schreibt. +\begin{Example} + Angenommen, Sie sind Klassen-Autor und wollen den Kapiteleintrag nicht nur in + das Inhaltsverzeichnis, sondern in alle Verzeichnisdateien schreiben. Nehmen + wir weiter an, dass aktuell \PValue{\#1} den Titel enthält, der geschrieben + werden soll. +\begin{lstcode} + \addxcontentslinetoeachtocfile{chapter}% + [\thechapter]{#1} +\end{lstcode} + In diesem Fall soll natürlich die aktuelle Kapitelnummer direkt beim + Schreiben in die Verzeichnisdatei expandiert werden, weshalb sie nicht mit + \Macro{protect} vor der Expansion geschützt wurde. +\end{Example} +Während des Schreibens von \PName{Inhalt} ist auch hier, wie schon bei +\DescRef{\LabelBase.cmd.addtoeachtocfile}, +\Macro{@currext}\IndexCmd{@currext}\important{\Macro{@currext}} die +Dateierweiterung der Datei, in die aktuell geschrieben wird.% + +Die Anweisung\ChangedAt{v3.12}{\Package{tocbasic}} +\Macro{addxcontentslinetoeachtocfile} ist gegenüber +\Macro{addcontentslinetoeachtocfile} möglichst vorzuziehen, da die +Erweiterungen von \DescRef{\LabelBase.cmd.addxcontentsline} nur damit +Anwendung finden. Näheres zu diesen Erweiterungen und Vorteilen ist in der +vorausgehenden Erklärung von \DescRef{\LabelBase.cmd.addxcontentsline} zu +finden.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{listoftoc}\OParameter{Titel}\Parameter{Dateierweiterung} + \Macro{listoftoc*}\Parameter{Dateierweiterung} + \Macro{listofeachtoc}\OParameter{Besitzer} + \Macro{listof\PName{Dateierweiterung}name} +\end{Declaration} +Mit diesen Anweisungen werden die Verzeichnisse +ausgegeben. Die\important{\Macro{listoftoc*}} Sternvariante \Macro{listoftoc*} +benötigt als einziges Argument die \PName{Dateierweiterung} der Datei mit den +Daten zu dem Verzeichnis. Die Anweisung setzt zunächst die vertikalen und +horizontalen Abstände, die innerhalb von Verzeichnissen gelten sollen, führt +die Anweisungen aus, die vor dem Einlesen der Datei ausgeführt werden sollen, +liest dann die Datei und führt zum Schluss die Anweisungen aus, die nach dem +Einlesen der Datei ausgeführt werden sollen. Damit kann \Macro{listoftoc*} als +direkter Ersatz der \LaTeX-Kern-Anweisung +\Macro{@starttoc}\IndexCmd{@starttoc}\important{\Macro{@starttoc}} verstanden +werden. + +Die\important{\Macro{listoftoc}} Version von \Macro{listoftoc} ohne Stern +setzt das komplette Verzeichnis und veranlasst auch einen optionalen Eintrag +in das Inhaltsverzeichnis und den Kolumnentitel. Ist das optionale Argument +\OParameter{Titel} gegeben, so wird diese Angabe sowohl als Überschrift als +auch als optionaler Eintrag in das Inhaltsverzeichnis und den Kolumnentitel +verwendet. Ist das Argument \PName{Titel} lediglich leer, so wird auch eine +leere Angabe verwendet. Wird\textnote{Achtung!} hingegen das komplette +Argument einschließlich der eckigen Klammern weggelassen, so wird die +Anweisung \Macro{listof\PName{Dateierweiterung}name} verwendet, wenn diese +definiert ist. Ist sie nicht definiert, wird ein Standard-Ersatzname verwendet +und eine Warnung ausgegeben. + +Die\important{\Macro{listofeachtoc}} Anweisung \Macro{listofeachtoc} gibt alle +Verzeichnisse mit dem angegebenen Besitzer oder alle Verzeichnisse aller +bekannten Dateinamenerweiterungen aus. Damit\textnote{Achtung!} dabei der +korrekte Titel ausgegeben werden kann, sollte +\Macro{listof\PName{Dateierweiterung}name} passend definiert sein. +Da\textnote{Tipp!} eventuell auch der Anwender selbst \Macro{listoftoc} ohne +optionales Argument oder \Macro{listofeachtoc} verwenden könnte, wird dies +ohnehin empfohlen. +\begin{Example} + Angenommen, Sie haben ein neues »Verzeichnis der Algorithmen« mit der + Dateierweiterung »\PValue{loa}« und wollen dieses anzeigen lassen: +\begin{lstcode} + \listoftoc[Verzeichnis der Algorithmen]{loa} +\end{lstcode} + erledigt das für Sie. Wollen Sie das Verzeichnis hingegen ohne Überschrift + ausgegeben haben, dann genügt: +\begin{lstcode} + \listoftoc*{loa} +\end{lstcode} + Im zweiten Fall würde natürlich auch ein optional aktivierter Eintrag in das + Inhaltsverzeichnis nicht gesetzt. Näheres zur Eigenschaft des Eintrags in + das Inhaltsverzeichnis ist bei der Anweisung + \DescRef{\LabelBase.cmd.setuptoc}, \DescPageRef{\LabelBase.cmd.setuptoc} zu + finden. + + Wenn Sie zuvor +\begin{lstcode} + \newcommand*{\listofloaname}{% + Verzeichnis der Algorithmen% + } +\end{lstcode} + definiert haben, genügt auch: +\begin{lstcode} + \listoftoc{loa} +\end{lstcode} + um ein Verzeichnis mit der gewünschten Überschrift zu erzeugen. Für den + Anwender ist es eventuell einprägsamer, wenn Sie dann außerdem noch +\begin{lstcode} + \newcommand*{\listofalgorithms}{\listoftoc{loa}} +\end{lstcode} + als einfache Verzeichnisanweisung definieren. +\end{Example} + +Da\textnote{Achtung!} \LaTeX{} bei der Ausgabe eines Verzeichnisses auch +gleich eine neue Verzeichnisdatei zum Schreiben öffnet, kann der Aufruf jeder +dieser Anweisungen zu einer Fehlermeldung der Art +\begin{lstoutput} + ! No room for a new \write . + \ch@ck ...\else \errmessage {No room for a new #3} + \fi +\end{lstoutput} +führen, wenn keine Schreibdateien mehr zur Verfügung stehen. Abhilfe kann in +diesem Fall das Laden des in \autoref{cha:scrwfile} beschriebenen Pakets +\Package{scrwfile}\important{\Package{scrwfile}}\IndexPackage{scrwfile} +oder die Verwendung von Lua\LaTeX{} bieten. + +Das Paket \hyperref[cha:scrhack]{\Package{scrhack}}\IndexPackage{scrhack}% +\important{ \hyperref[cha:scrhack]{\Package{scrhack}}} enthält übrigens +Patches für mehrere Pakete wie \Package{float} oder \Package{listings}, damit +deren Verzeichnisbefehle \Macro{listoftoc} verwenden. Dadurch stehen viele +Möglichkeiten von \Package{tocbasic} und den \KOMAScript-Klassen auch für +deren Verzeichnisse zur Verfügung.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{BeforeStartingTOC}\OParameter{Dateierweiterung} + \Parameter{Anweisungen} + \Macro{AfterStartingTOC}\OParameter{Dateierweiterung}\Parameter{Anweisungen} +\end{Declaration} +Manchmal ist es nützlich, wenn unmittelbar vor dem Einlesen der Datei mit den +Verzeichnisdaten \PName{Anweisungen} ausgeführt werden können. Mit Hilfe von +\Macro{BeforeStartingTOC} können Sie eine solche Ausführung +wahlweise für eine einzelne \PName{Dateierweiterung} oder alle Dateien, die +mit Hilfe von \DescRef{\LabelBase.cmd.listoftoc*}, +\DescRef{\LabelBase.cmd.listoftoc} oder \DescRef{\LabelBase.cmd.listofeachtoc} +eingelesen werden, erreichen. Ebenso können Sie \PName{Anweisungen} nach dem +Einlesen der Datei ausführen, wenn Sie diese mit \Macro{AfterStartingTOC} +definieren. Während der Ausführung der \PName{Anweisungen} ist +\Macro{@currext}\IndexCmd{@currext}\important{\Macro{@currext}} die +Dateierweiterung der Datei, die eingelesen wird bzw. gerade eingelesen wurde. + +Ein Beispiel\textnote{Beispiel} zur Verwendung von \Macro{BeforeStartingTOC} +ist in \autoref{sec:scrwfile.clonefilefeature} auf +\PageRefxmpl{scrwfile.cmd.BeforeStartingTOC} zu finden. +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{BeforeTOCHead}\OParameter{Dateierweiterung}\Parameter{Anweisungen} + \Macro{AfterTOCHead}\OParameter{Dateierweiterung}\Parameter{Anweisungen} +\end{Declaration} +Es können auch \PName{Anweisungen} definiert werden, die unmittelbar vor oder +nach dem Setzen der Überschrift bei Verwendung von +\DescRef{\LabelBase.cmd.listoftoc} oder \DescRef{\LabelBase.cmd.listofeachtoc} +ausgeführt werden. Bezüglich des optionalen Arguments und der Bedeutung von +\Macro{@currext}\IndexCmd{@currext}\important{\Macro{@currext}} gilt, was +bereits bei \DescRef{\LabelBase.cmd.BeforeStartingTOC} und +\DescRef{\LabelBase.cmd.AfterStartingTOC} oben erklärt wurde.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{MakeMarkcase} +\end{Declaration} +Wann immer \Package{tocbasic} eine Marke für einen Kolumnentitel setzt, +erfolgt dies als Argument der Anweisung \Macro{MakeMarkcase}. Diese Anweisung +ist dazu gedacht, bei Bedarf die Groß-/Kleinschreibung des Kolumnentitels zu +ändern. In der Voreinstellung ist diese Anweisung bei Verwendung einer +\KOMAScript-Klasse +\Macro{@firstofone}\IndexCmd{@firstofone}\important{\Macro{@firstofone}}, also +das unveränderte Argument selbst. Bei Verwendung einer anderen Klasse ist +\Macro{MakeMarkcase} im Gegensatz dazu +\Macro{MakeUppercase}\IndexCmd{MakeUppercase}\important{\Macro{MakeUppercase}}. +Die Anweisung wird von \Package{tocbasic} jedoch nur definiert, wenn sie +nicht bereits definiert ist. Sie kann also in einer Klasse in der gewünschten +Weise vorbelegt werden und wird dann von \Package{tocbasic} nicht umdefiniert, +sondern wie vorgefunden verwendet. +\begin{Example} + Sie wollen aus unerfindlichen Gründen, dass die Kolumnentitel in Ihrer + Klasse in Kleinbuchstaben ausgegeben werden. Damit dies auch für die + Kolumnentitel gilt, die von \Package{tocbasic} gesetzt werden, definieren + Sie: +\begin{lstcode} + \let\MakeMarkcase\MakeLowercase +\end{lstcode} +\end{Example} + +Erlauben\textnote{Tipp!} Sie mir einen Hinweis zu \Macro{MakeUppercase}. Diese +Anweisung ist zum einen nicht voll expandierbar. Das bedeutet, dass sie im +Zusammenspiel mit anderen Anweisungen zu Problemen führen kann. Zum anderen +sind sich alle Typografen einig, dass beim Versalsatz, also beim Satz +kompletter Wörter oder Passagen in Großbuchstaben, Sperrung unbedingt +notwendig ist. Dabei darf jedoch kein fester Abstand zwischen den Buchstaben +verwendet werden. Vielmehr muss zwischen unterschiedlichen Buchstaben auch ein +unterschiedlicher Abstand gesetzt werden, weil sich unterschiedliche +Buchstabenkombinationen unterschiedlich verhalten. Gleichzeitig bilden einige +Buchstaben von sich aus bereits Löcher, was bei der Sperrung ebenfalls zu +berücksichtigen ist. Pakete wie \Package{ulem} oder \Package{soul} können das +ebenso wenig leisten wie der Befehl \Macro{MakeUppercase} selbst. Auch die +automatische Sperrung mit Hilfe des \Package{microtype}-Pakets ist +diesbezüglich nur eine näherungsweise Notlösung, da die von der konkreten +Schrift abhängige Form der Buchstaben auch hier nicht näher betrachtet +wird. Da\textnote{Empfehlung} Versalsatz also eher etwas für absolute +Experten ist und fast immer Handarbeit bedeutet, wird Laien empfohlen, darauf +zu verzichten oder ihn nur vorsichtig und nicht an so exponierter Stelle +wie dem Kolumnentitel zu verwenden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{deftocheading}\Parameter{Dateierweiterung}\Parameter{Definition} +\end{Declaration} +Das Paket \Package{tocbasic} enthält eine Standarddefinition für das Setzen +von Überschriften von Verzeichnissen. Diese Standarddefinition ist durch +verschiedene Eigenschaften, die bei der Anweisung +\DescRef{\LabelBase.cmd.setuptoc} erläutert werden, konfigurierbar. Sollte +diese Möglichkeit einmal nicht ausreichen, so besteht die Möglichkeit, mit +\Macro{deftocheading} eine alternative Überschriftenanweisung für ein +Verzeichnis mit einer bestimmten \PName{Dateierweiterung} zu definieren. Die +Definition kann als einzigen Parameter \PValue{\#1} enthalten. Beim Aufruf der +Anweisung innerhalb von \DescRef{\LabelBase.cmd.listoftoc} oder +\DescRef{\LabelBase.cmd.listofeachtoc} wird für dieses Argument der Titel +des Verzeichnisses übergeben. + +Die \PName{Definition} ist dann selbstverständlich auch für die Auswertung +weiterer Eigenschaften, die sich auf die Überschrift beziehen, +verantwortlich. Das gilt insbesondere für die nachfolgend erklärten +Eigenschaften \PValue{leveldown}, \PValue{numbered} und \PValue{totoc}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setuptoc}\Parameter{Dateierweiterung} + \Parameter{Liste von Eigenschaften} + \Macro{unsettoc}\Parameter{Dateierweiterung} + \Parameter{Liste von Eigenschaften} +\end{Declaration} +Mit diesen beiden Anweisungen können \PName{Eigenschaften} für eine +\PName{Dateierweiterung} bzw. das Verzeichnis, das dazu gehört, gesetzt und +gelöscht werden. Die \PName{Liste von Eigenschaften} ist dabei eine durch +Komma getrennte Folge von \PName{Eigenschaften}. Das Paket +\Package{tocbasic} wertet folgende Eigenschaften aus: +\begin{description}\setkomafont{descriptionlabel}{}% +\item[\PValue{leveldown}] bedeutet, dass das Verzeichnis nicht mit der + obersten Gliederungsebene unterhalb von \DescRef{maincls.cmd.part} -- wenn + vorhanden \DescRef{maincls.cmd.chapter}, sonst \DescRef{maincls.cmd.section} + -- erstellt wird, sondern mit einer Überschrift der nächsttieferen + Gliederungsebene. Diese Eigenschaft wird von der internen + Überschriftenanweisung ausgewertet. Wird\textnote{Achtung!} hingegen eine + eigene Überschriftenanweisung mit \DescRef{\LabelBase.cmd.deftocheading} + definiert, liegt die Auswertung der Eigenschaft in der Verantwortung dessen, + der die Definition vornimmt. Die \KOMAScript-Klassen setzen diese + Eigenschaft bei Verwendung der Option + \OptionValueRef{maincls}{listof}{leveldown}% + \important{\OptionValueRef{maincls}{listof}{leveldown}}% + \IndexOption{listof~=\textKValue{leveldown}} für alle Dateierweiterungen mit + dem Besitzer \PValue{float}. +\item[\PValue{nobabel}] bedeutet, dass die normalerweise automatisch + verwendete Erweiterung für die Sprachumschaltung mit + \Package{babel}\IndexPackage{babel} für diese Dateierweiterung nicht + verwendet wird. Diese Eigenschaft sollte nur für Verzeichnisse verwendet + werden, die nur in einer festen Sprache erstellt werden, in denen also + Sprachumschaltungen im Dokument nicht zu berücksichtigen sind. Sie wird + außerdem vom Paket + \Package{scrwfile}\important{\Package{scrwfile}}\IndexPackage{scrwfile} für + Klonziele verwendet, da die Erweiterungen dort bereits durch das Klonen + selbst aus der Klonquelle übernommen werden. + + Es ist zu beachten\textnote{Achtung!}, dass die Eigenschaft bereits vor dem + Hinzufügen der Dateierweiterung zu der Liste der bekannten + Dateierweiterungen gesetzt sein muss, damit sie eine Wirkung hat. +\item[\PValue{noindent}]\ChangedAt{v3.27}{\Package{tocbasic}} veranlasst alle + von \KOMAScript{} bereitgestellten Verzeichniseintragsstile ihre Eigenschaft + \PValue{indent} (siehe \autoref{tab:tocbasic.tocstyle.attributes}, + \autopageref{tab:tocbasic.tocstyle.attributes.indent}) zu ignorieren und + stattdessen den Einzug zu deaktivieren. +\item[\PValue{noparskipfake}] verhindert\ChangedAt{v3.17}{\Package{tocbasic}}, + dass vor dem Abschalten des Absatzabstandes für die Verzeichnisse ein + letztes Mal ein expliziter Absatzabstand eingefügt wird. Dies führt in der + Regel dazu, dass bei Dokumenten mit Absatzabstand der Abstand zwischen + Überschrift und erstem Verzeichniseintrag\index{Verzeichnis>Eintrag} kleiner + wird als zwischen Überschriften und normalem Text. % + \iffalse% Umbruchkorrektur + Normalerweise erhält man daher ohne diese Eigenschaft eine einheitlichere + Formatierung.% + \else% + Ohne diese Eigenschaft wirkt die Formatierung daher meist einheitlicher.% + \fi% +\item[\PValue{noprotrusion}] verhindert\ChangedAt{v3.10}{\Package{tocbasic}} + das Abschalten des optischen Randausgleichs in den Verzeichnissen. Optischer + Randausgleich wird standardmäßig abgeschaltet, wenn das Paket + \Package{microtype}\IndexPackage{microtype} oder ein anderes Paket, das die + Anweisung \Macro{microtypesetup}\IndexCmd{microtypesetup} bereitstellt, + geladen ist. Wenn also optischer Randausgleich in den Verzeichnissen + gewünscht wird, dann muss diese Eigenschaft aktiviert + werden. Es\textnote{Achtung!} ist jedoch zu beachten, dass der optische + Randausgleich in Verzeichnissen häufig zu einem falschen Ergebnis + führt. Dies ist ein bekanntes Problem des optischen Randausgleichs. +\item[\PValue{numbered}] bedeutet, dass das Verzeichnis nummeriert und damit + ebenfalls in das Inhaltsverzeichnis aufgenommen werden soll. Diese + Eigenschaft wird von der internen Überschriftenanweisung ausgewertet. Wird + hingegen eine eigene Überschriftenanweisung mit + \DescRef{\LabelBase.cmd.deftocheading} definiert, liegt die Auswertung der + Eigenschaft in der Verantwortung dessen, der die Definition vornimmt. Die + \KOMAScript-Klassen setzen diese Eigenschaft bei Verwendung der Option + \OptionValueRef{maincls}{listof}{numbered}% + \important{\OptionValueRef{maincls}{listof}{numbered}}% + \IndexOption{listof~=\textKValue{numbered}} für alle Dateierweiterungen mit + dem Besitzer \Package{float}. +\item[\PValue{numberline}] \ChangedAt{v3.12}{\Package{tocbasic}}% + bedeutet, dass all diejenigen Einträge, die mit Hilfe der Anweisung + \DescRef{\LabelBase.cmd.addxcontentsline} oder der Anweisung + \DescRef{\LabelBase.cmd.addxcontentslinetoeachtocfile} vorgenommen werden, + wobei das optionale Argument für die Nummer fehlt oder leer ist, mit einer + leeren \DescRef{\LabelBase.cmd.numberline}-Anweisung versehen werden. Das + führt in der Regel dazu, dass diese Einträge nicht linksbündig mit der + Nummer, sondern mit dem Text der nummerierten Einträge gleicher Ebene + gesetzt werden. Bei\ChangedAt{v3.20}{\Package{tocbasic}} Verwendung des + Verzeichniseintragsstils \PValue{tocline} kann die Eigenschaft weitere + Auswirkungen haben. Siehe dazu die Stil-Eigenschaften + \Option{breakafternumber} und \Option{entrynumberformat} in + \autoref{tab:tocbasic.tocstyle.attributes} ab + \autopageref{tab:tocbasic.tocstyle.attributes}. + + Die \KOMAScript-Klassen setzen diese Eigenschaft bei Verwendung der Option + \OptionValueRef{maincls}{listof}{numberline}% + \important{\OptionValueRef{maincls}{listof}{numberline}\\ + \OptionValueRef{maincls}{toc}{numberline}% + }% + \IndexOption{listof~=\textKValue{numberline}} für die Dateierweiterungen mit + dem Besitzer \PValue{float} und bei Verwendung der Option + \OptionValueRef{maincls}{toc}{numberline}% + \IndexOption{toc~=\textKValue{numberline}} für die Dateierweiterung + \PValue{toc}. Entsprechend + wird die Eigenschaft bei Verwendung von Option + \OptionValueRef{maincls}{listof}{nonumberline}% + \important{% + \OptionValueRef{maincls}{listof}{nonumberline}\\ + \OptionValueRef{maincls}{toc}{nonumberline}% + }\IndexOption{listof~=\textKValue{nonumberline}} oder + \OptionValueRef{maincls}{toc}{nonumberline}% + \IndexOption{toc~=\textKValue{nonumberline}} wieder zurückgesetzt. +\item[\PValue{onecolumn}] \leavevmode\ChangedAt{v3.01}{\Package{tocbasic}}% + bedeutet, dass für dieses Verzeichnis automatisch der \LaTeX-interne + Einspaltenmodus mit \Macro{onecolumn}\IndexCmd{onecolumn} verwendet + wird. Das\textnote{Achtung!} gilt jedoch nur, falls dieses Verzeichnis + nicht mit der oben beschriebenen Eigenschaft + \PValue{leveldown}\important{\PValue{leveldown}} um eine Gliederungsebene + nach unten verschoben wurde. Die \KOMAScript-Klassen \Class{scrbook} und + \Class{scrreprt} setzen die Eigenschaft per + \DescRef{\LabelBase.cmd.AtAddToTocList} (siehe + \DescPageRef{\LabelBase.cmd.AtAddToTocList}) für alle Verzeichnisse mit dem + Besitzer \PValue{float} oder mit sich selbst als Besitzer. Damit werden + beispielsweise das Inhaltsverzeichnis, das Abbildungsverzeichnis und das + Tabellenverzeichnis bei diesen beiden Klassen automatisch einspaltig + gesetzt. Der Mehrspaltenmodus des + \Package{multicol}-Pakets\IndexPackage{multicol} ist von der Eigenschaft + ausdrücklich nicht betroffen. +\item[\PValue{totoc}] bedeutet, dass der Titel des Verzeichnisses in das + Inhaltsverzeichnis aufgenommen werden soll. Diese Eigenschaft wird von der + internen Überschriftenanweisung ausgewertet. Wird\textnote{Achtung!} mit + \DescRef{\LabelBase.cmd.deftocheading}\important{\DescRef{\LabelBase.cmd.deftocheading}}% + \IndexCmd{deftocheading} hingegen eine eigene Überschriftenanweisung + definiert, liegt die Auswertung der Eigenschaft in der Verantwortung dessen, + der die Definition vornimmt. Die \KOMAScript-Klassen setzen diese + Eigenschaft bei Verwendung der Option + \OptionValueRef{maincls}{listof}{totoc}% + \important{\OptionValueRef{maincls}{listof}{totoc}}% + \IndexOption{listof~=\textKValue{totoc}} für alle Dateierweiterungen mit dem + Besitzer \Package{float}. +\end{description} +Die \KOMAScript-Klassen kennen eine weitere Eigenschaft: +\begin{description}\setkomafont{descriptionlabel}{} +\item[\PValue{chapteratlist}] sorgt dafür, dass in dieses Verzeichnis bei + jedem neuen Kapitel eine optionale Gliederung eingefügt wird. In der + Voreinstellung ist diese Untergliederung dann ein vertikaler + Abstand. Näheres zu den Möglichkeiten ist Option + \DescRef{maincls.option.listof}% + \IndexOption{listof~=\PName{Einstellung}}% + \important{\DescRef{maincls.option.listof}} in + \autoref{sec:maincls.floats}, \DescPageRef{maincls.option.listof} zu + entnehmen. +\end{description} +\begin{Example} + \iffalse% Umbruchkorrektur + Da \KOMAScript{} für das Abbildungs- und das Tabellenverzeichnis auf + \Package{tocbasic} aufbaut, gibt es nun eine weitere Möglichkeit, jegliche + Kapiteluntergliederung dieser Verzeichnisse zu verhindern: +\begin{lstcode} + \unsettoc{lof}{chapteratlist} + \unsettoc{lot}{chapteratlist} +\end{lstcode} + + \fi% + Wollen Sie\iffalse hingegen\fi, dass das von Ihnen definierte Verzeichnis + mit der Dateierweiterung »\PValue{loa}« ebenfalls von der + Kapiteluntergliederung der \KOMAScript-Klassen betroffen ist, so verwenden + Sie +\begin{lstcode} + \setuptoc{loa}{chapteratlist} +\end{lstcode} +Wollen Sie außerdem, dass bei Klassen, die \DescRef{maincls.cmd.chapter} als +oberste Gliederungsebene verwenden, das Verzeichnis automatisch einspaltig +gesetzt wird, so verwenden Sie zusätzlich +\begin{lstcode} + \Ifundefinedorrelax{chapter}{}{% + \setuptoc{loa}{onecolumn}% + } +\end{lstcode} + Die Verwendung von \DescRef{scrbase.cmd.Ifundefinedorrelax} + setzt das Paket \Package{scrbase} voraus (siehe + \autoref{sec:scrbase.if}, + \DescPageRef{scrbase.cmd.Ifundefinedorrelax}). + + Sollte\textnote{Tipp!} Ihr Paket mit einer anderen Klasse verwendet werden, + so schadet es trotzdem nicht, dass Sie diese Eigenschaften setzen, im + Gegenteil: Wertet eine andere Klasse diese Eigenschaften ebenfalls aus, so + nutzt Ihr Paket automatisch die Möglichkeiten jener Klasse. +\end{Example} +Wie Sie hier sehen, unterstützt ein Paket, das \Package{tocbasic} verwendet, +bereits ohne nennenswerten Aufwand diverse Möglichkeiten für die dadurch +realisierten Verzeichnisse, die sonst einigen Implementierungsaufwand +bedeuten würden und deshalb in vielen Paketen leider fehlen.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Iftocfeature}\Parameter{Dateierweiterung}\Parameter{Eigenschaft} + \Parameter{Dann-Teil}\Parameter{Sonst-Teil} +\end{Declaration} +Hiermit\ChangedAt{v3.28}{\Package{tocbasic}} kann man für jede +\PName{Eigenschaft} feststellen, ob sie für eine \PName{Dateierweiterung} +gesetzt ist. Ist dies der Fall, wird der \PName{Dann-Teil} ausgeführt, +anderenfalls der \PName{Sonst-Teil}. Das kann beispielsweise nützlich sein, +wenn Sie eigene Überschriftenanweisungen mit +\DescRef{\LabelBase.cmd.deftocheading} definieren, aber die oben beschriebenen +Eigenschaften \PValue{totoc}, \PValue{numbered} oder \PValue{leveldown} +unterstützen wollen. +% +\EndIndexGroup + + +\section{Konfiguration von Verzeichniseinträgen} +\seclabel{tocstyle} +\BeginIndexGroup +\BeginIndex{}{Verzeichnis>Eintrag} + +Neben\ChangedAt{v3.20}{\Package{tocbasic}} den eigentlichen +Verzeichnissen und den zugehörigen Hilfsdateien kann man mit dem Paket +\Package{tocbasic} ab Version~3.20 auch Einfluss auf die Verzeichniseinträge +nehmen. Dazu können neue Stile definiert werden. Es stehen aber auch mehrere +vordefinierte Stile zur Verfügung. Damit soll \Package{tocbasic} auch das +nie offiziell gewordene \KOMAScript-Paket \Package{tocstyle} ablösen. Die +\KOMAScript-Klassen selbst bauen seit Version~3.20 ebenfalls vollständig auf +die von \Package{tocbasic} bereitgestellten Stile für Verzeichniseinträge. + +\begin{Declaration} + \Counter{tocdepth} +\end{Declaration} +Verzeichniseinträge sind normalerweise hierarchisch geordnet. Dazu wird jeder +Eintragsebene ein numerischer Wert zugeordnet. Je höher dieser Wert, desto +tiefer in der Hierarchie liegt die Ebene. Bei den Standardklassen hat die +Ebene für Teile beispielsweise den Wert -1 und die Ebene für Kapitel den Wert +0. Über den \LaTeX-Zähler \Counter{tocdepth} wird bestimmt, bis zu welcher +Ebene Einträge im Verzeichnis ausgegeben werden. + +Bei \Class{book} ist \Counter{tocdepth} beispielsweise mit 2 voreingestellt, +es werden also die Einträge der Ebenen \PValue{part}, \PValue{chapter}, +\PValue{section} und \PValue{subsection} ausgeben. Tiefere Ebenen wie +\PValue{subsubsection}, deren numerischer Wert 3 ist, werden nicht +ausgegeben. Trotzdem sind die Einträge in der Hilfsdatei für das +Inhaltsverzeichnis vorhanden. + +Die von \Package{tocbasic} definierten Eintragsstile beachten, abgesehen von +\PValue{gobble} (siehe +\DescRef{\LabelBase.cmd.DeclareTOCStyleEntry}\iffree{}{, weiter unten in + diesem Abschnitt}), ebenfalls \Counter{tocdepth}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{numberline}\Parameter{Gliederungsnummer} + \Macro{usetocbasicnumberline}\OParameter{Code} +\end{Declaration} +Zwar\ChangedAt{v3.20}{\Package{tocbasic}} definiert bereits der +\LaTeX-Kern eine Anweisung \Macro{numberline}, diese ist allerdings für die +Anforderungen von \Package{tocbasic} nicht ausreichend. Deshalb definiert +\Package{tocbasic} eigene Anweisungen und setzt \Macro{numberline} bei Bedarf +mit Hilfe von \Macro{usetocbasicnumberline} für die einzelnen +Verzeichniseinträge entsprechend. Eine Umdefinierung von \Macro{numberline} +ist daher bei Verwendung von \Package{tocbasic} oftmals wirkungslos und führt +teilweise auch zu Warnungen. + +Man kann auch die Definition von \Package{tocbasic} generell nutzen, indem man +bereits in der Dokumentpräambel \Macro{usetocbasicnumberline} aufruft. Die +Anweisung versucht zunächst zu ermitteln, ob in der aktuellen Definition +wichtige interne Anweisungen von \Package{tocbasic} verwendet werden. Ist dies +nicht der Fall, wird \Macro{numberline} entsprechend umdefiniert und zusätzlich +\PName{Code} ausgeführt. Ist kein optionales Arguments angegeben, wird +stattdessen via \Macro{PackageInfo} eine Meldung über die erfolgte +Umdefinierung ausgegeben. Diese Meldung kann man einfach unterdrücken, indem +ein leeres optionales Argument angegeben wird. + +Es\textnote{Achtung!} ist zu beachten, dass \Macro{usetocbasicnumberline} den +internen Schalter \Macro{if@tempswa} global verändern kann!% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DeclareTOCStyleEntry}\OParameter{Optionenliste}\Parameter{Stil} + \Parameter{Eintragsebene} + \Macro{DeclareTOCStyleEntries}\OParameter{Optionenliste}\Parameter{Stil} + \Parameter{Liste von Eintragsebenen} +\end{Declaration} +Über\ChangedAt{v3.20}{\Package{tocbasic}} diese Anweisungen werden +die Verzeichniseinträge für bestimmte \PName{Eintragsebenen} deklariert +oder konfiguriert. Dabei ist die \PName{Eintragsebene} der Name der jeweiligen +Eintragsebene, beispielsweise \PValue{section} für einen zur gleichnamigen +Gliederungsebene gehörenden Eintrag ins Inhaltsverzeichnis oder +\PValue{figure} für den Eintrag einer Abbildung ins +Abbildungsverzeichnis. Jeder \PName{Eintragsebene} wird ein bestimmter +\PName{Stil} zugeordnet, der zum Zeitpunkt der Deklaration bereits definiert +sein muss. Über die \PName{Optionenliste} können die verschiedenen, meist vom +\PName{Stil} abhängenden Eigenschaften des Eintrags festgelegt werden. + +Derzeit werden von \Package{tocbasic} die folgenden Eintragsstile definiert: +\begin{description}\setkomafont{descriptionlabel}{} +\item[\PValue{default}] ist in der Voreinstellung ein Klon von Stil + \PValue{dottedtocline}. Klassenautoren, die \Package{tocbasic} verwenden, + wird empfohlen, diesen Stil mit Hilfe von + \DescRef{\LabelBase.cmd.CloneTOCEntryStyle} auf den + Standardverzeichniseintragsstil der Klasse zu ändern. Bei den + \KOMAScript-Klassen wird \PValue{default} beispielsweise zu einem Klon von + Stil \PValue{tocline}. +\item[\PValue{dottedtocline}] entspricht dem Stil, der von den Standardklassen + \Class{book} und \Class{report} für die Inhaltsverzeichniseinträge der + Ebenen \PValue{section} bis \PValue{subparagraph} und bei allen + Standardklassen für die Einträge in das Abbildungs- und das + Tabellenverzeichnis bekannt ist. Er kennt nur drei\important{\PValue{level}, + \PValue{indent}, \PValue{numwidth}} Eigenschaften. Die Einträge werden + um \PValue{indent} von links eingezogen in der aktuellen Schrift + ausgegeben. \DescRef{\LabelBase.cmd.numberline} wird nicht umdefiniert. Die + Breite der Nummer wird von \PValue{numwidth} bestimmt. Bei mehrzeiligen + Einträgen wird der Einzug ab der zweiten Zeile um \PValue{numwidth} + erhöht. Die Seitenzahl wird mit \Macro{normalfont} ausgegeben. Eintragstext + und Seitenzahl werden durch eine punktierte Linie + verbunden. \autoref{fig:tocbasic.dottedtocline} illustriert die + Eigenschaften des Stils. + \begin{figure} + \centering + \resizebox{.8\linewidth}{!}{% + \begin{tikzpicture} + \draw[color=lightgray] (0,2\baselineskip) -- (0,-2.5\baselineskip); + \draw[color=lightgray] (\linewidth,2\baselineskip) -- + (\linewidth,-2.5\baselineskip); + \node (dottedtocline) at (0,0) [anchor=west,inner sep=0,outer sep=0] + {% + \hspace*{7em}% + \parbox[t]{\dimexpr\linewidth-9.55em}{% + \setlength{\parindent}{-3.2em}% + \addtolength{\parfillskip}{-2.55em}% + \makebox[3.2em][l]{1.1.10}% + Überschrift im Verzeichniseintragsstil \PValue{dottedtocline} mit + mehr als einer Zeile% + \leaders\hbox{$\csname m@th\endcsname + \mkern 4.5mu\hbox{.}\mkern 4.5mu$}\hfill\nobreak + \makebox[1.55em][r]{12}% + }% + }; + \draw[|-|,color=gray,overlay] (0,0) -- + node [anchor=north,font=\small] { + \PValue{indent} + } + (3.8em,0); + \draw[|-|,color=gray,overlay] (3.8em,\baselineskip) -- + node [anchor=south,font=\small] { + \PValue{numwidth} + } + (7em,\baselineskip); + \draw[|-|,color=gray,overlay] (\linewidth,\ht\strutbox) -- + node [anchor=south,font=\small] { + \Macro{@tocrmarg} + } + (\linewidth-2.55em,\ht\strutbox); + \draw[|-|,color=gray,overlay] (\linewidth,-\baselineskip) -- + node [anchor=north,font=\small] { + \Macro{@pnumwidth} + } + (\linewidth-1.55em,-\baselineskip); + \end{tikzpicture}% + } + \caption{Illustration einiger Attribute des Verzeichniseintragsstils + \PValue{dottedtocline}} + \label{fig:tocbasic.dottedtocline} + \end{figure} +\item[\PValue{gobble}] ist der denkbar einfachste Stil. Einträge in diesem + Stil werden unabhängig von allen Einstellungen für + \DescRef{\LabelBase.counter.tocdepth}% + \IndexCounter{tocdepth}\important{\DescRef{\LabelBase.counter.tocdepth}} + nicht ausgegeben, sondern sozusagen verschluckt. Dennoch verfügt er über die + Standardeigenschaft \PValue{level}, die jedoch nie ausgewertet wird. +\item[\PValue{largetocline}] entspricht dem Stil, der von den Standardklassen + für die Ebene \PValue{part} bekannt ist. Er kennt + nur\important{\PValue{level}, \PValue{indent}} die Eigenschaften + \PName{level} und \PName{indent}. Letzteres ist gleichsam eine Abweichung + von den Standardklassen, die selbst keinen Einzug der \PValue{part}-Einträge + unterstützen. + + Vor dem Eintrag wird ein Seitenumbruch erleichtert. Die Einträge werden um + \PValue{indent} von links eingezogen und mit den Schrifteinstellungen + \Macro{large}\Macro{bfseries} ausgegeben. Sollte + \DescRef{\LabelBase.cmd.numberline} verwendet werden, so ist die + Nummernbreite fest auf 3\Unit{em} + eingestellt. \DescRef{\LabelBase.cmd.numberline} wird nicht umdefiniert. Die + Standardklassen verwenden für \PName{part}-Einträge kein + \DescRef{\LabelBase.cmd.numberline}. Der Wert hat bei mehrzeiligen Einträgen + auch keine Auswirkung auf den Einzug ab der zweiten Zeile. + + \autoref{fig:tocbasic.largetocline} illustriert die + Eigenschaften + des Stils. Dabei wird auch auf"|fällig, dass der Stil einige Ungereimtheiten + der Standardklassen übernommen hat, beispielsweise den fehlenden Einzug ab + der zweiten Zeile bei mehrzeiligen Einträgen und zwei unterschiedliche Werte + für \Macro{@pnumwidth}, die aus einer Abhängigkeit von der Schriftgröße + resultieren. Daraus resultiert auch der Umstand, dass im Extremfall der Text + der Überschrift der Seitenzahl zu nahe kommen kann. Es ist zu beachten, dass + die in der Abbildung gezeigte Breite der Gliederungsnummer nur dann + Verwendung findet, wenn auch tatsächlich \DescRef{\LabelBase.cmd.numberline} + verwendet wird. Die Standardklassen setzen hingegen einen festen Abstand von + 1\Unit{em} nach der Nummer. + \begin{figure} + \centering + \resizebox{.8\linewidth}{!}{% + \begin{tikzpicture} + \draw[color=lightgray] (0,2\baselineskip) -- (0,-2.5\baselineskip); + \draw[color=lightgray] (\linewidth,2\baselineskip) -- + (\linewidth,-2.5\baselineskip); + \node (largetocline) at (0,0) [anchor=west,inner sep=0,outer sep=0] {% + \parbox[t]{\dimexpr \linewidth-1.55em\relax}{% + \makebox[3em][l]{\large\bfseries I}% + \large\bfseries + Überschrift im Verzeichniseintragsstil \PValue{largetocline} mit + mehr als einer Zeile\hfill + \makebox[0pt][l]{\normalsize\normalfont + \makebox[1.55em][r]{\large\bfseries 1}}% + }% + }; + \draw[|-|,color=gray] (0,\baselineskip) -- + node [anchor=south] { 3\,em } + (3em,\baselineskip); + \draw[|-|,color=gray,overlay] (\linewidth,\ht\strutbox) -- + node [anchor=south] { \Macro{@pnumwidth} } + (\linewidth-1.55em,\ht\strutbox); + \large\bfseries + \draw[|-|,color=gray,overlay] (\linewidth,-\baselineskip) -- + node [anchor=north,font=\normalfont\normalsize] { + \Macro{large}\Macro{@pnumwidth} + } + (\linewidth-1.55em,-\baselineskip); + \end{tikzpicture}% + } + \caption{Illustration einiger Attribute des Verzeichniseintragsstils + \PValue{largetocline}} + \label{fig:tocbasic.largetocline} + \end{figure} +\item[\PValue{tocline}] ist ein flexibler Stil, der in der Voreinstellung für + alle Einträge der \KOMAScript-Klassen verwendet wird. Entsprechend + definieren diese Klassen auch die Klone \PValue{part}, \PValue{chapter} und + \PValue{section} beziehungsweise \PValue{section} und \PValue{subsection} + mit Hilfe dieses Stils, ändern dann jedoch den \PName{Initialisierungscode} + der Klone so ab, dass sie unterschiedliche Voreinstellungen besitzen. + + Der Stil kennt neben der Standardeigenschaft \PValue{level} noch + 20\important{\PValue{level}, \PValue{beforeskip}, \PValue{breakafternumber}, + \PValue{dynindent}, + \PValue{dynnumwidth}, \PValue{entryformat}, \PValue{entrynumberformat}, + \PValue{indent}, \PValue{indentfollows}, + \PValue{linefill}, \PValue{numsep}, \PValue{numwidth}, + \PValue{onstarthigherlevel}, \PValue{onstartlowerlevel}, + \PValue{onstartsamelevel}, \PValue{pagenumberbox}, + \PValue{pagenumberformat}, \PValue{pagenumberwidth}, + \PValue{raggedentrytext}, \PValue{raggedpagenumber}, \PValue{rightindent}} + weitere Eigenschaften. Die Voreinstellungen all dieser Eigenschaften werden + abhängig vom Namen der \PName{Eintragsebene} bestimmt und orientieren sich + dann an den Ergebnissen der Standardklassen. Es ist daher möglich, nach + Laden von \Package{tocbasic} den Stil der Inhaltsverzeichniseinträge der + Standardklassen mit \DescRef{\LabelBase.cmd.DeclareTOCEntryStyle} in + \PValue{tocline} zu ändern, ohne dass dies unmittelbar zu größeren + Veränderungen im Aussehen der Inhaltsverzeichniseinträge führt. So kann man + gezielt nur die Eigenschaften ändern, die für erwünschte Änderungen + notwendig sind. Dasselbe gilt für Abbildungs- und Tabellenverzeichnis der + Standardklassen.% + + Aufgrund der hohen Flexibilität kann dieser Stil prinzipiell die Stile + \PValue{dottedtocline}, \PValue{undottedtocline} und \PValue{largetocline} + ersetzen, bedarf dann jedoch teilweise eines höheren Aufwands bei der + Konfiguration. + + \autoref{fig:tocbasic.tocline} illustriert einige Längen-Eigenschaften des + Stils. Die weiteren sind in \autoref{tab:tocbasic.tocstyle.attributes}, ab + \autopageref{tab:tocbasic.tocstyle.attributes} erklärt. + \begin{figure} + \centering + \resizebox{.8\linewidth}{!}{\hspace{-2em}% Leicht nach links schieben + \begin{tikzpicture} + \coordinate (subsection) at (0,0); + \coordinate (section) at ($(subsection)+(0,2\baselineskip)$); + \coordinate (chapter) at ($(section)+(0,2\baselineskip)$); + \coordinate (part) at ($(chapter)+(0,2.4\baselineskip+1em)$); + + \draw[color=lightgray] + ($(part)+(0,2\baselineskip)$) -- + (0,-2.5\baselineskip); + \draw[color=lightgray] + ($(part)+(\linewidth,2\baselineskip)$) -- + (\linewidth,-2.5\baselineskip); + + \coordinate (subsection) at (0,0); + + \node at (part) [anchor=west,inner sep=0,outer sep=0] + {% + \hspace*{3em}% + \parbox[t]{\dimexpr\linewidth-5.55em}{% + \setlength{\parindent}{-3em}% + \addtolength{\parfillskip}{-2.55em}% + \makebox[3em][l]{\large\bfseries I.}% + \textbf{\large Überschrift eines Teil-Eintrags im Stil + \PValue{tocline} zur Demonstration mit mehr als einer Zeile}% + \hfill + \makebox[1.55em][r]{\bfseries 12}\large + }% + }; + \draw[|-|,color=gray,overlay] + (part) -- + ($(part)+(3em,0)$) + node [anchor=north east,font=\small] { + \PValue{numwidth} + }; + \draw[|-|,color=gray,overlay] + ($(part)+(\linewidth,\ht\strutbox)$) + node [anchor=north,font=\small] { + ~\PValue{rightindent} + } -- + ($(part)+(\linewidth-2.55em,\ht\strutbox)$); + \draw[|-|,color=gray,overlay] + ($(part)+(\linewidth,-\baselineskip)$) -- + node [anchor=north,font=\small] { + \PValue{pagenumberwidth} + } + ($(part)+(\linewidth-1.55em,-\baselineskip)$); + \node at (chapter) [anchor=west,inner sep=0,outer sep=0] + {% + \hspace*{1.5em}% + \parbox[t]{\dimexpr\linewidth-4.05em}{% + \setlength{\parindent}{-1.5em}% + \addtolength{\parfillskip}{-2.55em}% + \makebox[1.5em][l]{\bfseries 1.}% + \textbf{Überschrift eines Kapiteleintrags im Stil + \PValue{tocline} zur Demonstration mit mehr als einer Zeile}% + \hfill + \makebox[1.55em][r]{\bfseries 12}% + }% + }; + \draw[|-|,color=gray,overlay] + ($(chapter)+(3em,\baselineskip)$) -- + node [anchor=west,font=\small] { + \PValue{beforeskip} + } + ($(part)+(3em,-\baselineskip)$); + \draw[|-|,color=gray,overlay] + (chapter) -- + ($(chapter)+(1.5em,0)$) + node [anchor=north east,font=\small] { + \PValue{numwidth} + }; + \draw[|-|,color=gray,overlay] + ($(chapter)+(\linewidth,\ht\strutbox)$) + node [anchor=north,font=\small] { + ~\PValue{rightindent} + } -- + ($(chapter)+(\linewidth-2.55em,\ht\strutbox)$); + \draw[|-|,color=gray,overlay] + ($(chapter)+(\linewidth,-\baselineskip)$) + node [anchor=north west,font=\small] { + \hspace*{-3.1em}\PValue{pagenumberwidth} + } -- + ($(chapter)+(\linewidth-1.55em,-\baselineskip)$); + \node at (section) [anchor=west,inner sep=0,outer sep=0] + { + \hspace*{3.8em}% + \parbox[t]{\dimexpr\linewidth-6.35em}{% + \setlength{\parindent}{-2.3em}% + \addtolength{\parfillskip}{-2.55em}% + \makebox[2.3em][l]{1.1.}% + Überschrift eines Abschnitteintrags im Stil + \PValue{tocline} zur Demonstration mit mehr als einer Zeile% + \leaders\hbox{$\csname m@th\endcsname + \mkern 4.5mu\hbox{.}\mkern 4.5mu$}\hfill\nobreak + \makebox[1.55em][r]{3}% + }% + }; + \node at (subsection) [anchor=west,inner sep=0,outer sep=0] + {% + \hspace*{7em}% + \parbox[t]{\dimexpr\linewidth-9.55em}{% + \setlength{\parindent}{-3.2em}% + \addtolength{\parfillskip}{-2.55em}% + \makebox[3.2em][l]{1.1.10.}% + Überschrift eines Unterabschnitteintrags im Stil + \PValue{tocline} mit mehr als einer Zeile% + \leaders\hbox{$\csname m@th\endcsname + \mkern 4.5mu\hbox{.}\mkern 4.5mu$}\hfill\nobreak + \makebox[1.55em][r]{12}% + }% + }; + \draw[|-|,color=gray,overlay] + ($(subsection)+(0,\ht\strutbox)$) -- + node [anchor=north,font=\small] { + \PValue{indent} + } + ($(subsection)+(3.8em,\ht\strutbox)$); + \draw[|-|,color=gray,overlay] + ($(subsection)+(3.8em,0)$) -- + ($(subsection)+(7em,0)$) + node [anchor=north east,font=\small] { + \PValue{numwidth} + }; + \draw[|-|,color=gray,overlay] + ($(subsection)+(\linewidth,\ht\strutbox)$) + node [anchor=north,font=\small] { + ~\PValue{rightindent} + } -- + ($(subsection)+(\linewidth-2.55em,\ht\strutbox)$); + \draw[|-|,color=gray,overlay] + ($(subsection)+(\linewidth,-\baselineskip)$) -- + node [anchor=north,font=\small] { + \PValue{pagenumberwidth} + } + ($(subsection)+(\linewidth-1.55em,-\baselineskip)$); + \end{tikzpicture}% + } + \caption{Illustration einiger Attribute des Verzeichniseintragsstils + \PValue{tocline}} + \label{fig:tocbasic.tocline} + \end{figure} +\item[\PValue{toctext}]\ChangedAt{v3.27}{\Package{tocbasic}}% + stellt eine Besonderheit dar. Während alle anderen Stile je Eintrag einen + Absatz\important{\PValue{level}, \PValue{afterpar}, \PValue{beforeskip}, + \PValue{entryformat}, + \PValue{entrynumberformat}, \PValue{indent}, \PValue{numsep}, + \PValue{onendentry}, \PValue{onendlastentry}, \PValue{onstartentry}, + \PValue{onstartfirstentry}, \PValue{pagenumberformat}, + \PValue{prepagenumber}, \PValue{raggedright}, \PValue{rightindent}} + erzeugen, wird hier für alle aufeinanderfolgenden Einträge dieses Stils nur + ein einziger Absatz erzeugt. Für die Konfigurierung stehen neben der + Standardeigenschaft \PValue{level} mit 14 weiteren Eigenschaften fast so + viele Möglichkeiten wie bei \PValue{tocline} zur Verfügung. Dieser Stil ist + aber zwingend darauf angewiesen, dass am Anfang aller anderen Stile und auch + am Ende des Verzeichnisses ein noch nicht beendeter Absatz tasächlich + beendet wird. Daher sollten Einträge dieses Stils nicht mit Einträgen oder + Verzeichnissen kombiniert werden, die an \Package{tocbasic} vorbei erzeugt + werden. +\item[\PValue{undottedtocline}] entspricht dem Stil, der von den + Standardklassen \Class{book} und \Class{report} für die Ebene + \PValue{chapter} und von \Class{article} für die Ebene \PValue{section} + bekannt ist. Er kennt\important{\PValue{level}, \PValue{indent}, + \PValue{numwidth}} nur drei Eigenschaften. + Vor dem Eintrag wird ein Seitenumbruch erleichtert und ein vertikaler + Abstand eingefügt. Die Einträge werden um \PValue{indent} von links + eingezogen in \Macro{bfseries} ausgegeben. Dies ist gleichsam eine + Abweichung von den Standardklassen, die selbst keinen Einzug für Einträge + der genannten Ebenen bieten. \DescRef{\LabelBase.cmd.numberline} wird nicht + umdefiniert. Die Breite der Nummer wird von \PValue{numwidth} bestimmt. Bei + mehrzeiligen Einträgen wird der Einzug ab der zweiten Zeile um + \PValue{numwidth} erhöht. \autoref{fig:tocbasic.undottedtocline} illustriert + die Eigenschaften des Stils. + \begin{figure} + \centering + \resizebox{.8\linewidth}{!}{% + \begin{tikzpicture} + \draw[color=lightgray] (0,2\baselineskip) -- (0,-2.5\baselineskip); + \draw[color=lightgray] (\linewidth,2\baselineskip) -- + (\linewidth,-2.5\baselineskip); + \node (undottedtocline) at (0,0) [anchor=west,inner sep=0,outer sep=0] + {% + \makebox[1.5em][l]{\bfseries 1}% + \parbox[t]{\dimexpr \linewidth-4.05em\relax}{% + \bfseries + Überschrift im Verzeichniseintragsstil \PValue{undottedtocline} mit + mehr als einer Zeile% + }% + \raisebox{-\baselineskip}{\makebox[2.55em][r]{\bfseries 3}}% + }; + \draw[|-|,color=gray,overlay] (0,\baselineskip) -- + node [anchor=south,font=\small] { + \PValue{numwidth} + } + (1.5em,\baselineskip); + \draw[|-|,color=gray,overlay] (\linewidth,\ht\strutbox) -- + node [anchor=south,font=\small] { + \Macro{@tocrmarg} + } + (\linewidth-2.55em,\ht\strutbox); + \draw[|-|,color=gray,overlay] (\linewidth,-\baselineskip) -- + node [anchor=north,font=\small] { + \Macro{@pnumwidth} + } + (\linewidth-1.55em,-\baselineskip); + \end{tikzpicture}% + } + \caption{Illustration einiger Attribute des Verzeichniseintragsstils + \PValue{undottedtocline} am Beispiel einer Kapitelüberschrift} + \label{fig:tocbasic.undottedtocline} + \end{figure} +\end{description} +Eine Erklärung zu den Eigenschaften der von \Package{tocbasic} definierten +Stile findet sich in \autoref{tab:tocbasic.tocstyle.attributes}. +Neben\ChangedAt{v3.27}{\Package{tocbasic}} der normalen Zuweisung eines Wertes +in der Form \Option{\PName{Schlüssel}=\PName{Wert}} verstehen beide Befehle +für alle Optionen der durch \KOMAScript{} definierten Stile auch die +Zuweisungen in der Form \Option{\PName{Schlüssel}:=\PName{Eintragsebene}}. In +diesem Fall wird die aktuell gültige Einstellung für \PName{Eintragsebene} +kopiert, soweit diese verfügbar ist. Es kann also beispielsweise mit +\OptionValue{indent:}{figure} der Einzug für \PValue{figure}-Einträge kopiert +werden. Für Optionen, die eine Länge oder einen Integer als \PName{Wert} +erwarten, gibt es außerdem die Möglichkeit mit +\Option{\PName{Schlüssel}+=\PName{Wert}} den \PName{Wert} zur aktuell gültigen +Einstellung zu addieren. Für eine Substraktion kann ein negativer \PName{Wert} +verwendet werden. Mit \OptionValue{indent+}{1cm} könnte so beispielsweise der +Einzug um 1\Unit{cm} erhöht werden. Für Optionen, die eine +Liste\ChangedAt{v3.31}{\Package{tocbasic}} als \PName{Wert} erwarten, kann mit +\Option{\PName{Schlüssel}+=\PName{Wert}} der neue \PName{Wert} an den bereits +vorhandenen angehängt werden. + +Bei\ChangedAt{v3.21}{\Package{tocbasic}} Verwendung der Eigenschaften als +Optionen für Anweisung +\DescRef{\LabelBase.cmd.DeclareNewTOC}\IndexCmd{DeclareNewTOC} (siehe +\DescPageRef{\LabelBase.cmd.DeclareNewTOC}) sind die Namen der Eigenschaften +mit dem Präfix \PValue{tocentry} zu verwenden, also beispielsweise +\Option{tocentrylevel} anstelle von \PValue{level}. Die zuvor beschriebene +Kopiermöglichkeit mit \Option{:=} ist hierbei ebenfalls verfügbar. Die +Addition mit Hilfe von \Option{+=} wird derzeit jedoch nicht unterstützt. + +Bei\ChangedAt{v3.20}{\Package{tocbasic}} Verwendung als Optionen +für \DescRef{maincls-experts.cmd.DeclareSectionCommand}% +\IndexCmd{DeclareSectionCommand}\IndexCmd{DeclareNewSectionCommand}% +\IndexCmd{RedeclareSectionCommand}\IndexCmd{ProvideSectionCommand} (siehe +\DescPageRef{maincls-experts.cmd.DeclareSectionCommand}) und verwandten +Anweisungen sind die Namen der Eigenschaften mit dem Präfix \PValue{toc} zu +versehen, also beispielsweise \Option{toclevel} anstelle von \PValue{level}. Hierbei existiert derzeit weder die Kopiermöglichkeit mit +\Option{:=} noch die Addition mit \Option{+=}. + +Letztlich führt der Aufruf von \Macro{DeclareTOCStyleEntry} zur Definition der +Anweisung \Macro{l@\PName{Eintragsebene}}. + +Während \Macro{DeclareTOCStyleEntry} nur eine \PName{Eintragsebene} +definiert, kann über +\Macro{DeclareTOCStyeEntries}\ChangedAt{v3.26}{\Package{tocbasic}} auf einen +Schlag eine ganze \PName{Liste von Eintragsebenen} definiert werden. Die durch +Komma voneinander getrennt angegebenen Eintragsebenen der Liste werden dabei +alle mit demselben \PName{Stil} und den über \PName{Optionenliste} +angegebenen Einstellungen definiert.% +% +\begin{desclist} + \desccaption{% + Attribute für die vordefinierten Verzeichniseintragsstile von + \Package{tocbasic}% + \label{tab:tocbasic.tocstyle.attributes}% + }{% + Attribute der Verzeichniseintragsstile (\emph{Fortsetzung})% + }% + \entry{\OptionVName{afterpar}{Code}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + Der angegebene \PName{Code} wird nach dem Ende des Absatzes ausgeführt, in + dem ein Eintrag mit dem Stil \PValue{toctext} ausgegeben wird. Verfügen + mehrere Einträge über solche Einstellungen, so werden diese in der + Reihenfolge der Einträge ausgeführt.% + }% + \entry{\OptionVName{beforeskip}{Länge}}{% + Vertikaler Abstand, der vor einem Eintrag dieser Ebene im Stil + \PValue{tocline} eingefügt wird (siehe + \autoref{fig:tocbasic.tocline}). Der Abstand wird je nach Ebene mit + \Macro{vskip} oder \Macro{addvspace} eingefügt, so dass diesbezüglich + möglichst Kompatibilität zu den Standardklassen und früheren Versionen von + \KOMAScript{} besteht. + + Bei der \PName{Eintragsebene} \PValue{part} wird das Attribut mit + \texttt{2.25em plus 1pt} initialisiert, bei \PValue{chapter} mit + \texttt{1em plus 1pt}. Ist noch keine \PName{Eintragsebene} + \PValue{chapter} bekannt, wird stattdessen für \PValue{section} + \texttt{1em plus 1pt} verwendet. Ansonsten wird es für \PValue{section} + wie für alle + anderen Ebenen mit \texttt{0pt plus .2pt} initialisiert. + + Im\ChangedAt{v3.31}{\Package{tocbasic}} Stil \PValue{toctext} wird der + vertikale Abstand vor dem Absatz eingefügt, wenn es sich um den ersten + Eintrag im Absatz handelt. Bei allen weiteren Einträgen des Absatzes wird + er ignoriert. Findet die Initialisierung über diesen Stil statt, so wird + als Voreinstellung \texttt{0pt} verwendet.% + }% + \entry{\OptionVName{breakafternumber}{Schalter}}{% + \PName{Schalter} ist einer der Werte für einfache Schalter aus + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. Ist der + Schalter beim Stil \PValue{tocline} aktiviert, so wird nach der mit + \DescRef{\LabelBase.cmd.numberline}\IndexCmd{numberline} gesetzten Nummer + eine neue Zeile begonnen, die erneut linksbündig mit der Nummer beginnt. + + In der Voreinstellung ist die Eigenschaft im Stil \PValue{tocline} nicht + gesetzt. + + Ist %\textnote{Achtung!} + für ein Verzeichnis mit \DescRef{\LabelBase.cmd.setuptoc} die Eigenschaft + \Option{numberline} gesetzt (siehe \autoref{sec:tocbasic.toc}, + \DescPageRef{\LabelBase.cmd.setuptoc}), wie das bei den + \KOMAScript-Klassen und Verwendung deren Option + \OptionValueRef{maincls}{toc}{numberline}% + \IndexOption{toc~=\textKValue{numberline}} der Fall ist, führt dies auch + dazu, dass bei nicht nummerierten Einträgen dennoch die Zeile mit der dann + leeren Nummer in der Formatierung von \Option{entrynumberformat} gesetzt + wird.% + }% + \entry{\OptionVName{dynindent}{Schalter}}{% + \ChangedAt{v3.31}{\Package{tocbasic}}% + \PName{Schalter} ist einer der Werte für einfache Schalter aus + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. Ist der + Schalter beim Stil \PValue{tocline} aktiviert, gibt die Eigenschaft + \PValue{indent} nur noch einen Minimalwert an. Der Maximalwert wird durch + die Nummernbreite und den Einzug der via \Option{indentfollows} + vorgegebenen Ebenen bestimmt.% + }% + \entry{\OptionVName{dynnumwidth}{Schalter}}{% + \PName{Schalter} ist einer der Werte für einfache Schalter aus + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. Ist der + Schalter beim Stil \PValue{tocline} aktiviert, gibt die Eigenschaft + \PValue{numwidth} nur noch einen Minimalwert an. Übertrifft die beim + letzten \LaTeX-Lauf ermittelte maximale Breite der Eintragsnummern + gleicher Ebene zuzüglich des Wertes von \PValue{numsep} diesen + Minimalwert, so wird stattdessen der ermittelte Wert verwendet.% + }% + \entry{\OptionVName{entryformat}{Befehl}}{% + Über diese Eigenschaft kann die Formatierung des gesamten Eintrags + verändert werden. Der dabei als Wert angegebene \PName{Befehl} hat genau + ein Argument zu erwarten. Dieses Argument ist nicht zwingend voll + expandierbar. Befehle wie \Macro{MakeUppercase}, die ein voll + expandierbares Argument erwarten, dürfen an dieser Stelle also nicht + verwendet werden. Font-Änderungen über \Option{entryformat} erfolgen + ausgehend von \Macro{normalfont}\Macro{normalsize}. Es wird darauf + hingewiesen, dass die Ausgabe von \Option{linefill} und der Seitenzahl + unabhängig von \Option{entryformat} ist. Siehe dazu auch die Eigenschaft + \Option{pagenumberformat}. + + Initialisiert wird die Eigenschaft für die \PName{Eintragsebene} + \PValue{part} mit der Ausgabe des übergebenen Argument in + \Macro{large}\Macro{bfseries} und für \PValue{chapter} in + \Macro{bfseries}. Falls bei der Initialisierung von \PValue{section} noch + keine Ebene \PValue{chapter} existiert, wird auch für diese Ebene + \Macro{bfseries} verwendet. Bei allen anderen Ebenen wird das Argument + unverändert ausgegeben.% + }% + \entry{\OptionVName{entrynumberformat}{Befehl}}{% + Über diese Eigenschaft kann die Formatierung der mit + \DescRef{\LabelBase.cmd.numberline} gesetzten Eintragsnummer verändert + werden. Der dabei als Wert angegebene \PName{Befehl} hat genau ein + Argument zu erwarten. Font-Änderungen erfolgen ausgehend von der + Eigenschaft \Option{entryformat}. + + Initialisiert wird die Eigenschaft mit der Ausgabe des übergebenen + Arguments. Die Eintragsnummer wird also unverändert ausgegeben. + + Ist %\textnote{Achtung!} + für ein Verzeichnis mit \DescRef{\LabelBase.cmd.setuptoc} die Eigenschaft + \Option{numberline} gesetzt (siehe \autoref{sec:tocbasic.toc}, + \DescPageRef{\LabelBase.cmd.setuptoc}), wie dies bei den + \KOMAScript-Klassen und Verwendung deren Option + \OptionValueRef{maincls}{toc}{numberline}% + \IndexOption{toc~=\textKValue{numberline}} der Fall ist, führt dies auch + dazu, dass bei nicht nummerierten Einträgen \PName{Befehl} dennoch + ausgeführt wird.% + }% + \entry{% + \OptionVName{indent}{Länge}% + {\phantomsection\label{tab:tocbasic.tocstyle.attributes.indent}}% + }{% + Beim\ChangedAt{v3.27}{\Package{tocbasic}} Stil \PValue{toctext} ist + \PName{Länge} der horizontale Abstand des Absatzes vom linken Rand. Haben + die unterschiedlichen Einträge des Absatzes unterschiedliche + Einstellungen, so gewinnt der letzte Eintrag. Bei den übrigen Stilen ist + \PValue{Länge} entsprechend der horizontale Abstand des Eintrags vom + linken Rand (siehe \autoref{fig:tocbasic.dottedtocline} und + \autoref{fig:tocbasic.tocline}). + + Bei den Stilen \PValue{tocline} und \PValue{toctext} wird für alle + Eintragsebenen, deren Name mit »\texttt{sub}« beginnt, eine + Initialisierung mit \PValue{indent}+\PValue{numwidth} der gleichnamigen + Eintragsebene ohne diesen Präfix vorgenommen, falls eine solche Ebene mit + entsprechenden Eigenschaften existiert. Bei den Stilen + \PValue{dottedtocline}, \PValue{undottedtocline} und \PValue{tocline} + findet für die Eintragsebenen \PValue{part} bis \PValue{subparagraph} + sowie \PValue{figure} und \PValue{table} eine Initialisierung mit Werten + entsprechend der Standardklassen statt. Alle anderen Ebenen erhalten keine + Initialisierung. Für sie ist eine explizite Angabe daher bei der ersten + Verwendung zwingend. + + Ist für ein Verzeichnis die Eigenschaft \PValue{noindent} via + \DescRef{\LabelBase.cmd.setuptoc} gesetzt, so ignorieren die Einträge bei + allen von \KOMAScript{} bereitgestellten Stilen diesen Wert und verwenden + stattdessen 0\Unit{pt}. Der Einzug wird also deaktiviert.% + }% + \entry{\OptionVName{indentfollows}{Ebenenliste}}{% + \ChangedAt{v3.31}{\Package{tocbasic}}% + Ist \Option{dynindent} beim Stil \PValue{tocline} gesetzt, so dient die + hier angegebene durch Komma separierte Liste an Ebenennamen dazu, den + tatsächlichen Einzug zu ermitteln. Dabei findet bei Ebenen, deren Name mit + »\texttt{sub}« beginnt, eine Initialisierung mit dem Namen ohne diesen + Präfix statt. Die \KOMAScript-Klassen setzen außerdem automatisch passende + Werte für die Ebenen \PValue{section} und \PValue{paragraph}.% + }% + \entry{\OptionVName{level}{Integer}}{% + Numerischer Wert der \PName{Eintragsebene}. Tatsächlich angezeigt werden + nur Einträge, deren numerische Ebene nicht größer als Zähler + \DescRef{\LabelBase.counter.tocdepth}% + %\important{\DescRef{\LabelBase.counter.tocdepth}} + \IndexCounter{tocdepth} + ist. + + Diese Eigenschaft ist für alle Stile zwingend und wird bei der + Definition eines Stils automatisch definiert. + + Bei den Stilen \PValue{tocline} und \PValue{toctext} findet für alle + Eintragsebenen, deren Name mit »\texttt{sub}« beginnt, eine + Initialisierung entsprechend dem um eins erhöhten Wert einer gleichnamigen + Eintragsebene ohne diesen Präfix statt, falls eine solche Ebene + existiert. Bei den Stilen \PValue{dottedtocline}, \PValue{largetocline}, + \PValue{tocline}, \PValue{toctext} und \PValue{undottedtocline} findet für + die \PName{Eintragsebene} \PValue{part}, \PValue{chapter}, + \PValue{section}, \PValue{subsection}, \PValue{subsubsection}, + \PValue{paragraph}, \PValue{subparagraph}, \PValue{figure} und + \PValue{table} automatisch eine Initialisierung aufgrund des Namens + statt. Für andere Ebenen findet eine Initialisierung mit dem Wert der + Gliederungsebene statt, falls kompatibel zu den \KOMAScript-Klassen + \Macro{\PName{Eintragsebene}numdepth} definiert ist.% + }% + \entry{\OptionVName{linefill}{Code}}{% + Beim Stil \PValue{tocline} kann zwischen dem Ende des Eintragstextes und + der Seitenzahl die Art der Füllung verändert werden. Die Eigenschaft + \PName{linefill} erhält als Wert direkt den gewünschten \PName{Code}. Für + \PName{Eintragsebene} \PValue{part} und \PValue{chapter} wird die + Eigenschaft mit \Macro{hfill} initialisiert. Dadurch rückt die Seitenzahl + an den rechten Rand. Ist bisher keine \PName{Eintragsebene} + \PValue{chapter} definiert, so gilt dies auch für \PValue{section}. Alle + anderen Ebenen werden mit \DescRef{\LabelBase.cmd.TOCLineLeaderFill} + (siehe \DescPageRef{\LabelBase.cmd.TOCLineLeaderFill}) initialisiert. + + Wird \PName{Code} angegeben, der nicht automatisch zu einer Füllung des + Abstandes führt, sollte übrigens auch die Eigenschaft + \PValue{raggedpagenumber} gesetzt werden, damit es nicht zu + »\texttt{underfull \Macro{hbox}}«-Meldungen kommt.% + }% + \entry{\OptionVName{numsep}{Länge}}{% + Der Stil \PValue{tocline} versucht sicherzustellen, dass zwischen der + Nummer und dem Text eines Eintrags mindestens ein Abstand von + \PName{Länge} eingehalten wird. Bei aktiviertem \PValue{dynnumwidth} kann + die für die Nummer reservierte Breite \PValue{numwidth} entsprechend + korrigiert werden. Bei nicht aktiviertem \PValue{dynnumwidth} wird + hingegen lediglich eine Warnung ausgegeben, wenn diese Bedingung nicht + eingehalten wird. + + Der\ChangedAt{v3.27}{\Package{tocbasic}} Stil \PValue{toctext} fügt + dagegen immer einen Abstand dieser \PName{Länge} nach der Nummer des + Eintrags ein. + + Die Eigenschaft wird mit einem Wert von 0,4\Unit{em} initialisiert.% + }% + \entry{\OptionVName{numwidth}{Länge}}{% + Für die Nummer eines Eintrags reservierte Breite (siehe + \autoref{fig:tocbasic.dottedtocline} bis + \autoref{fig:tocbasic.undottedtocline}). Dieser Wert wird bei den + Stilen \PValue{dottedtocline}, \PValue{tocline} und + \PValue{undottedtocline} ab der zweiten Zeile eines Eintrags zum linken + Einzug hinzugerechnet. + + Beim Stil \PValue{tocline} wird für alle Eintragsebenen, deren Name mit + »\texttt{sub}« beginnt, eine Initialisierung mit dem Wert der + gleichnamigen Eintragsebene ohne diesen Präfix zuzüglich 0,9\Unit{em} + vorgenommen, falls eine solche Ebene mit entsprechender Eigenschaft + existiert. Bei den Stilen \PValue{dottedtocline}, \PValue{undottedtocline} + und \PValue{tocline} findet für die Eintragsebenen \PValue{part} bis + \PValue{subparagraph} sowie \PValue{figure} und \PValue{table} eine + Initialisierung mit Werten entsprechend der Standardklassen statt. Alle + anderen Ebenen erhalten keine Initialisierung. Für sie ist eine explizite + Angabe daher bei der ersten Verwendung zwingend.% + }% + \entry{\OptionVName{onendentry}{Code}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + Führt den angegebenen \PName{Code} unmittelbar nach einem Eintrag im Stil + \PValue{toctext} aus, sofern es nicht der letzte Eintrag im Absatz + ist. Der Anwender muss unbedingt sicherstellen, dass \PName{Code} auf + keinen Fall zum Beenden des Absatzes führt. + + Hinweis: Tatsächlich wird der \PName{Code} gar nicht am Ende des Eintrags, + sondern vor dem nächsten Eintrag im Stil \PValue{toctext} ausgeführt.% + }% + \entry{\OptionVName{onendlastentry}{Code}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + Führt den angegebenen \PName{Code} unmittelbar vor dem Ende des Absatzes + mit dem Eintrag im Stil \PValue{toctext} aus, sofern es sich um den + letzten Eintrag im Absatz handelt. Der Anwender sollte sicherstellen, dass + \PName{Code} nicht zum Beenden des Absatzes führt.% + }% + \entry{\OptionVName{onstartentry}{Code}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + Führt den angegebenen \PName{Code} unmittelbar vor dem Eintrag im Stil + \PValue{toctext} aus, sofern es sich nicht um den ersten Eintrag im Absatz + handelt. Der Anwender muss unbedingt sicherstellen, dass \PName{Code} auf + keinen Fall zum Beenden des Absatzes führt.% + }% + \entry{\OptionVName{onstartfirstentry}{Code}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + Führt den angegebenen \PName{Code} unmittelbar vor dem Eintrag im Stil + \PValue{toctext} aus, sofern es sich um den ersten Eintrag im Absatz + handelt. Der Anwender muss unbedingt sicherstellen, dass \PName{Code} auf + keinen Fall zum Beenden des bereits begonnen Absatzes führt.% + }% + \entry{\OptionVName{onstarthigherlevel}{Code}}{% + Der Stil \PValue{tocline} kann zu Beginn eines Eintrags eine Aktion in + Abhängigkeit davon ausführen, ob der zuletzt gesetzte Eintrag einen + höheren, denselben oder einen niedrigeren \PName{level}-Wert hatte. Im + Falle, dass der aktuelle Eintrag einen größeren \PName{level}-Wert + besitzt, in der Hierarchie der Einträge also tiefer steht, wird der über + diese Eigenschaft angegebene \PName{Code} ausgeführt. + + Die Erkennung funktioniert übrigens nur, solange sich \Macro{lastpenalty} + seit dem letzten Eintrag nicht geändert hat. + + Initialisiert wird die Eigenschaft mit + \DescRef{\LabelBase.cmd.LastTOCLevelWasLower} (siehe + \DescPageRef{\LabelBase.cmd.LastTOCLevelWasLower}).% + }% + \entry{\OptionVName{onstartlowerlevel}{Code}}{% + Der Stil \PValue{tocline} kann zu Beginn eines Eintrags eine Aktion in + Abhängigkeit davon ausführen, ob der zuletzt gesetzte Eintrag einen + höheren, denselben oder einen niedrigeren \PName{level}-Wert hatte. Im + Falle, dass der aktuelle Eintrag einen kleineren \PName{level}-Wert + besitzt, in der Hierarchie der Einträge also höher steht, wird der über + diese Eigenschaft angegebene \PName{Code} ausgeführt. + + Die Erkennung funktioniert übrigens nur, solange sich \Macro{lastpenalty} + seit dem letzten Eintrag nicht geändert hat. + + Initialisiert wird die Eigenschaft mit + \DescRef{\LabelBase.cmd.LastTOCLevelWasHigher} (siehe + \DescPageRef{\LabelBase.cmd.LastTOCLevelWasHigher}), was normalerweise + dazu führt, dass ein Umbruch vor dem Eintrag begünstigt wird.% + }% + \entry{\OptionVName{onstartsamelevel}{Code}}{% + Der Stil \PValue{tocline} kann zu Beginn eines Eintrags eine Aktion in + Abhängigkeit davon ausführen, ob der zuletzt gesetzte Eintrag einen + höheren, denselben oder einen niedrigeren \PName{level}-Wert hatte. Im + Falle, dass der aktuelle Eintrag denselben \PName{level}-Wert besitzt, in + der Hierarchie der Einträge also gleich gestellt ist, wird der über diese + Eigenschaft angegebene \PName{Code} ausgeführt. + + Die Erkennung funktioniert übrigens nur, solange sich \Macro{lastpenalty} + seit dem letzten Eintrag nicht geändert hat. + + Initialisiert wird die Eigenschaft mit + \DescRef{\LabelBase.cmd.LastTOCLevelWasSame} (siehe + \DescPageRef{\LabelBase.cmd.LastTOCLevelWasSame}), was normalerweise dazu + führt, dass ein Umbruch vor dem Eintrag begünstigt wird.% + }% + \entry{\OptionVName{pagenumberbox}{Befehl}}{% + Normalerweise wird die zu einem Eintrag gehörende Seitenzahl rechtsbündig + in eine Box der Breite \Macro{@pnumwidth} gesetzt. Beim Stil + \PValue{tocline} kann der Befehl, der dazu verwendet wird, über diese + Eigenschaft konfiguriert werden. Der dabei anzugebende \PName{Befehl} hat + genau ein Argument zu erwarten. + + Initialisiert wird die Eigenschaft mit der bereits erwähnten Box.% + }% + \entry{\OptionVName{pagenumberformat}{Befehl}}{% + Über diese Eigenschaft kann die Formatierung der Seitenzahl des Eintrags + verändert werden. Der dabei als Wert angegebene \PName{Befehl} hat genau + ein Argument zu erwarten. Font-Änderungen über \Option{entryformat} + erfolgen ausgehend von \Option{entryformat}, gefolgt von + \Macro{normalfont}\Macro{normalsize}. + + Initialisiert wird die Eigenschaft für die \PName{Eintragsebene} + \PValue{part} mit der Ausgabe des übergebenen Arguments in + \Macro{large}\Macro{bfseries}. Für die \PName{Eintragsebene} + \PValue{chapter} wird nur \Macro{bfseries} verwendet. Bei Klassen + ohne vordefiniertes \Macro{l@chapter} geschieht dies auch für die + \PName{Eintragsebene} \PValue{section}. Für alle anderen Ebenen erfolgt + die Ausgabe in \Macro{normalfont}\Macro{normalcolor}.% + }% + \entry{\OptionVName{pagenumberwidth}{Länge}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + Mit dieser Eigenschaft kann die Breite der Standardbox für die Seitenzahl + eines Eintrags im Stil \PValue{tocline} von \Macro{@pnumwidth} in die + angegebene \PName{Länge} geändert werden. Es ist zu beachten, dass bei + Änderung des Befehls für die Box über die Eigenschaft + \Option{pagenumberbox} die angegebene \PName{Länge} nicht mehr automatisch + Anwendung findet.% + }% + \entry{\OptionVName{prepagenumber}{Code}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + Im Stil \PValue{toctext} wird zwischen dem Eintragstext und der Seitenzahl + \PName{Code} ausgeführt. Dies dient in erster Linie dazu, Abstand oder + Trennzeichen zwischen Text und Seitenzahl einzufügen.% + + Voreingestellt ist mit \Macro{nonbreakspace} ein nicht umbrechbares + Leerzeichen.% + }% + \entry{\OptionVName{raggedentrytext}{Schalter}}{% + \ChangedAt{v3.21}{\Package{tocbasic}}% + \PName{Schalter} ist einer der Werte für einfache Schalter aus + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. + Ist der Schalter beim Stil \PValue{tocline} aktiviert, so wird der Text + des Eintrags nicht im Blocksatz, sondern im Flattersatz gesetzt. Dabei + werden nur noch Wörter getrennt, die länger als eine Zeile sind. + + In der Voreinstellung ist dieser Schalter nicht gesetzt.% + }% + \entry{\OptionVName{raggedpagenumber}{Schalter}}{% + \PName{Schalter} ist einer der Werte für einfache Schalter aus + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. + Ist der Schalter beim Stil \PValue{tocline} aktiviert, so wird die + Seitenzahl nicht zwingend rechtsbündig gesetzt. + + Je nach Wert der Eigenschaft \PValue{linefill} kann sich das + Setzen dieses Schalters nur im Erscheinen oder Verschwinden einer Warnung + oder auch konkret in der Formatierung der Einträge auswirken. Es ist also + wichtig, diese beiden Eigenschaften zueinander passend zu setzen. + + In der Voreinstellung ist dieser Schalter nicht gesetzt und passt damit + zur Initialisierung von \PValue{linefill} sowohl mit \Macro{hfill} als + auch mit \DescRef{\LabelBase.cmd.TOCLineLeaderFill}.% + }% + \entry{\OptionVName{raggedright}{Schalter}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + \PName{Schalter} ist einer der Werte für einfache Schalter aus + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. + Ist der Schalter innerhalb eines Absatzes bei irgendeinem Eintrag im Stil + \PValue{toctext} gesetzt, so wird der komplette Absatz in linksbündigem + Flattersatz gesetzt.% + }% + \entry{\OptionVName{rightindent}{Länge}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + Mit dieser Eigenschaft kann der rechte Rand für den Text eines Eintrags im + Stil \PValue{tocline} von \Macro{@tocrmarg} in die angegebene + \PName{Länge} geändert werden. Beim Stil \PValue{toctext} wird + entsprechend der rechte Rand für den kompletten Absatz eingestellt.% + }% +\end{desclist} +\EndIndexGroup + +\begin{Declaration} + \Macro{DeclareTOCEntryStyle}\Parameter{Stil} + \OParameter{Initialisierungscode} + \Parameter{Befehlscode} + \Macro{DefineTOCEntryOption}\Parameter{Option} + \OParameter{Säumniswert} + \Parameter{Code} + \Macro{DefineTOCEntryBooleanOption}\Parameter{Option} + \OParameter{Säumniswert} + \Parameter{Präfix} + \Parameter{Postfix} + \Parameter{Erklärung} + %\OParameter{Initialisierungscode} + \Macro{DefineTOCEntryCommandOption}\Parameter{Option} + \OParameter{Säumniswert} + \Parameter{Präfix} + \Parameter{Postfix} + \Parameter{Erklärung} + %\OParameter{Initialisierungscode} + \Macro{DefineTOCEntryIfOption}\Parameter{Option} + \OParameter{Säumniswert} + \Parameter{Präfix}% + \Parameter{Postfix} + \Parameter{Erklärung} + % \OParameter{Initialisierungscode} + \Macro{DefineTOCEntryLengthOption}\Parameter{Option} + \OParameter{Säumniswert} + \Parameter{Präfix} + \Parameter{Postfix} + \Parameter{Erklärung} + % \OParameter{Initialisierungscode} + \Macro{DefineTOCEntryNumberOption}\Parameter{Option} + \OParameter{Säumniswert} + \Parameter{Präfix} + \Parameter{Postfix} + \Parameter{Erklärung} + % \OParameter{Initialisierungscode} +\end{Declaration} +\Macro{DeclareTOCEntryStyle}\ChangedAt{v3.20}{\Package{tocbasic}} ist +eine der komplexesten Anweisungen in \KOMAScript. Sie richtet sich daher +ausdrücklich an \LaTeX-Entwickler und nicht an \LaTeX-Anwender. Mit ihrer +Hilfe ist es möglich, einen neuen \PName{Stil} für Verzeichniseinträge zu +definieren. Üblicherweise werden Verzeichniseinträge mit +\Macro{addcontentsline}\IndexCmd{addcontentsline} oder bei Verwendung von +\Package{tocbasic} vorzugsweise mit +\DescRef{\LabelBase.cmd.addxcontentsline}\IndexCmd{addxcontentsline} (siehe +\autoref{sec:tocbasic.basics}, \DescPageRef{\LabelBase.cmd.addxcontentsline}) +erzeugt. Dabei schreibt \LaTeX{} eine zugehörige Anweisung +\Macro{contentsline}\IndexCmd{contentsline} in die jeweilige Hilfsdatei. Beim +Einlesen dieser Hilfsdatei führt \LaTeX{} dann für jedes \Macro{contentsline} +eine Anweisung \Macro{l@\PName{Eintragsebene}} aus. + +Wird später einer \PName{Eintragsebene} über +\DescRef{\LabelBase.cmd.DeclareTOCStyleEntry} ein \PName{Stil} zugewiesen, so +wird zunächst \PName{Initialisierungscode} ausgeführt, falls angegeben, und +dann \PName{Befehlscode} für die Definition von +\Macro{l@\PName{Eintragsebene}} verwendet. \PName{Befehlscode} ist also +letztlich der Code, der bei \Macro{l@\PName{Eintragsebene}} ausgeführt +wird. Dabei ist \texttt{\#1} der Name der Eintragsebene, während +\texttt{\#\#1} und \texttt{\#\#2} Platzhalter für die beiden Argumente von +\Macro{l@\PName{Eintragsebene}} sind. + +Der \PName{Initialisierungscode} dient einerseits dazu, die Einstellungen +eines Stils zu initialisieren. Entwickler\textnote{Empfehlung!} sollten darauf +achten, dass wirklich alle Einstellungen hier bereits einen Wert erhalten. Nur +dann funktioniert \DescRef{\LabelBase.cmd.DeclareTOCStyleEntry} auch ohne +Angabe einer \PName{Optionenliste} fehlerfrei. Darüber hinaus hat der +\PName{Initialisierungscode} auch alle Optionen, die der jeweilige Stil +versteht, zu definieren. Zwingend vordefiniert wird lediglich +\Option{level}. Der eingestellte Wert für \Option{level} kann in +\PName{Befehlscode} mit \Macro{@nameuse}\PParameter{\#1tocdepth}% +\important{\Macro{\PName{Eintragsebene}tocdepth}} abgefragt werden, um ihn +beispielsweise mit dem Wert des Zählers +\DescRef{\LabelBase.counter.tocdepth}\IndexCounter{tocdepth} zu vergleichen. + +Zur Definition neuer Optionen für die Eigenschaften einer +Eintragsebene existieren nur innerhalb von \PName{Initialisierungscode} die +Anweisungen \iffree{\Macro{DefineTOCEntryBooleanOption}, +\Macro{DefineTOCEntryCommandOption}, \Macro{DefineTOCEntryIfOption}, +\Macro{DefineTOCEntryLengthOption} und +\Macro{DefineTOCEntryNumberOption}}{\Macro{DefineTOCEntry\dots Option}}. +Diese Anweisungen definieren jeweils eine \PName{Option}, die bei ihrem +Aufruf eine Anweisung +\Macro{\PName{Präfix}\PName{Eintragsebene}\PName{Postfix}} mit dem übergebenen +Wert oder bei Fehlen einer Wertzuweisung mit dem \PName{Säumniswert} +definieren. Eine Besonderheit stellt \Macro{DefineTOCEntryIfOption} dar. Diese +definiert \Macro{\PName{Präfix}\PName{Eintragsebene}\PName{Postfix}} immer als +Anweisung mit zwei Argumenten. Ist der an die Option übergebene Wert einer der +Aktivierungswerte aus \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch}, so expandiert die Anweisung zum ersten +Argument. Ist der an die Option übergebene Wert hingegen ein +Deaktivierungswert, so expandiert die Anweisung zum zweiten Argument. + +Neben\ChangedAt{v3.27}{\Package{tocbasic}} den normalen Optionen der Form +\Option{\PName{Schlüssel}=\PName{Wert}} werden von allen fünf +\Macro{DefineTOCEntry\dots Option}-Anweisungen automatisch Optionen der Form +\Option{\PName{Schlüssel}:=\PName{Eintragsebene}} definiert. Diese dienen +dazu, den Wert einer anderen \PName{Eintragsebene} zu kopieren, sofern der +Wert in einem Makro mit gleichem \PName{Präfix} und \PName{Postfix} +gespeichert ist. Bei den von \Package{tocbasic} vordefinierten Stilen ist das +für gleichnamige Optionen über Stilgrenzen hinweg der Fall. + +Vergleichbar dazu werden von \Macro{DefineTOCEntryLengthOption} und +\Macro{DefineTOCEntryNumberOption} jeweils zusätzliche Optionen der Form +\Option{\PName{Schlüssel}+=\PName{Wert}} mitdefiniert, die dazu dienen, zu +dem in \Macro{\PName{Präfix}\PName{Eintragsebene}\PName{Postfix}} bereits +gespeicherten Wert den neuen \PName{Wert} zu addieren. + +Die \PName{Erklärung} sollte ein möglichst kurzer Text sein, der den Sinn der +Option mit wenigen Schlagworten beschreibt. Er wird von \Package{tocbasic} bei +Fehlermeldungen, Warnungen und Informationen auf dem Terminal und in der +\File{log}-Datei ausgegeben. +\begin{Example} +Der einfachste Stil von \Package{tocbasic}, \PValue{gobble}, wurde mit +\begin{lstcode} + \DeclareTOCEntryStyle{gobble}{}% +\end{lstcode} +definiert. Würde man nun mit +\begin{lstcode} + \DeclareTOCStyleEntry[level=1]{gobble}{dummy} +\end{lstcode} +eine Eintragsebene \PValue{dummy} in diesem Stil definieren, so würde das% +\iffalse unter anderem\fi% Umbruchkorrektur +\begin{lstcode} + \def\dummytocdepth{1} + \def\l@dummy#1#2{} +\end{lstcode} +entsprechen. + +Innerhalb von Stil \PValue{tocline} wird beispielsweise +\begin{lstcode} + \DefineTOCEntryCommandOption{linefill}% + [\TOCLineLeaderFill]{scr@tso@}{@linefill}% + {filling between text and page number}% +\end{lstcode} +verwendet, um Option \Option{linefill} zu definieren. Durch die Angabe von +\DescRef{\LabelBase.cmd.TOCLineLeaderFill} als \PName{Säumniswert} würde ein +Aufruf wie +\begin{lstcode} + \DeclareTOCStyleEntry[linefill]{tocline}{part} +\end{lstcode} +unter anderem die Definition +\begin{lstcode} + \def\scr@tso@part@linefill{\TOCLineLeaderFill} +\end{lstcode} +vornehmen. +\end{Example} +Wer\textnote{Tipp!} sich selbst einen Stil definieren möchte, dem sei +empfohlen, zunächst die Definition des Stils \PValue{dottedtocline} zu +studieren. Nachdem dessen Definition verstanden wurde, gibt dann die deutlich +komplexere Definition von Stil \PValue{tocline} viele Hinweise darauf, wie die +Anweisungen sinnvoll zu verwenden sind. + +In\textnote{Tipp!} vielen Fällen wird es jedoch auch ausreichen, einen der +vorhandenen Stile mit \DescRef{\LabelBase.cmd.CloneTOCEntryStyle} zu klonen +und dann dessen Initialisierungscode mit Anweisung +\DescRef{\LabelBase.cmd.TOCEntryStyleInitCode} oder +\DescRef{\LabelBase.cmd.TOCEntryStyleStartInitCode} abzuändern. + +\Macro{DefineTOCEntryOption} dient eher der Definition der übrigen +Anweisungen und sollte in der Regel nicht direkt verwendet +werden. Normalerweise besteht dafür auch keine Notwendigkeit. Sie sei hier +nur der Vollständigkeit halber erwähnt.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{CloneTOCEntryStyle}\Parameter{Stil}\Parameter{neuer Stil}% +\end{Declaration} +Mit\ChangedAt{v3.20}{\Package{tocbasic}} dieser Anweisung kann ein +existierender \PName{Stil} geklont werden. Dabei wird ein \PName{neuer Stil} +mit denselben Eigenschaften und Voreinstellungen wie der existierende +\PName{Stil} deklariert. Das Paket selbst verwendet +\Macro{CloneTOCEntryStyle}, um den Stil \PValue{default} als Klon von +\PValue{dottedtocline} zu deklarieren. Die \KOMAScript-Klassen verwenden die +Anweisung um die Stile \PValue{part}, \PValue{section} und \PValue{chapter} +oder \PValue{subsection} als Klon von \PValue{tocline} zu deklarieren und dann +mit \DescRef{\LabelBase.cmd.TOCEntryStyleInitCode} und +\DescRef{\LabelBase.cmd.TOCEntryStyleStartInitCode} abzuändern. Der Stil +\PValue{default} wird von \Class{scrbook} und \Class{scrreprt} neu als Klon +von \PValue{section} und von \Class{scrartcl} als Klon von \PValue{subsection} +deklariert.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{TOCEntryStyleInitCode}\Parameter{Stil}% + \Parameter{Initialisierungscode} + \Macro{TOCEntryStyleStartInitCode}\Parameter{Stil}% + \Parameter{Initialisierungscode} +\end{Declaration} +Jeder\ChangedAt{v3.20}{\Package{tocbasic}} Verzeichniseintragsstil +verfügt über einen Initialisierungscode. Dieser wird immer dann aufgerufen, +wenn einer Verzeichnisebene der entsprechende \PName{Stil} mit +\DescRef{\LabelBase.cmd.DeclareTOCEntryStyle}\IndexCmd{DeclareTOCEntryStyle} +zugewiesen wird. Dieser\textnote{Achtung!} \PName{Initialisierungscode} sollte +keine globalen Seiteneffekte aufweisen, da er auch für lokale +Initialisierungen innerhalb anderer Anweisungen wie +\DescRef{\LabelBase.cmd.DeclareNewTOC}\IndexCmd{DeclareNewTOC} verwendet +wird. Der \PName{Initialisierungscode} dient einerseits dazu, Eigenschaften +für den jeweiligen \PName{Stil} zu definieren. Er setzt aber auch die +Standardeinstellungen für diese Eigenschaften. + +Mit Hilfe der Anweisungen \Macro{TOCEntryStyleStartInitCode} und +\Macro{TOCEntryStyleInitCode} kann der für einen \PName{Stil} bereits +definierte Initialisierungscode um weiteren \PName{Initialisierungscode} +erweitert werden. Dabei fügt \Macro{TOCEntryStyleStartInitCode} den neuen +\PName{Intialisierungscode} vorn an, während \Macro{TOCEntryStyleInitCode} den +\PName{Initialisierungscode} hinten an den vorhandenen Code anfügt. Dies wird +beispielsweise von den \KOMAScript-Klassen verwendet, um für den von +\PValue{tocline} geklonten Stil \PValue{part} Füllung, Schrift und vertikalen +Abstand passend zu initialisieren. +\begin{Example} +Die Klassen \Class{scrbook} und +\Class{scrreprt} verwenden +\begin{lstcode} + \CloneTOCEntryStyle{tocline}{section} + \TOCEntryStyleStartInitCode{section}{% + \expandafter\providecommand% + \csname scr@tso@#1@linefill\endcsname + {\TOCLineLeaderFill\relax}% + } +\end{lstcode} +um den Stil \PValue{section} als abgewandelten Klon von \PValue{tocline} zu +definieren.% +\end{Example}% +\EndIndexGroup +\ExampleEndFix + + +\begin{Declaration} + \Macro{LastTOCLevelWasHigher} + \Macro{LastTOCLevelWasSame} + \Macro{LastTOCLevelWasLower} +\end{Declaration} +Bei\ChangedAt{v3.20}{\Package{tocbasic}} Einträgen im Stil +\PValue{tocline} wird am Anfang abhängig vom Wert von +\Macro{lastpenalty}\IndexCmd{lastpenalty} eine dieser drei Anweisungen +ausgeführt. Dabei fügen \Macro{LastTOCLevelWasHigher} und +\Macro{LastTOCLevelWasSame} im vertikalen Modus +\Macro{addpenalty}\PParameter{\Macro{@lowpenalty}} ein und ermöglichen so +einen Umbruch vor Einträgen gleicher oder übergeordneter +Ebene. \Macro{LastTOCLevelWasLower} ist hingegen bisher leer definiert, so +dass zwischen einem Eintrag und seinem ersten Untereintrag normalerweise ein +Umbruch untersagt ist. + +Anwender sollten diese Anweisungen nicht umdefinieren. Stattdessen können und +sollten Änderungen bei Zuweisung des Stils an eine Eintragsebene gezielt über +die Eigenschaften \PValue{onstartlowerlevel}, \PValue{onstartsamelevel} und +\PValue{onstarthigherlevel} vorgenommen werden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{TOCLineLeaderFill}\OParameter{Füllzeichen} +\end{Declaration} +Die\ChangedAt{v3.20}{\Package{tocbasic}} Anweisung ist dazu gedacht, +als Wert für Eigenschaft \Option{linefill} des Verzeichniseintragsstils +\PName{tocline} verwendet zu werden. Sie erzeugt dann eine Verbindung zwischen +dem Ende des Textes eines Eintrags und der zugehörigen Seitenzahl. Das +\PName{Füllzeichen}, das dazu in regelmäßigem Abstand wiederholt wird, kann +als optionales Argument angegeben werden. Voreinstellung ist ein +Punkt.\textnote{Voreinstellung} + +Wie der Name schon vermuten lässt, werden die Füllzeichen mit Hilfe von +\Macro{leaders} gesetzt. Als Abstand wird wie bei der \LaTeX-Kern-Anweisung +\Macro{@dottedtocline} vor und nach dem Füllzeichen +\Macro{mkern}\Macro{@dotsep}\Unit{\texttt{mu}} verwendet.% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Interne Anweisungen für Klassen- und Paketautoren} +\seclabel{internals} + +Das Paket \Package{tocbasic} bietet einige interne Anweisungen, deren +Benutzung durch Klassen- und Paketautoren freigegeben ist. Diese Anweisungen +beginnen alle mit \Macro{tocbasic@}. Aber\textnote{Achtung!} auch Klassen- und +Paketautoren sollten diese Anweisungen \iffalse nur verwenden und \fi nicht +etwa umdefinieren!\iffalse Ihre interne Funktion kann jederzeit geändert oder +erweitert werden, so dass jede Umdefinierung der Anweisungen die Funktion von +\Package{tocbasic} erheblich beschädigen könnte!\fi% Umbruchkorrektur + + +\begin{Declaration} + \Macro{tocbasic@extend@babel}\Parameter{Dateierweiterung} +\end{Declaration} +Das Paket \Package{babel}\IndexPackage{babel} (siehe \cite{package:babel}) +bzw. ein \LaTeX-Kern, der um die Sprachverwaltung von \Package{babel} +erweitert wurde, schreibt bei jeder Sprachumschaltung am Anfang oder innerhalb +eines Dokuments in die Dateien mit den Dateierweiterungen \File{toc}, +\File{lof} und \File{lot} Anweisungen, um diese Sprachumschaltung in diesen +Dateien mit zu führen. \Package{tocbasic} erweitert diesen Mechanismus so, +dass mit Hilfe von \Macro{tocbasic@extend@babel} auch andere +\PName{Dateierweiterungen} davon profitieren. Das Argument +\PName{Dateierweiterung} sollte dabei vollständig expandiert sein! +Anderenfalls besteht die Gefahr, dass etwa die Bedeutung eines Makros zum +Zeitpunkt der tatsächlichen Auswertung bereits geändert wurde. + +In der Voreinstellung wird diese Anweisung normalerweise für alle +\PName{Dateierweiterungen}, die mit \DescRef{\LabelBase.cmd.addtotoclist} zur +Liste der bekannten Dateierweiterungen hinzugefügt werden, aufgerufen. Über +die Eigenschaft \PValue{nobabel}\important{\PValue{nobabel}} (siehe +\DescRef{\LabelBase.cmd.setuptoc}, \autoref{sec:tocbasic.toc}, +\DescPageRef{\LabelBase.cmd.setuptoc}) kann das unterdrückt werden. Für die +Dateinamenerweiterungen \File{toc}, \File{lof} und \File{lot} unterdrückt +\Package{tocbasic} dies bereits selbst, % +\iftrue% Umbruchvarianten +da \Package{babel} sie von sich aus vornimmt.% +\else% +damit die Umschaltung nicht mehrfach in die zugehörigen Dateien +eingetragen wird.% +\fi +\iffalse% Umbruchkorrektur +Normalerweise gibt es keinen Grund, diese Anweisung selbst aufzurufen. Es sind +allerdings Verzeichnisse denkbar, die nicht unter der Kontrolle von +\Package{tocbasic} stehen, also nicht in der Liste der bekannten +Dateierweiterungen geführt werden, aber trotzdem die Spracherweiterung für +\Package{babel} nutzen sollen. Für derartige Verzeichnisse wäre die Anweisung +explizit aufzurufen. Bitte\textnote{Achtung!} achten Sie jedoch darauf, dass +dies für jede Dateierweiterung nur einmal geschieht!% +\fi +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasic@starttoc}\Parameter{Dateierweiterung} +\end{Declaration} +Diese Anweisung ist der eigentliche Ersatz der Anweisung +\Macro{@starttoc}\IndexCmd{@starttoc}\important{\Macro{@starttoc}} aus dem +\LaTeX-Kern. Es ist die Anweisung, die sich hinter +\DescRef{\LabelBase.cmd.listoftoc*} (siehe \autoref{sec:tocbasic.toc}, +\DescPageRef{\LabelBase.cmd.listoftoc*}) verbirgt. Klassen- oder Paketautoren, +die Vorteile von \Package{tocbasic} nutzen wollen, sollten zumindest diese +Anweisung, besser jedoch \DescRef{\LabelBase.cmd.listoftoc} verwenden. Die +Anweisung baut selbst auf \Macro{@starttoc} auf, setzt allerdings zuvor +\Length{parskip}\IndexLength{parskip}\important[i]{\Length{parskip}, + \Length{parindent}, \Length{parfillskip}} und +\Length{parindent}\IndexLength{parindent} auf 0 und +\Length{parfillskip}\IndexLength{parfillskip} auf 0 bis unendlich. Außerdem +wird \Macro{@currext}\important{\Macro{@currext}}\IndexCmd{@currext} auf die +aktuelle Dateierweiterung gesetzt, damit diese in den nachfolgend ausgeführten +Haken\Index{Haken} ausgewertet werden kann. Die Erklärungen der Haken finden +Sie im Anschluss. + +Da\textnote{Achtung!} \LaTeX{} bei der Ausgabe eines Verzeichnisses auch +gleich eine neue Verzeichnisdatei zum Schreiben öffnet, kann der Aufruf dieser +Anweisung zu einer Fehlermeldung der Art +\begin{lstoutput} + ! No room for a new \write . + \ch@ck ...\else \errmessage {No room for a new #3} + \fi +\end{lstoutput} +führen, wenn keine Schreibdateien mehr zur Verfügung stehen. Abhilfe kann in +diesem Fall das Laden des in \autoref{cha:scrwfile} beschriebenen Pakets +\Package{scrwfile}\important{\Package{scrwfile}}\IndexPackage{scrwfile} +oder die Verwendung von Lua\LaTeX{} bieten.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasic@@before@hook} + \Macro{tocbasic@@after@hook} +\end{Declaration} +Der Haken\Index{Haken} \Macro{tocbasic@@before@hook} wird unmittelbar vor dem +Einlesen der Verzeichnisdatei, noch vor den mit +\DescRef{\LabelBase.cmd.BeforeStartingTOC} definierten Anweisungen +ausgeführt. Es ist erlaubt, diesen Haken mit Hilfe von +\Macro{g@addto@macro}\IndexCmd{g@addto@macro} zu erweitern. + +Ebenso wird \Macro{tocbasic@@after@hook} unmittelbar nach der +Verzeichnisdatei, aber noch vor den mit +\DescRef{\LabelBase.cmd.AfterStartingTOC} definierten Anweisungen +ausgeführt. Es ist erlaubt, diesen Haken mit Hilfe von +\Macro{g@addto@macro}\IndexCmd{g@addto@macro} zu erweitern. + +\KOMAScript{} nutzt diese Haken, um Verzeichnisse mit dynamischer Anpassung an +die Breite der Gliederungsnummern zu ermöglichen. Ihre Verwendung ist Klassen +und Paketen vorbehalten. Anwender\textnote{Achtung!} sollten sich auf +\DescRef{\LabelBase.cmd.BeforeStartingTOC} und +\DescRef{\LabelBase.cmd.AfterStartingTOC} beschränken. Paketautoren sollten +ebenfalls vorzugsweise diese beiden Anwenderanweisungen verwenden! Ausgaben +innerhalb der beiden Haken sind nicht gestattet! + +Wird keine\textnote{Achtung!} der Anweisungen +\DescRef{\LabelBase.cmd.listofeachtoc}, \DescRef{\LabelBase.cmd.listoftoc} und +\DescRef{\LabelBase.cmd.listoftoc*} für die Ausgabe der Verzeichnisse +verwendet, sollten die Anweisungen für die Haken\Index{Haken} trotzdem +aufgerufen werden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tb@\PName{Dateierweiterung}@before@hook} + \Macro{tb@\PName{Dateierweiterung}@after@hook} +\end{Declaration} +Diese Anweisungen werden direkt nach +\DescRef{\LabelBase.cmd.tocbasic@@before@hook} bzw. vor +\DescRef{\LabelBase.cmd.tocbasic@@after@hook} für das jeweilige Verzeichnis +mit der entsprechenden \PName{Dateierweiterung} +ausgeführt. Sie\textnote{Achtung!} dürfen keinesfalls von Klassen- und +Paketautoren verändert werden. Werden für die Ausgabe der Verzeichnisse die +Anweisungen \DescRef{\LabelBase.cmd.listoftoc}, +\DescRef{\LabelBase.cmd.listoftoc*} und \DescRef{\LabelBase.cmd.listofeachtoc} +nicht verwendet, sollten die beiden Anweisungen für die Haken\Index{Haken} +trotzdem aufgerufen werden, soweit sie definiert sind. Die Anweisungen können +auch undefiniert sein.% +\iffalse% Umbruchkorrektur / inzwischen passt auch \@ifundefined +\ Für einen entsprechenden Test siehe +\DescRef{scrbase.cmd.scr@ifundefinedorrelax}\IndexCmd{scr@ifundefinedorrelax} +in \autoref{sec:scrbase.if}, +\DescPageRef{scrbase.cmd.scr@ifundefinedorrelax}.% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasic@listhead}\Parameter{Titel} +\end{Declaration} +Diese Anweisung wird von \DescRef{\LabelBase.cmd.listoftoc} und +\DescRef{\LabelBase.cmd.listofeachtoc} verwendet, um die Anweisung zum Setzen +der Überschrift eines Verzeichnisses aufzurufen. Das kann entweder die +vordefinierte Anweisung des Pakets \Package{tocbasic} oder eine individuelle +Anweisung sein. Wenn Sie Ihre eigene Anweisung für die Überschrift definieren, +können Sie ebenfalls \Macro{tocbasic@listhead} verwenden. In diesem Fall +sollte vor dem Aufruf von \Macro{tocbasic@listhead} die Anweisung +\Macro{@currext}\important{\Macro{@currext}}\IndexCmd{@currext} auf die +Dateinamenerweiterung, die zu diesem Verzeichnis gehört, gesetzt werden.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasic@listhead@\PName{Dateierweiterung}}\Parameter{Titel} +\end{Declaration} +Ist diese individuelle Anweisung für das Setzen einer Verzeichnisüberschrift +definiert, so verwendet \DescRef{\LabelBase.cmd.tocbasic@listhead} +sie. Anderenfalls definiert \DescRef{\LabelBase.cmd.tocbasic@listhead} diese +vor der Verwendung.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasic@addxcontentsline}\Parameter{Dateierweiterung} + \Parameter{Ebene} + \Parameter{Gliederungsnummer} + \Parameter{Eintrag} + \Macro{nonumberline} +\end{Declaration} +Anweisung\ChangedAt{v3.12}{\Package{tocbasic}} +\Macro{tocbasic@addxcontentsline} nimmt einen \PName{Eintrag} der angegebenen +\PName{Ebene} in das über die \PName{Dateierweiterung} spezifizierte +Verzeichnis vor. Ob der Eintrag nummeriert wird\iffree{ oder + nicht}{}% Umbruchvarianten +, hängt davon ab, ob das Argument \PName{Gliederungsnummer} leer ist oder +nicht. Im Falle eines leeren Argument wird dem \PName{Eintrag} ein +\Macro{nonumberline} ohne Argument vorangestellt. Anderenfalls wird wie +gewohnt \DescRef{\LabelBase.cmd.numberline} mit \PName{Gliederungsnummer} als +Argument verwendet. + +Die Anweisung \Macro{nonumberline} wird innerhalb +\DescRef{\LabelBase.cmd.listoftoc} (siehe \autoref{sec:tocbasic.toc}, +\DescPageRef{\LabelBase.cmd.listoftoc}) entsprechend der Eigenschaft +\PValue{numberline} (siehe \autoref{sec:tocbasic.toc}, +\DescPageRef{\LabelBase.cmd.setuptoc}) umdefiniert. Dadurch wirkt sich das +Setzen oder Löschen dieser Eigenschaft \iffree{bereits beim nächsten + \LaTeX-Lauf}{unmittelbar} % Umbruchvarianten +aus.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasic@DependOnPenaltyAndTOCLevel}\Parameter{Eintragsebene} + \Macro{tocbasic@SetPenaltyByTOCLevel}\Parameter{Eintragsebene} +\end{Declaration} +Der\ChangedAt{v3.20}{\Package{tocbasic}} Verzeichniseintragsstil +\PValue{tocline} (siehe \autoref{sec:tocbasic.tocstyle}) setzt am Ende jedes +Eintrags über \Macro{tocbasic@SetPenaltyByTOCLevel} \Macro{penalty} so, dass +nach einem Eintrag kein Seitenumbruch erfolgen darf. Der genaue Wert wird +dabei abhängig von der \PName{Eintragsebene} gewählt. + +% \begin{sloppypar} +\begingroup% +\emergencystretch=2em\relax% +Über \Macro{tocbasic@DependOnPenaltyAndTOCLevel} wird am Anfang eines +Eintrags, abhängig von \Macro{lastpenalty} und \PName{Eintragsebene}, die über +die Eigenschaft \Option{onstartlowerlevel} im internen Makro +\Macro{scr@tso@\PName{Eintragsebene}@LastTOCLevelWasHigher}, über die +Eigenschaft \Option{onstartsamelevel} im zugehörigen, internen Makro +\Macro{scr@tso@\PName{Eintragsebene}@LastTOCLevelWasSame} oder über die +Eigenschaft \Option{onstarthigherlevel} im zugehörigen, internen Makro +\Macro{scr@tso@\PName{Eintragsebene}@LastTOCLevelWasLower} gespeicherte Aktion +ausgeführt. In der Voreinstellung\textnote{Voreinstellung} erlauben die ersten +beiden einen Umbruch, wenn sie im vertikalen Modus ausgeführt werden.\par% +\endgroup +%\end{sloppypar} + +Entwicklern, die eigene Stile kompatibel mit \PValue{tocline} erstellen +wollen, sei empfohlen, dieses Verhalten zu kopieren. Zu diesem Zweck dürfen +sie auf diese eigentlich internen Makros zurückgreifen.% +\EndIndexGroup + + +\section{Ein komplettes Beispiel} +\seclabel{example} + +In diesem Abschnitt finden Sie ein komplettes Beispiel, wie eine eigene +Gleitumgebung einschließlich Verzeichnis und \KOMAScript-Integration mit Hilfe +von \Package{tocbasic} definiert werden kann. In diesem Beispiel werden +interne Anweisungen, also solche mit »\texttt{@}« im Namen +verwendet. Das\textnote{Achtung!} bedeutet, dass die Anweisungen entweder in +einem eigenen Paket, einer Klasse oder zwischen +\Macro{makeatletter}\important[i]{\Macro{makeatletter}\\\Macro{makeatother}}% +\IndexCmd{makeatletter} und \Macro{makeatother}\IndexCmd{makeatother} +verwendet werden müssen. + +Als\textnote{Umgebung} erstes wird eine Umgebung benötigt, die diese neue +Gleitumgebung \iftrue% Umbruchkorrektur (siehe auch nach dem Code) +namens \Environment{remarkbox} bereitstellt:% +\else% +bereitstellt. Das geht ganz einfach mit:% +\fi% +\begin{lstcode} + \newenvironment{remarkbox}% + {\@float{remarkbox}}% + {\end@float} +\end{lstcode} +\iffalse Die neue Umgebung heißt also \Environment{remarkbox}.\fi % siehe oben + +Jede\textnote{Platzierung} Gleitumgebung hat eine Standardplatzierung. Diese +setzt sich aus einer oder mehreren der bekannten Platzierungsoptionen +\PValue{b}, \PValue{h}, \PValue{p} und \PValue{t} zusammen: +\begin{lstcode} + \newcommand*{\fps@remarkbox}{tbp} +\end{lstcode} +Die neue Gleitumgebung soll also in der Voreinstellung nur oben, unten oder +auf einer eigenen Seite platziert werden dürfen. + +Gleitumgebungen\textnote{Gleittyp} haben außerdem einen numerischen Gleittyp +zwischen 1 und 31. Umgebungen, bei denen das gleiche Bit +im Gleittyp gesetzt ist, dürfen sich nicht gegenseitig überholen. Abbildungen +und Tabellen haben normalerweise den Typ~1 und 2. Abbildungen dürfen also +Tabellen überholen und umgekehrt. +\begin{lstcode} + \newcommand*{\ftype@remarkbox}{4} +\end{lstcode} +Die neue Umgebung hat den Typ~4, darf also Tabellen und Abbildungen überholen +und von diesen überholt werden. + +Gleitumgebungen\textnote{Nummer} haben außerdem eine Nummer. +\begin{lstcode} + \newcounter{remarkbox} + \newcommand*{\remarkboxformat}{% + Merksatz~\theremarkbox\csname autodot\endcsname + } + \newcommand*{\fnum@remarkbox}{\remarkboxformat} +\end{lstcode} +Hier wird zunächst ein neuer Zähler definiert, der unabhängig von Kapiteln +oder sonstigen Gliederungszählern ist. Dabei definiert \LaTeX{} auch gleich +\Macro{theremarkbox} mit der Standardausgabe als arabische Zahl. Diese wird +dann in der Definition der formatierten Ausgabe verwendet. Die formatierte +Ausgabe wird wiederum als Gleitumgebungsnummer für die Verwendung in +\DescRef{maincls.cmd.caption} definiert. + +Gleitumgebungen\textnote{Dateierweiterung} haben Verzeichnisse und diese haben +eine Datei mit dem Namen \Macro{jobname} und einer Dateierweiterung. +\begin{lstcode} + \newcommand*{\ext@remarkbox}{lor} +\end{lstcode} +Als Dateierweiterung verwenden wir also »\File{lor}«. + +Die\important{\Package{tocbasic}} Umgebung selbst steht damit. Es fehlt +allerdings das Verzeichnis. Damit wir dabei möglichst wenig selbst machen +müssen, verwenden wir das Paket \Package{tocbasic}. Dieses wird in Dokumenten +mit +\begin{lstcode} + \usepackage{tocbasic} +\end{lstcode} +geladen. Ein Klassen- oder Paketautor würde hingegen +\begin{lstcode} + \RequirePackage{tocbasic} +\end{lstcode} +verwenden. + +Nun\textnote{Dateierweiterung} machen wir die neue Dateierweiterung dem Paket +\Package{tocbasic} bekannt. +\begin{lstcode} + \addtotoclist[float]{lor} +\end{lstcode} +Dabei verwenden wir als Besitzer \PValue{float}. Damit beziehen sich +automatisch alle Optionen, die von den \KOMAScript-Klassen für Verzeichnisse +von Gleitumgebungen angeboten werden, auch auf das neue Verzeichnis. + +Jetzt\textnote{Verzeichnistitel} definieren wir noch einen Titel für dieses +Verzeichnis: +\begin{lstcode} + \newcommand*{\listoflorname}{Verzeichnis der Merksätze} +\end{lstcode} +Normalerweise würde man in einem Paket übrigens zunächst einen englischen +Titel definieren und dann beispielsweise mit Hilfe des Pakets +\Package{scrbase} Titel für alle weiteren Sprachen, die man unterstützen +will. Siehe dazu \autoref{sec:scrbase.languageSupport}, ab +\autopageref{sec:scrbase.languageSupport}. + +Jetzt\textnote{Verzeichniseintrag}\index{Verzeichnis>Eintrag} müssen wir nur +noch definieren, wie ein einzelner Eintrag in dem Verzeichnis aussehen soll: +\begin{lstcode} + \newcommand*{\l@remarkbox}{\l@figure} +\end{lstcode} +Weil das die einfachste Lösung ist, wurde hier festgelegt, dass Einträge in +das Verzeichnis der Merksätze genau wie Einträge in das Abbildungsverzeichnis +aussehen sollen. Man hätte stattdessen auch die Einstellungen selbst kopieren +können: +\begin{lstcode} + \DeclareTOCStyleEntry[level:=figure,% + indent:=figure,% + numwidth:=figure]% + {tocline}{remarkbox} +\end{lstcode} +Selbstverständlich wären auch explizite Festlegungen möglich: +\begin{lstcode} + \DeclareTOCStyleEntry[level=1,% + indent=1.5em,% + numwidth=2.3em]% + {tocline}{remarkbox} +\end{lstcode} + +Außerdem\textnote{Kapiteleintrag} wollen Sie, dass sich Kapiteleinträge auf das +Verzeichnis auswirken. +\begin{lstcode} + \setuptoc{lor}{chapteratlist} +\end{lstcode} +Das Setzen dieser Eigenschaft ermöglicht dies bei Verwendung einer +\KOMAScript-Klasse und jeder anderen Klasse, die diese Eigenschaft +unterstützt. Leider gehören die Standardklassen nicht dazu. + +Das\textnote{Verzeichnis} genügt schon. Der Anwender kann nun bereits +wahlweise mit Hilfe der Optionen einer \KOMAScript-Klasse oder +\DescRef{\LabelBase.cmd.setuptoc} verschiedene Formen der Überschrift (ohne +Inhaltsverzeichniseintrag, mit Inhaltsverzeichniseintrag, mit Nummerierung) +wählen und das Verzeichnis mit +\DescRef{\LabelBase.cmd.listoftoc}\PParameter{lor} ausgeben. Mit einem +schlichten +\begin{lstcode} + \newcommand*{\listofremarkboxes}{\listoftoc{lor}} +\end{lstcode} +kann man die Anwendung noch etwas vereinfachen. + +Wie Sie gesehen haben, beziehen sich gerade einmal fünf einzeilige +Anweisungen, von denen nur drei bis vier wirklich notwendig sind, auf das +Verzeichnis selbst. Trotzdem bietet dieses Verzeichnis bereits die +Möglichkeit, es zu nummerieren oder auch nicht nummeriert in das +Inhaltsverzeichnis aufzunehmen. Es kann sogar per Eigenschaft bereits eine +tiefere Gliederungsebene gewählt werden. Kolumnentitel werden für \KOMAScript, +die Standardklassen und alle Klassen, die \Package{tocbasic} explizit +unterstützen, angepasst gesetzt. Unterstützende Klassen beachten das neue +Verzeichnis sogar beim Wechsel zu einem neuen Kapitel. Sprachumschaltungen +durch \Package{babel} werden in dem Verzeichnis ebenfalls berücksichtigt. + +Natürlich\textnote{Verzeichniseigenschaften} kann ein Paketautor weiteres +hinzufügen. So könnte er explizit Optionen anbieten, um die Verwendung von +\DescRef{\LabelBase.cmd.setuptoc} vor dem Anwender zu verbergen. Andererseits +kann er auch auf diese Anleitung zu \Package{tocbasic} verweisen, wenn es +darum geht, die entsprechenden Möglichkeiten zu erklären. Vorteil ist dann, +dass der Anwender automatisch von etwaigen zukünftigen Erweiterungen von +\Package{tocbasic} profitiert. Soll der Anwender aber nicht mit der Tatsache +belastet werden, dass für die Merksätze die Dateierweiterung \File{lor} +verwendet wird, so genügt +\begin{lstcode} + \newcommand*{\setupremarkboxes}{\setuptoc{lor}} +\end{lstcode} +\iftrue% Umbruchkorrektur +um eine als Argument an \Macro{setupremarkboxes} übergebene Liste von +Eigenschaften direkt als Liste von % +\else% +um über \Macro{setupremarkboxes} +\fi +Eigenschaften für \File{lor} zu setzen. + + +\section{Alles mit einer Anweisung} +\seclabel{declarenewtoc} + +Das Beispiel aus dem vorherigen Abschnitt hat gezeigt, dass es mit mit +\Package{tocbasic} recht einfach ist, eigene Gleitumgebungen mit eigenen +Verzeichnissen zu definieren. In diesem Abschnitt wird gezeigt, dass es sogar +noch einfacher gehen kann. + +\begin{Declaration} + \Macro{DeclareNewTOC}\OParameter{Optionenliste} + \Parameter{Dateierweiterung} +\end{Declaration}% +Mit\ChangedAt{v3.06}{\Package{tocbasic}} dieser Anweisung wird in einem +einzigen Schritt ein neues Verzeichnis, dessen Überschrift und die Bezeichnung +für die Einträge unter Kontrolle von \Package{tocbasic} definiert. Optional +können dabei gleichzeitig gleitende oder nicht gleitende Umgebungen definiert +werden, innerhalb derer \DescRef{maincls.cmd.caption}% +\important{\DescRef{maincls.cmd.caption}}\IndexCmd{caption} Einträge für +dieses neue Verzeichnis erzeugt. Auch die Erweiterungen +\DescRef{maincls.cmd.captionabove}\important[i]{% + \DescRef{maincls.cmd.captionabove}\\ + \DescRef{maincls.cmd.captionbelow}}, \DescRef{maincls.cmd.captionbelow} und +\DescRef{maincls.env.captionbeside} aus den \KOMAScript-Klassen (siehe +\autoref{sec:maincls.floats}, ab \DescPageRef{maincls.cmd.captionabove}) +können dann verwendet werden. + +\PName{Dateierweiterung} definiert dabei die Dateiendung der Hilfsdatei, die +das Verzeichnis repräsentiert, wie dies in \autoref{sec:tocbasic.basics}, ab +\autopageref{sec:tocbasic.basics} bereits erläutert +wurde. Dieser\textnote{Achtung!} Parameter muss angegeben werden und darf +nicht leer sein! + +\PName{Optionenliste} ist eine durch Komma getrennte Liste, wie dies auch von +\DescRef{maincls.cmd.KOMAoptions} (siehe \autoref{sec:typearea.options}, +\DescPageRef{typearea.cmd.KOMAoptions}) bekannt ist. Diese +Optionen\textnote{Achtung!} können jedoch \emph{nicht} mit +\DescRef{maincls.cmd.KOMAoptions}\IndexCmd{KOMAoptions} gesetzt werden! Eine +Übersicht über die möglichen Optionen bietet +\autoref{tab:tocbasic.DeclareNewTOC-options}\iffalse ab +\autopageref{tab:tocbasic.DeclareNewTOC-options}\fi. + +Wird\ChangedAt{v3.20}{\Package{tocbasic}} Option +\Option{tocentrystyle} nicht gesetzt, so wird bei Bedarf der Stil +\PValue{default} verwendet. Näheres zu diesem Stil ist +\autoref{sec:tocbasic.tocstyle} zu entnehmen. Soll kein Befehl für +Verzeichniseinträge definiert werden, so kann ein leeres Argument, also +wahlweise \OptionValue{tocentrystyle}{}\iffree{}{\unskip} oder +\OptionValue{tocentrystyle}{\PParameter{}} verwendet werden. + +Abhängig\ChangedAt{v3.21}{\Package{tocbasic}} vom Stil der +Verzeichniseinträge können auch alle für diesen Stil gültigen Eigenschaften +gesetzt werden, indem die entsprechenden in +\autoref{tab:tocbasic.tocstyle.attributes} ab +\autopageref{tab:tocbasic.tocstyle.attributes} aufgeführten Namen, mit dem +Präfix \PValue{tocentry} versehen, in der \PName{Optionenliste} angegeben +werden. Nachträgliche Änderungen am Stil sind mit +\DescRef{\LabelBase.cmd.DeclareTOCStyleEntry}% +\IndexCmd{DeclareTOCStyleEntry}% +\important{\DescRef{\LabelBase.cmd.DeclareTOCStyleEntry}} jederzeit +möglich. Siehe dazu \autoref{sec:tocbasic.tocstyle}, +\DescPageRef{\LabelBase.cmd.DeclareTOCStyleEntry}. + +% Umbruchoptimierung: Tabelle verschoben. +\begin{desclist} + \renewcommand*{\abovecaptionskipcorrection}{-\normalbaselineskip}% + \desccaption[{% + Optionen für die Anweisung \Macro{DeclareNewTOC}% + }]{% + Optionen für die Anweisung + \Macro{DeclareNewTOC}\ChangedAt{v3.06}{\Package{tocbasic}}% + \label{tab:tocbasic.DeclareNewTOC-options}% + }{% + Optionen für die Anweisung \Macro{DeclareNewTOC} (\emph{Fortsetzung})% + }% + \entry{\OptionVName{atbegin}{Code}\ChangedAt{v3.09}{\Package{tocbasic}}}{% + Falls eine neue Gleitumgebung oder nicht gleitende Umgebung definiert + wird, so wird \PName{Code} jeweils am Anfang dieser Umgebung ausgeführt.% + }% + \entry{\OptionVName{atend}{Code}\ChangedAt{v3.09}{\Package{tocbasic}}}{% + Falls eine neue Gleitumgebung oder nicht gleitende Umgebung definiert + wird, so wird \PName{Code} jeweils am Ende dieser Umgebung ausgeführt.% + }% + \entry{\OptionVName{category}{Kategorie}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + Diese Option kann als Synonym für \OptionVName{owner}{Besitzer} verwendet + werden.}% + \entry{\OptionVName{counterwithin}{\LaTeX-Zähler}}{% + Falls eine neue Gleitumgebung oder eine nicht gleitende Umgebung definiert + wird, so wird für diese auch ein neuer Zähler + \Counter{\PName{Eintragstyp}} (siehe Option \Option{type}) + angelegt. Dieser Zähler kann, in gleicher Weise wie beispielsweise der + Zähler \Counter{figure} bei \Class{book}-Klassen von Zähler + \Counter{chapter} abhängt, von einem \PName{\LaTeX-Zähler} abhängig gemacht + werden. Eine\ChangedAt{v3.35}{\Package{tocbasic}} Einstellung + \OptionValue{counterwithin}{chapter} wird bei Klassen mit + \DescRef{maincls.cmd.chapter}\IndexCmd{chapter} jedoch nur im Hauptteil + (siehe \DescRef{maincls.cmd.frontmatter}\IndexCmd{frontmatter}, + \DescRef{maincls.cmd.mainmatter} und + \DescRef{maincls.cmd.backmatter}\IndexCmd{backmatter} in + \autoref{sec:maincls.separation}, \DescPageRef{maincls.cmd.frontmatter}) + und nur dann beachtet, wenn der Zähler + \Counter{chapter}\IndexCounter{chapter} bei der Ausgabe größer als Null + ist. Bei Klassen ohne \DescRef{maincls.cmd.chapter} gilt dies entsprechend + für die Einstellung \OptionValue{counterwithin}{section} und Zähler + \Counter{section}\IndexCounter{section}\IndexCmd{section}.% + }% + \entry{\Option{float}}{% + Es wird nicht nur ein neuer Verzeichnistyp definiert, sondern auch + Gleitumgebungen \Environment{\PName{Eintragstyp}} (siehe Option + \Option{type}) und \Environment{\PName{Eintragstyp}*} + (vgl. \Environment{figure} und \Environment{figure*}).}% + \entry{\OptionVName{floatpos}{Gleitverhalten}}{% + Jede Gleitumgebung hat ein voreingestelltes \PName{Gleitverhalten}, das + über das optionale Argument der Gleitumgebung geändert werden kann. Mit + dieser Option wird das \PName{Gleitverhalten} für die optional erstellbare + Gleitumgebung (siehe Option \Option{float}) festgelegt. Die Syntax und + Semantik sind dabei mit der des optionalen Arguments für die Gleitumgebung + identisch. Wird die Option nicht verwendet, so ist das voreingestellte + Gleitverhalten \texttt{tbp}, also \emph{top}, \emph{bottom}, + \emph{page}.}% + \entry{\OptionVName{floattype}{Gleittyp}}{% + Jede Gleitumgebung hat einen numerischen Typ. Gleitumgebungen, bei denen + in diesem \PName{Gleittyp} nur unterschiedliche Bits gesetzt sind, können + sich gegenseitig überholen. Die Gleitumgebungen \Environment{figure} und + \Environment{table} haben normalerweise die Typen 1 und 2, können sich + also gegenseitig überholen. Es sind Typen von 1 bis 31 (alle Bits gesetzt, + kann also keinen anderen Typ überholen und von keinem anderen Typen + überholt werden) zulässig. Wird kein Typ angegeben, so wird mit 16 der + höchst mögliche Ein-Bit-Typ verwendet.}% + \entry{\Option{forcenames}}{% + Siehe Option \Option{name} und \Option{listname}.}% + \entry{\OptionVName{hang}{Einzug}}{% + \ChangedAt{v3.20}{\Package{tocbasic}}% + \ChangedAt{v3.21}{\Package{tocbasic}}% + Diese Option gilt seit \KOMAScript~3.20 als überholt. Die Breite der + Nummer des Verzeichniseintrags\index{Verzeichnis>Eintrag} ist nun + stattdessen als Eigenschaft in Abhängigkeit des Verzeichniseintragsstils + von Option \Option{tocentrystyle} anzugeben. Bei den Stilen von + \KOMAScript{} wäre das beispielsweise die Eigenschaft \PValue{numwidth} + und damit Option \Option{tocentrynumwidth}. Besitzt ein Stil diese + Eigenschaft, so wird sie von \Macro{DeclareNewTOC} mit 1,5\Unit{em} + voreingestellt. Diese Voreinstellung kann durch explizite Angabe von + \OptionVName{tocentrynumwidth}{Wert} leicht mit einem anderen \PName{Wert} + überschrieben werden. Für Abbildungen verwenden die \KOMAScript-Klassen + beispielsweise den \PName{Wert} \PValue{2.3em}.}% + \entry{\OptionVName{indent}{Einzug}}{% + \ChangedAt{v3.20}{\Package{tocbasic}}% + \ChangedAt{v3.21}{\Package{tocbasic}}% + Diese Option gilt seit \KOMAScript~3.20 als überholt. Der Einzug des + Verzeichniseintrags\index{Verzeichnis>Eintrag} von links ist nun + stattdessen als Eigenschaft in Abhängigkeit des Verzeichniseintragsstils + von Option \Option{tocentrystyle} anzugeben. Bei den Stilen von + \KOMAScript{} wäre das beispielsweise die Eigenschaft \PValue{indent} und + damit Option \Option{tocentryindent}. Besitzt ein Stil diese Eigenschaft, + so wird sie von \Macro{DeclareNewTOC} mit 1\Unit{em} voreingestellt. Diese + Voreinstellung kann durch explizite Angabe von + \OptionVName{tocentryindent}{Wert} leicht mit einem anderen \PName{Wert} + überschrieben werden. Für Abbildungen verwenden die \KOMAScript-Klassen + beispielsweise den \PName{Wert} \PValue{1.5em}.}% + \entry{\OptionVName{level}{Gliederungsebene}}{% + \ChangedAt{v3.20}{\Package{tocbasic}}% + \ChangedAt{v3.21}{\Package{tocbasic}}% + Diese Option gilt seit \KOMAScript~3.20 als überholt. Der numerische Wert + der Ebene des Verzeichniseintrags\index{Verzeichnis>Eintrag} ist nun + stattdessen als Eigenschaft in Abhängigkeit des Verzeichniseintragsstils + von Option \Option{tocentrystyle} anzugeben. Nichtsdestotrotz haben alle + Stile die Eigenschaft \PValue{level} und damit Option + \Option{tocentrylevel}. Die Eigenschaft wird von \Macro{DeclareNewTOC} mit + 1 voreingestellt. Diese Voreinstellung kann durch explizite Angabe von + \OptionVName{tocentrylevel}{Wert} leicht mit einem anderen \PName{Wert} + überschrieben werden.}% + \entry{\OptionVName{listname}{Verzeichnistitel}}{% + Jedes Verzeichnis hat eine Überschrift, die durch diese Option bestimmt + werden kann. Ist die Option nicht angegeben, so wird als Verzeichnistitel + »\texttt{List of \PName{Mehrzahl des Eintragstyps}}« (siehe Option + \Option{types}) verwendet, wobei das erste Zeichen der \PName{Mehrzahl des + Eintragstyps} in einen Großbuchstaben gewandelt wird. Es wird auch ein + Makro \Macro{list\PName{Eintragstyp}name} mit diesem Wert definiert, der + jederzeit geändert werden kann. Dieses Makro wird jedoch nur definiert, + wenn es nicht bereits definiert ist oder zusätzlich Option + \Option{forcenames} gesetzt ist.}% + \entry{\OptionVName{name}{Eintragsname}}{% + Sowohl als optionaler Präfix für die Einträge im Verzeichnis als auch für + die Beschriftung in einer Gleitumgebung (siehe Option \Option{float}) oder + einer nicht gleitenden Umgebung (siehe Option \Option{nonfloat}) wird ein + Name benötigt. Ohne diese Option wird als \PName{Eintragsname} der + \PName{Eintragstyp} (siehe Option \Option{type}) verwendet, bei dem das + erste Zeichen in einen Großbuchstaben gewandelt wird. Es wird auch ein + Makro \Macro{\PName{Eintragstyp}name} mit diesem Wert definiert, der + jederzeit geändert werden kann. Dieses Makro wird jedoch nur definiert, + wenn es nicht bereits definiert ist oder zusätzlich Option + \Option{forcenames} gesetzt ist.}% + \entry{\Option{nonfloat}}{% + Es wird nicht nur ein neuer Verzeichnistyp definiert, sondern auch eine + nicht gleitende Umgebungen \Environment{\PName{Eintragstyp}-} (siehe + Option \Option{type}), die ähnlich wie eine Gleitumgebung verwendet werden + kann, jedoch nicht gleitet und auch nicht die Grenzen der Umgebung, in der + sie verwendet wird, durchbricht.}% + \entry{\OptionVName{owner}{Besitzer}}{% + Jedes neue Verzeichnis hat bei \Package{tocbasic} einen Besitzer (siehe + \autoref{sec:tocbasic.basics}). Dieser kann hier angegeben werden. Ist + kein \PName{Besitzer} angegeben, so wird als \PName{Besitzer} die + Kategorie »\PValue{float}« verwendet, die auch von den \KOMAScript-Klassen + für das Abbildungs- und das Tabellenverzeichnis verwendet wird.}% + \entry{\OptionVName{setup}{Liste von Eigenschaften}}{% + \ChangedAt{v3.25}{\Package{tocbasic}}% + Die \PName{Liste von Eigenschaften} wird via + \DescRef{\LabelBase.cmd.setuptoc} gesetzt. Es wird darauf hingewiesen, + dass für die Angabe mehrerer durch Komma getrennter Eigenschaften die + \PName{Liste von Eigenschaften} in geschweifte Klammern gesetzt werden + muss.% + }% + \entry{\OptionVName{tocentrystyle}{Eintragsstil}}{% + \ChangedAt{v3.20}{\Package{tocbasic}}% + \PName{Eintragsstil} gibt den Stil an, den Einträge in das entsprechende + Verzeichnis haben sollen. Der Name der Eintragsebene wird dabei über + Option \Option{type} bestimmt. Zusätzlich zu den Optionen dieser Tabelle + können auch alle Eigenschaften des Stils als Optionen angegeben werden, + indem die Namen der Eigenschaften mit dem Präfix \PValue{tocentry} ergänzt + werden. So kann der numerische Wert der Ebene beispielsweise als + \Option{tocentrylevel} angegeben werden. Näheres zu den Stilen ist + \autoref{sec:tocbasic.tocstyle} ab \autopageref{sec:tocbasic.tocstyle} zu + entnehmen.% + }% + \entry{\OptionVName{tocentry\PName{Stiloption}}{Wert}}{% + \ChangedAt{v3.20}{\Package{tocbasic}}% + Weitere Optionen in Abhängigkeit vom via \Option{tocentrystyle} gewählten + \PName{Eintragsstil}. Siehe dazu \autoref{sec:tocbasic.tocstyle} ab + \autopageref{sec:tocbasic.tocstyle}. Für die von \Package{tocbasic} + vordefinierten Verzeichniseintragsstile finden sich die als + \PName{Stiloption} verwendbaren Attribute in + \autoref{tab:tocbasic.tocstyle.attributes}, ab + \autopageref{tab:tocbasic.tocstyle.attributes}.% + }% + \entry{\OptionVName{type}{Eintragstyp}}{% + \PName{Eintragstyp} gibt den Typ der Einträge in das entsprechende + Verzeichnis an. Der Typ wird auch als Basisname für verschiedene Makros + und gegebenenfalls Umgebungen und Zähler verwendet. Er sollte daher nur + aus Buchstaben bestehen. Wird diese Option nicht verwendet, so wird für + \PName{Eintragstyp} die \PName{Dateierweiterung} aus dem obligatorischen + Argument verwendet.}% + \entry{\OptionVName{types}{Mehrzahl des Eintragstyps}}{% + An verschiedenen Stellen wird auch die Mehrzahlform des Eintragstyps + verwendet, beispielsweise um eine Anweisung \Macro{listof\PName{Mehrzahl + des Eintragstyps}} zu definieren. Wird diese Option nicht verwendet, + so wird als \PName{Mehrzahl des Eintragstyps} der Wert von \Option{type} + mit angehängtem »s« verwendet.}% + \entry{\OptionVName{unset}{Liste von Eigenschaften}}{% + \ChangedAt{v3.25}{\Package{tocbasic}}% + Die \PName{Liste von Eigenschaften} wird via + \DescRef{\LabelBase.cmd.unsettoc} aufgehoben. Es wird darauf hingewiesen, + dass für die Angabe mehrerer durch Komma getrennter Eigenschaften die + \PName{Liste von Eigenschaften} in geschweifte Klammern gesetzt werden + muss.% + }% +\end{desclist} + +\begin{Example} + Das Beispiel aus \autoref{sec:tocbasic.example} kann mit Hilfe der neuen + Anweisung deutlich verkürzt werden: +\begin{lstcode} + \DeclareNewTOC[% + type=remarkbox,% + types=remarkboxes,% + float,% Gleitumgebungen sollen definiert werden. + floattype=4,% + name=Merksatz,% + listname={Verzeichnis der Merks\"atze}% + ]{lor} + \setuptoc{lor}{chapteratlist} +\end{lstcode} + Neben den Umgebungen \Environment{remarkbox} und \Environment{remarkbox*} + sind damit auch der Zähler \Counter{remarkbox}, die zur Ausgabe gehörenden + Anweisungen \Macro{theremarkbox}, \Macro{remarkboxname} und + \Macro{remarkboxformat}, die für das Verzeichnis benötigten + \Macro{listremarkboxname} und \Macro{listofremarkboxes} % + \iffalse % Umbruchkorrektur + sowie einige intern verwendete Anweisungen mit Bezug auf % + \else% + und einige interne Anweisunen für % + \fi% + die Dateiendung \File{lor} definiert. Soll der Gleitumgebungstyp dem Paket + überlassen werden, so kann Option \Option{floattype} \iffalse im Beispiel \fi + entfallen. Wird zusätzlich die Option \Option{nonfloat} angegeben, wird + außerdem eine nicht gleitende Umgebung \Environment{remarkbox-} definiert, + in der ebenfalls \DescRef{maincls.cmd.caption}\IndexCmd{caption} verwendet + werden kann. + + Zum besseren Verständnis zeigt \autoref{tab:tocbasic.comparison} eine + Gegenüberstellung der Anweisungen und Umgebungen für die neu erstellte + Beispielumgebung \Environment{remarkbox} mit den entsprechenden Befehlen und + Umgebungen für Abbildungen.% + \begin{table} + \centering + \caption{Gegenüberstellung von Beispielumgebung \Environment{remarkbox} + und Umgebung \Environment{figure}} + \label{tab:tocbasic.comparison} + \begin{tabularx}{\textwidth}{l@{\hskip\tabcolsep}l@{\hskip\tabcolsep}>{\raggedright}p{7em}@{\hskip\tabcolsep}X} + \toprule + \begin{tabular}[t]{@{}l@{}} + Umgebung\\ + \Environment{remarkbox} + \end{tabular} + & \begin{tabular}[t]{@{}l@{}} + Umgebung\\ + \Environment{figure} + \end{tabular} + & Optionen von \Macro{DeclareNewTOC} & Kurzbeschreibung \\[1ex] + \midrule + \Environment{remarkbox} & \Environment{figure} + & \Option{type}, \Option{float} + & Gleitumgebung des jeweiligen Typs.\\[1ex] + \Environment{remarkbox*} & \Environment{figure*} + & \Option{type}, \Option{float} + & spaltenübergreifende Gleitumgebung des jeweiligen Typs \\[1ex] + \Counter{remarkbox} & \Counter{figure} + & \Option{type}, \Option{float} + & Zähler, der von \DescRef{maincls.cmd.caption} verwendet wird \\[1ex] + \Macro{theremarkbox} & \Macro{thefigure} + & \Option{type}, \Option{float} + & Anweisung zur Ausgabe des jeweiligen Zählers \\[1ex] + \Macro{remarkboxformat} & \DescRef{maincls.cmd.figureformat} + & \Option{type}, \Option{float} + & Anweisung zur Formatierung des jeweiligen Zählers in der Ausgabe von + \DescRef{maincls.cmd.caption}\\[1ex] + \Macro{remarkboxname} & \Macro{figurename} + & \Option{type}, \Option{float}, \Option{name} + & Name, der im Label von \DescRef{maincls.cmd.caption} verwendet + wird\\[1ex] + \Macro{listofremarkboxes} & \DescRef{maincls.cmd.listoffigures} + & \Option{types}, \Option{float} + & Anweisung zur Ausgabe des jeweiligen Verzeichnisses \\[1ex] + \Macro{listremarkboxname} & \Macro{listfigurename} + & \Option{type}, \Option{float}, \Option{listname} + & Überschrift des jeweiligen Verzeichnisses \\[1ex] + \Macro{fps@remarkbox} & \Macro{fps@figure} + & \Option{type}, \Option{float}, \Option{floattype} + & numerischer Gleitumgebungstyp zwecks + Reihen\-fol\-gen\-erhalts\\[1ex] + \File{lor} & \File{lof} + & + & Dateiendung der Hilfsdatei für das jeweilige Verzeichnis \\ + \bottomrule + \end{tabularx} + \end{table} + + Und hier nun eine mögliche Verwendung der Umgebung: +\begin{lstcode} + \begin{remarkbox} + \centering + Gleiches sollte immer auf gleiche Weise und + mit gleichem Aussehen gesetzt werden. + \caption{Erster Hauptsatz der Typografie} + \label{rem:typo1} + \end{remarkbox} +\end{lstcode} + Ein Ausschnitt aus einer Beispielseite mit dieser Umgebung könnte dann so + aussehen: + \begin{center}\footnotesize + \begin{tabular} + {|!{\hspace{.1\linewidth}}p{.55\linewidth}!{\hspace{.1\linewidth}}|} + \\ + \centering + Gleiches sollte immer auf gleiche Weise und + mit gleichem Aussehen gesetzt werden.\\[\abovecaptionskip] + {% + \usekomafont{caption}\footnotesize + \begin{tabularx}{\hsize}[t]{@{}l@{ }X@{}} + \usekomafont{captionlabel}{Merksatz 1:} & + Erster Hauptsatz der Typografie%\\ + \end{tabularx}% + }% + \\ + \end{tabular}% + \end{center}% +\end{Example}% + +Benutzer von +\Package{hyperref}\IndexPackage{hyperref}\important{\Package{hyperref}} +sollten Option \Option{listname} übrigens immer angeben. Anderenfalls kommt es +in der Regel zu einer Fehlermeldung, weil \Package{hyperref} nicht mit dem +\Macro{MakeUppercase}\IndexCmd{MakeUppercase} im Namen des Verzeichnisses +zurecht kommt, das benötigt wird, um den ersten Buchstaben des Wertes von +\Option{types} in Großbuchstaben zu wandeln.% +\EndIndexGroup% + +\section{Obsolete Befehle} +\seclabel{obsolete} + +Frühere Versionen von \Package{tocbasic} verfügten über Befehle, +die aufgrund von Äußerungen von Mitgliedern des \LaTeX-Project-Teams umbenannt +wurden. Diese veralteten Befehle sollten nicht mehr verwendet werden. + +\LoadNonFree{tocbasic}{0}% +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Verzeichnisdatei Klonquelle Absatzabstandes Absatzabstand +% LocalWords: Verzeichniseinträge Verzeichniseintrag Eintragsstile +% LocalWords: Inhaltsverzeichniseinträge Standardklassen Nummernbreite +% LocalWords: Standardeigenschaft Eintragsebene Optionenliste expandierbar +% LocalWords: Standardverzeichniseintragsstil Verzeichniseigenschaften +% LocalWords: Verzeichniseintragsstil Verzeichniseintragsstils Eintragsstil +% LocalWords: Kapitelüberschrift Gliederungsebene expandierbares +% LocalWords: Eintragsnummer Initialisierungscode Aktivierungswerte +% LocalWords: Deaktivierungswert Verzeichnistitel Eintragstyp Eintragstyps +% LocalWords: Verzeichniseintrags Säumniswert Überschriftenanweisung +% LocalWords: Eintragstext Dateierweiterung Dateierweiterungen Paketautoren +% LocalWords: Verzeichnisbefehle Verzeichnisdaten Schrifteinstellungen +% LocalWords: Eintragsebenen Platzierungsoptionen Kapiteleinträge diff --git a/macros/latex/contrib/koma-script/doc/tocbasic-en.tex b/macros/latex/contrib/koma-script/doc/tocbasic-en.tex new file mode 100644 index 0000000000..fe5be7f4a6 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/tocbasic-en.tex @@ -0,0 +1,2612 @@ +% ====================================================================== +% tocbasic-en.tex +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% +% Package tocbasic for Package and Class Authors +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{tocbasic-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (package tocbasic)] + +\translator{Markus Kohm\and Arndt Schubert\and Karl Hagen} + +\chapter{Managing Content Lists with \Package{tocbasic}} +\labelbase{tocbasic} +\BeginIndexGroup% +\BeginIndex{Package}{tocbasic}% +\BeginIndex{}{table of contents}% +\BeginIndex{}{content list}% +\BeginIndex{}{file>extension}% +The main purpose of the \Package{tocbasic} package is to give authors of +packages and classes the ability to create their own tables or lists of +content, content lists for short, similar to the list of figures and the list +of tables, allowing classes and other packages some control over these lists. +The \Package{tocbasic} package also delegates control of the +language-dependent parts of these content lists to the +\Package{babel}\IndexPackage{babel} package (see \cite{package:babel}). Using +\Package{tocbasic} relieves package and class authors from the burden of +implementing such features themselves. + +As a minor side effect, the package can also be used to define new floating +environments, or floating environments like non-floating environments for +reference objects. For more details, after you read about the basic commands +in the next four sections, see the example in \autoref{sec:tocbasic.example}, +which is compactly summarized in \autoref{sec:tocbasic.declarenewtoc}. + +\KOMAScript{} itself uses \Package{tocbasic} not only for the table of +contents but also for the already mentioned lists of figures and tables. + +\section{Basic Commands} +\label{sec:tocbasic.basics} + +The basic commands are primarily used to handle a list of all known file +extensions\textnote{file extension, content lists} that represent a table or +list of contents. We call these auxiliary files\Index{auxiliary + file}\footnote{The term \emph{auxiliary file} here refers not to the main + \File{aux} file but to the other internal files used indirectly via the + \File{aux} file, e.\,g. the \File{toc} file, the \File{lof} file, or the + \File{lot} file.} TOC files\textnote{TOC file}\Index[indexmain]{TOC file} +regardless of the file extension that is actually used. Entries to such files +are typically written using +\Macro{addtocontents}\important{\Macro{addtocontents}, + \DescRef{\LabelBase.cmd.addxcontentsline}}, or +\DescRef{\LabelBase.cmd.addxcontentsline}. There are also commands to perform +actions on all of these file extensions. Additionally, there are commands to +set or unset features for the file associated with a given extension. +Typically an file extension also has an owner\textnote{file owner}. This owner +may be a class or package, or an identifier of a category that the author of +the class or package using \Package{tocbasic} has chosen independently. For +example, \KOMAScript{} uses the category \texttt{float} as owner for the +\File{lof} and \File{lot} file extensions that are associated with the list of +figures and list of tables, respectively. For the table of contents, +\KOMAScript{} uses the file name of the class. + +\begin{Declaration} + \Macro{Ifattoclist}\Parameter{extension}\Parameter{then code}% + \Parameter{else code} +\end{Declaration} +This\ChangedAt{v3.28}{\Package{tocbasic}} command tests whether or not the +\PName{extension} already exists in the list of known file extensions. If the +\PName{extension} is already known, the \PName{then code} will be +executed. Otherwise, the \PName{else code} will be executed. +\begin{Example} + Suppose you want to know if the file name extension ``\File{foo}'' is + already in use in order to report an error because it cannot be used: +\begin{lstcode} + \Ifattoclist{foo}{% + \PackageError{bar}{% + extension `foo' already in use% + }{% + Each extension may be used only + once.\MessageBreak + The class or another package already + uses extension `foo'.\MessageBreak + This error is fatal!\MessageBreak + You should not continue!}% + }{% + \PackageInfo{bar}{using extension `foo'}% + } +\end{lstcode} +\end{Example} +\EndIndexGroup + + +\begin{Declaration} + \Macro{addtotoclist}\OParameter{owner}\Parameter{extension} +\end{Declaration} +This command adds the \PName{extension} to the list of known extensions. But +if the \PName{extension} is known already, an error is reported to prevent +duplicate use of the same \PName{extension}. + +If you specify the optional \OParameter{owner} argument, the given +\PName{owner} for this file extension is also saved. If you omit the optional +argument, \Package{tocbasic} tries to determine the file name of the class or +package currently being processed and saves it as the owner. +This\textnote{Attention!} procedure only works if you call +\Macro{addtotoclist} while loading a class or package. It will fail if a user +calls \Macro{addtotoclist} afterwards. In this case, the owner is empty. + +Note\textnote{Attention!} that passing an empty \PName{owner} argument is not +always the same as completely omitting the optional argument, including the +square brackets. An empty argument would always result in an empty owner. +\begin{Example} + Suppose you want to add the extension ``\File{foo}'' to the list of known + file extensions while loading your package with the file name + ``\File{bar.sty}'': +\begin{lstcode} + \addtotoclist{foo} +\end{lstcode}% + This will add the extension ``\PValue{foo}'' with the owner + ``\PValue{bar.sty}'' to the list of known extensions if this extension was + not already in the list. If the class or another package has already added + the extension, you will get the error: +\begin{lstoutput} + Package tocbasic Error: file extension `foo' cannot be used twice + + See the tocbasic package documentation for explanation. + Type H for immediate help. +\end{lstoutput} + If you press the ``\texttt{h}'' key followed by return, you will get the + following help: +\begin{lstoutput} + File extension `foo' is already used by a toc-file, while bar.sty + tried to use it again for a toc-file. + This may be either an incompatibility of packages, an error at a package, + or a mistake by the user. +\end{lstoutput} + + Perhaps your package also provides a command that dynamically generates a + content list. In this case, you should use the optional argument of + \Macro{addtotoclist} to specify the owner. +\begin{lstcode} + \newcommand*{\createnewlistofsomething}[1]{% + \addtotoclist[bar.sty]{#1}% + % Do something more to make this content list available + } +\end{lstcode} + Now if the user calls this command, for example with +\begin{lstcode} + \createnewlistofsomething{foo} +\end{lstcode} + this will add the extension ``\PValue{foo}'' with the owner + ``\PValue{bar.sty}'' to the list of known extension or report an error, if + the extension is already in use. +\end{Example} +You can specify any \PName{owner} you want, but it must be unique. For +example, if you were the author of the \Package{float} package, you could +specify the category ``\PValue{float}'' instead of ``\PValue{float.sty}'' as +the \PName{owner}. In this case, the \KOMAScript{} +options\important{\DescRef{maincls.option.listof}}% +\IndexOption{listof~=\PName{setting}} for the list of figures and the list of +tables would also affect your content lists because \KOMAScript{} associates +the file extensions ``\PValue{lof}'' for the list of figures and +``\PValue{lot}'' for the list of tables with the owner ``\PValue{float}'' and +sets the options for this owner. + +By the way, the \hyperref[cha:scrhack]{\Package{scrhack}}% +\IndexPackage{scrhack}\important{\hyperref[cha:scrhack]{\Package{scrhack}}} +package contains patches for several packages, such as \Package{float} or +\Package{listings}, which provide their own content lists. If you use +\hyperref[cha:scrhack]{\Package{scrhack}}, among other things, the respective +file extensions will be added to the list of known file extensions. Their +\PName{owner} is also ``\PValue{float}''. This is the basic building block, so +to speak, allowing you to use the features of \Package{tocbasic} and the +\KOMAScript{} classes with these content lists as well.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AtAddToTocList}\OParameter{owner}\Parameter{commands} +\end{Declaration} +This command adds the \PName{commands} to an internal list of commands that +will be processed whenever a file extension with the specified \PName{owner} +is added to the list of known extensions with +\DescRef{\LabelBase.cmd.addtotoclist}. The optional argument is handled in the +same way as in the \DescRef{\LabelBase.cmd.addtotoclist} command. If you leave +the optional argument blank, the commands will always be executed, regardless +of the owner, every time a new file extension is added to the list of known +file extensions. Furthermore, while processing the \PValue{commands}, +\Macro{@currext}\IndexCmd{@currext}\important{\Macro{@currext}} is set to the +extension of the extension currently being added. +\begin{Example} + \Package{tocbasic} itself uses +\begin{lstcode} + \AtAddToTocList[]{% + \expandafter\tocbasic@extend@babel + \expandafter{\@currext}% + } +\end{lstcode} + to add every file extension to the existing \Package{tocbasic} integration + with the \Package{babel} package. +\end{Example} + +The two \Macro{expandafter} commands in the example are needed because the +argument of \DescRef{\LabelBase.cmd.tocbasic@extend@babel} has to be expanded. +See the description of \DescRef{\LabelBase.cmd.tocbasic@extend@babel} in +\autoref{sec:tocbasic.internals}, +\DescPageRef{\LabelBase.cmd.tocbasic@extend@babel} for more information.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{removefromtoclist}\OParameter{owner}\Parameter{extension} +\end{Declaration} +This command removes the \PName{extension} from the list of known extensions. +If the optional argument, \OParameter{owner}, is given, the \PName{extension} +will only be removed if it was added by this \PName{owner}. +% TODO: Fix new translation +This also applies to the empty \PName{owner}. If, on the other hand, no +\OParameter{owner} is specified at all and the square brackets are also +omitted, the owner is not tested and the \PName{extension} is removed +regardless of the owner.% +% :ODOT +\EndIndexGroup + + +\begin{Declaration} + \Macro{doforeachtocfile}\OParameter{owner}\Parameter{commands} +\end{Declaration} +To this point, we've introduced commands provide additional security for class +and package authors, but also more overhead. With \Macro{doforeachtocfile}, +you can reap the first benefit for this. This command lets you execute the +specified \PName{commands} for each file extension associated with an +\PName{owner}. While processing the \PName{commands}, \Macro{@currext} is the +extension of the current file. If you omit the optional \OParameter{owner} +argument, all file extensions are processed regardless of the owner. If the +optional argument is empty, on the other hand, only extensions with an empty +owner will be processed. +\begin{Example} + If you want to output a list of all known file extensions to the terminal + and to the \File{log} file, you can easily accomplish this: +\begin{lstcode} + \doforeachtocfile{\typeout{\@currext}} +\end{lstcode} + If, on the other hand, you only want to output the extensions owned by + ``\PValue{foo}'', this too is easy: +\begin{lstcode} + \doforeachtocfile[foo]{\typeout{\@currext}} +\end{lstcode} +\end{Example} +The \KOMAScript{} classes \Class{scrbook} and \Class{scrreprt} use this +command to optionally put a vertical skip or the chapter heading in content +lists using the \PValue{chapteratlist} feature. You can learn how to set this +feature in \autoref{sec:tocbasic.toc} on +\DescPageRef{\LabelBase.cmd.setuptoc}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasicautomode} +\end{Declaration} +This command redefines \LaTeX{} kernel macro \Macro{@starttoc} for class and +package authors so that every time \Macro{@starttoc} is called, the specified +file extension is added to the list of known extensions, if it has not already +been added. It also uses \DescRef{\LabelBase.cmd.tocbasic@starttoc} instead of +\Macro{@starttoc}. See \autoref{sec:tocbasic.internals}, +\DescPageRef{\LabelBase.cmd.tocbasic@starttoc} for more information about +\DescRef{\LabelBase.cmd.tocbasic@starttoc} and \Macro{@starttoc}. + +After you use \Macro{tocbasicautomode}, every content list created with +\Macro{@starttoc} is automatically put under the control of +\Package{tocbasic}. Whether or not this leads to the desired result, however, +depends very much on the individual content list. The \Package{babel} package +extensions, at least, will work for all those content lists. Nevertheless, it +is preferable for the class or package authors to use \Package{tocbasic} +explicitly. That way they can also take advantage of the other features of +\Package{tocbasic}, which are described in the following sections.% +\EndIndexGroup + + +\section{Creating a Content List} +\label{sec:tocbasic.toc} + +In the previous section, you learned how to maintain a list of known file +extensions and how to automatically execute commands when adding new +extensions to this list. You also saw a command that can be used to execute +instructions for all known extensions or all extensions belonging to one +owner. In this section, you will learn commands that apply to the files +associated with these file extensions. + +\begin{Declaration} + \Macro{addtoeachtocfile}\OParameter{owner}\Parameter{content} +\end{Declaration} +The \Macro{addtoeachtocfile} command uses the \LaTeX{} kernel command +\Macro{addtocontents} to write the \PName{content} to every TOC file\Index{TOC +file} in the list of known file extensions that has the specified +\PName{owner}. If you omit the optional argument, the \PName{content} is +written to each file in the list of known file extensions. Incidentally, the +actual file name is constructed from \Macro{jobname} and the file extension. +While writing the \PName{content}, +\Macro{@currext}\IndexCmd{@currext}\important{\Macro{@currext}} is the +extension of the file currently being processed. +\begin{Example} + You want to add a vertical space of one line to all TOC files. +\begin{lstcode} + \addtoeachtocfile{% + \protect\addvspace{\protect\baselineskip}% + } +\end{lstcode} + If, on the other hand, you want to do this only for the files that have the + owner ``\PValue{foo}'', use: +\begin{lstcode} + \addtoeachtocfile[foo]{% + \protect\addvspace{\protect\baselineskip}% + } +\end{lstcode} +\end{Example} +You should protect commands that should not be expanded when they are written +by prefixing them with \Macro{protect}, in the same way as you would in +\Macro{addtocontents}. +\EndIndexGroup + + +\begin{Declaration} + \Macro{addxcontentsline}% + \Parameter{extension}\Parameter{level}\OParameter{section number}% + \Parameter{text} +\end{Declaration} +This command is very similar to +\Macro{addcontentsline}\IndexCmd{addcontentsline} from the \LaTeX{} kernel. +However, it has an additional optional argument for the \PName{section number} +of the entry, whereas for \Macro{addcontentsline}, it is specified in the +\PName{text} argument. It is used to include numbered or unnumbered entries in +the content list specified by the file \PName{extension}, where \PName{level} +is the sectioning level and \PName{text} is the content of the corresponding +entry. The page number is determined automatically. + +In contrast to \Macro{addcontentsline}, \Macro{addxcontentsline} first tests +whether the \Macro{add\PName{level}\PName{extension}entry} command is defined. +If so, it will be used for the entry, passing the \PName{section number} as an +optional argument and \PName{text} as a mandatory argument. You can find an +example of such a command provided by the \KOMAScript{} classes in +\DescRef{maincls-experts.cmd.addparttocentry} (see +\autoref{sec:maincls-experts.toc}, +\DescPageRef{maincls-experts.cmd.addparttocentry}). If the corresponding +command is undefined, the internal command +\DescRef{\LabelBase.cmd.tocbasic@addxcontentsline} is used instead. This takes +all four arguments as mandatory arguments and then uses +\Macro{addcontentsline} to create the desired entry. You can find more about +\DescRef{\LabelBase.cmd.tocbasic@addxcontentsline} in +\autoref{sec:tocbasic.internals}, +\DescPageRef{\LabelBase.cmd.tocbasic@addxcontentsline}. + +One advantage of using \Macro{addxcontentsline} rather than +\Macro{addcontentsline} is that the \PValue{numberline} feature is respected +(see \DescPageRef{\LabelBase.cmd.setuptoc}). Furthermore, you can configure +the form of the entries by defining the appropriate commands specific to the +\PName{level} and file \PName{extension}.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{addxcontentslinetoeachtocfile}\OParameter{owner} + \Parameter{level} + \OParameter{section number}% + \Parameter{text} + \Macro{addcontentslinetoeachtocfile}\OParameter{owner} + \Parameter{level}\Parameter{text}% +\end{Declaration} +These two commands are directly related to +\DescRef{\LabelBase.cmd.addxcontentsline}\ChangedAt{v3.12}{\Package{tocbasic}} +explained above, or to \Macro{addcontentsline} from the \LaTeX kernel. The +difference is that these statements write \PName{text} not just to a single +file but to all the files of a given \PName{owner} and, if the first optional +argument is omitted, to all files in the list of known file extensions. +\begin{Example} + Suppose you are a class author and you want to write the chapter entry not + just in the table of contents but in all content-list files. Suppose further + that \PValue{\#1} currently contains the text to be written. +\begin{lstcode} + \addxcontentslinetoeachtocfile{chapter}% + [\thechapter]{#1} +\end{lstcode} + In this case, of course, the current chapter number should be expanded + directly when writing to the TOC file, which is why it was not protected + from expansion with \Macro{protect}. +\end{Example} +While writing the \PName{content}, +\Macro{@currext}\IndexCmd{@currext}\important{\Macro{@currext}} here is also +the extension of the file being written to, as it is with +\DescRef{\LabelBase.cmd.addtoeachtocfile}.% + +Whenever\ChangedAt{v3.12}{\Package{tocbasic}} possible, the +\Macro{addxcontentslinetoeachtocfile} command is preferable to +\Macro{addcontentslinetoeachtocfile} because only the former offers the +enhancements of \DescRef{\LabelBase.cmd.addxcontentsline}. You can find more +about these enhancements and benefits in the explanation of +\DescRef{\LabelBase.cmd.addxcontentsline} above.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{listoftoc}\OParameter{list-of title}\Parameter{extension}% + \Macro{listoftoc*}\Parameter{extension}% + \Macro{listofeachtoc}\OParameter{owner}% + \Macro{listof\PName{extension}name} +\end{Declaration} +You can use these commands to print the content lists. +The\important{\Macro{listoftoc*}} stared version \Macro{listoftoc*} needs only +one argument, the \PName{extension} of the file. The command first initializes +the vertical and horizontal spacing of paragraphs, calls the hook to execute +commands before reading the file, then reads the file, and finally executes +the hook to execute commands after reading the file. Thus you can think of +\Macro{listoftoc*} as a direct replacement for the \LaTeX{} kernel macro +\Macro{@starttoc}\IndexCmd{@starttoc}\important{\Macro{@starttoc}}. + +The\important{\Macro{listoftoc}} version of \Macro{listoftoc} without the star +prints the complete content list and also creates an optional entry in the +table of contents and the running heads. If you provide the optional +\OParameter{list-of title} argument, it is used both as the title for the list +and as an optional entry in the table of contents and the running head. +If\textnote{Attention!} the \OParameter{list-of title} argument is empty, the +title will be empty too. If, on the other hand, you completely omit the +optional argument, including the square brackets, the +\Macro{listof\PName{extension}name} command will be used if it is defined. If +it is undefined, a default replacement name is used and a warning is issued. + +The\important{\Macro{listofeachtoc}} \Macro{listofeachtoc} command outputs all +content lists associated with the given \PName{owner}, or of all known file +extensions if the optional argument is omitted. To\textnote{Attention!} output +the correct titles, \Macro{listof\PName{extension}name} should be defined. + +You\textnote{Hint!} should define \Macro{listof\PName{extension}name} +appropriately for all file extensions because users may use \Macro{listoftoc} +without the optional argument, or \Macro{listofeachtoc}, themselves. +\begin{Example} + Suppose you have a new ``list of algorithms'' with the file extension + \PValue{loa} and want to output it. The command +\begin{lstcode} + \listoftoc[List of Algorithms]{loa} +\end{lstcode} + will do it for you. If, however, you want to output this list without a + title, you could use +\begin{lstcode} + \listof*{loa} +\end{lstcode} + In the second case, of course, there will be no entry in the table of + contents. For more information about creating entries in the table of + contents, see the \DescRef{\LabelBase.cmd.setuptoc} command on + \DescPageRef{\LabelBase.cmd.setuptoc}. + + If you have defined +\begin{lstcode} + \newcommand*{\listofloaname}{% + List of Algorithms% + } +\end{lstcode} + already, then +\begin{lstcode} + \listoftoc{loa} +\end{lstcode} + will suffice to print the content list with the desired heading. It may be + easier for users to remember if you also define a simple list-of command: +\begin{lstcode} + \newcommand*{\listofalgorithms}{\listoftoc{loa}} +\end{lstcode} +\end{Example} + +Because\textnote{Attention!} \LaTeX{} normally opens a new file for each of +these content lists, calling each of these commands may +result in an error like: +\begin{lstoutput} + ! No room for a new \write . + \ch@ck ...\else \errmessage {No room for a new #3} + \fi +\end{lstoutput} +if there are no more write handles left. Loading the +\Package{scrwfile}\important{\Package{scrwfile}}\IndexPackage{scrwfile} +package (see \autoref{cha:scrwfile}) can solve this problem. + +Also, the \hyperref[cha:scrhack]{\Package{scrhack}}\IndexPackage{scrhack}% +\important{\hyperref[cha:scrhack]{\Package{scrhack}}} package contains patches +for several packages, such as \Package{float} or \Package{listings}, so that +their content-list commands can use \Macro{listoftoc}. As a result, many +features of \Package{tocbasic} and the \KOMAScript{} classes are also +available for their content lists.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{BeforeStartingTOC}\OParameter{extension}\Parameter{commands}% + \Macro{AfterStartingTOC}\OParameter{extension}\Parameter{commands} +\end{Declaration} +Sometimes it's useful to be able to execute \PName{commands} immediately +before reading the auxiliary TOC file. With \Macro{BeforeStartingTOC} you can +do so either for a single file \PName{extension} or for all files that are +read using \DescRef{\LabelBase.cmd.listoftoc*}, +\DescRef{\LabelBase.cmd.listoftoc}, or \DescRef{\LabelBase.cmd.listofeachtoc}. +You can also execute \PName{commands} after reading the file if you define +them with \Macro{AfterStartingTOC}. If you omit the optional argument (or set +an empty one) a general hook will be set and the commands will be applied to +all content lists. The general before-hook is called before the individual +one, and the general after-hook is called after the individual one. While +executing the commands in these hooks, +\Macro{@currext}\IndexCmd{@currext}\important{\Macro{@currext}} is the +extension of the TOC file which is about to be or has just been read. + +You can find an example\textnote{Example} using \Macro{BeforeStartingTOC} in +\autoref{sec:scrwfile.clonefilefeature} on +\PageRefxmpl{scrwfile.cmd.BeforeStartingTOC}. +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{BeforeTOCHead}\OParameter{extension}\Parameter{commands}% + \Macro{AfterTOCHead}\OParameter{extension}\Parameter{commands} +\end{Declaration} +You can also define \PName{commands} that will be executed immediately before +or after setting the title of a content list using +\DescRef{\LabelBase.cmd.listoftoc*} or \DescRef{\LabelBase.cmd.listoftoc}. The +treatment of the optional parameter and the meaning of +\Macro{@currext}\IndexCmd{@currext}\important{\Macro{@currext}} is the same as +described for \DescRef{\LabelBase.cmd.BeforeStartingTOC} and +\DescRef{\LabelBase.cmd.AfterStartingTOC}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{MakeMarkcase}\Parameter{text} +\end{Declaration} +Whenever \Package{tocbasic} sets a mark for a running head, The text of the +mark will be an argument of \Macro{MakeMarkcase}. You can use this command to +change the case of the running head if necessary. The \KOMAScript{} classes +use \Macro{@firstofone}\IndexCmd{@firstofone}\important{\Macro{@firstofone}} +by default. This means the text of the running head will be set without +changing the capitalisation. If you use a different class, +\Macro{MakeMarkcase} will be set to +\Macro{MakeUppercase}\IndexCmd{MakeUppercase}% +\important{\Macro{MakeUppercase}}. However, \Package{tocbasic} only defines +this command if it is not already defined. It can therefore be predefined by +another class or package and \Package{tocbasic} will use that definition +rather than overwriting it. +\begin{Example} + For some strange reason, you want to set the running heads entirely in + lower-case letters. To apply this change automatically for all running heads + set by \Package{tocbasic}, you define: +\begin{lstcode} + \let\MakeMarkcase\MakeLowercase +\end{lstcode} +\end{Example} +Let\textnote{Hint!} me give you some advice about +\Macro{MakeUppercase}\IndexCmd{MakeUppercase}. First of all, this command is +not fully expandable. This means that it can cause problems interacting with +other commands. Beyond that, typographers agree that whenever you set whole +words or phrases in capital letters, additional spacing is absolutely +necessary. However, adding a fixed spacing between all letters is not an +adequate solution. Different pairs of letters require different spaces between +them. Additionally, some letters already create gaps in the text that must be +taken into account. Packages like \Package{ulem} or \Package{soul} can +scarcely achieve this, nor can \Macro{MakeUppercase}. The automatic letter +spacing using the \Package{microtype} package is in this respect only an +approximate solution, because it does not take into account the concrete, +font-dependent glyphs. Because\textnote{Attention!} typesetting all-capital +text is expert work and almost always requires manual adjustment, ordinary +users are recommended avoid using it, or to use it only sparingly and not in +such an exposed place as the running head.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{deftocheading}\Parameter{extension}\Parameter{definition} +\end{Declaration} +The \Package{tocbasic} package contains a default definition for typesetting +the titles of content lists. You can configure this default definition through +various features discussed in the \DescRef{\LabelBase.cmd.setuptoc} comand +below. If those features are not enough, you can use \Macro{deftocheading} +to define your own title for the content list with the given file +\PName{extension}. The \PName{definition} of the title can use a single +parameter, \PValue{\#1}. When the command is called inside +\DescRef{\LabelBase.cmd.listoftoc} or \DescRef{\LabelBase.cmd.listofeachtoc}, +that \PValue{\#1} will be replaced by the title of this content list. + +Obviously, the \PName{definition} is also responsible for the interpretation +of additional features related to the title. This is especially true +for the features \PValue{leveldown}, \PValue{numbered} and \PValue{totoc}, +that are be explained next.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{setuptoc}\Parameter{extension}\Parameter{feature list}% + \Macro{unsettoc}\Parameter{extension}\Parameter{feature list} +\end{Declaration} +You can use these two commands to set and clear features for a TOC file +\PName{extension} or the content list associated with it. The \PName{feature +list} is a comma-separated list of features. The \Package{tocbasic} package +recognizes following features: +\begin{description} +\item[\PValue{leveldown}] means that the content list's heading is created not + with the highest sectioning level below + \DescRef{maincls.cmd.part}\,---\,\DescRef{maincls.cmd.chapter} if available, + \DescRef{maincls.cmd.section} otherwise\,---\,but with a heading of the next + level below that. This feature is evaluated by the internal heading command. + On the other hand, if a user-defined heading command has been created with + \DescRef{\LabelBase.cmd.deftocheading}, the person defining that command is + responsible for evaluating the feature. The \KOMAScript{} classes set this + feature using the \OptionValueRef{maincls}{listof}{leveldown}% + important{\OptionValueRef{maincls}{listof}{leveldown}}% + \IndexOption{listof~=\textKValue{leveldown}} option for all file extensions + with the owner \PValue{float}. +\item[\PValue{nobabel}] prevents using the language-switching features of + \Package{babel}\IndexPackage{babel} for the TOC file associated with the + this file \PName{extension}. This feature should be used only for content + lists that are created in a fixed language, which means that changes of the + language inside of the document will no longer affect the content list. The + \Package{scrwfile}\important{\Package{scrwfile}}\IndexPackage{scrwfile} + package also uses this feature for cloned destinations, as because those + files already inherit any language changes from the cloning source. + + Note\textnote{Attention!} that you must set this feature before you add a + file extension to the list of known extensions. Changing the feature + afterwards will have no effect. +\item[\PValue{noindent}]\ChangedAt{v3.27}{\Package{tocbasic}}% + causes all content-list entry styles provided by \KOMAScript{} to ignore + the \PValue{indent} attribute (see + \autoref{tab:tocbasic.tocstyle.attributes}, + \autopageref{tab:tocbasic.tocstyle.attributes.indent}) and instead to + deactivate the indentation.% +\item[\PValue{noparskipfake}] prevents\ChangedAt{v3.17}{\Package{tocbasic}} + the insertion of a final \Length{parskip} before switched off paragraph + spacing for content lists. In general, this will cause documents that use + spacing between paragraphs to have less vertical space between the list + heading and first entry than between normal headings and normal text. + Normally, therefore, you will obtain a more uniform formatting without this + feature. +\item[\PValue{noprotrusion}] prevents\ChangedAt{v3.10}{\Package{tocbasic}} + character protrusion, which allows optical margin alignment, from being + disabled in the content lists. By default, character protrusion is disabled + when the \Package{microtype}\IndexPackage{microtype} package, or another + package that supports \Macro{microtypesetup}\IndexCmd{microtypesetup}, is + loaded. So if you want optical margin alignment in the content lists, you + must set this feature. Note\textnote{Attention!}, however, that character + protrusion in content lists often results in incorrect results. This is a + known issue with character protrusion. +\item[\PValue{numbered}] means that the heading for the content list should + be numbered and included in the table of contents. This feature is evaluated + by the internal heading command. However, if a user-defined heading command + has been created with \DescRef{\LabelBase.cmd.deftocheading}, the person + creating that definition is responsible evaluating the feature. The + \KOMAScript{} classes set this feature using the + \OptionValueRef{maincls}{listof}{numbered}% + \important{\OptionValueRef{maincls}{listof}{numbered}}% + \IndexOption{listof~=\textKValue{numbered}} option for all file extensions + with the owner \PValue{float}. +\item[\PValue{numberline}] \leavevmode\ChangedAt{v3.12}{\Package{tocbasic}}% + means that any entries made using \DescRef{\LabelBase.cmd.addxcontentsline} + or \DescRef{\LabelBase.cmd.addxcontentslinetoeachtocfile}, where the + optional argument for the number is missing or empty, will be provided with + an empty \DescRef{\LabelBase.cmd.numberline} command. This usually results + in these entries being left-aligned not with the number but with the text of + the numbered entries of the same level. + Using\ChangedAt{v3.20}{\Package{tocbasic}} the \PValue{tocline} entry style + can have additional side effects. See the style attribute + \Option{breakafternumber} and \Option{entrynumberformat} in + \autoref{tab:tocbasic.tocstyle.attributes} starting on + \autopageref{tab:tocbasic.tocstyle.attributes}. + + \KOMAScript{} classes set this feature for the file extensions with the + owner \PValue{float} if you use the + \OptionValueRef{maincls}{listof}{numberline}% + \important{\OptionValueRef{maincls}{listof}{numberline}}% + \IndexOption{listof~=\textKValue{numberline}} option and for the file + extension \PValue{toc} if you use the + \OptionValueRef{maincls}{toc}{numberline}% + \important{\OptionValueRef{maincls}{toc}{numberline}}% + \IndexOption{toc~=\textKValue{numberline}} option. Similarly, this feature + is reset if you use \OptionValueRef{maincls}{listof}{nonumberline}% + \important{\OptionValueRef{maincls}{listof}{nonumberline}}% + \IndexOption{listof~=\textKValue{nonumberline}} or + \OptionValueRef{maincls}{toc}{nonumberline}% + \important{\OptionValueRef{maincls}{toc}{nonumberline}}% + \IndexOption{toc~=\textKValue{nonumberline}}. +\item[\PValue{onecolumn}] \leavevmode\ChangedAt{v3.01}{\Package{tocbasic}}% + means that this content list will automatically use \LaTeX's internal + one-column mode with \Macro{onecolumn}\IndexCmd{onecolumn}. + However\textnote{Attention!}, this applies only if this content list does + not use the \PValue{leveldown}\important{\PValue{leveldown}} feature. The + \KOMAScript{} classes \Class{scrbook} and \Class{scrreprt} activate this + feature with \DescRef{\LabelBase.cmd.AtAddToTocList} (see + \autoref{sec:tocbasic.basics}, \DescPageRef{\LabelBase.cmd.AtAddToTocList}) + for all content lists with the owner \PValue{float} or with themselves as + owner. Thus, for example, the table of contents, the list of figures, and + the list of tables are automatically printed in a single column for both + these classes. The multicolumn mode of the + \Package{multicol}\IndexPackage{multicol} package is expressly unaffected by + this option. +\item[\PValue{totoc}] means that the title of content list should be included + in the table of contents. This feature will be evaluated by the internal + heading command. However, if an user-defined heading command has been + created with \DescRef{\LabelBase.cmd.deftocheading}, the person defining + that command is responsible for evaluating this feature. The \KOMAScript{} + classes set this feature using the \OptionValueRef{maincls}{listof}{totoc}% + \important{\OptionValueRef{maincls}{listof}{totoc}}% + \IndexOption{listof~=\textKValue{totoc}} option for all file extensions with + the owner \PValue{float}. +\end{description} +The \KOMAScript{} classes recognize an additional feature: +\begin{description} +\item[\PValue{chapteratlist}] ensures that an optional subdivision is added + to the content list for each new chapter. By default, this subdivision is a + vertical space. See \DescRef{maincls.option.listof}% + \IndexOption{listof}\important{\DescRef{maincls.option.listof}} in + \autoref{sec:maincls.floats}, \DescPageRef{maincls.option.listof} for more + information about this option. +\end{description} +\begin{Example} + Because \KOMAScript{} classes use \Package{tocbasic} for the list of figures + and list of tables, there is another way to prevent chapter subdivisions in + these lists: +\begin{lstcode} + \unsettoc{lof}{chapteratlist} + \unsettoc{lot}{chapteratlist} +\end{lstcode} + + If you want the chapter subdivisions for your own list that you have defined + with the file \PName{extension} ``\PValue{loa}'' to use the same subdivision + format used by the \KOMAScript{} classes, you can use +\begin{lstcode} + \setuptoc{loa}{chapteratlist} +\end{lstcode} + And if you also want classes that use \DescRef{maincls.cmd.chapter} as the + top-level structure to use the one-column mode automatically, you can + use +\begin{lstcode} + \Ifundefinedorrelax{chapter}{}{% + \setuptoc{loa}{onecolumn}% + } +\end{lstcode} + Using \DescRef{scrbase.cmd.Ifundefinedorrelax} requires the + \Package{scrbase} package (see \autoref{sec:scrbase.if}, + \DescPageRef{scrbase.cmd.Ifundefinedorrelax}). + + Even\textnote{Hint!} if your package will be used with another class, it + does not hurt to set these features. To the contrary, if another class also + evaluates these features, then your package would automatically use the + features of that class. +\end{Example} +As you can see, packages that use \Package{tocbasic} already support a wide +range of options for content lists that would otherwise require a great deal +of effort to implement and which are therefore missing in many packages.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{Iftocfeature}\Parameter{extension}\Parameter{feature}% + \Parameter{then code}\Parameter{else code} +\end{Declaration} +You\ChangedAt{v3.28}{\Package{tocbasic}} can use this command to test if a +\PName{feature} was set for the given file \PName{extension}. If so the +\PName{then code} will be executed, otherwise the \PName{else code} will +be. This can be useful, for example, if you define your own heading command +using \DescRef{\LabelBase.cmd.deftocheading} but want to support the features +\PValue{totoc}, \PValue{numbered} or \PValue{leveldown}.% +\EndIndexGroup + + +\section{Configuring Content-List Entries} +\seclabel{tocstyle}% +\BeginIndexGroup +\BeginIndex{}{table of contents>entry}% +\Index{list of contents|\see{table of contents}} + +Since\ChangedAt{v3.20}{\Package{tocbasic}} version~3.20, the +\Package{tocbasic} package has been able not only to configure the tables or +lists of contents and their auxiliary files but also to influence their +entries. To do so, you can define new styles or you can use and configure one +of the predefined styles. In the medium term, \Package{tocbasic} will replace +the experimental \Package{tocstyle} package that never became an official part +of the \KOMAScript{} bundle. The \KOMAScript{} classes themselves have relied +completely on the \Package{tocbasic} entry styles since version~3.20. + +\begin{Declaration} + \Counter{tocdepth} +\end{Declaration} +Entries to content lists are usually hierarchical. For this purpose, each +entry level has a numerical value. The higher this value, the lower in the +hierarchy is this level. In the standard classes, for example, parts have the +level -1 and chapters have the value 0. The \LaTeX{} counter +\Counter{tocdepth} determines the deepest level that should be shown in the +table of contents and other content lists. + +For example, the \Class{book} class sets \Counter{tocdepth} to 2, so entries +of the levels \PValue{part}, \PValue{chapter}, \PValue{section}, and +\PValue{subsection} are printed. Deeper levels like \PValue{subsubsection}, +which has the numerical value 3, are not printed. Nevertheless the entries are +part of the auxiliary file for the table of contents. + +Note that most \Package{tocbasic} entry styles, with the exception of +\PValue{gobble} (see \DescRef{\LabelBase.cmd.DeclareTOCStyleEntry}\iffree{}{, +later in this section}) observe \Counter{tocdepth}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{numberline}\Parameter{entry number}% + \Macro{usetocbasicnumberline}\OParameter{code} +\end{Declaration} +Although\ChangedAt{v3.20}{\Package{tocbasic}} the \LaTeX{} kernel +already defines a \Macro{numberline} command, the definition is not sufficient +for \Package{tocbasic}. Therefore \Package{tocbasic} defines its own commands +and sets \Macro{numberline} as needed using \Macro{usetocbasicnumberline} for +each content-list entry. Redefining \Macro{numberline}, therefore, is often +ineffective and may result in warnings if you use \Package{tocbasic}. + +You can use the definition of \Package{tocbasic} by putting +\Macro{usetocbasicnumberline} into your document's preamble. The command first +checks if the current definition of \Macro{numberline} +uses certain important, internal commands of \Package{tocbasic}. If this is not +the case, \Macro{usetocbasicnumberline} redefines \Macro{numberline} and +executes \PName{code}. If you omit the optional argument, it issues +a message about the redefinition with \Macro{PackageInfo}. If +you just do not want such a message, use an empty optional argument. + +Note\textnote{Attention!} that \Macro{usetocbasicnumberline} can change the +internal switch \Macro{@tempswa} globally!% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DeclareTOCStyleEntry}\OParameter{option list}\Parameter{style}% + \Parameter{entry level} + \Macro{DeclareTOCStyleEntries}\OParameter{option list}\Parameter{style}% + \Parameter{entry level list} +\end{Declaration} +These\ChangedAt{v3.20}{\Package{tocbasic}} commands define or configure the +content-list entries of a given \PName{entry level}. The \PName{entry level} +argument is a symbolic name, e.\,g. \PValue{section}, for the entry to the +table of contents of the section level with the same name or \PValue{figure} +for an entry of a figure to the list of figures. A \PName{style} is assigned +to each \PName{entry level}. The \PName{style} has to be defined before using +it as an argument of \Macro{DeclareTOCStyleEntry} or +\Macro{DeclareTOCStyleEntries}. You can use the \PName{option list} to +configure the various, usually \PName{style}-dependent, attributes of the +entries. + +Currently, \Package{tocbasic} defines the following entry styles: +\begin{description} +\item[\PValue{default}] defaults to a clone of the \PValue{dottedtocline} + style. Class authors who use \Package{tocbasic} are encouraged to change + this style to the default content-list style of the class using + \Macro{CloneTOCStyle}. For example the \KOMAScript{} classes change + \PValue{default} into a clone of \PValue{tocline}. +\item[\PValue{dottedtocline}] is similar to the style used by the standard + classes \Class{book} and \Class{report} for the \PValue{section} down to + \PValue{subparagraph} entry levels of the table of contents and for the + entries at the list of figures or list of tables. It supports the attributes + \PValue{level}, \PValue{indent}, and \PValue{numwidth}. The entries are + indented by the value of \PValue{indent} from the left. The width of the + entry number is given by the value of \PValue{numwidth}. For multi-line + entries, the indent will be increased by the value of \PValue{numwidth} for + the second and following lines. The page number is printed using + \Macro{normalfont}\IndexCmd{normalfont}. The entry text and the page number + are connected by a dotted line. \hyperref[fig:tocbasic.dottedtocline]% + {Figure~\ref*{fig:tocbasic.dottedtocline}} illustrates the attributes of + this style. + \begin{figure} + \centering + \resizebox{.8\linewidth}{!}{% + \begin{tikzpicture} + \draw[color=lightgray] (0,2\baselineskip) -- (0,-2.5\baselineskip); + \draw[color=lightgray] (\linewidth,2\baselineskip) -- + (\linewidth,-2.5\baselineskip); + \node (dottedtocline) at (0,0) [anchor=west,inner sep=0,outer sep=0] + {% + \hspace*{7em}% + \parbox[t]{\dimexpr\linewidth-9.55em}{% + \setlength{\parindent}{-3.2em}% + \addtolength{\parfillskip}{-2.55em}% + \makebox[3.2em][l]{1.1.10}% + Text of an entry in the table of contents with the + \PValue{dottedtocline} style and more than one line% + \leaders\hbox{$\csname m@th\endcsname + \mkern 4.5mu\hbox{.}\mkern 4.5mu$}\hfill\nobreak + \makebox[1.55em][r]{12}% + }% + }; + \draw[|-|,color=gray,overlay] (0,0) -- + node [anchor=north,font=\small] { + \PValue{indent} + } + (3.8em,0); + \draw[|-|,color=gray,overlay] (3.8em,\baselineskip) -- + node [anchor=south,font=\small] { + \PValue{numwidth} + } + (7em,\baselineskip); + \draw[|-|,color=gray,overlay] (\linewidth,\ht\strutbox) -- + node [anchor=south,font=\small] { + \Macro{@tocrmarg} + } + (\linewidth-2.55em,\ht\strutbox); + \draw[|-|,color=gray,overlay] (\linewidth,-\baselineskip) -- + node [anchor=north,font=\small] { + \Macro{@pnumwidth} + } + (\linewidth-1.55em,-\baselineskip); + \end{tikzpicture}% + } + \caption{Illustrations of some attributes of a TOC entry with the + \PValue{dottedtocline} style} + \label{fig:tocbasic.dottedtocline} + \end{figure} +\item[\PValue{gobble}] is the simplest possible style. Entries in this style, + regardless of the setting of \DescRef{\LabelBase.counter.tocdepth}% + \IndexCounter{tocdepth}\important{\DescRef{\LabelBase.counter.tocdepth}}, + will never be printed. The style simply gobbles the + entries, so to speak. It has the default \PValue{level} attribute, but + it is never evaluated. +\item[\PValue{largetocline}] is similar to the style used by the standard + classes for the \PValue{part} level. It supports the \PValue{level} and + \PValue{indent} attributes only. The latter deviates from the standard + classes, which do not support an indent of the \PValue{part} entries. + + A penalty is set to permit page breaks before an entry of an appropriate + level. The entries will be indented by the value of \PValue{indent} from the + left and printed with the font style \Macro{large}\Macro{bfseries}. If + \DescRef{\LabelBase.cmd.numberline} is used, the number width is 3\Unit{em}. + \DescRef{\LabelBase.cmd.numberline} is not redefined. The standard classes + do not use \DescRef{\LabelBase.cmd.numberline} for \PName{part} entries. The + value of \PName{indent} also has no effect on the indentation from the + second line and after in a multi-line entry. + + \hyperref[fig:tocbasic.largetocline]% + {Figure~\ref*{fig:tocbasic.largetocline}} illustrates the characteristics of + this style. You will also notice that the style has adopted some + inconsistencies present in the standard classes, e.\,g. the missing indent + of the second and following lines of an entry or the different values of + \Macro{@pnumwidth} that results from the font-size dependency. This can + result, in extreme cases, in the entry text coming too close. Note that the + width of the entry number shown in the figure is only valid if + \DescRef{\LabelBase.cmd.numberline} has been used. The standard classes, + however, use a distance of 1\Unit{em} after the number. + \begin{figure} + \centering + \resizebox{.8\linewidth}{!}{% + \begin{tikzpicture} + \draw[color=lightgray] (0,2\baselineskip) -- (0,-2.5\baselineskip); + \draw[color=lightgray] (\linewidth,2\baselineskip) -- + (\linewidth,-2.5\baselineskip); + \node (largetocline) at (0,0) [anchor=west,inner sep=0,outer sep=0] {% + \parbox[t]{\dimexpr \linewidth-1.55em\relax}{% + \makebox[3em][l]{\large\bfseries I}% + \large\bfseries + Text of an entry to the table of contents with the + \PValue{largetocline} style and more than one line% + \hfill + \makebox[0pt][l]{\normalsize\normalfont + \makebox[1.55em][r]{\large\bfseries 1}}% + }% + }; + \draw[|-|,color=gray] (0,\baselineskip) -- + node [anchor=south] { 3\,em } + (3em,\baselineskip); + \draw[|-|,color=gray,overlay] (\linewidth,\ht\strutbox) -- + node [anchor=south] { \Macro{@pnumwidth} } + (\linewidth-1.55em,\ht\strutbox); + \large\bfseries + \draw[|-|,color=gray,overlay] (\linewidth,-\baselineskip) -- + node [anchor=north,font=\normalfont\normalsize] { + \Macro{large}\Macro{@pnumwidth} + } + (\linewidth-1.55em,-\baselineskip); + \end{tikzpicture}% + } + \caption{Illustrations of some attributes of a TOC entry with style + \PValue{largetocline}} + \label{fig:tocbasic.largetocline} + \end{figure} +\item[\PValue{tocline}] is a flexible style. The \KOMAScript{} classes use + this style by default for all kinds of entries. Likewise, these classes + define the clones \PValue{part}, \PValue{chapter}, and \PValue{section}, or + \PValue{section} and \PValue{subsection} using this style, but add extra + \PName{initial code} to the clones to change their defaults. + + The style supports 20\important{\PValue{level}, \PValue{beforeskip}, + \PValue{breakafternumber}, \PValue{dynindent}, \PValue{dynnumwidth}, + \PValue{entryformat}, \PValue{entrynumberformat}, \PValue{indent}, + \PValue{indentfollows}, \PValue{linefill}, \PValue{numsep}, + \PValue{numwidth}, \PValue{onstarthigherlevel}, + \PValue{onstartlowerlevel}, \PValue{onstartsamelevel}, + \PValue{pagenumberbox}, \PValue{pagenumberformat}, + \PValue{pagenumberwidth}, \PValue{raggedentrytext}, + \PValue{raggedpagenumber}, \PValue{rightindent}} additional attributes in + addition to the default \PValue{level} attribute. The defaults of all these + attributes depend on the name of the \PName{entry level} and correspond to + the results of the standard classes. So after loading \Package{tocbasic}, + you can change the style of the entries in the table of contents of the + standard classes into \PValue{tocline} using + \DescRef{\LabelBase.cmd.DeclareTOCEntryStyle} without this leading directly + to major changes in their appearance. Thus you can precisely change only + those attributes that are necessary for the desired changes. The same + applies to the list of figures and the list of tables for the standard + classes. + + Because its great flexibility, this style can in principle replace the + \PValue{dottedtocline}, \PValue{undottedtocline}, and \PValue{largetocline} + styles, but this requires more effort to configure. + + \hyperref[fig:tocbasic.tocline]% + {Figure~\ref*{fig:tocbasic.tocline}} illustrates some of the length + attributes of this style. The others are explained in + \autoref{tab:tocbasic.tocstyle.attributes} starting on + \autopageref{tab:tocbasic.tocstyle.attributes}. + \begin{figure} + \centering + \resizebox{.8\linewidth}{!}{% + \begin{tikzpicture} + \coordinate (subsection) at (0,0); + \coordinate (section) at ($(subsection)+(0,2\baselineskip)$); + \coordinate (chapter) at ($(section)+(0,2\baselineskip)$); + \coordinate (part) at ($(chapter)+(0,2.4\baselineskip+1em)$); + + \draw[color=lightgray] + ($(part)+(0,2\baselineskip)$) -- + (0,-2.5\baselineskip); + \draw[color=lightgray] + ($(part)+(\linewidth,2\baselineskip)$) -- + (\linewidth,-2.5\baselineskip); + + \coordinate (subsection) at (0,0); + + \node at (part) [anchor=west,inner sep=0,outer sep=0] + {% + \hspace*{3em}% + \parbox[t]{\dimexpr\linewidth-5.55em}{% + \setlength{\parindent}{-3em}% + \addtolength{\parfillskip}{-2.55em}% + \makebox[3em][l]{\large\bfseries I.}% + \textbf{\large Text of a part entry with the + \PValue{tocline} style and at least two lines of text}% + \hfill + \makebox[1.55em][r]{\bfseries 12}\large + }% + }; + \draw[|-|,color=gray,overlay] + (part) -- + ($(part)+(3em,0)$) + node [anchor=north east,font=\small] { + \PValue{numwidth} + }; + \draw[|-|,color=gray,overlay] + ($(part)+(\linewidth,\ht\strutbox)$) + node [anchor=north,font=\small] { + \Macro{@tocrmarg} + } -- + ($(part)+(\linewidth-2.55em,\ht\strutbox)$); + \draw[|-|,color=gray,overlay] + ($(part)+(\linewidth,-\baselineskip)$) -- + node [anchor=north,font=\small] { + \Macro{@pnumwidth} + } + ($(part)+(\linewidth-1.55em,-\baselineskip)$); + \node at (chapter) [anchor=west,inner sep=0,outer sep=0] + {% + \hspace*{1.5em}% + \parbox[t]{\dimexpr\linewidth-4.05em}{% + \setlength{\parindent}{-1.5em}% + \addtolength{\parfillskip}{-2.55em}% + \makebox[1.5em][l]{\bfseries 1.}% + \textbf{Text of a chapter entry with the + \PValue{tocline} style and more than one line of text + for demonstration purposes}% + \hfill + \makebox[1.55em][r]{\bfseries 12}% + }% + }; + \draw[|-|,color=gray,overlay] + ($(chapter)+(3em,\baselineskip)$) -- + node [anchor=west,font=\small] { + \PValue{beforeskip} + } + ($(part)+(3em,-\baselineskip)$); + \draw[|-|,color=gray,overlay] + (chapter) -- + ($(chapter)+(1.5em,0)$) + node [anchor=north east,font=\small] { + \PValue{numwidth} + }; + \draw[|-|,color=gray,overlay] + ($(chapter)+(\linewidth,\ht\strutbox)$) + node [anchor=north,font=\small] { + \Macro{@tocrmarg} + } -- + ($(chapter)+(\linewidth-2.55em,\ht\strutbox)$); + \draw[|-|,color=gray,overlay] + ($(chapter)+(\linewidth,-\baselineskip)$) + node [anchor=north,font=\small] { + \Macro{@pnumwidth} + } -- + ($(chapter)+(\linewidth-1.55em,-\baselineskip)$); + \node at (section) [anchor=west,inner sep=0,outer sep=0] + { + \hspace*{3.8em}% + \parbox[t]{\dimexpr\linewidth-6.35em}{% + \setlength{\parindent}{-2.3em}% + \addtolength{\parfillskip}{-2.55em}% + \makebox[2.3em][l]{1.1.}% + Text of a section entry with the \PValue{tocline} + style and more than one line of text for + demonstration purposes% + \leaders\hbox{$\csname m@th\endcsname + \mkern 4.5mu\hbox{.}\mkern 4.5mu$}\hfill\nobreak + \makebox[1.55em][r]{3}% + }% + }; + \node at (subsection) [anchor=west,inner sep=0,outer sep=0] + {% + \hspace*{7em}% + \parbox[t]{\dimexpr\linewidth-9.55em}{% + \setlength{\parindent}{-3.2em}% + \addtolength{\parfillskip}{-2.55em}% + \makebox[3.2em][l]{1.1.10.}% + Text of a subsection entry with the \PValue{tocline} + and more than one line of text for demonstration + purposes% + \leaders\hbox{$\csname m@th\endcsname + \mkern 4.5mu\hbox{.}\mkern 4.5mu$}\hfill\nobreak + \makebox[1.55em][r]{12}% + }% + }; + \draw[|-|,color=gray,overlay] + ($(subsection)+(0,\ht\strutbox)$) -- + node [anchor=north,font=\small] { + \PValue{indent} + } + ($(subsection)+(3.8em,\ht\strutbox)$); + \draw[|-|,color=gray,overlay] + ($(subsection)+(3.8em,0)$) -- + ($(subsection)+(7em,0)$) + node [anchor=north east,font=\small] { + \PValue{numwidth} + }; + \draw[|-|,color=gray,overlay] + ($(subsection)+(\linewidth,\ht\strutbox)$) + node [anchor=north,font=\small] { + \Macro{@tocrmarg} + } -- + ($(subsection)+(\linewidth-2.55em,\ht\strutbox)$); + \draw[|-|,color=gray,overlay] + ($(subsection)+(\linewidth,-\baselineskip)$) -- + node [anchor=north,font=\small] { + \Macro{@pnumwidth} + } + ($(subsection)+(\linewidth-1.55em,-\baselineskip)$); + \end{tikzpicture}% + } + \caption{Illustrations of some attributes of a TOC entry with the + \PValue{tocline} style} + \label{fig:tocbasic.tocline} + \end{figure} +\item[\PValue{toctext}]\ChangedAt{v3.27}{\Package{tocbasic}}% + is a special feature. While all other styles produce one paragraph per + entry, this one produces one paragraph for all successive entries of this + style. With 14\important{\PValue{afterpar}, \PValue{beforeskip}, + \PValue{entryformat}, + \PValue{entrynumberformat}, \PValue{indent}, \PValue{numsep}, + \PValue{onendentry}, \PValue{onendlastentry}, \PValue{onstartentry}, + \PValue{onstartfirstentry}, \PValue{pagenumberformat}, + \PValue{prepagenumber}, \PValue{raggedright}, \PValue{rightindent}} + attributes in addition to the default \PValue{level} attribute, there are + almost as many options as for \PValue{tocline}. However, this style + depends on the fact that an unfinished paragraph will be concluded at the + beginning of the entry for all other styles, as well as at the end of the + current content list. So it should never be combined with entries or content + lists that are generated outside of \Package{tocbasic}. +\item[\PValue{undottedtocline}] is similar to the style used by the standard + \Class{book} and \Class{report} classes for the \PValue{chapter} entry + level, or by \Class{article} for the \PValue{section} entry level in the + table of contents. It supports\important{\PValue{level}, \PValue{indent}, + \PValue{numwidth}} only three attributes. A penalty is inserted permitting + an appropriate page break before the entry, as is a vertical skip. The + entries are printed with an indentation of \PValue{indent} from the left and + in \Macro{bfseries}. This is a departure from the standard classes, which do + not support the indentation of these entry levels. + \DescRef{\LabelBase.cmd.numberline} is used unchanged. The width of the + entry number is determined by \PValue{numwidth}. For multi-line entries the + indent will be increased by the value of \PValue{numwidth} for the second + and following lines. \hyperref[fig:tocbasic.undottedtocline]% + {Figure~\ref*{fig:tocbasic.undottedtocline}} illustrates the attributes of + this style. + \begin{figure} + \centering + \resizebox{.8\linewidth}{!}{% + \begin{tikzpicture} + \draw[color=lightgray] (0,2\baselineskip) -- (0,-2.5\baselineskip); + \draw[color=lightgray] (\linewidth,2\baselineskip) -- + (\linewidth,-2.5\baselineskip); + \node (undottedtocline) at (0,0) [anchor=west,inner sep=0,outer sep=0] + {% + \makebox[1.5em][l]{\bfseries 1}% + \parbox[t]{\dimexpr \linewidth-4.05em\relax}{% + \bfseries + Text of an entry to the table of contents with the + \PValue{undottedtocline} style and more than one line% + }% + \raisebox{-\baselineskip}{\makebox[2.55em][r]{\bfseries 3}}% + }; + \draw[|-|,color=gray,overlay] (0,\baselineskip) -- + node [anchor=south,font=\small] { + \PValue{numwidth} + } + (1.5em,\baselineskip); + \draw[|-|,color=gray,overlay] (\linewidth,\ht\strutbox) -- + node [anchor=south,font=\small] { + \Macro{@tocrmarg} + } + (\linewidth-2.55em,\ht\strutbox); + \draw[|-|,color=gray,overlay] (\linewidth,-\baselineskip) -- + node [anchor=north,font=\small] { + \Macro{@pnumwidth} + } + (\linewidth-1.55em,-\baselineskip); + \end{tikzpicture}% + } + \caption{Illustration of some attributes of the \PValue{undottedtocline} + style with the example of a chapter title}% + \label{fig:tocbasic.undottedtocline} + \end{figure} +\end{description} +You can find an explanation of the attributes of all styles that +\Package{tocbasic} defines in \autoref{tab:tocbasic.tocstyle.attributes}. +In\ChangedAt{v3.27}{\Package{tocbasic}} addition to the usual assignment with +\Option{\PName{key}=\PName{value}}, both commands understand an assignment in +the form \Option{\PName{key}:=\PName{entry level}} for all options of the +\KOMAScript{} styles. In this case, the current setting of \PName{key} for the +\PName{entry level} will be copied. For example, you can copy the current +indent of the \PValue{figure} level using \OptionValue{indent:}{figure}. For +options that expect a length or integer value, you can also use +\Option{\PName{key}+=\PName{value}} to add \PName{value} to the current setting +of the \PName{key}. To subtract simply, you can use a negative \PName{value}. +For example, with \OptionValue{indent+}{1cm} you can increase the indent by +1\Unit{cm}. For options that expect a list value, you can use +\Option{\PName{key}+=\PName{value}} to append \PName{value} to the current +setting of the \PName{key}. + +If\ChangedAt{v3.21}{\Package{tocbasic}} you use these attributes as +options to \DescRef{\LabelBase.cmd.DeclareNewTOC} (see +\DescPageRef{\LabelBase.cmd.DeclareNewTOC}), you must prefix the names of the +attributes with \PValue{tocentry}, e\,g., \PValue{level} becomes +\Option{tocentrylevel}. The copy operation with \Option{:=} described above is +also available here. However, addition with \Option{+=} is not currently +supported. + +If\ChangedAt{v3.20}{\Package{tocbasic}} you use +these attributes as options for +\DescRef{maincls-experts.cmd.DeclareSectionCommand}% +\IndexCmd{DeclareSectionCommand}\IndexCmd{DeclareNewSectionCommand}% +\IndexCmd{RedeclareSectionCommand}\IndexCmd{ProvideSectionCommand} (see +\DescPageRef{maincls-experts.cmd.DeclareSectionCommand}) and similar commands, +you must prefix the names of the attributes with \PValue{toc}, e\,g. +\PValue{level} becomes \Option{toclevel}. +At this time, neither the copy operation with \Option{:=} nor the +addition operation with \Option{+=} is supported. + +Finally, using \Macro{DeclareTOCStyleEntry} will define the internal command +\Macro{l@\PName{entry level}}. + +\begin{desclist} + \desccaption{% + Attributes of the predefined TOC-entry styles of \Package{tocbasic}% + \label{tab:tocbasic.tocstyle.attributes}% + }{% + Attributes of the TOC-entry styles (\emph{continued})% + }% + \entry{\OptionVName{afterpar}{code}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + The specified \PName{code} will be executed after the end of the paragraph + in which an entry with the \PValue{toctext} style is printed. If several + entries have such settings, their code will be executed in the order of + the entries.% + }% + \entry{\OptionVName{beforeskip}{length}}{% + The vertical distance inserted before an entry of this level in the + \PValue{tocline} style (see \autoref{fig:tocbasic.tocline}). The distance + is made using either \Macro{vskip} or \Macro{addvspace} depending on the + \PName{entry level}, to maintain compatibility as far as possible with the + standard classes and earlier versions of \KOMAScript. + + For the \PValue{part} \PName{entry level}, the attribute will be + initialised with \texttt{2.25em plus 1pt}; for \PValue{chapter}, with + \texttt{1em plus 1pt}. If the \PName{chapter} \PName{entry level} is + undefined, \PValue{section} is initialised with \texttt{1em plus 1pt} + instead. The initial value for all other levels is \texttt{0pt plus + .2pt}.% + + In\ChangedAt{v3.31}{\Package{tocbasic}} the style \PValue{toctext} the + vertical space is inserted before the paragraph if it is the first entry + in the paragraph. It is ignored for all other entries in the paragraph. If + the initialization takes place via this style, \texttt{0pt} is used as + default.% + }% + \entry{\OptionVName{breakafternumber}{switch}}{% + \PName{switch} is one of the values for simple switches from + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. If the + switch is active in the \PValue{tocline} style, there will be a line break + after the number set with + \DescRef{\LabelBase.cmd.numberline}\IndexCmd{numberline}. The line after + the entry number again starts flush left with the number. The default is + false for the \PValue{tocline} style. + + If\textnote{Attention!} the \Option{numberline} feature has been activated + for a content list (see \DescRef{\LabelBase.cmd.setuptoc}, + \autoref{sec:tocbasic.toc}, \DescPageRef{\LabelBase.cmd.setuptoc}), as is + the case with the \KOMAScript{} classes when the + \OptionValueRef{maincls}{toc}{numberline}% + \IndexOption{toc~=\textKValue{numberline}} option is used, then the + unnumbered entries will nevertheless have a (by default empty) number line + using the formatting of \Option{entrynumberformat}.% + }% + \entry{\OptionVName{dynindent}{switch}}{% + \ChangedAt{v3.31}{\Package{tocbasic}}% + \PName{switch} is one of the values for simple switches from + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. If the + switch is active with the \PValue{tocline} style, the \PValue{indent} + attribute only specifies a minimum value. The maximum value is determined + by the number width and the indentation of the levels specified via + \PValue{indentfollows}.% + }% + \entry{\OptionVName{dynnumwidth}{switch}}{% + \PName{switch} is one of the values for simple switches from + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. If the + switch is active with the \PValue{tocline} style, the \PValue{numwidth} + attribute specifies a minimum value. If a previous \LaTeX{} run has + determined that the maximum width of the entry numbers of the same level + plus the value of \PValue{numsep} is greater than this minimum, the + calculated value will be used instead.% + }% + \entry{\OptionVName{entryformat}{command}}{% + You can use this attributes to change the format of the entry. The value + should be a \PName{command} with exactly one argument. This argument is + not necessarily fully expandable. You should not use commands like + \Macro{MakeUppercase}, which expects a fully expandable argument. Font + changes are relative to \Macro{normalfont}\Macro{normalsize}. Note that + the output of \Option{linefill} and the page number are independent of + \Option{entryformat}. See also the \Option{pagenumberformat} attribute . + + The initial value of the attribute for the \PValue{part} \PName{entry + level} is \Macro{large}\Macro{bfseries}, and for \PValue{chapter}, it is + \Macro{bfseries}. If the \PValue{chapter} level is not defined, + \PValue{section} uses \Macro{bfseries}. All other levels print the + argument unchanged.% + }% + \entry{\OptionVName{entrynumberformat}{command}}{% + You can use this attribute to format the entry number within + \DescRef{\LabelBase.cmd.numberline}. The value should be a \PName{command} + with exactly one argument. Font changes are relative to the one of + attribute \Option{entryformat}. + + The initial \PName{command} prints the argument unchanged. This means the + entry number will be printed as it is. + + If\textnote{Attention!} the \Option{numberline} feature for a content list + has been activated (see \DescRef{\LabelBase.cmd.setuptoc}, + \autoref{sec:tocbasic.toc}, \DescPageRef{\LabelBase.cmd.setuptoc}), as is + the case with the \KOMAScript{} classes using the + \OptionValueRef{maincls}{toc}{numberline}% + \IndexOption{toc~=\textKValue{numberline}} option, the unnumbered entries + will execute the \PName{command} as well.% + }% + \entry{% + \OptionVName{indent}{length}% + {\phantomsection\label{tab:tocbasic.tocstyle.attributes.indent}}% + }{% + For\ChangedAt{v3.27}{\Package{tocbasic}} the \PValue{toctext} style, the + \PName{length} is the horizontal distance of the paragraph from the left + margin. If different entries within the paragraph have different settings, + the last one is used. For the remaining styles, the \PName{length} is the + horizontal distance of the entry from the left margin (see + \autoref{fig:tocbasic.dottedtocline} and \autoref{fig:tocbasic.tocline}). + + For the styles \PValue{tocline} and \PValue{toctext}, all entry levels + whose names start with ``\texttt{sub}'' are initialised with the + \PValue{indent}+\PValue{numwidth} of the entry level of the same name + without this prefix. For the \PValue{dottedtocline}, + \PValue{undottedtocline}, and \PValue{tocline} styles, the initial values + of levels \PValue{part} down to \PValue{subparagraph} and the levels + \PValue{figure} and \PValue{table} are compatible with the standard + classes. All other levels do not have an initial value. Therefore you have + to set an explicit value for such levels when they are defined first + time. + + If the \PValue{noindent} attribute is set for a content list via + \DescRef{\LabelBase.cmd.setuptoc}, the entries of all styles provided by + \KOMAScript{} enforce the value 0\Unit{pt} to deactivate the indent.% + }% + \entry{\OptionVName{level}{integer}}{% + The numerical value of the \PName{entry level}. Only those entries whose + numerical value is less than or equal to the + \DescRef{\LabelBase.counter.tocdepth}% + \important{\DescRef{\LabelBase.counter.tocdepth}}\IndexCounter{tocdepth} + counter are printed. + + This attribute is mandatory for all styles and will be defined + automatically when the style is declared. + + For the \PValue{tocline} and \PValue{toctext} styles, all entry levels + whose name starts with ``\texttt{sub}'' are initialised with the value of + the entry level of the same name without this prefix plus one. For the + \PValue{dottedtocline}, \PValue{largetocline}, \PValue{tocline}, + \PValue{toctext}, and \PValue{undottedtocline} styles, the entry levels + from \PValue{part} to \PValue{subparagraph}, as well as \PValue{figure} + and \PValue{table}, are initialised to be compatible with the standard + classes. For all other levels, the initialisation is done with the value + of \Macro{\PName{entry level}numdepth}, if this is defined.% + }% + \entry{\OptionVName{indentfollows}{list of levels}}{% + \ChangedAt{v3.31}{\Package{tocbasic}}% + If \Option{dynindent} is set with style \PValue{tocline}, the + comma-separated list of level names specified here is used to determine + the actual indentation. Levels whose names begin with ``\texttt{sub}'' + will be initialized with the name without this prefix. The \KOMAScript{} + classes also automatically set appropriate values for the levels + \PValue{section} and \PValue{paragraph}.% + }% + \entry{\OptionVName{linefill}{code}}{% + With the \PValue{tocline} style, you can change what is used to fill the + space between the end of the entry text and the page number. The + \PName{linefill} attribute contains the \PName{code} that prints this + filler. For the \PValue{part} and \PValue{chapter} \PName{entry level}s, + the attribute is initialised with \Macro{hfill}. If no \PValue{chapter} + \PName{entry level} has been defined, \PValue{section} also uses + \Macro{hfill}. All other entry levels are initialised with + \DescRef{\LabelBase.cmd.TOCLineLeaderFill} (see + \DescPageRef{\LabelBase.cmd.TOCLineLeaderFill}). + + Incidentally, if the \PName{code} specified does not automatically fill + the gap, you should also activate the \PValue{raggedpagenumber} attribute + to avoid ``\texttt{underfull \Macro{hbox}}'' messages.% + }% + \entry{\OptionVName{numsep}{length}}{% + The \PValue{tocline} style tries to ensure a minimum distance of + \PName{length} between the entry number and the entry text. If + \PValue{dynnumwidth} is active, it will correct the number width to + achieve this. Otherwise it simply throws a warning if the condition is not + met. + + The\ChangedAt{v3.27}{\Package{tocbasic}} \PValue{toctext} style, on the + other hand, always adds a horizontal space of width \PName{length} after + the number of the entry. + + The initial \PName{length} is 0.4\Unit{em}.% + }% + \entry{\OptionVName{numwidth}{length}}{% + The width reserved for the entry number (see + \autoref{fig:tocbasic.dottedtocline} to + \autoref{fig:tocbasic.undottedtocline}). With the \PValue{dottedtocline}, + \PValue{tocline}, and \PValue{undottedtocline} styles, this \PName{length} + is added to the \PName{length} of attribute \PValue{indent} for the second + and following lines of the entry text. + + With the \PValue{tocline} style, the initial \PName{length} of all entries + whose name starts with ``\texttt{sub}'' is the value of the level without + this prefix plus 0.9\Unit{em}, if such a level with corresponding + attributes exists. With the \PValue{dottedtocline}, + \PValue{undottedtocline}, and \PValue{tocline} styles, the initial + \PName{length}s of levels from \PValue{part} to \PValue{subparagraph}, as + well as \PName{figure} and \PName{table}, are compatible with those of the + standard classes. All other levels do not have an initial value. Therefore + you must set \PValue{numwidth} explicitly when the entry level is first + used.% + }% + \entry{\OptionVName{onendentry}{code}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + The \PName{code} is executed immediately after an entry with the + \PValue{toctext} style, if this entry is not the last one of the + paragraph. The user must ensure that the \PName{code} does not result in + the paragraph ending. + + Note: In reality the \PName{code} is not executed at the end of the entry + but before the next entry with style \PValue{toctext}.% + }% + \entry{\OptionVName{onendlastentry}{code}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + The \PName{code} is executed immediately before the end of the paragraph + with an entry in the \PValue{toctext} style, as long as this entry is the + last one in the paragraph. The user must ensure that the \PName{code} does + not result in the paragraph ending.% + }% + \entry{\OptionVName{onstartentry}{code}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + The \PName{code} is executed immediately before an entry with the + \PValue{toctext} style, unless it is the first one in the paragraph. The + user must ensure that the \PName{code} does not result in the paragraph + ending.% + }% + \entry{\OptionVName{onstartfirstentry}{code}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + The \PName{code} is executed immediately before an entry with the + \PValue{toctext} style if this entry is the first one of the paragraph. The + user must ensure that the \PName{code} does not result in the paragraph + ending.% + }% + \entry{\OptionVName{onstarthigherlevel}{code}}{% + The \PValue{tocline} style can execute \PName{code} at the start of an + entry, depending on whether the previous entry had numerical level greater + than, the same as, or less than the current entry. The \PName{code} + specified by this attribute will be executed if the current entry has a + greater numerical value, i.\,e. it is lower in the entry hierarchy, than + the previous one. + + Note that detecting the level of the previous entry only works so long as + \Macro{lastpenalty} has not changed since the previous entry. + + The initial \PName{code} is \DescRef{\LabelBase.cmd.LastTOCLevelWasLower} + (see \DescPageRef{\LabelBase.cmd.LastTOCLevelWasLower}).% + }% + \entry{\OptionVName{onstartlowerlevel}{code}}{% + The \PValue{tocline} style can execute \PName{code} at the start of an + entry, depending on whether the previous entry had numerical level greater + than, the same as, or less than the current entry. The \PName{code} + specified by this attribute will be executed if the current entry has a + lower numerical value, i.\,e. it is higher in the entry hierarchy, than + the previous one. + + Note that detecting the level of the previous entry only works so long as + \Macro{lastpenalty} has not changed since the previous entry. + + The initial \PName{code} is \DescRef{\LabelBase.cmd.LastTOCLevelWasHigher} + (see \DescPageRef{\LabelBase.cmd.LastTOCLevelWasHigher}), which usually + favours a page break before the entry.% + }% + \entry{\OptionVName{onstartsamelevel}{code}}{% + The \PValue{tocline} style can execute \PName{code} at the start of an + entry, depending on whether the previous entry had numerical level greater + than, the same as, or less than the current entry. The \PName{code} + specified by this attribute will be executed if the current entry has the + same numerical value, i.\,e. it is on the same level in the entry + hierarchy, as the previous one. + + Note that detecting the level of the previous entry only works so long as + \Macro{lastpenalty} has not changed since the previous entry. + + The initial \PName{code} is \DescRef{\LabelBase.cmd.LastTOCLevelWasSame} + (see \DescPageRef{\LabelBase.cmd.LastTOCLevelWasSame}), which usually + favours a page break before the entry.% + }% + \entry{\OptionVName{pagenumberbox}{command}}{% + By default the page number of an entry is printed flush right in a box + of width \Macro{@pnumwidth}. In the \PValue{tocline} style, you can + change the \PName{command} to print the number using this attribute. The + \PName{command} should expect exactly one argument, the page number. + + This attribute is initialised with the box already mentioned.% + }% + \entry{\OptionVName{pagenumberformat}{command}}{% + You can use this attribute to change the format of the page number of an + entry. The \PName{command} should expect exactly one argument, the page + number. Font changes are relative to the font of \Option{entryformat} + followed by \Macro{normalfont}\Macro{normalsize}. + + The initial \PName{command} of entry level \PValue{part} prints the + argument in \Macro{large}\Macro{bfseries} and of entry level + \PValue{chapter} in \Macro{bfseries}. For classes without + \Macro{l@chapter} \PValue{section} also uses \Macro{bfseries}. The initial + \PName{command} of all other levels prints the argument in + \Macro{normalfont}\Macro{normalcolor}.% + }% + \entry{\OptionVName{pagenumberwidth}{length}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + You can use this attribute to locally change the width of the default box + for the page number of an entry with the style \PValue{tocline} from + \Macro{@pnumwidth} to the specified \PName{length}. Note that if you + change the default page number box with the \Option{pagenumberbox} + attribute, the specified \PName{length} will no longer be used + automatically.% + }% + \entry{\OptionVName{prepagenumber}{code}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + The \PValue{toctext} style executes the \PName{code} between the text and + the page number of the entry. Usually this is used to add a horizontal + space or separator between text and page number.% + + The default is a non-breaking space using \Macro{nonbreakspace}.% + }% + \entry{\OptionVName{raggedentrytext}{switch}}{% + The\ChangedAt{v3.21}{\Package{tocbasic}} \PName{switch} is one of the + values for simple switches from \autoref{tab:truefalseswitch}, + \autopageref{tab:truefalseswitch}. If the switch is active, the + \PValue{tocline} style prints the text of an entry ragged right instead of + fully justified, and only words that are longer than a text line are + automatically hyphenated. + + This \PName{switch} is false by default.% + }% + \entry{\OptionVName{raggedpagenumber}{switch}}{% + The \PName{switch} is one of the values for simple switches from + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. If the + switch is active, the \PValue{tocline} style does not force the page + number to be right justified. + + Depending on the value of \PValue{linefill}, setting this attribute could + affect only whether a warning message appears, or the formatting of the + page number as well. So it is important to set both attributes so that + they correspond. + + By default the \PName{switch} is not activated and therefore corresponds + with an initial value of \Macro{hfill} or + \DescRef{\LabelBase.cmd.TOCLineLeaderFill} for the \PValue{linefill} + attribute.% + }% + \entry{\OptionVName{raggedright}{switch}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + The \PName{switch} is one of the values for simple switches from + \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. If the + switch is active for any entry with the \PValue{toctext} style inside the + same paragraph, the whole paragraph is printed ragged right. + }% + \entry{\OptionVName{rightindent}{length}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + You can use this attribute to locally change the right indent for the text + of an entry with the \PValue{tocline} style from \Macro{@tocrmarg} to the + specified \PName{length}.% + }% +\end{desclist} + +While \Macro{DeclareTOCStyleEntry} defines only one \PName{entry level}, +\Macro{DeclareTOCStyleEntries}\ChangedAt{v3.26}{\Package{tocbasic}} can define +an entire list of \PName{entry level}s in one command. Each entry level in the +comma-separated \PName{entry-level list} is defined with the same \PName{style} +and settings of the given \PName{option list}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{DeclareTOCEntryStyle}\Parameter{style}% + \OParameter{initial code}% + \Parameter{command code}% + \Macro{DefineTOCEntryOption}\Parameter{option}\OParameter{default value}% + \Parameter{code}% + \Macro{DefineTOCEntryBooleanOption}\Parameter{option}% + \OParameter{default value}% + \Parameter{prefix}% + \Parameter{postfix}% + \Parameter{description}%% + %\OParameter{initial code}% + \Macro{DefineTOCEntryCommandOption}\Parameter{option}% + \OParameter{default value}% + \Parameter{prefix}% + \Parameter{postfix}% + \Parameter{description}%% + %\OParameter{initial code}% + \Macro{DefineTOCEntryIfOption}\Parameter{option}% + \OParameter{default value}% + \Parameter{prefix}% + \Parameter{postfix}% + \Parameter{description}%% + %\OParameter{initial code}% + \Macro{DefineTOCEntryLengthOption}\Parameter{option}% + \OParameter{default value}% + \Parameter{prefix}% + \Parameter{postfix}% + \Parameter{description}%% + %\OParameter{initial code}% + \Macro{DefineTOCEntryNumberOption}\Parameter{option}% + \OParameter{default value}% + \Parameter{prefix}% + \Parameter{postfix}% + \Parameter{description}% + %\OParameter{initial code}% +\end{Declaration} +\Macro{DeclareTOCEntryStyle}\ChangedAt{v3.20}{\Package{tocbasic}} is +one of the most complex commands in \KOMAScript. It is therefore explicitly +intended for \LaTeX{} developers and not for ordinary \LaTeX{} users. It lets +you define new a \PName{style} for content-list entries. Usually, entries to +content lists are made using +\Macro{addcontentsline}\IndexCmd{addcontentsline}, or preferably, if you use +\Package{tocbasic}, with +\DescRef{\LabelBase.cmd.addxcontentsline}\IndexCmd{addxcontentsline} (see +\autoref{sec:tocbasic.basics}, \DescPageRef{\LabelBase.cmd.addxcontentsline}). +In both cases \LaTeX{} writes a corresponding +\Macro{contentsline}\IndexCmd{contentsline} to the appropriate auxiliary file. +When reading this auxiliary file, \LaTeX{} then executes a +\Macro{l@\PName{entry level}} command for each \Macro{contentsline}. + +If you later assign a \PName{style} to an entry level using +\DescRef{\LabelBase.cmd.DeclareTOCStyleEntry}, the \PName{initial code} is +executed first, if provided, and then the \PName{command code} for the +definition of \Macro{l@\PName{entry level}}. The \PName{command code} is the +code that will be expanded and executed by \Macro{l@\PName{entry level}}. +Inside \PName{command code} \texttt{\#1} is the name of the TOC entry level +and \texttt{\#\#1} and \texttt{\#\#2} are the arguments of +\Macro{l@\PName{entry level}}. + +The \PName{initial code} serves first to initialise all attributes of the +\PName{style}. Developers should make sure that all attributes are provided +with values here. Only then does \DescRef{\LabelBase.cmd.DeclareTOCStyleEntry} +work without errors if an \PName{option list} is not specified. The second +task of the \PName{initial code} is to define all the options that this +\PName{style} recognises. The \Option{level} option is always defined +automatically. The value of the \Option{level} can be queried within the +\PName{command code} with \Macro{@nameuse}\PParameter{\#1tocdepth}% +\important{\Macro{\PName{entry level}tocdepth}}, for example, to compare it +with the \DescRef{\LabelBase.counter.tocdepth}\IndexCounter{tocdepth} counter. + +To define options for the attributes of the \PName{style} inside the +\PName{initial code}, you can use the commands +\Macro{DefineTOCEntryBooleanOption}, \Macro{DefineTOCEntryCommandOption}, +\Macro{DefineTOCEntryIfOption}, \Macro{DefineTOCEntryLengthOption}, and +\Macro{DefineTOCEntryNumberOption}. These commands each define an +\PName{option} that, when called, defines a macro named +\Macro{\PName{prefix}\PName{entry level}\PName{postfix}} set to the given +value or to the \PName{default value} of the option. The +\Macro{DefineTOCEntryIfOption} command is a somewhat special case. It defines +\Macro{\PName{prefix}\PName{entry level}\PName{postfix}} as a command with two +arguments. If the value passed to the option is one of the activation (true) +values from \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}, +the command expands to the first argument. If the value to the option is a +deactivation (false) value, the command expands to the second argument. + +In\ChangedAt{v3.27}{\Package{tocbasic}} addition to the usual options of the +form \Option{\PName{key}=\PName{value}}, the five +\Macro{DefineTOCEntry\dots Option} commands automatically define options of +the form \Option{\PName{key}:=\PName{entry level}}. These copy the value of +another \PName{entry level} if the value is stored in a macro with the same +\PName{prefix} and \PName{postfix}. For the styles predefined by +\Package{tocbasic}, this is the case for all options of the same name +independent of the name of the style. The commands +\Macro{DefineTOCEntryLengthOption} and \Macro{DefineTOCEntryNumberOption} also +define options of the form \Option{\PName{key}:=\PName{value}}, which are used +to add the new \PName{value} to the value already stored in +\Macro{\PName{prefix}\PName{entry level}\PName{postfix}}. + +The \PName{description} should be a brief message that describes the sense +of the option with some keywords. The \Package{tocbasic} package uses this text +in error messages, warnings, and information output on the terminal and to the +\File{log} file. + +The simplest style of \Package{tocbasic}, \PValue{gobble}, is defined +using: +\begin{lstcode} + \DeclareTOCEntryStyle{gobble}{}% +\end{lstcode} +If you now define an entry level \PValue{dummy} in this style using: +\begin{lstcode} + \DeclareTOCStyleEntry[level=1]{gobble}{dummy} +\end{lstcode} +this would correspond, among other things, to: +\begin{lstcode} + \def\dummytocdepth{1} + \def\l@dummy#1#2{} +\end{lstcode} + +For example, within the \PValue{tocline} style, +\begin{lstcode} + \DefineTOCEntryCommandOption{linefill}[\TOCLineLeaderFill]% + {scr@tso@}{@linefill}{filling between text and page number}% +\end{lstcode} +is used to define the \Option{linefill} option. By specifying +\DescRef{\LabelBase.cmd.TOCLineLeaderFill} as the \PName{default value}, +a call such as +\begin{lstcode} + \DeclareTOCStyleEntry[linefill]{tocline}{part} +\end{lstcode} +would, among other things, create the definition +\begin{lstcode} + \def\scr@tso@part@linefill{\TOCLineLeaderFill} +\end{lstcode} + +If you want to define your own styles, you should first study the definition +of the \PValue{dottedtocline} style. After you understand this definition, you +can find many hints as to how to use the commands effectively in the much more +complex definition of the \PValue{tocline} style. + +However, in many cases it will be sufficient to clone an existing style using +\DescRef{\LabelBase.cmd.CloneTOCEntryStyle} and to change the initial code of +the new style using \DescRef{\LabelBase.cmd.TOCEntryStyleInitCode} or +\DescRef{\LabelBase.cmd.TOCEntryStyleStartInitCode}. + +\Macro{DefineTOCEntryOption} is merely used to define the other commands and +you should not use it directly. Normally, there is no need for it. It is +mentioned here only for the sake of completeness.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{CloneTOCEntryStyle}\Parameter{style}\Parameter{new style}% +\end{Declaration} +With\ChangedAt{v3.20}{\Package{tocbasic}} this command you can clone +an existing \PName{style}. It defines a \PName{new style} with the same +attributes and settings as the existing \PName{style}. The package itself uses +\Macro{CloneTOCEntryStyle} to declare the \PValue{default} style as a clone of +\PValue{dottedtocline}. The \KOMAScript{} classes use the command to declare +the styles \PValue{part}, \PValue{section}, and \PValue{chapter} or +\PValue{subsection} as clones of \PValue{tocline} and then modify them with +\DescRef{\LabelBase.cmd.TOCEntryStyleInitCode} and +\DescRef{\LabelBase.cmd.TOCEntryStyleStartInitCode}. The \Class{scrbook} and +\Class{scrreprt} classes newly declare the \PValue{default} style as a clone +of \PValue{section}, and \Class{scrartcl} declares it as a clone of +\PValue{subsection}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{TOCEntryStyleInitCode}\Parameter{style}% + \Parameter{initial code}% + \Macro{TOCEntryStyleStartInitCode}\Parameter{style}% + \Parameter{initial code} +\end{Declaration} +Every\ChangedAt{v3.20}{\Package{tocbasic}} TOC-entry style has an +initialisation code. This is used whenever a \PName{style} is assigned to an +TOC entry using \DescRef{\LabelBase.cmd.DeclareTOCEntryStyle}. This +\PName{initial code} should not have global side effects, because it is also +used for local initialisation inside other commands like +\DescRef{\LabelBase.cmd.DeclareNewTOC}\IndexCmd{DeclareNewTOC}. The +\PName{initial code} not only defines all attributes of a \PName{style}, but +it also sets the defaults for those attributes. + +You can use \Macro{TOCEntryStyleStartInitCode} and +\Macro{TOCEntryStyleInitCode} to extend previously existing initialisation +code with further \PName{initial code}. \Macro{TOCEntryStyleStartInitCode} +adds \PName{initial code} in front of the existing code. +\Macro{TOCEntryStyleInitCode} adds the \PName{initial code} at the end of the +existing initialisation code. The \KOMAScript{} classes, for example, use +\Macro{TOCEntryStyleStartInitCode} to properly initialise the fill, fonts, and +vertical spacing of the \PValue{part} style cloned from \PValue{tocline}. For +example, the \Class{scrbook} and \Class{scrreprt} classes use +\begin{lstcode} + \CloneTOCEntryStyle{tocline}{section} + \TOCEntryStyleStartInitCode{section}{% + \expandafter\providecommand% + \csname scr@tso@#1@linefill\endcsname + {\TOCLineLeaderFill\relax}% + } +\end{lstcode} +to define \PValue{section} as a modified clone of \PValue{tocline}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{LastTOCLevelWasHigher}% + \Macro{LastTOCLevelWasSame}% + \Macro{LastTOCLevelWasLower} +\end{Declaration} +At\ChangedAt{v3.20}{\Package{tocbasic}} the beginning of entries +using the \PValue{tocline} style, \Package{tocbasic} executes one of these +three commands depending on \Macro{lastpenalty}. \Macro{LastTOCLevelWasHigher} +and \Macro{LastTOCLevelWasSame} used in vertical mode add +\Macro{addpenalty}\PParameter{\Macro{@lowpenalty}} and therefore permit a page +break before an entry with the same or higher hierarchical position. +\Macro{LastTOCLevelWasLower} is empty, so a page break between an entry and +its first sub-entry is not permitted. + +Users should not redefine these commands. Instead, you should change the +behaviour of single entry levels using the \PValue{onstartlowerlevel}, +\PValue{onstartsamelevel}, and \PValue{onstarthigherlevel} attributes.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{TOCLineLeaderFill}\OParameter{leader} +\end{Declaration} +This\ChangedAt{v3.20}{\Package{tocbasic}} command is intended to be +used as a value for the \Option{linefill} option of the \PName{tocline} +TOC-entry style. It creates a connection between the end of the entry text and +the entry's page number. You can specify the \PName{leader}, which is repeated +at regular intervals, as an optional argument. The default is a dot. + +As the name suggests, the command uses \Macro{leaders} to output the +\PName{leader}. The spacing used is defined analogously to the \LaTeX{} kernel +command \Macro{@dottedtocline} by +\Macro{mkern}\Macro{@dotsep}\Unit{\texttt{mu}}.% +\EndIndexGroup +\EndIndexGroup + + +\section{Internal Commands for Class and Package Authors} +\seclabel{internals} + +The \Package{tocbasic} package provides some internal commands for the use of +class and package authors. These commands all begin with the prefix +\Macro{tocbasic@}. But\textnote{Attention!} even class or package authors +should not redefine them! Their inner functioning may be changed or extended +at any time, so redefining these commands could significantly damage the +\Package{tocbasic}'s operation. + +\begin{Declaration} + \Macro{tocbasic@extend@babel}\Parameter{extension} +\end{Declaration} +At every change of the current language, either at the beginning of the +document or inside the document, the \Package{babel}\IndexPackage{babel} +package (see \cite{package:babel}), or rather a \LaTeX{} kernel enhanced by +\Package{babel}'s language management, writes language-switching commands to +the files with the \File{toc}, \File{lof}, and \File{lot} extensions. The +\Package{tocbasic} package extends this mechanism with +\Macro{tocbasic@extend@babel} so that it also works for other file extensions. +The \PName{extension} argument must be completely expanded! Otherwise the +there is a risk that, for example, the meaning of the argument has already +change at the time it is actually evaluated. + +This command is typically invoked by default for every file \PName{extension} +added to the list of known extensions with +\DescRef{\LabelBase.cmd.addtotoclist}. You can suppress this with the +\PValue{nobabel}\important{\PValue{nobabel}} feature (see +\DescRef{\LabelBase.cmd.setuptoc}, \autoref{sec:tocbasic.toc}, +\DescPageRef{\LabelBase.cmd.setuptoc}). \Package{tocbasic} does this +automatically for the extensions \File{toc}, \File{lof}, and \File{lot} to +avoid switching languages twice in the corresponding files. + +There is usually no reason to call this command yourself. However, there could +conceivably be content lists that are not under the control of +\Package{tocbasic} and so are not in \Package{tocbasic}'s list of known file +extensions, but which nevertheless should use \Package{babel}'s language +switching mechanism. You can call the command explicitly for those files. +But\textnote{Attention!} please note that this should be done only once per +file extension!% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasic@starttoc}\Parameter{extension} +\end{Declaration} +This command is the actual replacement for the +\Macro{@starttoc}\IndexCmd{@starttoc}\important{\Macro{@starttoc}} command +from the \LaTeX{} kernel. It is the command behind +\DescRef{\LabelBase.cmd.listoftoc*} (see \autoref{sec:tocbasic.toc}, +\DescPageRef{\LabelBase.cmd.listoftoc*}). Class or package authors who want to +take advantage of \Package{tocbasic} should at least use this command, or even +better, \DescRef{\LabelBase.cmd.listoftoc}. The command uses +\Macro{\@starttoc} internally, but sets +\Length{parskip}\IndexLength{parskip}\important{\Length{parskip}\\ +\Length{parindent}\\ \Length{parfillskip}}, +\Length{parindent}\IndexLength{parindent} to 0, and \Length{parfillskip} to 0 +to infinity. Moreover, +\Macro{@currext}\important{\Macro{@currext}}\IndexCmd{@currext} is set to the +file extension of the current TOC file, so it can be evaluated during the +subsequent execution of the hooks. You can find an explanation of these hooks +below. + +Because\textnote{Attention!} \LaTeX{} opens a new content-list file for +writing after reading that file, calling this command may result in an error +message of the type +\begin{lstoutput} + ! No room for a new \write . + \ch@ck ...\else \errmessage {No room for a new #3} + \fi +\end{lstoutput} +if no more write handles are available. You can solve this problem by loading +the \Package{scrwfile}\important{\Package{scrwfile}}\IndexPackage{scrwfile} +package described in \autoref{cha:scrwfile}, or by using Lua\LaTeX{}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasic@@before@hook}% + \Macro{tocbasic@@after@hook} +\end{Declaration} +The \Macro{tocbasic@@before@hook} hook is executed immediately before reading +an auxiliary file for a content list, before executing the commands defined +with \DescRef{\LabelBase.cmd.BeforeStartingTOC} command. You can extend this +hook using \Macro{g@addto@macro}\IndexCmd{g@addto@macro}. + +Similarly, \Macro{tocbasic@@after@hook} is executed immediately after reading +such an auxiliary file and before executing the commands defined with +\DescRef{\LabelBase.cmd.AfterStartingTOC}. You can extend this hook using +\Macro{g@addto@macro}\IndexCmd{g@addto@macro}. + +\KOMAScript{} uses these hooks to dynamically adjust content lists to the +width of the heading numbers. Only classes and packages should use these +hooks. Users\textnote{Attention!} should really use +\DescRef{\LabelBase.cmd.BeforeStartingTOC} and +\DescRef{\LabelBase.cmd.AfterStartingTOC} instead. Authors of packages should +also prefer these commands. These hooks should not be used to generate any +output! + +If neither\textnote{Attention!} \DescRef{\LabelBase.cmd.listofeachtoc} nor +\DescRef{\LabelBase.cmd.listoftoc} nor \DescRef{\LabelBase.cmd.listoftoc*} are +used to output the content list, the hooks should be executed explicitly.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasic@\PName{extension}@before@hook}% + \Macro{tocbasic@\PName{extension}@after@hook} +\end{Declaration} +These hooks are executed directly after +\DescRef{\LabelBase.cmd.tocbasic@@before@hook} or before +\DescRef{\LabelBase.cmd.tocbasic@@after@hook} for the TOC file with the +corresponding file \PName{extension}. Class\textnote{Attention!} and package +authors should never change them under any circumstances! If +neither\textnote{Attention!} \DescRef{\LabelBase.cmd.listofeachtoc} nor +\DescRef{\LabelBase.cmd.listoftoc} nor \DescRef{\LabelBase.cmd.listoftoc*} are +used to output a content list, the hooks should nevertheless be called, if +they are defined. These commands can be undefined.% +\iffalse % With current LaTeX you can simply use \@ifundefined +For an appropriate test, see \DescRef{scrbase.cmd.Ifundefinedorrelax}% +\IndexCmd{Ifundefinedorrelax} in \autoref{sec:scrbase.if}, +\DescPageRef{scrbase.cmd.Ifundefinedorrelax}.% +\fi% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasic@listhead}\Parameter{title} +\end{Declaration} +This command is used by \DescRef{\LabelBase.cmd.listoftoc} and +\DescRef{\LabelBase.cmd.listofeachtoc} to set the heading of the content list. +This can be either the default heading of the \Package{tocbasic} package or a +custom definition. If you define your own command for the heading, you can +also use \Macro{tocbasic@listhead}. In this case, you should define +\Macro{@currext}\important{\Macro{@currext}}\IndexCmd{@currext} to be the file +extension of the corresponding TOC file before using +\Macro{tocbasic@listhead}.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasic@listhead@\PName{extension}}\Parameter{title} +\end{Declaration} +This command is used in \DescRef{\LabelBase.cmd.tocbasic@listhead} to set the +individual headings, optional table of contents entry, and running head, if it +is defined. Otherwise, \DescRef{\LabelBase.cmd.tocbasic@listhead} defines them +before their use.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasic@addxcontentsline}% + \Parameter{extension}\Parameter{level}\Parameter{number}\Parameter{text}% + \Macro{nonumberline} +\end{Declaration} +The\ChangedAt{v3.12}{\Package{tocbasic}} \Macro{tocbasic@addxcontentsline} +command creates entry of the specified level in the TOC file with the given +\PName{extension}. Whether the entry is numbered or not depends on whether or +not the \PName{number} argument is empty. In this case the \PName{text} will +be prefixed by \Macro{nonumberline} without any argument. Otherwise, +\DescRef{\LabelBase.cmd.numberline} with the \PName{number} argument will used +as usual. + +The \Macro{nonumberline} command is redefined inside +\DescRef{\LabelBase.cmd.listoftoc} (see \autoref{sec:tocbasic.toc}, +\DescPageRef{\LabelBase.cmd.listoftoc}) depending on the \PValue{numberline} +feature (see \autoref{sec:tocbasic.toc}, +\DescPageRef{\LabelBase.cmd.setuptoc}). As a result, changing this feature +results in changes of the corresponding TOC immediately at the next \LaTeX{} +run.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{tocbasic@DependOnPenaltyAndTOCLevel}\Parameter{entry level}% + \Macro{tocbasic@SetPenaltyByTOCLevel}\Parameter{entry level} +\end{Declaration} +The\ChangedAt{v3.20}{\Package{tocbasic}} \PValue{tocline} +content-list style (see \autoref{sec:tocbasic.tocstyle}) sets a +\Macro{penalty} at the end of each entry via +\Macro{tocbasic@SetPenaltyByTOCLevel} so that no page break can occur after an +entry. The exact value chosen depends on the \PName{entry level}. + +At the beginning of an entry, \Macro{tocbasic@DependOnPenaltyAndTOCLevel} is +used to execute the value of the \Option{onstartlowerlevel}, the +\Option{onstartsamelevel}, or the \Option{onstarthigherlevel} style option, +depending on \Macro{lastpenalty} and the current \PName{entry level}. By +default, the first two permit a page break when executed in vertical mode. + +Developers of \PValue{tocline}-compatible styles should copy this behaviour. +To do so, they can fall back on these internal macros.% +\EndIndexGroup + + +\section{A Complete Example} +\seclabel{example} + +This section provides a complete example of how to define your own floating +environment including an associated content list and \KOMAScript{} integration +using \Package{tocbasic}. This example uses internal commands, that is, they +have a ``\texttt{@}'' in their name. This means\textnote{Attention}, that you +must either put the code into a package or class or placed it between +\Macro{makeatletter}\important[i]{\Macro{makeatletter}\\\Macro{makeatother}}% +\IndexCmd{makeatletter} and \Macro{makeatother}\IndexCmd{makeatother}. + +First\textnote{environment}, we need a new floating environment. +That's easy with the following: +\begin{lstcode} + \newenvironment{remarkbox}{% + \@float{remarkbox}% + }{% + \end@float + } +\end{lstcode} +The new environment is named \Environment{remarkbox}. + +Each\textnote{placement} floating environment has a default placement. It +consists of one or more of the well-known placement options: \PValue{b}, + \PValue{h}, \PValue{p} and \PValue{t}. +\begin{lstcode} + \newcommand*{\fps@remarkbox}{tbp} +\end{lstcode} +The new floating environment should be placed by default only either at +the top of a page, at the bottom of a page, or on a separate page. + +Floating\textnote{type} environments also have a numerical floating +type between 1 and 31. Environments with the same active bit at the floating type cannot change +their order. Figures and tables normally use type~1 and 2. So a figure that +comes later in the source code than a table may be output earlier than the +table and vice versa. +\begin{lstcode} + \newcommand*{\ftype@remarkbox}{4} +\end{lstcode} +The new environment has floating type~4, so it may pass figures and floats and +may be passed by those. + +The\textnote{number} captions of floating environment also have numbers. +\begin{lstcode} + \newcounter{remarkbox} + \newcommand*{\remarkboxformat}{% + Remark~\theremarkbox\csname autodot\endcsname} + \newcommand*{\fnum@remarkbox}{\remarkboxformat} +\end{lstcode} +Here, a new counter is defined first, which is independent of the chapters +or the counters of other structural levels. \LaTeX{} itself also defines +\Macro{theremarkbox} with the default output as an Arabic number. +This is then used to define the formatted output of the +counter. The formatted output is again defined as a floating-point +number for use in the \DescRef{maincls.cmd.caption} command. + +Floating\textnote{file name extension} environments have their own content lists +and those need an auxiliary file named \Macro{jobname} and a file +extension: +\begin{lstcode} + \newcommand*{\ext@remarkbox}{lor} +\end{lstcode} +As the file extension, we use ``\File{lor}''. + +With this, the floating environment works. But the content list of +is still missing. So that we do not have to implement it ourselves, we +use the \Package{tocbasic} package. This is loaded with +\begin{lstcode} + \usepackage{tocbasic} +\end{lstcode} +inside of document preambles. Class or package authors would use +\begin{lstcode} + \RequirePackage{tocbasic} +\end{lstcode} +instead. + +Now\textnote{extension} we register the file name extension with the +\Package{tocbasic} package: +\begin{lstcode} + \addtotoclist[float]{lor} +\end{lstcode} +We use \PValue{float} as the owner so that all options of \KOMAScript{} +classes that relate to lists of floating environments also apply to the new +content list. + +Next\textnote{title} we define a title or heading for this content list: +\begin{lstcode} + \newcommand*{\listoflorname}{List of Remarks} +\end{lstcode} +When working with multiple languages, the normal practice is to define an +English title first and then, for example with the help of the +\Package{scrbase} package, to add titles for all the other languages you want +to support. See \autoref{sec:scrbase.languageSupport}, starting on +\autopageref{sec:scrbase.languageSupport}. + +Now\textnote{entry} all we have to do is define what a single entry in the +content list should look like: +\begin{lstcode} + \newcommand*{\l@remarkbox}{\l@figure} +\end{lstcode} +This specifies that entries in the list of remarks should look exactly like the +entries in the list of figures. This would be the easiest solution. A more +explicit definition would be something like: +\begin{lstcode} + \DeclareTOCStyleEntry[level=1,indent=1em,numwidth=1.5em]% + {tocline}{remarkbox} +\end{lstcode} + +You\textnote{chapter entry} also want chapter entries to affect the content +list. +\begin{lstcode} + \setuptoc{lor}{chapteratlist} +\end{lstcode} +Setting this property allows this when you use a \KOMAScript{} class, and other class +that supports this property. Unfortunately, the standard classes do not. + +This\textnote{list of remarks} should be enough. Users can now +select different kinds of headings using the corresponding options of +the \KOMAScript{} classes or \DescRef{\LabelBase.cmd.setuptoc}, (e.\,g. with +or without an entry in the table of contents, with or without numbering). But +with a simple +\begin{lstcode} + \newcommand*{\listofremarkboxes}{\listoftoc{lor}} +\end{lstcode} +you can simplify the usage even more. + +As you've seen, just five one-line commands, of which only three or four are +really necessary, refer to the content list. Nevertheless, the new list of +remarks already provides the ability to place both numbered and unnumbered +entries into the table of contents.You can use a lower sectioning level for +the headings. Running heads are set for the \KOMAScript{} classes, the +standard classes, and all classes that explicitly support \Package{tocbasic}. +Supporting classes even pay attention to this new list of remarks at each new +\DescRef{maincls.cmd.chapter}. Even changes to the current language made with +\Package{babel} are included in the list of remarks. + +Of course\textnote{additional features}, package authors can add more +features. For example, they could explicitly offer options to hide +\DescRef{\LabelBase.cmd.setuptoc} from users. Or they can refer to the +\Package{tocbasic} manual when explaining the appropriate features. The +advantage of this is that users automatically benefit from any future +extensions to \Package{tocbasic}. However, if you do not want to burden the +user with the fact that the file extension \File{lor} is used for the key +terms, then +\begin{lstcode} + \newcommand*{\setupremarkboxes}{\setuptoc{lor}} +\end{lstcode} +is sufficient to set a list of features passed as an argument to +\Macro{setupremarkboxes} as a list of features for the file extension +\File{lor}. + +\section{Everything with Only One Command} +\label{sec:tocbasic.declarenewtoc} + +The example in the previous section has shows that \Package{tocbasic} makes it +easy to define your own floating environments with their own content lists. +This section shows how it can be even easier. + +\begin{Declaration} + \Macro{DeclareNewTOC}\OParameter{options}\Parameter{extension} +\end{Declaration} +This command declares\ChangedAt{v3.06}{\Package{tocbasic}} a new content list, +its heading, and the description of the entries controlled by +\Package{tocbasic} all in a single step. Optionally, you can also define +floating and non-floating environments at the same time. Inside of both such +environments, \DescRef{maincls.cmd.caption}% +\important{\DescRef{maincls.cmd.caption}}\IndexCmd{caption} creates entries +for this new content list. You can also use the \KOMAScript{} extensions +\DescRef{maincls.cmd.captionabove}\important[i]{% + \DescRef{maincls.cmd.captionabove}\\ + \DescRef{maincls.cmd.captionbelow}}, \DescRef{maincls.cmd.captionbelow}, and +\DescRef{maincls.env.captionbeside} (see \autoref{sec:maincls.floats}). + +The \PName{extension} argument is the file extension of the TOC file that +represents the content list, as explained in \autoref{sec:tocbasic.basics}. +This argument is mandatory and must not be empty! + +The \PName{options} argument is a comma-separated list, of the same type as, +for example, \DescRef{maincls.cmd.KOMAoptions} (see +\autoref{sec:typearea.options}). However\textnote{Attention!}, those options +cannot be set using \DescRef{maincls.cmd.KOMAoptions}\IndexCmd{KOMAoptions}! +You can find an overview of all available options in +\autoref{tab:tocbasic.DeclareNewTOC-options}. + +If\ChangedAt{v3.20}{\Package{tocbasic}} the \Option{tocentrystyle} +option is not used, the \PValue{default} style will be used if required. For +information about this style, see \autoref{sec:tocbasic.tocstyle}. If you do +not want to define a command for entries to the content list, you can use an +empty argument, i.\,e. \OptionValue{tocentrystyle}{} or +\OptionValue{tocentrystyle}{\PParameter{}}. + +Depending\ChangedAt{v3.20}{\Package{tocbasic}}% +\ChangedAt{v3.21}{\Package{tocbasic}} on the style of the entries to +the content list, you can set all valid attributes of the selected style as +part of the \PName{options}. To do so, you must add the prefix +\PValue{tocentry} to the names of the attributes given in +\autoref{tab:tocbasic.tocstyle.attributes}, starting on +\autopageref{tab:tocbasic.tocstyle.attributes}. You can make later changes to +the style of the entries at any time using +\DescRef{\LabelBase.cmd.DeclareTOCStyleEntry}% +\IndexCmd{DeclareTOCStyleEntry}% +\important{\DescRef{\LabelBase.cmd.DeclareTOCStyleEntry}}. See +\autoref{sec:tocbasic.tocstyle}, +\DescPageRef{\LabelBase.cmd.DeclareTOCStyleEntry} for more information about +the styles.% +% +\begin{desclist} + \renewcommand*{\abovecaptionskipcorrection}{-\normalbaselineskip}% + \desccaption[{Options for command \Macro{DeclareNewTOC}}]{% + Options for the + \Macro{DeclareNewTOC}\ChangedAt{v3.06}{\Package{tocbasic}} command% + \label{tab:tocbasic.DeclareNewTOC-options}% + }{% + Options for the \Macro{DeclareNewTOC} command (\emph{continued})% + }% + \entry{\OptionVName{atbegin}{commands}% + \ChangedAt{v3.09}{\Package{tocbasic}}}{% + The \PName{commands} will be executed at the begin of the floating or + non-floating environment.% + }% + \entry{\OptionVName{atend}{commands}% + \ChangedAt{v3.09}{\Package{tocbasic}}}{% + The \PName{commands} will be executed at the end of the floating or + non-floating environment.% + }% + \entry{\OptionVName{category}{string}}{% + \ChangedAt{v3.27}{\Package{tocbasic}}% + This option can be used as a synonym for \OptionVName{owner}{string}.% + }% + \entry{\OptionVName{counterwithin}{\LaTeX{} counter}}{% + If you define a new floating or non-floating environment, a new counter + \Counter{\PName{type}} will be created as well (see option + \Option{type}). You can make this counter dependent on another + \PName{\LaTeX{} counter} in the same way, for example, that the + \Counter{figure} counter in the \Class{book} classes is dependent on the + \Counter{chapter} counter. A\ChangedAt{v3.35}{\Package{tocbasic}} setting + \OptionValue{counterwithin}{chapter} is used for classes with + \DescRef{maincls.cmd.chapter}\IndexCmd{chapter} only in the main matter + (see \DescRef{maincls.cmd.frontmatter}\IndexCmd{frontmatter}, + \DescRef{maincls.cmd.mainmatter} and + \DescRef{maincls.cmd.backmatter}\IndexCmd{backmatter} in + \autoref{sec:maincls.separation}, \DescPageRef{maincls.cmd.frontmatter}) + and only if the counter \Counter{chapter}\IndexCounter{chapter} is greater + than zero at output. For classes without \DescRef{maincls.cmd.chapter} + this applies accordingly to the \OptionValue{counterwithin}{section} + setting and counter + \Counter{section}\IndexCounter{section}\IndexCmd{section}.% + }% + \entry{\Option{float}}{% + If set, defines a new content list and a floating environment, both named + \PName{type}, and an environment for double-column floats named + \PName{type*}.% + }% + \entry{\OptionVName{floatpos}{float positions}}{% + Each floating environment has default \PName{float positions} that can be + changed through the optional argument of the floating environment. The + syntax and semantics are identical to those of the standard floating + environments. If the option is not used, the default \PName{float + positions} are ``\texttt{tbp}'', that is \emph{top}, \emph{bottom}, + \emph{page}.% + }% + \entry{\OptionVName{floattype}{number}}{% + Each floating environment has a \PName{number}. Floating environments + where only different bits are set can be moved past each other. The + floating environments \Environment{figure} and \Environment{table} usually + have the types 1 and 2, so they can move past each other. The numerical + float type can be between 1 and 31. If common bits are set, the float + types cannot be reordred. If no float type is given, the greatest possible + one-bit type, 16, will be used.% + }% + \entry{\Option{forcenames}}{% + If set, the names will be defined even if they were already defined + before.% + }% + \entry{\OptionVName{hang}{length}}{% + \ChangedAt{v3.20}{\Package{tocbasic}}% + \ChangedAt{v3.21}{\Package{tocbasic}}% + This option has been deprecated since \KOMAScript~3.20. Instead, the + amount of the hanging indent of entries to the content list\index{content + list>entry} depends on attributes of the TOC-entry style given by the + \Option{tocentrystyle} option. The \KOMAScript{} styles provide the + \PValue{numwidth} attribute. If the style used has such an attribute, + \Macro{DeclareNewTOC} will initialise it with a default of 1.5\Unit{em}. + You can easily change the \PName{value} using + \OptionVName{tocentrynumwidth}{value}. The \KOMAScript{} classes, for + example, use \OptionValue{tocentrynumwidth}{2.3em}.% + }% + \entry{\OptionVName{indent}{length}}{% + \ChangedAt{v3.20}{\Package{tocbasic}}% + \ChangedAt{v3.21}{\Package{tocbasic}}% + This option has been deprecated since \KOMAScript~3.20. Instead, the + amount that entries to the content list\index{content list>entry} are + indented depends on attributes of the TOC-entry style given by the + \Option{tocentrystyle} option. The \KOMAScript{} styles provide the + \PValue{indent} attribute. If the style used has such an attribute, + \Macro{DeclareNewTOC} will initialise it with a default of 1\Unit{em}. You + can easily change the \PName{value} using + \OptionVName{tocentryindent}{value}. The \KOMAScript{} classes for example + use \OptionValue{tocentrynumwidth}{1.5em}.% + }% + \entry{\OptionVName{level}{number}}{% + \ChangedAt{v3.20}{\Package{tocbasic}}% + \ChangedAt{v3.21}{\Package{tocbasic}}% + This option has been deprecated since \KOMAScript~3.20. Instead, the level + of the entries to the content list\index{content list>entry} depends on + attributes of the TOC-entry style given by the \Option{tocentrystyle} + option. Nevertheless, all styles have the \PValue{level} attrobite, and + \Macro{DeclareNewTOC} initialises it with a default value of 1. You can + easily change the \PName{value} using \OptionVName{tocentrylevel}{value}.% + }% + \entry{\OptionVName{listname}{title}}{% + Each content list has a heading, or title, that you can specify with this + option. If the option is not specified, the title will be ``List of + \PName{entry type}'' (see the \Option{types} option), with the first + character of the \PName{entry type} changed to upper case. It also defines + the \Macro{list\PName{entry type}name} macro with this value, which you + can change at any time. This macro, however, is only defined if it is not + already defined or if the \Option{forcenames} option is also set.% + }% + \entry{\OptionVName{name}{entry name}}{% + Both the optional prefix for entries in the content list and the labels in + floating or non-floating environments (see the \Option{float} and + \Option{nonfloat} options) require an \PName{entry name} for an entry to + the content list. If no \PName{entry name} is given, the value of the + \PValue{type} (see the \Option{type} option) with the first character + changed to upper case will be used. It also defines a \Macro{\PName{entry + type}name} macro with this value, which you can change at any + time. This macro, however, is only defined if it is not already defined or + if the \Option{forcenames} option is also set.% + }% + \entry{\Option{nonfloat}}{% + If set, defines not only a content list but also a non-floating + environment, \Environment{\PName{entry type}-} (see the \Option{type} + option), which can be used similarly to a floating environment, but which + does not move from the place where it is used.% + }% + \entry{\OptionVName{owner}{string}}{% + Every new content list has an owner in \Package{tocbasic} (see + \autoref{sec:tocbasic.basics}). You can specify this here. If no owner is + specified, the owner ``\PValue{float}'' is used. The \KOMAScript{} classes + use this owner for the list of figures and the list of tables.% + }% + \entry{\OptionVName{setup}{list of attributes}}{% + \ChangedAt{v3.25}{\Package{tocbasic}}% + The \PName{list of attributes} is set with + \DescRef{\LabelBase.cmd.setuptoc}. Note that to specify multiple + attributes in a comma-separated list, you must put this list between + braces.% + }% + \entry{\OptionVName{tocentrystyle}{TOC-entry style}}{% + \ChangedAt{v3.20}{\Package{tocbasic}}% + \PName{TOC-entry style} specifies the style that should be used for all + entries to the content list corresponding to the \PName{extension}. The + name of the entry level is given by the \Option{type} option. In addition + to the options in this table, all attributes of the \PName{TOC-entry + style} can be used as options. To do so, you have to prefix the name of + such an attribute with \PValue{tocentry}. For example, you can change the + numerical level of the entries using the \Option{tocentrylevel} option. + For more information about the styles and their attributes see + \autoref{sec:tocbasic.tocstyle}, starting on + \autopageref{sec:tocbasic.tocstyle}.% + }% + \entry{\OptionVName{tocentry\PName{style-option}}{value}}{% + \ChangedAt{v3.20}{\Package{tocbasic}}% + Additional options depending on the \PName{TOC-entry style} given by + \Option{tocentrystyle}. See \autoref{sec:tocbasic.tocstyle}, + \autopageref{sec:tocbasic.tocstyle} for additional information about + TOC-entry styles. See \autoref{tab:tocbasic.tocstyle.attributes}, + \autopageref{tab:tocbasic.tocstyle.attributes} for information about the + attributes of the predefined TOC-entry styles of package + \Package{tocbasic} that can be used as \PName{style-option}.% + }% + \entry{\OptionVName{type}{entry type}}{% + Sets the type of the newly declared content list. The \PName{entry type} + is also used as a base name for various macros and possibly environments + and counters. It should therefore consist only of letters. If this option + is not used, the file \PName{extension} from the mandatory argument will + be used as the \PName{entry type}.% + }% + \entry{\OptionVName{types}{string}}{% + In several places, the plural form of the \PName{entry type} is required. + If no plural is given, the value of the \PValue{entry type} with an ``s'' + appended will be used.% + }% + \entry{\OptionVName{unset}{list of attributes}}{% + \ChangedAt{v3.25}{\Package{tocbasic}}% + The \PName{list of attributes} is unset with + \DescRef{\LabelBase.cmd.unsettoc}. Note that to specify a comma-separated + list of attributes, you must put this list between braces.% + }% +\end{desclist} + +\begin{Example} + Using \Macro{DeclareNewTOC} significantly shortens the example from + \autoref{sec:tocbasic.example}: +\begin{lstcode} + \DeclareNewTOC[% + type=remarkbox,% + types=remarkboxes,% + float,% define a floating environment + floattype=4,% + name=Remark,% + listname={List of Remarks}% + ]{lor} + \setuptoc{lor}{chapteratlist} +\end{lstcode} + In addition to the \Environment{remarkbox} and \Environment{remarkbox*} environments, + this also defines the \Counter{remarkbox} counter; the commands \Macro{theremarkbox}, + \Macro{remarkboxname}, and \Macro{remarkboxformat} that are used for + captions; the commands \Macro{listremarkboxnames} and + \Macro{listofremarkboxes} that are used in the list of remarks; and some + internal commands that depend on the file name extension \File{lor}. + If the package should use a default for the floating type, the + Option{floattype} option can be omitted. If the \Option{nonfloat} option is specified, + a non-floating environment, \Environment{remarkbox-}, will + also be defined, inside which you can use \DescRef{maincls.cmd.caption}\IndexCmd{caption}. + \hyperref[tab:tocbasic.comparison]{Figure~\ref*{tab:tocbasic.comparison}} + compares the commands, counters, and environments of the + example \Environment{remarkbox} environment to the commands, counters, + and environments of figures.% + \begin{table} + \centering + \caption{Comparing the example \Environment{remarkbox} environment + with the \Environment{figure} environment} + \label{tab:tocbasic.comparison} + \begin{tabularx}{\textwidth}{ll>{\raggedright}p{6em}X} + \toprule + \Environment{remarkbox} & \Environment{figure} + & options of \Macro{DeclareNewTOC} & short description \\[1ex] + \midrule + \Environment{remarkbox} & \Environment{figure} + & \Option{type}, \Option{float} + & floating environments of the respective types\\[1ex] + \Environment{remarkbox*} & \Environment{figure*} + & \Option{type}, \Option{float} + & columns spanning floating environments of the respective types\\[1ex] + \Counter{remarkbox} & \Counter{figure} + & \Option{type}, \Option{float} + & counter used by \DescRef{maincls.cmd.caption}\\[1ex] + \Macro{theremarkbox} & \Macro{thefigure} + & \Option{type}, \Option{float} + & output command to the respective counters\\[1ex] + \Macro{remarkboxformat} & \DescRef{maincls.cmd.figureformat} + & \Option{type}, \Option{float} + & formatting command to the respective counters used by + \DescRef{maincls.cmd.caption}\\[1ex] + \Macro{remarkboxname} & \Macro{figurename} + & \Option{type}, \Option{float}, \Option{name} + & names used in the label of \DescRef{maincls.cmd.caption}\\[1ex] + \Macro{listofremarkboxes} & \DescRef{maincls.cmd.listoffigures} + & \Option{types}, \Option{float} + & command to show the list of the respective environments\\[1ex] + \Macro{listremarboxname} & \Macro{listfigurename} + & \Option{type}, \Option{float}, \Option{listname} + & heading text of the respective list \\[1ex] + \Macro{fps@remarkbox} & \Macro{fps@figure} + & \Option{type}, \Option{float}, \Option{floattype} + & numeric float type for order perpetuation\\[1ex] + \File{lor} & \File{lof} + & + & file name extension of the TOC file of the respective list \\ + \bottomrule + \end{tabularx} + \end{table} + + And here is a possible use of the example environment: +\begin{lstcode} + \begin{remarkbox} + \centering + The same thing should always be typeset in the same way + and with the same appearance. + \caption{First Law of Typography} + \label{rem:typo1} + \end{remarkbox} +\end{lstcode} + A snippet of a sample page with this environment might look like this: + \begin{center}\footnotesize + \begin{tabular} + {|!{\hspace{.1\linewidth}}p{.55\linewidth}!{\hspace{.1\linewidth}}|} + \\ + \centering + The same thing should always be typeset in the same way + and with the same appearance.\\[\abovecaptionskip] + {% + \usekomafont{caption}\footnotesize{\usekomafont{captionlabel}% + Remark 1: }First Law of Typography + }\\ + \end{tabular}% + \end{center}% +\end{Example} + +Users of \Package{hyperref} should always use the \Option{listname} option. +Otherwise they may get an error message because \Package{hyperref} usually has +a problem with the \Macro{MakeUppercase}\IndexCmd{MakeUppercase} command that +is needed to convert the first letter of \Option{types} to upper case.% +\EndIndexGroup + + +\section{Obsolete Befehle} +\seclabel{obsolete} + +% TODO: new translation +Prior releases of \Package{tocbasic} provide some commands that has been +renamed, because of a statement of The \LaTeX{} Project Team. Those deprecated +commands should not be used any longer. +% :ODOT + +\LoadNonFree{tocbasic}{0}% +% +\EndIndexGroup +% +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Multiline multiline diff --git a/macros/latex/contrib/koma-script/doc/tocbasic.html b/macros/latex/contrib/koma-script/doc/tocbasic.html index b386b493a2..e7501a9acc 100644 --- a/macros/latex/contrib/koma-script/doc/tocbasic.html +++ b/macros/latex/contrib/koma-script/doc/tocbasic.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of tocbasic" /> + + - + - The KOMA-Script Documentation Wrapper + Managing Content Lists with tocbasic -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

Managing Content Lists with tocbasic

+

Verzeichnisse verwalten mit Hilfe von tocbasic

- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Verzeichnisse verwalten mit Hilfe von tocbasic in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/typearea-de.tex b/macros/latex/contrib/koma-script/doc/typearea-de.tex new file mode 100644 index 0000000000..6cc7f5432b --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/typearea-de.tex @@ -0,0 +1,2055 @@ +% ====================================================================== +% typearea-de.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about typearea of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + + +\KOMAProvidesFile{typearea-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: typearea)] + +\chapter{Satzspiegelberechnung mit \Package{typearea.sty}} +\labelbase{typearea} + +\BeginIndexGroup% +\BeginIndex{Package}{typearea}% +Viele \LaTeX-Klassen\iffree{, darunter auch die Standardklassen,}{} bieten dem +Anwender eine weitgehend feste Auf"|teilung von Rändern und Textbereich. Bei +den Standardklassen ist die konkrete Auf"|teilung in engen Grenzen von der +gewählten Schriftgröße abhängig. Darüber hinaus gibt es Pakete wie +\Package{geometry}\IndexPackage{geometry} (siehe \cite{package:geometry}), die +dem Anwender die volle Kontrolle, aber auch die Verantwortung für die +Einstellungen des Textbereichs und der Ränder überlassen. + +\KOMAScript{} geht mit dem Paket \Package{typearea} einen etwas anderen +Weg. Hier werden basierend auf einer in der Typografie etablierten +Konstruktion Einstellmöglichkeiten und Automatismen geboten, die es dem +Anwender erleichtern, eine gute Wahl zu treffen. + +\iffalse% Umbruchoptimierung!!! + Es wird darauf hingewiesen, dass sich \Package{typearea} des Pakets + \Package{scrbase} bedient. Letzteres Paket ist im Expertenteil + \iffree{dieser Anleitung}{dieses Buches} in \autoref{cha:scrbase} ab + \autopageref{cha:scrbase} erklärt. + Die Mehrzahl der dort dokumentierten Anweisungen richtet sich jedoch nicht + an Anwender, sondern an Klassen- und Paketautoren.% +\fi + +\section{Grundlagen der Satzspiegelkonstruktion} +\seclabel{basics} + +\begin{Explain} + Betrachtet man eine einzelne Seite eines Buches oder eines anderen + Druckwerkes, so besteht diese auf den ersten Blick aus den Rändern% + \iffalse% Umbruchkorrekturtext + \footnote{Der Autor und der Lektor haben an dieser Stelle überlegt, ob eine + Seite nicht nur einen umlaufenden Rand hat und daher von »dem Rand« die + Rede sein müsste. Da jedoch \LaTeX{} diesen einen Rand logisch in mehrere + Ränder unterteilt, die getrennt bestimmt werden, ist hier auch von »den + Rändern« die Rede.}% + \fi% + , einem Kopfbereich, einem Textkörper und einem Fußbereich. Genauer + betrachtet, kommt noch ein Abstand zwischen Kopfbereich und Textkörper sowie + zwischen Textkörper und Fußbereich hinzu. Der Textkörper heißt in der + Fachsprache der Typografen und Setzer \emph{Satzspiegel}. Die Auf"|teilung + dieser Bereiche sowie ihre Anordnung zueinander und auf dem Papier nennen + wir \emph{Satzspiegeldefinition} oder + \emph{Satzspiegelkonstruktion}.\Index[indexmain]{Satzspiegel} + + In der Literatur werden verschiedene Algorithmen und heuristische Verfahren + zur Konstruktion eines guten Satzspiegels vorgeschlagen und diskutiert% + \iffree{ \cite{DANTE:TK0402:MJK}}{. Einen Überblick über einige Möglichkeiten + und der dabei angenommenen Grundsätze gibt + \autoref{cha:typeareaconstruction}}% + . Häufig findet man ein Verfahren, das mit verschiedenen Diagonalen + und deren Schnittpunkten arbeitet. Das gewünschte Ergebnis ist, dass das + Seitenverhältnis des Satzspiegels dem Seitenverhältnis \emph{der Seite} + entspricht. Bei einem einseitigen\Index{einseitig} Dokument sollen außerdem + der linke und der rechte Rand gleich breit sein, während der obere zum + unteren Rand im Verhältnis 1:2 stehen sollte. Bei einem + doppelseitigen\Index{doppelseitig} Dokument, beispielsweise einem Buch, ist + hingegen zu beachten, dass der gesamte innere Rand genauso groß sein sollte + wie jeder der beiden äußeren Ränder. Eine einzelne Seite steuert dabei + jeweils nur die Hälfte des inneren Randes bei. + + Im vorherigen Absatz wurde \emph{die Seite} erwähnt und + hervorgehoben. Irrtümlich wird oftmals angenommen, das Format der Seite wäre + mit dem Format des Papiers gleichzusetzen.\Index[indexmain]{Seiten>Format} + \Index[indexmain]{Papier>Format} Betrachtet man jedoch ein gebundenes + Druckerzeugnis, so ist zu erkennen, dass ein Teil des Papiers in der + Bindung\Index[indexmain]{Bindung} verschwindet und nicht mehr als Seite zu + sehen ist. Für den Satzspiegel ist jedoch nicht entscheidend, welches Format + das Papier hat, sondern, was der Leser für einen Eindruck vom Format der + Seite bekommt. Damit ist klar, dass bei der Berechnung des Satzspiegels der + Teil, der durch die Bindung versteckt wird, aus dem Papierformat + herausgerechnet und dann zum inneren Rand hinzugefügt werden muss. Wir + nennen diesen Teil + \emph{Bindekorrektur}.\Index[indexmain]{Bindekorrektur}% + \textnote{Bindekorrektur} + Die Bindekorrektur ist also rechnerischer Bestandteil des + \emph{Bundstegs}\Index{Bundsteg}, nicht jedoch des sichtbaren + inneren Randes. + + Die Bindekorrektur ist vom jeweiligen Produktionsvorgang abhängig und kann + nicht allgemein festgelegt werden. Es handelt sich dabei also um einen + Parameter, der für jeden Produktionsvorgang neu festzulegen ist. Im + professionellen Bereich spielt dieser Wert nur eine geringe Rolle, da + ohnehin auf größere Papierbögen gedruckt und entsprechend geschnitten + wird. Beim Schneiden wird dann wiederum sichergestellt, dass obige + Verhältnisse für die sichtbare Doppelseite eingehalten sind. + + Wir wissen nun also, wie die einzelnen Teile zueinander stehen. Wir wissen + aber noch nicht, wie breit und hoch der Satzspiegel ist. Kennen wir eines + dieser beiden Maße, so ergeben sich zusammen mit dem Papierformat und dem + Seitenformat oder der Bindekorrektur alle anderen Maße durch Lösung mehrerer + mathematischer Gleichungen: + % Umbruchoptiomierung!!! + \iffree{% + \begin{align*} + \Var{Satzspiegelhöhe}\Index{Satzspiegel} : \Var{Satzspiegelbreite} &= + \Var{Seitenhöhe}\Index{Seite} : \Var{Seitenbreite} \\ + \Var{oberer~Rand}\Index{Rand} : \Var{unterer~Rand} &= + \text{1} : \text{2} \\ + \Var{linker~Rand} : \Var{rechter~Rand} &= \text{1} : \text{1} \\ +% + \Var{innerer~Randanteil} : \Var{äußerer~Rand} &= \text{1} : \text{2} \\ +% + \Var{Seitenbreite} &= + \Var{Papierbreite}\Index{Papier} - + \Var{Bindekorrektur}\Index{Bindekorrektur}\\ +% + \Var{oberer~Rand} + \Var{unterer~Rand} &= + \Var{Seitenhöhe} - \Var{Satzspiegelhöhe} \\ +% + \Var{linker~Rand} + \Var{rechter Rand} &= + \Var{Seitenbreite} - \Var{Satzspiegelbreite} \\ +% + \Var{innerer Randanteil} + \Var{äußerer Rand} &= + \Var{Seitenbreite} - \Var{Satzspiegelbreite} \\ +% + \Var{innerer~Randanteil} + \Var{Bindekorrektur} &= + \Var{Bundsteg}\index{Bundsteg} + \end{align*} + }{% + % Umbruchkorrektur: Abstände verändert! + \begin{prepareformargin} + \vskip -.5\baselineskip plus .25\baselineskip + \begin{align*} + \Var{Satzspiegelhöhe}\Index{Satzspiegel} : \Var{Satzspiegelbreite} &= + \Var{Seitenhöhe}\Index{Seite} : \Var{Seitenbreite} \\[-2pt] + \Var{oberer~Rand}\Index{Rand} : \Var{unterer~Rand} &= + \text{1} : \text{2} \\[-2pt] + \Var{linker~Rand} : \Var{rechter~Rand} &= \text{1} : \text{1} \\[-2pt] + \Var{innerer~Randanteil} : \Var{äußerer~Rand} &= + \text{1} : \text{2}\\[-2pt] + \Var{Seitenbreite} &= + \Var{Papierbreite}\Index{Papier} - + \Var{Bindekorrektur}\Index{Bindekorrektur} \\[-2pt] + \Var{oberer~Rand} + \Var{unterer~Rand} &= + \Var{Seitenhöhe} - \Var{Satzspiegelhöhe} \\[-2pt] + % + \Var{linker~Rand} + \Var{rechter Rand} &= + \Var{Seitenbreite} - \Var{Satzspiegelbreite} \\[-2pt] + % + \Var{innerer Randanteil} + \Var{äußerer Rand} &= + \Var{Seitenbreite} - \Var{Satzspiegelbreite} \\ + % +% \end{align*} +% \end{prepareformargin}\pagebreak +% \begin{prepareformargin}\vskip-\abovedisplayskip +% \begin{align*} + \Var{innerer~Randanteil} + \Var{Bindekorrektur} &= + \Var{Bundsteg}\index{Bundsteg} + \end{align*} + \end{prepareformargin} + \vskip .5\baselineskip minus .25\baselineskip + }% + \Index[indexmain]{Rand}% + Dabei gibt es \Var{linker~Rand} und \Var{rechter~Rand} nur im einseitigen + Druck. Entsprechend gibt es \Var{innerer~Randanteil} und \Var{äußerer~Rand} + nur im doppelseitigen Druck. + + In den Gleichungen wird mit \Var{innerer~Randanteil} gearbeitet, weil der + komplette innere Rand ein Element der vollständigen Doppelseite ist. Zu + einer Seite gehört also nur die Hälfte des inneren Randes: + \Var{innerer~Randanteil}. + + Die Frage nach der Breite des Satzspiegels wird in der Literatur + ebenfalls diskutiert. Die optimale Satzspiegelbreite ist von + verschiedenen Faktoren abhängig: + \iffree{\begin{itemize}}{\begin{itemize}[% Umbuchkorrektur + topsep=.5\baselineskip plus .25\baselineskip minus .33\baselineskip, + partopsep=.5\baselineskip plus .25\baselineskip minus .33\baselineskip, + itemsep=.33\baselineskip plus .25\baselineskip minus .25\baselineskip, + parsep=0pt + ]} + \item Größe, Laufweite und Art der verwendeten Schrift, + \item verwendeter Durchschuss, + \item Länge der Worte, + \item verfügbarer Platz. + \end{itemize} + Der Einfluss der Schrift wird deutlich, wenn man sich bewusst macht, + wozu Serifen dienen. Serifen\Index[indexmain]{Serifen} sind kleine + Striche an den Linienenden der Buchstaben. Buchstaben, die mit + vertikalen Linien auf die Grundlinie der Textzeile treffen, + lösen diese eher auf, als dass sie das Auge auf der Linie halten. + Genau bei diesen Buchstaben liegen die Serifen horizontal auf + der Grundlinie und verstärken damit die Zeilenwirkung der Schrift. + Das Auge kann der Textzeile nicht nur beim Lesen der Worte, sondern + insbesondere auch beim schnellen Zurückspringen an den Anfang der + nächsten Zeile besser folgen. Damit darf die Zeile bei einer Schrift + mit Serifen genau genommen länger sein als bei einer Schrift ohne Serifen. + + Unter dem + Durchschuss\Index[indexmain]{Durchschuss}\textnote{Durchschuss} + versteht man den Abstand zwischen Textzeilen. Bei \LaTeX{} ist ein + Durchschuss von etwa 20\,\% der Schriftgröße voreingestellt. Mit Befehlen + wie \Macro{linespread}\IndexCmd{linespread} oder besser mit Hilfe von + Paketen wie \Package{setspace}\IndexPackage{setspace} (siehe + \cite{package:setspace}) kann der Durchschuss verändert werden. Ein großer + Durchschuss erleichtert dem Auge die Verfolgung einer Zeile. Bei sehr + großem Durchschuss wird das Lesen aber dadurch gestört, dass das Auge + zwischen den Zeilen weite Wege zurücklegen muss. Daneben wird sich der + Leser des entstehenden Streifeneffekts sehr deutlich und unangenehm + bewusst. Der Graueindruck der Seite ist in diesem Fall gestört. Dennoch + dürfen bei großem Durchschuss die Zeilen länger sein. + + Auf der Suche nach konkreten Werten für gute + Zeilenlängen\Index[indexmain]{Zeilenlaenge=Zeilenlänge} findet man in der + Literatur je nach Autor unterschiedliche Angaben. Teilweise ist dies auch in + der Muttersprache des Autors begründet. Das Auge springt nämlich + üblicherweise von Wort zu Wort, wobei kurze Wörter diese Aufgabe + erleichtern. Über alle Sprachen und Schriftarten hinweg kann man sagen, dass + eine Zeilenlänge von 60 bis 70 Zeichen, einschließlich Leer- und + Satzzeichen, einen brauchbaren Kompromiss darstellt. Ein gut gewählter + Durchschuss wird dabei vorausgesetzt. Bei den Voreinstellungen von \LaTeX{} + braucht man sich über Letzteres normalerweise keine Sorgen zu + machen. Größere Zeilenlängen darf man nur Gewohnheitslesern zumuten, die + täglich viele Stunden lesend zubringen. Aber auch dann sind Zeilenlängen + jenseits von 80 Zeichen unzumutbar. In jedem Fall ist dann der Durchschuss + anzupassen. 5\,\% bis 10\,\% zusätzlich sind dabei als Faustregel + empfehlenswert. Bei Schriften wie Palatino, die bereits bei einer normalen + Zeilenlänge nach 5\,\% mehr Durchschuss verlangt, können es auch mehr sein. + + Bevor wir uns an die konkrete Konstruktion machen, fehlen jetzt nur noch + Kleinigkeiten, die man wissen sollte. \LaTeX{} beginnt die erste Zeile des + Textbereichs einer Seite nicht am oberen Rand des Textbereichs, sondern + setzt die Grundlinie der Zeile mit einem definierten Mindestabstand zum + oberen Rand des Textbereichs. Des Weiteren verfügt \LaTeX{} über die beiden + Befehle \DescRef{maincls.cmd.raggedbottom}\IndexCmd{raggedbottom} und + \DescRef{maincls.cmd.flushbottom}\IndexCmd{flushbottom}. Der erste dieser + Befehle legt fest, dass die letzte Zeile einer jeden Seite dort liegen soll, + wo sie eben zu liegen kommt. Das kann dazu führen, dass sich die Position + der letzten Zeile von Seite zu Seite vertikal um nahezu eine Zeile verändern + kann -- bei Zusammentreffen des Seitenendes mit Überschriften, Abbildungen, + Tabellen oder Ähnlichem auch mehr. Im doppelseitigen Druck ist das in der + Regel unerwünscht. Mit dem zweiten Befehl, + \DescRef{maincls.cmd.flushbottom}, wird hingegen festgelegt, dass die letzte + Zeile immer am unteren Rand des Textbereichs zu liegen kommt. Um diesen + vertikalen Ausgleich zu erreichen, muss \LaTeX{} gegebenenfalls dehnbare + vertikale Abstände über das erlaubte Maß hinaus strecken. Ein solcher + Abstand ist beispielsweise der Absatzabstand. Dies gilt in der Regel auch, + wenn man gar keinen Absatzabstand verwendet. Um nicht bereits auf normalen + Seiten, auf denen der Absatzabstand das einzige dehnbare vertikale Maß + darstellt, eine Dehnung zu erzwingen, sollte die Höhe des Textbereichs ein + Vielfaches der Textzeilenhöhe zuzüglich des Abstandes der ersten Zeile vom + oberen Rand des Textbereichs sein. + +\iffalse% Umbruchkorrektur + Damit sind alle Grundlagen der Satzspiegelberechnung, die bei + {\KOMAScript} eine Rolle spielen, erklärt. +\else + Soweit die Grundlagen. +\fi +\iffalse% Umbruchkorrektur + Es folgen die beiden von \KOMAScript{} angebotenen Konstruktionen. +\else +\iffalse% Umbruchkorrektur + Wir können also mit den konkreten Konstruktionen beginnen. +\else + In den folgenden beiden Abschnitten werden die von {\KOMAScript} angebotenen + Konstruktionen im Detail vorgestellt. +\fi +\fi +\end{Explain} + + +\section{Satzspiegelkonstruktion durch Teilung} +\seclabel{divConstruction} + +\begin{Explain} + Der einfachste Weg, um zu erreichen, dass der Textbereich dasselbe + Seitenverhältnis aufweist wie die Seite, ist folgender:% + \begin{itemize} + \item Zunächst zieht man an der Innenseite des Papiers den Teil + \Var{BCOR}\important{\Var{BCOR}}, der für die + Bindekorrektur\Index{Bindekorrektur} benötigt wird, ab und teilt die + restliche Seite vertikal in eine Anzahl \Var{DIV} gleich hoher Streifen. + \item Dann teilt man die Seite horizontal in die gleiche Anzahl + \Var{DIV}\important{\Var{DIV}} gleich breiter Streifen. + \item Nun verwendet man den obersten horizontalen Streifen als oberen und + die beiden untersten horizontalen Streifen als unteren Rand. Im + doppelseitigen Druck verwendet man außerdem den innersten vertikalen + Streifen als inneren und die beiden äußersten vertikalen Streifen als + äußeren Rand. + \item Zum inneren Rand gibt man dann noch \Var{BCOR} hinzu. + \end{itemize} + Was nun innerhalb der Seite noch übrig bleibt, ist der + Textbereich.\Index{Text>Bereich} Die Breite bzw. Höhe der Ränder und des + Textbereichs resultiert damit automatisch aus der Anzahl \Var{DIV} der + Streifen. Da für die Ränder insgesamt jeweils drei Streifen benötigt werden, + muss \Var{DIV} zwingend größer als drei sein. Damit der Satzspiegel + horizontal und vertikal jeweils mindestens doppelt so viel Platz wie die + Ränder einnimmt, sollte \Var{DIV} sogar mindestens 9 betragen. Mit diesem + Wert ist die Konstruktion auch als \emph{klassische Neunerteilung} bekannt + (siehe \autoref{fig:typearea.nineparts}). + + \begin{figure} +% \centering + \KOMAoption{captions}{bottombeside}% + \setcapindent{0pt}% + \setlength{\columnsep}{.6em}% + \begin{captionbeside}[{% + Doppelseite mit der Rasterkonstruktion für die klassische + Neunerteilung nach Abzug einer Bindekorrektur% + }]{% + \label{fig:typearea.nineparts}% + \hspace{0pt plus 1ex}% + Doppelseite mit der Rasterkonstruktion für die klassische + Neunerteilung nach Abzug einer Bindekorrektur% + } + [l] + \setlength{\unitlength}{.25mm}% + \definecolor{komalight}{gray}{.75}% + \definecolor{komamed}{gray}{.6}% + \definecolor{komadark}{gray}{.3}% + \begin{picture}(420,297) + % BCOR + \put(198,0){\color{komalight}\rule{24\unitlength}{297\unitlength}} + \multiput(198,2)(0,20){15}{\thinlines\line(0,1){10}} + \multiput(222,2)(0,20){15}{\thinlines\line(0,1){10}} + % Das Papier + \put(0,0){\thicklines\framebox(420,297){}} +% \put(210,0){\thicklines\framebox(210,297){}} + % Der Satzspiegel + \put(44,66){\color{komamed}\rule{132\unitlength}{198\unitlength}} + \put(244,66){\color{komamed}\rule{132\unitlength}{198\unitlength}} + % Hilfslinien + \multiput(0,33)(0,33){8}{\thinlines\line(1,0){198}} + \multiput(222,33)(0,33){8}{\thinlines\line(1,0){198}} + \multiput(22,0)(22,0){8}{\thinlines\line(0,1){297}} + \multiput(244,0)(22,0){8}{\thinlines\line(0,1){297}} + % Beschriftung + \put(198,0){\color{white}\makebox(24,297)[c]{% + \rotatebox[origin=c]{-90}{Bindekorrektur}}} + \put(44,66){\color{white}\makebox(132,198)[c]{Satzspiegel links}} + \put(244,66){\color{white}\makebox(132,198)[c]{Satzspiegel rechts}} + % Kästchennummern + \makeatletter + \multiput(1,27)(0,33){9}{\footnotesize\makebox(0,0)[l]{\the\@multicnt}} + \multiput(177,291)(-22,0){9}{% + \footnotesize\makebox(0,0)[l]{\the\@multicnt}} + \multiput(419,27)(0,33){9}{% + \footnotesize\makebox(0,0)[r]{\the\@multicnt}} + \multiput(243,291)(22,0){8}{% + \footnotesize\makebox(0,0)[r]{\the\numexpr\@multicnt+1\relax}} + \makeatother + \end{picture} + \end{captionbeside} +% \caption{Doppelseite mit der Rasterkonstruktion für die klassische +% Neunerteilung nach Abzug einer Bindekorrektur} +% \label{fig:typearea.nineparts} + \end{figure} + + Bei {\KOMAScript} ist diese Art der Konstruktion im Paket \Package{typearea} + realisiert, wobei der untere Rand weniger als eine Textzeile kleiner + ausfallen kann, um die im vorherigen Abschnitt erwähnte Nebenbedingung für + die Satzspiegelhöhe einzuhalten und damit die dort erwähnte Problematik in + Bezug auf \DescRef{maincls.cmd.flushbottom} zu mindern. Dabei sind für + A4-Papier je nach Schriftgröße unterschiedliche Werte für \Var{DIV} + voreingestellt, die \autoref{tab:typearea.div}, + \autopageref{tab:typearea.div} zu entnehmen sind. Bei Verzicht auf + Bindekorrektur, wenn also \Var{BCOR} = 0\Unit{pt} gilt, ergeben sich in etwa + die Satzspiegelmaße aus \autoref{tab:typearea.typearea}, + \autopageref{tab:typearea.typearea}. + + Neben den voreingestellten Werten kann man \Var{BCOR} und \Var{DIV} direkt + beim Laden des Pakets als Option angeben (siehe + \autoref{sec:typearea.typearea} ab + \autopageref{sec:typearea.typearea}). Zusätzlich existiert ein Befehl, mit + dem man einen Satzspiegel explizit berechnen kann und dem man die beiden + Werte als Parameter übergibt (\iftrue% Umbruchoptimierung!!!! + siehe ebenfalls + \autoref{sec:typearea.typearea}, \fi\DescPageRef{typearea.cmd.typearea}). + + Das \Package{typearea}-Paket bietet außerdem die Möglichkeit, den optimalen + \Var{DIV}-Wert automatisch zu bestimmen. Dieser ist von der Schrift und dem + Durchschuss abhängig, der zum Zeitpunkt der Satzspiegelberechnung + eingestellt ist% + \iffalse% Umbruchoptimierung!!!! + . Siehe hierzu ebenfalls \autoref{sec:typearea.typearea}, % + \else\ (siehe ebenfalls \autoref{sec:typearea.typearea}, % + \fi% + \DescPageRef{typearea.option.DIV.calc}\iffalse\else)\fi.% +\end{Explain}% + + +\section{Satzspiegelkonstruktion durch Kreisschlagen} +\seclabel{circleConstruction} + +\begin{Explain} + Neben der zuvor beschriebenen Satzspiegelkonstruktion\Index{Satzspiegel} + gibt es in der Literatur noch eine eher klassische oder sogar + mittelalterliche Methode. Bei diesem Verfahren will man die gleichen Werte + nicht nur in Form des Seitenverhältnisses wiederfinden; man geht außerdem + davon aus, dass das Optimum dann erreicht wird, wenn die Höhe des + Textbereichs der Breite der Seite entspricht. Das genaue Verfahren ist + beispielsweise in \cite{JTsch87} nachzulesen. + + Als Nachteil dieses spätmittelalterlichen Buchseitenkanons ergibt sich, dass + die Breite des Textbereichs nicht mehr von der Schriftart abhängt. Es wird + also nicht mehr der zur Schrift passende Textbereich gewählt, stattdessen + muss der Autor oder Setzer unbedingt die zum Textbereich passende Schrift + wählen. +% +\iffalse +% Umbruchkorrekturtext + Dies ist als zwingend zu betrachten. +\fi + + Im \Package{typearea}-Paket wird diese Konstruktion dahingehend abgewandelt, + dass durch Auswahl eines ausgezeichneten -- normalerweise unsinnigen -- + \Var{DIV}-Wertes oder einer speziellen, symbolischen Angabe derjenige + \Var{DIV}-Wert ermittelt wird, bei dem der resultierende Satzspiegel dem + spätmittelalterlichen Buchseitenkanon am nächsten kommt. Es wird also + wiederum auf die Satzspiegelkonstruktion durch Teilung zurückgegriffen. +% +\iffalse +% Umbruchkorrekturtext + Bei Wahl einer guten Schrift stimmt dieses Ergebnis nicht selten mit der + Suche nach dem optimalen \Var{DIV}-Wert überein. Siehe hierzu ebenfalls + \autoref{sec:typearea.typearea}, \DescPageRef{typearea.option.DIV.calc}. +% +\fi +\end{Explain} + +\LoadCommonFile{options} % \section{Frühe oder späte Optionenwahl} + +\LoadCommonFile{compatibility} % \section{Kompatibilität zu früheren Versionen von \KOMAScript} + +\section{Einstellung des Satzspiegels und der \texorpdfstring{Seitenauf"|teilung}{Seitenaufteilung}} +\seclabel{typearea} + +Das Paket \Package{typearea} bietet zwei unterschiedliche +Benutzerschnittstellen, um auf die Satzspiegelkonstruktion Einfluss zu +nehmen. Die wichtigste Möglichkeit ist die Angabe von Optionen. Wie +in \autoref{sec:\LabelBase.options} erwähnt, können die Optionen dabei auf +unterschiedlichen Wegen gesetzt werden. + +In\textnote{Hinweis!} diesem Abschnitt wird die Klasse \Class{protokol} +verwendet werden. Es handelt sich dabei nicht um eine \KOMAScript-Klasse, +sondern um eine hypothetische Klasse. Diese\iffree{ Anleitung}{s Buch} geht +von dem Idealfall aus, dass für jede Aufgabe eine dafür passende Klasse zur +Verfügung steht. + + +\begin{Declaration} + \OptionVName{BCOR}{Korrektur} +\end{Declaration}% +Mit Hilfe der Option +\OptionVName{BCOR}{Korrektur}\ChangedAt{v3.00}{\Package{typearea}} geben Sie +den absoluten Wert der +Bindekorrektur\Index{Bindekorrektur}\textnote{Bindekorrektur} an, also die +Breite des Bereichs, der durch die Bindung von der Papierbreite verloren +geht. Dieser Wert wird in der Satzspiegelkonstruktion automatisch +berücksichtigt und bei der Ausgabe wieder dem inneren beziehungsweise linken +Rand zugeschlagen. Als \PName{Korrektur} können Sie jede von \TeX{} +verstandene Maßeinheit angeben. + +\begin{Example} + Angenommen, Sie erstellen einen Finanzbericht. Das Ganze soll + einseitig in A4 gedruckt und anschließend in eine Klemmmappe + geheftet werden. Die Klemme der Mappe verdeckt 7,5\Unit{mm}. + Der Papierstapel ist sehr dünn, deshalb gehen beim Knicken und + Blättern durchschnittlich höchstens weitere 0,75\Unit{mm} + verloren. Sie schreiben dann also: +\begin{lstcode} + \documentclass[a4paper]{report} + \usepackage[BCOR=8.25mm]{typearea} +\end{lstcode} + mit \OptionValue{BCOR}{8.25mm} als Option für \Package{typearea} oder +\begin{lstcode} + \documentclass[a4paper,BCOR=8.25mm]{report} + \usepackage{typearea} +\end{lstcode} + zur Angabe von \OptionValue{BCOR}{8.25mm} als globale Option. + + Bei Verwendung einer \KOMAScript-Klasse sollte das explizite Laden von + \Package{typearea} entfallen: +\begin{lstcode} + \documentclass[BCOR=8.25mm]{scrreprt} +\end{lstcode} + Die Option \Option{a4paper} konnte bei \Class{scrreprt} entfallen, da diese + der Voreinstellung bei allen \KOMAScript-Klassen entspricht. + + Setzt man die Option erst später auf einen neuen Wert, verwendet man also + beispielsweise +\begin{lstcode} + \documentclass{scrreprt} + \KOMAoptions{BCOR=8.25mm} +\end{lstcode} + so werden bereits beim Laden der Klasse \Class{scrreprt} + Standardeinstellungen vorgenommen. Beim Ändern der Einstellung mit Hilfe + einer der Anweisung \DescRef{\LabelBase.cmd.KOMAoptions} oder + \DescRef{\LabelBase.cmd.KOMAoption} wird dann automatisch ein neuer + Satzspiegel mit neuen Randeinstellungen berechnet. +\end{Example} + +Bitte beachten Sie unbedingt\textnote{Achtung!}, dass diese Option bei +Verwendung einer der \KOMAScript-Klassen wie im Beispiel als Klassenoption +oder per \DescRef{\LabelBase.cmd.KOMAoptions} beziehungsweise +\DescRef{\LabelBase.cmd.KOMAoption} nach dem Laden der Klasse übergeben werden +muss. Weder sollte das Paket \Package{typearea} bei Verwendung einer +\KOMAScript-Klasse explizit per \DescRef{\LabelBase.cmd.usepackage} geladen, +noch die Option dabei als optionales Argument angegeben +werden. Wird\textnote{automatische Neuberechnung} die Option per +\DescRef{\LabelBase.cmd.KOMAoptions} oder \DescRef{\LabelBase.cmd.KOMAoption} +nach dem Laden des Pakets geändert, so werden Satzspiegel und Ränder +automatisch neu berechnet.% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{DIV}{Faktor} +\end{Declaration}% +Mit Hilfe der Option +\OptionVName{DIV}{Faktor}\ChangedAt{v3.00}{\Package{typearea}} wird +festgelegt, in wie viele Streifen die Seite horizontal und vertikal bei der +Satzspiegelkonstruktion eingeteilt wird. Die genaue Konstruktion ist +\autoref{sec:typearea.divConstruction} zu entnehmen. Wichtig zu wissen ist, +dass gilt: Je größer der \PName{Faktor}, desto größer wird der Textbereich und +desto kleiner die Ränder. Als \PName{Faktor} kann jeder ganzzahlige Wert ab 4 +verwendet werden. Bitte beachten Sie jedoch, dass sehr große Werte dazu führen +können, dass Randbedingungen der Satzspiegelkonstruktion, je nach Wahl der +weiteren Optionen, verletzt werden. So kann die Kopfzeile im Extremfall auch +außerhalb der Seite liegen. Bei Verwendung der Option +\OptionVName{DIV}{Faktor} sind Sie für die Einhaltung der Randbedingungen +sowie eine nach typografischen Gesichtspunkten günstige Zeilenlänge selbst +verantwortlich. + +In \autoref{tab:typearea.typearea} finden Sie für das Seitenformat A4 ohne +Bindekorrektur die aus einigen \Option{DIV}-Faktoren resultierenden, +theoretischen Satzspiegelgrößen. Dabei werden die weiteren von der +Schriftgröße abhängigen Nebenbedingungen nicht berücksichtigt. + +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside} +% \caption + [{Satzspiegelma"se in Abh"angigkeit von \Option{DIV} bei A4}] + {\label{tab:typearea.typearea}Satzspiegelma"se in Abh"angigkeit von \Option{DIV} + bei A4 ohne Berücksichtigung von \Length{topskip} oder \Option{BCOR}} + [l] + \begin{tabular}[t]{ccccc} + \toprule + & + \multicolumn{2}{c}{Satzspiegel} & \multicolumn{2}{c}{R"ander}\\ + %\raisebox{1.5ex}[0pt]{ + \Option{DIV} + %} + & Breite & H"ohe & oben & innen \\ + \midrule + 6 & 105,00 & 148,50 & 49,50 & 35,00 \\ + 7 & 120,00 & 169,71 & 42,43 & 30,00 \\ + 8 & 131,25 & 185,63 & 37,13 & 26,25 \\ + 9 & 140,00 & 198,00 & 33,00 & 23,33 \\ + 10 & 147,00 & 207,90 & 29,70 & 21,00 \\ + 11 & 152,73 & 216,00 & 27,00 & 19,09 \\ + 12 & 157,50 & 222,75 & 24,75 & 17,50 \\ + 13 & 161,54 & 228,46 & 22,85 & 16,15 \\ + 14 & 165,00 & 233,36 & 21,21 & 15,00 \\ + 15 & 168,00 & 237,60 & 19,80 & 14,00 \\ + \bottomrule + \multicolumn{5}{r}{\small (alle Längen in mm)} + \end{tabular} + \end{captionbeside} +\end{table} + +\begin{Example} + Angenommen, Sie schreiben ein Sitzungsprotokoll. Sie verwenden dafür die + Klasse \Class{protokol}. Das Ganze soll doppelseitig werden. In Ihrer Firma + wird die Schriftart Bookman in 12\Unit{pt} verwendet. Diese Schriftart% + \iffalse % Umbruchkorrekturtext + , die zu den Standard-PostScript-Schriften gehört,% + \fi\ wird in {\LaTeX} mit der + Anweisung \verb|\usepackage{bookman}| aktiviert % + \iffalse % Umbruchkorrekturtext + . Die Schriftart Bookman % + \else + und % + \fi läuft sehr weit, das heißt, die einzelnen Zeichen sind im Verhältnis zur + Höhe relativ breit. Deshalb ist Ihnen die Voreinstellung für den + \Option{DIV}-Wert in \Package{typearea} zu gering. Statt eines Werts von 12 + sind Sie nach gründlichem Studium dieses Kapitels einschließlich der + weiterführenden Abschnitte überzeugt, dass der Wert 15 angebracht ist. Das + Protokoll wird nicht gebunden, sondern gelocht und in einen Ordner + abgeheftet. Eine Bindekorrektur ist deshalb nicht notwendig. Sie schreiben + also: +\begin{lstcode} + \documentclass[a4paper,twoside]{protokol} + \usepackage{bookman} + \usepackage[DIV=15]{typearea} +\end{lstcode} + Als Sie fertig sind, macht man Sie darauf aufmerksam, dass die + Protokolle neuerdings gesammelt und am Quartalsende alle zusammen + als Buch gebunden werden. Die Bindung erfolgt als + einfache Leimbindung% + \iffalse% Umbruchkorrektur + , weil den Band ohnehin nie wieder jemand + anschaut und er nur wegen ISO\,9000 angefertigt wird. Für die Bindung + einschließlich Biegefalz werden % + \else% + . Einschließlich Biegefalz werden dafür % + \fi + durchschnittlich 12\Unit{mm} benötigt. Sie ändern die Optionen von + \Package{typearea} also entsprechend ab und verwenden die Klasse für + Protokolle nach ISO\,9000: +\begin{lstcode} + \documentclass[a4paper,twoside]{iso9000p} + \usepackage{bookman} + \usepackage[DIV=15,BCOR=12mm]{typearea} +\end{lstcode} + Natürlich können Sie auch hier wieder eine \KOMAScript-Klasse + verwenden: +\begin{lstcode} + \documentclass[twoside,DIV=15,BCOR=12mm]{scrartcl} + \usepackage{bookman} +\end{lstcode} +\iftrue% Umbruchoptimierung!!!! +\iftrue + Die voreingestellte Option \Option{a4paper} konnte dabei entfallen. +\else + Option \Option{a4paper} entspricht der Voreinstellung und konnte daher + entfallen. +\fi +\else + Die Option \Option{a4paper} konnte bei der Klasse \Class{scrartcl} entfallen, + da diese der Voreinstellung bei allen \KOMAScript-Klassen entspricht. +\fi +\end{Example} + +Bitte beachten Sie unbedingt\textnote{Achtung!}, dass die Option \Option{DIV} +bei Verwendung einer der \KOMAScript-Klassen wie im Beispiel als Klassenoption +oder per \DescRef{\LabelBase.cmd.KOMAoptions} beziehungsweise +\DescRef{\LabelBase.cmd.KOMAoption} nach dem Laden der Klasse übergeben werden +muss. Weder sollte das Paket \Package{typearea} bei Verwendung einer +\KOMAScript-Klasse explizit per \DescRef{\LabelBase.cmd.usepackage} geladen, +noch die Option dabei als optionales Argument angegeben +werden. Wird\textnote{automatische Neuberechnung} die Option per +\DescRef{\LabelBase.cmd.KOMAoptions} oder \DescRef{\LabelBase.cmd.KOMAoption} +nach dem Laden des Pakets geändert, so werden Satzspiegel und Ränder +automatisch neu berechnet. + +\begin{Declaration} + \OptionValue{DIV}{calc} + \OptionValue{DIV}{classic} +\end{Declaration} +Wie\ChangedAt{v3.00}{\Package{typearea}} bereits in +\autoref{sec:typearea.divConstruction} erwähnt, gibt es nur für das +Papierformat A4 feste Voreinstellungen für den \Option{DIV}-Wert. Diese sind +\autoref{tab:typearea.div} zu entnehmen. Solche festen Werte haben allerdings +den Nachteil\textnote{Achtung!}, dass sie die Laufweite der verwendeten +Schrift nicht berücksichtigen. Das kann bei A4 und recht schmalen Schriften +sehr rasch zu unangenehm hoher Zeichenzahl je Zeile führen. Siehe hierzu die +Überlegungen in \autoref{sec:typearea.basics}. Wird ein anderes Papierformat +gewählt, so berechnet \Package{typearea} selbst einen guten \Option{DIV}-Wert. +Natürlich können Sie diese Berechnung auch für A4 wählen. Hierzu verwenden Sie +\OptionValue{DIV}{calc}\important{\OptionValue{DIV}{calc}} anstelle von +\OptionVNameRef{\LabelBase}{DIV}{Faktor}. Selbstverständlich können Sie diese +Option auch explizit bei allen anderen Papierformaten angeben. Wenn Sie die +automatische Berechnung wünschen, ist diese Angabe sogar sinnvoll, da die +Möglichkeit besteht, in einer Konfigurationsdatei andere Voreinstellungen zu +setzen (siehe \autoref{sec:typearea-experts.cfg}). Eine explizit angegebene +Option \OptionValue{DIV}{calc} überschreibt diese Vorkonfiguration aber. + +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside} + %\caption + [{\Option{DIV}-Voreinstellungen f"ur A4}] + {\label{tab:typearea.div}\Option{DIV}-Voreinstellungen f"ur A4} + [l] + \begin{tabular}[t]{lccc} + \toprule + Grundschriftgr"o"se: & 10\Unit{pt} & 11\Unit{pt} & 12\Unit{pt} \\ + \Option{DIV}: & 8 & 10 & 12 \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} + +Die in \autoref{sec:typearea.circleConstruction} erwähnte klassische +Konstruktion, der mittelalterliche Buchseitenkanon, ist ebenfalls auswählbar. +Verwenden Sie in diesem Fall anstelle von +\OptionVNameRef{\LabelBase}{DIV}{Faktor} oder \OptionValue{DIV}{calc} einfach +\OptionValue{DIV}{classic}\important{\OptionValue{DIV}{classic}}. Es wird dann +ein \Option{DIV}-Wert ermittelt, der eine möglichst gute Näherung an den +mittelalterlichen Buchseitenkanon darstellt. + +\begin{Example} + In dem bei der Option \OptionVNameRef{\LabelBase}{DIV}{Faktor} aufgeführten + Beispiel mit der Schriftart Bookman gab es ja genau das Problem, dass man + einen zur Schriftart besser passenden \Option{DIV}-Wert haben wollte. Man + könnte also in Abwandlung des ersten Beispiels auch einfach die Ermittlung + dieses Wertes \Package{typearea} überlassen: +\begin{lstcode} + \documentclass[a4paper,twoside]{protokol} + \usepackage{bookman} + \usepackage[DIV=calc]{typearea} +\end{lstcode} +\end{Example} +\iffree{\par% + Bitte beachten Sie unbedingt\textnote{Achtung!}, dass diese Option bei + Verwendung einer der \KOMAScript-Klassen % + \iftrue wie im Beispiel \fi% + als Klassenoption oder per \DescRef{\LabelBase.cmd.KOMAoptions} + beziehungsweise \DescRef{\LabelBase.cmd.KOMAoption} nach dem Laden der + Klasse übergeben werden muss. Weder sollte das Paket \Package{typearea} bei + Verwendung einer \KOMAScript-Klasse explizit per + \DescRef{\LabelBase.cmd.usepackage} geladen, noch die Option dabei als + optionales Argument angegeben werden. Wird die Option per + \DescRef{\LabelBase.cmd.KOMAoptions} oder + \DescRef{\LabelBase.cmd.KOMAoption} nach dem Laden des Pakets geändert, so + werden Satzspiegel und Ränder automatisch neu berechnet.% +}{% + \vskip-1\ht\strutbox plus .75\ht\strutbox% Wegen Code im Beispiel am Ende +}% +% +\EndIndexGroup + +\begin{Declaration} + \OptionValue{DIV}{current} + \OptionValue{DIV}{last} +\end{Declaration} +Wenn\ChangedAt{v3.00}{\Package{typearea}} Sie bis hier die Beispiele +aufmerksam verfolgt haben, wissen Sie eigentlich bereits, wie man die +Berechnung eines \Option{DIV}-Wertes in Abhängigkeit von der gewählten Schrift +erreicht, wenn eine \KOMAScript-Klasse zusammen mit einem Schriftpaket +verwendet wird. + +\begin{Explain} + Das Problem dabei ist, dass die \KOMAScript-Klasse das Paket + \Package{typearea} bereits selbst lädt. Die Übergabe der Optionen als + optionale Argumente von \DescRef{\LabelBase.cmd.usepackage} ist also nicht + möglich. Es würde auch nichts nützen, die Option \OptionValue{DIV}{calc} als + optionales Argument von \DescRef{\LabelBase.cmd.documentclass} + anzugeben. Diese Option würde direkt beim Laden des Pakets + \Package{typearea} ausgewertet. Damit würden Satzspiegel und Ränder für die + \LaTeX-Standardschrift und nicht für die später geladene Schrift berechnet. + + Selbstverständlich ist es möglich, mit \DescRef{\LabelBase.cmd.KOMAoptions}% + \PParameter{\OptionValueRef{\LabelBase}{DIV}{calc}} oder + \DescRef{\LabelBase.cmd.KOMAoption}% + \PParameter{\DescRef{\LabelBase.option.DIV}}\PParameter{calc} nach dem Laden + des Schriftpakets Satzspiegel und Ränder neu berechnen zu lassen. Dabei wird + dann über den Wert \PValue{calc} direkt ein \Option{DIV}-Wert für eine gute + Zeilenlänge eingefordert. + + Da es aber häufig praktischer ist, die Einstellung für die Option + \Option{DIV} nicht erst nach dem Laden der Schrift vorzunehmen, sondern an + herausgehobener Stelle, beispielsweise beim Laden der Klasse, bietet + \Package{typearea} zwei weitere symbolische Werte für diese Option. +\end{Explain} + +Mit \OptionValue{DIV}{current}\ChangedAt{v3.00}{\Package{typearea}}% +\important{\OptionValue{DIV}{current}} wird eine Neuberechnung von Satzspiegel +und Rändern angestoßen, wobei genau der \Option{DIV}-Wert verwendet wird, der +aktuell eingestellt ist. Dies ist weniger für die Neuberechnung des +Satzspiegels nach Wahl einer anderen Grundschrift von Interesse. Vielmehr ist +das dann nützlich, wenn man etwa nach Änderung des Durchschusses unter +Beibehaltung des Teilers \Var{DIV} die Randbedingung sicherstellen will, dass +\Length{textheight} abzüglich \Length{topskip} ein Vielfaches von +\Length{baselineskip} sein sollte. + +Mit \OptionValue{DIV}{last}\ChangedAt{v3.00}{\Package{typearea}}% +\important{\OptionValue{DIV}{last}} wird eine Neuberechnung von Satzspiegel +und Rändern angestoßen, wobei genau dieselbe Einstellung wie bei der letzten +Berechnung verwendet wird. + +\begin{Example} + Gehen wir wieder davon aus, dass für die Schriftart Bookman ein Satzspiegel + mit guter Zeilenlänge berechnet werden soll. Gleichzeitig wird eine + \KOMAScript-Klasse verwendet. Dies ist mit dem symbolischen Wert + \PValue{last} und der Anweisung \DescRef{\LabelBase.cmd.KOMAoptions} sehr + einfach möglich: +\begin{lstcode} + \documentclass[BCOR=12mm,DIV=calc,twoside] + {scrartcl} + \usepackage{bookman} + \KOMAoptions{DIV=last} +\end{lstcode} + Wird später entschieden, dass ein anderer \Option{DIV}-Wert + verwendet werden soll, so muss nur die Einstellung im optionalen Argument + von \DescRef{\LabelBase.cmd.documentclass} geändert werden. +\end{Example} + +Eine Zusammenfassung aller möglichen symbolischen Werte für die Option +\Option{DIV} finden Sie in \autoref{tab:symbolicDIV}. Es wird an dieser Stelle +darauf hingewiesen, dass auch die Verwendung des Pakets +\Package{fontenc}\IndexPackage{fontenc} dazu führen kann, dass \LaTeX{} eine +andere Schrift lädt. + +Falls die letzte Satzspiegelberechnung vor der Verwendung von +\OptionValue{DIV}{last} oder \OptionValue{DIV}{current} mit Hilfe von +\DescRef{\LabelBase.cmd.areaset}\IndexCmd{areaset} stattgefunden hat, wird +übrigens auch die Neuberechnung wieder mit \DescRef{\LabelBase.cmd.areaset} +durchgeführt. Sie entspricht dann +\DescRef{\LabelBase.cmd.areaset}\POParameter{current}% +\PParameter{\Length{textwidth}}\IndexLength{textwidth}% +\PParameter{\Length{textheight}}\IndexLength{textheight}. + +\begin{table} + \caption[{% + Symbolische Werte für Option \DescRef{typearea.option.DIV} und das + \PName{DIV}-Argument von \DescRef{typearea.cmd.typearea}% + }]{% + Mögliche symbolische Werte für die Option \DescRef{typearea.option.DIV} + oder das \PName{DIV}-Argument der Anweisung + \DescRef{typearea.cmd.typearea}\OParameter{BCOR}\Parameter{DIV}% + } + \label{tab:symbolicDIV} + \begin{desctabular} + \pventry{areaset}{Satzspiegel neu + anordnen.\IndexOption{DIV~=\textKValue{areaset}}}% + \pventry{calc}{Satzspiegelberechnung einschließlich Ermittlung eines guten + \Option{DIV}-Wertes erneut + durchführen.\IndexOption{DIV~=\textKValue{calc}}}% + \pventry{classic}{Satzspiegelberechnung nach dem mittelalterlichen + Buchseitenkanon (Kreisberechnung) erneut + durchführen.\IndexOption{DIV~=\textKValue{classic}}}% + \pventry{current}{Satzspiegelberechnung mit dem aktuell gültigen + \Option{DIV}-Wert erneut + durchführen.\IndexOption{DIV~=\textKValue{current}}}% + \pventry{default}{Satzspiegelberechnung mit dem Standardwert für das + aktuelle Seitenformat und die aktuelle Schriftgröße erneut durchführen. + Falls kein Standardwert existiert, \PValue{calc} + anwenden.\IndexOption{DIV~=\textKValue{default}}}% + \pventry{last}{Satzspiegelberechnung mit demselben \PName{DIV}-Argument, + das beim letzten Aufruf angegeben wurde, erneut + durchführen.\IndexOption{DIV~=\textKValue{last}}}% + \end{desctabular} +\end{table} + +Häufig\textnote{Achtung!} wird die Satzspiegelneuberechnung im Zusammenhang +mit der Ver"-änderung des Zeilenabstandes +(\emph{Durchschuss})\Index{Durchschuss} benötigt. Da der Satzspiegel unbedingt +so berechnet werden sollte, dass eine ganze Anzahl an Zeilen in den +Textbereich passt, muss bei Verwendung eines anderen Durchschusses als des +normalen der Satzspiegel für diesen Zeilenabstand neu berechnet werden. + +\begin{Example} + Angenommen, für eine Diplomarbeit wird die Schriftgröße + 10\Unit{pt} bei eineinhalbzeiligem Satz \iffalse% Umbruchkorrektur + zwingend \fi gefordert. {\LaTeX} + setzt normalerweise bei 10\Unit{pt} mit 2\Unit{pt} Durchschuss, + also 1,2-zeilig. Deshalb muss als zusätzlicher Dehnfaktor der Wert + 1,25 verwendet werden. Gehen wir außerdem davon aus, dass eine + Bindekorrektur von 12\Unit{mm} benötigt wird. Dann könnte die Lösung + dieses Problems wie folgt aussehen: +\begin{lstcode} + \documentclass[10pt,twoside,BCOR=12mm,DIV=calc] + {scrreprt} + \linespread{1.25} + \KOMAoptions{DIV=last} +\end{lstcode}\IndexCmd{linespread} + Da \Package{typearea} selbst immer die Anweisung \Macro{normalsize} bei + Berechnung eines neuen Satzspiegels ausführt, ist es nicht zwingend + notwendig, nach \Macro{linespread} den gewählten Durchschuss mit + \Macro{selectfont} zu aktivieren, damit dieser % +\iftrue % Umbruchkorrektur + auch tatsächlich +\fi % + für die Neuberechnung verwendet wird. + + Das gleiche Beispiel sähe unter Verwendung des + \Package{setspace}-Pakets\IndexPackage{setspace}% + \important{\Package{setspace}} + (siehe \cite{package:setspace}) wie folgt aus: +\begin{lstcode} + \documentclass[10pt,twoside,BCOR=12mm,DIV=calc] + {scrreprt} + \usepackage[onehalfspacing]{setspace} + \KOMAoptions{DIV=last} +\end{lstcode} +\end{Example} + +Wie\textnote{Tipp!} man an dem Beispiel sieht, spart man sich mit dem +\Package{setspace}-Paket das Wissen um den korrekten Dehnungswert. Dies gilt +allerdings nur für die Standardschriftgrößen 10\Unit{pt}, 11\Unit{pt} und +12\Unit{pt}. Für alle anderen Schriftgrößen verwendet das Paket +% +\iffalse % Umbruchkorrektur +einen näherungsweise passenden Dehnungswert. +% +\else % +eine Näherung. +\fi + +An\textnote{Achtung!} dieser Stelle erscheint es mir angebracht, darauf +hinzuweisen, dass der Zeilenabstand für die Titelseite wieder auf den normalen +Wert zurückgesetzt werden sollte und außerdem auch die Verzeichnisse mit dem +normalen Zeilenabstand gesetzt werden sollten. +\begin{Example} + Ein\IndexPackage{setspace} vollständiges Beispiel wäre also: +\begin{lstcode} + \documentclass[10pt,twoside,BCOR=12mm,DIV=calc] + {scrreprt} + \usepackage[onehalfspacing]{setspace} + \AfterTOCHead{\singlespacing} + \KOMAoptions{DIV=last} + \begin{document} + \title{Titel} + \author{Markus Kohm} + \begin{spacing}{1} + \maketitle + \end{spacing} + \tableofcontents + \chapter{Ok} + \end{document} +\end{lstcode} + Siehe hierzu auch die Anmerkungen in \autoref{sec:typearea.tips}. Die + Anweisung \DescRef{tocbasic.cmd.AfterTOCHead}\IndexCmd{AfterTOCHead} wird in + \autoref{part:forExperts}, \autoref{cha:tocbasic} auf + \DescPageRef{tocbasic.cmd.AfterTOCHead} vorgestellt. +\end{Example} +Außerdem sei darauf hingewiesen, dass Änderungen am Zeilenabstand auch +Auswirkungen auf Kopf und Fuß der Seite haben können. Dies kann sich +beispielsweise bei Verwendung von \Package{scrlayer-scrpage} auswirken und man +muss dann selbst entscheiden, ob man dort lieber den normalen Durchschuss oder +den veränderten haben will. Siehe dazu auch Option +\DescRef{scrlayer.option.singlespacing} in \autoref{cha:scrlayer}% +\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}}% +\IndexPackage{scrlayer}\IndexOption{singlespacing} auf +\DescPageRef{scrlayer.option.singlespacing}. + +Bitte beachten Sie\iffalse % Umbruchkorrektur +\ unbedingt\fi\textnote{Achtung!}, dass diese Optionen +\iffalse % Umbruchkorrektur +auch zur \else bei \fi Verwendung mit \DescRef{\LabelBase.cmd.KOMAoptions} +oder \DescRef{\LabelBase.cmd.KOMAoption} \iffalse % Umbruchkorrektur +nach dem Laden des Pakets vorgesehen sind und dann \fi eine +automatische\textnote{automatische Neuberechnung} Neuberechnung von +Satzspiegel und Rändern auslösen.% +% +\EndIndexGroup +\EndIndexGroup + + +\begin{Declaration} + \Macro{typearea}\OParameter{BCOR}\Parameter{DIV} + \Macro{recalctypearea} +\end{Declaration}% +\begin{Explain} + Wird die Option \DescRef{\LabelBase.option.DIV} oder die Option + \DescRef{\LabelBase.option.BCOR} nach dem Laden des Pakets + \Package{typearea} gesetzt, so wird intern die Anweisung \Macro{typearea} + aufgerufen. Dabei wird beim Setzen der Option + \DescRef{\LabelBase.option.DIV} für \PName{BCOR} intern der symbolische Wert + \PValue{current} verwendet\iffalse % Umbruchkorrektur + , der aus Gründen der Vollständigkeit auch in \autoref{tab:symbolicBCOR} zu + finden ist\else\ (siehe \autoref{tab:symbolicBCOR})\fi. Beim Setzen der + Option \DescRef{\LabelBase.option.BCOR} wird für \PName{DIV} hingegen der + symbolische Wert \PValue{last} verwendet. Wollen Sie, dass Satzspiegel und + Ränder stattdessen mit dem symbolischen Wert \PValue{current} für + \PName{DIV} neu berechnet werden, so können Sie direkt + \Macro{typearea}\OParameter{BCOR}\PParameter{current} verwenden. +\end{Explain} + +\begin{table} + \caption[{% + Symbolische \PName{BCOR}-Argumente für \DescRef{typearea.cmd.typearea}% + }]{% + Mögliche symbolische \PName{BCOR}-Argumente für + \Macro{typearea}\OParameter{BCOR}\Parameter{DIV}% + } + \label{tab:symbolicBCOR} + \begin{desctabular} + \pventry{current}{Satzspiegelberechnung mit dem aktuell gültigen + \Option{BCOR}-Wert erneut + durchführen.\IndexOption{BCOR~=\textKValue{current}}} + \end{desctabular} +\end{table} + +Sollen die Werte sowohl von \PName{BCOR} als auch \PName{DIV} geändert werden, +so ist die Verwendung von \Macro{typearea} zu empfehlen, da hierbei die Ränder +und der Satzspiegel nur einmal neu berechnet werden. Bei +\DescRef{\LabelBase.cmd.KOMAoptions}% +\PParameter{\OptionVNameRef{\LabelBase}{DIV}{Faktor},% + \OptionVNameRef{\LabelBase}{BCOR}{Korrektur}} werden hingegen Ränder und +Satzspiegel zunächst in Folge von Option \DescRef{\LabelBase.option.DIV} und +dann zusätzlich durch Option \DescRef{\LabelBase.option.BCOR} neu berechnet. + +\begin{Explain} + Der Befehl \Macro{typearea} ist derzeit so definiert, dass es auch möglich + ist, mitten in einem Dokument den Satzspiegel zu wechseln. Dabei werden + allerdings Annahmen über den Aufbau des \LaTeX-Kerns gemacht und interne + Definitionen und Größen des \LaTeX-Kerns verändert. % + \iffalse% Stimmt so nicht mehr wirklich. + Da am \LaTeX-Kern nur noch zur Beseitigung von Fehlern notwendige % + \else % + Auch wenn am \LaTeX-Kern inzwischen wieder mehr % + \fi % + Änderungen vorgenommen werden, + ist die Wahrscheinlichkeit hoch, dass dies in zukünftigen Versionen von + \LaTeXe{} noch funktionieren wird. Eine Garantie dafür gibt es jedoch + nicht. Die Verwendung innerhalb des Dokuments führt außerdem immer zu einem + Seitenumbruch. +\end{Explain} + +Da\important{\Macro{recalctypearea}} \DescRef{\LabelBase.cmd.KOMAoption}% +\PParameter{\hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}}}% +\PParameter{\hyperref[desc:\LabelBase.option.DIV.last]{last}} oder +\DescRef{\LabelBase.cmd.KOMAoptions}% +\PParameter{\OptionValueRef{\LabelBase}{DIV}{last}} beziehungsweise +\Macro{typearea}\POParameter{current}\PParameter{last} für die Neuberechnung +des Satzspiegels und der Ränder recht häufig benötigt werden, gibt es dafür +die abkürzende Anweisung +\Macro{recalctypearea}\ChangedAt{v3.00}{\Package{typearea}}. +\iffalse % Umbruchkorrektur +\begin{Example} + Wenn Ihnen die Schreibweisen +\begin{lstcode} + \KOMAoptions{DIV=last} +\end{lstcode} + oder +\begin{lstcode} + \typearea[current]{last} +\end{lstcode} + für die Neuberechnung von Satzspiegel und Rändern aufgrund der vielen + Sonderzeichen zu umständlich ist, können Sie einfach +\begin{lstcode} + \recalctypearea +\end{lstcode} + verwenden. +\end{Example}% +\vskip -1\ht\strutbox plus .75\ht\strutbox% Ende Beispiel+Ende Erklärung +\fi +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{twoside}{Ein-Aus-Wert} + \OptionValue{twoside}{semi} +\end{Declaration}% +Wie in \autoref{sec:typearea.basics} erklärt, hängt +die Randverteilung davon ab, ob ein Dokument ein- oder zweiseitig gesetzt +werden soll. Bei einseitigem Satz sind der linke und rechte Rand gleich +breit, während bei doppelseitigem Satz der innere Randanteil einer Seite nur +halb so groß ist wie der jeweilige äußere Rand. Um diese Unterscheidung +vornehmen zu können, muss \Package{typearea} mit Option \Option{twoside} +mitgeteilt werden, ob das Dokument doppelseitig gesetzt wird. Als +\iffree{\PName{Ein-Aus-Wert}}{\PName{Wert}} kann dabei einer der Standardwerte +für einfache Schalter aus \autoref{tab:truefalseswitch} verwendet werden. Wird +die Option ohne Wert-Angabe verwendet, so wird der Wert +\PValue{true}\important{\OptionValue{twoside}{true}} angenommen, also +doppelseitiger Satz verwendet. Deaktivieren der +Option\important{\OptionValue{twoside}{false}} führt zu einseitigem Satz. + +\begin{table} +% \centering +% \caption + \KOMAoptions{captions=topbeside}\setcapindent{0pt} + \begin{captionbeside}% + [{Standardwerte für einfache Schalter in \KOMAScript}]% + {\label{tab:truefalseswitch}Standardwerte für alle einfachen Schalter in + \KOMAScript}% + [l] + \begin{tabular}[t]{ll} + \toprule + Wert & Bedeutung \\ + \midrule + \PValue{true} & aktiviert die Option\\ + \PValue{on} & aktiviert die Option \\ + \PValue{yes} & aktiviert die Option \\ + \PValue{false}& deaktiviert die Option \\ + \PValue{off} & deaktiviert die Option \\ + \PValue{no} & deaktiviert die Option \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} + +Außer den Werten aus \autoref{tab:truefalseswitch} kann auch noch der +Wert \PValue{semi}\ChangedAt{v3.00}{\Package{typearea}}% +\important{\OptionValue{twoside}{semi}} angegeben werden. Dieser Wert +\PValue{semi} führt zu doppelseitigem Satz mit einseitigen Rändern und +einseitigen, also nicht alternierenden +Marginalien. Eine\ChangedAt{v3.12}{\Package{typearea}} eventuelle +Bindekorrektur (siehe Option \DescRef{\LabelBase.option.BCOR}, +\DescPageRef{typearea.option.BCOR}) wird jedoch ab \KOMAScript~Version 3.12 +wie beim doppelseitigen Satz auf Seiten mit ungerader Nummer dem linken Rand +und auf Seiten mit gerader Nummer dem rechten Rand zugeschlagen. Wird auf +Kompatibilität zu einer früheren +Version\important{\OptionValueRef{\LabelBase}{version}{3.12}} zurückgeschaltet +(siehe \autoref{sec:typearea.compatibilityOptions}, +\autopageref{sec:typearea.compatibilityOptions}), so ist die Bindekorrektur +dagegen auch bei \OptionValue{twoside}{semi} immer Teil des linken Randes. + +Die Option kann % +\iffalse % Umbruchkorrektur +wahlweise \fi % +als Klassenoption bei \DescRef{\LabelBase.cmd.documentclass}, als Paketoption +bei \DescRef{\LabelBase.cmd.usepackage} oder % +\iffalse % Umbruchkorrektur +auch \fi % +nach dem Laden von +\Package{typearea} per \DescRef{\LabelBase.cmd.KOMAoptions} oder +\DescRef{\LabelBase.cmd.KOMAoption} gesetzt werden. Eine Verwendung dieser +Option nach dem Laden von \Package{typearea} führt\textnote{automatische + Neuberechnung} automatisch zur Neuberechnung des Satzspiegels mit +\DescRef{\LabelBase.cmd.recalctypearea} (siehe +\DescPageRef{typearea.cmd.recalctypearea}). War vor der Option +doppelseitiger Satz aktiv, wird noch vor der Neuberechnung auf die nächste +ungerade Seite umbrochen.% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{twocolumn}{Ein-Aus-Wert} +\end{Declaration}% +Für die Berechnung eines guten Satzspiegels mit Hilfe von +\OptionValueRef{\LabelBase}{DIV}{calc} ist es erforderlich zu wissen, ob das +Dokument ein- oder zweispaltig gesetzt wird. Da die Betrachtungen zur +Zeilenlänge aus \autoref{sec:typearea.basics} dann für jede einzelne Spalte +gelten, darf der Satzspiegel in doppelspaltigen Dokumenten bis zu doppelt so +breit sein wie in einspaltigen Dokumenten. + +Um diese Unterscheidung vornehmen zu können, muss \Package{typearea} mit +Option \Option{twocolumn} mitgeteilt werden, ob das Dokument doppelspaltig +gesetzt wird. Als \PName{Ein-Aus-Wert} kann dabei einer der Standardwerte für +einfache Schalter aus \autoref{tab:truefalseswitch} verwendet werden. Wird die +Option ohne Wert-Angabe verwendet, so wird der Wert +\PValue{true}\important{\OptionValue{twocolumn}{true}} angenommen, also +doppelspaltiger Satz verwendet. Ein +Deaktivieren der Option führt wieder zum voreingestellten +einspaltigen Satz. + +Die Option kann als Klassenoption bei \DescRef{\LabelBase.cmd.documentclass}, +als Paketoption bei \DescRef{\LabelBase.cmd.usepackage} oder nach dem Laden +von \Package{typearea} per \DescRef{\LabelBase.cmd.KOMAoptions} oder +\DescRef{\LabelBase.cmd.KOMAoption} gesetzt werden. Eine Verwendung % +\iffalse % Umbruchoptimierung +dieser Option \fi% +nach dem Laden von \Package{typearea} +führt\textnote{automatische Neuberechnung} automatisch zur Neuberechnung des +Satzspiegels mittels \DescRef{\LabelBase.cmd.recalctypearea} (siehe +\DescPageRef{typearea.cmd.recalctypearea}).% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{headinclude}{Ein-Aus-Wert} + \OptionVName{footinclude}{Ein-Aus-Wert} +\end{Declaration}% +\begin{Explain}% + Bisher wurde zwar erklärt, wie die + Satzspiegelkonstruktion\Index{Satzspiegel} funktioniert und in welchem + Verhältnis einerseits die Ränder\Index{Rand} zueinander stehen, andererseits + der Textkörper zur Seite steht, aber eine entscheidende Frage blieb + ausgeklammert: Was genau ist \emph{der Rand}? + + Auf den ersten Blick wirkt diese Frage trivial: Der Rand ist der Teil der + Seite, der oben, unten, links und rechts frei bleibt. Doch das ist nur die + halbe Wahrheit. Beim oberen und unteren Rand stellt sich die Frage, wie + Kopf- und Fußzeile\Index{Seiten>Kopf}\Index{Seiten>Fuss=Fuß} zu behandeln + sind. Gehören diese beiden zum Textkörper oder zum jeweiligen Rand? Die + Frage ist nicht einfach zu beantworten. Eindeutig ist, dass ein leerer Fuß + und ein leerer Kopf zum Rand zu rechnen sind. Schließlich können sie nicht + vom restlichen Rand unterschieden werden. Ein Fuß, der nur die + Paginierung\Index{Paginierung}\textnote{Paginierung} + \iffalse % Beseitigung von Fußnoten + \unskip\footnote{Unter der Paginierung versteht man die Angabe der + Seitenzahl, wahlweise innerhalb oder außerhalb des Satzspiegels, meist im + Kopf oder Fuß der Seite.} % + \fi enthält, wirkt optisch ebenfalls eher wie Rand und sollte deshalb zu + diesem gerechnet werden. Für die optische Wirkung ist dabei unwesentlich, ob + der Fuß beim Lesen oder Überfliegen leicht als Fuß erkannt werden kann oder + nicht. Entscheidend ist, wie eine wohlgefüllte Seite bei \emph{unscharfer + Betrachtung} wirkt. Dazu bedient man sich beispielsweise seiner + altersweitsichtigen Großeltern, denen man die Brille stibitzt und dann die + Seite etwa einen halben Meter von der Nasenspitze entfernt hält. In + Ermangelung erreichbarer Großeltern kann man sich auch damit behelfen, dass + man die eigenen Augen auf Fernsicht stellt, die Seite aber nur mit + ausgestreckten Armen hält. Brillenträger sind hier deutlich im Vorteil. Hat + man eine Fußzeile, die neben der Paginierung weitere weitschweifige Angaben + enthält, beispielsweise einen Copyright-Hinweis, so wirkt die Fußzeile eher + wie ein etwas abgesetzter Teil des Textkörpers. Bei der Berechnung des + Satzspiegels sollte das berücksichtigt werden. + + Bei der Kopfzeile sieht es noch schwieriger aus. In der Kopfzeile wird + häufig der Kolumnentitel\Index{Kolumnentitel}\textnote{Kolumnentitel} + \iffalse% Beseitigung von Fußnoten + \unskip\footnote{Unter dem Kolumnentitel versteht man in der Regel die + Wiederholung einer Überschrift mit Titelcharakter. Er steht häufig im + Seitenkopf, seltener im Seitenfuß.} % + \fi gesetzt. Arbeitet man mit einem lebenden Kolumnentitel, also der + Wiederholung der ersten bzw. zweiten Gliederungsebene in der Kopfzeile, und + hat gleichzeitig sehr lange Überschriften, so erhält man automatisch sehr + lange Kopfzeilen. In diesem Fall wirkt der Kopf wiederum wie ein abgesetzter + Teil des Textkörpers und weniger wie leerer Rand. Verstärkt wird dieser + Effekt noch, wenn neben dem Kolumnentitel auch die Paginierung im Kopf + erfolgt. Dadurch erhält man einen links und rechts abgeschlossenen Bereich, + der kaum noch als leerer Rand wirkt. Schwieriger ist es bei Paginierung im + Fuß und Überschriften, deren Länge sehr stark schwankt. Hier kann der Kopf + der einen Seite wie Textkörper wirken, der Kopf der anderen Seite aber + eher wie Rand. Keinesfalls sollte man die Seiten jedoch unterschiedlich + behandeln. Das würde zu vertikal springenden Köpfen führen und ist nicht + einmal für ein Daumenkino geeignet. Ich rate in diesem Fall dazu, den Kopf + zum Textkörper zu rechnen. + + Ganz einfach fällt die Entscheidung, wenn Kopf oder Fuß durch + eine Linie vom eigentlichen Textkörper abgetrennt sind. Dadurch + erhält man eine geschlossene Wirkung und der Kopf bzw. Fuß sollte + unbedingt zum Textkörper gerechnet werden. Wie gesagt: Die durch die + Trennlinie verbesserte Erkennung des Kopfes oder Fußes ist hier + unerheblich. Entscheidend ist die unscharfe Betrachtung.\par +\end{Explain} + +Das \Package{typearea}-Paket trifft die Entscheidung, ob ein Kopf oder Fuß zum +Textkörper gehört\important{\OptionValue{headinclude}{true} + \OptionValue{headinclude}{false} \OptionValue{footinclude}{true} + \OptionValue{footinclude}{false}} oder davon getrennt zum Rand gerechnet +werden muss, nicht selbst. Stattdessen kann mit den Optionen +\Option{headinclude} und \Option{footinclude} eingestellt werden, ob der Kopf +und der Fuß zum Textkörper gerechnet werden sollen. Die Optionen verstehen +dabei als \PName{Ein-Aus-Wert}\ChangedAt{v3.00}{\Package{typearea}} die +Standardwerte für einfache Schalter, die in \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} angegeben sind. Man kann die Optionen auch +ohne Wertzuweisung verwenden. In diesem Fall wird \PValue{true} als +\PName{Ein-Aus-Wert} verwendet, also der Kopf oder Fuß zum Satzspiegel +gerechnet. + +Wenn Sie unsicher sind, was die richtige Einstellung ist, lesen Sie bitte +obige Erläuterungen. Voreingestellt sind normalerweise +\OptionValue{headinclude}{false} und +\OptionValue{footinclude}{false}. Dies kann sich jedoch bei den +\KOMAScript-Klassen je nach Klassenoption oder bei Verwendung anderer +\KOMAScript-Pakete generell ändern (siehe \autoref{sec:maincls.options} und +\autoref{cha:scrlayer-scrpage}). + +Bitte beachten Sie unbedingt\textnote{Achtung!}, dass diese Optionen bei +Verwendung einer der \KOMAScript-Klassen als Klassenoptionen oder per +\DescRef{\LabelBase.cmd.KOMAoptions} beziehungsweise +\DescRef{\LabelBase.cmd.KOMAoption} nach dem Laden der Klasse übergeben werden +müssen. Eine Änderung dieser Optionen nach dem Laden von \Package{typearea} +führt dabei nicht\textnote{keine automatische Neuberechnung} zu einer +automatischen Neuberechnung des Satzspiegels. Vielmehr wirkt sich die Änderung +erst bei der nächsten Neuberechnung des Satzspiegels aus. Zur Neuberechnung +des Satzspiegels siehe Option +\hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} mit den Werten +\hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} oder +\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (siehe +\DescPageRef{typearea.option.DIV.last}) oder die Anweisung +\DescRef{\LabelBase.cmd.recalctypearea} (siehe +\DescPageRef{typearea.cmd.recalctypearea}).% +% +\EndIndexGroup + +\begin{Declaration} + \OptionVName{mpinclude}{Ein-Aus-Wert} +\end{Declaration} +Neben\ChangedAt{v2.8q}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} Dokumenten, bei denen der Kopf und der Fuß der Seite eher +zum Textbereich als zum Rand gehört, gibt es auch Dokumente, bei denen dies +für Randnotizen (siehe beispielsweise Befehl \DescRef{maincls.cmd.marginpar} +in \cite{l2kurz} oder \autoref{sec:maincls.marginNotes}) zutrifft. Mit der +Option \Option{mpinclude} kann genau dies erreicht werden. Die Option +versteht dabei als \PName{Ein-Aus-Wert}\ChangedAt{v3.00}{\Package{typearea}} +die Standardwerte für einfache Schalter, die in \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch} angegeben sind. Man kann die Option auch +ohne Wertzuweisung verwenden. In diesem Fall wird \PValue{true} als +\PName{Ein-Aus-Wert} verwendet. + +Der Effekt von +\OptionValue{mpinclude}{true}\important{\OptionValue{mpinclude}{true}} ist, +dass eine Breiteneinheit vom Textbereich weggenommen und als Bereich für die +Randnotizen verwendet wird. Mit +\OptionValue{mpinclude}{false}, was +der Voreinstellung entspricht, wird hingegen ein Teil des Randes für +Randnotizen verwendet. Dies ist, je nachdem ob einseitig oder doppelseitig +gearbeitet wird, ebenfalls eine Breiteneinheit oder auch eineinhalb +Breiteneinheiten. In der Regel ist die Verwendung von +\OptionValue{mpinclude}{true} nicht anzuraten und sollte Experten vorbehalten +bleiben. + +\begin{Explain} + In den meisten Fällen, in denen die Option \Option{mpinclude} sinnvoll ist, + werden außerdem breitere Randnotizen benötigt. In sehr vielen Fällen sollte + dabei aber nicht die gesamte Breite, sondern nur ein Teil davon dem + Textbereich zugeordnet werden. Dies ist beispielsweise der Fall, wenn der + Rand für Zitate verwendet wird. Solche Zitate werden üblicherweise im + Flattersatz gesetzt, wobei die bündige Kante an den Textbereich + anschließt. Da sich kein geschlossener optischer Eindruck ergibt, dürfen die + flatternden Enden also durchaus teilweise in den Rand ragen. Man kann das + einfach erreichen, indem man zum einen die Option \Option{mpinclude} + verwendet. Zum anderen vergrößert man die Länge \Length{marginparwidth} nach + der Berechnung des Satzspiegels noch mit Hilfe der + \Macro{addtolength}-Anweisung. Um welchen Wert man vergrößern sollte, hängt + vom Einzelfall ab und erfordert einiges Fingerspitzengefühl. Auch deshalb + ist die Option \Option{mpinclude} eher etwas für Experten. Natürlich kann + man auch festlegen, dass die Randnotizen beispielsweise zu einem Drittel in + den Rand hineinragen sollen, und das wie folgt erreichen: +\begin{lstcode} + \setlength{\marginparwidth}{1.5\marginparwidth} +\end{lstcode} + + Da es derzeit keine Option gibt, um mehr Platz für die Randnotizen innerhalb + des Textbereichs vorzusehen, gibt es nur eine Möglichkeit, dies zu + erreichen: % +\iftrue % Umbruchkorrektur + Die Anpassung von \Length{textwidth}\IndexLength{textwidth} und + \Length{marginparwidth}\IndexLength{marginparwidth} nach der Berechnung des + Satzspiegels. Siehe dazu + \DescRef{typearea-experts.cmd.AfterCalculatingTypearea} in + \autoref{sec:typearea-experts.experts}, + \DescPageRef{typearea-experts.cmd.AfterCalculatingTypearea}. +% +\else +% + Man verzichtet auf die Option \Option{mpinclude} oder setzt + \Option{mpinclude} auf \PValue{false}, verringert nach der + Satzspiegelberechnung die Breite des Textbereichs \Macro{textwidth} und + setzt die Breite des Bereichs der Randnotizen auf den Wert, um den man die + Breite des Textbereichs verringert hat. Leider lässt sich dieses Vorgehen + nicht mit der automatischen Berechnung des \PName{DIV}-Wertes verbinden. + Demgegenüber wird \Option{mpinclude} bei + \OptionValueRef{\LabelBase}{DIV}{calc}\IndexOption{DIV=calc} (siehe + \DescPageRef{typearea.option.DIV.calc}) berücksichtigt. +% +\fi +\end{Explain} + +Bitte beachten Sie unbedingt\textnote{Achtung!}, dass diese Option bei +Verwendung einer der \KOMAScript-Klassen als Klassenoption oder per +\DescRef{\LabelBase.cmd.KOMAoptions} beziehungsweise oder +\DescRef{\LabelBase.cmd.KOMAoption} nach dem Laden der Klasse übergeben werden +muss. Eine Änderung dieser Option nach dem Laden von \Package{typearea} führt +nicht\textnote{keine automatische Neuberechnung} zu einer automatischen +Neuberechnung des Satzspiegels. Vielmehr wirkt sich die Änderung erst bei der +nächsten Neuberechnung des Satzspiegels aus. Zur Neuberechnung des +Satzspiegels siehe Option +\hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} mit den Werten +\hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} oder +\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (siehe +\DescPageRef{typearea.option.DIV.last}) oder die Anweisung +\DescRef{\LabelBase.cmd.recalctypearea} (siehe +\DescPageRef{typearea.cmd.recalctypearea}).% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{headlines}{Zeilenanzahl} + \OptionVName{headheight}{Höhe} +\end{Declaration}% +\BeginIndex{}{Kopf>Hoehe=Höhe}% +Es ist nun also bekannt, wie man Satzspiegel mit dem \Package{typearea}-Paket +berechnet und wie man dabei angibt, ob der Kopf oder Fuß zum Textkörper oder +zum Rand gehört. Insbesondere für den Kopf fehlt aber noch die Angabe, wie +hoch er denn eigentlich sein soll. Hierzu dienen die Optionen +\Option{headlines} und +\Option{headheight}\ChangedAt{v3.00}{\Package{typearea}}. + +Die Option \Option{headlines}\important{\Option{headlines}} setzt man dabei +auf die Anzahl der Kopfzeilen. Normalerweise arbeitet das +\Package{typearea}-Paket mit 1,25 Kopfzeilen. Dieser Wert stellt einen +Kompromiss dar. Zum einen ist er groß genug, um auch für eine unterstrichene +Kopfzeile (siehe \autoref{sec:maincls.pagestyle}) Platz zu bieten, zum anderen +ist er klein genug, um das Randgewicht nicht zu stark zu verändern, wenn mit +einer einfachen, nicht unterstrichenen Kopfzeile gearbeitet wird. Damit ist +der voreingestellte Wert in den meisten Standardfällen ein guter Wert. In +einigen Fällen will oder muss man aber die Kopfhöhe genauer den tatsächlichen +Erfordernissen anpassen. + +\begin{Example} + Angenommen, es soll ein Text mit einem zweizeiligen Kopf erstellt + werden. Normalerweise würde dies dazu führen, dass auf jeder Seite + eine Warnung »\texttt{overfull} \Macro{vbox}« von {\LaTeX} + ausgegeben würde. Um dies zu verhindern, wird das + \Package{typearea}-Paket angewiesen, einen entsprechenden Satzspiegel + zu berechnen: +\begin{lstcode} + \documentclass[a4paper]{article} + \usepackage[headlines=2.1]{typearea} +\end{lstcode} + Es ist auch wieder möglich und bei Verwendung einer \KOMAScript-Klasse + empfehlenswert, diese Option direkt an die Klasse zu übergeben: +\begin{lstcode} + \documentclass[headlines=2.1]{scrartcl} +\end{lstcode} + Befehle, mit denen dann der Inhalt der zweizeiligen Kopfzeile definiert + werden kann, sind in \autoref{cha:scrlayer-scrpage} zu finden. +\end{Example} + +In einigen Fällen ist es nützlich, wenn man die Kopfhöhe nicht in Zeilen, +sondern direkt als Längenwert angeben kann. Dies ist mit Hilfe der alternativ +verwendbaren Option \Option{headheight}\important{\Option{headheight}} +möglich. Als \PName{Höhe} sind alle Längen und Größen verwendbar, die \LaTeX{} +kennt. Es ist jedoch zu beachten, dass bei Verwendung einer \LaTeX-Länge wie +\Length{baselineskip} nicht deren Größe zum Zeitpunkt des Setzens der Option, +sondern zum Zeitpunkt der Berechnung des Satzspiegels und der Ränder +entscheidend ist. Außerdem\textnote{Achtung!} sollten \LaTeX-Längen wie +\Length{baselineskip} keinesfalls im optionalen Argument von +\DescRef{\LabelBase.cmd.documentclass} oder +\DescRef{\LabelBase.cmd.usepackage} verwendet werden. + +Bitte beachten Sie unbedingt\textnote{Achtung!}, dass diese Optionen bei +Verwendung einer der \KOMAScript-Klassen als Klassenoptionen oder per +\DescRef{\LabelBase.cmd.KOMAoptions} beziehungsweise +\DescRef{\LabelBase.cmd.KOMAoption} nach dem Laden der Klasse übergeben werden +müssen. Eine Änderung dieser Optionen nach dem Laden von \Package{typearea} +führt nicht\textnote{keine automatische Neuberechnung} zu einer automatischen +Neuberechnung des Satzspiegels. Vielmehr wirkt sich die Änderung erst bei der +nächsten Neuberechnung des Satzspiegels aus. Zur Neuberechnung des +Satzspiegels siehe Option +\hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} mit den Werten +\hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} oder +\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (siehe +\DescPageRef{typearea.option.DIV.last}) oder die Anweisung +\DescRef{\LabelBase.cmd.recalctypearea} (siehe +\DescPageRef{typearea.cmd.recalctypearea}).% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{footlines}{Zeilenanzahl}% + \OptionVName{footheight}{Höhe}% + \Length{footheight}% +\end{Declaration}% +\BeginIndex{}{Fuss=Fuß>Hoehe=Höhe}% +Wie schon für den Kopf fehlt aber noch die Angabe, wie hoch der Fuß sein +soll. Hierzu dienen die Optionen \Option{footlines} und +\Option{footheight}\ChangedAt{v3.12}{\Package{typearea}}. Allerdings ist die +Höhe des Fußes im Gegensatz zur Höhe des Kopfes keine Länge des \LaTeX-Kerns +selbst. Daher definiert \Package{typearea} zur Einführung eine neue Länge +\Length{footheight}\IndexLength[indexmain]{footheight}, falls diese noch nicht +existiert. Ob diese dann auch beispielsweise von Klassen und Paketen für die +Gestaltung von Kopf und Fuß verwendet wird, hängt von den verwendeten Klassen +und Paketen ab. Das \KOMAScript-Paket +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% +\IndexPackage{scrlayer-scrpage} berücksichtigt \Length{footheight} und +arbeitet somit aktiv mit \Package{typearea} zusammen. Die \KOMAScript-Klassen +berücksichtigen \Length{footheight} hingegen nicht, da sie ohne +Paketunterstützung nur Seitenstile mit einzeiligen Seitenfüßen anbieten. + +Die Option \Option{footlines}\important{\Option{footlines}} setzt man +vergleichbar zu \DescRef{\LabelBase.option.headlines} auf die Anzahl der +Fußzeilen. Normalerweise arbeitet das \Package{typearea}-Paket mit 1,25 +Fußzeilen. Dieser Wert stellt einen Kompromiss dar. Zum einen ist er groß +genug, um auch für eine über- und unterstrichene Fußzeile (siehe +\autoref{sec:maincls.pagestyle}) Platz zu bieten, zum anderen ist er klein +genug, um das Randgewicht nicht zu stark zu verändern, wenn mit einer +einfachen Fußzeile ohne Trennlinien gearbeitet wird. Damit ist der +voreingestellte Wert in den meisten Standardfällen ein guter Wert. In einigen +Fällen will oder muss man aber die Fußhöhe genauer den tatsächlichen +Erfordernissen anpassen. + +\begin{Example} + Angenommen, im Fuß soll eine zweizeilige Copyright-Angabe gesetzt + werden. Zwar gibt es in \LaTeX{} selbst keinen Test, ob der für den Fuß + vorgesehene Platz dafür genügend Raum bietet, die Überschreitung der + vorgesehenen Höhe resultiert aber wahrscheinlich in einer unausgeglichenen + Verteilung von Satzspiegeln und Rändern. Außerdem führt beispielsweise das + Paket \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + \important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% + \IndexPackage{scrlayer-scrpage}, mit dem ein solcher Fuß\-in\-halt gesetzt + werden könnte, durchaus eine entsprechende Überprüfung durch und meldet + gegebenenfalls auch Überschreitungen. Daher ist es sinnvoll, die benötigte + größere Fußhöhe bereits bei der Berechnung des Satzspiegels anzugeben: +\begin{lstcode} + \documentclass[a4paper]{article} + \usepackage[footlines=2.1]{typearea} +\end{lstcode} + Es ist auch wieder möglich und bei Verwendung einer \KOMAScript-Klasse + empfehlenswert, diese Option direkt an die Klasse zu übergeben: +\begin{lstcode} + \documentclass[footlines=2.1]{scrartcl} +\end{lstcode} + Befehle, mit denen dann der Inhalt der zweizeiligen Fußzeile + definiert werden kann, sind in \autoref{cha:scrlayer-scrpage} zu finden. +\end{Example} + +In einigen Fällen ist es nützlich, wenn man die Fußhöhe nicht in Zeilen, +sondern direkt als Längenwert angeben kann. Dies ist mit Hilfe der alternativ +verwendbaren Option \Option{footheight}\important{\Option{footheight}} +möglich. Als \PName{Höhe} sind alle Längen und Größen verwendbar, die \LaTeX{} +kennt. Es ist jedoch zu beachten, dass bei Verwendung einer \LaTeX-Länge wie +\Length{baselineskip} nicht deren Größe zum Zeitpunkt des Setzens der Option, +sondern zum Zeitpunkt der Berechnung des Satzspiegels und der Ränder +entscheidend ist. Außerdem\textnote{Achtung!} sollten \LaTeX-Längen wie +\Length{baselineskip} keinesfalls im optionalen Argument von +\DescRef{\LabelBase.cmd.documentclass} oder +\DescRef{\LabelBase.cmd.usepackage} verwendet werden. + +Bitte beachten Sie unbedingt\textnote{Achtung!}, dass diese Optionen bei +Verwendung einer der \KOMAScript-Klassen als Klassenoptionen oder per +\DescRef{\LabelBase.cmd.KOMAoptions} beziehungsweise +\DescRef{\LabelBase.cmd.KOMAoption} nach dem Laden der Klasse übergeben werden +müssen. Eine Änderung dieser Optionen nach dem Laden von \Package{typearea} +führt nicht\textnote{keine automatische Neuberechnung} zu einer automatischen +Neuberechnung des Satzspiegels. Vielmehr wirkt sich die Änderung erst bei der +nächsten Neuberechnung des Satzspiegels aus. Zur Neuberechnung des +Satzspiegels siehe Option +\hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} mit den Werten +\hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} oder +\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (siehe +\DescPageRef{typearea.option.DIV.last}) oder die Anweisung +\DescRef{\LabelBase.cmd.recalctypearea} (siehe +\DescPageRef{typearea.cmd.recalctypearea}).% +\EndIndexGroup + + +\begin{Declaration} + \Macro{areaset}\OParameter{BCOR}\Parameter{Breite}\Parameter{Höhe} +\end{Declaration}% +Bis hier wurde nun eine Menge darüber erzählt, wie man einen guten +Satzspiegel\Index{Satzspiegel} für Standardanwendungen erstellt und wie das +\Package{typearea}-Paket dem Anwender diese Arbeit erleichtert, ihm aber +gleichzeitig Möglichkeiten der Einflussnahme bietet. Es gibt jedoch auch +Fälle, in denen der Textkörper eine bestimmte Größe exakt einhalten soll, ohne +dass dabei auf gute Satzspiegelkonstruktion oder auf weitere Nebenbedingungen +zu achten ist. Trotzdem sollen die Ränder so gut wie möglich verteilt und +dabei gegebenenfalls auch eine Bindekorrektur berücksichtigt werden. Das +\Package{typearea}-Paket bietet hierfür den Befehl \Macro{areaset}, dem man +neben der optionalen Bindekorrektur als Parameter die Breite und Höhe des +Textbereichs übergibt. Die Ränder und deren Verteilung werden dann automatisch +berechnet, wobei gegebenenfalls auch die Einstellungen der Paketoptionen +\DescRef{\LabelBase.option.headinclude} und +\DescRef{\LabelBase.option.footinclude} berücksichtigt werden. Die Optionen +\DescRef{\LabelBase.option.headlines}\IndexOption{headlines}\textnote{Achtung!}, +\DescRef{\LabelBase.option.headheight}\IndexOption{headheight}, +\DescRef{\LabelBase.option.footlines}\IndexOption{footlines} und +\DescRef{\LabelBase.option.footheight}\IndexOption{footheight} bleiben in +diesem Fall jedoch unberücksichtigt! Siehe dazu die weiterführenden +Informationen zu \DescRef{typearea-experts.cmd.areaset} auf +\DescPageRef{typearea-experts.cmd.areaset} in +\autoref{sec:typearea-experts.experimental}. + +Die Voreinstellung für \PName{BCOR} ist 0\Unit{pt}. Soll hingegen die aktuelle, +beispielsweise per Option \DescRef{\LabelBase.option.BCOR}\IndexOption{BCOR} +eingestellte Bindekorrektur erhalten bleiben, sollte man den symbolischen Wert +\PValue{current} als optionales Argument verwenden. + +\begin{Example} + Angenommen, ein Text auf A4-Papier soll genau die Breite von 60 + Zeichen in der Typewriter-Schrift haben und exakt 30 Zeilen je Seite + besitzen. Dann könnte mit folgender Präambel gearbeitet werden: +\begin{lstcode} + \documentclass[a4paper,11pt]{article} + \usepackage{typearea} + \newlength{\CharsLX}% Breite von 60 Zeichen + \newlength{\LinesXXX}% Hoehe von 30 Zeilen + \settowidth{\CharsLX}{\texttt{1234567890}} + \setlength{\CharsLX}{6\CharsLX} + \setlength{\LinesXXX}{\topskip} + \addtolength{\LinesXXX}{29\baselineskip} + \areaset{\CharsLX}{\LinesXXX} +\end{lstcode} + Der Faktor von 29 statt 30 ist damit begründet, dass die Grundlinie der + obersten Zeile bereits am obersten Rand des um \Macro{topskip} verringerten + Satzspiegels liegt, solange die Höhe der obersten Zeile kleiner als + \Macro{topskip} ist. Die oberste Zeile benötigt damit keine Höhe. Die + Unterlängen der untersten Zeile ragen dafür unter den Satzspiegel. + +\iffalse % Umbruchkorrekturtext + Soll stattdessen ein Gedichtband gesetzt werden, bei dem es nur + darauf ankommt, dass der Textbereich genau quadratisch mit einer + Seitenlänge von 15\Unit{cm} ist, wobei ein Binderand von + 1\Unit{cm} zu berücksichtigen ist, so kann dies wie folgt + erreicht werden:% +\else % +\iffalse % + Ein quadratischer Gedichtband im Format 15\Unit{cm}\,:\,15\Unit{cm} mit + mit 1\Unit{cm} Binderand gesetzt werden, ginge so:% +\else % + Soll stattdessen ein Gedichtband mit quadratischem Textbereich der + Seitenlänge 15\Unit{cm} und + einem Binderand von 1\Unit{cm} gesetzt + werden, so ist Folgendes möglich:% +\fi % +\fi % +% Korrektur von Code am Ende eines Beispiels am Ende einer Erklärung +\begin{lstcode}[belowskip=-1.5\baselineskip] + \documentclass{gedichte} + \usepackage{typearea} + \areaset[1cm]{15cm}{15cm} +\end{lstcode}% +\end{Example}% +\EndIndexGroup + + +\begin{Declaration} + \OptionValue{DIV}{areaset} +\end{Declaration}% +In\ChangedAt{v3.00}{\Package{typearea}} seltenen Fällen ist es nützlich, wenn +man den aktuell eingestellten Satzspiegel neu ausrichten lassen kann. Dies ist +mit der Option +\OptionValue{DIV}{areaset}\important{\OptionValue{DIV}{areaset}} möglich, +wobei \DescRef{\LabelBase.cmd.KOMAoptions}\PParameter{DIV=areaset} der +Anweisung +\begin{lstcode} + \areaset[current]{\textwidth}{\textheight} +\end{lstcode} +entspricht. Dasselbe Ergebnis erhält man% +\iffalse auch\fi% Umbruchkorrekturtext! +, wenn \OptionValueRef{\LabelBase}{DIV}{last} verwendet wird und der +Satzspiegel zuletzt per \DescRef{\LabelBase.cmd.areaset} eingestellt wurde.% +% +\EndIndexGroup + +\iffalse% Umbruchkorrekturtext: Alternativen +\iftrue% +Wenn Sie konkrete Vorgaben bezüglich der Ränder zu erfüllen haben, ist +\Package{typearea} nicht geeignet. In diesem Fall ist die Verwendung des +Pakets \Package{geometry}\IndexPackage{geometry}\important{\Package{geometry}} +(siehe \cite{package:geometry}) empfehlenswert.% +\else% +Das Paket \Package{typearea} ist nicht dafür gedacht, bestimmte Randbreiten +einzustellen. Dafür ist das Paket \Package{geometry}\IndexPackage{geometry} +(siehe \cite{package:geometry}) empfehlenswert.% +\fi% +\fi + + +\section{Einstellung des Papierformats}% +\seclabel{paperTypes}% +\BeginIndexGroup + +Das Papierformat ist ein \iffalse entscheidendes \fi% Umbruchkorrekturtext +Grundmerkmal eines Dokuments. Wie +bereits bei der Vorstellung der \iffalse unterstützten \fi% Umbruchkorrekturtext +Satzspiegelkonstruktionen (siehe +\autoref{sec:typearea.basics} bis \autoref{sec:typearea.circleConstruction} ab +\autopageref{sec:typearea.basics}) +aufgezeigt, steht und fällt die Auf"|teilung der Seite und damit das gesamte +Dokumentlayout mit der Wahl des Papierformats. Während die +\LaTeX-Standardklassen auf einige wenige Formate festgelegt sind, unterstützt +\KOMAScript{} mit dem Paket \Package{typearea} selbst ausgefallene +Seitengrößen. + + +\begin{Declaration} + \OptionVName{paper}{Format} + \OptionVName{paper}{Ausrichtung} +\end{Declaration}% +Die Option \Option{paper}\ChangedAt{v3.00}{\Package{typearea}} ist das +zentrale Element der Formatauswahl\important[i]{% + \begin{tabular}[t]{@{}l@{}l@{}} + \KOption{paper} & \PValue{letter}, \PValue{legal}, \\ + & \PValue{executive}, \\ + & \PValue{A0}, \PValue{A1}, \PValue{A2} \dots\\ + & \PValue{B0}, \PValue{B1}, \PValue{B2} \dots\\ + & \PValue{C0}, \PValue{C1}, \PValue{C2} \dots\\ + & \PValue{D0}, \PValue{D1}, \PValue{D2} \dots\end{tabular}} % +bei \KOMAScript. Als \PName{Format} wird dabei zunächst das amerikanische +\Option{letter}, \Option{legal} und \Option{executive} unterstützt. Darüber +hinaus sind die ISO-Formate der Reihen A, B, C und D möglich, also +beispielsweise \PValue{A4} oder -- klein geschrieben -- \PValue{a4}. + +Querformate\important{% + \begin{tabular}[t]{@{}l@{}l@{}} + \KOption{paper} & \PValue{landscape}, \\ + & \PValue{seascape} + \end{tabular}% +} werden dadurch unterstützt, dass man die Option ein weiteres Mal mit dem +Wert \PValue{landscape}\Index{Papier>Ausrichtung} oder +\PValue{seascape}\ChangedAt{v3.02c}{\Package{typearea}} angibt. Dabei +unterscheiden sich \PValue{landscape} und \PValue{seascape} nur darin, dass +das Programm \File{dvips} bei \PValue{landscape} um -90\Unit{\textdegree} +dreht, während bei \PValue{seascape} um +90\Unit{\textdegree} gedreht +wird. Hilfreich ist \PValue{seascape} also vor allem dann, wenn ein +PostScript-Anzeigeprogramm die Seiten im Querformat auf dem Kopf stellt. +Damit der Unterschied eine Rolle spielt, darf auch die nachfolgend +beschriebene Option \DescRef{\LabelBase.option.pagesize}% +\IndexOption{pagesize}\important{\DescRef{\LabelBase.option.pagesize}} nicht +deaktiviert sein. + +Zusätzlich kann das \PName{Format} auch in der Form +\PName{Breite}\texttt{:}\PName{Höhe}\ChangedAt{v3.01b}{\Package{typearea}}% +\important{\OptionVName{paper}{Breite\textup{:}Höhe}} beziehungsweise +\PName{Höhe}\texttt{:}\PName{Breite}\ChangedAt{v3.22}{\Package{typearea}}% +\important{\OptionVName{paper}{Höhe\textup{:}Breite}} angegeben +werden. Welcher Wert die \PName{Höhe} und welcher die \PName{Breite} ist, +richtet sich nach der Ausrichtung des Papiers. Mit +\OptionValue{paper}{landscape} oder \OptionValue{paper}{seascape} ist der +kleinere Wert die \PName{Höhe} und der größere Wert die \PName{Breite}. Mit +\OptionValue{paper}{portrait}\important{\OptionValue{paper}{portrait}} ist +dagegen der kleinere Wert die \PName{Breite} und der größere Wert die +\PName{Höhe}. + +Es\textnote{Achtung!} wird darauf hingewiesen, dass bis Version~3.01a der +erste Wert immer die \PName{Höhe} und der zweite Wert die \PName{Breite} +war. Dagegen war von Version~3.01b bis Version~3.21a der erste Wert immer die +\PName{Breite} und der zweite Wert immer die \PName{Höhe}. Dies ist +insbesondere dann zu beachten, wenn mit einer entsprechenden +Kompatibilitätseinstellung (siehe Option \DescRef{\LabelBase.option.version}% +\IndexOption{version}\important{\DescRef{\LabelBase.option.version}}, +\autoref{sec:typearea.compatibilityOptions}, +\DescPageRef{typearea.option.version}) gearbeitet wird. + +\begin{Example} + Angenommen, es soll eine Karteikarte im Format ISO-A8 quer bedruckt + werden. Dabei sollen die Ränder sehr klein gewählt werden. Außerdem + wird auf eine Kopf- und eine Fußzeile verzichtet. +\begin{lstcode} + \documentclass{article} + \usepackage[headinclude=false,footinclude=false,% + paper=A8,paper=landscape]{typearea} + \areaset{7cm}{5cm} + \pagestyle{empty} + \begin{document} + \section*{Definierte Papierformate} + letter, legal, executive, a0, a1 \dots\ % + b0, b1 \dots\ c0, c1 \dots\ d0, d1 \dots + \end{document} +\end{lstcode} + Haben die Karteikarten das Sonderformat (Breite:Höhe) + 5\Unit{cm}\,:\,3\Unit{cm}, so ist dies mit +\begin{lstcode} + \documentclass{article} + \usepackage[headinclude=false,footinclude=false, + paper=landscape,paper=5cm:3cm]{typearea} + \areaset{4cm}{2.4cm} + \pagestyle{empty} + \begin{document} + \section*{Definierte Papierformate} + letter, legal, executive, a0, a1 \dots\ % + b0, b1 \dots\ c0, c1 \dots\ d0, d1 \dots + \end{document} +\end{lstcode} + möglich. +\end{Example} + +In der Voreinstellung wird bei \KOMAScript{} mit A4-Papier in der Ausrichtung +portrait gearbeitet. Dies ist ein Unterschied\textnote{\KOMAScript{} + vs. Standardklassen} zu den Standardklassen, bei denen in der Voreinstellung +das amerikanische Format letter verwendet wird. + +Bitte beachten Sie unbedingt\textnote{Achtung!}, dass diese Option bei +Verwendung einer der \KOMAScript-Klassen als Klassenoption oder per +\DescRef{\LabelBase.cmd.KOMAoptions} beziehungsweise +\DescRef{\LabelBase.cmd.KOMAoption} nach dem Laden der Klasse übergeben werden +muss. Eine Änderung des Papierformats oder der Papierausrichtung mit Hilfe +der Anweisung \DescRef{\LabelBase.cmd.KOMAoptions}\textnote{keine automatische + Neuberechnung} oder \DescRef{\LabelBase.cmd.KOMAoption} nach dem Laden von +\Package{typearea} führt nicht zu einer automatischen Neuberechnung des +Satzspiegels. Vielmehr wirkt sich die Änderung erst bei der nächsten +Neuberechnung des Satzspiegels aus. Zur Neuberechnung des Satzspiegels siehe +Option \hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} mit den Werten +\hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} oder +\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (siehe +\DescPageRef{typearea.option.DIV.last}) oder die Anweisung +\DescRef{\LabelBase.cmd.recalctypearea} (siehe +\DescPageRef{typearea.cmd.recalctypearea}).% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{pagesize}{Ausgabetreiber} +\end{Declaration}% +\begin{Explain}% + Die oben genannten Mechanismen zur Auswahl des Papierformats \iffree{haben + nur insofern einen Einfluss auf die Ausgabe, als interne {\LaTeX}-Maße + gesetzt werden}{führen nur zum Setzen interner {\LaTeX}-Maße}. Das Paket + \Package{typearea} verwendet diese \iffree{dann }{}bei der Auf"|teilung der + Seite in Ränder und Textbereich. Die Spezifikation des + DVI-Formats\Index{DVI} sieht aber an keiner Stelle Angaben zum Papierformat + vor. % + \iffree{% + Wird direkt aus dem DVI-Format in eine Low-Level-Druckersprache wie PCL% + \iftrue% Umbruchkorrektur + \footnote{PCL ist eine Familie von Druckersprachen, die HP für seine + Tinten- und Laserdrucker verwendet.}% + \fi \ oder ESC/P2% + \iftrue% Umbruchkorrektur + \footnote{ESC/P2 ist die Druckersprache, die EPSON für seine 24-Nadel- und + ältere Tinten- oder Laserdrucker benutzt.}% + \fi \ beziehungsweise ESC/P-R% + \iftrue% Umbruchkorrektur + \footnote{ESC/P-R ist die Druckersprache, die EPSON aktuell für Tinten- + und Laserdrucker benutzt.}% + \fi \ ausgegeben, spielt dies normalerweise keine Rolle% + }{% + In früheren Zeiten, als DVI zum Ausruck noch direkt in + Low-Level-Druckersprachen übertragen wurde, spielte dies keine Rolle% + }, da auch bei diesen Ausgaben der 0-Bezugspunkt wie bei DVI links oben + liegt. \iffree{Wird aber}{Heutzutage wird aber meist} in Sprachen wie + \iffree{PostScript\Index{PostScript} oder }{}% Umbruchkorrekturtext + PDF\Index{PDF} übersetzt, bei denen der 0-Bezugspunkt an anderer Stelle + liegt und außerdem das Papierformat in der Ausgabedatei angegeben werden + sollte\iffree{, so}{. Dabei} fehlt diese Information. Als Lösung des + Problems verwendet der entsprechende Treiber eine voreingestellte + Papiergröße, die der Anwender entweder per Option oder durch entsprechende + Angabe in der {\TeX}-Quelldatei verändern kann. Bei Verwendung des + DVI-Treibers \File{dvips} oder \File{dvipdfm} kann diese Angabe in Form + einer \Macro{special}-Anweisung erfolgen. Bei Verwendung von {pdf\TeX}, + {lua\TeX}, {\XeTeX} oder {V\TeX} werden deren Papierformat-Längen + entsprechend gesetzt.% +\end{Explain} +Mit der Option \Option{pagesize} kann eingestellt werden, für welchen +\PName{Ausgabetreiber} die Papiergröße in das Dokument geschrieben wird. Die +unterstützten \PName{Ausgabetreiber} sind \autoref{tab:typearea.outputdriver} +\iffalse auf \autopageref{tab:typearea.outputdriver}\fi zu +entnehmen. Voreingestellt\ChangedAt{v3.17}{\Package{typearea}} ist +\Option{pagesize}. Diese Verwendung der Option ohne Angabe eines Wertes +entspricht \OptionValue{pagesize}{auto}. +% +\begin{table} + \caption{Ausgabetreiber für Option \OptionVName{pagesize}{Ausgabetreiber}} + \begin{desctabular} + \pventry{auto}{Falls die pdf\TeX-spezifischen Register + \Macro{pdfpagewidth}\IndexLength{pdfpagewidth} und + \Macro{pdfpageheight}\IndexLength{pdfpageheight} oder die + lua\TeX-spezifischen Register \Macro{pagewidth}\IndexLength{pagewidth} + und \Macro{pageheight}\IndexLength{pageheight} vorhanden sind, wird + der Ausgabetreiber \PValue{pdftex} aktiviert. Zusätzlich wird auch der + Ausgabetreiber \PValue{dvips} + verwendet. Diese Einstellung ist grundsätzlich auch für \XeTeX{} + geeignet.% + \IndexOption{pagesize~=\textKValue{auto}}}% + \pventry{automedia}{Dies entspricht dem Ausgabetreiber + \PValue{auto}. Allerdings werden zusätzlich auch noch die + \mbox{V\TeX}-spezifischen Register + \Macro{mediawidth}\IndexLength{mediawidth} und + \Macro{mediaheight}\IndexLength{mediaheight} gesetzt, falls diese + definiert sind.% + \IndexOption{pagesize~=\textKValue{automedia}}}% + \entry{\PValue{false}, \PValue{no}, \PValue{off}}{% + Die Papiergröße wird nicht an den Ausgabetreiber + gemeldet.% + \IndexOption{pagesize~=\textKValue{false}}}% + \pventry{dvipdfmx}{\ChangedAt{v3.05a}{\Package{typearea}}Die Papiergröße + wird als + \Macro{special}\PParameter{pagesize=\PName{Breite},\PName{Höhe}} in die + DVI-Datei geschrieben. Der Name des Ausgabetreibers kommt daher, dass + das Programm \File{dvipdfmx} eine Pa\-pier\-for\-mat\-um\-schal\-tung + über diese Anweisung auch innerhalb des Dokuments erlaubt.% + \IndexOption{pagesize~=\textKValue{dvipdfmx}}}% + \pventry{dvips}{Bei Verwendung innerhalb der Dokumentpräambel wird die + Papiergröße über + \Macro{special}\PParameter{pagesize=\PName{Breite},\PName{Höhe}} in das + Dokument geschrieben. Da das Programm \File{dvips} keine + Pa\-pier\-for\-mat\-um\-schal\-tung innerhalb des Dokuments unterstützt, + wird bei Bedarf im Dokument ein recht unsauberer Hack verwendet, um die + Umschaltung nach Möglichkeit dennoch zu + erreichen. Pa\-pier\-for\-mat\-um\-schal\-tung nach der Dokumentprämbel + bei gleichzeitiger Verwendung des Ausgabetreibers \PValue{dvips} + erfolgen daher auf eigene Gefahr!% + \IndexOption{pagesize~=\textKValue{dvips}}}% + \entry{\PValue{pdftex}, \PValue{luatex}}{% + \ChangedAt{v3.20}{\Package{typearea}}Die Papiergröße + wird über die pdf\TeX-spezifischen Register + \Macro{pdfpagewidth}\IndexLength{pdfpagewidth} und + \Macro{pdfpageheight}\IndexLength{pdfpageheight} oder die + lua\TeX-spezifischen Register \Macro{pagewidth}\IndexLength{pagewidth} + und \Macro{pageheight}\IndexLength{pageheight} gesetzt. Dies ist + auch jederzeit innerhalb des Dokuments problemlos + möglich.% + \IndexOption{pagesize~=\textKValue{pdftex}}% + \IndexOption{pagesize~=\textKValue{luatex}}}% + \end{desctabular} + \label{tab:typearea.outputdriver} +\end{table} + +\begin{Example} + Angenommen, es soll ein Dokument sowohl als DVI-Datei verwendet + werden, als auch eine Online-Version im PDF-Format erstellt + werden. Dann könnte die Präambel beispielsweise so beginnen: + \begin{lstcode}[% + aboveskip=.5\baselineskip plus .1\baselineskip minus .1\baselineskip,% + belowskip=.4\baselineskip plus .1\baselineskip minus .1\baselineskip] + \documentclass{article} + \usepackage[paper=A4,pagesize]{typearea} +\end{lstcode} + Wird nun für die Bearbeitung {pdf\TeX} verwendet \emph{und} die + PDF-Ausgabe aktiviert, so werden die beiden Spezialgrößen + \Macro{pdfpagewidth} und \Macro{pdfpageheight} entsprechend gesetzt. + Wird jedoch eine DVI-Datei erzeugt -- egal ob mit {\LaTeX} oder + {pdf\LaTeX} --, so wird ein \Macro{special} an den Anfang dieser + Datei geschrieben. +\end{Example}% +\iffree{}{% + \vskip-1\ht\strutbox plus .75\ht\strutbox% Wegen Beispiel am Ende der Erklärung +}% +\EndIndexGroup +% +\EndIndexGroup + +% Umbruchverbesserung: +%\iffree{}{\clearpage} +\section{Tipps} +\seclabel{tips} + +Insbesondere für die Erstellung von schriftlichen Arbeiten während des +Studiums findet man häufig Vorschriften\textnote{Satzvorschriften + vs. gute~Typografie}, die einer typografischen Begutachtung nicht nur in +keiner Weise standhalten, sondern massiv gegen alle Regeln der Typografie +verstoßen. Ursache für solche Regeln ist oft typografische Inkompetenz +derjenigen, die sie herausgeben. Manchmal ist die Ursache auch im +Ausgangspunkt begründet, nämlich der Schreibmaschine. Mit einer +Schreibmaschine oder einer Textverarbeitung von 1980 ist es +ohne +erheblichen Aufwand kaum möglich, typografisch perfekte Ergebnisse zu +erzielen. Also wurden einst Vorschriften erlassen, die leicht erfüllbar +schienen und dem Korrektor trotzdem entgegenkommen. Dazu zählen dann +Randeinstellungen, die für einseitigen Druck mit einer Schreibmaschine zu +brauchbaren Zeilenlängen führen. Um nicht extrem kurze Zeilen zu erhalten, die +durch Flattersatz zudem verschlimmert werden, werden die Ränder schmal +gehalten und für Korrekturen stattdessen ein großer Durchschuss in Form von +eineinhalbzeiligem Satz vorgeschrieben. Bevor moderne +Textverarbeitungssysteme verfügbar wurden, wäre -- außer mit {\TeX} -- +einzeiliger Satz die einzige Alternative gewesen. Dabei wäre dann selbst das +Anbringen von Korrekturzeichen schwierig geworden. Als die Verwendung von +Computern für die Erstellung schriftlicher Arbeiten üblicher wurde, hat sich +manches Mal auch der Spieltrieb des einen oder anderen Studenten gezeigt, der +durch Verwendung einer Schmuckschrift seine Arbeit aufpeppen und so eine +bessere Note mit weniger Einsatz herausschinden wollte. Nicht bedacht hat er +dabei, dass solche Schriften schlechter zu lesen und deshalb für den Zweck +ungeeignet sind. Damit hielten zwei Brotschriften Einzug in die Vorschriften, +die weder zusammenpassen noch im Falle von Times wirklich gut geeignet +sind. Times ist eine relativ enge Schrift, die Anfang des 20.~Jahrhunderts +speziell für schmale Spalten im englischen Zeitungssatz entworfen wurde. In +modernen Schnitten ist dies etwas entschärft. Dennoch passt die häufig +vorgeschriebene Times meist nicht zu den gleichzeitig gegebenen Randvorgaben. + +{\LaTeX} setzt bereits von sich aus mit ausreichendem Durchschuss. +Gleichzeitig sind die Ränder bei sinnvollen Zeilenlängen groß genug, um Platz +für Korrekturen zu bieten. Dabei wirkt die Seite trotz einer Fülle von Text +großzügig angelegt. + +Oft sind die typografisch mehr als fragwürdigen Satzvorschriften mit {\LaTeX} +auch außerordentlich schwierig umzusetzen. So kann eine feste Anzahl von +»Anschlägen« nur dann eingehalten werden, wenn keine proportionale Schrift +verwendet wird. Es gibt nur wenige gute nichtproportionale Schriften. +\iffalse % Umbruchkorrektur +Kaum ein Text, der mit einer derartigen Schrift gesetzt ist, wirkt +gleichmäßig. So wird häufig % +\else Häufig wird % +\fi % +versucht, durch ausladende Serifen beispielsweise beim kleinen »i« oder »l« +die unterschiedliche Breite der Zeichen auszugleichen. Dies kann nicht +funktionieren. Im Ergebnis wirkt der Text unruhig und zerrissen. Außerdem +verträgt sich eine solche Schrift kaum mit dem im deutschen Sprachraum +üblichen und allgemein vorzuziehenden Blocksatz. Gewisse Vorgaben können daher +bei Verwendung von {\LaTeX} nur ignoriert oder großzügig ausgelegt werden, +etwa indem man »60~Anschläge pro Zeile« nicht als feste, sondern als +durchschnittliche oder maximale Angabe interpretiert. + +Wie ausgeführt, sind Satzvorschriften meist dazu gedacht, ein brauchbares +Ergebnis zu erhalten, auch wenn der Ausführende selbst nicht weiß, was dabei +zu beachten ist. Brauchbar bedeutet häufig: lesbar und korrigierbar. Nach +meiner Auf"|fassung wird ein mit {\LaTeX} und dem \Package{typearea}-Paket +gesetzter Text bezüglich des Satzspiegels diesen Anforderungen von vornherein +gerecht. Wenn Sie also mit Vorschriften konfrontiert sind, die offensichtlich +erheblich davon abweichen, so empfehle ich, dem Betreuer einen Textauszug +vorzulegen und nachzufragen, ob es gestattet ist, die Arbeit trotz der +Abweichungen in dieser Form zu liefern. Gegebenenfalls kann durch Veränderung +der Option +\DescRef{\LabelBase.option.DIV}\important{\DescRef{\LabelBase.option.DIV}} der +Satzspiegel moderat angepasst werden. Von der Verwendung von +\DescRef{\LabelBase.cmd.areaset} zu diesem Zweck rate ich jedoch +ab. Schlimmstenfalls verwenden Sie das nicht zu {\KOMAScript} gehörende +\Package{geometry}-Paket\important{\Package{geometry}}\IndexPackage{geometry} +(siehe \cite{package:geometry}) oder verändern Sie die Satzspiegelparameter +von {\LaTeX} selbst. Die von \Package{typearea} ermittelten Werte finden Sie +in der \File{log}-Datei Ihres Dokuments. Mit Hilfe von Option +\DescRef{typearea-experts.option.usegeometry}% +\important{\DescRef{typearea-experts.option.usegeometry}}, die Sie in +\autoref{part:forExperts} finden, kann außerdem die Zusammenarbeit von +\Package{typearea} und \Package{geometry} verbessert werden. Damit sollten +moderate Anpassungen möglich sein. Achten Sie jedoch unbedingt darauf, dass +die Proportionen des Textbereichs mit denen der Seite unter Berücksichtigung +der Bindekorrektur annähernd übereinstimmen. + +Sollte es unbedingt erforderlich sein, den Text eineinhalbzeilig zu setzen, so +definieren Sie keinesfalls \Macro{baselinestretch} um. Dieses Vorgehen wird +zwar allzu häufig empfohlen, ist aber seit der Einführung von {\LaTeXe} im +Jahre 1994 obsolet. Verwenden Sie schlimmstenfalls den Befehl +\Macro{linespread}. Ich empfehle das Paket +\Package{setspace}\important{\Package{setspace}}\IndexPackage{setspace}, das +nicht zu {\KOMAScript} gehört (siehe \cite{package:setspace}). Auch sollten +Sie \Package{typearea} nach der Umstellung des Zeilenabstandes den Satzspiegel +für diesen Abstand berechnen lassen, jedoch für den Titel, besser auch für die +Verzeichnisse -- sowie das Literaturverzeichnis und den Index -- wieder auf +normalen Satz umschalten. Näheres dazu finden Sie bei der Erklärung zu +\OptionValueRef{\LabelBase}{DIV}{current}% +\important{\OptionValueRef{\LabelBase}{DIV}{current}}. + +Das \Package{typearea}-Paket berechnet auch bei der Option +\OptionValueRef{\LabelBase}{DIV}{calc}% +\important{\OptionValueRef{\LabelBase}{DIV}{calc}} einen sehr großzügigen +Textbereich. Viele konservative Typografen werden feststellen, dass die +resultierende Zeilenlänge noch zu groß ist. Der berechnete +\DescRef{\LabelBase.option.DIV}-Wert ist ebenfalls in der \File{log}-Datei zum +jeweiligen Dokument zu finden. Sie können also leicht nach dem ersten +\LaTeX-Lauf einen kleineren Wert wählen. + +Nicht\textnote{Was ist besser?} selten wird mir die Frage gestellt, warum ich +eigentlich kapitelweise auf einer Satzspiegelberechnung herumreite, während es +sehr viel einfacher wäre, nur ein Paket zur Verfügung zu stellen, mit dem man +die Ränder wie bei einer Textverarbeitung einstellen kann. Oft wird auch +behauptet, ein solches Paket wäre ohnehin die bessere Lösung, da jeder selbst +wisse, wie gute Ränder zu wählen seien, und die Ränder von {\KOMAScript} wären +ohnehin nicht gut. Ich erlaube mir zum Abschluss dieses Kapitels ein passendes +Zitat von Hans Peter Willberg und Friedrich Forssmann, zwei der angesehensten +Typografen der Gegenwart (siehe \cite{TYPO:ErsteHilfe}): +\begin{quote} + \phantomsection\label{sec:typearea.tips.cite}% + \textit{Das\textnote{Zitat!} Selbermachen ist längst üblich, die Ergebnisse + oft fragwürdig, weil Laien-Typografen nicht sehen, was nicht stimmt und + nicht wissen können, worauf es ankommt. So gewöhnt man sich an falsche und + schlechte Typografie.} [\dots] \textit{Jetzt könnte der Einwand kommen, + Typografie sei doch Geschmackssache. Wenn es um Dekoration ginge, könnte + man das Argument vielleicht gelten lassen, da es aber bei Typografie in + erster Linie um Information geht, können Fehler nicht nur stören, sondern + sogar Schaden anrichten.} +\end{quote} +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-de.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "de_DE" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/typearea-en.tex b/macros/latex/contrib/koma-script/doc/typearea-en.tex new file mode 100644 index 0000000000..628af57275 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/typearea-en.tex @@ -0,0 +1,1788 @@ +% ====================================================================== +% typearea-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about typearea of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{typearea-en.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: typearea)] +\translator{Markus Kohm\and Gernot Hassenpflug\and Krickette Murabayashi\and + Karl Hagen} + +\chapter{Calculating the Page Layout with \Package{typearea}} +\labelbase{typearea} + +\BeginIndexGroup% +\BeginIndex{Package}{typearea}% +Many {\LaTeX} classes\iffree{, including the standard classes,}{} present the +user with a largely fixed configuration of margins and page layout. In the +standard classes, the choice is limited to selecting a font size. +There are separate packages, such as \Package{geometry}\IndexPackage{geometry} +(see \cite{package:geometry}), which give the user complete control over, but +also full responsibility for, setting the type area and margins. + +\KOMAScript{} takes a somewhat different approach with the \Package{typearea} +package. Users are offered ways to adjust the design and algorithms based on +established typographic standards, making it easier for them to make good +choices. + +\iffalse% Umbruchoptimierung!!! + Note that the \Package{typearea} package makes use of the \Package{scrbase} + package. The latter is explained in the expert section of this + \iffree{guide}{book} in \autoref{cha:scrbase} on \autopageref{cha:scrbase}. + However, most of the features documented there are directed not to users but + to class and package authors. +\fi + +\section{Fundamentals of Page Layout} +\seclabel{basics} + +\begin{Explain} + At first glance, a single page of a book or other printed material + consists of the margins, + \iffalse% Umbruchkorrekturtext + \footnote{The author and the editor have considered the question as to + whether, since a page has only one periphery, the term should be + ``the margin.'' However, since \LaTeX{} logically divides this one + margin into several margins, which are determined separately, we + use the term ``the margins'' here.}% + \fi% + a header, a body of text, and a footer. More precisely, there + is also a space between the header area and the text + body, as well as between the body and the footer. The text body is + called, in the jargon of typographers and typesetters, the \emph{type area}. + The division of these areas, as well as their relations to each other and + to the paper, is called the \emph{page layout}.\Index[indexmain]{page layout} + + Various algorithms and heuristic methods for constructing an appropriate + type area have been discussed in the literature% + \iffree{ \cite{DANTE:TK0402:MJK}}{. A short introduction to the basics may + be found at \autoref{cha:typeareaconstruction}}. + These rules are known as the ``canons of page construction.'' One approach + often mentioned involves diagonals and their intersections. The result is + that the aspect ratio of the type area corresponds to the proportions of the + \emph{page}. In a one-sided document,\Index{one-sided} the left and right + margins should have equal widths, while the ratio of the top and bottom + margins should be 1:2. In a two-sided document\Index{two-sided} (e.\,g. a + book), however, the entire inner margin (the margin at the spine) should be + the same size as each of the two outer margins; in other words, a single + page contributes only half of the inner margin. + + In the previous paragraph, we mentioned and emphasised \emph{the page}. It + is often mistakenly thought that the format of the page is the same as the + format of the paper.\Index[indexmain]{page>format}% + \Index[indexmain]{paper>format} However, if you look at + a bound document, you can see that part of the paper disappears in the + binding\Index[indexmain]{binding} and is no longer part of the visible page. + For the type area, however, it is not the format of the paper which is + important; it is the impression of the visible page to the reader. Thus, it + is clear that the calculation of the type area must account for the ``lost'' + paper in the binding and add this amount to the width of the inner margin. + This is called the \emph{binding correction}.\Index[indexmain]{binding + correction} The binding correction is therefore calculated as part of the + \emph{gutter}\Index[indexmain]{gutter} but not the visible inner margin. + + The binding correction depends on the production process and cannot be + defined in general terms. It is therefore a parameter that must be redefined + for each project. In professional printing, this value plays only a minor + role, since printing is done on larger sheets of paper and then cropped to + the right size. The cropping is done so that the above relations for the + visible, two-sided page are maintained. + + So now we know how the individual parts of a page relate to each other. + However, we do not yet know how wide and high the type area is. Once we know + one of these two dimensions, we can calculate all the other dimensions from + the paper format and the page format or the binding correction. + \begin{align*} + \Var{type~area~height}\Index{type area} : \Var{type~area~width} &= + \Var{page~height}\Index{page} : \Var{page~width}\\ + \Var{top~margin}\Index{margin} : \Var{footer~margin} &= + \text{1} : \text{2} \\ +% + \Var{left~margin} : \Var{right~margin} &= \text{1} : \text{1} \\ +% + \Var{half~inner~margin} : \Var{outer~margin} &= \text{1} : \text{2} \\ +% + \Var{page~width} &= + \Var{paper~width}\Index{paper} - + \Var{binding~correction}\Index{binding correction}\\ +% + \Var{top~margin} + \Var{bottom~margin} &= + \Var{page~height} - \Var{type~area~height} \\ +% + \Var{left~margin} + \Var{right~margin} &= + \Var{page~width} - \Var{type~area~width} \\ +% + \Var{half~inner~margin} + \Var{outer~margin} &= + \Var{page~width} - \Var{type~area~width} \\ +% + \Var{half~inner~margin} + \Var{binding~correction} &= + \Var{gutter}\Index{gutter} + \end{align*} + \Index[indexmain]{margin}% + The values \Var{left~margin} and \Var{right~margin} only exist in a + one-sided document while \Var{half~inner~margin} and \Var{outer~margin} only + exist in a two-sided document. We use \Var{half~inner~margin} in these + equations, since the full inner margin is an element of the whole two-page + spread. Thus, only half of the inner margin, \Var{half~inner~margin}, + belongs to a single page. + + The question of the width of the type area is also discussed in the + literature. The optimum width depends on several factors: + \begin{itemize} + \item the size, width, and type of font used, + \item the line spacing, + \item the word length, + \item the available space. + \end{itemize} + The importance of the font becomes clear once you realize what serifs are + for. Serifs\Index[indexmain]{serifs} are small strokes that finish off the + lines of letters. Letters with vertical lines touching the text baseline + disturb the flow rather than keeping the eye on the line. It is precisely + with these letters that the serifs lie horizontally on the baseline and thus + enhance the horizontal effect of the font. The eye can better follow the + line of text, not only when reading the words but also when jumping back to + the beginning of the next line. Thus, the line length can actually be + slightly longer for a serif font than for a sans serif font. + + Leading\Index[indexmain]{leading}\textnote{leading} refers to the vertical + distance between individual lines of text. In \LaTeX{}, the leading is set + at about 20\% of the font size. With commands like + \Macro{linespread}\IndexCmd{linespread}, or better, packages like + \Package{setspace}\IndexPackage{setspace} (see \cite{package:setspace}), you + can change the leading. A wider leading makes it easy for the eye to follow + the line. A very wide leading, however, disturbs reading because the eye has + to travel long distances between the lines. In addition, the reader becomes + uncomfortable because of the visible striped effect. The uniform grey value + of the page is thereby spoiled. Nevertheless, the lines can be longer with a + wider leading. + + The literature gives different values for good line + lengths\Index[indexmain]{line length}, depending on the author. To some + extent, this is related to the author's native language. Since the eye + usually jumps from word to word, short words make this task easier. Across + all languages and fonts, a line length of 60 to 70 characters, including + spaces and punctuation, forms a usable compromise. This requires well-chosen + leading, but {\LaTeX}'s default is usually good enough. Longer line lengths + should only be considered for highly-developed readers who spend many hours + a day reading. But even then, line lengths beyond 80 characters are + unacceptable. In each case, the leading must be appropriately chosen. An + extra 5\% to 10\% is recommended as a good rule of thumb. For typefaces like + Palatino, which require more than 5\% leading for normal line lengths, even + more can be required. + + Before looking at the actual construction of the page layout, there are a + few minor points you should know. {\LaTeX} does not start the first line in + the text area of a page at the upper edge of the text area but sets the + baseline at a defined distance from the top of the text area. Also, {\LaTeX} + recognizes the commands + \DescRef{maincls.cmd.raggedbottom}\IndexCmd{raggedbottom} and + \DescRef{maincls.cmd.flushbottom}\IndexCmd{flushbottom}. + \DescRef{maincls.cmd.raggedbottom} specifies that the last line of a page + should be positioned wherever it was calculated. This means that the + position of this line can be different on each page, up to the height of one + line\,---\, even more when the end of the page coincides with headings, + figures, tables, or the like. In two-sided documents that is usually + undesirable. The second command, \DescRef{maincls.cmd.flushbottom}, makes + sure that the last line is always at the lower edge of the text area. To + achieve this vertical compensation, {\LaTeX} may have to stretch vertical + glue beyond what is normally allowed. Paragraph skip is such a stretchable, + vertical glue, even when set to zero. To avoid stretching on normal pages + where paragraph spacing is the only stretchable glue, the height of the text + area should be a multiple of the height of the text line, including the + distance of the first line from the top of the text area. + +\iffalse% Umbruchkorrektur + This explains all the basics of the type area calculation that play a role + in {\KOMAScript}. +\else + This concludes the fundamentals. +\fi +\iffalse% Umbruchkorrektur + Below are two methods of construction offered by \KOMAScript{}. +\else +\iffalse% Umbruchkorrektur + Now, we can begin with the actual construction. +\else + In the following two sections, the methods of construction offered by + {\KOMAScript} are presented in detail. +\fi +\fi +\end{Explain} + + +\section{Constructing the Type Area by Division} +\seclabel{divConstruction} + +\begin{Explain} + The easiest way to make sure that the text area has the same ratio as the + page is as follows: + \begin{itemize} + \item First, subtract the \Var{BCOR} required for the binding + correction\Index{binding correction} from the inner edge of the paper, and + divide the rest of the page vertically into \Var{DIV} rows of equal + height. + \item Next, divide the page horizontally into the same number (\Var{DIV}) of + columns of equal width. + \item Then, take the uppermost row as the upper margin and the two lowermost + rows as the lower margin. If you are printing two-sided, you similarly + take the innermost column as the inner margin and the two outermost + columns as the outer margin. + \item Then add the binding correction \Var{BCOR} to the inner margin. + \end{itemize} + What remains within the page is the text area.\Index{text area} The width + and height of the text area and margins result automatically from the + number of rows and columns, \Var{DIV}. Since the margins always need three + stripes, \Var{DIV} must be greater than three. In order that the + text area occupy at least twice as much space as the margins, \Var{DIV} + should really be at least nine. With this value, the design + is also known as the \emph{classical nine-part division} (see + \autoref{fig:typearea.nineparts}). + + \begin{figure} +% \centering + \KOMAoption{captions}{bottombeside}% + \setcapindent{0pt}% + \setlength{\columnsep}{.6em}% + \begin{captionbeside}[{% + Two-sided layout with the box construction of the classical + nine-part division, after subtracting a binding correction% + }]{% + \label{fig:typearea.nineparts}% + \hspace{0pt plus 1ex}% + Two-sided layout with the box construction of the classical + nine-part division, after subtracting a binding correction% + } + [l] + \setlength{\unitlength}{.25mm}% + \definecolor{komalight}{gray}{.75}% + \definecolor{komamed}{gray}{.6}% + \definecolor{komadark}{gray}{.3}% + \begin{picture}(420,297) + % BCOR + \put(198,0){\color{komalight}\rule{24\unitlength}{297\unitlength}} + \multiput(198,2)(0,20){15}{\thinlines\line(0,1){10}} + \multiput(222,2)(0,20){15}{\thinlines\line(0,1){10}} + % the paper + \put(0,0){\thicklines\framebox(420,297){}} +% \put(210,0){\thicklines\framebox(210,297){}} + % the page layout + \put(44,66){\color{komamed}\rule{132\unitlength}{198\unitlength}} + \put(244,66){\color{komamed}\rule{132\unitlength}{198\unitlength}} + % helper lines + \multiput(0,33)(0,33){8}{\thinlines\line(1,0){198}} + \multiput(222,33)(0,33){8}{\thinlines\line(1,0){198}} + \multiput(22,0)(22,0){8}{\thinlines\line(0,1){297}} + \multiput(244,0)(22,0){8}{\thinlines\line(0,1){297}} + % annotations + \put(198,0){\color{white}\makebox(24,297)[c]{% + \rotatebox[origin=c]{-90}{binding correction}}} + \put(44,66){\color{white}\makebox(132,198)[c]{page layout left}} + \put(244,66){\color{white}\makebox(132,198)[c]{page layout right}} + % box numbers + \makeatletter + \multiput(1,27)(0,33){9}{\footnotesize\makebox(0,0)[l]{\the\@multicnt}} + \multiput(177,291)(-22,0){9}{% + \footnotesize\makebox(0,0)[l]{\the\@multicnt}} + \multiput(419,27)(0,33){9}{% + \footnotesize\makebox(0,0)[r]{\the\@multicnt}} + \multiput(243,291)(22,0){8}{% + \footnotesize\makebox(0,0)[r]{\the\numexpr\@multicnt+1\relax}} + \makeatother + \end{picture} + \end{captionbeside} +% \caption{Two-sided layout with the box construction of the classical +% nine-part division, after subtracting a binding correction} +% \label{fig:typearea.nineparts} + \end{figure} + + In {\KOMAScript}, this kind of design is implemented with the + \Package{typearea} package, where the bottom margin may drop any fractions + of a line in order to comply with the constraint for the height of the type + area mentioned in the previous paragraph and thereby reduce the problem + mentioned with \Macro{flushbottom}. For A4 paper, \Var{DIV} is predefined + according to the font size (see \autoref{tab:typearea.div}, + \autopageref{tab:typearea.div}). If there is no binding correction + (\(\Var{BCOR} = 0\Unit{pt}\)), the results roughly match the values of + \autoref{tab:typearea.typearea}, \autopageref{tab:typearea.typearea}. + + In addition to the predefined values, you can specify \Var{BCOR} and + \Var{DIV} as options when loading the package (see + \autoref{sec:typearea.options}, starting on + \autopageref{sec:typearea.typearea}). There is also a command to calculate + the type area explicitly by providing these values as parameters (see also + \autoref{sec:typearea.options}, \DescPageRef{typearea.cmd.typearea}). + + The \Package{typearea} package can automatically determine the optimal value + of \Var{DIV} for the font and leading used. Again, see + \autoref{sec:typearea.options}, \DescPageRef{typearea.option.DIV.calc}. +\end{Explain} + + +\section{Constructing the Type Area by Describing a Circle} +\seclabel{circleConstruction} + +\begin{Explain} + In addition to the construction method for the type area\Index{type area} + described above, there is an even more traditional, or even medieval, method + found in the literature. The aim of this method is not just to have the same + ratios between page size and type area; it is considered optimal when the + height of the text area corresponds to the width of the page. This means + that a circle can be drawn that will touch both the sides of the page and + the top and bottom of the text area. The exact procedure can be found in + \cite{JTsch87}. + + A disadvantage of this late-medieval canon of page construction is that the + width of the text area no longer depends on the font. One no longer chooses + the text area to match the font. Instead, the author or typesetter must + choose the appropriate font for the text area. +% +\iftrue +% Umbruchkorrekturtext + This should be considered mandatory. +\fi + + In the \Package{typearea} package, this construction is modified to + determine the \Var{DIV} value by selecting a special (normally meaningless) + \Var{DIV} value or a special, symbolic indication of the \Var{DIV} value so + that the resulting type area comes as close as possible to the late-medieval + page canon. Hence it relies in turn on the method of constructing the type + area by division. +% +\iffalse +% Umbruchkorrekturtext + If you choose a good font, the result often coincides with the search for + the optimal \Var{DIV} value. See also \autoref{sec:typearea.options}, + \DescPageRef{typearea.option.DIV.calc}. +% +\fi +\end{Explain} + +\LoadCommonFile{options}% \section{Early or late Selection of Options} + +\LoadCommonFile{compatibility}% \section{Compatibility with Earlier Versions of \KOMAScript} + +\section{Adjusting the Type Area and Page Layout} +\seclabel{typearea} + +The \Package{typearea} package offers two different user interfaces to +influence the construction of the type area. The most important method is to +specify options when loading the package. For information on how to setup +options with \KOMAScript, please refer to \autoref{sec:\LabelBase.options}. + +In\textnote{Note!} this section the classes used in the examples are not +existing {\KOMAScript} classes but hypothetical ones. This +\iffree{guide}{book} assumes that ideally an appropriate class is available +for each task. + +\begin{Declaration} + \OptionVName{BCOR}{correction} +\end{Declaration}% +Use the \OptionVName{BCOR}{correction}\ChangedAt{v3.00}{\Package{typearea}} +option to specify the absolute value of the binding correction\Index{binding + correction}\textnote{binding correction}, i.\,e. the width of the area lost +from the paper during the binding process. This value is then automatically +taken into account when constructing the page layout and is added back to the +inner (or left) margin during output. In the value of the \PName{correction}, +you can specify any measurement unit understood by \TeX{}. + +\begin{Example} + Suppose you create a financial report. The whole thing should be printed out + one-sided on A4 paper and then stapled in a binder folder. The clip of the + folder covers 7.5\Unit{mm}. The stack of pages is very thin, so at most + another 0.75\Unit{mm} will be lost from bending and the sheets themselves. + Therefore, you can write: +\begin{lstcode} + \documentclass[a4paper]{report} + \usepackage[BCOR=8.25mm]{typearea} +\end{lstcode} + with \OptionValue{BCOR}{8.25mm} as an option to \Package{typearea} or +\begin{lstcode} + \documentclass[a4paper,BCOR=8.25mm]{report} + \usepackage{typearea} +\end{lstcode} + when using \OptionValue{BCOR}{8.25mm} as a global option. + + When using a {\KOMAScript} class, you do not need to load the + \Package{typearea} package explicitly: +\begin{lstcode} + \documentclass[BCOR=8.25mm]{scrreprt} +\end{lstcode} + You can omit the \Option{a4paper} option with \Class{scrreprt}, since this + is the default for all {\KOMAScript} classes. + + If you want to set the option to a new value later, you can, for example, + use the following: +\begin{lstcode} + \documentclass{scrreprt} + \KOMAoptions{BCOR=8.25mm} +\end{lstcode} + Defaults are initialized when the \Class{scrreprt} class is loaded. + Changing a setting with the \DescRef{\LabelBase.cmd.KOMAoptions} or + \DescRef{\LabelBase.cmd.KOMAoption} commands will automatically calculate a + new type area with new margins. +\end{Example} + +Note\textnote{Attention!} you must pass this option as a class option when +loading one of the {\KOMAScript} classes, as in the example above, or via +\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption} +after loading the class. When you use a {\KOMAScript} class, you should not +load the \Package{typearea} package explicitly with +\DescRef{\LabelBase.cmd.usepackage}, nor should you specify it as an optional +argument when loading the package if you are using another class. If the +option is changed with \DescRef{\LabelBase.cmd.KOMAoptions} or +\DescRef{\LabelBase.cmd.KOMAoption} after loading the package, the type area +and margins are automatically recalculated.% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{DIV}{factor} +\end{Declaration}% +The \OptionVName{DIV}{factor}\ChangedAt{v3.00}{\Package{typearea}} option +specifies the number of strips into which the page is divided horizontally and +vertically during the construction of the type area. The exact construction +method is found in \autoref{sec:typearea.divConstruction}. It's important to +realise that the larger the \PName{factor}, the larger the text block and the +smaller the margins. Any integer value greater than 4 is valid for +\PName{factor}. Note, however, that large values can cause violations in the +constraints on the margins of the type area, depending on how you set other +options. In extreme cases, the header may fall outside of the page. When you +use the \OptionVName{DIV}{factor} option, you are responsible for complying +with the margin constraints and for choosing a typographically pleasing line +length. + +In \autoref{tab:typearea.typearea}, you will find the sizes of the type areas +for several \Option{DIV} factors for the A4 page with no binding correction. In +this case, the other constraints that are dependent on the font size are not +taken into account. + +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside} +% \caption + [{Type area dimensions dependent on \Option{DIV} for A4}] + {\label{tab:typearea.typearea}Type area dimensions dependent on \Option{DIV} + for A4 regardless of \Length{topskip} or \Option{BCOR}} + [l] + \begin{tabular}[t]{ccccc} + \toprule + & + \multicolumn{2}{c}{Type area} & \multicolumn{2}{c}{Margins}\\ + %\raisebox{1.5ex}[0pt]{ + \Option{DIV} + %} + & width & height & top & inner \\ + \midrule + 6 & 105.00 & 148.50 & 49.50 & 35.00 \\ + 7 & 120.00 & 169.71 & 42.43 & 30.00 \\ + 8 & 131.25 & 185.63 & 37.13 & 26.25 \\ + 9 & 140.00 & 198.00 & 33.00 & 23.33 \\ + 10 & 147.00 & 207.90 & 29.70 & 21.00 \\ + 11 & 152.73 & 216.00 & 27.00 & 19.09 \\ + 12 & 157.50 & 222.75 & 24.75 & 17.50 \\ + 13 & 161.54 & 228.46 & 22.85 & 16.15 \\ + 14 & 165.00 & 233.36 & 21.21 & 15.00 \\ + 15 & 168.00 & 237.60 & 19.80 & 14.00 \\ + \bottomrule + \multicolumn{5}{r}{\small (all lengths in mm)} + \end{tabular} + \end{captionbeside} +\end{table} + + +\begin{Example} + Suppose you are writing up the minutes of a meeting using the + \Class{minutes} class. The whole thing should be two-sided. Your company + uses 12\Unit{pt} Bookman font. This font, which is one of the standard + PostScript fonts, is enabled in {\LaTeX} with the command + \verb|\usepackage{bookman}|. Bookman is a very wide font, meaning that the + individual characters are relatively wide compared to their height. + Therefore, the default setting for \Option{DIV} in \Package{typearea} is too + small. After thoroughly studying this entire chapter, you conclude that a + value of 15, instead of 12, is most suitable. The minutes will not be bound + but punched and kept in a folder, and thus no binding correction is + necessary. So you write: +\begin{lstcode} + \documentclass[a4paper,twoside]{minutes} + \usepackage{bookman} + \usepackage[DIV=15]{typearea} +\end{lstcode} + When you're done, you become aware that the minutes will from now on be + collected and bound together as a book at the end of the quarter. The + binding is to be a simple glue binding because this is only being done to + conform to ISO\,9000 and nobody is actually going to read them. The binding, + including space lost in folding the pages, requires an average of + 12\Unit{mm} You change the options of the \Package{typearea} package + accordingly and use the class for minutes that conform to ISO\,9000 + regulations: +\begin{lstcode} + \documentclass[a4paper,twoside]{iso9000p} + \usepackage{bookman} + \usepackage[DIV=15,BCOR=12mm]{typearea} +\end{lstcode} + Of course, it is equally possible to use a {\KOMAScript} class here: +\begin{lstcode} + \documentclass[twoside,DIV=15,BCOR=12mm]{scrartcl} + \usepackage{bookman} +\end{lstcode} + The \Option{a4paper} option can be left out when using the + \Class{scrartcl} class, as it is predefined in all {\KOMAScript} + classes. +\end{Example} + +Note\textnote{Attention!} that when using this option with one of the +{\KOMAScript} classes, as in the example above, it must be passed either as a +class option, or via \DescRef{\LabelBase.cmd.KOMAoptions} or +\DescRef{\LabelBase.cmd.KOMAoption} after loading the class. When using a +{\KOMAScript} class, the \Package{typearea} package should not be loaded +explicitly with \DescRef{\LabelBase.cmd.usepackage}, nor should the option be +given as an optional argument thereto. If the option is changed via +\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption} +after loading the package, the type area and margins are automatically +recalculated.% +\EndIndexGroup + +\begin{Declaration} + \OptionValue{DIV}{calc}% + \OptionValue{DIV}{classic} +\end{Declaration}% +As\ChangedAt{v3.00}{\Package{typearea}} already mentioned in +\autoref{sec:typearea.divConstruction}, there are fixed defaults for +\Option{DIV} when using A4 paper. These can be found in \autoref{tab:typearea.div}. +However, such fixed values have the disadvantage that they do not take into +account the letter spacing of the font used. With A4 and fairly narrow fonts, +this can quickly lead to an unpleasantly high number of characters per line. +See the considerations in \autoref{sec:typearea.basics}. If you choose a +different paper size, \Package{typearea} will calculate an appropriate +\Option{DIV} value for you. Of course, you can also apply this same calculation +to A4. To do so, simply use \OptionValue{DIV}{calc}% +\important{\OptionValue{DIV}{calc}} in place of +\OptionVNameRef{\LabelBase}{DIV}{factor}. Of course, you can also specify this +option explicitly for all other paper sizes. If you want automatic +calculation, this specification is useful, as it is possible to set different +preferences in a configuration file (see \autoref{sec:typearea-experts.cfg}). +Explicitly specifying the \OptionValue{DIV}{calc} option overrides such +configuration settings. + +\begin{table} +% \centering + \KOMAoptions{captions=topbeside}% + \setcapindent{0pt}% + \begin{captionbeside} + %\caption + [{\PName{DIV} defaults for A4}] + {\label{tab:typearea.div}\PName{DIV} defaults for A4} + [l] + \begin{tabular}[t]{lccc} + \toprule + base font size: & 10\Unit{pt} & 11\Unit{pt} & 12\Unit{pt} \\ + \Option{DIV}: & 8 & 10 & 12 \\ + \bottomrule + \end{tabular} + \end{captionbeside} +\end{table} + +You can also select the traditional page layout mentioned in +\autoref{sec:typearea.circleConstruction}, the medieval page canon. Instead of +the \OptionVName{\DescRef{\LabelBase.option.DIV}}{factor} or +\OptionValue{DIV}{calc} option, simply use the \OptionValue{DIV}{classic} +option. A \Option{DIV} value which is as close as possible to the medieval page +canon is then chosen. + +\begin{Example} + In the example using the Bookman font and the + \OptionVNameRef{\LabelBase}{DIV}{factor} option, the problem was to select a + \Option{DIV} value that better matched the font. Modifying that example, you + can simply leave the calculation of this value to \Package{typearea}: +\begin{lstcode} + \documentclass[a4paper,twoside]{protocol} + \usepackage{bookman} + \usepackage[DIV=calc]{typearea} +\end{lstcode} +\end{Example} +\iffree{\par% + Note\textnote{Attention!} that when using this option with one of the + \KOMAScript{} classes% + \iftrue , as in the example above, \fi% + it must be passed either as a class option, or via + \DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption} + after loading the class. When using a {\KOMAScript} class, the + \Package{typearea} package should not be loaded explicitly with + \DescRef{\LabelBase.cmd.usepackage}, nor should the option be given as an + optional argument. If the option is changed via + \DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption} + after loading the package, the type area and margins are automatically + recalculated.% +}{% +\vskip-\dp\strutbox% Wegen Code im Beispiel am Ende +}% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionValue{DIV}{current} + \OptionValue{DIV}{last} +\end{Declaration}% +If\ChangedAt{v3.00}{\Package{typearea}} you've been following the +examples closely, you already know how to calculate a \Option{DIV} value +based on the font you chose when using a {\KOMAScript} class together +with a font package. + +\begin{Explain} + The difficulty with doing so is that the {\KOMAScript} class already loads + the \Package{typearea} package itself. Thus, it is not possible to pass + options as optional arguments to \DescRef{\LabelBase.cmd.usepackage}. It + would also be pointless to specify the + \OptionValueRef{\LabelBase}{DIV}{calc} option as an optional argument to + \DescRef{\LabelBase.cmd.documentclass}. This option would be evaluated + immediately on loading the \Package{typearea} package and as a result the + type area and margins would be calculated for the standard {\LaTeX} font and + not for the font loaded later. + + However, it is possible to recalculate the type area and margins after + loading the font with the aid of \DescRef{\LabelBase.cmd.KOMAoptions}% + \PParameter{\OptionValueRef{\LabelBase}{DIV}{calc}} or + \DescRef{\LabelBase.cmd.KOMAoption}% + \PParameter{\DescRef{\LabelBase.option.DIV}}\PParameter{calc}. The option + \OptionValue{DIV}{calc} will then request a \Option{DIV} value for an + appropriate line length. + + As it is often more convenient to set the \Option{DIV} option not after + loading the font but at a more noticeable point, such as when loading the + class, the \Package{typearea} package offers two further symbolic values for + this option. +\end{Explain} + +The option \OptionVName{DIV}{current}\ChangedAt{v3.00}{\Package{typearea}} +recalculates the type area and margins using the current \Option{DIV} value. +This is less important for recalculating the type area after loading a +different font. Instead, it is useful if, for example, you change the +leading while keeping the \Option{DIV} value the same and want to ensure the +margin constraint that \Length{textheight} minus \Length{topskip} is a +multiple of \Length{baselineskip}. + +The option \OptionVName{DIV}{last}\ChangedAt{v3.00}{\Package{typearea}} will +recalculate the type area and margins using exactly the same settings as the +last calculation. + +By the way, if the last typeset area calculation before using +\OptionValue{DIV}{last} or \OptionValue{DIV}{current} was done using +\DescRef{\LabelBase.cmd.areaset}\IndexCmd{areaset}, the recalculation will be +done using \DescRef{\LabelBase.cmd.areaset} again. It then corresponds to +\DescRef{\LabelBase.cmd.areaset}\POParameter{current}\IndexLength{textwidth}% +\PParameter{\Length{textwidth}}{\Length{textheight}}\IndexLength{textheight}. + +\begin{Example} + Let's suppose again that we need to calculate an appropriate line length for + a type area using the Bookman font. At the same time, a {\KOMAScript} class + is used. This is very easy with the symbolic value \PValue{last} and the + command \DescRef{\LabelBase.cmd.KOMAoptions}: +\begin{lstcode} + \documentclass[BCOR=12mm,DIV=calc,twoside]{scrartcl} + \usepackage{bookman} + \KOMAoptions{DIV=last} +\end{lstcode} + If you decide later that you need a different \Option{DIV} value, just + change the setting of the optional argument to + \DescRef{\LabelBase.cmd.documentclass}. +\end{Example} + +For a summary of all possible symbolic values for the \Option{DIV} option, see +\autoref{tab:symbolicDIV}. Note that the use of the +\Package{fontenc}\IndexPackage{fontenc} package may also cause \LaTeX{} to +load a different font. + +\begin{table} + \caption[{% + Symbolic values for the \DescRef{typearea.option.DIV} option and the + \PName{DIV} argument to \DescRef{\LabelBase.cmd.typearea}% + }]{% + Available symbolic values for the \DescRef{typearea.option.DIV} option or + the \PName{DIV} argument to + \DescRef{typearea.cmd.typearea}\OParameter{BCOR}\Parameter{DIV}% + } + \label{tab:symbolicDIV} + \begin{desctabular} + \pventry{areaset}{Recalculate page + layout.\IndexOption{DIV~=\textKValue{areaset}}}% + \pventry{calc}{Recalculate type area including choice of appropriate + \Option{DIV} value.\IndexOption{DIV~=\textKValue{calc}}}% + \pventry{classic}{Recalculate type area using medieval book design canon + (circle-based calculation).\IndexOption{DIV~=\textKValue{classic}}}% + \pventry{current}{Recalculate type area using current \Option{DIV} + value.\IndexOption{DIV~=\textKValue{current}}}% + \pventry{default}{Recalculate type area using the standard value for the + current page format and current font size. If no standard value exists, + \PValue{calc} is used.\IndexOption{DIV~=\textKValue{default}}}% + \pventry{last}{Recalculate type area using the same \PName{DIV} argument + as was used in the last call.\IndexOption{DIV~=\textKValue{last}}}% + \end{desctabular} +\end{table} + +Frequently\textnote{Attention!}, the type area must be recalculated in +combination with a change in the line spacing (\emph{leading})\Index{leading}. +Since the type area should be calculated in such a way that a whole number of +lines fits in the text block, a change in the leading normally requires a +recalculation of the type area. + +\begin{Example} + Suppose that you require a 10\Unit{pt} font and a spacing of 1.5 lines for a + dissertation. By default, {\LaTeX} sets the leading for 10\Unit{pt} fonts at + 2\Unit{pt}, in other words 1.2 lines. Therefore, you must use an additional + stretch factor of 1.25. Suppose also that you need a binding correction of + \(12\Unit{mm}\). Then the solution to the problem might look like this: +\begin{lstcode} + \documentclass[10pt,twoside,BCOR=12mm,DIV=calc]{scrreprt} + \linespread{1.25} + \KOMAoptions{DIV=last} +\end{lstcode}\IndexCmd{linespread} + Since \Package{typearea} always executes the \Macro{normalsize} command + itself when calculating a new type area, it is not strictly necessary to + set the chosen leading with \Macro{selectfont} after \Macro{linespread}, + since this will already be done in the recalculation. + + When using the \Package{setspace}\IndexPackage{setspace}% + \important{\Package{setspace}} package (see \cite{package:setspace}), the + same example would appear as follows: +\begin{lstcode} + \documentclass[10pt,twoside,BCOR=12mm,DIV=calc]{scrreprt} + \usepackage[onehalfspacing]{setspace} + \KOMAoptions{DIV=last} +\end{lstcode} +\end{Example} + +As\textnote{Hint!} you can see from the example, the \Package{setspace} +package saves you from needing to know the correct stretch value. However, +this only applies to the standard font sizes 10\Unit{pt}, 11\Unit{pt}, and +12\Unit{pt}. For all other font sizes, the package uses an approximate value. + +At\textnote{Attention!} this point, note that the line spacing for the title +page should be reset to the normal value, and the indexes should be set with +the normal line spacing as well. +\begin{Example} + Here\IndexPackage{setspace} is a complete example: +\begin{lstcode} + \documentclass[10pt,twoside,BCOR=12mm,DIV=calc] + {scrreprt} + \usepackage{setspace} + \onehalfspacing + \AfterTOCHead{\singlespacing} + \KOMAoptions{DIV=last} + \begin{document} + \title{Title} + \author{Markus Kohm} + \begin{spacing}{1} + \maketitle + \end{spacing} + \tableofcontents + \chapter{Ok} + \end{document} +\end{lstcode} + Also see the notes in \autoref{sec:typearea.tips}. The + \DescRef{tocbasic.cmd.AfterTOCHead}\IndexCmd{AfterTOCHead} command is + described in \autoref{cha:tocbasic} of \autoref{part:forExperts} on + \DescPageRef{tocbasic.cmd.AfterTOCHead}. +\end{Example} +Note also that changing the line spacing can also affect the page's header and +footer. For example, if you are using the \Package{scrlayer-scrpage} package, +you have to decide for yourself whether you prefer to have the normal or the +changed leading. See the \DescRef{scrlayer.option.singlespacing} option in +\autoref{cha:scrlayer}\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}}% +\IndexPackage{scrlayer}\IndexOption{singlespacing}, +\DescPageRef{scrlayer.option.singlespacing}. + +Note\textnote{Attention!} that when using this option with one of the +{\KOMAScript} classes, as in the example above, it must be passed either as a +class option, or via \DescRef{\LabelBase.cmd.KOMAoptions} or +\DescRef{\LabelBase.cmd.KOMAoption} after loading the class. When using a +{\KOMAScript} class, the \Package{typearea} package should not be loaded +explicitly with \DescRef{\LabelBase.cmd.usepackage}, nor should the option be +given as an optional argument thereto. If the option is changed via +\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption} +after loading the package, the type area and margins are automatically +recalculated.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{typearea}\OParameter{BCOR}\Parameter{DIV}% + \Macro{recalctypearea} +\end{Declaration}% +\begin{Explain} + If the \DescRef{\LabelBase.option.DIV} option or the + \DescRef{\LabelBase.option.BCOR} option is set after loading the + \Package{typearea} package, the \Macro{typearea} command will be called + internally. When setting the \DescRef{\LabelBase.option.DIV} option, the + symbolic value \PValue{current} is used internally for \PName{BCOR}, which + for reasons of completeness is also found in \autoref{tab:symbolicBCOR}. + When setting the \DescRef{\LabelBase.option.BCOR} option, the symbolic value + \PValue{last} is used internally for \PName{DIV}. If instead you want the + type area and margins to be recalculated using the symbolic value + \PValue{current} for \PName{DIV}, you can use + \Macro{typearea}\POParameter{current}\PParameter{current} directly. +\end{Explain} + +\begin{table} + \caption[{% + Symbolic \PName{BCOR} arguments for \DescRef{typearea.cmd.typearea}% + }]{% + Available symbolic \PName{BCOR} arguments for + \Macro{typearea}\OParameter{BCOR}\Parameter{DIV}% + } + \label{tab:symbolicBCOR} + \begin{desctabular} + \pventry{current}{Recalculate type area with the currently valid + \PName{BCOR} value.\IndexOption{BCOR~=\textKValue{current}}} + \end{desctabular} +\end{table} + +If you change both \PName{BCOR} and \PName{DIV}, you should use +\Macro{typearea}, since then the type area and margins are recalculated only +once. With \DescRef{\LabelBase.cmd.KOMAoptions}% +\PParameter{\OptionVNameRef{\LabelBase}{DIV}{factor},% + \OptionVNameRef{\LabelBase}{BCOR}{correction}} the type area and margins are +recalculated once for the change to \DescRef{\LabelBase.option.DIV} and again +for the change to \DescRef{\LabelBase.option.BCOR}. + +\begin{Explain} + The command \Macro{typearea} is currently defined so as to make it possible + to change the type area in the middle of a document. However, several + assumptions about the structure of the {\LaTeX} kernel are made, and + internal definitions and sizes of the kernel are changed. Since changes are + only made to the {\LaTeX} kernel to fix bugs, there is a high likelihood, + though no guarantee, that this will still work in future versions of + \LaTeXe{}. When used within the document, a page break will result. +\end{Explain} + +Since\important{\Macro{recalctypearea}} \DescRef{\LabelBase.cmd.KOMAoption}% +\PParameter{\hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}}}% +\PParameter{\hyperref[desc:\LabelBase.option.DIV.last]{last}}, +\DescRef{\LabelBase.cmd.KOMAoptions}% +\PParameter{\OptionValueRef{\LabelBase}{DIV}{last}}, or +\Macro{typearea}\POParameter{current}\PParameter{last} is frequently needed +to recalculate the type area and margins, there is a convenience command, +\Macro{recalctypearea}\ChangedAt{v3.00}{\Package{typearea}}. +\begin{Example} + If you find the notation +\begin{lstcode} + \KOMAoptions{DIV=last} +\end{lstcode} + or +\begin{lstcode} + \typearea[current]{last} +\end{lstcode} + too cumbersome for recalculating text area and margins because of + the many special characters, you can simply use +\begin{lstcode} + \recalctypearea +\end{lstcode} +\end{Example}% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{twoside}{simple switch}% + \OptionValue{twoside}{semi} +\end{Declaration}% +As explained in \autoref{sec:typearea.basics}, the distribution of the margins +depends on whether the document is to be printed one-sided or two-sided. For +one-sided printing, the left and right margins are the same width, whereas for +two-sided printing the inner margin of one page is only half as wide as the +corresponding outer margin. To invoke two-sided printing, you must give the +\Package{typearea} package the \Option{twoside} option. For the +\PName{simple switch}, you can use any of the standard values for +simple switches in \autoref{tab:truefalseswitch}. If the option is passed +without a value, the value \PValue{true} is assumed, so two-sided printing is +enabled. Deactivating the option leads to one-sided printing. + +\begin{table} + \centering + \caption{Standard values for simple switches in \KOMAScript} + \begin{tabular}{ll} + \toprule + Value & Description \\ + \midrule + \PValue{true} & activates the option \\ + \PValue{on} & activates the option \\ + \PValue{yes} & activates the option \\ + \PValue{false}& deactivates the option \\ + \PValue{off} & deactivates the option \\ + \PValue{no} & deactivates the option \\ + \bottomrule + \end{tabular} + \label{tab:truefalseswitch} +\end{table} + +In addition to the values in \autoref{tab:truefalseswitch}, you can also use +the value \PValue{semi}\ChangedAt{v3.00}{\Package{typearea}}. This value +results in two-sided printing with one-sided margins and one-sided, that is +non-alternating, marginal notes. +Beginning\ChangedAt{v3.12}{\Package{typearea}} with \KOMAScript{} version +3.12, binding corrections (see \DescRef{\LabelBase.option.BCOR}, +\DescPageRef{typearea.option.BCOR}) will be part of the left margin on odd +pages but part of the right margin on even pages. But if you switch on +compatibility with a prior +version\important{\OptionValueRef{\LabelBase}{version}{3.12}} of \KOMAScript{} +(see \autoref{sec:typearea.compatibilityOptions}, +\autopageref{sec:typearea.compatibilityOptions}), the binding correction will +be part of the left margin on both pages while using +\OptionValue{twoside}{semi}. + +The option can also be passed as class option in +\DescRef{\LabelBase.cmd.documentclass}, as a package option with +\DescRef{\LabelBase.cmd.usepackage}, or even after loading +\Package{typearea} with \DescRef{\LabelBase.cmd.KOMAoptions} or +\DescRef{\LabelBase.cmd.KOMAoption}. Using this option after loading +\Package{typearea} automatically\textnote{automatic recalculation} results in +the recalculation of the type area using +\DescRef{\LabelBase.cmd.recalctypearea} (see +\DescPageRef{typearea.cmd.recalctypearea}). If the two-sided mode was active +before the option was set, a page break is made to the next odd page before +the recalculation.% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{twocolumn}{simple switch} +\end{Declaration} +To compute an appropriate type area with the help of +\OptionValueRef{\LabelBase}{DIV}{calc}, it is useful to know in advance if the +document is to be typeset in one or two columns. Since the considerations +about line length in \autoref{sec:typearea.basics} apply to each column, the +type area in two-column documents can be up to twice as wide as in one-column +documents. + +To make this distinction, you must tell \Package{typearea} if the document is +to be set with two columns using the \Option{twocolumn} option. Since this is +a \PName{simple switch}, any of the standard values for simple switches +from \autoref{tab:truefalseswitch} are valid. If the option is passed without +a value, the value \PValue{true}\important{\OptionValue{twocolumn}{true}} is +used, i.\,e. the two-column setting. Deactivating the option returns you to +the default one-column setting. + +The option can also be passed as a class option in +\DescRef{\LabelBase.cmd.documentclass}, as a package option to +\DescRef{\LabelBase.cmd.usepackage}, or even after loading \Package{typearea} +with \DescRef{\LabelBase.cmd.KOMAoptions} or +\DescRef{\LabelBase.cmd.KOMAoption}. Using this option after loading +\Package{typearea} will\textnote{automatic recalculation} automatically +recalculate the type area using \DescRef{\LabelBase.cmd.recalctypearea} (see +\DescPageRef{typearea.cmd.recalctypearea}).% +% +\EndIndexGroup + +\begin{Declaration} + \OptionVName{headinclude}{simple switch}% + \OptionVName{footinclude}{simple switch} +\end{Declaration}% +\begin{Explain}% + So far we have discussed how the type area is calculated\Index{type area} + and the relationship of the margins\Index{margins} to one another and + between margins and body of the text. But one important question has not + been answered: What exactly are \emph{the margins}? + + At first glance the question appears trivial: Margins are those parts on the + right, left, top, and bottom of the page which remain empty. But this is + only half the story. Margins are not always empty. Sometimes there can be + marginal notes, for example (see the \DescRef{maincls.cmd.marginpar} command + in \cite{lshort} or \autoref{sec:maincls.marginNotes}). + + For the top and bottom margins, the question becomes how to handle + headers\Index{page header} and footers\Index{page footer}. Do these two + belong to the text body or to their respective margins? This question is not + easy to answer. Clearly an empty footer or header belongs to the margins, + since it cannot be distinguished from the rest of the margins. A footer that + contains only the + pagination\Index[indexmain]{pagination}\textnote{pagination} % + \iffalse % + \unskip\footnote{Pagination refers to the indication of the page number, + either inside or outside the type area, and usually appears in either the + header or the footer of the page.} % + \fi % + looks more like a margin and should therefore be counted as such. It is + irrelevant for the visual effect whether headers or footers are easily + recognized as such when reading or skimming. The decisive factor is how a + well-filled page appears when viewed \emph{out of focus}. For this purpose, + you could, for example, steal the glasses of a far-sighted grandparent and + hold the page about half a meter from the tip of your nose. If you lack an + available grandparent, you can also adjust your vision to infinity and look + at the page with one eye only. Those who wear glasses have a clear advantage + here. If the footer contains not only the pagination but also other material + like a copyright notice, it looks more like a slightly detached part of the + body of the text. This needs to be taken into account when calculating the + type area. + + For the header, this is even more complicated. The header often contains + running heads\Index[indexmain]{running heads}\textnote{running heads}. % + \iffalse% + \unskip\footnote{Running heads refer to the repetition of a title, in + titling font, which usually appears in the page header, or rarely in the + page footer.} % + \fi If you use the current chapter and section titles in your running head + and these titles are long, the header itself will necessarily be very + long. In this case, the header again acts like a detached part of the text + body and less like an empty margin. This effect is reinforced if the header + contains not only the chapter or section title but also the pagination. With + material on the right and left side, the header no longer appears as an + empty margin. It is more difficult if the pagination is in the footer and + the length of the running titles varies, so that the header may look like + part of the margin on one page and part of the text body on another. Under + no circumstances should you treat the pages differently. That would lead to + vertically jumping headers, which is not suitable even for a flip book. In + this case it is probably best to count the header as part of the text body. + + The decision is easy when the header or footer is separated from the actual + text body by a line. This will give a ``closed'' appearance and the header + or footer should be calculated as part of the text body. Remember: It is + irrelevant that the line improves the optical separation of text and header + or footer; only the appearance when viewed out of focus is important. +\end{Explain} + +The \Package{typearea} package cannot determine on its own whether +to count headers and footers\important{\OptionValue{headinclude}{true} + \OptionValue{headinclude}{false} \OptionValue{footinclude}{true} + \OptionValue{footinclude}{false}} as part of the text body or the +margin. The \Option{headinclude} and \Option{footinclude} options cause +the header or footer to be counted as part of the text. These +options, being \PName{simple switch}es\ChangedAt{v3.00}{\Package{typearea}}, +accept the standard values for simple switches in +\autoref{tab:truefalseswitch}. You can use the options without +specifying a value, in which case the value \PValue{true} is used for +the \PName{simple}, i.\,e. the header or footer is counted as part of +the text. + +If you are unsure what the correct setting should be, reread the explanations +above. The default is usually \OptionValue{headinclude}{false} and +\OptionValue{footinclude}{false}, but this can change in the {\KOMAScript} +classes or in other {\KOMAScript} packages depending on the options used (see +\autoref{sec:maincls.options} and \autoref{cha:scrlayer-scrpage}). + +Note\textnote{Attention!} that these options must be passed as class options +when using one of the {\KOMAScript} classes, or after loading the class with +\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption}. +Changing these options after loading the \Package{typearea} package does not +automatically recalculate the type area. Instead, the changes only take effect +the next time the type area is recalculated. For recalculation of the type +area, see the \hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} option +with the values \hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} or +\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (see +\DescPageRef{typearea.option.DIV.last}) or the +\DescRef{\LabelBase.cmd.recalctypearea} command (see +\DescPageRef{typearea.cmd.recalctypearea}).% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{mpinclude}{simple switch} +\end{Declaration} +In addition to\ChangedAt{v2.8q}{\Class{scrbook}\and \Class{scrreprt}\and + \Class{scrartcl}} documents where the header and footer are more likely to +be part of the text body than the margins, there are also documents where +marginal notes should be considered part of the text body as well. The option +\Option{mpinclude} does exactly this. The option, as a \PName{simple + switch}\ChangedAt{v3.00}{\Package{typearea}}, accepts the standard values +for simple switches in \autoref{tab:truefalseswitch}. You can also pass this +option without specifying a value, in which case \PValue{true} is assumed. + +The effect of \OptionValue{mpinclude}{true}% +\important{\OptionValue{mpinclude}{true}} is that a width-unit is removed from +the main text body and used as the area for marginal notes. With the +\OptionValue{mpinclude}{false} option, which is the default setting, part of +the normal margin is used for marginal notes. The width of that area is one or +one-and-a-half width units, depending on whether you have chosen one-sided or +two-sided printing. The \OptionValue{mpinclude}{true} option is mainly for +experts and so is not recommended. + +\begin{Explain} + In most cases where the option \Option{mpinclude} makes sense, you also + require a wider area for marginal notes. Often, however, only a part of the + marginal note's width should be part of the text area, not the whole width, + for example if the margin is used for quotations. Such quotations are + usually set as unjustified text, with the flush edge against the text area. + Since the unjustified text gives no homogeneous optical impression, these + lines can protrude partially into the margin. You can accomplish that by + using the option \Option{mpinclude} and by increasing the length + \Length{marginparwidth} after the type area has been set up. The length can + be easily enlarged with the command \Macro{addtolength}. How much the length + has to be increased depends on the individual situation and it requires a + certain amount of sensitivity. This is another reason the \Option{mpinclude} + option is primarily intended for experts. Of course you can specify, for + example, that the marginal notes should project a third of the way into the + normal margin by using the following: +\begin{lstcode} + \setlength{\marginparwidth}{1.5\marginparwidth} +\end{lstcode} + +Currently there is no option to enlarge the space for marginal notes within +the text area. There is only one way to accomplish this: first, either omit +the \Option{mpinclude} option or set it to \PValue{false}, and then, after the +type area has been calculated, reduce \Length{textwidth} (the width of the +text body) and increase \Length{marginparwidth} (the width of the marginal +notes) by the same amount. Unfortunately, this procedure cannot be combined +with automatic calculation of the \PName{DIV} value. In contrast, +\Option{mpinclude} is taken into account with +\OptionValueRef{\LabelBase}{DIV}{calc}\IndexOption{DIV~=calc} (see +\DescPageRef{typearea.option.DIV.calc}). +\end{Explain} + +Note\textnote{Attention!} that these options must be passed as class options +when using one of the {\KOMAScript} classes, or after loading the class with +\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption}. +Changing these options after loading the \Package{typearea} package does not +automatically recalculate the type area. Instead, the changes only take effect +the next time the type area is recalculated. For recalculation of the type +area, see the \hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} option +with the values \hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} or +\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (see +\DescPageRef{typearea.option.DIV.last}) or the +\DescRef{\LabelBase.cmd.recalctypearea} command (see +\DescPageRef{typearea.cmd.recalctypearea}).% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{headlines}{number of lines} + \OptionVName{headheight}{height} +\end{Declaration}% +\BeginIndex{}{header>height}% +We have seen how to calculate the type area using the \Package{typearea} +package and how to specify whether the header and footer are part of the text +or the margins. However, especially for the header, we still have to specify +the height. This is achieved with the options \Option{headlines} and +\Option{headheight}\ChangedAt{v3.00}{\Package{typearea}}. + +The \Option{headlines}\important{\Option{headlines}} option specifies the +number of lines of text in the header. The \Package{typearea} package uses a +default of 1.25. This is a compromise: large enough for underlined headers +(see \autoref{sec:maincls.pagestyle}) and small enough that the relative +weight of the top margin is not affected too much when the header is not +underlined. Thus the default value will usually be adequate. In special cases, +however, you may need to adjust the header height more precisely to your +actual requirements. + +\begin{Example} + Suppose you want to create a two-line header. Normally this would result in + {\LaTeX} issuing the warning ``\texttt{overfull} \Macro{vbox}'' for each + page. To prevent this from happening, you tell the \Package{typearea} + package to calculate an appropriate type area: +\begin{lstcode} + \documentclass[a4paper]{article} + \usepackage[headlines=2.1]{typearea} +\end{lstcode} + If you use a {\KOMAScript} class, you should pass this option directly to + the class: +\begin{lstcode} + \documentclass[a4paper,headlines=2.1]{scrartcl} +\end{lstcode} + Commands that can be used to define the contents of a two-line header + can be found in \autoref{cha:scrlayer-scrpage}. +\end{Example} + +In some cases it is useful to be able to specify the header height not in +lines but directly as a length. This is accomplished with the alternative +option \Option{headheight}\important{\Option{headheight}}. All lengths and +sizes that \LaTeX{} understands are valid for \PName{height}. +Note\textnote{Attention!}, however, that if you use a \LaTeX{} length such as +\Length{baselineskip}, its value is not fixed at the time the option is set. +The value that will be used will be the one current at the time the type area +and margins are calculated. Also\textnote{Attention!}, \LaTeX{} lengths like +\Length{baselineskip} should never be used in the optional argument of +\DescRef{\LabelBase.cmd.documentclass} or \DescRef{\LabelBase.cmd.usepackage}. + +Please be sure to note\textnote{Attention!} that these options must be passed +as class options when using one of the {\KOMAScript} classes, or after loading +the class with \DescRef{\LabelBase.cmd.KOMAoptions} or +\DescRef{\LabelBase.cmd.KOMAoption}. Changing these options after loading the +\Package{typearea} package does not\textnote{no automatic recalculation} +automatically recalculate the type area. Instead, the changes only take effect +the next time the type area is recalculated. For recalculation of the type +area, see the \hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} option +with the values \hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} or +\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (see +\DescPageRef{typearea.option.DIV.last}) or the +\DescRef{\LabelBase.cmd.recalctypearea} command (see +\DescPageRef{typearea.cmd.recalctypearea}).% +% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{footlines}{number of lines}% + \OptionVName{footheight}{height}% + \Length{footheight}% +\end{Declaration} +\BeginIndex{}{footer>height}% +Like\ChangedAt{v3.12}{\Package{typearea}} the header, the footer also requires +an indication of how high it should be. But unlike the height of the header, +the \LaTeX{} kernel does not provide a length for the height of the footer. So +\Package{typearea} defines a new length, +\Length{footheight}\IndexLength[indexmain]{footheight}, if it does not already +exist. Whether this length will be used by classes or packages to design the +headers and footers depends on the individual classes and packages. The +\KOMAScript{} package +\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% +\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% +\IndexPackage{scrlayer-scrpage} incorporates +\Length{footheight} and actively cooperates with \Package{typearea}. The +\KOMAScript{} classes, on the other hand, do not recognize \Length{footheight} +because without the help of packages they offer only page styles with +single-line page footers. + +You can use \Option{footlines}\important{\Option{footlines}} to set the number +of lines in the footer, similar to \DescRef{\LabelBase.option.headlines} for +the number of lines in the header. By default the \Package{typearea} package +uses 1.25 footer lines. This value is a compromise: large enough to +accommodate an overlined or underlined footer (see +\autoref{sec:maincls.pagestyle}), and small enough that the relative weight of +the bottom margin is not affected too much when the footer lacks a dividing +line. Thus the default value will usually be adequate. In special cases, +however, you may need to adjust the footer height more precisely to your +actual requirements. + +\begin{Example} + Suppose you need to place a two-line copyright notice in the footer. + Although there is no test in \LaTeX{} itself to check the space available + for the footer, exceeding the designated height will likely result in + unbalanced distribution of type area and margins. Moreover, a package such + as \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% + \important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% + \IndexPackage{scrlayer-scrpage}, which can be used to define such a footer, + performs the appropriate test and will report any overruns. So it makes + sense to specify the required footer height when calculating of the type + area: +\begin{lstcode} + \documentclass[a4paper]{article} + \usepackage[footlines=2.1]{typearea} +\end{lstcode} + Again, if you use a \KOMAScript{} class, you should pass this + option directly to the class: +\begin{lstcode} + \documentclass[footlines=2.1]{scrartcl} +\end{lstcode} + Commands that can be used to define the contents of a two-line footer + are described in \autoref{cha:scrlayer-scrpage}. +\end{Example} + +In some cases it is useful to be able to specify the footer height not in +lines but directly as a length. This is accomplished with the alternative +option \Option{footheight}\important{\Option{footheight}}. All lengths and +sizes that \LaTeX{} understands are valid for \PName{height}. Note, however, +that if you use a \LaTeX{} length such as \Length{baselineskip}, its value is +not fixed at the time the option is set. The value that will be used will be +the one current at the time the type area and margins are calculated. +Also\textnote{Attention!}, \LaTeX{} lengths like \Length{baselineskip} should +never be used in the optional argument of +\DescRef{\LabelBase.cmd.documentclass} or \DescRef{\LabelBase.cmd.usepackage}. + +Please be sure to note\textnote{Attention!} that these options must be passed +as class options when using one of the {\KOMAScript} classes, or after loading +the class with \DescRef{\LabelBase.cmd.KOMAoptions} or +\DescRef{\LabelBase.cmd.KOMAoption}. Changing these options after loading +\Package{typearea} does not\textnote{no automatic recalculation} automatically +recalculate the type area. Instead, the changes only take effect the next time +the type area is recalculated. For recalculation of the type area, see the +\hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} option with the +values \hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} or +\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (see +\DescPageRef{typearea.option.DIV.last}) or the +\DescRef{\LabelBase.cmd.recalctypearea} command (see +\DescPageRef{typearea.cmd.recalctypearea}).% +\EndIndexGroup + + +\begin{Declaration} + \Macro{areaset}\OParameter{BCOR}\Parameter{width}\Parameter{height} +\end{Declaration}% +So far, we have seen how to create a nice type area\Index{type area} for +standard situations and how the \Package{typearea} package makes it easier to +accomplish this while still giving the freedom to adapt the layout. However, +there are cases where the text body has to adhere precisely to specific +dimensions. At the same time, the margins should be distributed as nicely as +possible and, if necessary, a binding correction should be taken into account. +The \Package{typearea} package offers the command \Macro{areaset} for this +purpose. This command takes as parameters the width and height of the text +body, as well as the binding correction as an optional parameter. The width +and position of the margins are then calculated automatically, taking account +of the options \DescRef{\LabelBase.option.headinclude}, +\OptionValueRef{\LabelBase}{headinclude}{false}, +\DescRef{\LabelBase.option.footinclude} and +\OptionValueRef{\LabelBase}{footinclude}{false} where needed. On the other +hand, the options +\DescRef{\LabelBase.option.headlines}\IndexOption{headlines}, +\DescRef{\LabelBase.option.headheight}\IndexOption{headheight}, +\DescRef{\LabelBase.option.footlines}\IndexOption{footlines}, and +\DescRef{\LabelBase.option.footheight}\IndexOption{footheight} are ignored! +For more information, see \DescRef{typearea-experts.cmd.areaset} on +\DescPageRef{typearea-experts.cmd.areaset} of +\autoref{sec:typearea-experts.experimental}. + +The default for \PName{BCOR} is 0\Unit{pt}. If you want to preserve the +current binding correction, for example the value set by option +\DescRef{\LabelBase.option.BCOR}\IndexOption{BCOR}, you can use the symbolic +value \PValue{current} at an optional argument. + +\begin{Example} + Suppose a text on A4 paper needs a width of exactly 60 characters in a + typewriter font and a height of exactly 30 lines per page. You can + accomplish this with the following preamble: +\begin{lstcode} + \documentclass[a4paper,11pt]{article} + \usepackage{typearea} + \newlength{\CharsLX}% Width of 60 characters + \newlength{\LinesXXX}% Height of 30 lines + \settowidth{\CharsLX}{\texttt{1234567890}} + \setlength{\CharsLX}{6\CharsLX} + \setlength{\LinesXXX}{\topskip} + \addtolength{\LinesXXX}{29\baselineskip} + \areaset{\CharsLX}{\LinesXXX} +\end{lstcode} + The factor is 29 rather than 30 because the baseline of the topmost line of + text is \Macro{topskip} below the top margin of the type area, as long as + the height of the topmost line is less than \Macro{topskip}. So we don't + need to add any height for the first line. The descenders of characters on + the lowermost line, on the other hand, protrude below the dimensions of the + type area. + +\iffalse % Umbruchkorrekturtext + If instead you want to set a book of poetry in which the text area is + exactly square with a side length of 15\Unit{cm}, with a binding correction + of 1\Unit{cm} taken into account, you can achieve this as follows:% +\else% + To set a book of poetry with a square text area with a side length of + 15\Unit{cm} and a binding correction of 1\Unit{cm}, the following is + possible:% +\fi +\begin{lstcode} + \documentclass{poetry} + \usepackage{typearea} + \areaset[1cm]{15cm}{15cm} +\end{lstcode} +\end{Example} +\EndIndexGroup + + +\begin{Declaration} + \OptionValue{DIV}{areaset} +\end{Declaration}% +In\ChangedAt{v3.00}{\Package{typearea}} rare cases it is useful to be able to +realign the current type area. This is possible with the option +\OptionValue{DIV}{areaset}, where +\DescRef{\LabelBase.cmd.KOMAoptions}\PParameter{\OptionValue{DIV}{areaset}} +corresponds to the +\begin{lstcode} + \areaset[current]{\textwidth}{\textheight} +\end{lstcode} +command. The same result is obtained if you use +\OptionValueRef{\LabelBase}{DIV}{last} and the typearea was last set with +\DescRef{\LabelBase.cmd.areaset}.% +% +\EndIndexGroup + +\iftrue% Umbruchkorrekturtext: Alternativen + If you have concrete specifications for the margins, \Package{typearea} is + not suitable. In this case, you should use the + \Package{geometry}\IndexPackage{geometry}% + \important{\Package{geometry}} package (see \cite{package:geometry}).% +\fi% +\iffalse% + The \Package{typearea} package is not designed to set up predefined margins. + If you have to do so, the \Package{geometry}\IndexPackage{geometry} package + (see \cite{package:geometry}) is recommended.% +\fi + + +\section{Selecting the Paper Size} +\seclabel{paperTypes}% +\BeginIndexGroup + +The paper size is a key feature of a document. As already mentioned in the +description of the supported page layout constructions (see +\autoref{sec:typearea.basics} to \autoref{sec:typearea.circleConstruction} +starting on \autopageref{sec:typearea.basics}), the layout of the page, and +hence the entire document, depends on the paper size. Whereas the {\LaTeX} +standard classes are limited to a few formats, {\KOMAScript} supports even +unusual paper sizes in conjunction with the \Package{typearea} package. + + +\begin{Declaration} + \OptionVName{paper}{size} + \OptionVName{paper}{orientation} +\end{Declaration}% +The \Option{paper}\ChangedAt{v3.00}{\Package{typearea}} option is the central +element for paper-size selection\important[i]{% + \begin{tabular}[t]{@{}l@{}l@{}} + \KOption{paper} & \PValue{letter}, \\ + & \PValue{legal}, \\ + & \PValue{executive}, \\ + & \PValue{A0}, \PValue{A1}, \PValue{A2} \dots\\ + & \PValue{B0}, \PValue{B1}, \PValue{B2} \dots\\ + & \PValue{C0}, \PValue{C1}, \PValue{C2} \dots\\ + & \PValue{D0}, \PValue{D1}, \PValue{D2} \dots\end{tabular}} % +in \KOMAScript. \PName{Size} supports the American formats \Option{letter}, +\Option{legal}, and \Option{executive}. In addition, it supports the ISO +formats of the series A, B, C, and D, for example \PValue{A4} or\,---\,written +in lower case\,---\,\PValue{a4}. + +Landscape orientations\important{% + \begin{tabular}[t]{@{}l@{}l@{}} + \KOption{paper} & \PValue{landscape}, \\ + & \PValue{seascape} + \end{tabular}% +} are supported by specifying the option one more time +with the value \PValue{landscape}\Index{paper>orientation} or +\PValue{seascape}\ChangedAt{v3.02c}{\Package{typearea}}. The only difference +between \PValue{landscape} and \PValue{seascape} is that that the application +\File{dvips} rotates \PValue{landscape} pages by -90\Unit{\textdegree}, while +it rotates \PValue{seascape} pages by +90\Unit{\textdegree}. Thus +\PValue{seascape} is particularly useful whenever a PostScript viewer shows +landscape pages upside-down. In order for the difference to have an effect, +you must not deactivate the \DescRef{\LabelBase.option.pagesize}% +\IndexOption{pagesize}\important{\DescRef{\LabelBase.option.pagesize}} option +described below. + +Additionally, the \PName{size} can also be specified either in the form +\PName{width}\texttt{:}\PName{height}\ChangedAt{v3.01b}{\Package{typearea}}% +\important{\OptionVName{paper}{width\textup{:}height}} or in the form +\PName{height}\texttt{:}\PName{width}\ChangedAt{v3.22}{\Package{typearea}}% +\important{\OptionVName{paper}{height\textup{:}width}}. Which value is taken +as the \PName{height} and which as the \PName{width} depends on the +orientation of the paper. With \OptionValue{paper}{landscape} or +\OptionValue{paper}{seascape}, the smaller value is the \PName{height} and the +larger one is the \PName{width}. With +\OptionValue{paper}{portrait}\important{\OptionValue{paper}{portrait}}, the +smaller value is the \PName{width} and the larger one is the \PName{height}. + +Note\textnote{Attention!} that until version~3.01a the first value was always +the \PName{height} and the second one the \PName{width}. From version~3.01b +through version~3.21, the first value was always the \PName{width} and the +second one the \PName{height}. This is important if you use compatibility +settings (see option \DescRef{\LabelBase.option.version}% +\IndexOption{version}\important{\DescRef{\LabelBase.option.version}}, +\autoref{sec:typearea.compatibilityOptions}, +\DescPageRef{typearea.option.version}). + +\begin{Example} + Suppose you want to print an ISO-A8 index card in landscape orientation. The + margins should be very small and no header or footer will be used. +\begin{lstcode} + \documentclass{article} + \usepackage[headinclude=false,footinclude=false, + paper=A8,landscape]{typearea} + \areaset{7cm}{5cm} + \pagestyle{empty} + \begin{document} + \section*{Supported Paper Sizes} + letter, legal, executive, a0, a1 \dots\ % + b0, b1 \dots\ c0, c1 \dots\ d0, d1 \dots + \end{document} +\end{lstcode} + If the file cards have the special format (height:width) + 5\Unit{cm}\,:\,3\Unit{cm}, this can be achieved using the following: +\begin{lstcode} + \documentclass{article} + \usepackage[headinclude=false,footinclude=false,% + paper=landscape,paper=5cm:3cm]{typearea} + \areaset{4cm}{2.4cm} + \pagestyle{empty} + \begin{document} + \section*{Supported Paper Sizes} + letter, legal, executive, a0, a1 \dots\ % + b0, b1 \dots\ c0, c1 \dots\ d0, d1 \dots + \end{document} +\end{lstcode} +\end{Example} + +By default, {\KOMAScript} uses A4 paper in portrait orientation. This is in +contrast\textnote{\KOMAScript{} vs. standard classes} to the standard classes, +which by default use the American letter paper format. + +Please note\textnote{Attention!} that these options must be passed as class +options when using one of the {\KOMAScript} classes, or after loading the +class with \DescRef{\LabelBase.cmd.KOMAoptions} or +\DescRef{\LabelBase.cmd.KOMAoption}. Changing the paper size or orientation +with \DescRef{\LabelBase.cmd.KOMAoptions} or +\DescRef{\LabelBase.cmd.KOMAoption} does not\textnote{no automatic +recalculation} automatically recalculate the type area. Instead, the changes +only take effect the next time the type area is recalculated. For +recalculation of the type area, see the +\hyperref[desc:\LabelBase.option.DIV.last]{\Option{DIV}} option with the +values \hyperref[desc:\LabelBase.option.DIV.last]{\PValue{last}} or +\hyperref[desc:\LabelBase.option.DIV.current]{\PValue{current}} (see +\DescPageRef{typearea.option.DIV.last}) or the +\DescRef{\LabelBase.cmd.recalctypearea} command (see +\DescPageRef{typearea.cmd.recalctypearea}).% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{pagesize}{output driver} +\end{Declaration}% +\begin{Explain}% + The above-mentioned mechanisms for choosing the paper format only affect the + output insofar as internal {\LaTeX} lengths are set. The \Package{typearea} + package then uses them in dividing the page into type area and margins. + The specification of the DVI formats\Index{DVI}, however, does not include + any indication of paper size. % + \iffree{% + When outputting directly from the DVI format to a low-level printer + language such as PCL% + \iftrue% Umbruchkorrektur + \footnote{PCL is a family of printer languages that HP uses for its + inkjet and laser printers.}% + \fi \ or ESC/P2% + \iftrue% Umbruchkorrektur + \footnote{ESC/P2 is the printer language that EPSON uses for its + dot-matrix, and older inkjet or laser printers.}% + \fi \ or ESC/P-R% + \iftrue% Umbruchkorrektur + \footnote{ESC/P-R is the printer language that EPSON currently uses for + inkjet and laser printers.}% + \fi, this is usually not an issue% + }{% + In the past, when DVI was printed directly into a low-level printer + language, it did not matter% + }, since with these formats the reference zero-position is at the top left, + as in DVI. But nowadays, the output is normally translated into languages + such as PostScript\Index{PostScript} or PDF\Index{PDF}, in which the + zero-position is at a different point, and in which the paper format should + be specified in the output file, which is missing this information. To solve + this problem, the corresponding driver uses a default paper size, which the + user can change either by an option or by specifying it in the {\TeX} source + file. When using the DVI driver \File{dvips} or \File{dvipdfm}, the + information can be given in the form of a \Macro{special} command. When + using {pdf\TeX}, {lua\TeX}, {\XeTeX} or {V\TeX} their paper-size lengths are + set appropriately. +\end{Explain} +With the \Option{pagesize} option, you can select an output driver for writing +the paper size into the destination document. Supported output drivers are +listed at \autoref{tab:typearea.outputdriver}\iffalse% +, \autopageref{tab:typearea.outputdriver}\fi. The +default\ChangedAt{v3.17}{\Package{typearea}} is \Option{pagesize}. Using this +option without providing a value is equivalent to \OptionValue{pagesize}{auto}. +% +\begin{table} + \caption{Output driver for option \OptionVName{pagesize}{output driver}} + \begin{desctabular} + \pventry{auto}{Uses output driver \PValue{pdftex} if the pdf\TeX-specific + lengths \Macro{pdfpagewidth}\IndexLength{pdfpagewidth} and + \Macro{pdfpageheight}\IndexLength{pdfpageheight} or the lua\TeX-specific + lengths \Macro{pagewidth}\IndexLength{pagewidth} and + \Macro{pageheight}\IndexLength{pageheight} are defined. In addition, the + output driver \PValue{dvips} will also be used. This setting is in + principle also suitable for \XeTeX{}.% + \IndexOption{pagesize~=\textKValue{auto}}}% + \pventry{automedia}{Almost the same as \PValue{auto} but if the + \mbox{V\TeX}-specific lengths + \Macro{mediawidth}\IndexLength{mediawidth} and + \Macro{mediaheight}\IndexLength{mediaheight} are defined, they will be + set as well.\IndexOption{pagesize~=\textKValue{automedia}}}% + \entry{\PValue{false}, \PValue{no}, \PValue{off}}{% + Does not set any output driver and does not send page size information to + the output driver.\IndexOption{pagesize~=\textKValue{false}}}% + \pventry{dvipdfmx}{\ChangedAt{v3.05a}{\Package{typearea}} Writes the paper + size into DVI files using + \Macro{special}\PParameter{pagesize=\PName{width},\PName{height}}. The + name of the output driver is \PValue{dvipdfmx} because the application + \File{dvipdfmx} handles such specials not just in the preamble but + in the document body too.\IndexOption{pagesize~=\textKValue{dvipdfmx}}}% + \pventry{dvips}{Using this option in the preamble sets the paper size + using + \Macro{special}\PParameter{pagesize=\PName{width},\PName{height}}. Since + the \File{dvips} driver cannot handle changes of paper size in the + inner document pages, a hack is required to achieve such changes. Use + changes of paper size after \Macro{begin}\PParameter{document} at your + own risk, if you are using + \PValue{dvips}!\IndexOption{pagesize~=\textKValue{dvips}}}% + \entry{\PValue{pdftex}, \PValue{luatex}}{% + \ChangedAt{v3.20}{\Package{typearea}}Sets paper size using the + pdf\TeX-specific lengths + \Macro{pdfpagewidth}\IndexLength{pdfpagewidth} and + \Macro{pdfpageheight}\IndexLength{pdfpageheight} or the + lua\TeX-specific lengths \Macro{pagewidth}\IndexLength{pagewidth} + and \Macro{pageheight}\IndexLength{pageheight}. You can do this at any + time in your document.% + \IndexOption{pagesize~=\textKValue{pdftex}}% + \IndexOption{pagesize~=\textKValue{luatex}}}% + \end{desctabular} + \label{tab:typearea.outputdriver} +\end{table} + +\begin{Example} + Suppose a document should be available both as a DVI data file + and in PDF format for on-line viewing. The preamble might begin + as follows: +\begin{lstcode}[% + aboveskip=.5\baselineskip plus .1\baselineskip minus .1\baselineskip,% + belowskip=.4\baselineskip plus .1\baselineskip minus .1\baselineskip] + \documentclass{article} + \usepackage[paper=A4,pagesize]{typearea} +\end{lstcode} + If the {pdf\TeX} engine is used \emph{and} PDF output is enabled, the + lengths \Macro{pdfpagewidth} and \Macro{pdfpageheight} are set + appropriately. If, however, a DVI data file is created\,---\, whether by + {\LaTeX} or by {pdf\LaTeX}\,---\,then a \Macro{special} is written at the + start of this data file. +\end{Example}% +\iffree{% The recommendation is actually outdated. Those who use such old + % versions of typearea are the ones at fault. + If you use an older version of \Package{typearea}, you + should\textnote{Attention!} always specify the \Option{pagesize} option, + because older versions of \Package{typearea} did not set them by default. As + a rule, the method without an \PName{output driver} or with \PValue{auto} or + \PValue{automedia} is convenient.% +}{% + \vskip-1\ht\strutbox plus + .75\ht\strutbox% Wegen Beispiel am Ende der Erklaerung +}% +\EndIndexGroup +% +\EndIndexGroup + + +\section{Tips} +\seclabel{tips} + +For theses and dissertations, many rules exist that violate even the most +elementary rules of typography.\textnote{formatting rules vs. good typography} +The reasons for such rules include the typographical incompetence of those who +issue them, but also the fact that they were originally meant for mechanical +typewriters. With a typewriter or a primitive text processor from the early +1980s, it was not possible to produce typographically correct output without +extreme effort. So rules were created that appeared to be easy to follow and +were still accommodating to a proofreader. These include margins that lead to +usable line lengths for one-sided printing with a typewriter. To avoid +extremely short lines, which are made worse by unjustified text, the margins +were kept narrow and the leading was increased to 1.5 lines to allow space for +corrections. Before the advent of modern text processing systems, single +spacing would have been the only alternative\,---\,except with \TeX. In such a +single-spaced document, even correction signs would have been difficult to +add. When computers became more widely available for text processing, some +students showed their playful side and tried to spice up their work by using +an ornamental font to make their work look better than it really was. They did +not consider that such fonts are often more difficult to read and therefore +unsuitable for this purpose. Thus, two font families found their way +into the regulations which are neither compatible nor particularly suitable +for the job in the case of Times. Times is a relatively narrow typeface +designed at the beginning of the 20th century for the narrow columns of +British newspapers. Modern versions usually are somewhat improved. But still +the Times font, which is often required, does not really fit the prescribed +margins. + +{\LaTeX} already uses adequate line spacing, and the margins are wide enough +for corrections. Thus a page will look spacious, even when quite full of text. + +Often these typographically questionable rules are difficult to implement in +{\LaTeX}. A fixed number of characters per line can be achieved only when a +non-proportional font is used. There are very few good non-proportional fonts +available. Hardly any text typeset in this way looks really good. In many +cases font designers try to increase the serifs on the `i' or `l' to +compensate for the different character widths. This does not work and results +in a fragmented and agitated-looking text. If you use {\LaTeX} for your +thesis, some of these rules have to be either ignored or at least interpreted +generously. For example, ``60 characters per line'' can be interpreted not as +a fixed but as an average or maximum value.% + +As implemented, typesetting rules are usually intended to obtain a useful +result even if the author does not know what needs to be considered. +\emph{Useful} frequently means readable and correctable. In my opinion the +type area of a text set with {\LaTeX} and the \Package{typearea} package meets +these criteria well from the outset. So if you are confronted with regulations +which deviate substantially from it, I recommend that you present a sample of +the text to your advisor and ask whether you can submit the work despite +deviations in the format. If necessary the type area can be adapted somewhat +by changing the \DescRef{\LabelBase.option.DIV}% +\important{\DescRef{\LabelBase.option.DIV}} option. I advise against +using \DescRef{\LabelBase.cmd.areaset} for this purpose, however. In the +worst case, use the \Package{geometry} package% +\important{\Package{geometry}}\IndexPackage{geometry} (see +\cite{package:geometry}), which is not part of \KOMAScript, or change the page +layout parameters of \LaTeX{} yourself. You can find the values as determined +by \Package{typearea} in the \File{log} file of your document. The +\DescRef{typearea-experts.option.usegeometry}% +\important{\DescRef{typearea-experts.option.usegeometry}} option, which you +can find in \autoref{part:forExperts}, can also improve the interactions +between \Package{typearea} and \Package{geometry}. This should allow modest +adjustments. However, make sure that the proportions of the text area match +those of the page, taking the binding correction into account. + +If it is absolutely necessary to set the text with a line spacing of 1.5, do +not under any circumstances redefine \Macro{baselinestretch}. Although this +procedure is recommended all too frequently, it has been obsolete since the +introduction of {\LaTeXe} in 1994. In the worst case, use the +\Macro{linespread} command. I recommend the package +\Package{setspace}\important{\Package{setspace}}\IndexPackage{setspace} (see +\cite{package:setspace}), which is not part of \KOMAScript. You should also +let \Package{typearea} recalculate a new type area after changing the line +spacing. However, you should switch back to the normal line spacing for the +title, and preferably for the table of contents and various lists\,---\,as +well as the bibliography and the index. For details, see the explanation of +\OptionValueRef{\LabelBase}{DIV}{current}% +\important{\OptionValueRef{\LabelBase}{DIV}{current}}. + +The \Package{typearea} package, even with option +\OptionValueRef{\LabelBase}{DIV}{calc}% +\important{\OptionValueRef{\LabelBase}{DIV}{calc}}, calculates a very generous +text area. Many conservative typographers will find that the resulting line +length is still excessive. The calculated \Option{DIV} value may be found in the +\File{log} file for each document. So you can easily choose a smaller value +after the first {\LaTeX} run. + +Not\textnote{What is better?} infrequently I am asked why I dwell on type area +calculations for an entire chapter, when it would be much easier just to +provide a package with which you can adjust the margins as in a word +processor. Often it is said that such a package would be a better solution in +any case, since everyone knows how to choose appropriate margins, and that the +margins calculated by {\KOMAScript} are not that good anyway. I would like to +quote Hans Peter Willberg and Friedrich Forssmann, two of the most respected +contemporary typographers \cite{TYPO:ErsteHilfe}. (You can find the original +German in the German guide.) +\begin{quote} + \phantomsection\seclabel{tips.cite}% + \textit{The\textnote{Quote!} practice of doing things oneself has long been + widespread, but the results are often dubious because amateur typographers + do not see what is wrong and cannot know what is important. This is how + you get used to incorrect and poor typography.} [\dots] \textit{Now the + objection could be made that typography is a matter of taste. When it + comes to decoration, one could perhaps accept that argument, but since + typography is primarily about information, not only can mistakes irritate, + but they may even cause damage.} +\end{quote} +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/typearea-experts-de.tex b/macros/latex/contrib/koma-script/doc/typearea-experts-de.tex new file mode 100644 index 0000000000..cd9b859737 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/typearea-experts-de.tex @@ -0,0 +1,304 @@ +% ====================================================================== +% typearea-experts-de.tex +% Copyright (c) Markus Kohm, 2008-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about typearea of the KOMA-Script guide part II +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{typearea-experts-de.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: typearea for experts)] + +\chapter{Zusätzliche Informationen zum Paket \Package{typearea.sty}} +\labelbase{typearea-experts} + +\BeginIndexGroup \BeginIndex{Package}{typearea} In diesem Kapitel finden Sie +zusätzliche Informationen zum Paket +\hyperref[cha:typearea]{\Package{typearea}}. \iffree{Einige Teile des Kapitels + sind dabei dem \KOMAScript-Buch \cite{book:komascript} vorbehalten. Dies + sollte kein Problem sein, denn der}{Der} normale Anwender, der das Paket +einfach nur verwenden will, wird diese Informationen eher selten +benötigen. Ein Teil der Informationen richtet sich an Anwender, die +ausgefallene Aufgaben lösen oder eigene Pakete schreiben wollen, die auf +\Package{typearea} basieren. Ein weiterer Teil der Informationen behandelt +Möglichkeiten von \Package{typearea}, die aus Gründen der Kompatibilität zu +den Standardklassen oder früheren Versionen von \KOMAScript{} existieren. Die +Teile, die nur aus Gründen der Kompatibilität zu früheren Versionen von +\KOMAScript{} existieren, sind in serifenloser Schrift gesetzt und sollten +nicht mehr verwendet werden. + + +\section{Experimentelle Möglichkeiten} +\seclabel{experimental} + +In diesem Abschnitt werden experimentelle Möglichkeiten +beschrieben. Experimentell bedeutet in diesem Zusammenhang, dass die Funktion +nicht garantiert werden kann. +\iffalse % Umbruchkorrektur +Dafür kann es zwei Gründe geben. Zum einen +steht die endgültige Funktion oder Implementierung eventuell noch nicht +abschließend fest. Zum anderen hängen die Möglichkeiten teilweise von Interna +anderer Pakete ab und können deshalb in ihrer Funktion nur so lange garantiert +werden, wie diese anderen Pakete nicht geändert werden. +\fi + +\begin{Declaration} + \OptionVName{usegeometry}{Ein-Aus-Wert} +\end{Declaration} +Normalerweise kümmert sich \Package{typearea} wenig darum, ob es in irgend +einer Konstellation zusammen mit dem Paket +\Package{geometry}\IndexPackage{geometry} (siehe \cite{package:geometry}) +verwendet wird. Das bedeutet insbesondere, dass \Package{geometry} nach wie +vor nichts davon mitbekommt, wenn man mit \Package{typearea} beispielsweise +die Papiergröße ändert -- etwas, das \Package{geometry} selbst gar nicht +bietet. + +Sobald\ChangedAt{v3.17}{\Package{typearea}} Option \Option{usegeometry} +gesetzt wird, versucht \Package{typearea}, alle eigenen Optionen für +\Package{geometry} in dessen Optionen zu übersetzen. Innerhalb des Dokuments +wird sogar \Macro{newgeometry} aufgerufen, wenn neue Parameter aktiviert +werden (siehe \DescRef{\LabelBase.cmd.activateareas} im nachfolgenden +Abschnitt). Da \Package{geometry} keine Änderung der Papiergröße oder +Papierausrichtung via \Macro{newgeometry} bietet, wird diese bei Bedarf über +interne Anweisungen und Längen von \Package{geometry} umgesetzt. Getestet ist +dies für \Package{geometry}~5.3 bis 5.6. + +Die Option bedeutet übrigens nicht, dass bei Verwendung von \Package{geometry} +nach einer Papiergrößen- oder Papierausrichtungsänderung mit +\Package{typearea} das neue Papier direkt optimal genutzt wird. Da +\Package{geometry} aus Komfortgründen deutlich mehr Optionen für die +Papiereinstellung bietet, als für die Bestimmung von Textbereich, Rändern, +Kopf, Fuß etc. benötigt werden -- man spricht von \emph{Überbestimmung} -- und +gleichzeitig bei neuen Aufrufen von \Macro{newgeometry} fehlende Angaben aus +bereits bekannten ableitet -- man spricht von \emph{Werterhalt} --, +muss man gegebenenfalls durch vollständige Bestimmung neuer Werte +mit einem eigenen Aufruf von \Macro{newgeometry} alle gewünschten +Einstellungen explizit vornehmen. Nichtsdestotrotz kann die Berücksichtigung +von \Package{geometry} durch \Package{typearea} zusätzliche Möglichkeiten +eröffnen. + +{\setlength{\emergencystretch}{1em}% +Von \Package{typearea} werden mit \Option{usegeometry} für \Package{geometry} +derzeit die Optionen +\Option{bindingoffset}, \Option{footskip}, \Option{headheight}, +\Option{headsep}, \Option{includefoot}, \Option{includehead}, +\Option{includemp}, \Option{lmargin}, \Option{marginparsep}, +\Option{marginparwidth}, \Option{textheight}, \Option{textwidth}, \Option{top} +und in der Dokumentpräambel zusätzlich \Option{paperheight} und +\Option{paperwidth} gesetzt.\par}% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{areasetadvanced}{Ein-Aus-Wert} + \Macro{areaset}\OParameter{BCOR}\Parameter{Breite}\Parameter{Höhe} +\end{Declaration} +Normalerweise berücksichtigt \DescRef{typearea.cmd.areaset} Optionen zur +Bestimmung der Höhe von Kopf und Fuß oder zur Festlegung, ob Randelemente Teil +des Satzspiegels sein sollen, nicht in gleicher Weise wie +\DescRef{typearea.cmd.typearea}. Mit Option +\Option{areasetadvanced}\ChangedAt{v3.11}{\Package{typearea}} kann jedoch +eingestellt werden, dass sich \DescRef{typearea.cmd.areaset} diesbezüglich +mehr wie \DescRef{typearea.cmd.typearea} verhalten soll. Trotzdem +unterscheiden sich Einstellungen, die zu gleich großen Textbereichen führen +zwischen den beiden Befehlen weiterhin, da \DescRef{typearea.cmd.typearea} +immer auf ganze Zeilen rundet und dabei gegebenenfalls den unteren Rand um bis +zu eine Zeile kleiner wählt, während \DescRef{typearea.cmd.areaset} den oberen +und unteren Rand immer im Verhältnis 1:2 einstellt. Die Textbereiche der +unterschiedlichen Befehle können also bei gleicher Größe vertikal leicht +verschoben sein. + +Nach Aktivierung von \Option{areasetadvanced} kann jedoch mit einer +Kombination wie +\begin{lstcode}[escapeinside=><] + \typearea{>\PName{BCOR}<}{>\PName{DIV}<} + \areaset[current]{\textwidth}{\textheight} +\end{lstcode} +das unterschiedliche Verhalten ausgeglichen werden, ohne dass dabei die +eingangs erwähnten Abstriche in der Arbeitsweise von \Macro{areaset} in Kauf +genommen werden müssen. Siehe dazu auch das Beispiel im nächsten Abschnitt.% +\EndIndexGroup + + +\section{Anweisungen für Experten} +\seclabel{experts} + + +In diesem Abschnitt werden Anweisungen beschrieben, die für den normalen +Anwender kaum oder gar nicht von Interesse sind. Experten bieten diese +Anweisungen zusätzliche Möglichkeiten. + +\begin{Declaration} + \Macro{activateareas} +\end{Declaration}% +Diese Anweisung wird von \Package{typearea} genutzt, um die Einstellungen für +Satzspiegel und Ränder in die internen \LaTeX-Längen zu übertragen, wenn der +Satzspiegel innerhalb des Dokuments, also nach +\Macro{begin}\PParameter{document} neu berechnet wurde. Wurde die Option +\DescRef{typearea.option.pagesize} verwendet, so wird diese anschließend mit +demselben Wert neu aufgerufen. Damit kann beispielsweise innerhalb von +PDF-Dokumenten die Seitengröße tatsächlich variieren. + +Experten können diese Anweisung auch verwenden, wenn Sie aus irgendwelchen +Gründen Längen wie \Length{textwidth} oder \Length{textheight} innerhalb des +Dokuments manuell geändert haben. Der Experte ist dabei für eventuell +notwendige Seitenumbrüche vor oder nach der Verwendung jedoch selbst +verantwortlich! Darüber hinaus sind alle von \Macro{activateareas} +durchgeführten Änderungen lokal!% +\EndIndexGroup + + +\begin{Declaration} + \Macro{storeareas}\Parameter{Anweisung} + \Macro{BeforeRestoreareas}\Parameter{Code} + \Macro{BeforeRestoreareas*}\Parameter{Code} + \Macro{AfterRestoreareas}\Parameter{Code} + \Macro{AfterRestoreareas*}\Parameter{Code} +\end{Declaration} +Mit Hilfe von \Macro{storeareas} wird eine \PName{Anweisung} definiert, über +die alle aktuellen Seitenspiegeleinstellungen wiederhergestellt werden +können. So ist es möglich, die aktuellen Einstellungen zu speichern, +anschließend die Einstellungen zu ändern und dann die gespeicherten +Einstellungen wieder zu reaktivieren. + +\begin{Example} + Immer wieder fragen Anwender nach der Möglichkeit, in einem A4-Dokument + unter Beibehaltung der Randeinstellungen eine A3-Seite im Querformat + einfügen zu können. Der Textbereich soll also lediglich um die gewonnene + Papierbreite verbreitert werden. Mit \Macro{storeareas}, + \DescRef{\LabelBase.cmd.areaset} und der zuvor bereits erklärten Option + \DescRef{\LabelBase.option.areasetadvanced} ist das sehr einfach möglich: +\begin{lstcode} + \documentclass[areasetadvanced]{scrartcl} + \areaset[current]{\textwidth}{\textheight} + + \begin{document} + \noindent\rule{\textwidth}{\textheight} + + \storeareas\meinegespeichertenWerte + \KOMAoption{paper}{a3,landscape} + \areaset[current] + {\dimexpr\textwidth+.5\paperwidth\relax} + {\textheight} + \noindent\rule{\textwidth}{\textheight} + + \clearpage + \meinegespeichertenWerte + \noindent\rule{\textwidth}{\textheight} + \end{document} +\end{lstcode} + Die \DescRef{\LabelBase.cmd.areaset}-Anweisung\IndexCmd{areaset} in der + Dokumentpräambel dient dabei zusammen mit Option + \DescRef{\LabelBase.option.areasetadvanced}\IndexOption{areasetadvanced} + dazu, die Unterschiede zwischen der + \DescRef{typearea.cmd.typearea}-Voreinstellung und der späteren Verwendung + von \DescRef{\LabelBase.cmd.areaset} auszugleichen, wie dies bereits auf + \DescPageRef{\LabelBase.option.areasetadvanced} erklärt wurde. Ohne diese + Maßnahme könnte es insbesondere bei Verwendung von Optionen wie + \DescRef{typearea.option.headinclude} und + \DescRef{typearea.option.headheight} zu deutlichen Abweichungen bei den + Randeinstellungen kommen. + + Wichtig\textnote{Achtung!} ist auch die Anweisung + \DescRef{maincls.cmd.clearpage} vor dem Aufruf von + \Macro{meinegespeichertenWerte}, damit die Wiederherstellung erst auf der + nächsten Seite erfolgt. Bei doppelseitigen Dokumenten sollte bei Änderungen + am Papierformat stattdessen sogar + \DescRef{maincls.cmd.cleardoubleoddpage}\IndexCmd{cleardoubleoddpage} oder + -- wenn keine \KOMAScript-Klasse zum Einsatz kommt -- + \DescRef{maincls.cmd.cleardoublepage}\IndexCmd{cleardoublepage} verwendet + werden.% + \iffree{\par Außerdem wird \Macro{noindent} verwendet, um den normalen + Absatzeinzug vor den schwarzen Kästen zu verhindern. Sie würden sonst kein + korrektes Bild des Seitenlayouts wiedergeben.}{}% +\end{Example} + +Bei\textnote{Achtung!} der Verwendung von \Macro{storeareas} ist zu beachten, +dass sowohl \Macro{storeareas} als auch die damit definierte \PName{Anweisung} +nicht innerhalb einer Gruppe aufgerufen werden sollten. Die Definition der +\PName{Anweisung} erfolgt intern mit +\Macro{newcommand}\IndexCmd{newcommand*}\important{\Macro{newcommand*}}. Bei +erneuter Verwendung einer bereits definierten \PName{Anweisung} wird eine +entsprechende Fehlermeldung ausgegeben. + +Oftmals\ChangedAt{v3.18}{\Package{typearea}} ist auch erwünscht, vor der +Wiederherstellung der Einstelllungen per \PName{Anweisung} grundsätzlich +bestimmte Aktionen wie beispielsweise ein +\DescRef{maincls.cmd.cleardoubleoddpage} auszuführen. Dies kann man mit Hilfe +von \Macro{BeforeRestoreareas} und \Macro{BeforeRestoreareas*} +erreichen. Entsprechend kann man mit \Macro{AfterRestoreareas} und +\Macro{AfterRestoreareas*} \PName{Code} nach der Wiederherstellung der +Einstellungen ausführen lassen. Die Formen mit und ohne Stern unterscheiden +sich insoweit, als die Sternform nur für noch nicht per \Macro{storeareas} +gespeicherte Einstellungen gilt, während sich die Variante ohne Stern auch auf +die zukünftige Verwendung bereits früher gespeicherter Einstellungen +auswirkt.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AfterCalculatingTypearea}\Parameter{Anweisungen} + \Macro{AfterCalculatingTypearea*}\Parameter{Anweisungen} + \Macro{AfterSettingArea}\Parameter{Anweisungen} + \Macro{AfterSettingArea*}\Parameter{Anweisungen} +\end{Declaration}% +Diese Anweisungen dienen der Verwaltung zweier Haken\Index{Haken} (engl. +\emph{hooks}\Index{hook=\emph{hook}}). Die ersten beiden, +\Macro{AfterCalculatingTypearea} und deren Sternform, ermöglichen es dem +Experten jedes Mal, nachdem \Package{typearea} eine neue Auf"|teilung in +Satzspiegel und Ränder berechnet hat, also nach jeder impliziten oder +expliziten Ausführung von \DescRef{typearea.cmd.typearea}, \PName{Anweisungen} +ausführen zu lassen. Entsprechendes leisten +\Macro{AfterSettingArea}\ChangedAt{v3.11}{\Package{typearea}} und dessen +Stern-Form für die Ausführung von \DescRef{typearea.cmd.areaset}. Die +Normalformen arbeiten dabei global, während die Änderungen durch die +Sternformen nur lokal wirksam sind. Die \PName{Anweisungen} werden jeweils +unmittelbar vor \DescRef{\LabelBase.cmd.activateareas} ausgeführt.\iffree{}{ + In \autoref{cha:modernletters} wird für die \emph{Letter-Class-Option} + \File{asymTypB.lco} davon Gebrauch gemacht, um die Randverteilung zu + ändern.}% +% +\EndIndexGroup + + +\section{Lokale Einstellungen durch die Datei \File{typearea.cfg}} +\seclabel{cfg} +\BeginIndex{File}{typearea.cfg} + +\LoadNonFree{typearea-experts}{0} + +\section{Mehr oder weniger obsolete Optionen und Anweisungen} +\seclabel{obsolete} + +\LoadNonFree{typearea-experts}{1} +% +\EndIndexGroup + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: + +% LocalWords: Hochformat Seitenspiegels diff --git a/macros/latex/contrib/koma-script/doc/typearea-experts-en.tex b/macros/latex/contrib/koma-script/doc/typearea-experts-en.tex new file mode 100644 index 0000000000..3489136cc8 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/typearea-experts-en.tex @@ -0,0 +1,266 @@ +% ====================================================================== +% typearea-experts-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% 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.md. +% ====================================================================== +% +% Chapter about typearea for experts of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ====================================================================== + +\KOMAProvidesFile{typearea-experts-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: typearea)] +\translator{Markus Kohm\and Gernot Hassenpflug\and Karl Hagen} + +\chapter{Additional Information about the \Package{typearea} package} +\labelbase{typearea-experts} +\BeginIndexGroup +\BeginIndex{Package}{typearea} + +This chapter provides additional information about the \Package{typearea} +package. \iffree{Some parts of the chapter are found only in the German + \KOMAScript{} book \cite{book:komascript}. This should not be a problem, + because the}{The} average user, who only wants to use the package, will not +normally need this information. Part of this material is intended for users +who want to solve unusual problems or write their own packages using +\Package{typearea}. Another part covers \Package{typearea} features that exist +only for compatibility with earlier versions of \KOMAScript{} or with the +standard classes. The features that exist only for compatibility with earlier +versions of \KOMAScript{} are printed in a sans serif font. You should not use +them any longer. + + +\section{Experimental Features} +\seclabel{experimental} + +This section describes experimental features. Experimental, in this context, +means that correct functioning cannot be guaranteed. There can be two reasons +for designating something experimental. First, the final function is not yet +defined or its implementation is not yet finalised. Second, a feature may +depend on internal functions of other packages and therefore the feature can +not be guaranteed, if the other packages change. + +\begin{Declaration} + \OptionVName{usegeometry}{simple switch} +\end{Declaration} +Usually \Package{typearea} does not care much if you use it with the +\Package{geometry}\IndexPackage{geometry} package (see +\cite{package:geometry}) in any configuration. In particular, this means that +\Package{geometry} does not recognise any changes to the page parameters done +with \Package{typearea}, for example when it changes the paper size\,---\,a +feature not provided by \Package{geometry} itself. + +Once\ChangedAt{v3.17}{\Package{typearea}} you set option \Option{usegeometry}, +\Package{typearea} tries to translate all of its options into options of +\Package{geometry}. If you activate new parameters inside the document, +\Package{typearea} even calls \Macro{newgeometry} (see +\DescRef{\LabelBase.cmd.activateareas} in the following section). Since +\Package{geometry} does not support changes of paper size or page orientation +with \Macro{newgeometry}, \Package{typearea} uses internal commands and +\Package{geometry} lengths to provide such changes as needed. This has been +tested with \Package{geometry}~5.3 through 5.6. + +Note that using \Package{geometry} and changing page size or orientation with +\Package{typearea} does not mean that \Package{geometry} will automatically +use the new paper size in an expected manner. For convenience, +\Package{geometry} provides far more options to adjust the page than are +required to determine the type area, margins, header, footer, etc.\,---\,this +is called \emph{overdetermination}\,---\, and at the same time +\Macro{newgeometry} derives missing information from the known +values\,---\,known as \emph{value preservation}\,---\,so you often must +explicitly specify all new values completely when you call \Macro{newgeometry} +on your own. Nevertheless, when \Package{typearea} takes \Package{geometry} +into consideration, it opens up additional possibilities.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{areasetadvanced}{simple switch} + \Macro{areaset}\OParameter{BCOR}\Parameter{width}\Parameter{height} +\end{Declaration} +Usually, \DescRef{typearea.cmd.areaset} does not handle options to define the +height of the header or footer, or whether margin elements should count as +part of the type area in the same way as \DescRef{typearea.cmd.typearea}. With +the \Option{areasetadvanced}\ChangedAt{v3.11}{\Package{typearea}} option, you +can make \DescRef{typearea.cmd.areaset} behave more like +\DescRef{typearea.cmd.typearea} in this regard. Nevertheless, settings for the +two commands that result in type areas of equal size still can differ because +\DescRef{typearea.cmd.typearea} always adjusts the type area so that it +contains an integer number of lines, potentially making the bottom margin up +to one line smaller, whereas \DescRef{typearea.cmd.areaset} always sets the +ratio between the top and bottom margins at 1:2. The type area can therefore +be slightly shifted vertically depending on which command was used.% +\EndIndexGroup + + +\section{Expert Commands} +\seclabel{experts} + +This section describes commands that are of little or no interest to average +users. These commands give experts additional possibilities. Because this +information is addressed to experts, it appears in condensed form. + +\begin{Declaration} + \Macro{activateareas} +\end{Declaration}% +The \Package{typearea} package uses this command convert the settings for the +type area and margins to internal \LaTeX{} lengths whenever the type area has +been recalculated inside of the document, that is after +\Macro{begin}\PParameter{document}. If the \DescRef{typearea.option.pagesize} +option has been used, it will be executed again with the same value. Thus, for +example, the page size may actually vary within PDF documents. + +Experts can also use this command if they have manually changed lengths like +\Length{textwidth} or \Length{textheight} inside a document for any reason. If +you do so, however, you are responsible for any necessary page breaks before +or after you call \Macro{activateareas}. Moreover, all changes made by +\Macro{activateareas} are local.% +% +\EndIndexGroup + + +\begin{Declaration} + \Macro{storeareas}\Parameter{\textMacro{command}}% + \Macro{BeforeRestoreareas}\Parameter{code}% + \Macro{BeforeRestoreareas*}\Parameter{code}% + \Macro{AfterRestoreareas}\Parameter{code}% + \Macro{AfterRestoreareas*}\Parameter{code} +\end{Declaration} +\Macro{storeareas} defines a \PName{\Macro{command}} which you can use to +restore all current type-area settings. So you can save the current settings, +change them, and then restore the previous settings afterwards. + +\begin{Example} + Time and again, users ask about the possibility of inserting an A3 page in + landscape format in an A4 document while retaining the margin settings. The + text area should therefore only be widened by the extra paper width. With + \Macro{storeareas}, \DescRef{\LabelBase.cmd.areaset} and the previously + explained option \DescRef{\LabelBase.option.areasetadvanced} this is very + easily possible: + +\begin{lstcode} + \documentclass[areasetadvanced]{scrartcl} + \areaset[current]{\textwidth}{\textheight} + + \begin{document} + \noindent\rule{\textwidth}{\textheight} + + \storeareas\MySavedTypingArea + \KOMAoption{paper}{a3,landscape} + \areaset[current] + {\dimexpr\textwidth+.5\paperwidth\relax} + {\textheight} + \noindent\rule{\textwidth}{\textheight} + + \clearpage + \MySavedTypingArea + \noindent\rule{\textwidth}{\textheight} + \end{document} +\end{lstcode} + The \DescRef{\LabelBase.cmd.areaset} command\IndexCmd{areaset} in the + document preamble is used together with the + \DescRef{\LabelBase.option.areasetadvanced}\IndexOption{areasetadvanced} + option to compensate for the differences between the + \DescRef{typearea.cmd.typearea} preset and the later use of + \DescRef{\LabelBase.cmd.areaset}, as already explained on + \DescPageRef{\LabelBase.option.areasetadvanced}. Without this, there could + be significant differences in margin settings, especially when using options + like \DescRef{typearea.option.headinclude} and + \DescRef{typearea.option.headheight}. + + It's\textnote{Attention} important to call \DescRef{maincls.cmd.clearpage} + before \Macro{MySavedTypingArea} so that the saved values are restored on + the next page. With two-sided documents, changes to the paper format should + even use + \DescRef{maincls.cmd.cleardoubleoddpage}\IndexCmd{cleardoubleoddpage} + or\,---\,if you are not using a \KOMAScript{} + class\,---\,\DescRef{maincls.cmd.cleardoublepage}% + \IndexCmd{cleardoublepage}.% + \iffree{\par In addition, \Macro{noindent} is used to avoid paragraph + indents of the black boxes. Otherwise, you would not produce a correct + image of the type area.}{}% +\end{Example} + +Note\textnote{Attention!} that neither \Macro{storeareas} nor the defined +\PName{\Macro{command}} defined with it should be used inside a group. +Internally, +\Macro{newcommand}\IndexCmd{newcommand*}\important{\Macro{newcommand*}} is +used to define the \PName{\Macro{command}}. So reusing a +\PName{\Macro{command}} to store settings again would result in a +corresponding error message. + +Often\ChangedAt{v3.18}{\Package{typearea}}, it is useful to automatically +execute commands like \DescRef{maincls.cmd.cleardoubleoddpage} before +restoring the settings of a \Macro{command} generated by \Macro{storeareas}. +You can do so using \Macro{BeforeRestoreareas} or \Macro{BeforeRestoreareas*}. +Similarly, you can use \Macro{AfterRestoreareas} or \Macro{AfterRestoreareas*} +to automatically execute \PName{code} after restoring the settings. The +variants with and without the star differ in that the starred variant only +applies the \PName{code} to future \PName{command}s generated by +\Macro{storeareas}, whereas the regular variant also adds the \PName{code} to +previously defined \PName{command}s.% +\EndIndexGroup + + +\begin{Declaration} + \Macro{AfterCalculatingTypearea}\Parameter{code}% + \Macro{AfterCalculatingTypearea*}\Parameter{code}% + \Macro{AfterSettingArea}\Parameter{cod}% + \Macro{AfterSettingArea*}\Parameter{code} +\end{Declaration}% +These commands serve to manage two hooks\Index{hook}. The first two, +\Macro{AfterCalculatingTypearea} and its starred variant let experts execute +\PName{code} each time \Package{typearea} recalculates the type area and +margins, that is after every implicitly or explicit invocation of +\DescRef{typearea.cmd.typearea}. Similarly, +\Macro{AfterSettingArea}\ChangedAt{v3.11}{\Package{typearea}} and its starred +variant allow for executing \PName{code} every time +\DescRef{typearea.cmd.areaset} has been used. The normal versions have a +global scope, while changes made in the starred versions are only local. The +\PName{code} is executed immediately before \Macro{activateareas}.\iffree{}{ + In \autoref{cha:modernletters}, The letter-class-option file + \File{asymTypB.lco} uses it to change the distribution of the margins.}% +% +\EndIndexGroup + + +\section{Local Settings with the \File{typearea.cfg} File} +\seclabel{cfg} +\BeginIndexGroup +\BeginIndex{File}{typearea.cfg} + +\LoadNonFree{typearea-experts}{0} +% +\EndIndexGroup + +\section{More or Less Obsolete Options and Commands} +\seclabel{obsolete} +\LoadNonFree{typearea-experts}{1} +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: diff --git a/macros/latex/contrib/koma-script/doc/typearea.html b/macros/latex/contrib/koma-script/doc/typearea.html index b386b493a2..b1c4df1ead 100644 --- a/macros/latex/contrib/koma-script/doc/typearea.html +++ b/macros/latex/contrib/koma-script/doc/typearea.html @@ -1,56 +1,52 @@ + PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - - - + + - - + documentation of typearea" /> + + - + - The KOMA-Script Documentation Wrapper + Calculating the Page Layout with typearea -

The KOMA-Script Documentation Wrapper

-

Der Weg zur KOMAScript-Anleitung

+

Calculating the Page Layout with typearea

+

Satzspiegelberechnung mit typearea.sty

- Ich nehme an, Sie suchen nach der KOMA-Script-Anleitung. Die deutsche - Anleitung können Sie in scrguide.pdf - finden. Einen Index dazu gibt es - in scrguide.html. + Ich nehme an, Sie suchen nach dem Kapitel + „Satzspiegelberechnung mit typearea.sty in der + KOMA-Script-Anleitung.
- Markus Kohm, 2007-09-21 + Markus Kohm, 2022-06-03

Valid XHTML 1.1 + diff --git a/macros/latex/contrib/koma-script/doc/variables-tikz.tex b/macros/latex/contrib/koma-script/doc/variables-tikz.tex new file mode 100644 index 0000000000..fb69f5fff7 --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/variables-tikz.tex @@ -0,0 +1,212 @@ +% ====================================================================== +% variables-tikz.tex +% Copyright (c) Markus Kohm, 2005-2022 +% +% 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.md. +% ====================================================================== +% +% Generation of plength figures at scrlttr2 chapter of the KOMA-Script +% guide +% +% Maintained by Markus Kohm +% Original metapost source by Stephan Hennig +% Original TikZ source by Marei Peischl +% +% ====================================================================== + +\KOMAProvidesFile{variables-tikz.tex}% + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (figure in scrlttr2.tex)] + +\ExplSyntaxOn +\prop_if_exist:NF \l_this_plength_description_prop { + \prop_new:N \l_this_plength_description_prop +} +\prop_set_from_keyval:Nn \l_this_plength_description_prop { + firsthead=\Multi{\DescRef{scrlttr2.variable.firsthead}\\ + \DescRef{scrlttr2.variable.fromname}\and + \DescRef{scrlttr2.variable.fromaddress}\and + \DescRef{scrlttr2.variable.fromphone}\and + \DescRef{scrlttr2.variable.fromfax}\and + \DescRef{scrlttr2.variable.fromemail}\and + \DescRef{scrlttr2.variable.fromurl}}, + firstfoot=\DescRef{scrlttr2.variable.firstfoot}, + backaddress =\DescRef{scrlttr2.variable.backaddress}, + specialmail=\DescRef{scrlttr2.variable.specialmail}, + refline=\Multi{\DescRef{scrlttr2.variable.yourref}\and + \DescRef{scrlttr2.variable.yourmail}\and + \DescRef{scrlttr2.variable.myref}\and + \DescRef{scrlttr2.variable.customer}\and + \DescRef{scrlttr2.variable.invoice}\and + \DescRef{scrlttr2.variable.place}\and + \DescRef{scrlttr2.variable.date}}, + title=\DescRef{scrlttr2.variable.title}, + subject=\DescRef{scrlttr2.variable.subject}, + signature=\DescRef{scrlttr2.variable.signature}, + location= \DescRef{scrlttr2.variable.location}, + toaddr=\Macro{begin}\PParameter{\DescRef{scrlttr2.env.letter}}\Parameter{\toaddrname}, + opening=\DescRef{scrlttr2.cmd.opening}\Parameter{\openingargumentname}, + body=\desc\letterbodyname, + closing=\DescRef{scrlttr2.cmd.closing}\Parameter{\closingargumentname}, +} + +\prop_if_exist:NF \l_this_plength_var_prop { + \prop_new:N \l_this_plength_var_prop +} + +\prop_set_from_keyval:Nn \l_this_plength_var_prop { + ticksize=1, + textwidth= 147, + textheight= 209.4, + evensidemargin= 6.1, + oddsidemargin = 6.1, + paperwidth = 210, + paperheight = 297, + baselineskip = .9\baselineskip, %3.86607, + headheight = 6, + headsep =7.2, + footskip =16.73, + foldmarkhpos = 3.5, + tfoldmarkvpos = 105, + bfoldmarkvpos = 210, + tfoldmarklength = 2, + pfoldmarklength = 4, + bfoldmarklength = 2, + toaddrvpos = 45, + refvpos = 98.5, + refaftervskip = \UseVar{baselineskip}, + toaddrhpos = 20, + toaddrwidth = 85, + toaddrheight = 40, + toaddrindent = 6, + specialmailwidth = 50, + specialmailrightindent = 4, + specialmailheight = \UseVar{baselineskip}, + locwidth = 37.5, + backaddrheight = 5, + firstheadvpos = 8, + firstheadwidth = \UseVar{paperwidth} - 2 * \UseVar{toaddrhpos}, + firstfootwidth = \UseVar{firstheadwidth}, + firstfootvpos = 16.58 + \UseVar{headheight} + \UseVar{headsep} + \UseVar{textheight} + \UseVar{footskip}, + refwidth = 0, + sigindent = 0, + toaddrindent =0, + sigbeforevskip = 2*\UseVar{baselineskip}, + firstheadhpos = 0.5* \UseVar{paperwidth}-.5*\UseVar{firstheadwidth}, + firstheadheight = 5*\UseVar{baselineskip}, + firstfoothpos = 0.5*(\UseVar{paperwidth}-\UseVar{firstfootwidth}), + firstfootheight = 3*\UseVar{baselineskip}, + fromrulewidth = 0.5 * \UseVar{firstheadwidth}, + lochpos = \UseVar{paperwidth}-\UseVar{toaddrhpos}-\UseVar{locwidth}, + refhpos = 25.40+\UseVar{oddsidemargin}, + text = \UseVar{refhpos}, + textcenter = \UseVar{refhpos}+0.5*\UseVar{textwidth}, + refheight = 2*\UseVar{baselineskip}, + refwidth = \UseVar{textwidth}, + titlevpos = \UseVar{refvpos}+\UseVar{refheight}+\UseVar{refaftervskip}, + titlewidth = 90, + titleheight = 1.2*\UseVar{baselineskip}, + subjectvpos = \UseVar{titlevpos}+\UseVar{titleheight}+1*\UseVar{baselineskip}, + subjectwidth = 80, + subjectheight = \UseVar{baselineskip}, + openingvpos = \UseVar{subjectvpos}+\UseVar{subjectheight}+2*\UseVar{baselineskip}, + openingwidth = 60, + openingheight = \UseVar{baselineskip}, + bodyvpos = \UseVar{openingvpos}+\UseVar{openingheight}+\UseVar{baselineskip}, + bodywidth = \UseVar{textwidth}, + bodyheight = 6*\UseVar{baselineskip}, + typeareabottom = \UseVar{firstfootvpos}-\UseVar{footskip}, + sigvpos = \UseVar{bodyvpos}+\UseVar{bodyheight}+\UseVar{baselineskip}, + sigwidth = 50, + sigheight = \UseVar{baselineskip}, + locvpos = \UseVar{toaddrvpos}, + locheight = \UseVar{toaddrheight}, +} +\def\UseVar#1{ + \fp_eval:n {\prop_item:Nn \l_this_plength_var_prop {#1}} +} + +\def\UseDesc#1{ + \prop_item:Nn \l_this_plength_description_prop {#1} +} + +\ExplSyntaxOff + +\def\desc{\itshape} + +\providecommand*{\Multi}[1]{% + {\def\and{, }% + \begin{tabular}{@{}l@{}} + #1 + \end{tabular} + }% +} + +\begin{tikzpicture}[fill=black!20] + \draw (0,0)rectangle (\UseVar{paperwidth},\UseVar{paperheight}); + + \filldraw(\UseVar{firstheadhpos},\UseVar{firstheadvpos})rectangle node{\UseDesc{firsthead}}+(\UseVar{firstheadwidth},\UseVar{firstheadheight}); + + \filldraw(\UseVar{toaddrhpos},\UseVar{toaddrvpos}) rectangle + node {\UseDesc{backaddress}} + +(\UseVar{toaddrwidth},\UseVar{backaddrheight}); + + \filldraw(\UseVar{toaddrhpos}+.5*\UseVar{toaddrwidth}-\UseVar{specialmailrightindent},\UseVar{toaddrvpos}+\UseVar{backaddrheight}) rectangle + node {\UseDesc{specialmail}} + +(.5*\UseVar{toaddrwidth},\UseVar{specialmailheight}); + + \filldraw(\UseVar{toaddrhpos}+\UseVar{toaddrindent},\UseVar{toaddrvpos}+\UseVar{backaddrheight}+\UseVar{specialmailheight}) + rectangle node {\UseDesc{toaddr}} + +(\UseVar{toaddrwidth}-2*\UseVar{toaddrindent},\UseVar{toaddrheight}-\UseVar{backaddrheight}-\UseVar{specialmailheight}); + + \draw(\UseVar{toaddrhpos},\UseVar{toaddrvpos})rectangle+(\UseVar{toaddrwidth},\UseVar{toaddrheight}); + + \filldraw (\UseVar{refhpos},\UseVar{refvpos})rectangle node{\UseDesc{refline}} + +(\UseVar{refwidth},\UseVar{refheight}); + + \filldraw (\UseVar{textcenter}-.5*\UseVar{titlewidth},\UseVar{titlevpos})rectangle node{\UseDesc{title}} + +(\UseVar{titlewidth},\UseVar{titleheight}); + + \filldraw (\UseVar{text},\UseVar{subjectvpos})rectangle node{\UseDesc{subject}} + +(\UseVar{subjectwidth},\UseVar{subjectheight}); + + \filldraw (\UseVar{text},\UseVar{openingvpos})rectangle node{\UseDesc{opening}} + +(\UseVar{openingwidth},\UseVar{openingheight}); + + \filldraw (\UseVar{text},\UseVar{bodyvpos})rectangle node{\UseDesc{body}} + +(\UseVar{bodywidth},\UseVar{bodyheight}); + + \filldraw (\UseVar{text}+\UseVar{sigindent},\UseVar{sigvpos})rectangle node{\UseDesc{closing}} + +(\UseVar{sigwidth},\UseVar{sigheight}); + + \filldraw (\UseVar{text}+\UseVar{sigindent}+.1*\UseVar{sigwidth},\UseVar{sigvpos}+\UseVar{sigheight}+\UseVar{sigbeforevskip})rectangle node{\UseDesc{signature}} + +(.8*\UseVar{sigwidth},\UseVar{sigheight}); + + \filldraw (\UseVar{lochpos},\UseVar{locvpos}) rectangle node{\UseDesc{location}}+(\UseVar{locwidth},\UseVar{locheight}); + + \filldraw (\UseVar{firstfoothpos},\UseVar{firstfootvpos}) rectangle node{\UseDesc{firstfoot}} +(\UseVar{firstfootwidth},\UseVar{firstfootheight}); + + \draw[thick] (\UseVar{foldmarkhpos},\UseVar{tfoldmarkvpos}) --+(\UseVar{tfoldmarklength},0); + \draw[thick] (\UseVar{foldmarkhpos},.5*\UseVar{paperheight}) --+(\UseVar{pfoldmarklength},0); + \draw[thick] (\UseVar{foldmarkhpos},\UseVar{bfoldmarkvpos}) --+(\UseVar{bfoldmarklength},0); +\end{tikzpicture} + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% coding: utf-8 +%%% End: diff --git a/macros/latex/contrib/koma-script/japanlco.dtx b/macros/latex/contrib/koma-script/japanlco.dtx new file mode 100644 index 0000000000..03fd447e7a --- /dev/null +++ b/macros/latex/contrib/koma-script/japanlco.dtx @@ -0,0 +1,445 @@ +% \iffalse meta-comment +% ====================================================================== +% japanlco.dtx +% Copyright (c) Markus Kohm, 2008-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: japanlco.dtx 3889 2022-06-09 12:11:14Z kohm $ +%%%% (run: Ni,EARLY,LOW,head) +%%%% (run: Ni,EARLY,LOW,body) +%%%% (run: Ni,EARLY,HIGH,head) +%%%% (run: Ni,EARLY,HIGH,body) +%%%% (run: Ni,LATE,LOW,head) +%%%% (run: Ni,LATE,LOW,body) +%%%% (run: Ni,LATE,HIGH,head) +%%%% (run: Ni,LATE,HIGH,body) +%%%% (run: Ni,RIGHT,LOW,head) +%%%% (run: Ni,RIGHT,LOW,body) +%%%% (run: Kaku,LATE,LOW,head) +%%%% (run: Kaku,LATE,LOW,body) +%<*dtx> +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\begingroup + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2022-06-09 14:11:14 +0200 (Do, 09. Jun 2022) $ + \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} + \filerevision$Revision: 3889 $ +\endgroup +\ProvidesFile{japanlco.dtx}[\filedate\space\filerevision\space + KOMA-Script (letter class options)] +\ifx\documentclass\undefined + \ifx\ifTopLevel\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHTFROM}{2007} + \generate{\usepreamble\defaultpreamble + \file{NipponEL.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{japanlco.dtx}{lco,Ni,EARLY,LOW,head}% + \from{japanlco.dtx}{lco,Ni,EARLY,LOW,body}% + }% + \file{NipponEH.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{japanlco.dtx}{lco,Ni,EARLY,HIGH,head}% + \from{japanlco.dtx}{lco,Ni,EARLY,HIGH,body}% + }% + \file{NipponLL.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{japanlco.dtx}{lco,Ni,LATE,LOW,head}% + \from{japanlco.dtx}{lco,Ni,LATE,LOW,body}% + }% + \file{NipponLH.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{japanlco.dtx}{lco,Ni,LATE,HIGH,head}% + \from{japanlco.dtx}{lco,Ni,LATE,HIGH,body}% + }% + \file{NipponRL.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{japanlco.dtx}{lco,Ni,RIGHT,LOW,head}% + \from{japanlco.dtx}{lco,Ni,RIGHT,LOW,body}% + }% + \file{KakuLL.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{japanlco.dtx}{lco,Kaku,LATE,LOW,head}% + \from{japanlco.dtx}{lco,Kaku,LATE,LOW,body}% + }% + }% + \@@input scrstrop.inc + \fi +\else + \let\endbatchfile\relax +\fi +\endbatchfile +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\usepackage{graphicx} +\begin{document} + \DocInput{japanlco.dtx} +\end{document} +% +% \fi +% +% \changes{v2.98}{2007/11/13}{first version based on lco files from Gernot +% Hassenpflug} +% \changes{v3.36}{2022/01/21}{switch over to \cls*{koma-script-source-doc}} +% \changes{v3.36}{2022/01/21}{using \cs{setplength} and \cs{addtoplength} +% instead of \cs{@setplength} and \cs{@addtoplength}} +% \changes{v3.36}{2022/02/02}{self-extracting} +% \changes{v3.36}{2022/02/02}{extended documentation} +% +% \GetFileInfo{japanlco.dtx} +% \title{\href{https://komascript.de}{\KOMAScript} \partname\ +% \texttt{\filename}} +% \date{Version \fileversion{} of \filedate} +% \author{Markus Kohm} +% \maketitle +% \tableofcontents +% +% \section{Option Files for Japanese Letters} +% +% Gernot Hassenpflug wrote a lot of \file{lco}-files for use of Japanese +% envelope formats. Markus Kohm, the author of \KOMAScript, adapted them to +% an extended version of \cls*{scrlttr2} and wrote a \file{dtx}-file with the +% moste recent \file{lco}-files. Table~\ref{tab:japan.envelopes} shows all +% \file{lco}-files of the supported envelopes with their datas. +% +% \begin{table} +% \begin{tabular}{@{}llllllll@{}} +% \hline +% \file{lco}-file & \multicolumn3{l}{Envelope} & \multicolumn4{l@{}}{Window} \\ +% & Name & Length & Width & H-pos & V-pos & Width & Height\\ +% \cline{1-3}\cline{4-8} +% \texttt{NipponEL} & +% Chou/You 3 & 235\,mm & 120\,mm & 22\,mm & 12\,mm & 90\,mm & 45\,mm \\ +% \texttt{NipponEH} & +% Chou/You 3 & 235\,mm & 120\,mm & 22\,mm & 12\,mm & 90\,mm & 55\,mm \\ +% \texttt{NipponLL} & +% Chou/You 3 & 235\,mm & 120\,mm & 25\,mm & 12\,mm & 90\,mm & 45\,mm \\ +% \texttt{NipponLH} & +% Chou/You 3 & 235\,mm & 120\,mm & 25\,mm & 12\,mm & 90\,mm & 55\,mm \\ +% \texttt{NipponEL} & +% Chou/You 4 & 205\,mm & 90\,mm & 22\,mm & 12\,mm & 90\,mm & 45\,mm \\ +% \texttt{NipponEH} & +% Chou/You 4 & 205\,mm & 90\,mm & 22\,mm & 12\,mm & 90\,mm & 55\,mm \\ +% \texttt{NipponLL} & +% Chou/You 4 & 205\,mm & 90\,mm & 25\,mm & 12\,mm & 90\,mm & 45\,mm \\ +% \texttt{NipponLH} & +% Chou/You 4 & 205\,mm & 90\,mm & 25\,mm & 12\,mm & 90\,mm & 55\,mm \\ +% \texttt{NipponRL} & +% Chou/You 4 & 205\,mm & 90\,mm & 98\,mm & 28\,mm & 90\,mm & 45\,mm \\ +% \texttt{KakuLL} & +% Kaku-kata & 312\,mm & 228\,mm & 25\,mm & 24\,mm & 90\,mm & 45\,mm \\ +% \hline +% \end{tabular} +% \caption{The supported Japanese envelopes} +% \label{tab:japan.envelopes} +% \end{table} +% +% \iftrue +% The following pages show images of example envelopes. For more information +% see the English \file{scrguien.pdf} or the German \file{scrguide.pdf}. +% +% \newcommand\japanenvelope[7]{% +% \begingroup +% \setlength{\unitlength}{1mm}%^^A +% \rotatebox{90}{\begin{picture}(#1,#2) +% \thinlines +% \put(0,0){^^A +% \framebox(#1,#2){}%^^A +% }%^^A +% \put(5,5){\texttt{#7}: #1\,mm$\times$#2\,mm (B$\times$H)}%^^A +% \csname @tempcnta\endcsname #2 +% \advance\csname @tempcnta\endcsname -#4 +% \put(0,\csname @tempcnta\endcsname){\vector(1,0){#3}}%^^A +% \put(#3,\csname @tempcnta\endcsname){\vector(-1,0){#3}}%^^A +% \put(0,\csname @tempcnta\endcsname){^^A +% \makebox(#3,\baselineskip\csname @gobble\endcsname){#3\,mm}}%^^A +% \put(#3,#2){\vector(0,-1){#4}}%^^A +% \put(#3,\csname @tempcnta\endcsname){\vector(0,1){#4}}%^^A +% \put(#3,\csname @tempcnta\endcsname){^^A +% \makebox(0,#4)[l]{~#4\,mm}} +% \advance\csname @tempcnta\endcsname -#6 +% \put(#3,\csname @tempcnta\endcsname){^^A +% \framebox(#5,#6){}%^^A +% }%^^A +% \put(#3,\csname @tempcnta\endcsname){^^A +% \makebox(0,5)[l]{~#5\,mm$\times$#6\,mm (B$\times$H)}%^^A +% }%^^A +% \end{picture}} +% \endgroup +% } +% +% \expandafter\ifx\csname rotatebox\endcsname\relax\else +% \clearpage +% \vspace*{\fill}\smash{\japanenvelope{235}{120}{22}{12}{90}{45}{Chou 3 EL}}% +% \clearpage +% \vspace*{\fill}\smash{\japanenvelope{235}{120}{22}{12}{90}{55}{Chou 3 EH}}% +% \clearpage +% \vspace*{\fill}\smash{\japanenvelope{235}{120}{25}{12}{90}{45}{Chou 3 LL}}% +% \clearpage +% \vspace*{\fill}\smash{\japanenvelope{235}{120}{25}{12}{90}{55}{Chou 3 LH}}% +% \clearpage +% \vspace*{\fill}\smash{\japanenvelope{205}{90}{22}{12}{90}{45}{Chou 4 EL}}% +% \clearpage +% \vspace*{\fill}\smash{\japanenvelope{205}{90}{22}{12}{90}{55}{Chou 4 EH}}% +% \clearpage +% \vspace*{\fill}\smash{\japanenvelope{205}{90}{25}{12}{90}{45}{Chou 4 LL}}% +% \clearpage +% \vspace*{\fill}\smash{\japanenvelope{205}{90}{25}{12}{90}{55}{Chou 4 LH}}% +% \clearpage +% \vspace*{\fill}\smash{\japanenvelope{205}{90}{98}{28}{90}{45}{Chou 4 RL}}% +% \clearpage +% \fi +%\fi +% +% \StopEventually{\PrintIndex} +% +% \section{Implementation} +% \begin{macrocode} +%<*lco> +% \end{macrocode} +% +% \subsection{The File Header} +% +% Declaration of the file. +% \begin{macrocode} +%<*head> +\ProvidesFile{% +% Nippon% +% Kaku% +% E% +% L% +% R% +% L% +% H% +}[% +%!KOMAScriptVersion +Japanese letter-class-option] +% \end{macrocode} +% +% \begin{command}{\LCOWarningNoLine} +% \begin{command}{\LCOWarning} +% We need macros that are similar to |\ClassWarningNoLine| or +% |\PackageWarningNoLine| and |\ClassWarning| or |\PackageWarning| +% \begin{macrocode} +\providecommand*\LCOWarningNoLine[2]{% + \LCOWarning{#1}{#2\@gobble}% +} +\providecommand*\LCOWarning[2]{% + \GenericWarning{% + (#1)\@spaces\@spaces\@spaces\@spaces\@spaces\@spaces\@spaces + }{% + Letter class option #1 Warning: #2% + }% +} +% +% \end{macrocode} +% \end{command} +% \end{command} +% +% +% \subsection{Main-Part} +% +% Check the class. +% \changes{v3.25a}{2018/04/17}{check not only for \cls*{scrlttr2} but also +% for \pkg*{scrletter}}%^^A +% \begin{macrocode} +%<*body> +\@ifundefined{scr@fromname@var}{% + \LCOWarningNoLine{% +% Nippon% +% Kaku% +% E% +% L% +% R% +% L% +% H% + }{% + This letter class option file was made only\MessageBreak + to be used with KOMA-Script letter class\MessageBreak + `scrlttr2' or letter package `scrletter'.\MessageBreak + Use with other classes and without that package\MessageBreak + can result in a lot of errors% + }% +}{} +% \end{macrocode} +% +% Is the expected paper size used? +% \begin{macrocode} +\LetterOptionNeedsPapersize{% +% Nippon% +% Kaku% +% E% +% L% +% R% +% L% +% H% +}{a4} +% \end{macrocode} +% +% All the values +% \begin{variable}{fromzipcode} +% \changes{v3.03}{2009/03/04}{set term of variable \texttt{fromzipcode}} +% \begin{macrocode} +\setkomavar*{fromzipcode}{J} +% \end{macrocode} +% \end{variable} +% \begin{pseudolength}{foldmarkhpos, +% tfoldmarkvpos,tfoldmarklength, +% mfoldmarkvpos,mfoldmarklength, +% bfoldmarkvpos,bfoldmarklength, +% foldmarkvpos,lfoldmarkhpos} +% The fold marks. All of them are universal for Japanese \file{lco}-files. +% \begin{macrocode} +\setplength{foldmarkhpos}{3.5mm} +\setplength{tfoldmarkvpos}{83mm} +\setplength{tfoldmarklength}{4mm} +\setplength{mfoldmarkvpos}{116mm} +\setplength{mfoldmarklength}{2mm} +\setplength{bfoldmarkvpos}{232mm} +\setplength{bfoldmarklength}{2mm} +\setplength{foldmarkvpos}{3.5mm} +\setplength{lfoldmarkhpos}{202mm} +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{toaddrhpos,toaddrvpos,toaddrwidth,toaddrheight} +% The size and position of the address window. These values are the main +% difference of the envelopes. The original values (all in cm) by Gernot: +% \begin{center} +% \begin{tabular}{lcccc} +% \hline +% Type & x & w & y & h \\ +% \hline +% NipponEL & 22 & 90 & 12 & 45 \\ +% NipponEH & 22 & 90 & 12 & 55 \\ +% NipponLL & 25 & 90 & 12 & 45 \\ +% NipponLH & 25 & 90 & 12 & 55 \\ +% NipponRL & 98 & 90 & 28 & 45 \\ +% KakuLL & 25 & 90 & 24 & 45 \\ +% \hline +% \end{tabular} +% \end{center} +% \begin{macrocode} +%\setplength{toaddrhpos}{22mm} +%\setplength{toaddrhpos}{25mm} +%\setplength{toaddrhpos}{-22mm} +\setplength{toaddrwidth}{90mm} +%\setplength{toaddrvpos}{12mm} +%\setplength{toaddrvpos}{28mm} +%\setplength{toaddrvpos}{24mm} +%\setplength{toaddrheight}{40mm} +%\setplength{toaddrheight}{50mm} +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{toaddrindent,backaddrheight, +% specialmailindent,specialmailrightindent} +% These are also inside the address window and same for all Japanese +% envelopes. +% \begin{macrocode} +\setplength{toaddrindent}{\z@} +\setplength{backaddrheight}{5mm} +\setplength{specialmailindent}{\fill} +\setplength{specialmailrightindent}{1em} +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{locwidth,locheight} +% The location field also depends on the address field. +% \begin{macrocode} +\setplength{locwidth}{\z@} +%\setplength{locheight}{55mm}% +%\setplength{locheight}{45mm}% +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{refvpos,refwidth,refaftervskip} +% While the position of the reference line also depends on the address field, +% the space below it is fix. The zero of \plen{revwidth} is a magic. See +% \file{scrkernel-notepaper.dtx} for more information. +% \begin{macrocode} +%\setplength{refvpos}{69mm} +%\setplength{refvpos}{84mm} +\setplength{refaftervskip}{\baselineskip} +\setplength{refwidth}{\z@} +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{firstheadvpos,firstheadwidth} +% The header also depends on the address field. This is the reason we have +% not defined it first, despite it is the first field. +% \begin{macrocode} +\setplength{firstheadvpos}{8mm} +\setplength{firstheadwidth}{\paperwidth} +\ifdim \useplength{toaddrhpos}>\z@ + \addtoplength[-2]{firstheadwidth}{\useplength{toaddrhpos}} +\else + \addtoplength[2]{firstheadwidth}{\useplength{toaddrhpos}} +\fi +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{firstfootwidth,firstfootvpos} +% The width of the footer depends on the width of the header. The position +% depends on the paper height. +% \begin{macrocode} +\setplength{firstfootwidth}{\useplength{firstheadwidth}} +\setplength{firstfootvpos}{\paperheight} +\addtoplength{firstfootvpos}{-16mm} +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{sigindent,sigbeforevskip} +% Values of the signature +% \begin{macrocode} +\setplength{sigindent}{\z@} +\setplength{sigbeforevskip}{2\baselineskip} +% \end{macrocode} +% \end{pseudolength} +% \begin{command}{\raggedsignature} +% The signature is centered, but maybe this should be changed to +% \cs{raggedright}? +% \begin{macrocode} +\let\raggedsignature=\centering +% \end{macrocode} +% \end{command} +% +% \begin{option}{fromalign} +% The default alignment of the sender is in the location field. +% \begin{macrocode} +\ifcase\@alignfrom + \KOMAoptions{fromalign=locationright}% +\or + \KOMAoptions{fromalign=locationright}% +\or + \KOMAoptions{fromalign=locationright}% +\fi +% \end{macrocode} +% \end{option} +% +% \begin{macrocode} +% +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/koma-script-source-doc.dtx b/macros/latex/contrib/koma-script/koma-script-source-doc.dtx new file mode 100644 index 0000000000..d0ce38ca9a --- /dev/null +++ b/macros/latex/contrib/koma-script/koma-script-source-doc.dtx @@ -0,0 +1,785 @@ +% \iffalse meta-comment +% ========================================================================== +% komascript-source.doc.dtx +% Copyright (c) Markus Kohm, 2022 +% +% 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.md. +% -------------------------------------------------------------------------- +% Note: This is a self unpacking dtx-file, so you have to run: +% tex koma-script-source-doc.dtx +% to unpack the file(s), but +% lualatex-dev koma-script-source-doc.dtx +% mkindex koma-script-source-doc +% lualatex-dev koma-script-source-doc.dtx +% mkindex koma-script-source-doc +% lualatex-dev koma-script-source-doc.dtx +% to generate the manual. Before generation of the manual it is +% recommended to install or at least unpack KOMA-Script. +% ========================================================================== +%% +%<+drv>\ProvidesFile{koma-script-source-doc.drv} +%<+class>\ProvidesClass{koma-script-source-doc} +%<*ins> +\expandafter\expandafter\expandafter\ifx\csname ProvidesFile\endcsname\relax + \def\ProvidesFile#1[#2]{} +\fi +% +%<*dtx> +\ProvidesFile{koma-script-source-doc.dtx} +% +%<+ins>\ProvidesFile{koma-script-source-doc.ins} +[2022-03-10 v0.91 KOMA-Script source documentation] +%<*dtx> +\ifx\documentclass\undefined +% +%<*ins> + \input docstrip.tex + \ifToplevel{\keepsilent\askforoverwritefalse} + \generate{% +% \file{koma-script-source-doc.drv}{% +% \from{koma-script-source-doc.dtx}{drv}% +% } +% \file{koma-script-source-doc.ins}{% +% \from{koma-script-source-doc.dtx}{ins}% +% } + \file{koma-script-source-doc.cls}{% + \from{koma-script-source-doc.dtx}{class}% + \from{scrlogo.dtx}{logo,forcedefine}% + }% + } +% +%<*dtx> +\else + \let\endbatchfile\relax +\fi +% +%<*dtx|ins> +\endbatchfile +% +%<*drv> +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{libertinus} +\usepackage{babel} +\NewDocElement[% + macrolike = false, + toplevel = true, + idxtype = \textit{d.\,i.}, + idxgroup = Documentation items, + printtype = \textit{d.\,i.}, +]{DocItem}{docitem} +\begin{document} +\DocInput{koma-script-source-doc.dtx} +\end{document} +% +% \fi^^A meta-comment +% +% \changes{v0.0}{2022/01/15}{start of the new class} +% \changes{v0.1}{2022/01/15}{first self documenting test} +% \changes{v0.6}{2022/02/02}{force definition of \KOMAScript{} logo} +% \changes{v0.6}{2022/02/02}{\pkg{hyperref} hook for \KOMAScript{} logo moved +% to \file{scrlogo.dtx}} +% +% \DoNotIndex{\actualchar} +% +% \GetFileInfo{\jobname.dtx} +% \title{\href{https://komascript.de}{\KOMAScript} Source Documentation\\ +% Using\\ +% \cls*{koma-script-source-doc}} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Version \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% From 2002 up to end of 2021 \cls*{scrdoc} was the class, that has been used +% for the sources of \KOMAScript{} and several other packages of the +% \KOMAScript{} author. This class was more or less a ugly hack to use a +% modified and extended version of \cls{ltxdoc}, the source documentation +% class of The \LaTeX{} Team. There has been advisement to redesign this +% class for years, but as changing the source documentation class is more a +% work of month than of days, I've always put it on the back burner. +% +% In January 2022, The \LaTeX{} Team switched over from \pkg{doc} version 2 to +% version 3. The new version is compatible on user interface level, but as +% expected not on implementation level. So the extensions made in \cls*{scrdoc} +% result in several error messages. For such cases The \LaTeX{} Team has the +% fallback solution to use an old \pkg{doc}. But this can only be used, if you +% load \pkg{doc} yourself using either |\usepackage| or +% |\RequirePackage|. If class \cls{ltxdoc} is used, the fallback does not +% exist. +% +% A first workaround for \cls*{scrdoc} was a typical hacker solution, that +% forces \cls{ltxdoc} to use an old version of \pkg{doc} and to fix the +% resulting issues after loading \cls{ltxdoc}. But this does only work as long +% as new releases of \cls{ltxdoc} are compatible with the \pkg{doc} release of +% 2021. +% +% So in January 2022, it was really time for a new \KOMAScript{} source +% documentation class. This new class does not use internal commands of +% \cls{ltxdoc} any longer but uses the extended interface of \pkg{doc} version +% 3 to define further documentation items. +% \end{abstract} +% +% \tableofcontents +% +% \section{Prerequisites} +% \label{sec:prerequisites} +% +% Class \cls*{koma-script-source-doc} needs at least class \cls{ltxdoc} version +% 2.1d which depends on package \pkg{doc} version 3, because it used several +% of the new features of that \pkg{doc} release. This is part of +% \texttt{latex-base-dev} 2022-06-01 pre-release~1 distributed on +% \href{https://www.ctan.org}{CTAN} on 14th January 2022 and therefore will be +% part of \LaTeX{} 2022-06-01. If you still use an older \LaTeX{} you cannot +% use class \cls*{koma-script-source-doc}. +% +% +% \section{Basic Settings} +% \label{sec:basicsettings} +% +% For \KOMAScript{} we use some basic settings: +% \begin{itemize} +% \item Generation of the indexing of new commands is generally enabled by +% \pkg{doc}. We do not use \cs{EnableCrossrefs}, because this would not +% allow to disable this feature using \cs{DisableCrossrefs}. It is also +% recommended not to generally use \cs{EnableCrossrefs} in the +% \file{dtx}-file. +% \item We use \cs{CodeLineIndex} to have code line numbers for the +% indexing. This could be problematic sometimes. In this case, you should +% use \cs{PageIndex} and \cs{CodelineNumbered} to use page numbers in the +% index but nevertheless add line numbers to the code. +% \item For \KOMAScript{} code we usually record the changes. So we use +% \cs{RecordChanges} and option \opt{reportchangedates} This is the only +% real changelog we do. However, if your \file{dtx}-file contains the user +% manual, it would be recommended to list the main changes like new features +% and incompatibilities as a section either at the very beginning or the end +% of the user manual. +% \item \DescribeOption{indexlatex} For \KOMAScript{} sources I do not like to +% index all the \LaTeX{} interface commands and internal +% commands\footnote{This does only work for those \LaTeX{} macros, already +% internally listed. The list should be generated automatically after each +% \LaTeX{} release. Unfortunately, currently it is build step by step with +% every new \KOMAScript{} release instead.}. You can changes this, using +% option \opt{indexlatex}. You can also use explicit \opt{indexlatex=false} +% to again not index the \LaTeX{} kernel macros. +% \item You also should use \cs{GetFileInfo}\marg{dtx-filename} to get +% information like \cs{filedate} and \cs{fileversion} from the +% \cs{ProvidesFile} command of the \file{dtx}-file. Sometimes it may even be +% better to use the generated package or class as argument. +% \end{itemize} +% +% +% \section{Simple Formatting Commands} +% \label{sec:simpleformatting} +% +% \DescribeCommand{\file} +% \DescribeCommand{\opt} +% \DescribeCommand{\optvalue} +% \DescribeCommand{\env} +% \DescribeCommand{\cnt} +% \DescribeCommand{\fnt} +% \DescribeCommand{\len} +% \DescribeCommand{\var} +% \DescribeCommand{\plen} +% \DescribeCommand{\pstyle} +% \DescribeCommand{\dhook} +% There are some very simple formatting commands. They all expect one +% mandatory argument \meta{object name}. The default formatting is to use +% \cs{texttt}. The commands are mentioned for the name of a file, option, +% value of an option, environment, \LaTeX{} counter, font, length (either +% dimension or skip), variable (usually \KOMAScript{} variables used by +% \cls*{scrlttr2} or \pkg*{scrletter}), pseudo-length (of \cls*{scrlttr2} or +% \pkg*{scrletter}), page style, or do hook. +% +% \DescribeCommand{\cls} +% \DescribeCommand{\pkg} +% The commands: +% \begin{quote} +% \cs{cls}\oarg{hyper link}\marg{package name}\hfill and\hfill +% \cs{pkg}\oarg{hyper link}\marg{class name} +% \end{quote} +% do not only print the name of a class or package, but also generate a hyper +% link. For this the commands have a first optional argument. If this is +% empty, no link will be generated. If it is not empty, it has to be the +% link. If it is not used an automatic package link to the +% \href{https://www.ctan.org/pkg}{CTAN} package with the same name will be +% generated. There are also star variants \cs{cls*} and \cs{pkg*}, that do not +% produce any link. For links with special characters like \texttt{\char`\#} +% it is recommended to use \cs{href} and the star variant. +% \begin{center} +% Examples:\hspace{0pt plus 1filll}\null\\[-\baselineskip] +% \cs{cls}|{scrbook}| \textrightarrow{} \cls{scrbook}\\ +% \cs{cls*}|{scrbook}| \textrightarrow{} \cls*{scrbook}\\ +% \cs{cls}|[https://koma-script.de]{koma-script-source-doc}| +% \textrightarrow{} \cls[https://koma-script.de]{koma-script-source-doc}\\ +% \cs{pkg}|[]{scrlayer}| \textrightarrow{} \pkg[]{scrlayer} \\ +% \cs{href}|{http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguien.pdf#cha:typearea}{\pkg*{typearea}}| +% \textrightarrow{} +% \href{http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguien.pdf#chapter.2}{\pkg*{typearea}} +% \end{center} +% +% \MaybeStop{\PrintIndex} +% +% \section{Implementation} +% +% \begin{macrocode} +%<*class> +% \end{macrocode} +% +% \subsection{Class Options} +% +% We use \pkg{l3keys2e} for the options. Using \pkg*{scrkbase} would be nice +% too, but it cannot be used until \KOMAScript{} is available, to the +% emergency fallback to using the standard class \cls*{article} wouldn't make +% sense in this case. +% \begin{macrocode} +\RequirePackage{l3keys2e} +\ExplSyntaxOn +% \end{macrocode} +% \begin{option}{indexlatex} +% \changes{v0.3}{2022/01/17}{new option} +% The option to switch on/off the indexing of \LaTeX{} interface and internal +% macros (and also \TeX{} primitives). The pre-setting is \texttt{false}. The +% default of the option is \texttt{true}. +% \begin{macrocode} +\newif \ifkdoc@indexlatex \kdoc@indexlatexfalse +\keys_define:nn {kdoc} + { + indexlatex .choice:, + indexlatex / true .code:n = { \legacy_if_set_true:n { kdoc@indexlatex } }, + indexlatex / false .code:n = { \legacy_if_set_false:n { kdoc@indexlatex } }, + indexlatex .default:n = { true }, + } +% \end{macrocode} +% \end{option} +% \begin{macrocode} +\ExplSyntaxOff +\ProcessKeysOptions {kdoc} +% \end{macrocode} +% +% +% \subsection{Base Class and Packages} +% +% \changes{v0.2}{2022/01/16}{emergency fallback to \cls*{article}} +% \changes{v0.3}{2022/01/17}{new basic defaults} +% \changes{v0.3}{2022/01/17}{\cs{DoNotIndex} of several \LaTeX{} kernel +% macros} +% \changes{v0.3a}{2022/01/21}{using an old \pkg{doc} is fatal} +% Currently we use base class \cls{ltxdoc} at least version 2021/12/07 +% v2.1d. In future this could change. In this case we would need to load +% package \pkg{doc} at least version 2022/06/01 v3.0g. However, we also want +% \cls{ltxdoc} to use \KOMAScript{} class \cls*{scrartcl} instead of standard +% class \cls*{article}. But if \KOMAScript{} has not been made, we cannot use +% a \KOMAScript{} class or package to compile the source. So in this case +% we use an emergency fallback. +% \begin{macrocode} +\IfFileExists{scrartcl.cls}{% + \declare@file@substitution{article.cls}{scrartcl.cls} + \PassOptionsToClass{fontsize=10pt}{scrartcl} +}{% + \ClassWarningNoLine{koma-script-source-doc}{% + Usually this class should be used with KOMA-Script\MessageBreak + scrartcl. But as that class is not available we use\MessageBreak + standard class article as emergency fallback.\MessageBreak + It is recommended to repeat this LaTeX run after\MessageBreak + build/installation of a complete KOMA-Script% + }% +} +\LoadClassWithOptions{ltxdoc}[2021/12/07] +\IfPackageAtLeastTF{doc}{2022/06/01}{}{% + \ClassError{koma-script-source-doc}{old package `doc' detected}{% + This class needs `doc' v3. It cannot be used with\MessageBreak + `doc' v2. `doc' v3 is available at LaTeX developer\MessageBreak + release from at least January 2022}% + \csname fi\endcsname\csname @@end\endcsname\end\endinput +} +\SetupDoc{reportchangedates} +\CodelineIndex +\RecordChanges +\ifkdoc@indexlatex\else + \DoNotIndex{\.,\\,\ ,\@,\@Alph,\@M} + \DoNotIndex{\@abstrtfalse,\@abstrttrue,\@addtoreset,\@afterheading} + \DoNotIndex{\@afterindentfalse,\@alph,\@arabic} + \DoNotIndex{\@beginparpenalty} + \DoNotIndex{\@car,\@cdr,\@centercr} + \DoNotIndex{\@dblfloat,\@dotsep} + \DoNotIndex{\@dottedtocline,\@empty,\@endparpenalty} + \DoNotIndex{\@float,\@fontswitch} + \DoNotIndex{\@gobbletwo} + \DoNotIndex{\@hangfrom,\@highpenalty} + \DoNotIndex{\@ifnextchar,\@ifundefined,\@itempenalty} + \DoNotIndex{\@latex@warning} + \DoNotIndex{\@m,\@medpenalty,\@minus,\@mkboth,\@mparswitchfalse} + \DoNotIndex{\@mparswitchtrue} + \DoNotIndex{\@ne,\@nil,\@nobreakfalse,\@nobreaktrue,\@nomath} + \DoNotIndex{\@plus} + \DoNotIndex{\@Roman,\@roman} + \DoNotIndex{\@tempa,\@tempcnta,\@tempdima,\@tempskipka} + \DoNotIndex{\@tempswafalse,\@tempswatrue} + \DoNotIndex{\@tempb,\@tempcntb,\@tempdimb,\@tempskipkb} + \DoNotIndex{\@tempswbfalse,\@tempswbtrue} + \DoNotIndex{\@tempc,\@tempcntc,\@tempdimc,\@tempskipkc} + \DoNotIndex{\@tocrmarg,\@topnewpage,\@topnum,\@twocolumnfalse} + \DoNotIndex{\@twocolumntrue,\@twosidefalse,\@twosidetrue} + \DoNotIndex{\@whiledim,\@whilenum} + \DoNotIndex{\addcontentsline,\addpenalty,\addtocontents,\addtolength} + \DoNotIndex{\addvspace,\advance,\AtBeginDocument} + \DoNotIndex{\begin,\begingroup,\bfseries,\box,\bullet} + \DoNotIndex{\c@figure,\c@page,\c@secnumdepth,\c@table,\c@tocdepth} + \DoNotIndex{\cdot,\centering,\changes,\cleardoublepage,\clearpage} + \DoNotIndex{\cmd,\col@number,\CurrentOption,\CodelineIndex,\cs} + \DoNotIndex{\day,\dblfloatpagefraction,\dbltopfraction} + \DoNotIndex{\declare@file@substitution} + \DoNotIndex{\DeclareOldFontCommand,\DeclareOption,\def,\DisableCrossrefs} + \DoNotIndex{\divide,\DoNotIndex} + \DoNotIndex{\ifdim,\else,\fi,\empty,\em,\EnableCrossrefs,\end} + \DoNotIndex{\end@dblfloat} + \DoNotIndex{\end@float,\endgroup,\endlist,\endquotation,\endtitlepage} + \DoNotIndex{\everypar,\ExecuteOptions,\expandafter} + \DoNotIndex{\fboxrule,\fboxsep} + \DoNotIndex{\g@addto@macro,\gdef,\global} + \DoNotIndex{\hangindent,\hbox,\hfil,\hrule,\hsize,\hskip,\hspace,\hss} + \DoNotIndex{\if@tempswa,\ifcase,\or,\fi,\fi} + \DoNotIndex{\ifnum,\ifodd,\ifx,\fi,\fi,\fi} + \DoNotIndex{\include,\input,\InputIfFileExists,\item,\itshape} + \DoNotIndex{\kern,\kernel@ifnextchar} + \DoNotIndex{\leavevmode,\leftmark,\leftskip,\let,\lineskip} + \DoNotIndex{\list,\long,\LoadClass,\LoadClassWithOptions} + \DoNotIndex{\m@ne,\m@th,\marginpar,\markboth,\markright,\mathbf,\mathcal} + \DoNotIndex{\mathit,\mathnormal,\mathrm,\mathsf,\mathtt,\MessageBreak} + \DoNotIndex{\month} + \DoNotIndex{\newblock,\newcommand,\newcount,\newcounter,\newdimen} + \DoNotIndex{\newenvironment,\newlength,\newpage,\nobreak,\noindent} + \DoNotIndex{\normalfont,\normallineskip,\normalsize,\null,\number} + \DoNotIndex{\numberline,\normalcolor} + \DoNotIndex{\OldMakeindex,\OnlyDescription,\overfullrule} + \DoNotIndex{\p@,\PackageError,\PackageInfo,\PackageWarningNoLine} + \DoNotIndex{\pagenumbering,\pagestyle,\par,\paragraph,\parbox} + \DoNotIndex{\PassOptionsToPackage,\pcal,\penalty,\pmit,\PrintChanges} + \DoNotIndex{\PrintIndex,\ProcessOptions,\protect,\providecommand} + \DoNotIndex{\ProvidesClass} + \DoNotIndex{\raggedbottom,\raggedleft,\raggedright,\refstepcounter,\relax} + \DoNotIndex{\renewcommand,\RenewDocElement,\RequirePackage} + \DoNotIndex{\reserved@a,\reserved@b,\reserved@c,\reset@font} + \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rmfamily} + \DoNotIndex{\scshape,\secdef,\setbox,\setcounter,\setlength} + \DoNotIndex{\settowidth,\sfcode,\sffamily,\skip,\sloppy,\slshape,\space} + \DoNotIndex{\string} + \DoNotIndex{\TeX,\textbf,\textit,\textrm,\textsf,\texttt,\textup} + \DoNotIndex{\the,\thispagestyle,\triangleright,\ttfamily} + \DoNotIndex{\twocolumn,\typeout} + \DoNotIndex{\undefined,\usecounter} + \DoNotIndex{\vfil,\vfill,\vspace} + \DoNotIndex{\wd,\xdef,\year,\z@} +\fi +% \end{macrocode} +% +% \changes{v0.2}{2022/01/16}{do not fail if \pkg*{typearea} has not been +% loaded} +% The left margin is highly used, but the right margin is not. So it is a kind +% of \opt{mpinclude} but with the left instead of the right margin. A simple +% solution for this is to move the whole page content to the right. But we do +% so only, if \cls*{koma-script-source-doc} is used with \cls*{scrartcl}. +% \begin{macrocode} +\ifdefined\AfterCalculatingTypearea + \AfterCalculatingTypearea{% + \addtolength{\oddsidemargin} + {.5\dimexpr\oddsidemargin+1in\relax}% + \setlength{\marginparwidth} + {\dimexpr \oddsidemargin+1in-2\marginparsep\relax}% + \setlength{\marginparpush}{0pt}% + } + \KOMAoption{DIV}{9} +\fi +% \end{macrocode} +% +% Because \pkg{doc} uses a late hook to load \pkg{hyperref} there may be a +% problem with package \pkg{auxhook} used by \pkg{hyperref}. So we load it +% early to avoid such problems. +% \begin{macrocode} +\RequirePackage{auxhook} +% \end{macrocode} +% +% +% \begin{macro}{\index@prologue,\glossary@prologue} +% \changes{v0.5}{2022/01/31}{generating ToC entry} +% \begin{macro}{\kssd@section@hack} +% \changes{v0.5}{2022/01/31}{new} +% We want to have an entry to the table of contents for the index and the +% glossary. So we patch the default prologues. This is not a perfect solution, +% but it works and makes it possible to still define a complete new prologue +% using \cs{IndexPrologue} resp. \cs{GlossaryPrologue} as documented for +% \pkg{doc}. +% \begin{macrocode} +\expandafter\def\expandafter\index@prologue\expandafter{% + \expandafter\kssd@section@hack\index@prologue} +\expandafter\def\expandafter\glossary@prologue\expandafter{% + \expandafter\kssd@section@hack\glossary@prologue} +\newcommand*{\kssd@section@hack}{% + \let\ksdd@markboth\markboth + \def\markboth##1##2{% + \@ifundefined{addsectiontocentry}{% + \@ifundefined{addxcontentsline}{% + \addcontentsline{toc}{section}{\numberline{}##1}% + }{% + \addxcontentsline{toc}{section}{##1}% + }% + }{% + \addsectiontocentry{}{##1}% + }% + \let\markboth\ksdd@markboth + \markboth{##1}{##2}% + }% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \subsection{Simple Formatting Macros} +% +% These are very simply defined macros for names of +% \begin{command}{\file} +% files, +% \begin{macrocode} +\newcommand*{\file}{\texttt} +% \end{macrocode} +% \begin{command}{\cls} +% \changes{v0.8}{2022/02/08}{using \cs{textsf}} +% \changes{v0.9}{2022/02/09}{using \cs{pkg} for automatic link generation} +% classes, +% \begin{macrocode} +\newcommand*{\cls}{\pkg} +% \end{macrocode} +% \begin{command}{\pkg} +% \changes{v0.8}{2022/02/08}{using \cs{textsf}} +% \changes{v0.9}{2022/02/09}{automatic link generation} +% packages (note: we cannot use \cs{ExplSyntaxOn}/\cs{ExplSyntaxOff}, because +% \cs{href} would generate a file link), +% \begin{macrocode} +\NewDocumentCommand{\pkg}{sO{https://www.ctan.org/pkg/#3}m}{% + \IfBooleanTF{#1}{\@gobble}{% + \csname tl_if_blank:nTF\endcsname{#2}{\@gobble}{\href}% + }% + {#2}{\textsf{#3}}% +} +% \end{macrocode} +% \begin{command}{\opt} +% options, +% \begin{macrocode} +\newcommand*{\opt}{\texttt} +% \end{macrocode} +% \begin{command}{\optvalue} +% option values, +% \begin{macrocode} +\newcommand*{\optvalue}{\texttt} +% \end{macrocode} +% \begin{command}{\env} +% environments, +% \begin{macrocode} +\newcommand*{\env}{\texttt} +% \end{macrocode} +% \begin{command}{\len} +% \changes{v0.6}{2022/02/02}{added} +% lengths, +% \begin{macrocode} +\newcommand*{\len}{\cs} +% \end{macrocode} +% \begin{command}{\cnt} +% counters, +% \begin{macrocode} +\newcommand*{\cnt}{\texttt} +% \end{macrocode} +% \begin{command}{\fnt} +% fonts, +% \begin{macrocode} +\newcommand*{\fnt}{\texttt} +% \end{macrocode} +% \begin{command}{\var} +% \changes{v0.6}{2022/02/02}{added} +% variables, +% \begin{macrocode} +\newcommand*{\var}{\texttt} +% \end{macrocode} +% \begin{command}{\plen} +% \changes{v0.6}{2022/02/02}{added} +% pseudo-lengths, +% \begin{macrocode} +\newcommand*{\plen}{\texttt} +% \end{macrocode} +% \begin{command}{\pstyle} +% \changes{v0.8}{2022/02/08}{added} +% page styles, +% \begin{macrocode} +\newcommand*{\pstyle}{\texttt} +% \end{macrocode} +% \begin{command}{\dhook} +% \changes{v0.91}{2022/03/10}{added} +% do hooks. +% \begin{macrocode} +\newcommand*{\dhook}{\texttt} +% \end{macrocode} +% \end{command} +% \end{command} +% \end{command} +% \end{command} +% \end{command} +% \end{command} +% \end{command} +% \end{command} +% \end{command} +% \end{command} +% \end{command} +% \end{command} +% \end{command} +% +% +% \subsection{Documentation Items} +% \label{sec:documentationitems} +% +% \KOMAScript{} has several additional items beside macros and environments. +% The old \cls*{scrdoc} class provides macros, environments, options, lengths, +% counters, variables and fonts. But now we also distinguish internal macros +% vs. users commands and internal lengths vs. user lengths. In this +% documentation we additionally provide documentation items. +% +% \begin{docitem}{Macro} +% \begin{command}{\DescribeMacro} +% \begin{environment}{macro} +% An internal macro. +% \begin{macrocode} +\RenewDocElement[% + macrolike = true, + toplevel = false, + idxtype = , + idxgroup = TeX macros (internal)\actualchar\TeX{} macros (internal), + printtype = \textit{intern} +]{Macro}{macro} +% \end{macrocode} +% \end{environment} +% \end{command} +% \end{docitem} +% +% \begin{docitem}{Command} +% \begin{command}{\DescribeCommand} +% \begin{environment}{command} +% User command. +% \begin{macrocode} +\NewDocElement[% + macrolike = true, + toplevel = true, + idxtype = , + idxgroup = Commands, + printtype = , +]{Command}{command} +% \end{macrocode} +% \end{environment} +% \end{command} +% \end{docitem} +% +% \begin{docitem}{Env} +% \begin{command}{\DescribeEnv} +% \begin{environment}{environment} +% Environments. +% \begin{macrocode} +\RenewDocElement[% + macrolike = false, + toplevel = true, + idxtype = \textit{env.} , + idxgroup = Environments, + printtype = \textit{env.} +]{Env}{environment} +% \end{macrocode} +% \end{environment} +% \end{command} +% \end{docitem} +% +% \begin{docitem}{Option} +% \begin{command}{\DescribeOption} +% \begin{environment}{option} +% Options. +% \begin{macrocode} +\NewDocElement[% + macrolike = false, + toplevel = true, + idxtype = \textit{opt.}, + idxgroup = Options, + printtype = \textit{opt.} +]{Option}{option} +% \end{macrocode} +% \end{environment} +% \end{command} +% \end{docitem} +% +% \begin{docitem}{ILength} +% \begin{command}{\DescribeILength} +% \begin{environment}{ilength} +% An internal length. +% \begin{macrocode} +\NewDocElement[% + macrolike = true, + toplevel = false, + idxtype = , + idxgroup = Lengths (internal), + printtype = \textit{ilen.} +]{ILength}{ilength} +% \end{macrocode} +% \end{environment} +% \end{command} +% \end{docitem} +% +% \begin{docitem}{Length} +% \begin{command}{\DescribeLength} +% \begin{environment}{length} +% User length. +% \begin{macrocode} +\NewDocElement[% + macrolike = true, + toplevel = true, + idxtype = \textit{len.}, + idxgroup = Lengths (user), + printtype = \textit{len.}, +]{Length}{length} +% \end{macrocode} +% \end{environment} +% \end{command} +% \end{docitem} +% +% \begin{docitem}{Counter} +% \begin{command}{\DescribeCounter} +% \begin{environment}{counter} +% User counter. +% \begin{macrocode} +\NewDocElement[% + macrolike = false, + toplevel = true, + idxtype = \textit{cnt.}, + idxgroup = Counters, + printtype = \textit{cnt.}, +]{Counter}{counter} +% \end{macrocode} +% \end{environment} +% \end{command} +% \end{docitem} +% +% \begin{docitem}{KOMAfont} +% \begin{command}{\DescribeKOMAfont} +% \begin{environment}{fontelement} +% \KOMAScript{} font element +% \begin{macrocode} +\NewDocElement[% + macrolike = false, + toplevel = true, + idxtype = \textit{font}, + idxgroup = KOMA-Script font elements\actualchar\KOMAScript{} font elements, + printtype = \textit{font}, +]{KOMAfont}{fontelement} +% \end{macrocode} +% \end{environment} +% \end{command} +% \end{docitem} +% +% \begin{docitem}{KOMAvar} +% \begin{command}{\DescribeKOMAvar} +% \begin{environment}{variable} +% \KOMAScript{} variable (used by \cls*{scrlttr2} and \pkg*{scrletter}). +% \begin{macrocode} +\NewDocElement[% + macrolike = false, + toplevel = true, + idxtype = \textit{var.}, + idxgroup = KOMA-Script variables\actualchar\KOMAScript{} variables, + printtype = \textit{var.}, +]{KOMAvar}{variable} +% \end{macrocode} +% \end{environment} +% \end{command} +% \end{docitem} +% +% \begin{docitem}{PLength} +% \changes{v0.6}{2022/02/02}{added} +% \begin{command}{\DescribePLength} +% \changes{v0.6}{2022/02/02}{added} +% \begin{environment}{peudolength} +% \changes{v0.6}{2022/02/02}{added} +% \KOMAScript{} pseudo-lengths (used by \cls*{scrlttr2} and \pkg*{scrletter}). +% \begin{macrocode} +\NewDocElement[% + macrolike = false, + toplevel = true, + idxtype = \textit{plen.}, + idxgroup = KOMA-Script pseudo-lengths\actualchar\KOMAScript{} pseudo-lengths, + printtype = \textit{plen.}, +]{PLength}{pseudolength} +% \end{macrocode} +% \end{environment} +% \end{command} +% \end{docitem} +% +% \begin{docitem}{PageStyle} +% \changes{v0.8}{2022/02/08}{added} +% \begin{command}{\DescribePageStyle} +% \changes{v0.8}{2022/02/08}{added} +% \begin{environment}{pgstyle} +% \changes{v0.8}{2022/02/08}{added} +% Page style. +% \begin{macrocode} +\NewDocElement[% + macrolike = false, + toplevel = true, + idxtype = \textit{pgstyle}, + idxgroup = page styles, + printtype = \textit{style} +]{PageStyle}{pgstyle} +% \end{macrocode} +% \end{environment} +% \end{command} +% \end{docitem} +% +% \begin{docitem}{DoHook} +% \changes{v0.91}{2022/03/10}{added} +% \begin{command}{\DescribeDoHook} +% \changes{v0.91}{2022/03/10}{added} +% \begin{environment}{dohook} +% \changes{v0.91}{2022/03/10}{added} +% Page style. +% \begin{macrocode} +\NewDocElement[% + macrolike = false, + toplevel = true, + idxtype = \textit{do hook}, + idxgroup = do hooks, + printtype = \textit{dohook} +]{DoHook}{dohook} +% \end{macrocode} +% \end{environment} +% \end{command} +% \end{docitem} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/lppl-de.txt b/macros/latex/contrib/koma-script/lppl-de.txt new file mode 100644 index 0000000000..68a3adcce9 --- /dev/null +++ b/macros/latex/contrib/koma-script/lppl-de.txt @@ -0,0 +1,470 @@ +Diese Uebersetzung wird mit der Absicht angeboten, das Verstaendnis der LaTeX +Project Public License (LPPL) zu erleichtern. Es handelt sich jedoch nicht um +eine offizielle oder im rechtlichen Sinne anerkannte Uebersetzung. + +Das LaTeX3 Project ist nicht der Herausgeber dieser Uebersetzung, und sie hat +diese Uebersetzung auch nicht als rechtskraeftigen Ersatz fuer die +Original-LPPL anerkannt. Da die Uebersetzung nicht sorgfaeltig von Anwaelten +ueberprueft wurde, koennen die Uebersetzer nicht garantieren, dass die +Uebersetzung die rechtlichen Aussagen der LPPL exakt wiedergibt. Wenn Sie +sichergehen wollen, dass von Ihnen geplante Aktivitaeten im Sinne der LPPL +gestattet sind, halten Sie sich bitte an die englischsprachige +Originalversion. + +Das LaTeX3 Project moechte Sie darum bitten, diese Uebersetzung nicht als +offizielle Lizenzbedingungen fuer von Ihnen geschriebene Programme zu +verwenden. Bitte benutzen Sie hierfuer stattdessen die von dem LaTeX3 Project +herausgegebene englischsprachige Originalversion. + +This is a translation of the LaTeX Project Public License (LPPL) into German. +This translation is distributed in the hope that it will facilitate +understanding, but it is not an official or legally approved translation. + +The LaTeX3 Project is not the publisher of this translation and has not +approved it as a legal substitute for the authentic LaTeX Project Public +License. The translation has not been reviewed carefully by lawyers, and +therefore the translator cannot be sure that it exactly represents the legal +meaning of the LaTeX Project Public License. If you wish to be sure whether +your planned activities are permitted by the LaTeX Project Public License, +please refer to the authentic English version. + +The LaTeX3 Project strongly urges you not to use this translation as the +official distribution terms for your programs; instead, please use the +authentic English version published by the LaTeX3 Project. + +------------------------------------------------------------------------------- + +Inhalt + + • VORWORT + • DEFINITIONEN + • BEDINGUNGEN FUeR DIE VERTEILUNG UND VERAeNDERUNG + • KEINE GEWAeHRLEISTUNG + • BETREUUNG DES WERKES + • OB UND WIE EIN WERK UNTER DIESER LIZENZ VERTEILT WIRD + +Deutsche Uebersetzung der LPPL Version 1.3c 2006-05-20 +Uebersetzt durch Markus Kohm. + +Copyright 1999 2002-2009 LaTeX3 Project + +Jeder hat das Recht, die Lizenzurkunde und diese Uebersetzung zu +vervielfaeltigen und unveraenderte Kopien zu verbreiten; Aenderungen sind +jedoch nicht gestattet. + +Diese Uebersetzung ist kein rechtskraeftiger Ersatz fuer die englischsprachige +Originalversion! + + +VORWORT + +Die LaTeX Project Public License (LPPL) ist die Grundlizenz unter der der +LaTeX Kern und die Standard LaTeX Pakete verteilt werden. + +Sie koennen diese Lizenz fuer jedes Werk verwenden, dessen Rechte-Inhaber Sie +sind und das sie verteilen wollen. Diese Lizenz mag besonders nuetzlich sein, +wenn Ihr Werk einen Bezug zu TeX hat (wie ein LaTeX Paket), aber Sie wurde auf +eine Art und Weise geschrieben, dass sie sogar dann verwendet werden kann, +wenn Ihr Werk keinen Bezug zu TeX hat. + +Der Abschnitt `OB UND WIE EIN WERK UNTER DIESER LIZENZ VERTEILT WIRD', unten, +liefert Informationen, Beispiele und Empfehlungen fuer Autoren die erwaegen +ihr Werk unter dieser Lizenz zu verteilen. + +Diese Lizenz legt Bedingungen fest, unter denen ein Werk verteilt und +veraendert werden darf, ebenso wie Bedingungen unter denen eine veraenderte +Version des Werks verteilt werden darf. + +Wir, das LaTeX3 Project, glauben, dass die unten genannten Bedingungen Ihnen +die Freiheit bieten eine veraenderte Version Ihres Werks zu erstellen und zu +verteilen, die jede gewuenschte technische Spezifikation erfuellt, waehrend +die Verfuegbarkeit, Unversehrtheit und Zuverlaessigkeit dieses Werks bewahrt +wird. Wenn Ihnen nicht klar ist, wie Sie ihr Ziel unter Einhaltung dieser +Bedingungen erreichen koennen, koennen Sie dazu in den Dokumenten +`cfgguide.tex' und `modguide.tex' in der Standard-LaTeX-Verteilung Vorschlaege +nachlesen. + + +DEFINITIONEN + +In diesem Lizenzdokument werden folgende Begriffe verwendet: + +`Werk' + Jegliches Werk, das unter dieser Lizenz verteilt wird. +`Abgeleitetes Werk' + Jegliches Werk das nach geltendem Recht von dem Werk abgeleitet wurde. +`Veraenderung' + Jeglicher Prozess, der nach geltendem Recht ein abgeleitetes Werk schafft, + – beispielsweise die Erstellung einer Datei, die eine mit dem Werk + verbundene Datei oder einen nennenswerten Teil einer solchen Datei + enthaelt, sei es unveraendert oder mit Veraenderungen und/oder + Uebersetzungen in eine andere Sprache. Das Ausfuehren eines Prozesses, der + nach geltendem Recht ein abgeleitetes Werk erzeugt. +`Verteilung' + Kopien des Werkes im Ganzen oder in Teilen von einer Person fuer eine + andere verfuegbar machen. Verteilung schliesst die Bereitstellung + irgendeines elektronischen Teils des Werks ueber + Datei-Austausch-Protokolle wie FTP oder HTTP oder verteilte Dateisysteme + wie Suns Netzwerk-Datei-System (NFS) ein (ist jedoch nicht darauf + beschraenkt). +`Kompiliertes Werk' + Eine Version des Werks die in eine Form ueberfuehrt wurde, in der es auf + einem Computer-System direkt verwendbar ist. Dieser Prozess der + Ueberfuehrung kann die Verwendung von Installations-Einrichtungen, die vom + Werk zur Verfuegung gestellt werden, Umwandlungen des Werks, das Kopieren + von Teilen des Werks und andere Aktivitaeten einschliessen. Beachten Sie, + dass Veraenderungen irgendeiner Installations-Einrichtung, die vom Werk zur + Verfuegung gestellt wird, Veraenderung des Werks selbst nach sich zieht. +`Aktueller Betreuer' + Eine Person oder Personen, die im Werk als solche benannt ist oder benannt + sind. Wenn keine solche explizite Benennung vorhanden ist, so ist es der + Rechte-Inhaber nach geltendem Recht. +`Standard-Interpreter' + Ein Programm oder Prozess, der normalerweise fuer die Ausfuehrung oder + Interpretierung eines Teils oder des ganzen Werks benoetigt wird. + + Ein Standard-Interpreter kann von externen Teilen abhaengen, aber diese + sind nicht als Teil des Standard-Interpreters zu betrachten, solange jeder + externe Teil sich selbst bei interaktiver Nutzung deutlich identifiziert. + Solange bei der Anwendung der Lizenz auf das Werk nicht explizit anderes + erklaert ist, ist der einzige anwendbare Standard-Interpreter ein + `LaTeX-Format', bzw. im Falle von Dateien die zum `LaTeX-Format' selbst + gehoeren, ein Progamm welches die `TeX-Sprache' implementiert. + + +BEDINGUNGEN FUER DIE VERTEILUNG UND VERAENDERUNG + + 1. Andere Aktivitaeten als die Verteilung und/oder Veraenderung des Werks sind + nicht von dieser Lizenz betroffen; sie liegen ausserhalb ihres + Anwendungsbereiches. Insbesondere ist die Taetigkeit des Ausfuehrens des + Werks nicht beschraenkt und es sind keine Bedingungen geknuepft, + irgendwelche Hilfe fuer das Werk anzubieten. + 2. Sie duerfen eine vollstaendige, unveraenderte Kopie des Werkes, so wie Sie + es erhalten haben, verteilen. Verteilungen von Teilen des Werkes werden als + Veraenderungen des Werkes betrachtet, und es kann kein Recht zur Verteilung + eines solchen Abgeleiteten Werkes aus dieser Regel abgeleitet werden. + 3. Sie duerfen ein Kompiliertes Werk, das aus einer vollstaendigen, + unveraenderten Kopie des Werkes erzeugt wurde, nach vorstehender Regel 2 + verteilen, solange das Kompilierte Werk in einer Art und Weise verteilt + wird, dass die Empfaenger das Abgeleitete Werk in genau der Weise + installieren koennen, in der sie es installieren wuerden, wenn sie selbst + das Abgeleitete Werk direkt aus dem Werk erzeugt haetten. + 4. Wenn Sie der Aktuelle Betreuer des Werks sind, koennen Sie, ohne + Beschraenkung das Werk veraendern und so ein Abgeleitetes Werk + schaffen. Sie duerften ebenso das Abgeleitete Werk ohne Einschraenkungen + verteilen, einschliesslich Kompilierter Werke, die aus Abgeleiteten Werken + geschaffen wurden. Abgeleitete Werke, die in dieser Weise vom Akuellen + Betreuer verteilt werden, sind als aktualisierte Versionen des Werks zu + verstehen. + 5. Wenn Sie nicht der Aktuelle Betreuer des Werkes sind, duerfen Sie Ihre + Kopie des Werkes veraendern und so ein Abgeleitetes Werk auf Grundlage des + Werkes schaffen, das Abgeleitete Werk kompilieren und so ein Kompiliertes + Werk auf Grundlage des Abgeleiteten Werkes schaffen. + 6. Wenn Sie nicht der Aktuelle Betreuer des Werkes sind, duerfen Sie ein + Abgeleitetes Werk verteilen, solange die folgenden Bedingungen fuer jeden + Teil des Werkes eingehalten werden, solange nicht fuer diesen Teil im + Rechte-Hinweis deutlich gemacht ist, dass dieser Teil von diesen + Bedingungen ausgenommen ist. Nur der Aktuelle Betreuer ist befugt solch + eine Ausnahmeregelung fuer einen Teil des Werkes zu erlassen. + 1. Wenn Teile des Abgeleiteten Werkes bei Nutzung mit dem + Standard-Interpreter eine direkte Ersetzung von Teilen des Werkes sein + koennen, dann muss der Ersetzungs-Teil aus dem Abgeleiteten Werk, wann + immer dieser Teil des Werks sich selbst gegenueber dem Anwender bei der + interaktiven Verwendung mit dem Standard-Interpreter identifiziert, + sich gegenueber dem Anwender klar und unmissverstaendlich selbst als + eine veraenderte Version dieses Teils identifizieren. + 2. Jeder Teil des Abgeleiteten Werks enthaelt einen deutliche Hinweis auf + die genaue Natur der Aenderungen an diesem Teil oder einen deutlichen + Verweis auf eine andere Datei, die als Teil des Abgeleiteten Werks + verteilt wird und eine vollstaendige und genaue Liste der Aenderungen + enthaelt. + 3. Das Abgeleitete Werk enthaelt keine Aussagen aus denen man schliessen + kann, dass irgendeine Person, einschliesslich (aber nicht beschraenkt + auf den) des Autors der Original-Version des Werkes, irgendwelche + Unterstuetzung, einschliesslich (aber nicht beschraenkt auf) Meldung + und Behandlung von Fehlern, gegenueber den Empfaengern des Abgeleiteten + Werkes leistet, solange diese Personen nicht ausdruecklich erklaert + haben, dass sie solch eine Unterstuetzung fuer das Abgeleitete Werk + leisten werden. + 4. Sie verteilen zusammen mit dem Abgeleiteten Werk mindestens eines der + folgenden: + 1. Eine vollstaendige, unveraenderte Kopie des Werks; wenn Ihre + Verteilung eines veraenderten Teils darin besteht, Zugang zum + Kopieren eines veraenderten Teils von einem bestimmten Ort + anzubieten, dann wird diese Bedingung erfuellt, wenn Sie + gleichwertigen Zugang zu einer Kopie des Werkes am gleichen oder + einem vergleichbaren Ort anbieten, selbst wenn Dritte so nicht + gezwungen sind, das Werk zusammen mit dem veraenderten Teil zu + kopieren. + 2. Informationen, die ausreichen, eine vollstaendige, unveraenderte + Kopie des Werks zu erhalten. + 7. Wenn Sie nicht der Aktuelle Betreuer des Werkes sind, duerfen Sie ein + Kompiliertes Werk, das aus einem Abgeleiteten Werk erzeugt wurde, + verteilen, solange das Abgeleitete Werk an alle Empfaenger des Kompilierten + Werkes verteilt wird und solange die Bedingungen aus vorstehender Regel 6 + mit Blick auf das Abgeleitete Werk erfuellt sind. + 8. Die vorstehenden Bedingungen sind nicht dazu gedacht, Veraenderungen gleich + welcher Weise und welchen Teils zu verhindern, die dazu fuehren, dass + dieser Teil mit einer aktualisierten Version dieses Teiles, wie sie vom + Aktuellen Betreuer nach Regel 4 verteilt wird, identisch wird. Die + vorstehenden Bedingungen sind daher auf diesen Fall nicht anzuwenden. + 9. Verteilungen des Werkes und jedes Abgeleiteten Werkes in einem alternativen + Format, aus dem das Werk oder das abgeleitete Werk (im Ganzen oder in + Teilen) dann erzeugt wird, indem irgend ein Prozess auf das Format + angewendet wird, schwaecht keinen Abschnitt dieser Lizenz ab und hebt + keinen Abschnitt dieser Lizenz auf, da sie das Ergebnis der Anwendung + dieses Prozesses betreffen. +10. + 1. Ein Abgeleitetes Werk darf unter einer anderen Lizenz verteilt werden, + solange sichergestellt ist, dass diese Lizenz selbst die Bedingungen + aus Regel 6 in Bezug auf das Werk beachtet, obgleich sie nicht die + restlichen Bedingungen dieser Lizenz zu beachten hat. + 2. Wenn ein Abgeleitetes Werk unter einer anderen Lizenz verteilt wird, + muss dieses Abgeleitete Werk genuegend Dokumentation als Teil von sich + selbst bieten, damit jeder Empfaenger dieses Abgeleiteten Werkes die + Bedingungen von vorstehender Regel 6, betreffend Aenderungen des Werks, + beachten kann. +11. Diese Lizenz trifft keine Einschraenkungen fuer Werke, die in keiner + Beziehung zu dem Werk stehen, noch trifft diese Lizenz irgendwelche + Einschraenkungen betreffens das Zusammenpacken solcher Werke mit dem Werk + auf irgendeine Art. +12. Nichts in dieser Lizenz ist dazu gedacht oder darf dazu verwendet werden + vollstaendige Einhaltung geltenden Rechts durch alle Beteiligten zu + verhindern. + + +KEINE GEWAEHRLEISTUNG + +Es besteht keinerlei Gewaehrleistung fuer das Werk, soweit dies gesetzlich +zulaessig ist. Sofern nicht anderweitig schriftlich bestaetigt, stellen die +Rechte-Inhaber das Werk so zur Verfuegung, `wie es ist', ohne irgendeine +Gewaehrleistung, weder ausdruecklich noch implizit, einschliesslich, aber +nicht begrenzt auf, Marktreife oder Tauglichkeit fuer einen bestimmten +Zweck. Das volle Risiko bezueglich Qualitaet und Leistungsfaehigkeit des +Programms liegt bei Ihnen. Sollte sich das Programm als fehlerhaft +herausstellen, liegen die Kosten fuer notwendigen Service, Reparatur oder +Korrektur bei Ihnen. + +In keinem Fall, ausser wenn durch geltendes Recht gefordert oder schriftlich +zugesichert, ist irgendein Rechte-Inhaber oder ein in einem Teil des Werkes +namentlich genannter Autor oder irgendein anderer, der das Programm wie oben +erlaubt modifiziert und/oder verbreitet hat, Ihnen gegenueber fuer +irgendwelche Schaeden haftbar, einschliesslich jeglicher allgemeiner oder +spezieller Schaeden, Schaeden durch Seiteneffekte (Nebenwirkungen) oder +Folgeschaeden, die aus der Benutzung des Werkes oder der Unbenutzbarkeit des +Werkes folgen (einschliesslich, aber nicht beschraenkt auf, Datenverluste, +fehlerhafte Verarbeitung von Daten, Verluste, die von Ihnen oder anderen +getragen werden muessen, oder dem Unvermoegen des Werkes, mit irgendeinem +anderen Programm zusammenzuarbeiten), selbst wenn ein Rechte-Inhaber oder +genannter Autor oder genannter Dritter ueber die Moeglichkeit solcher Schaeden +unterrichtet worden war. + + +BETREUUNG DES WERKES + +Das Werk hat den Status `author-maintained' (vom Autor betreut) wenn der +Rechte-Inhaber ausdruecklich und deutlich in der Naehe des grundlegenden +Rechtehinweises im Werk feststellt, dass das Werk nur vom Rechte-Inhaber +betreut werden kann oder einfach, dass es `author-maintained' (vom Autor +betreut) ist. + +Das Werk hat den Status `maintained' (betreut), wenn ein Aktueller Betreuer +existiert, der im Werk angezeigt hat, dass er bereit ist, Fehlermeldungen das +Werk betreffend zu erhalten (beispielsweise, indem er eine gueltige +E-Mail-Adresse bekannt gibt). Es ist nicht erforderlich, dass der Aktuelle +Betreuer diese Fehlermeldungen bestaetigt oder auf sie reagiert. + +Das Werk wechselt vom Status `maintained' (betreut) in den Status +`unmaintained' (nicht betreut), wenn kein Aktueller Betreuer vorhanden ist +oder die Person, die als Aktueller Betreuer des Werks festgelegt ist, fuer +einen Zeitraum von sechs Monaten nicht auf dem bekannten Kommunikationsweg +erreichbar ist, und keine anderen Anzeichen einer aktiven Betreuung zu +erkennen sind. + +Wenn das Werk den Status `unmaintained' hat, koennen Sie durch die folgenden +Schritte zum Aktuelle Betreuer des Werkes werden: + + 1. Unternehmen Sie vertretbare Anstrengungen, um den Aktuellen Betreuer (und + den Rechte-Inhaber, falls dies zwei verschiedene Personen sind) durch + Nutzung des Internets und anderer Methoden ausfindig zu machen. + 2. Wenn diese Suche erfolgreich ist, dann erkundigen Sie sich, ob das Werk + noch immer betreut wird. + 1. Wenn es betreut wird, fragen Sie den Aktuellen Betreuer nach einer + Aktualisierung der Kommunikationsdaten innerhalb eines Monats. + 2. Wenn die Suche erfolglos ist oder vom Aktuellen Betreuer nichts + unternommen wird, um die aktive Betreuung fortzusetzen oder + wiederaufzunehmen, dann zeigen Sie in der zur Sache gehoerenden + Nutzergemeinschaft Ihren Willen zur Uebernahme der Betreuung an. (Wenn + das Werk ein LaTeX-Werk ist, kann dies beispielsweise durch eine + Mitteilung in comp.text.tex oder de.comp.text.tex erfolgen). + 3. + 1. Wenn der Aktuelle Betreuer erreichbar ist und der Uebergabe der + Betreuung an Sie zustimmt, dann hat dies sofortige Wirkung nach + Bekanntgabe. + 2. Wenn der Aktuelle Betreuer nicht erreichbar ist und der Rechte-Inhaber + einer Uebergabe der Betreuung an Sie zustimmt, dann hat sofortige + Wirkung nach Bekanntgabe. + 4. Wenn Sie eine Willens-Bekanntgabe wie oben in 2b beschrieben durchfuehren + und nach drei Monaten Ihr Wunsch weder vom Aktuellen Betreuer noch vom + Rechte-Inhaber noch von anderen Personen zurueckgewiesen wurde, dann + koennen Sie Verfuegungen fuer das Werk treffen, damit sie als (neuer) + Aktueller Betreuer bezeichnet werden. + 5. Wenn der zuvor unerreichbare Aktuelle Betreuer innerhalb weiterer drei + Monate nach einer erfolgten Aenderung gemaess den Bedingungen von 3b oder 4 + erreichbar wird, dann muss dieser Aktuelle Betreuer auf seinen Wunsch + wieder der Aktuelle Betreuer werden, wenn er innerhalb eines Monats seine + Kommunikationsdaten aktualisiert. + +Ein Wechsel des Aktuellen Betreuers allein aendert nichts an der Tatsache, dass +das Werk unter der LPPL verteilt wird. + +Wenn Sie der Aktuelle Betreuer des Werks werden, sollten Sie unverzueglich das +Werk mit einer deutlichen und unmissverstaendlichen Feststellung ueber Ihren +Status als Aktueller Betreuer versehen. Sie sollten ebenfalls Ihren neuen +Status derselben Nutzergemeinschaft bekannt geben wie in oben in 2b. + + +OB UND WIE EIN WERK UNTER DIESER LIZENZ VERTEILT WERDEN SOLLTE + +Dieser Abschnitt enthaelt wichtige Informationen, Beispiele und Empfehlungen +fuer Autoren, die erwaegen Ihr Werk unter dieser Lizenz zu verteilen. Die +Autoren sind in diesem Abschnitt mit `Sie' bezeichnet. + + +Wahl dieser Lizenz oder einer anderen Lizenz + +Wenn Sie fuer irgend einen Teil Ihres Werkes Bedingungen fuer die Verteilung +benoetigen oder wollen, die bedeutsam von dieser Lizenz abweichen, dann sollten +Sie sich an keiner Stelle Ihres Werkes auf diese Lizenz beziehen, sondern +stattdessen Ihr Werk unter einer anderen Lizenz verteilen. Sie koennen dann den +Text dieser Lizenz als Modell fuer Ihre eigene Lizenz verwenden, aber Ihre +Lizenz sollte sich nicht auf diese Lizenz beziehen, anderenfalls entsteht der +Eindruck, dass Ihr Werk unter der LPPL verteilt wird. + +Das Dokument `modguide.tex' in der Standard-LaTeX-Verteilung erklaert die +Motivation hinter den Bedingungen dieser Lizenz. Es erklaert beispielsweise, +warum die Verteilung von LaTeX unter der GNU General Public License (GPL) als +unpassend betrachtet wurde. Selbst wenn Ihr Werk nicht mit LaTeX zu tun hat, +kann die Diskussion in `modguide.tex' immer noch relevant sein und Autoren, die +beabsichtigen ihr Werk unter irgendeiner Lizenz zu verteilen wird empfohlen es +zu lesen. + + +Eine Empfehlung fuer Aenderungen ohne Verteilung + +Es ist klug niemals einen Teil des Werkes zu veraendern, auch nicht fuer die +eigene persoenliche Verwendung, ohne alle obigen Regeln fuer die Verteilung +des veraenderten Teils einzuhalten. Auch wenn Sie beabsichtigen, diesen +veraenderten Teil niemals zu verteilen, geschieht dies des oefteren +versehentlich – Sie koennten vergessen, dass Sie diesen Teil veraendert haben; +oder es koennte Ihnen nicht bewusst sein, wenn Sie anderen den Zugang zu der +veraenderten Version erlauben, dass Sie sie damit verteilen und Sie so gegen +die Bedingungen dieser Lizenz in einer Weise verstossen, die rechtliche +Implikationen haben und, schlimmer, Probleme in der Nutzergemeinschaft +verursachen kann. Es ist daher ueblicherweise in Ihrem eigenen Interesse, Ihre +eigene Kopie des Werkes identisch mit der oeffentlichen Version zu +halten. Viele Werke unterstuetzen Wege, um das Verhalten des Werkes ohne +Aenderung eines lizensierten Teils zu veraendern. + + +Wie diese Lizenz zu nutzen ist + +Um diese Lizenz zu nutzen, fuegen Sie in jeden Teil Ihres Werkes einen +expliziten Rechtehinweis sowohl mit Ihrem Namen als auch dem Jahr, in dem das +Werk geschrieben und/oder wesentlich geaendert wurde, ein. Fuegen Sie +ebenfalls eine Festlegung ein, dass die Verteilung und/oder Veraenderung +dieses Teils nach durch die Bedingungen dieser Lizenz geregelt ist. + +Hier ist ein Beispiel fuer solch einen Hinweis und eine Festlegung: + + %% pig.dtx + %% Copyright 2005 M. Y. Name + % + % This work may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.3 + % of this license or (at your option) any later version. + % The latest version of this license is in + % http://www.latex-project.org/lppl.txt + % and version 1.3 or later is part of all distributions of LaTeX + % version 2005/12/01 or later. + % + % This work has the LPPL maintenance status "maintained". + % + % The Current Maintainer of this work is M. Y. Name. + % + % This work consists of the files pig.dtx and pig.ins + % and the derived file pig.sty. + +auf Deutsch (Sie sollten den Hinweis und die Festlegung jedoch unbedingt +zumindest auch in englischer Sprache aufnehmen): + + %% pig.dtx + %% Copyright 2005 M. Y. Name + % + % Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz, + % entweder Version 1.3 oder (nach Ihrer Wahl) jede spaetere Version, + % verteilt und/oder veraendert werden. + % Die neuste Version dieser Lizenz ist + % http://www.latex-project.org/lppl.txt + % und Version 1.3 oder neuer ist Teil aller Verteilungen von LaTeX + % Version 2005/12/01 oder spaeter. + % + % Dieses Werk hat den LPPL-Betreuungs-Status "maintained" (betreut). + % + % Der Aktuelle Betreuer dieses Werkes ist M. Y. Name. + % + % Dieses Werk besteht aus den Dateien pig.dtx und pig.ins und der + % abgeleiteten Datei pig.sty. + +Mit solchem Hinweis und Festlegung in einer Datei, sind die Bedingungen dieses +Lizenz-Dokuments anzuwenden, wobei das `Werk' sich auf die drei Dateien +`pig.dtx', `pig,ins' und `pig.sty' bezieht (das letzte wird aus `pig.dtx' +unter Verwendung von `pig.ins' erzeugt), der `Standard-Interpreter' bezieht +sich auf jegliches `LaTeX-Format' und beide `Rechte-Inhaber' und `Aktueller +Betreuer' beziehen sich auf die Person `M. Y. Name'. + +Wenn Sie nicht wollen, dass der Betreuer-Abschnitt der LPPL auf Ihr Werk +anzuwenden ist, aendern Sie oben "maintained" in "author-maintained". Wir +empfehlen die Verwendung von "maintained", da der Betreuungs-Abschnitt +hinzugefuegt wurde um sicherzustellen, dass Ihr Werk fuer die +Nutzergemeinschaft nuetzlich bleibt, selbst wenn Sie es nicht mehr selbst +betreuen und aktualisieren koennen. + + +Abgeleitete Werke, die keinen Ersatz darstellen + +Diverse Bedingungen der LPPL treffen Festlegungen, um die Benutzbarkeit und +Stabilitaet fuer die Nutzergemeinschaft sicher zu stellen. Daher befassen sie +sich mit dem Fall, dass ein abgeleitetes Werk (kompatibel oder auch nicht +kompatibel) dazu gedacht ist, als Ersatz des Originalwerks verwendet zu +werden. Falls das nicht der Fall ist (beispielsweise, wenn nur einige wenige +Zeilen Quelltext in einem komplett anderen Zusammenhang wiederverwendet +werden), dann finden die Bedingungen 6b und 6d keine Anwendung. + + +Wichtige Empfehlungen + +Festlegen was das Werk ausmacht + +Die LPPL erfordert, dass die Verteilung des Werkes alle Dateien des Werkes +beinhaltet. Es ist daher wichtig, dass Sie fuer den Lizenznehmer eine +Moeglichkeit schaffen, festzustellen welche Dateien das Werk ausmachen. Dies +kann beispielsweise erreicht werden, indem alle Dateien des Werks in der Naehe +des Rechte-Hinweises in jeder Datei aufgefuehrt werde oder durch eine Zeile +wie: + + % This work consists of all files listed in manifest.txt. + +auf Deutsch (Sie sollten den Hinweis jedoch unbedingt zumindest auch in +englischer Sprache aufnehmen): + + % Dieses Werk besteht aus allen in manifest.txt aufgefuehrten Dateien + +an dieser Stelle. Bei Fehlen einer unzweideutigen Liste kann es fuer den +Lizenznehmer unmoeglich sein herauszufinden woraus nach Ihrer Auffassung das +Werk besteht, in diesem Fall waere der Lizenznehmer berechtigt sinnvolle +Annahmen zu treffen, aus welchen Dateien das Werk besteht. + +------------------------------------------------------------------------------- +Letzte Aenderung, 16. Januar 2006 +Letzte Aenderung der Uebersetzung, 13. Februar 2006 diff --git a/macros/latex/contrib/koma-script/lppl.txt b/macros/latex/contrib/koma-script/lppl.txt new file mode 100644 index 0000000000..90e5e3ab79 --- /dev/null +++ b/macros/latex/contrib/koma-script/lppl.txt @@ -0,0 +1,416 @@ +The LaTeX Project Public License +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +LPPL Version 1.3c 2006-05-20 + +Copyright 1999 2002-2006 LaTeX3 Project + Everyone is allowed to distribute verbatim copies of this + license document, but modification of it is not allowed. + + +PREAMBLE +======== + +The LaTeX Project Public License (LPPL) is the primary license under +which the the LaTeX kernel and the base LaTeX packages are distributed. + +You may use this license for any work of which you hold the copyright +and which you wish to distribute. This license may be particularly +suitable if your work is TeX-related (such as a LaTeX package), but +it is written in such a way that you can use it even if your work is +unrelated to TeX. + +The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', +below, gives instructions, examples, and recommendations for authors +who are considering distributing their works under this license. + +This license gives conditions under which a work may be distributed +and modified, as well as conditions under which modified versions of +that work may be distributed. + +We, the LaTeX3 Project, believe that the conditions below give you +the freedom to make and distribute modified versions of your work +that conform with whatever technical specifications you wish while +maintaining the availability, integrity, and reliability of +that work. If you do not see how to achieve your goal while +meeting these conditions, then read the document `cfgguide.tex' +and `modguide.tex' in the base LaTeX distribution for suggestions. + + +DEFINITIONS +=========== + +In this license document the following terms are used: + + `Work' + Any work being distributed under this License. + + `Derived Work' + Any work that under any applicable law is derived from the Work. + + `Modification' + Any procedure that produces a Derived Work under any applicable + law -- for example, the production of a file containing an + original file associated with the Work or a significant portion of + such a file, either verbatim or with modifications and/or + translated into another language. + + `Modify' + To apply any procedure that produces a Derived Work under any + applicable law. + + `Distribution' + Making copies of the Work available from one person to another, in + whole or in part. Distribution includes (but is not limited to) + making any electronic components of the Work accessible by + file transfer protocols such as FTP or HTTP or by shared file + systems such as Sun's Network File System (NFS). + + `Compiled Work' + A version of the Work that has been processed into a form where it + is directly usable on a computer system. This processing may + include using installation facilities provided by the Work, + transformations of the Work, copying of components of the Work, or + other activities. Note that modification of any installation + facilities provided by the Work constitutes modification of the Work. + + `Current Maintainer' + A person or persons nominated as such within the Work. If there is + no such explicit nomination then it is the `Copyright Holder' under + any applicable law. + + `Base Interpreter' + A program or process that is normally needed for running or + interpreting a part or the whole of the Work. + + A Base Interpreter may depend on external components but these + are not considered part of the Base Interpreter provided that each + external component clearly identifies itself whenever it is used + interactively. Unless explicitly specified when applying the + license to the Work, the only applicable Base Interpreter is a + `LaTeX-Format' or in the case of files belonging to the + `LaTeX-format' a program implementing the `TeX language'. + + + +CONDITIONS ON DISTRIBUTION AND MODIFICATION +=========================================== + +1. Activities other than distribution and/or modification of the Work +are not covered by this license; they are outside its scope. In +particular, the act of running the Work is not restricted and no +requirements are made concerning any offers of support for the Work. + +2. You may distribute a complete, unmodified copy of the Work as you +received it. Distribution of only part of the Work is considered +modification of the Work, and no right to distribute such a Derived +Work may be assumed under the terms of this clause. + +3. You may distribute a Compiled Work that has been generated from a +complete, unmodified copy of the Work as distributed under Clause 2 +above, as long as that Compiled Work is distributed in such a way that +the recipients may install the Compiled Work on their system exactly +as it would have been installed if they generated a Compiled Work +directly from the Work. + +4. If you are the Current Maintainer of the Work, you may, without +restriction, modify the Work, thus creating a Derived Work. You may +also distribute the Derived Work without restriction, including +Compiled Works generated from the Derived Work. Derived Works +distributed in this manner by the Current Maintainer are considered to +be updated versions of the Work. + +5. If you are not the Current Maintainer of the Work, you may modify +your copy of the Work, thus creating a Derived Work based on the Work, +and compile this Derived Work, thus creating a Compiled Work based on +the Derived Work. + +6. If you are not the Current Maintainer of the Work, you may +distribute a Derived Work provided the following conditions are met +for every component of the Work unless that component clearly states +in the copyright notice that it is exempt from that condition. Only +the Current Maintainer is allowed to add such statements of exemption +to a component of the Work. + + a. If a component of this Derived Work can be a direct replacement + for a component of the Work when that component is used with the + Base Interpreter, then, wherever this component of the Work + identifies itself to the user when used interactively with that + Base Interpreter, the replacement component of this Derived Work + clearly and unambiguously identifies itself as a modified version + of this component to the user when used interactively with that + Base Interpreter. + + b. Every component of the Derived Work contains prominent notices + detailing the nature of the changes to that component, or a + prominent reference to another file that is distributed as part + of the Derived Work and that contains a complete and accurate log + of the changes. + + c. No information in the Derived Work implies that any persons, + including (but not limited to) the authors of the original version + of the Work, provide any support, including (but not limited to) + the reporting and handling of errors, to recipients of the + Derived Work unless those persons have stated explicitly that + they do provide such support for the Derived Work. + + d. You distribute at least one of the following with the Derived Work: + + 1. A complete, unmodified copy of the Work; + if your distribution of a modified component is made by + offering access to copy the modified component from a + designated place, then offering equivalent access to copy + the Work from the same or some similar place meets this + condition, even though third parties are not compelled to + copy the Work along with the modified component; + + 2. Information that is sufficient to obtain a complete, + unmodified copy of the Work. + +7. If you are not the Current Maintainer of the Work, you may +distribute a Compiled Work generated from a Derived Work, as long as +the Derived Work is distributed to all recipients of the Compiled +Work, and as long as the conditions of Clause 6, above, are met with +regard to the Derived Work. + +8. The conditions above are not intended to prohibit, and hence do not +apply to, the modification, by any method, of any component so that it +becomes identical to an updated version of that component of the Work as +it is distributed by the Current Maintainer under Clause 4, above. + +9. Distribution of the Work or any Derived Work in an alternative +format, where the Work or that Derived Work (in whole or in part) is +then produced by applying some process to that format, does not relax or +nullify any sections of this license as they pertain to the results of +applying that process. + +10. a. A Derived Work may be distributed under a different license + provided that license itself honors the conditions listed in + Clause 6 above, in regard to the Work, though it does not have + to honor the rest of the conditions in this license. + + b. If a Derived Work is distributed under a different license, that + Derived Work must provide sufficient documentation as part of + itself to allow each recipient of that Derived Work to honor the + restrictions in Clause 6 above, concerning changes from the Work. + +11. This license places no restrictions on works that are unrelated to +the Work, nor does this license place any restrictions on aggregating +such works with the Work by any means. + +12. Nothing in this license is intended to, or may be used to, prevent +complete compliance by all parties with all applicable laws. + + +NO WARRANTY +=========== + +There is no warranty for the Work. Except when otherwise stated in +writing, the Copyright Holder provides the Work `as is', without +warranty of any kind, either expressed or implied, including, but not +limited to, the implied warranties of merchantability and fitness for a +particular purpose. The entire risk as to the quality and performance +of the Work is with you. Should the Work prove defective, you assume +the cost of all necessary servicing, repair, or correction. + +In no event unless required by applicable law or agreed to in writing +will The Copyright Holder, or any author named in the components of the +Work, or any other party who may distribute and/or modify the Work as +permitted above, be liable to you for damages, including any general, +special, incidental or consequential damages arising out of any use of +the Work or out of inability to use the Work (including, but not limited +to, loss of data, data being rendered inaccurate, or losses sustained by +anyone as a result of any failure of the Work to operate with any other +programs), even if the Copyright Holder or said author or said other +party has been advised of the possibility of such damages. + + +MAINTENANCE OF THE WORK +======================= + +The Work has the status `author-maintained' if the Copyright Holder +explicitly and prominently states near the primary copyright notice in +the Work that the Work can only be maintained by the Copyright Holder +or simply that it is `author-maintained'. + +The Work has the status `maintained' if there is a Current Maintainer +who has indicated in the Work that they are willing to receive error +reports for the Work (for example, by supplying a valid e-mail +address). It is not required for the Current Maintainer to acknowledge +or act upon these error reports. + +The Work changes from status `maintained' to `unmaintained' if there +is no Current Maintainer, or the person stated to be Current +Maintainer of the work cannot be reached through the indicated means +of communication for a period of six months, and there are no other +significant signs of active maintenance. + +You can become the Current Maintainer of the Work by agreement with +any existing Current Maintainer to take over this role. + +If the Work is unmaintained, you can become the Current Maintainer of +the Work through the following steps: + + 1. Make a reasonable attempt to trace the Current Maintainer (and + the Copyright Holder, if the two differ) through the means of + an Internet or similar search. + + 2. If this search is successful, then enquire whether the Work + is still maintained. + + a. If it is being maintained, then ask the Current Maintainer + to update their communication data within one month. + + b. If the search is unsuccessful or no action to resume active + maintenance is taken by the Current Maintainer, then announce + within the pertinent community your intention to take over + maintenance. (If the Work is a LaTeX work, this could be + done, for example, by posting to comp.text.tex.) + + 3a. If the Current Maintainer is reachable and agrees to pass + maintenance of the Work to you, then this takes effect + immediately upon announcement. + + b. If the Current Maintainer is not reachable and the Copyright + Holder agrees that maintenance of the Work be passed to you, + then this takes effect immediately upon announcement. + + 4. If you make an `intention announcement' as described in 2b. above + and after three months your intention is challenged neither by + the Current Maintainer nor by the Copyright Holder nor by other + people, then you may arrange for the Work to be changed so as + to name you as the (new) Current Maintainer. + + 5. If the previously unreachable Current Maintainer becomes + reachable once more within three months of a change completed + under the terms of 3b) or 4), then that Current Maintainer must + become or remain the Current Maintainer upon request provided + they then update their communication data within one month. + +A change in the Current Maintainer does not, of itself, alter the fact +that the Work is distributed under the LPPL license. + +If you become the Current Maintainer of the Work, you should +immediately provide, within the Work, a prominent and unambiguous +statement of your status as Current Maintainer. You should also +announce your new status to the same pertinent community as +in 2b) above. + + +WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE +====================================================== + +This section contains important instructions, examples, and +recommendations for authors who are considering distributing their +works under this license. These authors are addressed as `you' in +this section. + +Choosing This License or Another License +---------------------------------------- + +If for any part of your work you want or need to use *distribution* +conditions that differ significantly from those in this license, then +do not refer to this license anywhere in your work but, instead, +distribute your work under a different license. You may use the text +of this license as a model for your own license, but your license +should not refer to the LPPL or otherwise give the impression that +your work is distributed under the LPPL. + +The document `modguide.tex' in the base LaTeX distribution explains +the motivation behind the conditions of this license. It explains, +for example, why distributing LaTeX under the GNU General Public +License (GPL) was considered inappropriate. Even if your work is +unrelated to LaTeX, the discussion in `modguide.tex' may still be +relevant, and authors intending to distribute their works under any +license are encouraged to read it. + +A Recommendation on Modification Without Distribution +----------------------------------------------------- + +It is wise never to modify a component of the Work, even for your own +personal use, without also meeting the above conditions for +distributing the modified component. While you might intend that such +modifications will never be distributed, often this will happen by +accident -- you may forget that you have modified that component; or +it may not occur to you when allowing others to access the modified +version that you are thus distributing it and violating the conditions +of this license in ways that could have legal implications and, worse, +cause problems for the community. It is therefore usually in your +best interest to keep your copy of the Work identical with the public +one. Many works provide ways to control the behavior of that work +without altering any of its licensed components. + +How to Use This License +----------------------- + +To use this license, place in each of the components of your work both +an explicit copyright notice including your name and the year the work +was authored and/or last substantially modified. Include also a +statement that the distribution and/or modification of that +component is constrained by the conditions in this license. + +Here is an example of such a notice and statement: + + %% pig.dtx + %% Copyright 2005 M. Y. Name + % + % This work may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.3 + % of this license or (at your option) any later version. + % The latest version of this license is in + % http://www.latex-project.org/lppl.txt + % and version 1.3 or later is part of all distributions of LaTeX + % version 2005/12/01 or later. + % + % This work has the LPPL maintenance status `maintained'. + % + % The Current Maintainer of this work is M. Y. Name. + % + % This work consists of the files pig.dtx and pig.ins + % and the derived file pig.sty. + +Given such a notice and statement in a file, the conditions +given in this license document would apply, with the `Work' referring +to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being +generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' +referring to any `LaTeX-Format', and both `Copyright Holder' and +`Current Maintainer' referring to the person `M. Y. Name'. + +If you do not want the Maintenance section of LPPL to apply to your +Work, change `maintained' above into `author-maintained'. +However, we recommend that you use `maintained', as the Maintenance +section was added in order to ensure that your Work remains useful to +the community even when you can no longer maintain and support it +yourself. + +Derived Works That Are Not Replacements +--------------------------------------- + +Several clauses of the LPPL specify means to provide reliability and +stability for the user community. They therefore concern themselves +with the case that a Derived Work is intended to be used as a +(compatible or incompatible) replacement of the original Work. If +this is not the case (e.g., if a few lines of code are reused for a +completely different task), then clauses 6b and 6d shall not apply. + + +Important Recommendations +------------------------- + + Defining What Constitutes the Work + + The LPPL requires that distributions of the Work contain all the + files of the Work. It is therefore important that you provide a + way for the licensee to determine which files constitute the Work. + This could, for example, be achieved by explicitly listing all the + files of the Work near the copyright notice of each file or by + using a line such as: + + % This work consists of all files listed in manifest.txt. + + in that place. In the absence of an unequivocal list it might be + impossible for the licensee to determine what is considered by you + to comprise the Work and, in such a case, the licensee would be + entitled to make reasonable conjectures as to which files comprise + the Work. + diff --git a/macros/latex/contrib/koma-script/scraddr.dtx b/macros/latex/contrib/koma-script/scraddr.dtx new file mode 100644 index 0000000000..3a599a3e7e --- /dev/null +++ b/macros/latex/contrib/koma-script/scraddr.dtx @@ -0,0 +1,296 @@ +% \iffalse meta-comment +% ====================================================================== +% scraddr.dtx +% Copyright (c) Markus Kohm, 2006-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scraddr.dtx 3874 2022-06-05 10:38:02Z kohm $ +%<*dtx> +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\ProvidesFile{scraddr.dtx} +%> +%\NeedsTeXFormat{LaTeX2e}[1995/12/01] +%\ProvidesFile{scraddr.drv} +%\ProvidesPackage{scraddr} +%<*dtx|scraddr|driver> + [2022/01/24 v1.1d KOMA-Script +% +% package] +%<*dtx|driver> + Script bundle] +% +%<*dtx> +\ifx\documentclass\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHTFROM}{2006} + \generate{\usepreamble\defaultpreamble + \file{scraddr.sty}{% + \from{scraddr.dtx}{scraddr}% + \from{scrlogo.dtx}{logo}% + }% + } + \@@input scrstrop.inc +\else + \let\endbatchfile\relax +\fi +\endbatchfile +% +%<*driver> +\documentclass{koma-script-source-doc} +\usepackage[USenglish]{babel} +\begin{document} + \DocInput{scraddr.dtx} +\end{document} +% +% \fi +% +% \changes{v1.1a}{2002/05/19}{first version, separated from \cls{scrlettr}} +% \changes{v1.1d}{2022/01/24}{switched from \cls{scrdoc} to +% \cls{koma-script-source-doc}} +% \changes{v1.1d}{2022/01/24}{whole implementation documentation in English} +% +% \GetFileInfo{scraddr.dtx} +% \title{Parsing Address Files \\ +% Using Package \pkg*{scraddr}} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm} +% \and Jens-Uwe Morawski} +% \date{Version \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% Address files are not only of interest for letters using the \KOMAScript{} +% class \cls*{scrlttr2} or the \KOMAScript{} package \pkg*{scrletter}. Other +% applications such as the creation of address books or telephone directories +% are also quite common. In addition, it can also be useful to access not only +% the addressee's record in a letter, but also other records in an address +% file. This is exactly the task of the \pkg*{scraddr} package. +% \end{abstract} +% \tableofcontents +% +% \section{User Manual} +% +% You can find the user manual of \pkg*{scraddr} in the \KOMAScript{} manual, +% either the German \file{scrguide} or the English \file{scrguien}. +% +% \MaybeStop{\PrintIndex} +% +% \section{Implementation} +% +%\iffalse +% \begin{macrocode} +%<*scraddr> +%<*beta> +\PackageWarningNoLine{scraddr} + {THIS IS A BETA VERSION!\MessageBreak + YOU SHOULD NOT USE THIS VERSION!\MessageBreak + YOU SHOULD INSTALL THE RELEASE FROM CTAN\MessageBreak + AND USE THAT INSTEAD OF THIS BETA VERSION} +% +% +%\fi +% +% \changes{v1.0}{1996/01/22}{New package \pkg*{scraddr}} +% +% \begin{macrocode} +%<*scraddr> +% \end{macrocode} +% +% \subsection{Options} +% +% Preliminary note: \pkg*{scraddr} is a very, very old package from the early +% days of \KOMAScript. Therefore it does not support \emph{key=value} options +% as other \KOMAScript{} packages do. +% +% \begin{option}{adrFreeIVempty} +% \changes{v1.1a}{2002/05/19}{new} +% \begin{option}{adrFreeIVshow} +% \changes{v1.1a}{2002/05/19}{new} +% \begin{option}{adrFreeIVwarn} +% \changes{v1.1a}{2002/05/19}{new} +% \begin{option}{adrFreeIVstop} +% \changes{v1.1a}{2002/05/19}{new} +% \begin{macro}{\@adrFIVerror} +% \changes{v1.1a}{2002/05/19}{new} +% The options allow the choice whether \cs{FreeIV}, defined by \cs{adrentry}, +% should be ignored, output, result in a warning or an error message. Default +% is \opt{adrFreeIVshow}. The selected choice is stored as a number in +% \cs{@adrFIVerror} (0 = \opt{adrFreeIVempty}, 1 = \opt{adrFreeIVshow}, +% 2 = \opt{adrFreewarn}, 3 = \opt{adrFreeIVstop}). Unknown values should +% be handled as \opt{adrFreeIVstop} too, but are not recommended. +% \begin{macrocode} +\newcommand*{\@adrFIVerror}{} +\DeclareOption{adrFreeIVempty}{\renewcommand*{\@adrFIVerror}{0}} +\DeclareOption{adrFreeIVshow}{\renewcommand*{\@adrFIVerror}{1}} +\DeclareOption{adrFreeIVwarn}{\renewcommand*{\@adrFIVerror}{2}} +\DeclareOption{adrFreeIVstop}{\renewcommand*{\@adrFIVerror}{3}} +% \end{macrocode} +% \end{macro} +% \end{option} +% \end{option} +% \end{option} +% \end{option} +% +% \changes{v1.0a}{2001/08/07}{\cs{ExecuteOption}\cs{relax} fixed} +% \changes{v1.1a}{2002/05/19}{\texttt{adrFreeIVshow} is default} +% \begin{macrocode} +\ExecuteOptions{adrFreeIVshow} +\ProcessOptions\relax +% \end{macrocode} +% +% \subsection{Reading address files} +% \begin{command}{\InputAdressFile} +% This command reads the address file given as mandatory argument. While +% reading global internal macros are generated for every \cs{adrentry} or +% \cs{addrentry}. To do so, these two macros are redefined locally only. +% \changes{v1.1}{2002/05/18}{extended by \cs{addrentry} handling} +% \changes{v1.1b}{2002/06/02}{\cs{addrchar} and \cs{adrchar} are defined also +% if undefined} +% \begin{macrocode} +\newcommand{\InputAddressFile}[1]{\begingroup + \ifcase\@adrFIVerror + \def\adrentry##1##2##3##4##5##6##7{% + \addrentry{##1}{##2}{##3}{##4}{##5}{##6}{##7}{}}% + \or + \def\adrentry##1##2##3##4##5##6##7##8{% + \addrentry{##1}{##2}{##3}{##4}{##5}{##6}{##7}{% + (entry FreeIV undefined at `##8')}{##8}}% + \or + \def\adrentry##1##2##3##4##5##6##7##8{% + \addrentry{##1}{##2}{##3}{##4}{##5}{##6}{##7}{% + \PackageWarning{scraddr}{% + `##8' was defined using \string\adrentry\MessageBreak + so \string\FreeIV-entry is not defined}}{##8}}% + \else + \def\adrentry##1##2##3##4##5##6##7##8{% + \addrentry{##1}{##2}{##3}{##4}{##5}{##6}{##7}{% + \PackageError{scraddr}{% + \string\FreeIV\space undefined at `##8'}{% + `##8' was defined using \string\adrentry\MessageBreak + so \string\FreeIV-entry is not defined.\MessageBreak + You may continue but you should check output}}{##8}}% + \fi + \providecommand*{\addrchar}[1]{}% + \providecommand*{\adrchar}{\addrchar}% + \def\addrentry##1##2##3##4##5##6##7##8##9{% + \def\@tempa{##9}\ifx\@tempa\@empty\else + \expandafter\gdef\csname ##9.LN\endcsname{##1} + \expandafter\gdef\csname ##9.FN\endcsname{##2} + \expandafter\gdef\csname ##9.A\endcsname{##3} + \expandafter\gdef\csname ##9.P\endcsname{##4} + \expandafter\gdef\csname ##9.FI\endcsname{##5} + \expandafter\gdef\csname ##9.FII\endcsname{##6} + \expandafter\gdef\csname ##9.FIII\endcsname{##7} + \expandafter\gdef\csname ##9.FIV\endcsname{##8} + \fi} +% \end{macrocode} +% Not existing files result in an error message. Found files are only noted. +% \begin{macrocode} + \InputIfFileExists{#1.adr} + {\typeout{Load addressfile: #1.adr.}} + {\PackageError{scraddr} + {File #1.adr not found} + {The addressfile you wanted is not + available}} + \endgroup} +% \end{macrocode} +% \end{command} +% +% \subsection{Using an element of an address file} +% +% Selecting the elements by names instead of cryptic macros, could be +% easier. So we use well named macros for the selection. All these macros have +% exactly one mandatory argument: the \meta{shortcut} which is argument 8 of +% \cs{adrentry} resp. argument 9 of \cs{addrentry} in the address file. +% +% \begin{command}{\Name} +% The \cs{Name} is a combination of \cs{Firstname} and \cs{Lastname} with a +% normal word separator space in between. +% \begin{macrocode} +\newcommand*{\Name}[1]{\FirstName{#1}\ \LastName{#1}} +% \end{macrocode} +% \end{command} +% \begin{command}{\FirstName} +% Firstname or given from internal macro \cs{\meta{shortcut}.FN}. +% \begin{macrocode} +\newcommand*{\FirstName}[1]{\csname #1.FN\endcsname} +% \end{macrocode} +% \end{command} +% \begin{command}{\LastName} +% Lastname from internal macro \cs{\meta{shortcut}.LN}. +% \begin{macrocode} +\newcommand*{\LastName}[1]{\csname #1.LN\endcsname} +% \end{macrocode} +% \end{command} +% \begin{command}{\Address} +% Address from internal macro \cs{\meta{shortcut}.A}. +% \begin{macrocode} +\newcommand*{\Address}[1]{\csname #1.A\endcsname} +% \end{macrocode} +% \end{command} +% \begin{command}{\Telephone} +% Telephone number from internal macro \cs{\meta{shortcut}.P}. +% \begin{macrocode} +\newcommand*{\Telephone}[1]{\csname #1.P\endcsname} +% \end{macrocode} +% \end{command} +% \begin{command}{\FreeI,\FreeII} +% Two free entries from internal macros \cs{\meta{shortcut}.FI} and +% \cs{\meta{shortcut}.FII}. +% \begin{macrocode} +\newcommand*{\FreeI}[1]{\csname #1.FI\endcsname} +\newcommand*{\FreeII}[1]{\csname #1.FII\endcsname} +% \end{macrocode} +% \end{command} +% \begin{command}{\Comment,\FreeIII} +% The third free element is available by two commands, because originally it +% was specified as \meta{comment}. It is stored in the internal macro +% \cs{\meta{shortcut}.FIII}. +% \changes{v1.1}{2002/05/18}{extended to \cs{addrentry}} +% \begin{macrocode} +\newcommand*{\Comment}{} +\newcommand*{\FreeIII}[1]{\csname #1.FIII\endcsname} +\let\Comment\FreeIII +% \end{macrocode} +% \end{command} +% \begin{command}{\FreeIV} +% Forth free entry from internal macro \cs{\meta{shortcut}.FIV} only available +% with \cs{addrentry} but not woth \cs{adreentry}. +% \changes{v1.1}{2002/05/18}{extended to \cs{addrentry}} +% \begin{macrocode} +\newcommand*{\FreeIV}[1]{\csname #1.FIV\endcsname} +% \end{macrocode} +% \end{command} +% +% \subsection{Ende of package} +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: + diff --git a/macros/latex/contrib/koma-script/scrdoc.cls b/macros/latex/contrib/koma-script/scrdoc.cls new file mode 100644 index 0000000000..c80ada6078 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrdoc.cls @@ -0,0 +1,354 @@ +% ====================================================================== +% scrdoc.cls +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% Note: This class was made to shrink size of dtx files. +% Do not use this class for anything because it may change +% incompatible from distribution to distribution +% ====================================================================== +% $Id: scrdoc.cls 3900 2022-06-24 08:00:42Z kohm $ +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesClass{scrdoc}[% + 2022/06/24 v0.1j KOMA-Script source documentation class (deprecated)] + +\ClassWarningNoLine{scrdoc}{% + This class is depreacted since KOMA-Script 3.36!\MessageBreak + The internal KOMA-Script source documentation class\MessageBreak + scrdoc is not used any longer for the implementation\MessageBreak + documentation of KOMA-Script.\MessageBreak + It is also not compatible with version 3 of the\MessageBreak + doc package and currently only a workaround is used to\MessageBreak + force using doc version 2 and to ignore ltxdoc.cfg.\MessageBreak + You should replace this class urgently, because it will\MessageBreak + be removed from KOMA-Script soon% +} + +% scrdoc is incompatible with doc v3. Several changes would be needed +% to improve this. However, currently a kind of emergency workaround can be +% used. +\PassOptionsToClass{nocfg,doc2}{scrdoc} + +% Replace article class by scrartcl class. +\newcommand*{\sd@saved@LoadClass}{} +\let\sd@saved@LoadClass=\LoadClass +\renewcommand*{\LoadClass}[2][]{% + \begingroup + \edef\@tempc{#2}\def\@tempb{article}% + \ifx\@tempc\@tempb + \let\LoadClass\sd@saved@LoadClass + \def\@tempc{scrartcl}% + \fi + \edef\@tempc{% + \noexpand\endgroup\noexpand\sd@saved@LoadClass[{#1}]{\@tempc}}% + \@tempc +} +\newcommand*{\sd@saved@PassOptionsToClass}{} +\let\sd@saved@PassOptionsToClass=\PassOptionsToClass +\renewcommand*{\PassOptionsToClass}[2]{% + \begingroup + \edef\@tempc{#2}\def\@tempb{article}% + \ifx\@tempc\@tempb + \def\@tempc{scrartcl}% + \fi + \edef\@tempc{% + \noexpand\endgroup\noexpand\sd@saved@PassOptionsToClass{#1}{% + \@tempc}}% + \@tempc +} +\LoadClassWithOptions{ltxdoc}[2022/06/14] +\@ifundefined{cs}{\DeclareRobustCommand\cs[1]{\texttt{\bslash #1}}}{} + +% Use two columns at index +\setcounter{IndexColumns}{2} + +% If \EnableCrossrefs is used, we don't want following macros to be +% indexed: + +\DoNotIndex{\.,\\,\ ,\@Alph,\@M} +\DoNotIndex{\@abstrtfalse,\@abstrttrue,\@addtoreset,\@afterheading} +\DoNotIndex{\@afterindentfalse,\@alph,\@arabic} +\DoNotIndex{\@beginparpenalty} +\DoNotIndex{\@car,\@cdr,\@centercr} +\DoNotIndex{\@dblfloat,\@dotsep} +\DoNotIndex{\@dottedtocline,\@empty,\@endparpenalty} +\DoNotIndex{\@float,\@fontswitch} +\DoNotIndex{\@gobbletwo} +\DoNotIndex{\@hangfrom,\@highpenalty} +\DoNotIndex{\@ifnextchar,\@ifundefined,\@itempenalty} +\DoNotIndex{\@latex@warning} +\DoNotIndex{\@m,\@medpenalty,\@minus,\@mkboth,\@mparswitchfalse} +\DoNotIndex{\@mparswitchtrue} +\DoNotIndex{\@ne,\@nil,\@nobreakfalse,\@nobreaktrue,\@nomath} +\DoNotIndex{\@plus} +\DoNotIndex{\@tempa,\@tempcnta,\@tempdima,\@tempskipka} +\DoNotIndex{\@tempswafalse,\@tempswatrue} +\DoNotIndex{\@tempb,\@tempcntb,\@tempdimb,\@tempskipkb} +\DoNotIndex{\@tempswbfalse,\@tempswbtrue} +\DoNotIndex{\@tempc,\@tempcntc,\@tempdimc,\@tempskipkc} +\DoNotIndex{\@tocrmarg,\@topnewpage,\@topnum,\@twocolumnfalse} +\DoNotIndex{\@twocolumntrue,\@twosidefalse,\@twosidetrue} +\DoNotIndex{\@whiledim,\@whilenum} +\DoNotIndex{\addcontentsline,\addpenalty,\addtocontents,\addtolength} +\DoNotIndex{\addvspace,\advance} +\DoNotIndex{\begin,\begingroup,\bfseries,\box,\bullet} +\DoNotIndex{\c@figure,\c@page,\c@secnumdepth,\c@table,\c@tocdepth} +\DoNotIndex{\cdot,\centering,\changes,\cleardoublepage,\clearpage} +\DoNotIndex{\cmd,\col@number,\CurrentOption,\CodelineIndex,\cs} +\DoNotIndex{\day,\dblfloatpagefraction,\dbltopfraction} +\DoNotIndex{\DeclareOldFontCommand,\DeclareOption,\def,\DisableCrossrefs} +\DoNotIndex{\divide,\DoNotIndex} +\DoNotIndex{\ifdim,\else,\fi,\empty,\em,\EnableCrossrefs,\end} +\DoNotIndex{\end@dblfloat} +\DoNotIndex{\end@float,\endgroup,\endlist,\endquotation,\endtitlepage} +\DoNotIndex{\everypar,\ExecuteOptions,\expandafter} +\DoNotIndex{\fboxrule,\fboxsep} +\DoNotIndex{\gdef,\global} +\DoNotIndex{\hangindent,\hbox,\hfil,\hrule,\hsize,\hskip,\hspace,\hss} +\DoNotIndex{\if@tempswa,\ifcase,\or,\fi,\fi} +\DoNotIndex{\ifnum,\ifodd,\ifx,\fi,\fi,\fi} +\DoNotIndex{\include,\input,\InputIfFileExists,\item,\itshape} +\DoNotIndex{\kern,\kernel@ifnextchar} +\DoNotIndex{\leavevmode,\leftmark,\leftskip,\let,\lineskip} +\DoNotIndex{\list,\long} +\DoNotIndex{\m@ne,\m@th,\marginpar,\markboth,\markright,\mathbf,\mathcal} +\DoNotIndex{\mathit,\mathnormal,\mathrm,\mathsf,\mathtt,\MessageBreak} +\DoNotIndex{\month} +\DoNotIndex{\newblock,\newcommand,\newcount,\newcounter,\newdimen} +\DoNotIndex{\newenvironment,\newlength,\newpage,\nobreak,\noindent} +\DoNotIndex{\normalfont,\normallineskip,\normalsize,\null,\number} +\DoNotIndex{\numberline,\normalcolor} +\DoNotIndex{\OldMakeindex,\OnlyDescription,\overfullrule} +\DoNotIndex{\p@,\PackageError,\PackageInfo,\PackageWarningNoLine} +\DoNotIndex{\pagenumbering,\pagestyle,\par,\paragraph,\parbox} +\DoNotIndex{\PassOptionsToPackage,\pcal,\penalty,\pmit,\PrintChanges} +\DoNotIndex{\PrintIndex,\ProcessOptions,\protect,\providecommand} +\DoNotIndex{\ProvidesClass} +\DoNotIndex{\raggedbottom,\raggedleft,\raggedright,\refstepcounter,\relax} +\DoNotIndex{\renewcommand,\RequirePackage,\reset@font} +\DoNotIndex{\rightmargin,\rightmark,\rightskip,\rmfamily,\@Roman,\@roman} +\DoNotIndex{\scshape,\secdef,\setbox,\setcounter,\setlength} +\DoNotIndex{\settowidth,\sfcode,\sffamily,\skip,\sloppy,\slshape,\space} +\DoNotIndex{\string} +\DoNotIndex{\the,\thispagestyle,\triangleright,\ttfamily} +\DoNotIndex{\twocolumn,\typeout} +\DoNotIndex{\undefined,\usecounter} +\DoNotIndex{\vfil,\vfill,\vspace} +\DoNotIndex{\wd,\xdef,\year,\z@} +% More may be set by the source files. + +% Redefine some defaults to handle not only macros and environments +% but also options, Length, Counters, KOMAvars. Also define some new. +\def\macro{\begingroup + \catcode`\\12 + \MakePrivateLetters \m@cro@{0}} +\def\environment{\begingroup + \catcode`\\12 + \MakePrivateLetters \m@cro@{1}} +\def\option{\begingroup + \catcode`\\12 + \MakePrivateLetters \m@cro@{2}} +\def\Length{\begingroup + \catcode`\\12 + \MakePrivateLetters \m@cro@{3}} +\def\Counter{\begingroup + \catcode`\\12 + \MakePrivateLetters \m@cro@{4}} +\def\KOMAvar{\begingroup + \catcode`\\12 + \MakePrivateLetters \m@cro@{5}} +\def\KOMAfont{\begingroup + \catcode`\\12 + \MakePrivateLetters \m@cro@{6}} +\long\def\m@cro@#1#2{\endgroup \topsep\MacroTopsep \trivlist + \edef\saved@macroname{\string#2}% + \ifcase #1 + \edef\saved@indexname{\expandafter\@gobble\string#2}% + \else + \let\saved@indexname\saved@macroname + \fi + \def\makelabel##1{\llap{##1}}% + \if@inlabel + \let\@tempa\@empty \count@\macro@cnt + \loop \ifnum\count@>\z@ + \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne + \repeat + \edef\makelabel##1{\llap{\vtop to\baselineskip + {\@tempa\hbox{##1}\vss}}}% + \advance \macro@cnt \@ne + \else \macro@cnt\@ne \fi + \edef\@tempa{\noexpand\item[% + \ifcase #1 + \noexpand\PrintMacroName + \or + \noexpand\PrintEnvName + \or + \noexpand\PrintOptionName + \or + \noexpand\PrintLengthName + \or + \noexpand\PrintCounterName + \or + \noexpand\PrintKOMAvarName + \or + \noexpand\PrintKOMAfontName + \fi + {\string#2}]}% + \@tempa + \global\advance\c@CodelineNo\@ne + \ifcase #1 + \SpecialMainIndex{#2}\nobreak + \DoNotIndex{#2}% + \or + \SpecialMainEnvIndex{#2}\nobreak + \or + \SpecialMainOptionIndex{#2}\nobreak + \or + \SpecialMainLengthIndex{#2}\nobreak + \DoNotIndex{#2}% + \or + \SpecialMainCounterIndex{#2}\nobreak + \or + \SpecialMainKOMAvarIndex{#2}\nobreak + \or + \SpecialMainKOMAfontIndex{#2}\nobreak + \fi + \global\advance\c@CodelineNo\m@ne + \ignorespaces} +\let\endoption\endmacro +\let\endLength\endmacro +\let\endCounter\endmacro +\let\endKOMAvar\endmacro + +% Some new command +\newcommand*{\File}[1]{\texttt{\mbox{#1}}} +\newcommand*{\Class}{\File} +\newcommand*{\Package}{\File} +\newcommand*{\Macro}{\cs} +\newcommand*{\Option}{\File} + +% The new names we need +\providecommand*{\EnvName}{Umgebung}% This is german +\providecommand*{\EnvsName}{Umgebungen}% This is german +\providecommand*{\OptionName}{Option}% This is german +\providecommand*{\OptionsName}{Optionen}% This is german +\providecommand*{\PrintOptionName}[1]{\strut \MacroFont #1\ } +\providecommand*{\PrintDescribeOption}[1]{\strut \MacroFont #1\ } +\providecommand*{\LengthName}{L\"ange}% This is german +\providecommand*{\LengthsName}{L\"angen}% This is german +\providecommand*{\PrintLengthName}[1]{\strut \MacroFont \string #1\ } +\providecommand*{\PrintDescribeLength}[1]{\strut \MacroFont \string #1\ } +\providecommand*{\CounterName}{Z\"ahler}% This is german +\providecommand*{\CountersName}{Z\"ahler}% This is german +\providecommand*{\PrintCounterName}[1]{\strut \MacroFont #1\ } +\providecommand*{\PrintDescribeCounter}[1]{\strut \MacroFont #1\ } +\providecommand*{\KOMAvarName}{Variable}% This is german +\providecommand*{\KOMAvarsName}{Variablen}% This is german +\providecommand*{\PrintKOMAvarName}[1]{\strut \MacroFont #1\ } +\providecommand*{\PrintDescribeKOMAvar}[1]{\strut \MacroFont #1\ } +\providecommand*{\KOMAfontName}{Element mit Schrift}% This is german +\providecommand*{\KOMAfontsName}{Elemente mit Schrift}% This is german +\providecommand*{\PrintKOMAfontName}[1]{\strut \MacroFont #1\ } +\providecommand*{\PrintDescribeKOMAfont}[1]{\strut \MacroFont #1\ } + +% Defining new main index commands +\newcommand*{\SpecialMainIndex@Type}[3]{% + \@bsphack\special@index{% + #1\actualchar + {\string\ttfamily\space#1} + (\string #2)% + \encapchar main}% + \special@index{% + #3:\levelchar{% + \string\ttfamily\space#1}\encapchar + main}\@esphack} +\renewcommand*{\SpecialMainEnvIndex}[1]{% + \SpecialMainIndex@Type{#1}{\EnvName}{\EnvsName}} +\newcommand*{\SpecialMainOptionIndex}[1]{% + \SpecialMainIndex@Type{#1}{\OptionName}{\OptionsName}} +\newcommand*{\SpecialMainLengthIndex}[1]{% + \@bsphack\SpecialIndex@{#1}{(\string\LengthName )\encapchar main}% + \@esphack} +\newcommand*{\SpecialMainCounterIndex}[1]{% + \SpecialMainIndex@Type{#1}{\CounterName}{\CountersName}} +\newcommand*{\SpecialMainKOMAvarIndex}[1]{% + \SpecialMainIndex@Type{#1}{\KOMAvarName}{\KOMAvarsName}} +\newcommand*{\SpecialMainKOMAfontIndex}[1]{% + \SpecialMainIndex@Type{#1}{\KOMAfontName}{\KOMAfontsName}} + +% Defining new usage index commands +\newcommand*{\SpecialIndex@Type}[3]{% + \@bsphack + \index{#1\actualchar{\protect\ttfamily#1} + (#2)\encapchar usage}% + \index{#3:\levelchar{\protect\ttfamily#1}\encapchar + usage}\@esphack} +\renewcommand{\SpecialEnvIndex}[1]{% + \SpecialIndex@Type{#1}{\EnvName}{\EnvsName}} +\newcommand*{\SpecialOptionIndex}[1]{% + \SpecialMainIndex@Type{#1}{\OptionName}{\OptionsName}} +\newcommand*{\SpecialLengthIndex}[1]{\@bsphack% + {\let\special@index\index + \SpecialIndex@{#1}{(\string\LengthName )\encapchar usage}}% + \@esphack} +\newcommand*{\SpecialCounterIndex}[1]{% + \SpecialMainIndex@Type{#1}{\CounterName}{\CountersName}} +\newcommand*{\SpecialKOMAvarIndex}[1]{% + \SpecialMainIndex@Type{#1}{\KOMAvarName}{\KOMAvarsName}} + +% Define new describe commands +\newcommand*{\newDescribe}[1]{% + \expandafter\newcommand\expandafter*\csname Describe#1\endcsname{% + \leavevmode\@bsphack\begingroup\MakePrivateLetters + \csname Describe@#1\endcsname}% + \expandafter\newcommand\expandafter*\csname Describe@#1\endcsname[1]{% + \endgroup + \marginpar{\raggedleft\csname PrintDescribe#1\endcsname{##1}}% + \csname Special#1Index\endcsname{##1}\@esphack\ignorespaces}% +} +\newDescribe{Option} + +% We use left margin very much, so shift everything to the right +\if@twoside +\else +\addtolength{\oddsidemargin}{1in} +\setlength{\oddsidemargin}{1.5\oddsidemargin} +\addtolength{\oddsidemargin}{-1in} +\fi + +% We need some logos: +\providecommand*{\eTeX}{$\m@th\varepsilon$-\TeX} + +% Terms for other languages: +\AtBeginDocument{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname addto\endcsname\relax + \ClassWarning{scrdoc}{Package babel not loaded}% + \else + \addto\captionsenglish{% + \def\partname{File}% + }% + \addto\captionsngerman{% + \def\partname{Datei}% + }% + \ClassInfo{scrdoc}{Select language \languagename}% + \expandafter\selectlanguage\expandafter{\languagename}% + \fi +} + +\endinput +% end of ``scrdoc.cls'' diff --git a/macros/latex/contrib/koma-script/scrdocstrip.tex b/macros/latex/contrib/koma-script/scrdocstrip.tex new file mode 100644 index 0000000000..6d923e8c5a --- /dev/null +++ b/macros/latex/contrib/koma-script/scrdocstrip.tex @@ -0,0 +1,186 @@ +% ====================================================================== +% scrdocstrip.tex +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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.md. +% ====================================================================== +% $Id: scrdocstrip.tex 3915 2022-06-29 07:09:48Z kohm $ + +\expandafter\ifx\csname scrdocstripversion\endcsname\relax + \let\KOMAbatchfile\batchfile + \let\batchfile\undefined +\fi + +\input docstrip.tex + +\ifx\generate\undefined + \errhelp{| This installation requires docstrip version 2.3c or * later,^^J% + | but an old version of docstrip has been input.^^J% + | This error is fatal, because You have to update docstrip and maybe LaTeX + fist!} + \errmessage{| Fatal error: Old docstrip in input path} + \batchmode + \csname @@end\endcsname +\fi + +\expandafter\ifx\csname scrdocstripversion\endcsname\relax +\else \expandafter\endinput +\fi +\Msg{| Using KOMA-Script's docstrip extensions.}%| +% Support for variables: +\def\KOMAdefVariable#1#2{% + \expandafter\def\csname KOMAvar@#1\endcsname{#2}% +} +\def\KOMAifVariable#1{% + \expandafter\ifx\csname KOMAvar@#1\endcsname\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi +} +\def\KOMAuseVariable#1{% + \KOMAifVariable{#1}{% + \csname KOMAvar@#1\endcsname + }{% + variable #1\undefined + }% +} +\KOMAdefVariable{AUTHOR}{Markus Kohm} +\KOMAdefVariable{COPYRIGHT}{% + Copyright (c) + \KOMAifVariable{COPYRIGHTFROM}{\KOMAuseVariable{COPYRIGHTFROM}-}{}% + \KOMAifVariable{COPYRIGHTTILL}{\KOMAuseVariable{COPYRIGHTTILL}}{} + \KOMAuseVariable{AUTHOR}% + \KOMAifVariable{EMAIL}{ \KOMAuseVariable{EMAIL}}{}% +} +\KOMAdefVariable{COPYRIGHTCOMMENT}{% + \MetaPrefix\space\KOMAuseVariable{COPYRIGHT}% +} +% Extend line scanner by: +% - %!VARIABLE : to write variable into files +% - %?VARIABLE=VALUE : to setup a new variable +\begingroup +\catcode`\%=12 \catcode`\*=14 +\gdef\processLineX%#1{* + \ifcase\ifx%#10\else + \ifx<#11\else + \ifx!#12\else 3\fi\fi\fi\relax + \expandafter\putMetaComment\or + \expandafter\checkOption\or + \expandafter\KOMAexpandVariable\or + \expandafter\removeComment\fi + #1} +\gdef\KprocessLineX%#1{* + \ifcase\ifx%#10\else + \ifx<#11\else + \ifx!#12\else + \ifx?#13\else 4\fi\fi\fi\fi\relax + \expandafter\putMetaComment\or + \expandafter\checkOption\or + \expandafter\KOMAexpandVariable\or + \expandafter\KOMAsetVariable\or + \expandafter\removeComment\fi + #1} +\endgroup +\def\KOMAexpandVariable!#1\endLine{% + \advance\codeLinesPassed\@ne + \maybeMsg{x}% + \edef\inLine{\KOMAuseVariable{#1}}% + \let\do\putline@do + \activefiles +} +\def\KOMAsetVariable?#1=#2\endLine{% + \expandafter\gdef\csname KOMAvar@#1\endcsname{#2}% +} +% Extend heading +\def\ds@heading{% + \expandafter\ifx\csname ifbeta\expandafter\endcsname + \csname iftrue\endcsname + \use@Warning{\outFileName}{% + YOU SHOULD NOTE, THAT THIS IS NOT AN OFFICIAL RELEASE!^^J% + THIS VERSION IS INTENDED TO BE USED FOR TESTING ONLY!^^J% + USAGE FOR PURPOSES OTHER THAN INTENDED IS DANGEROUS!^^J% + DON'T EXPECT ANY SUPPORT FOR THIS VERSION!% + }% + \fi + \MetaPrefix ^^J% + \MetaPrefix\space This is file `\outFileName',^^J% + \MetaPrefix\space generated with the docstrip utility, extended by + scrdocstrip.^^J% +} +\def\commentWarning#1#2{% + \MetaPrefix\space + -------------------------------------------------------------------------^^J% + \@commentWarning#2^^J\@nil + \MetaPrefix\space + -------------------------------------------------------------------------^^J% +} +\def\@commentWarning#1^^J#2\@nil{% + \MetaPrefix\space #1^^J% + \ifx\relax#2\relax\else\@commentWarning#2\@nil\fi +} +\def\KNL{^\empty^J\perCent^^J} +\def\XKNL{^\empty^J\perCent|^^J} +\def\genericWarning#1#2{% + \string\expandafter\string\ifx\string\csname\space scrWMSG\string\endcsname\string\relax^^J% + \space\space\string\def\string\scrWMSG{\string\immediate\string\write17}^^J% + \string\fi^^J% + \string\scrWMSG{\KNL + +----------------------------------------------------------------------\KNL + | WARNING (`#1'):\XKNL + +----------------------------------------------------------------------\KNL + \@genericWarning#2^^J\@nil + +----------------------------------------------------------------------\KNL + }^^J% +} +\def\@genericWarning#1^^J#2\@nil{% + | #1\XKNL + \ifx\relax#2\relax\else\@genericWarning#2\@nil\fi +}%| +\def\useWarning#1{\let\use@Warning#1} +\useWarning\genericWarning + +% Now, we need some code from docstrip to start old docstrip-processing +\ifx\undefined\KOMAbatchfile\else + \Defaultfalse + \let\batchfile\KOMAbatchfile + \def\process@first@batchfile{% + \processbatchFile + \ifnum\NumberOfFiles=\z@ + \interactive + \fi + \endbatchfile + } +\fi + +\chardef\scrdocstripversion 1\relax + +\def\fromoptional#1{% + \immediate\openin\inputcheck\uptospace#1 \qStop\relax + \ifeof\inputcheck + \Msg{Ignorring not existing optional file `#1'.}% + \expandafter\@gobbletwo + \else + \immediate\closein\inputcheck + \expandafter\from + \fi + {#1}% +} + +\process@first@batchfile +\endinput +% +% end of file `scrdocstrip.tex' diff --git a/macros/latex/contrib/koma-script/scrextend.dtx b/macros/latex/contrib/koma-script/scrextend.dtx new file mode 100644 index 0000000000..adaf4fed8e --- /dev/null +++ b/macros/latex/contrib/koma-script/scrextend.dtx @@ -0,0 +1,249 @@ +% \iffalse meta-comment +% ====================================================================== +% scrextend.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrextend.dtx 3874 2022-06-05 10:38:02Z kohm $ +%%%% (run: preidentify) +%%%% (run: prepare) +% +% \end{macrocode} +% +% +% \subsection{Package identification} +% +% We use the major \KOMAScript{} version for this package, because it uses +% several main parts of the classes of the same version. +% +% \begin{macrocode} +%<*identify> +\ProvidesPackage{scrextend}[% +%!KOMAScriptVersion + package (extend other classes with features of KOMA-Script classes)% +] +% +% \end{macrocode} +% +% +% \subsection{Preparation of options} +% +% The preparation state is used before the option handling. To allow +% definition of optional features. Such definitions are used in other parts of +% the \KOMAScript{} classes. For example \file{scrkernel-title.dtx} defines +% the \optvalue{title} \opt{feature}. +% +% Note: The method used here is very fragile, i.\,e., the definition of +% feature code with arguments needs to be adapted for \pkg{scrextend}. So +% there is a big fat +% \begin{description} +% \item[ToDo:] Reimplementation of the optional features should simplify the +% definition of such features a lot in other files. Best would be to have a +% kind of start command and a kind of end command without the need to change +% anything in between, if the package instead of a class is defined. But +% this is hard to reach, because of usage of \cs{ClassError} +% vs. \cs{PackageError}, \cs{ClassWarning} vs. \cs{PackageWarning}. So at +% least these commands have to be dependent. Nevertheless the need to +% change, e.g., |#1| into |##1|, |#2| into |##2| etc. for \pkg{scrextend} is +% annoying. Moreover the whole usage of \cs{scr@extend@activate@\dots} and +% \cs{sr@extend@immediate@\dots} is very complicated and currently I'm even +% not sure, that is always works as expected. Maybe a less complicated +% feature implementation could be found. +% \end{description} +% +% \begin{macro}{\scr@ext@activate,\scr@ext@activateable, +% \scr@ext@addto@activateable} +% One special feature of this package is, to provide some \KOMAScript{} +% features only, if they have been activated explicitly. To do so +% \begin{quote} +% \cs{scr@ext@activateable}\marg{feature}\marg{definition} +% \end{quote} +% is used. This macro defines \cs{scr@ext@activate@\meta{feature}}. There is +% also a +% \begin{quote} +% \cs{scr@ext@addto@activateable}\marg{feature}\marg{definition} +% \end{quote} +% that does append \meta{definition} to the already existing code of +% \cs{scr@act@activate@\meta{feature}}, if it already exists, or define it +% new, if is does not exist already. +% \begin{quote} +% \cs{scr@ext@activate}\marg{feature} +% \end{quote} +% is used to \emph{activate} a \meta{feature}. That means: If there is a +% \cs{scr@ext@activate@\meta{feature}} it is executed and afterwards +% \cs{scr@ext@activate@\meta{feature}} is destroyed making it \cs{relax}. But +% if there is not yet a \cs{scr@ext@activate@\meta{feature}} a +% \cs{scr@ext@immediate@\meta{feature}} is defined. The definition of this +% is, to redefine itself to be \cs{scr@ext@activate@\meta{feature}}. +% \begin{macrocode} +%<*prepare> +\newcommand*{\scr@ext@activate}[1]{% + \scr@ifundefinedorrelax{scr@ext@activate@#1}{% + \@namedef{scr@ext@immediate@#1}{% + \expandafter\let\csname scr@ext@immediate@#1\endcsname\relax + \csname scr@ext@activate@#1\endcsname + }% + }{% + \csname scr@ext@activate@#1\endcsname + \expandafter\let\csname scr@ext@activate@#1\endcsname\relax + }% +} +\newcommand*{\scr@ext@activateable}[1]{% + \expandafter\newcommand\expandafter*\csname scr@ext@activate@#1\endcsname +} +\newcommand*{\scr@ext@addto@activateable}[1]{% + \scr@ifundefinedorrelax{scr@ext@activate@#1}{% + \expandafter\newcommand\expandafter*\csname scr@ext@activate@#1\endcsname + }{% + \expandafter\g@addto@macro\csname scr@ext@activate@#1\endcsname + }% +} +% +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Options} +% +% Now, after the preparation, the universal option that enables optional +% features can defined. This option can be used while loading the package +% only. Later activation of features is currently not supported. +% +% \begin{option}{extendedfeature} +% \changes{v3.12}{2013/03/05}{using state signaling with \cs{FamilyKeyState}} +% \changes{v3.17}{2015/03/09}{internal value storage} +% \begin{macrocode} +%<*option> +\KOMA@key{extendedfeature}{% + \scr@ext@activate{#1}% + \AtEndOfPackage{% + \scr@ifundefinedorrelax{scr@ext@immediate@#1}{}{% + \PackageWarningNoLine{unkown extended feature `#1'\MessageBreak + You have used option `extendedfeature' to\MessageBreak + activate an extended feature `#1',\MessageBreak + but there is no such extended feature.\MessageBreak + See the KOMA-Script manual for more\MessageBreak + information about known activatable\MessageBreak + extended features% + }% + }% + }% + \FamilyKeyStateProcessed + \KOMA@kav@xadd{.scrextend.sty}{extendedfeature}{#1}% +} +\AtEndOfPackage{% + \KOMA@key{extendedfeature}{% + \def\FamilyKeyState{Option `extendedfeature' too late}% + }% +} +% +% \end{macrocode} +% \end{option} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: + diff --git a/macros/latex/contrib/koma-script/scrhack.dtx b/macros/latex/contrib/koma-script/scrhack.dtx new file mode 100644 index 0000000000..a656ed6fa3 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrhack.dtx @@ -0,0 +1,1954 @@ +% \iffalse meta-comment +% ====================================================================== +% scrhack.dtx +% Copyright (c) Markus Kohm, 2008-2022 +% +% 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.md. +% +% To create `scrhack.sty' run `tex scrhack.dtx'. Using LaTeX instead +% of TeX would generate the implementation documentation. +% ====================================================================== +%%% From File: $Id: scrhack.dtx 3889 2022-06-09 12:11:14Z kohm $ +%%%% using: package,identify +%%%% using: package,option +%%%% using: package,body +%\NeedsTeXFormat{LaTeX2e}[1995/06/01] +%<*dtx> +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\begingroup + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2022-06-09 14:11:14 +0200 (Do, 09. Jun 2022) $ + \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} + \filerevision$Revision: 3889 $ +\endgroup +\ProvidesFile{scrhack.dtx}[\filedate\space\filerevision\space +% +%\ProvidesPackage{scrhack}[% +%\ProvidesFile{hyperref.hak}[% +%\ProvidesFile{float.hak}[% +%\ProvidesFile{floatrow.hak}[% +%\ProvidesFile{listings.hak}[% +%\ProvidesFile{setspace.hak}[% +%\ProvidesFile{lscape.hak}[% +%\ProvidesFile{nomencl.hak}[% +%\ProvidesFile{standardsections.hak}[% +%<*dtx|identify> +%!KOMAScriptVersion +%<*dtx> + source of +% +%<*dtx|package> + package (hacking other packages)% +% +%<*hack> +% scrhack part +% (hacking package +% hyperref)% +% float)% +% floatrow)% +% listings)% +% setspace)% +% lscape)% +% nomencl)% +% (defining standard LaTeX class section headings)% +% +] +% +%<*dtx> +\ifx\documentclass\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHTFROM}{2008} + \generate{\usepreamble\defaultpreamble + \file{scrhack.sty}{% + \from{scrkernel-version.dtx}{package,scrhack}% + \from{scrhack.dtx}{package,identify}% + \from{scrkernel-basics.dtx}{load}% + \from{scrhack.dtx}{package,option}% + \from{scrhack.dtx}{package,body}% + \from{scrlogo.dtx}{logo}% + }% + \file{hyperref.hak}{% + \from{scrkernel-version.dtx}{file,hyperref.hak}% + \from{scrhack.dtx}{hack,hyperref,identify}% + \from{scrhack.dtx}{hack,hyperref,body}% + }% + \file{float.hak}{% + \from{scrkernel-version.dtx}{file,float.hak}% + \from{scrhack.dtx}{hack,float,identify}% + \from{scrhack.dtx}{hack,float,body}% + }% + \file{floatrow.hak}{% + \from{scrkernel-version.dtx}{file,floatrow.hak}% + \from{scrhack.dtx}{hack,floatrow,identify}% + \from{scrhack.dtx}{hack,floatrow,body}% + }% + \file{listings.hak}{% + \from{scrkernel-version.dtx}{file,listings.hak}% + \from{scrhack.dtx}{hack,listings,identify}% + \from{scrhack.dtx}{hack,listings,body}% + }% + \file{setspace.hak}{% + \from{scrkernel-version.dtx}{file,setspace.hak}% + \from{scrhack.dtx}{hack,setspace,identify}% + \from{scrhack.dtx}{hack,setspace,body}% + }% + \file{lscape.hak}{% + \from{scrkernel-version.dtx}{file,lscape.hak}% + \from{scrhack.dtx}{hack,lscape,identify}% + \from{scrhack.dtx}{hack,lscape,body}% + }% + \file{nomencl.hak}{% + \from{scrkernel-version.dtx}{file,nomencl.hak}% + \from{scrhack.dtx}{hack,nomencl,identify}% + \from{scrhack.dtx}{hack,nomencl,body}% + }% + \file{standardsections.hak}{% + \from{scrkernel-version.dtx}{file,standardsections.hak}% + \from{scrhack.dtx}{hack,standardsections,identify}% + \from{scrhack.dtx}{hack,standardsections,body}% + }% + } + \@@input scrstrop.inc +\else + \let\endbatchfile\relax +\fi +\endbatchfile +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\setcounter{StandardModuleDepth}{2} +\begin{document} + \DocInput{scrhack.dtx} +\end{document} +% +%\fi +% +% \changes{v3.03}{2009/03/12}{first version ever} +% \changes{v3.36}{2022/02/08}{switch over from \cls*{scrdoc} to +% \cls*{koma-script-source-doc}} +% \changes{v3.36}{2022/02/08}{require package \pkg*{scrlogo} instead of +% defining \cs{KOMAScript}} +% \changes{v3.36}{2022/02/08}{whole implementation documentation in English} +% +% \GetFileInfo{scrhack.dtx} +% \title{Patching Third-Party Packages using +% \href{https://komascript.de}{\KOMAScript} Package \pkg*{scrhack}} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Revision \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% Some packages from other authors may have problems with \KOMAScript{}. In +% my opinion some packages could be improved. With some packages this makes +% only sense, if \KOMAScript{} was used. With some other packages the +% package author has another opinion. Sometimes proposals was never +% answered. Package \pkg*{scrhack} contains all those improvement proposals +% for other packages. This means, \pkg*{scrhack} redefines macros of packages +% from other authors! The redefinitions are only activated, if those +% packages were loaded. Users may prevent \pkg*{scrhack} from redefining +% macros of individual packages. +% \end{abstract} +% \tableofcontents +% +% \section{User Manual} +% +% You can find the user manuals of \pkg*{scrhack} in the \KOMAScript{} manual, +% either the German \file{scrguide} or the English \file{scrguien}. +% +% \MaybeStop{\PrintIndex} +% +% \section{Implementation of \pkg*{scrhack}} +% +% \changes{v3.04b}{2009/08/05}{order of commands/macros and options changed} +% +% \subsection{Optionen} +% +% The package uses \cs{KOMAoptions} of \pkg*{scrkbase}, which is loaded by +% (virtual) \file{scrkbase.ins}. +% +% The options allow the selection of the used manipulations of other +% packages. But all these options are valid only until both \pkg*{scrhack} and +% the other package has been loaded. Later settings are invalid. +% +% +% \subsection{Used Macros and Commands} +% \label{sec:macros} +% \begin{macrocode} +%<*package&body> +% \end{macrocode} +% +% \begin{macro}{\scr@ifexpected} +% Mentioned to do (re)definitions only, if local execution of code does not +% change a command. Concrete, if (local) execution of \marg{test code} of +% \begin{quote} +% \cs{scr@ifexpected}\marg{command}\marg{test code}\marg{then +% code}\marg{else code} +% \end{quote} +% would not result in a change of \cs{\meta{command}}, the \marg{then code} +% will be executed, otherwise the \marg{else code}. +% \begin{description}\item[Note:] \meta{test code} must not have any global +% side effect!\end{description} +% \begin{macrocode} +\newcommand{\scr@ifexpected}[2]{% + \begingroup + \let\@tempa#1 + #2 + \ifx\@tempa#1 + \aftergroup\@firstoftwo + \else + \aftergroup\@secondoftwo + \fi + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\scr@hack@load} +% Conditionally loading of a hack file. +% \begin{quote} +% \cs{scr@hack@load}\marg{extension}\marg{basename}\marg{hack}% +% \marg{true code}\marg{false code} +% \end{quote} +% The first two arguments \marg{} and \marg{extension} and \marg{basename} are +% same to the internal\LaTeX{} kernel command \cs{@ifl@aded}. With \LaTeX{} +% from 2021/11/15 we even could use \cs{@ifl@aded} for the test, because it is +% not restricted to the preamble any more. But because it is restricted with +% older \LaTeX{} kernels, we test the definition of +% \cs{ver@}\meta{basename}\texttt{.}\meta{extension}. If it is defined, we +% also test the definition of \cs{ver@}\meta{basename}\texttt{.hak}. If this +% is not defined, \file{\meta{hack}.hak} is loaded and \meta{true code} is +% executed. Otherwise \meta{false code} is executed. This means: A hack file +% is only loaded, if a class or package (or other file with version) has +% already been loaded, but the hack file has not already been loaded. +% \begin{macrocode} +\newcommand*{\scr@hack@load}[2]{% + \expandafter\ifx\csname ver@#2.#1\endcsname\relax + \expandafter\@secondoftwo + \else +% \end{macrocode} +% Load a hack only once. +% \begin{macrocode} + \expandafter\ifx\csname ver@#2.hak\endcsname\relax + \expandafter\expandafter\expandafter\@firstoftwo + \else + \expandafter\expandafter\expandafter\@secondoftwo + \fi + \fi + {% + \PackageInfo{scrhack}{loading #2 hack}% + \edef\reserved@a{% + \noexpand\makeatletter\noexpand\input{#2.hak}% + \noexpand\catcode`\noexpand\@\the\catcode`\@\relax + }\reserved@a + }{% + \PackageInfo{scrhack}{ignorring #2 hack}% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \subsection{The \pkg*{hyperref} hack} +% +% Package \pkg{hyperref} places the anchor of the star variant of a heading +% after the heading, but the anchor of the normal variant before the heading +% even if the heading is not numbered because of the value of +% \cnt{secnumdepth}. The hack changes this to more consistent placing always +% before the heading. +% +% \begin{option}{hyperref} +% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}} +% \changes{v3.17}{2015/03/09}{defaults by \cs{KOMAExecuteOptions}} +% \begin{macrocode} +%<*package&option> +\KOMA@ifkey{hyperref}{@scrhack@hyperref}% +\KOMAExecuteOptions{hyperref=true}% +% +% \end{macrocode} +% \changes{v3.04b}{2009/11/09}{loading \pkg{hyperref} hack earlier} +% \changes{v3.17}{2015/03/09}{auto deactivation for newer versions of +% \pkg{hyperref}} +% \changes{v3.18}{2015/05/22}{newer versions of \KOMAScript{} classes also +% deactivate the the hack} +% This is a little bit tricky, because \pkg{hyperref} loads the driver file +% via \cs{AtEndOfPackage} and the hack cannot be loaded before loading the +% driver file. Using \cs{AfterPackage*} would not be good enough therefore, +% because it would load the hack before the driver file. But using +% \cs{AtEndOfPackage} inside \cs{AfterPackage*} should delay the loading +% enough. This also works, if \pkg{hyperref} has already been loaded. In this +% case the code will be executed at the end of \pkg*{scrhack} instead of +% \pkg{hyperref}. This is no problem. +% \begin{macrocode} +%<*package&body> +\BeforePackage{hyperref}{% + \scr@ifundefinedorrelax{hy@insteadofrefstepcounter}{}{% + \PackageInfo{scrhack}{hyperref hack deactivated because of\MessageBreak + detection of KOMA-Script class, that doesn't\MessageBreak + need that hack,}% + \KOMAExecuteOptions[.scrhack.sty]{hyperref=false}% + }% +} +\AfterPackage*{hyperref}{% + \if@scrhack@hyperref + \@ifpackagelater{hyperref}{2009/11/24}{% + \PackageInfo{scrhack}{hyperref hack deactivated because of\MessageBreak + detection of hyperref version, that doesn't\MessageBreak + need that hack,}% + \KOMAExecuteOptions[.scrhack.sty]{hyperref=false}% + }{% + \AtEndOfPackage{% + \KOMA@key[.scrhack.sty]{hyperref}{% + \PackageWarning{scrhack}{option `hyperref=#1' ignored}% + \FamilyKeyStateProcessed + }% + \if@scrhack@hyperref\scr@hack@load\@pkgextension{hyperref}\fi + }% + }% + \fi +} +% +% \end{macrocode} +% \end{option} +% +% +% \begin{macro}{\@schapter,\@spart,\@ssect} +% We do not hack \pkg{hyperref} itself, but the driver files. After loading +% \pkg{hyperref} the driver file is also loaded. Moreover, all driver files +% that re-define these commands have to be patched also. So the patch is +% related to the loading of \pkg{hyperref} instead of every single driver +% file. This have already been tested by \cs{scr@hack@load}. So we just have +% to test, whether the definition of these commands are the expected one. +% derzeit den erwarteten Inhalt haben. +% \begin{macrocode} +%<*hyperref&body> +\scr@ifexpected\@schapter{% + \def\@schapter#1{% + \H@old@schapter{#1}% + \begingroup + \let\@mkboth\@gobbletwo + \Hy@GlobalStepCount\Hy@linkcounter + \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}% + \Hy@raisedlink{% + \hyper@anchorstart{\@currentHref}\hyper@anchorend + }% + \endgroup + }% +}{% + \PackageInfo{scrhack}{redefining \string\@schapter}% + \def\@schapter#1{% + \begingroup + \let\@mkboth\@gobbletwo + \Hy@GlobalStepCount\Hy@linkcounter + \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}% + \Hy@raisedlink{% + \hyper@anchorstart{\@currentHref}\hyper@anchorend + }% + \endgroup + \H@old@schapter{#1}% + }% +}{% + \scr@ifexpected\@schapter{% + \def\@schapter#1{% + \begingroup + \let\@mkboth\@gobbletwo + \Hy@GlobalStepCount\Hy@linkcounter + \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}% + \Hy@raisedlink{% + \hyper@anchorstart{\@currentHref}\hyper@anchorend + }% + \endgroup + \H@old@schapter{#1}% + }% + }{}{% + \PackageWarningNoLine{scrhack}{unknown \string\@schapter\space + definition found!\MessageBreak + Maybe you are using a unsupported hyperref version}% + }% +} +\scr@ifexpected\@spart{% + \def\@spart#1{% + \H@old@spart{#1}% + \Hy@GlobalStepCount\Hy@linkcounter + \xdef\@currentHref{part*.\the\Hy@linkcounter}% + \Hy@raisedlink{% + \hyper@anchorstart{\@currentHref}\hyper@anchorend + }% + }% +}{% + \PackageInfo{scrhack}{redefining \string\@spart}% + \def\@spart#1{% + \Hy@GlobalStepCount\Hy@linkcounter + \xdef\@currentHref{part*.\the\Hy@linkcounter}% + \Hy@raisedlink{% + \hyper@anchorstart{\@currentHref}\hyper@anchorend + }% + \H@old@spart{#1}% + }% +}{% + \scr@ifexpected\@spart{% + \def\@spart#1{% + \Hy@GlobalStepCount\Hy@linkcounter + \xdef\@currentHref{part*.\the\Hy@linkcounter}% + \Hy@raisedlink{% + \hyper@anchorstart{\@currentHref}\hyper@anchorend + }% + \H@old@spart{#1}% + }% + }{}{% + \PackageWarningNoLine{scrhack}{unknown \string\@spart\space + definition found!\MessageBreak + Maybe you are using a unsupported hyperref version}% + }% +} +\scr@ifexpected\@ssect{% + \def\@ssect#1#2#3#4#5{% + \H@old@ssect{#1}{#2}{#3}{#4}{#5}% + \phantomsection + }% +}{% + \PackageInfo{scrhack}{redefining \string\@ssect}% + \def\@ssect#1#2#3#4#5{% + \H@old@ssect{#1}{#2}{#3}{#4}{\phantomsection\ignorespaces#5}% + }% +}{% + \scr@ifexpected\@ssect{% + \def\@ssect#1#2#3#4#5{% + \H@old@ssect{#1}{#2}{#3}{#4}{\phantomsection\ignorespaces#5}% + }% + }{}{% + \PackageWarningNoLine{scrhack}{unknown \string\@ssect\space + definition found!\MessageBreak + Maybe you are using a unsupported hyperref version}% + }% +} +% +% \end{macrocode} +% \end{macro} +% +% +% \subsection{The \pkg*{floatrow} hack} +% +% Package \pkg{floatrow} insists in using \cs{float@listhead} for the setting +% of the headings. This is not recommended any longer since \KOMAScript~2.95 +% from July 2006! The \KOMAScript{} classes will remove the support for +% this very limited approach. Recommended is the usage of \pkg*{tocbasic}. The +% effort to do so, it very small and I do not understand, why package authors +% are not willing to use it. Because the benefit would be a lot. +% +% This hack adds \pkg*{tocbasic} usage to \pkg{floatrow}. Nevertheless it is +% more complicated than adding \pkg*{tocbasic} support into \pkg{floatrow}. +% +% \begin{option}{floatrow} +% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}} +% \changes{v3.17}{2015/03/09}{using \cs{KOMAExecuteOptions}} +% \changes{v3.34}{2021/06/03}{deactivation of the \pkg{float} hack} +% \begin{macrocode} +%<*package&option> +\KOMA@ifkey{floatrow}{@scrhack@floatrow} +\KOMAExecuteOptions{floatrow=true} +% +%<*package&body> +\AfterPackage*{floatrow}{% + \KOMAoptions{float=false}% + \PackageInfo{scrhack}{option `float' deactivated}% + \KOMA@key[.scrhack.sty]{floatrow}{% + \PackageWarning{scrhack}{option `floatrow' ignored}% + \FamilyKeyStateProcessed + }% + \if@scrhack@floatrow\scr@hack@load\@pkgextension{floatrow}\fi +} +% +% \end{macrocode} +% \end{option} +% +% +% \begin{command}{\DeclareNewFloatType,\listof} +% \changes{v3.25}{2018/03/16}{using \cs{DeclareTOCStyleEntry}} +% Command \cs{DeclareNewFloatType} is used to define a new float +% environment. We have to add registration of the file extension (third +% argument) with \pkg*{tocbasic}. +% Command \cs{listof} outputs the list of the float environments. Here we +% just use the corresponding macro of \pkg*{tocbasic}. +% \begin{macro}{\float@addtolists} +% The deprecated macro \cs{float@addtolists} is not needed any longer an will +% be reset to the original definition. +% \begin{macrocode} +%<*floatrow&body> +\scr@ifexpected{\DeclareNewFloatType}{% + \long\def\DeclareNewFloatType#1#2{\def\FB@captype{#1}% + \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}% + \addtocounter{float@type}{\value{float@type}}% + \@namedef{#1name}{#1}\newcounter{#1}% + \expandafter\edef\csname fnum@#1\endcsname + {\expandafter\noexpand\csname #1name\endcsname\nobreakspace + \expandafter\noexpand\csname the#1\endcsname}% + \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}% + \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}% + \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax + \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}% + \@tempa}% +}{% + \scr@ifexpected{\listof}{% + \def\listof#1#2{% + \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{% + \expandafter\providecommand\csname l@#1\endcsname + {\@dottedtocline{1}{1.5em}{2.3em}}% + \float@listhead{#2}% + \begingroup\setlength{\parskip}{\z@}% + \@starttoc{\@nameuse{ext@#1}}% + \endgroup}}% + }{% + \RequirePackage{tocbasic}% + \PackageInfo{scrhack}{redefining \string\DeclareNewFloatType}% +% \end{macrocode} +% \begin{description} +% \item[Note:] It would be better to first test, if the new extension is +% already in use like done at the \pkg{float} hack. But I don't know the +% \pkg{floatrow} code good enough to make such a change! +% \end{description} +% \begin{macrocode} + \renewcommand\DeclareNewFloatType[2]{\def\FB@captype{#1}% + \expandafter\edef\csname ftype@#1\endcsname{\the\c@float@type}% + \addtocounter{float@type}{\value{float@type}}% + \@namedef{#1name}{#1}\newcounter{#1}% + \expandafter\edef\csname fnum@#1\endcsname + {\expandafter\noexpand\csname #1name\endcsname\nobreakspace + \expandafter\noexpand\csname the#1\endcsname}% + \@namedef{the#1}{\arabic{#1}}\flnew@ext{lo#1}\@namedef{fps@#1}{tbp}% + \DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em]{default}{#1}% + \caption@setkeys[floatrow]{newfloat}{#2}\let\FR@tmp=\relax + \xdef\@tempa{\noexpand\flrow@types{\the\flrow@types \FR@tmp{#1}}}% + \@tempa + \xdef\@tempa{\noexpand\addtotoclist[float]{\@nameuse{ext@\FB@captype}}% + \noexpand\setuptoc{\@nameuse{ext@\FB@captype}}{chapteratlist}% + }% + \@tempa + }% + \PackageInfo{scrhack}{redefining \string\listof}% + \renewcommand*\listof[2]{% + \@ifundefined{ext@#1}{\flrow@error{Unknown float style `#1'}}{% + \@ifundefined{l@#1}{\expandafter\let\csname l@#1\endcsname\l@figure + \@ifundefined{l@#1}{% + \DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em] + {default}{#1}% + }{}% + }{}% + \listoftoc[{#2}]{\csname ext@#1\endcsname}% + }% + }% + \scr@ifexpected{\float@addtolists}{% + \long\def\float@addtolists#1{% + \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}% + }{% + \PackageInfo{scrhack}{undefining \string\float@addtolists}% + \let\float@addtolists\relax + }{% + \PackageWarningNoLine{scrhack}{unkown \string\float@addtolists\space + definition found!\MessageBreak + Maybe you are using a unsupported floatrow version}% + }% + }{% + \PackageWarningNoLine{scrhack}{unknown \string\listof\space + definition found!\MessageBreak + Maybe you are using a unsupported floatrow version}% + }% +}{% + \PackageWarningNoLine{scrhack}{unknown \string\DeclareNewFloatType\space + definition found!\MessageBreak + Maybe you are using a unsupported floatrow version}% +} +% +% \end{macrocode} +% \end{macro} +% \end{command} +% +% +% \subsection{The \pkg*{float} hack} +% +% Package \pkg{float} insists in using \cs{float@listhead} for the setting +% of the headings. This is not recommended any longer since \KOMAScript~2.95 +% from July 2006! The \KOMAScript{} classes will remove the support for +% this very limited approach. Recommended is the usage of \pkg*{tocbasic}. The +% effort to do so, it very small and I do not understand, why package authors +% are not willing to use it. Because the benefit would be a lot. +% +% This hack adds \pkg*{tocbasic} usage to \pkg{float}. Nevertheless it is +% more complicated than adding \pkg*{tocbasic} support into \pkg{float}. +% +% \begin{option}{float} +% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}} +% \changes{v3.17}{2015/03/09}{using \cs{KOMAExecuteOptions}} +% \begin{macrocode} +%<*package&option> +\KOMA@ifkey{float}{@scrhack@float}% +\KOMAExecuteOptions{float=true}% +% +%<*package&body> +\AfterPackage*{float}{% + \KOMA@key[.scrhack.sty]{float}{% + \PackageWarning{scrhack}{option `float' ignored}% + \FamilyKeyStateProcessed + }% + \if@scrhack@float\scr@hack@load\@pkgextension{float}\fi +} +% +% \end{macrocode} +% \end{option} +% +% +% \begin{command}{\newfloat} +% \changes{v3.28}{2019/11/19}{\cs{ifattoclist} replaced by +% \cs{Ifattoclist}} +% \changes{v3.25}{2018/03/16}{using \cs{DeclareTOCStyleEntry}} +% We have to add registration of the file extension (third argument of +% \cs{newfloat}) with \pkg*{tocbasic}. +% \begin{command}{\listof} +% Command \cs{listof} outputs the list of the float environments. Here we +% just use the corresponding macro of \pkg*{tocbasic}. +% \begin{macro}{\float@addtolists} +% The deprecated macro \cs{float@addtolists} is not needed any longer an will +% be reset to the original definition. +% \begin{macrocode} +%<*float&body> +\scr@ifexpected{\newfloat}{% + \long\def\newfloat#1#2#3{\@namedef{ext@#1}{#3} + \let\float@do=\relax + \xdef\@tempa{\noexpand\float@exts{\the\float@exts \float@do{#3}}}% + \@tempa + \floatplacement{#1}{#2}% + \@ifundefined{fname@#1}{\floatname{#1}{#1}}{} + \expandafter\edef\csname ftype@#1\endcsname{\value{float@type}}% + \addtocounter{float@type}{\value{float@type}} + \restylefloat{#1}% + \expandafter\edef\csname fnum@#1\endcsname% + {\expandafter\noexpand\csname fname@#1\endcsname{} + \expandafter\noexpand\csname the#1\endcsname} + \@ifnextchar[%] + {\float@newx{#1}}% + {\@ifundefined{c@#1}{\newcounter{#1}\@namedef{the#1}{\arabic{#1}}}% + {}}}% +}{% + \scr@ifexpected{\listof}{% + \def\listof#1#2{% + \@ifundefined{ext@#1}{\float@error{#1}}{% + \@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}% + \float@listhead{#2}% + \begingroup\setlength{\parskip}{\z@}% + \@starttoc{\@nameuse{ext@#1}}% + \endgroup}}% + }{% + \RequirePackage{tocbasic}% + \PackageInfo{scrhack}{redefining \string\newfloat}% + \renewcommand\newfloat[3]{% + \Ifattoclist{#3}{% + \PackageError{scrhack}{extension `#3' already in use}{% + Each extension may be used only once.\MessageBreak + You, the class, or another package already uses extension + `#3'.\MessageBreak + \string\newfloat\space command will be ignored!}% + }{% + \addtotoclist[float]{#3}% + \setuptoc{#3}{chapteratlist}% + \@namedef{ext@#1}{#3}% + \let\float@do=\relax + \xdef\@tempa{\noexpand\float@exts{\the\float@exts \float@do{#3}}}% + \@tempa + \floatplacement{#1}{#2}% + \@ifundefined{fname@#1}{\floatname{#1}{#1}}{}% + \expandafter\edef\csname ftype@#1\endcsname{\value{float@type}}% + \addtocounter{float@type}{\value{float@type}} + \restylefloat{#1}% + \expandafter\edef\csname fnum@#1\endcsname% + {\expandafter\noexpand\csname fname@#1\endcsname{} + \expandafter\noexpand\csname the#1\endcsname}% + \@ifnextchar[%] + {\float@newx{#1}}% + {\@ifundefined{c@#1}{\newcounter{#1}\@namedef{the#1}{\arabic{#1}}}% + {}}}% + }% + \PackageInfo{scrhack}{redefining \string\listof}% + \renewcommand*\listof[2]{% + \@ifundefined{ext@#1}{\float@error{#1}}{% + \@ifundefined{l@#1}{\expandafter\let\csname l@#1\endcsname\l@figure + \@ifundefined{l@#1}{% + \DeclareTOCStyleEntry[level=1,numwidth=2.3em,indent=1.5em] + {default}{#1}% + }{}% + }{}% + \listoftoc[{#2}]{\csname ext@#1\endcsname}% + }% + }% + \scr@ifexpected{\float@addtolists}{% + \long\def\float@addtolists#1{% + \def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts}% + }{% + \PackageInfo{scrhack}{undefining \string\float@addtolists}% + \let\float@addtolists\relax + }{% + \PackageWarningNoLine{scrhack}{unkown \string\float@addtolists\space + definition found!\MessageBreak + Maybe you are using a unsupported float version}% + }% + }{% + \PackageWarningNoLine{scrhack}{unknown \string\listof\space + definition found!\MessageBreak + Maybe you are using a unsupported float version}% + }% +}{% + \PackageWarningNoLine{scrhack}{unknown \string\newfloat\space + definition found!\MessageBreak + Maybe you are using a unsupported float version}% +} +% +% \end{macrocode} +% \end{macro} +% \end{command} +% \end{command} +% +% +% \subsection{The \pkg*{listings} hack} +% +% Package \pkg{listing} insists in using \cs{float@listhead} for the setting +% of the headings. This is not recommended any longer since \KOMAScript~2.95 +% from July 2006! The \KOMAScript{} classes will remove the support for +% this very limited approach. Recommended is the usage of \pkg*{tocbasic}. The +% effort to do so, it very small and I do not understand, why package authors +% are not willing to use it. Because the benefit would be a lot. +% +% This hack adds \pkg*{tocbasic} usage to \pkg{listings}. Nevertheless it is +% more complicated than adding \pkg*{tocbasic} support into \pkg{listings}. +% +% \begin{option}{listings} +% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyStateProcessed}} +% \changes{v3.17}{2015/03/09}{using \cs{KOMAExecuteOptions}} +% \begin{macrocode} +%<*package&option> +\KOMA@ifkey{listings}{@scrhack@listings} +\KOMAExecuteOptions{listings=true} +% +%<*package&body> +\AfterPackage*{listings}{% + \KOMA@key[.scrhack.sty]{listings}{% + \PackageWarning{scrhack}{option `listings' ignored}% + \FamilyKeyStateProcessed + }% + \if@scrhack@listings\scr@hack@load\@pkgextension{listings}\fi +} +% +% \end{macrocode} +% \end{option} +% +% +% \begin{macro}{\scr@do@hack@listings} +% \begin{command}{\lstlistoflistings} +% \cs{scr@do@hack@listings} patches \pkg{listings} to use \pkg*{tocbasic} for +% the whole output of the list of listings. This adds several new features to +% \pkg{listings}. +% \begin{macro}{\float@addtolists} +% The deprecated macro \cs{float@addtolists} is not needed any longer an will +% be reset to the original definition. But, because \pkg{listings} delays the +% redefinition with \cs{AtBeginDocument} we have to do the same here. +% \begin{macrocode} +%<*listings&body> +\newcommand*{\scr@do@hack@listings}{% + \RequirePackage{tocbasic}% + \addtotoclist[float]{lol}% + \setuptoc{lol}{chapteratlist}% + \PackageInfo{scrhack}{redefining \string\lstlistoflistings}% + \renewcommand*{\lstlistoflistings}{\listoftoc[{\lstlistlistingname}]{lol}}% + \AtBeginDocument{% + \scr@ifexpected{\float@addtolists}{% + \def\float@addtolists##1{\addtocontents{lol}{##1}}% + }{% + \PackageInfo{scrhack}{undefining \string\float@addtolists}% + \let\float@addtolists\relax + }{% + \scr@ifexpected{\float@addtolists}{% + \def\float@addtolists##1{\addtocontents{lol}{##1}% + \orig@float@addtolists{##1}}% + }{% + \PackageInfo{scrhack}{setting \string\float@addtolists\MessageBreak + to \string\orig@float@addtolists}% + \let\float@addtolists\orig@float@addtolists + }{% + \PackageWarningNoLine{scrhack}{unkown \string\float@addtolists\space + definition found!\MessageBreak + Maybe you are using a unsupported listings version}% + }% + }% + }% +% \end{macrocode} +% \begin{macro}{\lst@makecaption} +% \changes{v3.30}{2020/04/01}{setting of \cs{@captype} added} +% From version~3.30 setting of \cs{@captype} to \texttt{lstlisting} is added +% to \cs{lst@makecaption}. This adds support for usage of +% \cs{raggedlstlistingcaption} (if the user or a package author defines +% it). The change is a little bit dangerous, because it will break, if +% \pkg{listings} would add an argument to \cs{lst@makecaption}. +% \begin{macrocode} + \expandafter\def\expandafter\lst@makecaption\expandafter{% + \expandafter\def\expandafter\@captype\expandafter{% + \expandafter l\expandafter s\expandafter t\expandafter l% + \expandafter i\expandafter s\expandafter t\expandafter i% + \expandafter n\expandafter g\expandafter}\lst@makecaption + }% + \let\scr@do@hack@listings\relax +} +\scr@ifexpected{\lstlistoflistings}{% + \def\lstlistoflistings{\bgroup + \let\contentsname\lstlistlistingname + \let\lst@temp\@starttoc \def\@starttoc##1{\lst@temp{lol}}% + \tableofcontents \egroup}% +}{% + \scr@do@hack@listings +}{% + \scr@ifexpected{\lstlistoflistings}{% + \def\lstlistoflistings{% + \begingroup + \@ifundefined{@restonecoltrue}{}{% + \if@twocolumn + \@restonecoltrue\onecolumn + \else + \@restonecolfalse + \fi + }% + \float@listhead{\lstlistlistingname}% + \parskip\z@\parindent\z@\parfillskip \z@ \@plus 1fil% + \@starttoc{lol}% + \@ifundefined{@restonecoltrue}{}{% + \if@restonecol\twocolumn\fi + }% + \endgroup + }% + }{% + \scr@do@hack@listings + }{% + \PackageWarningNoLine{scrhack}{unknown \string\lstlistoflistings\space + definition found!\MessageBreak + Maybe you are using a unsupported listings version}% + }% +} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{command} +% \end{macro} +% +% +% +% \subsection{The \pkg*{nomencl} hack} +% +% With package \pkg{nomencl} and the \KOMAScript{} classes there is only a +% small disharmony between relating the ToC entry. Nevertheless the package +% can benefit from using \pkg*{tocbasic}. +% +% This hack adds \pkg*{tocbasic} usage to \pkg{nomencl}. This is done using +% \pkg{xpatch} Nevertheless it is much more complicated than adding real +% \pkg*{tocbasic} support into \pkg{nomencl}. The mess is, that every new +% release of \pkg{nomencl} changes the kind of ``support'' of +% \pkg*{tocbasic}. For some versions there isn't any such support. Other +% versions use \pkg*{tocbasic} if it has been loaded. Other versions need an +% option to activate usage of \pkg*{tocbasic}. So don't expect that the +% following hack does the correct thing for every version of \pkg{nomencl}! +% +% \begin{option}{nomencl} +% \changes{v3.23}{2017/03/31}{added} +% \begin{macrocode} +%<*package&option> +\RequirePackage{xpatch}% +\KOMA@ifkey{nomencl}{@scrhack@nomencl} +\KOMAExecuteOptions{nomencl=true} +% +%<*package&body> +\AfterPackage*{nomencl}{% + \KOMA@key[.scrhack.sty]{nomencl}{% + \PackageWarning{scrhack}{option `nomencl' ignored}% + \FamilyKeyStateProcessed + }% + \if@scrhack@nomencl\scr@hack@load\@pkgextension{nomencl}\fi +} +% +% \end{macrocode} +% \end{option}^^A nomencl +% +% \begin{command}{\thenomenclature} +% \changes{v3.23}{2017/03/31}{added} +% Instead of using the several definitions by cases of the several versions of +% \pkg{nomencl} we use a patch, that should remove all such cases and use +% \pkg*{tocbasic} always. +% \begin{macrocode} +%<*nomencl&body> +\RequirePackage{tocbasic} +% \end{macrocode} +% With \pkg{nomencl} > 5.0 this should be all. +% Unfortunately is isn't, because newer versions of \pkg{nomencl} need option +% \opt{tocbasic} to be set. Good luck: It is the default. So the chances +% are good, that with new versions of \pkg{nomencl} usage of \pkg*{tocbasic} is +% the default. +% \begin{macrocode} +\@ifpackagelater{nomencl}{2019/01/01}{% + \PackageInfo{scrhack}{only `tocbasic' loaded for `nomencl'}% + \expandafter\endinput +}{} +% \end{macrocode} +% Otherwise we have to patch it. +% \begin{macrocode} +\addtotoclist[nomencl]{nlo} +\addtotoclist[nomencl]{nls} +\xpatchcmd{\thenomenclature}{% + \@ifundefined{chapter}% + { + \section*{\nomname} + \if@intoc\addcontentsline{toc}{section}{\nomname}\fi% + }% + { + \chapter*{\nomname} + \if@intoc\addcontentsline{toc}{chapter}{\nomname}\fi% + }% +}{% + \scr@hack@nomencl@head +}{% + \PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}% +}{% +% \end{macrocode} +% \changes{v3.26b}{2019/01/23}{new \pkg{nomencl} 5.0} +% From \pkg{nomencl} 5.0 another code is used if the nomenclature is a +% chapter. So we need another patch: +% \begin{macrocode} + \xpatchcmd{\thenomenclature}{% + \@ifundefined{chapter}% + { + \section*{\nomname} + \if@intoc\addcontentsline{toc}{section}{\nomname}\fi% + }% + { + \chapter*{\nomname} + \markboth{\nomname}{\nomname}% + \if@intoc\addcontentsline{toc}{chapter}{\nomname}\fi% + }% + }{% + \scr@hack@nomencl@head + }{% + \PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}% + }{% +% \end{macrocode} +% \changes{v3.26b}{2019/01/23}{prepared for hoply comming \pkg{nomencl}} +% But this code is also wrong, because it breaks manual running heads, e.g., +% of page style \texttt{myheadings}. So I hope, there will be another code, +% that needs a somehow different patch: +% \begin{macrocode} + \xpatchcmd{\thenomenclature}{% + \@ifundefined{chapter}% + { + \section*{\nomname} + \if@intoc\addcontentsline{toc}{section}{\nomname}\fi% + }% + { + \chapter*{\nomname} + \@mkboth{\nomname}{\nomname}% + \if@intoc\addcontentsline{toc}{chapter}{\nomname}\fi% + }% + }{% + \scr@hack@nomencl@head + }{% + \PackageInfo{scrhack}{\string\thenomenclature\space successfully patched}% + }{% +% \end{macrocode} +% \changes{v3.25}{2019/01/23}{emergency patch added} +% \changes{v3.30}{2020/02/25}{spurious space in warning message removed} +% If this also does not work, we try an emergency patch, that could break +% things. +% \begin{macrocode} + \xpatchcmd{\thenomenclature}{% + \@ifundefined{chapter}% + }{% + \scr@hack@nomencl@head + \@gobbletwo + }{% + \PackageWarning{scrhack}{% + using emergency patch of \string\thenomenclature.\MessageBreak + This could happen if you are using an unknown\MessageBreak + release of package `nomencl'.\MessageBreak + Mostly this patch does work too, but it also could\MessageBreak + break `nomencl`. If this happens, please deactivate\MessageBreak + the `nomencl` hack of `scrhack`% + }% + }{% + \PackageWarning{scrhack}{% + cannot patch \string\thenomenclature.\MessageBreak + This could happen if you are using an unknown\MessageBreak + release of package `nomencl'% + }% + }% + }% + }% +} +% +% \end{macrocode} +% \end{command}^^A \thenomenclature +% +% \begin{macro}{\scr@hack@nomencl@head} +% \changes{v3.23}{2017/03/31}{heading of \env{thenomenclature} by +% \pkg*{tocbasic}} +% \changes{v3.31}{2020/07/08}{internal \cs{list@fname} eliminated} +% We don't need an extra group, because \env{thenomenclature} already adds the +% group. +% \begin{macrocode} +%<*nomencl&body> +\newcommand*{\scr@hack@nomencl@head}{% + \providecommand*{\listofnlsname}{\nomname}% + \def\@currext{nls}% + \tocbasic@listhead{\nomname}% +} +% +% \end{macrocode} +% \begin{description} +% \item[Note:] Only the heading hooks of \pkg*{tocbasic} are used. The other +% hooks can be set, but would never be used! +% \end{description} +% \end{macro}^^A \scr@hack@nomencl@head +% +% \begin{macro}{\if@intoc} +% \changes{3.23}{2017/03/31}{support of \cs{if@intoc}} +% Generally we have to support \pkg{nomencl}'s option \opt{intoc} and the +% switch \cs{if@intoc}. This is done by (un-)setting \pkg*{tocbasic} feature +% \texttt{totoc}. So additional changes of the feature can be done at first +% after loading both, \pkg{nomencl} and \pkg*{scrhack}. Moreover, later changes +% of \cs{if@intoc} are not recognized. +% \begin{macrocode} +%<*nomencl&body> +\if@intoc + \setuptoc{nls}{totoc} +\fi +% +% \end{macrocode} +% \end{macro} +% +% +% \subsection{The \pkg*{setspace} hack} +% +% Package \pkg{setspace} internally uses \cs{@ptsize} in a way, that only +% works as long as \cs{@ptsize} is an integer. But because \KOMAScript{} +% supports non integer font sizes, \cs{@ptsize} can also contain non-integer +% values. Moreover for \opt{11pt}, \LaTeX{} does not use a 11\,pt font but +% a 10.95\,pt font with a \len{baselineskip} of 13.6\,pt, the correct factor +% for, e.g., \cs{onehalfspacing} would be: +% \[ 10{,}95\,\mathrm{pt} \dot 1{,5} / 13{,}6\,\mathrm{pt} \equiv 1{,}208 \] +% But \pkg{setspace} uses 1.213, which would be correct for 11\,pt. Moreover +% the factor is always relative to the base font size and not the current font +% size. Because of this +% \begin{verbatim} +% \documentclass[10pt]{article} +% \usepackage{setspace} +% \begin{document} +% \large\onehalfspacing\raggedright +% Fontsize: \csname f@size\endcsname pt\\ +% Normal baselineskip: \csname f@baselineskip\endcsname\\ +% baselineskip: \the\baselineskip +% \end{document} +% \end{verbatim} +% results in another \len{baselineskip} than: +% \begin{verbatim} +% \documentclass[11pt]{article} +% \usepackage{setspace} +% \begin{document} +% \large\onehalfspacing\raggedright +% Fontsize: \csname f@size\endcsname pt\\ +% Normal baselineskip: \csname f@baselineskip\endcsname\\ +% baselineskip: \the\baselineskip +% \end{document} +% \end{verbatim} +% despite both examples use the same font size. So, to make it absolutely +% correct, the factor would have to change with every change of the font +% size. But the hack also does not do so. It just calculates the factor +% depending on the base font size an the current font size. This is enough to +% have the same \len{baselineskip} with both of the examples above. +% +% \begin{option}{setspace} +% \changes{v3.17}{2015/04/16}{added} +% \begin{macrocode} +%<*package&option> +\KOMA@ifkey{setspace}{@scrhack@setspace} +\KOMAExecuteOptions{setspace=true} +% +%<*package&body> +\AfterPackage*{setspace}{% + \KOMA@key[.scrhack.sty]{setspace}{% + \PackageWarning{scrhack}{option `setspace' ignored}% + \FamilyKeyStateProcessed + }% + \if@scrhack@setspace\scr@hack@load\@pkgextension{setspace}\fi +} +% +% \end{macrocode} +% \end{option} +% +% +% \begin{command}{\onehalfspacing} +% \changes{v3.17}{2015/04/16}{added} +% This selects the one half line spacing. I think, a factor with three digits +% for the decimals should be enough. +% \begin{macrocode} +%<*setspace&body> +\scr@ifexpected{\onehalfspacing}{% + \long\def\onehalfspacing{% + \setstretch{1.25}% default + \ifcase \@ptsize \relax % 10pt + \setstretch {1.25}% + \or % 11pt + \setstretch {1.213}% + \or % 12pt + \setstretch {1.241}% + \fi + }% +}{% + \renewcommand*{\onehalfspacing}{% + \@tempdima=\dimexpr (\f@size pt)*1500/ + (\dimexpr \f@baselineskip\relax)*\p@/1000\relax + \expandafter\setstretch\expandafter{\strip@pt\@tempdima}% + }% +}{% + \PackageWarning{scrhack}{unknown \string\onehalfspacing\space + definition found!\MessageBreak + Maybe you are using a unsupported setpace version}% +} +% \end{macrocode} +% \end{command} +% \begin{command}{\doublespacing} +% \changes{v3.17}{2015/04/16}{new} +% This selects the double line spacing. I think, a factor with three digits +% for the decimals should be enough. +% \begin{macrocode} +\scr@ifexpected{\doublespacing}{% + \long\def\doublespacing{% + \setstretch{1.667}% default + \ifcase \@ptsize \relax % 10pt + \setstretch {1.667}% + \or % 11pt + \setstretch {1.618}% + \or % 12pt + \setstretch {1.655}% + \fi + }% +}{% + \renewcommand*{\doublespacing}{% + \@tempdima=\dimexpr (\f@size pt)*2000/ + (\dimexpr \f@baselineskip\relax)*\p@/1000\relax + \expandafter\setstretch\expandafter{\strip@pt\@tempdima}% + }% +}{% + \PackageWarning{scrhack}{unknown \string\doublespacing\space + definition found!\MessageBreak + Maybe you are using a unsupported setpace version}% +} +% +% \end{macrocode} +% \end{command} +% +% +% \subsection{The \pkg*{lscape} hack} +% \changes{v3.18a}{2015/07/07}{\pkg{lscape} hack added} +% +% The package does change \len{textheight} inside \env{landscape} to the prior +% value of \len{textwidth}, nevertheless is does not change \len{textwidth} to +% the prior value of \len{textheight}. This is at least inconsistent. After +% asking him, David~Carlisle answered, that he does not change +% \len{textwidth}, because this could result in problems. Therefore it is very +% strange, that he does change \cs{textheight}, despite this also to problems, +% e.g., with packages \pkg{showframe} or \pkg*{scrlayer}. So the patch here +% also keeps \len{textheight} unchanged. This also has to take care for +% \pkg{pdflscape}. The patches are done using \pkg{xpatch}. +% +% +% \begin{option}{lscape} +% \changes{v3.18a}{2015/07/07}{added} +% \changes{v3.20}{2016/05/07}{loading \pkg{xpatch} in option part already} +% \begin{macrocode} +%<*package&option> +\RequirePackage{xpatch}% +\KOMA@ifkey{lscape}{@scrhack@lscape}% +\KOMAExecuteOptions{lscape=true}% +% +%<*package&body> +\AfterPackage*{lscape}{% + \if@scrhack@lscape\scr@hack@load\@pkgextension{lscape}\else + \KOMA@key[.scrhack.sty]{lscape}{% + \PackageWarning{scrhack}{option `lscape' ignored}% + \FamilyKeyStateProcessed + }% + \fi +} +% +% \end{macrocode} +% \end{option} +% +% \begin{command}{\landscape} +% \changes{v3.18a}{2015/07/07}{added} +% \changes{v3.20}{2016/05/07}{loading \pkg{xpatch} in option part already} +% This command is the beginning of environment \env{landscape}. This has to be +% patched using \pkg{xpatch}. +% \begin{description} +% \item[Note:] This is a load time option and cannot be changed after loading +% the package! +% \end{description} +% \begin{macrocode} +%<*lscape&body> +\xpatchcmd{\landscape}{\textheight=\vsize}{% + \if@scrhack@lscape +% \end{macrocode} +% \begin{macro}{\@outputpage} +% \changes{v3.18a}{2015/08/11}{added} +% Here the changed value of \len{textheight} is needed for initialization of +% \cs{@colht}. So we patch it to use the new internal \len{scr@LT@textheight} +% instead of \len{textheight}. +% \begin{macrocode} + \scrh@LT@textheight=\vsize + \let\scrh@LT@outputpage\@outputpage + \def\@outputpage{\scrh@LT@outputpage\global\@colht\scrh@LT@textheight}% + \else + \textheight=\vsize + \fi +}{% + \PackageInfo{scrhack}{\string\landscape\space patched to make + \string\textheight\space change optional}% +}{% + \PackageWarning{scrhack}{Cannot patch \string\landscape!\MessageBreak + Maybe you are using a unsupported lscape version}% + \@scrhack@lscapefalse +} +% \end{macrocode} +% \begin{ilength}{\scrh@LT@textheight} +% \changes{v3.18a}{2015/08/11}{new} +% \begin{macrocode} +\newlength{\scrh@LT@textheight} +% +% \end{macrocode} +% \end{ilength}^^A \scrh@LT@textheight +% \end{macro}^^A \@outputpage +% \end{command}^^A \landscape +% +% +% \subsection{The standard classes sections hack} +% \label{sec:standardsections} +% The \emph{standard classes sections hack} differs from each other +% hack. First of all it does not patch a specific package but the class +% definitions of section commands from \cs{part} till +% \cs{subparagraph}. Additionally it resets several internal \LaTeX{} macros +% which are changed by \KOMAScript{} classes to their original +% definition. Last but not least it is not activated by default, but the user +% has to activate it, if he needs it. The hack has more potential to break +% things than to make things better. Because of this, there is not any support +% for using this hack and the hack shows several warning messages. +% +% \begin{option}{standardsections} +% \begin{macrocode} +%<*package&option> +\KOMA@ifkey{standardsections}{@scrhack@standardsections} +\KOMAExecuteOptions{standardsections=false} +% +%<*package&body> +\AtEndOfPackage{% + \if@scrhack@standardsections + \PackageInfo{scrhack}{loading standard classes sections hack}% + \input{standardsections.hak}% + \fi +} +% +% \end{macrocode} +% \end{option}^^A standardsections +% +% \begin{command}{\part,\chapter, +% \section,\subsection,\subsubsection, +% \paragraph,\subparagraph} +% The hack redefines all these commands to a definition copied from the +% standard \LaTeX{} classes version v1.4i. Copyright of this code is by the +% \LaTeX3{} Project. The complete, unmodified code can be found on +% \url{https://ctan.org/tex-archive/macros/latex/base/classes.dtx}. +% \begin{macrocode} +%<*standardsections&body> +\PackageWarningNoLine{scrhack}{% + You are loosing every kind of support because of\MessageBreak + using the dangerous standard classes sections hack!\MessageBreak + This hack can break several classes and packages.\MessageBreak + However, sometimes it is needed to make a\MessageBreak + package work% +}% +\PackageInfo{scrhack}{% + Using code from the standard LaTeX classes.\MessageBreak + For more information about this code and the\MessageBreak + license of this code, please see:\MessageBreak + https://ctan.org/tex-archive/macros/latex/base/classes.dtx +}% +\@ifpackageloaded{hyperref}{% + \PackageWarning{scrhack}{this hack should not be loaded after `hyperref'}% +}{} +\@ifpackageloaded{titlesec}{% + \PackageWarning{scrhack}{this hack should not be loaded after `titlesec'}% +}{} +\@ifpackageloaded{sectsty}{% + \PackageWarning{scrhack}{this hack should not be loaded after `sectsty'}% +}{} +\@ifpackageloaded{sectsty}{% + \PackageWarning{scrhack}{this hack should not be loaded after `sectsty'}% +}{} +\scr@ifundefinedorrelax{chapter}{% +% \end{macrocode} +% It seems to be an article class, so we use the code from +% \href{http://mirrors.ctan.org/macros/latex/base/classes.dtx}{\cls*{article}}. +% \begin{macrocode} + \scr@ifundefinedorrelax{c@part}{\newcounter{part}}{}% + \scr@ifundefinedorrelax{c@section}{\newcounter{section}}{}% + \scr@ifundefinedorrelax{c@subsection}{\newcounter{subsection}[section]}{}% + \scr@ifundefinedorrelax{c@subsubsection}{% + \newcounter{subsubsection}[subsection]}{}% + \scr@ifundefinedorrelax{c@paragraph}{% + \newcounter{paragraph}[subsubsection]}{}% + \scr@ifundefinedorrelax{c@subparagraph}{% + \newcounter{subparagraph}[paragraph]}{}% + \renewcommand\thepart {\@Roman\c@part}% + \renewcommand\thesection {\@arabic\c@section}% + \renewcommand\thesubsection {\thesection.\@arabic\c@subsection}% + \renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection}% + \renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph}% + \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}% + \def\part{% + \if@noskipsec \leavevmode \fi + \par + \addvspace{4ex}% + \@afterindentfalse + \secdef\@part\@spart}% + \def\@part[#1]#2{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + {\parindent \z@ \raggedright + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >\m@ne + \Large\bfseries \partname\nobreakspace\thepart + \par\nobreak + \fi + \huge \bfseries #2% + \markboth{}{}\par}% + \nobreak + \vskip 3ex + \@afterheading}% + \def\@spart#1{% + {\parindent \z@ \raggedright + \interlinepenalty \@M + \normalfont + \huge \bfseries #1\par}% + \nobreak + \vskip 3ex + \@afterheading}% + \def\section{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\normalfont\Large\bfseries}}% + \def\subsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\large\bfseries}}% + \def\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\normalsize\bfseries}}% + \def\paragraph{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus1ex \@minus.2ex}% + {-1em}% + {\normalfont\normalsize\bfseries}}% + \def\subparagraph{\@startsection{subparagraph}{5}{\parindent}% + {3.25ex \@plus1ex \@minus .2ex}% + {-1em}% + {\normalfont\normalsize\bfseries}}% +}{% +% \end{macrocode} +% It seems to be either a book or report class. +% \begin{macrocode} + \scr@ifundefinedorrelax{c@part}{\newcounter{part}}{}% + \scr@ifundefinedorrelax{c@chapter}{\newcounter{chapter}}{}% + \scr@ifundefinedorrelax{c@section}{\newcounter{section}[chapter]}{}% + \scr@ifundefinedorrelax{c@subsection}{\newcounter{subsection}[section]}{}% + \scr@ifundefinedorrelax{c@subsubsection}{% + \newcounter{subsubsection}[subsection]}{}% + \scr@ifundefinedorrelax{c@paragraph}{% + \newcounter{paragraph}[subsubsection]}{}% + \scr@ifundefinedorrelax{c@subparagraph}{% + \newcounter{subparagraph}[paragraph]}{}% + \def\@chapapp{\chaptername}% + \scr@ifundefinedorrelax{frontmatter}{% +% \end{macrocode} +% It seems not to be a book class. +% \begin{macrocode} + \def\part{% + \if@openright + \cleardoublepage + \else + \clearpage + \fi + \thispagestyle{plain}% + \if@twocolumn + \onecolumn + \@tempswatrue + \else + \@tempswafalse + \fi + \null\vfil + \secdef\@part\@spart} + + \def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \huge\bfseries \partname\nobreakspace\thepart + \par + \vskip 20\p@ + \fi + \Huge \bfseries #2\par}% + \@endpart} + \def\@spart#1{% + {\centering + \interlinepenalty \@M + \normalfont + \Huge \bfseries #1\par}% + \@endpart} + \def\@endpart{\vfil\newpage + \if@twoside + \if@openright + \null + \thispagestyle{empty}% + \newpage + \fi + \fi + \if@tempswa + \twocolumn + \fi} + \def\chapter{\if@openright\cleardoublepage\else\clearpage\fi + \thispagestyle{plain}% + \global\@topnum\z@ + \@afterindentfalse + \secdef\@chapter\@schapter} + \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} + \def\@makechapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright \normalfont + \ifnum \c@secnumdepth >\m@ne + \huge\bfseries \@chapapp\space \thechapter + \par\nobreak + \vskip 20\p@ + \fi + \interlinepenalty\@M + \Huge \bfseries #1\par\nobreak + \vskip 40\p@ + }} + \def\@schapter#1{\if@twocolumn + \@topnewpage[\@makeschapterhead{#1}]% + \else + \@makeschapterhead{#1}% + \@afterheading + \fi} + \def\@makeschapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright + \normalfont + \interlinepenalty\@M + \Huge \bfseries #1\par\nobreak + \vskip 40\p@ + }} + \def\section{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\normalfont\Large\bfseries}}% + \def\subsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\large\bfseries}}% + \def\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\normalsize\bfseries}}% + \def\paragraph{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus1ex \@minus.2ex}% + {-1em}% + {\normalfont\normalsize\bfseries}}% + \def\subparagraph{\@startsection{subparagraph}{5}{\parindent}% + {3.25ex \@plus1ex \@minus .2ex}% + {-1em}% + {\normalfont\normalsize\bfseries}}% + }{% +% \end{macrocode} +% It seems to be a book class. +% \begin{macrocode} + \scr@ifundefinedorrelax{if@mainmatter}{% + \expandafter\newif\csname if@mainmatter\endcsname + }{}% + \def\frontmatter{% + \cleardoublepage + \@mainmatterfalse + \pagenumbering{roman}}% + \def\mainmatter{% + \cleardoublepage + \@mainmattertrue + \pagenumbering{arabic}}% + \def\backmatter{% + \if@openright + \cleardoublepage + \else + \clearpage + \fi + \@mainmatterfalse}% + \def\part{% + \if@openright + \cleardoublepage + \else + \clearpage + \fi + \thispagestyle{plain}% + \if@twocolumn + \onecolumn + \@tempswatrue + \else + \@tempswafalse + \fi + \null\vfil + \secdef\@part\@spart}% + + \def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \huge\bfseries \partname\nobreakspace\thepart + \par + \vskip 20\p@ + \fi + \Huge \bfseries #2\par}% + \@endpart}% + \def\@spart#1{% + {\centering + \interlinepenalty \@M + \normalfont + \Huge \bfseries #1\par}% + \@endpart}% + \def\@endpart{\vfil\newpage + \if@twoside + \if@openright + \null + \thispagestyle{empty}% + \newpage + \fi + \fi + \if@tempswa + \twocolumn + \fi}% + \def\chapter{\if@openright\cleardoublepage\else\clearpage\fi + \thispagestyle{plain}% + \global\@topnum\z@ + \@afterindentfalse + \secdef\@chapter\@schapter}% + \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi}% + \def\@makechapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright \normalfont + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \huge\bfseries \@chapapp\space \thechapter + \par\nobreak + \vskip 20\p@ + \fi + \fi + \interlinepenalty\@M + \Huge \bfseries #1\par\nobreak + \vskip 40\p@ + }}% + \def\@schapter#1{\if@twocolumn + \@topnewpage[\@makeschapterhead{#1}]% + \else + \@makeschapterhead{#1}% + \@afterheading + \fi}% + \def\@makeschapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright + \normalfont + \interlinepenalty\@M + \Huge \bfseries #1\par\nobreak + \vskip 40\p@ + }}% + \def\section{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\normalfont\Large\bfseries}}% + \def\subsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\large\bfseries}}% + \def\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\normalsize\bfseries}}% + \def\paragraph{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus1ex \@minus.2ex}% + {-1em}% + {\normalfont\normalsize\bfseries}}% + \def\subparagraph{\@startsection{subparagraph}{5}{\parindent}% + {3.25ex \@plus1ex \@minus .2ex}% + {-1em}% + {\normalfont\normalsize\bfseries}}% + }% +}% End of the derived code. +% \end{macrocode} +% \end{command} +% +% \begin{macro}{\@startsection} +% \KOMAScript{} classes redefine this internal \LaTeX{} kernel macro. In this +% case \cs{scr@saved@startsection} is defined, differs from +% \cs{@startsection} and has the definition found before redefining the +% original macro. We do nothing else but resetting \cs{@startsection} to this +% saved definition. +% \begin{macrocode} +\scr@ifundefinedorrelax{scr@saved@startsection}{}{% + \ifx\@startsection\scr@saved@startsection\else + \PackageWarningNoLine{scrhack}{% + Resetting \string\@startsection,\MessageBreak + because of loading standard classes sections hack% + }% + \let\@startsection\scr@saved@startsection + \fi +} +% \end{macrocode} +% \end{macro}^^A \@startsection +% +% \begin{macro}{\@sect,\@ssect,\@xsect} +% All these should be resetted to their original definitions stored in +% \cs{scr@latex@\dots}. +% \begin{macrocode} +\scr@ifundefinedorrelax{scr@latex@sect}{}{% + \ifx\@sect\scr@latex@sect\else + \PackageWarningNoLine{scrhack}{% + Resetting \string\@sect,\MessageBreak + because of loading standard classes sections hack% + }% + \let\@sect\scr@latex@sect + \fi +} +\scr@ifundefinedorrelax{scr@latex@ssect}{}{% + \ifx\@ssect\scr@latex@ssect\else + \PackageWarningNoLine{scrhack}{% + Resetting \string\@ssect,\MessageBreak + because of loading standard classes sections hack% + }% + \let\@sect\scr@latex@ssect + \fi +} +\scr@ifundefinedorrelax{scr@latex@xsect}{}{% + \ifx\@xsect\scr@latex@xsect\else + \PackageWarningNoLine{scrhack}{% + Resetting \string\@xsect,\MessageBreak + because of loading standard classes sections hack% + }% + \let\@sect\scr@latex@sect + \fi +} +% \end{macrocode} +% \end{macro}^^A \@xsect,\@ssect,\@sect +% +% \begin{command}{\DeclareSectionCommand,\RedeclareSectionCommand, +% \DeclareNewSectionCommand,\ProvideSectionCommand, +% \DeclareSectionCommands,\RedeclareSectionCommands, +% \DeclareNewSectionCommands,\ProvideSectionCommands} +% These \KOMAScript{} commands do not make sense any longer after forced +% redefinition of \cs{part} \dots{} \cs{subparagraph}. They even would not +% work correctly after resetting, e.g., \cs{@startsection}. So best reaction +% is to \emph{undefine} them. +% \begin{macrocode} +\scr@ifundefinedorrelax{DeclareSectionCommand}{}{% + \PackageWarningNoLine{scrhack}{% + \string\DeclareSectionCommand\space + and all derivates deactivated,\MessageBreak + because of loading standard classes sections hack% + }% + \let\DeclareSectionCommand\undefined + \let\DeclareSectionCommands\undefined + \let\RedeclareSectionCommand\undefined + \let\RedeclareSectionCommands\undefined + \let\DeclareNewSectionCommand\undefined + \let\DeclareNewSectionCommands\undefined + \let\ProvideSectionCommand\undefined + \let\ProvideSectionCommands\undefined +} +% \end{macrocode} +% \begin{macro}{\scr@chapter@before@hyperref@patch, +% \scr@chapter@after@hyperref@patch} +% Now, definitions without respecting \pkg{hyperref} are used, so +% \pkg{hyperref} should again be able to patch them. So the hack should +% deactivate the patch deactivation of the \KOMAScript{} classes. +% \begin{macrocode} +\let\scr@chapter@before@hyperref@patch\relax +\let\scr@chapter@after@hyperref@patch\relax +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{macro}{\scr@osectarg} +% The \KOMAScript{} classes use this macro to store how to use the optional +% argument of section commands. But with the standard class definition the +% only possibility is to use it as running head and write it into the table of +% contents without any extended handling. So the only value, that makes sense +% is 0. +% \begin{macrocode} +\scr@ifundefinedorrelax{scr@osectarg}{}{% + \def\reserved@a{0}% + \ifx\scr@osectarg\reserved@a\else + \let\scr@osectarg\reserved@a + \PackageWarningNoLine{scrhack}{% + Extended option handling for section commands deactivated,\MessageBreak + because of loading standard classes sections hack% + }% + \fi +}% +% \end{macrocode} +% \begin{macro}{\scr@activate@xsection} +% Further changing of the value has to be deactivated. +% \begin{macrocode} +\scr@ifundefinedorrelax{scr@activate@xsection}{}{% + \renewcommand*{\scr@activate@xsection}[1]{% + \edef\scr@osectarg{#1}\def\reserved@a{0}% + \ifx\scr@osectarg\reserved@a + \else + \let\scr@osectarg\reserved@a + \PackageWarning{scrhack}{% + Because of loading the standard classes\MessageBreak + sections hack, the extended option handling\MessageBreak + of section commands failed% + }% + \fi + }% +} +% \end{macrocode} +% \end{macro}^^A \scr@activate@xsection +% \end{macro}^^A \scr@osectarg +% +% \begin{command}{\partformat,\chapterformat} +% Most \cs{\dots format} macros of \KOMAScript{} are still used, because of +% the redefinition of \cs{@seccntformat}. But \cs{part} and \cs{chapter} are +% defined without using them. +% \begin{macrocode} +\scr@ifundefinedorrelax{partformat}{}{% + \PackageWarningNoLine{scrhack}{% + Usage of \string\partformat\space + deactivated,\MessageBreak + because of loading the standard classes sections hack% + }% +} +\scr@ifundefinedorrelax{chapterformat}{}{% + \PackageWarningNoLine{scrhack}{% + Usage of \string\chapterformat\space + deactivated,\MessageBreak + because of loading the standard classes sections hack% + }% +} +% \end{macrocode} +% \end{command}^^A \chapterformat,\partformat +% +% \begin{command}{\sectionformat,\subsectionformat,\subsubsectionformat, +% \paragraphformat,\subparagraphformat} +% All these commands have to be resetted to not use the automatic dot and to +% add a \cs{quad} instead of an \cs{enskip}. +% \begin{macrocode} +\scr@ifundefinedorrelax{sectionformat}{}{% + \PackageWarningNoLine{scrhack}{% + \string\sectionformat\space set to + `\string\thesection\string\quad',\MessageBreak + because of loading the standard classes sections hack% + }% + \renewcommand*{\sectionformat}{\thesection\quad}% +} +\scr@ifundefinedorrelax{subsectionformat}{}{% + \PackageWarningNoLine{scrhack}{% + \string\subsectionformat\space set to + `\string\thesubsection\string\quad'\MessageBreak + because of loading the standard classes sections hack% + }% + \renewcommand*{\subsectionformat}{\thesubsection\quad}% +} +\scr@ifundefinedorrelax{subsubsectionformat}{}{% + \PackageWarningNoLine{scrhack}{% + \string\subsubsectionformat\space set to + `\string\thesubsubsection\string\quad'\MessageBreak + because of loading the standard classes sections hack% + }% + \renewcommand*{\subsubsectionformat}{\thesubsubsection\quad}% +} +\scr@ifundefinedorrelax{paragraphformat}{}{% + \PackageWarningNoLine{scrhack}{% + \string\paragraphformat\space set to + `\string\theparagraph\string\quad'\MessageBreak + because of loading the standard classes sections hack% + }% + \renewcommand*{\paragraphformat}{\theparagraph\quad}% +} +\scr@ifundefinedorrelax{subparagraphformat}{}{% + \PackageWarningNoLine{scrhack}{% + \string\subparagraphformat\space set to + `\string\thesubparagraph\string\quad'\MessageBreak + because of loading the standard classes sections hack% + }% + \renewcommand*{\subparagraphformat}{\thesubparagraph\quad}% +} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\partlineswithprefixformat, +% \chapterlineswithprefixformat,\chapterlinesformat, +% \sectionlinesformat,\sectioncatchphraseformat} +% These \KOMAScript{} commands are not used any longer. +% \begin{macrocode} +\scr@ifundefinedorrelax{partlineswithprefixformat}{}{% + \PackageWarningNoLine{scrhack}{% + Usage of \string\partlineswithprefixformat\space deactivated,\MessageBreak + because of loading the standard classes sections hack% + }% +} +\scr@ifundefinedorrelax{chapterlineswithprefixformat}{}{% + \PackageWarningNoLine{scrhack}{% + Usage of \string\chapterlineswithprefixformat\space and\MessageBreak + \string\chapterlinesformat\space deactivated,\MessageBreak + because of using standard classes sections hack% + }% +} +\scr@ifundefinedorrelax{sectionlinesformat}{}{% + \PackageWarningNoLine{scrhack}{% + Usage of \string\sectionlinesformat\space and\MessageBreak + \string\sectioncatchphraseformat\space deactivated,\MessageBreak + because of using standard classes sections hack% + }% +} +% \end{macrocode} +% \end{command}^^A \partlineswithprefixformat … +% +% \begin{option}{headings} +% The \KOMAScript{} option does not make sense any longer. So it is +% deactivated and usage will throw an error. +% \begin{macrocode} +\scr@ifundefinedorrelax{KOMAClassName}{}{% + \PackageWarningNoLine{scrhack}{% + KOMA-Script option `headings' removed,\MessageBreak + because of loading standard classes sections hack% + }% + \RelaxFamilyKey[.\KOMAClassFileName]{KOMA}{headings}% + \KOMA@kav@removekey{.\KOMAClassFileName}{headings}% +} +% \end{macrocode} +% \end{option}^^A headings +% +% \begin{macro}{\scr@class@titlesec@warning} +% The warning about loading \pkg{titlesec} has to be changes, because we do +% not expect errors any longer. +% \begin{macrocode} +\def\scr@class@titlesec@warning{% + \PackageWarning{scrhack}{% + Usage of `titlesec' should work, because of\MessageBreak + loading the standard classes sections hack.\MessageBreak + However, you should know, there is not any\MessageBreak + support for this combination by the\MessageBreak + KOMA-Script author% + }% +} +% +% \end{macrocode} +% \end{macro}^^A \scr@class@titlesec@warning +% +% \subsection{Executing options} +% +% Last but not least the options have to be processed. In the generated +% package this will be done before the commands of \autoref{sec:macros}. +% \begin{macrocode} +%<*package&option> +\KOMAProcessOptions\relax +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrjura.dtx b/macros/latex/contrib/koma-script/scrjura.dtx new file mode 100644 index 0000000000..029a605271 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrjura.dtx @@ -0,0 +1,2042 @@ +% \iffalse meta-comment +% ====================================================================== +% scrjura.dtx +% Copyright (c) Markus Kohm, 2007-2022 +% +% 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. +% +% The KOMA-Script bundle consists of all files listed in MANIFEST.md. +% ====================================================================== +%%% From File: $Id: scrjura.dtx 3874 2022-06-05 10:38:02Z kohm $ +%%%% (run: identify) +%%%% (run: init) +%%%% (run: options) +%%%% (run: postoptions) +%%%% (run: body) +%%%% (run: final) +%<*dtx> +\begingroup + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2022-06-05 12:38:02 +0200 (So, 05. Jun 2022) $ + \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} + \filerevision$Revision: 3874 $ +\endgroup +\expandafter\ifx\csname ProvidesFile\endcsname\relax +\def\ProvidesFile#1[#2]{} +\fi +\ProvidesFile{scrjura.dtx}[\filedate\space\filerevision\space +% +%\NeedsTeXFormat{LaTeX2e}[1995/06/01] +%\ProvidesPackage{scrjura}[% +%<*dtx|(package&identify)> +%!KOMAScriptVersion + package +%<*dtx> + source +% + (for jurists) +] +% +%<*dtx> +\ifx\documentclass\undefined +% +%<*ins> + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHTFROM}{2007} + \generate{\usepreamble\defaultpreamble + \file{scrjura.ins}{% + \from{scrjura.dtx}{ins}% + }% + \file{scrjura.sty}{% + \from{scrjura.dtx}{package,identify}% + \from{scrjura.dtx}{package,init}% + \from{scrjura.dtx}{package,options}% + \from{scrjura.dtx}{package,postoptions}% + \from{scrjura.dtx}{package,body}% + \from{scrjura.dtx}{package,final}% + \from{scrlogo.dtx}{logo}% + }% + }% + \@@input scrstrop.inc +% +%<*dtx> +\else + \let\endbatchfile\relax +\fi +% +%<*ins> +\endbatchfile +% +%<*dtx> +\documentclass{koma-script-source-doc} +\usepackage[USenglish]{babel} +\setcounter{StandardModuleDepth}{2} +\begin{document} + \DocInput{scrjura.dtx} +\end{document} +% +% \fi +% +% \changes{v3.36}{2022/01/25}{switch over from \cls*{scrdoc} to +% \cls*{koma-script-source-doc}} +% +% \GetFileInfo{scrjura.dtx} +% \title{\KOMAScript{} in the Law Office\\ +% with Package \pkg*{scrjura}} +% \date{Version \fileversion{} of \filedate} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \maketitle +% \begin{abstract} +% The \pkg*{scrjura} package is intended for cautelar jurisprudence. It is +% intended to provide flexible help for lawyers and notaries in drafting +% contracts, statutes and legal commentaries. It has been developed in +% cooperation with Dr.\,Alexander Willand, and is still in the process of +% development. +% \end{abstract} +% +% \tableofcontents +% +% \section{User Manual} +% +% You can find the user manual of \pkg*{scrjura} in the \KOMAScript{} manual, +% either the German \file{scrguide} or the English \file{scrguien}. +% +% \MaybeStop{\PrintIndex} +% +% \section{Implementation} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \changes{v0.7b}{2014/11/11}{General renaming of ``Paragraph'' into +% ``Clause''} +% +% \subsection{Cooperation with \pkg*{hyperref}} +% +% If \pkg{hyperref} has already loaded before \pkg*{scrjura} the package cannot +% work correctly. So we throw an error. Maybe it would be a good idea to make +% this error fatal. But currently it is only an error. +% \begin{macrocode} +%<*init> +\@ifpackageloaded{hyperref}{% + \PackageError{scrjura}{Package hyperref already loaded}{% + If you want to use package scrjura with package hyperref, you have + to\MessageBreak + load package scrjura before package hyperref.\MessageBreak + To solve the problem, you just should move the loading of package + hyperref\MessageBreak + behind the loading of package scrjura.}% +} +% +% \end{macrocode} +% +% \subsection{Prerequisites} +% +% We need package \pkg*{scrkbase}. We could load this also together with +% \pkg*{tocbasic}, which is loaded later. But loading it on its own, we can +% require a minimum version. +% \begin{macrocode} +%<*init> +\RequirePackage{scrkbase}[2013/03/26] +% +% \end{macrocode} +% +% And now, \pkg*{tocbasic}. +% \begin{macrocode} +%<*init> +\RequirePackage{tocbasic} +% +% \end{macrocode} +% +% \subsection{Options} +% +% \begin{option}{contract} +% \begin{macro}{\if@documentcontract, +% \@documentcontractfalse,\@documentcontracttrue} +% \changes{v3.36}{2022/01/25}{switched to a \KOMAScript{} option} +% Option \opt{contract} can be used to make the whole document to be a +% contract. But in this case you are not allowed to reuse the \env{contract} +% environment in the document. Now it is allowed to stop or restart the +% contract. With older \LaTeX{} this is done by adding \cs{contract} to the +% end of \cs{document}. With an up to date \LaTeX{} we us a hook. +% \begin{macrocode} +%<*options> +\KOMA@ifkey{contract}{@documentcontract} +\IfLTXAtLeastTF{2020/10/01}{% + \AddToHook{begindocument/end}{% + \RelaxFamilyKey[.scrjura.sty]{KOMA}{contract}% + \if@documentcontract\expandafter\contract\fi + }% +}{% + \g@addto@macro\document{% + \RelaxFamilyKey[.scrjura.sty]{KOMA}{contract}% + \if@documentcontract\expandafter\contract\fi + }% +} +% +% \end{macrocode} +% \end{macro} +% \end{option} +% +% \begin{option}{juratotoc} +% Allow to set the toc level of the entries. Value \optvalue{true} is the same +% like \optvalue{2}, value \optvalue{false} is the same like \cs{maxdimen}. +% \changes{v0.7}{2013/11/04}{usage of renewed interface with +% \cs{FamilyKeyState}} +% \changes{v0.9a}{2015/03/09}{internal value storage} +% \begin{macro}{\if@juratotoc} +% \changes{v0.6}{2011/09/29}{replaced by counter} +% \begin{counter}{juratoclevel} +% \changes{v0.6}{2011/09/29}{definition moved} +% \changes{v3.27}{2019/02/25}{removed} +% \begin{macro}{\toclevel@cpar} +% \changes{v0.7}{2013/06/09}{new, because of \pkg{hyperref}} +% \changes{v3.27}{2019/02/25}{handled by \pkg*{tocbasic}} +% \begin{macrocode} +%<*options> +\KOMA@key{juratotoc}[true]{% + \KOMA@set@ifkey{juratotoc}{@tempswa}{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \if@tempswa + \DeclareTOCStyleEntry[level=2]{default}{cpar}% + \else + \DeclareTOCStyleEntry[level=\maxdimen]{default}{cpar}% + \fi + \else + \DeclareTOCStyleEntry[level=#1]{default}{cpar}% + \fi + \KOMA@kav@xreplacevalue{.scrjura.sty}{juratotoc}{\cpartocdepth}% +} +\KOMA@kav@xadd{.scrjura.sty}{juratotoc}{\cpartocdepth}% +% +% \end{macrocode} +% \end{macro} +% \end{counter} +% \end{macro} +% \end{option} +% +% \begin{option}{juratocnumberwidth,juratocindent} +% \changes{v0.6}{2011/09/29}{new} +% \changes{v0.7}{2013/11/04}{usage of renewed interface with +% \cs{FamilyKeyState}} +% \changes{v0.9a}{2015/03/09}{internal value storage} +% \begin{ilength}{\cpar@numberwidth,\cpar@indent} +% \changes{v0.6}{2011/09/29}{new} +% \changes{v3.27}{2019/02/25}{replaced by usage of \cs{DeclareTOCStyleEntry}} +% Indent and number width of the toc entries. +% \begin{macrocode} +%<*options> +\KOMA@key{juratocnumberwidth}{% + \DeclareTOCStyleEntry[numwidth=#1]{default}{cpar}% + \FamilyKeyStateProcessed + \KOMA@kav@replacevalue{.scrjura.sty}{juratocnumberwidth}{#1}% +} +\KOMA@kav@add{.scrjura.sty}{juratocnumberwidth}{2em} +\KOMA@key{juratocindent}{% + \DeclareTOCStyleEntry[indent=#1]{default}{cpar}% + \FamilyKeyStateProcessed + \KOMA@kav@replacevalue{.scrjura.sty}{juratocindent}{#1}% +} +\KOMA@kav@add{.scrjura.sty}{juratocindent}{1.5em}% +% +% \end{macrocode} +% \end{ilength} +% \end{option} +% +% \begin{option}{juratitlepagebreak} +% \changes{v0.5b}{2010/04/05}{new} +% The options sets the boolean \cs{if@juratitlepagebreak}. +% \begin{macro}{\if@juratitlepagebreak, +% \@juratitlepagebreaktrue,\@juratitlepagebreakfalse} +% If the boolean is \cs{iftrue} page breaks inside clause headings are +% allowed (which is not recommended). +% \begin{macrocode} +%<*options> +\KOMA@ifkey{juratitlepagebreak}{@juratitlepagebreak} +% +% \end{macrocode} +% \end{macro} +% \end{option} +% +% \begin{option}{parnumber} +% \changes{v0.6}{2011/09/29}{new} +% \changes{v0.6a}{2012/10/15}{value mistake message changed} +% \changes{v0.7}{2013/11/04}{usage of renewed interface with +% \cs{FamilyKeyState}} +% \changes{v0.9a}{2015/03/09}{internal value storage} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed into \cs{Ifstr}} +% The options switches the (automatic) paragraph numbering. +% \begin{macrocode} +%<*options> +\newif\ifparnumber +\KOMA@key{parnumber}[true]{% + \Ifstr{#1}{auto}{% + \AutoPar + \FamilyKeyStateProcessed + \KOMA@kav@remove{.scrjura.sty}{parnumber}{manual}% + \KOMA@kav@remove{.scrjura.sty}{parnumber}{auto}% + \KOMA@kav@add{.scrjura.sty}{parnumber}{auto}% + }{% + \Ifstr{#1}{manual}{% + \ManualPar + \FamilyKeyStateProcessed + \KOMA@kav@remove{.scrjura.sty}{parnumber}{manual}% + \KOMA@kav@remove{.scrjura.sty}{parnumber}{auto}% + \KOMA@kav@add{.scrjura.sty}{parnumber}{manual}% + }{% + \KOMA@set@ifkey{parnumber}{parnumber}{#1}% + \KOMA@kav@replacebool{.scrjura.sty}{parnumber}{parnumber}% + }% + }% +} +\KOMA@kav@add{.scrjura.sty}{parnumber}{true} +\KOMA@kav@add{.scrjura.sty}{parnumber}{auto} +% +% \end{macrocode} +% \end{option} +% +% \begin{option}{paragraphmark,clausemark} +% \changes{v0.9h}{2016/04/11}{\opt{paragraphmark} renamed to \opt{clausemark}} +% \changes{v0.7}{2013/11/04}{usage of renewed interface with +% \cs{FamilyKeyState}} +% \changes{v0.9a}{2015/03/09}{internal value storage} +% \begin{option}{markright,markboth} +% \changes{v0.7}{2013/11/04}{deprecated} +% \begin{command}{\Clausemark} +% \changes{v0.5e}{2011/08/31}{support for \cs{MakeMarkcase}} +% The options are used to activate either \cs{markright} or \cs{markboth} for +% clauses. \cs{Clausemark} expects not only the title but also the +% number. So it differs from, e.g., \cs{chaptermark}, which uses the counter +% automatically. But maybe I will change this some time. +% \begin{macrocode} +%<*options> +\newcommand*{\Clausemark}[1]{} +\KOMA@key{clausemark}{% + \begingroup + \KOMA@set@ncmdkey{clausemark}{@tempa}{% + {false}{0},{off}{0},{no}{0},% + {forceright}{1},% + {forceboth}{2},% + {right}{3},% + {both}{4}% + }{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \ifcase\number\@tempa + \endgroup + \let\Clausemark\@gobble + \or + \endgroup + \renewcommand*{\Clausemark}[1]{% + \markright{\csname MakeMarkcase\endcsname{##1}}}% + \or + \endgroup + \renewcommand*{\Clausemark}[1]{% + \markboth{\csname MakeMarkcase\endcsname{##1}}% + {\csname MakeMarkcase\endcsname{##1}}}% + \or + \endgroup + \renewcommand*{\Clausemark}[1]{% + \ifx + \@mkboth\@gobbletwo + \else + \markright{\csname MakeMarkcase\endcsname{##1}}% + \fi}% + \or + \endgroup + \renewcommand*{\Clausemark}[1]{% + \@mkboth{\csname MakeMarkcase\endcsname{##1}}% + {\csname MakeMarkcase\endcsname{##1}}}% + \else + \endgroup + \fi + \FamilyKeyStateProcessed + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi + \KOMA@kav@xreplacevalue{.scrjura.sty}{clausemark}{#1}% +} +\KOMA@kav@add{.scrjura.sty}{clausemark}{false} +\KOMA@DeclareDeprecatedOption[scrjura]{markright}{clausemark=forceright} +\KOMA@DeclareDeprecatedOption[scrjura]{markboth}{clausemark=forceboth} +\KOMA@key{paragraphmark}{% + \PackageWarningNoLine{scrjura}{% + You've used obsolete option `paragraphmark'.\MessageBreak + Usage of this option is deprecated.\MessageBreak + You should simply replace `paragraphmark'\MessageBreak + by `clausemark'% + }% + \KOMAExecuteOptions[.scrjura.sty]{clausemark=#1}% +} +% +% \end{macrocode} +% \end{command} +% \end{option} +% \end{option} +% +% \begin{option}{ref} +% \changes{v0.5d}{2010/06/07}{new values \optvalue{nopar}, +% \optvalue{nosentence}, \optvalue{OnlyParagraph}} +% \changes{v0.7}{2013/11/04}{usage of renewed interface with +% \cs{FamilyKeyState}} +% \changes{v0.9a}{2015/03/09}{internal value storage} +% \begin{option}{parcitename,sentencecitename} +% \changes{v0.5d}{2010/06/07}{deprecated} +% The formatting of the references of paragraphs and sentences. There are a +% long a short and a numeric form. +% \begin{macro}{\parcite@format,\sentencecite@format} +% Default is the long form. Corresponding values of the two helper macros are: +% 0 = long, 1 = short, 2 = numerical, -1 = nothing. +% \begin{macrocode} +%<*options> +\newcommand*{\parcite@format}{0} +\newcommand*{\sentencecite@format}{0} +% \end{macrocode} +% \end{macro} +% The options can be used to change the default. +% \begin{macrocode} +\KOMA@key{ref}{% + \begingroup + \KOMA@set@ncmdkey{ref}{@tempa}{% + {parlong}{1},{longpar}{1},{ParL}{1},% + {parshort}{2},{shortpar}{2},{ParS}{2},% + {parnumeric}{3},{numericpar}{3},{ParN}{3},% + {paroff}{4},{nopar}{4},% + {sentencelong}{10},{longsentence}{10},{SentenceL}{10},% + {sentenceshort}{20},{shortsentence}{20},{SentenceS}{20},% + {sentencenumeric}{30},{numericsentence}{30},{SentenceN}{30},% + {sentenceoff}{40},{nosentence}{40},% + {long}{11},% + {short}{22},% + {numeric}{33},% + {paragraphonly}{44},{onlyparagraph}{44},% + {ParagraphOnly}{44},{OnlyParagraph}{44}% + }{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \@tempcnta=\@tempa\relax + \@tempcntb=\z@ + \@whilenum \@tempcnta>9 \do{% + \advance\@tempcnta -10\relax + \advance\@tempcntb \@ne\relax + }% + \ifcase \@tempcnta + \or + \aftergroup\def\aftergroup\parcite@format + \aftergroup{\aftergroup0\aftergroup}% + \or + \aftergroup\def\aftergroup\parcite@format + \aftergroup{\aftergroup1\aftergroup}% + \or + \aftergroup\def\aftergroup\parcite@format + \aftergroup{\aftergroup2\aftergroup}% + \or + \aftergroup\def\aftergroup\parcite@format + \aftergroup{\aftergroup-\aftergroup1\aftergroup}% + \fi + \ifcase \@tempcntb + \or + \aftergroup\def\aftergroup\sentencecite@format + \aftergroup{\aftergroup0\aftergroup}% + \or + \aftergroup\def\aftergroup\sentencecite@format + \aftergroup{\aftergroup1\aftergroup}% + \or + \aftergroup\def\aftergroup\sentencecite@format + \aftergroup{\aftergroup2\aftergroup}% + \or + \aftergroup\def\aftergroup\sentencecite@format + \aftergroup{\aftergroup-\aftergroup1\aftergroup}% + \fi + \else + \aftergroup\FamilyKeyStateUnknownValue + \fi + \endgroup + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \KOMA@kav@removekey{.scrjura.sty}{ref}% + \ifcase\parcite@format + \KOMA@kav@add{.scrjura.sty}{ref}{parlong}% + \or + \KOMA@kav@add{.scrjura.sty}{ref}{parshort}% + \or + \KOMA@kav@add{.scrjura.sty}{ref}{parnumeric}% + \or + \KOMAQkav@add{.scrjura.sty}{ref}{paroff}% + \fi + \ifcase\sentencecite@format + \KOMA@kav@add{.scrjura.sty}{ref}{sentencelong}% + \or + \KOMA@kav@add{.scrjura.sty}{ref}{sentenceshort}% + \or + \KOMA@kav@add{.scrjura.sty}{ref}{sentencenumeric}% + \or + \KOMA@kav@add{.scrjura.sty}{ref}{sentenceoff}% + \fi + \fi +} +\KOMA@kav@add{.scrjura.sty}{ref}{parlong}% +\KOMA@kav@add{.scrjura.sty}{ref}{sentencelong}% +\KOMA@DeclareDeprecatedOption[scrjura]{parcitename}{ref=parlong} +\KOMA@DeclareDeprecatedOption[scrjura]{sentencecitename}{ref=sentencelong} +% +% \end{macrocode} +% \end{option} +% \end{option} +% +% Execute the options. +% \begin{macrocode} +%<*postoptions> +\KOMAProcessOptions\relax +% +% \end{macrocode} +% +% \subsection{Deprecated paragraph commands} +% +% All these commands are deprecated and now generate error messages instead of +% code. +% +% \begin{command}{\Paragraph,\SubParagraph,\refParagraph,\refParagraphN, +% \DeprecatedParagraph,\ParagraphCompatibilityHacks} +% \changes{1.0}{2014/11/22}{throw error for deprecated commands but only once} +% \begin{macrocode} +%<*body> +\providecommand*{\DeprecatedParagraph}{% + \PackageError{scrjura}{modification of old document needed}{% + It seem that this document was made for scrjura up to version + 0.7a.\MessageBreak + Since scrjura version 0.9 \string\Paragraph, \string\SubParagraph, and all + depending\MessageBreak + commands, options, and counters have been renamed.\MessageBreak + You should replace the terms `Paragraph' and `paragraph` by `Clause` + and\MessageBreak + `clause` if they are part of the name of a scrjura feature, otherwise + this\MessageBreak + document may produce severall additional error messages and maybe the + wrong\MessageBreak + result. Sorry for the inconvenience.% + }% + \ParagraphCompatibilityHacks +} +\newcommand*{\ParagraphCompatibilityHacks}{% + \PackageWarning{scrjura}{compatibility hacks for `\string\Paragraph' + executed.\MessageBreak + There is no support for documents using these hacks!\MessageBreak + There is no warranty for real compatibility!\MessageBreak + Even if the LaTeX run of the document doesn't report\MessageBreak + any error, the result may be completely wrong.\MessageBreak + Therefore it is recommended to solve the problem,\MessageBreak + instead of trying to work around using the\MessageBreak + compatibility hacks% + }% + \gdef\Paragraph{\Clause}% + \gdef\SubParagraph{\SubClause}% + \gdef\c@Paragraph{\c@Clause}% + \gdef\cl@Paragraph{\cl@Clause}% + \gdef\c@SubParagraph{\c@SubClause}% + \gdef\cl@SubParagraph{\cl@SubClause}% + \gdef\theParagraph{\theClause}% + \gdef\theSubParagraph{\theSubClause}% + \gdef\refParagraph{\refClause}% + \gdef\refParagraphN{\refClauseN}% + \aliaskomafont{Paragraph}{Clause}% + \scr@ifundefinedorrelax{Paragraphmark}{}{% + \global\let\Clausemark\Paragraphmark + }% +} +\providecommand*{\Paragraph}{\DeprecatedParagraph\Paragraph} +\providecommand*{\SubParagraph}{\DeprecatedParagraph\SubParagraph} +\providecommand*{\refParagraph}{\DeprecatedParagraph\refParagraph} +\providecommand*{\refParagraphN}{\DeprecatedParagraph\refParagraphN} +% +% \end{macrocode} +% \end{command} +% +% +% \subsection{Contracts, clauses, paragraphs and sentences} +% +% +% \begin{macro}{\scrjura@env@type} +% \changes{v0.5d}{2010/04/28}{new} +% \changes{v0.7b}{2014/11/03}{renamed} +% This macro shows the currently active \pkg*{scrjura} environment. +% \begin{macrocode} +%<*body> +\newcommand*{\scrjura@env@type}{} +% +% \end{macrocode} +% \end{macro} +% +% +% \begin{command}{\ellipsispar} +% \changes{v0.7}{2013/05/02}{new} +% \changes{v0.7b}{2014/11/03}{\cs{thecontractAbsoluteClause} made more +% flexible} +% \changes{v0.9g}{2016/03/25}{write to \file{aux}-file only \cs{if@filesw}} +% \begin{command}{\parellipsis} +% \changes{v0.7}{2013/05/02}{new} +% Count one or more paragraphs given by the optional argument but print +% \cs{parellipsis} instead of a real paragraph. The default is either +% \cs{dots} or \cs{textellipsis} if available. +% \changes{v0.7}{2013/05/02}{new} +% \begin{macrocode} +%<*body> +\newcommand*{\ellipsispar}[1][1]{% + \begingroup + \KOMAoptions{parnumber=manual}\parellipsis\par + \addtocounter{par}{#1}% + \if@filesw + \protected@write\@auxout{}{% + \string\newmaxpar{\scrjura@env@type}% + {\csname the\scrjura@env@type + AbsoluteClause\endcsname}% + {\thepar}% + }% + \fi + \endgroup + \addtocounter{par}{-1}\refstepcounter{par}% + \ignorespaces +} +\newcommand*{\parellipsis}{% + \scr@ifundefinedorrelax{textellipsis}{\dots}{\textellipsis}% +} +% +% \end{macrocode} +% \end{command} +% \end{command} +% +% \begin{environment}{contract} +% \changes{v0.5d}{2010/04/28}{missing error message added} +% \changes{v0.5d}{2010/04/28}{not self-redefining any more} +% \changes{v0.5d}{2010/04/28}{defining \cs{jura@env@type}} +% \changes{v3.36}{2022/01/25}{defining an environment (because of hooks)} +% \begin{counter}{contractClause} +% \begin{command}{\thecontractClause} +% \changes{v0.9b}{2015/05/01}{must use counter \cnt{Clause} instead of +% \cnt{contractClause}} +% \begin{macro}{\contract@Clauseformat} +% \begin{command}{\Clauseformat,\paragraphformat} +% \changes{v0.6b}{2013/04/16}{redefinition of \cs{paragraphformat}} +% \begin{counter}{contractSubClause} +% \changes{v0.9b}{2015/05/01}{must use counter \cnt{SubClause} instead of +% \cnt{contractSubClause}} +% \begin{command}{\thecontractSubClause} +% \begin{counter}{contractAbsoluteClause} +% \changes{v0.7}{2013/04/18}{new (internal) counter for all clauses to make +% it possible to reset the users clause counter} +% It is not allowed to nest the \env{contract} environments, but you can end +% them and start them new. But this would not end the contract and start a new +% contract but only delay it for some other code. +% \begin{macrocode} +%<*body> +\newenvironment{contract}{% + \ifx\scrjura@env@type\@empty + \let\@doendpe\scrjura@doendpe + \let\Clause\contract@paragraph + \let\c@Clause\c@contractClause + \edef\cl@Clause{\cl@Clause\cl@contractClause}% + \let\SubClause\contract@subparagraph + \let\c@SubClause\c@contractSubClause + \edef\cl@SubClause{\cl@SubClause\cl@contractSubClause}% + \let\Sentence\contract@sentence + \renewcommand*{\scrjura@env@type}{contract}% + \aliaskomafont{Clause}{contract.Clause}% + \else + \PackageError{scrjura}{nested `contract` detected}{% + You may not use a `contract' environment inside\MessageBreak + a `\scrjura@env@type' environment or after loading\MessageBreak + package `scrjura' with option `\scrjura@env@type'!}% + \fi +}{} +\let\if@scrjura@skiphyperref\iftrue +\let\cl@Clause\@empty +\let\cl@SubClause\@empty +\newcounter{contractClause} +\renewcommand*{\thecontractClause}{% + {\contract@Clauseformat{\arabic{Clause}}}} +\DeclareRobustCommand*{\contract@Clauseformat}[1]{\Clauseformat{#1}} +\newcommand*{\Clauseformat}[1]{\S~#1} +\newcounter{contractSubClause} +\@addtoreset{SubClause}{Clause} +\renewcommand*{\thecontractSubClause}{% + {\theClause\alph{SubClause}}} +\newcounter{contractAbsoluteClause} +% +% \end{macrocode} +% \end{counter} +% \end{command} +% \end{counter} +% \end{command} +% \end{macro} +% \end{command} +% \end{counter} +% \end{environment} +% +% \begin{command}{\DeclareNewJuraEnvironment} +% \changes{v0.9}{2014/11/12}{new} +% \changes{v0.9h}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% Using \cs{@defjuraenvironment} to define a new juristic environment. This +% can be done only in document preamble. +% \begin{macrocode} +%<*body> +\newcommand*{\DeclareNewJuraEnvironment}[1]{% + \@ifundefined{#1}{\expandafter\let\csname #1\expandafter\endcsname + \csname end#1\endcsname}{}% + \@ifundefined{#1}{\let\reserved@defjuraenvironment\@defjuraenvironment}{% + \PackageError{scrjura}{ignorring declaration of `#1'}{% + You've tried to declare jura environment `#1', but + environment\MessageBreak + `#1' or command + \expandafter\string\csname #1\endcsname\space or + \expandafter\string\csname end#1\endcsname\MessageBreak + already exists.\MessageBreak + Declaration will be ignored}% + \long\def\reserved@defjuraenvironment##1[##2]##3##4{}% + }% + \kernel@ifnextchar [%] + {\reserved@defjuraenvironment{#1}}{\reserved@defjuraenvironment{#1}[]}% +} +\@onlypreamble\DeclareNewJuraEnvironment +% \end{macrocode} +% \begin{macro}{\@defjuraenvironment} +% \changes{v0.9}{2014/11/04}{new} +% \changes{v3.25}{2017/12/08}{new command options \opt{ClauseFont}} +% \changes{v3.25}{2017/12/08}{\cs{reserved@defjuraenvironment} set back to +% \cs{relax}} +% \changes{v3.25}{2017/12/08}{using local instead of global command options} +% This command is used to define a new \pkg*{scrjura} environment like +% \env{contract}. Several options are provided (see the user manual for +% details). +% \begin{macrocode} +\DefineFamily{KOMAarg} +\DefineFamilyMember{KOMAarg} +\newcommand{\@defjuraenvironment}{} +\long\def\@defjuraenvironment#1[#2]#3#4{% + \let\reserved@defjuraenvironment\relax +% \end{macrocode} +% The counters: +% \begin{macrocode} + \newcounter{#1Clause}% + \newcounter{#1AbsoluteClause}% + \newcounter{#1SubClause}% + \FamilyCSKey[.scrjura.sty]{KOMAarg}{Clause}{#1@Clause}% + \FamilyCSKey[.scrjura.sty]{KOMAarg}{SubClause}{#1@SubClause}% + \FamilyCSKey[.scrjura.sty]{KOMAarg}{Sentence}{#1@Sentence}% + \DefineFamilyKey[.scrjura.sty]{KOMAarg}{ClauseNumberFormat}{% + \expandafter\def\csname #1@Clauseformat \endcsname####1{##1{####1}}% + \expandafter\edef\csname #1@Clauseformat\endcsname{% + \noexpand\protect\expandafter\noexpand\csname #1@Clauseformat \endcsname + }% + \FamilyKeyStateProcessed + } + \DefineFamilyKey[.scrjura.sty]{KOMAarg}{ClauseFont}{% + \IfExistskomafont{#1.Clause}{% + \IfIsAliaskomafont{#1.Clause}{% + \expandafter\let\csname scr@fnt@instead@#1.Clause\endcsname\relax + \newkomafont{#1.Clause}{##1}% + }{\setkomafont{#1.Clause}{##1}}% + }{% + \newkomafont{#1.Clause}{##1}% + }% + } + \FamilyExecuteOptions[.scrjura.sty]{KOMAarg}{#2}% + \RelaxFamilyKey[.scrjura.sty]{KOMAarg}{ClauseFont}% + \RelaxFamilyKey[.scrjura.sty]{KOMAarg}{ClauseNumberFormat}% + \RelaxFamilyKey[.scrjura.sty]{KOMAarg}{Sentence}% + \RelaxFamilyKey[.scrjura.sty]{KOMAarg}{SubClause}% + \RelaxFamilyKey[.scrjura.sty]{KOMAarg}{Clause}% + \@ifundefined{#1@Clauseformat}{% + \expandafter\DeclareRobustCommand\expandafter*% + \csname #1@Clauseformat\endcsname[1]{\Clauseformat{##1}}% + }{}% +% \end{macrocode} +% \changes{v0.9c}{2015/05/13}{defining \cs{the\dots Clause}} +% \changes{v0.9f}{2016/02/24}{\cs{protect}\cs{\@nameuse} instead of +% \cs{csname}\dots\cs{endcsname}} +% \begin{macrocode} + \expandafter\renewcommand\expandafter*\csname the#1Clause\endcsname{% + \protect\@nameuse{#1@Clauseformat}{\arabic{#1Clause}}}% +% \end{macrocode} +% Environment: +% \begin{macrocode} + \newenvironment{#1}{% + \par + \ifx\scrjura@env@type\@empty + \edef\scrjura@env@type{#1}% + \let\@doendpe\scrjura@doendpe + \expandafter\let\expandafter\c@Clause\csname c@#1Clause\endcsname + \edef\cl@Clause{\cl@Clause\csname cl@#1Clause\endcsname}% + \expandafter\let\expandafter\c@SubClause + \csname c@#1SubClause\endcsname + \edef\cl@SubClause{\cl@SubClause + \csname cl@#1SubClause\endcsname}% + \@ifundefined{#1@Clause}{% + \let\Clause\contract@paragraph + }{% + \expandafter\let\expandafter\Clause + \csname #1@Clause\endcsname + }% + \@ifundefined{#1@SubClause}{% + \let\SubClause\contract@subparagraph + }{% + \expandafter\let\expandafter\SubClause + \csname #1@SubClause\endcsname + }% + \@ifundefined{#1@Sentence}{% + \let\Sentence\contract@sentence + }{% + \expandafter\let\expandafter\Sentence\csname #1@Sentence\endcsname + }% + \@ifundefined{\scrjura@env@type @everypar}{% + \expandafter\let + \csname \scrjura@env@type @everypar\endcsname + \contract@everypar + }{}% +% \end{macrocode} +% Font alias for \fnt{Clause}. If neither a font not an alias is defined for +% the new environment \fnt{contract.Clause} is used. +% \changes{v3.25}{2017/12/08}{Font alias fixed} +% \begin{macrocode} + \IfExistskomafont{#1.Clause}{% + \IfIsAliaskomafont{#1.Clause}{% + \aliaskomafont{Clause}{\csname scr@fnt@instead@#1.Clause\endcsname}% + }{% + \aliaskomafont{Clause}{#1.Clause}% + }% + }{% + \aliaskomafont{Clause}{contract.Clause}% + }% + #3% + \else + \PackageError{scrjura}{nested scrjura environments detected}{% + You must not use a `#1' environment inside\MessageBreak + a `\scrjura@env@type' environment or after loading\MessageBreak + package `scrjura' with option `\scrjura@env@type'!}% + \fi + }{% + #4% + \par + }% +} +% +% \end{macrocode} +% \end{macro}%^^A \@dewjuraenvironment +% \end{command}%^^A \DeclareNewJuraEnvironment +% +% \begin{macro}{\contract@paragraph} +% This is the \cs{Clause} used by contracts. A contract consists (usually) of +% several clauses. Each clause has optional elements managed by +% \meta{key}=\meta{value} pairs handled by \pkg*{scrkbase} and last but not +% least by \pkg{keyval}. +% \begin{option}{title,head,nohead} +% \begin{option}{entry,noentry} +% \changes{v0.6}{2011/09/30}{deprecated} +% \begin{option}{tocentry,notocentry} +% \changes{v0.6}{2011/09/30}{new} +% Title, running head and toc entry of the clause. The title is the default +% for running head and toc entry. But you can also use an empty value for +% each of them or use the \opt{no\dots} options to switch them off. +% \begin{macrocode} +%<*body> +\define@key{contract}{title}{% + \def\contract@title{#1}% + \ifx\contract@entry\relax\def\contract@entry{\contract@title}\fi + \ifx\contract@head\relax\def\contract@head{\contract@title}\fi +} +\define@key{contract}{entry}{% + \PackageWarning{scrjura}{deprecated option `entry'.\MessageBreak + You should use option `tocentry' instead of\MessageBreak + option `entry'% + }% + \def\contract@entry{#1}} +\define@key{contract}{tocentry}{\def\contract@entry{#1}} +\define@key{contract}{noentry}[]{% + \PackageWarning{scrjura}{deprecated option `noentry'.\MessageBreak + You should use option `notocentry' instead of\MessageBreak + option `noentry'% + }% + \let\contract@entry\relax} +\define@key{contract}{notocentry}[]{\let\contract@entry\relax} +\define@key{contract}{head}{\def\contract@head{#1}} +\define@key{contract}{nohead}[]{\let\contract@head\relax} +% \end{macrocode} +% \end{option} +% \end{option} +% \end{option} +% \begin{option}{number} +% The number can be changed manually. But clauses without numbers are not +% allowed. So if you use an empty value, the number is automatically set. +% \begin{macrocode} +\define@key{contract}{number}{\def\contract@number{#1}} +% \end{macrocode} +% \end{option} +% \begin{macro}{\contract@preskip,\contract@postskip} +% \begin{option}{preskip,postskip} +% The options are used to specify the distance before and after the +% clause. The preset value of these options are the global settings done by +% |\setkeys{contract}{…}|. +% \begin{macrocode} +\newcommand*{\contract@preskip}{2\baselineskip} +\newcommand*{\contract@postskip}{\baselineskip} +\define@key{contract}{preskip}{\def\contract@preskip{#1}} +\define@key{contract}{postskip}{\def\contract@postskip{#1}} +% \end{macrocode} +% \end{option} +% \end{macro} +% \begin{option}{dummy} +% The option switches the boolean \cs{ifcontract@dummy}. +% \begin{macro}{\ifcontract@dummy} +% If the boolean is \cs{iftrue} the clause will not be printed. But note: you +% cannot use this to remove the paragraphs or sentences of the clause. But you +% can use this option to generate holes in the numbering without manually +% manipulating the counters. +% \begin{macrocode} +\newif\ifcontract@dummy +\define@key{contract}{dummy}[true]{\csname contract@dummy#1\endcsname} +% \end{macrocode} +% \end{macro} +% \end{option} +% \begin{fontelement}{contract.Clause} +% \begin{macro}{\contract@paragraph@font} +% \changes{v3.25}{2017/12/08}{using element \fnt{Clause} instead of +% \fnt{contract.Clause}} +% Correctly this macro should be named \cs{contract@paragraph@format}. But it +% is already used by some users for ugly tricks. So I will not rename it to +% avoid problems for existing documents. Additionally it would be better to +% use a new macro per environment. However the same reason not to change this. +% \begin{macrocode} +\newkomafont{contract.Clause}{\sffamily\bfseries\large} +\newcommand*{\contract@paragraph@font}{\usekomafont{Clause}% + \@hangfrom} +% \end{macrocode} +% \end{macro} +% \end{fontelement} +% \begin{counter}{@AbsClause} +% \begin{macro}{\theH@AbsClause} +% \begin{command}{\theHClause,\theHSubClause} +% \begin{macrocode} +% Here we have some not good tested code for \pkg{hyperref}. +\newcounter{@AbsClause} +\newcommand*{\theH@AbsClause}{P-\arabic{@AbsClause}} +\newcommand*{\theHClause}{\theH@AbsClause} +\newcommand*{\theHSubClause}{\theH@AbsClause} +% \end{macrocode} +% \end{command} +% \end{macro} +% \end{counter} +% For the headings we use manual paragraph numbering, because we don't want +% any paragraph numbering inside the heading. After initializing the options +% they are processed. +% \changes{v0.7}{2013/04/18}{increase counter \cnt{contractAbsoluteClause}} +% \changes{v0.7b}{2014/11/03}{more flexible +% \cnt{\meta{environment}AbsoluteClause}} +% \begin{macrocode} +\newcommand*{\contract@paragraph}[1]{% + \stepcounter{\scrjura@env@type AbsoluteClause}% + \ManualPar\parnumbertrue + \let\contract@title\relax + \let\contract@entry\relax + \let\contract@head\relax + \let\contract@number\relax + \contract@dummyfalse + \ifx\relax#1\relax\else\setkeys{contract}{#1}\fi +% \end{macrocode} +% Unless this is a dummy clause, the headings will be initialized and vertical +% skips will be done. +% \changes{v0.6a}{2012/10/08}{missing \cs{par} added} +% \begin{macrocode} + \ifcontract@dummy\else + \par + \@afterindentfalse + \addvspace{\contract@preskip}% + \fi +% \end{macrocode} +% If there isn't a manual number, we use the next number. If there is a manual +% number, this number is printed and we take care that labels and +% \pkg{hyperref} also use the manual number. +% \changes{v0.6b}{2013/04/16}{using \cs{contract@Clauseformat} for manual +% numbers too} +% \changes{v0.9c}{2015/05/13}{\cs{thecontractClause} replaced by +% environment-dependent macro} +% \begin{macrocode} + \ifx\contract@number\relax + \let\p@Clause\@empty + \expandafter\let\expandafter\theClause + \csname the\scrjura@env@type Clause\endcsname + \refstepcounter{Clause}% + \else + \begingroup + \let\@elt\@stpelt + \cl@Clause + \endgroup +% \end{macrocode} +% \changes{v0.9f}{2016/02/24}{\cs{protect}\cs{\@nameuse} instead of +% \cs{csname}\dots\cs{endcsname}} +% \begin{macrocode} + \protected@edef\theClause{% + \protect\@nameuse{\scrjura@env@type @Clauseformat}{\contract@number}% + }% + \protected@edef\@currentlabel{\theClause}% + \fi + \stepcounter{@AbsClause}% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname if@skiphyperref\endcsname\relax + \else + \expandafter\let\csname if@scrjura@skiphyperref\expandafter\endcsname + \csname if@skiphyperref\endcsname + \fi + \if@scrjura@skiphyperref\else + \hyper@refstepcounter{@AbsClause}% + \typeout{absolute Nummer: \the@AbsClause^^JLabel: `\@currentHref'}% + \fi +% \end{macrocode} +% For simplification we use the code of clauses for sub-clauses. +% \begin{macrocode} + \let\theSubClause\theClause +% \end{macrocode} +% Unless for dummy clauses, the heading is printed, the toc entry is done +% and also the running head. +% \changes{v0.7}{2013/04/28}{distance behind the number is part of the number} +% \changes{v0.9i}{2017/02/23}{usage of \cs{ext@toc}} +% \begin{macrocode} + \ifcontract@dummy\else + \begingroup + \if@juratitlepagebreak\else\interlinepenalty\@M\fi + \contract@paragraph@font{\theClause + \ifx\contract@title\relax\else\enskip\fi}% + \contract@title + \ifx\contract@entry\relax\else + \expandafter\addxcontentsline\expandafter{\ext@toc}% + {cpar}[\theClause]\contract@entry + \addxcontentsline{cpa}{cpar}[\theClause]\contract@entry + \fi + \ifx\contract@head\relax\else + \expandafter\Clausemark\expandafter{% + \expandafter\theSubClause\expandafter\enskip\contract@head}% + \fi + \par + \endgroup\nobreak\vskip\contract@postskip +% \end{macrocode} +% Last but not least paragraph numbering is initialized. +% \begin{macrocode} + \scrjura@afterheading + \fi +} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\contract@subparagraph} +% \changes{v0.6a}{2012/10/08}{fehlendes \cs{par} ergänzt}%^^A +% \changes{v0.7}{2013/04/18}{Zähler \texttt{contractAbsoluteClause} wird +% erhöht}%^^A +% \changes{v0.7}{2013/04/28}{Abstand nach der Nummer als Bestandteil der +% Nummer setzen}%^^A +% \changes{v0.9i}{2017/02/23}{Verwendung von \cs{ext@toc}}%^^A +% Das entspricht bis auf wenige Kleinigkeiten, die Unterparagraphen betreffen, +% |\contract@paragraph| +% \begin{macrocode} +%<*body> +\newcommand*{\contract@subparagraph}[1]{% + \stepcounter{\scrjura@env@type AbsoluteClause}% + \ManualPar\parnumbertrue + \let\contract@title\relax + \let\contract@entry\relax + \let\contract@head\relax + \let\contract@number\relax + \contract@dummyfalse + \ifx\relax#1\relax\else\setkeys{contract}{#1}\fi + \ifcontract@dummy\else + \par + \@afterindentfalse + \vskip\contract@preskip + \fi + \ifx\contract@number\relax + \let\p@SubClause\@empty + \let\theSubClause\thecontractSubClause + \refstepcounter{SubClause}% + \else + \begingroup + \let\@elt\@stpelt + \cl@SubClause + \endgroup + \protected@edef\theSubClause{\theClause\contract@number}% + \protected@edef\@currentlabel{\theSubClause}% + \fi + \stepcounter{@AbsClause}% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname if@skiphyperref\endcsname\relax + \else + \expandafter\let\csname if@scrjura@skiphyperref\expandafter\endcsname + \csname if@skiphyperref\endcsname + \fi + \if@scrjura@skiphyperref\else + \hyper@refstepcounter{@AbsClause}% + \typeout{absolute Nummer: \the@AbsClause^^JLabel: `\@currentHref'}% + \fi + \ifcontract@dummy\else + \begingroup + \if@juratitlepagebreak\else\interlinepenalty\@M\fi + \contract@paragraph@font{\theSubClause + \ifx\contract@title\relax\else\enskip\fi}% + \contract@title + \ifx\contract@entry\relax\else + \expandafter\addxcontentsline\expandafter{\ext@toc}% + {cpar}[\theSubClause]\contract@entry + \addxcontentsline{cpa}{cpar}[\theSubClause]\contract@entry + \fi + \ifx\contract@head\relax\else + \expandafter\Clausemark\expandafter{% + \expandafter\theSubClause\expandafter\enskip\contract@head}% + \fi + \par + \endgroup + \nobreak\vskip\contract@postskip + \scrjura@afterheading + \fi +} +% +% \end{macrocode} +% \end{macro} +% +% \begin{command}{\AutoPar,\ManualPar} +% Switching between automatic or manual paragraph numbers for all +% \pkg*{scrjura} environments. +% \begin{macrocode} +%<*body> +\newcommand*{\AutoPar}{% + \expandafter\let\expandafter\scrjura@everypar + \csname \scrjura@env@type @everypar\endcsname +} +\newcommand*{\ManualPar}{% + \let\scrjura@everypar\relax +} +% +% \end{macrocode} +% \end{command} +% +% \begin{macro}{\scrjura@afterheading,\jura@afterheading} +% \changes{v0.7b}{2014/11/03}{\cs{jura@afterheading} renamed} +% \changes{v0.7b}{2014/11/03}{no argument} +% \changes{v3.27}{2019/02/25}{\cs{CheckCommand} for \cs{@afterheading}} +% Similar to \cs{afterheading} but with automatic paragraph numbers. +% \begin{description} +% \item[ToDo:] Test if this can be done using \LaTeX{} hooks, depending on the +% \LaTeX{} release. +% \end{description} +% \begin{macrocode} +%<*body> +\CheckCommand*{\@afterheading}{% + \@nobreaktrue + \everypar{% + \if@nobreak + \@nobreakfalse + \clubpenalty \@M + \if@afterindent \else + {\setbox\z@\lastbox}% + \fi + \else + \clubpenalty \@clubpenalty + \everypar{}% + \fi}% +} +\newcommand*{\scrjura@afterheading}{% + \@nobreaktrue + \everypar{% + \if@nobreak + \@nobreakfalse + \clubpenalty \@M + \if@afterindent \else + {\setbox\z@\lastbox}% + \fi + \else + \clubpenalty \@clubpenalty + \everypar{% + \scrjura@everypar + }% + \fi + \scrjura@everypar + }% + \AutoPar +} +% \end{macrocode} +% \begin{macro}{\scrjura@everypar,\jura@everypar} +% \changes{v0.7b}{2014/11/03}{\cs{jura@everypar} renamed} +% The macro to be used at the very beginning of every paragraph to add the +% number. To be used only inside \pkg*{scrjura} environments, so empty outside. +% \begin{macrocode} +\newcommand*{\scrjura@everypar}{} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@doendpe} +% \LaTeX{} used this macro, to reset all paragraph actions at the end of +% environments. To avoid unwanted switching-off of the paragraph number it +% will be reinitialized. +% \begin{macro}{\scrjura@doendpe} +% \begin{macro}{\IncludeInRelease} +% \changes{v0.9e}{2015/11/03}{used temporary} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed into \cs{Ifstr}} +% \begin{macro}{\@gobble@IncludeInRelease} +% \changes{v0.9e}{2015/11/03}{used temporary} +% \begin{macro}{\EndIncludeInRelease} +% \changes{v0.9e}{2015/11/03}{used temporary} +% From \LaTeX{} 2015/01/01 a different definition of \cs{@doendpe} is used. So +% we also have to use different versions depending on the release. We do so +% with some tricks. Maybe this should be replaced by usage of +% \cs{IfLTXAtLeastTF} from already loaded \pkg*{scrbase}. +% \begin{macrocode} +\providecommand*{\IncludeInRelease}[3]{% + \PackageInfo{scrjura}{temporary definition of \string\IncludeInRelease}% + \Ifstr{#1}{0000/00/00}{% + \let\IncludeInRelease\@undefined + \def\EndIncludeInRelease{\let\EndIncludeInRelease\@undefined}% + }{% + \let\EndIncludeInRelease\relax + \long\def\@gobble@IncludeInRelease##1\EndIncludeInRelease{% + \let\@gobble@IncludeInRelease\@undefined + }% + \expandafter\@gobble@IncludeInRelease + }% +} +\IncludeInRelease{2015/01/01}{\@doendpe}{clubpenalty fix} +\CheckCommand*\@doendpe{\@endpetrue + \def\par{\@restorepar + \clubpenalty\@clubpenalty + \everypar{}\par\@endpefalse}\everypar + {{\setbox\z@\lastbox}% + \everypar{}\@endpefalse}} +\newcommand*{\scrjura@doendpe}{% + \@endpetrue + \def\par{% + \@restorepar + \clubpenalty\@clubpenalty + \everypar{% + \csname scrjura@everypar\endcsname + }% + \par\@endpefalse + }% + \everypar{% + {\setbox\z@\lastbox}\everypar{% + \csname scrjura@everypar\endcsname + }% + \@endpefalse + }% +} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}{\@doendpe}{clubpenalty fix} +\CheckCommand*\@doendpe{\@endpetrue + \def\par{\@restorepar\everypar{}\par\@endpefalse}\everypar + {{\setbox\z@\lastbox}\everypar{}\@endpefalse}} +\newcommand*{\scrjura@doendpe}{% + \@endpetrue + \def\par{% + \@restorepar\everypar{% + \csname scrjura@everypar\endcsname + }% + \par\@endpefalse + }% + \everypar{% + {\setbox\z@\lastbox}\everypar{% + \csname scrjura@everypar\endcsname + }% + \@endpefalse + }% +} +\EndIncludeInRelease +% +% \end{macrocode} +% \end{macro}%^^A \EndIncludeInRelease +% \end{macro}%^^A \@gobble@IncludeInRelease +% \end{macro}%^^A \IncludeInRelease +% \end{macro}%^^A \scrjura@doendpe +% \end{macro}%^^A \@doendpe +% \end{macro}%^^A \scrjura@everypar +% +% \subsection{Entry to table of contents} +% \begin{macro}{\l@cpar} +% Toc entry of contract clauses. +% \changes{v3.27}{2019/02/25}{usage of \pkg*{tocbasic}} +% This is done using \pkg*{tocbasic}. The definition has to be part of the +% initialization of the package, otherwise package options wouldn't be able to +% change the setting. +% \begin{macrocode} +%<*init> +\DeclareTOCStyleEntry[% + indent=1.5em, + numwidth=2em, + level=\maxdimen +]{default}{cpar} +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Numbering of paragraphs and sentences} +% +% \begin{macro}{\scrjura@separator,\jura@separator} +% \changes{v0.7b}{2014/11/03}{\cs{jura@separator} renamed} +% Used to make it possible to remove white spaces at the beginning or end. +% \begin{macrocode} +%<*body> +\DeclareRobustCommand*{\scrjura@separator}[1]{#1} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\scrjura@usetype,\jura@usetype} +% \changes{v0.5d}{2010/04/28}{new} +% \changes{v0.7b}{2014/11/03}{\cs{jura@usetype} renamed} +% By default it is robust but does only call \cs{scrjura@@usetype} with the +% only argument. +% \begin{macro}{\scrjura@@usetype,\jura@@usetype} +% \changes{v0.5d}{2010/04/28}{new} +% \changes{v0.7b}{2014/11/03}{\cs{jura@@usetype} renamed} +% This second command is not robust and can easily be redefined. But by +% default it also does nothing but eating the argument. +% \begin{macrocode} +%<*body> +\DeclareRobustCommand*{\scrjura@usetype}[1]{\scrjura@@usetype{#1}} +\newcommand*{\scrjura@@usetype}[1]{} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\contract@everypar} +% The \cs{scrjura@everpar} used by contracts. +% \begin{macro}{\ifparnumber,\parnumbertrue,\parnumberfalse} +% \changes{v0.6}{2011/09/29}{moved the definition into the definition of the +% option} +% \begin{counter}{par} +% \begin{command}{\thepar,\theHpar} +% \begin{command}{\parformat} +% \changes{v0.7}{2013/06/07}{new font element \fnt{parnumber}} +% \begin{command}{\parformatseparation} +% \changes{v0.9f}{2016/02/06}{new} +% \begin{macro}{\p@par} +% \changes{v0.5d}{2010/04/28}{added \cs{jura@usetype} with argument +% \cs{jura@env@type}} +% \begin{command}{\withoutparnumber} +% \changes{v3.25}{2017/12/19}{new} +% The boolean defines if paragraph numbers have to be used. If they are +% deactivated also manual paragraph numbers are deactivated and the paragraphs +% are not counted. Otherwise the paragraphs are numbered using \cs{thepar}. It +% is important to reset the paragraph counter with every clause and +% sub-clause. And for labels the parent object the clause has to be used. +% \begin{macrocode} +%<*body> +\newcounter{par} +\renewcommand*{\thepar}{\arabic{par}} +\newcommand*{\theHpar}{\theH@AbsClause-\Roman{par}} +\newcommand*{\parformat}{(\thepar)} +\newcommand*{\parformatseparation}{\nobreakspace} +\newkomafont{parnumber}{} +\renewcommand*\p@par{{\scrjura@usetype{\scrjura@env@type}\theSubClause\scrjura@separator{\nobreakspace}}} +\@addtoreset{par}{Clause} +\@addtoreset{par}{SubClause} +\newcommand*{\withoutparnumber}{} +% +% \end{macrocode} +% \end{command} +% \end{macro} +% \end{command} +% \end{command} +% \end{command} +% \end{counter} +% \end{macro} +% \changes{v0.5c}{2010/04/26}{first argument of \cs{newmaxpar} and second +% argument of \cs{getmaxpar} is \meta{contract} not \meta{contractpars}} +% \changes{v0.5c}{2010/04/26}{\cs{contract@Clauseformat} expands while writing +% to its own argument} +% \changes{v0.7}{2013/04/18}{using counter \cnt{contractAbsoluteClause}} +% \changes{v0.7}{2013/05/23}{initializing sentence number for manually +% numbered paragraphs to 0 instead of 1, because first action of +% \cs{Sentence} is increasing the number} +% \changes{v0.7}{2013/05/23}{recognize paragraph number of \cs{thisparnumber}} +% \changes{v0.7}{2013/06/06}{if paragraph numbers are not completely numerical +% always set the number} +% \changes{v0.7b}{2014/11/03}{more flexible replacement of +% \cnt{contractAbsoluteClause}} +% \changes{v0.9f}{2016/02/06}{\cs{nobreakspace} replaced by +% \cs{parformatseparation}} +% \changes{v0.9g}{2016/03/25}{writing to \file{aux}-file \cs{if@filesw}} +% \begin{macrocode} +%<*body> +\newcommand*{\contract@everypar}{% + \ifparnumber + \ifx\scrjura@special@par\relax + \ifx\scrjura@special@reset@par\relax\else + \global\let\thepar\scrjura@special@reset@par + \global\let\scrjura@special@reset@par\relax + \fi + \refstepcounter{par}% + \refstepcounter{sentence}% + \else + \ifx\scrjura@special@reset@par\relax + \global\let\scrjura@special@reset@par\thepar + \fi + \global\let\thepar\scrjura@special@par + \global\let\scrjura@special@par\relax + \setcounter{sentence}{0}\refstepcounter{sentence}% + \fi + \begingroup + \if@filesw + \protected@write\@auxout{% + \expandafter\let\csname \scrjura@env@type @Clauseformat\endcsname + \@firstofone + }{% + \string\newmaxpar{\scrjura@env@type}% + {\csname the\scrjura@env@type + AbsoluteClause\endcsname}% + {\thepar}% + }% + \fi + \getmaxpar\@tempa{\scrjura@env@type}% + {\csname the\scrjura@env@type AbsoluteClause\endcsname}% + \typeout{Stored max is \@tempa}% + \def\reserved@a##1\@nnil{\def\@tempa{##1}}% + \afterassignment\reserved@a\@tempcnta=0\@tempa\relax\@nnil + \ifnum \@tempcnta>\@ne + {\usekomafont{parnumber}{\parformat\parformatseparation}}% + \else + \def\reserved@a{\relax}% + \ifx\@tempa\reserved@a + \withoutparnumber + \else + {\usekomafont{parnumber}{\parformat\parformatseparation}}% + \fi + \fi + \endgroup + \else + \begingroup\withoutparnumber\endgroup + \setcounter{sentence}{-1}\refstepcounter{sentence}% + \fi +} +% +% \end{macrocode} +% \end{macro} +% +% \begin{command}{\thisparnumber} +% \changes{v0.7}{2013/05/23}{new} +% \begin{macro}{\scrjura@special@par,\scrjura@special@reset@par} +% \changes{v0.7}{2013/05/23}{new} +% You can use this for manual paragraph numbering. But the number has to be +% fully expandable! +% \begin{macrocode} +%<*body> +\newcommand*{\thisparnumber}[1]{% + \def\scrjura@special@par{#1}% +} +\newcommand*{\scrjura@special@par}{} +\let\scrjura@special@par\relax +\newcommand*{\scrjura@special@reset@par}{} +\let\scrjura@special@reset@par\relax +% +% \end{macrocode} +% \end{macro}%^^A \scrjura@special@par +% \end{command}%^^A\thisparnumber +% +% +% \subsection{Referencing} +% +% \begin{command}{\refL} +% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\ref@L} +% Similar to \cs{ref} but always the long form. +% \begin{macrocode} +%<*body> +\newcommand*{\refL}{\kernel@ifstar {\ref@L*}{\ref@L{}}} +\newcommand*{\ref@L}[2]{% + \begingroup + \def\parcite@format{0}% + \let\sentencecite@format\parcite@format + \ref#1{#2}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\refS} +% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\ref@S} +% Similar to \cs{ref} but always the short form. +% \begin{macrocode} +\newcommand*{\refS}{\kernel@ifstar {\ref@S*}{\ref@S{}}} +\newcommand*{\ref@S}[2]{% + \begingroup + \def\parcite@format{1}% + \let\sentencecite@format\parcite@format + \ref#1{#2}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\refN} +% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\ref@N} +% Similar to \cs{ref} but always the numerical form. +% \begin{macrocode} +\newcommand*{\refN}{\kernel@ifstar {\ref@N*}{\ref@N{}}} +\newcommand*{\ref@N}[2]{% + \begingroup + \def\parcite@format{2}% + \let\sentencecite@format\parcite@format + \ref#1{#2}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\refClause} +% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\ref@Clause} +% Reference only the clause of a clause, paragraph or sentence. For better +% compatibility with \pkg{hyperref} there is also a star version if +% \pkg{hyperref} is used. Without \pkg{hyperref} the star version is nonsense. +% \begin{macrocode} +\newcommand*{\refClause}{% + \kernel@ifstar {\ref@Clause*}{\ref@Clause{}} +} +\newcommand*{\ref@Clause}[2]{% + \expandafter\ifx\csname r@#2\endcsname\relax + \ref#1{#2}% + \else + \begingroup +% \end{macrocode} +% Copy all parts of the reference but the first one to \cs{@tempb}. +% \begin{macrocode} + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@tempb + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter\@gobble\csname r@#2\endcsname}% +% \end{macrocode} +% Copy the first part of the reference to \cs{@tempa}. +% \begin{macrocode} + \def\@tempc##1##2\@nil{##1}% + \let\scrjura@separator\@gobble + \protected@edef\@tempa{\expandafter\expandafter\expandafter\@tempc + \csname r@#2\endcsname\noexpand\@nil}% +% \end{macrocode} +% Copy the first part of \cs{@tempa} to \cs{@tempb}. +% \begin{macrocode} + \protected@edef\@tempa{\expandafter\expandafter\expandafter\@tempc + \@tempa\@nil}% + \let\@@protect\protect + \let\protect\noexpand + \expandafter\edef\csname r@#2\endcsname{{\@tempa}\@tempb}% + \let\protect\@@protect + \ref#1{#2}% + \endgroup + \fi +} +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\refClauseN} +% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\ref@ClauseN} +% Reference only the clause number of a clause, a paragraph or a sentence. +% For improved compatibility with \pkg{hyperref} there is also a star version +% if \pkg{hyperref} is used. Without \pkg{hyperref} the star version is +% nonsense. +% \begin{macrocode} +\newcommand*{\refClauseN}{% + \kernel@ifstar {\ref@ClauseN*}{\ref@ClauseN{}} +} +\newcommand*{\ref@ClauseN}[2]{% + \begingroup + \let\Clauseformat\relax + \ref@Clause{#1}{#2}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\refPar} +% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\ref@Par} +% References only the paragraph of a paragraph or sentence. +% For improved compatibility with \pkg{hyperref} there is also a star version +% if \pkg{hyperref} is used. Without \pkg{hyperref} the star version is +% nonsense. +% \begin{macrocode} +\newcommand*{\refPar}{% + \kernel@ifstar {\ref@Par*}{\ref@Par{}} +} +\newcommand*{\ref@Par}[2]{% + \expandafter\ifx\csname r@#2\endcsname\relax + \ref#1{#2}% + \else + \begingroup +% \end{macrocode} +% Copy all parts of the reference but the first one to \cs{@tempb}. +% \begin{macrocode} + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@tempb + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter\@gobble\csname r@#2\endcsname}% +% \end{macrocode} +% Copy the first part of the reference to \cs{@tempa}. +% \begin{macrocode} + \def\@tempc##1##2\@nil{##1}% + \let\scrjura@separator\@gobble + \protected@edef\@tempa{\expandafter\expandafter\expandafter\@tempc + \csname r@#2\endcsname\noexpand\@nil}% +% \end{macrocode} +% Copy the second part of \cs{@tempa} to \cs{@tempa} ablegen. +% \begin{macrocode} + \def\@tempc##1##2##3\@nil{##2}% + \protected@edef\@tempa{\expandafter\expandafter\expandafter\@tempc + \@tempa{% + \protect\G@refundefinedtrue + \nfss@text{\reset@font\bfseries ??}% + \@latex@warning{Reference `#2' on page \thepage \space + with undefined par number}% + }\noexpand\@nil}% + \let\@@protect\protect + \let\protect\noexpand + \expandafter\edef\csname r@#2\endcsname{{\@tempa}\@tempb}% + \let\protect\@@protect + \ref#1{#2}% + \endgroup + \fi +} +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\refParL} +% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\ref@ParX} +% The same but long. +% \begin{macrocode} +\newcommand*{\refParL}{% + \kernel@ifstar {\ref@ParX0*}{\ref@ParX0{}} +} +\newcommand*{\ref@ParX}[3]{% + \begingroup + \def\parcite@format{#1}% + \let\sentencecite@format\parcite@format + \ref@Par{#2}{#3}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\refParS} +% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% The same but short. +% \begin{macrocode} +\newcommand*{\refParS}{% + \kernel@ifstar {\ref@ParX1*}{\ref@ParX1{}} +} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\refParN} +% \begin{macro}{\ref@ParN} +% \changes{v0.9h}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\ref@@ParN} +% The same but numerical. +% \begin{macrocode} +\newcommand*{\refParN}{% + \kernel@ifstar {\ref@ParN2*}{\ref@ParN2{}} +} +\newcommand*{\ref@ParN}[2]{% + \kernel@ifnextchar [%] + {\ref@@ParN{#1}{#2}}% + {\ref@ParX{#1}{#2}}% +} +\newcommand*{\ref@@ParN}{} +\def\ref@@ParN#1#2[#3]#4{% + \begingroup + \renewcommand*{\parnumericformat}[1]{% + \csname @#3\endcsname{\number ##1\relax}% + }% + \ref@ParX{#1}{#2}{#4}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{command} +% +% \begin{command}{\refSentence} +% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\ref@Sentence} +% Reference only the sentence of a sentence. +% For improved compatibility with \pkg{hyperref} there is also a star version +% if \pkg{hyperref} is used. Without \pkg{hyperref} the star version is +% nonsense. +% \begin{macrocode} +\newcommand*{\refSentence}{% + \kernel@ifstar {\ref@Sentence*}{\ref@Sentence{}} +} +\newcommand*{\ref@Sentence}[2]{% + \expandafter\ifx\csname r@#2\endcsname\relax + \ref#1{#2}% + \else + \begingroup +% \end{macrocode} +% Copy all parts of the reference to \cs{@tempb}. +% \begin{macrocode} + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@tempb + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter\@gobble\csname r@#2\endcsname}% +% \end{macrocode} +% Copy the first part of the reference to \cs{@tempa}. +% \begin{macrocode} + \def\@tempc##1##2\@nil{##1}% + \let\scrjura@separator\@gobble + \protected@edef\@tempa{\expandafter\expandafter\expandafter\@tempc + \csname r@#2\endcsname\noexpand\@nil}% +% \end{macrocode} +% Copy the third part of \cs{@tempa} to \cs{@tempa}. +% \begin{macrocode} + \def\@tempc##1##2##3##4\@nil{##3}% + \protected@edef\@tempa{\expandafter\expandafter\expandafter\@tempc + \@tempa{}{% + \protect\G@refundefinedtrue + \nfss@text{\reset@font\bfseries ??}% + \@latex@warning{Reference `#2' on page \thepage \space + with undefined sentence number}% + }\noexpand\@nil}% + \let\@@protect\protect + \let\protect\noexpand + \expandafter\edef\csname r@#2\endcsname{{\@tempa}\@tempb}% + \let\protect\@@protect + \ref#1{#2}% + \endgroup + \fi +} +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\refSentenceL} +% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\ref@SentenceX} +% The same but long. +% \begin{macrocode} +\newcommand*{\refSentenceL}{% + \kernel@ifstar {\ref@SentenceX0*}{\ref@SentenceX0{}} +} +\newcommand*{\ref@SentenceX}[3]{% + \begingroup + \def\parcite@format{#1}% + \let\sentencecite@format\parcite@format + \ref@Sentence{#2}{#3}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\refSentenceS} +% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% The same but short. +% \begin{macrocode} +\newcommand*{\refSentenceS}{% + \kernel@ifstar {\ref@SentenceX1*}{\ref@SentenceX1{}} +} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\refSentenceN} +% \changes{v0.9h}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% The same but numeric. +% \begin{macrocode} +\newcommand*{\refSentenceN}{% + \kernel@ifstar {\ref@SentenceX2*}{\ref@SentenceX2{}} +} +% +% \end{macrocode} +% \end{command} +% +% \begin{macro}{\contract@sentence} +% \changes{v0.7a}{2014/01/28}{using \cs{textsuperscript}} +% \changes{v0.7a}{2014/01/28}{\cs{nobreak}\cs{hskip}\cs{z@} added to allow +% hyphenation of the first word after the sentence mark} +% Numbering of sentences. +% \begin{counter}{sentence} +% \begin{command}{\thesentence,\theHsentence} +% \begin{macro}{\p@sentence} +% \changes{v3.27}{2019/10/09}{adaption for \LaTeX{} 2019-10-01} +% The counter is used for numbering the sentences. It is important to add the +% paragraph as parent object to labels. The original method to make it +% possible to use \cs{thesentence} as an argument of \cs{p@sentence} does not +% work any longer using \LaTeX{} 2019-10-01 or newer. It would result in an +% error message. So the code has to be adapted to the new definition of +% \cs{refstepcounter} in \LaTeX{} 2019-10-01. From this version it uses +% \cs{labelformat}. Don't ask me, what I think about the fact, that every new +% versions of \LaTeX{} can break existing packages and package authors have to +% find out such incompatibilities on their own. +% \begin{macrocode} +%<*body> +\newcounter{sentence}[par] +\renewcommand*{\thesentence}{\arabic{sentence}} +\newcommand*{\theHsentence}{\theHpar-\arabic{sentence}} +\scr@ifundefinedorrelax{labelformat}{% + \renewcommand*{\p@sentence}{\expandafter\p@@sentence} + \newcommand*{\p@@sentence}[1]{\p@par{{\par@cite{\thepar}}% + \scrjura@separator{\nobreakspace}}{\sentence@cite{#1}}}% +}{% + \labelformat{sentence}{\p@par{{\par@cite{\thepar}}% + \scrjura@separator{\nobreakspace}}{\sentence@cite{#1}}}% +} +\newcommand*{\contract@sentence}{% +% \end{macrocode} +% \changes{v0.9e}{2015/11/04}{first start the paragraph then print the number} +% \changes{v3.26}{2018/07/20}{new font element \fnt{sentencenumber}} +% \changes{v3.26}{2018/07/20}{new formatting \cs{sentencenumberformat}} +% For the numbering it is important not to increase the paragraph number at +% the very beginning, because the paragraph already does so. To make this +% work, the paragraph has to start before we print the number. But immediately +% after a \env{minipage}, a list or a \cs{parbox} we should behave as not +% being at the beginning of a paragraph. +% \begin{macrocode} + \ifvmode + \if@endpe + \refstepcounter{sentence}% + \else + \leavevmode + \fi + \else + \refstepcounter{sentence}% + \fi + {\usekomafont{sentencenumber}{\sentencenumberformat}}% + \nobreak\hskip\z@ +} +% \end{macrocode} +% \begin{fontelement}{sentencenumber} +% \begin{command}{\sentencenumberformat} +% \changes{v3.26}{2018/07/20}{new} +% Formatting an font can be changed using font element \fnt{sentencenumber} +% and command \cs{sentencenumberformat}. The last has the preset +% \cs{textsuperscript}. +% \begin{macrocode} +\newkomafont{sentencenumber}{} +\newcommand*{\sentencenumberformat}{\textsuperscript{\thesentence}} +% +% \end{macrocode} +% \end{command} +% \end{fontelement} +% \end{macro} +% \end{command} +% \end{counter} +% \end{macro} +% +% \begin{macro}{\par@cite} +% \begin{command}{\parciteformat} +% \changes{v0.5d}{2010/04/28}{argument moved} +% Reference style for paragraphs. +% \begin{macrocode} +%<*body> +\DeclareRobustCommand*{\par@cite}[1]{\parciteformat{#1}} +\newcommand*{\parciteformat}[1]{% + \ifcase \parcite@format + \expandafter\parlongformat + \or + \expandafter\parshortformat + \or + \expandafter\parnumericformat + \else + \unskip\expandafter\@gobble + \fi + {#1}% +} +% \end{macrocode} +% \end{command} +% \end{macro} +% +% \begin{macro}{\sentence@cite} +% \begin{command}{\sentenceciteformat} +% \changes{v0.5d}{2010/04/28}{argument moved} +% Reference style for sentences. Preset is \cs{@arabic}. +% \begin{macrocode} +\DeclareRobustCommand*{\sentence@cite}[1]{\sentenceciteformat{#1}} +\newcommand*{\sentenceciteformat}[1]{% + \ifcase \sentencecite@format + \expandafter\sentencelongformat + \or + \expandafter\sentenceshortformat + \or + \expandafter\sentencenumericformat + \else + \unskip\expandafter\@gobble + \fi + {#1}% +} +% \end{macrocode} +% \end{command} +% \end{macro} +% +% \begin{command}{\parlongformat,\parshortformat,\parnumericformat, +% \sentencelongformat,\sentenceshortformat, +% \sentencenumericformat} +% The six formattings. +% \begin{macrocode} +\newcommand*{\parlongformat}[1]{\parname~#1} +\newcommand*{\parshortformat}[1]{\parshortname~#1} +\newcommand*{\parnumericformat}[1]{\@Roman{\number #1\relax}} +\newcommand*{\sentencelongformat}[1]{\sentencename~#1} +\newcommand*{\sentenceshortformat}[1]{\sentenceshortname~#1} +\newcommand*{\sentencenumericformat}[1]{\@arabic{\number #1\relax}.} +% +% \end{macrocode} +% \end{command} +% +% \subsection{Language dependent names} +% +% \begin{command}{\parname,\parshortname,\sentencename,\sentenceshortname} +% \begin{macro}{\scrjura@lang@error} +% \changes{v0.7}{2013/09/19}{Usage of \cs{PackageError} instead of +% \cs{PackageErrorNoLine}} +% \changes{v3.24}{2017/05/29}{adaption for language name bug in +% \pkg{babel}~3.10} +% The names of paragraphs and sentences and their short versions. The English +% names are donated by ``m.eik''. +% \begin{macrocode} +%<*body> +\newcommand*{\parname}{Paragraph} +\AtBeginDocument{% + \providecaptionname{german,ngerman,austrian,naustrian}\parname{Absatz}% + \providecaptionname{german,ngerman,austrian,naustrian}\parshortname{Abs.}% + \providecaptionname{german,ngerman,austrian,naustrian}\sentencename{Satz}% + \providecaptionname{german,ngerman,austrian,naustrian}\sentenceshortname{S.}% + \providecaptionname{english,american,british,canadian,% + USenglish,UKenglish,usenglish,ukenglish}\parname{paragraph}% + \providecaptionname{english,american,british,canadian,% + USenglish,UKenglish,usenglish,ukenglish}\parshortname{par.}% + \providecaptionname{english,american,british,canadian,% + USenglish,UKenglish,usenglish,ukenglish}\sentencename{sentence}% + \providecaptionname{english,american,british,canadian,% + USenglish,UKenglish,usenglish,ukenglish}\sentenceshortname{sent.}% +} +\providecommand*{\parname}{\scrjura@lang@error{\parname}} +\providecommand*{\parshortname}{\scrjura@lang@error{\parshortname}} +\providecommand*{\sentencename}{\scrjura@lang@error{\sentencename}} +\providecommand*{\sentenceshortname}{\scrjura@lang@error{\sentenceshortname}} +\newcommand*{\scrjura@lang@error}[1]{% + \PackageError{scrjura}{% + current language not supported% + }{% + Currently scrjura only supports languages `german', `ngerman', + `austrian',\MessageBreak + `naustrian', `english', `american', `british', `canadian', + `USenglish',\MessageBreak + `UKenglish', `usenglish`, and `ukenglish'.\MessageBreak + It seems, that you are using another language (maybe `\languagename') or + that\MessageBreak + your language selection isn't compatible to package `babel'.\MessageBreak + Because of this you have to define `\string#1' by yourself!\MessageBreak + It would be nice if you'll send your definitions to the author.% + }% + \textbf{??}% +} +% +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \subsection{Using values from last \LaTeX{} run} +% +% \begin{command}{\newmaxpar} +% \changes{v0.6b}{2013/04/16}{\cs{\#1@Clauseformat} expands to its argument} +% \begin{command}{\getmaxpar} +% \changes{v0.6}{2011/09/30}{argument no 3 is expanded using +% \cs{protected@edef}} +% \changes{v0.5c}{2010/04/26}{\cs{protected@edef} replaced by \cs{edef}} +% \changes{v0.5c}{2010/04/26}{\cs{\#2@Clauseformat} expands to its argument} +% Two helper macros, to save a counter in a \file{aux}-file and get the value +% back or another value of it is not in the \file{aux}-file. +% \begin{macrocode} +%<*body> +\newcommand*{\newmaxpar}[3]{% + \begingroup + \expandafter\let\csname #1@Clauseformat\endcsname\@firstofone + \protected@edef\@tempa{#2}\@onelevel@sanitize\@tempa + \expandafter\xdef\csname max@#1@\@tempa\endcsname{#3}% + \endgroup +} +\newcommand*{\getmaxpar}[3]{% + \begingroup + \expandafter\let\csname #2@Clauseformat\endcsname\@firstofone + \protected@edef\@tempa{#3}% + \@onelevel@sanitize\@tempa + \expandafter\ifx \csname max@#2@\@tempa\endcsname\relax + \edef\@tempa{\endgroup\edef\noexpand#1{\expandafter\the\value{par}}}% + \else + \edef\@tempa{\endgroup + \edef\noexpand#1{\csname max@#2@\@tempa\endcsname}}% + \fi + \@tempa +} +% \end{macrocode} +% \changes{v0.7b}{2014/11/10}{added fallback code to \file{aux}-file} +% \changes{v0.9g}{2015/03/25}{write to \file{aux}-file \cs{if@filesw}} +% Because some users remove \pkg*{scrjura} from their documents without +% deleting the \file{aux}-file, we add a fallback definition of \cs{newmaxpar} +% to the \file{aux}-file. This avoids error messages because of undefined +% \cs{newmaxpar}. +% \begin{macrocode} +\AtBeginDocument{% + \if@filesw + \immediate\write\@auxout{% + \string\providecommand*\string\newmaxpar[3]{} + }% + \fi +} +% +% \end{macrocode} +% \end{command} +% \end{command} +% +% \iffalse +% +% \fi +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrkernel-addressfiles.dtx b/macros/latex/contrib/koma-script/scrkernel-addressfiles.dtx new file mode 100644 index 0000000000..c04f5ba2fb --- /dev/null +++ b/macros/latex/contrib/koma-script/scrkernel-addressfiles.dtx @@ -0,0 +1,164 @@ +% \iffalse meta-comment +% ====================================================================== +% scrkernel-addressfiles.dtx +% Copyright (c) Markus Kohm, 2006-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrkernel-addressfiles.dtx 3874 2022-06-05 10:38:02Z kohm $ +% +%<*load&class&neveruse> +\KOMA@key{internalonly}[\relax]{% + \FamilyKeyStateProcessed +} +\AtEndOfClass{\RelaxFamilyKey[.\KOMAClassFileName]{KOMA}{internalonly}}% +% +%<*option> +% \end{macrocode} +% \end{option} +% +% +% \changes{v2.96}{2006/08/20}{processing options} +% \changes{v2.97c}{2007/04/18}{using \cs{KOMAProcessOptions} for processing options} +% \begin{macrocode} +%\KOMAProcessOptions\relax +%\FamilyProcessOptions{KOMA}\relax +% +%<*body> +% \end{macrocode} +% +% +% \subsection{Some additional math missing from \eTeX} +% +% \begin{command}{\XdivY} +% \changes{v3.05a}{2010/03/10}{added} +% \meta{X} divided by \meta{Y} and rounded to the lower integer. +% \begin{macrocode} +%<*base> +\newcommand*{\XdivY}[2]{% + \numexpr ( #1 + #2 / 2 ) / #2 - 1\relax +} +% +% \end{macrocode} +% \end{command} +% +% \begin{command}{\XmodY} +% \changes{v3.05a}{2010/03/10}{added} +% \meta{X} modulo \meta{Y} (rest of integer division \meta{X} divided by \meta{Y}). +% \begin{macrocode} +%<*base> +\newcommand*{\XmodY}[2]{% + \numexpr #1 - #2 * \XdivY{#1}{#2}\relax +} +% +% \end{macrocode} +% \end{command} +% +% \subsection{Often needed commands and macros} +% +% \begin{macro}{\scr@ForEachTrimmedListElement} +% \changes{v3.27}{2019/04/16}{new (internal)} +% Executes \cs{\#2\{\meta{element}\}} for each \meta{element} of the comma +% separated list \#1. Spaces before for after \meta{element} are eliminated +% and empty elements are ignored. +% \begin{macrocode} +%<*base> +\newcommand{\scr@ForEachTrimmedListElement}[2]{% + \begingroup + \def\reserved@a{\endgroup}% + \@for \reserved@b:=#1 \do {% + \scr@trim@spaces\reserved@b + \ifx\reserved@b\@empty\else + \edef\reserved@a{% + \unexpanded\expandafter{\reserved@a#2}% + {\unexpanded\expandafter{\reserved@b}}% + }% + \fi + }% + \reserved@a +} +% +% \end{macrocode} +% \end{macro}^^A \scr@ForEachTrimmedListElement +% +% \begin{macro}{\@atdocumenttrue,\@atdocumentfalse,\if@atdocument} +% \changes{v2.95}{2002/12/05}{added} +% \changes{v3.37}{2022/05/06}{\cs{atdocumenttrue} moved with \LaTeX{} +% 2020/10/01 or newer} +% The boolean switch becomes true while |\begin{document}|. \KOMAScript{} uses +% it for commands and macros, which are different in the document preamble and +% the document body. +% \begin{macrocode} +%<*base> +\newif\if@atdocument +\IfLTXAtLeastTF{2020/10/01}{% + \AddToHook{begindocument/before}{\@atdocumenttrue}% +}{% + \AtBeginDocument{\@atdocumenttrue}% +} +\@onlypreamble\@atdocumentrue +\@onlypreamble\@atdocumentfalse +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\let@as@internal@defined} +% \changes{v2.95}{2002/08/19}{added} +% \changes{v2.95c}{2006/08/12}{warning while redefining} +% \changes{v2.96}{2006/11/26}{making user commands from internal macros can +% be banned for single macros} +% \changes{v2.97c}{2007/06/20}{making user commands from internal macros can +% generally banned} +% \changes{v3.10}{2010/10/26}{\cs{ignorespaces} at \cs{document} patch added} +% \changes{v3.13a}{2014/08/13}{unwanted white spaces removed} +% \changes{v3.28}{2019/11/18}{removed} +% \end{macro} +% +% \begin{command}{\ifundefined,\ifundefinedorrelax,\Ifundefinedorrelax} +% \changes{v2.95}{2002/08/21}{added} +% \changes{v2.95c}{2006/08/12}{using an internal macro to define it} +% \changes{v2.97c}{2007/06/20}{\cs{ifundefinedorrelax} replaces \cs{ifundefined}} +% \changes{v3.28}{2019/11/18}{\cs{ifundefinedorrelax} renamed to +% \cs{Ifundefinedorrelax}} +% \changes{v3.29}{2020/01/17}{fix of missing backslash} +% Same as \cs{scr@ifundefinedorrelax} but at user level. +% \begin{macrocode} +%<*base> +\newcommand*{\Ifundefinedorrelax}{\scr@ifundefinedorrelax}% +% +% \end{macrocode} +% \end{command} +% +% \begin{command}{\ifnotundefined,\Ifnotundefined} +% \changes{v2.95}{2002/08/21}{added} +% \changes{v2.95c}{2006/08/12}{using \eTeX{} if possible} +% \changes{v3.02c}{2009/02/19}{\eTeX{} is mandatory} +% \changes{v3.28}{2019/11/18}{\cs{ifnotundefined} renamed to \cs{Ifnotundefined}} +% This is the opposite to \cs{Ifundefinedorrelax}. Sometimes it is useful. +% \begin{macrocode} +%<*base> +\providecommand*{\ifnotundefined}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifnotundefined'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifnotundefined' by `\string\Ifnotundefined'% + }% + \Ifnotundefined +} +\newcommand{\Ifnotundefined}[1]{% + \ifcsname #1\endcsname + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +% +% \end{macrocode} +% \end{command} +% +% \begin{command}{\ifstr,\Ifstr} +% \changes{v2.95}{2004/07/20}{\meta{if code} and \meta{then code} delegated +% after the command execution} +% \changes{v3.04b}{2010/01/29}{\cs{edef} replaced by \cs{protected@edef}} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr} (but still +% available as deprecated command)} +% This command compares two fully expanded token lists. So an alternative name +% would be \cs{Ifxequal}. +% \begin{macrocode} +%<*base> +\providecommand*{\ifstr}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifstr'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifstr' by `\string\Ifstr'% + }% + \Ifstr +} +\newcommand\Ifstr[2]{% + \begingroup\protected@edef\reserved@a{#1}\protected@edef\reserved@b{#2}% + \ifx\reserved@a\reserved@b + \endgroup\expandafter\@firstoftwo + \else + \endgroup\expandafter\@secondoftwo + \fi +} +% +% \end{macrocode} +% \end{command} +% +% \begin{command}{\ifstrstart,\Ifstrstart} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart} (but +% still available as deprecated command)} +% If the expansion of the first argument starts with expansion of the second +% one use the third argument, otherwise the fourth. +% \begin{macrocode} +%<*base> +\providecommand*{\ifstrstart}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifstrstart'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifstrstart' by `\string\Ifstrstart'% + }% + \Ifstrstart +} +\newcommand*{\Ifstrstart}[2]{% + \begingroup + \edef\reserved@a{\noexpand\@ifstrstart{#1}{#2}}% + \reserved@a{\aftergroup\@firstoftwo}{\aftergroup\@secondoftwo}% + \endgroup +} +% \end{macrocode} +% \begin{macro}{\@ifstrstart} +% \changes{v3.12}{2013/11/05}{added} +% Helper. +% \begin{macrocode} +\newcommand*{\@ifstrstart}[2]{% + \def\reserved@a ##1#2##2\@nil{% + \if\relax\detokenize{##1}\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }% + \reserved@a#1#2\@nil +} +% +% \end{macrocode} +% \end{macro}^^A \@ifstrstart +% \end{command}^^A \ifstrstart,\Ifstrstart +% +% \begin{command}{\IfArgIsEmpty} +% \changes{v3.19}{2015/08/29}{added} +% \changes{v3.27}{2019/03/11}{\cs{long}} +% \changes{v3.27}{2019/07/19}{needed already to process options} +% If the first argument is absolutely empty execute the second one, otherwise +% the third one. +% +%<*prepare> +%<*base> +% \begin{macrocode} +\newcommand{\IfArgIsEmpty}[1]{% + \if\relax\detokenize{#1}\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +% \end{macrocode} +% +% +%<*body> +% \end{command}^^A \IfArgIsEmpty +% +% +% \begin{command}{\ifislengthprimitive,\Ifislengthprimitive} +% \changes{v3.20}{2015/10/19}{added} +% \changes{v3.36}{2022/02/17}{\cs{ifislengthprimitive} renamed to +% \cs{Ifislengthprimitive} (but still defined as deprecated)} +% If the first argument expands to a primitive, that can be used as a length, +% execute the second argument, otherwise the third one. +% \begin{macrocode} +%<*base> +\providecommand*{\ifislengthprimitive}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifislengthprimitive'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifislengthprimitive' by `\string\Ifislengthprimitive'% + }% + \Ifislengthprimitive +} +\newcommand*{\Ifislengthprimitive}[1]{% + \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifislengthprimitive#1\@nil}% +} +% \end{macrocode} +% \begin{macro}{\scr@ifislengthprimitive} +% \changes{v3.20}{2015/10/19}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% Helper macro to test against several length like \TeX{} primitives. +% \begin{macrocode} +\newcommand*{\scr@ifislengthprimitive}[1]{% + \begingroup + \Ifstrstart{\meaning #1}{\detokenize{macro:}}{% + \aftergroup\expandafter\aftergroup\scr@ifislengthprimitive + }{% + \def\reserved@c{\aftergroup\scr@secondoftwoAfterNil}% + \@for\reserved@a:=\baselineskip,\dp,\hsize,\ht,\lineskip,% + \parindent,\parskip,\pdfpageheight,\pdfpagewidth,% + \wd,\vsize \do {% + \expandafter\Ifstr\expandafter{\expandafter\string\reserved@a}{% + \meaning #1% + }{% + \def\reserved@c{\aftergroup\scr@TestDimenAssignTillNil}% + }% + }% + \reserved@c + }% + \endgroup + #1% +} +% +% \end{macrocode} +% \end{macro}^^A \scr@ifislengthprimitive +% \end{command}^^A \ifislengthprimitive,\Ifislengthprimitive +% +% +% \begin{command}{\ifisdimen,\Ifisdimen} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.20}{2015/10/19}{re-implemented} +% \changes{v3.28}{2019/11/19}{\cs{ifisdimen} renamed to \cs{Ifisdimen} (but +% still defined as deprecated command)} +% If the first argument expands to a \cs{dimen} register (and nothing else), +% execute the second argument, otherwise the third one. +% \begin{macrocode} +%<*base> +\providecommand*{\ifisdimen}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifisdimen'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifisdimen' by `\string\Ifisdimen'% + }% + \Ifisdimen +} +\newcommand*{\Ifisdimen}[1]{% + \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisdimen#1\@nil}% +} +% \end{macrocode} +% \begin{macro}{\scr@ifisdimen} +% \changes{v3.20}{2015/10/19}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}} +% Helper macro, that tests a macro recursive to expand to a \cs{dimen} register. +% \begin{macrocode} +\newcommand*{\scr@ifisdimen}[1]{% + \begingroup + \Ifstrstart{\meaning #1}{\detokenize{macro:}}{% + \aftergroup\expandafter\aftergroup\scr@ifisdimen + }{% + \Ifstrstart{\meaning #1}{\string\dimen}{% + \aftergroup\scr@TestDimenAssignTillNil + }{% + \aftergroup\scr@secondoftwoAfterNil + }% + }% + \endgroup + #1% +} +% \end{macrocode} +% \end{macro}^^A \scr@ifisdimen +% \begin{macro}{\scr@TestDimenAssignTillNil} +% \changes{v3.20}{2015/10/19}{added} +% Argument \texttt{\#1} delimited by \cs{@nil} is assigned to a temporary +% length. If this uses the argument completely, the argument \texttt{\#2} behind +% \cs{@nil} will executed, otherwise argument \texttt{\#3}. In any case +% \texttt{\#1} will removed from the input totally. +% \begin{macrocode} +\newcommand*\scr@TestDimenAssignTillNil{} +\def\scr@TestDimenAssignTillNil#1\@nil{% + \begingroup + \afterassignment\scr@AfterEndGroupIfArgIsRelaxTillNnil + \@tempdima=#1\relax\@nnil +} +% \end{macrocode} +% \begin{macro}{\scr@IfAfterEndgroupArgIsRelaxTillNnil,\scr@IfArgIsRelaxAfterRelaxTillNnil} +% \changes{v3.20}{2015/10/19}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}} +% The helper macros read an argument delimited by \cs{@nnil}. If this +% arguments consists of a number of \cs{relax} only, the second argument (first +% behind \cs{@nnil}) will be execute, otherwise the third (second behind \cs{@nnil}). +% \begin{macrocode} +\newcommand*\scr@AfterEndGroupIfArgIsRelaxTillNnil{} +\def\scr@AfterEndGroupIfArgIsRelaxTillNnil#1\@nnil{% + \endgroup + \Ifstr{\detokenize{#1}}{\detokenize{\relax}}{\@firstoftwo}{% + \Ifstrstart{\detokenize{#1}}{\detokenize{\relax}}{% + \scr@IfArgIsRelaxAfterRelaxTillNnil #1\@nnil + }{\@secondoftwo}% + }% +} +\newcommand*\scr@IfArgIsRelaxAfterRelaxTillNnil{} +\def\scr@IfArgIsRelaxAfterRelaxTillNnil \relax#1\@nnil{% + \Ifstr{\detokenize{#1}}{\detokenize{\relax}}{\@firstoftwo}{% + \Ifstrstart{\detokenize{#1}}{\detokenize{\relax}}{% + \scr@IfArgIsRelaxAfterRelaxTillNnil #1\@nnil + }{\@secondoftwo}% + }% +} +% \end{macrocode} +% \end{macro}^^A \scr@IfArgIsRelaxTillNnil,\scr@IfArgIsRelaxAfterRelaxTillNnil +% \end{macro}^^A \scr@TestSkipAssignTillNil +% \begin{macro}{\scr@@secondoftwoAfterNil,\scr@secondoftwoAfterNil} +% \changes{v3.20}{2015/10/19}{added} +% The helper macros reads arguments \texttt{\#1} delimited by \cs{@nil} and +% executes \texttt{\#3}. We have to take care for the case of an empty first +% argument, which would make \cs{@nil} to be the argument. Because of this we +% need two helpers. +% \begin{macrocode} +\newcommand*{\scr@secondoftwoAfterNil}{\scr@@secondoftwoAfterNil\@empty} +\newcommand*{\scr@@secondoftwoAfterNil}{} +\def\scr@@secondoftwoAfterNil#1\@nil{\@secondoftwo} +% +% \end{macrocode} +% \end{macro}^^A \scr@@secondoftwoAfterNil,\scr@secondoftwoAfterNil +% \end{command}^^A \ifisdimen,\Ifisdimen +% +% \begin{command}{\ifisskip,\Ifisskip} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.18a}{2015/07/07}{\cs{baselineskip} and \cs{parskip} are skips} +% \changes{v3.20}{2015/10/19}{\cs{baselineskip} and \cs{parskip} are not skips} +% \changes{v3.20}{2015/10/19}{re-implemented} +% \changes{v3.28}{2019/11/19}{\cs{ifisskip} renamed to \cs{Ifisskip}} +% If the first argument expands to a \cs{skip} register (and nothing else), +% execute the second argument, otherwise the third one. +% \begin{macrocode} +%<*base> +\providecommand*{\ifisskip}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifisskip'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifisskip' by `\string\Ifisskip'% + }% + \Ifisskip +} +\newcommand*{\Ifisskip}[1]{% + \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisskip#1\@nil}% +} +% \end{macrocode} +% \begin{macro}{\scr@ifisskip} +% \changes{v3.20}{2015/10/19}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}} +% Helper macro, that tests a macro recursive to expand to a \cs{skip} register. +% \begin{macrocode} +\newcommand*{\scr@ifisskip}[1]{% + \begingroup + \Ifstrstart{\meaning #1}{\detokenize{macro:}}{% + \aftergroup\expandafter\aftergroup\scr@ifisskip + }{% + \Ifstrstart{\meaning #1}{\string\skip}{% + \aftergroup\scr@TestSkipAssignTillNil + }{% + \aftergroup\scr@secondoftwoAfterNil + }% + }% + \endgroup + #1% +} +% \end{macrocode} +% \end{macro}^^A \scr@ifisskip +% \begin{macro}{\scr@TestSkipAssignTillNil} +% \changes{v3.20}{2015/10/19}{added} +% Argument \texttt{\#1} delimited by \cs{@nil} is assigned to a temporary +% \cs{skip}. If this uses the argument completely, the argument \texttt{\#2} behind +% \cs{@nil} will executed, otherwise argument \texttt{\#3}. In any case +% \texttt{\#1} will removed from the input totally. +% \begin{macrocode} +\newcommand*\scr@TestSkipAssignTillNil{} +\def\scr@TestSkipAssignTillNil#1\@nil{% + \begingroup + \afterassignment\scr@AfterEndGroupIfArgIsRelaxTillNnil + \@tempskipa=#1\relax\@nnil +} +% +% \end{macrocode} +% \end{macro}^^A \scr@TestSkipAssignTillNil +% \end{command}^^A \ifiskip,\Ifisskip +% +% \begin{command}{\ifiscount,\Ifiscount} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.20}{2015/10/19}{re-implemented} +% \changes{v3.28}{2019/11/19}{\cs{ifiscount} renamed to \cs{Ifiscount}} +% If the first argument expands to a \cs{count} register (and nothing else), +% execute the second argument, otherwise the third one. +% \begin{macrocode} +%<*base> +\providecommand*{\ifiscount}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifiscount'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifiscount' by `\string\Ifiscount'% + }% + \Ifiscount +} +\newcommand*{\Ifiscount}[1]{% + \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifiscount#1\@nil}% +} +% \end{macrocode} +% \begin{macro}{\scr@ifiscount} +% \changes{v3.20}{2015/10/19}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}} +% Helper macro, that tests a macro recursive to expand to a \cs{count} register. +% \begin{macrocode} +\newcommand*{\scr@ifiscount}[1]{% + \begingroup + \Ifstrstart{\meaning #1}{\detokenize{macro:}}{% + \aftergroup\expandafter\aftergroup\scr@ifiscount + }{% + \Ifstrstart{\meaning #1}{\string\count}{% + \aftergroup\scr@TestCountAssignTillNil + }{% + \aftergroup\scr@secondoftwoAfterNil + }% + }% + \endgroup + #1% +} +% \end{macrocode} +% \end{macro}^^A \scr@ifiscount +% \begin{macro}{\scr@TestSkipCountTillNil} +% \changes{v3.20}{2015/10/19}{added} +% Argument \texttt{\#1} delimited by \cs{@nil} is assigned to a temporary +% counter. If this uses the argument completely, the argument \texttt{\#2} behind +% \cs{@nil} will executed, otherwise argument \texttt{\#3}. In any case +% \texttt{\#1} will removed from the input totally. +% \begin{macrocode} +\newcommand*\scr@TestCountAssignTillNil{} +\def\scr@TestCountAssignTillNil#1\@nil{% + \begingroup + \afterassignment\scr@AfterEndGroupIfArgIsRelaxTillNnil + \@tempcnta=#1\relax\@nnil +} +% +% \end{macrocode} +% \end{macro}^^A \scr@TestCountAssignTillNil +% \end{command}^^A \ifiscount,\Ifiscount +% +% +% \begin{command}{\ifisdimexpr,\Ifisdimexpr} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.20}{2015/10/19}{re-implemented} +% \changes{v3.28}{2019/11/19}{\cs{ifisdimexpr} renamed to \cs{Ifisdimexpr}} +% If the first argument expands to a \cs{dimexpr}, +% execute the second argument, otherwise the third one. There is an important +% difference to \cs{Ifisdimen}: If the argument begins with \cs{dimexpr} but +% is not a valid \emph{dimension expression} \cs{Ifisdimexpr} detects a +% \cs{dimexpr}, but using this expression later will result in an error. +% \begin{macrocode} +%<*base> +\providecommand*{\ifisdimexpr}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifisdimexpr'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifisdimexpr' by `\string\Ifisdimexpr'% + }% + \Ifisdimexpr +} +\newcommand*{\Ifisdimexpr}[1]{% + \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisdimexpr#1\relax\@nil}% +} +% \end{macrocode} +% \begin{macro}{\scr@ifisdimexpr} +% \changes{v3.20}{2015/10/19}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}} +% Helper macro, that tests a macro recursive to expand to a \cs{dimexpr}. +% \begin{macrocode} +\newcommand*{\scr@ifisdimexpr}[1]{% + \begingroup + \Ifstrstart{\meaning #1}{\detokenize{macro:}}{% + \aftergroup\expandafter\aftergroup\scr@ifisdimexpr + }{% + \Ifstrstart{\meaning #1}{\string\dimexpr}{% + \aftergroup\scr@TestDimenAssignTillNil + }{% + \aftergroup\scr@secondoftwoAfterNil + }% + }% + \endgroup + #1% +} +% +% \end{macrocode} +% \end{macro}^^A \scr@ifisdimexpr +% \end{command}^^A \ifisdimexpr,\Ifisdimexpr +% +% +% \begin{command}{\ifisglueexpr,\Ifisglueexpr} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.20}{2015/10/19}{re-implemented} +% \changes{v3.28}{2019/11/19}{\cs{ifisglueexpr} renamed to \cs{Ifisglueexpr}} +% If the first argument expands to a \cs{glueexpr}, +% execute the second argument, otherwise the third one. There is an important +% difference to \cs{Ifisskip}: If the argument begins with \cs{glueexpr} but +% is not a valid \emph{glue expression} \cs{Ifisglueexpr} detects a +% \cs{göueexpr}, but using this expression later will result in an error. +% \begin{macrocode} +%<*base> +\providecommand*{\ifisglueexpr}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifisglueexpr'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifisglueexpr' by `\string\Ifisglueexpr'% + }% + \Ifisglueexpr +} +\newcommand*{\Ifisglueexpr}[1]{% + \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisglueexpr#1\relax\@nil}% +} +% \end{macrocode} +% \begin{macro}{\scr@ifisglueexpr} +% \changes{v3.20}{2015/10/19}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}} +% Helper macro, that tests a macro recursive to expand to a \cs{glueexpr}. +% \begin{macrocode} +\newcommand*{\scr@ifisglueexpr}[1]{% + \begingroup + \Ifstrstart{\meaning #1}{\detokenize{macro:}}{% + \aftergroup\expandafter\aftergroup\scr@ifisglueexpr + }{% + \Ifstrstart{\meaning #1}{\string\glueexpr}{% + \aftergroup\scr@TestSkipAssignTillNil + }{% + \aftergroup\scr@secondoftwoAfterNil + }% + }% + \endgroup + #1% +} +% +% \end{macrocode} +% \end{macro}^^A \scr@ifisglueexpr +% \end{command}^^A \ifisglueexpr,\Ifisglueexpr +% +% +% \begin{command}{\ifisnumexpr,\Ifisnumexpr} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.20}{2015/10/19}{re-implemented} +% \changes{v3.28}{2019/11/19}{\cs{ifisnumexpr} renamed to \cs{Ifisnumexpr}} +% If the first argument expands to a \cs{numexpr}, +% execute the second argument, otherwise the third one. There is an important +% difference to \cs{Ifiscount}: If the argument begins with \cs{numexpr} but +% is not a valid \emph{numerical expression} \cs{Ifisnumexpr} detects a +% \cs{numexpr}, but using this expression later will result in an error. +% \begin{macrocode} +%<*base> +\providecommand*{\ifisnumexpr}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifisnumexpr'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifisnumexpr' by `\string\Ifisnumexpr'% + }% + \Ifisnumexpr +} +\newcommand*{\Ifisnumexpr}[1]{% + \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisnumexpr#1\relax\@nil}% +} +% \end{macrocode} +% \begin{macro}{\scr@ifisnumexpr} +% \changes{v3.20}{2015/10/19}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}} +% Helper macro, that tests a macro recursive to expand to a \cs{numexpr}. +% \begin{macrocode} +\newcommand*{\scr@ifisnumexpr}[1]{% + \begingroup + \Ifstrstart{\meaning #1}{\detokenize{macro:}}{% + \aftergroup\expandafter\aftergroup\scr@ifisnumexpr + }{% + \Ifstrstart{\meaning #1}{\string\numexpr}{% + \aftergroup\scr@TestCountAssignTillNil + }{% + \aftergroup\scr@secondoftwoAfterNil + }% + }% + \endgroup + #1% +} +% +% \end{macrocode} +% \end{macro}^^A \scr@ifisnumexpr +% \end{command}^^A \ifisnumexpr,\Ifisnumexpr +% +% +% \begin{command}{\ifisdefchar,\Ifisdefchar} +% \changes{v3.20}{2015/10/19}{added} +% \changes{v3.36}{2022/02/17}{\cs{ifisdefchar} renamed to \cs{Ifisdefchar}} +% If the first argument expands to a value defined using \cs{chardef}, +% execute the second argument, otherwise the third one. Note: If the expanded +% argument begins with \verb|\char"| but is not a valid \emph{character value} +% \cs{Ifisdefchar} detects a valid value, but using this value later will +% result in an error. +% \begin{macrocode} +%<*base> +\providecommand*{\ifisdefchar}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifisdefchar'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifisdefchar' by `\string\Ifisdefchar'% + }% + \Ifisdefchar +} +\newcommand*{\Ifisdefchar}[1]{% + \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisdefchar#1\@nil}% +} +% \end{macrocode} +% \begin{macro}{\scr@ifisdefchar} +% \changes{v3.20}{2015/10/19}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}} +% Helper macro, that tests a macro recursive to expand to a \cs{char}. +% \begin{macrocode} +\newcommand*{\scr@ifisdefchar}[1]{% + \begingroup + \Ifstrstart{\meaning #1}{\detokenize{macro:}}{% + \aftergroup\expandafter\aftergroup\scr@ifisdefchar + }{% + \Ifstrstart{\meaning #1}{\string\char\string"}{% + \aftergroup\scr@TestCountAssignTillNil + }{% + \aftergroup\scr@secondoftwoAfterNil + }% + }% + \endgroup + #1% +} +% +% \end{macrocode} +% \end{macro}^^A \scr@ifisdefchar +% \end{command}^^A \ifisdefchar,\Ifisdefchar +% +% +% \begin{command}{\ifiscounter,\Ifiscounter} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.28}{2019/11/19}{\cs{ifiscounter} renamed to \cs{Ifiscounter}} +% If the first argument expands to a \LaTeX{} counter, execute the second +% argument, otherwise the third one. +% \begin{macrocode} +%<*base> +\providecommand*{\ifiscounter}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifiscounter'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifiscounter' by `\string\Ifiscounter'% + }% + \Ifiscounter +} +\newcommand*{\Ifiscounter}[1]{% + \begingroup + \scr@ifundefinedorrelax{c@#1}{% + \aftergroup\@secondoftwo + }{% + \aftergroup\@firstoftwo + }% + \endgroup +} +% +% \end{macrocode} +% \end{command}^^A \ifiscounter,\Ifiscounter +% +% +% \begin{command}{\ifisinteger,\Ifisinteger} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.12a}{2014/01/24}{white space removed} +% \changes{v3.20}{2015/10/19}{re-implemented} +% \changes{v3.28}{2019/11/19}{\cs{ifisinteger} renamed to \cs{Ifisinteger}} +% If the first argument expands to a (positive or negative) integer, execute +% the second argument, otherwise the third one. +% \begin{macrocode} +%<*base> +\providecommand*{\ifisinteger}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifisinteger'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifisinteger' by `\string\Ifisinteger'% + }% + \Ifisinteger +} +\newcommand*{\Ifisinteger}[1]{% + \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisinteger#1\@nil}% +} +% \end{macrocode} +% \begin{macro}{\scr@ifisinteger} +% \changes{v3.20}{2015/10/19}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}} +% Helper macro to test recursive to a algebraic sign or a number without sign. +% \begin{macrocode} +\def\scr@ifisinteger#1{% + \begingroup + \Ifstrstart{\meaning #1}{\detokenize{macro:}}{% + \aftergroup\expandafter\aftergroup\scr@ifisinteger\aftergroup#1% + }{% + \Ifstrstart{\meaning #1}{\detokenize{the character}}{% + \if #1-\aftergroup\scr@ifisinteger + \else + \if #1+\aftergroup\scr@ifisinteger + \else + \ifnum 0=0\if #10\else\if #11\else\if #12\else\if #13\else + \if #14\else\if #15\else\if #16\else\if #17\else + \if #18\else\if #19\else 1\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \relax + \aftergroup\scr@TestCountAssignTillNil + \aftergroup#1% + \else + \aftergroup\scr@secondoftwoAfterNil + \aftergroup#1% + \fi + \fi + \fi + }{% + \Ifstrstart{\meaning #1}{\string\char\string"}{% + \aftergroup\scr@TestCountAssignTillNil + }{% + \def\reserved@c{% + \aftergroup\scr@secondoftwoAfterNil + }% + \@for\reserved@a:=\abovedisplayskip,\abovedisplayshortskip,% + \adjdemerits,% + \baselineskip,\belowdisplayskip,% + \belowdisplayshortskip,\binoppenalty,\boxmaxdepth,% + \brokenpenalty,% + \clubpenalty,\count,% + \dimen,\dimexpr,\doublehyphendemerits,\dp,% + \emergenystretch,\exhyphenpenalty,% + \finalhyphendemerits,% + \glueexpr,% + \hbadness,\hfuzz,\hsize,\ht,\hyphenpenalty,% + \lastskip,\lastpenalty,\linepenalty,% + \lineskip,\lineskiplimit,% + \maxdepth,\numexpr,% + \overfullrule,% + \parfillskip,\parindent,\parskip,% + \pdfpageheight,\pdfpagewidth,% + \predisplaypenalty,\pretolerance,% + \relpenalty,\widowpenalty,% + \skip,\splitmaxdepth,\splittopskip,% + \tolerance,\topskip,% + \wd,\vbadness,\vfuzz,\vsize + \do {% + \expandafter\Ifstr\expandafter{\expandafter\string\reserved@a}{% + \meaning #1% + }{% + \def\reserved@c{\aftergroup\scr@TestCountAssignTillNil}% + }% + }% + \reserved@c + }% + \aftergroup#1% + }% + }% + \endgroup +} +% +% \end{macrocode} +% \end{macro}^^A \scr@ifisinteger +% \end{command}^^A \ifisinteger,\Ifisinteger +% +% +% \begin{macro}{\scr@ifrelax@to@nnil} +% \changes{v3.12}{2013/11/05}{added} +% Helper macro to be used after an assignment. If everything until the first +% \cs{@nnil} is exactly one \cs{relax}, the second argument (first after the +% \cs{@nnil}) will be executed, otherwise the third argument (second after the +% \cs{@nnil}). +% \begin{macrocode} +%<*base> +\newcommand*{\scr@ifrelax@to@nnil}{} +\def\scr@ifrelax@to@nnil#1\@nnil{% + \begingroup + \def\reserved@a{#1}\def\reserved@b{\relax}% + \ifx\reserved@a\reserved@b + \aftergroup\@firstoftwo + \else + \aftergroup\@secondoftwo + \fi + \endgroup +} +% +% \end{macrocode} +% \end{macro} +% +% \begin{command}{\ifisdimension,\Ifisdimension} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.12a}{2014/01/24}{white space removed} +% \changes{v3.20}{2015/10/20}{re-implemented} +% \changes{v3.28}{2019/11/19}{\cs{ifisdimension} renamed to \cs{Ifisdimension}} +% If the step by step expansion of the first argument results in a (positive +% or negative) length, the second argument will be executed, otherwise the +% third one. +% \begin{macrocode} +%<*base> +\providecommand*{\ifisdimension}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifisdimension'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifisdimension' by `\string\Ifisdimension'% + }% + \Ifisdimension +} +\newcommand*{\Ifisdimension}[1]{% + \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisdimension#1\@nil}% +} +% \end{macrocode} +% \begin{macro}{\scr@ifisdimension} +% \changes{v3.20}{2015/10/20}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}} +% \changes{v3.28}{2019/11/23}{arithmetic plus sign fixed} +% To make this command absolutely correct without false positive and false +% negative results, it would be very complicated. Instead we use a heuristic: +% If the argument consists of a arbitrary number of arithmetic signs followed +% by at most one dot, comma or digit or followed by something, that is a valid +% lengths primitive, we try an assignment. Invalid assignments can result in +% errors. This is not the best solution but makes things a lot easier. +% \begin{macrocode} +\newcommand*{\scr@ifisdimension}[1]{% + \begingroup + \Ifstrstart{\meaning #1}{\detokenize{macro:}}{% + \aftergroup\expandafter\aftergroup\scr@ifisdimension\aftergroup#1% + }{% + \Ifstrstart{\meaning #1}{\detokenize{the character}}{% + \if #1-\aftergroup\scr@ifisdimension + \else + \if #1+\aftergroup\scr@ifisdimension + \else + \if #1.% + \aftergroup\scr@TestDimensionAssignTillNil + \aftergroup#1% + \else + \if #1,% + \aftergroup\scr@TestDimensionAssignTillNil + \aftergroup#1% + \else + \ifnum 0=0\if #10\else\if #11\else\if #12\else\if #13\else + \if #14\else\if #15\else\if #16\else\if #17\else + \if #18\else\if #19\else 1\fi\fi + \fi\fi\fi\fi + \fi\fi\fi\fi + \relax + \aftergroup\scr@TestDimensionAssignTillNil + \aftergroup#1% + \else + \aftergroup\scr@secondoftwoAfterNil + \aftergroup#1% + \fi + \fi + \fi + \fi + \fi + }{% + \Ifstrstart{\meaning #1}{\string\char\string"}{% + \aftergroup\scr@TestDimensionAssignTillNil + }{% + \def\reserved@c{% + \aftergroup\scr@secondoftwoAfterNil + \aftergroup\@empty + }% + \@for\reserved@a:=\abovedisplayskip,\abovedisplayshortskip,% + \adjdemerits,% + \baselineskip,\belowdisplayskip,% + \belowdisplayshortskip,\binoppenalty,\boxmaxdepth,% + \brokenpenalty,% + \clubpenalty,\count,% + \dimen,\dimexpr,\doublehyphendemerits,\dp,% + \emergenystretch,\exhyphenpenalty,% + \finalhyphendemerits,% + \glueexpr,% + \hbadness,\hfuzz,\hsize,\ht,\hyphenpenalty,% + \lastskip,\lastpenalty,\linepenalty,% + \lineskip,\lineskiplimit,% + \maxdepth,\numexpr,% + \overfullrule,% + \parfillskip,\parindent,\parskip,% + \pdfpageheight,\pdfpagewidth,% + \predisplaypenalty,\pretolerance,% + \relpenalty,\widowpenalty,% + \skip,\splitmaxdepth,\splittopskip,% + \tolerance,\topskip,% + \wd,\vbadness,\vfuzz,\vsize + \do {% + \expandafter\Ifstr\expandafter{\expandafter\string\reserved@a}{% + \meaning #1% + }{% + \def\reserved@c{\aftergroup\scr@TestDimensionAssignTillNil}% + }% + }% + \reserved@c + }% + \aftergroup#1% + }% + }% + \endgroup +} +% \end{macrocode} +% \begin{macro}{\scr@TestDimenionAssignTillNil} +% \changes{v3.20}{2015/10/19}{added} +% Argument \texttt{\#1} delimited by \cs{@nil} is assigned to a temporary +% length. If this uses the argument completely, the argument \texttt{\#2} behind +% \cs{@nil} will executed, otherwise argument \texttt{\#3}. In any case +% \texttt{\#1} will removed from the input totally. The difference to +% \cs{scr@TestDimenAssignTillNil} is the \texttt{pt} test. +% \begin{macrocode} +\newcommand*\scr@TestDimensionAssignTillNil{} +\def\scr@TestDimensionAssignTillNil#1\@nil{% + \begingroup + \afterassignment\scr@AfterEndGroupIfArgIsRelaxTillptNnil + \@tempdima=#1pt\@nnil +} +% \end{macrocode} +% \begin{macro}{\scr@IfArgIsRelaxAfterRelaxTillptNnil,\scr@IfAfterEndgroupArgIsRelaxTillptNnil} +% \changes{v3.20}{2015/10/19}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}} +% Die Hilfsmakros lesen ein durch \cs{@nnil} begrenztes Argument. Falls dieses +% Argument nur aus einer Folge von \cs{relax} besteht, wird das erste Argument +% nach \cs{@nnil} ausgeführt, sonst das zweite. +% \begin{macrocode} +\newcommand*\scr@AfterEndGroupIfArgIsRelaxTillptNnil{} +\def\scr@AfterEndGroupIfArgIsRelaxTillptNnil#1\@nnil{% + \endgroup + \Ifstr{\detokenize{#1}}{\detokenize{pt}}{\@firstoftwo}{% + \Ifstrstart{\detokenize{#1}}{\detokenize{\relax}}{% + \scr@IfArgIsRelaxAfterRelaxTillptNnil #1\@nnil + }{\@secondoftwo}% + }% +} +\newcommand*\scr@IfArgIsRelaxAfterRelaxTillptNnil{} +\def\scr@IfArgIsRelaxAfterRelaxTillptNnil \relax#1pt\@nnil{% + \Ifstr{\detokenize{#1}}{\detokenize{pt}}{\@firstoftwo}{% + \Ifstrstart{\detokenize{#1}}{\detokenize{\relax}}{% + \scr@IfArgIsRelaxAfterRelaxTillptNnil #1\@nnil + }{\@secondoftwo}% + }% +} +% +% \end{macrocode} +% \end{macro}^^A \scr@IfArgIsRelaxAfterRelaxTillptNnil,\scr@IfAfterEndgroupArgIsRelaxTillptNnil +% \end{macro}^^A \scr@DimensionSkipAssignTillNil +% \end{macro}^^A \scr@ifisdimension +% \end{command}^^A \ifisdimension,\Ifisdimension +% +% +% \begin{command}{\ifisglue} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.12a}{2014/01/24}{white space removed} +% \changes{v3.20}{2015/10/21}{re-implemented} +% \changes{v3.28}{2019/11/19}{\cs{ifisglue} renamed to \cs{Ifisglue}} +% If the step-by-step expansion of the first argument results in a (positive +% or negativ) length with glue, the second argument is executed, otherwise the +% third one. +% \begin{macrocode} +%<*base> +\providecommand*{\ifisglue}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifisglue'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifisglue' by `\string\Ifisglue'% + }% + \Ifisglue +} +\newcommand*{\Ifisglue}[1]{% + \IfArgIsEmpty{#1}{\@secondoftwo}{\scr@ifisglue#1\@nil}% +} +% \end{macrocode} +% \begin{macro}{\scr@ifisglue} +% \changes{v3.20}{2015/10/21}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstrstart} renamed to \cs{Ifstrstart}} +% \changes{v3.28}{2019/11/23}{arithmetic plus sign fixed} +% \changes{v3.28}{2019/11/23}{in plus case \cs{ifisdimension} replaced by +% \cs{ifisglue}} +% To make this command absolutely correct without false positive and false +% negative results, it would be very complicated. Instead we use a heuristic: +% If the argument consists of a arbitrary number of arithmetic signs followed +% by at most one dot, comma or digit or followed by something, that is a valid +% primitive for skips, we try an assignment. Invalid assignments can result in +% errors. This is not the best solution but makes things a lot easier. +% \begin{macrocode} +\newcommand*{\scr@ifisglue}[1]{% + \begingroup + \Ifstrstart{\meaning #1}{\detokenize{macro:}}{% + \aftergroup\expandafter\aftergroup\scr@ifisglue\aftergroup#1% + }{% + \Ifstrstart{\meaning #1}{\detokenize{the character}}{% + \if #1-\aftergroup\scr@ifisglue + \else + \if #1+\aftergroup\scr@ifisglue + \else + \if #1.% + \aftergroup\scr@TestGlueAssignTillNil + \aftergroup#1% + \else + \if #1,% + \aftergroup\scr@TestGlueAssignTillNil + \aftergroup#1% + \else + \ifnum 0=0\if #10\else\if #11\else\if #12\else\if #13\else + \if #14\else\if #15\else\if #16\else\if #17\else + \if #18\else\if #19\else 1\fi\fi + \fi\fi\fi\fi + \fi\fi\fi\fi + \relax + \aftergroup\scr@TestGlueAssignTillNil + \aftergroup#1% + \else + \aftergroup\scr@secondoftwoAfterNil + \aftergroup#1% + \fi + \fi + \fi + \fi + \fi + }{% + \Ifstrstart{\meaning #1}{\string\char\string"}{% + \aftergroup\scr@TestGlueAssignTillNil + }{% + \def\reserved@c{% + \aftergroup\scr@secondoftwoAfterNil + \aftergroup\@empty + }% + \@for\reserved@a:=\abovedisplayskip,\abovedisplayshortskip,% + \adjdemerits,% + \baselineskip,\belowdisplayskip,% + \belowdisplayshortskip,\binoppenalty,\boxmaxdepth,% + \brokenpenalty,% + \clubpenalty,\count,% + \dimen,\dimexpr,\doublehyphendemerits,\dp,% + \emergenystretch,\exhyphenpenalty,% + \finalhyphendemerits,% + \glueexpr,% + \hbadness,\hfuzz,\hsize,\ht,\hyphenpenalty,% + \lastskip,\lastpenalty,\linepenalty,% + \lineskip,\lineskiplimit,% + \maxdepth,\numexpr,% + \overfullrule,% + \parfillskip,\parindent,\parskip,% + \pdfpageheight,\pdfpagewidth,% + \predisplaypenalty,\pretolerance,% + \relpenalty,\widowpenalty,% + \skip,\splitmaxdepth,\splittopskip,% + \tolerance,\topskip,% + \wd,\vbadness,\vfuzz,\vsize + \do {% + \expandafter\Ifstr\expandafter{\expandafter\string\reserved@a}{% + \meaning #1% + }{% + \def\reserved@c{\aftergroup\scr@TestGlueAssignTillNil}% + }% + }% + \reserved@c + }% + \aftergroup#1% + }% + }% + \endgroup +} +% \end{macrocode} +% \begin{macro}{\scr@TestGlueAssignTillNil} +% \changes{v3.20}{2015/10/21}{added} +% Argument \texttt{\#1} delimited by \cs{@nil} is assigned to a temporary +% \cs{skip}. If this uses the argument completely, the argument \texttt{\#2} behind +% \cs{@nil} will executed, otherwise argument \texttt{\#3}. In any case +% \texttt{\#1} will removed from the input totally. The difference to +% \cs{scr@TestSkipAssignTillNil} is the \texttt{pt} test. +% \begin{macrocode} +\newcommand*\scr@TestGlueAssignTillNil{} +\def\scr@TestGlueAssignTillNil#1\@nil{% + \begingroup + \afterassignment\scr@AfterEndGroupIfArgIsRelaxTillptNnil + \@tempskipa=#1pt\@nnil +} +% +% \end{macrocode} +% \end{macro}^^A \scr@TestGlueAssignTillNil +% \end{macro}^^A \scr@ifisglue +% \end{command}^^A \ifisglue,\Ifisglue +% +% +% \begin{command}{\ifnumber,\Ifnumber} +% \changes{v3.12}{2013/10/30}{using \cs{aftergroup} instead of +% \cs{endgroup}\cs{expandafter}} +% \changes{v3.12a}{2014/01/24}{white space removed} +% \changes{v3.27}{2019/08/26}{empty arguments fixed} +% \changes{v3.28}{2019/11/18}{\cs{ifnumber} renamed to \cs{Ifnumber}} +% If the first argument is a positive integer, the second argument is +% executed, otherwise the third. +% \begin{macrocode} +%<*base> +\providecommand*{\ifnumber}{% +% \end{macrocode} +% Note: We must not output the warning if package \pkg{babelbib} has been +% loaded, because the package defines the same command but only, if it has not +% been defined already. Unfortunately and against all conventions, it even +% defines internal macros of \pkg*{scrbase} with prefix \cs{scr@}. This is +% very dangerous and would result in errors, if \pkg{babelbib} is loaded +% before \pkg*{scrbase}. Maybe I will remove this special treatment of +% \pkg{babelbib} after switching over to \pkg{biblatex} for the \KOMAScript{} +% manuals. +% \begin{macrocode} + \scr@ifundefinedorrelax{ver@babelbib.sty}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifnumber'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifnumber' by `\string\Ifnumber'% + }% + }{}% + \Ifnumber +} +\newcommand\Ifnumber[1]{% + \begingroup\@tempswafalse\let\scr@next\scr@test@number + \IfArgIsEmpty{#1}{}{\expandafter\scr@next#1\scr@next}% + \if@tempswa + \aftergroup\@firstoftwo + \else + \aftergroup\@secondoftwo + \fi + \endgroup +} +% \end{macrocode} +% \begin{macro}{\test@number,\scr@test@number} +% \changes{v3.36}{2022/02/17}{\cs{test@number} renamed to \cs{scr@test@number}} +% For the real test scan the first argument token by token. +% \begin{macrocode} +\newcommand*{\scr@test@number}[1]{% + \ifx \scr@next#1% + \let\scr@next\relax + \else + \@tempcnta=\expandafter\expandafter\expandafter\number + \expandafter`#1\relax + \ifnum \@tempcnta>47 + \ifnum \@tempcnta<58 + \@tempswatrue + \else\@tempswafalse\fi + \else\@tempswafalse\fi +% \end{macrocode} +% Remove the rest, if a non-digit has been found. +% \begin{macrocode} + \if@tempswa\else\let\scr@next\gobble@till@scr@next\fi + \fi + \scr@next +} +% \end{macrocode} +% \begin{macro}{\gobble@tillscr@@next} +% Use a delimited \emph{empty} macro. +% \begin{macrocode} +\newcommand*{\gobble@till@scr@next}{} +\def\gobble@till@scr@next#1\scr@next{} +% +% \end{macrocode} +% \end{macro}^^A \gobble@tillscr@next +% \end{macro}^^A \test@number, \scr@test@number +% \end{command}^^A \ifnumber,\Ifnumber +% +% \begin{command}{\ifintnumber,\Ifintnumber} +% \changes{v3.12}{2013/10/30}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifintnumber} renamed to +% \cs{Ifintnumber}} +% If the first argument is a positive or negative integer, execute the second +% argument, otherwise the third one. There are multiple arithmetic signs allowed. +% \begin{macrocode} +%<*base> +\providecommand*{\ifintnumber}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifintnumber'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifintnumber' by `\string\Ifintnumber'% + }% + \Ifintnumber +} +\newcommand\Ifintnumber[1]{% + \begingroup\@tempswafalse\let\scr@next\scr@test@sign + \expandafter\scr@next#1\scr@next + \if@tempswa + \aftergroup\@firstoftwo + \else + \aftergroup\@secondoftwo + \fi + \endgroup +} +% \end{macrocode} +% \begin{macro}{\scr@test@sign} +% \changes{v3.12}{2013/10/30}{added} +% \begin{macrocode} +\newcommand*{\scr@test@sign}[1]{% + \ifx \scr@next#1 + \let\scr@next\relax + \else + \if #1-% + \else + \ifx #1+% + \else + \def\scr@next{\let\scr@next\scr@test@number\scr@next #1}% + \fi + \fi + \fi + \scr@next +} +% +% \end{macrocode} +% \end{macro}^^A \scr@test@sign +% \end{command}^^A \ifintnumber,\Ifintnumber +% +% \begin{command}{\ifdimen,\Ifdimen} +% \changes{v3.28}{2019/11/18}{renamed to \cs{Ifdimen}} +% If the first argument is a dimension number, the second argument will be +% executed, otherwise the third. +% \begin{macrocode} +%<*base> +\providecommand*{\ifdimen}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifdimen'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifdimen' by `\string\Ifdimen'% + }% + \Ifdimen +} +\newcommand{\Ifdimen}[1]{% + \begingroup\@tempswatrue\let\scr@next\scr@test@posdimen + \expandafter\scr@test@dimen#1\scr@next + \if@tempswa + \endgroup\expandafter\@firstoftwo + \else + \endgroup\expandafter\@secondoftwo + \fi +} +% \end{macrocode} +% \begin{macro}{\test@dimen,\scr@test@dimen} +% \changes{v3.36}{2022/02/17}{\cs{test@dimen} renamed to \cs{scr@test@dimen}} +% We have to remove the arithmetic signs. +% \begin{macrocode} +\newcommand*{\scr@test@dimen}[1]{% + \ifx -#1\else\ifx +#1\else + \def\scr@next{\let\scr@next\scr@test@posdimen\scr@next#1}\fi\fi + \scr@next +} +% \end{macrocode} +% \begin{macro}{\test@posdimen,\scr@test@posdimen} +% \changes{v3.36}{2022/02/17}{\cs{test@posdimen} renamed to \cs{scr@test@posdimen}} +% Is the rest a dimension. Despite this is not correct, we allow more than one +% decimal point or decimal comma. Should this be changed? +% \begin{macrocode} +\newcommand*{\scr@test@posdimen}[1]{% + \ifx \scr@next#1% + \@tempswafalse\let\scr@next\relax + \else + \if .#1\else\if ,#1\else + \@tempcnta=% + \expandafter\expandafter\expandafter\number\expandafter`#1\relax + \ifnum \@tempcnta>47 + \ifnum \@tempcnta<58 + \else\def\scr@next{\scr@test@dimunt#1}\fi + \else\def\scr@next{\scr@test@dimunt#1}\fi + \fi\fi + \fi + \scr@next +} +% \end{macrocode} +% \begin{macro}{\test@dimunt,\test@trueunt,\scr@test@dimunt,\scr@test@trueunt} +% Last but not least the unit has to be tested. We have standard units and +% true units. So we first cut of a ``\texttt{true}''. +% \begin{macrocode} +\newcommand*{\scr@test@dimunt}{} +\def\scr@test@dimunt#1\scr@next{% + \expandafter\scr@test@trueunt#1truetrue\scr@test@trueunt +} +\newcommand*{\scr@test@trueunt}{} +\def\scr@test@trueunt#1true#2true#3\scr@test@trueunt{% + \edef\reserved@a{#1}% + \ifx\reserved@a\@empty\scr@test@@dimunt{#2}\else\scr@test@@dimunt{#1}\fi +} +% \end{macrocode} +% \begin{macro}{\test@@ifdimunt,\scr@test@@dimunt} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% Currently we know eleven or twelve units. Unit \texttt{px} is only valid +% with PDF output. +% \begin{macrocode} +\newcommand*\scr@test@@dimunt[1]{% + \@tempswafalse + \Ifstr{#1}{pt}{\@tempswatrue}{% + \Ifstr{#1}{pc}{\@tempswatrue}{% + \Ifstr{#1}{in}{\@tempswatrue}{% + \Ifstr{#1}{bp}{\@tempswatrue}{% + \Ifstr{#1}{cm}{\@tempswatrue}{% + \Ifstr{#1}{mm}{\@tempswatrue}{% + \Ifstr{#1}{dd}{\@tempswatrue}{% + \Ifstr{#1}{cc}{\@tempswatrue}{% + \Ifstr{#1}{sp}{\@tempswatrue}{% + \Ifstr{#1}{ex}{\@tempswatrue}{% + \Ifstr{#1}{em}{\@tempswatrue}{% + \scr@ifpdfoutput{% + \Ifstr{#1}{px}{\@tempswatrue}{}% + }{}% + }% + }% + }% + }% + }% + }% + }% + }% + }% + }% + }% +} +% +% \end{macrocode} +% \end{macro}^^A \test@@ifdimunt,\scr@test@@dimunt +% \end{macro}^^A \test@dimunt,\test@trueunt,\scr@test@dimunt,\scr@test@trueunt +% \end{macro}^^A \scr@test@posdimen +% \end{macro}^^A \scr@test@dimen +% \end{command}^^A \ifdimen,\Ifdimen +% +% +% \begin{command}{\ifpdftex} +% \changes{v2.95}{2002/08/19}{added} +% \changes{v3.28}{2019/11/18}{removed} +% \end{command} +% \begin{macro}{\scr@ifpdftex} +% \changes{v2.95}{2002/08/19}{added} +% \changes{v3.30}{2020/03/06}{\cs{ifnotundefined} replaced by \cs{Ifnotundefined}} +% If \pdfTeX{} is used, execute the first argument, otherwise the +% second. Note, we do not read the arguments but delegate them to +% \cs{Ifnotundefined}. +% \begin{macrocode} +%<*base> +\newcommand{\scr@ifpdftex}{\Ifnotundefined{pdftexversion}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\scr@ifluatex} +% \changes{v3.21}{2016/05/27}{added} +% \changes{v3.30}{2020/03/06}{\cs{ifnotundefined} replaced by \cs{Ifnotundefined}} +% If \LuaTeX{} is used, execute the first argument, otherwise the +% second. Note, we do not read the arguments but delegate them to +% \cs{Ifnotundefined}. +% \begin{macrocode} +%<*base> +\newcommand{\scr@ifluatex}{\Ifnotundefined{luatexversion}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\scr@ifpdforluatex} +% \changes{v3.21}{2016/05/27}{added} +% If either \LuaTeX{} or \pdfTeX{} is used, execute the first argument, +% otherwise the second. Note, we do not read the arguments but delegate them +% to \cs{@firstoftwo} and \cs{@secondoftwo}. +% \begin{macrocode} +%<*base> +\newcommand*{\scr@ifpdforluatex}{% + \scr@ifpdftex{\@firstoftwo}{\scr@ifluatex{\@firstoftwo}{\@secondoftwo}}% +} +% +% \end{macrocode} +% \end{macro} +% +% \begin{command}{\ifvtex,\ifVTeX} +% \changes{v2.95}{2002/08/19}{added} +% \changes{v2.97c}{2007/06/20}{\cs{ifvtex} renamed to \cs{ifVTeX}} +% \changes{v3.28}{2019/11/18}{removed} +% \end{command} +% \begin{macro}{\scr@ifvtex,\scr@ifVTeX} +% \changes{v2.95}{2002/08/19}{added} +% \changes{v2.97c}{2007/06/20}{\cs{scr@ifvtex} renamed to \cs{scr@ifVTeX}} +% \changes{v3.30}{2020/03/06}{\cs{ifnotundefined} replaced by \cs{Ifnotundefined}} +% If \VTeX{} is used, execute the first argument, otherwise the +% second. Note, we do not read the arguments but delegate them to +% \cs{Ifnotundefined}. +% \begin{macrocode} +%<*base> +\newcommand{\scr@ifVTeX}{\Ifnotundefined{VTeXversion}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{command}{\ifpdfoutput,\Ifpdfoutput} +% \changes{v2.7g}{2001/04/17}{added} +% \changes{v2.8q}{2001/10/19}{\cs{pdfoutput} does not become \cs{relax} if it +% was undefined before} +% \changes{v2.8q}{2001/10/19}{\cs{ifpdfoutput} is only defined if new} +% \changes{v2.8q}{2001/10/19}{usage of \cs{scr@ifpdfoutput}} +% \changes{v3.28}{2019/11/18}{\cs{ifpdfoutput} renamed to \cs{Ifpdfoutput}} +% \begin{macro}{\scr@ifpdfoutput} +% \changes{v2.8q}{2001/10/19}{added} +% \changes{v2.8q}{2001/11/13}{full functional} +% \changes{v2.95}{2002/08/21}{knowing \VTeX} +% \changes{v2.95}{2004/07/20}{expandable} +% \changes{v3.21}{2016/05/27}{works for \LuaTeX{} after version 0.85} +% If the output (currently) produces a PDF, the first argument is executed, +% otherwise the second one. This macro is used inside the implementation of +% option \opt{pagesize}, so we cannot remove it or declare it as deprecated. +% \begin{macrocode} +%<*base> +\newcommand{\scr@ifpdfoutput}{% + \scr@ifundefinedorrelax{pdfoutput}{% + \scr@ifundefinedorrelax{outputmode}{% + \scr@ifundefinedorrelax{OpMode}{% + \expandafter\@secondoftwo% + }{% + \ifnum\OpMode=1 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }% + }{% + \ifnum\outputmode>0 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }% + }{% + \ifnum\pdfoutput>0 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }% +}% +\providecommand*{\ifpdfoutput}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifpdfoutput'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifpdfoutput' by `\string\Ifpdfoutput'% + }% + \Ifpdfoutput +} +\newcommand*{\Ifpdfoutput}{\scr@ifpdfoutput} +% +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\ifpsoutput,\Ifpsoutput} +% \changes{v2.95}{2002/08/21}{added} +% \changes{v3.28}{2019/11/18}{renamed to \cs{Ifpsoutput}} +% \begin{macro}{\scr@ifpsoutput} +% \changes{v2.95}{2002/08/21}{added} +% \changes{v2.95}{2004/07/20}{expandable} +% \changes{v3.30}{2020/03/06}{\cs{ifnotundefined} replaced by \cs{Ifnotundefined}} +% If the output is (currently) expected to be PS some time, the first argument +% is executed, otherwise the second one. This macro is used inside the +% implementation of option \opt{pagesize}, so we cannot remove it or declare +% it as deprecated. +% \begin{macrocode} +%<*base> +\newcommand*{\scr@ifpsoutput}{% + \Ifnotundefined{if@dvips}{% + \if@dvips + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }{% + \Ifnotundefined{OpMode}{% + \ifnum\OpMode=2 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }{% + \expandafter\@secondoftwo + }% + }% +} +\providecommand*{\ifpsoutput}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifpsoutput'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifpsoutput' by `\string\Ifpsoutput'% + }% + \Ifpsoutput +} +\newcommand*{\Ifpsoutput}{\scr@ifpsoutput} +% +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\ifdvioutput,\Ifdvioutput} +% \changes{v2.95}{2002/08/21}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifdvioutput} renamed to \cs{Ifdvioutput}} +% \begin{macro}{\scr@ifdvioutput} +% \changes{v2.95}{2002/08/21}{added} +% \changes{v2.95}{2004/07/20}{expandable} +% \changes{v3.23}{2017/02/14}{works for \LuaTeX{} after version 0.85} +% If the output (currently) produces a DVI, the first argument is executed, +% otherwise the second one. This macro is used inside the implementation of +% option \opt{pagesize}, so we cannot remove it or declare it as deprecated. +% \begin{macrocode} +%<*base> +\newcommand*{\scr@ifdvioutput}{% + \scr@ifundefinedorrelax{pdfoutput}{% + \scr@ifundefinedorrelax{outputmode}{% + \scr@ifundefinedorrelax{OpMode}{% + \expandafter\@firstoftwo + }{% + \ifnum\OpMode=0 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }% + }{% + \ifnum\outputmode>0 + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi + }% + }{% + \ifnum\pdfoutput=0 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }% +} +\providecommand*{\ifdvioutput}{% + \PackageWarning{scrbase}{Usage of deprecated command + `\string\ifdvioutput'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifdvioutput' by `\string\Ifdvioutput'% + }% + \Ifdvioutput +} +\newcommand*{\Ifdvioutput}{\scr@ifdvioutput} +% +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{macro}{\scr@smashdp} +% \changes{v2.97c}{2007/09/17}{added} +% \changes{v3.02a}{2009/01/23}{using own definition instead of \cs{smash}} +% \changes{v3.36}{2022/02/18}{as robust as \cs{smash}} +% Generate a box and output it with height and width but no depth. Note: Using +% internal macros \cs{finsm@sh}, \cs{mathsm@sh} and \cs{makesm@ash} from the +% \LaTeX{} kernel is a very ugly hack and dangerous. Using \cs{smash} itself +% would be problematic, because \pkg{amsmath} redefines it and the new +% definition is not fully compatible. But maybe a better definition could be +% found depending on, whether \pkg{amsmath} has been loaded or not. +% \begin{macrocode} +%<*base> +\DeclareRobustCommand{\scr@smashdp}[1]{% + \relax + \begingroup + \def\finsm@sh{\dp\z@\z@ \leavevmode\box\z@}% + \ifmmode + \expandafter\mathpalette\expandafter\mathsm@sh + \else + \expandafter\makesm@sh + \fi + {#1}% + \endgroup +} +% +% \end{macrocode} +% \end{macro} +% +% \begin{command}{\IfRTL} +% \changes{v3.24}{2017/05/04}{added} +% \changes{v3.36}{2022/02/18}{white space removed} +% If we are in the right-to-left mode of a package like \pkg{bidi} the first +% argument will be used otherwise the second one. +% \begin{macrocode} +%<*base> +\newcommand*{\IfRTL}{% + \scr@ifundefinedorrelax{if@RTL}{\@secondoftwo}{% + \expandafter\ifx\csname if@RTL\expandafter\endcsname + \csname iftrue\endcsname + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + }% +} +% +% \end{macrocode} +% \end{command}^^A \IfRTL +% \begin{command}{\IfLTR} +% \changes{v3.24}{2017/05/04}{added} +% \changes{v3.36}{2022/02/18}{white space removed} +% If we are not in the right-to-left mode of a package like \pkg{bidi} any +% kind of left-to-right mode is assumed and the first argument is used, +% otherwise the second one. +% \begin{macrocode} +%<*base> +\newcommand*{\IfLTR}{% + \scr@ifundefinedorrelax{if@RTL}{\@firstoftwo}{% + \expandafter\ifx\csname if@RTL\expandafter\endcsname + \csname iftrue\endcsname + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi + }% +} +% +% \end{macrocode} +% \end{command}^^A \IfLTR +% +% \begin{command}{\PackageInfoNoLine} +% \changes{v2.97d}{2007/10/03}{added} +% Like \cs{PackageInfo} but without output of line number at the end. +% \begin{macrocode} +%<*base> +\providecommand*{\PackageInfoNoLine}[2]{% + \PackageInfo{#1}{#2\@gobble}% +} +% +% \end{macrocode} +% \end{command} +% +% \begin{command}{\ClassInfoNoLine} +% \changes{v2.98c}{2008/02/15}{added} +% Like \cs{ClassInfo} but without output of line number at the end. +% \begin{macrocode} +%<*base> +\providecommand*{\ClassInfoNoLine}[2]{% + \ClassInfo{#1}{#2\@gobble}% +} +% +% \end{macrocode} +% \end{command} +% +% \begin{macro}{\@removefromreset} +% \changes{v3.15}{2014/11/21}{added}% +% For \LaTeX{} releases before 2018/04/01 and without using a package like +% \pkg{remreset} or \pkg{chngcntr} we still need \cs{@removefromreset}. +% \begin{macrocode} +%<*base> +\providecommand*\@removefromreset[2]{% + {% + \expandafter\let\csname c@#1\endcsname\@removefromreset + \def\@elt##1{% + \expandafter\ifx\csname c@##1\endcsname\@removefromreset + \else\noexpand\@elt{##1}\fi + }% + \expandafter\xdef\csname cl@#2\endcsname{\csname cl@#2\endcsname}% + }% +} +% +% \end{macrocode} +% \end{macro} +% +% \begin{command}{\IfActiveMkBoth} +% \changes{v3.26}{2018/09/03}{added} +% \begin{macro}{\if@scrActiveMkBoth} +% \changes{v3.26}{2018/09/03}{added} +% \changes{v3.27}{2019/07/26}{handling for \cs{marks}} +% This command test, whether or not \cs{@mkboth} does change a mark or not. +% \begin{macrocode} +%<*base> +\newif\ifscr@ActiveMkBoth +\def\scr@ActiveMkBothfalse{\global\let\ifscr@ActiveMkBoth\iffalse} +\def\scr@ActiveMkBothtrue {\global\let\ifscr@ActiveMkBoth\iftrue} +\newcommand*{\IfActiveMkBoth}{% + \begingroup + \def\markboth##1##2{\scr@ActiveMkBothtrue}% + \def\markright##1{\scr@ActiveMkBothtrue}% + \def\markleft##1{\scr@ActiveMkBothtrue}% + \def\markboth##1{\scr@ActiveMkBothtrue}% + \def\markdouble##1{\scr@ActiveMkBothtrue}% + \def\mark##1{\scr@ActiveMkBothtrue}% + \def\marks##1##2{\scr@ActiveMkBothtrue}% + \scr@ActiveMkBothfalse + \setbox\@tempboxa\vbox{\@mkboth{}{}}% + \endgroup + \ifscr@ActiveMkBoth + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +% +% \end{macrocode} +% \end{macro}^^A \if@scrActiveMkBoth +% \end{command}^^A \IfActiveMkBoth +% +% +% \subsection{Definition of the \KOMAScript{} \pkg*{keyval} main handling} +% +% \begin{command}{\FamilyExecuteOptions} +% \changes{v3.00}{2008/04/30}{added} +% \changes{v3.04b}{2010/01/29}{\cs{edef} replaced by \cs{protected@edef}} +% \changes{v3.04b}{2010/02/02}{prevent overwriting of \cs{scr@key@atlist} and +% \cs{scr@key@name} in \cs{setkeys}} +% \changes{v3.12}{2013/03/04}{re-implemented} +% \changes{v3.12}{2013/03/04}{can be used after document preamble} +% \changes{v3.14}{2014/10/17}{third argument is \cs{long}} +% \begin{macro}{\@FamilyExecuteOptions} +% \changes{v3.14}{2014/10/17}{new} +% \changes{v3.23}{2017/02/16}{fix: hook after uses family instead of member} +% \changes{v3.27}{2019/10/02}{improved error message} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% Similar to \cs{ExecuteOptions} but with \pkg{keyval} options. The command +% also is re-entrant. Note: The hooks are local to every usage. +% \begin{macrocode} +%<*base> +\newcommand*{\FamilyExecuteOptions}[2][.\@currname.\@currext]{% + \@FamilyExecuteOptions[{#1}]{#2}% +} +\newcommand{\@FamilyExecuteOptions}[3][.\@currname.\@currext]{% + \scr@ifundefinedorrelax{scr@after@options@#2@hook}{% + \@namedef{scr@after@options@#2@hook}{% + \@namedef{scr@after@options@#2@hook}{}% + }% + }{% + \expandafter\edef\csname scr@after@options@#2@hook\endcsname{% + \noexpand\@namedef{scr@after@options@#2@hook}{% + \unexpanded\expandafter\expandafter\expandafter + {\csname scr@after@options@#2@hook\endcsname}% + }% + }% + }% + \@for\scr@key@atlist:=#3\do{% + \expandafter\scr@key@split@name@value\scr@key@atlist==\@nil + \ifx\scr@key@name\@empty\else + \ifx\scr@key@name\space\else + \scr@ifundefinedorrelax{KV@#2@\scr@key@name}{% + \scr@ifundefinedorrelax{KV@#2#1@\scr@key@name}{% +% \end{macrocode} +% \changes{v3.20}{2015/11/18}{special treatment of \opt{@else@} option} +% Neither family nor member option found. But maybe special option +% \opt{@else@} exists. In this case the current option is set as value of +% \opt{@else@}. +% \begin{macrocode} + \scr@ifundefinedorrelax{KV@#2#1@@else@}{% + \PackageError{scrbase}{% + unknown option + `\expandafter\detokenize\expandafter{\scr@key@atlist}'% + }{% + Member `#1' of family `#2'\MessageBreak + cannot handle option `\scr@key@name'.\MessageBreak + So it cannot be set% + \ifx\scr@key@value\@empty\else + \space to value + `\expandafter\detokenize\expandafter{\scr@key@value}'% + \fi.% + }% + }{% + \scr@execute@elseoption{#2#1}% +% \end{macrocode} +% In difference to other options, for \opt{@else@} all states different from +% \cs{FamilyKeyStateProcessed} have to be reported as error of the +% current/original option. +% \begin{macrocode} + \ifx\FamilyKeyState\FamilyKeyStateProcessed\else + \PackageError{scrbase}{% + unknown option + \ifx\FamilyKeyState\FamilyKeyStateUnknownValue + value at + \fi + `\expandafter\detokenize\expandafter{\scr@key@atlist}'% + }{% + Member `#1' of family `#2'\MessageBreak + cannot handle option `\scr@key@name'.\MessageBreak + So it cannot be set% + \ifx\scr@key@value\@empty\else + \space to value + `\expandafter\detokenize\expandafter{\scr@key@value}'% + \fi.% + }% + \fi + }% + }{% + \scr@execute@option{#2#1}% + }% + }{% + \scr@execute@option{#2}% + \Ifstr{#1}{}{}{% +% \end{macrocode} +% \changes{v3.20}{2015/11/18}{member option test after execution of family +% option fixed} +% If a family option has been found and executed an existing member option +% still has to be executed. If no member option exists, also an existing +% \opt{@else@} option of the member has to been used. But in this case, the +% states different from \cs{FamilyKeyStateProcessed} are not errors. +% \begin{macrocode} + \scr@ifundefinedorrelax{KV@#2#1@\scr@key@name}{% + \scr@ifundefinedorrelax{KV@#2#1@@else@}{}{% + \scr@execute@elseoption{#2#1}% + }% + }{% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \scr@execute@option{#2#1}% + \FamilyKeyStateProcessed + \else + \scr@execute@option{#2#1}% + \fi + }% + }% + }% + \scr@show@key@state@error + \fi + \fi + }% + \@nameuse{scr@after@options@#2@hook}% +} +% +% \end{macrocode} +% \begin{macro}{\scr@show@key@state@error} +% \changes{v3.12}{2013/03/04}{added} +% \changes{v3.27}{2019/10/02}{improved error message} +% Show depending on \cs{FamilyKeyState} a error message. All information to +% the error has to be set to \cs{FamilyMemberOfKey} (member or \cs{@empty}), +% \cs{FamilyOfKey} (family or \cs{@empty}), \cs{scr@key@atlest} (option as it +% was in the option list), \cs{scr@key@name} (\meta{key} of the option), and +% \cs{scr@key@value} (\meta{value} of the option). Note: \cs{scr@key@atlist} +% and \cs{scr@key@value} can contain macros and will be output using +% \cs{detokenize}. +% \begin{macrocode} +%<*base> +\newcommand*{\scr@show@key@state@error}{% + \ifx\FamilyKeyState\FamilyKeyStateProcessed\else + \PackageError{scrbase}{% + \ifx\FamilyKeyState\FamilyKeyStateNeedValue + missing option value at + \else + unknown option + \ifx\FamilyKeyState\FamilyKeyStateUnknownValue + value at + \fi + \fi + `\expandafter\detokenize\expandafter{\scr@key@atlist}'% + }{% + Option + `\expandafter\detokenize\expandafter{\scr@key@name}'\MessageBreak + \ifx\FamilyMemberOfKey\@empty\else + of member `\FamilyMemberOfKey'\MessageBreak + \fi + \ifx\FamilyOfKey\@empty\else + of family `\FamilyOfKey'\MessageBreak + \fi + \ifx\FamilyKeyState\FamilyKeyStateNeedValue + expects a value, but has been used without any value.% + \else + cannot handle value\MessageBreak + `\expandafter\detokenize\expandafter{\scr@key@value}',% + \MessageBreak + \ifx\FamilyKeyState\FamilyKeyStateUnknownValue + because this is an unsupported value.% + \else + because \FamilyKeyState. + \fi + \fi + }% + \fi +} +% +% \end{macrocode} +% \end{macro}^^A \scr@show@key@state@error +% \end{macro}^^A \@FamilyExecuteOptions +% \end{command}^^A \FamilyExecuteOptions +% +% \begin{command}{\KOMAExecuteOptions} +% \changes{v2.97c}{2007/04/19}{added} +% \changes{v3.00}{2008/04/30}{no optional argument} +% \changes{v3.12}{2013/03/04}{can be used after the document preamble} +% Executes a \meta{list of options} (\texttt{\#3}) of a \meta{member} (optional +% \texttt{\#1}) of a \meta{family} (\texttt{\#2}). The default for the +% \meta{member} is \file{.\cs{@currname}.\cs{@currext}}. Note: If +% \cs{KOMAExcuteOptions} is not used while loading a class or package, the +% optional first argument is not optional, but has to be set correctly! And +% because filenames can be changed, it is recommended to \emph{always} use the +% optional argument to set a definite \meta{member}. +% \begin{macrocode} +%<*koma> +\newcommand*{\KOMAExecuteOptions}[1][.\@currname.\@currext]{% + \FamilyExecuteOptions[#1]{KOMA}% +} +% +% \end{macrocode} +% \end{command} +% +% \begin{command}{\FamilyOptions} +% \changes{v3.00}{2008/04/30}{added} +% \changes{v3.12}{2013/03/02}{re-implemented} +% \changes{v3.12}{2013/03/02}{\cs{scr@after@options@\#1@hook}} +% \changes{v3.14}{2014/10/17}{second argument is \cs{long}} +% \begin{macro}{\@FamilyOptions} +% \changes{v3.14}[2014/10/17]{added} +% \changes{v3.27}{2019/10/02}{improved error message} +% \begin{macro}{\Family@Options} +% \changes{v3.00}{2008/04/30}{added} +% \changes{v3.12}{2013/03/04}{removed} +% \end{macro}^^A \Family@Options +% Used to set the options of a family. The first argument (\texttt{\#1}) is +% the \meta{family} and the second (\texttt{\#2}) a \meta{list of options}. If +% a \meta{key} or a \meta{value} to a \meta{key} in the \meta{list of options} +% does not exist, an error is reported. The command itself is re-entrant, so +% it can be used inside the definition of an option. But in this case the hook +% is local to the local usage of the command. +% \begin{macrocode} +%<*base> +\newcommand{\FamilyOptions}[1]{\@FamilyOptions{#1}} +\newcommand{\@FamilyOptions}[2]{% + \scr@ifundefinedorrelax{scr@after@options@#1@hook}{% + \@namedef{scr@after@options@#1@hook}{% + \@namedef{scr@after@options@#1@hook}{}% + }% + }{% + \expandafter\edef\csname scr@after@options@#1@hook\endcsname{% + \noexpand\@namedef{scr@after@options@#1@hook}{% + \unexpanded\expandafter\expandafter\expandafter + {\csname scr@after@options@#1@hook\endcsname}% + }% + }% + }% +% \end{macrocode} +% \changes{v3.23}{2017/02/16}{\cs{AtEndOfFamilyOptions*} hook added} +% From version 3.23 the new hook before \cs{AtEndOfFamilyOptions*} has to be +% initialized. First step is a kind of pre-initialization: The hook is +% defined empty, if it does not already exist. So if the hook exists empty we +% can now recognize the top level of using \cs{FamilyOptions}. +% \begin{macrocode} + \scr@ifundefinedorrelax{scr@after@options@#1@hook@topmost}{% + \@namedef{scr@after@options@#1@hook@topmost}{}% + }{}% +% \end{macrocode} +% Now, if we recognize the top level, because of an empty hook, the execution +% of the hook to the normal level hook (which is the top level hook in this +% case) is added. Additionally the self destruction code is added to the very +% beginning of the hook. Because of the self destruction hook the hook itself +% it no longer empty. So deeper levels distinguish from the top level. Because +% the hook is not empty any longer. +% \begin{macrocode} + \expandafter\ifx\csname scr@after@options@#1@hook@topmost\endcsname\@empty + \expandafter\l@addto@macro\csname scr@after@options@#1@hook\endcsname{% + \@nameuse{scr@after@options@#1@hook@topmost}% + }% + \@namedef{scr@after@options@#1@hook@topmost}{% + \@namedef{scr@after@options@#1@hook@topmost}{}% + }% + \fi +% \end{macrocode} +% \begin{description} +% \item[Note:] We do not use \pkg{xkeyval} and its \cs{setkeys+}, because this +% would not execute the options in the order of the options but in the order +% of the families, which is not intuitive and therefore not what we want. +% \end{description} +% We use a loop over all \meta{option}s in the \meta{list of options} to +% split each \meta{option} into \meta{key} and \meta{value}. +% \begin{macrocode} + \@for\scr@key@atlist:=#2\do{% +% \end{macrocode} +% \changes{v3.08}{2010/11/05}{empty options in the list are ignored} +% Despite they do not make any sense empty \emph{options} are allowed and +% ignored. This would at first mean two consecutive commas. +% \begin{macrocode} + \ifx\scr@key@atlist\@empty\else +% \end{macrocode} +% But there also can be white spaces between the commas. +% \begin{macrocode} + \ifx\scr@key@atlist\space\else + \expandafter\scr@key@split@name@value\scr@key@atlist==\@nil +% \end{macrocode} +% The third possibility would be a single equal sign. But in my opinion this +% would be a mistake and therefore an error. So now, we have an \opt{option} +% splitted into a \meta{key} and a \meta{value} (which can be empty). +% \changes{v3.12}{2013/03/04}{storing the overall state} +% Now, we are storing the overall state by emptying the error storage. If the +% error storage is \cs{relax} it is not needed any longer. Both, \cs{relax} +% and \cs{@empty} means no error. All other cases the error storage contains +% all the errors to be reported. +% \begin{macrocode} + \let\scr@key@run@errors\@empty +% \end{macrocode} +% \changes{v3.04b}{2010/01/29}{\cs{edef} replaced by \cs{protected@edef}} +% \changes{v3.09a}{2011/06/07}{less number of expansions by improved usage of +% \cs{unexpanded}} +% Next a loop over the members is used, to detect members, that have the +% \meta{key}. In this case the member option is executed. Note: The execution +% of an option must not change any of the internal macros with the \meta{key}, +% \meta{value}, \meta{option} or \meta{list of options} +% information. Additionally the states and the resulting messages have to been +% collected. Here it is useful to have \cs{\meta{family}@key@familylist}, a +% list of family + member and not only of members. +% \changes{v3.27}{2019/07/19}{family options are executed first} +% \begin{macrocode} + \scr@key@found@false + \edef\reserved@a{#1,\csname #1@key@familylist\endcsname}% + \@for\reserved@a:=\reserved@a\do{% + \scr@ifundefinedorrelax{KV@\reserved@a @\scr@key@name}{% +% \end{macrocode} +% \changes{v3.27}{2019/07/19}{treatment of \opt{@else@} options} +% If a family member does not have the current option, there still may be a +% \opt{@else@} option. In this case the \opt{@else@} option gets the current +% \meta{option} as value and is executed. But this changes the error storage +% only, if it was successful. In this case, the error storage has to become +% empty. But the \opt{@else@} must not be executed here, if the current member +% is the empty one, which represents the family itself. This will be done +% later and only, if no one of the members have had the option itself or a +% \opt{@else@} option. So the family \opt{@else@} option is only used, if the +% option has not been successfully processed by any member in any kind. +% \begin{macrocode} + \Ifstr{\reserved@a}{#1}{}{% + \scr@ifundefinedorrelax{KV@\reserved@a @@else@}{}{% + \expandafter\scr@execute@elseoption\expandafter{\reserved@a}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \scr@key@found@true + \let\scr@key@run@errors\relax + \fi + }% + }% + }{% +% \end{macrocode} +% If the option has been found for a member, it is executed and the error +% storage is updated. +% \begin{macrocode} + \expandafter\scr@execute@option\expandafter{\reserved@a}% + \scr@key@found@true + \ifx\scr@key@run@errors\relax\else + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \let\scr@key@run@errors\relax + \else + \ifx\FamilyKeyState\FamilyKeyStateUnknownValue + \edef\scr@key@run@errors{% + \unexpanded\expandafter{\scr@key@run@errors}% + \noexpand\MessageBreak + \space\space- `\FamilyMemberOfKey': unkown value + `\expandafter\detokenize\expandafter{\scr@key@value}'% + }% + \else + \ifx\FamilyKeyState\FamilyKeyStateNeedValue + \edef\scr@key@run@errors{% + \unexpanded\expandafter{\scr@key@run@errors}% + \noexpand\MessageBreak + \space\space- `\FamilyMemberOfKey': value expected + }% + \else + \edef\scr@key@run@errors{% + \unexpanded\expandafter{\scr@key@run@errors}% + \noexpand\MessageBreak + \space\space- `\FamilyMemberOfKey': \FamilyKeyState + }% + \fi + \fi + \fi + \fi + }% + }% + \ifscr@key@found@ + \ifx\scr@key@run@errors\relax\else + \ifx\scr@key@run@errors\@empty\else +% \end{macrocode} +% \changes{v3.28}{2019/11/23}{error messages and info fixed} +% Now, an existing \opt{@else@} option has to be used and either an error or +% info has to be shown. +% \begin{macrocode} + \scr@ifundefinedorrelax{KV@#1@@else@}{% + \PackageError{scrbase}{% + unknown option + `\expandafter\detokenize\expandafter{\scr@key@atlist}'% + }{% + The members of family `#1' cannot set option + `\scr@key@name' + \ifx\scr@key@value\@empty\else + \MessageBreak + to value + `\expandafter\detokenize\expandafter{\scr@key@value}'% + \fi.\MessageBreak + Here's what each member says: + \scr@key@run@errors + }% + }{% + \scr@execute@elseoption{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \PackageInfo{scrbase}{% + option + `\expandafter\detokenize\expandafter{\scr@key@atlist}'% + \MessageBreak + processed by `@else@' option of family\MessageBreak + `#1', after the members said: + \scr@key@run@errors\MessageBreak + o\expandafter\@gobble + }% + \let\scr@key@run@errors\relax + \else + \PackageError{scrbase}{% + unknown option + \ifx\FamilyKeyState\FamilyKeyStateUnknownValue + value at + \fi + `\expandafter\detokenize\expandafter{\scr@key@atlist}'% + }{% + The members of family `#1' cannot set option + `\scr@key@name' + \ifx\scr@key@value\@empty\else + \MessageBreak + to value + `\expandafter\detokenize\expandafter{\scr@key@value}'% + \fi.\MessageBreak + Here's what each member says: + \scr@key@run@errors + }% + \fi + }% + \fi + \fi + \else + \scr@ifundefinedorrelax{KV@#1@@else@}{% + \PackageError{scrbase}{% + unknown option + `\expandafter\detokenize\expandafter{\scr@key@atlist}'% + }{% + No one of the members of family `#1'\MessageBreak + can handle option `\scr@key@name'.\MessageBreak + So it cannot be set% + \ifx\scr@key@value\@empty\else + \space to value + `\expandafter\detokenize\expandafter{\scr@key@value}'% + \fi.% + }% + }{% + \scr@execute@elseoption{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \else + \PackageError{scrbase}{% + unknown option + \ifx\FamilyKeyState\FamilyKeyStateUnknownValue + value at + \fi + `\expandafter\detokenize\expandafter{\scr@key@atlist}'% + }{% + No one of the members of family `#1'\MessageBreak + can handle option `\scr@key@name'.\MessageBreak + So it cannot be set% + \ifx\scr@key@value\@empty\else + \space to value + `\expandafter\detokenize\expandafter{\scr@key@value}'% + \fi.% + }% + \fi + }% + \fi + \fi + \fi + }% + \@nameuse{scr@after@options@#1@hook}% +} +% \end{macrocode} +% \begin{macro}{\scr@execute@option} +% \changes{v3.12}{2013/03/04}{added} +% \changes{v3.13}{2014/06/30}{missing \cs{expandafter} in \cs{PackageInfo} added} +% \changes{v3.13a}{2014/08/13}{white spaces removed} +% \changes{v3.23}{2017/02/16}{it does not help to save the +% \cs{AtEndOfFamilyOptions} hook} +% A split \opt{option} is executed, without changing any relevant macros (but +% \cs{reserved@a}). The first argument is the complete set in \pkg{keyval} syntax. +% \begin{macrocode} +\newcommand*{\scr@execute@option}[1]{% + \protected@edef\reserved@a{% + \noexpand\let\noexpand\KV@err\noexpand\scr@KV@err + \noexpand\setkeys{#1}{% + \unexpanded\expandafter{\scr@key@atlist}}% + \noexpand\def\noexpand\scr@key@atlist{% + \unexpanded\expandafter{\scr@key@atlist}}% + \noexpand\def\noexpand\scr@key@name{% + \unexpanded\expandafter{\scr@key@name}}% + \noexpand\def\noexpand\scr@key@value{% + \unexpanded\expandafter{\scr@key@value}}% + \ifx\scr@key@run@errors\relax + \noexpand\let\noexpand\scr@key@run@errors\relax + \else + \noexpand\def\noexpand\scr@key@run@errors{% + \unexpanded\expandafter{\scr@key@run@errors}}% + \fi + \ifx\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions@immediate + \noexpand\let\noexpand\AtEndOfFamilyOptions + \noexpand\scr@AtEndOfFamilyOptions@immediate + \fi + }% + \let\AtEndOfFamilyOptions\scr@AtEndOfFamilyOptions + \reserved@a + \ifx\FamilyKeyState\FamilyKeyStateUnknown + \PackageInfo{scrbase}{Unknown processing state.\MessageBreak + Processing option + `\expandafter\detokenize\expandafter{\scr@key@atlist}'\MessageBreak + \ifx\FamilyMemberOfKey\@empty\else + of member `\FamilyMemberOfKey'\MessageBreak + \fi + of family `\FamilyOfKey'\MessageBreak + doesn't set a valid state.\MessageBreak + This will be interpreted\MessageBreak + as \string\FamilyKeyStateProcessed + }% + \FamilyKeyStateProcessed + \fi +} +% \end{macrocode} +% \begin{macro}{\scr@KV@err} +% \changes{v3.12a}{2013/03/04}{missing internal command added} +% We just have to signal, that the option needs a value, that is missing. +% \begin{macrocode} +\newcommand*{\scr@KV@err}[1]{% + \FamilyKeyStateNeedValue +} +% \end{macrocode} +% \end{macro}^^A \scr@KV@err +% \begin{macro}{\scr@key@run@errors} +% \changes{v3.12}{2013/03/04}{added} +% Needed by \cs{FamilyOptions} to collect the error messages, but report the +% error only, if no member has successfully processed the option. We define it +% here to make the re-definition in the previous code does work without error. +% \begin{macrocode} +\newcommand*{\scr@key@run@errors}{} +% \end{macrocode} +% \end{macro}^^A \scr@key@run@errors} +% \end{macro}^^A \scr@execute@option +% \begin{macro}{\scr@execute@elseoption} +% \changes{v3.20}{2015/11/18}{added} +% \changes{v3.25}{2017/11/16}{group added} +% \changes{v3.25}{2017/11/16}{\cs{scr@key@name@else} and +% \cs{scr@key@value@else} added} +% \changes{v3.27}{2019/03/10}{missing percent added to avoid spaces} +% If a special option \opt{@else@} has been defined, it is executed by +% \cs{FamilyExecuteOptions} if and only if no other suitable option has been +% found. This is done by \cs{scr@execute@elseoption}. The argument and +% resulting state are exactly the same as with \cs{scr@execute@option}. It +% also have to do the same, but it does not call the option, but the +% \opt{@else@} option. The option itself is used as \meta{value} of the +% \opt{@else@} option. So temporary \cs{scr@key@atlist}, \cs{scr@key@name} and +% \cs{scr@key@value} have to be changed, before calling +% \cs{scr@execute@option}. To avoid once again splitting the \meta{value} into +% an internal \meta{key} and \meta{value} the original \cs{scr@key@name} and +% \cs{scr@key@value} are copied to \cs{scr@key@name@else} and +% \cs{scr@key@value@else}. These can be used inside the code of the +% \opt{@else@} option. +% \begin{macrocode} +\newcommand*{\scr@execute@elseoption}[1]{% + \begingroup + \protected@edef\reserved@a{% + \unexpanded{% + \endgroup + \let\scr@key@name@else\scr@key@name + \let\scr@key@value@else\scr@key@value + \def\scr@key@name{@else@}% + }% + \noexpand\def\noexpand\scr@key@value{% + \unexpanded\expandafter{\scr@key@atlist}}% + \noexpand\def\noexpand\scr@key@atlist{% + @else@={\unexpanded\expandafter{\scr@key@atlist}}}% + \noexpand\scr@execute@option{#1}% + \noexpand\def\noexpand\scr@key@atlist{% + \unexpanded\expandafter{\scr@key@atlist}}% + \noexpand\def\noexpand\scr@key@name{% + \unexpanded\expandafter{\scr@key@name}}% + \noexpand\def\noexpand\scr@key@value{% + \unexpanded\expandafter{\scr@key@value}}% + \scr@ifundefinedorrelax{scr@key@name@else}{% + \unexpanded{\let\scr@key@name@else\relax}% + }{% + \noexpand\def\noexpand\scr@key@name@else{% + \unexpanded\expandafter{\scr@key@name@else}% + }% + }% + \scr@ifundefinedorrelax{scr@key@value@else}{% + \unexpanded{\let\scr@key@value@else\relax}% + }{% + \noexpand\def\noexpand\scr@key@value@else{% + \unexpanded\expandafter{\scr@key@value@else}% + }% + }% + }\reserved@a +} +% \end{macrocode} +% \end{macro}^^A \scr@execute@elseoption +% \begin{macro}{\KOMA@key@foundtrue,\KOMA@key@foundfalse,\ifKOMA@key@found, +% \scr@key@found@true,\scr@key@found@false,\ifscr@key@found@} +% \changes{v2.97c}{2007/04/19}{added} +% \changes{v3.00}{2008/04/30}{\cs{ifKOMA@key@found} renamed to \cs{ifscr@key@found}} +% \begin{macro}{\KOMA@key@at@list,\scr@key@atlist} +% \changes{v2.97c}{2007/04/19}{added} +% \changes{v3.00}{2008/04/30}{\cs{KOMA@key@atlist} renamed to \cs{scr@key@atlist}} +% \begin{macro}{\KOMA@key@name,\scr@key@name} +% \changes{v2.97c}{2007/04/19}{added} +% \changes{v3.00}{2008/04/30}{\cs{KOMA@key@name} renamed to \cs{scr@key@name}} +% \begin{macro}{\KOMA@key@value,\scr@key@value} +% \changes{v2.97c}{2007/04/19}{added} +% \changes{v3.00}{2008/04/30}{\cs{KOMA@key@value} renamed to \cs{scr@key@value}} +% \begin{macro}{\KOMA@key@split@name@value,\scr@key@split@name@value} +% \changes{v2.97c}{2007/04/19}{added} +% \changes{v2.97e}{2007/11/10}{using \cs{KV@@sp@def} to remove white spaces} +% \changes{v3.00}{2008/04/30}{\cs{KOMA@key@split@name@value} renamed to +% \cs{scr@key@split@name@value}} +% \changes{v3.13}{2014/10/17}{\cs{long}} +% \changes{v3.26}{2018/08/29}{using \cs{scr@sp@def} instead of \cs{KV@@sp@def}} +% \begin{macrocode} +\newif\ifscr@key@found@ +\newcommand*{\scr@key@atlist}{} +\newcommand*{\scr@key@name}{} +\newcommand*{\scr@key@value}{} +\newcommand*{\scr@key@split@name@value}{} +\long\def\scr@key@split@name@value#1=#2=#3\@nil{% + \scr@sp@def\scr@key@name{#1}% + \scr@sp@def\scr@key@value{#2}% +} +% +% \end{macrocode} +% \end{macro}^^A \scr@key@split@name@value +% \end{macro}^^A \scr@key@value +% \end{macro}^^A \scr@key@name +% \end{macro}^^A \scr@key@atlist +% \end{macro}^^A \@FamilyOptions +% \end{macro}^^A \ifscr@key@found@ +% \end{command}^^A \FamilyOptions +% +% \begin{command}{\FamilyOption} +% \changes{v3.00}{2008/04/30}{added} +% \changes{v3.26b}{2019/01/09}{handling of typical user mistakes} +% \begin{macro}{\@FamilyOptions} +% \changes{v3.14}[2014/10/17]{added} +% \changes{v3.26}{2018/08/29}{using \cs{scr@sp@def} instead of \cs{KV@@sp@def}} +% \begin{macro}{\Family@Option} +% \changes{v3.00}{2008/04/30}{added} +% \changes{v3.12}{2013/03/04}{removed} +% \end{macro}^^A \Family@Option +% \changes{v3.04b}{2010/01/29}{\cs{edef} replaced by \cs{protected@edef}} +% In opposite to \cs{FamilyOptions} this command sets only one \meta{option} +% (\texttt{\#2}) of a \meta{family} (\texttt{\#1}). But you can set it to a +% \meta{list of values} (\texttt{\#3}). The values are set in the order of the +% \meta{list of values}. +% \begin{macrocode} +%<*base> +\newcommand*{\FamilyOption}[2]{% + \begingroup + \def\reserved@a##1,##2\@nil{\IfArgIsEmpty{##2}{}{\@tempswatrue}}% + \@tempswafalse\expandafter\reserved@a#2,\@nil + \if@tempswa + \PackageError{scrbase}{% + syntax error in key `\detokenize{#2}'% + }{% + You've used `\string\...Option' to set the key + `\detokenize{#2}'\MessageBreak + to new value(s), but `,' is not allowed in the key of + an option\MessageBreak + (and `\string\...Option' does not use `,' to separate several + keys).\MessageBreak + Maybe you've meant \string\...Options\space instead of + \string\...Option.\MessageBreak + If you'll continue, I'll give it a try, but you should expect + further\MessageBreak + and even strange error messages.% + }% + \else + \def\reserved@a##1=##2\@nil{% + \IfArgIsEmpty{##2}{}{\@tempswatrue\def\reserved@a{=}}}% + \expandafter\reserved@a#2=\@nil + \if@tempswa + \PackageError{scrbase}{% + syntax error in key `\detokenize{#2}'% + }{% + You've used `\string\...Option' to set the key + `\detokenize{#2}'\MessageBreak + to new value(s), but `=' is not allowed in the key of + an option\MessageBreak + (and `\string\...Option' does not use `=' to separate key and + value).\MessageBreak + Maybe you've meant \string\...Options\space instead of + \string\...Option.\MessageBreak + If you'll continue, I'll give it a try, but you should expect + further\MessageBreak + and even strange error messages.% + }% + \fi + \fi + \endgroup + \@FamilyOption{#1}{#2}% +} +\newcommand{\@FamilyOption}[3]{% + \expandafter\scr@sp@def\expandafter\scr@key@name\expandafter{#2}% +% \end{macrocode} +% The most simply solution is to walk through the \meta{list of values} and +% generate a \meta{list of options} for \cs{FamilyOptions}. +% \begin{macrocode} + \let\reserved@a\@empty + \@for\reserved@b:=#3\do{% +% \end{macrocode} +% \changes{v3.08}{2010/11/05}{allow empty values} +% Empty elements in the \meta{list of values} are ignored. Note: This is not +% really the correct solution but several users expect it. So for a real empty +% value you need to use |{}|. +% \begin{macrocode} + \ifx\reserved@b\@empty\else +% \end{macrocode} +% \changes{v3.12}{2012/03/04}{ignore white space values} +% The same for white space values. +% \begin{macrocode} + \ifx\reserved@b\space\else + \edef\reserved@a{\unexpanded\expandafter{\reserved@a},% + \scr@key@name=\unexpanded\expandafter{\reserved@b}}% + \fi + \fi + }% + \def\reserved@b{\FamilyOptions{#1}}% + \expandafter\reserved@b\expandafter{\reserved@a}% +} +% +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\KOMAoptions} +% \changes{v2.96}{2006/08/20}{hook after options added} +% \changes{v2.97c}{2007/04/19}{process options of all members} +% \changes{v3.12}{2013/03/04}{using hooks of \cs{FamilyOptions}} +% Nice little shortcut. +% \begin{macrocode} +%<*koma> +\newcommand*{\KOMAoptions}{\FamilyOptions{KOMA}} +% +% \end{macrocode} +% \begin{macro}{\KOMA@options} +% \changes{v2.97c}{2007/04/19}{added} +% \changes{v3.12}{2013/03/04}{removed} +% \end{macro}^^A \KOMA@options +% \end{command}^^A \KOMAoptions +% +% \begin{command}{\KOMAoptionsOf} +% \changes{v3.17}{2015/02/25}{added} +% Ask for the currently set options of a supporting \KOMAScript{} class or +% package. The optional first argument (\texttt{\#1}) is a command or macro, +% that will be execute with the list of options as an argument. The second +% argument (\texttt{\#2}) is the filename of a \KOMAScript{} class or package +% (with extension). Without optional argument, the \meta{list of options} are +% be printed. +% \begin{macrocode} +%<*koma> +\newcommand*{\KOMAoptionsOf}[2][\@firstofone]{% + \scr@ifundefinedorrelax{scr@kav@KOMA.#2}{% + \PackageError{scrkbase}{\string\KOMAoptionsOf\space not supported}{% + #2 is not the name of a KOMA-Script package or\MessageBreak + KOMA-Script class, that supports \string\KOMAoptionsOf.}% + }{% + \begingroup + \def\reserved@a{#1}% + \KOMA@kav@defall\reserved@b{.#2}% + \expandafter\expandafter\expandafter\endgroup + \expandafter\reserved@a\expandafter{\reserved@b}% + }% +} +% +% \end{macrocode} +% \end{command}^^A \KOMAoptionsOf +% +% \begin{command}{\KOMAoptionOf} +% \changes{v3.17}{2015/02/26}{added} +% Ask for the current values of one option of a supporting \KOMAScript{} class +% or package. Again the optional first argument (\texttt{\#1}) is a command or +% macro, that will be execute with the list of values as an argument. The second +% argument (\texttt{\#2}) is the filename of a \KOMAScript{} class or package +% (with extension). The third argument (\texttt{\#3}) is the name of an +% option of the class resp. package. Without optional argument, the \meta{list of +% values} are be printed. +% \begin{macrocode} +%<*koma> +\newcommand*{\KOMAoptionOf}[3][\@firstofone]{% + \scr@ifundefinedorrelax{scr@kav@KOMA.#2}{% + \PackageError{scrkbase}{\string\KOMAoptionOf\space not supported}{% + #2 is not the name of a KOMA-Script package or\MessageBreak + KOMA-Script class, that supports \string\KOMAoptionOf.}% + }{% + \begingroup + \def\reserved@a{#1}% + \KOMA@kav@defone\reserved@b{.#2}{#3}% + \ifx\reserved@b\@empty + \PackageWarning{scrkbase}{option `#3' for `#2' unset}% + \endgroup + \else + \expandafter\expandafter\expandafter\endgroup + \expandafter\reserved@a\expandafter{\reserved@b}% + \fi + }% +} +% +% \end{macrocode} +% \end{command} +% +% \begin{macro}{\post@kopt@hook} +% \changes{v3.12}{2013/03/04}{removed} +% \end{macro}^^A \post@kopt@hook +% \begin{command}{\AfterKOMAoptions} +% \changes{v3.12}{2013/03/04}{using \cs{AtEndOfFamilyOptions}} +% \changes{v3.23}{2017/02/16}{\cs{newcommand} instead of \cs{let}} +% An option can process code after executing all options of the current +% \cs{KOMAoptions}. +% \begin{macrocode} +%<*koma> +\newcommand*{\AfterKOMAoptions}{\AtEndOfFamilyOptions} +% +% \end{macrocode} +% \end{command}^^A \AfterKOMAoptions +% +% \begin{macro}{\l@addto@macro} +% \changes{v2.8p}{2001/09/22}{added} +% \changes{v2.95}{2006/06/02}{changed to handle macros with arguments same +% like \cs{g@addto@macro}} +% \changes{v3.12}{2013/04/20}{removed non-\eTeX{} implementation} +% \changes{v3.12}{2013/04/20}{warn, if \cs{l@addto@macro} is already defined +% different from our definition} +% \changes{v3.23}{2017/02/16}{moved to \texttt{prepare}} +% We need a local variant of \cs{g@addto@macro}. +% \begin{macrocode} +% +%<*base&prepare> +\@ifundefined{l@addto@macro}{}{% + \begingroup + \long\def\reserved@a#1#2{% + \edef#1{\unexpanded\expandafter{#1#2}}% + }% + \ifx\reserved@a\l@addto@macro\else + \PackageWarning{scrbase}{% + Someone also uses macro name \string\l@addto@macro.\MessageBreak + When KOMA-Script author decided to use macro name\MessageBreak + \string\l@addto@macro\space first, there was no other + free\MessageBreak + LaTeX package using this macro name.\MessageBreak + In the meantime other package authers decided to use\MessageBreak + same macro name, but unfortunatly not all of those\MessageBreak + are compatible with KOMA-Script's definition, e.g.,\MessageBreak + while adding definitions with arguments to macros.\MessageBreak + Because of such potentially incompatible definitions,\MessageBreak + KOMA-Script will redefine the command now.\MessageBreak + Please ask the author of the other package to\MessageBreak + rename his macro, if a problem results in the\MessageBreak + redefinition% + }% + \fi + \endgroup +} +\long\def\l@addto@macro#1#2{% + \edef#1{\unexpanded\expandafter{#1#2}}% +}% +% +%<*body> +% \end{macrocode} +% \end{macro}^^A \l@addto@macro +% +% \begin{macro}{\l@addto@macro@a} +% \changes{v3.20}{2015/11/20}{added} +% I also need a version for macros with exactly one argument. Note: This macro +% is dangerous. Sometimes it does not work correctly, so there is not an will +% not be an official documentation. +% \begin{macrocode} +%<*base> +\begingroup + \catcode`\^^A=\catcode`\# + \@makeother\# + \gdef\l@addto@macro@a^^A1{% + \begingroup + \@makeother\# + \def\l@addto@macro@a@cmd{^^A1}% + \l@addto@macro@a@ + } + \gdef\l@addto@macro@a@^^A1{% + \def\l@addto@macro@a@add{^^A1}% + \l@addto@macro@a@@ + } +\endgroup +\begingroup + \@makeother\# + \gdef\l@addto@macro@a@@{% + \@makeother\# + \edef\reserved@a{% + \detokenize{\endgroup\def}% + \detokenize\expandafter{\l@addto@macro@a@cmd#1}% + {% + \expandafter\detokenize% + \expandafter\expandafter\expandafter{\l@addto@macro@a@cmd{#1}}% + \expandafter\detokenize\expandafter{\l@addto@macro@a@add}% + }% + }% + \expandafter\scantokens\expandafter{\reserved@a}% + }% +\endgroup +% +% \end{macrocode} +% \end{macro}^^A \l@addto@macro@a +% +% \begin{macro}{\l@preto@macro} +% \changes{v3.20}{2015/11/25}{added} +% Similar to \cs{l@addto@macro} but adds code at the very beginning instead of +% appending it a the end. +% \begin{macrocode} +%<*base> +\newcommand\l@preto@macro[2]{% + \edef#1{\unexpanded{#2}\unexpanded\expandafter{#1}}% +}% +% +% \end{macrocode} +% \end{macro}^^A \l@preto@macro +% +% \begin{macro}{\l@preto@macro@a} +% \changes{v3.20}{2015/11/25}{added} +% I also need a version for macros with exactly one argument. Note: This macro +% is dangerous. Sometimes it does not work correctly, so there is not an will +% not be an official documentation. +% \begin{macrocode} +%<*base> +\begingroup + \catcode`\^^A=\catcode`\# + \@makeother\# + \gdef\l@preto@macro@a^^A1{% + \begingroup + \@makeother\# + \def\l@preto@macro@a@cmd{^^A1}% + \l@preto@macro@a@ + } + \gdef\l@preto@macro@a@^^A1{% + \def\l@preto@macro@a@add{^^A1}% + \l@preto@macro@a@@ + } +\endgroup +\begingroup + \@makeother\# + \gdef\l@preto@macro@a@@{% + \@makeother\# + \edef\reserved@a{% + \detokenize{\endgroup\def}% + \detokenize\expandafter{\l@preto@macro@a@cmd#1}% + {% + \expandafter\detokenize\expandafter{\l@preto@macro@a@add}% + \expandafter\detokenize% + \expandafter\expandafter\expandafter{\l@preto@macro@a@cmd{#1}}% + }% + }% + \expandafter\scantokens\expandafter{\reserved@a}% + }% +\endgroup +% +% \end{macrocode} +% \end{macro}^^A \l@preto@macro@a +% +% \begin{command}{\KOMAoption} +% \changes{v2.98c}{2008/03/12}{added} +% \changes{v3.12}{2013/03/04}{using \cs{FamilyOption}} +% Simple little shortcut. +% \begin{macrocode} +%<*koma> +\newcommand*{\KOMAoption}{\FamilyOption{KOMA}} +% +% \end{macrocode} +% \end{command} +% +% \begin{command}{\FamilyUnknownKeyValue} +% \changes{v3.10}{2011/09/12}{no error while processing global options} +% \changes{v3.11a}{2012/05/28}{prevent remove from list of unused global +% options globally} +% \changes{v3.14}{2014/10/17}{\cs{long}} +% \changes{v3.30}{2020/02/25}{spurious space in warning message removed} +% Used to report an error because of unknown values. Arguments are +% \marg{family}\marg{key}\marg{valid values}. +% \begin{macrocode} +%<*base> +\newcommand{\FamilyUnknownKeyValue}[4]{% + \FamilyKeyStateUnknownValue + \ifx\FamilyElseValues\@empty\else + \PackageWarning{scrbase}{non empty \string\FamilyElseValue + ignored.\MessageBreak + Setting this command to a non empty\MessageBreak + value for option `#2' of\MessageBreak + family `#1' is deprecated,\MessageBreak + but has been found% + }% + \fi +} +% +% \end{macrocode} +% \begin{command}{\FamilyElseValues} +% \changes{v3.00}{2008/05/02}{added} +% \changes{v3.12}{2013/03/04}{deprecated and not used internally} +% \begin{macrocode} +%<*base> +\newcommand*{\FamilyElseValues}{} +% +% \end{macrocode} +% \end{command}^^A \FamilyUnknownKeyValue +% \end{command}^^A \FamilyElseValue +% +% \begin{command}{\FamilyBoolKey} +% \changes{v3.00}{2008/04/30}{added} +% Defining a new boolean key: +% \begin{quote} +% \cs{FamilyBoolKey}\oarg{member}\marg{family}\marg{key}\marg{switch} +% \end{quote} +% The default \meta{member} is (once again) +% \file{.\cs{@currname}.\cs{@currext}} and it is recommended to always use it! +% \cs{if\meta{switch}} is automatically defined, if it was undefined. In this +% case the initial value is \opt{false}. The default for using the \meta{key} +% without argument would be \opt{true}. For other allowed values see +% \cs{FamilySetBool}. +% \begin{macrocode} +%<*base> +\newcommand*{\FamilyBoolKey}[4][.\@currname.\@currext]{% + \@ifundefined{if#4}{% + \expandafter\newif\csname if#4\endcsname + }{}% + \DefineFamilyKey[{#1}]{#2}{#3}[true]{\FamilySetBool{#2}{#3}{#4}{##1}}% +} +% \end{macrocode} +% \begin{command}{\FamilySetBool} +% \changes{v3.00}{2008/04/30}{added} +% \changes{v3.11a}{2012/05/25}{error message fixed} +% \changes{v3.27}{2019/07/08}{empty argument is \texttt{true}} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% Setting a boolean key: +% \begin{quote} +% \cs{FamilySetBool}\marg{family}\marg{key}\marg{switch}\marg{value} +% \end{quote} +% The \meta{family} and the \meta{key} are used for reporting unknown values using +% \cs{FamilyUnknownKeyValue}. The \meta{switch} is used to use either +% \cs{\meta{switch}true} or \cs{\meta{switch}false}. It is ignored, if these +% are not defined, so have to take care, that \cs{if\meta{switch}} already has +% been defined, e.g., using \cs{FamilyBoolKey}. The \meta{value} can either be +% \opt{true}, \opt{on} or \opt{yes} for \cs{\meta{switch}true} or +% \opt{false}, \opt{off} or \opt{no} for \cs{\meta{switch}false}. +% \begin{macrocode} +\newcommand*{\FamilySetBool}[4]{% + \Ifstr{#4}{}{\@nameuse{#3true}\FamilyKeyStateProcessed}{% + \Ifstr{#4}{true}{\@nameuse{#3true}\FamilyKeyStateProcessed}{% + \Ifstr{#4}{on}{\@nameuse{#3true}\FamilyKeyStateProcessed}{% + \Ifstr{#4}{yes}{\@nameuse{#3true}\FamilyKeyStateProcessed}{% + \Ifstr{#4}{false}{\@nameuse{#3false}\FamilyKeyStateProcessed}{% + \Ifstr{#4}{off}{\@nameuse{#3false}\FamilyKeyStateProcessed}{% + \Ifstr{#4}{no}{\@nameuse{#3false}\FamilyKeyStateProcessed}{% + \FamilyUnknownKeyValue{#1}{#2}{#4}{% + `true', `on', `yes', `false', `off', `no'% + }% + }% + }% + }% + }% + }% + }% + }% + \let\FamilyElseValues\@empty +} +% +% \end{macrocode} +% \end{command} +% \end{command} +% \begin{command}{\FamilyInverseBoolKey,\FamilySetInverseBool} +% \changes{3.27}{2019/07/08}{added} +% These are similar to \cs{FamilyBoolKey} and \cs{FamilySetBoolKey} but use +% inverse logic (true sets false and false sets true). +% \begin{macrocode} +%<*base> +\newcommand*{\FamilyInverseBoolKey}[4][.\@currname.\@currext]{% + \@ifundefined{if#4}{% + \expandafter\newif\csname if#4\endcsname + \@nameuse{#4true}% + }{}% + \DefineFamilyKey[{#1}]{#2}{#3}[true]{\FamilySetInverseBool{#2}{#3}{#4}{##1}}% +} +\newcommand*{\FamilySetInverseBool}[4]{% + \FamilySetBool{#1}{#2}{#3}{#4}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \expandafter\ifx\csname if#3\expandafter\endcsname\csname iftrue\endcsname + \@nameuse{#3false}% + \else + \@nameuse{#3true}% + \fi + \fi +} +% +% \end{macrocode} +% \end{command}^^A \FamilyInverseBoolKey,\FamilySetInverseBool +% +% \begin{macro}{\KOMA@unknown@keyval} +% Version of \cs{FamilyUnknownKeyValue} with static family |KOMA|. +% \begin{macrocode} +%<*koma> +\newcommand*{\KOMA@unknown@keyval}{\FamilyUnknownKeyValue{KOMA}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\KOMA@ifkey} +% \changes{v3.02c}{2009/02/04}{defines the member if needed} +% \changes{v3.17}{2015/03/02}{replaces the value in the storage} +% This is an extended version of \cs{FamilyBoolKey} with static family +% |KOMA|. So the syntax is: +% \begin{quote} +% \cs{KOMA@ifkey}\oarg{member}\marg{key}\marg{switch} +% \end{quote} +% The default \meta{member} is (once again) +% \file{.\cs{@currname}.\cs{@currext}} and it is recommended to always use it! +% \cs{if\meta{switch}} is automatically defined, if it was undefined. The +% default for using the \meta{key} without argument would be \opt{true}. Note: +% \meta{member} and \meta{key} are always fully expanded. Depending on a +% already existing \cs{if\meta{key}} either \opt{\meta{key}=true} or +% \opt{\meta{key}=false} is added to the value storage. If \cs{if\meta{key}} +% was not defined, the initialized value is \opt{false}. +% \begin{macrocode} +%<*koma> +\newcommand*{\KOMA@ifkey}[2][.\@currname.\@currext]{% + \begingroup\edef\reserved@a{\noexpand\KOMA@@ifkey{#1}{#2}}% + \expandafter\endgroup\reserved@a +} +\newcommand*{\KOMA@@ifkey}[3]{% + \@ifundefined{if#3}{% + \expandafter\newif\csname if#3\endcsname + }{}% + \KOMA@key[{#1}]{#2}[true]{% + \KOMA@set@ifkey{#2}{#3}{##1}% + \KOMA@kav@replacebool{#1}{#2}{#3}% + }% + \csname if#3\endcsname + \KOMA@kav@xadd{#1}{#2}{true}% + \else + \KOMA@kav@xadd{#1}{#2}{false}% + \fi +} +% +% \end{macrocode} +% \begin{macro}{\KOMA@set@ifkey} +% Simple a shortcut for |\FamilySetBool{KOMA}|. So the syntax is: +% \begin{quote} +% \cs{KOMA@set@ifkey}\marg{key}\marg{switch}\marg{value} +% \end{quote} +% But all arguments are delegated. +% \begin{macrocode} +%<*koma> +\newcommand*{\KOMA@set@ifkey}{\FamilySetBool{KOMA}} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{command}{\FamilyCounterKey} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.15}{2014/12/03}{optional default value} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% Defining a \meta{key} that sets a \LaTeX{} counter to a \meta{value}. +% \begin{quote} +% \cs{FamilyCounterKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{\LaTeX{} counter} +% \end{quote} +% \meta{default} and the \meta{value} of the option has to be (almost) any +% kind of value, that can be assigned to a \LaTeX{} counter. The +% \meta{counter} is automatically defined, if it was undefined. In this case +% the initial value is 0. +% \begin{macro}{\Family@@Counter@@Key,\Family@Counter@Key} +% \changes{v3.15}{2014/12/03}{added} +% \begin{macrocode} +%<*base> +\newcommand*{\FamilyCounterKey}[3][.\@currname.\@currext]{% + \kernel@ifnextchar [%] + {\Family@@Counter@@Key{#1}{#2}{#3}}% + {\Family@Counter@Key{#1}{#2}{#3}}% +} +\newcommand*{\Family@@Counter@@Key}{} +\def\Family@@Counter@@Key#1#2#3[#4]#5{% + \@ifundefined{c@#5}{\newcounter{#5}}{}% + \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetCounter{#2}{#3}{#5}{##1}}% +} +\newcommand*{\Family@Counter@Key}[4]{% + \@ifundefined{c@#4}{\newcounter{#4}}{}% + \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetCounter{#2}{#3}{#4}{##1}}% +} +% \end{macrocode} +% \end{macro} +% \begin{command}{\FamilySetCounter} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.18a}{2015/07/06}{using \cs{FamilyKeyStateProcessed}} +% \changes{v3.23}{2017/02/23}{white space replaced by \cs{relax}} +% Set the value of a \meta{key} defined by \cs{FamilyCounterKey}: +% \begin{quote} +% \cs{FamilySetCounter}\marg{family}\marg{key}\marg{counter}\marg{value} +% \end{quote} +% Note: Before assigning the \meta{value} to the \meta{counter} tests are +% done, if the \meta{value} can be used to be assigned to a \LaTeX{} +% counter. If this fails a unknown value is reported. +% \begin{macrocode} +\newcommand*{\FamilySetCounter}[4]{% + \begingroup + \protected@edef\reserved@a{#4}% + \def\reserved@b{\endgroup\value{#3}=#4\relax\FamilyKeyStateProcessed}% + \expandafter\Ifiscount\expandafter{\reserved@a}{}{% + \expandafter\Ifisdimen\expandafter{\reserved@a}{}{% + \expandafter\Ifisskip\expandafter{\reserved@a}{}{% + \expandafter\Ifisnumexpr\expandafter{\reserved@a}{}{% + \expandafter\Ifisdimexpr\expandafter{\reserved@a}{}{% + \expandafter\Ifisinteger\expandafter{\reserved@a}{}{% + \expandafter\Ifiscounter\expandafter{\reserved@a}{% + \def\reserved@b{% + \endgroup\value{#3}=\value{#4}\FamilyKeyStateProcessed + }% + }{% + \def\reserved@b{% + \endgroup + \FamilyUnknownKeyValue{#1}{#2}{#4}{% + integer numbers, counters, lengths, skips, dimens + }% + }% + }% + }% + }% + }% + }% + }% + }% + \reserved@b +} +% +% \end{macrocode} +% \end{command} +% \end{command} +% +% \begin{command}{\FamilyCounterMacroKey} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.15}{2014/12/03}{support for optional default} +% Similar to \cs{FamilyCounterKey}, but it does not use a \LaTeX{} counter to +% store the value but a macro (or command): +% \begin{quote} +% \cs{FamilyCounterMacroKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{macro} +% \end{quote} +% The \meta{value} will be assigned to a counter (\cnt{page}) locally and the +% \meta{macro} is defined using the value of the counter. The \meta{macro} +% is automatically set to \cs{z@} if it was not already defined. If it was +% defined, the user is responsible for that it has to be a number. +% \begin{macro}{\Family@@Counter@@Macro@@Key,\Family@Counter@Macro@Key} +% \changes{v3.15}{2014/12/03}{added} +% \changes{v3.37}{2022/06/28}{existence test fixed} +% \begin{macrocode} +%<*base> +\newcommand*{\FamilyCounterMacroKey}[3][.\@currname.\@currext]{% + \kernel@ifnextchar [%] + {\Family@@Counter@@Macro@@Key{#1}{#2}{#3}}% + {\Family@Counter@Macro@Key{#1}{#2}{#3}}% +} +\newcommand*{\Family@@Counter@@Macro@@Key}{} +\def\Family@@Counter@@Macro@@Key#1#2#3[#4]#5{% + \ifdefined#5\else\let#5\z@\fi + \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetCounterMacro{#2}{#3}{#5}{##1}}% +} +\newcommand*{\Family@Counter@Macro@Key}[4]{% + \ifdefined#4\else\let#4\z@\fi + \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetCounterMacro{#2}{#3}{#4}{##1}}% +} +% \end{macrocode} +% \end{macro}^^A \Family@@Counter@@Macro@@Key,\Family@Counter@Macro@Key +% \begin{command}{\FamilySetCounterMacro} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.15}{2014/12/17}{\cs{aftergroup} before \cs{FamilyKeyStateProcessed}} +% \changes{v3.18a}{2015/07/06}{fixed usage of \cs{FamilyKeyStateProcessed}} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% Similar to \cs{FamilySetCounter} but using a macro (or command) instead of a +% \LaTeX{} counter: +% \begin{quote} +% \cs{FamilySetCounterMacro}\marg{family}\marg{key}\marg{macro}\marg{value} +% \end{quote} +% Note, that the \meta{value} is locally assigned to a counter (\cnt{page}) +% before defining the \meta{macro} using the value of the counter. +% \begin{macrocode} +\newcommand*{\FamilySetCounterMacro}[4]{% + \begingroup + \FamilySetCounter{#1}{#2}{page}{#4}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \edef\reserved@a{% + \unexpanded{\endgroup\def#3}% + {\the\value{page}}% + \noexpand\FamilyKeyStateProcessed + }% + \else + \def\reserved@a{% + \endgroup + \FamilyUnknownKeyValue{#1}{#2}{#4}{% + integer numbers, counters, lengths, skips, dimens + }% + }% + \fi + \reserved@a +} +% +% \end{macrocode} +% \end{command}^^A \FamilySetCounterMacro +% \end{command}^^A \FamilyCounterMacroKey +% +% \begin{command}{\FamilyLengthKey} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.15}{2014/12/03}{optional default value} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% Defining a \meta{key} that sets a \LaTeX{} length to a \meta{value}. +% \begin{quote} +% \cs{FamilyLengthKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{\LaTeX{} length} +% \end{quote} +% \meta{default} and the \meta{value} of the option has to be (almost) any +% kind of value, that can be assigned to a \LaTeX{} length, a \TeX{} dimension +% or a \TeX{} skip. The \meta{\LaTeX{} length} is automatically defined, if it +% was undefined. In this case the initial value is 0. +% \begin{macro}{\Family@@Length@@Key,\Family@Length@Key} +% \changes{v3.15}{2014/12/03}{added} +% \begin{macrocode} +%<*base> +\newcommand*{\FamilyLengthKey}[3][.\@currname.\@currext]{% + \kernel@ifnextchar [%] + {\Family@@Length@@Key{#1}{#2}{#3}}% + {\Family@Length@Key{#1}{#2}{#3}}% +} +\newcommand*{\Family@@Length@@Key}{} +\def\Family@@Length@@Key#1#2#3[#4]#5{% + \ifdefined#5\else\newlength{#5}\fi + \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetLength{#2}{#3}{#5}{##1}}% +} +\newcommand*{\Family@Length@Key}[4]{% + \ifdefined#4\else\newlength{#4}\fi + \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetLength{#2}{#3}{#4}{##1}}% +} +% \end{macrocode} +% \begin{command}{\FamilySetLength} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.15}{2015/01/02}{\cs{ifglueexpr} added} +% \changes{v3.18a}{2015/07/06}{usage of \cs{FamilyKeyStateProcessed} fixed} +% \changes{v3.20}{2016/04/27}{expansion before testing} +% Set the value of a \meta{key} defined by \cs{FamilyLengthKey}: +% \begin{quote} +% \cs{FamilySetLength}\marg{family}\marg{key}\marg{\LaTeX{} length}\marg{value} +% \end{quote} +% Note: Before assigning the \meta{value} to the \meta{\LaTeX{} length} it is +% fully expanded and tests are done, if the \meta{value} can be used to be +% assigned to a \LaTeX{} length. If this fails a unknown value is reported. If +% the expansion or the assignment fails a \TeX{} error happens. +% \begin{macrocode} +\newcommand*{\FamilySetLength}[4]{% + \begingroup + \protected@edef\reserved@a{#4}% +% \end{macrocode} +% Together with \cs{@defaultsunits} (see below) following code, could be used: +% \begin{macrocode} +%<*neveruse> + \expandafter\Ifiscount\expandafter{\reserved@a}{% + \aftergroup\@firstoftwo + }{% +% +% \end{macrocode} +% But currently we don't use it! +% \begin{macrocode} + \expandafter\Ifisdimen\expandafter{\reserved@a}{% + \aftergroup\@firstoftwo + }{% + \expandafter\Ifisskip\expandafter{\reserved@a}{% + \aftergroup\@firstoftwo + }{% +% \end{macrocode} +% Together with \cs{@defaultsunits} (see below) following code, could be used: +% \begin{macrocode} +%<*neveruse> + \expandafter\Ifisnumexpr\expandafter{\reserved@a}{% + \aftergroup\@firstoftwo + }{% +% +% \end{macrocode} +% But currently we don't use it! +% \begin{macrocode} + \expandafter\Ifisdimexpr\expandafter{\reserved@a}{% + \aftergroup\@firstoftwo + }{% + \expandafter\Ifisglueexpr\expandafter{\reserved@a}{% + \aftergroup\@firstoftwo + }{% + \expandafter\Ifisglue\expandafter{\reserved@a}{% + \aftergroup\@firstoftwo + }{% + \aftergroup\@secondoftwo + }% + }% + }% +%<*neveruse> + }% +% + }% + }% +%<*neveruse> + }% +% + \endgroup +% \end{macrocode} +% \begin{description} +% \item[ToDo:] Maybe something like: +% \begin{macrocode} +%<*neveruse> + {\@defaultunits#3=#4pt\relax\@nnil\FamilyKeyStateProcessed} +% +% \end{macrocode} +% would be nice. But there are reasons I've decided not to use +% this. Unfortunately I cannot remember the reason (and because of this I've +% added the code as \texttt{neveruse}). So the simple assignment is used +% instead: +% \end{description} +% \begin{macrocode} + {#3=#4\FamilyKeyStateProcessed}% + {% + \FamilyUnknownKeyValue{#1}{#2}{#4}{% + length values, +%<*neveruse> + counters, +% + lengths, skips, dimens + }% + }% +} +% +% \end{macrocode} +% \end{command}^^A \FamilySetLength +% \end{macro}^^A \Family@@Leng{\FamilyLengthKey}th@@Key,\Family@Length@Key +% \end{command}^^A FamilyLengthKey +% +% \begin{command}{\FamilyLengthMacroKey} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.15}{2014/12/03}{support for optional default} +% \begin{command}{\FamilySetLengthMacro} +% \changes{v3.12}{2013/11/05}{added} +% \changes{v3.14a}{2014/11/24}{fix: \cs{@tempskipa} instead of \cs{@temskipa}} +% \changes{v3.15}{2014/12/17}{\cs{aftergroup} before +% \cs{FamilyKeyStateProcessed}} +% \changes{v3.15}{2015/01/02}{\cs{ifglueexpr} added} +% \changes{v3.18a}{2015/07/06}{usage of \cs{FamilyKeyStateProcessed} fixed} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \changes{v3.20}{2016/04/27}{using \cs{FamilySetLength}} +% Similar to \cs{FamilyLengthKey}, but it does not use a \LaTeX{} counter to +% store the value but a macro (or command): +% \begin{quote} +% \cs{FamilyLength MacroKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{macro} +% \end{quote} +% The \meta{value} will be assigned to a length (\len{@tempskipa}) locally and +% the \meta{macro} is defined using the value of the length. The \meta{macro} +% is automatically set to \cs{z@} if it was not already defined. If it was +% defined, the user is responsible for that it has to be a valid length. Usage +% of \cs{dimexpr} is recommended for such a definition. +% \begin{macro}{\Family@@Length@@Macro@@Key,\Family@Length@Macro@Key} +% \changes{v3.15}{2014/12/03}{added} +% \begin{macrocode} +%<*base> +\newcommand*{\FamilyLengthMacroKey}[3][.\@currname.\@currext]{% + \kernel@ifnextchar [%] + {\Family@@Length@@Macro@@Key{#1}{#2}{#3}}% + {\Family@Length@Macro@Key{#1}{#2}{#3}}% +} +\newcommand*{\Family@@Length@@Macro@@Key}{} +\def\Family@@Length@@Macro@@Key#1#2#3[#4]#5{% + \ifdefined#5\else\let#5\z@\fi + \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\FamilySetLengthMacro{#2}{#3}{#5}{##1}}% +} +\newcommand*{\Family@Length@Macro@Key}[4]{% + \ifdefined#4\else\let#4\z@\fi + \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetLengthMacro{#2}{#3}{#4}{##1}}% +} +\newcommand*{\FamilySetLengthMacro}[4]{% + \begingroup + \FamilySetLength{#1}{#2}{\@tempskipa}{#4}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \edef\reserved@a{% + \unexpanded{\endgroup\def#3}% + {\the\@tempskipa}% + \noexpand\FamilyKeyStateProcessed + }% + \else + \def\reserved@a{% + \endgroup + \FamilyUnknownKeyValue{#1}{#2}{#4}{% + length values, counters, lengths, skips, dimens + }% + }% + \fi + \reserved@a +} +% +% \end{macrocode} +% \end{macro}^^A \Family@@Length@@Macro@@Key,\Family@Length@Macro@Key +% \end{command}^^A \FamilySetLengthMacro +% \end{command}^^A \FamilyLengthMacroKey +% +% +% \begin{command}{\FamilyUseLengthMacroKey,\FamilySetUseLengthMacro} +% \changes{v3.20}{2016/04/27}{added} +% These are almost the same like \cs{FamilyLengthMacroKey} and +% \cs{FamilySetLengthMacro}. But there is one important difference: Instead of +% setting the \meta{macro} to the value of the temporary length, that has been +% used for a test assignment, the \meta{macro} is defined as \meta{value}. So +% later changes valid for the expansion and value of \meta{value} will indeed +% change the value of \meta{macro}, when it is used. +% \begin{macro}{\Family@@UseLength@@Macro@@Key,\Family@USeLength@Macro@Key} +% \changes{v3.20}{2016/04/27}{added} +% \begin{macrocode} +%<*base> +\newcommand*{\FamilyUseLengthMacroKey}[3][.\@currname.\@currext]{% + \kernel@ifnextchar [%] + {\Family@@UseLength@@Macro@@Key{#1}{#2}{#3}}% + {\Family@UseLength@Macro@Key{#1}{#2}{#3}}% +} +\newcommand*{\Family@@UseLength@@Macro@@Key}{} +\def\Family@@UseLength@@Macro@@Key#1#2#3[#4]#5{% + \ifdefined#5\else\let#5\z@\fi + \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{% + \FamilySetUseLengthMacro{#2}{#3}{#5}{##1}% + }% +} +\newcommand*{\Family@UseLength@Macro@Key}[4]{% + \ifdefined#4\else\let#4\z@\fi + \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetUseLengthMacro{#2}{#3}{#4}{##1}}% +} +\newcommand*{\FamilySetUseLengthMacro}[4]{% + \begingroup + \FamilySetLength{#1}{#2}{\@tempskipa}{#4}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \def\reserved@a{% + \endgroup\def#3{#4}% + \FamilyKeyStateProcessed + }% + \else + \def\reserved@a{% + \endgroup + \FamilyUnknownKeyValue{#1}{#2}{#4}{% + length values, counters, lengths, skips, dimens + }% + }% + \fi + \reserved@a +} +% +% \end{macrocode} +% \end{macro}^^A \Family@@UseLength@@Macro@@Key,\Family@USeLength@Macro@Key +% \end{command}^^A \FamilyUseLengthMacroKey,\FamilySetUseLengthMacro +% +% +% \begin{command}{\FamilyNumericalKey} +% \changes{v3.00}{2008/04/30}{added} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% This is a mapping of symbolic values to numerical values: +% \begin{quote} +% \cs{FamilyNumericalKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{macro}\marg{mapping list} +% \end{quote} +% The \meta{mapping list} is: +% \begin{quote} +% \texttt{\marg{symbol$_1$}\marg{value$_1$},\marg{symbol$_2$}\marg{value$_2$}\dots} +% \end{quote} +% There is no need for \meta{value$_n$} and \meta{value$_m$} to be mutual +% exclusive. So several symbols can be mapped to the same value. +% \begin{macro}{\Family@Numerical@Key} +% \changes{v3.00}{2008/05/28}{added} +% \changes{v3.08b}{2011/03/31}{fixed: missing argument to \cs{ifundefined}} +% The internal macro is used to handle the optional \meta{default} (because +% currently we are not using \pkg{xparse}). +% \begin{macrocode} +%<*base> +\newcommand*{\FamilyNumericalKey}[3][.\@currname.\@currext]{% + \kernel@ifnextchar [%] + {\Family@Numerical@Key{#1}{#2}{#3}}{\Family@Numerical@Key{#1}{#2}{#3}[]}% +} +\newcommand*{\Family@Numerical@Key}{} +\def\Family@Numerical@Key#1#2#3[#4]#5#6{% + \@ifundefined{#5}{\@namedef{#5}{0}}{}% + \ifx\relax#4\relax + \DefineFamilyKey[{#1}]{#2}{#3}{\FamilySetNumerical{#2}{#3}{#5}{#6}{##1}}% + \else + \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{% + \FamilySetNumerical{#2}{#3}{#5}{#6}{##1}}% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{command}{\FamilySetNumerical} +% \changes{v3.11a}{2012/05/28}{call of \cs{FamilyUnknownKeyValue} outside of +% local group} +% \changes{v3.25}{2017/12/04}{handling of completely empty list elements} +% Set the value of \meta{key} defined by \cs{FamilyNumericalKey}: +% \begin{quote} +% \cs{FamilySetNumerical}\marg{family}\marg{key}\marg{macro}\marg{mapping list}\marg{value} +% \end{quote} +% \begin{macrocode} +\newcommand*{\FamilySetNumerical}[5]{% + \begingroup + \edef\@searched{#5}% + \let\reserved@a=\@empty + \let\reserved@b=\@empty + \@tempswafalse + \@for\@valuelist:=#4\do{% + \ifx\@valuelist\@empty\else + \if@tempswa\else + \edef\reserved@c{\expandafter\@firstoftwo\@valuelist}% + \edef\reserved@a{\reserved@a\reserved@b`\reserved@c'}% + \edef\reserved@b{, }% + \ifx\reserved@c\@searched + \@tempswatrue + \edef\reserved@a{\expandafter\@secondoftwo\@valuelist}% + \fi + \fi + \fi + }% + \if@tempswa + \edef\reserved@a{\endgroup + \noexpand\@namedef{#3}{\reserved@a}% + \noexpand\FamilyKeyStateProcessed + }% + \else + \edef\reserved@a{\endgroup + \noexpand\FamilyUnknownKeyValue{#1}{#2}{#5}{\reserved@a}% + }% + \fi + \reserved@a + \let\FamilyElseValues\@empty +} +% +% \end{macrocode} +% \end{command}^^A \FamilySetNumerical +% \end{command}^^A \FamilyNumericalKey +% +% \begin{macro}{\KOMA@ncmdkey} +% \changes{v3.02c}{2009/02/04}{defining the member (if needed)} +% \changes{v3.17}{2015/03/16}{re-implemented with value storage and optional default} +% \begin{macro}{\KOMA@@@ncmdkey,\KOMA@@ncmdkey} +% \changes{v3.17}{2015/03/16}{added} +% Like \cs{FamilyNumericalKey} with two important differences: +% \begin{itemize} +% \item The family is not an argument but always |KOMA|. +% \item The values will in the internal value storage is replaced (on success). +% \end{itemize} +% Important: Don't forget to add the default to the internal value storage, +% e.g., using \cs{KOMA@kav@add}. +% \begin{macrocode} +%<*koma> +\newcommand*{\KOMA@ncmdkey}[2][.\@currname.\@currext]{% + \begingroup\edef\reserved@a{\noexpand\KOMA@@ncmdkey{#1}{#2}}% + \expandafter\endgroup\reserved@a +} +\newcommand*{\KOMA@@ncmdkey}[2]{% + \kernel@ifnextchar [%] + {\KOMA@@@ncmdkey{#1}{#2}}{\KOMA@@@ncmdkey{#1}{#2}[]} +} +\newcommand*{\KOMA@@@ncmdkey}{} +\def\KOMA@@@ncmdkey#1#2[#3]#4#5{% + \@ifundefined{#4}{\@namedef{#4}{0}}{}% + \ifx\relax#3\relax + \KOMA@key[{#1}]{#2}{% + \KOMA@set@ncmdkey{#2}{#4}{#5}{##1}% + \KOMA@kav@replacevalue{#1}{#2}{##1}% + }% + \else + \KOMA@key[{#1}]{#2}[{#3}]{% + \KOMA@set@ncmdkey{#2}{#4}{#5}{##1}% + \KOMA@kav@replacevalue{#1}{#2}{##1}% + }% + \fi +} +% +% \end{macrocode} +% \begin{macro}{\KOMA@set@ncmdkey} +% The corresponding set command similar to \cs{FamilySetNumerical} but again +% the family is not an argument but always |KOMA|. +% \begin{macrocode} +%<*koma> +\newcommand*{\KOMA@set@ncmdkey}{\FamilySetNumerical{KOMA}} +% +% \end{macrocode} +% \end{macro}^^A \KOMA@set@ncmdkey +% \end{macro}^^A \KOMA@@@ncmdkey,\KOMA@@ncmdkey +% \end{macro}^^A \KOMA@ncmdkey +% +% +% \begin{command}{\FamilyStringKey} +% \changes{v3.08}{2010/11/05}{added} +% \changes{v3.08b}{2011/03/31}{\cs{Family@String@Key} and +% \cs{Family@@String@@Key} switched} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% Defining a \meta{key} that defines a \meta{macro} to be a \meta{value}. +% \begin{quote} +% \cs{FamilyStringKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{macro} +% \end{quote} +% \meta{default} and the \meta{value} of the option should be a string (but +% currently every value is accepted). The definition is done using +% \cs{def}. So it doesn't matter whether the \meta{macro} is already defined. +% \begin{macro}{\Family@String@Key,\Family@@String@@Key} +% \changes{v3.08}{2010/11/05}{added} +% \changes{v3.37}{2022/06/28}{state signaling fixed} +% \begin{macrocode} +%<*base> +\newcommand*{\FamilyStringKey}[3][.\@currname.\@currext]{% + \kernel@ifnextchar [%] + {\Family@@String@@Key{#1}{#2}{#3}}{\Family@String@Key{#1}{#2}{#3}}% +} +\newcommand*{\Family@@String@@Key}{} +\long\def\Family@@String@@Key#1#2#3[#4]#5{% + \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\def#5{##1}\FamilyKeyStateProcessed}% +} +\newcommand{\Family@String@Key}[4]{% + \DefineFamilyKey[{#1}]{#2}{#3}{\def#4{##1}\FamilyKeyStateProcessed}% +} +% +% \end{macrocode} +% \end{macro}^^A \Family@String@Key,\Family@@String@@Key +% \end{command}^^A \FamilyStringKey +% +% +% \begin{command}{\FamilyCSKey} +% \changes{v3.25}{2017/12/08}{added} +% This is similar to \cs{FamilyStringKey} but instead of a \meta{macro} a +% \meta{command sequence} is used: +% \begin{quote} +% \cs{FamilyCSKey}\oarg{member}\marg{family}\marg{key}\oarg{default}\marg{command sequence} +% \end{quote} +% Because of this, \cs{@namedef} instead of \cs{def} is used to define the +% corresponding \cs{\meta{command sequence}}. +% \begin{macro}{\Family@CS@Key} +% \changes{v3.25}{2017/12/08}{added} +% \begin{macro}{\Family@@CS@@Key} +% \changes{v3.25}{2017/12/08}{added} +% \changes{v3.26}{2018/11/06}{fix: don't overwrite \cs{Family@@String@@Key}} +% \changes{v3.37}{2022/06/28}{state signaling fixed} +% \begin{macrocode} +%<*base> +\newcommand*{\FamilyCSKey}[3][.\@currname.\@currext]{% + \kernel@ifnextchar [%] + {\Family@@CS@@Key{#1}{#2}{#3}}{\Family@CS@Key{#1}{#2}{#3}}% +} +\newcommand*{\Family@@CS@@Key}{} +\long\def\Family@@CS@@Key#1#2#3[#4]#5{% + \DefineFamilyKey[{#1}]{#2}{#3}[{#4}]{\@namedef{#5}{##1}\FamilyKeyStateProcessed}% +} +\newcommand{\Family@CS@Key}[4]{% + \DefineFamilyKey[{#1}]{#2}{#3}{\@namedef{#4}{##1}\FamilyKeyStateProcessed}% +} +% +% \end{macrocode} +% \end{macro}^^A \Family@@CS@@Key +% \end{macro}^^A \Family@CS@Key +% \end{command}^^A \FamilyCSKey +% +% +% \begin{macro}{\KOMA@DeclareDeprecatedOption} +% \changes{v3.01a}{2008/11/20}{added} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% Used to define a deprecated \meta{classic option} by an up-to-date +% \meta{\pkg*{keyval} option}. +% \begin{quote} +% \cs{KOMA@DeclareDeprecatedOption}\oarg{package name}\marg{classic +% option}\marg{\pkg*{keyval} option} +% \end{quote} +% If the \meta{package name} is omitted, \cs{KOMAClassName} is used to report +% a class warning instead of a package warning. +% \begin{macro}{\KOMA@@DeclareDeprecatedOption,\KOMA@@@DeclareDeprecatedOption} +% \changes{v3.01a}{2008/11/20}{added} +% \begin{macrocode} +%<*koma> +\newcommand*{\KOMA@DeclareDeprecatedOption}{% + \kernel@ifnextchar [%] + {\KOMA@@DeclareDeprecatedOption}% + {\KOMA@@@DeclareDeprecatedOption{\ClassWarningNoLine{\KOMAClassName}}}% +} +\newcommand*{\KOMA@@DeclareDeprecatedOption}[1][]{% + \KOMA@@@DeclareDeprecatedOption{\PackageWarningNoLine{#1}}% +} +\newcommand*{\KOMA@@@DeclareDeprecatedOption}[3]{% + \DeclareOption{#2}{\KOMA@UseDeprecatedOption{#1}{#2}{#3}}% +} +% \end{macrocode} +% \begin{macro}{\KOMA@UseDeprecatedOption} +% \changes{v3.01a}{2008/11/20}{added} +% \changes{v3.12}{2013/03/04}{test to use \opt{version\quotechar=first}} +% \changes{v3.12a}{2014/01/22}{test fixed} +% \changes{v3.22}{2016/07/29}{added several \cs{detokenize}} +% \changes{v3.37}{2022/06/21}{message text ``obsolete'' replaced by +% ``deprecated''} +% One more helper: +% \begin{quote} +% \cs{KOMA@UseDeprecatedOption}\marg{warning command}\marg{classic +% option}\marg{\pkg*{keyval} option} +% \end{quote} +% Note: \meta{warning command} should either be +% |\ClassWarningNoLine{\KOMAClassName}| or +% \cs{PackageWarningNoLine}\marg{package name}. But you could also use +% \cs{ClassInfoNoLine} or \cs{PackageInfoNoLine}. +% \begin{macrocode} +\newcommand*{\KOMA@UseDeprecatedOption}[3]{% + \begingroup + \scr@ifundefinedorrelax{KV@KOMA.\@currname.\@currext @version}{% + \edef\reserved@a{\noexpand\endgroup + \noexpand#1{% + You've used deprecated option `\detokenize{#2}'.\noexpand\MessageBreak + Usage of this option is deprecated.\noexpand\MessageBreak + You should simply replace `\detokenize{#2}'\noexpand\MessageBreak + by `\detokenize{#3}'% + }% + \noexpand\KOMAExecuteOptions{#3}% + \noexpand\def\noexpand\CurrentOption{\CurrentOption}% + }% + }{% + \edef\reserved@a{\noexpand\endgroup + \noexpand#1{% + You've used deprecated option `\detokenize{#2}'.\noexpand\MessageBreak + Usage of this option indicates an old document\noexpand\MessageBreak + and changes compatibility level using\noexpand\MessageBreak + `\detokenize{#3},version=first,\noexpand\MessageBreak + enabledeprecatedfontcommands' that may result\noexpand\MessageBreak + in further warnings.\noexpand\MessageBreak + If you don't want this, you should simply\noexpand\MessageBreak + replace option `\detokenize{#2}' by `\detokenize{#3}'% + }% + \noexpand\KOMAExecuteOptions{% + #3,version=first}% + \noexpand\ExecuteOptions{enabledeprecatedfontcommands}% + \noexpand\def\noexpand\CurrentOption{\CurrentOption}% + }% + }% + \reserved@a +} +% +% \end{macrocode} +% \end{macro}^^A \KOMA@UseDeprecatedOption +% \end{macro}^^A \KOMA@@DeclareDeprecatedOption,\KOMA@@@DeclareDeprecatedOption +% \end{macro}^^A \KOMA@DeclareDeprecatedOption +% +% +% \begin{macro}{\KOMA@DeclareStandardOption} +% \changes{v3.01a}{2008/11/21}{added} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% This is similar to \cs{KOMA@DeclareDeprecatedOption} but is used for +% standard options, which means options known by the standard classes. +% \begin{quote} +% \cs{KOMA@DeclareStandardOption}\oarg{package name}\marg{classic +% option}\marg{\pkg*{keyval} option} +% \end{quote} +% For compatibility these options are not reported as deprecated, but an info +% is added to the \file{log} file about the usage and how it could be replaced +% by a \pkg*{keyval} option. +% \begin{macro}{\KOMA@@DeclareStandardOption,\KOMA@@@DeclareStandardOption, +% \KOMA@UseStandardOption} +% \changes{v3.01a}{2008/11/21}{added} +% \begin{macrocode} +%<*koma> +\newcommand*{\KOMA@DeclareStandardOption}{% + \kernel@ifnextchar [%] + {\KOMA@@DeclareStandardOption}% + {\KOMA@@@DeclareStandardOption{\ClassInfoNoLine{\KOMAClassName}}}% +} +\newcommand*{\KOMA@@DeclareStandardOption}[1][]{% + \KOMA@@@DeclareStandardOption{\PackageInfoNoLine{#1}}% +} +\newcommand*{\KOMA@@@DeclareStandardOption}[3]{% + \DeclareOption{#2}{\KOMA@UseStandardOption{#1}{#2}{#3}}% +} +\newcommand*{\KOMA@UseStandardOption}[3]{% + \begingroup + \edef\reserved@a{\noexpand\endgroup + \noexpand#1{% + You've used standard option `#2'.\noexpand\MessageBreak + This is correct!\noexpand\MessageBreak + Internally I'm using `#3'.\noexpand\MessageBreak + If you'd like to set the option with \string\KOMAoptions,% + \noexpand\MessageBreak + you'd have to use `#3' there\noexpand\MessageBreak + instead of `#2', too% + }% + \noexpand\KOMAExecuteOptions{#3}% + \noexpand\def\noexpand\CurrentOption{\CurrentOption}% + }% + \reserved@a +} +% +% \end{macrocode} +% \begin{macro}{\scr@sr@co} +% \changes{v2.96}{2006/08/20}{added} +% \changes{v3.12a}{2014/01/22}{removed} +% \end{macro}^^A \scr@sr@co +% \end{macro}^^A \KOMA@@@DeclareStandardOption … \KOMA@UseStandardOption +% \end{macro}^^A \KOMA@DeclareStandardOption +% +% +% \begin{macro}{\KOMA@DeclareObsoleteOption} +% \changes{v2.96}{2006/08/20}{\cs{CurrentOption} protected} +% \changes{v3.12}{2013/03/04}{removed} +% \begin{macro}{\KOMA@@DeclareObsoleteOption,\KOMA@@@DeclareObsoleteOption, +% \KOMA@iv@DeclareObsoleteOption,\KOMA@UseObsoleteOption} +% \changes{v2.98c}{2008/02/18}{added} +% \changes{v3.12}{2013/03/04}{removed} +% \end{macro}^^A \KOMA@@DeclareObsoleteOption … \KOMA@UseObsoleteOption +% \end{macro}^^A \KOMA@DeclareObsoleteOption +% +% +% \begin{macro}{\KOMA@newobsoletecommand,\KOMA@newdeprecatedcommand} +% \changes{v3.12}{2013/03/04}{\cs{KOMA@newobsoletecommand} renamed to +% \cs{KOMA@newdeprecatedcommand}} +% Defines a deprecated command or \meta{macro}, represented by a +% \meta{\pkg*{keyval} option}: +% \begin{quote} +% \cs{KOMA@newdeprecatedcommand}\oarg{warning +% command}\marg{macro}\marg{\pkg*{keyval} option} +% \end{quote} +% Note: This can be used only for macros and commands, that behave as a +% selector. Macros or commands with arguments are not supported. +% \begin{macro}{\KOMA@UseDeprecatedCommand,\KOMA@UseDeprecatedCommand} +% \changes{v2.97c}{2007/04/19}{added} +% \changes{v3.12}{2013/03/04}{\cs{KOMA@UseObsoleteCommand} renamed to +% \cs{KOMA@UseDeprecatedCommand}} +% \begin{macrocode} +%<*koma> +\newcommand*{\KOMA@newdeprecatedcommand}[3][\@gobbletwo]{% + \newcommand*{#2}{\KOMA@UseDeprecatedCommand{#1}{\string#2}{#3}}% +} +\newcommand*{\KOMA@UseDeprecatedCommand}[3]{% + #1{% + scrkbase% + }{% + You've used deprecated command `#2'.\MessageBreak + \protect\KOMAoptions{#3} will be used instead.\MessageBreak + You should also replace `#2' by `\protect\KOMAoptions{#3}'% + }% + \KOMAoptions{#3}% +} +% +% \end{macrocode} +% \end{macro}^^A \KOMA@UseDeprecatedCommand +% \end{macro}^^A \KOMA@newdeprecatedcommand +% +% +% \subsection{Do hook mechanism} +% \label{sec:dohook} +% +% \changes{v3.27}{2019/02/02}{Do hook mechanism added} +% From \KOMAScript~v3.27 there is a new general hook mechanism called ``do +% hook mechanism''. This mechanism is mentioned to provide extended hooks for +% package authors. All hooks newly implemented in \KOMAScript{} \emph{should} +% use this new mechanism. +% +% +% \begin{command}{\ForDoHook} +% \changes{v3.27}{2019/02/05}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \changes{v3.30}{2020/03/07}{\cs{loop}\dots\cs{repeat} inside group} +% \changes{v3.30}{2020/03/07}{using \cs{rloop} instead of \cs{loop}} +% Arguments: +% \begin{description} +% \item[\meta{specificator}:] +% \meta{string} or \meta{string}\texttt{/}\meta{specificator} +% \item[\meta{code}:] \LaTeX{} code +% \end{description} +% Executes \meta{code} for earch level of a do-hook. This is a helper command +% normally not interesting for users or package authors. However, I define it +% in the user context to be consistent with the other do-hook commands. Note, +% there will be two arguments appended to the \meta{code}. The first one is +% the name of the hook, the second one the hook argument. +% See \cs{ExecuteDoHook} as an example. +% \begin{macrocode} +%<*base> +\newcommand*{\ForDoHook}[2]{% + \Ifstr{#1}{}{% + \PackageError{scrbase}{empty do-hook specificator}{% + You've tried to use an empty do-hook specificator,\MessageBreak + but do-hook specificators must not be empty.% + }% + }{% + \begingroup + \def\scr@hookrun{\endgroup}% + \let\scr@hookname\relax + \edef\scr@hookargument{#1}% + \rloop + \scr@hooksplit@specificator\scr@hookname\scr@hookargument + \scr@hookargument + \edef\scr@hookrun{% + \unexpanded\expandafter{\scr@hookrun}% + \unexpanded{#2}{\scr@hookname}{\scr@hookargument}% + }% + \ifx\scr@hookargument\@empty\else + \repeat + \scr@hookrun + }% +} +% \end{macrocode} +% \begin{command}{\SplitDoHook} +% \changes{v3.27}{2019/02/04}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% Arguments: +% \begin{description} +% \item[\meta{specificator}:] +% \meta{string} or \meta{string}\texttt{/}\meta{specificator} +% \item[\meta{prefix command}:] \LaTeX{} macro +% \item[\meta{postfix command}:] \LaTeX{} macro +% \end{description} +% Splits of the \emph{last} element of the \meta{specificator}. The +% \meta{postfix command} is defined to be that last element, the \meta{prefix +% command} is defined to be the rest. +% \begin{macrocode} +\newcommand*{\SplitDoHook}[3]{% + \Ifstr{#1}{}{% + \PackageWarning{scrbase}{empty do-hook specificator}% + \let#2\@empty\let#3\@empty + }{% + \let#2\relax + \edef\reserved@a{% + \unexpanded{\scr@hooksplit@specificator{#2}{#3}}{#1}% + }\reserved@a + }% +} +% \end{macrocode} +% \begin{macro}{\scr@hooksplit@specificator} +% \changes{v3.27}{2019/02/02}{added} +% Split of the first string of the specificator argument, append it to +% \cs{scr@hookname} and store the rest in \cs{scr@hookargument}. The argument +% must not be empty! +% \begin{macro}{\scr@@hooksplit@specificator} +% \changes{v3.27}{2019/02/02}{added} +% \begin{macrocode} +\newcommand*{\scr@hooksplit@specificator}[3]{% + \expandafter\scr@@hooksplit@specificator\expandafter#1\expandafter#2#3/\@nil +} +\newcommand*{\scr@@hooksplit@specificator}{} +\def\scr@@hooksplit@specificator#1#2#3/#4\@nil{% + \scr@ifundefinedorrelax{scr@hookname}{\def#1{#3}}{% + \edef#1{#1/#3}% + }% + \def#2{#4}% + \ifx#2\@empty\else \scr@@hookargument#2#4\@nil\fi +} +\newcommand*{\scr@@hookargument}{} +\def\scr@@hookargument#1#2/\@nil{\def#1{#2}}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{command} +% \end{command} +% +% \begin{command}{\ExecuteDoHook} +% \changes{v3.27}{2019/02/02}{added} +% Arguments: +% \begin{description} +% \item[\meta{specificator}:] +% \meta{string} or \meta{string}\texttt{/}\meta{specificator} +% \end{description} +% Each string of the \meta{specificator} defines a hook subgroup. The +% execution is done in a loop, first all hook elements of the first +% \meta{string} of the \meta{specificator} are executed with the rest of the +% \meta{specificator} as an argument. Then the hook elements of the +% composition of the first and the second \meta{string} are executed again +% with the rest of the \meta{specificator} as an agument and so on until the +% hook elements of the whole \meta{specificator} has been executed with an +% empty argument. So every hook element has to expect an argument that is +% itself a \meta{specificator}. At each loop level the one-time hooks +% are executed after the permanent hooks. +% \begin{macrocode} +\newcommand*{\ExecuteDoHook}[1]{% + \@ifundefined{scr@execute@dohook}{% + \def\scr@execute@dohook##1##2{% + \def\scr@hook@do####1{####1{##2}}% + \@nameuse{scr@dohook@##1}% + \@nameuse{scr@otdohook@##1}% + \expandafter\global\expandafter\let + \csname scr@otdohook@##1\endcsname\@empty + \let\scr@hook@do\relax + }% + \ForDoHook{#1}{\scr@execute@dohook}% + \let\scr@execute@dohook\relax + }{% + \PackageWarning{scrbase}{cascaded do-hook detected.\MessageBreak + It seems, that the do-hook `\detokenize{#1}'\MessageBreak + is be executed, while another do-hook is active.\MessageBreak + This is not allowed and therefore ignored% + }% + }% +} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\AddtoDoHook} +% \changes{v3.27}{2019/02/02}{added} +% Arguments: +% \begin{description} +% \item[\meta{specificator}:] +% \meta{string} or \meta{string}\texttt{/}\meta{specificator} +% \item[\meta{element}:] +% a \LaTeX command, that expects exactly one argument. +% \end{description} +% For the \meta{specificator} see \cs{ExecuteDoHook}. Here you can add an +% \meta{element} to a hook defined by the \meta{specificator}. Adding a hook +% is local to the current group. +% \begin{macrocode} +\newcommand*{\AddtoDoHook}[2]{% + \Ifstr{#1}{}{% + \PackageError{scrbase}{empty hook specificator}{% + As hook specificators can never be empty, the first argument\MessageBreak + of \string\AddtoDoHook\space must expand to an not empty string.% + }% + }{% + \scr@ifundefinedorrelax{scr@dohook@#1}{\@namedef{scr@dohook@#1}{}}{}% + \expandafter\l@addto@macro\csname scr@dohook@#1\endcsname{% + \scr@hook@do{#2}% + }% + }% +} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\AddtoOneTimeDoHook} +% \changes{v3.27}{2019/02/02}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% Arguments: +% \begin{description} +% \item[\meta{specificator}:] +% \meta{string} or \meta{string}\texttt{/}\meta{specificator} +% \item[\meta{element}:] +% a \LaTeX command, that expects exactly one argument. +% \end{description} +% This is almost the same as \cs{AddtoDoHook} but a hook added by this command +% is executed only once. +% \begin{macrocode} +\newcommand*{\AddtoOneTimeDoHook}[2]{% + \Ifstr{#1}{}{% + \PackageError{scrbase}{empty hook specificator}{% + As hook specificators can never be empty, the first argument\MessageBreak + of \string\AddtoDoHook\space must expand to an not empty string.% + }% + }{% + \scr@ifundefinedorrelax{scr@otdohook@#1}{\@namedef{scr@otdohook@#1}{}}{}% + \expandafter\l@addto@macro\csname scr@otdohook@#1\endcsname{% + \scr@hook@do{#2}% + }% + }% +} +% +% +% \end{macrocode} +% \end{command} +% +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrkernel-bibliography.dtx b/macros/latex/contrib/koma-script/scrkernel-bibliography.dtx new file mode 100644 index 0000000000..17b9b610bd --- /dev/null +++ b/macros/latex/contrib/koma-script/scrkernel-bibliography.dtx @@ -0,0 +1,746 @@ +% \iffalse meta-comment +% ====================================================================== +% scrkernel-bibliography.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrkernel-bibliography.dtx 3874 2022-06-05 10:38:02Z kohm $ +%

\bibliography@heading{\refname}% +% \bibliography@heading{\bibname}% +} +\newcommand*{\bibliography@heading}[1]{% + \ifbib@leveldown +%
\subsection*{#1}% +% \section*{#1}% +% \addsecmark{#1}% +%<*article> + \begingroup + \c@secnumdepth=-\maxdimen + \subsectionmark{#1}% + \endgroup +%
+ \else +%
\section*{#1}% +% \chapter*{#1}% + \@mkdouble{\MakeMarkcase{#1}}% + \fi +}% +% \end{macrocode} +% \end{macro}^^A \bibliography@heading +% \end{macro}^^A \bib@heading +% +% +% \subsection{Options} +% +% \begin{option}{bibliography} +% \changes{v2.98c}{2008/02/15}{added} +% \changes{v3.10}{2011/08/31}{using \cs{MakeMarkcase}} +% \changes{v3.12}{2013/02/06}{new value \opt{leveldown}} +% \changes{v3.12}{2013/02/06}{new value \opt{standardlevel}} +% \changes{v3.12}{2013/03/05}{adapted to changes of \pkg*{scrbase}} +% \changes{v3.12}{2013/09/28}{using \cs{addxcontentsline} instead of +% \cs{addcontentsline}} +% \changes{v3.12}{2013/09/28}{do not write chapter entries to other directories} +% \changes{v3.17}{2015/03/12}{using internal value storage} +% \changes{v3.25}{2017/10/13}{using always \cs{@mkright} and \cs{@mkdouble}} +% \changes{v3.25}{2017/10/13}{redefining \cs{bibliography@heading} instead of +% \cs{bib@heading}} +% \KOMAScript provides several configurations for the bibliography or +% references using a single option. +% \begin{macro}{\bib@leveldownfalse,\bib@leveldowntrue,\ifbib@leveldown} +% \changes{v3.12}{2013/02/06}{added} +% The boolean \cs{ifbib@leveldown} is used to allow the +% bibliography/references have a lower heading level. +% \begin{macrocode} +\newif\ifbib@leveldown +% \end{macrocode} +% \end{macro} +% The supported values for option \opt{bibliography} are: +% \begin{macrocode} +\KOMA@key{bibliography}{% + \scr@ifundefinedorrelax{scr@bibstyle@#1}{% + \KOMA@set@ncmdkey{bibliography}{@tempa}{% +% \end{macrocode} +% \begin{description} +% \item[\opt{=notoc}:] (default) don't add the bibliography/references to the +% table of contents. +% \end{description} +% \begin{macrocode} + {notoc}{0},{nottotoc}{0},{plainheading}{0},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=totoc}:] add the bibliography/references to the table of +% contents, but do not number it. +% \end{description} +% \begin{macrocode} + {totoc}{1},{toc}{1},{notnumbered}{1},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=numbered}:] number the bibliography/references and so also add +% it to the table of contents. +% \end{description} +% \begin{macrocode} + {numbered}{2},{totocnumbered}{2},{tocnumbered}{2},{numberedtotoc}{2},% + {numberedtoc}{2},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=leveldown}:] don't use the top heading level (chapters with +% \cls*{scrbook} or \cls*{scrreprt}, sections with \cs*{scrartcl}) but one +% level lower (sections with \cls*{scrbook} or \cls*{scrreprt}, subsection +% with \cs*{scrartcl}) for the bibliography/references. +% \end{description} +% \begin{macrocode} + {leveldown}{3},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=standardlevel}:] use the top heading level (chapters with +% \cls*{scrbook} or \cls*{scrreprt}, sections with \cs*{scrartcl}) for the +% bibliography/references. +% \end{description} +% \begin{macrocode} + {standardlevel}{4}% + }{#1}% + \ifcase \@tempa\relax % notoc + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nobibliography}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliography}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliographynumbered}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{nobibliography}% + \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{notoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{totoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{numbered}% + \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{notoc}% + \renewcommand*{\bibliography@heading}[1]{% + \ifbib@leveldown +%
\subsection*{##1}% +% \section*{##1}% + \@mkright{\MakeMarkcase{##1}}% + \else +%
\section*{##1}% +% \chapter*{##1}% + \@mkdouble{\MakeMarkcase{##1}}% + \fi + }% + \or% totoc + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nobibliography}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliography}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliographynumbered}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{bibliography}% + \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{notoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{totoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{numbered}% + \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{totoc}% + \renewcommand*{\bibliography@heading}[1]{% +%<*article> + \ifbib@leveldown +% \end{macrocode} +% \changes{v3.23}{2017/02/23}{using \cs{ext@toc}} +% \changes{v3.25}{2017/10/13}{using \cs{addsubsectiontocentry} instead of +% \cs{addxcontentsline}} +% From version 3.23 \cs{ext@toc} of \pkg*{tocbasic} is used instead of hard +% coded |toc|. +% \begin{macrocode} + \subsection*{% + \addsubsectiontocentry{}{##1}% + ##1% + }% + \@mkright{\MakeMarkcase{##1}}% + \else + \addsec{##1}% + \@mkdouble{\MakeMarkcase{##1}}% + \fi +%
+%<*book|report> + \ifbib@leveldown + \addsec{##1}% + \else + \if@chaptertolists + \@chaptertolistsfalse\addchap{##1}\@chaptertoliststrue + \else + \addchap{##1}% + \fi + \@mkdouble{\MakeMarkcase{##1}}% + \fi +%
+ }% + \or% numbered + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nobibliography}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliography}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliographynumbered}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{bibliographynumbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{notoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{totoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{numbered}% + \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{numbered}% + \renewcommand*{\bibliography@heading}[1]{% +%<*article> + \ifbib@leveldown + \subsection{##1}% + \else + \section{##1}% + \@mkdouble{\MakeMarkcase{\sectionmarkformat ##1}}% + \fi +%
+%<*book|report> + \ifbib@leveldown + \section{##1}% + \else + \if@chaptertolists + \@chaptertolistsfalse\chapter{##1}\@chaptertoliststrue + \else + \chapter{##1} + \fi + \@mkdouble{\MakeMarkcase{\chaptermarkformat ##1}}% + \fi +%
+ } + \or% leveldown + \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{leveldown}% + \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{standardlevel}% + \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{leveldown}% + \bib@leveldowntrue + \or% standardlevel + \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{leveldown}% + \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{standardlevel}% + \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{standardlevel}% + \bib@leveldownfalse + \fi + }{% +% \end{macrocode} +% \begin{description} +% \item[\opt{=\meta{style}}:] all other values are names of styles. +% \begin{description} +% \item[ToDo:] Here we should test for valid style names and report an +% unknown value for unknown styles. +% \end{description} +% \end{description} +% \begin{macrocode} + \FamilyKeyStateProcessed + \edef\reserved@a{% + \noexpand\KOMA@kav@remove{.\KOMAClassFileName}{bibliography}% + {\scr@current@bibstyle}% + }\reserved@a + \csname scr@bibstyle@#1\endcsname + }% +} +% \end{macrocode} +% \end{option} +% +% \begin{option}{openbib} +% \begin{macro}{\@openbibfalse,\@openbibtrue,\if@openbib} +% \changes{v2.3g}{1996/01/14}{removed} +% \end{macro} +% \changes{v2.3g}{1996/01/14}{re-implemented} +% \changes{v2.98c}{2008/02/15}{obsolete} +% \changes{v3.01a}{2008/11/21}{standard instead of obsolete} +% The standard option \opt{openbib} is mapped to \opt{bibliography=openstyle}. +% \begin{macrocode} +\KOMA@DeclareStandardOption{openbib}{bibliography=openstyle} +% \end{macrocode} +% \end{option} +% +% \begin{option}{bibtotoc} +% \changes{v2.3h}{1995/01/21}{added} +% \changes{v2.6b}{2000/05/26}{\cs{@mkboth} added} +% \changes{v2.6c}{2000/06/10}{\cs{bibpreamble} added} +% \changes{v2.7}{2001/01/03}{braces fixed} +% \changes{v2.7j}{2001/06/27}{preamble printing moved to \env{thebibliography}} +% \changes{v2.98c}{2008/02/15}{obsolete} +% \changes{v3.01a}{2008/11/20}{deprecated} +% \begin{option}{bibtotocnumbered} +% \changes{v2.3h}{1995/01/21}{added} +% \changes{v2.6b}{2000/05/26}{\cs{@mkboth} added} +% \changes{v2.6c}{2000/06/10}{\cs{bibpreamble} added} +% \changes{v2.7}{2001/01/03}{braces fixed} +% \changes{v2.7b}{2001/01/05}{using \cs{setchapterpreamble}} +% \changes{v2.7i}{2001/05/17}{\cs{chapter} instead of \cs{addchap}} +% \changes{v2.7j}{2001/06/27}{preamble printing moved to \env{thebibliography}} +% \changes{v2.9p}{2003/07/07}{number in running head} +% \changes{v2.98c}{2008/02/15}{obsolete} +% \changes{v3.01a}{2008/11/20}{deprecated} +% Deprecated options \opt{bibtotoc} and \opt{bibtotocnumbered} are mapped to +% \opt{bibliography=totoc} resp. \opt{bibliography=totocnumbered}. +% \begin{macrocode} +\KOMA@DeclareDeprecatedOption{bibtotoc}{bibliography=totoc} +\KOMA@DeclareDeprecatedOption{bibtotocnumbered}{bibliography=totocnumbered} +% +% \end{macrocode} +% \end{option}^^A bibtotocnumbered +% \end{option}^^A bibtotoc +% +% +% \subsection{Names} +% +% \begin{command}{\refname,\bibname} +% \changes{v3.36}{2022/02/15}{explicit definition for English languages} +% Depending on the class either \cs{refname} or \cs{bibname} is used. +% \begin{macrocode} +%<*body> +%<*article> +\newcommand*\refname{References} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\refname{References} +%
+%<*book|report> +\newcommand*\bibname{Bibliography} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\bibname{Bibliography} +%
+% \end{macrocode} +% \end{command} +% +% +% \subsection{Printing the bibliography or references} +% +% \begin{command}{\setbibpreamble} +% \changes{v2.6c}{2000/06/10}{added} +% \changes{v2.7j}{2001/05/27}{\cs{renewcommand} replaced by \cs{def} for +% better \pkg{natbib} compatibility} +% \begin{macro}{\bibpreamble} +% \changes{v2.6c}{2000/06/10}{neue (intern)} +% \changes{v2.6d}{2000/07/20}{\cs{let} replaced by \cs{newcommand*}} +% \changes{v2.8q}{2002/01/10}{\cs{newcommand*} replaced by \cs{let}} +% \changes{v2.7j}{2001/05/27}{preamble printing moved to \env{thebibliography}} +% \cs{bibpreamble} should be interpreted as an internal macro. The user +% command name space has been used for compatibility with \pkg{natbib} +% only. The official \KOMAScript{} user interface is using +% \begin{quote} +% \cs{setbibpreamble}\marg{preamble} +% \end{quote} +% Also for compatibility \cs{bibpreamble} is not set by \cs{bib@heading} but +% inside environment \env{theenvironment}. +% \begin{macrocode} +\newcommand*{\bibpreamble}{\relax} +\let\bibpreamble\relax +\newcommand{\setbibpreamble}[1]{\def\bibpreamble{#1}} +% \end{macrocode} +% \end{macro}^^A \bibpreamble +% \end{command}^^A \setbibpreamble +% +% \begin{length}{bibindent} +% The indent of entries with option \opt{bibliography=openstyle}. Default is 1.5\,em. +% \begin{macrocode} +\newdimen\bibindent +\bibindent=1.5em +% \end{macrocode} +% \end{length} +% +% \begin{environment}{thebibliography} +% \changes{v2.2a}{1995/02/01}{for \cls*{scrartcl} \cs{bibname} replaced by +% \cs{refname}} +% \changes{v2.3h}{1995/01/21}{using \cs{bib@heading}} +% \changes{v2.8q}{2002/01/10}{handling empty preamble} +% \changes{v2.9o}{2003/03/06}{fix of comparing \cs{bibpreamble} with \cs{@empty}} +% \changes{v2.98c}{2008/02/15}{new hooks \cs{bib@before@hook} and +% \cs{bib@after@hook}} +% This environment is used to print the bibliography or references. Note: This +% environment is redefined by almost all bibliography packages like +% \pkg{natbib} or \pkg{biblatex}. No one of these supports all features of +% \KOMAScript{}. So if such a package is used, users should consult the +% package manual instead of using a \KOMAScript{} feature. +% \begin{macrocode} +\newenvironment{thebibliography}[1]{% + \if@bib@break@ + \bib@beginhook + \else +%<*book|report> + \ifx\bibpreamble\relax\else\ifx\bibpreamble\@empty\else + \setchapterpreamble{\bibpreamble}% + \fi\fi +% + \bib@heading +%<*article> + \ifx\bibpreamble\relax\else\ifx\bibpreamble\@empty\else + \noindent\bibpreamble\par\nobreak + \fi\fi +%
+ \bib@beginhook + \bib@before@hook + \fi +% \end{macrocode} +% \begin{command}{\BreakBibliography} +% \changes{v2.98c}{2008/02/15}{added} +% Redefining \cs{BreakBibliography} to work with our definition of +% \env{thebibliography}. +% \begin{macrocode} + \renewcommand{\BreakBibliography}[1]{% + \@bib@break + \end{thebibliography}% + \begingroup ##1\endgroup + \begin{thebibliography}{#1} + }% +% \end{macrocode} +% \end{command} +% \begin{macrocode} +% Start the list for the entries. + \list{% + \@biblabel{\@arabic\c@enumiv}% + }{% + \settowidth\labelwidth{\@biblabel{#1}}% + \leftmargin\labelwidth + \advance\leftmargin\labelsep + \@openbib@code + \if@bib@break@ + \edef\@tempa{% + \noexpand\usecounter{enumiv}% + \noexpand\setcounter{enumiv}{\the\c@enumiv}% + }\@tempa + \no@bib@break + \else + \usecounter{enumiv}% + \fi + \let\p@enumiv\@empty + \renewcommand*\theenumiv{\@arabic\c@enumiv}% + }% + \sloppy\clubpenalty4000 \widowpenalty4000 + \sfcode`\.=\@m +}{% + \if@bib@break@ + \def\@noitemerr{% + \@latex@warning{% + \string\BreakBibliography\space at begin of `thebibliography' + environment\MessageBreak + or following \string\BreakBibliography}% + }% + \else + \def\@noitemerr{% + \@latex@warning{% + Empty `thebibliography' environment or + \string\BreakBibliography\MessageBreak + before end of `thebibliography' environment}% + }% + \fi + \endlist + \if@bib@break@ + \else + \bib@after@hook + \let\bib@before@hook\@empty + \let\bib@after@hook\@empty + \fi + \bib@endhook +} +% \end{macrocode} +% \begin{macro}{\if@bib@break@,\no@bib@break,\@bib@break} +% \changes{v2.98c}{2008/02/15}{added} +% To be used as global switch. +% \begin{description} +% \item[ToDo:] Maybe redefine \cs{@bib@break@true} and \cs{@bib@break@false}. +% \end{description} +% \begin{macrocode} +\newif\if@bib@break@ +\newcommand{\no@bib@break}{\global\let\if@bib@break@\iffalse} +\newcommand*{\@bib@break}{\global\let\if@bib@break@\iftrue} +% \end{macrocode} +% \end{macro}^^A \if@bib@break@,\no@bib@break,\@bib@break +% \begin{macro}{\bib@before@hook,\bib@after@hook} +% \changes{v2.98c}{2008/02/15}{added} +% \begin{macrocode} +\newcommand*{\bib@before@hook}{} +\newcommand*{\bib@after@hook}{} +% \end{macrocode} +% \end{macro}^^A \bib@before@hook,\bib@after@hook +% \end{environment}^^A thebibliography +% +% \begin{command}{\BreakBibliography} +% \changes{v2.98c}{2008/02/15}{added} +% The initial definition is a do nothing but warn, because the command makes +% sense only inside \env{thebibliography}. +% \begin{macrocode} +\newcommand{\BreakBibliography}[1]{% + \ClassWarning{\KOMAClassName}{% + You've used \string\BreakBibliography\space either outside of\MessageBreak + the bibliography or `thebibliography' was redefined\MessageBreak + incompatible, e.g., using a bibliography package.\MessageBreak + \string\BreakBibliography\space ignored% + }% +} +% \end{macrocode} +% \end{command}^^A \BreakBibliography +% +% \begin{command}{\AfterBibliographyPreamble,\AtEndBibliography} +% \changes{v2.98c}{2008/02/15}{added} +% Add code to the two new hooks inside our definition of +% \env{thebibliography}. So any bibliography package can break this +% functionality. +% Note: The hooks are always emptied by selecting a style using +% \opt{bibliography=\meta{style name}}. +% \begin{macrocode} +\newcommand{\AfterBibliographyPreamble}{\g@addto@macro\bib@before@hook} +\newcommand{\AtEndBibliography}{\g@addto@macro\bib@after@hook} +% +% \end{macrocode} +% \end{command} +% +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrkernel-compatibility.dtx b/macros/latex/contrib/koma-script/scrkernel-compatibility.dtx new file mode 100644 index 0000000000..104f9727f8 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrkernel-compatibility.dtx @@ -0,0 +1,759 @@ +% \iffalse meta-comment +% ====================================================================== +% scrkernel-compatibility.dtx +% Copyright (c) Markus Kohm, 2006-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrkernel-compatibility.dtx 3896 2022-06-21 09:06:07Z kohm $ +%%%% (run: identify) +%%%% (run: init) +% +%<*option> +\KOMA@key{version}[last]{% + \scr@ifundefinedorrelax{scr@v@#1}{% + \def\scr@compatibility{0}% +% \ClassWarningNoLine{\KOMAClassName}{% +%<*package> + \PackageWarningNoLine{% +% scrextend% +% typearea% +% scrletter% + }{% +% + You have set option `version' to value `#1', but\MessageBreak + this value of version is not supported.\MessageBreak + Because of this, version was set to `first'% + }% + \FamilyKeyStateProcessed + \KOMA@kav@replacevalue{.% +% \KOMAClassFileName +% scrextend.\scr@pkgextension +% typearea.\scr@pkgextension +% scrletter.\scr@pkgextension + }{version}{first}% + }{% +% \ClassInfoNoLine{\KOMAClassName}{% +%<*package> + \PackageInfoNoLine{% +% scrextend% +% typearea% +% scrletter% + }{% +% + Switching compatibility level to `#1'% + }% +% \edef\scr@compatibility{\@nameuse{scr@v@#1}}% +% \edef\scr@ta@compatibility{\@nameuse{scr@v@#1}}% + \FamilyKeyStateProcessed + \KOMA@kav@xreplacevalue{.% +% \KOMAClassFileName +% scrextend.\scr@pkgextension +% typearea.\scr@pkgextension +% scrletter.\scr@pkgextension + }{version}{#1}% + \ifnum\scr@compatibility<\scr@v@last +% \ClassWarningNoLine{\KOMAClassName}{% +%<*package> + \PackageWarningNoLine{% +% scrextend% +% typearea% +% scrletter% + }{% +% + Switching back to an old KOMA-Script release does\MessageBreak + not mean, that KOMA-Script is fully compatible with\MessageBreak + the old release. If you need full compatibility\MessageBreak + to an old KOMA-Script release, you should use that\MessageBreak + old KOMA-Script release. However, in that case you\MessageBreak + could also need old releases of other packages and\MessageBreak + even of the LaTeX kernel.\MessageBreak + You should also note, that the KOMA-Script developers\MessageBreak + refuse support for documents using `version=#1'.\MessageBreak + We recommend to eliminate all deprecated options\MessageBreak + and commands. We also recommend to not use option\MessageBreak + `version', i.e., with other values than `last'% + }% + \fi + }% +} +%\KOMA@kav@add{.\KOMAClassFileName}{version}{last} +% \end{macrocode} +% We do not use \cs{FamilyKeyState} if the option is set to late, but +% immediately report an error. +% \begin{macrocode} +%\AtEndOfClass{% +%\AtEndOfPackage{% + \KOMA@key{version}[]{% +% \ClassError{\KOMAClassName}{% +%<*package> + \PackageError{% +% scrextend% +% typearea% +% scrletter% + }{% +% + Option `version' too late% + }{% + Option `version' may be set only while loading the +% class.\MessageBreak +% package.\MessageBreak + But you've tried to set it up later.% + }% + \FamilyKeyStateProcessed + }% +} +% +% \end{macrocode} +% +% \begin{macrocode} +%<*init> +% \end{macrocode} +% \begin{macro}{\scr@v@first} +% \changes{v2.9u}{2005/03/05}{added} +% \begin{macro}{\scr@v@2.9} +% \changes{v2.9u}{2005/03/05}{added} +% \begin{macro}{\scr@v@2.9t} +% \changes{v2.9u}{2005/03/05}{added} +% \begin{macro}{\scr@v@2.95} +% \changes{v2.95}{2006/03/23}{added} +% \begin{macro}{\scr@v@2.95a} +% \changes{v2.96a}{2006/11/27}{added} +% \begin{macro}{\scr@v@2.95b} +% \changes{v2.96a}{2006/11/27}{added} +% \begin{macro}{\scr@v@2.96} +% \changes{v2.96a}{2006/11/27}{added} +% \begin{macro}{\scr@v@2.96a} +% \changes{v2.96a}{2006/11/27}{added} +% \begin{macro}{\scr@v@2.97} +% \changes{v2.97}{2007/03/02}{added} +% \begin{macro}{\scr@v@2.97a} +% \changes{v2.97a}{2007/03/07}{added} +% \begin{macro}{\scr@v@2.97b} +% \changes{v2.97b}{2007/03/25}{added} +% \begin{macro}{\scr@v@2.97c} +% \changes{v2.97c}{2007/05/12}{added} +% \changes{v2.97d}{2007/10/09}{Wert geändert}%^^A +% \begin{macro}{\scr@v@2.97d} +% \changes{v2.97d}{2007/10/03}{added} +% \changes{v2.97d}{2007/10/09}{Wert geändert}%^^A +% \begin{macro}{\scr@v@2.97e} +% \changes{v2.97e}{2007/11/27}{added} +% \begin{macro}{\scr@v@2.98} +% \changes{v2.98}{2007/12/24}{added} +% \begin{macro}{\scr@v@2.98a} +% \changes{v2.98a}{2008/01/08}{added} +% \begin{macro}{\scr@v@2.98b} +% \changes{v2.98b}{2008/01/30}{added} +% \begin{macro}{\scr@v@2.98c} +% \changes{v2.98c}{2008/02/01}{added} +% \begin{macro}{\scr@v@3.00} +% \changes{v3.00}{2008/11/04}{added} +% \begin{macro}{\scr@v@3.01} +% \changes{v3.01}{2008/11/14}{added} +% \begin{macro}{\scr@v@3.01a} +% \changes{v3.01a}{2008/11/20}{added} +% \begin{macro}{\scr@v@3.01b} +% \changes{v3.01b}{2008/11/24}{added} +% \begin{macro}{\scr@v@3.01c} +% \changes{v3.01c}{2008/12/09}{added} +% \begin{macro}{\scr@v@3.02} +% \changes{v3.02}{2009/01/01}{added} +% \begin{macro}{\scr@v@3.02b} +% \changes{v3.02b}{2009/01/24}{added} +% \begin{macro}{\scr@v@3.02c} +% \changes{v3.02c}{2009/01/28}{added} +% \begin{macro}{\scr@v@3.03} +% \changes{v3.03}{2009/04/01}{added} +% \begin{macro}{\scr@v@3.03a} +% \changes{v3.03a}{2009/04/02}{added} +% \begin{macro}{\scr@v@3.03b} +% \changes{v3.03b}{2009/04/12}{added} +% \begin{macro}{\scr@v@3.04} +% \changes{v3.04}{2009/07/07}{added} +% \begin{macro}{\scr@v@3.05} +% \changes{v3.05}{2009/07/08}{added} +% \begin{macro}{\scr@v@3.04a} +% \changes{v3.04a}{2009/07/24}{added} +% \begin{macro}{\scr@v@3.05a} +% \changes{v3.05a}{2010/03/10}{added} +% \begin{macro}{\scr@v@3.06} +% \changes{v3.06}{2010/06/17}{added} +% \begin{macro}{\scr@v@3.07} +% \changes{v3.07}{2010/09/14}{added} +% \begin{macro}{\scr@v@3.08} +% \changes{v3.08}{2010/10/28}{added} +% \begin{macro}{\scr@v@3.08a} +% \changes{v3.08a}{2011/01/25}{added} +% \begin{macro}{\scr@v@3.08b} +% \changes{v3.08b}{2011/02/22}{added} +% \begin{macro}{\scr@v@3.09} +% \changes{v3.09}{2011/04/02}{added} +% \begin{macro}{\scr@v@3.09a} +% \changes{v3.09a}{2011/04/12}{added} +% \begin{macro}{\scr@v@3.10} +% \changes{v3.10}{2011/08/30}{added} +% \begin{macro}{\scr@v@3.10a} +% \changes{v3.10a}{2012/03/08}{added} +% \begin{macro}{\scr@v@3.10b} +% \changes{v3.10b}{2012/03/13}{added} +% \begin{macro}{\scr@v@3.11} +% \changes{v3.11}{2012/05/15}{added} +% \begin{macro}{\scr@v@3.11a} +% \changes{v3.11a}{2012/05/25}{added} +% \begin{macro}{\scr@v@3.11b} +% \changes{v3.11b}{2012/07/29}{added} +% \begin{macro}{\scr@v@3.12} +% \changes{v3.12}{2013/03/05}{added} +% \begin{macro}{\scr@v@3.13} +% \changes{v3.13}{2014/03/19}{added} +% \begin{macro}{\scr@v@3.13a} +% \changes{v3.13a}{2014/08/07}{added} +% \begin{macro}{\scr@v@3.14} +% \changes{v3.14}{2014/10/28}{added} +% \begin{macro}{\scr@v@3.15} +% \changes{v3.15}{2014/11/20}{added} +% \begin{macro}{\scr@v@3.16} +% \changes{v3.16}{2015/02/08}{added} +% \begin{macro}{\scr@v@3.17} +% \changes{v3.17}{2015/02/08}{added} +% \begin{macro}{\scr@v@3.17a} +% \changes{v3.17a}{2015/05/06}{added} +% \begin{macro}{\scr@v@3.17c} +% \changes{v3.17c}{2015/05/13}{added} +% \begin{macro}{\scr@v@3.18} +% \changes{v3.18}{2015/05/14}{added} +% \begin{macro}{\scr@v@3.18a} +% \changes{v3.18a}{2015/07/03}{added} +% \begin{macro}{\scr@v@3.19} +% \changes{v3.19}{2015/07/26}{added} +% \begin{macro}{\scr@v@3.19a} +% \changes{v3.19a}{2015/10/03}{added} +% \begin{macro}{\scr@v@3.20} +% \changes{v3.20}{2015/10/06}{added} +% \begin{macro}{\scr@v@3.21} +% \changes{v3.21}{2016/05/19}{added} +% \begin{macro}{\scr@v@3.22} +% \changes{v3.22}{2016/07/29}{added} +% \begin{macro}{\scr@v@3.23} +% \changes{v3.23}{2017/02/04}{added} +% \begin{macro}{\scr@v@3.23} +% \changes{v3.24}{2017/04/22}{added} +% \begin{macro}{\scr@v@3.25} +% \changes{v3.25}{2017/09/07}{added} +% \begin{macro}{\scr@v@3.26} +% \changes{v3.26}{2018/03/31}{added} +% \begin{macro}{\scr@v@3.26a} +% \changes{v3.26a}{2018/12/30}{added} +% \begin{macro}{\scr@v@3.26b} +% \changes{v3.26b}{2018/12/30}{added} +% \begin{macro}{\scr@v@3.27} +% \changes{v3.27}{2019/02/02}{added} +% \begin{macro}{\scr@v@3.27a} +% \changes{v3.27a}{2019/10/13}{added} +% \begin{macro}{\scr@v@3.28} +% \changes{v3.28}{2019/11/20}{added} +% \begin{macro}{\scr@v@3.29} +% \changes{v3.29}{2020/01/06}{added} +% \begin{macro}{\scr@v@3.30} +% \changes{v3.30}{2020/02/24}{added} +% \begin{macro}{\scr@v@3.31} +% \changes{v3.31}{2020/04/26}{added} +% \begin{macro}{\scr@v@3.32} +% \changes{v3.32}{2020/08/06}{added} +% \begin{macro}{\scr@v@3.33} +% \changes{v3.33}{2021/01/01}{added} +% \begin{macro}{\scr@v@3.34} +% \changes{v3.34}{2021/03/22}{added} +% \begin{macro}{\scr@v@3.35} +% \changes{v3.35}{2021/10/12}{added} +% \begin{macro}{\scr@v@3.36} +% \changes{v3.36}{2021/11/17}{added} +% \begin{macro}{\scr@v@3.37 BETA} +% \changes{v3.37 BETA}{2022/05/04}{added} +% \begin{macro}{\scr@v@last} +% \changes{v2.9u}{2005/03/05}{added} +% Nun die unterschiedlichen möglichen Werte (|\scr@v@last| ist jeweils die +% höchste vorhandene Nummer): +% \begin{macrocode} +\@namedef{scr@v@first}{0} +\@namedef{scr@v@2.9}{0} +\@namedef{scr@v@2.9t}{0} +\@namedef{scr@v@2.9u}{1} +\@namedef{scr@v@2.95}{2} +\@namedef{scr@v@2.95a}{2} +\@namedef{scr@v@2.95b}{2} +\@namedef{scr@v@2.96}{2} +\@namedef{scr@v@2.96a}{3} +\@namedef{scr@v@2.97}{3} +\@namedef{scr@v@2.97a}{3} +\@namedef{scr@v@2.97b}{3} +\@namedef{scr@v@2.97c}{4} +\@namedef{scr@v@2.97d}{5} +\@namedef{scr@v@2.97e}{6} +\@namedef{scr@v@2.98}{6} +\@namedef{scr@v@2.98a}{6} +\@namedef{scr@v@2.98b}{6} +\@namedef{scr@v@2.98c}{7} +\@namedef{scr@v@3.00}{8} +\@namedef{scr@v@3.01}{8} +\@namedef{scr@v@3.01a}{8} +\@namedef{scr@v@3.01b}{9} +\@namedef{scr@v@3.01c}{9} +\@namedef{scr@v@3.02}{9} +\@namedef{scr@v@3.02b}{9} +\@namedef{scr@v@3.02c}{10} +\@namedef{scr@v@3.03}{10} +\@namedef{scr@v@3.03a}{10} +\@namedef{scr@v@3.03b}{10} +\@namedef{scr@v@3.04}{10} +\@namedef{scr@v@3.04a}{10} +\@namedef{scr@v@3.05}{10} +\@namedef{scr@v@3.05a}{10} +\@namedef{scr@v@3.06}{10} +\@namedef{scr@v@3.07}{10} +\@namedef{scr@v@3.08}{10} +\@namedef{scr@v@3.08a}{10} +\@namedef{scr@v@3.08b}{10} +\@namedef{scr@v@3.09}{10} +\@namedef{scr@v@3.09a}{10} +\@namedef{scr@v@3.10}{10} +\@namedef{scr@v@3.10a}{10} +\@namedef{scr@v@3.10b}{10} +\@namedef{scr@v@3.11}{10} +\@namedef{scr@v@3.11a}{10} +\@namedef{scr@v@3.11b}{10} +\@namedef{scr@v@3.12}{11} +\@namedef{scr@v@3.13}{12} +\@namedef{scr@v@3.13a}{13} +\@namedef{scr@v@3.14}{13} +\@namedef{scr@v@3.15}{14} +\@namedef{scr@v@3.16}{14} +\@namedef{scr@v@3.17}{15} +\@namedef{scr@v@3.17a}{15} +\@namedef{scr@v@3.17c}{15} +\@namedef{scr@v@3.18}{15} +\@namedef{scr@v@3.18a}{15} +\@namedef{scr@v@3.19}{15} +\@namedef{scr@v@3.19a}{15} +\@namedef{scr@v@3.20}{15} +\@namedef{scr@v@3.21}{15} +\@namedef{scr@v@3.22}{16} +\@namedef{scr@v@3.23}{16} +\@namedef{scr@v@3.24}{16} +\@namedef{scr@v@3.25}{17} +\@namedef{scr@v@3.26}{17} +\@namedef{scr@v@3.26a}{17} +\@namedef{scr@v@3.26b}{17} +\@namedef{scr@v@3.27}{17} +\@namedef{scr@v@3.27a}{17} +\@namedef{scr@v@3.28}{17} +\@namedef{scr@v@3.29}{17} +\@namedef{scr@v@3.30}{17} +\@namedef{scr@v@3.31}{18} +\@namedef{scr@v@3.32}{18} +\@namedef{scr@v@3.33}{18} +\@namedef{scr@v@3.34}{18} +\@namedef{scr@v@3.35}{19} +\@namedef{scr@v@3.36}{20} +\@namedef{scr@v@3.37 BETA}{20} +\@namedef{scr@v@last}{20} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{option} +% \begin{macrocode} +% +% \end{macrocode} +% +% \begin{macro}{\scr@v@is@lt,\scr@v@is@gt,\scr@v@is@le,\scr@v@is@ge} +% \changes{v3.17}{2015/03/10}{added} +% All these macros are to be used as condition for \cs{ifnum} and compare the +% currently selected version with a given \meta{version}, e.g.: +% \begin{quote} +% \cs{expandafter}\cs{ifnum}\cs{scr@v@is@lt}\marg{version} \meta{true code} +% \cs{else} \meta{false code} \cs{fi} +% \end{quote} +% The conditions are: +% \begin{quote}\raggedright +% \cs{scr@v@is@lt} --- current version less than \meta{version} \\ +% \cs{scr@v@is@gt} --- current version greater than \meta{version} \\ +% \cs{scr@v@is@le} --- current version less than or equal to \meta{version} \\ +% \cs{scr@v@is@ge} --- current version greater than or equal to \meta{version} \\ +% \end{quote} +% \begin{macrocode} +%<*option&(class|extend)> +\newcommand*{\scr@v@is@lt}[1]{% + \scr@compatibility<\@nameuse{scr@v@#1} +} +\newcommand*{\scr@v@is@gt}[1]{% + \scr@compatibility>\@nameuse{scr@v@#1} +} +\newcommand*{\scr@v@is@le}[1]{% + \numexpr\scr@compatibility-\@ne\relax<\@nameuse{scr@v@#1} +} +\newcommand*{\scr@v@is@ge}[1]{% + \numexpr\scr@compatibility+\@ne\relax>\@nameuse{scr@v@#1} +} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\scr@ta@v@is@lt,\scr@ta@v@is@gt,\scr@ta@v@is@le,\scr@ta@v@is@ge} +% \changes{v3.17}{2015/03/10}{Neu (intern)} +% The same conditions are defined for \pkg*{typearea}. +% \begin{macrocode} +%<*option&package&typearea> +\newcommand*{\scr@ta@v@is@lt}[1]{% + \scr@ta@compatibility<\@nameuse{scr@v@#1} +} +\newcommand*{\scr@ta@v@is@gt}[1]{% + \scr@ta@compatibility>\@nameuse{scr@v@#1} +} +\newcommand*{\scr@ta@v@is@le}[1]{% + \numexpr\scr@ta@compatibility-\@ne <\@nameuse{scr@v@#1} +} +\newcommand*{\scr@ta@v@is@ge}[1]{% + \numexpr\scr@ta@compatibility+\@ne >\@nameuse{scr@v@#1} +} +% +% \end{macrocode} +% \end{macro} +% +% \changes{v3.37}{2022/06/21}{version test added} +% We also do some version tests at |\begin{document}| because of the extremely +% high speed of \LaTeX{} kernel development. +% \begin{macrocode} +%<*body&(class|extend)> +\AtBeginDocument{% + \begingroup + \def\reserved@a#1/#2/#3 #4\@nil{\@tempcnta=#1\relax\@tempcntb=#2\relax}% + \expandafter\reserved@a\KOMAScriptVersion\@nil + \edef\reserved@a{\the\numexpr\@tempcnta+2\relax/% + \ifnum\@tempcntb<10 0\fi\the\@tempcntb/01}% + \expandafter\IfLTXAtLeastTF\expandafter{\reserved@a}{% +% \ClassWarningNoLine{\KOMAClassName}{% +% \PackageWarningNoLine{scrextend}{% + Your are using a KOMA-Script version, that has not\MessageBreak + been tested with your more than one year newer\MessageBreak + LaTeX release `\fmtversion'.\MessageBreak + Because of the high speed of LaTeX kernel development,\MessageBreak + this could result in a lot of issues.\MessageBreak + Please have a look at\MessageBreak + and if this\MessageBreak + shows a newer KOMA-Script version than\MessageBreak + `\KOMAScriptVersion', we suggest to do\MessageBreak + an update of KOMA-Script or maybe even the whole\MessageBreak + TeX distribution% + }% + }{% + \edef\reserved@a{\the\numexpr\@tempcnta-4\relax/% + \ifnum\@tempcntb<10 0\fi\the\@tempcntb/01}% + \expandafter\IfLTXAtLeastTF\expandafter{\reserved@a}{}{% +% \ClassWarningNoLine{\KOMAClassName}{% +% \PackageWarningNoLine{scrextend}{% + You are using a KOMA-Script version, that has not been\MessageBreak + tested with your more than four years older LaTeX\MessageBreak + release `\fmtversion'.\MessageBreak + Because of the high speed of LaTeX kernel development,\MessageBreak + KOMA-Script releases cannot be tested with all past\MessageBreak + LaTeX releases.\MessageBreak + \ifnum\scr@compatibility<\scr@v@last + So even if you are using option `version' implicitly\MessageBreak + or explicitly, this + \else + So this + \fi + could result in a lot of issues.\MessageBreak + We recommend, to update the whole TeX distribution.\MessageBreak + If this could not be done, we suggest to use at\MessageBreak + least an older KOMA-Script release, e.g., from\MessageBreak + % + }% + }% + }% + \endgroup +} +% +% \end{macrocode} +% +% +% \subsection{Compatibility with early versions of \cls*{scrlttr2}} +% Early version of \cls*{scrlttr2} have had another macro. Because, there may +% still be \file{lco} files, that use is, it is also defined if compatibility +% to version before 2.95 has been selected. +% +% \begin{macro}{\@setif} +% \changes{v2.8q}{2001/10/08}{added} +% \changes{v2.95}{2006/03/31}{only for version settings before 2.95} +% The deprecated command has been used to set a boolean switch to true or +% false using one of the values |true|, |false|, |on|, or |off|. +% \begin{macrocode} +%<*class&letter&body> +\expandafter\ifnum \@nameuse{scr@v@2.95}>\scr@compatibility\relax + \newcommand*{\@setif}[2][]{% + \begingroup + \edef\@tempa{#1}\ifx\@tempa\@empty + \def\@tempa{\KOMA@set@ifkey{#2}{@#2}}% + \else + \def\@tempa{\KOMA@set@ifkey{#2}{#1}}% + \fi + \expandafter\endgroup\@tempa + }% +\fi +% +% \end{macrocode} +% \end{macro} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrkernel-floats.dtx b/macros/latex/contrib/koma-script/scrkernel-floats.dtx new file mode 100644 index 0000000000..b0b1b3a1a4 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrkernel-floats.dtx @@ -0,0 +1,1859 @@ +% \iffalse meta-comment +% ====================================================================== +% scrkernel-floats.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrkernel-floats.dtx 3874 2022-06-05 10:38:02Z kohm $ +% +% \end{macrocode} +% \end{option}^^A onelinecaption,noonelinecaption +% +% +% \subsection{Macros and commands for the captions} +% +% \changes{v2.2c}{1995/05/25}{support for CJK added} +% The initial feature for defining captions somehow different from the +% standard classes was a request of Werner Lember to add support for CJK +% languages. However not everything is changed. For example the usual lengths +% of the standard classes are still defined, but interpreted somehow different. +% +% \begin{length}{\abovecaptionskip,\belowcaptionskip} +% The distance above and below a caption. The default for captions below the +% object is 10\,pt above the caption and 0 below. Note: For captions above +% the object the lengths are switched: \len{abovecaptionskip} is used +% \emph{below} the caption and \len{belowcaptionskip} is used \emph{above} +% the caption then. +% \begin{macrocode} +%<*body> +\newlength{\abovecaptionskip} +\newlength{\belowcaptionskip} +\setlength{\abovecaptionskip}{10\p@} +\setlength{\belowcaptionskip}{0\p@} +% \end{macrocode} +% \end{length}^^A \abovecaptionskip,\belowcaptionskip +% \begin{command}{\captionformat} +% \changes{v2.3c}{1995/08/06}{added} +% Separator between label (with number) an text only. +% \begin{macrocode} +\newcommand*{\captionformat}{:\ } +% \end{macrocode} +% \end{command}^^A \captionformat +% \begin{command}{\captionabove,\captionbelow} +% \changes{v2.8h}{2001/07/19}{added} +% \begin{macro}{\scr@caption} +% \changes{v2.8h}{2001/07/19}{added} +% We have two different commands \cs{captionabove} and \cs{captionbelow} to +% distinguish captions above or below the object. Internally both use +% \cs{scr@caption}, but set either \cs{@captionabovetrue} or +% \cs{@captionabovefalse}. To allow other packages (e.g. \pkg{hyperref} to +% redefine \cs{caption} the final definition of \cs{scr@caption} is done in +% |\begin{document}|. We cannot use \cs{caption} inside \cs{captionabove} or +% \cs{captionbelow}, because we do use a redefinition of \cs{capion} to use +% \cs{captionabove} or \cs{captionbelow} via \opt{atbegin} at \cs{DeclareNewTOC}. +% \begin{macrocode} +\newcommand{\scr@caption}{} +\AtBeginDocument{\let\scr@caption\caption} +% \end{macrocode} +% \end{macro}^^A \scr@caption +% Jetzt ist es möglich durch einfaches Umlegen des Schalters für die +% korrekte Darstellung zu sorgen: +% \begin{macrocode} +\newcommand{\captionabove}{\@captionabovetrue\scr@caption} +\newcommand{\captionbelow}{\@captionabovefalse\scr@caption} +% \end{macrocode} +% \end{command}^^A \captionabove,\captionbelow +% +% +% \begin{environment}{captionbeside} +% \changes{v2.8q}{2001/11/22}{added} +% Placing captions above or below the object inside a float is easy. But to +% place it beside the object an additional environment is needed. This has to +% collect the object (environment body) into a box and then print it side by +% side with a second box with the caption. Note: This cannot work with +% tables of package \pkg{longtable} or \pkg{supertabular} or similar packages. +% \begin{quote}\raggedright +% |\begin{captionbeside}|\oarg{list +% entry}\marg{caption}\oarg{position}\oarg{with}\oarg{offset}|*|\\ +% \dots\\ +% |\end{captionbeside}| +% \end{quote} +% Note: The asterisk is optional and changes the meaning of \meta{offset}. +% \begin{macro}{\scap@caption} +% \changes{v2.8q}{2001/11/22}{added} +% The \meta{caption} is locally stored into helper macro \cs{scap@caption}. +% \begin{macrocode} +\newcommand*{\scap@caption}{} +% \end{macrocode} +% \end{macro}^^A \scap@caption +% \begin{macro}{\scap@width} +% \changes{v2.8q}{2001/11/22}{added} +% The optional \meta{width}, which is the width of the whole environment +% inclusive caption, is locally stored into helper macro \cs{scap@width}. The +% default is the while line width. +% \begin{macrocode} +\newcommand*{\scap@width}{\linewidth} +% \end{macrocode} +% \end{macro}^^A \scap@width +% \begin{macro}{\scap@move} +% \changes{v2.8q}{2001/11/22}{added} +% If \cs{scap@width} is not the line width, the environment is horizontal +% centered by default. But if \meta{offset} is used, this is used as a +% distance from the left margin. This is locally stored into helper macro +% \cs{scap@move}. +% \begin{macrocode} +\newcommand*{\scap@move}{\z@} +% \end{macrocode} +% \end{macro}^^A \scap@move +% \begin{macro}{\scap@altfalse,\scap@alttrue,\ifscap@alt} +% \changes{v2.8q}{2001/11/22}{added} +% The boolean switch \cs{ifscap@alt} is used to decide if in twoside mode the +% movement of \cs{scap@move} has to be done from the left or the right margin +% and to left or to the right. +% \begin{macrocode} +\newif\ifscap@alt +% \end{macrocode} +% \end{macro}^^A \ifscap@alt +% \begin{macro}{\scap@currentlabel} +% \changes{v2.8q}{2001/11/24}{added} +% Because of using \cs{caption} inside a box and inside an environment, a +% label after the \env{captionbeside} environment usually would not reference +% the caption number. To preserve this after the end of the +% \env{captionbeside} the current label is locally stored into global +% \cs{scap@currentlabel} and restored after the end of the environment using +% \cs{aftergroup}. Note: You can have only one \cs{label} inside!. +% \begin{macrocode} +\newcommand*{\scap@currentlabel}{} +% \end{macrocode} +% \end{macro}^^A \scap@currentlabel +% \begin{macro}{\@@@captionbeside,\@@captionbeside,\@captionbeside} +% \changes{v2.8q}{2001/11/22}{added} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}} +% \begin{macro}{\@@@@captionbeside} +% \changes{v2.8q}{2001/11/22}{added} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% To handle all the optional arguments and the optional star at the end, +% several helper macros are needed (because we currently do not use \pkg{xparse}). +% \begin{macrocode} +\newcommand*{\@captionbeside}{} +\long\def\@captionbeside[#1]#2{% + \kernel@ifnextchar [%] + {\@@captionbeside[{#1}]{#2}} + {\c@pti@nb@sid@[{#1}]{#2}}% +} +\newcommand*{\@@captionbeside}{} +\long\def\@@captionbeside[#1]#2[#3]{% + \def\scap@pos{#3}% + \kernel@ifnextchar [%] + {\@@@captionbeside[{#1}]{#2}} + {\c@pti@nb@sid@[{#1}]{#2}}% +} +\newcommand*{\@@@captionbeside}{} +\long\def\@@@captionbeside[#1]#2[#3]{% + \def\scap@width{#3}% + \kernel@ifnextchar [%] + {\@@@@captionbeside[{#1}]{#2}} + {\setlength{\@tempdima}{#3}% + \addtolength{\@tempdima}{-\linewidth}% + \setlength{\@tempdima}{-.5\@tempdima}% + \edef\scap@move{\the\@tempdima}% + \c@pti@nb@sid@[{#1}]{#2}}% +} +\newcommand*{\@@@@captionbeside}{} +\long\def\@@@@captionbeside[#1]#2[#3]{% + \def\scap@move{#3}% + \kernel@ifstar + {\scap@alttrue\c@pti@nb@sid@[{#1}]{#2}} + {\scap@altfalse\c@pti@nb@sid@[{#1}]{#2}}% +} +% \end{macrocode} +% \end{macro}^^A \@@@@captionbeside +% \end{macro}^^A \@@@captionbeside … \@captionbeside +% \begin{macro}{\c@pti@nb@sid@b@x} +% \changes{v2.8q}{2001/11/22}{added} +% We also use our own box register to collect the environment body. +% \begin{macrocode} +\newbox\c@pti@nb@sid@b@x +% \end{macrocode} +% \end{macro} +% \begin{macro}{\c@pti@nb@sid@} +% \changes{v2.8q}{2001/11/22}{added} +% \changes{v2.98c}{2008/03/11}{vertical alignment fixed} +% \changes{v3.07a}{2010/11/04}{vertical alignment \texttt{t} and \texttt{b} fixed} +% This is the real beginning of the environment. After collecting all the +% arguments into local macros. +% \begin{macrocode} +\newcommand{\c@pti@nb@sid@}{} +\long\def\c@pti@nb@sid@[#1]#2{% + \def\scap@caption{% + \if c\scap@valign + \setlength{\abovecaptionskip}{\z@}% + \else \if t\scap@valign + \setlength{\abovecaptionskip}{-\ht\strutbox}% + \else \if b\scap@valign + \setlength{\abovecaptionskip}{\z@}% + \fi + \fi + \fi + \setlength{\belowcaptionskip}{-\dp\strutbox}% + \captionbelow[{#1}]{#2}% + }% + \begin{lrbox}{\c@pti@nb@sid@b@x}% +} +% \end{macrocode} +% \end{macro}^^A \c@pti@nb@sid@ +% Now we can use all of the helper macros to begin the environment. We use +% \LaTeX{} kernel macro \cs{@dblarg} to define an argument with first +% optional argument defaults to mandatory second argument. +% \begin{macrocode} +\newenvironment*{captionbeside}{% + \@dblarg\@captionbeside +}{% +% \end{macrocode} +% This was easy (because of using all the helper macros), but the end of the +% environment isn't. Here we do all the calculations for printing. +% \changes{v2.9a}{2002/06/27}{\cs{ifthispageodd} replaced by \cs{if@thispageodd}} +% \changes{v3.28}{2019/11/19}{\cs{ifthispageodd} replaced by \cs{Ifthispageodd}} +% \begin{macrocode} + \end{lrbox}% + \settowidth{\@tempdima}{\usebox\c@pti@nb@sid@b@x}% + \setlength{\@tempdimb}{\scap@width}% + \addtolength{\@tempdimb}{-\@tempdima}% + \addtolength{\@tempdimb}{-\columnsep}% + \ifdim \@tempdimb<2em + \ClassWarning{\KOMAClassName}{% + caption beside will be very, very small.\MessageBreak + In most cases this will result in overfull and\MessageBreak + underfull \string\hbox\space messages% + }% + \fi + \onelinecaptionsfalse + \setcapwidth[r]{\@tempdimb}% + \let\@tempa\scap@pos + \setlength{\@tempdimc}{\scap@move}% + \if i\scap@pos\def\@tempa{l}\fi + \if o\scap@pos\def\@tempa{r}\fi + \if@twoside + \Ifthispageodd{}{% + \if o\scap@pos\def\@tempa{l}\fi + \if i\scap@pos\def\@tempa{r}\fi + \ifscap@alt + \addtolength{\@tempdimc}{\scap@width}% + \addtolength{\@tempdimc}{-\linewidth}% + \setlength{\@tempdimc}{-\@tempdimc}% + \fi + }% + \fi + \hspace*{\@tempdimc}% +% \end{macrocode} +% \changes{v2.9p}{2003/12/10}{\cs{@temdima} replaced by +% \cs{wd}\cs{c@pti@nb@sid@b@x}, because \cs{@temdima} would be changed} +% \begin{macrocode} + \if l\@tempa + \rlap{% + \parbox[\scap@valign]{\@tempdimb}{\scap@caption + \global\let\scap@currentlabel\@currentlabel}% + \nobreak\hskip\columnsep + \parbox[\scap@valign]{\wd\c@pti@nb@sid@b@x}{\usebox\c@pti@nb@sid@b@x}% + }% + \else + \rlap{% + \parbox[\scap@valign]{\wd\c@pti@nb@sid@b@x}{\usebox\c@pti@nb@sid@b@x}% + \nobreak\hskip\columnsep + \parbox[\scap@valign]{\@tempdimb}{\scap@caption + \global\let\scap@currentlabel\@currentlabel}% + }% + \fi + \par + \aftergroup\let\aftergroup\@currentlabel + \aftergroup\scap@currentlabel +} +% \end{macrocode} +% \end{environment}^^A captionbeside +% +% +% \begin{fontelement}{caption,captionlabel} +% We need two font elements for the caption at whole and the label part only. +% \begin{macro}{\capfont,\caplabelfont} +% \changes{v2.8c}{2001/06/29}{\cs{normalcolor} added} +% Originally two user macros has been used to change the fonts. To stay +% compatible with old \KOMAScript{} and also i.e. with package \pkg{caption}, +% we still define \cs{capfont} and \cs{caplabelfont} as internal storage of +% the font elements. But already from \KOMAScript{} version 2.8c these should +% be interpreted as internal macros. +% \begin{macrocode} +\newcommand*\capfont{\normalfont\normalcolor} +\newcommand*\caplabelfont{\normalfont\normalcolor} +% \end{macrocode} +% \end{macro}^^A \capfont,\caplabelfont +% \begin{macro}{\scr@fnt@caption,\scr@fnt@captionlabel} +% \changes{v2.8o}{2001/09/14}{added} +% Because of that non-default for the internal storage the font elements have +% to be defined \emph{manually} instead of using \cs{newkomafont}. +% \begin{macrocode} +\newcommand*{\scr@fnt@caption}{\capfont} +\newcommand*{\scr@fnt@captionlabel}{\caplabelfont} +% \end{macrocode} +% \end{macro}^^A \scr@fnt@caption,\scr@fnt@captionlabel +% \end{fontelement}^^A caption,captionlabel +% +% \begin{macro}{\@makecaption} +% \changes{v2.3a}{1995/07/08}{using \cs{sbox} instead of \cs{setbox}} +% \changes{v2.3a}{1995/07/08}{using \cs{@minipagefalse}} +% \changes{v2.3f}{1995/12/09}{using same font switching for long and short captions} +% \changes{v2.5g}{1999/10/09}{supporting partial hanging captions} +% \begin{macro}{\dofullc@pfalse,\dofullc@ptrue,\ifdofullc@p} +% The boolean switch \cs{ifdofullc@p} is true for caption texts, that should +% be full hanging (behind the label part), which is the default. +% \begin{macrocode} +\newif\ifdofullc@p +\dofullc@ptrue +% \end{macrocode} +% \end{macro}^^A \ifdofullc@p +% \begin{macro}{\if@capbreak} +% \changes{v2.8j}{2001/07/30}{added} +% The boolean switch \cs{if@capbreak} is true, if the label should be followed +% by a line break, which is not the case by default. +% \begin{macrocode} +\newif\if@capbreak +\@capbreakfalse +% \end{macrocode} +% \end{macro}^^A \@capbreakfalse +% \begin{command}{\setcapindent} +% \begin{macro}{\@@setcaptindent,\@setcapindent} +% \changes{v2.8j}{2001/07/30}{using \cs{if@capbreak}} +% \changes{v2.8l}{2001/08/17}{using \cs{edef}\cs{cap@indent} instead of +% \cs{def}\cs{cap@indent}} +% \changes{v2.8q}{2001/11/17}{redefined after loading \pkg{caption2}} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \changes{v3.34}{2021/03/22}{special treatment of \pkg{caption2} removed} +% The user can configure the indent using: +% \begin{quote} +% \cs{setcapindent}*\marg{indent} +% \end{quote} +% The optional asterisk activates a line break between the label and the +% text. The \meta{indent} is always an indent of the text from the left. A +% local dimension assignment is done to report errors here and not at +% usage of \cs{cap@indent}. +% \begin{macrocode} +\newcommand*{\setcapindent}{\kernel@ifstar{\@@setcapindent}{\@setcapindent}} +\newcommand*{\@setcapindent}[1]{% + \setlength{\@tempdima}{#1}% + \ifdim\@tempdima>\hsize + \addtolength{\@tempdima}{-\hsize}\@capbreaktrue + \else + \@capbreakfalse + \fi + \edef\cap@indent{\the\@tempdima}% + \dofullc@pfalse +} +\newcommand*{\@@setcapindent}[1]{% + \setlength{\@tempdima}{#1}% + \edef\cap@indent{\the\@tempdima}% + \dofullc@pfalse\@capbreaktrue +} +% \end{macrocode} +% \end{macro}^^A \@@setcaptindent,\@setcapindent +% \end{command}^^A \setcapindent +% \begin{command}{\setcaphanging} +% \changes{v2.8q}{2001/11/17}{redefined after loading \pkg{caption2}} +% \changes{v3.34}{2021/03/22}{special treatment of \pkg{caption2} removed} +% Alternatively the user can select the full hanging printing. +% \begin{macrocode} +\newcommand*{\setcaphanging}{\dofullc@ptrue\@capbreakfalse} +% \end{macrocode} +% \end{command} +% Now, we have all to define \cs{@makecaption} as needed by the \LaTeX{} kernel. +% \changes{v2.5g}{1999/10/09}{using \cs{newcommand}} +% \changes{v2.8h}{2001/07/19}{support for headings and signatures} +% \changes{v2.8j}{2001/07/30}{using \cs{@@makecaption}} +% \changes{v2.8q}{2001/11/17}{special treatment of one line captions is optional} +% \changes{v2.8q}{2001/11/17}{caption width can be limited} +% \begin{macrocode} +\newcommand{\@makecaption}[2]{% + \if@captionabove + \vskip\belowcaptionskip + \else + \vskip\abovecaptionskip + \fi + \@@makecaption\@firstofone{#1}{#2}% + \if@captionabove + \vskip\abovecaptionskip + \else + \vskip\belowcaptionskip + \fi +} +% \end{macrocode} +% \begin{macro}{\cap@width,\cap@left,\cap@right} +% \changes{v2.8q}{2001/11/17}{added} +% Multi line captions can printed with a reduced with. If the width is reduced +% the left an right margin can be changed. The defaults are centering. +% \begin{macrocode} +\newcommand*{\cap@width}{\hsize} +\newcommand*{\cap@left}{\hfill} +\newcommand*{\cap@right}{\hfill} +% \end{macrocode} +% \end{macro}^^A \cap@width,\cap@left,\cap@right +% \begin{command}{\setcapwidth} +% \changes{v2.8q}{2001/11/17}{added} +% \changes{v2.9a}{2002/06/27}{\cs{ifthispageodd} replaced by \cs{if@thispageodd}} +% \changes{v2.97}{2007/02/27}{minimum width for captions is 0\,pt} +% \changes{v3.28}{2019/11/19}{\cs{ifthispageodd} replaced by \cs{Ifthispageodd}} +% \changes{v3.34}{2021/03/22}{special treatment of \pkg{caption2} removed} +% The user command: +% \begin{quote} +% \cs{setcapwidth}\oarg{alignment}\marg{width} +% \end{quote} +% is one choice to set \cs{cap@width} to \meta{width}. The optional +% \meta{alignment} (as usual |l|, |r|, |o|, or |i|) also changes \cs{cap@left} +% and \cs{cap@right}. +% \begin{macrocode} +\newcommand*{\setcapwidth}[2][]{% + \begingroup% + \setlength{\@tempdima}{#2}% + \ifdim\@tempdima <\z@ + \@tempdima\z@ + \ClassWarning{\KOMAClassName}{% + caption width less than 0pt not allowed.\MessageBreak + Setting caption width to 0pt% + }% + \fi + \edef\@tempa{\endgroup\def\noexpand\cap@width{\the\@tempdima}}% + \@tempa + \begingroup + \edef\@tempa{#1}% + \def\@tempb{c}\ifx\@tempa\@tempb + \endgroup + \def\cap@margin{\let\cap@left=\hfill\let\cap@right=\hfill}% + \else + \def\@tempb{l}\ifx\@tempa\@tempb + \endgroup + \def\cap@margin{\let\cap@left=\relax\let\cap@right\hfill}% + \else + \def\@tempb{r}\ifx\@tempa\@tempb + \endgroup + \def\cap@margin{\let\cap@left=\hfill\let\cap@right=\relax}% + \else + \def\@tempb{i}\ifx\@tempa\@tempb + \endgroup + \def\cap@margin{% + \let\cap@left=\relax + \let\cap@right=\hfill + \if@twoside + \Ifthispageodd{}{% + \let\cap@left=\hfill + \let\cap@right=\relax + }% + \fi + }% + \else + \def\@tempb{o}\ifx\@tempa\@tempb + \endgroup + \def\cap@margin{% + \let\cap@left=\hfill + \let\cap@right=\relax + \if@twoside + \Ifthispageodd{}{% + \let\cap@left=\relax + \let\cap@right=\hfill + }% + \fi + }% + \else + \ifx \@tempa\@empty\else + \ClassError{\KOMAClassName}{% + unknown optional position argument% + }{% + You've used `#1' as position argument at + \string\setcaptionwidth,\MessageBreak + but only ONE of `c', `l', `r', `i`, `o` ist + allowed.\MessageBreak + Argument will be ignored, if you'll continue.% + }% + \fi + \endgroup + \fi\fi\fi\fi\fi +} +% \end{macrocode} +% \end{command}^^A \setcapwidth +% \begin{command}{\setcapdynwidth} +% \changes{v3.20}{2016/03/31}{added} +% Ulrike Fischer requested for an alternative, that does not behave like +% \cs{setlength} and therefore sets the length already at usage of +% \cs{setcapwidth} but at usage of \cs{cap@width}. This is +% \cs{setcapdynwidth}. But in this case mistakes can result in errors while +% usage of \cs{cap@width} too. +% \begin{macrocode} +\newcommand*{\setcapdynwidth}[2][]{% + \def\cap@width{#2}% + \begingroup + \edef\@tempa{#1}% + \def\@tempb{c}\ifx\@tempa\@tempb + \endgroup + \def\cap@margin{% + \ifdim \cap@width<\z@ + \ClassWarning{\KOMAClassName}{% + caption width less than 0pt not allowed.\MessageBreak + Setting caption width to 0pt% + }% + \let\cap@width\z@ + \fi + \let\cap@left=\hfill\let\cap@right=\hfill}% + \else + \def\@tempb{l}\ifx\@tempa\@tempb + \endgroup + \def\cap@margin{% + \ifdim \cap@width<\z@ + \ClassWarning{\KOMAClassName}{% + caption width less than 0pt not allowed.\MessageBreak + Setting caption width to 0pt% + }% + \let\cap@width\z@ + \fi + \let\cap@left=\relax\let\cap@right\hfill}% + \else + \def\@tempb{r}\ifx\@tempa\@tempb + \endgroup + \def\cap@margin{% + \ifdim \cap@width<\z@ + \ClassWarning{\KOMAClassName}{% + caption width less than 0pt not allowed.\MessageBreak + Setting caption width to 0pt% + }% + \let\cap@width\z@ + \fi + \let\cap@left=\hfill\let\cap@right=\relax}% + \else + \def\@tempb{i}\ifx\@tempa\@tempb + \endgroup + \def\cap@margin{% + \ifdim \cap@width<\z@ + \ClassWarning{\KOMAClassName}{% + caption width less than 0pt not allowed.\MessageBreak + Setting caption width to 0pt% + }% + \let\cap@width\z@ + \fi + \let\cap@left=\relax + \let\cap@right=\hfill + \if@twoside + \Ifthispageodd{}{% + \let\cap@left=\hfill + \let\cap@right=\relax + }% + \fi + }% + \else + \def\@tempb{o}\ifx\@tempa\@tempb + \endgroup + \def\cap@margin{% + \ifdim \cap@width<\z@ + \ClassWarning{\KOMAClassName}{% + caption width less than 0pt not allowed.\MessageBreak + Setting caption width to 0pt% + }% + \let\cap@width\z@ + \fi + \let\cap@left=\hfill + \let\cap@right=\relax + \if@twoside + \Ifthispageodd{}{% + \let\cap@left=\relax + \let\cap@right=\hfill + }% + \fi + }% + \else + \ifx \@tempa\@empty\else + \ClassError{\KOMAClassName}{% + unknown optional position argument% + }{% + You've used `#1' as position argument at + \string\setcaptionwidth,\MessageBreak + but only ONE of `c', `l', `r', `i`, `o` ist + allowed.\MessageBreak + Argument will be ignored, if you'll continue.% + }% + \fi + \endgroup + \fi\fi\fi\fi\fi +} +% \end{macrocode} +% \end{command}^^A \setcapdynwidth +% \begin{macro}{\cap@margin} +% \changes{v2.8q}{2001/11/17}{added} +% \cs{cap@margin} is used to recalculate \cs{cap@left} and \cs{cap@right} +% inside \cs{@@makecaption}, if the margins has been set using +% \cs{setcapmargin}. Default is no such action. +% \begin{macrocode} +\newcommand*{\cap@margin}{} +\let\cap@margin=\relax% +% \end{macrocode} +% \end{macro}^^A \cap@margin +% \begin{command}{\setcapmargin} +% \changes{v2.8q}{2001/11/17}{neu} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\@@setcapmargin,\@setcapmargin} +% \changes{v2.8q}{2001/11/17}{added} +% \changes{v2.9a}{2002/06/27}{\cs{ifthispageodd} replaced by \cs{if@thispageodd}} +% \changes{v3.28}{2019/11/19}{\cs{ifthispageodd} replaced by \cs{Ifthispageodd}} +% \changes{v3.34}{2021/03/22}{special treatment for \pkg{caption2} removed} +% Instead of setting of the width of the caption, the left and right margin +% can be set. The star variant switch left and right depending on odd or even +% side in two side mode. +% \begin{macrocode} +\newcommand*{\setcapmargin}{\kernel@ifstar{\@setcapmargin}{\@@setcapmargin}} +\newcommand*{\@setcapmargin}[2][\@tempdimb]{% + \def\cap@margin{% + \onelinecaptionsfalse + \begingroup + \setlength{\@tempdima}{\hsize}% + \setlength{\@tempdimb}{#2}% + \addtolength{\@tempdima}{-\@tempdimb}% + \setlength{\@tempdimc}{#1}% + \addtolength{\@tempdima}{-\@tempdimc}% + \edef\@tempa{\endgroup + \def\noexpand\cap@width{\the\@tempdima}% + \noexpand\if@twoside + \noexpand\Ifthispageodd{% + \def\noexpand\cap@left{\noexpand\hspace*{\the\@tempdimc}}% + \def\noexpand\cap@right{\noexpand\hspace*{\the\@tempdimb}}% + }{% + \def\noexpand\cap@right{\noexpand\hspace*{\the\@tempdimc}}% + \def\noexpand\cap@left{\noexpand\hspace*{\the\@tempdimb}}% + }% + \noexpand\else + \def\noexpand\cap@left{\noexpand\hspace*{\the\@tempdimc}}% + \def\noexpand\cap@right{\noexpand\hspace*{\the\@tempdimb}}% + \noexpand\fi + }% + \@tempa + }% +} +\newcommand*{\@@setcapmargin}[2][\@tempdimb]{% + \def\cap@margin{% + \onelinecaptionsfalse + \begingroup + \setlength{\@tempdima}{\hsize}% + \setlength{\@tempdimb}{#2}% + \addtolength{\@tempdima}{-\@tempdimb}% + \setlength{\@tempdimc}{#1}% + \addtolength{\@tempdima}{-\@tempdimc}% + \edef\@tempa{\endgroup + \def\noexpand\cap@width{\the\@tempdima}% + \def\noexpand\cap@left{\noexpand\hspace*{\the\@tempdimc}}% + \def\noexpand\cap@right{\noexpand\hspace*{\the\@tempdimb}}% + }% + \@tempa + }% +} +% \end{macrocode} +% \end{macro}^^A \@@setcapmargin,\@setcapmargin +% \end{command}^^A \setcapmargin +% \begin{macro}{\@@makecaption} +% The main job is done by \cs{@@makecaption}. It has an additional first +% argument, that has to be either \cs{@gobble} or \cs{@firstofone}. This is +% used to either set a label or not. This is needed for captions of +% \pkg{longtable}. +% \changes{v2.8q}{2002/05/17}{avoid double increase of footnote number} +% \changes{v2.95}{2004/01/30}{fixing vertical skips also with \pkg{float}} +% \changes{v2.95a}{2006/07/13}{fixing vertical skips with \pkg{color}} +% \changes{v2.97c}{2007/06/06}{\cs{unskip}\cs{strut} added to fix vertical +% positions in some \emph{above} cases} +% \changes{v3.02a}{2009/01/24}{braces fixed} +% \changes{v3.11c}{2013/06/12}{using \cs{usekomafont}} +% \changes{v3.12}{2013/06/12}{one \cs{usekomafont} replaced by \cs{usesizeofkomafont}} +% \changes{v3.21}{2016/05/31}{re-implemented} +% \begin{macrocode} +\newcommand{\@@makecaption}[3]{% +% \end{macrocode} +% Recalculate the margins. +% \begin{macrocode} + \cap@margin +% \end{macrocode} +% Test for special treatment of one line captions. +% \changes{v3.22}{2016/09/01}{local redefinition of \cs{stepcounter} and +% \cs{refstepcounter} because of \pkg{isodate}} +% \begin{macrocode} + \begingroup + \ifonelinecaptions + \def\stepcounter##1{\advance\value{##1}\@ne}% + \let\refstepcounter\stepcounter + \let\label\@gobble + \let\@footnotetext=\@gobble + \let\hypertarget\@gobbletwo +% \end{macrocode} +% \changes{v3.22}{2016/09/01}{special treatment of hard coded line breaks} +% If there are hard coded line breaks using |\\| or \cs{newline}, we inform +% the user to use a multi-line caption. +% \begin{macrocode} + \edef\@xnewline{% + \unexpanded{\ClassInfo{\KOMAClassName}{% + Workaround for not recommended usage of \string\\ or\MessageBreak + \string\newline in caption text + }% + \hspace*{\linewidth}\hspace{1sp}% + }% + \unexpanded\expandafter{\@xnewline}% + }% + \edef\@xcentercr{% + \unexpanded{\ClassInfo{\KOMAClassName}{% + Workaround for not recommended usage of \string\\ or\MessageBreak + \string\newline in caption text + }% + \hspace*{\linewidth}\hspace{1sp}% + }% + \unexpanded\expandafter{\@xcentercr}% + }% + \settowidth{\@tempdima}{\scr@@makesinglelinecaption{#1}{#2}{#3}}% +% \end{macrocode} +% \changes{v3.34}{2021/03/22}{fix of maximum line width of single line +% captions} +% Until \KOMAScript~3.34 the test here was wrong, because it used +% \cs{linewidth}, which is still the whole line width not the maximum caption +% width. From \KOMAScript~3.34 \cs{cap@width} is used. +% \begin{macrocode} + \ifdim\@tempdima>\cap@width + \aftergroup\scr@makemultilinecaption + \else + \aftergroup\scr@makesinglelinecaption + \fi + \else + \aftergroup\scr@makemultilinecaption + \fi + \endgroup + {#1}{#2}{#3}% +} +% \end{macrocode} +% \begin{macro}{\scr@@makesinglelinecaption,\scr@makesinglelinecaption} +% \changes{v3.21}{2016/05/31}{added} +% The output of single line captions. The first argument once again is +% \cs{@gobble} (to not show a label) or \cs{@firstofone} (to show the +% label). Argument two and three are the label (without separator, that is +% added here) and the caption text. +% \begin{macrocode} +\newcommand{\scr@makesinglelinecaption}[3]{% + {% + \usefontofkomafont{caption}{% + \hb@xt@\hsize{% + \cap@left + \scr@@makesinglelinecaption{#1}{#2}{#3}% + \cap@right + }\par\kern\dp\strutbox% + }% + }\kern-\dp\strutbox +} +\newcommand{\scr@@makesinglelinecaption}[3]{% + \usekomafont{caption}{\strut\ignorespaces + #1{{\usekomafont{captionlabel}{#2\captionformat}}}% + \ignorespaces #3\unskip}% +} +% \end{macrocode} +% \end{macro}^^A \scr@@makesinglelinecaption,\scr@makesinglelinecaption +% \begin{macro}{\scr@makemultilinecaption} +% \changes{v3.21}{2016/05/31}{added} +% The output of multi line captions. The arguments are same as above. +% \begin{macrocode} +\newcommand{\scr@makemultilinecaption}[3]{% + {% + \usefontofkomafont{caption}{% + \hb@xt@\hsize{% + \cap@left + \vbox{\hsize\cap@width\linewidth\hsize +% \end{macrocode} +% \changes{v3.25}{2017/11/15}{caption alignment added} +% First of all we have to use the ragged type depending in the float/caption +% type. If the float/caption type is unknown we can use the general ragged +% type only. +% \begin{macrocode} + \scr@ifundefinedorrelax{@captype}{% + \ClassWarning{\KOMAClassName}{% + `\string\caption' outside float.\MessageBreak + Seems you are using `\string\caption' outside a + float.\MessageBreak + Maybe you are using a package that uses + `\string\@makecaption'\MessageBreak + without setting `\string\@captype' before.\MessageBreak + Because I cannot detect the caption type, I'm using\MessageBreak + the empty one.% + }% + \let\@captype\@empty + }{}% + \scr@ifundefinedorrelax{ragged\@captype caption}{\raggedcaption}{% + \@nameuse{ragged\@captype caption}% + }% +% \end{macrocode} +% Maybe we have to us a full hanging caption. +% \changes{v3.25}{2017/11/15}{Using \cs{scr@endstrut} instead of \cs{unskip}\cs{strut}} +% \begin{macrocode} + \ifdofullc@p + \@hangfrom{% + \strut + \scr@smashdp{% + #1{% + \usekomafont{caption}{% + \usekomafont{captionlabel}{#2\captionformat}% + }% + }% + }% + }% + {\usekomafont{caption}{#3\scr@endstrut\par}}% +% \end{macrocode} +% Maybe a partial hanging caption with line break after the label. +% \begin{macrocode} + \else + \ifdim\cap@indent<\z@ + \strut + #1{% + \usekomafont{caption}{% + \usekomafont{captionlabel}{#2\captionformat\par}% + }% + }% + \noindent{\usekomafont{caption}{% + \hspace*{-\cap@indent}#3\scr@endstrut\par + }}% +% \end{macrocode} +% Or a line break after the label with full hanging. +% \begin{macrocode} + \else + \if@capbreak + \strut + #1{% + \usekomafont{caption}{% + \usekomafont{captionlabel}{#2\captionformat\par}% + }% + }% + \noindent\@hangfrom{\hspace*{\cap@indent}}% + {\usekomafont{caption}{#3\scr@endstrut\par}}% +% \end{macrocode} +% \changes{v3.27a}{2019/10/21}{missing usage of \fnt{caption} added} +% Or no line break but still with indent. +% \begin{macrocode} + \else + \@hangfrom{\scr@smashdp\strut\hspace*{\cap@indent}}% + {% + \hspace{-\cap@indent}% + \scr@smashdp{% + #1{\usekomafont{caption}{% + \usekomafont{captionlabel}{#2\captionformat}% + }% + }% + }% + {\usekomafont{caption}{#3\scr@endstrut}\par}% + }% + \fi + \fi + \fi +% \end{macrocode} +% Here we could also add the not hanging version without line break: +% \begin{macrocode} +%<*neverusethis> +% #1{{\usekomafont{caption}{% +% \usekomafont{captionlabel}{#2\captionformat}}}}% +% {\usekomafont{capion}{\ignorespaces #3\scr@endstrut\par}% +% +% \end{macrocode} +% But this is not needed, because it is the same like indent of 0. +% \begin{macrocode} + }% + \cap@right + }\par\kern\dp\strutbox + }% + }\kern-\dp\strutbox +} +% \end{macrocode} +% \begin{command}{\setcaptionalignment} +% \begin{macro}{\@setcaptionalignment} +% \changes{v3.25}{2017/11/15}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} replaced by \cs{Ifstr}} +% It is better for users to not define the \cs{raggedcaption} and +% \cs{ragged\dots caption} commands themselves to avoid mistakes. So we have +% \begin{quote} +% \cs{setcaptionalignment}\oarg{float}\marg{alignment} +% \end{quote} +% If \meta{float} is used, \cs{ragged\meta{float}caption} will be changed. If +% \meta{float} is not used, but \cs{@captype} is defined (and not \cs{relax}) +% \cs{ragged\cs{@captype}caption} is defined. If \meta{float} is empty or +% \cs{captype} is undefined (or \cs{relax}) and \meta{float} is not used, +% \cs{raggedcaption} will be changed. +% \begin{macrocode} +\newcommand*\setcaptionalignment{% + \kernel@ifnextchar [%] + {\@setcaptionalignment} + {% + \scr@ifundefinedorrelax{@captype}{\@setcaptionalignment}{% + \edef\reserved@a{\noexpand\@setcaptionalignment[{\@captype}]}\reserved@a + }% + }% +}% +\newcommand*\@setcaptionalignment[2][]{% +% \end{macrocode} +% If \meta{float} is not empty it should be the name of a already defined +% floating environment. Otherwise we report a warning, but nevertheless define +% the command. +% \begin{macrocode} + \IfArgIsEmpty{#1}{}{% + \expandafter\ifnum + \scr@ifundefinedorrelax{#1}{0}{\scr@ifundefinedorrelax{end#1}{0}{1}}=0 + \ClassWarning{\KOMAClassName}{% + float type `#1' defined not yet,\MessageBreak + but setting ragged mode for captions of\MessageBreak + float type `#1'% + }% + \fi + }% +% \end{macrocode} +% Depending on \meta{alignment} the command will be changed: +% \begin{description} +% \item[\texttt{j}] -- justified (\cs{ragged\dots caption} becomes \cs{relax}). +% \item[\texttt{l}] -- left aligned (\cs{ragged\dots caption} becomes +% \cs{raggedright}). +% \item[\texttt{r}] -- right aligned (\cs{ragged\dots caption} becomes +% \cs{raggedleft}). +% \item[\texttt{c}] -- centered (\cs{ragged\dots caption} becomes +% \cs{centering}. +% \end{description} +% Note: If \pkg{ragged2e} has been loaded, \cs{LaTeXraggedright}, +% \cs{LaTeXraggedleft} and \cs{LaTeXcentering} are used and the following +% additional \meta{alignment}s are supported: +% \begin{description} +% \item[\texttt{J}] -- justified (\cs{ragged\dots caption} becomes \cs{justifying}). +% \item[\texttt{L}] -- left aligned (\cs{ragged\dots caption} becomes +% \cs{RaggedRight}). +% \item[\texttt{R}] -- right aligned (\cs{ragged\dots caption} becomes +% \cs{RaggedLeft}). +% \item[\texttt{C}] -- centered (\cs{ragged\dots caption} becomes +% \cs{Centering}. +% \end{description} +% Without \pkg{ragged2e} the upper case letters are same like lower case +% letters, but additionally warn. Note: The implementation does also work, if +% \pkg*{scrlayer-scrpage} has defined \cs{LaTeXraggedright} etc. +% \begin{macrocode} + \def\reserved@a{#2}% + \Ifstr{\reserved@a}{j}{% + \expandafter\let\csname ragged#1caption\endcsname\@empty + }{% + \Ifstr{\reserved@a}{l}{% + \scr@ifundefinedorrelax{LaTeXraggedright}{% + \expandafter\let\csname ragged#1caption\endcsname\raggedright + }{% + \expandafter\let\csname ragged#1caption\endcsname\LaTeXraggedright + }% + }{% + \Ifstr{\reserved@a}{r}{% + \scr@ifundefinedorrelax{LaTeXraggedleft}{% + \expandafter\let\csname ragged#1caption\endcsname\raggedleft + }{% + \expandafter\let\csname ragged#1caption\endcsname\LaTeXraggedleft + }% + }{% + \Ifstr{\reserved@a}{c}{% + \scr@ifundefinedorrelax{LaTeXcentering}{% + \expandafter\let\csname ragged#1caption\endcsname\centering + }{% + \expandafter\let\csname ragged#1caption\endcsname\LaTeXcentering + }% + }{% + \Ifstr{\reserved@a}{J}{% + \scr@ifundefinedorrelax{justifying}{% + \scr@caption@raggede@warning{J}{\justifying}% + \expandafter\let\csname ragged#1caption\endcsname\@empty + }{% + \expandafter\let\csname ragged#1caption\endcsname\justifying + }% + }{% + \Ifstr{\reserved@a}{L}{% + \scr@ifundefinedorrelax{RaggedRight}{% + \scr@caption@raggede@warning{L}{\RaggedRight}% + \expandafter\let\csname ragged#1caption\endcsname\raggedright + }{% + \expandafter\let\csname ragged#1caption\endcsname\RaggedRight + }% + }{% + \Ifstr{\reserved@a}{R}{% + \scr@ifundefinedorrelax{RaggedLeft}{% + \scr@caption@raggede@warning{R}{\RaggedLeft}% + \expandafter\let\csname ragged#1caption\endcsname\raggedleft + }{% + \expandafter\let\csname ragged#1caption\endcsname\RaggedLeft + }% + }{% + \Ifstr{\reserved@a}{C}{% + \scr@ifundefinedorrelax{Centering}{% + \scr@caption@raggede@warning{C}{\Centering}% + \expandafter\let\csname ragged#1caption\endcsname\centering + }{% + \expandafter\let\csname ragged#1caption\endcsname\Centering + }% + }{% + \Ifstr{\reserved@a}{}{% + \expandafter\let\csname ragged#1caption\endcsname\relax + }{% + \ClassError{\KOMAClassName}{unknown alignment char `#2'}{% + \string\setcaptionalignment\space supports + only:\MessageBreak + \space\space c - centered captions,\MessageBreak + \space\space j - justified captions,\MessageBreak + \space\space l - left align captions,\MessageBreak + \space\space r - right aligned captions,\MessageBreak + \space\space C - centered captions with + `ragged2e',\MessageBreak + \space\space J - justified captions with + `ragged2e',\MessageBreak + \space\space L - left align captions with + `ragged2e',\MessageBreak + \space\space R - right aligned captions with + `ragged2e',\MessageBreak + or an empty argument to remove special + alignment.\MessageBreak + If you'd continue, I'd not change the alignment.% + }% + }% + }% + }% + }% + }% + }% + }% + }% + }% +} +% \end{macrocode} +% \begin{macro}{\scr@caption@raggede@warning} +% \changes{v3.25}{2017/11/15}{added} +% The warning used above. +% \begin{macrocode} +\newcommand*{\scr@caption@raggede@warning}[2]{% + \begingroup + \lowercase{\def\reserved@a{#1}}% + \ClassWarning{\KOMAClassName}{% + `\string#2' undefined!\MessageBreak + To avoid replacing caption alignment `#1' by `\reserved@a'\MessageBreak + you should load package `ragged2e' before using\MessageBreak + `\string\setcaptionalignment'% + }% + \endgroup +} +% \end{macrocode} +% \begin{command}{\raggedcaption} +% \changes{v3.25}{2017/11/15}{added} +% The default alignment is standard alignment (empty means no change). +% \begin{macrocode} +\newcommand*\raggedcaption{} +% \end{macrocode} +% \end{command}^^A \raggedcaption +% \end{macro}^^A \scr@caption@raggede@warning +% \end{macro}^^A \@setcaptionalignment +% \end{command}^^A \setcaptionalignment +% \end{macro}^^A \scr@makemultilinecaption +% \end{macro}^^A \@@makecaption +% \end{macro}^^A \@makecaption +% +% \subsection{Special treatment of \texorpdfstring{\pkg*{longtable}}{`longtable'} captions} +% +% \begin{macro}{\LT@makecaption} +% \changes{v2.8j}{2001/07/30}{added} +% \changes{v2.8k}{2001/08/15}{do nothing if \pkg{caption2} has been loaded or +% option \opt{origlongtable} has been used} +% \changes{v2.8q}{2001/11/18}{width and alignment by \KOMAScript{}} +% \changes{v2.8q}{2001/11/18}{using \cs{AfterPackage}} +% \changes{v2.9s}{2004/08/24}{vertical skips fixed by moving \cs{vskip}} +% \changes{v3.34}{2021/03/22}{special treatment of \pkg{caption2} removed} +% \begin{macro}{\LT@array,\LT@caption} +% \changes{v2.8q}{2001/11/18}{added} +% \begin{macro}{\scr@caption@before@longtable@warning} +% \changes{v2.98c}{2008/03/03}{added} +% The code for \pkg{longtable} has to be delayed until loading the package. +% \begin{macrocode} +\newcommand*{\scr@caption@before@longtable@warning}[1]{% + \ClassWarning{\KOMAClassName}{% + you've loaded package `#1' before package\MessageBreak + `longtable'!\MessageBreak + Because of this package `#1' isn't able to\MessageBreak + control `\string\caption' at longtables. \space After loading + \MessageBreak + package `#1' KOMA-Script also doesn't control\MessageBreak + `\string\caption'.\MessageBreak + I think, you should load package `caption' after\MessageBreak + package `longtable'% + }% +} +\AfterPackage{longtable}{% + \if@komalongtable + \renewcommand{\LT@makecaption}[3]{% + \noalign{% + \if@captionabove + \vskip\belowcaptionskip + \else + \vskip\abovecaptionskip + \fi + }% + \LT@mcol\LT@cols c{% + \hbox to\z@{\hss\parbox[t]\linewidth{% +% \end{macrocode} +% \changes{v3.25}{2017/11/15}{\cs{@captype} set to \texttt{table}} +% To make \cs{raggedtablecaption} available, \cs{@captype} has to be defined. +% \begin{macrocode} + \def\@captype{table}% + \@@makecaption{#1}{#2}{#3}% + \endgraf + \if@captionabove + \vskip\abovecaptionskip + \else + \vskip\belowcaptionskip + \fi + }% + \hss + }% + }% + }% + \newcommand*{\scr@LT@array}{}% + \let\scr@LT@array=\LT@array + \renewcommand*{\LT@array}{% + \let\scr@caption=\LT@caption + \def\captionabove{\noalign{\global\@captionabovetrue}% + \scr@caption}% + \def\captionbelow{\noalign{\global\@captionabovefalse}% + \scr@caption}% + \if@tablecaptionabove + \let\LT@caption=\captionabove + \else + \let\LT@caption=\captionbelow + \fi + \scr@LT@array + }% + \ClassInfo{\KOMAClassName}{% + longtable captions redefined% + }% + \fi +} +% \end{macrocode} +% \end{macro}^^A \scr@caption@before@longtable@warning +% \end{macro}^^A \LT@array,\LT@caption +% \end{macro}^^A \LT@makecaption +% +% \subsection{Special treatment of the \texorpdfstring{\pkg*{float}}{`float'} package} +% +% \begin{macro}{\fs@komaabove,\fs@komabelow,\floatc@komascript} +% \changes{v2.8j}{2001/07/30}{added} +% We define two float style for package \pkg{float}: \texttt{komaabove} and +% \texttt{komabelow}. However this is done independent of loading \pkg{float}, +% because maybe someone else also uses those styles (but I don't think so). +% Note: Internal macros of \pkg{float} has to be used for the definitions. +% \begin{macrocode} +\newcommand*{\fs@komaabove}{% + \let\@fs@capt\floatc@komascript + \let\@fs@pre\@empty + \def\@fs@mid{\vskip\abovecaptionskip}% + \let\@fs@post\@empty + \let\@fs@iftopcapt\iftrue} +\newcommand*{\fs@komabelow}{% + \let\@fs@capt\floatc@komascript + \let\@fs@pre\@empty + \def\@fs@mid{\vskip\abovecaptionskip}% + \let\@fs@post\@empty + \let\@fs@iftopcapt\iffalse} +\newcommand{\floatc@komascript}{\@@makecaption\@firstofone} +% \end{macrocode} +% \end{macro}^^A \fs@komabove,\fs@komabelow,\floatc@komascript +% +% +% \subsection{Where to place floats} +% +% \begin{counter}{topnumber} +% \begin{command}{\topfraction} +% \begin{counter}{bottomnumber} +% \begin{command}{\bottomfraction} +% \begin{counter}{totalnumber} +% \begin{command}{\textfraction} +% \begin{command}{\floatpagefraction} +% \begin{counter}{dbltopnumber} +% \begin{command}{\dbltopfraction} +% \begin{command}{\dblfloatpagefraction} +% These are constants used by the \LaTeX{} kernel to decide where to place a +% float. See the kernel documentation for more information. +% \begin{macrocode} +\setcounter{topnumber}{2} +\renewcommand*\topfraction{.7} +\setcounter{bottomnumber}{1} +\renewcommand*\bottomfraction{.3} +\setcounter{totalnumber}{3} +\renewcommand*\textfraction{.2} +\renewcommand*\floatpagefraction{.5} +\setcounter{dbltopnumber}{2} +\renewcommand*\dbltopfraction{.7} +\renewcommand*\dblfloatpagefraction{.5} +% \end{macrocode} +% \end{command} +% \end{command} +% \end{counter} +% \end{command} +% \end{command} +% \end{counter} +% \end{command} +% \end{counter} +% \end{command} +% \end{counter} +% +% +% \subsection{Caption without float} +% +% \begin{command}{\captionof} +% \changes{v3.05}{2009/07/08}{added} +% \changes{v3.09}{2011/03/21}{using internal \cs{scr@caption}} +% \changes{v3.09a}{2011/04/13}{handling of +% \opt{captions\quotechar=tableheading} and \opt{captions\quotechar=figureheading}} +% \begin{command}{\captionaboveof,\captionbelowof} +% \changes{v3.09}{2011/03/21}{added} +% We do not only provide a \cs{captionof} like \pkg{caption} or \pkg{capt-of} +% but also \cs{captionaboveof} and \cs{captionbelowof}. Users should not +% additionally use \pkg{capt-of}, but if they do, the definition of that +% package will be used instead (which is usually not, what the user want, but +% what they decided to do). +% \begin{macrocode} +\newcommand*{\captionof}[1]{\def\@captype{#1}% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname if@#1captionabove\endcsname\iftrue + \@captionabovetrue + \fi + \scr@caption} +\newcommand*{\captionaboveof}{\@captionabovetrue\captionof} +\newcommand*{\captionbelowof}{\@captionabovefalse\captionof} +\BeforePackage{capt-of}{\let\captionof\relax} +% \end{macrocode} +% \end{command}^^A \captionaboveof,\captionbelowof +% \end{command}^^A \captionof +% +% \begin{environment}{captionofbeside} +% \changes{v3.10}{2011/09/02}{added} +% The analogue environment to \cs{captionbeside} to be used outside +% floats. +% \begin{description} +% \item[ToDo:] Wouldn't it be a good idea to test for already defined +% \cs{@captype} inside \env{captionbeside} and then expect an additional first +% argument \meta{float}? In this case user could simply us \env{captionbeside} +% the same way as \env{captionofbeside}. +% \end{description} +% \begin{macrocode} +\newenvironment{captionofbeside}[1]{% + \def\@captype{#1}% + \captionbeside +}{% + \endcaptionbeside +} +% \end{macrocode} +% \end{environment} +% +% +% \subsection{Names} +% +% \begin{command}{\figurename,\tablename} +% \changes{v3.36}{2022/02/15}{explicit definition for English languages} +% The names to be used for the float labels. +% \begin{macrocode} +\newcommand*\figurename{Figure} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\figurename{Figure} +\newcommand*\tablename{Table} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\tablename{Table} +% \end{macrocode} +% \end{command}^^A \figurename,\tablename +% +% +% \subsection{Defining the \env{figure} environment} +% +% \begin{environment}{figure*,figure-,figure} +% \changes{v2.2c}{1995/05/25}{initial CJK support} +% \changes{v2.8h}{2001/07/19}{\cs{caption} is \cs{captionbelow}} +% \changes{v3.25}{2017/10/10}{re-implemented using \pkg*{tocbasic}} +% \changes{v3.36}{2022/02/22}{define additional non-float} +% \begin{counter}{figure} +% \changes{v3.25}{2017/10/10}{implicit by \cs{DeclareNewTOC}} +% \end{counter} +% We do the main job using \cs{DeclareNewTOC}: +% \begin{macrocode} +\DeclareNewTOC[% + type=figure, + float, + nonfloat, +% counterwithin=chapter, +% \end{macrocode} +% \begin{macro}{\fps@figure} +% Default placement (by \cs{DeclareNewTOC}) \textbf{t}op, \textbf{b}ottom, +% \textbf{p}age. +% \begin{macrocode} + floatpos=tbp, +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ftype@figure} +% Numerical float type 1 (by \cs{DeclareNewTOC}). +% \begin{macrocode} + floattype=1, +% \end{macrocode} +% \end{macro} +% \changes{v3.11c}{2013/03/01}{fix: one \cs{caption} change removed} +% \changes{v3.20}{2016/04/07}{internal redefinition of \cs{caption}} +% \begin{macrocode} + tocentryindent=1.5em, + tocentrynumwidth=2.3em, + atbegin=\def\caption{% + \if@figurecaptionabove\expandafter\captionabove + \else\expandafter\captionbelow\fi + } +% \end{macrocode} +% \begin{macro}{\ext@figure} +% Extension to be used (by \cs{DeclareNewTOC}) +% \begin{macrocode} +]{lof} +% \end{macrocode} +% \end{macro} +% \begin{command}{\thefigure} +% \changes{v2.97e}{2007/11/23}{using chapter number in main-matter only} +% \changes{v3.27}{2019/06/26}{\cs{relax} replaced by percent} +% \changes{v3.35}{2021/10/12}{use chapter number only of greater than zero} +% \changes{v3.35}{2021/10/12}{redefine \cs{thefigure} only if compatibility is +% less or equal 2.97d resp. less than 3.35} +% \begin{macrocode} +%<*book|report> +\expandafter\ifnum\scr@v@is@le{2.97d}% + \renewcommand*\thefigure{\thechapter.\@arabic\c@figure} +\fi +% +%<*article> +\expandafter\ifnum\scr@v@is@lt{3.35}% + \renewcommand*\thefigure{\@arabic\c@figure} +\fi +% +% \end{macrocode} +% \end{command} +% \begin{macro}{\fnum@figure} +% \begin{command}{\figureformat} +% \changes{v2.3c}{1995/08/06}{added} +% The print format of the number (by \cs{DeclareNewTOC}). +% \end{command} +% \end{macro} +% \end{environment} +% +% +% \subsection{Defining the \env{table} environment} +% +% Note: This is almost the same as defining the \env{figure} environment. So +% read the previous section first. +% +% \begin{environment}{table*,table-,table} +% \changes{v2.2c}{1995/05/25}{initial CJK support} +% \changes{v2.8h}{2001/07/19}{\cs{caption} is \cs{captionbelow}} +% \changes{v3.25}{2017/10/10}{re-implemented using \pkg*{tocbasic}} +% \changes{v3.36}{2022/02/22}{define additional non-float} +% \begin{counter}{table} +% \changes{v3.25}{2017/10/10}{implicit by \cs{DeclareNewTOC}} +% \end{counter} +% We do the main job using \cs{DeclareNewTOC}: +% \begin{macrocode} +\DeclareNewTOC[% + type=table, + float, + nonfloat, +% counterwithin=chapter, +% \end{macrocode} +% \begin{macro}{\fps@table} +% Default placement (by \cs{DeclareNewTOC}) \textbf{t}op, \textbf{b}ottom, +% \textbf{p}age. +% \begin{macrocode} + floatpos=tbp, +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ftype@table} +% Numerical float type 2 (by \cs{DeclareNewTOC}). +% \begin{macrocode} + floattype=2, +% \end{macrocode} +% \end{macro} +% \changes{v3.20}{2016/04/07}{internal redefinition of \cs{caption}} +% \begin{macrocode} + tocentryindent=1.5em, + tocentrynumwidth=2.3em, + atbegin=\def\caption{% + \if@tablecaptionabove\expandafter\captionabove + \else\expandafter\captionbelow\fi + } +% \end{macrocode} +% \begin{macro}{\ext@table} +% Extension to be used (by \cs{DeclareNewTOC}) +% \begin{macrocode} +]{lot} +% \end{macrocode} +% \end{macro} +% \begin{command}{\thetable} +% \changes{v2.97e}{2007/11/23}{using chapter number in main-matter only} +% \changes{v3.27}{2019/06/26}{\cs{relax} replaced by percent} +% \changes{v3.35}{2021/10/12}{use chapter number only of greater than zero} +% \changes{v3.35}{2021/10/12}{redefine \cs{thefigure} only if compatibility is +% less or equal 2.97d resp. less than 3.35} +% \begin{macrocode} +%<*book|report> +\expandafter\ifnum\scr@v@is@le{2.97d}% + \renewcommand*\thetable{\thechapter.\@arabic\c@table} +\fi +% +%<*article> +\expandafter\ifnum\scr@v@is@lt{3.35}% + \renewcommand*\thetable{\@arabic\c@table} +\fi +% +% +% \end{macrocode} +% \end{command} +% \begin{macro}{\fnum@table} +% \begin{command}{\tableformat} +% \changes{v2.3c}{1995/08/06}{added} +% The print format of the number (by \cs{DeclareNewTOC}). +% \end{command} +% \end{macro} +% \end{environment} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrkernel-fonts.dtx b/macros/latex/contrib/koma-script/scrkernel-fonts.dtx new file mode 100644 index 0000000000..7c4c1af971 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrkernel-fonts.dtx @@ -0,0 +1,2028 @@ +% \iffalse meta-comment +% ====================================================================== +% scrkernel-fonts.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrkernel-fonts.dtx 3874 2022-06-05 10:38:02Z kohm $ +%%%% (run: identify) +%
\expandafter\subsection +% \expandafter\section + \else +%
\expandafter\section +% \expandafter\chapter + \fi*% +} +% \end{macrocode} +% \begin{macro}{\idx@leveldowntrue,\idx@leveldownfalse,\ifidx@leveldown} +% \changes{v3.18}{2015/06/15}{added} +% The boolean switch \cs{ididx@leveldown} is needed to distinguish the heading +% level to be used (option values \opt{leveldown} and \opt{standardlevel}). +% \begin{macrocode} +\newif\ifidx@leveldown +\KOMA@key{index}{% + \KOMA@set@ncmdkey{index}{@tempa}{% + {notoc}{0},{nottotoc}{0},{default}{0},{plainheading}{0},% + {totoc}{1},{toc}{1},{notnumbered}{1},% + {numbered}{2},{totocnumbered}{2},{numberedtotoc}{2},{tocnumbered}{2},% + {numberedtoc}{2},% + {leveldown}{3},% + {standardlevel}{4}% + }{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \ifcase \@tempa\relax + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{noindex}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{indexnumbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{index}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{notoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{numbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{toc}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{noindex}% + \KOMA@kav@add{.\KOMAClassFileName}{index}{notoc}% + \renewcommand*{\idx@@heading}{% + \ifidx@leveldown +%
\expandafter\subsection +% \expandafter\section + \else +%
\expandafter\section +% \expandafter\chapter + \fi*% + }% + \or + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{noindex}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{indexnumbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{index}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{notoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{numbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{toc}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{index}% + \KOMA@kav@add{.\KOMAClassFileName}{index}{toc}% + \renewcommand*{\idx@@heading}{% + \ifidx@leveldown +%
\expandafter\subsection\expandafter* +% \expandafter\addsec + \else +%
\expandafter\addsec +% \expandafter\addchap + \fi + }% + \or + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{noindex}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{indexnumbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{index}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{notoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{numbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{toc}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{indexnumbered}% + \KOMA@kav@add{.\KOMAClassFileName}{index}{numbered}% + \renewcommand*{\idx@@heading}{% + \ifidx@leveldown +%
\expandafter\subsection +% \expandafter\section + \else +%
\expandafter\section +% \expandafter\chapter + \fi + }% + \or + \KOMA@kav@remove{.\KOMAClassFileName}{index}{leveldown}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{standardlevel}% + \KOMA@kav@add{.\KOMAClassFileName}{index}{leveldown}% + \idx@leveldowntrue + \or + \KOMA@kav@remove{.\KOMAClassFileName}{index}{leveldown}% + \KOMA@kav@remove{.\KOMAClassFileName}{index}{standardlevel}% + \KOMA@kav@add{.\KOMAClassFileName}{index}{standardlevel}% + \idx@leveldownfalse + \fi + \fi +} +\KOMA@kav@add{.\KOMAClassFileName}{toc}{noindex} +\KOMA@kav@add{.\KOMAClassFileName}{index}{notoc} +\KOMA@kav@add{.\KOMAClassFileName}{index}{standardlevel} +% \end{macrocode} +% \end{macro}^^A \ifidx@leveldown … +% \end{macro}^^A \idx@@heading +% \end{option}^^A index +% +% \begin{option}{idxtotoc} +% \changes{v2.3h}{1995/01/21}{new} +% \changes{v2.98c}{2008/03/04}{obsolete} +% \changes{v3.01a}{2008/11/20}{deprecated} +% \begin{macrocode} +\KOMA@DeclareDeprecatedOption{idxtotoc}{index=totoc} +% +% \end{macrocode} +% \end{option} +% +% +% \subsection{User commands and macros} +% +% \begin{command}{\setindexpreamble} +% \changes{v2.6c}{2000/06/10}{added} +% \changes{v2.6d}{2000/07/20}{\cs{let} replaced by \cs{newcommand*}} +% \changes{v2.95}{2002/07/01}{\cs{let} and \cs{def}} +% \begin{macro}{\index@preamble} +% \changes{v2.6c}{2000/06/10}{added} +% The index preamble is placed between the heading an the index itself. The +% user can define it using \cs{setindexpreamble}. \cs{index@preamble} is the +% storage. Note: \cs{setindexpreamble} does read the argument itself. This +% makes it easier to patch the user level command. But because of this it has +% to long. +% \begin{macrocode} +%<*body> +\newcommand*{\index@preamble}{} +\let\index@preamble=\relax +\newcommand{\setindexpreamble}[1]{\def\index@preamble{#1}} +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{macro}{\idx@heading} +% \changes{v2.3h}{1995/01/21}{added} +% \changes{v2.4c}{1996/04/04}{handling of running heads fixed} +% \changes{v2.4g}{1996/11/04}{two-columned index with \cls*{scrartcl} fixed} +% \changes{v2.6c}{2000/06/10}{support for index preamble after heading} +% \changes{v2.7j}{2001/05/27}{output of preamble moved to \env{theindex}} +% \changes{v2.9l}{2003/01/19}{\cs{if@twoside} replaced by \cs{if@openright}} +% \changes{v2.98c}{2008/03/04}{using \cs{idx@@heading}} +% \changes{v3.10}{2011/08/31}{using \cs{MakeMarkcase}} +% \changes{v3.10a}{2012/03/08}{brackets from previous change fixed} +% \changes{v3.12}{2013/09/24}{never make an index entry to the other ToC but +% the table of contents} +% \changes{v3.25}{2017/10/13}{using \cs{@mkright} and \cs{@mkdouble}} +% \changes{v3.26}{2018/09/03}{usage of \cs{addsecmark} or \cs{subsectionmark} +% instead of \cs{@mkright}} +% Macro to make the index heading and preamble. +% \begin{macrocode} +\newcommand*{\idx@heading}{% +% \if@openright\cleardoublepage\else\clearpage\fi% + \twocolumn[% +% \@chaptertolistsfalse + \idx@@heading{\indexname}]% + \ifidx@leveldown +% \addsecmark{\indexname}% +%<*article> + \begingroup + \c@secnumdepth=-\maxdimen + \subsectionmark{\indexname}% + \endgroup +%
+ \else + \@mkdouble{\MakeMarkcase{\indexname}}% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{theindex} +% \changes{v2.8d}{2001/07/05}{\cs{indexpagestyle} instead of \pstyle{plain}} +% \changes{v2.3h}{1995/01/21}{using \cs{idx@heading}} +% \changes{v2.7j}{2001/05/27}{output of preamble added} +% \changes{v3.19}{2015/08/25}{using \cs{indexpagestyle} only if not empty} +% This definition is similar to the definition of the standard classes. As +% addition it supports a preamble text, a variable heading, and resets the +% paragraph end line fill. +% \begin{macrocode} +\newenvironment{theindex}{% + \if@twocolumn + \@restonecolfalse + \else + \@restonecoltrue + \fi + \columnseprule \z@ + \columnsep 35\p@ +% \setchapterpreamble{\index@preamble}% + \idx@heading +%
\index@preamble\par\nobreak + \ifx\indexpagestyle\@empty\else\thispagestyle{\indexpagestyle}\fi + \parindent\z@ + \setlength{\parskip}{\z@ \@plus .3\p@}% + \setlength{\parfillskip}{\z@ \@plus 1fil}% + \let\item\@idxitem +}{% + \if@restonecol\onecolumn\else\clearpage\fi +} +% \end{macrocode} +% \begin{macro}{\@idxitem} +% A new index entry +% \begin{command}{\subitem,\subsubitem} +% \changes{v2.3g}{1996/01/14}{using \cs{@idxitem} saves memory} +% sub-entry, sub-sub-entry, +% \begin{command}{\indexspace} +% or (vertical) distance. +% \begin{macrocode} +\newcommand*\@idxitem{\par\hangindent 40\p@} +% \begin{macrocode} +\newcommand*\subitem{\@idxitem \hspace*{20\p@}} +\newcommand*\subsubitem{\@idxitem \hspace*{30\p@}} +\newcommand*\indexspace{% + \par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax +} +% \end{macrocode} +% \end{command}^^A \indexspace +% \end{command}^^A \subitem,\subsubitem +% \end{macro}^^A \@idxitem +% \end{environment}^^A theindex +% +% +% \subsection{Language dependent terms} +% +% \begin{command}{\indexname} +% \changes{v3.36}{2022/02/15}{explicit definition for English languages} +% The name of the index (used by \cs{idx@heading}). +% \begin{macrocode} +\newcommand*\indexname{Index} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\indexname{Index} +% +% \end{macrocode} +% \end{command} +% +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: + diff --git a/macros/latex/contrib/koma-script/scrkernel-language.dtx b/macros/latex/contrib/koma-script/scrkernel-language.dtx new file mode 100644 index 0000000000..7311e411f7 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrkernel-language.dtx @@ -0,0 +1,1790 @@ +% \iffalse meta-comment +% ====================================================================== +% scrkernel-language.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrkernel-language.dtx 3874 2022-06-05 10:38:02Z kohm $ +% +% \end{macrocode} +% \end{macro}^^A … \if@tocleft +% +% \begin{option}{toc} +% \changes{v2.98c}{2008/03/04}{added} +% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}} +% \changes{v3.12}{2013/08/26}{\cs{KOMA@options} replaced by +% \cs{KOMAExecuteOptions}} +% \changes{v3.12a}{2014/01/17}{\cs{KOMAExecuteOptions} replaced by +% \cs{KOMAoptions}} +% \changes{v3.18}{2015/06/15}{value \opt{\quotechar=indexnumbered} added} +% The main features of the table of contents can be configured by this +% option. +% \begin{macrocode} +%<*option> +\KOMA@key{toc}{% + \KOMA@set@ncmdkey{toc}{@tempa}{% +% \end{macrocode} +% \changes{v3.28}{2019/10/21}{several alias values added} +% The provided values are (aliases are also available): +% \begin{description} +% \item[\opt{=noindex}:] (default) for the index neither add an entry to the +% table of contents nor number the heading of the index. +% \end{description} +% \begin{macrocode} + {noindex}{0},{noidx}{0},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=index}:] for the index add an entry to the table of contents, +% but do not number the index. +% \end{description} +% \begin{macrocode} + {index}{1},{idx}{1},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=indexnumbered}:] number the index and therefore also add an +% entry to the table of contents. +% \end{description} +% \begin{macrocode} + {indexnumbered}{2},{idxnumbered}{2},{numberedindex}{2},{numberedidx}{2},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=nolistof}:] (default) for any list with category/owner +% \texttt{float} neither add an entry to the table of contents, nor +% number the heading of the list of the floats. +% \end{description} +% \begin{macrocode} + {nolistof}{3},{nolistsof}{3},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=listof}:] for each list with category/owner \texttt{float} add an +% entry to the table of contents, but do not number the list of the floats. +% \end{description} +% \begin{macrocode} + {listof}{4},{listsof}{4},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=listofnumbered}:] for each list of category/owner \texttt{float} +% number the list of floats and therefore add an entry to table of contents. +% \end{description} +% \begin{macrocode} + {listofnumbered}{5},{numberedlistof}{5},% + {listsofnumbered}{5},{numberedlistsof}{5},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=nobibliography}:] (default) for the bibliography neither add an +% entry to the table if contents nor number the heading. +% \end{description} +% \begin{macrocode} + {nobibliography}{6},{nobib}{6},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=bibliography}:] for the bibliography add an entry to the table +% of contents, but do not number the bibliography. +% \end{description} +% \begin{macrocode} + {bibliography}{7},{bib}{7},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=bibliographynumbered}:] number the bibliography and therefore +% add an entry to the table of contents. +% \end{description} +% \begin{macrocode} + {bibliographynumbered}{8},{bibnumbered}{8},{numberedbibliography}{8},% + {numberedbib}{8},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=flat}:] use the flat version of the table of contents (all +% numbers are at one column, all texts in another one). +% \end{description} +% \begin{macrocode} + {flat}{9},{left}{9},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=graduated}:] (default) use a hierarchical indented table of +% contents similar to the standard classes. +% \end{description} +% \begin{macrocode} + {graduated}{10},{indent}{10},{indented}{10},% +% \end{macrocode} +% \changes{v3.12}{2014/09/24}{values \opt{\quotechar=numberline} and +% \opt{\quotechar=nonumberline} etc. added} +% \begin{description} +% \item[\opt{=numberline}:] indent entries without number like entries with +% number. +% \end{description} +% \begin{macrocode} + {indenttextentries}{11},{indentunnumbered}{11},{numberline}{11},% +% \end{macrocode} +% \begin{macrocode} +% \begin{description} +% \item[\opt{nonumberline}:] (default) do not indent the first line of an +% entry without number +% \end{description} +% \begin{macrocode} + {leftaligntextentries}{12},{leftalignunnumbered}{12},{nonumberline}{12},% +% \end{macrocode} +% \changes{v3.15}{2015/01/14}{values \opt{\quotechar=chapterentrywithdots}, +% \opt{\quotechar=chapterentrywithoutdot} resp. +% \opt{\quotechar=sectionentrywithdots}, +% \opt{\quotechar=sectionentrywithoutdot} added} +% \begin{description} +% \item[\opt{=chapterentrywithdots}:] classes with \cs{chapter} provide a dot +% filler also for chapter entries. +% \end{description} +% \begin{macrocode} +% {chapterentrywithdots}{13},{chapterentrydotfill}{13}, +% \end{macrocode} +% \begin{description} +% \item[\opt{=chapterentrywithoutdots}:] (default) classes with \cs{chapter} use +% a space filler for chapter entries. +% \end{description} +% \begin{macrocode} +% {chapterentrywithoutdots}{14},{chapterentryfill}{14}% +% \end{macrocode} +% \begin{description} +% \item[\opt{=sectionentrywithdots}:] classes without \cs{chapter} use +% dot filler also for section entries. +% \end{description} +% \begin{macrocode} +%
{sectionentrywithdots}{13},{sectionentrydotfill}{13}, +% \end{macrocode} +% \begin{description} +% \item[\opt{=sectionentrywithoutdots}:] (default) classes without +% \cs{chapter} use a space filler for section entries. +% \end{description} +% \begin{macrocode} +%
{sectionentrywithoutdots}{14},{sectionentryfill}{14}% + }{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \ifcase \@tempa\relax % noindex + \KOMAoptions{index=notoc}% + \or % index + \KOMAoptions{index=totoc}% + \or % indexnumbered + \KOMAoptions{index=numbered}% + \or % listof + \KOMAoptions{listof=notoc}% + \or % nolistof + \KOMAoptions{listof=totoc}% + \or % listofnumbered + \KOMAoptions{listof=numbered}% + \or % nobibliography + \KOMAoptions{bibliography=nottotoc}% + \or % bibliography + \KOMAoptions{bibliography=totoc}% + \or % bibliographynumbered + \KOMAoptions{bibliography=totocnumbered}% + \or % flat + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{flat}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{graduated}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{flat}% + \@toclefttrue + \or % graduated + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{flat}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{graduated}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{graduated}% + \@tocleftfalse + \or % indenttextentries + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{indenttextentries}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{leftaligntextentries}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{indenttextentries}% + \expandafter\setuptoc\expandafter{\ext@toc}{numberline}% + \or % leftaligntextentries + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{indenttextentries}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{leftaligntextentries}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{leftaligntextentries}% + \expandafter\unsettoc\expandafter{\ext@toc}{numberline}% + \or % chapterentrywithdots/sectionentrywithdots +% \KOMAoptions{chapterentrydots=true}% +%
\KOMAoptions{sectionentrydots=true}% + \or % chapterentrywithoutdots/sectionentrywithoutdots +% \KOMAoptions{chapterentrydots=false}% +%
\KOMAoptions{sectionentrydots=false}% + \fi + \fi +} +% +% \end{macrocode} +% \end{option} +% +% \begin{option}{tocleft,tocindent} +% \changes{v2.8q}{2001/11/14}{added} +% \changes{v2.98c}{2008/03/05}{obsolet} +% \changes{v3.01a}{2008/11/20}{deprecated} +% \begin{macrocode} +%<*option> +\KOMA@DeclareDeprecatedOption{tocleft}{toc=flat} +\KOMA@DeclareDeprecatedOption{tocindent}{toc=graduated} +% +% \end{macrocode} +% \end{option}^^A tocleft,tocindent +% +% \begin{command}{\contentsname} +% \begin{command}{\listoftocname} +% \changes{v3.00}{2008/07/03}{added to be used by \pkg*{tocbasic}} +% \changes{v3.27}{2019/05/11}{language dependency added} +% The name of the table of contents. +% \begin{macrocode} +%<*body> +\newcommand*\contentsname{Contents} +\newcommand*\listoftocname{\contentsname} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\contentsname{Contents}% +% +% \end{macrocode} +% \end{command}^^A \listoftocname +% \end{command}^^A \contentsname +% +% \begin{counter}{tocdepth} +% The counter is used to define, down to which level the entries are shown in +% the table of contents (resp. list of floats, because the same value is used +% there). Note: We don't use symbolic values here, because usage of symbolic +% values would add an additional order dependency with the corresponding +% \cs{DeclareSecionCommand}. +% \begin{macrocode} +%<*body> +%\setcounter{tocdepth}{2} +%
\setcounter{tocdepth}{3} +% +% \end{macrocode} +% \end{counter}^^A tocdepth +% +% \begin{macro}{\toc@heading} +% \changes{v2.3h}{1995/01/21}{added for \cls*{scrartcl}} +% \changes{v2.95}{2002/06/28}{added for \cls*{scrreprt}and \cls*{scrbook}} +% \changes{v3.00}{2008/07/04}{deprecated} +% \changes{v3.10}{2011/08/31}{using \cs{MakeMarkcase}} +% \changes{v3.30}{2020/02/24}{white space at end of warning removed} +% This has been defined before usage of \pkg*{tocbasic}. Internally it is not +% used any longer. +% \begin{macrocode} +%<*body> +\newcommand*\toc@heading{% + \ClassWarning{\KOMAClassName}{% + usage of deprecated \string\toc@heading!\MessageBreak + You should use the features of package `tocbasic'\MessageBreak + instead of \string\toc@heading.\MessageBreak + Definition of \string\toc@heading\space may be removed from\MessageBreak + KOMA-Script soon, so it should not be used% + }% +%
\section*{\contentsname}% +% \chapter*{\contentsname}% + \@mkboth{\MakeMarkcase{\contentsname}}{\MakeMarkcase{\contentsname}}% +} +% +% \end{macrocode} +% \end{macro}^^A \toc@heading +% +% \begin{macro}{\toc@l@number} +% \changes{v2.8q}{2001/11/14}{added} +% The number length storage used by \cs{before@starttoc} for \meta{extension} +% \texttt{toc}. For safety we just \emph{reserve} it. +% \begin{macrocode} +%<*body> +\newcommand*{\toc@l@number}{} +% +% \end{macrocode} +% \end{macro}^^A \toc@l@number +% +% \begin{command}{\tableofcontents} +% \changes{v2.3h}{1995/01/21}{using \cs{toc@heading}} +% \changes{v2.8l}{2001/08/16}{group added an \len{parskip} set to 0} +% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse} and \cs{@parskip@indent}} +% \changes{v2.8q}{2001/11/14}{\cs{if@tocleft} changed} +% \changes{v2.95}{2002/06/28}{\cls*{scrartcl} also uses \cs{if@tocleft}} +% \changes{v2.95}{2004/11/05}{\cs{@parskipfalse} and \cs{@parskip@indent} replaced} +% \changes{v3.00}{2008/07/04}{re-implementation using \pkg*{tocbasic}} +% The table of contents. See the note above about the local change of +% \cs{if@dynlist}. +% \begin{macrocode} +%<*body> +\newcommand*{\tableofcontents}{% + \begingroup + \let\if@dynlist\if@tocleft + \expandafter\listoftoc\expandafter{\ext@toc}% + \endgroup +} +% +% \end{macrocode} +% \end{command}^^A \tableofcontents +% +% \begin{command}{\addtocentrydefault} +% \changes{v3.08}{2010/11/01}{added} +% \changes{v3.12}{2013/09/24}{using new \pkg*{tocbasic} macro +% \cs{tocbasic@addxcontentsline}} +% Instead of making the entries into the table of contents directly with +% the \LaTeX{} low level command \cs{addcontentsline} we provide a class +% specific low level user command +% \begin{quote} +% \cs{addtocentrydefault}\marg{level name}\marg{formatted number}\marg{entry text} +% \end{quote} +% that uses the \pkg*{tocbasic} package author command +% \cs{tocbasic@addctontentsline}. We cannot use \cs{addxcontentsline} because +% this will run \cs{add\meta{level name}\meta{toc}entry} if available and +% \cs{addtocentrydefault} is used by the entry commands +% \cs{addchaptertocentry}, \cs{addsectiontocentry}. So \cs{addtoentrydefault} +% is a helper for the callbacks from \cs{addxcontentsline} and needs to use +% the package author interface instead of the user interface. For not numbered +% entries the \meta{formatted number} should be empty (not only expand to no +% output). Note: Entries with empty \meta{entry text} will be omitted. +% \begin{macrocode} +%<*body> +\newcommand{\addtocentrydefault}[3]{% + \expandafter\tocbasic@addxcontentsline\expandafter{\ext@toc}{#1}{#2}{#3}% +} +% +% \end{macrocode} +% \end{command} +% +% +% \subsection{The lists of floats (or similar environments)} +% +% The list of tables, list of figures and similar lists of environments with +% category/owner \texttt{float} are very similar to the table of contents. But +% they use a own set of options and also some commands. +% +% \changes{v3.25}{2017/10/10}{extension \texttt{lof} not added explicitely} +% \changes{v3.25}{2017/10/10}{extension \texttt{lot} not added explicitely} +% Note: We must not add extensions \texttt{lof} and \texttt{lot} explicitely, +% because these files will be prepared using \cs{DeclareNewTOC} that also +% registers the extension. +% +% \changes{v3.01}{2008/11/13}{auto-activation of feature \texttt{onecolumn}} +% Set feature \texttt{onecolumn} for every float list file. +% \begin{macrocode} +%<*prepare&(book|report)> +\AtAddToTocList[float]{\setuptoc{\@currext}{onecolumn}}% +% +% \end{macrocode} +% +% \begin{macro}{\float@@listhead} +% \changes{v2.98c}{2008/03/05}{added} +% \changes{v3.01}{2008/11/14}{deprecated} +% Prints only the heading, nothing else. The heading text is the argument. +% \begin{macrocode} +%<*option> +\newcommand*{\float@@listhead}{% +%
\section* +% \chapter* +} +% +% \end{macrocode} +% \end{macro}^^A \float@@listhead +% +% \begin{macro}{\@dynlistfalse,\@dynlisttrue,\if@dynlist} +% \changes{v2.8q}{2001/11/14}{added} +% The switch to select the flat (\cs{@dynlisttrue}) or graduated +% (\cs{@dynlistfalse)} list type. +% \begin{macrocode} +%<*option> +\newif\if@dynlist +% +% \end{macrocode} +% \end{macro}^^A … \if@dynlist +% +% \begin{option}{listof} +% \changes{v2.98c}{2008/03/05}{added} +% \changes{v3.06}{2010/06/02}{options for \pkg*{tocbasic} features do not only +% work for the currently defined lists but all future lists of category +% \texttt{float}} +% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}} +% \changes{v3.12}{2013/06/26}{\cs{KOMA@options} replaced by +% \cs{KOMAExecuteOptions}} +% \changes{v3.12a}{2014/01/17}{\cs{KOMAExecuteOptions} replaced by +% \cs{KOMAoptions}} +% The main features of the lists of floats can be configured by this option. +% \begin{macrocode} +%<*option> +\KOMA@key{listof}{% + \KOMA@set@ncmdkey{listof}{@tempa}{% +% \end{macrocode} +% The provided values are (aliases are also available): +% \begin{description} +% \item[\opt{=notoc}:] (default) neither number the lists of floats nor add +% entries to them into the table of contents. +% \end{description} +% \begin{macrocode} + {notoc}{0},{nottotoc}{0},{plainheading}{0},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=totoc}:] do not number the lists of floats but nevertheless add +% an entry for each of them to the table of contents. +% \end{description} +% \begin{macrocode} + {totoc}{1},{toc}{1},{notnumbered}{1},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=numbered}:] number the lists of floats and therefore also add an +% for each of them to the table of contents. +% \end{description} +% \begin{macrocode} + {numbered}{2},{totocnumbered}{2},{tocnumbered}{2},{numberedtotoc}{2},% + {numberedtoc}{2},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=flat}:] use the flat version of the lists of floats (all +% numbers are at one column, all texts in another one). Usually this only +% removes the indent and calculates the needed width of the numbers. But, +% e.g., if chapters are added, it does work over all levels. +% \end{description} +% \begin{macrocode} + {flat}{3},{left}{3},% +% \item[\opt{=graduated}:] (default) use hierarchical indented lists of +% floats similar to the standard classes. +% \end{description} +% \begin{macrocode} + {graduated}{4},{indent}{4},{indented}{4},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=leveldown}:] Use for the lists of floats a section hierarchy one +% level below the standard level. +% \end{description} +% \begin{macrocode} + {leveldown}{5}, +% \end{macrocode} +% \changes{v3.25}{2017/12/04}{value \opt{\quotechar=standardlevel} added} +% \begin{description} +% \item[\opt{=standardlevel}:] (default) Use for the lists of floats the +% standard hierarchy. +% \end{description} +% \begin{macrocode} + {standardlevel}{6}, +% \end{macrocode} +% \changes{v3.06}{2010/05/18}{value \opt{\quotechar=entryprefix} added} +% \begin{description} +% \item[\opt{=entryprefix}:] Prefix the number of each entry with +% \cs{listof\meta{toc}entryprefix}. Note: This is more or less senseless and +% does not work correctly with chapter entries in the lists of floats. It is +% recommended to reconfigure the entries, e.g., using +% \cs{DeclareTOCStyleEntry} or redefining \cs{add\meta{level +% name}\meta{toc}entry} instead. Note: \opt{listof=entryprefix} also +% activates \opt{listof=flat}. +% \end{description} +% \begin{macrocode} + {entryprefix}{7}, +% \end{macrocode} +% \changes{v3.12}{2014/09/24}{values \opt{\quotechar=numberline} and +% \opt{\quotechar=nonumberline} etc. added} +% \begin{description} +% \item[\opt{=numberline}:] indent entries without number like entries with +% number. +% \end{description} +% \begin{macrocode} + {indenttextentries}{8},{indentunnumbered}{8},{numberline}{8},% +% \end{macrocode} +% \begin{macrocode} +% \begin{description} +% \item[\opt{=nonumberline}:] (default) do not indent the first line of an +% entry without number +% \end{description} +% \begin{macrocode} + {leftaligntextentries}{9},{leftalignunnumbered}{9},{nonumberline}{9}% +% \end{macrocode} +% \begin{description} +% \item[\opt{=chapterentry}:] \cls*{scrbook} and \cls*{scrreprt} provides +% chapter entries into the lists of floats. +% \end{description} +% \begin{macrocode} +%<*book|report> + ,{chapterentry}{10},{withchapterentry}{10},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=nochaptergap}:] Alternatively the lists of floats can ignore chapters. +% \end{description} +% \begin{macrocode} + {nochaptergap}{11},{ignorechapter}{11},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=chaptergapsmall}:] (default) chapters can add a small +% vertical distance into the lists of floats. +% \end{description} +% \begin{macrocode} + {chaptergapsmall}{12},{smallchaptergap}{12},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=chaptergapline}:] chapters can add an empty line to the lists of +% floats. +% \end{description} +% \begin{macrocode} + {chaptergapline}{13},{onelinechaptergap}{13}% +% + }{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \ifcase \@tempa\relax % notoc + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nolistof}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{listof}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{listofnumbered}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{nolistof}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{notoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{totoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{numbered}% + \KOMA@kav@add{.\KOMAClassFileName}{listof}{notoc}% + \renewcommand*{\float@@listhead}{% +%
\section* +% \chapter* + }% + \doforeachtocfile[float]{% + \unsettoc{\@currext}{numbered}% + \unsettoc{\@currext}{totoc}% + }% + \AtAddToTocList[float]{% + \unsettoc{\@currext}{numbered}% + \unsettoc{\@currext}{totoc}% + }% + \or% totoc + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nolistof}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{listof}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{listofnumbered}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{listof}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{notoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{totoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{numbered}% + \KOMA@kav@add{.\KOMAClassFileName}{listof}{totoc}% + \renewcommand*{\float@@listhead}{% +%
\addsec +% \addchap + }% + \doforeachtocfile[float]{% + \unsettoc{\@currext}{numbered}% + \setuptoc{\@currext}{totoc}% + }% + \AtAddToTocList[float]{% + \unsettoc{\@currext}{numbered}% + \setuptoc{\@currext}{totoc}% + }% + \or% numbered + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nolistof}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{listof}% + \KOMA@kav@remove{.\KOMAClassFileName}{toc}{listofnumbered}% + \KOMA@kav@add{.\KOMAClassFileName}{toc}{listofnumbered}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{notoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{totoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{numbered}% + \KOMA@kav@add{.\KOMAClassFileName}{listof}{numbered}% + \renewcommand*{\float@@listhead}{% +%
\section +% \chapter + }% + \doforeachtocfile[float]{% + \setuptoc{\@currext}{numbered}% + \setuptoc{\@currext}{totoc}% + }% + \AtAddToTocList[float]{% + \setuptoc{\@currext}{numbered}% + \setuptoc{\@currext}{totoc}% + }% + \or% flat + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{flat}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{graduated}% + \KOMA@kav@add{.\KOMAClassFileName}{listof}{flat}% + \@dynlisttrue + \or% graduated + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{flat}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{graduated}% + \KOMA@kav@add{.\KOMAClassFileName}{listof}{graduated}% + \@dynlistfalse + \or% leveldown + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{standardlevel}% + \KOMA@kav@add{.\KOMAClassFileName}{listof}{leveldown}% + \doforeachtocfile[float]{% + \setuptoc{\@currext}{leveldown}% + }% + \AtAddToTocList[float]{% + \setuptoc{\@currext}{leveldown}% + }% + \or% standardlevel + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{leveldown}% + \KOMA@kav@add{.\KOMAClassFileName}{listof}{standardlevel}% + \doforeachtocfile[float]{% + \unsettoc{\@currext}{leveldown}% + }% + \AtAddToTocList[float]{% + \unsettoc{\@currext}{leveldown}% + }% + \or% entryprefix + \KOMA@kav@add{.\KOMAClassFileName}{listof}{entryprefix}% + \@dynlisttrue + \doforeachtocfile[float]{% + \BeforeStartingTOC[\@currext]{% + \scr@ifundefinedorrelax{listof\@currext entryname}{}{% + \expandafter\def\expandafter\numberline@prefix + \expandafter{\csname listof\@currext entryname\endcsname + \nobreakspace}% + }% + }% + }% + \AtAddToTocList[float]{% + \BeforeStartingTOC[\@currext]{% + \scr@ifundefinedorrelax{listof\@currext entryname}{}{% + \expandafter\def\expandafter\numberline@prefix + \expandafter{\csname listof\@currext entryname\endcsname + \nobreakspace}% + }% + }% + }% + \or% indenttextentries + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{indenttextentries}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{leftaligntextentries}% + \KOMA@kav@add{.\KOMAClassFileName}{listof}{indenttextentries}% + \doforeachtocfile[float]{% + \setuptoc{\@currext}{numberline}% + }% + \AtAddToTocList[float]{% + \setuptoc{\@currext}{numberline}% + } + \or% leftaligntextentries + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{indenttextentries}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{leftaligntextentries}% + \KOMA@kav@add{.\KOMAClassFileName}{listof}{leftaligntextentries}% + \doforeachtocfile[float]{% + \unsettoc{\@currext}{numberline}% + }% + \AtAddToTocList[float]{% + \unsettoc{\@currext}{numberline}% + } +%<*book|report> + \or% chapterentry + \KOMAoptions{chapteratlists=entry}% + \or% chaptergap + \KOMAoptions{chapteratlists=\z@}% + \or% chaptergapsmall + \KOMAoptions{chapteratlists=10\p@}% + \or% chaptergapline + \KOMAoptions{chapteratlists=\baselineskip}% +% + \fi + \fi +} +\KOMA@kav@add{.\KOMAClassFileName}{toc}{nolistof} +\KOMA@kav@add{.\KOMAClassFileName}{listof}{notoc} +\KOMA@kav@add{.\KOMAClassFileName}{listof}{graduated} +\KOMA@kav@add{.\KOMAClassFileName}{listof}{leftaligntextentries} +% +% \end{macrocode} +% \end{option}^^A listof +% +% \begin{option}{liststotoc} +% \changes{v2.3h}{1995/01/21}{added} +% \changes{v2.8b}{2001/06/26}{using \cs{float@headings}} +% \changes{v2.4a}{1996/03/13}{\cs{listtabelname} relaces by \cs{listtablename}} +% \changes{v2.8g}{2001/07/18}{\cs{float@headings} renamed to +% \cs{float@listhead}} +% \changes{v2.98c}{2008/03/05}{obsolet} +% \changes{v3.01a}{2008/11/20}{deprecated} +% \begin{macrocode} +%<*option> +\KOMA@DeclareDeprecatedOption{liststotoc}{listof=totoc} +% +% \end{macrocode} +% \end{option}^^A liststotoc +% +% \begin{option}{liststotocnumbered} +% \changes{v2.8q}{2002/04/08}{added} +% \changes{v2.9p}{2003/07/07}{number also in the running head} +% \changes{v2.98c}{2008/03/05}{obsolet} +% \changes{v3.01a}{2008/11/20}{deprecated} +% \begin{macrocode} +%<*option> +\KOMA@DeclareDeprecatedOption{liststotocnumbered}{listof=numbered} +% +% \end{macrocode} +% \end{option}^^A liststotocnumbered +% +% +% \begin{option}{listsleft,listsindent} +% \changes{v2.8q}{2001/11/14}{added} +% \changes{v2.98c}{2008/03/05}{obsolet} +% \changes{v3.01a}{2008/11/20}{deprecated} +% \begin{macrocode} +%<*option> +\KOMA@DeclareDeprecatedOption{listsleft}{listof=flat} +\KOMA@DeclareDeprecatedOption{listsindent}{listof=graduated} +% +% \end{macrocode} +% \end{option}^^A listsleft,listsindent +% +% \begin{option}{chapteratlists} +% \changes{v2.96a}{2006/12/03}{added} +% \changes{v2.98c}{2008/03/05}{not with \cls*{scrartcl}} +% \changes{v3.12a}{2014/01/17}{missing \cs{FamilyKeyStateProcessed} added} +% \changes{v3.17}{2015/03/12}{internal value storage} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{macro}{\@chaptertolistsfalse,\@chaptertoliststrue,\if@chaptertolists} +% \changes{v2.96a}{2006/12/03}{added} +% \changes{v3.12}{2013/09/24}{don't add lists to lists} +% \begin{macro}{\@chapterlistsgap} +% \changes{v2.96a}{2006/12/03}{added} +% We can do several special treatments inside the lists of floats, when a new +% chapter starts. +% \begin{macrocode} +%<*option&(book|report)> +\newcommand*{\@chapterlistsgap}{10\p@} +\newif\if@chaptertolists\@chaptertolistsfalse +\KOMA@key{chapteratlists}[entry]{% + \FamilyKeyStateProcessed + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{chapterentry}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{chaptergap}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{chaptergapsmall}% + \KOMA@kav@remove{.\KOMAClassFileName}{listof}{chaptergapline}% +% \end{macrocode} +% \begin{description} +% \item[\opt{=entry}:] add the chapter heading also to the lists of +% float. \cs{@chaptertolisttrue} is used and the distance \cs{@chapterlistgap} +% is set to \len{z@}. +% \end{description} +% \begin{macrocode} + \Ifstr{#1}{entry}{% + \@chaptertoliststrue\renewcommand*{\@chapterlistsgap}{\z@}% + \KOMA@kav@replacevalue{.\KOMAClassFileName}{chapteratlists}{entry}% + \KOMA@kav@add{.\KOMAClassFileName}{listof}{chapterentry}% + }{% +% \end{macrocode} +% \begin{description} +% \item[\opt{=\meta{distance}}:] use a vertical \meta{distance}. +% \end{description} +% \begin{macrocode} + \@chaptertolistsfalse\renewcommand*{\@chapterlistsgap}{#1}% + \KOMA@kav@replacevalue{.\KOMAClassFileName}{chapteratlists}% + {\@chapterlistsgap}% + \def\reserved@a{\z@}% + \ifx\@chapterlistsgap\reserved@a + \KOMA@kav@add{.\KOMAClassFileName}{listof}{chaptergap}% + \else + \def\reserved@a{10\p@}% + \ifx\@chapterlistsgap\reserved@a + \KOMA@kav@add{.\KOMAClassFileName}{listof}{chaptergapsmall}% + \else + \def\reserved@a{\baselineskip}% + \ifx\@chapterlistsgap\reserved@a + \KOMA@kav@add{.\KOMAClassFileName}{listof}{chaptergapline}% + \fi + \fi + \fi + }% +} +\BeforeTOCHead{\@chaptertolistsfalse} +\KOMA@kav@add{.\KOMAClassFileName}{chapteratlists}{10\p@}% +\KOMA@kav@add{.\KOMAClassFileName}{listof}{chaptergapsmall}% +% +% \end{macrocode} +% \end{macro}^^A \@chapterlistgap +% \end{macro}^^A \if@chaptertolists +% \end{option}^^A chapteratlists +% +% +% \begin{macro}{\float@listhead} +% \changes{v2.8b}{2001/06/26}{added} +% \changes{v2.8g}{2001/07/18}{\cs{float@headings} renamed to +% \cs{float@listhead}} +% \changes{v2.98c}{2008/03/05}{using \cs{float@@listhead}} +% \changes{v3.00}{2008/07/04}{deprecated} +% \changes{v3.10}{2011/08/31}{using\cs{MakeMarkcase}} +% In 2001 I've designed an interface to allow other package authors to set the +% headings of lists of floats the same way \KOMAScript{} classes do. Anselm +% Lingnau accepted this interface (but did not like may macro names, so these +% were changed in \KOMAScript{} 2.8g). But for \KOMAScript{} 3 I've needed a +% more powerful interface. So this became deprecated. Unfortunately Anselm is +% not willing to use the new \pkg*{tocbasic} for \pkg{float}. See +% \pkg*{scrhack} for a solution and how \pkg{float} could benefit from using +% \pkg*{tocbasic}. +% \begin{macrocode} +%<*body> +\newcommand*{\float@listhead}[1]{% + \scr@float@listhead@warning + \float@@listhead{#1}% + \@mkboth{\MakeMarkcase{#1}}{\MakeMarkcase{#1}}% +% \end{macrocode} +% \changes{v2.8q}{2001/11/14}{support for dynamic number width} +% This is the best occasion to also add the code for the dynamic number width. +% \begin{macrocode} + \if@dynlist% + \newcommand*{\scr@starttoc}{}% + \let\scr@starttoc=\@starttoc + \renewcommand*{\@starttoc}[1]{% + \before@starttoc{##1}\scr@starttoc{##1}\after@starttoc{##1}% + }% + \fi +} +% \end{macrocode} +% \begin{macro}{\scr@float@listhead@warning,\scr@float@addtolists@warning} +% \changes{v3.01}{2008/11/13}{added} +% \changes{v3.12}{2013/09/25}{text changed} +% \changes{v3.12a}{2014/03/05}{text corrected} +% \changes{v3.30}{2020/02/25}{spurious space at end of warning message +% removed} +% Here the warning messages, that are used for using the deprecated interface. +% \begin{macrocode} +\newcommand*{\scr@float@listhead@warning}{% + \ClassWarning{\KOMAClassName}{% + \string\float@listhead\space detected!\MessageBreak + Implementation of \string\float@listhead\space became\MessageBreak + deprecated in KOMA-Script v3.01 2008/11/14 and\MessageBreak + has been replaced by several more flexible\MessageBreak + features of package `tocbasic`.\MessageBreak + Maybe implementation of \string\float@listhead\space will\MessageBreak + be removed from KOMA-Script soon.\MessageBreak + Loading of package `scrhack' may help to\MessageBreak + avoid this warning, if you are using a\MessageBreak + a package that still implements the\MessageBreak + deprecated \string\float@listhead\space interface% + }% +} +\newcommand*{\scr@float@addtolists@warning}{% + \ClassWarningNoLine{\KOMAClassName}{% + \string\float@addtolists\space detected!\MessageBreak + Implementation of \string\float@addtolist\space became\MessageBreak + deprecated in KOMA-Script v3.01 2008/11/14 and\MessageBreak + has been replaced by several more flexible\MessageBreak + features of package `tocbasic`.\MessageBreak + Since Version 3.12 support for deprecated\MessageBreak + \string\float@addtolist\space interface has been\MessageBreak + restricted to only some of the KOMA-Script\MessageBreak + features and been removed from others.\MessageBreak + Loading of package `scrhack' may help to\MessageBreak + avoid this warning, if you are using a\MessageBreak + a package that still implements the\MessageBreak + deprecated \string\float@addtolist\space interface% + }% + \global\let\scr@float@addtolists@warning\relax +} +% +% \end{macrocode} +% \end{macro}^^A \scr@float@listhead@warning,scr@float@addtolists@warning +% \end{macro}^^A \float@listhead +% +% \begin{command}{\listfigurename,\listtablename} +% \begin{command}{\listoflofname,\listoflotname, +% \listoflofentryname,\listoflotentryname} +% \changes{v3.00}{2008/07/03}{neu für Paket \pkg*{tocbasic}} +% \changes{v3.25}{2017/10/10}{\cs{renewcommand} statt \cs{newcommand}}%^^A +% The names used by \pkg*{tocbasic}. +% \begin{macrocode} +%<*body> +\renewcommand*\listfigurename{List of Figures} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\listfigurename{List of Figures} +\renewcommand*\listoflofname{\listfigurename} +\renewcommand*\listoflofentryname{\figurename} +\renewcommand*\listtablename{List of Tables} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\listtablename{List of Tables} +\renewcommand*\listoflotname{\listtablename} +\renewcommand*\listoflotentryname{\tablename} +% +% \end{macrocode} +% \end{command}^^A \listoflofname … \listoflotentryname +% \end{command}^^A \listfigurename,\listtablename +% +% \begin{command}{\listoffigures} +% \changes{v2.3h}{1995/01/21}{using \cs{lof@heading}} +% \changes{v2.4k}{1996/12/13}{\cs{lof@heading} for all classes} +% \changes{v2.8l}{2001/08/16}{group added an \len{parskip} set to 0} +% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse}\cs{@parskip@indent}} +% \changes{v2.95}{2004/11/05}{\cs{@parskipfalse} and \cs{@parskip@indent} +% replaced} +% \changes{v3.00}{2008/07/04}{using \pkg*{tocbasic}} +% \changes{v3.23}{2017/03/24}{using \cs{ext@figure} instead of \file{lof}} +% \changes{v3.25}{2017/10/10}{implicit definition by \cs{DeclareNewTOC}} +% The list of figures. +% \end{command}^^A \listoffigures +% +% \begin{macro}{\l@figure} +% \changes{v3.25}{2017/10/10}{implicit definition by \cs{DeclareNewTOC}} +% Entry command for the list of figures. +% \end{macro}^^A \l@figure +% +% \begin{command}{\listoftables} +% \changes{v2.3h}{1995/01/21}{using \cs{lot@heading}} +% \changes{v2.4k}{1996/12/13}{\cs{lot@heading} for all classes} +% \changes{v2.8l}{2001/08/16}{group added an \len{parskip} set to 0} +% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse}\cs{@parskip@indent}} +% \changes{v2.95}{2004/11/05}{\cs{@parskipfalse} and \cs{@parskip@indent} +% replaced} +% \changes{v3.00}{2008/07/04}{using \pkg*{tocbasic}} +% \changes{v3.23}{2017/03/24}{using \cs{ext@table} instead of \file{lot}} +% \changes{v3.25}{2017/10/10}{implicit definition by \cs{DeclareNewTOC}} +% The list of figures. +% \end{command}^^A \listoftables +% +% \begin{macro}{\l@table} +% \changes{v3.25}{2017/10/10}{implicit definition by \cs{DeclareNewTOC}} +% Entry command for the list of tables. +% \end{macro}^^A \l@table +% +% \begin{macrocode} +% +% \end{macrocode} +% +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrkernel-miscellaneous.dtx b/macros/latex/contrib/koma-script/scrkernel-miscellaneous.dtx new file mode 100644 index 0000000000..54bde0d193 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrkernel-miscellaneous.dtx @@ -0,0 +1,1117 @@ +% \iffalse meta-comment +% ====================================================================== +% scrkernel-miscellaneous.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrkernel-miscellaneous.dtx 3874 2022-06-05 10:38:02Z kohm $ +%%%% (run: init) +% +}% +\newcommand*{\ps@myheadings}{\let\@mkboth\@gobbletwo + \renewcommand*{\@evenhead}{% + \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{% + \hb@xt@ \@tempdima{{\headfont\strut\leftmark\hfil}}% + \if@hsl \vskip 1.5\p@ \hrule \fi}}}% + \renewcommand*{\@oddhead}{% + \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{% + \hb@xt@ \@tempdima{{\headfont\hfil\strut\rightmark + \if@twoside\else\hfil\fi}}% + \if@hsl \vskip 1.5\p@ \hrule \fi}}\hss}% + \renewcommand*{\@evenfoot}{% + \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{% + \if@fsl \hrule \vskip 3\p@ \fi + \hb@xt@ \@tempdima{{\pagemark\hfil}}}}}% + \renewcommand*{\@oddfoot}{% + \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{% + \if@fsl \hrule \vskip 3\p@ \fi + \hb@xt@ \@tempdima{{\hfil\pagemark + \if@twoside\else\hfil\fi}}}}\hss}% +% \renewcommand*{\chaptermark}[1]{}% +%
\renewcommand*{\subsectionmark}[1]{}% + \renewcommand*{\sectionmark}[1]{}% +} +% +% \end{macrocode} +% And now the page styles of the letter class. +% \begin{macrocode} +%<*class&letter&body> +\renewcommand*{\ps@plain}{% + \renewcommand*{\@oddhead}{% + \vbox{\vbox{\hsize=\textwidth\hbox to\textwidth{% + \parbox[b]{\textwidth}{\strut + \ifnum\@pageat>-1 + \ifnum\@pageat<3 + \ifcase\@pageat\raggedright\or\centering\or\raggedleft\fi + \pagemark + \else + \hfill + \fi + \else + \hfill + \fi + }% + }% + \if@hsl\kern1pt\rule{\textwidth}{.4pt}\fi + }% + }% + }% + \let\@evenhead\@oddhead% + \renewcommand*{\@oddfoot}{% + \parbox[t]{\textwidth}{% + \if@fsl + {% + \raggedright% + \vskip-\baselineskip\vskip.4pt + \hrulefill\\ + }% + \fi + \ifnum\@pageat>2 + \ifcase\@pageat\or\or\or\raggedright\or\centering\or\raggedleft\fi + \strut\pagemark + \else + \hfill + \fi + }% + }% + \let\@evenfoot\@oddfoot +} +\newcommand*{\ps@headings}{\let\@mkboth\markboth + \renewcommand*{\@oddhead}{% + \vbox{% + \vbox{\hsize=\textwidth\hbox to\textwidth{\headfont\noindent + \usekomavar{nexthead}}}% + \if@hsl\kern1pt\rule{\textwidth}{.4pt}\fi% + }% + }% + \let\@evenhead\@oddhead + \renewcommand*{\@oddfoot}{% + \parbox[t]{\textwidth}{% + \if@fsl + {% + \raggedright% + \vskip-\baselineskip\vskip.4pt + \hrulefill\\ + }% + \fi + \vbox{\hsize=\textwidth\hbox to\textwidth{\headfont\footfont\noindent + \usekomavar{nextfoot}}}% + }% + }% + \let\@evenfoot\@oddfoot +} +\newcommand*{\ps@myheadings}{% + \ps@headings + \let\@mkboth\@gobbletwo +} +% +% \end{macrocode} +% The letter package already uses \pkg*{scrlayer-scrpage}: +% \begin{macrocode} +%<*package&letter&body> +\RequirePackage{scrlayer-scrpage} +\newpairofpagestyles{letter}{% + \clearpairofpagestyles + \lehead[\ifnum\@pageat=\z@\pagemark\fi]% + {\usekomavar{nexthead}}% + \lohead[\ifnum\@pageat=\z@\pagemark\fi]% + {\usekomavar{nexthead}}% + \chead[\ifnum\@pageat=\@ne\pagemark\fi]% + {}% + \rehead[\ifnum\@pageat=\tw@\pagemark\fi]% + {}% + \rohead[\ifnum\@pageat=\tw@\pagemark\fi]% + {}% + \lefoot[\ifnum\@pageat=\thr@@\pagemark\fi]% + {\usekomavar{nextfoot}}% + \lofoot[\ifnum\@pageat=\thr@@\pagemark\fi]% + {\usekomavar{nextfoot}}% + \cfoot[\ifnum\@pageat=4 \pagemark\fi]% + {}% + \refoot[\ifnum\@pageat=5 \pagemark\fi]% + {}% + \rofoot[\ifnum\@pageat=5 \pagemark\fi]% + {}% +} +% +% \end{macrocode} +% \end{pgstyle}^^A plain,myheadings,headings +% +% \begin{pgstyle}{notepaper} +% \changes{v3.27}{2019/03/22}{plan added} +% There are plans for \pkg*{scrletter} package to use a new layer +% \texttt{notepaper} to define the notepaper. With this layer it is possible +% to add several separated information blocks everywhere on the first +% page. A \texttt{picture} mode layer is used, because this makes the +% placement easier. It's a background layer, so the page contents are printed +% above. We could also use an odd-side layer, but who knows \dots +% \begin{macrocode} +%<*package&letter&body&willbe> +\DeclareNewLayer[% + background, + mode=picture, + page, + align=b, + contents=\scr@notepaper@printallelements +]{notepaper} +% \end{macrocode} +% For \cs{scr@notepaper@elements} see \file{scrkernel-notepaper.dtx}. +% +% A second layer is used for the foldmarks. Again it is a picture layer. But +% this time it is an odd-sides-only layer. +% \begin{macrocode} +\DeclareNewLayer[% + background, + mode=picture, + page, + align=b, + contents=\scr@foldmarks@printallelements +]{foldmarks} +% \end{macrocode} +% For \cs{@hfoldmark} and \cs{@vfoldmark} see \file{scrkernel-notepaper.dtx}. +% +% Last but not least the page style. The foldmarks are below the notepaper. +% \begin{macrocode} +\DeclareNewPageStyleByLayers{notepaper}{foldmarks,notepaper} +% +% \end{macrocode} +% \end{pgstyle}^^A notepaper +% +% +% \subsection{Selection of page styles for special pages} +% +% +% \begin{command}{\titlepagestyle,\indexpagestyle} +% \changes{v2.8d}{2001/07/05}{added} +% For pages with the in-page title and for the first page of the index, +% \KOMAScript{} provides configurable page styles. These are initially +% \pstyle{plain}. +% \begin{macrocode} +%<*class&!letter&body> +\newcommand*{\titlepagestyle}{plain} +\newcommand*{\indexpagestyle}{plain} +% +% \end{macrocode} +% \end{command} +% \begin{command}{\partpagestyle} +% \changes{v2.8d}{2001/07/05}{added} +% \changes{v3.00}{2008/08/05}{not with \cls*{scrartcl}} +% \changes{v3.18}{2015/06/10}{indirect by \cs{DeclareSectionCommand}} +% \end{command} +% \begin{command}{\chapterpagestyle} +% \changes{v2.8d}{2001/07/05}{added} +% \changes{v3.18}{2015/05/20}{indirect by \cs{DeclareSectionCommand}} +% \end{command} +% +% +% \subsection{Selection of initial page style} +% +% The initial page style depends on the class: +% \begin{macrocode} +%<*class&body> +%\pagestyle{plain} +%\pagestyle{headings} +% \end{macrocode} +% But the pagination is always done using Arabic numbers. +% \begin{macrocode} +\pagenumbering{arabic} +% +% \end{macrocode} +% +% \section{Implementation of Interleaf Pages} +% +% \begin{description} +% \item[ToDo:] Move this code to a new file \file{scrkernel-interleaf.dtx}. +% \end{description} +% +% \begin{option}{cleardoublepage} +% \changes{v2.95}{2004/08/24}{added} +% \changes{v2.96a}{2007/01/03}{value \opt{\quotechar=current} fixed} +% \changes{v2.98c}{2008/03/06}{\cs{def} replaced by \cs{let}, because of +% option \opt{open}} +% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}} +% \changes{v3.17}{2015/03/10}{using value storage} +% \changes{v3.37}{2022/05/10}{guard for \pkg*{scrextend} fixed} +% \begin{command}{\cleardoublestandardpage} +% \changes{v2.8a}{2001/06/18}{added} +% \changes{v2.96a}{2007/01/02}{default value added} +% \begin{command}{\cleardoubleusingstyle} +% \changes{v2.95}{2004/08/24}{added} +% \changes{v3.06a}{2010/09/17}{\cs{thispagestyle} replaced by +% \cs{pagestyle}} +% \begin{command}{\cleardoubleemptypage,\cleardoubleplainpage} +% \changes{v2.8a}{2001/06/18}{added} +% \begin{command}{\cleardoubleoddpage,\cleardoubleoddstandardpage} +% \changes{v2.98c}{2008/03/06}{added} +% \begin{command}{\cleardoubleoddusingstyle} +% \changes{v2.98c}{2008/03/06}{added} +% \changes{v3.06a}{2010/09/17}{\cs{thispagestyle} replaced by +% \cs{pagestyle}} +% \begin{command}{\cleardoubleoddemptypage,\cleardoubleoddplainpage} +% \changes{v2.98c}{2001/06/18}{added} +% \begin{command}{\cleardoubleevenpage,\cleardoubleevenstandardpage} +% \changes{v2.98c}{2008/03/06}{added} +% \begin{command}{\cleardoubleevenusingstyle} +% \changes{v2.98c}{2008/03/06}{added} +% \changes{v3.06a}{2010/09/17}{\cs{thispagestyle} replaced by +% \cs{pagestyle}} +% \begin{command}{\cleardoubleevenemptypage,\cleardoubleevenplainpage} +% \changes{v2.98c}{2001/06/18}{added} +% \begin{command}{\cleardoublepage} +% \changes{v2.98c}{2001/06/18}{always redefining it} +% \changes{v2.98c}{2008/04/11}{new default from version 2.98c} +% \changes{v3.13}{2014/03/01}{allow page style \pstyle{headings} as value for +% class option} +% \changes{v3.28}{2019/11/18}{\cs{ifnotundefined} replaced by +% \cs{Ifnotundefined}} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} replaced by \cs{Ifstr}} +% With options \opt{twoside} and \opt{openright}, which are both default with +% \cls*{scrbook} and available with \cls*{scrreprt}, \cs{chapter} imply +% \cs{cleardoublepage}. Usually this results in a new odd page and can insert +% an interleaf page. With the standard classes this interleaf page has the +% current active page style and therefore can have a running head and +% pagination. Mainstream typography uses empty pages without running head or +% pagination for interleaf pages. Some users also want a pagination but no +% running head. Option \opt{cleardoublepage} can be used to select all the +% often wishes and also every other page style. The corresponding commands are +% also defined and the option re-defines \cs{cleardoublepage} to use one of +% these additional commands. Similar is for \cs{cleardoubleoddpage} and +% \cs{cleardoubleevenpage}. +% \begin{macrocode} +%<*(class|extend)&option> +\KOMA@key{cleardoublepage}{% + \begingroup + \def\@tempc{% + \endgroup + \KOMA@unknown@keyval{cleardoublepage}{#1}{% + 'current' or any defined pagestyle e.g. 'empty','plain', 'headings'}% + }% + \Ifstr{#1}{current}{% + \def\@tempc{\endgroup + \def\cleardoublepage{\cleardoublestandardpage}% + \def\cleardoubleoddpage{\cleardoubleoddstandardpage}% + \def\cleardoubleevenpage{\cleardoubleevenstandardpage}% + \FamilyKeyStateProcessed + \KOMA@kav@replacevalue{.% +% scrextend.\scr@pkgextension +% \KOMAClassFileName + }{cleardoublepage}{current}% + }% + }{% + \Ifnotundefined{ps@#1}{% + \def\@tempc{\endgroup + \def\cleardoublepage{\cleardoublepageusingstyle{#1}}% + \def\cleardoubleoddpage{\cleardoubleoddpageusingstyle{#1}}% + \def\cleardoubleevenpage{\cleardoubleevenpageusingstyle{#1}}% + \FamilyKeyStateProcessed + \KOMA@kav@xreplacevalue{.% +% scrextend.\scr@pkgextension +% \KOMAClassFileName + }{cleardoublepage}{#1}% + }% + }{% +% \end{macrocode} +% At class loading time page style \pstyle{headings} is still undefined, but +% should be allowed as value for option \opt{cleardoublepage}. +% \begin{description} +% \item[Note:] Page style \pstyle{plain} is already defined in the \LaTeX{} +% kernel and therefore does not need special treatment. +% \end{description} +% \begin{macrocode} +%<*class> + \ifx\@currname\KOMAClassName + \ifx\@currext\@clsextension + \Ifstr{#1}{headings}{% + \def\@tempc{\endgroup + \def\cleardoublepage{\cleardoublepageusingstyle{#1}}% + \def\cleardoubleoddpage{\cleardoubleoddpageusingstyle{#1}}% + \def\cleardoubleevenpage{\cleardoubleevenpageusingstyle{#1}}% + \FamilyKeyStateProcessed + \KOMA@kav@xreplacevalue{.\KOMAClassFileName}% + {cleardoublepage}{#1}% + }% + }{}% + \fi + \fi +% + }% + }% + \@tempc +} +\newcommand*{\cleardoubleoddstandardpage}{} +\let\cleardoubleoddstandardpage=\cleardoublepage +\newcommand*{\cleardoubleoddpageusingstyle}[1]{\clearpage + {\pagestyle{#1}\cleardoubleoddstandardpage}} +\newcommand*{\cleardoubleoddemptypage}{\cleardoubleoddpageusingstyle{empty}} +\newcommand*{\cleardoubleoddplainpage}{\cleardoubleoddpageusingstyle{plain}} +\newcommand*{\cleardoubleevenstandardpage}{% + \clearpage + \if@twoside\ifodd\c@page + \hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi + \fi\fi +} +\newcommand*{\cleardoubleevenpageusingstyle}[1]{\clearpage + {\pagestyle{#1}\cleardoubleevenstandardpage}} +\newcommand*{\cleardoubleevenemptypage}{\cleardoubleevenpageusingstyle{empty}} +\newcommand*{\cleardoubleevenplainpage}{\cleardoubleevenpageusingstyle{plain}} +\newcommand*{\cleardoublestandardpage}{\cleardoubleoddstandardpage} +\renewcommand*{\cleardoublepage}{% + \expandafter\ifnum \@nameuse{scr@v@2.98c}<\scr@compatibility\relax + \cleardoubleemptypage + \else + \cleardoublestandardpage + \fi +} +\KOMA@kav@add{.% +% scrextend.\scr@pkgextension +% \KOMAClassFileName +}{cleardoublepage}{% + \expandafter\ifnum \scr@v@is@gt{2.98c}empty\else current\fi +} +% \end{macrocode} +% We expand the value at the end of the class or package. +% \begin{macrocode} +%\AtEndOfPackage{% +%\AtEndOfClass{% + \KOMAoptionOf[\expandafter\edef\expandafter\@tempa\@firstofone]% + {% +% scrextend.\scr@pkgextension +% \KOMAClassFileName + }{cleardoublepage}% + \KOMA@kav@removekey{.% +% scrextend.\scr@pkgextension +% \KOMAClassFileName + }{cleardoublepage}% + \KOMA@kav@xadd{.% +% scrextend.\scr@pkgextension +% \KOMAClassFileName + }{cleardoublepage}{\@tempa}% +} +\newcommand*{\cleardoubleoddpage}{\cleardoubleoddemptypage} +\newcommand*{\cleardoubleevenpage}{\cleardoubleevenemptypage} +\newcommand*{\cleardoublepageusingstyle}[1]{\clearpage + {\pagestyle{#1}\cleardoublestandardpage}} +\newcommand*{\cleardoubleemptypage}{\cleardoublepageusingstyle{empty}} +\newcommand*{\cleardoubleplainpage}{\cleardoublepageusingstyle{plain}} +% \end{macrocode} +% \end{command}^^A \cleardoublepage +% \end{command}^^A \cleardoubleevenplainpage,\cleardoubleevenemptypage +% \end{command}^^A \cleardoubleevenusingstyle +% \end{command}^^A \cleardoubleevenpage,\cleardoubleevenstandardpage +% \end{command}^^A \cleardoubleoddemptypage,\cleardoubleoddplainpage +% \end{command}^^A \cleardoubleoddusingstyle +% \end{command}^^A \cleardoubleoddpage,\cleardoubleoddstandardpage +% \end{command}^^A \cleardoubleemptypage,\cleardoubleplainpage +% \end{command}^^A \cleardoubleusingstyle +% \end{command}^^A \cleardoublestandardpage +% \begin{option}{cleardoubleempty,cleardoubleplain,cleardoublestandard} +% \changes{v2.8a}{2001/06/18}{added} +% \changes{v2.8q}{2001/11/06}{\cs{cleardoublestandardpage} replaced by +% \cs{cleardoublestandard}} +% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by +% \cs{PackageInfoNoLine}} +% \changes{v3.01a}{2008/11/20}{deprecated} +% \begin{macrocode} +%<*class> +\KOMA@DeclareDeprecatedOption{cleardoubleempty}{cleardoublepage=empty} +\KOMA@DeclareDeprecatedOption{cleardoubleplain}{cleardoublepage=plain} +\KOMA@DeclareDeprecatedOption{cleardoublestandard}{cleardoublepage=current} +% +% +% \end{macrocode} +% \end{option}^^A cleardoublestandard,cleardoubleplain,cleardoubleempty +% \end{option}^^A cleardoublepage +% +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrkernel-paragraphs.dtx b/macros/latex/contrib/koma-script/scrkernel-paragraphs.dtx new file mode 100644 index 0000000000..6e3a43f3a1 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrkernel-paragraphs.dtx @@ -0,0 +1,724 @@ +% \iffalse meta-comment +% ====================================================================== +% scrkernel-paragraphs.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrkernel-paragraphs.dtx 3874 2022-06-05 10:38:02Z kohm $ +% +% \end{macrocode} +% Because of the currently complicated initialization, i.e., when switching +% between \cs{parskip=absolute} and \cs{parskip=relative}, we currently define +% \cs{par@updaterelative} not before the class options has been processed. New +% values are only set, if between the last \cs{setparsizes} and the current +% \cs{par@updaterelative} (e.g. inside \cs{selectfont}) the user has not +% changed the \TeX{} variables. If he has changed the \TeX{} variables instead +% of using \cs{setparsizes} we think, he does not want any other change. And +% because of to be able to do the tests inside a group without permanent +% change of \cs{reserved@a} we use three additional helpers. +% \begin{macrocode} +%<*body> +\newcommand*{\par@updaterelative}{% + \begingroup + \edef\reserved@a{\the\parindent}\ifx\reserved@a\f@parindent + \aftergroup\parindent@update +%<*trace> + \else + \ClassInfo{\KOMAClassName}{\string\parindent\space not changed}% +% + \fi + \edef\reserved@a{\the\parskip}\ifx\reserved@a\f@parskip + \aftergroup\parskip@update +%<*trace> + \else + \ClassInfo{\KOMAClassName}{\string\parskip\space not changed}% +% + \fi + \edef\reserved@a{\the\parfillskip}\ifx\reserved@a\f@parfillskip + \aftergroup\parfillskip@update +%<*trace> + \else + \ClassInfo{\KOMAClassName}{\string\parfillskip\space not changed}% +% + \fi + \endgroup +} +\newcommand*{\parindent@update}{% + \scr@defaultunits\parindent\scr@parindent + \begingroup + \let\reserved@b\endgroup + \edef\reserved@a{\the\parindent}\ifx\reserved@a\f@parindent\else + \def\reserved@b{\endgroup\edef\f@parindent{\the\parindent}}% +% \ClassInfo{\KOMAClassName}{\string\parindent=\the\parindent}% + \fi + \reserved@b +} +\newcommand*{\parskip@update}{% + \scr@defaultunits\parskip\scr@parskip + \begingroup + \let\reserved@b\endgroup + \edef\reserved@a{\the\parskip}\ifx\reserved@a\f@parskip\else + \def\reserved@b{\endgroup\edef\f@parskip{\the\parskip}}% +% \ClassInfo{\KOMAClassName}{\string\parskip=\the\parskip}% + \fi + \reserved@b +} +\newcommand*{\parfillskip@update}{% + \scr@defaultunits\parfillskip\scr@parfillskip + \begingroup + \let\reserved@b\endgroup + \edef\reserved@a{\the\parfillskip}\ifx\reserved@a\f@parfillskip\else + \def\reserved@b{\endgroup\edef\f@parfillskip{\the\parfillskip}}% +% \ClassInfo{\KOMAClassName}{\string\parfillskip=\the\parfillskip}% + \fi + \reserved@b +} +% +% \end{macrocode} +% \end{macro}^^A \parindent@update,\parskip@update,\parfillskip@update} +% \end{macro}^^A \par@updaterelative +% \end{macro}^^A \default@par@update +% \end{macro}^^A \par@update +% \end{macro}^^A \scr@parskip,\scr@parfillskip +% \end{macro}^^A \scr@parindent +% \end{macro}^^A \f@parskip,\f@parfillskip +% \end{macro}^^A \f@parindent +% \end{command}^^A \setparsizes +% +% \begin{option}{parskip} +% \changes{v2.8i}{2001/07/22}{added} +% \changes{v2.95}{2006/03/11}{changed into \pkg{keyval} option} +% \changes{v3.08}{2010/12/14}{value \opt{\quotechar=never} added} +% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}.} +% \changes{v3.17}{2015/03/10}{using value storage} +% \changes{v3.25}{2017/09/27}{typo fix in \cs{FamilyKeyStateUnknownValue}} +% \changes{v3.26b}{2019/02/01}{\cs{baselineskip} replaced by 1\cs{baselineskip}} +% \begin{option}{parindent,parskip-,parskip+,parskip*, +% halfparskip,halfparskip-,halfparskip+,halfparskip*} +% \changes{v2.8i}{2001/07/22}{added} +% \changes{v2.95}{2006/03/11}{obsolete} +% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by +% \cs{PackageInfoNoLine}} +% \changes{v3.01a}{2008/11/20}{deprecated} +% Originally we have had nine options for all the paragraph indent and skip +% settings. Using \pkg*{scrbase} we have only one option with additional +% settings for relative and absolute values and paragraph indent without glue +% for paragraph skip. +% \begin{macrocode} +%<*option> +\KOMA@key{parskip}[true]{% + \begingroup + \KOMA@set@ncmdkey{parskip}{@tempa}{% + {never}{0},% + {false}{1},{off}{1},{no}{1},% + {full-}{2},% + {half-}{3},% + {full}{4},{true}{4},{on}{4},{yes}{4},% + {half}{5},% + {full+}{6},% + {half+}{7},% + {full*}{8},% + {half*}{9},% + {relative}{10},% + {absolute}{11}% + }{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifcase\number\@tempa% 0 + \endgroup + \setparsizes{1em}{\z@}{\z@ \@plus 1fil}% + \KOMA@kav@add{.\KOMAClassFileName}{parskip}{never}% + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 1 + \endgroup + \setparsizes{1em}{\z@ \@plus \p@}{\z@ \@plus 1fil}% + \KOMA@kav@add{.\KOMAClassFileName}{parskip}{false}% + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 2 + \endgroup + \setparsizes{\z@}{1\baselineskip \@plus .1\baselineskip}{% + \z@ \@plus 1fil}% + \KOMA@kav@add{.\KOMAClassFileName}{parskip}{full-}% + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 3 + \endgroup + \setparsizes{\z@}{.5\baselineskip \@plus .5\baselineskip}{% + \z@ \@plus 1fil}% + \KOMA@kav@add{.\KOMAClassFileName}{parskip}{half-}% + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 4 + \endgroup + \setparsizes{\z@}{1\baselineskip \@plus .1\baselineskip}{% + 1em \@plus 1fil}% + \KOMA@kav@add{.\KOMAClassFileName}{parskip}{full}% + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 5 + \endgroup + \setparsizes{\z@}{.5\baselineskip \@plus .5\baselineskip}{% + 1em \@plus 1fil}% + \KOMA@kav@add{.\KOMAClassFileName}{parskip}{half}% + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 6 + \endgroup + \setparsizes{\z@}{1\baselineskip \@plus .1\baselineskip}{% + .3333\linewidth\@plus 1fil}% + \KOMA@kav@add{.\KOMAClassFileName}{parskip}{full+}% + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 7 + \endgroup + \setparsizes{\z@}{.5\baselineskip \@plus .5\baselineskip}{% + .3333\linewidth \@plus 1fil}% + \KOMA@kav@add{.\KOMAClassFileName}{parskip}{half+}% + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 8 + \endgroup + \setparsizes{\z@}{1\baselineskip \@plus .1\baselineskip}{% + .25\linewidth \@plus 1fil}% + \KOMA@kav@add{.\KOMAClassFileName}{parskip}{full*}% + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 9 + \endgroup + \setparsizes{\z@}{.5\baselineskip \@plus .5\baselineskip}{% + .25\linewidth \@plus 1fil}% + \KOMA@kav@add{.\KOMAClassFileName}{parskip}{half*}% + \if@atdocument\AfterKOMAoptions{\selectfont}\fi + \or% 10 + \endgroup + \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{absolute}% + \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{relative}% + \KOMA@kav@add{.\KOMAClassFileName}{parskip}{relative}% + \ifx\par@updaterelative\undefined + \expandafter\AtEndOfClass + \else + \expandafter\@firstofone + \fi + {% + \ifx\par@update\default@par@update + \let\par@update\par@updaterelative + \fi + \let\default@par@update=\par@updaterelative + }% + \or%11 + \endgroup + \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{absolute}% + \KOMA@kav@remove{.\KOMAClassFileName}{parskip}{relative}% + \KOMA@kav@add{.\KOMAClassFileName}{parskip}{absolute}% + \ifx\par@updaterelative\undefined + \expandafter\AtEndOfClass + \else + \expandafter\@firstofone + \fi + {% + \ifx\par@update\default@par@update + \let\par@update\relax + \fi + \let\default@par@update=\relax + }% + \else% should never be + \endgroup + \fi + \else + \endgroup + \FamilyKeyStateUnknownValue + \fi +} +\KOMA@DeclareDeprecatedOption{parskip-}{parskip=full-} +\KOMA@DeclareDeprecatedOption{parskip+}{parskip=full+} +\KOMA@DeclareDeprecatedOption{parskip*}{parskip=full*} +\KOMA@DeclareDeprecatedOption{halfparskip}{parskip=half} +\KOMA@DeclareDeprecatedOption{halfparskip-}{parskip=half-} +\KOMA@DeclareDeprecatedOption{halfparskip+}{parskip=half+} +\KOMA@DeclareDeprecatedOption{halfparskip*}{parskip=half*} +\KOMA@DeclareDeprecatedOption{parindent}{parskip=false} +\KOMA@kav@add{.\KOMAClassFileName}{parskip}{false} +\KOMA@kav@add{.\KOMAClassFileName}{parskip}{absolute} +% +% \end{macrocode} +% \end{option}^^A parindent … halfparskip* +% \end{option}^^A parskip +% +% \changes{v2.8i}{2001/07/22}{don't change \cs{baselinestretch}} +% +% \begin{length}{\lineskip,\normallineskip} +% The minimum line skip. +% \begin{macrocode} +%<*body> +\setlength{\lineskip}{\p@} +\setlength{\normallineskip}{\p@} +% \end{macrocode} +% \end{length} +% +% \begin{command}{\selectfont} +% \changes{v2.95}{2004/11/05}{added} +% \changes{v3.33}{2021/01/21}{from \LaTeX{} 2021/06/01 use hook instead of +% patch} +% \begin{macro}{\scr@selectfont,\scr@new@selectfont} +% \changes{v2.95}{2006/04/14}{added} +% \changes{v3.10}{2010/09/28}{\pkg{everysel} support fixed} +% \changes{v3.10}{2010/09/28}{\pkg{tracefnt} supported} +% \changes{v3.10b}{2011/03/13}{\pkg{everysel} can be loaded inside +% \cs{begin\{document\}}} +% Because of \opt{parskip=relative} we need a hook to activate the changes of +% the paragraph values. A good place to do so is \cs{selectfont}. With +% \KOMAScript{} 3.00 we needed to patch this command. But from \LaTeX{} +% 2021/06/01 we can use a new generic hook. +% \begin{description} +% \item[Note:] We use 2021/05/01 instead of the official \LaTeX{} release date, +% because there were relevant earlier \LaTeX{} developer releases with that +% date. +% \end{description} +% \begin{macrocode} +\IfLTXAtLeastTF{2021/05/01}{% + \AddToHook{selectfont}{\par@update}% + \AfterPackage{everysel}{% + \IfPackageAtLeastTF{everysel}{2021/01/18}{}{% + \ClassError{\KOMAClassName}{% + incompatible `everysel' detected + }{% + You are using an old version of `everysel' in combination with a + LaTeX\MessageBreak + version >= 2021/06/01 and KOMA-Script >= 3.33. This combination + is\MessageBreak + not supported.\MessageBreak + You could switch back to an older LaTeX using package + `latexrelease'.\MessageBreak + But I recommend to update `everysel'% + }% + }% + }% + \AfterPackage{tracefnt}{% + \IfPackageAtLeastTF{tracefnt}{2020/12/22}{}{% + \ClassError{\KOMAClassName}{% + incompatible `tracefnt' detected + }{% + `tracefnt' is a LaTeX base package and therefore should be updated + together\MessageBreak + with LaTeX kernel. So this should never happen! Please check + your\MessageBreak + LaTeX installation% + }% + }% + }% +}{% + \newcommand*{\scr@selectfont}{} + \expandafter\let\expandafter\scr@selectfont\csname selectfont \endcsname + \BeforePackage{everysel}{% + \AtBeginDocument{% + \expandafter\ifx\csname selectfont \endcsname\scr@new@selectfont\else + \ClassWarningNoLine{\KOMAClassName}{% + discard change of \string\selectfont}% + \fi + \expandafter\let\csname selectfont \endcsname\scr@selectfont + }% + }% + \AfterPackage{everysel}{% + \scr@ifundefinedorrelax{@EverySelectfont@Init}{% + \expandafter\ifx\csname selectfont \endcsname\scr@new@selectfont + \ClassWarningNoLine{\KOMAClassName}{% + \string\selectfont\space already changed}% + \else + \expandafter\g@addto@macro\csname selectfont \endcsname{\par@update}% + \expandafter\let\expandafter\scr@new@selectfont + \csname selectfont \endcsname + \fi + }{% + \g@addto@macro\@EverySelectfont@Init{% + \expandafter\g@addto@macro\csname selectfont \endcsname{\par@update}% + \expandafter\let\expandafter\scr@new@selectfont + \csname selectfont \endcsname + }% + }% + }% + \AfterPackage{tracefnt}{% + \expandafter\let\expandafter\scr@selectfont\csname selectfont \endcsname + \expandafter\g@addto@macro\csname selectfont \endcsname{\par@update}% + \expandafter\let\expandafter\scr@new@selectfont\csname selectfont \endcsname + }% + \expandafter\g@addto@macro\csname selectfont \endcsname{\par@update} + \newcommand*{\scr@new@selectfont}{} + \expandafter\let\expandafter\scr@new@selectfont\csname selectfont \endcsname +} +% \end{macrocode} +% \end{macro}^^A \scr@selectfont,\scr@new@selectfont +% \end{command}^^A \selectfont +% +% \begin{macro}{\scr@defaultunits} +% \changes{v2.95}{2004/11/05}{added} +% \changes{v3.19}{2015/08/22}{\cs{setlength} replaced because of \pkg{tikz}} +% \begin{macro}{\scr@@defaultunits} +% \changes{v2.95}{2004/11/05}{added} +% \begin{macro}{\scr@@@defaultunits} +% \changes{v2.95}{2004/11/05}{added} +% \changes{v3.19}{2015/08/22}{\cs{setlength} and \cs{addtolength} replaced +% because of \pkg{tikz}} +% Above we've already used \cs{scr@defaultunits} inside +% \cs{par@updaterelative}. This is very similar to the \LaTeX{} kernel macro +% \cs{@defaultunits}, but accepts dimensions or skips as first and second +% value. +% \begin{macrocode} +\newcommand*{\scr@defaultunits}[2]{% + \begingroup + \edef\@tempa{#2}% + \expandafter\scr@@defaultunits\expandafter#1\@tempa plusplus\@nnil + \edef\@tempa{\noexpand\endgroup\noexpand#1\the\glueexpr #1\relax}% + \@tempa +} +\newcommand*{\scr@@defaultunits}{} +\def\scr@@defaultunits#1#2plus#3plus#4\@nnil{% + \ifx\relax#3\relax + \scr@@@defaultunits#1{}#2minusminus\@nnil + \else + \scr@@@defaultunits#1{#2}#3minusminus\@nnil + \fi +} +\newcommand*{\scr@@@defaultunits}{} +\def\scr@@@defaultunits#1#2#3minus#4minus#5\@nnil{% + \ifx\relax#2\relax + \@defaultunits\@tempskipa#3pt\relax\@nnil + #1\@tempskipa + \else + \@defaultunits\@tempskipa\z@\@plus#3pt\relax\@nnil + #1\@tempskipa + \@defaultunits\@tempskipa#2pt\relax\@nnil + \advance#1\@tempskipa + \fi + \ifx\relax#4\relax\else + \@defaultunits\@tempskipa\z@\@minus #4pt\relax\@nnil + \advance#1\@tempskipa + \fi +} +% +% \end{macrocode} +% \end{macro}^^A \scr@@@defaultunits +% \end{macro}^^A \scr@@defaultunits +% \end{macro}^^A \scr@defaultunits +% +% \subsection{Extra list code} +% +% \begin{macro}{\@list@extra} +% \changes{v2.8q}{2001/11/06}{added} +% \changes{v2.95c}{2006/08/03}{\len{parsep} fixed} +% \begin{macro}{\add@extra@listi} +% \changes{v2.9h}{2002/09/03}{added} +% Some parameters of lists have to change, depending on the settings for +% paragraphs. +% \begin{description} +% \item[ToDo:] Move this code to \file{scrkernel-listsandtabulars.dtx} or +% \file{scrkernel-fontsizes.dtx}. +% \end{description} +% \begin{macrocode} +%<*body> +\newcommand*{\@list@extra}{% + \ifdim\parskip>\z@\topsep\z@\parsep\parskip\itemsep\z@\fi +} +\newcommand*{\add@extra@listi}[1]{% + \expandafter\let\csname #1@listi\endcsname=\@listi + \def\@listi{\csname #1@listi\endcsname\@list@extra}% +} +% +% \end{macrocode} +% \end{macro}^^A \@list@extra +% \end{macro}^^A \add@extra@listi +% +% \subsection{Patching other packages} +% +% \begin{macro}{\deferred@thm@head} +% \changes{v3.27}{2019/02/10}{new patch of \textsf{amsthm}} +% Unfortunatly \pkg{amsthm} has a problem if a class handles \len{topsep} +% this way, because it is only prepared for the case, that \len{parskip} and +% \len{parsep} are changed manually without influence to \len{topsep}. So the +% initial distance is missing. To avoid this problem, we need to patch the +% package's internal command \cs{deferred@thm@head}. This is not nice, but +% unfortunaltly needed. +% \begin{description} +% \item[ToDo:] Move this code to the package patch code of +% \file{scrkernel-miscellaneous.dtx} resp. a new file as noted there. +% \end{description} +% \begin{macrocode} +%<*body> +\AfterPackage{amsthm}{% + \RequirePackage{xpatch}% + \xpatchcmd{\deferred@thm@head}{\addvspace{-\parskip}}{}{% + \ClassInfoNoLine{\KOMAClassName}{% + amsthm's \string\deferred@thm@head\space patched}% + }{% + \ClassWarningNoLine{\KOMAClassName}{% + cannot patch amsthm's \string\deferred@thm@head.\MessageBreak + This could result in wrong spacing before theorem\MessageBreak + environments defined by package `amsthm'% + }% + }% +} +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Extra code for font sizes} +% +% \begin{description} +% \item[ToDo:] Move this to \file{scrkernel-fontsizes.dtx}. +% \end{description} +% \begin{macrocode} +% \end{macrocode} +% +% \changes{v2.98c}{2008/03/26}{changed to be used in font size files} +% \changes{v3.17}{2015/03/25}{update of paragraph settings} +% \begin{macro}{\@listi} +% \changes{v2.98c}{2008/03/27}{\cs{g@addto@macro} replaced by \cs{l@addto@macro}} +% \changes{v3.01}{2008/11/13}{\cs{@listi} wird auf jeden Fall ausgeführt} +% \begin{macro}{\@listI} +% \begin{macro}{\@listii,\@listiii} +% \changes{v2.98c}{2008/03/27}{\cs{g@addto@macro} replaced by \cs{l@addto@macro}} +% \begin{command}{\footnotesize,\small} +% \changes{v2.9h}{2002/09/03}{improved} +% \changes{v2.98c}{2008/03/27}{\cs{g@addto@macro} replaced by \cs{l@addto@macro}} +% \begin{macrocode} +% +%<*class|clo> +%<*body|10pt|11pt|12pt> +%<10pt|11pt|12pt>\@ifundefined{@list@extra}{}{% +%<10pt|11pt|12pt> \expandafter\ifnum\scr@v@is@ge{3.17}\par@updaterelative\fi + \l@addto@macro{\@listi}{\@list@extra}% + \let\@listI=\@listi + \l@addto@macro{\@listii}{\@list@extra}% + \l@addto@macro{\@listiii}{\@list@extra}% + \l@addto@macro{\footnotesize}{\protect\add@extra@listi{ftns}}% + \l@addto@macro{\small}{\protect\add@extra@listi{sml}}% +%<10pt|11pt|12pt>} +%<10pt|11pt|12pt>\@listi +% +% +%<*class> +% \end{macrocode} +% \end{command} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \subsection{Page layout parameters} +% +% \begin{length}{\columnsep,\columnseprule} +% Initial column separation. Note, we do not support two column letters. So +% this is not initialized for the letter class. +% \begin{macrocode} +%<*!letter&body> +\setlength{\columnsep}{10\p@} +\setlength{\columnseprule}{\z@} +% +% \end{macrocode} +% \end{length} +% +% +% \subsection{Penalties} +% +% The initial values for the penalties are the same as for the standard classes. +% \begin{macrocode} +%<*body> +\@lowpenalty = 51 +\@medpenalty =151 +\@highpenalty =301 +% +% \end{macrocode} +% +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: + diff --git a/macros/latex/contrib/koma-script/scrkernel-pseudolengths.dtx b/macros/latex/contrib/koma-script/scrkernel-pseudolengths.dtx new file mode 100644 index 0000000000..cf0a555b47 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrkernel-pseudolengths.dtx @@ -0,0 +1,342 @@ +% \iffalse meta-comment +% ====================================================================== +% scrkernel-pseudolengths.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrkernel-pseudolengths.dtx 3874 2022-06-05 10:38:02Z kohm $ +% +%<*execoption> +%\KOMAExecuteOptions{headings=openright} +%\KOMAExecuteOptions{headings=openany} +% +% \end{macrocode} +% \end{macro}^^A \if@openright +% \end{option}^^A open +% +% \begin{option}{openright,openany} +% \changes{v2.98c}{2008/03/05}{obsolete} +% \changes{v3.01a}{2008/11/21}{standard instead of obsolete} +% Two deprecated options of \KOMAScript{} 2. +% \begin{macrocode} +%<*option> +\KOMA@DeclareStandardOption{openright}{open=right} +\KOMA@DeclareStandardOption{openany}{open=any} +% +% +% \end{macrocode} +% \end{option}^^A openright,openany +% +% +% \subsection{Numbers and the auto dot feature} +% +% Not only parts, chapter, section etc.\@ are numbered. But several other +% numbers are related to these numbers. The feature we define here is also +% known as the auto dot feature. +% +% \begin{option}{numbers} +% \changes{v2.98c}{2008/03/07}{added} +% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}} +% \changes{v3.17}{2015/03/09}{using internal value storage} +% \begin{macro}{\scr@dotchangeatdocument} +% \changes{v2.98c}{2008/03/07}{added} +% The \opt{numbers} option provides several settings for the dot at the end of +% such numbers. But because the setting is always document global, this option +% cannot be changed inside the document, but in the document preamble only. If +% you try to change it inside the document, the error of +% \cs{scr@dotchangedatdocument} will be raised. Currently following values to +% the option are supported: +% \begin{center} +% \begin{tabular}{ll} +% \opt{numbers} & meaning\\\hline +% \opt{=auto} & automatically detect, if the dot has to be added\\ +% \opt{=enddot} & always use a dot at the end\\ +% \opt{=noenddot}& don't use a dot at the end\\ +% \end{tabular} +% \end{center} +% The criterion for automatically adding a dot is: Does any sectioning number +% contain something else but an Arabic number for a number portion? +% \begin{macrocode} +%<*prepare> +\newcommand*{\scr@dotchangeatdocument}[1]{% + \ClassError{\KOMAClassName}{% + change of end dot feature after \string\begin{document}% + }{% + You've tried to set `numbers=#1' after \string\begin{document},\MessageBreak + but this option is only allowed at the document preamble.\MessageBreak + See KOMA-Script manual for more information about.% + }% +} +% +%<*option> +\KOMA@key{numbers}{% + \KOMA@set@ncmdkey{numbers}{@tempa}{% + {autoendperiod}{0},{autoenddot}{0},{auto}{0},% + {endperiod}{1},{withendperiod}{1},{periodatend}{1},% + {enddot}{1},{withenddot}{1},{dotatend}{1},% + {noendperiod}{2},{noperiodatend}{2},% + {noenddot}{2},{nodotatend}{2}% + }{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \KOMA@kav@xreplacevalue{.\KOMAClassFileName}{numbers}{#1}% + \ifcase \@tempa\relax + \if@atdocument\scr@dotchangeatdocument{#1}\else + \let\scr@altsecnumhook\@empty + \fi + \or + \if@atdocument\scr@dotchangeatdocument{#1}\else + \let\scr@altsecnumhook\scr@altsecnumhooktrue + \fi + \or + \if@atdocument\scr@dotchangeatdocument{#1}\else + \let\scr@altsecnumhook\scr@altsecnumhookfalse + \fi + \fi + \fi +} +% +%\KOMAExecuteOptions{numbers=autoendperiod} +% \end{macrocode} +% \end{macro}^^A \scr@dotchangeatdocument +% \end{option}^^A numbers +% +% \begin{option}{pointednumbers,pointlessnumbers} +% \changes{v2.3h}{1995/01/19}{added} +% \changes{v2.4g}{1996/11/04}{option name fixed} +% \changes{v2.4g}{1996/11/04}{immediate setting \cs{@altsecnumformatfalse} +% to \cs{@altsecnumformattrue}} +% \changes{v2.98c}{2008/03/07}{obsolete} +% \changes{v3.01a}{2008/11/20}{deprecated} +% Two deprecated options. +% \begin{macrocode} +%<*option> +\KOMA@DeclareDeprecatedOption{pointednumbers}{numbers=enddot} +\KOMA@DeclareDeprecatedOption{pointlessnumbers}{numbers=noenddot} +% +% \end{macrocode} +% \end{option}^^A pointednumbers,pointlessnumbers +% +% \begin{command}{\autodot} +% \changes{v2.7}{2001/01/03}{added} +% \begin{macro}{\@altsecnumformattrue,\@altsecnumformatfalse,\if@altsecnumformat} +% \changes{v2.3c}{1995/08/06}{added} +% \begin{macro}{\@autodottrue,\@autodotfalse,\if@autodot} +% \changes{v2.8e}{2001/07/10}{added} +% \changes{v2.9k}{2003/01/12}{write to \cs{@mainaux}} +% \changes{v2.95}{2004/01/15}{write to \cs{@mainaux} just before closing the +% file} +% \changes{v2.96a}{2006/12/07}{using \cs{immediate}} +% \changes{v3.00}{2008/10/07}{global} +% \changes{v3.20}{2016/03/25}{using \cs{csname}\dots\cs{endcsname}} +% Depending on \cs{if@altsecnumformat} \cs{autodot} shows a dot or nothing. +% \begin{description} +% \item[ToDo:] Add an optional look forward feature to also not add a dot, if +% the next character is a punctuation character, e.g. a dot, semicolon, +% comma etc. +% \end{description} +% \cs{if@autodot} is the current result of the inspection of all sectioning +% numbers. If it is \cs{iftrue}, switching on the dot will be written to the +% main \file{aux}-file. +% \begin{macrocode} +%<*prepare> +\newif\if@altsecnumformat\@altsecnumformatfalse +\newif\if@autodot +\renewcommand*{\@autodottrue}{\global\let\if@autodot\iftrue} +\renewcommand*{\@autodotfalse}{\global\let\if@autodot\iffalse} +\@autodotfalse +% +%<*body> +\BeforeClosingMainAux{% + \if@autodot\if@filesw\immediate\write\@mainaux{% + \string\global\string\csname\space @altsecnumformattrue\string\endcsname}% + \fi\fi} +% +% \end{macrocode} +% \end{macro}^^A \if@autodot +% \end{macro}^^A \if@altsecnumformat +% +% \begin{macro}{\scr@altsecnumhook,\scr@altsecnumhooktrue,\scr@altsecnumhookfalse} +% \changes{v2.98c}{2008/03/07}{added} +% Used by option \opt{numbers} for (de-)activation of the dot in the document +% preamble and to overwrite the setting found in the \file{aux}-file. +% \begin{description} +% \item[Note:] The hook is executed after reading the main \file{aux}-file. So +% the overwriting of the setting does work. It is needed as long a boolean +% switch is used, because otherwise option \opt{numbers=auto} would not be +% able to reset option \opt{numbers=enddot} ot \opt{numbers=noenddot}. With +% this code we simply can use an empty \cs{scr@altsecnumhook} for +% \opt{numbers=auto} and two compellent definitions for the other cases. +% \end{description} +% \begin{macrocode} +%<*prepare> +\newcommand*{\scr@altsecnumhook}{} +\AtBeginDocument{\scr@altsecnumhook} +\newcommand*{\scr@altsecnumhooktrue}{% + \@altsecnumformattrue\global\let\@altsecnumformatfalse\@altsecnumformattrue +} +\newcommand*{\scr@altsecnumhookfalse}{% + \@altsecnumformatfalse\global\let\@altsecnumformattrue\@altsecnumformatfalse +} +% +% \end{macrocode} +% \end{macro}^^A \scr@altsecnumhook,\scr@altsecnumhooktrue,\scr@altsecnumhookfalse +% +% \begin{macro}{\@maybeautodot,\@@maybeautodot} +% \changes{v2.8e}{2001/07/10}{added} +% \changes{v3.00}{2008/10/07}{not any longer needed \cs{aftergroup} removed} +% We scan a \cs{the\meta{counter}} command to decide, if the automatic dot has +% to be added (later). It sets \cs{@autodottrue}, if there is any kind of +% alphabetic or Roman numbering command inside the one time expansion of the +% \cs{the\meta{counter}} given as argument. +% \begin{description} +% \item[Note:] This is a heuristic only. It would, e.g., fail, if you are +% using another macro, that expands to the output of the counter, e.g., +%\begin{verbatim} +% \def\myalph{\alph}\def\thesection{\myalph{section}} +%\end{verbatim} +% However, it seems that the heuristic is so good, that in more than twenty +% years nobody has complained about. +% \end{description} +% \begin{macrocode} +%<*body> +\newcommand{\@maybeautodot}[1]{\if@autodot\else\begingroup% + \expandafter\@@maybeautodot #1\@stop\endgroup\fi +} +\newcommand*{\@@maybeautodot}[1]{% + \ifx #1\@stop\let\@@maybeautodot\relax + \else + \ifx #1\Alph \@autodottrue\fi + \ifx #1\alph \@autodottrue\fi + \ifx #1\Roman \@autodottrue\fi + \ifx #1\roman \@autodottrue\fi + \ifx #1\@Alph \@autodottrue\fi + \ifx #1\@alph \@autodottrue\fi + \ifx #1\@Roman \@autodottrue\fi + \ifx #1\@roman \@autodottrue\fi + \ifx #1\romannumeral \@autodottrue\fi + \fi + \@@maybeautodot +} +% +% \end{macrocode} +% \end{macro}^^A \@maybeautodot,\@@maybeautodot +% +% \begin{macrocode} +%<*body> +\newcommand*\autodot{\if@altsecnumformat.\fi} +% +% \end{macrocode} +% \end{command}^^A \autodot +% +% +% \subsection{Definition and handling of sectioning commands} +% +% Some of the \LaTeX{} kernel features are used here too. But almost none of +% these features is enough to implement all the functionality of \KOMAScript{} +% classes. So we redefine several of the \LaTeX{} kernel macros to extend them +% and define several new features. +% \begin{description} +% \item[ToDo:] Don't redefine \LaTeX{} kernel macros, but define new macros +% for the interface. Maybe this should also be swapped to a new package used +% by the classes. +% \end{description} +% +% \begin{counter}{secnumdepth} +% The counter rules down to which section level the headings should be +% numbered. +% \begin{description} +% \item[ToDo:] Move this behind the declaration of the section levels to be +% able to use symbolic value \cs{subsectionnumdepth}. It is not related to +% the auto dot feature. +% \end{description} +% \begin{macrocode} +%<*body> +%\setcounter{secnumdepth}{2} +%
\setcounter{secnumdepth}{3} +% +% \end{macrocode} +% \end{counter} +% +% +% \begin{command}{\ifnumbered,\Ifnumbered} +% \changes{v3.12}{2013/12/16}{added} +% \changes{v3.28}{2019/11/19}{\cs{ifnumbered} renamed to \cs{Ifnumbered}} +% \begin{command}{\ifunnumbered,\Ifunnumbered} +% \changes{v3.12}{2013/12/16}{added} +% \changes{v3.28}{2019/11/19}{\cs{ifunnumbered} renamed to \cs{Ifunnumbered}} +% Commands +% \begin{quote}\raggedright +% \cs{Ifnumbered}\marg{section level name}\marg{numbered}\marg{not numbered}\\ +% \cs{Ifunnumbered}\marg{section level name}\marg{not numbered}\marg{numbered}\\ +% \end{quote} +% If \meta{section level name} has to be numbered, execute code \meta{numbered} +% otherwise execute code \meta{not numbered}. +% \begin{macrocode} +%<*body> +\providecommand*{\ifnumbered}{% + \ClassWarning{\KOMAClassName}{Usage of deprecated command + `\string\ifnumbered'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifnumbered' by `\string\Ifnumbered'% + }% + \Ifnumbered +} +\newcommand*{\Ifnumbered}[1]{% + \if@currentusenumber + \scr@ifundefinedorrelax{#1numdepth}{% + \expandafter\@secondoftwo + }{% + \expandafter\ifnum \@nameuse{#1numdepth}>\c@secnumdepth + \expandafter\expandafter\expandafter\@secondoftwo + \else + \expandafter\expandafter\expandafter\@firstoftwo + \fi + }% + \else + \expandafter\@secondoftwo + \fi +} +\providecommand*{\ifunnumbered}{% + \ClassWarning{\KOMAClassName}{Usage of deprecated command + `\string\ifunnumbered'.\MessageBreak + The command has been renamed because of a\MessageBreak + recommendation of The LaTeX Project Team.\MessageBreak + Please replace `\string\ifunnumbered' by `\string\Ifunnumbered'% + }% + \Ifunnumbered +} +\newcommand*{\Ifunnumbered}[1]{% + \Ifnumbered{#1}{\@secondoftwo}{\@firstoftwo}% +} +% +% \end{macrocode} +% \end{command}^^A \Ifunnumbered +% \end{command}^^A \ifnumbered +% +% +% \begin{macro}{\scr@activate@xsection,\scr@osectarg} +% \changes{v3.10}{2011/08/30}{added} +% Option \opt{headings=optiontotocandhead}, \opt{headings=optiontotoc} and +% \opt{headings=optiontohead} used +% \begin{quote} +% \cs{scr@activate@xsection}\marg{value} +% \end{quote} +% with the values 3, 2 and 1 to activate the extended optional argument. This +% sets \cs{scr@osectarg} to the corresponding value. The initial value 0 +% deactivates the extended optional argument. +% \begin{description} +% \item[ToDo:] Do we really need \cs{scr@activate@xsection}, that is used +% inside option \opt{headings} only? +% \end{description} +% \begin{macrocode} +%<*prepare> +\newcommand*{\scr@osectarg}{0} +\newcommand*{\scr@activate@xsection}[1]{% + \renewcommand*{\scr@osectarg}{#1}% +} +% +% \end{macrocode} +% \end{macro}^^A \scr@activate@xsection,\scr@osectarg +% +% +% \begin{macro}{\@startsection} +% \changes{v3.13a}{2014/09/11}{re-definition for extended optional argument} +% \begin{macro}{\scr@startsection} +% \changes{v3.13a}{2014/09/11}{added} +% \changes{v3.18}{2015/05/22}{using \cs{numexpr} for argument 2} +% \changes{v3.18}{2015/05/22}{using \cs{glueexpr} for arguments 3--5} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \changes{v3.26}{2018/09/18}{supporting \opt{afterindent}} +% \begin{macro}{\scr@saved@startsection} +% \changes{v3.13a}{2014/09/11}{added} +% \changes{v3.20}{2016/04/12}{supporting \pkg{amsgen}} +% \begin{macro}{\startsection@sectionname,\startsection@secnumdepth, +% \startsection@indent,\startsection@beforeskip, +% \startsection@afterskip,\startsection@afterindent, +% \@startsection@runintrue,\@startsection@runinfalse, +% \if@startsection@runin} +% \changes{v3.26}{2018/05/14}{added} +% The \cs{@startsection} of the \LaTeX{} kernel does not provide all the +% features we need for \KOMAScript. And the generic hooks of \LaTeX{} do not +% allow to change it wide enough. So we either have to use \pkg{xparse} to +% patch it very much or we have to define our own version. In this case +% patching is too fragile, so we define \cs{scr@startsection} and store the +% original definition in \cs{scr@saved@startsection}. +% \begin{description} +% \item[Note:] Package \pkg{amsgen} redefines \cs{@ifstar}. The new version +% does not ignore white spaces. So testing the original definition using +% \cs{@ifstar} may fail. It is better to use \cs{kernel@ifstar}. +% \item[ToDo:] All the testing here doesn't make much sense, because we are +% inside a class and packages like \pkg{amsgen} should not yet have been +% loaded. So the test only needs to test, if the \LaTeX{} kernel has been +% changed. +% \item[Note:] In our own \cs{scr@startsection} the macros +% \cs{startsection@sectionname}, \cs{startsection@secnumdepth}, +% \cs{startsection@indent}, \cs{startsection@beforeskip}, +% \cs{startsection@afterskip}, \cs{if@afterindent}, +% \cs{if@startsection@runin}, and \cs{startsection@afterindent} are valid +% from executing the do hook \dhook{heading/postinit}. So they can be used +% inside all the hooks. +% \item[Note:] \cs{startsection@indent}, \cs{startsection@beforeskip}, +% \cs{startsection@afterskip} and \cs{startsection@afterindent} are either +% skips or \cs{glueexpr}, that can be used like skips. +% \item[Note:] \cs{startsection@beforeskip} and \cs{startsection@afterskip} +% are effective values already. Not special treatment for negative or +% positive values must be done. +% \item[Note:] \cs{if@startsection@runin} +% are either \cs{iftrue} or \cs{iffalse}. +% \item[Note:] \cs{if@startsection@indentafter} does not exist and is not +% needed, because \cs{if@afterindent} is already valid and also either +% \cs{iftrue} or \cs{iffalse}. +% \item[Note:] Using one of the \cs{startsection@\dots} +% resp. \cs{if@startsection@\dots} macros outside \cs{scr@startsection} is +% not allowed and the result is unspecified. Inside \cs{scr@startsection} +% they have to be interpreted as constants, so changing them is not allowed! +% \end{description} +% \begin{macrocode} +%<*body> +\newcommand*{\scr@saved@startsection}[6]{% + \if@noskipsec \leavevmode \fi + \par + \@tempskipa #4\relax + \@afterindenttrue + \ifdim \@tempskipa <\z@ + \@tempskipa -\@tempskipa \@afterindentfalse + \fi + \if@nobreak + \everypar{}% + \else + \addpenalty\@secpenalty\addvspace\@tempskipa + \fi + \kernel@ifstar + {\@ssect{#3}{#4}{#5}{#6}}% + {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}% +} +\def\reserved@a#1#2#3#4#5#6{% + \if@noskipsec \leavevmode \fi + \par + \@tempskipa #4\relax + \@afterindenttrue + \ifdim \@tempskipa <\z@ + \@tempskipa -\@tempskipa \@afterindentfalse + \fi + \if@nobreak + \everypar{}% + \else + \addpenalty\@secpenalty\addvspace\@tempskipa + \fi + \@ifstar + {\@ssect{#3}{#4}{#5}{#6}}% + {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}% +} +\ifcase \ifx\@startsection\scr@saved@startsection 0 + \else + \ifx\@startsection\reserved@a 0 + \else 1 + \fi + \fi + \newcommand*{\scr@startsection}[6]{% + \ExecuteDoHook{heading/preinit/#1}% + \if@noskipsec \leavevmode \fi + \par + \@tempskipa \glueexpr #4\relax + \@ifundefined{scr@#1@afterindent}{% + \def\startsection@afterindent##1##2##3{##3}% + }{% + \expandafter\let\expandafter\startsection@afterindent + \csname scr@#1@afterindent\endcsname + }% + \startsection@afterindent{\@afterindenttrue}{\@afterindentfalse}{% + \@afterindenttrue + \ifdim \@tempskipa <\z@ + \@tempskipa -\@tempskipa \@afterindentfalse + \fi + }% + \def\startsection@sectionname{#1}% + \def\startsection@secnumdepth{\numexpr #2\relax}% + \def\startsection@indent{\glueexpr #3\relax}% + \let\startsection@beforeskip\@tempskipa + \@ifundefined{scr@#1@runin}{% + \def\scr@sect@runin##1##2##3{##3}% + }{% + \expandafter\let\expandafter\scr@sect@runin + \csname scr@#1@runin\endcsname + }% + \scr@sect@runin{% + \def\startsection@afterskip{\glueexpr #3\relax}% + \expandafter\let\csname if@startsection@runin\expandafter\endcsname + \csname iftrue\endcsname + }{% + \def\startsection@afterskip{\glueexpr #3\relax}% + \expandafter\let\csname if@startsection@runin\expandafter\endcsname + \csname iffalse\endcsname + }{% + \ifdim \glueexpr #5\relax <\z@ + \def\startsection@afterskip{\glueexpr (#3)*\m@ne\relax}% + \expandafter\let\csname if@startsection@runin\expandafter\endcsname + \csname iftrue\endcsname + \else + \def\startsection@afterskip{\glueexpr #3\relax}% + \expandafter\let\csname if@startsection@runin\expandafter\endcsname + \csname iffalse\endcsname + \fi + }% + \ExecuteDoHook{heading/postinit/#1}% + \if@nobreak + \everypar{}% + \else + \addpenalty\@secpenalty\addvspace\@tempskipa + \fi + \kernel@ifstar {% + \ExecuteDoHook{heading/branch/star/#1}% + \def\scr@s@ct@@nn@m@{#1}% + \@ssect{\glueexpr #3\relax}{\glueexpr #4\relax}{\glueexpr #5\relax}{#6}% + }{% + \ExecuteDoHook{heading/branch/nostar/#1}% + \scr@section@dblarg{% + \@sect{#1}{\numexpr #2\relax}{\glueexpr #3\relax}{\glueexpr #4\relax}% + {\glueexpr #5\relax}{#6}% + }% + }% + } +\else + \ClassWarningNoLine{\KOMAClassName}{`\string\@startsection' has been + changed.\MessageBreak + \KOMAClassName\space needs it's own definition of + `\string\@startsection'\MessageBreak + to provide extended features for the optional argument\MessageBreak + of `\string\section' etc.\MessageBreak + Generally it defines `\string\@startsection' completely new\MessageBreak + to achieve this. Because of the unexpected definition\MessageBreak + an alternative approach will be used.\MessageBreak + If this fails and if there isn't a new release of\MessageBreak + KOMA-Script that fixes the problem, please\MessageBreak + send a report to the KOMA-Script author.\MessageBreak + Note, that this alternative approach does not\MessageBreak + execute the elements of do-hooks:\MessageBreak + \space\space- `heading/postinit',\MessageBreak + \space\space- `heading/branch/star',\MessageBreak + \space\space- `heading/branch/nostar',\MessageBreak + and does always use `runin=bysign' and\MessageBreak + `afterindent=bysign'% + }% + \let\scr@saved@startsection\@startsection + \newcommand*{\scr@startsection}[6]{% + \ExecuteDoHook{heading/preinit/#1}% + \kernel@ifstar {% + \scr@saved@startsection{#1}{\numexpr #2\relax}{\glueexpr #3\relax}% + {\glueexpr #4\relax}{\glueexpr #5\relax}{#6}*% + }{% + \scr@section@dblarg{% + \scr@saved@startsection{#1}{\numexpr #2\relax}{\glueexpr #3\relax}% + {\glueexpr #4\relax}{\glueexpr #5\relax}{#6}}% + }% + } +\fi +% \end{macrocode} +% \begin{macro}{\scr@sect@runin} +% \changes{v3.26}{2018/09/18}{added} +% Depending on sectioning feature \opt{runin} the macro expands to the first +% argument, if a in-text heading aka run-in heading has to used, the second +% argument, if a free-standing heading has to be used, or the third argument, +% of run-in or free-standing depends on the sign of \opt{afterskip}. The +% initial definition is depending on the sign of \opt{afterskip}. This initial +% definition is also done inside \cs{@xsect}. \cs{scr@startsection} also +% redefines \cs{scr@sect@runin}. So it should always be the currently valid +% definition, even if \cs{scr@startsection} is used with a section command, +% that does not provide all the variable of \KOMAScript. +% \begin{macrocode} +\newcommand*{\scr@sect@runin}[3]{#3} +% \end{macrocode} +% \end{macro}^^A \scr@sect@runin +% \begin{macro}{\scr@startsection@ulm@error} +% \changes{v3.26}{2018/05/14}{added} +% This is the initial error message for using one of the internal macros +% before \cs{scr@startsection}. This should never happen. +% \begin{macrocode} +\newcommand*{\scr@startsection@ulm@error}[1]{% + \ClassError{\KOMAClassName}{% + \string#1 undefined outside of \string\scr@startsection + }{% + A KOMA-Script macro for package authors have been used outside + the\MessageBreak + specified definition scope.\MessageBreak + See `scrkernel-sections.dtx' for more information.% + }% +} +\newcommand*\startsection@sectionname{% + \scr@startsection@ulm@error\startsection@sectionname} +\newcommand*\startsection@secnumdepth{% + \scr@startsection@ulm@error\startsection@secnumdepth} +\newcommand*\startsection@indent{% + \scr@startsection@ulm@error\startsection@indent} +\newcommand*\startsection@beforeskip{% + \scr@startsection@ulm@error\startsection@beforeskip} +\newcommand*\startsection@afterskip{% + \scr@startsection@ulm@error\startsection@afterskip} +\newcommand*{\if@startsection@runin}{% + \scr@startsection@ulm@error\if@startsection@runin} +\newif\if@startsection@runin +\newcommand*\startsection@afterindent{% + \scr@startsection@ulm@error\startsection@afterindent} +% \end{macrocode} +% \end{macro}^^A \scr@startsection@ulm@error +% \end{macro}^^A \startsection@sectionname … \scr@startsection@runin +% \begin{macro}{\At@startsection} +% \changes{v3.14}{2014/09/11}{added} +% \changes{v3.27}{2019/02/04}{using \cs{AddtoDoHook}} +% \changes{v3.27}{2019/02/04}{deprecated} +% This is deprecated now. You should use the corresponding +% \dhook{heading/postinit} do hook. However the do hooks are command specific, +% but the argument of \cs{At@startsection} is style specific. +% \begin{macrocode} +\newcommand*{\At@startsection}[1]{% + \ClassInfo{\KOMAClassName}{% + Usage of deprecated command `\string\At@startsection' + mapped to\MessageBreak + `\string\AddtoDoHook{heading/postinit} + {...\string\@gobble}'% + }% + \AddtoDoHook{heading/postinit}{\scr@doonlyifstyleofargis{#1}{section}}% +} +% \end{macrocode} +% \begin{macro}{\scr@doonlyifstyleofargis} +% \changes{v3.27}{2019/02/04}{added} +% Execute the first argument only, of the style of the third argument is the +% second argument. +% \begin{macrocode} +\newcommand*{\scr@doonlyifstyleofargis}[3]{% + \IfSectionCommandStyleIs{#3}{#2}{#1}{}% +} +% \end{macrocode} +% \end{macro}^^A \scr@doonlyifstyleofargis +% \end{macro}^^A \At@startsection +% \begin{macro}{\Before@ssect} +% \changes{v3.14}{2014/09/11}{added} +% \changes{v3.27}{2019/02/04}{using \cs{AddtoDoHook}} +% \changes{v3.27}{2019/02/04}{deprecated} +% \changes{v3.35}{2021/10/15}{\cs{ClassWarning} instead of \cs{ClassInfo}} +% \changes{v3.35}{2021/10/15}{Usage of \cs{scr@doonlyifstyleofargis} fixed} +% This is deprecated now. You should use the corresponding +% \dhook{heading/branch/star} do hook. However the do hooks are command +% specific, but the argument of \cs{Before@ssect} is style specific. +% \begin{macrocode} +\newcommand*{\Before@ssect}[1]{% + \ClassWarning{\KOMAClassName}{% + Usage of deprecated command `\string\Before@ssect' + mapped to\MessageBreak + `\string\AddtoDoHook{heading/branch/star}% + {...\string\@gobble}'% + }% + \AddtoDoHook{heading/branch/star}{\scr@doonlyifstyleofargis{#1}{section}}% +} +% \end{macrocode} +% \end{macro}^^A \Before@ssect +% \begin{macro}{\Before@sect} +% \changes{v3.14}{2014/09/11}{added} +% \changes{v3.27}{2019/02/04}{using \cs{AddtoDoHook}} +% \changes{v3.27}{2019/02/04}{deprecated} +% \changes{v3.35}{2021/10/15}{\cs{ClassWarning} instead of \cs{ClassInfo}} +% \changes{v3.35}{2021/10/15}{Usage of \cs{scr@doonlyifstyleofargis} fixed} +% This is deprecated now. You should use the corresponding +% \dhook{heading/branch/nostar} do hook. However the do hooks are command +% specific, but the argument of \cs{Before@sect} is style specific. +% \begin{macrocode} +\newcommand*{\Before@sect}[1]{% + \ClassWarning{\KOMAClassName}{% + Usage of deprecated command `\string\Before@sect' + mapped to\MessageBreak + `\string\AddtoDoHook{heading/branch/nostar}% + {...\string\@gobble}'% + }% + \AddtoDoHook{heading/branch/nostar}{\scr@doonlyifstyleofargis{#1}{section}}% +} +% \end{macrocode} +% \end{macro}^^A \Before@sect +% \begin{macro}{\scr@section@dblarg,\scr@section@xdblarg} +% \changes{v3.13a}{2014/09/11}{added} +% Similar to the \LaTeX{} kernel macros \cs{@dblarg} and \cs{@xdblarg} but +% preserve the definition of \cs{scr@osectarg}. So changes of +% \cs{scr@osectarg} inside the definition of the command of the first +% argument, are locally to the execution of that command. +% \begin{macrocode} +\newcommand{\scr@section@dblarg}[1]{% + \kernel@ifnextchar[%] + {#1}% + {\scr@section@xdblarg{#1}}% +} +\newcommand{\scr@section@xdblarg}[2]{% + \begingroup + \edef\reserved@a{% + \unexpanded{\endgroup\let\scr@osectarg\z@#1[{#2}]{#2}\def\scr@osectarg}% + {\scr@osectarg}}% + \reserved@a +} +% \end{macrocode} +% \end{macro}^^A \scr@section@dblarg,\scr@section@xdblarg +% \end{macro}^^A \scr@saved@startsection +% \end{macro}^^A \scr@startsection +% \begin{description} +% \item[ToDo:] Currently we still redefine \cs{@startsection} to use either +% \cs{scr@saced@startsection} or \cs{scr@startsection}. But it would be +% better to not redefine a \LaTeX{} kernel macro. However, if not doing so, +% packages, that use \cs{@startsection} would not support \KOMAScript{} +% features without detecting \KOMAScript{} and using \cs{scr@startsection}. +% \end{description} +% \begin{macrocode} +\renewcommand*{\@startsection}{% + \ifnum \scr@osectarg=\z@ + \expandafter\scr@saved@startsection + \else + \expandafter\scr@startsection + \fi +} +% +% \end{macrocode} +% \end{macro}^^A \@startsection +% +% \begin{command}{\UseNumberUsageError} +% \changes{v3.27}{2019/02/02}{added} +% \begin{command}{\IfUseNumber} +% \changes{v3.27}{2019/02/02}{error if used outside sectioning command} +% Command \cs{IfUseNumner} is defined only inside sectioning commands. Using +% it outside is not specified. To report an error in this case, it should be +% set to \cs{UseNumberUsageError} outside a sectioning command. +% \begin{macrocode} +%<*body> +\newcommand*{\UseNumberUsageError}[2]{% + \ClassError{\KOMAClassName}{% + \string\IfUseNumber\space not allowed% + }{% + You cannot use \string\IfUseNumber\space outside a heading.\MessageBreak + If you'd continue, I'll ignore both arguments, because I do not + know\MessageBreak + whether to use the first or the second argument.% + }% +} +\newcommand*{\IfUseNumber}[2]{}% +\let\IfUseNumber\UseNumberUsageError +% +% \end{macrocode} +% \end{command}^^A \IfUseNumnr +% \end{command}^^A \UseNumberUsageError +% +% +% \begin{command}{\SecDef} +% \changes{v3.13a}{2014/09/11}{added} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{command}{\secdef} +% \changes{v3.13a}{2014/09/11}{re-definition because of extended optional argument} +% \begin{macrocode} +%<*body> +\newcommand*{\SecDef}[2]{\kernel@ifstar{#2}{\scr@section@dblarg{#1}}} +\CheckCommand*{\secdef}[2]{\@ifstar{#2}{\@dblarg{#1}}} +\let\secdef\SecDef +% +% \end{macrocode} +% \end{command}^^A \secdef +% \end{command}^^A \SecDef +% \begin{macro}{\scr@sect} +% \changes{v3.10}{2011/08/30}{removed} +% \end{macro}^^A \scr@sect +% \begin{macro}{\@sect} +% \changes{v3.10}{2011/08/30}{re-definition because of extended optional argument} +% \changes{v3.10}{2011/08/30}{using +% \cs{csname}\texttt{add\#1tocentry}\cs{endcsname} +% resp. \cs{addtocentrydefault}} +% \changes{v3.18}{2015/05/20}{defines \cs{IfUsePrefixLine} locally} +% \changes{v3.18}{2015/05/22}{using \cs{numexpr} for argument 2} +% \changes{v3.18}{2015/05/22}{using \cs{gluexpr} for arguments 3--5} +% \changes{v3.19}{2015/07/17}{using \cs{sectionlinesformat} and +% \cs{sectioncatchphraseformat}} +% \changes{v3.27}{2019/07/08}{new optional \opt{nonumber}} +% \changes{v3.30}{2020/02/25}{orphan spaces removed} +% \begin{macro}{\scr@latex@sect} +% \changes{v3.27}{2019/07/24}{added to be used by \pkg*{scrhack}} +% Because we want to support the extended optional argument for all commands +% defined using \cs{@startsection} we also have to redefine \cs{@sect}. Once +% again several security tests are done, before redefining an internal +% \LaTeX{} kernel macro. +% \begin{description} +% \item[ToDo:] It would be better not to redefine an internal \LaTeX{} kernel +% macro, but use a own definition in our own \cs{scr@startsection}. But in +% this case packages, that use \cs{@sect} would not automatically support +% several \KOMAScript{} features. +% \item[Note:] \cs{chapter} and \cs{part} do not use \cs{@sect} but +% \cs{SecDef}. +% \end{description} +% \begin{macrocode} +%<*body> +\def\scr@latex@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2>\c@secnumdepth + \let\@svsec\@empty + \else + \refstepcounter{#1}% + \protected@edef\@svsec{\@seccntformat{#1}\relax}% + \fi + \@tempskipa #5\relax + \ifdim \@tempskipa>\z@ + \begingroup + #6{% + \@hangfrom{\hskip #3\relax\@svsec}% + \interlinepenalty \@M #8\@@par}% + \endgroup + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}% + \else + \def\@svsechd{% + #6{\hskip #3\relax + \@svsec #8}% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}}% + \fi + \@xsect{#5}} +\ifx\@sect\scr@latex@sect\else + \let\scr@latex@sect\@sect + \ClassWarning{\KOMAClassName}{% + Unexpected definition of \string\@sect!\MessageBreak + Please send information about this to\MessageBreak + the KOMA-Script maintainer!\MessageBreak + Maybe LaTeX will be broken by the redefinition\MessageBreak + of \string\@sect}% +\fi +% \end{macrocode} +% \end{macro}^^A \scr@latex@sect +% \begin{macrocode} +%\ClassInfo{\KOMAClassName}{redefining LaTeX kernel macro \string\@sect} +\def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum \scr@osectarg=\z@ + \@scr@tempswafalse + \else + \scr@istest#7=\@nil + \fi + \@currentusenumbertrue + \if@scr@tempswa + \setkeys{KOMAarg.section}{tocentry={#8},head={#8},reference={#8},#7}% + \else + \ifcase \scr@osectarg\relax + \setkeys{KOMAarg.section}{tocentry={#7},head={#7},reference={#7}}% + \or + \setkeys{KOMAarg.section}{tocentry={#8},head={#7},reference={#8}}% + \or + \setkeys{KOMAarg.section}{tocentry={#7},head={#8},reference={#7}}% + \or + \setkeys{KOMAarg.section}{tocentry={#7},head={#7},reference={#7}}% + \fi + \fi +% \end{macrocode} +% \changes{v3.23}{2017/02/04}{support for \pkg{minitoc}} +% \changes{v3.23}{2017/03/24}{usage of \cs{ext@figure} and \cs{ext@table} +% instead of \texttt{lof} and \texttt{lot}} +% Add the \texttt{xsect} entries to \texttt{lof} and \texttt{lot}. Note, that +% the original \cs{starsection} tests of \pkg{minitoc} has a bug and so +% does not work. And the original code of \pkg{minitoc} has hard coded +% \texttt{lot} and \texttt{lof} instead of \cs{ext@figure} and +% \cs{ext@table}. This is a fixed one: +% \begin{macrocode} + \scr@ifundefinedorrelax{scr@mt@saved@sect}{}{% + \expandafter\ifx\csname #1\endcsname\section + \addcontentsline{\ext@figure}{xsect}{\@currenttocentry}% + \addcontentsline{\ext@table}{xsect}{\@currenttocentry}% + \fi + \expandafter\ifx\csname #1\endcsname\starsection\relax + \addcontentsline{\ext@figure}{xsect}{\@currenttocentry}% + \addcontentsline{\ext@table}{xsect}{\@currenttocentry}% + \fi + }% + \let\IfUsePrefixLine\@secondoftwo + \ifcase + \if@currentusenumber + \ifnum \numexpr #2\relax>\c@secnumdepth \z@\else \@ne\fi + \else + \z@ + \fi + \let\@svsec\@empty +% \end{macrocode} +% \changes{v3.31}{2020/06/02}{execute counter reset list} +% Even for not numbered sections, the reset list für the section counter has +% to be executed. +% \begin{macrocode} + \expandafter\ifnum\scr@v@is@lt{3.31}\relax\else + \begingroup + \let\@elt\@stpelt + \csname cl@#1\endcsname + \endgroup + \fi +% \end{macrocode} +% \changes{v3.31}{2020/06/02}{\cs{hy@insteadofrefstepcounter} added} +% At this point we have to make sure, that the \pkg{hyperref} code for not +% increasing a counter is executed. +% \begin{macrocode} + \hy@insteadofrefstepcounter{#1}% + \else + \refstepcounter{#1}% + \expandafter\@maybeautodot\csname the#1\endcsname + \protected@edef\@svsec{\@seccntformat{#1}\relax}% + \fi +% \end{macrocode} +% \changes{v3.26}{2018/09/18}{support for \cs{scr@sect@runin}} +% \changes{v3.27}{2019/02/02}{\cs{IfUseNumber} defined locally} +% \begin{macrocode} + \ifdim + \scr@sect@runin{\z@}{\p@}{\glueexpr #5\relax}>\z@ + \begingroup + \ifx\@svsec\@empty + \let\IfUseNumber\@secondoftwo + \else + \let\IfUseNumber\@firstoftwo + \fi +% \end{macrocode} +% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added} +% \changes{v3.27}{2019/02/02}{\cs{scr@do@at} added} +% \begin{macrocode} + \ExecuteDoHook{heading/begingroup/#1}% + #6{\nobreak\interlinepenalty \@M + \sectionlinesformat{#1}{\glueexpr #3\relax}\@svsec{#8}\@@par}% + \ExecuteDoHook{heading/endgroup/#1}% + \endgroup +%<*trace> + \ClassInfo{\KOMAClassName}{% + head=`\detokenize\expandafter{\@currentheadentry}'\MessageBreak + tocentry=`\detokenize\expandafter{\@currenttocentry}'\MessageBreak + reference=`\detokenize\expandafter{\@currentlabelname}'}% +% + \expandafter\csname #1mark\expandafter\endcsname\expandafter{\@currentheadentry}% + \ifx\@currenttocentry\@empty\else + \scr@ifundefinedorrelax{add#1tocentry}{% + \expandafter\gdef\csname add#1tocentry\endcsname##1##2{% + \addtocentrydefault{#1}{##1}{##2}% + }% + }{}% + \ifcase + \if@currentusenumber + \ifnum \numexpr #2\relax>\c@secnumdepth \z@\else \@ne\fi + \else + \z@ + \fi + \csname add#1tocentry\endcsname{}{\@currenttocentry}% + \else +% \end{macrocode} +% \changes{v3.31}{2020/06/06}{using \cs{\dots tocformat}}% +% \begin{description} +% \item[ToDo:] Move \cs{autodot} to the definition of \cs{\dots tocformat}. +% \end{description} +% \begin{macrocode} + \@ifundefined{#1tocformat}{% + \expandafter\gdef\csname #1tocformat\endcsname + {\csname the#1\endcsname}% + }{}% + \csname add#1tocentry\endcsname{\csname #1tocformat\endcsname}{% + \@currenttocentry}% + \fi + \fi + \else +% \end{macrocode} +% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added} +% \changes{v3.27}{2019/02/02}{\cs{ExecuteDoHook} added} +% \begin{macrocode} + \def\@svsechd{% + \ifx\@svsec\@empty + \let\IfUseNumber\@secondoftwo + \else + \let\IfUseNumber\@firstoftwo + \fi + \ExecuteDoHook{heading/begingroup/#1}% + #6{\nobreak\sectioncatchphraseformat{#1}{\glueexpr #3\relax}\@svsec{#8}}% +%<*trace> + \ClassInfo{\KOMAClassName}{% + head=`\detokenize\expandafter{\@currentheadentry}'\MessageBreak + tocentry=`\detokenize\expandafter{\@currenttocentry}'\MessageBreak + reference=`\detokenize\expandafter{\@currentlabelname}'}% +% + \expandafter\csname #1mark\expandafter\endcsname + \expandafter{\@currentheadentry}% + \ifx\@currenttocentry\@empty\else + \scr@ifundefinedorrelax{add#1tocentry}{% + \expandafter\gdef\csname add#1tocentry\endcsname####1####2{% + \addtocentrydefault{#1}{####1}{####2}% + }% + }{}% + \ifcase + \if@currentusenumber + \ifnum \numexpr #2\relax>\c@secnumdepth \z@\else \@ne\fi + \else + \z@ + \fi + \csname add#1tocentry\endcsname{}{\@currenttocentry}% + \else +% \end{macrocode} +% \changes{v3.31}{2020/06/06}{using \cs{\dots tocformat}}% +% \begin{description} +% \item[ToDo:] Move \cs{autodot} to the definition of \cs{\dots tocformat}. +% \end{description} +% \begin{macrocode} + \@ifundefined{#1tocformat}{% + \expandafter\gdef\csname #1tocformat\endcsname + {\csname the#1\endcsname}% + }{}% + \csname add#1tocentry\endcsname{\csname #1tocformat\endcsname}{% + \@currenttocentry}% + \fi + \fi + \ExecuteDoHook{heading/endgroup/#1}% + }% + \fi + \let\IfUsePrefixLine\scr@IfUsePrefixLineWarning + \@xsect{\glueexpr #5\relax}% +} +% \end{macrocode} +% \begin{macro}{\scr@ds@tocentry,\@currenttocentry} +% \changes{v3.10}{2011/08/30}{added} +% \changes{v3.22}{2016/07/12}{\cs{scr@ds@tocentry} renamed to \cs{@currenttocentry}} +% \begin{macro}{\scr@ds@head,\@currentheadentry} +% \changes{v3.10}{2011/08/30}{added} +% \changes{v3.22}{2016/07/12}{\cs{scr@ds@head} renamed to \cs{@currentheadentry}} +% \begin{macro}{\@currentlabelname} +% \changes{v3.22}{2016/07/12}{added} +% \begin{macro}{\@scr@tempswatrue,\@scr@tempswafalse,\if@scr@tempswa} +% \changes{v3.10}{2011/08/30}{added} +% \begin{macro}{\@currentusenumbertrue,\@currentusenumberfalse,\if@currentusenumber} +% \changes{v3.27}{2019/07/08}{added} +% \begin{macro}{\scr@istest} +% \changes{v3.10}{2011/08/30}{added} +% We are using several \pkg*{scrbase} options to handle the extended +% optional argument features. +% \begin{description} +% \item[ToDo:] Is there a general initialization hook to make additional such +% options at package author level possible? +% \end{description} +% \begin{macrocode} +\DefineFamily{KOMAarg} +\DefineFamilyMember[.section]{KOMAarg} +\providecommand*\@currenttocentry{} +\providecommand*\@currentheadentry{} +\providecommand*\@currentlabelname{} +\FamilyStringKey[.section]{KOMAarg}{tocentry}{\@currenttocentry} +\FamilyStringKey[.section]{KOMAarg}{head}{\@currentheadentry} +\DefineFamilyKey[.section]{KOMAarg}{reference}{% + \scr@ifundefinedorrelax{NR@gettitle}{% + \scr@ifundefinedorrelax{GetTitleString}{% + \def\@currentlabelname{#1}% + }{% + \GetTitleString{#1}% + \let\@currentlabelname\GetTitleStringResult + }% + }{% + \NR@gettitle{#1}% + }% + \scr@ifundefinedorrelax{TR@gettitle}{}{% + \expandafter\TR@gettitle\expandafter{\@currentlabelname}% + }% + \scr@ifundefinedorrelax{ztitlerefsetup}{}{% + \ztitlerefsetup{title=\@currentlabelname}% + }% + \FamilyKeyStateProcessed +} +\FamilyInverseBoolKey[.section]{KOMAarg}{nonumber}{@currentusenumber} +\newcommand*{\scr@istest}{} +\def\scr@istest#1=#2\@nil{% + \ifx\relax#2\relax\@scr@tempswafalse\else\@scr@tempswatrue\fi +} +\newif\if@scr@tempswa +% \end{macrocode} +% \end{macro}^^A \scr@istest +% \end{macro}^^A \if@currentusenumber +% \end{macro}^^A \if@scr@tempswa +% \end{macro}^^A \@currentlabelname +% \end{macro}^^A \scr@ds@head,\@currentheadentry +% \end{macro}^^A \scr@ds@tocentry,\@currenttocentry +% +% \begin{command}{\sectionlinesformat,\sectioncatchphraseformat} +% \changes{v3.19}{2015/07/17}{added} +% Headings with style \texttt{section} can either be free-standing or +% in-line. Free-standing headings are printed using: +% \begin{quote} +% \cs{sectionlinesformat}\marg{level name}\marg{indent}\marg{number}\marg{text} +% \end{quote} +% The in-line headings are printed using: +% \begin{quote} +% \cs{sectioncatchphraseformat}\marg{level name}\marg{indent}\marg{number}\marg{text} +% \end{quote} +% The \meta{level name} can also be interpreted as the section command +% name. The \meta{indent} is the horizontal indent of the first line of the +% heading. The \meta{number} is either empty for not numbered headings or the +% formatted number to be used. \meta{text} is the formatted text to be +% used. Formatted text means, the fonts are already set and \cs{@@par} for the +% end of paragraph already has been added to the \meta{text} of +% \cs{sectionlinesformat}. But if the user uses more paragraphs than this +% final one, the user is responsible to prevent page breaks! +% \begin{description} +% \item[Note:] Argument \meta{indent} is a kind of design mistake. It would +% have been better to get the indent by the attributes of the \meta{level +% name}. However having an argument makes it easier for users to redefine +% the command. +% \end{description} +% \begin{macrocode} +\newcommand{\sectionlinesformat}[4]{% + \@hangfrom{\hskip #2#3}{#4}% +} +\newcommand{\sectioncatchphraseformat}[4]{% + \hskip #2#3#4% +} +% \end{macrocode} +% \end{command}^^A \sectionlinesformat,\sectioncatchphraseformat +% \end{macro}^^A \@sect +% +% \begin{macro}{\@ssect} +% \changes{v3.19}{2015/07/17}{re-definition because of several new features} +% \begin{macro}{\scr@latex@ssect} +% \changes{v3.27}{2019/07/24}{added to be used by \pkg*{scrhack})} +% \changes{v3.30}{2020/02/25}{orphan space removed} +% The star variant of section commands do not use \cs{@sect} but +% \cs{@ssect}. Here we have the problem, that the command name argument is +% missing. The whole definition is very similar to \cs{@sect} but without a +% number, ToC entry or running head. +% \begin{description} +% \item[Note:] we do not have to support an extended optional argument, +% because there isn't an optional argument. +% \item[ToDo:] It would be better not to redefine an internal \LaTeX{} kernel +% macro, but use a own definition in our own \cs{scr@startsection}. But in +% this case packages, that use \cs{@ssect} would not automatically support +% several \KOMAScript{} features. +% \item[Note:] \cs{chapter} and \cs{part} do not use \cs{@ssect} but +% \cs{SecDef}. +% \end{description} +% \begin{macrocode} +\def\scr@latex@ssect#1#2#3#4#5{% + \@tempskipa #3\relax + \ifdim \@tempskipa>\z@ + \begingroup + #4{% + \@hangfrom{\hskip #1}% + \interlinepenalty \@M #5\@@par}% + \endgroup + \else + \def\@svsechd{#4{\hskip #1\relax #5}}% + \fi + \@xsect{#3}} +\ifx\@ssect\scr@latex@ssect +\else + \let\scr@latex@ssect\@ssect + \ClassWarning{\KOMAClassName}{% + Unexpected definition of \string\@ssect!\MessageBreak + Please send information about this to\MessageBreak + the KOMA-Script maintainer!\MessageBreak + Maybe LaTeX will be broken by the redefinition\MessageBreak + of \string\@ssect}% +\fi +% \end{macrocode} +% \end{macro}^^A \scr@latex@ssect +% \begin{macrocode} +%\ClassInfo{\KOMAClassName}{redefining LaTeX kernel macro +% \string\@ssect} +\def\@ssect#1#2#3#4#5{% + \scr@ifundefinedorrelax{scr@s@ct@@nn@m@}{% + \ClassWarning{\KOMAClassName}{Incompatible usage of + \string\@ssect\space detected.\MessageBreak + You've used the KOMA-Script implementation of + \string\@ssect\MessageBreak + from within a non compatible caller, that does not\MessageBreak + \string\scr@s@ct@@nn@m@\space locally.\MessageBreak + This could result in several error messages}% + \def\scr@s@ct@@nn@m@{\string\scr@s@ct@@nn@m@}% + }{% +% \end{macrocode} +% \changes{v3.31}{2020/06/02}{execute counter reset list} +% Even for not numbered sections, the reset list für the corresponding section +% counter has to be executed. +% \begin{macrocode} + \expandafter\ifnum\scr@v@is@lt{3.31}\relax\else + \begingroup + \let\@elt\@stpelt + \csname cl@\scr@s@ct@@nn@m@\endcsname + \endgroup + \fi + }% +% \end{macrocode} +% \changes{v3.26}{2018/09/18}{support for \cs{scr@sect@runin}} +% \changes{v3.27}{2019/02/02}{defining \cs{IfUseNumber} locally} +% \begin{macrocode} + \ifdim + \scr@sect@runin{\z@}{\p@}{\glueexpr #3\relax}>\z@ + \begingroup + \let\IfUseNumber\@secondoftwo +% \end{macrocode} +% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added} +% \changes{v3.27}{2019/02/02}{\cs{ExecuteDoHook} added} +% \begin{macrocode} + \edef\reserved@a{% + \noexpand\ExecuteDoHook{heading/begingroup/\scr@s@ct@@nn@m@}% + }\reserved@a + #4{\nobreak\interlinepenalty \@M + \expandafter\sectionlinesformat\expandafter{\scr@s@ct@@nn@m@}% + {\glueexpr #1\relax}\@empty{#5}\@@par}% + \edef\reserved@a{% + \noexpand\ExecuteDoHook{heading/endgroup/\scr@s@ct@@nn@m@}% + }\reserved@a + \endgroup + \else + \edef\@svsechd{% + \unexpanded{\let\IfUseNumber\@secondoftwo}% + \noexpand\ExecuteDoHook{heading/begingroup/\scr@s@ct@@nn@m@}% + \unexpanded{#4}{% +% \end{macrocode} +% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added} +% \begin{macrocode} + \noexpand\nobreak + \noexpand\sectioncatchphraseformat{\scr@s@ct@@nn@m@}% + \unexpanded{{\glueexpr #1\relax}\@empty{#5}}% + }% + \noexpand\ExecuteDoHook{heading/endgroup/\scr@s@ct@@nn@m@}% + }% + \fi + \let\scr@s@ct@@nn@m@\relax + \@xsect{\glueexpr #3\relax}% +} +% +% \end{macrocode} +% \end{macro}^^A \@ssect +% \begin{macro}{\@xsect} +% \changes{v3.26}{2018/09/18}{re-definition} +% \changes{v3.30}{2020/02/25}{orphan space removed} +% \begin{macro}{\scr@latex@xsect} +% \changes{v3.27}{2019/07/24}{added to be used by \pkg*{scrhack}} +% We need a differentiation with \cs{scr@sect@runin} to be initialized in +% \cs{@xsect} and also need to reset this internal macro at the end. +% \begin{description} +% \item[ToDo:] It would be better not to redefine the internal \LaTeX{} kernel +% macro, but to define and use our own one. +% \end{description} +% \begin{macrocode} +%<*body> +\def\scr@latex@xsect#1{% + \@tempskipa #1\relax + \ifdim \@tempskipa>\z@ + \par \nobreak + \vskip \@tempskipa + \@afterheading + \else + \@nobreakfalse + \global\@noskipsectrue + \everypar{% + \if@noskipsec + \global\@noskipsecfalse + {\setbox\z@\lastbox}% + \clubpenalty\@M + \begingroup \@svsechd \endgroup + \unskip + \@tempskipa #1\relax + \hskip -\@tempskipa + \else + \clubpenalty \@clubpenalty + \everypar{}% + \fi}% + \fi + \ignorespaces +} +\ifx\@xsect\scr@latex@xsect\else + \let\scr@latex@xsect\@xsect + \ClassWarning{\KOMAClassName}{% + Unexpected definition of \string\@xsect!\MessageBreak + Please send information about this to\MessageBreak + the KOMA-Script maintainer!\MessageBreak + Maybe LaTeX will be broken by the redefinition\MessageBreak + of \string\@xsect}% +\fi +% \end{macrocode} +% \end{macro}^^A \scr@latex@xsect +% \begin{macrocode} +%\ClassInfo{\KOMAClassName}{redefining LaTeX kernel macro +% \string\@xsect} +\def\@xsect#1{% + \@ifundefined{scr@sect@runin}{% + \def\scr@sect@runin##1##2##3{##3}% + }% + \@tempskipa #1\relax + \ifdim \scr@sect@runin{\z@}{\p@}{\@tempskipa}>\z@ + \par \nobreak + \vskip \@tempskipa + \@afterheading + \else + \@nobreakfalse + \global\@noskipsectrue + \everypar{% + \if@noskipsec + \global\@noskipsecfalse + {\setbox\z@\lastbox}% + \clubpenalty\@M + \begingroup \@svsechd \endgroup + \unskip + \@tempskipa #1\relax + \ifdim \@tempskipa<\z@ + \hskip -\@tempskipa + \else + \hskip \@tempskipa + \fi + \else + \clubpenalty \@clubpenalty + \everypar{}% + \fi}% + \fi + \def\scr@sect@runin##1##2##3{##3}% + \ignorespaces +} +% +% \end{macrocode} +% \end{macro}^^A \@xsect +% +% \begin{command}{\IfUsePrefixLine} +% \changes{v3.18}{2015/06/09}{added} +% \begin{macro}{\scr@IfUsePrefixLineWarning} +% \changes{v3.18}{2015/06/09}{added} +% This command makes sense inside the section commands only. But users often +% tried to use it outside instead of \cs{ifnumbered}. This mostly has resulted +% in a undefined command sequence error users did not understand. So now, we +% use an internal definition to be uses outside the section commands, that +% results in a warning with more information about the mistake and that does +% neither use the first nor the second argument (instead of using both of them). +% \begin{macrocode} +%<*body> +\newcommand*{\scr@IfUsePrefixLineWarning}[2]{% + \ClassWarning{\KOMAClassName}{% + Usage of \string\IfUsePrefixLine\space outside + section command\MessageBreak + style makes no sense, because the behaviour not only\MessageBreak + depends on class options but also on the run-time\MessageBreak + section command style.\MessageBreak + Neither the then-code nor the else-code will be\MessageBreak + executed.\MessageBreak + You may change this and avoid the warning by LOCALLY\MessageBreak + setting \string\IfUsePrefixLine\space to either + \string\@firstoftwo\space or\MessageBreak + \string\@secondoftwo\space before using it% + }% +} +\newcommand*{\IfUsePrefixLine}[2]{} +\let\IfUsePrefixLine\scr@IfUsePrefixLineWarning +% +% \end{macrocode} +% \end{macro}^^A \scr@IfUsePrefixLineWarning +% \end{command}^^A \IfUsePrefixLine +% +% +% \begin{command}{\raggedsection} +% \changes{v2.3h}{1996/01/20}{added} +% Should be either \cs{raggedleft}, \cs{raggedright}, \cs{centering} or +% empty. Empty means no change, which is usually justified. Users could also +% use other alignment/justification commands like the commands of package +% \pkg{ragged2e}. The initial value is \cs{raggedright}. +% \begin{description} +% \item[Note:] We are here in the class. So usually \cs{raggedright} is the +% \cs{raggedright} of the \LaTeX{} kernel. This also means: no hyphenation. +% \item[Note:] We define is already here, because it is not only used for +% style \texttt{section} but also as initial default of the \emph{higher +% level} styles. +% \end{description} +% \begin{macrocode} +%<*body> +\newcommand*{\raggedsection}{} +\let\raggedsection\raggedright +% +% \end{macrocode} +% \end{command}^^A \raggedsection +% +% +% All the options of \cs{DeclareSectionCommand} are options of family +% \texttt{KOMAarg} member \texttt{.dsc}. +% \begin{macrocode} +%<*body> +\DefineFamily{KOMAarg} +\DefineFamilyMember[.dsc]{KOMAarg} +% \end{macrocode} +% \begin{command}{\DeclareSectionCommandStyleOption} +% \changes{v3.17}{2015/03/23}{added} +% \begin{command}{\AddToSectionCommandOptionsDoList,\RelaxSectionCommandOptions} +% \changes{v3.20}{2015/11/18}{added} +% \begin{macro}{\@AddToSectionCommandOptionsDoList,\scr@dsc@doopts} +% \changes{v3.20}{2015/11/18}{added} +% The basic command to define a section command style option is: +% \begin{quote} +% \cs{DeclareSectionCommandStyleOption}\marg{style}\marg{option}\marg{definition} +% \end{quote} +% Is similar to a corresponding \cs{DefineFamilyKey}. But the option +% definition is not done immediately but added to +% \cs{scr@dsc@style@\meta{style}@options} which is executed later inside +% \cs{DeclareSectionCommand} after detection of the \opt{style} option. The +% option is also added to the \emph{section command options do list} of +% \cs{scr@dsc@doopts} using +% \begin{quote} +% \cs{AddToSectionCommandOptionsDoList}\marg{option} +% \end{quote} +% This is used, e.g., to relax all options inside \cs{DeclareSectionCommand} +% using \cs{RelaxSectionCommandOptions} to not have options defined, that are +% used by one style, while declaring a command of another style, that does not +% support the option. +% \begin{description} +% \item[Note:] We also could have used another option member for every style +% to avoid such problems. With \LaTeX3 also usage of +% \pkg[https://www.ctan.org/pkg/l3kernel]{l3keys}, which provides a kind of +% hierarchical options, would have been possible. +% \end{description} +% \begin{macrocode} +\newcommand*{\DeclareSectionCommandStyleOption}[3]{% + \AddToSectionCommandOptionsDoList{#2}% + \expandafter\g@addto@macro\csname scr@dsc@style@#1@options\endcsname{% + \DefineFamilyKey[.dsc]{KOMAarg}{#2}{#3}% + }% +} +\newcommand*{\AddToSectionCommandOptionsDoList}[1]{% + \kernel@ifnextchar [%] + {\@AddToSectionCommandOptionListWithDefault{#1}}% + {\l@addto@macro\scr@dsc@doopts{\do{#1}}}% +} +\newcommand*{\@AddToSectionCommandOptionListWithDefault}{} +\def\@AddToSectionCommandOptionListWithDefault#1[#2]{% + \l@addto@macro\scr@dsc@doopts{\do[{#2}]{#1}} +}% +\newcommand*{\scr@dsc@doopts}{} +\newcommand*{\RelaxSectionCommandOptions}{% + \begingroup + \def\do@endgroup{\endgroup}% + \def\do{% + \kernel@ifnextchar [%] + {\@do}% + {\@do[]}% + }% + \def\@do[##1]##2{% + \l@addto@macro\do@endgroup{\RelaxFamilyKey[.dsc]{KOMAarg}{##2}}% + }% + \scr@dsc@doopts + \do@endgroup +} +% \end{macrocode} +% \end{macro}^^A \@AddToSectionCommandOptionsListWithDefault,\scr@dsc@dooptions +% \end{command}^^A \AddToSectionCommandOptionsDoList,\RelaxSectionCommandOptions +% \end{command}^^A \DeclareSectionCommandStyleOption +% We provide several kinds of options: +% \begin{command}{\DeclareSectionCommandDummyOption} +% \changes{v3.17}{2015/03/23}{added} +% \changes{v3.20}{2015/11/18}{removed} +% \end{command}^^A \DeclareSectionCommandDummyOption +% \begin{command}{\DeclareSectionCommandStyleLengthOption, +% \DeclareSectionCommandStyleNumberOption, +% \DeclareSectionCommandStyleFontOption} +% \changes{v3.17}{2015/03/23}{added} +% \changes{v3.20}{2016/04/25}{argument expansion} +% All these commands have the four arguments: +% \begin{quote} +% \marg{style}\marg{option}\marg{prefix}\marg{postfix} +% \end{quote} +% Most of the commands all correspond to \pkg*{scrbase} option declaration +% commands: +% \begin{center} +% \begin{tabular}{lll} +% \cs{DeclareSectionCommand} & \pkg*{scrbase} & meaning \\\hline +% \cs{DeclareSectionCommandStyleLengthOption} +% & \cs{FamilyLengthMacroKey} & length option\\ +% \cs{DeclareSectionCommandStyleNumberOption} +% & \cs{FamilyCounterMacroKey} & numerical option\\ +% \cs{DeclareSectionCommandStyleFontOption} +% & & font element option\\ +% \end{tabular} +% \end{center} +% The \meta{macro} of the corresponding \pkg*{scrbase} command is build by +% \meta{prefix}\cs{scr@dsc@current}\meta{postfix}. For +% \cs{DeclareSectionCommandStyleOption} the build name is the font +% element instead. However, before using (setting) the option, +% \cs{scr@dsc@current} has to be defined to be \meta{level name} +% (aka \emph{section command name}). Depending on \cs{ifscr@dsc@expandtopt} +% (see option \opt{expandtopt}) lengths given as argument to the option of +% \cs{DeclareSectionCommandStyleLengthOption} is expanded to a \texttt{pt} +% value instead of used as it is. +% \begin{macrocode} +\newcommand*{\DeclareSectionCommandStyleLengthOption}[4]{% + \DeclareSectionCommandStyleOption{#1}{#2}{% + \protected@edef\reserved@a{% + \noexpand\FamilySetLength{KOMAarg}{#2}{\noexpand\@tempskipa}{##1}% + }\reserved@a + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \ifscr@dsc@expandtopt + \expandafter\edef\csname #3\scr@dsc@current#4\endcsname{% + \the\@tempskipa}% + \else + \expandafter\edef\csname #3\scr@dsc@current#4\endcsname{##1}% + \fi + \fi + }% +} +\newcommand*{\DeclareSectionCommandStyleNumberOption}[4]{% + \DeclareSectionCommandStyleOption{#1}{#2}{% + \protected@edef\reserved@a{% + \noexpand\FamilySetCounterMacro{KOMAarg}{#2}{\noexpand\reserved@a}{##1} + }\reserved@a + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \expandafter\let\csname #3\scr@dsc@current#4\endcsname\reserved@a + \fi + }% +} +\newcommand*{\DeclareSectionCommandStyleFontOption}[4]{% + \DeclareSectionCommandStyleOption{#1}{#2}{% + \IfExistskomafont{#3\scr@dsc@current#4}{% + \setkomafont + }{% + \newkomafont + }{#3\scr@dsc@current#4}{##1}% + \FamilyKeyStateProcessed + }% +} +% \end{macrocode} +% \end{command}^^A \DeclareSectionCommandStyleLengthOption … +% \begin{command}{\DeclareSectionCommandStyleFuzzyOption} +% \changes{v3.26}{2018/09/18}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% We also have a kind of fuzzy option. A fuzzy option defined by +% \begin{quote} +% \cs{DeclareSectionCommandStyleFuzzyOption}\meta{style}\meta{option}% +% \meta{prefix}\meta{postfix}\meta{also} +% \end{quote} +% is an option, that provides three values: \texttt{true} (and the aliases +% \texttt{on} and \texttt{yes}), \texttt{false} (and the aliases \texttt{off} +% and \texttt{no}), and a third one \meta{also}. It defines a macro with the +% name \meta{prefix}\cs{scr@dsc@current}\meta{postfix} and three arguments. If +% the option is true, the macro expands to the first argument. If the option +% is false, the macro expands to the second argument. If the option is +% \meta{also} the macro expands to the third argument. +% \begin{macrocode} +\newcommand*{\DeclareSectionCommandStyleFuzzyOption}[5]{% + \DeclareSectionCommandStyleOption{#1}{#2}{% + \FamilySetBool{KOMAarg}{#2}{@tempswa}{##1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \if@tempswa + \expandafter\def\csname #3\scr@dsc@current#4\endcsname + ####1####2####3{####1}% + \else + \expandafter\def\csname #3\scr@dsc@current#4\endcsname + ####1####2####3{####2}% + \fi + \else + \Ifstr{##1}{#5}{% + \expandafter\def\csname #3\scr@dsc@current#4\endcsname + ####1####2####3{####3}% + \FamilyKeyStateProcessed + }{}% + \fi + }% +} +% \end{macrocode} +% \end{command}^^A \DeclareSectionCommandStyleFuzzyOptions +% +% These types of options are used to define all the options of a style, e.g., +% \begin{macro}{\scr@dsc@style@section@options} +% \changes{v3.17}{2015/03/23}{added} +% the option declarations of style \texttt{section}: +% \begin{macrocode} +\newcommand*{\scr@dsc@style@section@options}{} +% \end{macrocode} +% \begin{description} +% \item[\opt{indent=\meta{length}}:] +% the left indent of the heading. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleLengthOption{section} + {indent}{scr@}{@sectionindent} +% \end{macrocode} +% \begin{description} +% \item[\opt{afterindent=\meta{fuzzy}}:] +% \changes{v3.26}{2018/09/18}{option \opt{afterindent}} +% fuzzy logic. A boolean value states whether to indent the first line +% after the heading. With additional \opt{afterindent=bysign} the decision +% depends on the sign of \opt{beforeskip}. Negative values of +% \opt{beforeskip} result in no paragraph indent. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleFuzzyOption{section} + {afterindent}{scr@}{@afterindent} + {bysign} +% \end{macrocode} +% \begin{description} +% \item[\opt{beforeskip=\meta{length}}:] +% The vertical distance before the heading. If \opt{afterindent=bysign}, the +% absolute value of \meta{length} is used. Otherwise the \meta{length} can +% also be negative to move up the heading. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleLengthOption{section} + {beforeskip}{scr@}{@beforeskip} +% \end{macrocode} +% \begin{description} +% \item[\opt{runin=\meta{fuzzy}}:] +% \changes{v3.26}{2018/09/18}{option \opt{runin}} +% fuzzy logic. A boolean value states whether the heading is run-in (or +% free-standing). With additional \opt{runin=bysign} the decision depends on +% the sign of \opt{afterskip}. Negative values of \opt{afterskip} result in +% a run-in heading. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleFuzzyOption{section} + {runin}{scr@}{@runin} + {bysign} +% \end{macrocode} +% \begin{description} +% \item[\opt{afterskip=\meta{length}}:] +% In case of a run-in heading (see option \opt{runin}) the horizontal +% distance after the heading. In case of a free-standing heading the +% vertical distance after the heading. If the run-in heading is activated by +% a negative \meta{length}, the absolute value is used. Otherwise the +% \meta{length} can also be negative, which usually does not make much +% sense. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleLengthOption{section} + {afterskip}{scr@}{@afterskip} +% \end{macrocode} +% \begin{description} +% \item[\opt{font=\meta{font settings}}:] +% The font setting for the font element of the heading. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleFontOption{section}{font}{}{} +% \end{macrocode} +% \end{macro}^^A \scr@dsc@style@section@options +% \begin{macro}{\scr@dsc@def@style@section@command} +% \changes{v3.18}{2015/05/21}{added} +% \changes{v3.20}{2016/01/19}{inline section test fixed} +% Macro +% \begin{quote} +% \cs{scr@dsc@def@style@section@command}\marg{command name} +% \end{quote} +% defines a section command \cs{\meta{command name}} of style +% \texttt{section}. +% \begin{description} +% \item[Note:] Here we already use our own \cs{scr@startsection} instead of +% \cs{@startsection}. So maybe not redefining \cs{@startsection} or +% redefining \cs{@startsection} only optionally wouldn't be a big step. +% \end{description} +% \begin{macrocode} +\newcommand*{\scr@dsc@def@style@section@command}[1]{% + \@namedef{#1}{% + \scr@startsection{#1}% + {\csname #1numdepth\endcsname}% + {\csname scr@#1@sectionindent\endcsname}% + {\csname scr@#1@beforeskip\endcsname}% + {\csname scr@#1@afterskip\endcsname}% + {% + \ifdim\glueexpr\csname scr@#1@afterskip\endcsname >\z@ + \expandafter\ifnum\scr@v@is@gt{2.96}\relax + \setlength{\parfillskip}{\z@ plus 1fil}% + \fi + \fi + \raggedsection\normalfont\sectfont\nobreak + \usekomafont{#1}% + }% + }% +} +% \end{macrocode} +% \end{macro}^^A \scr@dsc@def@style@section@command +% +% \begin{macro}{\scr@dsc@style@chapter@options} +% \changes{v3.17}{2015/03/23}{added} +% Now, the option declaration of style \texttt{chapter} (similar, but not the +% same): +% \begin{macrocode} +%<*book|report> +\newcommand*{\scr@dsc@style@chapter@options}{} +% \end{macrocode} +% \begin{description} +% \item[\opt{pagestyle=\meta{name}}:] +% The page style, that should be used for the starting page of the chapter +% like outline level. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleOption{chapter}{pagestyle}{% + \@namedef{\scr@dsc@current pagestyle}{#1}% + \FamilyKeyStateProcessed +}% +% \end{macrocode} +% \begin{description} +% \item[\opt{afterindent=\meta{fuzzy}}:] +% \changes{v3.26}{2018/09/18}{option \opt{afterindent}} +% fuzzy logic. A boolean value states whether to indent the first line +% after the heading. With additional \opt{afterindent=bysign} the decision +% depends on the sign of \opt{beforeskip}. Negative values of +% \opt{beforeskip} result in no paragraph indent. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleFuzzyOption{chapter} + {afterindent}{scr@}{@afterindent} + {bysign} +% \end{macrocode} +% \begin{description} +% \item[\opt{beforeskip=\meta{length}}:] +% The vertical distance before the heading. If \opt{afterindent=bysign}, the +% absolute value of \meta{length} is used. Otherwise the \meta{length} can +% also be negative to move up the heading. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleLengthOption{chapter} + {beforeskip}{scr@}{@beforeskip} +% \end{macrocode} +% \begin{description} +% \item[\opt{innerskip=\meta{length}}:] +% The vertical distance between the prefix line and the text (if a prefix +% line is used). +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleLengthOption{chapter} + {innerskip}{scr@}{@innerskip} +% \end{macrocode} +% \begin{description} +% \item[\opt{afterskip=\meta{length}}:] +% The vertical distance after the heading. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleLengthOption{chapter} + {afterskip}{scr@}{@afterskip} +% \end{macrocode} +% \begin{description} +% \item[\opt{font=\meta{font settings}}:] +% The font setting for the font element of the heading. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleFontOption{chapter}{font}{}{} +% \end{macrocode} +% \begin{description} +% \item[\opt{prefixfont=\meta{font settings}}:] +% The font setting for the font element of the prefix line of the heading. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleFontOption{chapter}{prefixfont}{}{prefix} +% \end{macrocode} +% \end{macro}^^A \scr@dsc@style@chapter@options +% \begin{macro}{\scr@dsc@def@style@chapter@command} +% \changes{v3.18}{2015/05/22}{added} +% Macro +% \begin{quote} +% \cs{scr@dsc@def@style@chapter@command}\marg{command name} +% \end{quote} +% defines a section command \cs{\meta{command name}} of style +% \texttt{chapter}. We need some more macros to be initialized than with +% \cs{scr@dsc@def@style@section@command}. +% \begin{description} +% \item[ToDo:] Make a more generic (and general) interface for this. +% \end{description} +% \begin{macrocode} +\newcommand*{\scr@dsc@def@style@chapter@command}[1]{% + \@namedef{#1}{\scr@startchapter{#1}}% + \@namedef{@#1}{\scr@@startchapter{#1}}% + \@namedef{@s#1}{\scr@@startschapter{#1}}% + \@namedef{@make#1head}{\scr@makechapterhead{#1}}% + \@namedef{@makes#1head}{\scr@makeschapterhead{#1}}% + \@namedef{@@make#1head}{\scr@@makechapterhead{#1}}% + \@namedef{@@makes#1head}{\scr@@makeschapterhead{#1}}% + \@namedef{set#1preamble}{\set@preamble{#1}}% +} +% +% \end{macrocode} +% \begin{macro}{\scr@dsc@style@chapter@subcommands} +% \changes{v3.30}{2020/04/08}{added} +% Internal name list of additional commands to be defined for style +% \texttt{chapter} commands. This is used, to decide, if a new section command +% declaration is really new or already redefines some commands. This should +% help to avoid, e.g., defining a new chapter command \cs{schapter}, if +% \cs{chapter} is already defines, because \cs{schapter} would redefine the +% \cs{@schapter} of \cs{chapter}. +% \begin{macrocode} +\newcommand*{\scr@dsc@style@chapter@subcommands}[1]{% + @#1,@s#1,@make#1head,@makes#1head,@@make#1head,@@makes#1head,set#1preamble% +} +% \end{macrocode} +% \end{macro}^^A \scr@dsc@style@chapter@subcommands +% \end{macro}^^A \scr@dsc@def@style@chapter@command +% +% \begin{macro}{\scr@dsc@style@part@options} +% \changes{v3.17}{2015/03/23}{added} +% Now the options for style \texttt{part} (very similar to \texttt{chapter}): +% \begin{macrocode} +\newcommand*{\scr@dsc@style@part@options}{} +% \end{macrocode} +% \begin{description} +% \item[\opt{pagestyle=\meta{name}}:] +% The page style, that should be used for the starting page of the chapter +% like outline level. +% \end{description} +% \begin{macrocode} +%<*report|book> +\DeclareSectionCommandStyleOption{part}{pagestyle}{% + \@namedef{\scr@dsc@current pagestyle}{#1}% + \FamilyKeyStateProcessed +}% +% +% \end{macrocode} +% \begin{description} +% \item[\opt{afterindent=\meta{fuzzy}}:] +% \changes{v3.26}{2018/09/18}{option \opt{afterindent}} +% fuzzy logic. A boolean value states whether to indent the first line +% after the heading. With additional \opt{afterindent=bysign} the decision +% depends on the sign of \opt{beforeskip}. Negative values of +% \opt{beforeskip} result in no paragraph indent. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleFuzzyOption{part} + {afterindent}{scr@}{@afterindent} + {bysign} +% \end{macrocode} +% \begin{description} +% \item[\opt{beforeskip=\meta{length}}:] +% The vertical distance before the heading. If \opt{afterindent=bysign}, the +% absolute value of \meta{length} is used. Otherwise the \meta{length} can +% also be negative to move up the heading. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleLengthOption{part} + {beforeskip}{scr@}{@beforeskip} +% \end{macrocode} +% \begin{description} +% \item[\opt{innerskip=\meta{length}}:] +% The vertical distance between the prefix line and the text (if a prefix +% line is used). +% \end{description} +% \begin{macrocode} +%<*book|report> +\DeclareSectionCommandStyleLengthOption{part} + {innerskip}{scr@}{@innerskip} +% +% \end{macrocode} +% \begin{description} +% \item[\opt{afterskip=\meta{length}}:] +% The vertical distance after the heading. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleLengthOption{part} + {afterskip}{scr@}{@afterskip} +% \end{macrocode} +% \begin{description} +% \item[\opt{font=\meta{font settings}}:] +% The font setting for the font element of the heading. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleFontOption{part}{font}{}{} +% \end{macrocode} +% \begin{description} +% \item[\opt{prefixfont=\meta{font settings}}:] +% The font setting for the font element of the prefix line of the heading. +% \end{description} +% \begin{macrocode} +\DeclareSectionCommandStyleFontOption{part}{prefixfont}{}{prefix} +% \end{macrocode} +% \end{macro}^^A \scr@dsc@style@part@options +% \begin{macro}{\scr@dsc@def@style@part@command} +% \changes{v3.18}{2015/05/23}{added} +% Macro +% \begin{quote} +% \cs{scr@dsc@def@style@part@command}\marg{command name} +% \end{quote} +% defines a section command \cs{\meta{command name}} of style +% \texttt{part}. This looks like a mixture of +% \cs{scr@dsc@def@style@section@command} and +% \cs{scr@dsc@def@style@chapter@command}. +% \begin{description} +% \item[ToDo:] Make a more generic (and general) interface for this. +% \end{description} +% \begin{macrocode} +\newcommand*{\scr@dsc@def@style@part@command}[1]{% + \@namedef{#1}{\scr@startpart{#1}}% + \@namedef{@#1}{\scr@@startpart{#1}}% + \@namedef{@s#1}{\scr@@startspart{#1}}% +% \@namedef{@end#1}{\scr@@endpart{#1}}% +% \@namedef{set#1preamble}{\set@preamble{#1}}% +} +% \end{macrocode} +% \begin{macro}{\scr@dsc@style@part@subcommands} +% \changes{v3.30}{2020/04/08}{added} +% Internal name list of additional commands to be defined for style +% \texttt{part} commands. +% \begin{macrocode} +\newcommand*{\scr@dsc@style@part@subcommands}[1]{% + @#1,@s#1,@end#1,set#1preamble% +} +% \end{macrocode} +% \end{macro}^^A \scr@dsc@style@part@subcommands +% \end{macro}^^A \scr@dsc@def@style@part@command +% +% \begin{macro}{\scr@dsc@style@section@neededoptionstest} +% \changes{v3.17}{2015/03/24}{added} +% \changes{v3.24}{2017/04/25}{initial values of \opt{indent} and +% \opt{font}} +% \changes{v3.26}{2018/09/18}{supporting \opt{runin} and \opt{afterindent}} +% This macro checks, that all attributes needed for the definition of a +% section command (with style \texttt{section}) are properly setup. If not, an +% error is reported and the definition is prevented (using +% \cs{aftergroup}\cs{@gobbletwo} inside \cs{scr@declaresectioncommanderror}). +% \begin{macrocode} +\newcommand*{\scr@dsc@style@section@neededoptionstest}{% + \scr@ifundefinedorrelax{scr@\scr@dsc@current @sectionindent}{% + \scr@declaresectioncommandwarning{\scr@dsc@current}% + {section indent}{indent}{0pt}% + {\@namedef{scr@\scr@dsc@current @sectionindent}{0pt}}% + }{}% + \scr@ifundefinedorrelax{scr@\scr@dsc@current @beforeskip}{% + \scr@declaresectioncommanderror{\scr@dsc@current}% + {before section skip}{beforeskip}% + }{}% + \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterskip}{% + \scr@declaresectioncommanderror{\scr@dsc@current}% + {after section skip}{afterskip}% + }{}% + \IfExistskomafont{\scr@dsc@current}{}{% + \scr@declaresectioncommandwarning{\scr@dsc@current}% + {font}{font}{\normalsize}% + {\newkomafont{\scr@dsc@current}{\normalsize}}% + }% + \scr@ifundefinedorrelax{scr@\scr@dsc@current @runin}{% + \l@addto@macro\local@endgroup{% + \ClassInfo{\KOMAClassName} + {using compatibility default `runin=bysign'\MessageBreak + for `\expandafter\string\csname \scr@dsc@current\endcsname}% + \expandafter\gdef\csname scr@\scr@dsc@current @runin\endcsname + ##1##2##3{##3}% + }% + }{}% + \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterindent}{% + \l@addto@macro\local@endgroup{% + \ClassInfo{\KOMAClassName} + {using compatibility default `afterindent=bysign'\MessageBreak + for `\expandafter\string\csname \scr@dsc@current\endcsname}% + \expandafter\gdef\csname scr@\scr@dsc@current @afterindent\endcsname + ##1##2##3{##3}% + }% + }{}% +} +% \end{macrocode} +% \end{macro}^^A \scr@dsc@style@section@neededoptionstest +% +% \begin{macro}{\scr@dsc@style@chapter@neededoptionstest} +% \changes{v3.17}{2015/03/24}{added} +% \changes{v3.24}{2017/04/25}{initial values for all but level +% \texttt{chapter}} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% This macro checks, that all attributes needed for the definition of a +% chapter command (with style \texttt{chapter}) are properly setup. If not, an +% error is reported and the definition is prevented (using +% \cs{aftergroup}\cs{@gobbletwo} inside \cs{scr@declaresectioncommanderror}). +% \begin{macrocode} +%<*book|report> +\newcommand*{\scr@dsc@style@chapter@neededoptionstest}{% + \scr@ifundefinedorrelax{\scr@dsc@current pagestyle}{% + \Ifstr{\scr@dsc@current}{chapter}{% + \scr@declaresectioncommanderror{\scr@dsc@current}% + {initial page style}{pagestyle}% + }{% + \scr@declaresectioncommandwarning{\scr@dsc@current}% + {initial page style}{pagestyle}% + {\chapterpagestyle}% + {\@namedef{\scr@dsc@current pagestyle}{\chapterpagestyle}}% + }% + }{}% + \scr@ifundefinedorrelax{scr@\scr@dsc@current @innerskip}{% + \Ifstr{\scr@dsc@current}{chapter}{% + \scr@declaresectioncommanderror{\scr@dsc@current}% + {inner chapter skip}{innerskip}% + }{% + \scr@declaresectioncommandwarning{\scr@dsc@current}% + {inner chapter skip}{innerskip}% + {\scr@chapter@innerskip}% + {\@namedef{scr@\scr@dsc@current @innerskip}{\scr@chapter@innerskip}}% + }% + }{}% + \scr@ifundefinedorrelax{scr@\scr@dsc@current @beforeskip}{% + \Ifstr{\scr@dsc@current}{chapter}{% + \scr@declaresectioncommanderror{\scr@dsc@current}% + {before chapter skip}{beforeskip}% + }{% + \scr@declaresectioncommandwarning{\scr@dsc@current}% + {before chapter skip}{beforeskip}% + {\scr@chapter@beforeskip}% + {\@namedef{scr@\scr@dsc@current @beforeskip}{\scr@chapter@beforeskip}}% + }% + }{}% + \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterskip}{% + \Ifstr{\scr@dsc@current}{chapter}{% + \scr@declaresectioncommanderror{\scr@dsc@current}% + {after chaper skip}{afterskip}% + }{% + \scr@declaresectioncommandwarning{\scr@dsc@current}% + {after chaper skip}{afterskip}% + {\scr@chapter@afterskip}% + {\@namedef{scr@\scr@dsc@current @afterskip}{\scr@chapter@afterskip}}% + }% + }{}% + \IfExistskomafont{\scr@dsc@current}{}{% + \Ifstr{\scr@dsc@current}{chapter}{% + \scr@declaresectioncommanderror{\scr@dsc@current}{font}{font}% + }{% + \scr@declaresectioncommandwarning{\scr@dsc@current}% + {font}{font}% + {\usekomafont{chapter}}% + {\newkomafont{\scr@dsc@current}{\usekomafont{chapter}}}% + }% + }% + \IfExistskomafont{\scr@dsc@current prefix}{}{% + \Ifstr{\scr@dsc@current}{chapter}{% + \scr@declaresectioncommanderror{\scr@dsc@current}% + {prefix line font}{prefixfont}% + }{% + \scr@declaresectioncommandwarning{\scr@dsc@current}% + {prefix line font}{prefixfont}% + {\usekomafont{chapterprefix}}% + {\newkomafont{\scr@dsc@current prefix}{\usekomafont{chapterprefix}}}% + }% + }{}% + \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterindent}{% + \l@addto@macro\local@endgroup{% + \ClassInfo{\KOMAClassName} + {using compatibility default `afterindent=bysign'\MessageBreak + for `\expandafter\string\csname \scr@dsc@current\endcsname}% + \expandafter\gdef\csname scr@\scr@dsc@current @afterindent\endcsname + ##1##2##3{##3}% + }% + }{}% +} +% +% \end{macrocode} +% \end{macro}^^A \scr@dsc@style@chapter@neededoptionstest +% +% \begin{macro}{\scr@dsc@style@part@neededoptionstest} +% \changes{v3.17}{2015/03/24}{added} +% \changes{v3.24}{2017/04/25}{initial values for all but level \texttt{part}} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% This macro checks, that all attributes needed for the definition of a +% part command (with style \texttt{part}) are properly setup. If not, an +% error is reported and the definition is prevented (using +% \cs{aftergroup}\cs{@gobbletwo} inside \cs{scr@declaresectioncommanderror}). +% \begin{macrocode} +\newcommand*{\scr@dsc@style@part@neededoptionstest}{% +%<*book|report> + \scr@ifundefinedorrelax{\scr@dsc@current pagestyle}{% + \Ifstr{\scr@dsc@current}{part}{% + \scr@declaresectioncommanderror{\scr@dsc@current}% + {initial page style}{pagestyle}% + }{% + \scr@declaresectioncommandwarning{\scr@dsc@current}% + {initial page style}{pagestyle}% + {\partpagestyle}% + {\@namedef{\scr@dsc@current pagestyle}{\partpagestyle}}% + }% + }{}% + \scr@ifundefinedorrelax{scr@\scr@dsc@current @innerskip}{% + \Ifstr{\scr@dsc@current}{part}{% + \scr@declaresectioncommanderror{\scr@dsc@current}% + {inner part skip}{innerskip}% + }{% + \scr@declaresectioncommandwarning{\scr@dsc@current}% + {inner part skip}{innerskip}% + {\scr@part@innerskip}% + {\@namedef{scr@\scr@dsc@current @innerskip}{\scr@part@innerskip}}% + }% + }{}% +% + \scr@ifundefinedorrelax{scr@\scr@dsc@current @beforeskip}{% + \Ifstr{\scr@dsc@current}{part}{% + \scr@declaresectioncommanderror{\scr@dsc@current}% + {before part skip}{beforeskip}% + }{% + \scr@declaresectioncommandwarning{\scr@dsc@current}% + {before part skip}{beforeskip}% + {\scr@part@beforeskip}% + {\@namedef{scr@\scr@dsc@current @beforeskip}{\scr@part@beforeskip}}% + }% + }{}% + \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterskip}{% + \Ifstr{\scr@dsc@current}{part}{% + \scr@declaresectioncommanderror{\scr@dsc@current}% + {after part skip}{afterskip}% + }{% + \scr@declaresectioncommandwarning{\scr@dsc@current}% + {after part skip}{afterskip}% + {\scr@part@afterskip}% + {\@namedef{scr@\scr@dsc@current @afterskip}{\scr@part@afterskip}}% + }% + }{}% + \IfExistskomafont{\scr@dsc@current}{}{% + \Ifstr{\scr@dsc@current}{part}{% + \scr@declaresectioncommanderror{\scr@dsc@current}{font}{font}% + }{% + \scr@declaresectioncommandwarning{\scr@dsc@current}{font}{font}% + {\usekomafont{part}}% + {\newkomafont{\scr@dsc@current}{\usekomafont{part}}}% + }% + }{}% + \IfExistskomafont{\scr@dsc@current prefix}{}{% + \Ifstr{\scr@dsc@current}{part}{% + \scr@declaresectioncommanderror{\scr@dsc@current}% + {number font}{prefixfont}% + }{% + \scr@declaresectioncommandwarning{\scr@dsc@current}% + {number font}{prefixfont}% + {\usekomafont{partprefix}}% + {\newkomafont{\scr@dsc@current prefix}{\usekomafont{partprefix}}}% + }% + }{}% + \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterindent}{% + \l@addto@macro\local@endgroup{% + \ClassInfo{\KOMAClassName}{% + using compatibility default +%
`afterindent=false'\MessageBreak +% `afterindent=true'\MessageBreak + for `\expandafter\string\csname \scr@dsc@current\endcsname}% + \expandafter\gdef\csname scr@\scr@dsc@current @afterindent\endcsname + ##1##2##3% +%
{##2}% +% {##1}% + }% + }{}% +} +% \end{macrocode} +% \end{macro}^^A \scr@dsc@style@part@neededoptionstest +% +% \begin{macro}{\scr@dsc@parametersonlytrue,\scr@dsc@parametersonlyfalse, +% \ifscr@dsc@parametersonly} +% \changes{v3.17}{2015/03/24}{added} +% \changes{v3.20}{2015/11/18}{dummy options removed} +% In the first option pass of \cs{DeclareSectionCommand} this is set to true, +% if the \opt{style} option is used without value, to change the settings of a +% command without running \cs{scr@dsc@def@style@\meta{style}@command} and +% therefore without defining the command itself. +% \begin{description} +% \item[ToDo:] Is this a not documented feature? What's the sense? +% \end{description} +% \begin{macrocode} +\newif\ifscr@dsc@parametersonly +% \end{macrocode} +% \end{macro}^^A \ifscr@dsc@parametersonly +% +% \begin{command}{\DeclareSectionCommand} +% \changes{v3.15}{2014/11/21}{added} +% \changes{v3.17}{2015/03/23}{re-implemented because of style depending +% options} +% \changes{v3.18}{2015/05/22}{\cs{scr@dsc@def@style@\dots @command} +% defines style depending macros} +% \changes{v3.20}{2015/10/03}{using \cs{DeclareTOCStyleEntry}} +% The main command to define new section commands or redefine existing section +% commands. Incidentally it also defines the corresponding ToC entry command. +% \begin{quote} +% \cs{DeclareSectionCommand}\oarg{options}\marg{command name} +% \end{quote} +% is used to define \cs{\meta{command name}}. The \meta{options} are used to +% specify the behave of the command. It is declared as optional +% argument. However for new commands not all the options are really optional. +% \begin{description} +% \item[Note:] Don't forget to declare all options, that are defined for +% \cs{DeclareSectionCommand} also for \cs{ProvideSectionCommands}! +% \end{description} +% \begin{macrocode} +\newcommand*{\DeclareSectionCommand}[2][]{% + \edef\scr@dsc@current{#2}% +% \end{macrocode} +% The first pass to get the: +% \begin{description} +% \item[\opt{style=\meta{name}}:] +% style of the section command. +% \end{description} +% \begin{macrocode} + \scr@dsc@parametersonlyfalse + \DefineFamilyKey[.dsc]{KOMAarg}{style}{% + \IfArgIsEmpty{##1}{% + \scr@dsc@parametersonlytrue + \FamilyKeyStateProcessed + }{% + \scr@ifundefinedorrelax{scr@dsc@def@style@##1@command}{% + \FamilyKeyStateUnknownValue + }{% + \@namedef{scr@\scr@dsc@current @style}{##1}% + \FamilyKeyStateProcessed + }% + }% + }% +% \end{macrocode} +% \begin{description} +% \item[\opt{tocstyle=\meta{name}}:] \changes{v3.20}{2015/11/12}{early +% evaluation of option \opt{tocstyle}} \changes{v3.27}{2019/10/02}{prefix +% for storing directory style changed} style of the ToC entry. From +% \pkg*{tocbasic} 3.27 the style name macro has been changed from +% \cs{scr@dte@\meta{level name}@style} to \cs{scr@tso@\meta{level +% name}@style}. +% \begin{description} +% \item[ToDo:] Don't support deprecated \cs{scr@dte@\meta{level name}@style} +% any longer. +% \end{description} +% \end{description} +% \begin{macrocode} + \DefineFamilyKey[.dsc]{KOMAarg}{tocstyle}{% + \IfArgIsEmpty{##1}{% + \@ifundefined{scr@dte@\scr@dsc@current @style}{}{% + \expandafter\let\csname scr@dte@\scr@dsc@current @style\endcsname + \relax + }% + \expandafter\let\csname scr@tso@\scr@dsc@current @style\endcsname + \relax + \FamilyKeyStateProcessed + }{% +% \typeout{TRACE: option tocstyle=##1}% +% \typeout{TRACE: command=\scr@dsc@current}% + \scr@ifundefinedorrelax{scr@dte@def@l@##1}{% +% \typeout{TRACE: style not defined}% + \FamilyKeyStateUnknownValue + }{% +% \typeout{TRACE: style defined}% + \@namedef{scr@dte@\scr@dsc@current @style}{##1}% + \@namedef{scr@tso@\scr@dsc@current @style}{##1}% + \FamilyKeyStateProcessed + }% + }% + }% +% \end{macrocode} +% \begin{description} +% \item[\texttt{@else@=\meta{value}}:] +% \changes{v3.20}{2015/11/18}{early evaluation of option \opt{tocstyle}} +% All other options are ignored using the \opt{@else@} option, which simply +% accepts every option. So the first pass does not report any unknown +% options. +% \end{description} +% \begin{macrocode} + \DefineFamilyKey[.dsc]{KOMAarg}{@else@}{% +%<*trace> + \typeout{TRACE: ignoring option `@else@=\detokenize{##1}'}% + \typeout{TRACE: + \string\scr@key@atlist=`\detokenize\expandafter{\scr@key@atlist}'}% + \typeout{TRACE: + \string\scr@key@name=`\detokenize\expandafter{\scr@key@name}'}% + \typeout{TRACE: + \string\scr@key@value=`\detokenize\expandafter{\scr@key@value}'}% +% + \FamilyKeyStateProcessed + }% + \FamilyExecuteOptions[.dsc]{KOMAarg}{#1}% +% \end{macrocode} +% \changes{v3.20}{2015/11/18}{Resetting options after first pass} +% After the first pass we have to reset these options. +% \begin{macrocode} + \RelaxFamilyKey[.dsc]{KOMAarg}{@else@}% + \RelaxFamilyKey[.dsc]{KOMAarg}{tocstyle}% + \RelaxFamilyKey[.dsc]{KOMAarg}{style}% + \begingroup + \scr@ifundefinedorrelax{scr@\scr@dsc@current @style}{% + \scr@declaresectioncommanderror{\scr@dsc@current} + {section command style}{style}% + }{}% + \endgroup + \@firstofone{% +% \end{macrocode} +% \changes{v3.20}{2015/11/12}{dummy options for main pass removed} +% Now, we know the style and can activate all the options of the style. +% \begin{macrocode} +% \typeout{TRACE: style=\@nameuse{scr@\scr@dsc@current @style}}% + \@nameuse{scr@dsc@style@\@nameuse{scr@\scr@dsc@current @style}@options}% +% \end{macrocode} +% And initialize the ToC style. +% \begin{macrocode} +% \typeout{TRACE: tocstyle=% +% \@nameuse{scr@tso@\scr@dsc@current @style}}% + \scr@ifundefinedorrelax{scr@tso@\scr@dsc@current @style}{% + \scr@ifundefinedorrelax{l@\scr@dsc@current}{% + \@namedef{scr@tso@\scr@dsc@current @style}{default}% + }{}% + }{}% +% \end{macrocode} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \changes{v3.21}{2016/06/12}{support for prefix \opt{tocentry} instead of +% \opt{toc}} +% We also have to define options for all the ToC style options by adding the +% prefix \opt{toc} to the names of these options. This also means a ToC style +% option \opt{style} must not exist (because we already have an option +% \opt{tocstyle}). This is the main reason, \cs{DeclareTOCStyleEntry} has not +% such an option but a corresponding argument. Additionally ToC style options +% should never start with \opt{toc} (because of the ugly resulting +% \opt{toctoc\dots}). +% \begin{macrocode} + \let\scr@dsc@tocstyle@options\@empty + \let\scr@dsc@extra@relax@opts\@empty + \scr@ifundefinedorrelax{scr@tso@\scr@dsc@current @style}{% + \expandafter\let + \csname scr@tso@\scr@dsc@current @style\expandafter\endcsname + \csname scr@dte@\scr@dsc@current @style\endcsname + }{}% + \scr@ifundefinedorrelax{scr@tso@\scr@dsc@current @style}{}{% + \begingroup + \def\scr@dte@current{#2}% + \edef\reserved@a{% + \noexpand\@ExecuteTOCEntryStyleInitCode{% + \@nameuse{scr@tso@\scr@dsc@current @style}% + }{\scr@dsc@current}% + }\reserved@a + \def\do@endgroup{\endgroup}% + \def\do##1{% + \l@addto@macro\do@endgroup{% + \l@addto@macro\scr@dsc@extra@relax@opts{% + \RelaxFamilyKey[.dsc]{KOMAarg}{toc##1}% + \RelaxFamilyKey[.dsc]{KOMAarg}{tocentry##1}% + }% + }% + \kernel@ifnextchar[%] + {\@dodefault{##1}}% + {\@donodefault{##1}}% + }% + \def\@donodefault##1{% + \l@addto@macro\do@endgroup{% + \DefineFamilyKey[.dsc]{KOMAarg}{toc##1}{% + \l@addto@macro{\scr@dsc@tocstyle@options}{##1={####1},}% + \FamilyKeyStateProcessed + }% + \DefineFamilyKey[.dsc]{KOMAarg}{tocentry##1}{% + \l@addto@macro{\scr@dsc@tocstyle@options}{##1={####1},}% + \FamilyKeyStateProcessed + }% + }% + }% + \def\@dodefault##1[##2]{% + \l@addto@macro\do@endgroup{% + \DefineFamilyKey[.dsc]{KOMAarg}{toc##1}[##2]{% + \l@addto@macro{\scr@dsc@tocstyle@options}{##1={####1},}% + \FamilyKeyStateProcessed + }% + \DefineFamilyKey[.dsc]{KOMAarg}{tocentry##1}[##2]{% + \l@addto@macro{\scr@dsc@tocstyle@options}{##1={####1},}% + \FamilyKeyStateProcessed + }% + }% + }% + \scr@dte@doopts + \do@endgroup + }% +% \end{macrocode} +% Make option \opt{style} and \opt{tocstyle} (fast) dummies, because they +% already have been handled completely. +% \begin{macrocode} + \DefineFamilyKey[.dsc]{KOMAarg}{style}{\FamilyKeyStateProcessed}% + \DefineFamilyKey[.dsc]{KOMAarg}{tocstyle}{\FamilyKeyStateProcessed}% +% \end{macrocode} +% Some options exist for all section command styles and therefore are defined +% here and not a part of the style options: +% \begin{description} +% \item[\opt{expandtopt=\meta{boolean}}:] +% If \texttt{true} all lengths are expanded at setting time to unit pt +% instead of used unchanged. With this, the lengths are not depending on the +% font size of usage time but on the current font size. +% \end{description} +% \begin{macrocode} + \FamilyBoolKey[.dsc]{KOMAarg}{expandtopt}{scr@dsc@expandtopt}% + \scr@dsc@expandtoptfalse +% \end{macrocode} +% \begin{description} +% \item[\opt{increaselevel=\meta{number}}:] +% Automatically increase \opt{level} by \meta{number} (with default 1). This +% is needed for \cs{DeclareSectionCommands} and therefore only defined if +% \cs{scr@local@levelincrease} is defined. +% \end{description} +% \begin{macrocode} + \scr@ifundefinedorrelax{scr@local@levelincrease}{% + \RelaxFamilyKey[.dsc]{KOMAarg}{increaselevel}% + }{% + \FamilyCounterMacroKey[.dsc]{KOMAarg}{increaselevel}[1]% + {\scr@local@levelincrease}% + }% +% \end{macrocode} +% \begin{description} +% \item[\opt{level=\meta{number}}:] +% The numerical outline level of the command. +% \end{description} +% \begin{macrocode} + \scr@ifundefinedorrelax{scr@local@leveloffset}{% + \edef\reserved@a{% + \noexpand\FamilyCounterMacroKey[.dsc]{KOMAarg}{level}{% + \expandafter\noexpand\csname \scr@dsc@current numdepth\endcsname}% + }\reserved@a + }{% + \edef\reserved@a{% + \noexpand\DefineFamilyKey[.dsc]{KOMAarg}{level}{% + \noexpand\FamilySetCounterMacro{KOMAarg}{level}{% + \expandafter\noexpand\csname \scr@dsc@current numdepth\endcsname + }% + \unexpanded{% + {\numexpr ##1+\scr@local@leveloffset\relax}% + \edef\scr@local@leveloffset{% + \the\numexpr\scr@local@leveloffset+\scr@local@levelincrease\relax + }% + }% + }% + }\reserved@a + }% +% \end{macrocode} +% \begin{description} +% \item[\opt{counterwithout=\meta{name}}:] +% \changes{v3.19}{2015/09/09}{option \opt{counterwithout}} +% The counter of this command should not depend on the counter +% \cnt{name} any longer. +% \end{description} +% \begin{macrocode} + \FamilyStringKey[.dsc]{KOMAarg}{counterwithout}{\scr@local@counterwithout}% + \let\scr@local@counterwithout\relax +% \end{macrocode} +% \begin{description} +% \item[\opt{counterwithin=\meta{name}}:] +% The counter of this command depends on the counter \cnt{name}. +% \end{description} +% \begin{macrocode} + \FamilyStringKey[.dsc]{KOMAarg}{counterwithin}{\scr@local@counterwithin}% + \let\scr@local@counterwithin\relax +% \end{macrocode} +% \begin{description} +% \item[\opt{toclevel=\meta{number}}:] +% The numerical ToC entry level. Default is \opt{level}. This option exists +% only, if the ToC style supports it. But because with +% \cs{DeclareSectionCommands} we need an offset for this (similar to the +% increase of \opt{level}). So we have to redefine it in case of existing +% \cs{scr@local@tocleveloffset}. +% \end{description} +% \begin{macrocode} + \scr@ifundefinedorrelax{scr@local@tocleveloffset}{}{% + \scr@ifundefinedorrelax{KV@KOMAarg.dsc@toclevel}{% + }{% + \DefineFamilyKey[.dsc]{KOMAarg}{toclevel}{% + \edef\reserved@a{% + \noexpand\l@addto@macro{\noexpand\scr@dsc@tocstyle@options}{% + level=\the\numexpr ##1+\scr@local@tocleveloffset\relax,% + }% + }\reserved@a + \edef\scr@local@tocleveloffset{% + \the\numexpr\scr@local@tocleveloffset+\scr@local@levelincrease\relax + }% + \FamilyKeyStateProcessed + }% + }% + }% +% \end{macrocode} +% \changes{v3.20}{2015/11/12}{only temporary definition of options} +% The main pass of options execution. Afterwards reset all the options. +% \begin{macrocode} + \FamilyExecuteOptions[.dsc]{KOMAarg}{#1}% + \scr@dsc@extra@relax@opts + \let\scr@dsc@extra@relax@opts\relax + \RelaxSectionCommandOptions + \RelaxFamilyKey[.dsc]{KOMAarg}{style}% + \RelaxFamilyKey[.dsc]{KOMAarg}{tocstyle}% + \RelaxFamilyKey[.dsc]{KOMAarg}{expandtopt}% + \scr@ifundefinedorrelax{scr@local@levelincrease}{}{% + \RelaxFamilyKey[.dsc]{KOMAarg}{increaselevel}% + }% + \RelaxFamilyKey[.dsc]{KOMAarg}{level}% + \RelaxFamilyKey[.dsc]{KOMAarg}{counterwithin}% +% \end{macrocode} +% Now, we can test, if all needed options has been defined. +% \changes{v3.27}{2019/02/07}{\opt{level} must no be -\cs{maxdimen}} +% Also test, that \opt{level} is not -\len{maxdimen}, because this value is +% used internally to switch of numbering locally. +% \begin{macrocode} + \begingroup + \def\local@endgroup{\endgroup}% + \scr@ifundefinedorrelax{\scr@dsc@current numdepth}{% + \scr@declaresectioncommanderror{\scr@dsc@current}{section level}{level}% + }{% + \expandafter\ifnum \csname #2numdepth\endcsname>-\maxdimen + \@nameuse{scr@dsc@style@% + \@nameuse{scr@\scr@dsc@current @style}% + @neededoptionstest}% + \else + \ClassError{\KOMAClassName}{% + `level' must be > -\the\numexpr\maxdimen\relax + }{% + KOMA-Script internally sets `secnumdepth' to + -\the\numexpr\maxdimen\relax\space + to locally switch of\MessageBreak + the numbering, i.e., inside running heads.\MessageBreak + Because of this, you can define section commands with\MessageBreak + `level' greater than -\the\numexpr\maxdimen\relax\space only.% + }% + \let\local@endgroup\endgroup + \aftergroup\@gobbletwo + \fi + }% + \local@endgroup +% \end{macrocode} +% If the configuration is compete, we are ready for the (re-)definition of the +% command. +% \begin{macrocode} + \@firstofone{% +% \end{macrocode} +% \changes{v3.20}{2015/10/15}{missing \cs{expandafter} added} +% First of all we need a counter: +% \begin{macrocode} + \@ifundefined{c@#2}{\newcounter{#2}}{}% + \ifx\scr@local@counterwithout\relax + \else\ifx\scr@local@counterwithout\@empty + \else + \@removefromreset{#2}{\scr@local@counterwithout}% + \fi + \@namedef{the#2}{\arabic{#2}}% + \fi + \ifx\scr@local@counterwithin\relax + \else\ifx\scr@local@counterwithin\@empty + \@namedef{the#2}{\arabic{#2}}% + \else + \@removefromreset{#2}{\scr@local@counterwithin}% + \@addtoreset{#2}{\scr@local@counterwithin}% + \expandafter\def\csname the#2\expandafter\endcsname\expandafter{% + \csname the\scr@local@counterwithin\endcsname.\arabic{#2}}% + \fi + \fi + \@ifundefined{#2format}{% + \@namedef{#2format}{\csname the#2\endcsname\autodot\enskip}% + }{}% +% \end{macrocode} +% Then the command itself (but only, if the \opt{style} was not empty): +% \begin{macrocode} + \ifscr@dsc@parametersonly + \ClassInfo{\KOMAClassName}{% + not defining `\expandafter\string\csname #2\endcsname' due + to\MessageBreak + empty section style option% + }% + \else + \scr@ifundefinedorrelax{% + scr@dsc@def@style@\@nameuse{scr@#2@style}@command% + }{% + \ClassWarning{\KOMAClassName}{% + not defining `\expandafter\string\csname #2\endcsname' + due\MessageBreak + to not yet defined section style\MessageBreak + `\@nameuse{scr@#2@style}'% + }% + }{% + \@nameuse{scr@dsc@def@style@\@nameuse{scr@#2@style}@command}{#2}% + }% + \fi +% \end{macrocode} +% We also need commands for the running head and a corresponding number +% formatting. With \pkg*{scrlayer} this can and should be done using +% \cs{DeclareSectionNumberDepth}. Otherwise we do it step by step. +% \changes{v3.15a}{2015/01/21}{\cs{endskip} instead of \cs{enskip}} +% \begin{macrocode} + \@ifundefined{DeclareSectionNumberDepth}{% + \@ifundefined{#2markformat}{% + \@namedef{#2markformat}{\csname the#2\endcsname\autodot\enskip}% + }{}% + \@ifundefined{#2mark}{% + \expandafter\let\csname #2mark\endcsname\@gobble + }{}% + }{% + \DeclareSectionNumberDepth{#2}{\csname #2numdepth\endcsname}% + }% +% \end{macrocode} +% We also need macros to generate and print the ToC entry. +% \begin{macrocode} + \expandafter\providecommand\expandafter*% + \csname add#2tocentry\endcsname[2]{% + \addtocentrydefault{#2}{##1}{##2}% + }% + \scr@ifundefinedorrelax{scr@tso@#2@style}{% + \expandafter\let\csname scr@tso@#2@style\expandafter\endcsname + \csname scr@dte@#2@style\endcsname + }{}% + \scr@ifundefinedorrelax{scr@tso@#2@style}{% + }{% + \DeclareTOCStyleEntry[\scr@dsc@tocstyle@options]{% + \@nameuse{scr@tso@#2@style}% + }{#2}% + }% + \scr@ifundefinedorrelax{l@#2}{% + \DeclareTOCStyleEntry[\scr@dsc@tocstyle@options]{default}{#2}% + }{}% +% \end{macrocode} +% \changes{v3.20}{2015/0/07}{support for ToC levels with \pkg{hyperref}} +% \changes{v3.26}{2018/06/27}{overwrite ToC levels of \pkg{hyperref}} +% \changes{v3.26}{2018/06/27}{fallback handling of gaps in the bookmark +% levels} +% And we need extra code for \pkg{hyperref} and the bookmarks. +% \begin{macrocode} + \if@atdocument + \let\reserved@a\@firstofone + \else + \@ifpackageloaded{hyperref}{% + \let\reserved@a\@firstofone + }{% + \def\reserved@a##1{% + \AfterAtEndOfPackage{hyperref}{\AtBeginDocument{##1}}% + }% + }% + \fi + \reserved@a{% + \expandafter\let\csname toclevel@#2\expandafter\endcsname + \csname #2tocdepth\endcsname + \scr@ifundefinedorrelax{bookmarksetup}{% + \scr@ifundefinedorrelax{scr@min@toclevel}{% + \expandafter\let\expandafter\scr@min@toclevel + \csname toclevel@#2\endcsname + }{% + \expandafter\ifnum \csname toclevel@#2\endcsname + < \numexpr \scr@min@toclevel-1\relax + \ClassWarning{\KOMAClassName}{% + Trying emergency fix for bookmark level gap,\MessageBreak + because toclevel of `#2' + (\csname toclevel@#2\endcsname)\MessageBreak + is more than 1 lower than currently lowest\MessageBreak + known level (\scr@min@toclevel).\MessageBreak + Note: This fix can fail and you should load\MessageBreak + package `bookmark' to avoid usage of this\MessageBreak + fix% + }% + \expandafter\edef\csname toclevel@#2\endcsname{% + \the\numexpr \scr@min@toclevel-1\relax + }% + \fi + \expandafter\ifnum \csname toclevel@#2\endcsname + < \scr@min@toclevel\relax + \expandafter\let\expandafter\scr@min@toclevel + \csname toclevel@#2\endcsname + \fi + }% + \scr@ifundefinedorrelax{scr@max@toclevel}{% + \expandafter\let\expandafter\scr@max@toclevel + \csname toclevel@#2\endcsname + }{% + \expandafter\ifnum \csname toclevel@#2\endcsname + > \numexpr \scr@max@toclevel+1\relax + \ClassWarning{\KOMAClassName}{% + Trying emergency fix for bookmark level gap,\MessageBreak + because toclevel of `#2' + (\csname toclevel@#2\endcsname)\MessageBreak + is more than 1 greater than currently highest\MessageBreak + known level (\scr@max@toclevel).\MessageBreak + Note: This fix can fail and you should load\MessageBreak + package `bookmark' to avoid usage of this\MessageBreak + fix% + }% + \expandafter\edef\csname toclevel@#2\endcsname{% + \the\numexpr \scr@max@toclevel+1\relax + }% + \fi + \expandafter\ifnum \csname toclevel@#2\endcsname + > \scr@max@toclevel\relax + \expandafter\let\expandafter\scr@max@toclevel + \csname toclevel@#2\endcsname + \fi + }% + }{}% + }% + }% + }% + \let\scr@dsc@current\relax +} +% \end{macrocode} +% \begin{macro}{\scr@declaresectioncommanderror} +% \changes{v3.15}{2014/11/21}{added} +% It there were not enough options to \cs{DeclareSectionCommand} to define the +% command, we report an error and also execute +% \cs{aftergroup}\cs{@gobbletwo}. So the |\@firstofone{…}| code after +% |\endgroup| resp. |\local@endgroup| inside \cs{DeclareSectionCommand} that +% defines the new section command etc. will never be used in such a case. +% \begin{macrocode} +\newcommand*{\scr@declaresectioncommanderror}[3]{% + \ClassError{\KOMAClassName}{% + #2 of \expandafter\string\csname #1\endcsname\space unknown% + }{% + Please use option `#3' to declare the #2.\MessageBreak + If you'll continue, declaration will be ignored% + }% + \let\local@endgroup\endgroup + \aftergroup\@gobbletwo +} +% \end{macrocode} +% \end{macro}^^A \scr@declaresectioncommanderror +% \begin{macro}{\scr@declaresectioncommandwarning} +% \changes{v3.24}{2017/04/25}{added} +% Sometimes a warning and extension of \cs{local@endgroup} is enough. +% \begin{macrocode} +\newcommand*{\scr@declaresectioncommandwarning}[5]{% + \ClassInfo{\KOMAClassName}{% + #2 of \expandafter\string\csname #1\endcsname\space unknown.\MessageBreak + You should use option `#3' if you\MessageBreak + do not want to use the default value\MessageBreak + `\detokenize{#4}'% + }% + \l@addto@macro\local@endgroup{#5}% +} +% \end{macrocode} +% \end{macro}^^A \scr@declaresectioncommandwarning +% \end{command}^^A \DeclareSectionCommand +% +% +% \begin{command}{\DeclareNewSectionCommand} +% \changes{v3.15}{2014/11/21}{added} +% \changes{v3.25}{2018/03/10}{additional tests and errors about +% \cs{the\dots}, \cs{\dots mark}, \cs{\dots format}, +% \cs{\dots markformat}} +% \changes{v3.30}{2020/04/08}{orphan spaces removed} +% This is similar to \cs{DeclareSectionCommand} but reports an error, if the +% command or a main helper already exist. So it can be used for new commands +% only. +% \begin{macrocode} +\newcommand*{\DeclareNewSectionCommand}[2][]{% + \@ifundefined{#2}{% + \@tempswatrue + \let\reserved@b\@empty + \@for \reserved@a:=the#2,#2mark,#2format,#2markformat\do{% + \expandafter\scr@ifundefinedorrelax\expandafter{\reserved@a}{}{% + \@tempswafalse + \edef\reserved@b{\expandafter\string\csname \reserved@a\endcsname}% + }% + }% + \if@tempswa +% \end{macrocode} +% \changes{v3.30}{2020/04/08}{extended test for really new} +% After the general user commands, we just have to detect the style \dots +% \begin{macrocode} + \expandafter\let\expandafter\scr@dsc@current + \csname scr@tso@##2@style\endcsname + \DefineFamilyKey[.dsc]{KOMAarg}{style}{% + \edef\scr@dsc@current{##1}% + \FamilyKeyStateProcessed + }% + \DefineFamilyKey[.dsc]{KOMAarg}{@else@}{\FamilyKeyStateProcessed}% + \FamilyExecuteOptions[.dsc]{KOMAarg}{#1}% + \RelaxFamilyKey[.dsc]{KOMAarg}{@else@}% + \RelaxFamilyKey[.dsc]{KOMAarg}{style}% + \@tempswatrue +% \end{macrocode} +% \dots{} to gut through the \cs{scr@dsc@style@\meta{style}@subcommands} and +% test, if one of them exists. +% \begin{macrocode} + \@ifundefined{scr@dsc@current}{}{% + \scr@ifundefinedorrelax{scr@dsc@style@\scr@dsc@current @subcommands}{% + }{% + \edef\reserved@b{% + \csname scr@dsc@style@\scr@dsc@current @subcommands\endcsname{#2}% + }% + \expandafter\@for\expandafter\reserved@a\expandafter:\expandafter=% + \reserved@b\do{% + \expandafter\scr@ifundefinedorrelax\expandafter{\reserved@a}{}{% + \@tempswafalse + \edef\reserved@b{% + \expandafter\string\csname \reserved@a\endcsname}% + }% + }% + } + }% + \let\scr@dsc@current\relax + \fi + \if@tempswa +% \end{macrocode} +% If not, we can use \cs{DeclareSectionCommand}. Otherwise just report an +% error. +% \begin{macrocode} + \DeclareSectionCommand[{#1}]{#2}% + \else + \ClassError{\KOMAClassName}{% + command `\reserved@b' already defined% + }{% + You've tried to define the section command `\expandafter\string\csname + #2\endcsname' newly.\MessageBreak + Such a section command needs an additional new command + `\reserved@b',\MessageBreak + but this already exists. So you cannot define + `\expandafter\string\csname #2\endcsname' newly.\MessageBreak + Maybe you should use one of \string\DeclareSectionCommand, + \string\RedeclareSectionCommand,\MessageBreak + or \string\ProvideSectionCommand.\MessageBreak + If you'll continue, the command will be ignored.% + }% + \fi + }{% + \ClassError{\KOMAClassName}{% + command `\expandafter\string\csname #2\endcsname' already defined% + }{% + You've tried to define the section command `\expandafter\string\csname + #2\endcsname' newly,\MessageBreak + but a command or something else with this name already + exists.\MessageBreak + Maybe you should use one of \string\DeclareSectionCommand, + \string\RedeclareSectionCommand,\MessageBreak + or \string\ProvideSectionCommand.\MessageBreak + If you'll continue, the command will be ignored.% + }% + }% +} +% \end{macrocode} +% \end{command}^^A \DeclareNewSectionCommand +% +% \begin{command}{\RedeclareSectionCommand} +% \changes{v3.15}{2014/11/21}{added} +% This is much easier than \cs{DeclareNewSectionCommand} because it tests only +% for the main command and uses \cs{DeclareSectionCommand} if the main command +% already exists. So all the additional commands and main helpers do not need +% to exist. +% \begin{macrocode} +\newcommand*{\RedeclareSectionCommand}[2][]{% + \@ifundefined{#2}{% + \ClassError{\KOMAClassName}{% + command `\expandafter\string\csname #2\endcsname' not defined% + }{% + You've tried to re-define the section command `\expandafter\string\csname + #2\endcsname',\MessageBreak + but a command with this name does not exists.\MessageBreak + Maybe you should use one of \string\DeclareSectionCommand, + \string\DeclareNewSectionCommand,\MessageBreak + or \string\ProvideSectionCommand.\MessageBreak + If you'll continue, the command will be irgnored.% + }% + }{% + \DeclareSectionCommand[{#1}]{#2}% + }% +} +% \end{macrocode} +% \end{command}^^A \RedeclareSectionCommand +% +% \begin{command}{\ProvideSectionCommand} +% \changes{v3.15}{2014/11/21}{added} +% This is much easier than \cs{DeclareNewSectionCommand} because currently it +% tests only for the command itself but nor for the helpers. +% \begin{description} +% \item[ToDo:] This is dangerous, because +% e.g. |\ProvideSectionCommand{schapter}| would break \cs{chapter} (because +% of \cs{@schapter}). So maybe it should do the same tests as +% \cs{DeclareNewSectionCommand} and at least warn. +% \end{description} +% Basierend auf |\DeclareSectionCommand| wird eine Gliederungsanweisung +% definiert, wenn sie zuvor noch nicht existierte. Wichtig zu bemerken ist, +% dass die ganzen Hilfsanweisungen bereits existieren dürfen. +% \begin{macrocode} +\newcommand*{\ProvideSectionCommand}[2][]{% + \@ifundefined{#2}{% + \DeclareSectionCommand[{#1}]{#2}% + }{% + \ClassInfo{\KOMAClassName}{% + \string\ProvideSectionCommand{#1} ignored% + }% + }% +} +% \end{macrocode} +% \end{command}^^A \ProvideSectionCommand +% +% \begin{command}{\DeclareSectionCommands} +% \changes{v3.15}{2014/12/03}{added} +% \changes{v3.26}{2018/08/29}{using \cs{scr@trim@spaces}} +% Based on \cs{DeclareSectionCommand} this one can be used to define several +% commands at once. The commands are given as a comma-separated list of +% commands. There is one additional option \opt{increaselevel=\meta{number}} +% to add \meta{number} to the \opt{level} at each call of +% \cs{DeclareSectionCommand} but the first one. The definition of this option +% is done inside \cs{DeclareSectionCommand} if \cs{scr@local@levelincrease} is +% defined. Because of the first run, we initialize it with 0. The same has to +% be done for \cs{scr@local@leveloffset} and \cs{scr@local@tocleveloffset}. +% At the end we also have to un-define these local commands. Otherwise later +% usage of \cs{DeclareSectionCommand} would be detected as part of +% \cs{DeclareSectionCommands}. +% \begin{macrocode} +\newcommand*{\DeclareSectionCommands}[2][]{% + \edef\reserved@a{#2}% + \def\scr@local@levelincrease{\z@}% + \def\scr@local@leveloffset{\z@}% + \def\scr@local@tocleveloffset{\z@}% + \@for\reserved@a:=\reserved@a\do{% + \scr@trim@spaces\reserved@a + \edef\reserved@a{% + \unexpanded{\DeclareSectionCommand[{#1}]}{\reserved@a}% + }% + \reserved@a + }% + \let\scr@local@levelincrease\relax + \let\scr@local@leveloffset\relax + \let\scr@local@tocleveloffset\relax +} +% \end{macrocode} +% \end{command}^^A \DeclareSectionCommands +% +% \begin{command}{\DeclareNewSectionCommands} +% \changes{v3.15}{2014/12/03}{added} +% \changes{v3.26}{2018/08/29}{using \cs{scr@trim@spaces}} +% Because of \opt{increaselevel} we cannot simply use +% \cs{DeclareNewSectionCommand} inside, but have to use +% \cs{DeclareSectionCommand} even for already defined commands (but +% nevertheless report an error). +% \begin{description} +% \item[ToDo:] Is this really the correct error action? Does it really matter, +% if \opt{increaselevel} would be wrong after already reporting an error? +% \end{description} +% \begin{macrocode} +\newcommand*{\DeclareNewSectionCommands}[2][]{% + \edef\reserved@a{#2}% + \def\scr@local@levelincrease{\z@}% + \def\scr@local@leveloffset{\z@}% + \def\scr@local@tocleveloffset{\z@}% + \@for\reserved@a:=\reserved@a\do{% + \scr@trim@spaces\reserved@a + \@ifundefined{\reserved@a}{}{% + \ClassError{\KOMAClassName}{% + command `\expandafter\string\csname\reserved@a\endcsname' already + defined% + }{% + You've tried to define the section command + `\expandafter\string\csname\reserved@a\endcsname' newly,\MessageBreak + but a command, token, box or length with this name already + exists.\MessageBreak + Maybe you should use one of \string\DeclareSectionCommand, + \string\RedeclareSectionCommand,\MessageBreak + or \string\ProvideSectionCommand.\MessageBreak + Nevertheless, if you'll continue, the command will be defined.% + }% + }% + \edef\reserved@a{% + \unexpanded{\DeclareSectionCommand[{#1}]}{\reserved@a}% + }% + \reserved@a + }% + \let\scr@local@levelincrease\relax + \let\scr@local@leveloffset\relax + \let\scr@local@tocleveloffset\relax +} +% \end{macrocode} +% \end{command}^^A \DeclareNewSectionCommands +% +% \begin{command}{\RedeclareSectionCommands} +% \changes{v3.15}{2014/12/03}{added} +% \changes{v3.26}{2018/08/29}{using \cs{scr@trim@spaces}} +% Because of \opt{increaselevel} we cannot simply use +% \cs{RedeclareSectionCommand} inside, but have to use +% \cs{DeclareSectionCommand} even for not yet defined commands (but +% nevertheless report an error). +% \begin{description} +% \item[ToDo:] Is this really the correct error action? Does it really matter, +% if \opt{increaselevel} would be wrong after already reporting an error? +% \end{description} +% \begin{macrocode} +\newcommand*{\RedeclareSectionCommands}[2][]{% + \edef\reserved@a{#2}% + \def\scr@local@levelincrease{\z@}% + \def\scr@local@leveloffset{\z@}% + \def\scr@local@tocleveloffset{\z@}% + \@for\reserved@a:=\reserved@a\do{% + \scr@trim@spaces\reserved@a + \@ifundefined{\reserved@a}{% + \ClassError{\KOMAClassName}{% + command `\expandafter\string\csname\reserved@a\endcsname' not defined% + }{% + You've tried to re-define the section command + `\expandafter\string\csname\reserved@a\endcsname',\MessageBreak + but a command with this name does not exists.\MessageBreak + Maybe you should use one of \string\DeclareSectionCommand, + \string\DeclareNewSectionCommand,\MessageBreak + or \string\ProvideSectionCommand.\MessageBreak + Nevertheless, if you'll continue, the command will be defined.% + }% + }{}% + \edef\reserved@a{% + \unexpanded{\DeclareSectionCommand[{#1}]}{\reserved@a}% + }% + \reserved@a + }% + \let\scr@local@levelincrease\relax + \let\scr@local@leveloffset\relax + \let\scr@local@tocleveloffset\relax +} +% \end{macrocode} +% \end{command}^^A \RedeclareSectionCommands +% +% \begin{command}{\ProvideSectionCommands} +% \changes{v3.15}{2014/12/03}{added} +% \changes{v3.17}{2015/03/23}{re-implemented because of style depending +% options} +% \changes{v3.26}{2018/08/29}{using \cs{scr@trim@spaces}} +% This is the real problematic case, because \opt{increaselevel} should be +% used even for commands, that must not be defined. However, maybe a solution +% like this should be used for the two previous commands too. +% \begin{macrocode} +\newcommand*{\ProvideSectionCommands}[2][]{% + \edef\reserved@a{#2}% + \def\scr@local@levelincrease{\z@}% + \def\scr@local@leveloffset{\z@}% + \def\scr@local@tocleveloffset{\z@}% + \@for\reserved@a:=\reserved@a\do{% + \scr@trim@spaces\reserved@a + \@ifundefined{\reserved@a}{% + \edef\reserved@a{% + \unexpanded{\DeclareSectionCommand[{#1}]}{\reserved@a}% + }% + \reserved@a + }{% +% \end{macrocode} +% If the command already exists, process options \opt{level}, \opt{toclevel} +% and \opt{increaselevel} and ignore all others using an \opt{@else@} option. +% \begin{macrocode} + \DefineFamilyKey[.dsc]{KOMAarg}{@else@}{\FamilyKeyStateProcessed}% + \FamilyCounterMacroKey[.dsc]{KOMAarg}{increaselevel}[1]% + {\scr@local@levelincrease}% + \DefineFamilyKey[.dsc]{KOMAarg}{level}{% + \FamilySetCounterMacro{KOMAarg}{level}{\reserved@b}{##1}% + \edef\scr@local@leveloffset{% + \the\numexpr\scr@local@leveloffset+\scr@local@levelincrease\relax + }% + }% + \DefineFamilyKey[.dsc]{KOMAarg}{toclevel}{% + \FamilySetCounterMacro{KOMAarg}{toclevel}{\reserved@b}{##1}% + \edef\scr@local@tocleveloffset{% + \the\numexpr\scr@local@tocleveloffset+\scr@local@levelincrease\relax + }% + }% + \FamilyExecuteOptions[.dsc]{KOMAarg}{#1}% + \RelaxFamilyKey[.dsc]{KOMAarg}{toclevel}% + \RelaxFamilyKey[.dsc]{KOMAarg}{level}% + \RelaxFamilyKey[.dsc]{KOMAarg}{increaselevel}% + \RelaxFamilyKey[.dsc]{KOMAarg}{@else@}% + }% + }% + \let\scr@local@levelincrease\relax + \let\scr@local@leveloffset\relax + \let\scr@local@tocleveloffset\relax +} +% +% \end{macrocode} +% \end{command}^^A \ProvideSectionCommands +% +% \begin{command}{\IfSectionCommandStyleIs} +% \changes{v3.27}{2019/02/04}{added} +% Test whether ot not the section command of argument 1 has the style of +% argument 2. If so: use argument 3, of not: use argument 4. +% \begin{macrocode} +%<*body> +\newcommand*{\IfSectionCommandStyleIs}[2]{% + \scr@ifundefinedorrelax{#1}{% + \ClassError{\KOMAClassName}{% + \expandafter\string\csname #1\endcsname\space not defined}{% + You cannot compare the section command style of an undefined command.}% + }{% + \scr@ifundefinedorrelax{scr@#1@style}{% + \ClassError{\KOMAClassName}{% + \expandafter\string\csname #1\endcsname\space not a valid section + command% + }{% + You cannot detect the section command style of a command, that + has\MessageBreak + never been defined as a section command by KOMA-Script.% + }% + }% + }% + \scr@ifundefinedorrelax{scr@dsc@def@style@#2@command}{% + \ClassError{\KOMAClassName}{% + unknown section command style `#2'% + }{}% + }% + \Ifstr{\@nameuse{scr@#1@style}}{#2}% +} +% +% \end{macrocode} +% \end{command} +% +% \begin{option}{bookmarkpackage} +% \changes{v3.26}{2018/06/27}{added} +% Package \pkg{hyperref} has problems with bookmark level gaps. So if +% either the users omits a heading level or defines a heading with a level +% that distinguish more than one from the previous or following level, there +% would be a problem. One recommended solution for this would be to use +% package \pkg{bookmark}. So if we load this package, we can use the same +% value for bookmark levels and TOC levels even within +% \cls*{scrartcl}. Nevertheless we allow the user to decide not to use +% \pkg{bookmark}, but then it is not my fault, if something strange +% happens. +% \begin{macrocode} +%<*option> +\KOMA@ifkey{bookmarkpackage}{@scr@autoloadbookmarkpackage} +\@scr@autoloadbookmarkpackagetrue +\KOMA@kav@add{.\KOMAClassFileName}{bookmarkpackage}{true} +\AfterAtEndOfPackage{hyperref}{% + \AtBeginDocument{% + \@ifpackageloaded{bookmark}{}{% + \if@scr@autoloadbookmarkpackage +% \end{macrocode} +% \changes{v3.27}{2019/06/26}{try to translate \pkg{hyperref} driver to +% \pkg{bookmark} driver option} +% The name of the \pkg{hyperref} driver is in \cs{Hy@driver}. But +% \pkg{bookmark} does not provide the same drivers, so we try to translate +% the curreny known \pkg{hyperref} drivers to \pkg{bookmark} +% drivers. Also we do not load \pkg{bookmark} with a driver option but +% define \pkg{bookmark}'s \cs{BookmarkDriverDefault}. +% \begin{macrocode} + \scr@ifundefinedorrelax{Hy@driver}{% + \ClassWarning{\KOMAClassName}{% + `hyperref' loaded but `\string\Hy@driver' undefined.\MessageBreak + This should not happen!\MessageBreak + Maybe `hyperref' not loaded or unknown version?% + }% + }{% +% \end{macrocode} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% Note: \texttt{hpdftex}, \texttt{hluatex}, \texttt{hxetex} and \texttt{hvtex} +% do not need to be translated, because they are autodetected by +% \pkg{bookmark} as well. \texttt{hypertex}, \texttt{hdviwindo}, +% \texttt{htex4ht} and \texttt{latex2html} are not known by \pkg{bookmark}, +% so we stay with the default (usually \texttt{dvips}). +% \begin{macrocode} + \Ifstr{\Hy@driver}{hdvips}{% + \providecommand*{\BookmarkDriverDefault}{dvips}% + }{% + \Ifstr{\Hy@driver}{hdvipdfm}{% + \providecommand*{\BookmarkDriverDefault}{dvipdfm}% + }{% + \Ifstr{\Hy@driver}{hdvipson}{% + \providecommand*{\BookmarkDriverDefault}{dvipsone}% + }{% + \Ifstr{\Hy@driver}{htexture}{% + \providecommand*{\BookmarkDriverDefault}{textures}% + }{% + }% + }% + }% + }% + }% + \ClassInfo{\KOMAClassName}{% + loading recommended package `bookmark'.\MessageBreak + Using `bookmark' together with `hyperref' is + recommended,\MessageBreak + because of handling of possible bookmark level gaps.\MessageBreak + You can avoid loading `bookmark' with KOMA-Script + option\MessageBreak + `bookmarkpackage=false' before \string\begin{document} + and\MessageBreak + you can avoid this message adding:\MessageBreak + \space\space\string\usepackage + \scr@ifundefinedorrelax{BookmarkDriverDefault}{}{% + [\BookmarkDriverDefault]% + }{bookmark}\MessageBreak + before \string\begin{document}% + }% +% \end{macrocode} +% \changes{v3.33}{2021/02/17}{workaround for catcode changes of +% \pkg{babel-spanish}} +% For \pkg{babel-spanish} we need to deactivate quoting before loading +% \pkg{bookmark}. +% \begin{macrocode} + \@ifundefined{es@quoting}{% + \RequirePackage{bookmark}% + }{% + \ifx\es@quoting\activatequoting + \ClassInfo{\KOMAClassName}{% + temporary deactivation of babel-spanish quoting + }% + \deactivatequoting + \RequirePackage{bookmark}% + \ClassInfo{\KOMAClassName}{% + reactivation of babel-spanish quoting + }% + \activatequoting + \else + \RequirePackage{bookmark}% + \fi + }% +% \end{macrocode} +% \changes{v3.26b}{2019/01/17}{workaround for \cs{@beginmainauxhook} added} +% Sometimes \pkg{auxhook} is not able to recognize that it cannot use a +% patch of \cs{document} to execute \cs{@beginmainauxhook} if it is loaded via +% \cs{AtBeginDocument}. In this case we do it here. +% \begin{macrocode} + \ifx\@beginmainauxhook\relax + \else + \if@filesw + \ClassWarning{\KOMAClassName}{% + seems someone has broken package `auxhook'.\MessageBreak + Usually this happens, if `auxhook' is loaded or used\MessageBreak + implicitly or explicitly by patching + \string\document% + \scr@ifundefinedorrelax{AtEndPreamble}{}{% + \MessageBreak + or via etoolbox command \string\AtEndPreamble% + }.\MessageBreak + Trying an emergency workaround.\MessageBreak + You can avoid this warning adding:\MessageBreak + \space\space\string\usepackage{auxhook}\MessageBreak + before \string\begin{document}% + }% + \@beginmainauxhook + \fi + \fi + \fi + }% + }% +} +% +% \end{macrocode} +% \end{option}^^A bookmarkpackage +% +% +% \subsection{Preambles of parts or chapters} +% +% The \KOMAScript{} classes \cls*{scrbook} and \cls*{scrreprt} provide +% preambles above and below the headings of parts and chapters. The preamble +% above is printed into the usual distance above the headings. It does not +% increase this distance to avoid \emph{jumping headings}. However here we +% have only the generic code for preambles. The user commands are defined by +% \cs{scr@dsc@style@chapter@command} and \cs{scr@dsc@style@part@command}. +% +% \begin{macro}{\use@preamble} +% \changes{v2.8p}{2001/09/25}{added} +% Used as a general macro to print the stored preamble code and clean the +% storage. Preambles are only printed, if the storage is defined. But an empty +% defined storage would be printed. The argument is the name of the storage, +% e.g., \texttt{chapter@o}, \texttt{chapter@u}, \texttt{part@o}, +% \texttt{part@u}. +% \begin{macrocode} +%<*book|report> +%<*body> +\newcommand*{\use@preamble}[1]{% + \@ifundefined{#1@preamble}{}{% + \@nameuse{#1@preamble}% + \global\expandafter\let\csname#1@preamble\endcsname=\relax + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\set@preamble} +% \changes{v2.8p}{2001/09/25}{added} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% Macro +% \begin{quote} +% \cs{set@preamble}\marg{level name}\oarg{position}\oarg{width}\marg{text} +% \end{quote} +% defines a preamble code stored into \cs{\meta{preamble name}@preamble}. The +% \meta{preamble name} is build depending on the \meta{level name} and the +% \meta{position}. The \meta{position} is a combination of vertical and +% horizontal position and used to generate not only the \meta{preamble name} +% but also options for the \cs{parbox} used to encapsulate the \meta{text} +% into a preamble code. The \meta{width} is also used for the \cs{parbox}. +% \begin{description} +% \item[Note:] The definition of a preamble is global and the definition of a +% new preamble of the same \meta{preamble name} overwrite an existing one. +% \end{description} +% \begin{macro}{\set@@preamble} +% \changes{v2.8p}{2001/09/25}{added} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \begin{macro}{\set@@@preamble} +% \changes{v2.8p}{2001/09/25}{added} +% \begin{macro}{\set@@@@preamble} +% \changes{v2.8p}{2001/09/25}{added} +% \changes{v2.8q}{2001/11/27}{missing brace added} +% \changes{v3.12}{2012/10/16}{allow \texttt{o} as alias for \texttt{b}} +% \changes{v3.12a}{2014/02/14}{\texttt{b} fixed} +% We need a lot of helpers because of not using \pkg*{xparse} but having +% several optional arguments. At least one optional argument? If not use an +% empty default for the first one and \len{hsize} for the second one. +% \begin{macrocode} +\newcommand*{\set@preamble}[1]{% + \kernel@ifnextchar [%] + {\set@@preamble{#1}}{\set@@@preamble{#1}[][\hsize]}% +} +% \end{macrocode} +% Or even two optional argument? If not use default \len{hsize}. +% \begin{macrocode} +\newcommand*{\set@@preamble}{} +\def\set@@preamble#1[#2]{% + \kernel@ifnextchar [%] + {\set@@@preamble{#1}[{#2}]}{\set@@@preamble{#1}[{#2}][\hsize]}% +} +% \end{macrocode} +% From here we know all optional arguments and have to process the composite +% \meta{position}. +% \begin{macrocode} +\newcommand{\set@@@preamble}{} +\long\def\set@@@preamble#1[#2][#3]#4{% + \begingroup + \def\prmbl@pos{#2}\let\prmbl@hpos\relax\let\prmbl@vpos\relax + \expandafter \@tfor \expandafter \@tempa + \expandafter :\expandafter =\prmbl@pos + \do{% + \if \@tempa l% + \set@preamble@hpos{0}{#2}% + \fi% + \if \@tempa c% + \set@preamble@hpos{1}{#2}% + \fi% + \if \@tempa r% + \set@preamble@hpos{2}{#2}% + \fi% + \if \@tempa u% + \set@preamble@vpos{0}{#2}% + \fi% + \if \@tempa b% + \set@preamble@vpos{0}{#2}% + \fi + \if \@tempa o% + \set@preamble@vpos{1}{#2}% + \fi% + \if \@tempa t% + \set@preamble@vpos{1}{#2}% + \fi + }% +% \end{macrocode} +% If the horizontal or vertical position is still unclear use defaults. +% \begin{macrocode} + \@ifundefined{prmbl@hpos}{\def\prmbl@hpos{0}}{}% + \@ifundefined{prmbl@vpos}{\def\prmbl@vpos{0}}{}% +% \end{macrocode} +% From the vertical position we can build the \meta{preamble name} and the +% vertical position of the \cs{parbox} the horizontal is used for the +% horizontal skip before and after the \cs{parbox}. +% \begin{macrocode} + \ifcase\prmbl@hpos + \ifcase\prmbl@vpos + \set@@@@preamble{#1@u}{t}{#3}{}{\hfil}{#4}% + \else + \set@@@@preamble{#1@o}{b}{#3}{}{\hfil}{#4}% + \fi + \or + \ifcase\prmbl@vpos + \set@@@@preamble{#1@u}{t}{#3}{\hfil}{\hfil}{#4}% + \else + \set@@@@preamble{#1@o}{b}{#3}{\hfil}{\hfil}{#4}% + \fi + \else + \ifcase\prmbl@vpos + \set@@@@preamble{#1@u}{t}{#3}{\hfil}{}{#4}% + \else + \set@@@@preamble{#1@o}{b}{#3}{\hfil}{}{#4}% + \fi + \fi + \endgroup +} +% \end{macrocode} +% Last but not least add the horizontal aligned \cs{parbox} to the preamble +% storage. +% \begin{macrocode} +\newcommand{\set@@@@preamble}[6]{% + \expandafter\gdef\csname #1@preamble\endcsname{% + \hbox to\hsize{#4\parbox[{#2}]{#3}{#6\par}#5\par}% + }% +} +% \end{macrocode} +% \begin{macro}{\set@preamble@hpos} +% \changes{v2.8q}{2001/09/25}{added} +% Either store the horizontal preamble position if not yet defined or if +% already defined but illegal report it as an error. +% \begin{macrocode} +\newcommand*{\set@preamble@hpos}[2]{% + \@ifundefined{prbml@hpos}{% + \def\prmbl@hpos{#1}% + }{% + \ifnum \prmbl@hpos=0\relax\else% + \ClassError{\KOMAClassName}{% + inconsistent hpos options% + }{% + You've said `#2' as position option. But you have + to\MessageBreak + use only one of `l', `r', or `c' not two of + these.\MessageBreak + If you'll continue only first hpos option will be + used% + }% + \fi + }% +} +% \end{macrocode} +% \end{macro}^^A \set@preamble@hpos +% \begin{macro}{\set@preamble@vpos} +% \changes{v2.8q}{2001/09/25}{added} +% Either store the vertical position if not yet defined or if already defined +% but illegal report it as an error. +% \begin{macrocode} +\newcommand*{\set@preamble@vpos}[2]{% + \@ifundefined{prbml@vpos}{% + \def\prmbl@vpos{#1}% + }{% + \ifnum \prmbl@vpos=0\relax\else% + \ClassError{\KOMAClassName}{% + inconsistent vpos options% + }{% + You've said `#2' as position option. But you have + to\MessageBreak + use only one of `t', `o', `b', or `u' not two of + these.\MessageBreak + If you'll continue only first vpos option will be + used% + }% + \fi + }% +} +% +% +% \end{macrocode} +% \end{macro}^^A \set@preamble@vpos +% \end{macro}^^A \set@@@@preamble +% \end{macro}^^A \set@@@preamble +% \end{macro}^^A \set@@preamble +% \end{macro}^^A \set@preamble +% +% +% \subsection{Deprecated code for the ToC} +% +% Before using \pkg*{tocbasic} we needed additional code for our extended +% version of \cs{@dottedtocline}. However this has been removed in +% \KOMAScript~v3.36. +% +% \begin{description} +% \item[ToDo:] This should be moved to \file{scrkernel-listsof.dtx} or should +% be removed. +% \end{description} +% +% \begin{macro}{\bprot@dottedtocline} +% \changes{v2.96a}{2006/11/30}{added} +% \changes{v3.27}{2019/02/25}{deprecated} +% \changes{v3.36}{2022/03/15}{removed} +% \end{macro} +% +% +% \subsection{Rough structuring of books} +% +% Some books have a kind of rough structuring into front matter, main matter +% and back matter. This has consequences for the page numbering and the +% numbering of headings and other elements. +% +% \begin{macro}{\@mainmattertrue,\@mainmatterfalse,\if@mainmatter} +% For the numbering of headings and other elements we only need to know +% whether we are in the main matter or not, because chapters outside the main +% matter do not provide a number. A boolean switch is best for this. By +% default we already start with the main matter. +% \begin{macrocode} +%<*book> +%<*body> +\newif\if@mainmatter\@mainmattertrue +% \end{macrocode} +% \end{macro}^^A \@mainmattertrue,\if@mainmatter +% +% \begin{command}{\frontmatter} +% \changes{v2.4e}{1996/07/02}{support for \opt{open\quotechar=any}} +% \changes{v2.5h}{1999/12/29}{support for \opt{twoside}} +% \changes{v3.00}{2008/09/27}{\cs{cleardoublepage} replaced by +% \cs{cleardoubleoddpage}} +% Switching to the front matter always needs a new odd page, because we change +% the page numbering to lowercase Roman numbers. +% \begin{macrocode} +\newcommand*\frontmatter{% + \if@twoside\cleardoubleoddpage\else\clearpage\fi + \@mainmatterfalse\pagenumbering{roman}% +} +% \end{macrocode} +% \end{command}^^A \frontmatter +% \begin{command}{\mainmatter} +% \changes{v2.4e}{1996/07/02}{support for \opt{open\quotechar=any}} +% \changes{v2.5h}{1999/12/29}{support for \opt{twoside}} +% \changes{v3.00}{2008/09/27}{\cs{cleardoublepage} replaced by +% \cs{cleardoubleoddpage}} +% Switching back to main matter always needs a new odd page, because we change +% the page numbering to Arabic numbers. +% \begin{macrocode} +\newcommand*\mainmatter{% + \if@twoside\cleardoubleoddpage\else\clearpage\fi + \@mainmattertrue\pagenumbering{arabic}% +} +% \end{macrocode} +% \end{command}^^A \mainmatter +% \begin{command}{\backmatter} +% \changes{v3.00}{2008/09/27}{\cs{cleardoublepage} replaced by +% \cs{cleardoubleoddpage}} +% Only with \opt{open=right} we start a new odd page when starting the back +% matter. +% \begin{description} +% \item[ToDo:] This does not make any sense, because the page numbering is not +% changed. And it seems to be even wrong for \opt{open=left}! So why does +% \cls*{book} use this and why shall we do so too? +% \end{description} +% \begin{macrocode} +\newcommand*\backmatter{% + \if@openright\cleardoubleoddpage\else\clearpage\fi\@mainmatterfalse +} +% +% +% \end{macrocode} +% \end{command} +% +% +% \subsection{Appendix} +% +% The classes (except \cls*{scrlttr2}) does provide an appendix switch, +% similar but not identical to the standard classes. +% +% \begin{command}{\appendix} +% Activation of the appendix switch over to numbering of chapters +% resp. sections with uppercase letters. +% \changes{v2.2d}{1995/05/28}{\cls*{scrartcl} doesn't have a chapter +% counter} +% \changes{v2.3c}{1995/08/06}{alternative section numbering in appendix} +% \changes{v2.8}{2001/06/15}{new \cs{appendixmore}} +% \changes{v2.8e}{2001/07/10}{\cs{@altsecnumformattrue} removed} +% \changes{v2.8o}{2001/09/19}{initial \cs{par} added} +% \changes{v2.95}{2006/07/04}{\cs{newcommand*} replaced by \cs{gdef}} +% \changes{v2.95}{2006/07/04}{simplified usage of \cs{appendixmore}} +% \changes{v3.20}{2016/12/05}{improved warning} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \changes{v3.34}{2021/04/30}{\LaTeX{} hook added} +% \begin{command}{\appendixmore} +% \changes{v2.8}{2001/06/15}{added} +% \cs{appendixmore} is deprecated with \LaTeX{} 2020/10/01 (or newer) but +% still executed as a kind of hook. +% \begin{macrocode} +%<*body> +\newcommand*\appendix{% + \Ifstr{\@currenvir}{appendix}{% + \ClassWarning{\KOMAClassName}{% + You are using + `\string\begin{appendix}...\string\end{appendix}'.\MessageBreak + You should note, that `\string\appendix' is a mostly + globally\MessageBreak + working command not an enviroment with only local\MessageBreak + effects. Therefore `\string\end{appendix}' will neither\MessageBreak + switch back to normal section numbering nor finish\MessageBreak + every other effect of `\string\begin{appendix}'.\MessageBreak + Nevertheless, some effects may end with\MessageBreak + `\string\end{appendix}' and the document may become\MessageBreak + inconsistent.\MessageBreak + Because of this, you should remove `\string\end{appendix}'\MessageBreak + and replace `\string\begin{appendix}' by command\MessageBreak + `\string\appendix'% + }% + }{}% + \par +%<*article> + \setcounter{section}{0}% + \setcounter{subsection}{0}% + \gdef\thesection{\@Alph\c@section}% +%
+%<*report|book> + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \gdef\@chapapp{\appendixname}% + \gdef\thechapter{\@Alph\c@chapter}% +% +} +\IfLTXAtLeastTF{2020/10/01}{% + \g@addto@macro{\appendix}{\UseOneTimeHook{\KOMAClassName/appendix}}% +}{} +\g@addto@macro{\appendix}{\csname appendixmore\endcsname} +% +%<*prepare> +\IfLTXAtLeastTF{2020/10/01}{\NewHook{\KOMAClassName/appendix}}{} +% +% \end{macrocode} +% \end{command} +% \end{command} +% +% +% \subsection{Parts} +% +% \begin{macro}{\@thepart} +% \changes{v2.8e}{2001/07/10}{removed} +% \end{macro} +% +% The definition of parts depends on the class. +% +% \begin{fontelement}{partnumber,part} +% \changes{v2.8o}{2001/09/14}{pre-added as macro} +% \changes{v2.8p}{2001/09/23}{added} +% \changes{v2.96a}{2006/12/02}{undocumented support for last macro expects an +% argument} +% \begin{fontelement}{partprefix} +% \changes{v3.18}{2015/06/10}{alias added} +% Definition of the font elements used by \cs{part}. The settings are done by +% option \texttt{headings} later. Everything is prepared before this option is +% used the first time. The elements are defined manually because of +% compatibility with \KOMAScript~v2.8o before font elements has been +% implemented in \KOMAScript~v2.8p. +% \begin{macrocode} +%<*prepare> +\newcommand*{\size@part}{} +\newcommand*{\scr@fnt@part}{\size@part} +\newcommand*{\size@partnumber}{} +\newcommand*{\scr@fnt@partnumber}{\size@partnumber} +\aliaskomafont{partprefix}{partnumber} +% +% \end{macrocode} +% \end{fontelement}^^A partprefix +% \end{fontelement}^^A partnumber,part +% +% +% \begin{command}{\partheadstartvskip,\partheadendvskip} +% \changes{v2.95a}{2006/07/10}{added} +% \changes{v3.15}{2014/11/24}{\cls*{scrartcl} defines and uses +% \cs{scr@part@beforeskip} resp. \cs{scr@part@afterskip}} +% \begin{command}{\partheadmidvskip} +% \changes{v2.95a}{2006/07/10}{added} +% \begin{command}{\parheademptypage} +% \changes{v3.02}{2009/01/01}{added} +% These commands are the distance before and after a part heading, between the +% prefix line and the text line of the heading and also the empty retro page +% of a part. +% +% \begin{macro}{\scr@part@sectionbeforeskip,\scr@part@beforeskip} +% \changes{v3.15}{2014/11/24}{added} +% \changes{v3.17}{2015/03/25}{\cs{scr@part@sectionbeforeskip} renamed to +% \cs{scr@part@beforeskip}} +% \begin{macro}{\scr@part@sectionafterskip,\scr@part@sectionbeforeskip} +% \changes{v3.15}{2014/11/24}{added} +% \changes{v3.17}{2015/03/25}{\cs{scr@part@sectionafterskip} renamed to +% \cs{scr@part@afterskip}} +% \begin{macro}{\scr@part@sectionindent} +% \changes{v3.15}{2014/11/24}{added} +% \changes{v3.17}{2015/03/24}{removed} +% \end{macro}^^A \scr@part@sectionindent +% \begin{macro}{\scr@part@innerskip} +% \changes{v3.17}{2015/03/24}{added} +% \begin{macro}{\scr@part@style} +% \changes{v3.15}{2014/11/24}{added} +% All the skips and the page style are used by \cs{DeclareSectionCommand} +% resp. the style \texttt{part}. We define it as early as possible. Even the +% style of \cs{part} is already defined here. +% \begin{description} +% \item[ToDo:] Do we need them in the \texttt{prepare} run or can we move then +% even to the \texttt{body} run? +% \item[ToDo:] Do we really need to define \cs{scr@part@style}? +% \end{description} +% \begin{macrocode} +%<*prepare> +\newcommand*{\scr@part@beforeskip}{% +%
4ex +% \end{macrocode} +% \begin{description} +% \item[Note:] The |+\baselineskip| is needed, to stay as compatible as +% possible with prior definitions of \cs{chapterheadstartvskip}. +% \end{description} +% \begin{macrocode} +% \z@ \@plus 1fil + \baselineskip +} +%\newcommand*{\scr@part@innerskip}{20\p@} +\newcommand*{\scr@part@afterskip}{% +%
3ex +% \z@ \@plus 1fil +} +\newcommand*{\scr@part@style}{part} +% \end{macrocode} +% \end{macro}^^A \scr@part@style +% \end{macro}^^A \scr@part@afterskip +% \end{macro}^^A \scr@part@innerskip +% \end{macro}^^A \scr@part@beforeskip +% \begin{macrocode} +\newcommand*{\partheadstartvskip}{% +%
\addvspace{\@tempskipa}% +% \null\vskip-\baselineskip\vskip\@tempskipa +} +\newcommand*{\partheadmidvskip}{% + \par\nobreak +% \vskip\@tempskipa +} +\newcommand*{\partheadendvskip}{% +%
\vskip\@tempskipa +% \vskip\@tempskipa\newpage +} +%<*report|book> +\newcommand*{\partheademptypage}{% + \if@twoside\if@openright + \null% + \thispagestyle{empty}% + \newpage + \fi\fi +} +% +% +% \end{macrocode} +% \end{command}^^A \partheademptypage +% \end{command}^^A \partheadmidvskip +% \end{command}^^A \partheadstartvskip,\partheadendvskip +% +% +% \begin{macro}{\scr@startpart} +% \changes{v2.8d}{2001/07/05}{using \cs{partpagestyle}} +% \changes{v2.8p}{2001/09/27}{preamble above heading} +% \changes{v3.13a}{2014/09/11}{using \cs{SecDef}} +% \changes{v3.18}{2015/05/23}{added} +% \changes{v3.19}{2015/08/25}{ignoring empty \cs{partpagestyle}} +% \changes{v3.26}{2018/10/14}{supporting option \opt{afterindent}} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% The macro +% \begin{quote} +% \cs{scr@startpart}\marg{part command name} +% \end{quote} +% is now part of the style \texttt{part}. However, the main parts +% of the code are from the original definition of \cs{part}. It has only one +% argument: The name of the part command, i.e., \texttt{part}. All arguments +% to the part command will be processed later. +% \begin{macrocode} +%<*body> +\newcommand*{\scr@startpart}[1]{% + \ExecuteDoHook{heading/preinit/#1}% +%
\par +%<*book|report> + \if@openright\cleardoublepage\else\clearpage\fi + \scr@ifundefinedorrelax{#1pagestyle}{}{% + \Ifstr{#1pagestyle}{}{}{% + \thispagestyle{\@nameuse{#1pagestyle}}% + }% + }% + \if@twocolumn + \onecolumn + \@tempswatrue + \else + \@tempswafalse + \fi +% + \@tempskipa=\glueexpr\@nameuse{scr@#1@beforeskip}\relax + \@ifundefined{scr@#1@afterindent}{\@afterindentfalse}{% + \csname scr@#1@afterindent\endcsname + {\@afterindenttrue}{\@afterindentfalse}{% + \@afterindenttrue + \ifdim\@tempskipa<\z@ + \@tempskipa=-\@tempskipa + \@afterindentfalse + \fi + }% + }% + \ExecuteDoHook{heading/postinit/#1}% + \partheadstartvskip +%<*book|report> + \vbox to\z@{\vss\use@preamble{#1@o}\strut\par}% + \vskip-\baselineskip\nobreak +% + \expandafter\SecDef\csname @#1\expandafter\endcsname\csname @s#1\endcsname +} +% \end{macrocode} +% +% \begin{macro}{\scr@@startpart} +% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse}\cs{@parskip@indent}} +% \changes{v2.95}{2002/08/13}{\cs{centering} and \cs{@parskipfalse}% +% \cs{@parskip@indent} switched} +% \changes{v2.95}{2004/11/05}{\cs{@parskipfalse} and \cs{@parskip@indent} +% replaced} +% \changes{v3.18}{2015/05/23}{added} +% \changes{v3.27}{2019/07/08}{support for option \opt{nonumber}} +% The macro +% \begin{quote} +% \cs{scr@@startpart}\marg{part command name}\oarg{extended optional +% argument}\marg{part heading} +% \end{quote} +% is now part of the style \texttt{part}. However, the main parts +% of the code are from the original definition of \cs{@part}. Therefore it has +% the mandatory and optional arguments of a non-star variant of, i.e., +% \cs{part} but an additional first argument. +% \begin{description} +% \item[Note:] \meta{extended optional argument} is named as optional, however +% here it is already mandatory, because it is a delimited argument. +% \end{description} +% \begin{macrocode} +\newcommand{\scr@@startpart}{} +\long\def\scr@@startpart#1[#2]#3{% + \ExecuteDoHook{heading/branch/nostar/#1}% +% \end{macrocode} +% \changes{v3.10}{2011/08/30}{extended optional argument} +% First of all, depending in \opt{headings=optionto\dots} we have different +% defaults for the options. +% \begin{macrocode} + \ifnum \scr@osectarg=\z@ + \@scr@tempswafalse + \else + \scr@istest#2=\@nil + \fi + \@currentusenumbertrue + \if@scr@tempswa + \setkeys{KOMAarg.section}{tocentry={#3},head={#3},reference={#3},#2}% + \else + \ifcase \scr@osectarg\relax + \setkeys{KOMAarg.section}{tocentry={#2},head={#2},reference={#2}}% + \or + \setkeys{KOMAarg.section}{tocentry={#3},head={#2},reference={#3}}% + \or + \setkeys{KOMAarg.section}{tocentry={#2},head={#3},reference={#2}}% + \or + \setkeys{KOMAarg.section}{tocentry={#2},head={#2},reference={#2}}% + \fi + \fi +% \end{macrocode} +% \changes{v2.8e}{2001/07/10}{using \cs{@maybeautodot}} +% \changes{v3.28}{2019/11/19}{\cs{ifnumbered} renamed to +% \cs{Ifnumbered}} +% \changes{v3.31}{2020/06/02}{\cs{@maybeautodot}\cs{thepart} removed} +% For numbered headings we have to increase the counter and write a process +% information to the \file{log} and the terminal. +% \begin{macrocode} + \Ifnumbered{#1}{% + \refstepcounter{#1}% + \expandafter\@maybeautodot\csname the#1\endcsname + \typeout{#1 \csname the#1\endcsname.}% +% \end{macrocode} +% \changes{v3.08}{2010/11/01}{using \cs{addparttocentry}} +% \changes{v3.18}{2015/05/20}{using \cs{add\meta{Name}tocentry} for +% \cs{typeout}} +% \changes{v3.31}{2020/06/06}{using \cs{\dots tocformat}} +% And if the ToC entry is not empty add a numbered entry to the table of +% contents. +% \begin{description} +% \item[ToDo:] Move \cs{autodot} to the definition of \cs{\dots tocformat}. +% \end{description} +% \begin{macrocode} + \ifx\@currenttocentry\@empty\else + \@ifundefined{#1tocformat}{% + \expandafter\gdef\csname #1tocformat\endcsname + {\csname the#1\endcsname}% + }{}% + \scr@ifundefinedorrelax{add#1tocentry}{% + \addtocentrydefault{#1}% + }{% + \@nameuse{add#1tocentry}% + }{\csname\@ifundefined{#1tocformat}{the#1}{#1tocformat}\endcsname}% + {\@currenttocentry}% + \fi + }{% +% \end{macrocode} +% \changes{v3.18}{2015/05/23}{execute counter reset list for not numbered +% headings} +% For not numbered headings we still have to process the reset list of the +% counter and write a process information to the \file{log} and the terminal. +% \begin{macrocode} + \expandafter\ifnum\scr@v@is@lt{3.18}\relax\else + \begingroup + \let\@elt\@stpelt + \csname cl@#1\endcsname + \endgroup + \fi + \typeout{#1 without number}% +% \end{macrocode} +% \changes{v3.08}{2010/11/01}{using \cs{addparttocentry}} +% \changes{v3.18}{2015/05/23}{generalized \cs{addparttocentry}} +% And before writing a not numbered entry to the table of contents we have to +% execute also the \pkg{hyperref} hook \cs{hy@insteadofrefstepcounter}. +% \begin{description} +% \item[Note:] \pkg*{scrhack} uses the existence of this command to detect a +% \KOMAScript{} class. Shouldn't this be changed using, e.g., +% \cs{KOMAClassName}? +% \end{description} +% \begin{macrocode} + \ifx\@currenttocentry\@empty\else + \hy@insteadofrefstepcounter{#1}% + \scr@ifundefinedorrelax{add#1tocentry}{% + \addtocentrydefault{#1}% + }{% + \@nameuse{add#1tocentry}% + }{}{\@currenttocentry}% + \fi + }% +% \end{macrocode} +% \changes{v2.2c}{1995/05/25}{support for CJK} +% \changes{v2.4b}{1996/03/29}{\cs{size@partnumer} replaced by +% \cs{size@partnumber}} +% \changes{v2.8p}{2001/09/22}{\cs{sectfont} used before \cs{size@part} or +% \cs{size@partnumber}} +% \changes{v2.8q}{2002/02/28}{\cs{nobreak} after \cs{sectfont}} +% \changes{v3.18}{2015/05/23}{\cs{size@\dots} replaced by \cs{usekomafont}} +% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added} +% \changes{v3.25}{2017/09/07}{defining \cs{IfUseNumber} locally} +% \changes{v3.25}{2017/09/07}{\cs{sectfont} replaced by \cs{usekomafont}} +% \changes{v3.25}{2017/09/07}{using \cs{partlineswithprefixformat}} +% \changes{v3.25}{2018/02/12}{using correct fontelement} +% \changes{v3.28}{2019/11/19}{\cs{ifnumbered} renamed to +% \cs{Ifnumbered}} +% Now the main printing code. +% \begin{description} +% \item[ToDo:] This code is almost the same as \cs{scr@@startchapter}. Only +% the procession of the reset list was there already with +% \KOMAScript~v3.15. And in \cs{scr@@startchapter} we are using +% \cs{@make\meta{name}head} here. So maybe we should do the same here and +% really use the same definition instead of having it twice. +% \end{description} +% \begin{macrocode} + \begingroup + \def\IfUseNumber{\Ifnumbered{#1}}% + \ExecuteDoHook{heading/begingroup/#1}% + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \raggedpart + \normalfont\usekomafont{disposition}{\nobreak + \IfUseNumber{% + \partlineswithprefixformat{#1}{% + \usekomafont{#1prefix}{\nobreak\@nameuse{#1format}}% +% \setlength{\@tempskipa}{\@nameuse{scr@#1@innerskip}}% + \partheadmidvskip + }{% + \usekomafont{#1}{\nobreak\interlinepenalty \@M#3\strut\@@par}% + }% + }{% + \partlineswithprefixformat{#1}{}{% + \usekomafont{#1}{\nobreak\interlinepenalty \@M#3\strut\@@par}% + } + }% +% \end{macrocode} +% \changes{v3.10}{2011/08/30}{using\cs{@mkboth{}{}} if \cs{partmark} is +% \cs{@gobble}} +% The running head. +% \begin{macrocode} + \expandafter\ifx\csname #1mark\endcsname\@gobble + \@mkboth{}{}% + \else + \csname #1mark\expandafter\endcsname\expandafter{\@currentheadentry}% + \fi + }% + \ExecuteDoHook{heading/endgroup/#1}% + \endgroup +% \end{macrocode} +% The final distance. +% \begin{macrocode} +%<*article> + \nobreak + \@tempskipa=\glueexpr\@nameuse{scr@#1@afterskip}\relax\relax + \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi + \partheadendvskip +%
+% \@nameuse{@end#1}% +% \end{macrocode} +% \changes{v3.26}{2018/10/14}{using \@cs{@afterheading} with +% \cls*{scrbook} or \cls*{scrreprt}} +% And \cs{@afterheading} for all classes. +% \begin{macrocode} + \@afterheading +} +% \end{macrocode} +% \end{macro}^^A \scr@@startpart +% +% \begin{macro}{\scr@@startspart} +% \changes{v2.4n}{1997/05/28}{added \cs{chaptermark} resp. +% \cs{sectionmark} to star variant} +% \changes{v2.6a}{2000/01/20}{using \cs{@mkboth} to delete the running head} +% \changes{v2.8q}{2001/11/13}{\cs{@parskipfalse}\cs{@parskip@indent}} +% \changes{v2.95}{2002/08/13}{\cs{centering} and +% \cs{@parskipfalse}\cs{@parskip@indent} swapped} +% \changes{v2.95}{2004/11/05}{\cs{@parskipfalse} and\cs{@parskip@indent} +% replaced} +% \changes{v3.18}{2015/05/23}{added} +% The macro +% \begin{quote} +% \cs{scr@@startspart}\marg{part command name}\marg{part heading} +% \end{quote} +% is now part of the style \texttt{part}. However, the main parts +% of the code are from the original definition of \cs{@spart}. Therefore it has +% the mandatory argument of a star variant of, i.e., \cs{part} but an +% additional first argument. +% \begin{macrocode} +\newcommand{\scr@@startspart}[2]{% + \ExecuteDoHook{heading/branch/star/#1}% +% \end{macrocode} +% Some users don't learn to use \cs{addpart} for not numbered parts with entry +% to the table of contents but insist in using \cs{addcontentsline}. Despite +% this should not be used, because at least \cs{addparttocentry} should be +% used, we tolerate this by using our \pkg{hyperref} hook. +% \begin{description} +% \item[ToDo:] I don't understand why \pkg{hyperref} uses a group here and +% locally sets \cs{@mkboth} to \cs{@gobbletwo}. However, I've copied this. +% \end{description} +% \begin{macrocode} + \begingroup + \let\@mkboth\@gobbletwo + \hy@insteadofrefstepcounter{#1}% + \endgroup +% \end{macrocode} +% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added} +% \changes{v3.25}{2017/09/07}{difining \cs{IfUseNumber} locally} +% \changes{v3.25}{2017/09/07}{\cs{sectfont} replaced by \cs{usekomafont}} +% \changes{v3.25}{2017/09/07}{using \cs{partlineswithprefixformat}} +% Now the printing similar to \cs{scr@@startpart}. +% \begin{macrocode} + \begingroup + \let\IfUseNumber\@secondoftwo + \ExecuteDoHook{heading/begingroup/#1}% + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \raggedpart + \normalfont\usekomafont{disposition}{% + \nobreak + \partlineswithprefixformat{#1}{}{% + \usekomafont{#1}{\nobreak\interlinepenalty \@M#2\strut\@@par}% + }% + \@mkboth{}{}% + }% + \ExecuteDoHook{heading/endgroup/#1}% + \endgroup +%<*article> + \nobreak + \@tempskipa=\glueexpr\csname scr@#1@afterskip\endcsname\relax\relax + \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi + \partheadendvskip + \@afterheading +%
+% \@nameuse{@end#1}% +} +% \end{macrocode} +% \end{macro}^^A \scr@@startspart +% +% \begin{command}{\partlineswithprefixformat} +% \changes{v3.25}{2017/09/07}{added} +% Command +% \begin{quote} +% \cs{partlineswithprefixformat}\marg{command name}\marg{number}\marg{text} +% \end{quote} +% is used to print a part heading with a prefix line. \meta{number} is the +% completely formatted prefix line inclusive the vertical distance below. The +% \meta{text} is the text of the heading also formatted and with final +% \cs{@@par}. But if the user uses more paragraphs than this final one, the +% user is responsible to prevent page breaks! +% \begin{macrocode} +\newcommand{\partlineswithprefixformat}[3]{% + #2#3% +} +% \end{macrocode} +% \end{command}^^A \partlineswithprefixformat +% +% \begin{macro}{\scr@@endpart} +% \changes{v2.3g}{1996/01/14}{\cs{@endpart} not defined for \cls*{scrartcl}} +% \changes{v2.4e}{1996/07/02}{supporting option \opt{openany}} +% \changes{v2.6c}{2000/06/10}{\cs{@endpart} respects \opt{open\quotechar=right}} +% \changes{v2.8p}{2001/09/27}{\cs{vbox} added} +% \changes{v2.8p}{2001/09/27}{\cs{@part@preamble} replaced by \cs{use@preamble}} +% \changes{v3.02}{2009/01/01}{using \cs{partheademptypage}} +% \changes{v3.18}{2015/05/23}{added} +% Before \KOMAScript~v3.18 this code was part of \cs{part}. \cls*{scrbook} and +% \cls*{scrreprt} use this macro to finalize the heading, e.g., print a +% preamble, to the final distance or new page and add an empty retro +% page. \cls*{scrartcl} does not have such a command, because with +% \cls*{scrartcl} parts are simple headings not pages. As usual the argument +% is the name of the part command, e.g., \texttt{part}. +% \begin{macrocode} +%<*book|report> +\newcommand*{\scr@@endpart}[1]{% + \vbox to\z@{\use@preamble{#1@u}\vss}% + \@tempskipa=\glueexpr\csname scr@#1@afterskip\endcsname\relax\relax + \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi + \partheadendvskip + \partheademptypage + \if@tempswa + \twocolumn + \fi +} +% +% \end{macrocode} +% \end{macro}^^A \scr@@endpart +% \end{macro}^^A \scr@startpart +% +% +% \begin{macro}{\hy@insteadofrefstepcounter} +% \changes{v3.18}{2015/05/22}{added to be used by \pkg{hyperref}} +% \begin{macro}{\scr@chapter@before@hyperref@patch} +% \changes{v3.27}{2019/07/24}{added to be used by \pkg*{scrhack}} +% \begin{macro}{\scr@chapter@after@hyperref@patch} +% \changes{v3.27}{2019/07/24}{added to be used by \pkg*{scrhack}} +% \changes{v3.32}{2020/09/11}{\cs{AfterPackage!} replaced by +% \cs{AfterAtEndOfPackage}} +% Usually \pkg{hyperref} uses \cs{refstepcounter} to process extra codes for +% anchors and bookmarks. However, if a not numbered heading is used, +% \pkg{hyperref} cannot use \cs{refstepcounter} but still has to add +% code. Usually \pkg{hyperref} patchs several commands like \cs{@chapter}, +% \cs{@schapter}, \cs{@part}, \cs{@spart} etc. to do so. But I think, it would +% be better to provide a hook for this, \pkg*{hyperref} can change. So we've +% designed \cs{hy@insteadofrefstepcounter}. Unfortunately \pkg{hyperref} +% currently does not care for this, but still does its patches. So we need to +% prevent \pkg{hyperref} from doing so and additionally define +% \cs{hy@insteadofrefstepcounter} ourselves. But because \cs{autoref} is +% nonsense for not numbered headings, I do not use \cs{Hy@chapapp} for +% \cs{Hy@MakeCurrentHrefAuto}. +% \begin{description} +% \item[ToDo:] Explain the Oberdiek support team, what we are doing here and +% what they should do. +% \end{description} +% \begin{macrocode} +\newcommand*{\hy@insteadofrefstepcounter}[1]{} +\let\hy@insteadofrefstepcounter\@gobble +\newcommand*{\scr@chapter@before@hyperref@patch}{% + \let\scr@orig@chapter\@chapter + \let\scr@orig@schapter\@schapter + \let\scr@orig@addchap\@addchap +} +\BeforePackage{hyperref}{\scr@chapter@before@hyperref@patch} +\newcommand*{\scr@chapter@after@hyperref@patch}{% + \let\@chapter\scr@orig@chapter + \let\@schapter\scr@orig@schapter + \let\@addchap\scr@orig@addchap + \ifx\hy@insteadofrefstepcounter\@gobble + \renewcommand*{\hy@insteadofrefstepcounter}[1]{% + \Hy@MakeCurrentHrefAuto{##1*}% + \Hy@raisedlink{% + \hyper@anchorstart{\@currentHref}\hyper@anchorend + }% + }% + \fi +} +\AfterAtEndOfPackage{hyperref}{\scr@chapter@after@hyperref@patch} +% \end{macrocode} +% \end{macro}^^A \scr@after@hyperref@patch +% \end{macro}^^A \scr@before@hyperref@patch +% \end{macro}^^A \hy@insteadofrefstepcounter +% +% \begin{command}{\addparttocentry} +% \changes{v3.08}{2010/11/01}{added} +% We do not use \cs{addcontentsline} directly for the entries to the table of +% contents. Using +% \begin{quote} +% \cs{addparttocentry}\marg{number}\marg{text} +% \end{quote} +% allows easy manipulation of such entries and additional actions. If the +% \meta{number} is completely empty no number should be used. Internally the +% generic \cs{addtocentrydefault} it used, which uses \cs{nonumberline} +% instead of \cs{numberline} in this case. See \file{scrkernel-listsof.dtx} +% for more information. +% \begin{macrocode} +\newcommand*{\addparttocentry}[2]{% + \addtocentrydefault{part}{#1}{#2}% +} +% \end{macrocode} +% \end{command}^^A \addparttocentry +% +% +% \begin{command}{\part} +% \changes{v3.18}{2015/05/23}{indirect definition} +% \begin{macro}{\@part,\@spart,\@endpart} +% \changes{v3.18}{2015/05/23}{indirect definition} +% \begin{command}{\setpartpreamble} +% \changes{v2.8f}{2001/07/12}{added} +% \changes{v2.8p}{2001/09/27}{using \cs{use@preamble}} +% \changes{v3.18}{2015/05/23}{indirect definition} +% \begin{macro}{\part@preamble,\part@u@preamble} +% \changes{v2.8p}{2001/09/27}{added} +% \changes{v2.8p}{2001/09/27}{\cs{part@preamble} renamed to \cs{part@u@preamble}} +% \changes{v3.12a}{2014/02/14}{name fixed} +% \changes{v3.18}{2015/05/23}{indirect definition} +% \begin{macro}{\part@o@preamble} +% \changes{v2.8p}{2001/09/27}{added} +% \changes{v3.12a}{2014/02/14}{name fixed} +% \changes{v3.18}{2015/05/23}{indirect definition} +% All these commands and macros are not defined explicitly but by using +% \cs{DeclareSectionCommand} later. See also +% \cs{scr@dsc@def@style@part@command} and \cs{setpartpreamble}. +% \end{macro}^^A \part@o@preamble +% \end{macro}^^A \part@u@preamble +% \end{command}^^A \setpartpreamble +% \end{macro}^^A \@part,\@spart,\@endpart +% \end{command}^^A \part +% +% \begin{command}{\addpart} +% \changes{v2.8c}{2001/06/29}{added} +% \changes{v2.8d}{2001/07/05}{using \cs{partpagestyle}} +% \changes{v2.95a}{2006/07/10}{support of preamble added} +% \changes{v3.11b}{2012/07/29}{missing negativ \cs{vskip} added} +% \changes{v3.13a}{2014/09/11}{using \cs{SecDef}} +% \changes{v3.15a}{2015/01/22}{distance adaption} +% \changes{v3.18}{2015/05/25}{redefinition} +% \begin{macro}{\@addpart} +% \changes{v2.8c}{2001/06/29}{added} +% \changes{v2.8l}{2001/08/17}{first ToC then output} +% \changes{v2.95}{2004/07/20}{support for running head} +% \changes{v3.00}{2008/07/01}{\pkg{hyperref} workaround} +% \changes{v3.08}{2010/11/02}{using \cs{addparttocentry}} +% \changes{v3.10}{2011/08/30}{extended optional argument} +% \changes{v3.10}{2011/08/30}{using \cs{@mkboth{}{}} if \cs{partmark} is +% \cs{@gobble}} +% \changes{v3.17}{2015/04/20}{using \cs{addpartmark} but never \cs{@mkboth}} +% \changes{v3.18}{2015/05/25}{redefinition} +% \begin{macro}{\@saddpart} +% \changes{v2.8c}{2001/06/29}{added} +% \changes{v3.18}{2015/05/25}{redefinition} +% The improved not numbered version of \cs{part}. Note: This could also be +% done using the extended optional argument of \cs{part} and option +% \opt{nonumber=true}. So this command becomes more and more deprecated. +% \begin{macrocode} +\newcommand\addpart{% + \SecDef\@addpart\@saddpart +} +\newcommand*{\@addpart}{} +\long\def\@addpart[#1]#2{% + \edef\reserved@a{% + \unexpanded{% + \part[{#1}]{#2}% + \c@secnumdepth= + }\the\c@secnumdepth\relax + }% + \c@secnumdepth=\numexpr \partnumdepth-1\relax + \reserved@a +} +\newcommand{\@saddpart}[1]{% + \part*{#1}% + \addpartmark{}% +} +% \end{macrocode} +% \end{macro}^^A \@saddpart +% \end{macro}^^A \@addpart +% \end{command}^^A \addpart +% +% +% \begin{macro}{\l@part} +% \changes{v2.97c}{2007/06/21}{\cs{sectfont}\cs{large} replaced by font +% element \fnt{partentry}} +% \changes{v2.97c}{2007/06/21}{using font element \fnt{partentrypagenumber}} +% \changes{v3.15}{2014/12/23}{using \cs{parttocdepth} and +% \cs{scr@part@numwidth}} +% \changes{v3.20}{2015/10/06}{replaced by usage of ToC style} +% \begin{macro}{\scr@part@tocindent} +% \changes{v3.15}{2014/12/02}{added} +% \changes{v3.18}{2015/06/09}{indirect by \cs{DeclareSectionCommand}} +% \end{macro}^^A \scr@part@tocindent +% \begin{macro}{\scr@part@tocnumwidth} +% \changes{v3.15}{2014/12/02}{added} +% \changes{v3.18}{2015/06/09}{indirect by\cs{DeclareSectionCommand}} +% These macros are not longer defined explicitly but by +% \cs{DeclareTOCEntryStyle} and indirectly by \cs{DeclareSectionCommand}. +% \end{macro} +% \end{macro}^^A \l@part +% +% +% \begin{counter}{part} +% \begin{command}{\thepart} +% \begin{command}{\partformat} +% \changes{v2.3c}{1995/08/06}{auto dot feature} +% \changes{v2.5f}{1999/02/14}{orphan spaces removed} +% \changes{v2.7h}{2001/04/22}{missing backslash of \cs{autodot} fixed} +% Because we don't use the default Arabic numbering, we still define the +% counter for \cs{part}, it's printing and the formatting explicitly. +% \begin{macrocode} +\newcounter{part} +\renewcommand*{\thepart}{\@Roman\c@part} +\newcommand*{\partformat}{\partname~\thepart\autodot} +% \end{macrocode} +% \end{command}^^A \partformat +% \end{command}^^A \thepart +% \end{counter}{part} +% +% +% \begin{command}{\partname} +% \changes{v3.36}{2022/03/15}{explicit definition for English languages} +% The name of a part used for the prefix line and maybe for the ToC entry. +% \begin{macrocode} +\newcommand*\partname{Part} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\partname{Part} +% \end{macrocode} +% \end{command}^^A \partname +% +% +% \begin{command}{\partmark} +% \changes{v2.9r}{2004/07/20}{added} +% \changes{v3.18}{2015/05/24}{default changed from \cs{@gobble} to +% \cs{@mkboth{}{}}} +% Initially \cs{part} should simply empty the left and right mark if an +% automatic running head is used. This is independent from the page style. +% \begin{macrocode} +\newcommand*{\partmark}[1]{\@mkboth{}{}} +% \end{macrocode} +% \end{command}^^A \partmark +% +% \begin{command}{\addpartmark} +% \changes{v3.17}{2015/04/20}{added} +% \changes{v3.18}{2015/05/24}{depends on \cs{partnumdepth}} +% To be used to add the marks with \cs{addpart}. Locally we define +% \cs{if@mainmatter}, because it makes life easier for users or package +% authors, who (re-)define \cs{partmark}. +% \begin{macrocode} +\newcommand*\addpartmark[1]{% + \begingroup + \expandafter\let\csname if@mainmatter\expandafter\endcsname + \csname iffalse\endcsname + \c@secnumdepth=\numexpr \partnumdepth-1\relax + \partmark{#1}% + \endgroup +} +% \end{macrocode} +% \end{command}^^A \addpartmark +% +% +% \begin{command}{\raggedpart} +% \changes{v2.95a}{2006/07/10}{added} +% Style \texttt{part} does not use \cs{raggedsection} but +% \cs{raggedpart}. However for \cls*{scrartcl} the default is the same. But +% \cls*{scrbook} and \cls*{scrreprt} use \cs{centering} as default. +% \begin{description} +% \item[Note:] Because of using \cs{let} inside a class, \cs{raggedright} +% should be without hyphenation when we define \cs{raggedpart}. +% \end{description} +% \begin{macrocode} +\newcommand*{\raggedpart}{} +%
\let\raggedpart\raggedsection +%\let\raggedpart\centering +% \end{macrocode} +% \end{command} +% +% \begin{fontelement}{partentry} +% \changes{v2.97c}{2007/06/21}{added} +% \changes{v3.06}{2010/06/09}{\fnt{sectioning} replaced by \fnt{disposition}} +% \cs{part} entries to the table of contents are \cs{large}. +% \begin{macrocode} +\newkomafont{partentry}{\usekomafont{disposition}\large} +% \end{macrocode} +% \end{fontelement} +% +% \begin{fontelement}{partentrypagenumber} +% \changes{v2.97c}{2007/06/21}{added} +% The page number of the ToC entry should be unchanged. +% \begin{macrocode} +\newkomafont{partentrypagenumber}{} +% +% \end{macrocode} +% \end{fontelement} +% +% +% \subsection{Chapters} +% +% Classes \cls*{scrbook} and \cls*{scrreprt} provide chapters. These are +% realized by \cs{DeclareSectionCommand} and the \texttt{chapter} style. The +% style is represented by \cs{scr@dsc@def@style@chapter@command} and several +% helpers. +% \begin{description} +% \item[Note:] Package \pkg{hyperref} is not really compatible with +% \KOMAScript{} classes, because it redefines \cs{@schapter} and +% \cs{@chapter} incompatible. However, currently \KOMAScript{} has a build +% in workaround for this. But this workaround itself depends on internal +% code of \pkg{hyperref}. It would be better, if \pkg{hyperref} would +% provide an interface for class authors and would redefine internal macros +% of classes only as fallback if classes do not use this +% interface. \KOMAScript{} also provides an alternative. \pkg*{hyperref} +% could redefine a single command \cs{hy@insteadofrefstepcounter}. +% \item[Note:] Any package, that changes internal macros like \cs{@chapter}, +% \cs{@schapter}, \cs{@makechapterhead}, \cs{@makeschapterhead} is +% incompatible with \KOMAScript{} classes. Neither \KOMAScript{} nor the +% \KOMAScript{} author is responsible for this. Package authors are welcome +% to ask for interfaces they need, e.g., a good idea would be to define a +% own headings style. +% \end{description} +% +% \begin{option}{chapterprefix} +% \changes{v2.8}{2001/06/15}{added} +% \changes{v2.95c}{2006/08/21}{changed to \pkg{keyval} option} +% \changes{v3.18}{2015/05/22}{option correlates with style not level} +% \begin{macro}{\@chapterprefixtrue,\@chapterprefixfalse,\if@chapterprefix} +% Initially \KOMAScript{} does not use the enormous chapter headings with +% prefix line ``Chapter \meta{number}'' but a more subtle one. However, either +% \opt{chapterprefix} or \opt{headings=twolinechapter} can be used to +% reactivate the prefix line. The current setting is available via the boolean +% switch \cs{if@chapterprefix}. +% \begin{macrocode} +%<*book|report> +%\newif\if@chapterprefix +%<*option> +\KOMA@key{chapterprefix}[true]{% + \KOMA@set@ifkey{chapterprefix}{@chapterprefix}{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \KOMA@kav@replacebool{.\KOMAClassFileName}% + {chapterprefix}{@chapterprefix}% + \KOMA@kav@remove{.\KOMAClassFileName}% + {headings}{twolinechapter}% + \KOMA@kav@remove{.\KOMAClassFileName}% + {headings}{onelinechapter}% + \KOMA@kav@xadd{.\KOMAClassFileName}% + {headings}{% + \if@chapterprefix twolinechapter\else onelinechapter\fi + }% + \fi +} +\KOMA@kav@add{.\KOMAClassFileName}{headings}{onelinechapter}% +% \end{macrocode} +% \begin{option}{nochapterprefix} +% \changes{v2.8}{2001/06/15}{added} +% \changes{v2.95c}{2006/08/21}{obsolete} +% \changes{v3.01a}{2008/11/20}{deprecated} +% Deprecated option for compatibility with \KOMAScript~2.9u only. +% \begin{macrocode} +\KOMA@DeclareDeprecatedOption{nochapterprefix}{chapterprefix=false} +% +% \end{macrocode} +% \end{option}^^A nochapterprefix +% \end{macro}^^A \if@chapterprefix +% \end{option}^^A chapterprefix +% +% +% \begin{option}{appendixprefix} +% \changes{v2.8}{2001/06/15}{added} +% \changes{v2.95c}{2006/08/21}{re-implementation as \pkg{keyval} option} +% \changes{v3.12}{2013/03/05}{usage of \cs{FamilyKeyState}} +% \changes{v3.17}{2015/03/09}{internal value storage} +% \changes{v3.34}{2021/04/30}{usage of \LaTeX{} hook, if available} +% \changes{v3.34}{2021/04/30}{new value \opt{\quotechar=default} with \LaTeX{} +% hooks} +% If the appendix chapters should be with or without prefix line independent +% from the chapters of the main part, option \opt{appendixprefix} can be +% used. This does not set up a new boolean but just activates or deactivates +% the boolean for chapters inside \cs{appendix}. From \KOMAScript{} v3.34 and +% \LaTeX{} 2020/10/01 this is done using a new \LaTeX{} hook. Otherwise still +% \cs{appendixmore} is used. Default is, using the settings for chapters. +% \begin{macrocode} +%<*option> +\IfLTXAtLeastTF{2020/10/01}{% + \KOMA@key{appendixprefix}[true]{% + \Ifstr{#1}{default}{% + \KOMA@kav@removekey{.\KOMAClassFileName}{appendixprefix}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{twolineappendix}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{onelineappendix}% + \IfHookEmptyTF{\KOMAClassName/appendix}{}{% + \RemoveFromHook{\KOMAClassName/appendix}[appendixprefix]% + }% + \FamilyKeyStateProcessed + }{% + \KOMA@set@ifkey{appendixprefix}{@tempswa}{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \KOMA@kav@xreplacevalue{.\KOMAClassFileName}{appendixprefix}{#1}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{twolineappendix}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{onelineappendix}% + \IfHookEmptyTF{\KOMAClassName/appendix}{}{% + \RemoveFromHook{\KOMAClassName/appendix}[appendixprefix]% + }% + \if@tempswa + \KOMA@kav@add{.\KOMAClassFileName}{headings}{twolineappendix}% + \AddToHook{\KOMAClassName/appendix}[appendixprefix]% + {\@chapterprefixtrue}% + \else + \KOMA@kav@add{.\KOMAClassFileName}{headings}{onelineappendix}% + \AddToHook{\KOMAClassName/appendix}[appendixprefix]% + {\@chapterprefixfalse}% + \fi + \fi + }% + }% +}{% + \KOMA@key{appendixprefix}[true]{% + \KOMA@set@ifkey{appendixprefix}{@tempswa}{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \KOMA@kav@xreplacevalue{.\KOMAClassFileName}{appendixprefix}{#1}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{twolineappendix}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{onelineappendix}% + \if@tempswa + \KOMA@kav@add{.\KOMAClassFileName}{headings}{twolineappendix}% + \@ifundefined{appendixmore}{% + \def\appendixmore{\@chapterprefixtrue}% + }{% + \l@addto@macro\appendixmore{\@chapterprefixtrue}% + }% + \else + \KOMA@kav@add{.\KOMAClassFileName}{headings}{onelineappendix}% + \@ifundefined{appendixmore}{% + \def\appendixmore{\@chapterprefixfalse}% + }{% + \l@addto@macro\appendixmore{\@chapterprefixfalse}% + }% + \fi + \fi + }% +} +% \end{macrocode} +% \begin{option}{noappendixprefix} +% \changes{v2.8}{2001/06/15}{added} +% \changes{v2.95c}{2006/08/21}{obsolete} +% \changes{v3.01a}{2008/11/20}{deprecated} +% \begin{macrocode} +\KOMA@DeclareDeprecatedOption{noappendixprefix}{appendixprefix=false} +% +% \end{macrocode} +% \end{option}^^A noappendixprefix +% \end{option}^^A appendixprefix +% +% +% \begin{fontelement}{chapter} +% \changes{v2.8o}{2001/09/14}{added} +% \changes{v2.96a}{2006/12/02}{undocumented support for last macro expects an +% argument} +% \begin{fontelement}{chapterprefix} +% \changes{v2.8o}{2001/09/14}{added by macro} +% \changes{v2.96a}{2006/12/02}{added} +% Definition of the font elements used by \cs{chapter}. The settings are done +% by option \opt{headings} later. Everything is prepared before this option +% is used the first time. The manual definition is used, because of +% compatibility with \KOMAScript{} 2.9u. However, using the old macros is +% deprecated and not supported any longer. +% \begin{macrocode} +%<*prepare> +\newcommand*{\size@chapter}{} +\newcommand*{\scr@fnt@chapter}{\size@chapter} +\newcommand*{\size@chapterprefix}{\size@chapter} +\newcommand*{\scr@fnt@chapterprefix}{\size@chapterprefix} +% +% \end{macrocode} +% \end{fontelement}^^A chapterprefix +% \end{fontelement}^^A chapter +% +% +% \begin{command}{\chapterheadstartvskip} +% \changes{v3.15}{2014/11/24}{defining and using \cs{scr@chapter@beforeskip}} +% \begin{command}{\chapterheadmidvskip} +% \changes{v3.15}{2014/11/20}{added} +% \changes{v3.17}{2015/03/25}{defining and using \cs{scr@chapter@innerskip}} +% \begin{command}{\chapterheadendvskip} +% \changes{v3.11c}{2013/02/13}{\cs{chapterheadstartvskip} and +% \cs{chapterheadendvskip} removed from \cls*{scrartcl}} +% \changes{v3.15}{2014/11/24}{defining and using \cs{scr@chapter@afterskip}} +% \changes{v3.15}{2014/12/10}{\cs{vspace} replaced by \cs{vskip} because of +% \cs{lastskip}} +% These commands are the distance before a chapter heading, between the +% prefix line and the text line of the heading and after the chapter heading. +% \cs{chapterheadmidvskip} is only used with option \opt{chapterprefix} +% resp. \opt{headings=twolinechapter}. +% +% \begin{macro}{\scr@chapter@sectionbeforeskip,\scr@chapter@beforeskip} +% \changes{v3.15}{2014/11/24}{added} +% \changes{v3.17}{2015/03/25}{\cs{scr@chapter@sectionbeforeskip} renamed to +% \cs{scr@chapter@beforeskip}} +% \begin{macro}{\scr@chapter@innerskip} +% \changes{v3.17}{2015/03/25}{added} +% \begin{macro}{\scr@chapter@sectionafterskip,\scr@chapter@afterskip} +% \changes{v3.15}{2014/11/24}{added} +% \changes{v3.17}{2015/03/25}{\cs{scr@chapter@sectionafterskip} renamed to +% \cs{scr@chapter@afterskip}} +% \begin{macro}{\scr@chapter@sectionindent} +% \changes{v3.15}{2014/11/24}{added} +% \changes{v3.17}{2015/04/24}{removed} +% \end{macro}^^A \scr@chapter@sectionindent +% \begin{macro}{\scr@chapter@style} +% \changes{v3.15}{2014/11/24}{added} +% All the skips and the page style are used by \cs{DeclareSectionCommand} +% resp. the style \texttt{chapter}. We define it as early as possible. Even the +% style of \cs{chapter} is already defined here. +% \begin{description} +% \item[ToDo:] Do we need them in the \texttt{prepare} run or can we move then +% even to the \texttt{body} run? +% \item[ToDo:] Do we really need to define \cs{scr@chapter@style}? +% \end{description} +% \begin{macrocode} +%<*prepare> +\newcommand*{\scr@chapter@beforeskip}{\z@} +\let\scr@chapter@beforeskip\z@ +\newcommand*{\scr@chapter@afterskip}{\z@} +\let\scr@chapter@afterskip\z@ +\newcommand*{\scr@chapter@innerskip}{\z@} +\let\scr@chapter@innerskip\z@ +\newcommand*{\scr@chapter@style}{chapter} +% \end{macrocode} +% \end{macro}^^A \scr@chapter@style +% \end{macro}^^A \scr@chapter@afterskip +% \end{macro}^^A \scr@chapter@innerskip +% \end{macro}^^A \scr@chapter@beforeskip +% \begin{macrocode} +\newcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}} +\newcommand*{\chapterheadendvskip}{\vskip\@tempskipa} +\newcommand*{\chapterheadmidvskip}{\par\nobreak\vskip\@tempskipa} +% +% \end{macrocode} +% \end{command}^^A \chapterheadendvskip +% \end{command}^^A \chapterheadmidvskip +% \end{command}^^A \chapterheadstartvskip +% +% +% \begin{macro}{\scr@startchapter} +% \changes{v3.18}{2015/05/22}{added} +% \changes{v3.19}{2015/08/25}{ignore empty page styles} +% The macro +% \begin{quote} +% \cs{scr@startchapter}\marg{chapter command name} +% \end{quote} +% is now part of the style \texttt{chapter}. However, the main parts +% of the code are from the original definition of \cs{chapter}. It has only one +% argument: The name of the chapter command, i.e., \texttt{chapter}. All +% arguments to the part command will be processed later. +% \begin{macrocode} +%<*body> +\newcommand*{\scr@startchapter}[1]{% + \ExecuteDoHook{heading/preinit/#1}% + \if@openright\cleardoublepage\else\clearpage\fi + \scr@ifundefinedorrelax{#1pagestyle}{}{% + \Ifstr{#1pagestyle}{}{}{% + \thispagestyle{\@nameuse{#1pagestyle}}% + }% + }% + \global\@topnum\z@ + \@ifundefined{scr@#1@afterindent}{\@afterindentfalse}{% + \csname scr@#1@afterindent\endcsname + {\@afterindenttrue}{\@afterindentfalse}{% + \@afterindenttrue + \@ifundefined{scr@#1@beforeskip}{\@afterindentfalse}{% + \ifdim\glueexpr\@nameuse{scr@#1@beforeskip}\relax<\z@ + \@afterindentfalse + \fi + }% + }% + }% + \ExecuteDoHook{heading/postinit/#1}% + \expandafter\SecDef\csname @#1\expandafter\endcsname\csname @s#1\endcsname +} +% \end{macrocode} +% +% \begin{macro}{\scr@@startchapter} +% \changes{v3.18}{2015/05/22}{added} +% The macro +% \begin{quote} +% \cs{scr@@startchapter}\marg{chapter command name}\oarg{extended optional +% argument}\marg{chapter heading} +% \end{quote} +% is now part of the style \texttt{chapter}. However, the main parts +% of the code are from the original definition of \cs{@chapter}. Therefore it +% has the mandatory and optional arguments of a non-star variant of, i.e., +% \cs{chapter} but an additional first argument. +% \begin{description} +% \item[Note:] \meta{extended optional argument} is named as optional, however +% here it is already mandatory, because it is a delimited argument. +% \end{description} +% \begin{macrocode} +\newcommand*{\scr@@startchapter}{} +\def\scr@@startchapter#1[#2]#3{% + \ExecuteDoHook{heading/branch/nostar/#1}% +% \end{macrocode} +% \changes{v3.10}{2011/08/30}{extended optional argument} +% \changes{v3.27}{2019/07/08}{option \opt{nonumber} added} +% First of all, depending in \opt{headings=optionto\dots} we have different +% defaults for the options. +% \begin{macrocode} + \ifnum \scr@osectarg=\z@ + \@scr@tempswafalse + \else + \scr@istest#2=\@nil + \fi + \@currentusenumbertrue + \if@scr@tempswa + \setkeys{KOMAarg.section}{tocentry={#3},head={#3},reference={#3},#2}% + \else + \ifcase \scr@osectarg\relax + \setkeys{KOMAarg.section}{tocentry={#2},head={#2},reference={#2}}% + \or + \setkeys{KOMAarg.section}{tocentry={#3},head={#2},reference={#3}}% + \or + \setkeys{KOMAarg.section}{tocentry={#2},head={#3},reference={#2}}% + \or + \setkeys{KOMAarg.section}{tocentry={#2},head={#2},reference={#2}}% + \fi + \fi +% \end{macrocode} +% \changes{v2.8e}{2001/07/10}{using \cs{@maybeautodot}} +% \changes{v3.08}{2010/11/01}{using \cs{addchaptertocentry}} +% \changes{v3.18}{2015/05/20}{using \cs{add\meta{name}tocentry}} +% \changes{v3.18}{2015/05/22}{using \meta{name} instead of \cs{@chapapp} +% in \cs{typeout}} +% \changes{v3.28}{2019/11/19}{\cs{ifnumbered} renamed to +% \cs{Ifnumbered}} +% For numbered headings we have to increase the counter and write a process +% information to the \file{log} and the terminal. +% \begin{macrocode} + \Ifnumbered{#1}{% +% \if@mainmatter + \@tempswatrue +% \else\@tempswafalse\fi + }{\@tempswafalse}% + \if@tempswa + \refstepcounter{#1}% + \expandafter\@maybeautodot\csname the#1\endcsname + \typeout{#1 \csname the#1\endcsname.}% + \ifx\@currenttocentry\@empty\else +% \end{macrocode} +% \changes{v3.31}{2020/06/06}{using \cs{\dots tocformat}}% +% \begin{description} +% \item[ToDo]: Move \cs{autodot} to the definition of \cs{\dots tocformat}. +% \end{description} +% \begin{macrocode} + \@ifundefined{#1tocformat}{% + \expandafter\gdef\csname #1tocformat\endcsname + {\csname the#1\endcsname}% + }{}% + \scr@ifundefinedorrelax{add#1tocentry}{% + \addtocentrydefault{#1}% + }{% + \@nameuse{add#1tocentry}% + }{\csname\@ifundefined{#1tocformat}{the#1}{#1tocformat}\endcsname}% + {\@currenttocentry}% + \fi + \else +% \end{macrocode} +% For not numbered headings we still have to process the reset list of the +% counter and write a process information to the \file{log} and the terminal. +% \begin{macrocode} + \expandafter\ifnum\scr@v@is@lt{3.15}\relax\else + \begingroup + \let\@elt\@stpelt + \csname cl@#1\endcsname + \endgroup + \fi + \typeout{#1 without number}% + \ifx\@currenttocentry\@empty\else +% \end{macrocode} +% And before writing a not numbered entry to the table of contents we have to +% execute also the \pkg{hyperref} hook \cs{hy@insteadofrefstepcounter}. +% \begin{description} +% \item[Note:] \pkg*{scrhack} uses the existence of this command to detect a +% \KOMAScript{} class. Shouldn't this be changed using, e.g., +% \cs{KOMAClassName}? +% \end{description} +% \begin{macrocode} + \hy@insteadofrefstepcounter{#1}% + \scr@ifundefinedorrelax{add#1tocentry}{% + \addtocentrydefault{#1}% + }{% + \@nameuse{add#1tocentry}% + }{}{\@currenttocentry}% + \fi + \fi +% \end{macrocode} +% Set the mark for the running head. Here we have to do a one step expansion +% of \cs{@currentheadentry}, because otherwise it would change with every +% \cs{section}, \cs{subsection} \dots +% \begin{macrocode} + \csname #1mark\expandafter\endcsname\expandafter{\@currentheadentry}% +% \end{macrocode} +% \changes{v2.8g}{2001/07/18}{support for \cs{float@addtolists}} +% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by \cs{Iftocfeature}} +% Depending on feature \texttt{chapteratlist} we have to add a vertical space +% to other directories. And for compatibility we also support the deprecated +% \cs{float@addtolists} but not without warning. +% \begin{description} +% \item[ToDo:] Why do we add the gap here but also use \cs{addctontentsline} +% in \cs{addchaptertocentry}? Is this a bug? Should this be standardized? +% \end{description} +% \begin{macrocode} + \ifdim \@chapterlistsgap>\z@ + \doforeachtocfile{% + \Iftocfeature{\@currext}{chapteratlist}{% + \addtocontents{\@currext}{\protect\addvspace{\@chapterlistsgap}}% + }{}% + }% + \@ifundefined{float@addtolists}{}{% + \scr@float@addtolists@warning + \float@addtolists{\protect\addvspace{\@chapterlistsgap}}% + }% + \fi +% \end{macrocode} +% \changes{v3.18}{2015/05/22}{\cs{@makechapterhead} replaced by +% \cs{@make\meta{Name}head}} +% \changes{v3.36}{2022/03/16}{warning about deprecated \cs{@makechapterhead}} +% Setting the heading itself is more or less a call of \cs{@make\meta{command +% name}head}. +% \begin{description} +% \item[ToDo:] Using \cs{scr@makechapterhead}\marg{command name} would be the +% better solution. However in this case, every redefinition of +% \cs{@makechapterhead} would be ignored. So currently we support such +% deprecated redefinition of internal macro \cs{@makechapterhead} for +% \cs{chapter}. But this will be changed in future. +% \end{description} +% \begin{macrocode} + \scr@t@st@nd@w@rn@m@k@ch@pt@rh@@d{#1}% + \if@twocolumn + \if@at@twocolumn + \@nameuse{@make#1head}{#3}% + \else + \@topnewpage[\@nameuse{@make#1head}{#3}]% + \fi + \else + \@nameuse{@make#1head}{#3}% + \fi +% \end{macrocode} +% \changes{v3.18}{2015/05/21}{always using \cs{@afterheading}} +% And finally the end of every outline command. +% \begin{macrocode} + \@afterheading +} +% \end{macrocode} +% \begin{macro}{\scr@t@st@nd@w@rn@m@k@ch@pt@rh@@d} +% \changes{v3.36}{2022/03/16}{added} +% The test and warning used inside \cs{scr@@startchapter}. +% \begin{macrocode} +\expandafter\ifnum\scr@v@is@ge{3.36}% + \newcommand*{\scr@t@st@nd@w@rn@m@k@ch@pt@rh@@d}[1]{% + \Ifstr{#1}{chapter}{% + \begingroup + \def\reserved@a{\scr@makechapterhead{chapter}}% + \ifx\@makechapterhead\reserved@a\else + \ClassWarningNoLine{\KOMAClassName}{% + Redefinition of \string\@makechapterhead\space detected.\MessageBreak + Note: KOMA-Script does use styles for commands like\MessageBreak + \string\chapter. Currently it internally still provides and\MessageBreak + uses \string\@makechapterhead, but a completely different\MessageBreak + definition compared to the standard classes.\MessageBreak + So redefining or using internal \string\@makechapterhead\MessageBreak + by users or package authors may already break\MessageBreak + KOMA-Script and will not work with a coming version,\MessageBreak + that will remove this deprecated code}% + \let\scr@t@st@nd@w@rn@m@k@ch@pt@rh@@d\@gobbble + \fi + \endgroup + }{}% + } +\else + \let\scr@t@st@nd@w@rn@m@k@ch@pt@rh@@d\@gobble +\fi +% \end{macrocode} +% \end{macro}^^A \scr@t@st@nd@w@rn@m@k@ch@pt@rh@@d +% \end{macro}^^A \scr@@startchapter +% +% \begin{macro}{\scr@@startschapter} +% \changes{v3.18}{2015/05/22}{added} +% The macro +% \begin{quote} +% \cs{scr@@startschapter}\marg{chapter command name}\marg{chapter heading} +% \end{quote} +% is now part of the style \texttt{chapter}. However, the main parts +% of the code are from the original definition of \cs{@schapter}. Therefore it +% has the mandatory argument of a star variant of, i.e., \cs{chapter} but an +% additional first argument. +% \begin{macrocode} +\newcommand*{\scr@@startschapter}[2]{% + \ExecuteDoHook{heading/branch/star/#1}% +% \end{macrocode} +% Some users don't learn to use \cs{addchapter} for not numbered parts with +% entry to the table of contents but insist in using +% \cs{addcontentsline}. Despite this should not be used, because at least +% \cs{addchaptertocentry} should be used, we tolerate this by using our +% \pkg{hyperref} hook. +% \begin{description} +% \item[ToDo:] I don't understand why \pkg{hyperref} uses a group here and +% locally sets \cs{@mkboth} to \cs{@gobbletwo}. However, I've copied this. +% \end{description} +% \begin{macrocode} + \begingroup + \let\@mkboth\@gobbletwo + \hy@insteadofrefstepcounter{#1}% + \endgroup +% \end{macrocode} +% Setting the heading itself is more or less a call of \cs{@makes\meta{command +% name}head}. +% \begin{description} +% \item[ToDo:] Using \cs{scr@makeschapterhead}\marg{command name} would be the +% better solution. However in this case, every redefinition of +% \cs{@makeschapterhead} would be ignored. So currently we support such +% deprecated redefinition of internal macro \cs{@makeschapterhead} for +% \cs{chapter}. But this will be changed in future. +% \end{description} +% \begin{macrocode} + \scr@t@st@nd@w@rn@m@ks@ch@pt@rh@@d{#1}% + \if@twocolumn + \if@at@twocolumn + \@nameuse{@makes#1head}{#2}% + \else + \@topnewpage[\@nameuse{@makes#1head}{#2}]% + \fi + \else + \@nameuse{@makes#1head}{#2}% + \fi +% \end{macrocode} +% \changes{v3.18}{2015/05/21}{always using \cs{@afterheading}} +% And finally the end of every outline command. +% \begin{macrocode} + \@afterheading +} +% \end{macrocode} +% \begin{macro}{\scr@t@st@nd@w@rn@m@ks@ch@pt@rh@@d} +% \changes{v3.36}{2022/03/16}{added} +% The test and warning used inside \cs{scr@@startschapter}. +% \begin{macrocode} +\expandafter\ifnum\scr@v@is@ge{3.36}% + \newcommand*{\scr@t@st@nd@w@rn@m@ks@ch@pt@rh@@d}[1]{% + \Ifstr{#1}{chapter}{% + \begingroup + \def\reserved@a{\scr@makeschapterhead{chapter}}% + \ifx\@makeschapterhead\reserved@a\else + \ClassWarningNoLine{\KOMAClassName}{% + Redefinition of \string\@makeschapterhead\space detected.\MessageBreak + Note: KOMA-Script does use styles for commands like\MessageBreak + \string\chapter. Currently it internally still provides and\MessageBreak + uses \string\@makeschapterhead, but a completely different\MessageBreak + definition compared to the standard classes.\MessageBreak + So redefining or using internal \string\@makeschapterhead\MessageBreak + by users or package authors may already break\MessageBreak + KOMA-Script and will not work with a coming version,\MessageBreak + that will remove this deprecated code}% + \let\scr@t@st@nd@w@rn@m@ks@ch@pt@rh@@d\@gobble + \fi + \endgroup + }{}% + } +\else + \let\scr@t@st@nd@w@rn@m@ks@ch@pt@rh@@d\@gobble +\fi +% \end{macrocode} +% \end{macro}^^A \scr@t@st@nd@w@rn@m@ks@ch@pt@rh@@d +% \end{macro}^^A \scr@@startschapter +% +%% \begin{macro}{\@at@twocolumntrue,\@at@twocolumnfalse,\if@at@twocolumn} +% \changes{v2.7b}{2001/01/05}{added} +% \begin{macro}{\scr@topnewpage} +% \changes{v2.7b}{2001/01/05}{added} +% \changes{v2.8q}{2001/11/27}{braces fixed} +% \begin{macro}{\@topnewpage} +% \changes{v2.7b}{2001/01/05}{added} +% \changes{v2.7g}{2001/04/17}{missing \cs{long} added} +% In the code above we use \cs{if@at@twocolumn} to detect, if we already +% inside the optional argument of \cs{twocolumn}. A clean definition of this +% feature would redefine \LaTeX{} command \cs{twocolumn}. Here we use the ugly +% hack to redefine the internal macro \cs{@topnewpage} of the \LaTeX{} kernel +% instead. This macro is used to print the optional argument. So we can add +% switching on and of the boolean switch before and after it. With this, +% packages can simply use chapter commands also inside the optional argument +% of \cs{twocolumn} instead of need to use an internal command like +% \cs{@makechapterhead}. +% \begin{macrocode} +\newif\if@at@twocolumn +\newcommand*\scr@topnewpage{} +\let\scr@topnewpage\@topnewpage +\long\def\@topnewpage[#1]{% + \@at@twocolumntrue\scr@topnewpage[{#1}]\@at@twocolumnfalse +} +% \end{macrocode} +% \end{macro}^^A \@topnewpage +% \end{macro}^^A \scr@topnewpage +% \end{macro}^^A \if@at@twocolumn +% +% \begin{macro}{\scr@makechapterhead} +% \changes{v2.7b}{2001/01/05}{support for chapter preamble} +% \changes{v2.8p}{2001/09/25}{support for different kinds of preambles} +% \changes{v3.15}{2014/12/10}{\cs{nobreak} removed} +% \changes{v3.18}{2015/05/22}{added} +% \begin{macro}{\scr@@makechapterhead} +% \changes{v3.18}{2015/05/22}{added} +% \changes{v2.8q}{2002/04/18}{\cs{raggedsection} also for the prefix} +% \changes{v2.9p}{2003/06/28}{setting \cs{parfillskip} to \cs{fill}} +% \changes{v2.96a}{2006/12/02}{distance after the prefix line only if prefix line} +% \changes{v2.97b}{2007/03/09}{\cs{endgraf} fixed} +% \changes{v3.15}{2014/11/20}{re-implementation} +% \changes{v3.15}{2014/12/09}{\cs{raggedchapter} replaced by \cs{raggedsection}} +% \changes{v3.17}{2015/04/03}{using \cs{usefontofkomafont} for initial font +% changed} +% Macros +% \begin{quote}\raggedright +% \cs{scr@makechapterhead}\marg{chapter command name}\marg{heading}\\ +% \cs{scr@@makechapterhead}\marg{chapter command name}\marg{heading} +% \end{quote} +% are used inside the definition of style \texttt{chapter} and replace +% \cs{@makechapterhead} resp. \cs{@@makechapterhead} there. So they have one +% more argument than \cs{@makechapterhead} of the standard classes. +% \begin{macrocode} +\newcommand*{\scr@makechapterhead}[2]{% + \use@chapter@o@preamble{#1}% + \@nameuse{@@make#1head}{#2}% + \use@preamble{#1@u}% +} +\newcommand*{\scr@@makechapterhead}[2]{% +% \end{macrocode} +% \changes{v3.22}{2016/12/21}{\cs{@afterindentrue} if \opt{beforeskip} is +% positive} +% \changes{v3.26}{2018/09/18}{using \opt{afterindent}} +% Depending on \opt{afterindent} we set \cs{if@afterindent} and set the +% initial vertical skip using \cs{@tempskipa} and \cs{chapterheadstartvskip}. +% \begin{macrocode} + \@tempskipa=\glueexpr \csname scr@#1@beforeskip\endcsname\relax\relax + \csname scr@#1@afterindent\endcsname + {\@afterindenttrue}{\@afterindentfalse}{% + \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\else + \expandafter\ifnum\scr@v@is@ge{3.22}\@afterindenttrue\fi + \fi + }% + \chapterheadstartvskip +% \end{macrocode} +% \changes{v3.19}{2015/08/02}{using \cs{chapterlinesformat} and +% \cs{chapterlineswithprefixformat}} +% \changes{v3.19}{2015/08/02}{using font element \fnt{disposition} instead of +% \cs{sectfont}} +% \changes{v3.19a}{2015/10/03}{missing local definition of \cs{IfUseNumber} +% added} +% \changes{v3.20}{2015/12/23}{setting \cs{parfillskip} to \texttt{\cs{z@} plus +% 1fil}} +% \changes{v3.27}{2019/02/02}{setting of \cs{parindent} and \cs{parfillskip} +% moved} +% \changes{v3.27}{2019/02/02}{\cs{ExecuteDoHook} added} +% \changes{v3.28}{2019/11/19}{\cs{ifnumbered} renamed to +% \cs{Ifnumbered}} +% For the heading itself a group is used. Using group braces instead of +% \cs{begingroup} makes it possible to do a very ugly hack inside a +% redefinition of \cs{chapterheadstartvskip}. Nevertheless, such hacks are not +% recommended. +% \begin{macrocode} + {% + \def\IfUseNumber{\Ifnumbered{#1}}% +% \if@mainmatter\else\let\IfUseNumber\@secondoftwo\fi + \ExecuteDoHook{heading/begingroup/#1}% + \if@chapterprefix + \let\IfUsePrefixLine\@firstoftwo + \else + \let\IfUsePrefixLine\@secondoftwo + \fi + \setlength{\parindent}{\z@}\setlength{\parfillskip}{\z@ plus 1fil}% + \normalfont\usekomafont{disposition}{% + \usekomafont{#1}{% + \settoheight{\@tempskipa}{% + {\usekomafont{#1prefix}{% + \vrule \@width\z@ \@height\csname scr@#1@innerskip\endcsname}}% + }% + \raggedchapter + \IfUseNumber{% + \IfUsePrefixLine{% + \chapterlineswithprefixformat{#1}% + {{\usekomafont{#1prefix}{\csname #1format\endcsname% + \setlength{\@tempskipa}{\csname scr@#1@innerskip\endcsname}% + \chapterheadmidvskip}}}% + {\interlinepenalty \@M#2\@@par}% + }{% + \chapterlinesformat{#1}% + {\csname #1format\endcsname}% + {\interlinepenalty \@M#2\@@par}% + }% + }{% + \IfUsePrefixLine{% + \chapterlineswithprefixformat{#1}% + {}% + {\interlinepenalty \@M#2\@@par}% + }{% + \chapterlinesformat{#1}% + {}% + {\interlinepenalty \@M#2\@@par}% + }% + }% + }% + }% + \ExecuteDoHook{heading/endgroup/#1}% + }% + \nobreak\par\nobreak +% \end{macrocode} +% \changes{v3.26}{2018/09/20}{no absolute value} +% Last but not least the final skip. +% \begin{description} +% \item[Note:] \cs{@afterheading} will be added by \cs{scr@@startchapter}. +% \end{description} +% \begin{macrocode} + \@tempskipa=\glueexpr \csname scr@#1@afterskip\endcsname\relax\relax + \chapterheadendvskip +} +% \end{macrocode} +% \end{macro}^^A \scr@makechapterhead +% \end{macro}^^A \scr@@makechapterhead +% +% \begin{macro}{\scr@makeschapterhead} +% \changes{v3.18}{2015/05/22}{added} +% \begin{macro}{\scr@@makeschapterhead} +% \changes{v2.9p}{2003/06/28}{to \cs{parfillskip} to \cs{fill}} +% \changes{v2.9q}{2004/03/24}{same braces like \cs{@@makechapterhead}} +% \changes{v3.15}{2014/12/09}{\cs{raggedchapter} replaced by +% \cs{raggedsection}} +% \changes{v3.18}{2015/05/22}{added} +% \changes{v3.19}{2015/08/02}{same changes like \cs{scr@@makechapterhead}} +% \changes{v3.20}{2015/12/23}{setting \cs{parfillskip} to \texttt{\cs{z@} plus +% 1fil}} +% \changes{v3.25}{2017/09/07}{\cs{IfUseNumber} fixed} +% \changes{v3.26}{2018/09/20}{no absolute of \opt{afterskip}} +% Macros +% \begin{quote}\raggedright +% \cs{scr@makeschapterhead}\marg{chapter command name}\marg{heading}\\ +% \cs{scr@@makeschapterhead}\marg{chapter command name}\marg{heading} +% \end{quote} +% are used inside the definition of style \texttt{chapter} and replace +% \cs{@makeschapterhead} resp. \cs{@@makeschapterhead} there. So they have one +% more argument than \cs{@makeschapterhead} of the standard classes. +% \begin{macrocode} +\newcommand*{\scr@makeschapterhead}[2]{% + \use@chapter@o@preamble{#1}% + \@nameuse{@@makes#1head}{#2}% + \use@preamble{#1@u}% +} +\newcommand*{\scr@@makeschapterhead}[2]{% +% \end{macrocode} +% \changes{v3.22}{2016/12/21}{\cs{@afterindentrue} if positive +% \opt{beforeskip}} +% \changes{v3.26}{2018/09/18}{supporting \opt{afterindent}} +% This is a simplified version of \cs{scr@@makechapterhead}. +% \begin{macrocode} + \@tempskipa=\glueexpr \csname scr@#1@beforeskip\endcsname\relax\relax + \csname scr@#1@afterindent\endcsname + {\@afterindenttrue}{\@afterindentfalse}{% + \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\else + \expandafter\ifnum\scr@v@is@ge{3.22}\@afterindenttrue\fi + \fi + }% + \chapterheadstartvskip + {% + \let\IfUseNumber\@secondoftwo + \ExecuteDoHook{heading/begingroup/#1}% + \if@chapterprefix + \let\IfUsePrefixLine\@firstoftwo + \else + \let\IfUsePrefixLine\@secondoftwo + \fi + \setlength{\parindent}{\z@}\setlength{\parfillskip}{\z@ plus 1fil}% + \normalfont\usekomafont{disposition}{% + \usekomafont{#1}{% + \raggedchapter + \IfUsePrefixLine{% + \chapterlineswithprefixformat{#1}% + {}% + {\interlinepenalty \@M#2\@@par}% + }{% + \chapterlinesformat{#1}% + {}% + {\interlinepenalty \@M#2\@@par}% + }% + }% + }% + \ExecuteDoHook{heading/endgroup/#1}% + }% + \nobreak\par\nobreak + \@tempskipa=\glueexpr \csname scr@#1@afterskip\endcsname\relax\relax + \chapterheadendvskip +} +% \end{macrocode} +% \end{macro}^^A \scr@@makeschapterhead +% \end{macro}^^A \scr@makeschapterhead +% +% \begin{command}{\chapterlinesformat,\chapterlineswithprefixformat} +% \changes{v3.19}{2015/08/02}{added} +% Commands +% \begin{quote}\raggedright +% \cs{chapterlinesformat}\marg{command name}\marg{number}\marg{text}\\ +% \cs{chapterlineswithprefixformat}\marg{command name}\marg{number}\marg{text} +% \end{quote} +% are used to print a chapter heading either a free standing one or a free +% stranding one with prefix line. \meta{number} is the completely formatted +% prefix line inclusive the vertical distance below. The \meta{text} is the +% text of the heading also formatted and with final \cs{@@par}. But if the +% user used more paragraphs than this is final one, the user is responsible to +% prevent page breaks! +% \begin{macrocode} +\newcommand{\chapterlinesformat}[3]{% + \@hangfrom{#2}{#3}% +} +\newcommand{\chapterlineswithprefixformat}[3]{% + #2#3% +} +% \end{macrocode} +% \end{command}^^A \chapterlinesformat,\chapterlineswithprefixformat +% +% \begin{macro}{\use@chapter@o@preamble} +% \changes{v3.15}{2014/12/08}{distances adapted} +% \changes{v3.15a}{2015/02/02}{avoiding \texttt{overfull \cs{vbox}}} +% \changes{v3.18}{2015/05/20}{using command depending distances and warnings} +% \changes{v3.18}{2015/05/22}{has an argument and prints the preamble of the +% command instead of the style} +% Used by \cs{scr@makechapterhead} and \cs{scr@makeschapterhead} to set the +% preamble above chapter headings. +% \begin{macrocode} +\newcommand*{\use@chapter@o@preamble}[1]{% + {% + \settoheight{\@tempdima}{% + \@tempskipa=\glueexpr \csname scr@#1@beforeskip\endcsname\relax\relax + \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi + \vbox{\chapterheadstartvskip}% + }% + \settodepth{\@tempdimb}{% + \@tempskipa=\glueexpr \csname scr@#1@beforeskip\endcsname\relax\relax + \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi + \vbox{\chapterheadstartvskip}% + }% + \addtolength{\@tempdima}{\@tempdimb}% + \setbox\z@\vbox{% + \use@preamble{#1@o}% + }% + \setlength{\@tempdimb}{\ht0}% + \addtolength{\@tempdimb}{\dp0}% + \vbox to \z@{% + \vskip-\baselineskip + \vbox to \@tempdima{% + \vfill + \box\z@ + }% + \vss + }\vskip-\parskip\vskip-\baselineskip + \ifdim \@tempdimb>\@tempdima% + \addtolength{\@tempdimb}{-\@tempdima}% + \ifdim\@tempdimb<\vfuzz + \ClassInfo{\KOMAClassName}{% + preamble before #1 is \the\@tempdimb\space to high.\MessageBreak + Tolerated without warning because of\MessageBreak + \string\vfuzz\space = \the\vfuzz\space >= \the\@tempdimb + }% + \else + \ClassWarning{\KOMAClassName}{% + preamble before #1 is \the\@tempdimb\space to high.\MessageBreak + To avoid the overfull \string\vbox\space you may + change\MessageBreak + the `beforeskip' value using + \string\RedeclareSectionCommand\MessageBreak + at the preamble of your document.\MessageBreak + You may also change \string\setchapterpreamble\MessageBreak + before the command, which generates the message + about\MessageBreak + an overfull \string\vbox + }% + \fi + \fi% + }% +} +% \end{macrocode} +% \end{macro}^^A \use@chapter@o@preamble +% \end{macro}^^A \scr@startchapter +% +% \begin{command}{\addchaptertocentry} +% \changes{v3.08}{2010/11/01}{added} +% \changes{v3.12}{2013/09/24}{support for \cs{if@chaptertolists}} +% \changes{v3.12}{2013/09/24}{using\cs{addxcontentsline}} +% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by +% \cs{Iftocfeature}} +% We do not use \cs{addcontentsline} directly for the entries to the table of +% contents. Using +% \begin{quote} +% \cs{addchaptertocentry}\marg{number}\marg{text} +% \end{quote} +% allows easy manipulation of such entries and additional actions. If the +% \meta{number} is completely empty no number should be used. Internally the +% generic \cs{addtocentrydefault} it used, which uses \cs{nonumberline} +% instead of \cs{numberline} in this case. See \file{scrkernel-listsof.dtx} +% for more information. +% \begin{description} +% \item[ToDo:] Here we also do the entries to other directories. But we have +% also code for this in \cs{scr@@startchapter} at least for the vertical +% space. Shouldn't we combine both places to one place? And shouldn't this +% be done here only, because of handling of user calls of +% \cs{addchaptertocentry}? +% \end{description} +% \begin{macrocode} +\newcommand*{\addchaptertocentry}[2]{% + \addtocentrydefault{chapter}{#1}{#2}% + \if@chaptertolists + \doforeachtocfile{% + \Iftocfeature{\@currext}{chapteratlist}{% + \addxcontentsline{\@currext}{chapteratlist}[{#1}]{#2}% + }{}% + }% + \@ifundefined{float@addtolists}{}{\scr@float@addtolists@warning}% + \fi +} +% \end{macrocode} +% \end{command}^^A \addchaptertocentry +% +% \begin{macro}{\@chapter,\@makechapterhead,\@@makechapterhead, +% \@schapter,\@makeschapterhead,\@@makeschapterhead} +% \changes{v3.18}{2015/05/22}{indirect by \cs{DeclareSectionCommand}} +% \begin{command}{\setchapterpreamble} +% \changes{v2.7b}{2001/01/05}{added} +% \changes{v3.18}{2015/05/22}{indirect by \cs{DeclareSectionCommand}} +% \begin{macro}{\chapter@u@preamble,\chapter@o@preamble} +% \changes{v2.8p}{2001/09/25}{added} +% \changes{v3.18}{2015/05/22}{indirect by \cs{DeclareSectionCommand}} +% All these commands and macros are not defined explicitly but by using +% \cs{DeclareSectionCommand} later. See also +% \cs{scr@dsc@def@style@chapter@command} and \cs{setchapterpreamble}. +% \end{macro}^^A \chapter@u@preamble,\chapter@o@preamble +% \end{command}^^A \setchapterpreamble +% \end{macro}^^A \@chapter … \@@makeschapterhead +% +% \begin{command}{\addchap} +% \changes{v2.0e}{1994/08/10}{\cs{sectdef} replaced by h \cs{secdef}} +% \changes{v2.0e}{1994/08/10}{\cs{addcontensline} replaced by +% \cs{addcontentsline}} +% \changes{v2.0e}{1994/08/10}{\cs{@makechapterhead} replaced by +% \cs{@makeschapterhead}} +% \changes{v2.0e}{1994/08/10}{\cs{afterheadings} replaced by +% \cs{@afterheading}} +% \changes{v2.1a}{1994/10/29}{argument of \cs{chaptermark} removed from +% \cls*{scrbook}} +% \changes{v2.0e}{1994/10/12}{several \cs{markboth} replaced by +% \cs{sectionmark}} +% \changes{v2.2b}{1995/03/20}{several \cs{chaptermark} replaced by +% \cs{@mkboth}} +% \changes{v2.8d}{2001/07/05}{using \cs{chapterpagestyle}} +% \changes{v3.08}{2010/11/01}{using \cs{addchaptertocentry}} +% \changes{v3.10}{2011/08/30}{extended optional argument} +% \changes{v3.13a}{2014/09/11}{using \cs{SecDef}} +% \changes{v3.18}{2015/05/22}{redefinition} +% \begin{macro}{\@addchap} +% \changes{v3.12}{2013/02/26}{using \cs{addchapmark}} +% \changes{v3.17}{2015/04/20}{expanding \cs{scr@ds@head} in \cs{addchapmark}} +% \changes{v3.18}{2015/05/22}{redefinition} +% \begin{macro}{\@saddchap} +% \changes{v3.12}{2013/02/26}{using \cs{addchapmark}} +% \changes{v3.18}{2015/05/22}{redefinition} +% Since \KOMAScript{} 3.18 using +% \begin{quote} +% \cs{addchap}\oarg{head or ToC entry}\marg{heading} +% \end{quote} +% is very similar to +% |\chapter[nonumber=true,…]{…}| but also works if the extended optional +% argument is not activated. And +% \begin{quote} +% \cs{addchap*}\marg{heading} +% \end{quote} +% is just a \cs{chapter*}\marg{heading} with additional |\addchapmark{}| to +% empty the running head. +% \begin{description} +% \item[Note:] Because of simply manipulating \cnt{secnumdepth} this should +% also work with packages like \pkg{hyperref} as long as they support +% chapters without numbering. +% \end{description} +% \begin{macrocode} +\newcommand\addchap{% + \SecDef\@addchap\@saddchap +}% +\newcommand*{\@addchap}{}% +\long\def\@addchap[#1]#2{% + \edef\reserved@a{% + \unexpanded{% + \chapter[{#1}]{#2}% + \c@secnumdepth= + }\the\c@secnumdepth\relax + }% + \c@secnumdepth=\numexpr \chapternumdepth-1\relax + \reserved@a +} +\newcommand{\@saddchap}[1]{% + \chapter*{#1}% + \addchapmark{}% +}% +% \end{macrocode} +% \changes{v2.7e}{2001/04/16}{braces fixed} +% \changes{v2.7f}{2001/04/17}{braces fixed} +% \changes{v2.8q}{2001/11/17}{using \cs{AfterPackage} to test for +% \pkg{hyperref} version} +% \changes{v3.27a}{2019/11/11}{warning fixed} +% \begin{description} +% \item[ToDo:] Unfortunately \pkg{hyperref} until version 6.71a has a big fat +% bug. It redefines the internal \KOMAScript{} macro \cs{@addchap} without +% testing the definition. From version 6.71b this is done only, if a very +% old \KOMAScript{} is used. However, I would prefer removing all such code +% from \pkg{hyperref}. Currently we warn, if such an old \pkg{hyperref} is +% used. But this will be removed in future. +% \end{description} +% \begin{macrocode} +%<*book> +\AfterPackage{hyperref}{% + \@ifpackagelater{hyperref}{2001/02/19}{}{% + \ClassWarningNoLine{\KOMAClassName}{% + You are using an old version of the hyperref package!\MessageBreak% + This version has a buggy hack in many drivers,\MessageBreak% + causing \string\addchap\space to behave strangely.\MessageBreak% + Please update hyperref to at least version 6.71b% + }% + }% +} +% +% +% \end{macrocode} +% \end{macro}^^A \@saddchap +% \end{macro}^^A \@addchap +% \end{command}^^A \addchap +% +% +% \begin{macro}{\l@chapter} +% \changes{v2.9k}{2003/01/02}{supporting option \opt{tocleft}} +% \changes{v2.96b}{2006/11/30}{prevent page break between chapter entry and +% parent} +% \changes{v2.96b}{2006/11/30}{prevent page break between chapter entry and +% child} +% \changes{v2.97c}{2007/06/21}{\cs{sectfont} replaced by font element +% \fnt{chapterentry}} +% \changes{v2.97c}{2007/06/21}{using font element +% \fnt{chapterentrypagenumber}} +% \changes{v2.97c}{2007/06/21}{re-implemented to support left aligned entries} +% \changes{v3.15}{2014/12/22}{using \cs{chaptertocdepth} and +% \cs{scr@chapter@tocnumwidth}} +% \changes{v3.15}{2014/12/10}{initial skip with \cs{addvspace} instead of +% \cs{vskip}} +% \changes{v3.20}{2015/10/06}{re-implemented using ToC styles} +% \begin{macro}{\scr@chapter@tocindent} +% \changes{v3.15}{2014/12/02}{added} +% \changes{v3.18}{2015/05/20}{indirect definition by \cs{DeclareSectionCommand}} +% \changes{v3.20}{2015/11/06}{really used} +% \end{macro}^^A \scr@chapter@tocindent +% \begin{macro}{\scr@chapter@tocnumwidth} +% \changes{v3.15}{2014/12/02}{added} +% \changes{v3.18}{2015/05/20}{indirect definition by \cs{DeclareSectionCommand}} +% \end{macro} +% \begin{option}{chapterentrydots} +% \changes{v3.15}{2014/12/10}{added} +% Option +% \begin{quote} +% \opt{chapterentrydots=\meta{boolean}} +% \end{quote} +% is the main difference of ToC entry style \texttt{chapter} to ToC entry +% style \texttt{tocline}. It activates the dots between the entry text and the +% page number. +% \begin{description} +% \item[ToDo:] This should be moved to \file{scrkernel-tocstyle.dtx}. +% \end{description} +% \begin{macrocode} +%<*option> +\KOMA@ifkey{chapterentrydots}{@chapterentrywithdots} +% +% \end{macrocode} +% \end{option}^^A chapterentrydots +% \begin{command}{\raggedchapterentry} +% \changes{v2.97c}{2007/06/21}{added} +% \changes{v3.20}{2016/02/23}{removed} +% \changes{v3.21}{2016/06/06}{see \file{scrkernel-tocstyle.dtx}, +% style \texttt{tocline}, option \opt{raggedentrytext}} +% The initial setting of option \opt{raggedtext} of chapter ToC entry style +% \texttt{tocline} resp. \texttt{chapter}. +% \begin{description} +% \item[ToDo:] Do we really need this definition? Every definition but +% \cs{raggedright} results in justified text. So not defining it would be +% almost the same. It just would not reserve the macro. But this could be +% done in \file{scrkernel-tocstyle.dtx}. +% \end{description} +% \begin{macrocode} +%<*body> +\newcommand*{\raggedchapterentry}{} +% \end{macrocode} +% \end{command}^^A \raggedchapterentry +% \end{macro}^^A \l@chapter +% +% \begin{macro}{\l@chapteratlist} +% \changes{v2.96a}{2006/12/03}{added} +% This is used for chapter entries to other directories by the table of +% contents. By default it uses \cs{l@chapter}. But users can redefine it +% using, i.e., \cs{DeclareTOCStyleEntry}. However in this case they have to +% setup all the attributes/options on their own. +% \begin{macrocode} +\newcommand*{\l@chapteratlist}{\l@chapter} +% \end{macrocode} +% \end{macro}^^A \l@chapteratlist +% +% \begin{counter}{chapter} +% \begin{command}{\thechapter} +% \begin{command}{\chapterformat} +% \changes{v2.3c}{1995/08/06}{auto dot feature} +% \changes{v2.7}{2000/01/03}{white space replaced by \cs{enskip}} +% \changes{v2.8}{2001/06/15}{\cs{chapappifprefix} added} +% \changes{v2.8o}{2001/09/19}{\cs{chapappifprefix} replaced by +% \cs{chapappifchapterprefix}} +% \changes{v2.96a}{2006/12/02}{\cs{mbox} added} +% \changes{v3.17}{2015/03/08}{\cs{enskip} not in prefix line mode} +% \begin{command}{\chaptermarkformat} +% \changes{v2.3a}{1995/07/08}{space after chapter number increased} +% \changes{v2.3c}{1995/08/06}{auto dot feature} +% \changes{v2.8}{2001/06/15}{\cs{chapappifprefix} added} +% \changes{v2.8o}{2001/09/19}{\cs{chapappifprefix} replaced by +% \cs{chapappifchapterprefix}} +% \changes{v3.03a}{2009/04/03}{tilde replaced by \cs{nobreakspace} for better +% \pkg{babel-spanish} support} +% The counter would also be defined by \cs{DeclareSectionCommand}. But because +% of handling \cs{frontmatter} and \cs{backmatter} and prefix lines we cannot +% use the default definition of the formatting. So we define it already before +% calling \cs{DeclareSectionCommand} for \cs{chapter}. +% \begin{macrocode} +\newcounter{chapter} +\renewcommand*{\thechapter}{\@arabic\c@chapter} +\newcommand*{\chapterformat}{% + \mbox{\chapappifchapterprefix{\nobreakspace}\thechapter\autodot + \IfUsePrefixLine{}{\enskip}}% +} +\newcommand*\chaptermarkformat{\chapappifchapterprefix{\ }% + \thechapter\autodot\enskip} +% \end{macrocode} +% \end{command}^^A \chaptermarkformat +% \end{command}^^A \chapterformat +% \end{command}^^A \thechapter +% \end{counter}^^A chapter +% +% +% \begin{command}{\chaptername} +% \changes{v3.36}{2022/03/15}{explicit definition for English languages} +% The name of a chapter, e.g., used for the prefix line and maybe for the ToC +% entry. +% \begin{macrocode} +\newcommand*\chaptername{Chapter} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\chaptername{Chapter} +% \end{macrocode} +% \end{command}^^A \chaptername +% +% +% \begin{command}{\appendixname} +% \changes{v3.36}{2022/03/15}{explicit definition for English languages} +% The same for appendix chapters. +% \begin{macrocode} +\newcommand*\appendixname{Appendix} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\appendixname{Appendix} +% \end{macrocode} +% \end{command}^^A \appendixname +% +% +% \begin{command}{\chapappifprefix} +% \changes{v2.8}{2001/06/15}{added} +% \changes{v2.8o}{2001/09/19}{deprecated} +% \changes{v3.36}{2022/03/18}{removed} +% \begin{description} +% \item[Note:] Command \cs{chapappifprefix} has been removed in \KOMAScript{} +% v3.36, because it is deprecated from \KOMAScript{} v2.8o and there never has +% been a compatibility switch for versions before \KOMAScript{} v2.9. +% \end{description} +% \end{command}^^A \chapappifprefix +% +% +% \begin{command}{\chapappifchapterprefix} +% \changes{v2.8o}{2001/09/19}{added} +% \changes{v3.18}{2015/06/09}{using \cs{IfChapterUsePrefixLine}} +% \begin{command}{\IfChapterUsesPrefixLine} +% \changes{v3.18}{2015/06/09}{added} +% \begin{command}{\chapapp} +% \changes{v2.8}{2001/06/15}{added} +% \begin{macro}{\@chapapp} +% The \LaTeX{} standard classes provide an internal macro \cs{@chapapp} that +% is either \cs{chaptername} or \cs{appendixname} depending on whether we are +% inside or outside the appendix. For compatibility with lots of packages +% \KOMAScript{} does provide this too. But for the user level this is +% cumbersome. So \KOMAScript{} does also provide a \emph{read only specified} +% user command \cs{chapapp}. \KOMAScript{} itself uses \cs{chapapp} inside +% \begin{quote} +% \cs{chapappifchapterprefix}\marg{then string} +% \end{quote} +% that outputs \cs{then string} prefixed by \cs{chapapp} only, if +% \opt{chapterprefix} (resp. \opt{headings=twolinechapter}) has been activated +% and therefore a chapter prefix line has to be used. A more general version +% \cs{chapterifchapterprefix} is +% \begin{quote} +% \cs{IfChapterUsesPrefixLine}\marg{then code}\marg{else code} +% \end{quote} +% that executes \cs{then code} if a chapter prefix line has to be used and +% \cs{else code} otherwise (both without extra prefix). +% \begin{macrocode} +\newcommand*{\chapappifchapterprefix}[1]{% + \IfChapterUsesPrefixLine{\chapapp#1}{}% +} +\newcommand*{\IfChapterUsesPrefixLine}{% + \if@chapterprefix\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi +} +\newcommand*{\chapapp}{\@chapapp} +\newcommand*\@chapapp{\chaptername} +% \end{macrocode} +% \end{macro}^^A \@chapapp +% \end{command}^^A \chapapp +% \end{command}^^A \IfChapterUsePrefixLine +% \end{command}^^A \chapappifchapterprefix +% +% +% \begin{command}{\chaptermark} +% Before selecting a page style with automatic running head, \cs{chapter} +% should simply not change the left or right mark. +% \begin{description} +% \item[ToDo:] Do we really need this or would the later +% \cs{DeclareSectionCommand} be enough to do the initial definition? +% \end{description} +% \begin{macrocode} +\newcommand*\chaptermark[1]{} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\addchapmark} +% \changes{v3.12}{2013/03/26}{added} +% \cs{addchap} and marks for running heads are a little bit more +% complicated. Currently we are using a local redefinition of +% \cs{if@mainmatter} and setting of \cnt{secnumdept} to switch of numbering +% and then using \cs{chaptermark}. So the \cs{chaptermark} definition should +% always respect at least one of these settings. +% \begin{description} +% \item[Note:] The ToDo note at \cs{chaptermark} is not relevant for this +% definition. +% \end{description} +% \begin{macrocode} +\newcommand*\addchapmark[1]{% + \begingroup + \expandafter\let\csname if@mainmatter\expandafter\endcsname + \csname iffalse\endcsname + \c@secnumdepth=\numexpr \chapternumdepth-1\relax + \chaptermark{#1}% + \endgroup +} +% \end{macrocode} +% \end{command}^^A \addchapmark +% +% +% \begin{command}{\raggedchapter} +% \changes{v3.15}{2014/12/09}{added} +% Style \texttt{chapter} does not use \cs{raggedsection} but +% \cs{raggedchapter}. However, the initial value is \cs{raggedsection}, so a +% change of \cs{raggedsection} would also change the initial behave of +% \cs{raggedchapter}. Nevertheless the alignment of chapters in independent +% from the alignment of sections, if wanted. +% \begin{macrocode} +\newcommand*{\raggedchapter}{\raggedsection} +% \end{macrocode} +% \end{command} +% +% +% \begin{fontelement}{chapterentry} +% \changes{v2.97c}{2007/06/21}{added} +% \changes{v3.06}{2010/06/09}{font element \fnt{sectioning} replaced by +% \fnt{disposition}} +% \cs{chapter} entries to the table of contents initially using +% \fnt{disposition}, the basic font of all outlines. +% \begin{macrocode} +\newkomafont{chapterentry}{\usekomafont{disposition}} +% \end{macrocode} +% \end{fontelement} +% +% \begin{fontelement}{chapterentrypagenumber} +% \changes{v2.97c}{2007/06/21}{added} +% The page number of \cs{chapter} entries to the table of contents is +% initially the same as the entry at whole. +% \begin{macrocode} +\newkomafont{chapterentrypagenumber}{} +% \end{macrocode} +% \end{fontelement} +% +% \begin{fontelement}{chapterentrydots} +% \changes{v3.15}{2014/12/10}{added} +% \changes{v3.27}{2019/10/28}{\cs{normalfont} removed} +% If the optional dots for \cs{chapter} entries to the table of contents are +% used, we can change the font of the dots also. It is used for the +% \texttt{linefill} of \pkg*{tocbasic} ToC entry style \texttt{chapter}, that +% uses ToC entry style \texttt{tocline} where the line filler is always +% prefixed by \cs{normalfont}\cs{normalsize}. So the setting is relative to +% this. The color is relative to the color of \fnt{chapterentry}. +% \begin{macrocode} +\newkomafont{chapterentrydots}{} +% +% +% \end{macrocode} +% \end{fontelement} +% +% +% \subsection{Section, subsections and more} +% +% The outline levels of sections, subsections, subsubsection, paragraphs and +% subparagraphs are all very similar. There are only some special treatments +% of sections with \cls*{scrartcl}, because there \cs{section} is a high-level +% command. +% +% \begin{fontelement}{section,subsection,subsubsection, +% paragraph,subparagraph} +% \changes{v2.8o}{2001/09/14}{added} +% Definition of the font elements used by \cs{section}, \cs{subsection}, +% \cs{subsubsection}, \cs{paragraph} and \cs{subparagraph}. The settings are +% done by option \texttt{headings} later. Everything is prepared before this +% option is used the first time. The definition of the font element is done +% manually to stay compatible with old \KOMAScript{} versions using another +% internal macro than the default of \cs{newkomafont}. +% \begin{macrocode} +%<*prepare> +\newcommand*{\size@section}{} +\newcommand*{\scr@fnt@section}{\size@section} +\newcommand*{\size@subsection}{} +\newcommand*{\scr@fnt@subsection}{\size@subsection} +\newcommand*{\size@subsubsection}{} +\newcommand*{\scr@fnt@subsubsection}{\size@subsubsection} +\newcommand*{\size@paragraph}{} +\newcommand*{\scr@fnt@paragraph}{\size@paragraph} +\newcommand*{\size@subparagraph}{} +\newcommand*{\scr@fnt@subparagraph}{\size@subparagraph} +% +% \end{macrocode} +% \end{fontelement}^^A section … subparagraph +% +% +% \begin{macro}{\l@section} +% \changes{v2.9k}{2003/01/02}{supporting option \opt{tocleft}} +% \changes{v2.96b}{2006/11/30}{preventing page break between section entry and +% parent} +% \changes{v2.96b}{2006/11/30}{preventing page break between section entry and +% child} +% \changes{v2.97c}{2007/06/21}{\cs{sectfont} replaced by font element +% \fnt{sectionentry}} +% \changes{v2.97c}{2007/06/21}{using font element +% \fnt{sectionentrypagenumber}} +% \changes{v2.97c}{2007/06/21}{re-implemented to support left aligned entries} +% \changes{v3.15}{2014/11/24}{using \cs{sectiontocdepth}, +% \cs{scr@section@tocindent} and \cs{scr@section@tocnumwidth}} +% \changes{v3.20}{2015/10/06}{re-implemented using ToC styles} +% \begin{option}{sectionentrydots} +% \changes{v3.15}{2014/12/10}{added} +% With \cls*{scrartcl} option +% \begin{quote} +% \opt{sectionentrydots=\meta{boolean}} +% \end{quote} +% is the main difference of ToC entry style \texttt{section} to ToC entry +% style \texttt{tocline}. It activates the dots between the entry text and the +% page number. +% \begin{description} +% \item[ToDo:] This should be moved to \file{scrkernel-tocstyle.dtx}. +% \end{description} +% \begin{macrocode} +%<*article> +%<*option> +\KOMA@ifkey{sectionentrydots}{@sectionentrywithdots} +% +% \end{macrocode} +% \end{option}^^A sectionentrydots +% \begin{command}{\raggedsectionentry} +% \changes{v2.97c}{2007/06/21}{added} +% \changes{v3.20}{2016/02/23}{removed} +% The initial setting of option \opt{raggedtext} of section ToC entry style +% \texttt{tocline} resp. \texttt{section}. +% \begin{description} +% \item[ToDo:] Do we really need this definition? Every definition but +% \cs{raggedright} results in justified text. So not defining it would be +% almost the same. It just would not reserve the macro. But this could be +% done in \file{scrkernel-tocstyle.dtx}. +% \end{description} +% \begin{macrocode} +%<*body> +\newcommand*{\raggedsectionentry}{} +% +%
+% \end{macrocode} +% \end{command}^^A \raggedsectionentry +% \end{macro}^^A \l@section +% +% +% \begin{command}{\addsec} +% \changes{v2.0e}{1994/10/12}{several \cs{markboth} replaced by +% \cs{sectionmark}} +% \changes{v2.2b}{1995/03/20}{\cs{sectionmark} replaced by \cs{@mkboth}} +% \changes{v2.3h}{1995/01/21}{also available with \cls*{scrbook} and +% \cls*{scrreprt}} +% \changes{v2.4g}{1996/11/04}{\cs{section*} moved because of page breaks in +% the table of contents} +% \changes{v2.5d}{1998/01/03}{\cs{@mkboth} replaced by conditional +% \cs{markright}} +% \changes{v2.7a}{2001/01/04}{supporting \pkg{hyperref}} +% \changes{v3.13a}{2014/09/11}{using \cs{SecDef}} +% \begin{macro}{\@addsec} +% \changes{v3.10}{2011/08/30}{using \cs{addsectiontocentry}} +% \changes{v3.10}{2011/08/30}{extended optional argument} +% \changes{v3.12}{2013/02/26}{using \cs{addsecmark}} +% \changes{v3.18}{2015/05/22}{redefinition} +% \begin{macro}{\@saddsec} +% \changes{v3.12}{2013/02/26}{using \cs{addsecmark}} +% \changes{v3.17}{2015/04/20}{expanding \cs{scr@ds@head} in \cs{addsecmark}} +% Since \KOMAScript{} 3.18 using +% \begin{quote} +% \cs{addsec}\oarg{head or ToC entry}\marg{heading} +% \end{quote} +% is very similar to +% |\section[nonumber=true,…]{…}| but also works if the extended optional +% argument is not activated. And +% \begin{quote} +% \cs{addsec*}\marg{heading} +% \end{quote} +% is just a \cs{section*}\marg{heading} with additional |\addsecmark{}| to +% empty the running head. +% \begin{description} +% \item[Note:] Because of simply manipulating \cnt{secnumdepth} this should +% also work with packages like \pkg{hyperref} as long as they support +% sections without numbering. +% \end{description} +% \begin{macrocode} +%<*body> +\newcommand\addsec{\SecDef\@addsec\@saddsec} +\newcommand*{\@addsec}{} +\def\@addsec[#1]#2{% + \edef\reserved@a{% + \unexpanded{% + \section[{#1}]{#2}% + \c@secnumdepth= + }\the\c@secnumdepth\relax + }% + \c@secnumdepth=\numexpr \sectionnumdepth-1\relax + \reserved@a +} +\newcommand*{\@saddsec}[1]{% + \section*{#1}\addsecmark{}% +} +% \end{macrocode} +% \end{macro}^^A \@saddsec +% \end{macro}^^A \@addsec +% \end{command}^^A \addsec +% +% +% \begin{command}{\minisec} +% \changes{v2.8q}{2002/02/28}{\cs{nobreak} after \cs{sectfont} added} +% \changes{v2.9o}{2003/01/31}{\cs{nobreak} after group end} +% \changes{v2.96a}{2006/11/30}{initial value of \cs{parfillskip} depending on +% \opt{version}} +% \changes{v2.96a}{2006/12/03}{not needed \cs{nobreak} removed} +% \changes{v3.13a}{2014/08/07}{handling of distances of immediate following +% headings like \cs{@startsection}} +% \changes{v3.26}{2018/05/14}{missing \cs{interlinepenalty}\cs{@M} added} +% \begin{fontelement}{minisec} +% \changes{v2.8o}{2001/09/14}{using font element \fnt{minisec}} +% \changes{v3.21}{2016/06/12}{missing \cs{nobreak} added} +% \cs{minisec} is a very special additional outline of \KOMAScript. It is +% always free standing but without numbering. Something like +% \cs{sectionlinesformat} is not supported currently. Also entries to the +% table of contents or marks for an automatic running head are not +% supported. However a dedicated font element is provided. +% \begin{macrocode} +\newkomafont{minisec}{} +\newcommand\minisec[1]{% + \expandafter\ifnum\scr@v@is@lt{3.13a}\relax + \@afterindentfalse \vskip 1.5ex + \else + \if@noskipsec \leavevmode \fi + \par + \@afterindentfalse + \if@nobreak + \everypar{}% + \else + \addpenalty\@secpenalty\addvspace{1.5ex}% + \fi + \fi + {\parindent \z@ + \expandafter\ifnum\scr@v@is@gt{2.96}\relax + \setlength{\parfillskip}{\z@ plus 1fil}\fi + \raggedsection\normalfont\sectfont\nobreak + \usekomafont{minisec}{\nobreak\interlinepenalty \@M #1\par\nobreak}% + }\nobreak + \@afterheading +} +% \end{macrocode} +% \end{fontelement}^^A minisec +% \end{command}^^A \minisec +% +% +% \begin{command}{\addsectiontocentry,\addsubsectiontocentry, +% \addsubsubsectiontocentry, +% \addparagraphtocentry,\addsubparagraphtocentry} +% \changes{v3.10}{2011/08/30}{added} +% We do not use \cs{addcontentsline} directly for the entries to the table of +% contents. Using +% \begin{quote}\raggedright +% \cs{addsectiontocentry}\marg{number}\marg{text}\\ +% \cs{addsubsectiontocentry}\marg{number}\marg{text}\\ +% \cs{addsubsubsectiontocentry}\marg{number}\marg{text}\\ +% \cs{addparagraphtocentry}\marg{number}\marg{text}\\ +% \cs{addsubparagraphtocentry}\marg{number}\marg{text}\\ +% \end{quote} +% allows easy manipulation of such entries and additional actions. If the +% \meta{number} is completely empty no number should be used. Internally the +% generic \cs{addtocentrydefault} it used, which uses \cs{nonumberline} +% instead of \cs{numberline} in this case. See \file{scrkernel-listsof.dtx} +% for more information. +% \begin{description} +% \item[ToDo:] Should this be moved to \file{scrkernel-listsof.dtx} or even to +% \file{scrkernel-tocstyle.dtx}? +% \item[ToDo:] Are these really needed or would the implicit definition by the +% later \cs{DeclareSectionCommand} be enough as it is already used for +% \cs{addsubsubsectiontocentry}? +% \end{description} +% \begin{macrocode} +\newcommand*{\addsectiontocentry}[2]{% + \addtocentrydefault{section}{#1}{#2}% +} +\newcommand*{\addsubsectiontocentry}[2]{% + \addtocentrydefault{subsection}{#1}{#2}% +} +\newcommand*{\addparagraphtocentry}[2]{% + \addtocentrydefault{paragraph}{#1}{#2}% +} +\newcommand*{\addsubparagraphtocentry}[2]{% + \addtocentrydefault{subparagraph}{#1}{#2}% +} +% \end{macrocode} +% \end{command} +% +% +% \begin{counter}{section} +% \begin{command}{\thesection} +% \changes{v2.97e}{2007/11/23}{chapter number prefix only in main matter} +% \changes{v3.03b}{2009/06/09}{\cs{relax} replaced by white space for better +% support of \pkg{hyperref}} +% \changes{v3.27}{2019/06/26}{using \cs{scr@v@is@gt}} +% \begin{command}{\sectionmarkformat} +% \changes{v2.3a}{1995/07/08}{space after number increased} +% \changes{v2.3c}{1995/08/06}{auto dot feature} +% \begin{counter}{subsection} +% \begin{command}{\thesubsection} +% \begin{command}{\subsectionmarkformat} +% \changes{v2.3a}{1995/07/08}{space after number increased} +% \changes{v2.3c}{1995/08/06}{auto dot feature} +% \begin{counter}{subsubsection} +% \begin{command}{\thesubsubsection} +% \begin{counter}{paragraph} +% \begin{command}{\theparagraph} +% \begin{counter}{subparagraph} +% \begin{command}{\thesubparagraph} +% The counter would also be defined by \cs{DeclareSectionCommand}. But because +% of handling \cs{frontmatter} and \cs{backmatter} and prefix lines we cannot +% use the default definition of the formatting of \cnt{section}. So we define +% it already before calling \cs{DeclareSectionCommand} for \cs{section}. +% \begin{description} +% \item[ToDo:] Do we really need the explicit definition of \cnt{subsection}, +% \cnt{subsubsection}, \cnt{paragraph}, and \cnt{subparagraph} of would the +% implicit definition by \cs{DeclareSectionCommand} be enough for these. +% \end{description} +% \begin{macrocode} +%<*book|report> +\newcounter{section}[chapter] +\renewcommand*\thesection{% +%<*book> + \expandafter\ifnum\scr@v@is@gt{2.97d}% + \if@mainmatter\thechapter.\fi + \else +% + \thechapter.% +% \fi + \@arabic\c@section +} +%
+%<*article> +\newcounter{section} +\renewcommand*{\thesection}{\@arabic\c@section} +%
+\newcommand*\sectionmarkformat{\thesection\autodot\enskip} +\newcounter{subsection}[section] +\renewcommand*{\thesubsection}{\thesection.\@arabic\c@subsection} +%<*article> +\newcommand*\subsectionmarkformat{\thesubsection\autodot\enskip} +%
+\newcounter{subsubsection}[subsection] +\renewcommand*{\thesubsubsection}{% + \thesubsection.\@arabic\c@subsubsection +} +\newcounter{paragraph}[subsubsection] +\renewcommand*{\theparagraph}{\thesubsubsection.\@arabic\c@paragraph} +\newcounter{subparagraph}[paragraph] +\renewcommand*{\thesubparagraph}{% + \theparagraph.\@arabic\c@subparagraph +} +% \end{macrocode} +% \begin{macro}{\@seccntformat} +% \changes{v2.3c}{1995/08/06}{CJK support extended} +% \changes{v2.9p}{2004/01/07}{\cs{protect} added} +% \changes{v2.97}{2007/01/24}{workaround for the ugly \cs{protect}} +% \changes{v3.17}{2015/02/23}{using \cs{\dots format} if exists} +% \changes{v3.17}{2015/03/31}{using \cs{protect} for \cs{\dots format}} +% \begin{command}{\othersectionlevelsformat} +% \changes{v2.7}{2000/01/03}{added} +% \changes{v2.7}{2000/01/03}{\cs{quad} replaced by \cs{enskip}} +% \changes{v2.7i}{2001/05/17}{\cs{let} replaced by \cs{def}} +% \changes{v2.97}{2007/01/24}{three arguments instead of only one} +% With \KOMAScript~2 \cs{othersectionlevelsformat} has had only one argument, +% the \cs{…format} command of the level. But with there has been expansion +% issues. So we have had to change the definition to +% \begin{quote} +% \cs{othersectionlevelsformat}\marg{level name}\marg{ignore +% command}\marg{the command} +% \end{quote} +% Users who use or redefine \cs{othersectionlevelsformat} should always ignore +% the \meta{ignore command}. It is used to internally handle deprecated +% definitions of \cs{othersectionlevelsformat} with only one +% argument. \meta{level name} is the name of the level command, e.g., +% |subsubsection|. \meta{the command} is the \cs{the…} command corresponding +% with \marg{level name}. See the definition of \cs{@seccntformat} for more +% information about the internal usage of \cs{othersectionlevelsformat}. +% \begin{description} +% \item[ToDo:] Can we somehow change this for \KOMAScript~4 to no longer +% support the second argument (unless a low compatibility level is used)? +% \end{description} +% \begin{macrocode} +\newcommand*{\othersectionlevelsformat}[3]{#3\autodot\enskip} +\renewcommand*{\@seccntformat}[1]{% + \expandafter\ifnum\scr@v@is@lt{3.17}\relax + \protect\othersectionlevelsformat{#1}{% + \expandafter\aftergroup\noexpand\@gobble}{\csname the#1\endcsname}% + \else + \scr@ifundefinedorrelax{#1format}{% + \protect\othersectionlevelsformat{#1}{% + \expandafter\aftergroup\noexpand\@gobble}{\csname the#1\endcsname}% + }{\expandafter\protect\csname #1format\endcsname}% + \fi +} +% \end{macrocode} +% \end{command}^^A \othersectonlevelsformat +% \end{macro}^^A \@seccntformat +% \end{command}^^A \thesubparagraph +% \end{counter}^^A subparagraph +% \end{command}^^A \theparagraph +% \end{counter}^^A paragraph +% \end{command}^^A \thesubsubsection +% \end{counter}^^A subsubsection +% \end{command}^^A \subsectionformat +% \end{command}^^A \thesubsection +% \end{counter}^^A subsection +% \end{command}^^A \sectionformat +% \end{command}^^A \thesection +% \end{counter}^^A section +% +% +% \begin{command}{\addsecmark} +% \changes{v3.12}{2013/03/26}{added} +% \cs{addsec} and marks for running heads are a little bit +% complicated. Currently we are using a local setting of \cnt{secnumdept} to +% switch of numbering and then using \cs{sectionmark}. So the \cs{sectionmark} +% definition should always respect \cnt{secnumdepth}. +% \begin{macrocode} +\newcommand*\addsecmark[1]{% + \begingroup + \c@secnumdepth=\numexpr \sectionnumdepth-1\relax + \sectionmark{#1}% + \endgroup +} +% \end{macrocode} +% \end{command}^^A \addsecmark +% +% +% \begin{fontelement}{sectionentry} +% \changes{v2.97c}{2007/06/21}{added} +% \changes{v3.06}{2010/06/09}{font element \fnt{sectioning} replaced by +% \fnt{disposition}} +% With \cls*{scrartcl} \cs{section} entries to the table of contents initially +% using \fnt{disposition}, the basic font of all outlines. +% \begin{macrocode} +%<*article> +\newkomafont{sectionentry}{\usekomafont{disposition}} +% \end{macrocode} +% \end{fontelement} +% +% \begin{fontelement}{sectionentrypagenumber} +% \changes{v2.97c}{2007/06/21}{added} +% The page number of \cs{section} entries to the table of contents is +% initially the same as the entry at whole with \cls*{scrartcl}. +% \begin{macrocode} +\newkomafont{sectionentrypagenumber}{} +% \end{macrocode} +% \end{fontelement} +% +% \begin{fontelement}{sectionentrydots} +% \changes{v3.15}{2014/12/10}{added} +% \changes{v3.27}{2019/10/28}{\cs{normalfont} removed} +% If the optional dots for \cs{section} entries to the table of contents are +% used, we can change the font of the dots also. It is used for the +% \texttt{linefill} of \pkg*{tocbasic} ToC entry style \texttt{section}, that +% uses ToC entry style \texttt{tocline} where the line filler is always +% prefixed by \cs{normalfont}\cs{normalsize}. So the setting is relative to +% this. The color is relative to the color of \fnt{sectionentry}. +% \begin{macrocode} +\newkomafont{sectionentrydots}{} +%
+% \end{macrocode} +% \end{fontelement} +% +% +% \begin{command}{\partnumdepth,\chapternumdepth, +% \sectionnumdepth,\subsectionnumdepth,\subsubsectionnumdepth, +% \paragraphnumdepth,\subparagraphnumdepth, +% \parttocdepth,\chaptertocdepth +% \sectiontocdepth,\subsectiontocdepth,\subsubsectiontocdepth, +% \paragraphtocdepth,\subparagraphtocdepth} +% \changes{v3.12}{2013/12/16}{added} +% \changes{v3.15}{2014/12/09}{indirect definition by +% \cs{DeclareSectionCommand}} +% The section numbering levels, to be compared with counter +% \cnt{secnumdepth}, and the table of contents entry levels, to be compared +% with counter \cs{tocdepth}, of all outline commands defined by the +% \KOMAScript{} classes. +% \begin{description} +% \item[Note:] These are specified to be \emph{read only}. They are defined by +% \cs{DeclareSectionCommand}. +% \end{description} +% \end{command}^^A \partnumdepth … \subparagraphtocdepth +% +% \begin{command}{\part} +% \changes{v3.18}{2015/05/25}{indirect definition by \cs{DeclareSectionCommand}} +% \changes{v3.26}{2018/06/27}{definition moved behind \cs{section} because of +% bookmark level workaround} +% \begin{command}{\chapter} +% \changes{v2.8d}{2001/07/05}{using \cs{chapterpagestyle}} +% \changes{v3.18}{2015/05/20}{indirect definition by \cs{DeclareSectionCommand}} +% \begin{command}{\section} +% \changes{v2.8p}{2001/09/22}{\cs{sectfont} before \cs{size@section}} +% \changes{v2.8q}{2002/02/28}{\cs{nobreak} after \cs{sectfont} added} +% \changes{v2.96a}{2006/11/30}{initial value of \cs{parfillskip} depending on +% option \opt{version}} +% \changes{v2.96a}{2006/12/03}{not needed \cs{nobreak} removed} +% \changes{v3.13a}{2014/09/11}{using \cs{scr@startsection}} +% \changes{v3.15}{2014/11/24}{indirect definition by \cs{DeclareSectionCommand}} +% \begin{command}{\subsection} +% \changes{v2.8p}{2001/09/22}{\cs{sectfont} before \cs{size@subsection}} +% \changes{v2.8q}{2002/02/28}{\cs{nobreak} after \cs{sectfont} added} +% \changes{v2.96a}{2006/11/30}{initial value of \cs{parfillskip} depending on +% option \opt{version}} +% \changes{v2.96a}{2006/12/03}{not needed \cs{nobreak} removed} +% \changes{v3.13a}{2014/09/11}{using \cs{scr@startsection}} +% \changes{v3.15}{2014/11/24}{indirect definition by \cs{DeclareSectionCommand}} +% \begin{command}{\subsubsection} +% \changes{v2.3d}{1995/08/19}{with \cls*{scrartcl} also numbered and added to +% ToC} +% \changes{v2.8p}{2001/09/22}{\cs{sectfont} added before +% \cs{size@subsubsection}} +% \changes{v2.8q}{2002/02/28}{\cs{nobreak} added after \cs{sectfont}} +% \changes{v2.96a}{2006/11/30}{initial value of \cs{parfillskip} depending on +% option \opt{version}} +% \changes{v2.96a}{2006/12/03}{not needed \cs{nobreak} removed} +% \changes{v3.13a}{2014/09/11}{using \cs{scr@startsection}} +% \changes{v3.15}{2014/11/24}{indirect definition by \cs{DeclareSectionCommand}} +% \begin{command}{\paragraph} +% \changes{v2.8p}{2001/09/22}{\cs{sectfont} added before +% \cs{size@paragraph}} +% \changes{v2.8q}{2002/02/28}{\cs{nobreak} added after \cs{sectfont}} +% \changes{v2.96a}{2006/12/03}{not needed \cs{nobreak} removed} +% \changes{v3.15}{2014/11/24}{indirect definition by \cs{DeclareSectionCommand}} +% \begin{command}{\subparagraph} +% \changes{v2.8p}{2001/09/22}{\cs{sectfont} added before +% \cs{size@subparagraph}} +% \changes{v2.8q}{2002/02/28}{\cs{nobreak} added after \cs{sectfont}} +% \changes{v2.96a}{2006/12/03}{not needed \cs{nobreak} removed} +% \changes{v3.13a}{2014/09/11}{using \cs{scr@startsection}} +% \changes{v3.15}{2014/11/24}{indirect definition by \cs{DeclareSectionCommand}} +% \changes{v3.15}{2014/11/24}{\cs{parindent} replaced by \cs{scr@parindent}} +% Commands \cs{part}, \cs{chapter}, \cs{section}, \cs{subsection}, +% \cs{subsubection}, \cs{paragraph} and \cs{subparagraph} are defined using +% \cs{DeclareSectionCommand}. The definition of \cs{part} must be \emph{after} +% \cs{section} because of the bookmark level workaround (see definition of +% \cs{DelcareSectionCommand}. The declaration of \cs{chapter} uses only those +% settings that do not depend on options, because settings by class options +% must no be overwritten here. So all settings that do depend on class options +% have to be initialized before the options (see the \texttt{prepare} code of +% such options above). For the lower levels this is only the case for the font. +% \begin{macrocode} +%<*book|report> +\DeclareSectionCommand[% + style=chapter,% + level=\z@,% + pagestyle=plain,% + tocstyle=chapter,% + tocindent=\z@,% + tocnumwidth=1.5em% +]{chapter} +%
+\DeclareSectionCommand[% + style=section,% + level=1,% + indent=\z@,% + beforeskip=-3.5ex \@plus -1ex \@minus -.2ex,% + afterskip=2.3ex \@plus.2ex,% + tocstyle=section,% +% tocindentfollows=chapter,% +%
tocindent=0pt,% +% tocindent=1.5em,% +%
tocnumwidth=1.5em% +% tocnumwidth=2.3em% +]{section} +\DeclareSectionCommand[% + style=part,% +%
level=\z@,% +% level=\m@ne,% +% pagestyle=plain,% + tocstyle=part,% + toclevel=\m@ne,% + tocindent=\z@,% + tocnumwidth=2em% +]{part} +\DeclareSectionCommand[% + style=section,% + level=2,% + indent=\z@,% + beforeskip=-3.25ex\@plus -1ex \@minus -.2ex,% + afterskip=1.5ex \@plus .2ex,% +%
tocstyle=subsection,% +% tocstyle=section,% +%
tocindent=1.5em,% +% tocindent=3.8em,% +%
tocnumwidth=2.3em% +% tocnumwidth=3.2em% +]{subsection} +\DeclareSectionCommand[% + style=section,% + level=3,% + indent=\z@,% + beforeskip=-3.25ex\@plus -1ex \@minus -.2ex,% + afterskip=1.5ex \@plus .2ex,% +%
tocstyle=subsection,% +% tocstyle=section,% +%
tocindent=3.8em,% +% tocindent=7.0em,% +%
tocnumwidth=3.2em% +% tocnumwidth=4.1em% +]{subsubsection} +\DeclareSectionCommand[% + style=section,% + level=4,% + indent=\z@,% + beforeskip=3.25ex \@plus1ex \@minus.2ex,% + afterskip=-1em,% +%
tocstyle=subsection,% + tocindentfollows=subsubsection,% +% tocstyle=section,% +%
tocindent=7.0em,% +% tocindent=10em,% +%
tocnumwidth=4.1em% +% tocnumwidth=5em% +]{paragraph} +\DeclareSectionCommand[% + style=section,% + level=5,% + indent=\scr@parindent,% + beforeskip=3.25ex \@plus1ex \@minus .2ex,% + afterskip=-1em,% +%
tocstyle=subsection,% +% tocstyle=section,% +%
tocindent=10em,% +% tocindent=12em,% +%
tocnumwidth=5em% +% tocnumwidth=6em% +]{subparagraph} +\expandafter\ifnum\scr@v@is@lt{3.15}\relax + \let\scr@subparagraph@sectionindent\parindent +\else + \def\scr@subparagraph@sectionindent{\scr@parindent}% +\fi +% +% \end{macrocode} +% \end{command}^^A \subparagraph +% \end{command}^^A \paragraph +% \end{command}^^A \subsubsection +% \end{command}^^A \subsection +% \end{command}^^A \section +% \end{command}^^A \chapter +% \end{command}^^A \part +% +% +% \subsection{Fonts} +% +% The font settings of dedicated elements of the the corresponding section +% levels already have been done. But there are also some elements that do not +% correspond with a single section level. +% +% \begin{fontelement}{disposition} +% \changes{v2.95b}{2006/07/30}{added} +% \begin{fontelement}{sectioning} +% \changes{v2.95b}{2006/07/30}{added} +% \begin{macro}{\sectfont} +% \changes{v2.8c}{2001/06/29}{\cs{normalcolor} added} +% \changes{v3.12}{2013/11/11}{earlier definition to support option +% \opt{headings\quotechar=standardclasses}} +% \changes{v3.20}{2016/01/29}{\cs{sffamily} replaced by \cs{@gr@gsffamily}} +% This element is not only used by all section levels before the dedicated +% element of the single level is used. It is also used by other elements like +% the \fnt{chaptertocentry}. The command \cs{sectfont} instead of the +% \cs{newkomafont} default is used for compatibility only. So it is specified +% as internal. Using it as user command is deprecated! +% \begin{macrocode} +% +%<*(class&!letter)|(package&extend)> +%<*prepare> +\newcommand*{\sectfont}{\normalcolor\@gr@gsffamily\bfseries} +% +% +%<*class&!letter> +%<*body> +\newcommand*{\scr@fnt@disposition}{\sectfont} +\aliaskomafont{sectioning}{disposition} +% +% \end{macrocode} +% \end{macro}^^A \sectfont +% \end{fontelement}^^A sectioning +% \end{fontelement}^^A disposition +% +% +% \begin{option}{headings} +% \changes{v2.3h}{1996/01/20}{Size of \cs{chapter} decreased by one grade +% step} +% \changes{v2.3h}{1996/01/20}{using \cs{chapterheadstartvskip} and +% \cs{chapterheadendvskip}} +% \changes{v2.7c}{2000/01/19}{vertical distance after chapters slightly +% changed and glue added} +% \changes{v2.98c}{2008/03/10}{added} +% \changes{v3.10}{2011/08/30}{extended optional argument} +% \changes{v3.12}{2013/03/05}{using \cs{FamilyKeyState}} +% \changes{v3.12}{2013/08/26}{\cs{KOMA@options} replaced by \cs{KOMAoptions}} +% \changes{v3.12}{2013/11/11}{value \opt{\quotechar=standardclasses} added} +% \changes{v3.15}{2014/11/24}{using \cs{scr@chapter@beforeskip} and +% \cs{scr@chapter@afterskip}} +% \changes{v3.17}{2015/03/09}{using internal value storage} +% \changes{v3.18}{2015/05/20}{values of \cs{scr@chapter@beforeskip} negative} +% Option \opt{headings} is the main switch for the headings of all outlines. +% It provides the following values: +% \begin{macrocode} +%<*option> +\KOMA@key{headings}{% + \KOMA@set@ncmdkey{headings}{@tempa}{% +% \end{macrocode} +% \begin{description} +% \item[\opt{=big}:] use big sized headings. This also changes the distances +% of chapter and redefined \cs{chapterheadstartvskip} and +% \cs{chapterheadendvskip} (\cls*{scrbook} and \cls*{scrreprt} only). +% \end{description} +% \begin{macrocode} + {big}{0},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=normal}:] use medium sized headings. This also changes the +% distances of chapter and redefined \cs{chapterheadstartvskip} and +% \cs{chapterheadendvskip} (\cls*{scrbook} and \cls*{scrreprt} only). +% \end{description} +% \begin{macrocode} + {normal}{1},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=small}:] use small sized headings. This also changes the +% distances of chapter and redefined \cs{chapterheadstartvskip} and +% \cs{chapterheadendvskip} (\cls*{scrbook} and \cls*{scrreprt} only). +% \end{description} +% \begin{macrocode} + {small}{2},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=openany}:] same as \opt{open=any} for \cls*{scrbook} and +% \cls*{scrreprt}. +% \end{description} +% \begin{macrocode} +%<*book|report> + {openany}{3},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=openright}:] same as \opt{open=right} for \cls*{scrbook} and +% \cls*{scrreprt}. +% \end{description} +% \begin{macrocode} + {openright}{4},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=openleft}:] same as \opt{open=left} for \cls*{scrbook} and +% \cls*{scrreprt}. +% \end{description} +% \begin{macrocode} + {openleft}{5},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=twolinechapter}:] use chapter headings with two lines. The first +% line is a kind of prefix line with the number and a prefix text only. The +% second one is the heading text. +% \end{description} +% \begin{macrocode} + {twolinechapter}{6},{chapterprefix}{6},{chapterwithprefix}{6},% + {chapterwithprefixline}{6},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=onelinechapter}:] use chapter headings without the prefix line. +% \end{description} +% \begin{macrocode} + {onelinechapter}{7},{nochapterprefix}{7},{chapterwithoutprefix}{7},% + {chapterwithoutprefixline}{7},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=twolineappendix}:] use chapter headings with two lines in the +% appendix. This overwrites \opt{headings=onelinechapter} for the chapters +% of the appendix. +% \end{description} +% \begin{macrocode} + {twolineappendix}{8},{appendixprefix}{8},{appendixwithprefix}{8},% + {appendixwithprefixline}{8},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=onelineappendix}:] use chapter headings without prefix line in +% the appendix. This overwrites \opt{headings=twolinechapter} for the +% chapters of the appendix. +% \end{description} +% \begin{macrocode} + {onelineappendix}{9},{noappendixprefix}{9},{appendixwithoutprefix}{9},% + {appendixwithoutprefixline}{9},% +% +% \end{macrocode} +% \begin{description} +% \item[\opt{=optiontotocandhead}:] activates the extended option handling of +% all outline commands and uses an unspecified optional argument as default +% of for the running head and the ToC entry. +% \end{description} +% \begin{macrocode} + {optiontotocandhead}{10},{optiontoheadandtoc}{10},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=optiontotoc}:] activates the extended option handling of all +% outline commands and uses an unspecified optional argument as default for +% the ToC entry only. +% \end{description} +% \begin{macrocode} + {optiontotoc}{11},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=optiontohead}:] activated the extended option handling of all +% outline commands and uses an unspecified optional argument as default fot +% the running head. +% \end{description} +% \begin{macrocode} + {optiontohead}{12},% +% \end{macrocode} +% \begin{description} +% \item[\opt{=standardclasses}:] reconfigure headings (at least the fonts) to +% look more like the headings of the standard classes than the defaults of +% \KOMAScript. +% \end{description} +% \begin{macrocode} + {standardclasses}{13}% + }{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \ifcase \@tempa\relax% big + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{big}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{normal}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{small}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{standardclasses}% + \KOMA@kav@add{.\KOMAClassFileName}{headings}{big}% +% \end{macrocode} +% First of all we handle the three size values. +% \begin{description} +% \item[Note:] These are redefining \cs{chapterheadstartvkip} and +% \cs{chapterheadendvskip}. +% \item[Note:] The |+\baselineskip+\parskip| is needed to stay compatible with +% old version of \KOMAScript{} not providing \cs{DeclareSectionCommand}. They +% are regarded inside setting of the preamble to print heading with +% |beforeskip=0pt| at the very beginning of the text area. +% \end{description} +% \begin{macrocode} +%<*book|report> + \renewcommand*{\scr@chapter@beforeskip}{-3.3\baselineskip-\parskip}% + \renewcommand*{\scr@chapter@afterskip}{% + 1.725\baselineskip \@plus .115\baselineskip \@minus .192\baselineskip + }% + \renewcommand*{\scr@chapter@innerskip}{.5\baselineskip}% + \renewcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}}% + \renewcommand*{\chapterheadendvskip}{% + \expandafter\ifnum\scr@v@is@lt{3.15}\vspace\@tempskipa + \else\vskip\@tempskipa\fi + }% + \renewcommand*{\chapterheadmidvskip}{\par\nobreak\vskip\@tempskipa}% +% + \setkomafont{part}{\Huge}% + \setkomafont{partnumber}{\huge}% +% \setkomafont{chapter}{\huge}% +% \setkomafont{chapterprefix}{\size@chapter}% + \setkomafont{section}{\Large}% + \setkomafont{subsection}{\large}% + \setkomafont{subsubsection}{\normalsize}% + \setkomafont{paragraph}{\normalsize}% + \setkomafont{subparagraph}{\normalsize}% + \or % normal + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{big}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{normal}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{small}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{standardclasses}% + \KOMA@kav@add{.\KOMAClassFileName}{headings}{normal}% +%<*book|report> + \renewcommand*{\scr@chapter@beforeskip}{-3\baselineskip-\parskip}% + \renewcommand*{\scr@chapter@afterskip}{% + 1.5\baselineskip \@plus .1\baselineskip \@minus .167\baselineskip + }% + \renewcommand*{\scr@chapter@innerskip}{.5\baselineskip}% + \renewcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}}% + \renewcommand*{\chapterheadendvskip}{% + \expandafter\ifnum\scr@v@is@lt{3.15}\vspace\@tempskipa + \else\vskip\@tempskipa\fi + }% + \renewcommand*{\chapterheadmidvskip}{\par\nobreak\vskip\@tempskipa}% +% + \setkomafont{part}{\huge}% + \setkomafont{partnumber}{\huge}% +%<*book|report> + \setkomafont{chapter}{\LARGE}% + \setkomafont{chapterprefix}{\size@chapter}% + \setkomafont{section}{\Large}% + \setkomafont{subsection}{\large}% +% +%<*article> + \setkomafont{section}{\large}% + \setkomafont{subsection}{\normalsize}% +%
+ \setkomafont{subsubsection}{\normalsize}% + \setkomafont{paragraph}{\normalsize}% + \setkomafont{subparagraph}{\normalsize}% + \or % small + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{big}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{normal}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{small}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{standardclasses}% + \KOMA@kav@add{.\KOMAClassFileName}{headings}{small}% +%<*book|report> + \renewcommand*{\scr@chapter@beforeskip}{-2.8\baselineskip-\parskip}% + \renewcommand*{\scr@chapter@afterskip}{% + 1.35\baselineskip \@plus 0.09\baselineskip \@minus .15\baselineskip + }% + \renewcommand*{\scr@chapter@innerskip}{.5\baselineskip}% + \renewcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}}% + \renewcommand*{\chapterheadendvskip}{% + \expandafter\ifnum\scr@v@is@lt{3.15}\vspace\@tempskipa + \else\vskip\@tempskipa\fi + }% + \renewcommand*{\chapterheadmidvskip}{\par\nobreak\vskip\@tempskipa}% +%
+ \setkomafont{part}{\LARGE}% + \setkomafont{partnumber}{\LARGE}% +%<*book|report> + \setkomafont{chapter}{\Large}% + \setkomafont{chapterprefix}{\size@chapter}% + \setkomafont{section}{\large}% +% +%<*article> + \setkomafont{section}{\normalsize}% +%
+ \setkomafont{subsection}{\normalsize}% + \setkomafont{subsubsection}{\normalsize}% + \setkomafont{paragraph}{\normalsize}% + \setkomafont{subparagraph}{\normalsize}% +% \end{macrocode} +% \cls*{scrbook} and \cls*{scrreprt} also provide settings that are delegated +% to option \opt{open}. +% \begin{macrocode} + \or % openany +%<*book|report> + \KOMAoptions{open=any}% +%
+ \or % openright +%<*book|report> + \KOMAoptions{open=right}% +% + \or % openleft +%<*book|report> + \KOMAoptions{open=left}% +% +% \end{macrocode} +% \cls*{scrbook} and \cls*{scrreprt} also provide settings that are delegated +% to option \opt{chapterprefix} and \opt{appendixprefix}. +% \begin{macrocode} + \or % twolinechapter +%<*book|report> + \KOMAoptions{chapterprefix=true}% +% + \or % onelinechapter +%<*book|report> + \KOMAoptions{chapterprefix=false}% +% + \or % twolineappendix +%<*book|report> + \KOMAoptions{appendixprefix=true}% +% + \or % onelineappendix +%<*book|report> + \KOMAoptions{appendixprefix=false}% +% +% \end{macrocode} +% We have also options to handle the extended optional argument. +% \begin{macrocode} + \or % optiontotocandhead + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontotocandhead}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontotoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontohead}% + \KOMA@kav@add{.\KOMAClassFileName}{headings}{optiontotocandhead}% + \scr@activate@xsection{3}% + \or % optiontotoc + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontotocandhead}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontotoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontohead}% + \KOMA@kav@add{.\KOMAClassFileName}{headings}{optiontotoc}% + \scr@activate@xsection{2}% + \or % optiontohead + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontotocandhead}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontotoc}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{optiontohead}% + \KOMA@kav@add{.\KOMAClassFileName}{headings}{optiontohead}% + \scr@activate@xsection{1}% +% \end{macrocode} +% Last but not least the option to activate the standard class emulation of +% headings. +% \begin{macrocode} + \or % standardclasses + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{big}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{normal}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{small}% + \KOMA@kav@remove{.\KOMAClassFileName}{headings}{standardclasses}% + \KOMA@kav@add{.\KOMAClassFileName}{headings}{standardclasses}% +%<*book|report> + \renewcommand*{\scr@chapter@beforeskip}{-50\p@}% + \renewcommand*{\scr@chapter@afterskip}{40\p@}% + \renewcommand*{\scr@chapter@innerskip}{20\p@}% + \renewcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}}% + \renewcommand*{\chapterheadendvskip}{\vskip\@tempskipa}% + \renewcommand*{\chapterheadmidvskip}{\par\nobreak\vskip\@tempskipa}% + \setkomafont{part}{\Huge}% + \setkomafont{partnumber}{\huge}% + \setkomafont{chapter}{\Huge}% + \setkomafont{chapterprefix}{\huge}% +% +%<*article> + \setkomafont{part}{\huge}% + \setkomafont{partnumber}{\Large}% +%
+ \setkomafont{section}{\Large}% + \setkomafont{subsection}{\large}% + \setkomafont{subsubsection}{\normalsize}% + \setkomafont{paragraph}{\normalsize}% + \setkomafont{subparagraph}{\normalsize}% + \renewcommand*{\sectfont}{\bfseries}% +% \KOMAoptions{open=right,chapterprefix=true}% + \fi + \fi +} +\KOMA@kav@add{.\KOMAClassFileName}{headings}{big} +%\KOMA@kav@add{.\KOMAClassFileName}{headings}{onelinechapter} +% \end{macrocode} +% \end{option}^^A headings +% +% \begin{option}{bigheadings,normalheadings,smallheadings} +% \changes{v2.3h}{1996/01/20}{added} +% \changes{v2.4g}{1996/11/04}{option name fixed} +% \changes{v2.98c}{2008/03/10}{obsolete} +% \changes{v3.01a}{2008/11/20}{deprecated} +% \begin{macro}{\@bigheadings,\@normalheadings,\@smallheadings} +% \changes{v2.98c}{2008/03/10}{removed} +% \end{macro}^^A \@bigheadings … \@smallheadings +% We also have some deprecated options. +% \begin{macrocode} +\KOMA@DeclareDeprecatedOption{bigheadings}{headings=big} +\KOMA@DeclareDeprecatedOption{normalheadings}{headings=normal} +\KOMA@DeclareDeprecatedOption{smallheadings}{headings=small} +% +% \end{macrocode} +% \end{option}^^A smallheading,normalheadings,bigheadings +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrkernel-title.dtx b/macros/latex/contrib/koma-script/scrkernel-title.dtx new file mode 100644 index 0000000000..95f6af22e0 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrkernel-title.dtx @@ -0,0 +1,1003 @@ +% \iffalse meta-comment +% ====================================================================== +% scrkernel-title.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrkernel-title.dtx 3874 2022-06-05 10:38:02Z kohm $ +%
\CloneTOCEntryStyle{subsection}{default} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +% +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: + diff --git a/macros/latex/contrib/koma-script/scrkernel-typearea.dtx b/macros/latex/contrib/koma-script/scrkernel-typearea.dtx new file mode 100644 index 0000000000..382727cdd2 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrkernel-typearea.dtx @@ -0,0 +1,3239 @@ +% \iffalse meta-comment +% ====================================================================== +% scrkernel-typearea.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrkernel-typearea.dtx 3889 2022-06-09 12:11:14Z kohm $ +%%%% (run: identify) +%%%% (run: init) +%%%% (run: options) +%%%% (run: body) +%%%% (run: final) +%\NeedsTeXFormat{LaTeX2e}[1995/06/01] +%<*dtx> +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\begingroup + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2022-06-09 14:11:14 +0200 (Do, 09. Jun 2022) $ + \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} + \filerevision$Revision: 3889 $ + \edef\reserved@a{% + \noexpand\endgroup + \noexpand\ProvidesFile{scrkernel-typearea.dtx}[% + \filedate\space\filerevision\space + KOMA-Script + } +\reserved@a +% +%<*dtx|(package&typearea&identify)> +%\ProvidesPackage{typearea}[% +%!KOMAScriptVersion + package +%<*dtx> + source +% + (type area)] +% +%<*dtx> +\ifx\documentclass\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \generate{\usepreamble\defaultpreamble + \file{typearea.sty}{% + \from{scrkernel-version.dtx}{package,typearea}% + \from{scrkernel-typearea.dtx}{package,typearea,identify}% + \from{scrkernel-basics.dtx}{load}% + \from{scrkernel-compatibility.dtx}{package,typearea,init}% + \from{scrkernel-typearea.dtx}{package,typearea,init}% + \from{scrkernel-compatibility.dtx}{package,typearea,option}% + \from{scrkernel-typearea.dtx}{package,typearea,options}% + \from{scrkernel-compatibility.dtx}{package,typearea,body}% + \from{scrkernel-typearea.dtx}{package,typearea,body}% + \from{scrkernel-typearea.dtx}{package,typearea,final}% + \from{scrlogo.dtx}{logo}% + }% + } + \@@input scrstrop.inc +\else + \let\endbatchfile\relax +\fi +\endbatchfile +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\setcounter{StandardModuleDepth}{2} +\begin{document} +\DocInput{scrkernel-typearea.dtx} +\end{document} +% +% \fi^^A meta-comment +% +% \changes{v2.95}{2002/06/20}{first version after splitting \file{scrclass.dtx}} +% \changes{v3.24}{2017/07/23}{reorganization of code into semantic portions} +% \changes{v3.24}{2017/07/23}{start of English translation} +% \changes{v3.36}{2022/02/11}{switch over from \cls*{scrdoc} to +% \cls*{koma-script-source-doc}} +% \changes{v3.36}{2022/02/11}{whole implementation documentation in English} +% +% \GetFileInfo{scrkernel-typearea.dtx} +% \title{Calculation of the Typeing Area with +% \href{https://komascript.de}{\KOMAScript} Package \pkg*{typearea} +% and Additional Commands for the \href{https://komascript.de}{\KOMAScript} +% Classes} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Revision \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% \filename{} contains macros for the typing area. These result not only in +% the package \pkg*{typearea} but also provide features for the +% \KOMAScript{} classes. +% \end{abstract} +% \tableofcontents +% +% \section{User Manual} +% +% You can find the user documentation of package \pkg*{typearea} and the +% commands implemented here in the \KOMAScript{} manual, either the German +% \file{scrguide} or the English \file{scrguien}. +% +% \MaybeStop{\PrintIndex} +% +% \section{Implementation of Package \pkg*{typearea} and Additional Class +% Features} +% +% +% \subsection{Loading packages} +% +% Package \pkg*{typearea} needs package \pkg*{scrkbase}. But this will +% be loaded by \file{scrkernel-basics.dtx} just after the identify run of this +% file. It does not need other packages. +% +% The \KOMAScript{} classes need package \pkg*{typearea}. This will be +% loaded here as an early body action. Nevertheless, at this state the typing +% area option code for the classes has already been loaded. So before loading +% the almost identical option code of the package, some macros have to be +% reset: +% \begin{macrocode} +%<*class&body> +\let\@BCOR =\relax +\let\@@BCOR =\relax +\let\@DIV =\relax +\let\@@DIV =\relax +\let\@headlines =\relax +\let\@@headlines =\relax +\let\x@paper =\relax +\let\x@@paper =\relax +\let\scr@pti@nerr@r =\relax +% \end{macrocode} +% Now we can load \pkg*{typearea}: +% \changes{v2.95}{2002/06/22}{Use \cs{KOMAScriptVersion} while loading +% \pkg*{typearea}} +% We use \cs{KOMAScriptVersion} to verify the identical versions of +% \KOMAScript{} and the package. See \file{scrkernel-version.dtx} for more +% information about this verification. +% \begin{macrocode} +\RequirePackage{typearea}[\KOMAScriptVersion] +% +% \end{macrocode} +% +% \subsection{Selection of paper size} +% +% Before we can define page margins and a typing area, we have to define the +% paper size. Beside \pkg*{typearea} also \pkg*{scrletter} uses some of +% this code, because it needs the paper size, too. +% +% \begin{command}{\PaperNameToSize} +% \changes{v3.23}{2017/02/22}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}} +% This command sets \cs{paperheight} and \cs{paperwidth} depending on +% the name of a paper size. It currently supports the ISO formats of the +% series A, B, C and D and the American formats letter, legal and +% executive. The command is defined using \cs{providecommand} so a class +% can define it different before loading \pkg*{typearea}. The first +% optional argument is the error class. Error classes will be defined using +% \cs{ProvideUnknownPaperSizeError} later. The second argument is the name +% of the paper size. +% \begin{macrocode} +%<*package&options> +\providecommand*{\PaperNameToSize}[2][warning]{% + \Ifstr{#2}{letter}{% + \setlength\paperheight{11in}% + \setlength\paperwidth {8.5in}% + }{% + \Ifstr{#2}{legal}{% + \setlength\paperheight{14in}% + \setlength\paperwidth {8.5in}% + }{% + \Ifstr{#2}{executive}{% + \setlength\paperheight{10.5in}% + \setlength\paperwidth {7.25in}% + }{% + \Ifstr{#2}{}{% + \ISO@PaperNameToSize[#1]{}{}\@nil + }{% + \edef\reserved@a{\noexpand\ISO@PaperNameToSize[#1]#2 \noexpand\@nil}% + \reserved@a + }% + }% + }% + }% +} +% \end{macrocode} +% \begin{macro}{\ISO@PaperNameToSize} +% \changes{v3.23}{2017/02/22}{new (internal)} +% \changes{v3.28}{2019/11/18}{\cs{ifnumber} umbenannt in \cs{Ifnumber}} +% For ISO paper sizes a sub-macro is used. It has to split the series and the +% root. +% \begin{macrocode} +\scr@ifundefinedorrelax{ISO@PaperNameToSize}{% + \def\ISO@PaperNameToSize[#1]#2#3\@nil{% + \lowercase{\edef\reserved@a{#2}}% + \@tempswafalse + \if \reserved@a a% + \Ifnumber{#3}{% + \setlength{\paperwidth}{841sp}% + \setlength{\paperheight}{1189sp}% + \@tempswatrue + }{}% + \else + \if \reserved@a b% + \Ifnumber{#3}{% + \setlength{\paperwidth}{1000sp}% + \setlength{\paperheight}{1414sp}% + \@tempswatrue + }{}% + \else + \if \reserved@a c% + \Ifnumber{#3}{% + \setlength{\paperwidth}{917sp}% + \setlength{\paperheight}{1297sp}% + \@tempswatrue + }{}% + \else + \if \reserved@a d% + \Ifnumber{#3}{% + \setlength{\paperwidth}{771sp}% + \setlength{\paperheight}{1090sp}% + \@tempswatrue + }{}% + \fi + \fi + \fi + \fi + \if@tempswa + \@tempcnta=#3\relax + \@whilenum\@tempcnta>\z@ + \do{\setlength{\@tempdima}{\paperwidth}% + \setlength{\paperwidth}{.5\paperheight}% + \setlength{\paperheight}{\@tempdima}% + \advance\@tempcnta by\m@ne + }% + \multiply\paperwidth by186468 + \multiply\paperheight by186468 + \else +% \end{macrocode} +% The paper size is not a supported ISO format. If +% \cs{scr@UnknownPaperSize@}\meta{errorclass} is defined, use it to show +% the error. If not, use \cs{scr@UnknownPaperSize@error}. This means, +% \meta{errorclass} \texttt{error} has to be defined. +% \begin{macrocode} + \scr@ifundefinedorrelax{scr@UnknownPaperSize@#1}{% + \scr@UnknownPaperSize@error{#2#3}% + }{% + \@nameuse{scr@UnknownPaperSize@#1}{#2#3}% + }% + \fi + }% +}{} +% \end{macrocode} +% \begin{command}{\ProvideUnknownPaperSizeError} +% \changes{v3.23}{2017/02/22}{added} +% Define a new error class for unknown paper formats. The argument is the new +% error class. Each error class is represented by a command +% \cs{scr@UnknownPaperSize@}\meta{errorclass}. That command also has +% exactly one argument, the unknown paper size. +% \begin{macrocode} +\providecommand*{\ProvideUnknownPaperSizeError}[1]{% + \expandafter\providecommand\expandafter*% + \csname scr@UnknownPaperSize@#1\endcsname[1]% +} +% \end{macrocode} +% \begin{macro}{\scr@UnkownPaperSize@error,\scr@UnkownPaperSize@warning, +% \scr@UnkownPaperSize@info,\scr@UnkownPaperSize@ignore} +% \changes{v3.23}{2017/02/22}{new (internal)} +% Error handling (error classes) for \cs{PaperNameToSize}. +% \begin{macrocode} +\ProvideUnknownPaperSizeError{error}{% + \PackageError{% +% typearea% +% scrletter% + }{Unknown paper size #1}{% + \string\paperwidth\space and \string\paperheight\space stay unchanged, + because of unknown paper size.% + }% +} +%<*typearea> +\ProvideUnknownPaperSizeError{warning}{% + \PackageWarning{% + typearea% + }{% + \string\paperwidth\space and \string\paperheight\space stay + unchanged, because\MessageBreak + of unknown paper size #1% + }% +} +\ProvideUnknownPaperSizeError{info}{% + \PackageInfo{% + typearea + }{% + \string\paperwidth\space and \string\paperheight\space stay + unchanged, because\MessageBreak + of unknown paper size #1% + }% +} +\ProvideUnknownPaperSizeError{ignore}{} +% +% +% \end{macrocode} +% \end{macro}^^A \scr@UnknownPaperSize@error … \scr@UnknownPaperSize@ignore +% \end{command}^^A \ProvideUnknownPaperSizeError +% \end{macro}^^A \ISO@PaperNameToSize +% \end{command}^^A \PaperNameToSize +% +% \begin{option}{a4paper,a5paper,b5paper,letterpaper,legalpaper,executivepaper, +% landscape,portrait} +% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}} +% \changes{v3.01a}{2008/11/21}{the option is standard but not deprecated} +% The paper sizes of the standard classes are a special case. For +% compatibility they are declared explicitly. Note: There is still a pattern +% matching implementation for other paper size options, but the usage of those +% is hardly deprecated. +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@DeclareStandardOption[typearea]{a4paper}{paper=a4} +\KOMA@DeclareStandardOption[typearea]{a5paper}{paper=a5} +\KOMA@DeclareStandardOption[typearea]{b5paper}{paper=b5} +\KOMA@DeclareStandardOption[typearea]{letterpaper}{paper=letter} +\KOMA@DeclareStandardOption[typearea]{legalpaper}{paper=legal} +\KOMA@DeclareStandardOption[typearea]{executivepaper}{paper=executive} +\KOMA@DeclareStandardOption[typearea]{landscape}{paper=landscape} +\KOMA@DeclareStandardOption[typearea]{portrait}{paper=portrait} +% +% \end{macrocode} +% \end{option}^^A a4paper … portrait +% +% \begin{option}{paper} +% \changes{v2.95}{2002/12/03}{added} +% \changes{v3.01b}{2008/12/09}{height and width swapped} +% \changes{v3.02c}{2009/02/12}{new \opt{paper\quotechar=seascape}} +% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}} +% \changes{v3.22}{2016/07/29}{paper orientation depends on format name} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% Normally, the paper size should be set using this option. It provides the +% ISO series A, B, C, D, value pairs +% \opt{(\meta{width},\meta{height})} and the orientations +% \opt{portrait}, \opt{landscape} and \opt{seascape}. +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@key{paper}{% + \Ifstr{#1}{seascape}{% + \@seascapetrue + \expandafter\ifnum\scr@ta@v@is@ge{3.22}\relax + \@landscapetrue + \scr@setpaperorientation + \else + \if@landscape\else\scr@switchpapersizes\@landscapetrue\fi + \fi + \FamilyKeyStateProcessed + \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{landscape}% + \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{portrait}% + \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{seascape}% + \KOMA@kav@add{.typearea.\scr@pkgextension}{paper}{seascape}% + }{% + \Ifstr{#1}{landscape}{% + \@seascapefalse + \expandafter\ifnum\scr@ta@v@is@ge{3.22}\relax + \@landscapetrue + \scr@setpaperorientation + \else + \if@landscape\else\scr@switchpapersizes\@landscapetrue\fi + \fi + \FamilyKeyStateProcessed + \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{landscape}% + \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{portrait}% + \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{seascape}% + \KOMA@kav@add{.typearea.\scr@pkgextension}{paper}{landscape}% + }{% + \Ifstr{#1}{portrait}{% + \expandafter\ifnum\scr@ta@v@is@ge{3.22}\relax + \@landscapefalse + \scr@setpaperorientation + \else + \if@landscape\scr@switchpapersizes\@landscapefalse\fi + \fi + \FamilyKeyStateProcessed + \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{landscape}% + \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{portrait}% + \KOMA@kav@remove{.typearea.\scr@pkgextension}{paper}{seascape}% + \KOMA@kav@add{.typearea.\scr@pkgextension}{paper}{portrait}% + }{% + \Ifstr{#1}{letter}{% + \if@landscape + \setlength\paperheight{8.5in}% + \setlength\paperwidth {11in}% + \else + \setlength\paperheight{11in}% + \setlength\paperwidth {8.5in}% + \fi + \FamilyKeyStateProcessed + \KOMA@kav@removekey{.typearea.\scr@pkgextension}{paper}% + \KOMA@kav@add{.typearea.\scr@pkgextension}{paper}{letter}% + \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{% + \if@seascape seascape\else + \if@landscape landscape\else portrait\fi\fi + }% + }{% + \Ifstr{#1}{legal}{% + \if@landscape + \setlength\paperheight{8.5in}% + \setlength\paperwidth {14in}% + \else + \setlength\paperheight{14in}% + \setlength\paperwidth {8.5in}% + \fi + \FamilyKeyStateProcessed + \KOMA@kav@removekey{.typearea.\scr@pkgextension}{paper}% + \KOMA@kav@add{.typearea.\scr@pkgextension}{paper}{legal}% + \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{% + \if@seascape seascape\else + \if@landscape landscape\else portrait\fi\fi + }% + }{% + \Ifstr{#1}{executive}{% + \if@landscape + \setlength\paperheight{7.25in}% + \setlength\paperwidth {10.5in}% + \else + \setlength\paperheight{10.5in}% + \setlength\paperwidth {7.25in}% + \fi + \FamilyKeyStateProcessed + \KOMA@kav@removekey{.typearea.\scr@pkgextension}{paper}% + \KOMA@kav@add{.typearea.\scr@pkgextension}{paper}{executive}% + \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{% + \if@seascape seascape\else + \if@landscape landscape\else portrait\fi\fi + }% + }{% + \iso@paper{#1}% + \if@tempswa + \FamilyKeyStateProcessed + \KOMA@kav@removekey{.typearea.\scr@pkgextension}{paper}% + \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{#1}% + \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{% + \if@seascape seascape\else + \if@landscape landscape\else portrait\fi\fi + }% + \else + \expandafter\maybe@pair#1::\@nil + \if@tempswa + \FamilyKeyStateProcessed + \KOMA@kav@removekey{.typearea.\scr@pkgextension}{paper}% + \expandafter\ifnum \scr@ta@v@is@lt{3.01b}\relax + \PackageWarningNoLine{typearea}{% + You may have to exchange height and width!\MessageBreak + Until KOMA-Script version 3.01b the semantic\MessageBreak + of option `paper' was `paper=height:width'\MessageBreak + instead of `paper=width:height'.\MessageBreak + I've switched back to that old interpretation\MessageBreak + because of the given compatiblity settings}% + \setlength\paperwidth{\@tempb}% + \setlength\paperheight{\@tempa}% + \else + \setlength\paperwidth{\@tempa}% + \setlength\paperheight{\@tempb}% + \fi + \expandafter\ifnum \scr@ta@v@is@lt{3.22}\relax + \if@landscape + \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{\@tempa:\@tempb}% + \else + \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{\@tempb:\@tempa}% + \fi + \else + \scr@setpaperorientation + \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{% + \the\paperwidth:\the\paperheight}% + \fi + \KOMA@kav@xadd{.typearea.\scr@pkgextension}{paper}{% + \if@seascape seascape\else + \if@landscape landscape\else portrait\fi\fi + }% + \else + \KOMA@unknown@keyval{paper}{#1}{% + `letter', `legal', `executive', `a', `b', + `c', `d',\MessageBreak + `:', `landscape' and `portrait'% + }% + \fi + \fi + }% + }% + }% + }% + }% + }% +} +% \end{macrocode} +% \begin{macro}{\if@seascape,\@seascapetrue,\@seascapefalse} +% \changes{v3.02c}{2009/02/12}{added} +% This switch stores only whether or not the landscape orientation should be +% up-side-down. Currently this makes sense only using \file{dvips}. +% \begin{macrocode} +\newif\if@seascape +% \end{macrocode} +% \end{macro} +% \begin{macro}{\if@landscape,\@landscapetrue,\@landscapefalse} +% This switch stores whether using portrait or landscape orientation. +% \begin{macrocode} +\newif\if@landscape +% \end{macrocode} +% \end{macro} +% \begin{macro}{\maybe@pair} +% \changes{v2.95}{2002/12/03}{added} +% \changes{v2.97e}{2007/11/26}{works really} +% Test whether the following parameter is of kind \texttt{\meta{first +% argument}:\meta{second argument}}. If so \cs{@tempa} will become \meta{first +% argument} and \cs{@tempb} will become \meta{second argument} and +% \cs{if@tempswa} will become \cs{iftrue}. Otherwise \cs{if@tempswa} is +% \cs{iffalse} and \cs{@tempa} and \cs{@tempb} are not specified. +% \begin{macrocode} +\newcommand*{\maybe@pair}{} +\def\maybe@pair#1:#2:#3\@nil{% + \edef\@tempa{#1}\edef\@tempb{#2}% + \ifx\@tempa\@empty\@tempswafalse\else + \ifx\@tempb\@empty\@tempswafalse\else\@tempswatrue\fi + \fi +} +% +% \end{macrocode} +% \end{macro}^^A \maybe@pair +% \end{option}^^A paper +% +% \subsection{Special handling of \pkg*{geometry}} +% +% \begin{option}{usegeometry} +% \changes{v3.17}{2015/02/07}{added} +% \pkg*{typearea} optionally can pass several settings to package +% \pkg{geometry}. The user decides whether or not to use this. +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@ifkey{usegeometry}{@ta@usegeometry} +% +% \end{macrocode} +% \end{option} +% +% +% \subsection{Setting the output paper size} +% +% The document paper format of option \opt{paper} is one thing. It is used +% only for calculation of the dimensions used by \TeX{}. Originally +% \textsc{dvi} does not know something like a paper size. It just contained +% relative movements from the current position starting with the +% origin. Setting up a page size depends on the output driver or back-end. +% +% \begin{option}{pagesize} +% \changes{v2.7g}{2001/04/17}{added} +% \changes{v2.95}{2002/08/27}{new implementation} +% \changes{v3.02c}{2009/02/14}{new \opt{pagesize\quotechar=false}} +% \changes{v3.05a}{2010/03/18}{new \opt{pagesize\quotechar=dvipdfmx}} +% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}} +% \changes{v3.17a}{2015/05/03}{logic redesigned} +% \changes{v3.20}{2015/07/10}{\file{luatex} as a synonym of \file{pdftex}} +% This option is the main element for telling pdf\TeX, \file{dvips} or V\TeX{} +% which paper size to use. It is also used by some deprecated options. Here +% are the values and their meanings: +% \begin{labeling}[~--]{\opt{automedia}} +% \item[\opt{auto}] combination of options \opt{pdftex} and +% \opt{dvips}. +% \item[\opt{automedia}] like \opt{auto} with additional setting of +% \cs{mediawidth} and \cs{mediaheight} if available. +% \item[\opt{dvips}] adds a \file{dvips} \cs{special} to set the paper +% size. This should be done only once in the document preamble. Usage inside +% the document body is not fully supported and will raise a warning. +% \item[\opt{dvipdfmx}] adds a \file{dvipdfmx} \cs{special} to set the +% paper size. +% \item[\opt{false}] switch of the automatic driver page size setting, +% i.e., if there are changes inside the document. +% \item[\opt{pdftex}] set \cs{pdfpagewidth} and \cs{pdfpageheight} if +% available. +% \end{labeling} +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@key{pagesize}[auto]{% + \KOMA@set@ncmdkey{pagesize}{@pagesizelast}{% + {off}{-1},{no}{-1},{false}{-1},% + {auto}{0},{automedia}{1},{dvips}{2},{pdftex}{3},{luatex}{3},{dvipdfmx}{4}% + }{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \ifcase\number\@pagesizelast\relax + \edef\@pagesizelast{auto}% + \if@atdocument + \set@pdftexpagesize + \set@dvipspagesize + \fi + \or + \edef\@pagesizelast{automedia}% + \if@atdocument + \set@pdftexpagesize + \set@vtexpagesize + \set@dvipspagesize + \fi + \or + \edef\@pagesizelast{dvips}% + \if@atdocument + \set@dvipspagesize + \fi + \or + \edef\@pagesizelast{pdftex}% + \if@atdocument + \set@pdftexpagesize + \fi + \or + \edef\@pagesizelast{dvipdfmx}% + \if@atdocument + \set@dvipdfmxpagesize + \fi + \else + \edef\@pagesizelast{false}% + \fi + \KOMA@kav@xreplacevalue{.typearea.\scr@pkgextension}% + {pagesize}{\@pagesizelast}% + \fi +} +% \end{macrocode} +% \begin{macro}{\@pagesizelast} +% This internal macro stores the current value of option \opt{pagesize} and +% is needed to use the correct signalling if option \opt{paper} is used +% inside the document and the initial setup in |\begin{document}|. +% \begin{macrocode} +\newcommand\@pagesizelast{auto} +\AtBeginDocument{% + \KOMAExecuteOptions[.typearea.\scr@pkgextension]{pagesize=\@pagesizelast}% +% \end{macrocode} +% \end{macro}^^A \@pagesizelast +% +% \begin{macro}{\set@pdftexpagesize} +% \changes{v2.95}{2002/08/27}{added} +% \changes{v3.20}{2015/07/10}{if \cs{pdfpage\dots} does not exist +% \cs{page\dots} will be tried (needed for lua\TeX{}~0.80.1)} +% \begin{macro}{\set@dvipspagesize} +% \changes{v2.95}{2002/08/27}{added} +% \changes{v3.02c}{2009/02/13}{respecting \opt{seascape}} +% \changes{v3.02c}{2009/02/14}{can be used inside the document} +% \changes{v3.12}{2012/02/06}{not expanded +% \cs{let}\cs{if@tempswa}\cs{if@dvips} does even work is the later is not +% yet defined} +% \changes{v3.28}{2019/11/18}{\cs{ifnotundefined} renamed into +% \cs{Ifnotundefined}} +% \begin{macro}{\setnot@dvipspagesize} +% \changes{v2.95}{2002/08/27}{added} +% \begin{macro}{\set@dvipdfmxpagesize} +% \changes{v3.05a}{2010/03/18}{added} +% \begin{macro}{\set@vtexpagesize} +% \changes{v2.95}{2002/08/27}{added} +% \changes{v3.28}{2019/11/18}{\cs{ifnotundefined} renamed into +% \cs{Ifnotundefined}} +% \begin{macro}{\scr@updatedvipspagesize} +% \changes{v3.02c}{2009/02/14}{added} +% \changes{v3.12}{2013/05/10}{deactivated, if \cs{XeTeXversion} exists} +% Option \opt{pagesize} needs some internal macros. +% \begin{description} +% \item{Attention:} The definition of these macros may change at usage of +% themselves or at |\begin{document}|. +% \end{description} +% First of all the definition from |\begin{document}|: +% \begin{macrocode} + \expandafter\ifnum\scr@ta@v@is@gt{3.02b}\relax + \renewcommand*{\set@dvipspagesize}{% +% \end{macrocode} +% \changes{v3.12}{2012/11/23}{use paper size update only for DVI and PS} +% \changes{v3.12}{2012/02/06}{not expanded +% \cs{let}\cs{if@tempswa}\cs{if@dvips} does even work if the later is not +% yet defined} +% Test whether unspecified \textsc{dvi} output or specified \textsc{ps} output +% is used. Only in that cases the \textsc{ps} code for paper size updates will +% be used. +% \begin{macrocode} + \begingroup + \@tempswafalse + \scr@ifdvioutput{\@tempswatrue}{% + \Ifnotundefined{if@dvips}{% + \expandafter\let\csname if@tempswa\expandafter\endcsname + \csname if@dvips\endcsname + }{}% + }% + \if@tempswa + \endgroup + \scr@ifundefinedorrelax{AtNextShipout}{% + \scr@ifundefinedorrelax{AtBeginShipoutNext}{% + \begingroup + \protected@edef\reserved@a{\endgroup + \scr@updatedvipspagesize}% + \reserved@a + }{% +% \end{macrocode} +% If \cs{AtBeginShipoutNext} is available (mostly because of loading package +% \pkg{atbegshi}) use it so execute the code at least before other code +% that has been added to \cs{shipout}. Unfortunately this is not reliable. If +% \cs{AtBeginShipout} is used after \cs{set@dvipspagesize} (this means the +% recalculation of the typing area and the margins) but before the current +% page has been shipped out the code of such \cs{AtBeginShipout} will be lost! +% \begin{macrocode} + \begingroup + \protected@edef\reserved@a{\endgroup + \protect\AtBeginShipoutNext{% + \protect\bgroup + \protect\global\protect\setbox\AtBeginShipoutBox + \protect\vbox{% + \scr@updatedvipspagesize + \protect\box\AtBeginShipoutBox + }% + \protect\egroup + }}% + \reserved@a + }% + }{% +% \end{macrocode} +% If \cs{AtNextShipout} is available (mostly because of loading package +% \pkg{everyshi} use it to execute the code at least before other code +% that has been added to \cs{shipout}. Unfortunately this is not reliable. If +% \cs{AtNextShipout} or \cs{EveryShipout} is used after \cs{set@dvipspagesize} +% (this means the recalculation of the typing area and the margins) but before +% the current page has been shipped out the code of such \cs{AtNextShipout} or +% \cs{EveryShipout} will be lost! +% \begin{macrocode} + \begingroup + \protected@edef\reserved@a{\endgroup + \protect\AtNextShipout{% + \protect\bgroup + \protect\global\protect\setbox\protect\@cclv\protect\vbox{% + \scr@updatedvipspagesize + \protect\box\protect\@cclv + }% + \protect\egroup + }}% + \reserved@a + }% + \else +% \end{macrocode} +% In this case (neither \textsc{DVI} nor \textsc{PS} output) we only have to +% finish the group that has been used to keep changes of \cs{if@tempswa} +% local. +% \begin{macrocode} + \endgroup + \fi + }% + \else + \let\set@dvipspagesize=\setnot@dvipspagesize + \fi + \renewcommand*{\set@dvipdfmxpagesize}{% + \scr@ifdvioutput{% + \special{papersize=\the\paperwidth,\the\paperheight}% + }{}% + }% +} +% \end{macrocode} +% And now the definition that is used before |\begin{document}| but executed +% the first time inside |\begin{document}|. +% \changes{v3.21}{2016/05/27}{two missing backslashs added} +% \begin{macrocode} +\newcommand*{\set@pdftexpagesize}{% + \scr@ifundefinedorrelax{pdfpagewidth}{% + \scr@ifundefinedorrelax{pagewidth}{}{\pagewidth=\paperwidth}% + }{\pdfpagewidth=\paperwidth}% + \scr@ifundefinedorrelax{pdfpageheight}{% + \scr@ifundefinedorrelax{pageheight}{}{\pageheight=\paperheight}% + }{\pdfpageheight=\paperheight}% +} +\newcommand*{\set@dvipspagesize}{% + \begingroup + \@tempswafalse + \scr@ifdvioutput{\@tempswatrue}{% + \Ifnotundefined{if@dvips}{% + \expandafter\let\csname if@tempswa\expandafter\endcsname + \csname if@dvips\endcsname + }{}% + }{}% +% \end{macrocode} +% \changes{v3.22}{2016/08/04}{\pkg{preview} workaround} +% If package \pkg{preview} has been loaded with option \opt{tightpage}, +% which can be recognized by a defined macro \cs{pr@nextbb}, and if the +% package is active, we do not add \textsc{dvi} specials, because it would +% disturb Xe\LaTeX. +% \begin{macrocode} + \scr@ifundefinedorrelax{pr@nextbb}{}{% + \expandafter\ifx\csname ifPreview\expandafter\endcsname + \csname iftrue\endcsname + \PackageInfo{typearea}{% + package `preview' with option `tightpage' detected.\MessageBreak + initial page size special deactivated% + }% + \@tempswafalse + \fi + }% + \if@tempswa + \endgroup + \AtBeginDvi{% + \special{papersize=\the\paperwidth,\the\paperheight}% + \if@seascape\special{! TeXDict begin /landplus90{true}store end }\fi + }% + \expandafter\ifnum\scr@ta@v@is@gt{3.02b}\relax + \let\set@dvipspagesize=\@empty + \else + \let\set@dvipspagesize=\setnot@dvipspagesize + \fi + \else + \endgroup + \fi +} +\newcommand*{\setnot@dvipspagesize}{% + \scr@ifdvioutput{% + \PackageWarning{% + typearea% + }{% + With dvi output option `pagesize=auto',\MessageBreak + `pagesize=automedia' or `pagesize=dvips'\MessageBreak + may be used only once at preamble.\MessageBreak + Option ignored% + }% + }{}% +} +\newcommand*{\set@dvipdfmxpagesize}{% + \scr@ifdvioutput{% + \AtBeginDvi{% + \special{papersize=\the\paperwidth,\the\paperheight}% + }% + }{}% +} +\newcommand*{\set@vtexpagesize}{% + \Ifnotundefined{mediawith}{\mediawidth=\paperwidth}{}% + \Ifnotundefined{mediaheight}{\mediaheight=\paperheight}{}% +} +\newcommand*{\scr@updatedvipspagesize}{% + \scr@ifundefinedorrelax{XeTeXversion}{% + \special{ps::\@percentchar\@percentchar + PageBoundingBox: 0 0 \the\numexpr\paperwidth/\dimexpr 1bp\relax\relax + \space \the\numexpr\paperheight/\dimexpr 1bp\relax\relax^^J% + \@percentchar\@percentchar BeginPageSetup^^J% + << /PageSize [\the\numexpr\paperwidth/\dimexpr 1bp\relax\relax\space + \the\numexpr\paperheight/\dimexpr 1bp\relax\relax] + >> setpagedevice^^J%<< + 0 0 bop^^J% + \@percentchar\@percentchar EndPageSetup}% + }{}% +} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{option} +% +% \begin{option}{dvips} +% \changes{v2.7g}{2001/04/17}{added} +% \changes{v2.95}{2002/08/27}{new implementation} +% \changes{v2.98c}{2008/04/09}{replacement changed} +% \changes{v2.98c}{2008/04/09}{info instead of warning} +% \changes{v3.01a}{2008/11/21}{it's a standard option not deprecated} +% This option is a kind of obsolete. It is now implemented using +% \opt{pagesize}. But because this is a standard option using several other +% packages we only show a standard option information instead of a deprecated +% option warning. Note: Usage of \opt{pagesize=automedia} can still result +% in a warning message! +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@DeclareStandardOption[typearea]{dvips}{% + pagesize=automedia% +} +% +% \end{macrocode} +% \end{option} +% +% \begin{option}{pdftex} +% \changes{v2.7g}{2001/04/17}{added} +% \changes{v2.95}{2002/08/27}{new implementation} +% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}} +% \changes{v3.01a}{2008/11/21}{it's a standard option not deprecated} +% This option is a kind of obsolete. It is now implemented using +% \opt{pagesize}. But because this is a standard option using several other +% packages we only show a standard option information instead of a deprecated +% option warning. +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@DeclareStandardOption[typearea]{pdftex}{% + pagesize=pdftex% +} +% +% \end{macrocode} +% \end{option} +% +% \subsection{Influencing left and right margin proportions} +% +% Options like \opt{twoside} or \opt{twocolumn} influence the +% proportions of the left and right margin and indirectly also the top and the +% bottom margin. They are also very important for the document classes. +% +% \begin{option}{oneside} +% \changes{v2.97e}{2007/11/23}{pass option from class to \pkg*{typearea}} +% \changes{v3.01a}{2008/11/21}{it's a standard option not deprecated} +% \begin{option}{twoside} +% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}} +% \changes{v2.97e}{2007/11/23}{pass option from class to \pkg*{typearea}} +% \changes{v3.00}{2008/07/09}{new option \opt{twoside\quotechar=semi}} +% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}} +% \changes{v3.13a}{2014/04/09}{the class also uses status signaling with +% \cs{FamilyKeyStateProcessed}} +% \changes{v3.17}{2015/03/17}{automatic usage of \cs{flushbottom} and +% \cs{raggedbottom}} +% \changes{v3.17}{2015/03/17}{early setting of default} +% \changes{v3.17}{2015/03/18}{use \cs{cleardoubleoddpage} if available} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{macro}{\if@semitwoside,\@semitwosidetrue,\@semitwosidefalse} +% \changes{v3.00}{2008/07/09}{new boolean switch (intern)} +% \begin{macro}{\if@twoside,\@twosidetrue,\@twosidefalse} +% \changes{v3.00}{2008/07/09}{switch also sets \cs{if@semitwoside}} +% Do we have a single sided or double sided layout? +% \begin{macrocode} +%<*package&typearea&options> +\newif\if@semitwoside +\g@addto@macro\@twosidetrue\@semitwosidefalse +\g@addto@macro\@twosidefalse\@semitwosidefalse +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macrocode} +%<*(class|(package&typearea))&options> +\KOMA@key{twoside}[true]{% +% \if@atdocument\else\PassOptionsToPackage{twoside=#1}{typearea}\fi% +%<*package> + \if@atdocument\if@twoside + \scr@ifundefinedorrelax{cleardoubleoddpage}{% + \cleardoublepage + }{% + \cleardoubleoddpage + }% + \else\clearpage\fi\fi +% + \Ifstr{#1}{semi}{% + \@twosidetrue +% \@semitwosidetrue + \FamilyKeyStateProcessed + }{% + \def\FamilyElseValue{, `semi'}% + \KOMA@set@ifkey{twoside}{% +% \end{macrocode} +% \changes{v3.20}{2015/11/02}{not existing order dependency of +% \opt{twocolumn} and \opt{twoside} fixed} +% \changes{v3.27}{2019/03/05}{no special treatment for letters} +% \changes{v3.27}{2019/03/05}{missing \cs{sloppy} in twocolumn mode added} +% From v3.17 until 3.19a the classes used a local switch +% \cs{if@tempswa}. As a result of this option \opt{twocolumn} was not +% able to recognize double sided layout. Because of this it was essential to +% handle option \opt{twocolumn} before option \opt{twoside}. This has +% been solved using \cs{if@twoside} in the classes too. Another solution +% could have been to move the implementation and execution of +% \opt{twocolumn} before \opt{twoside}. But I don't know whether or not +% this would have been reliable and the solution here is more simple. +% \begin{macrocode} + @twoside% + }{#1}% + }% + \ifx\FamilyKeyState\FamilyKeyStateProcessed +%<*class> + \expandafter\ifnum\scr@v@is@ge{3.17}% + \if@twoside\flushbottom + \else + \if@twocolumn\sloppy\flushbottom\else\raggedbottom\fi + \fi + \fi +% + \KOMA@kav@xreplacevalue{.% +% \KOMAClassFileName +% typearea.\scr@pkgextension + }{twoside}{#1}% +%<*package> + \if@twoside + \if@semitwoside + \@mparswitchfalse + \else + \@mparswitchtrue + \fi + \else + \@mparswitchfalse + \fi% + \csname recalctypearea\endcsname +% + \fi +} +%<*class> +%\KOMAExecuteOptions{twoside=true} +%\KOMAExecuteOptions{twoside=false} +% +%<*package> +\KOMA@kav@xadd{.typearea.\scr@pkgextension}{twoside}{% + \if@twoside true\else false\fi +} +% +\KOMA@DeclareStandardOption% +% [typearea]% + {oneside}{twoside=false} +% +% \end{macrocode} +% \end{option}^^A twoside +% \end{option}^^A oneside +% +% \begin{option}{onecolumn} +% \changes{v2.95}{2002/12/04}{option moved to package \pkg*{typearea}} +% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}} +% \changes{v2.97e}{2007/11/23}{the classes pass the option to \pkg*{typearea}} +% \changes{v3.01a}{2008/11/21}{standard option but not deprecated} +% \begin{option}{twocolumn} +% \changes{v2.95}{2002/12/04}{option moved to package \pkg*{typearea}} +% \changes{v2.97e}{2007/11/23}{the classes pass the option to \pkg*{typearea}} +% \changes{v2.98a}{2007/01/08}{passing the correct option} +% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}} +% \changes{v3.13a}{2014/04/09}{the class also uses status signaling with +% \cs{FamilyKeyStateProcessed}} +% \changes{v3.20}{2016/02/16}{\cs{sloppy}, \cs{raggedbottom} and +% \cs{flushbottom} delayed} +% \changes{v3.27}{2019/03/05}{no extra treatment for letters} +% Do we have a single column or two columns layout? +% \begin{macrocode} +%<*(class|(package&typearea))&options> +\KOMA@key{twocolumn}[true]{% +% \if@atdocument\else\PassOptionsToPackage{twocolumn=#1}{typearea}\fi% +%<*package> + \if@atdocument\clearpage\fi +% + \KOMA@set@ifkey{twocolumn}{@twocolumn}{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \KOMA@kav@replacebool{.% +% \KOMAClassFileName +% typearea.\scr@pkgextension + }{twocolumn}{@twocolumn}% +% \csname recalctypearea\endcsname +%<*class> + \if@atdocument\expandafter\@firstofone + \else\@ifpackageloaded{typearea}{\expandafter\@firstofone} + {\expandafter\AtEndOfClass}\fi + {\expandafter\ifnum\scr@v@is@ge{3.17}% + \if@twocolumn\twocolumn\sloppy\flushbottom + \else + \onecolumn + \if@twoside\flushbottom\else + \raggedbottom + \fi + \fi + \fi}% +% + \fi +} +%<*class> +\AtEndOfClass{% + \expandafter\ifnum\scr@v@is@lt{3.17}% +%<*!letter> + \if@twocolumn\twocolumn\sloppy\flushbottom + \else\onecolumn\if@twoside\flushbottom\else\raggedbottom\fi\fi +% +% \raggedbottom + \fi +} +\KOMAExecuteOptions{twocolumn=false} +% +%<*package> +\KOMA@kav@xadd{.typearea.\scr@pkgextension}{twocolumn}{% + \if@twocolumn true\else false\fi +} +% +\KOMA@DeclareStandardOption% +% [typearea]% + {onecolumn}{twocolumn=false} +% +% \end{macrocode} +% \end{option}^^A twocolumn +% \end{option}^^A onecolumn +% +% +% \subsection{Influencing size of head and foot and margins} +% +% We have several options to influence the head hight and the foot height and +% whether or not these are part of the typing area or the margins. We have also +% an option to decide whether or not the margin notes are part of the typing +% area or not. +% +% \begin{option}{headlines} +% \changes{v2.95}{2002/12/06}{new implementation using \pkg{keyval}} +% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}} +% \begin{option}{footlines} +% \changes{v3.12}{2013/03/26}{added} +% These are two of the recommended options to set the height of the page head +% and footer. Here we set the height by the number of base lines. The number +% is a factor to \cs{baselineskip} and therefore a real number. +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@key{headlines}{% + \begingroup + \setlength{\@tempdima}{#1\baselineskip}% + \endgroup + \def\ta@hh{#1\baselineskip}% + \FamilyKeyStateProcessed + \KOMA@kav@replacevalue{.typearea.\scr@pkgextension}{headlines}{#1}% + \KOMA@kav@replacevalue{.typearea.\scr@pkgextension}{headheight}{#1\baselineskip}% +} +\KOMA@key{footlines}{% + \begingroup + \setlength{\@tempdima}{#1\baselineskip}% + \endgroup + \def\ta@fh{#1\baselineskip}% + \FamilyKeyStateProcessed + \KOMA@kav@replacevalue{.typearea.\scr@pkgextension}{footlines}{#1}% + \KOMA@kav@replacevalue{.typearea.\scr@pkgextension}{footheight}{#1\baselineskip}% +} +% +% \end{macrocode} +% \end{option} +% \end{option} +% +% \begin{option}{headheight} +% \changes{v2.98c}{2008/04/06}{added} +% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}} +% \begin{option}{footheight} +% \changes{v3.12}{2013/03/26}{added} +% Instead of setting the height of the page head or footer by the number of +% base lines, we can set it also using a length or length value. Note, via +% \cs{documenclass} or \cs{usepackage} only length values are supported +% (due to an expansion problem by the \LaTeX{} kernel with both commands). +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@key{headheight}{% + \begingroup + \setlength{\@tempdima}{#1}% + \endgroup + \def\ta@hh{#1}% + \FamilyKeyStateProcessed + \KOMA@kav@replacevalue{.typearea.\scr@pkgextension}{headheight}{#1}% + \KOMA@kav@removekey{.typearea.\scr@pkgextension}{headlines}% +} +\KOMA@key{footheight}{% + \begingroup + \setlength{\@tempdima}{#1}% + \endgroup + \def\ta@fh{#1}% + \FamilyKeyStateProcessed + \KOMA@kav@replacevalue{.typearea.\scr@pkgextension}{footheight}{#1}% + \KOMA@kav@removekey{.typearea.\scr@pkgextension}{footlines}% +} +% +% \end{macrocode} +% \end{option} +% \end{option} +% +% \begin{option}{headinclude} +% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}} +% This options determines whether or not the head is part of the typing +% area. +% \begin{option}{headexclude} +% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}} +% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}} +% \changes{v3.01a}{2008/11/21}{deprecated} +% \begin{macro}{\if@hincl,\@hincltrue,\@hinclfalse} +% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}} +% \changes{v2.97c}{2007/04/19}{direct initialization via \cs{if@hsl}, +% if already defined} +% We use a boolean switch to store the decision. +% \begin{macrocode} +%<*package&typearea&options> +\newif\if@hincl\@ifundefined{if@hsl}{}{\let\if@hincl\if@hsl} +\KOMA@ifkey{headinclude}{@hincl} +\KOMA@DeclareDeprecatedOption[typearea]{headexclude}{headinclude=false} +% +% \end{macrocode} +% \end{macro} +% \end{option} +% \end{option} +% +% \begin{option}{headsepline} +% \changes{v3.20}{2015/12/12}{\pkg*{typearea} itself reacts on \opt{headsepline}} +% Until \KOMAScript{} v3.20 \pkg*{typearea} was not able to handle +% sequences of options \opt{headsepline} and \opt{headinclude} to get +% always a correct result. Until v3.18a \opt{headinclude} was prioritized +% against \opt{headsepline} if used as global options but not if used via +% \cs{KOMAoptions}. In v3.18a a bug has been fixed with the result that +% \opt{headsepline} was prioritized against \opt{headinclude} if used +% as global options. But intentionally +% \opt{headinclude=false,}\opt{headsepline} or +% \opt{headinclude=true,}\opt{headsepline=false} always should use the +% setting of option \opt{headsepline} independent of setting this as +% global options or using \cs{KOMAoptions}. Similar with +% \opt{headsepline,}\opt{headinclude=false} or +% \opt{headsepline=false,},\opt{headinclude} the setting of +% \opt{headinclude} should be used. To achieve this \pkg*{typearea} +% itself has to interpret not only \opt{headinclude} but also +% \opt{headsepline} (as an alias of \opt{headinclude}). +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@key{headsepline}[true]{% + \KOMA@set@ifkey{headinclude}{@hincl}{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \KOMA@kav@replacebool{.typearea.\scr@pkgextension}{headinclude}{@hincl}% + \fi +} +% +% \end{macrocode} +% \end{option}^^A headsepline +% +% \begin{option}{footinclude} +% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}} +% \begin{option}{footexclude} +% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}} +% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}} +% \changes{v3.01a}{2008/11/21}{deprecated} +% This options determines whether or not the page footer is part of the typing +% area. +% \begin{macro}{\if@fincl,\@fincltrue,\@finclfalse} +% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}} +% \changes{v2.97c}{2007/04/19}{direct initialization via \cs{if@fsl}, +% if already defined} +% We use a boolean switch to store the decision. +% \begin{macrocode} +%<*package&typearea&options> +\newif\if@fincl\@ifundefined{if@fsl}{}{\let\if@fincl\if@fsl} +\KOMA@ifkey{footinclude}{@fincl} +\KOMA@DeclareDeprecatedOption[typearea]{footexclude}{footinclude=false} +% +% \end{macrocode} +% \end{macro} +% \end{option} +% \end{option} +% +% \begin{option}{footsepline} +% \changes{v3.23}{2017/03/03}{has to set \cs{if@fincl} instead of \cs{if@hincl}} +% \changes{v3.20}{2015/12/12}{\pkg*{typearea} itself reacts on \opt{footsepline}} +% Until \KOMAScript{} v3.20 \pkg*{typearea} was not able to handle +% sequences of options \opt{footsepline} and \opt{footinclude} to get +% always a correct result. Until v3.18a \opt{footinclude} was prioritized +% against \opt{footsepline} if used as global options but not if used via +% \cs{KOMAoptions}. In v3.18a a bug has been fixed with the result that +% \opt{footsepline} was prioritized against \opt{footinclude} if used +% as global options. But intentionally +% \opt{footinclude=false,}\opt{footsepline} or +% \opt{footinclude=true,}\opt{footsepline=false} always should use the +% setting of option \opt{footsepline} independent of setting this as +% global options or using \cs{KOMAoptions}. Similar with +% \opt{footsepline,}\opt{footinclude=false} or +% \opt{footsepline=false,},\opt{footinclude} the setting of +% \opt{footinclude} should be used. To achieve this \pkg*{typearea} +% itself has to interpret not only \opt{footinclude} but also +% \opt{footsepline} (as an alias of \opt{footinclude}). +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@key{footsepline}[true]{% + \KOMA@set@ifkey{footinclude}{@fincl}{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \KOMA@kav@replacebool{.typearea.\scr@pkgextension}{footinclude}{@fincl}% + \fi +} +% +% \end{macrocode} +% \end{option}^^A footsepline +% +% \begin{option}{mpinclude} +% \changes{v2.8q}{2002/03/28}{added} +% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}} +% \begin{option}{mpexclude} +% \changes{v2.8q}{2002/03/28}{added} +% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}} +% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}} +% \changes{v3.01a}{2008/11/21}{deprecated} +% Some documents have a lot of large margin notes. Optical these margin notes +% are more part of the typing area than the margin. This options determines +% whether or not margin notes should be part of the typing area. +% \begin{macro}{\if@mincl,\@mincltrue,\@minclfalse} +% \changes{v2.95}{2002/07/08}{new implementation using \pkg{keyval}} +% We use a boolean switch to store the decision. Note, if the margin notes are +% part of the typing area, you should increase the divisor. +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@ifkey{mpinclude}{@mincl} +\KOMA@DeclareDeprecatedOption[typearea]{mpexclude}{mpinclude=false} +% +% \end{macrocode} +% \end{macro} +% \end{option} +% \end{option} +% +% +% \subsection{Typing area for the emulation of the standard classes} +% +% For the emulation of the standard classes we need a dedicated size of the +% typing area, if and only if no explicit \opt{DIV} has been given by +% option. The emulation of the standard classes is a class feature. We could +% do it before \pkg*{typearea} and then deactivate initial setting of +% margins and typing area. But it is more easy to use \cs{areaset} after +% loading \pkg*{typearea}. The standard letter class cannot be emulated. +% \begin{macrocode} +%<*class&body&!letter> +\if@scr@emulatestandardclasses + \Ifstr{\@lastdiv}{areaset}{}{% + \ifnum\@lastdiv=\z@ + \setlength{\textwidth}{\dimexpr \paperwidth-2in\relax} + \ifdim \f@size\p@<10.5\p@ + \setlength{\@tempdimb}{345\p@} + \else\ifdim \f@size\p@<11.5\p@ + \setlength{\@tempdimb}{360\p@} + \else + \setlength{\@tempdimb}{390\p@} + \fi + \fi + \if@twocolumn + \ifdim\@textwidth>2\@tempdimb\relax + \setlength{\textwidth}{2\@tempdimb} + \fi + \else + \ifdim\textwidth>\@tempdimb + \setlength{\textwidth}{\@tempdimb} + \fi + \fi + \@settopoint\textwidth + \setlength{\@tempdima}{\dimexpr \paperheight-3.5in\relax} + \divide\@tempdima\baselineskip + \@tempcnta=\@tempdima + \setlength{\textheight}{\@tempcnta\baselineskip} + \addtolength{\textheight}{\topskip} + \edef\reserved@a{% + \noexpand\@areasetadvancedtrue + \noexpand\areaset[current]{\noexpand\textwidth}{\noexpand\textheight}% + \if@areasetadvanced\else\noexpand\@areasetadvancedfalse\fi + }\reserved@a + \fi + }% +\fi +% +% \end{macrocode} +% +% \subsection{Using a predefined divisor depending on the font size} +% +% Some years ago \pkg*{typearea} provides the feature to use a hard coded +% or user defined divisor depending on the document font size. The feature to +% define such predefined divisors is deprecated, because it can be used only +% for integer font sizes in pt. Nevertheless, for compatibility reasons it is +% still implemented. +% +% \begin{macro}{\ta@divlist} +% \changes{v2.0e}{1994/10/28}{added} +% \changes{v2.6}{2000/01/04}{the list provides values from font size 1\,pt} +% \begin{macro}{\ta@divlistelse} +% \changes{v2.6}{2000/01/04}{added} +% We need a default settings for 10\,pt, 11\,pt and 12\,pt. But we define it +% only if they has not been defined before. So classes could define other +% defaults before loading \pkg*{typearea}. +% \begin{macrocode} +%<*package&typearea&init> +\providecommand\ta@divlist{{}{}{}{}{}{}{}{}{}{8}{10}{12}} +% \end{macrocode} +% \end{macro} +% If a font size does not have a predefined divisor, the following default +% will be used: +% \begin{macrocode} +\providecommand\ta@divlistelse{1} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ta@divfor} +% We also need a macro to get one of the values stored at \cs{ta@divlist} +% depending on the font size given by the real number argument. The real +% number will be rounded to the nearest integer. +% \changes{v2.4g}{1996/11/04}{usage of the default value list} +% \changes{v2.6}{2000/01/04}{usage of the extended list} +% \changes{v2.8q}{2002/03/28}{respect option \opt{mpinclude}} +% \changes{v2.96}{2006/08/11}{font size does not need to be an integer} +% \changes{v3.25}{2018/03/05}{paper size test added} +% \begin{macrocode} +%<*package&typearea&body> +\newcommand*{\ta@divfor}[1]{% + \ta@div=\z@ + \expandafter\ifnum\scr@ta@v@is@ge{3.25}\relax + \ifnum \z@=\ifdim \paperwidth<207mm \z@\else\ifdim \paperwidth>213mm \z@ + \else\ifdim \paperheight<294mm \z@\else + \ifdim \paperheight>300mm \z@\else \@ne\fi\fi\fi\fi + \PackageInfoNoLine{typearea}{% + With paper sizes other than (almost) `A4' predefined\MessageBreak + DIV values do not exist. Using DIV calculation for good\MessageBreak + line width (unless using `version=3.24` or prior)% + }% + \ta@div=\tw@ + \fi + \fi + \if@mincl + \PackageInfo{typearea}{% + With option `mpinclude' there are no predefined\MessageBreak + DIV values. Using DIV calculation for good line\MessageBreak + width% + }% + \ta@div=\tw@ + \fi + \ifnum \ta@div=\z@ + \xdef\@tempa{\ta@divlist{}}% + \@tempdima=#1pt + \addtolength{\@tempdima}{.5\p@}% + \divide\@tempdima by\p@ + \setlength{\@tempdimb}{\@tempdima}% + \multiply\@tempdimb by\p@ + \ifdim \@tempdimb=#1pt + \ta@div=#1\relax + \@whilenum \ta@div >-9 \do {% + \ifx\@tempa\empty + \else \xdef\@tempa{\expandafter\@cdr\@tempa\@nil}\fi + \advance\ta@div by-1 + }% + \else + \let\@tempa\empty + \fi + \ifx\@tempa\empty +% \end{macrocode} +% If there is not default in the list we use the general default. +% \begin{macrocode} + \setlength{\@tempdima}{#1\p@}% + \addtolength{\@tempdima}{10\p@}% + \PackageWarningNoLine{typearea}{% + DIV for \the\@tempdima\space and used papersize\MessageBreak + not defined!\MessageBreak + Using DIV=\ifnum\number\ta@divlistelse>\m@ne + \ifcase \ta@divlistelse default% + \or calc% + \or calc% + \or classic% + \else\ta@divlistelse\fi\else\ta@divlistelse\fi + }% + \ta@div=\ta@divlistelse\relax + \else +% \end{macrocode} +% Otherwise we use the default of the list. +% \begin{macrocode} + \xdef\@tempa{\expandafter\@car\@tempa\@nil}% + \ifx\@tempa\empty + \ta@div=\ta@divlistelse\relax + \else + \ta@div=\@tempa\relax + \fi + \fi + \fi +} +% +% \end{macrocode} +% \end{macro} +% +% +% \begin{command}{\SetDIVList} +% \changes{v2.1a}{1994/10/28}{new} +% \changes{v2.6}{2000/01/04}{\cs{ta@divlist} holds values for font sizes from 1\,pt} +% \changes{v3.24}{2017/07/23}{deprecated} +% The command is deprecated. Don't use it any longer. +% \begin{macrocode} +%<*package&typearea&body> +\newcommand*\SetDIVList[1]{% + \PackageWarning{typearea}{\string\SetDIVList\space is + deprecated!\MessageBreak + This command supports only integer font sizes\MessageBreak + in pt equal or greater than 10pt.\MessageBreak + Since version 2.6 the command is implemented\MessageBreak + for compatibility only. You should not use it\MessageBreak + any longer}% + \def\ta@divlist{{}{}{}{}{}{}{}{}{}#1}} +% \end{macrocode} +% \end{command}^^A \SetDIVList +% +% \begin{command}{\SetXDIVList} +% \changes{v2.6}{2000/01/04}{neu} +% \changes{v3.24}{2017/07/23}{deprecated} +% The command is deprecated. Don't use it any longer. +% \begin{macrocode} +\newcommand*\SetXDIVList[1]{% + \PackageWarning{typearea}{\string\SetXDIVList\space is + deprecated!\MessageBreak + This command supports only integer font sizes\MessageBreak + in pt equal or greater than 10pt.\MessageBreak + Since version 3.0 the command is implemented\MessageBreak + for compatibility only. You should not use it\MessageBreak + any longer}% + \def\ta@divlist{#1}} +% +% \end{macrocode} +% \end{command}^^A \SetXDIVList +% +% +% \subsection{Calculation of typing area and margins} +% +% The main purpose of the package is the calculation of the size of the +% typeing area and the margins depending on a divisor. As an addition a +% binding correction is included. +% +% The parameters and the calculation is needed before the options can be +% processed. +% +% \begin{ilength}{\ta@bcor} +% \changes{v2.2a}{1995/01/25}{definition of the dimension before option +% \opt{BCOR}} +% \changes{v2.7g}{2001/04/17}{definition using \cs{newlength} instead of +% \cs{newdimen}} +% We need a length to store the binding correction. It is initializes to 0\,pt +% implicitly by \cs{newlength}. +% \begin{macrocode} +%<*package&typearea&options> +\newlength{\ta@bcor} +% \end{macrocode} +% \end{ilength} +% +% \begin{macro}{\ta@div} +% \changes{v2.2a}{1995/01/25}{definition of the dimension before option +% \opt{BCOR}} +% We need a counter for the divisor (aka \emph{DIV}). It is initializes to +% 0\,pt implicitly by \cs{newcount}. So it is not a \LaTeX{} counter but a +% \TeX{} counter. +% \begin{macrocode} +\newcount\ta@div +% +% \end{macrocode} +% \end{macro} +% +% \begin{ilength}{\ta@hblk,\ta@vblk} +% Width of one horizontal resp. height of one vertical block. +% \begin{macrocode} +%<*package&typearea&body> +\newlength{\ta@hblk} +\newlength{\ta@vblk} +% +% \end{macrocode} +% \end{ilength} +% +% \begin{ilength}{\ta@temp} +% Used several times instead of \cs{@tempdima}, \cs{@tempdimb} or another +% temporary dimension or glue of the LaTeX{} kernel. Nevertheless I should +% think about not using this temporary length any longer. +% \begin{macrocode} +%<*package&typearea&body> +\newlength{\ta@temp} +% +% \end{macrocode} +% \end{ilength} +% +% \begin{option}{BCOR} +% \changes{v2.2a}{1995/01/25}{added} +% \changes{v2.95}{2002/12/04}{new implementation using \pkg{keyval}} +% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% The value is written into the length \cs{ta@bcor}. Several symbolic values +% are supported that have to be converted into a length. Note, while loading +% the package symbolic values are nonsense. +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@key{BCOR}{% + \Ifstr{#1}{current}{}{% + \setlength{\ta@bcor}{#1}% + }% + \FamilyKeyStateProcessed + \KOMA@kav@xreplacevalue{.typearea.\scr@pkgextension}{BCOR}{#1}% +} +% \end{macrocode} +% After loading the package we have to do a little bit more, because we need +% to recalculate the areas. +% \changes{v3.13}{2014/06/30}{\cs{FamilyKeyStateProcessed} added} +% \changes{v3.24}{2017/07/23}{\cs{KOMA@kav@xreplacevalue} added} +% \begin{macrocode} +\AtEndOfPackage{% + \KOMA@key{BCOR}{% + \typearea[{#1}]{last} + \FamilyKeyStateProcessed + \KOMA@kav@xreplacevalue{.typearea.\scr@pkgextension}{BCOR}{#1}% + }% +} +% +% \end{macrocode} +% \end{option} +% +% \begin{option}{DIV} +% \changes{v2.2a}{1995/01/25}{new option} +% \changes{v2.95}{2002/12/04}{new implementation using \pkg{keyval}} +% \changes{v3.12}{2013/03/05}{status signaling using \cs{FamilyKeyState}} +% The value is written into the counter \cs{ta@div}. Several symbolic values +% are supported and have to be converted into a counter. Note, while loading +% the package symbolic values are nonsense. +% \begin{macro}{\@lastdiv} +% \changes{v3.30}{2020/03/24}{init the internal macro} +% This internal macro stores the last value to option \opt{DIV}. It is +% initialized with \cs{relax}. +% \begin{macrocode} +%\newcommand*{\@lastdiv}{\z@}\let\@lastdiv\relax +% \end{macrocode} +% \end{macro}^^A \@lastdiv +% \begin{macrocode} +%<*package&typearea&options> +\def\movet@reserved@a@to@nnil#1\@nnil{\def\reserved@a{#1}}% +\KOMA@key{DIV}[calc]{% + \edef\@tempa{#1}% + \def\@tempb{last}\ifx\@tempa\@tempb\let\@tempa=\@lastdiv + \ifx\@tempa\relax\def\@tempa{current}\fi + \fi + \def\@tempb{current}\ifx\@tempa\@tempb\else + \def\@tempb{default}\ifx\@tempa\@tempb\ta@div=\z@ \else + \def\@tempb{calc}\ifx\@tempa\@tempb\ta@div=\tw@ \else + \def\@tempb{classic}\ifx\@tempa\@tempb\ta@div=\thr@@ \else + \expandafter\def\expandafter\@tempa\expandafter{\expandafter0\@tempa}% + \afterassignment\movet@reserved@a@to@nnil + \@tempcnta=\@tempa\relax\@nnil + \def\@tempb{\relax}\ifx\reserved@a\@tempb + \ta@div=\@tempcnta + \edef\@tempa{\the\ta@div}% + \else + \let\@tempa\relax + \fi + \fi + \fi + \fi + \fi + \ifx\@tempa\relax + \FamilyKeyStateUnknownValue + \else + \FamilyKeyStateProcessed + \KOMA@kav@xreplacevalue{.typearea.\scr@pkgextension}{DIV}{\@tempa}% + \fi +} +% \end{macrocode} +% After loading the package we have to do a little bit more, because we need +% to recalculate the areas. +% \changes{v3.13}{2014/06/30}{\cs{FamilyKeyStateProcessed} added} +% \changes{v3.24}{2017/07/23}{\cs{KOMA@kav@xreplacevalue} added} +% \begin{macrocode} +\AtEndOfPackage{% + \KOMA@key{DIV}{% + \typearea[current]{#1}% + \FamilyKeyStateProcessed + \KOMA@kav@xreplacevalue{.typearea.\scr@pkgextension}{DIV}{#1}% + }% +} +% +% \end{macrocode} +% \end{option} +% +% \begin{command}{\typearea} +% This is the real reason for the package: calculation of typing area and +% margins providing an optional binding correction and depending on a +% divisor. +% \begin{macro}{\@typearea} +% \changes{v2.4n}{1997/05/28}{moved main calculation into \cs{@typearea}} +% \changes{v2.95}{2002/08/20}{\cs{selectfont} added} +% The calculation itself is done in \cs{@typearea}. This command does not need +% any parameters because it uses \cs{ta@div} and \cs{ta@bcor}. +% \begin{macrocode} +%<*package&typearea&body> +\newcommand*\@typearea{% +% \end{macrocode} +% First of all we have to take care to select the correct font. Because +% otherwise we cannot depend on, e.g., \cs{baselineskip}. +% \begin{macrocode} + \selectfont +% \end{macrocode} +% First calculation is about the horizontal block element size: +% \begin{macrocode} + \ta@hblk=\paperwidth + \advance \ta@hblk by-\ta@bcor + \divide\ta@hblk by\ta@div +% \end{macrocode} +% The with of the margin note column depends in the horizontal block size, +% whether or not is should be part of the typing area and whether of not we +% have a double sided document. +% \changes{v2.8q}{2002/03/28}{\cs{marginparwidth} depends on +% \opt{mpinclude}} +% \begin{macrocode} + \if@mincl + \marginparwidth=\ta@hblk + \advance\marginparwidth by-\marginparsep + \else + \if@twoside + \if@semitwoside + \marginparwidth=\ta@hblk + \else + \marginparwidth=1.5\ta@hblk + \fi + \else + \marginparwidth=\ta@hblk + \fi + \fi +% \end{macrocode} +% The left and right margin resp. the left margin of odd and even pages +% depends also on the horizontal block width. The relation depends on whether +% or not the document is double sided. +% \begin{macrocode} + \oddsidemargin=-1in + \evensidemargin=-1in + \if@twoside + \if@semitwoside + \advance\oddsidemargin by1.5\ta@hblk + \advance\oddsidemargin by\ta@bcor +% \end{macrocode} +% \changes{v3.12}{2013/10/15}{use alternating \opt{BCOR} with +% \opt{twoside\quotechar=semi}} +% From v3.12 the binding correction is part of the inner margin also for +% \opt{twoside=semi}. If compatibility to earlier release is selected the +% binding correction with \opt{twoside=semi} is always added to the left +% margin. +% \begin{macrocode} + \expandafter\ifnum\scr@ta@v@is@lt{3.12}\relax + \evensidemargin=\oddsidemargin + \else + \advance\evensidemargin by1.5\ta@hblk + \fi + \else + \advance\oddsidemargin by\ta@hblk + \advance\oddsidemargin by\ta@bcor + \advance\evensidemargin by2\ta@hblk + \if@mincl + \advance\evensidemargin by\marginparwidth + \advance\evensidemargin by\marginparsep + \fi + \fi + \else + \advance\oddsidemargin by1.5\ta@hblk + \advance\oddsidemargin by\ta@bcor + \evensidemargin=\oddsidemargin + \fi +% \end{macrocode} +% The width of the typing area is the paper width without the three blocks +% used for the margins and without the binding correction. +% \begin{macrocode} + \textwidth=\paperwidth + \advance\textwidth by-\ta@bcor + \advance\textwidth by-3\ta@hblk +% \end{macrocode} +% But, if the margin note column should be part of the typing area, it's width +% has to be subtracted from the width of the typing area. We assume to place +% the margin notes at the outer margin. But if the typing area is to narrow +% for the margin note column, the width of margin note column will be +% reduced. This can be done easily be swapping the two lengths. +% \changes{v3.30}{2020/02/25}{orphan line break at end of warning message +% removed} +% \begin{macrocode} + \if@mincl + \advance\textwidth by-\marginparwidth + \advance\textwidth by-\marginparsep + \ifdim\textwidth <\marginparwidth + \PackageWarningNoLine{typearea}{% + Width of text (\the\textwidth) less than width of\MessageBreak + marginpar (\the\marginparwidth) while using option\MessageBreak + `mpinclude'.\MessageBreak + Because of this, I'm exchanging the values.\MessageBreak + You should increase DIV to avoid such problems% + }% + \@tempskipa=\marginparwidth + \marginparwidth=\textwidth + \textwidth=\@tempskipa + \fi + \fi +% \end{macrocode} +% Next the vertical size of a block. +% \begin{macrocode} + \ta@vblk=\paperheight + \divide\ta@vblk by\ta@div +% \end{macrocode} +% The top margin depends on this vertical block size. But note, \TeX{} will +% increase it by 1\,in. +% \begin{macrocode} + \topmargin=-1in + \advance\topmargin by\ta@vblk +% \end{macrocode} +% And if head is not part of the typing area, the top margin has to be reduced +% by the head size. +% \begin{macrocode} + \if@hincl \else + \advance\topmargin by-\headheight + \advance\topmargin by-\headsep + \fi +% \end{macrocode} +% For the height of the typing area we use the paper size without the height +% of head and footer. The head and footer may be part of the typing area or +% not. If they are part of the typing area they reduce the height of it. +% \begin{macrocode} + \ta@temp=\paperheight + \advance\ta@temp by-3\ta@vblk + \if@hincl + \advance\ta@temp by-\headheight + \advance\ta@temp by-\headsep + \fi + \if@fincl + \advance\ta@temp by-\footskip + \fi +% \end{macrocode} +% Last but not least we have take care that the typing area consists of an +% integer number of text lines. +% \changes{v2.96}{2006/09/12}{setting \cs{topskip}} +% \changes{v2.97c}{2007/07/04}{setting \cs{maxdepth}} +% \begin{macrocode} + \scr@ifundefinedorrelax{@ptsize}{% + \topskip=\f@size\p@ + }{% + \topskip=\@ptsize\p@ + \advance\topskip by 10\p@ + }% + \maxdepth=.5\topskip + \textheight=\topskip + \@whiledim\textheight <\ta@temp + \do{\advance\textheight by\baselineskip}% +} +% \end{macrocode} +% \end{macro}^^A \@typearea +% +% \begin{macro}{\ta@modiv} +% Needed by \cs{typearea}. The first parameter will be divided by the second +% one. \cs{ta@div} is set to the rounded result. Internally \cs{@tempdima} and +% \cs{@tempdimb} are used. +% \begin{macrocode} +\newcommand*\ta@modiv[2]{ + \setlength{\@tempdima}{#1} + \divide\@tempdima by#2 + \ta@div\@tempdima + \ifnum \ta@div<4 + \ta@div=4 + \else + \setlength{\@tempdimb}{#1}% + \divide\@tempdimb by\ta@div + \addtolength{\@tempdima}{\@tempdima}% + \addtolength{\@tempdima}{-\@tempdimb}% + \advance\ta@div by\@ne + \setlength{\@tempdimb}{#1}% + \divide\@tempdimb by\ta@div +% \end{macrocode} +% \changes{v2.5a}{1997/06/22}{\cs{ifdim} instead of \cs{ifnum}} +% \begin{macrocode} + \ifdim \@tempdima<\@tempdimb + \advance\ta@div by\m@ne + \fi + \fi +} +% \end{macrocode} +% \end{macro}^^A \ta@modiv +% +% \begin{macro}{\ta@temp@goodwidth} +% Sets \cs{ta@temp} to the heuristic optimal line width depending on the +% current font. An optimal line width has 66 up to 72 characters. Here we use +% a value of 69 characters. We assume that such a line consists of 66 lower +% case letters (minors) and three upper case letters (majors). Normally the +% weight of a letter depends on the language but we use same weight for each +% letter. +% \changes{v2.7i}{2001/05/17}{avoid overflows if a very large font is used} +% \changes{v2.8q}{2002/03/06}{\cs{normalfont} \cs{normalsize} added} +% \changes{v2.95a}{2006/07/20}{fix of large font calculation} +% \begin{macrocode} +\newcommand*\ta@temp@goodwidth{% + \settowidth{\ta@temp}{\normalfont\normalsize + abcdefghijklmnopqrstuvwxyz}% + \ifdim\ta@temp >200\p@ + \setlength{\ta@temp}{2.53846\ta@temp}% + \settowidth{\@tempdima}{\normalfont\normalsize + ABCDEFGHIJKLMNOPQRSTUVWXYZ}% + \setlength{\@tempdima}{.11538\@tempdima}% + \addtolength{\ta@temp}{\@tempdima}% + \else + \multiply\ta@temp by66 + \settowidth{\@tempdima}{\normalfont\normalsize + ABCDEFGHIJKLMNOPQRSTUVWXYZ}% + \multiply\@tempdima by3 + \addtolength{\ta@temp}{\@tempdima}% + \divide\ta@temp by26 + \fi +} +% \end{macrocode} +% \end{macro}^^A \ta@temp@goodwidth +% +% \begin{command}{\AfterCalculatingTypearea} +% \changes{v2.96a}{2006/11/29}{added} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by +% \cs{kernel@ifstar}} +% Users can influence the behaviour of \cs{typearea} by a hook. The star +% variation adds the code locally the non-star variation globally. +% \begin{macrocode} +\newcommand*{\AfterCalculatingTypearea}{% + \kernel@ifstar \l@addto@macro \g@addto@macro \@typearea@end +} +% \end{macrocode} +% \begin{macro}{\@typearea@end} +% \changes{v2.96a}{2006/11/29}{defined again but completely different} +% Macro \cs{@typearea@end} is a hook that is executed at the end of +% \cs{typearea} but before the activation of the new settings. So you can +% change the result of \cs{typearea}. +% \begin{macrocode} +\newcommand*{\@typearea@end}{} +% \end{macrocode} +% \end{macro}^^A \@typearea@end +% \end{command}^^A \AfterCalculatingTypearea +% +% \begin{command}{\activateareas} +% \changes{v2.96a}{2006/11/29}{new name for old macro} +% \changes{v3.17}{2015/02/07}{respect option \opt{usegeometry}} +% This macro is used to activate the new typing area and margin settings +% inside the document body. It is a hack, because is uses internal \LaTeX{} +% kernel code. +% \begin{macrocode} +\newcommand*{\activateareas}{% +% \end{macrocode} +% First of all test, whether or not we are inside the document body. If not do +% nothing. +% \begin{macrocode} + \if@atdocument +% \end{macrocode} +% \changes{v3.23}{2017/04/03}{info instead of warning if used inside the +% document body} +% But if, we show an info, because it is a hack. It depends in the \LaTeX{} +% release. Nevertheless, it seems to be stable from the very first \LaTeXe{} +% release. So we use an info only. Before v3.23 we have used a warning. +% \begin{macrocode} + \PackageInfo{typearea}{% + Using dirty hack to recalculate internal output\MessageBreak + dimensions of LaTeX% + }% +% \end{macrocode} +% Now, set several internal and none internal \LaTeX{}lengths to the new +% dimensions. +% \begin{macrocode} + \@colht=\textheight + \@colroom=\textheight + \vsize=\textheight + \columnwidth=\textwidth + \if@twocolumn + \advance\columnwidth by-\columnsep + \divide\columnwidth by\tw@ + \hsize=\columnwidth + \@firstcolumntrue + \fi + \hsize=\columnwidth + \linewidth\hsize + \scr@ifundefinedorrelax{@pagesizelast}{}{% + \KOMAoptions{pagesize=\@pagesizelast}% + }% +% \end{macrocode} +% \changes{v3.17}{2015/03/18}{adapt the \opt{parskip} settings} +% From v3.17 changes of the typing area can immediately change some of the +% \opt{parskip} settings. Before |\begin{document}| the change will be done +% automatically at |\begin{document}| and therefore adding it here is correct. +% \begin{macrocode} + \expandafter\ifnum\scr@ta@v@is@ge{3.17}% + \csname par@updaterelative\endcsname + \fi + \fi +% \end{macrocode} +% \changes{v3.17}{2015/02/07}{new code for option \opt{usegeometry}} +% If option \opt{usegeometry} is active we need to setup several options of +% package \pkg{geometry}. We use \cs{scr@geometryargs} to store them. And +% we either have to pass these options to \pkg{geometry} or define a new +% geometry. In the second case we also need some hacks to make the new paper +% size available for \pkg{geometry}. +% \begin{macrocode} + \edef\scr@geometryargs{% + bindingoffset=\the\ta@bcor, + lmargin=\the\dimexpr 1in+\oddsidemargin-\ta@bcor\relax, + textwidth=\the\textwidth, + \if@hincl + includehead,% + top=\the\dimexpr 1in+\topmargin\relax, + \else + includehead=false,% + top=\the\dimexpr 1in+\topmargin+\headheight+\headsep\relax, + \fi + headheight=\the\headheight, + headsep=\the\headsep, + textheight=\the\textheight, + \if@fincl + includefoot, + \else + includefoot=false, + \fi + footskip=\the\footskip, + \if@mincl + includemp, + \else + includemp=false, + \fi + marginparwidth=\the\marginparwidth, + marginparsep=\the\marginparsep + }% + \if@ta@usegeometry + \@ifundefined{Gm@save}{% + \if@atdocument\else + \edef\scr@geometryargs{% + paperwidth=\the\paperwidth,paperheight=\the\paperheight,% + \scr@geometryargs + }% + \PassOptionsToPackage{\scr@geometryargs}{geometry}% + \fi + }{% + \edef\Gm@restore@org{\Gm@restore}% + \if@atdocument + \expandafter\newgeometry\expandafter{\scr@geometryargs}% + \else + \edef\scr@geometryargs{% + paperwidth=\the\paperwidth,paperheight=\the\paperheight,% + \scr@geometryargs + }% + \expandafter\geometry\expandafter{\scr@geometryargs}% + \fi + }% + \fi +} +% \end{macrocode} +% \begin{macro}{\scr@geometryargs} +% \changes{v3.16}{2015/02/07}{neu (intern)} +% The initialization of the \pkg{geometry} options is empty. It will be +% filled automatically by \cs{activateareas}. +% \begin{macrocode} +\newcommand*{\scr@geometryargs}{} +% \end{macrocode} +% \end{macro}^^A \scr@geometryargs +% \end{command}^^A \activateareas +% +% \changes{v2.4g}{1996/11/04}{waste comments removed} +% \changes{v2.7g}{2001/04/17}{new symbolic values \opt{current}, +% \opt{default}, \opt{calc}, \opt{classic}} +% \changes{v2.8q}{2001/11/06}{new symbolic value \opt{last}} +% \changes{v2.96}{2006/08/21}{warn if \cs{typearea} is used inside a group} +% \changes{v3.10}{2011/09/13}{using \cs{scr@grouplevel@test}} +% \changes{v3.12}{2013/03/26}{page footer height configurable} +% \changes{v3.30}{2020/03/24}{\opt{current} after \cs{areaset} is \opt{areaset}} +% +% The symbolic values of the obligatory argument of \cs{typearea}: +% \begin{center}\begin{tabular}{lll} +% Symbol & Value & Meaning \\\hline\\[-2ex] +% \opt{calc} & 2 & calculate a good value \\ +% \opt{classic} & 3 & \emph{mittelalterlicher Buchseitenkanon} \\ +% \opt{current} & --- & use the current value \\ +% \opt{default} & 0 & use a value from the list \\ +% \opt{last} & --- & use the value from the last usage of +% \cs{typearea} \\ +% \opt{areaset} & --- & replace the current typing area \\ +% \end{tabular}\end{center} +% +% There is only one symbolic value that can be used as the optional argument: +% \opt{current}. +% \begin{macrocode} +\newcommand*\typearea[2][\z@]{% + \scr@grouplevel@test\typearea + \edef\@tempa{#1}\edef\@tempb{current}\ifx\@tempa\@tempb\else + \setlength{\ta@bcor}{#1}% + \fi + \edef\@tempa{#2}% + \def\@tempb{last}\ifx\@tempa\@tempb\let\@tempa=\@lastdiv + \ifx\@tempa\relax \def\@tempa{current}\fi + \fi + \Ifstr{\@tempa}{current}{% + \Ifstr{\@lastdiv}{areaset}{\let\@tempa\@lastdiv}{}% + }{}% + \def\@tempb{areaset}\ifx\@tempa\@tempb + \areaset[current]{\textwidth}{\textheight}% + \else + \def\@tempb{current}\ifx\@tempa\@tempb + \else + \def\@tempb{default}\ifx\@tempa\@tempb\ta@div=\z@ \else + \def\@tempb{calc}\ifx\@tempa\@tempb\ta@div=\tw@ \else + \def\@tempb{classic}\ifx\@tempa\@tempb\ta@div=\thr@@ \else + \ta@div=\@tempa + \fi + \fi + \fi + \fi + \edef\@lastdiv{\the\ta@div}% +% \end{macrocode} +% Before we do the calculation we need to start a new page if we are inside +% the document's body. +% \changes{v3.37}{2022/06/09}{fix for \LaTeX's build in two-column mode}% +% Unfortunately a simple \cs{newpage} maybe not enough, because this only +% starts a new page in \LaTeX's one-column mode. In \LaTeX's two-column mode +% it only starts a new column, which could be a new page or not. +% \begin{description} +% \item[ToDo:] Maybe a simple \cs{clearpage} would be better, but less +% compatible with \KOMAScript{} before version 3.37. +% \end{description} +% \begin{macrocode} + \if@atdocument + \newpage + \if@twocolumn\ifnum\@colnum=\z@\else\null\newpage\fi\fi + \fi +% \end{macrocode} +% \changes{v2.95a}{2006/07/20}{select document font size}% +% And we need to select the document font size. +% \begin{macrocode} + \normalsize +% \end{macrocode} +% Is the height of the page head already given or do we need to calculate +% it. If we need to calculate it we use 1.25 of the base lines distance. This +% gives enough room for optional separation lines (which are set outside if +% use \pkg*{scrlayer-scrpage}). +% \changes{v2.4n}{1997/05/28}{page head height depends on base line +% distance} +% \begin{macrocode} + \@ifundefined{ta@hh}{% + \headheight=1.25\baselineskip + }{% + \headheight=\ta@hh + }% +% \end{macrocode} +% The distance between the head and the text is always the same. Different +% typographers recommend different values. A good value would result in a grid +% that would be used for all lines of the page. But the distance should not to +% large. Supposedly a good value would be the height of one text line. But +% with head separation rule this wouldn't be a good value. So we use a +% compromise. +% \begin{macrocode} + \headsep=1.5\baselineskip +% \end{macrocode} +% The foot is a similar problem. But we have to setup also \len{footskip} not +% only \len{footheight}. +% \begin{macrocode} + \@ifundefined{footheight}{% + \newlength\footheight + }{}% + \@ifundefined{ta@fh}{% + \footheight=1.25\baselineskip + }{% + \footheight=\ta@fh + }% + \footskip=\dimexpr\footheight+2.25\baselineskip +% \end{macrocode} +% Some values also independent from the divisor and the binding correction. +% \begin{macrocode} + \marginparsep=1cc + \marginparpush=0.45\baselineskip +% \end{macrocode} +% \changes{v2.4g}{1996/11/04}{\opt{DIV\quotechar=0} tries to use a value from the +% default list} +% Before we do the calculation we test, whether the resulting divisor is +% 0. Values from 0 up to 3 are not possible because we use three parts for the +% margins. So we can use 0 to get a value from the default value list if +% available. +% \changes{v2.5h}{1999/12/29}{warning message changed} +% \begin{macrocode} + \ifnum\ta@div=\z@ + \@ifundefined{@ptsize}{% + \@tempdima=\f@size\p@ + \advance\@tempdima by.5pt + \ta@div=\@tempdima + \divide\ta@div by65536 + \advance\ta@div by-10 + \xdef\@ptsize{\the\ta@div}% + \PackageWarningNoLine{typearea}{% + \string\@ptsize\space not defined!\MessageBreak + Fontsize is \f@size pt.\MessageBreak + Defining \string\@ptsize\space to \@ptsize% + }% + }{}% + \ta@divfor{\@ptsize}% + \fi +% \end{macrocode} +% \changes{v2.4n}{1997/05/28}{optional \emph{klassischer Buchseitenkanon}} +% Another special case is if the divisor is 3. In this case we calculate a +% divisor near to the \emph{klassischer Buchseitenkanon}. This means we try to +% have the height of the typing area is as near as possible the width of the +% paper. For classic paper size this should be a harmonious result. +% \begin{macrocode} + \ifnum\ta@div=3 + \typeout{DIV calculation for classic typearea.}% + \setlength{\ta@temp}{\paperwidth}% + \addtolength{\ta@temp}{-\ta@bcor}% +% \end{macrocode} +% Here we also need to take care for whether the head is part of the typing +% area or the margin. +% \begin{macrocode} + \if@hincl\else + \addtolength{\ta@temp}{\headheight}% + \addtolength{\ta@temp}{\headsep}% + \fi + \if@fincl\else + \addtolength{\ta@temp}{\footskip}% + \fi +% \end{macrocode} +% Sometimes we need more vertical space than available. In this case we use +% another calculation. This will be defined later. +% \changes{v2.5a}{1997/06/22}{\cs{ifdim} instead of \cs{ifnum}} +% \begin{macrocode} + \ifdim \ta@temp >\paperheight + \PackageWarningNoLine{typearea}{% + No classic typearea with this papersize!\MessageBreak + Using calculated DIV% + }% + \ta@div=\@ne +% \end{macrocode} +% Otherwise we can calculate the height of all vertical margins by the height +% of the paper width (without binding correction) +% \begin{macrocode} + \else + \setlength{\ta@temp}{\paperheight}% + \addtolength{\ta@temp}{-\paperwidth}% + \addtolength{\ta@temp}{\ta@bcor}% +% \end{macrocode} +% and from this the height of one block +% \begin{macrocode} + \divide\ta@temp by3 +% \end{macrocode} +% and this will result in a divisor. +% \begin{macrocode} + \ta@modiv{\paperheight}{\ta@temp}% + \fi +% \end{macrocode} +% Here we do not need to respect \opt{mpinclude} because we do not use the +% width of the typing area but the height of the paper. +% \begin{macrocode} + \fi +% \end{macrocode} +% If we did not found a good value until this point, we try to calculate the +% optimal divisor. +% \changes{v2.4n}{1997/05/28}{improved optimal divisor calculation} +% \begin{macrocode} + \ifnum\ta@div <4 + \typeout{DIV calculation for typearea with good linewidth.}% +% \end{macrocode} +% The width of the typing area could at most be the width of the paper without +% the binding correction. +% \begin{macrocode} + \setlength{\textwidth}{\paperwidth}% + \addtolength{\textwidth}{-\ta@bcor}% +% \end{macrocode} +% The optimal width would be the optimal line width. +% \begin{macrocode} + \ta@temp@goodwidth +% \end{macrocode} +% In two column mode each text line has two such columns plus the column +% separation width. +% \changes{v2.8q}{2001/12/13}{\opt{DIVcalc} uses wider columns in two +% column mode} +% \begin{macrocode} + \if@twocolumn + \addtolength{\ta@temp}{\ta@temp}% + \addtolength{\ta@temp}{\columnsep}% + \fi +% \end{macrocode} +% Former releases used an iterative approach to get the best +% divisor. Depending on the \TeX{} implementation and the paper size this +% could be more or less slow. So we do a direct calculation starting with the +% width of the left and right margin. +% \begin{macrocode} + \setlength{\ta@hblk}{\paperwidth}% + \addtolength{\ta@hblk}{-\ta@temp}% +% \end{macrocode} +% This can be used to calculate the width of a block. +% \begin{macrocode} + \divide\ta@hblk by3 +% \end{macrocode} +% If this width is negative, we use a minimum width of 5\,mm. +% \changes{v2.5a}{1997/06/22}{\cs{ifdim} instead of \cs{ifnum}.} +% \begin{macrocode} + \ifdim \ta@hblk <\z@ + \setlength{\ta@hblk}{5mm}% + \fi +% \end{macrocode} +% The width of block and the width of the paper can be used to calculate the +% divisor. +% \changes{v2.8q}{2002/03/28}{respect \opt{mpinclude} at the calculation +% of the best divisor} +% If option \opt{mpinclude} is active, we have to multiply the divisor with +% $\frac{3}{3+m}$. $m$ is the number of blocks used for the margin notes. If +% $m=1$ we have an factor of $\frac{3}{4}=0.75$. More difficult would be not +% to use a number of blocks for the margin note column but a dedicated value +% for the width of the margin note column. +% \begin{macrocode} + \if@mincl + \setlength{\ta@temp}{.75\ta@hblk}% + \else + \setlength{\ta@temp}{\ta@hblk}% + \fi + \ta@modiv{\paperwidth}{\ta@temp}% +% \end{macrocode} +% Another difficulty would be, if the divisor now is optimal for the width but +% result in a to large height. To find this out, we first calculate the typing +% area and margins with the found divisor. +% \begin{macrocode} + \@typearea +% \end{macrocode} +% Now, we test the vertical sizes. Again a minimum block size is of 5\,mm will +% be used. But we have to take care the 1\,in of \TeX! +% \changes{v2.5a}{1997/06/22}{\cs{ifdim} instead of \cs{ifnum}} +% \begin{macrocode} + \setlength{\ta@temp}{-1in}% + \addtolength{\ta@temp}{5mm}% + \ifdim\topmargin <\ta@temp +% \end{macrocode} +% This would be the minimum top margin. If the margin is less, we need another +% divisor. In this case we also have to recognize whether the page head and +% footer are part of the margins or the typing area. +% \changes{v2.5b}{1997/06/29}{take care for \opt{headinclude} and +% \opt{footinclude} while calculating the divisor for minimum top +% margin} +% \begin{macrocode} + \setlength{\ta@temp}{15mm}% + \if@hincl\else + \addtolength{\ta@temp}{\headheight}% + \addtolength{\ta@temp}{\headsep}% + \fi + \if@fincl\else + \addtolength{\ta@temp}{\footskip}% + \fi + \divide\ta@temp by3 + \ta@modiv{\paperheight}{\ta@temp}% + \fi +% \end{macrocode} +% A solution for this difficulty has been found. +% \begin{macrocode} + \fi +% \end{macrocode} +% So now we have the final divisor and can do the final calculation. +% \begin{macrocode} + \@typearea +% \end{macrocode} +% \changes{v2.0e}{1994/10/28}{write layout values to the \file{log} file} +% \changes{v2.4i}{1996/11/11}{write to the \file{log} file later} +% \changes{v2.4i}{1996/11/11}{execute \cs{@typearea@end} at the end of \cs{typearea}} +% \changes{v2.4j}{1996/12/04}{\file{log} output with only one +% \cs{textheight} but additional \cs{baselineskip}} +% \changes{v2.5}{1997/06/17}{"`arithmetic overflow"' with \opt{landscape} fixed} +% \changes{v2.95}{2004/01/30}{warning in two column mode fixed} +% \changes{v3.00}{2008/10/08}{use \cs{ta@layoutinfo} to write the layout +% values into the \file{log} file} +% \changes{v3.01b}{2008/12/09}{warning for sub-optimal settings changed} +% \changes{v3.26}{2018/07/16}{warning about long lines changed} +% \changes{v3.26}{2018/07/16}{warning about small lines changed and +% replaced by an info} +% Last but not least we write some layout values into the \file{log} file. For +% some of the information we need additional calculations, e.g., of a good +% line width. +% \begin{macrocode} + \ta@temp@goodwidth + \if@twocolumn + \addtolength{\ta@temp}{\ta@temp}% + \addtolength{\ta@temp}{\columnsep}% + \fi + \setlength{\@tempdima}{\ta@temp}% + \addtolength{\ta@temp}{-\textwidth}% + \divide\@tempdima by100 + \divide\ta@temp by\@tempdima + \@tempcnta=\ta@temp + \ifnum\@tempcnta <5 + \ifnum\@tempcnta >-5 + \@tempcnta=0 + \else + \advance\@tempcnta by4 + \fi + \else + \advance\@tempcnta by-4 + \fi + \ifnum\@tempcnta <-15 + \@tempcnta=-\@tempcnta + \PackageWarningNoLine{typearea}{% + Bad type area settings!\MessageBreak + The detected line width is about + \the\@tempcnta\@percentchar\MessageBreak + larger than the heuristically estimated maximum\MessageBreak + limit of typographical good line width.\MessageBreak + You should e.g. + \ifnum\ta@div >6 decrease DIV, \fi + \ifdim\f@size\p@<\@xiipt\p@ increase fontsize\else + (increase fontsize)\fi\MessageBreak + or change papersize% + }% + \@tempcnta=-\@tempcnta + \else + \ifnum\@tempcnta>15 + \PackageInfoNoLine{typearea}{% + Maybe no optimal type area settings!\MessageBreak + The detected line width is about + \the\@tempcnta\@percentchar\MessageBreak + smaller than the heuristically estimated maximum\MessageBreak + limit of typographical good line width.\MessageBreak + You could e.g. increase DIV% + \ifdim\f@size\p@>\@xpt\p@, decrease fontsize\fi\MessageBreak + or change the papersize% + }% + \fi\fi + \ifnum\ta@div <6 + \PackageWarningNoLine{typearea}{% + Very low DIV value!\MessageBreak + DIV values less than 6 result in textwidth/-height\MessageBreak + smaller than total marginwidth/-height.\MessageBreak + You should e.g. increase DIV, increase fontsize or\MessageBreak + change papersize% + } + \fi + \ta@layoutinfo{\number\ta@div}{\the\@tempcnta}% + \KOMA@kav@removekey{.typearea.\scr@pkgextension}{DIV}% + \KOMA@kav@xadd{.typearea.\scr@pkgextension}{DIV}{\@lastdiv}% + \KOMA@kav@removekey{.typearea.\scr@pkgextension}{BCOR}% + \KOMA@kav@xadd{.typearea.\scr@pkgextension}{BCOR}{\the\ta@bcor}% + \@typearea@end + \activateareas + \ifdim \dimexpr 1in+\topmargin + +\headheight+\headsep + +\textheight + +\footskip+\dp\strutbox\relax + >\paperheight + \PackageWarningNoLine{typearea}{% + page content and margins higher than paper.\MessageBreak + This may result in page footer out of paper.\MessageBreak + You should decrease DIV, decrease foot height,\MessageBreak + or include footer into type area% + }% + \fi + \fi +} +% \end{macrocode} +% +% \begin{macro}{\ta@layoutinfo} +% \changes{v3.00}{2008/10/08}{added} +% Write several layout information into the \file{log} file. The first +% argument is the current divisor and the second the discrepancy from the +% optimal divisor or empty or \cs{relax}. +% \begin{macrocode} +\newcommand*{\ta@layoutinfo}[2]{% + \PackageInfo{typearea}{% + These are the values describing the layout:\MessageBreak + DIV\space\space=\space#1\MessageBreak + BCOR\space=\space\the\ta@bcor\MessageBreak + \string\paperwidth\space\space\space\space\space\space=% + \space\the\paperwidth\MessageBreak + \space\string\textwidth\space\space\space\space\space\space=% + \space\the\textwidth\MessageBreak + \ifx\relax#2\relax\else + \space DIV departure\space\space\space=% + \space#2\@percentchar\MessageBreak + \fi + \space\string\evensidemargin\space=% + \space\the\evensidemargin\MessageBreak + \space\string\oddsidemargin\space\space=% + \space\the\oddsidemargin\MessageBreak + \string\paperheight\space\space\space\space\space=% + \space\the\paperheight\MessageBreak + \space\string\textheight\space\space\space\space\space=% + \space\the\textheight\MessageBreak + \space\string\topmargin\space\space\space\space\space\space=% + \space\the\topmargin\MessageBreak + \space\string\headheight\space\space\space\space\space=% + \space\the\headheight\MessageBreak + \space\string\headsep\space\space\space\space\space\space\space\space=% + \space\the\headsep\MessageBreak + \space\string\topskip\space\space\space\space\space\space\space\space=% + \space\the\topskip\MessageBreak + \space\string\footskip\space\space\space\space\space\space\space=% + \space\the\footskip\MessageBreak + \space\string\baselineskip\space\space\space=% + \space\the\baselineskip\MessageBreak + }% +} +% \end{macrocode} +% \end{macro}^^A \ta@layoutinfo +% \end{command}^^A \typearea +% +% \begin{command}{\recalctypearea} +% \changes{v2.95}{2002/12/04}{added} +% This command can be used to recalculate the typing area and the margins with +% the divisor and the binding correction that has been used last. The command +% is available only after loading the package. So it is an indicator if we +% are in the load or the run-time phase of the package. +% \begin{macrocode} +\AtEndOfPackage{\newcommand*{\recalctypearea}{\typearea[current]{last}}} +% +% \end{macrocode} +% \end{command} +% +% Initially \cs{ta@bcor} and \cs{ta@div} are zero if is has not been set using +% one of the options. The 0 divisor stands for using a value from the default +% list. So the final initialization of the typing area and margins is very +% easy. +% \changes{v2.8q}{2001/11/06}{initialization using symbolic values \opt{current}} +% \begin{macrocode} +%<*package&typearea&final> +\typearea[current]{current} +% +% \end{macrocode} +% +% \subsection{Storage and reactivation of typing area and margin settings} +% +% \begin{command}{\storeareas} +% \changes{v3.10}{2011/09/13}{added} +% \changes{v3.18}{2015/05/20}{Hooks at the beginning and end of the defined macro} +% You can store the current settings of the typing area and the margins in a +% macro. If you use the macro later the stored settings will be restored. +% \begin{macro}{\scr@grouplevel@test} +% \changes{v3.10}{2011/09/13}{added} +% Warn if restoring the settings is used inside a group. +% \begin{macrocode} +%<*package&typearea&body> +\newcommand*{\scr@grouplevel@test}[1]{% + \ifcase\currentgrouptype\else + \PackageWarning{typearea}{% + \string#1\space used at group level + \the\currentgrouplevel.\MessageBreak + Using \string#1\space inside any group, e.g.\MessageBreak + environments, math mode, boxes, etc. may result in\MessageBreak + many type setting problems.\MessageBreak + You should move the command \string#1\MessageBreak + outside all groups% + }% + \fi +} +\newcommand*{\storeareas}[1]{% + \edef\reserved@a{% + \noexpand\newcommand*{\unexpanded{#1}}{% + \noexpand\scr@grouplevel@test\unexpanded{#1}% + \noexpand\csname scr@storeareas@before@hook\noexpand\endcsname + \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@storeareas@before@current@hook\endcsname}% + \noexpand\paperheight=\the\paperheight\space + \noexpand\paperwidth=\the\paperwidth\space + \noexpand\topmargin=\the\topmargin\space + \noexpand\headheight=\the\headheight\space + \noexpand\headsep=\the\headsep\space + \noexpand\textheight=\the\textheight\space + \noexpand\vsize=\the\vsize\space + \noexpand\footskip=\the\footskip\space + \noexpand\@colht=\the\@colht\space + \noexpand\@colroom=\the\@colroom\space + \noexpand\textwidth=\the\textwidth\space + \noexpand\columnwidth=\the\columnwidth\space + \noexpand\hsize=\the\hsize\space + \noexpand\oddsidemargin=\the\oddsidemargin\space + \noexpand\evensidemargin=\if@twoside + \the\evensidemargin + \else + \the\oddsidemargin + \fi\space + \noexpand\linewidth=\the\linewidth\space + \noexpand\maxdepth=\the\maxdepth\space + \scr@ifundefinedorrelax{@pagesizelast}{}{% + \noexpand\KOMAoptions{pagesize=\@pagesizelast}}% + \noexpand\ta@div=\the\ta@div\space + \noexpand\ta@bcor=\the\ta@bcor\space + \noexpand\def\noexpand\@lastdiv{\@lastdiv}% + \noexpand\marginparsep=\the\marginparsep\space + \noexpand\marginparwidth=\the\marginparwidth\space + \noexpand\def + \expandafter\noexpand\csname scr@kav@KOMA.typearea.\scr@pkgextension\endcsname{% + \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@kav@KOMA.typearea.\scr@pkgextension\endcsname}% + }% + \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@storeareas@after@current@hook\endcsname}% + \noexpand\csname scr@storeareas@after@hook\noexpand\endcsname + }% + }% + \reserved@a +} +% \end{macrocode} +% \begin{command}{\BeforeRestoreareas,\AfterRestoreareas} +% \changes{v3.18}{2015/05/20}{added} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\scr@storeareashook,\scr@storeareas@before@hook, +% \scr@storeareas@before@current@hook,\scr@storeareas@after@hook, +% \scr@storeareas@after@current@hook} +% \changes{v3.18}{2015/05/20}{added} +% Adds code to one of the hooks of the macros defined by \cs{storeareas}. +% The star variants adds code only to not yet defined macros. The non-star +% variant also changes already defined macros. +% \begin{macrocode} +\newcommand*{\BeforeRestoreareas}{% + \kernel@ifstar{\scr@storeareashook{before@current}}% + {\scr@storeareashook{before}}% +} +\newcommand*{\AfterRestoreareas}{% + \kernel@ifstar{\scr@storeareashook{after@current}}% + {\scr@storeareashook{after}}% +} +\newcommand*{\scr@storeareashook}[2]{% + \expandafter\l@addto@macro\csname scr@storeareas@#1@hook\endcsname{#2}% +} +\newcommand*{\scr@storeareas@before@hook}{} +\newcommand*{\scr@storeareas@before@current@hook}{} +\newcommand*{\scr@storeareas@after@hook}{} +\newcommand*{\scr@storeareas@after@current@hook}{} +% +% \end{macrocode} +% \end{macro}^^A \scr@storeareashook … \scr@storeareas@after@current@hook +% \end{command}^^A \BeforeRestoreareas,\AfterRestoreareas +% \end{macro}^^A \scr@grouplevel@test +% \end{command}^^A \storeareas +% +% \subsection{Calculation of margins for a given typing area} +% +% Beside the calculation of the typing area and the margins by a divisor +% \pkg*{typearea} also provides the calculation of margins for a given +% typing area. +% +% \begin{option}{areasetadvanced} +% \changes{v3.11}{2012/04/17}{added} +% Switch to advanced version of \cs{areaset}. This does calculate margins +% more like \cs{typearea}. Nevertheless, there's still a difference at the top +% margin, because \cs{typerea} doesn't balance differences in calculated +% height of margins and resulting height of margins but reduces only the +% bottom margin. +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@ifkey{areasetadvanced}{@areasetadvanced} +% +% \end{macrocode} +% \end{option} +% +% \begin{command}{\areaset} +% \changes{v2.1b}{1994/12/31}{\cs{headheight} depends on \cs{@ptsize}} +% \changes{v2.6}{2000/01/04}{\cs{headheight} depends on \cs{f@size} instead +% of \cs{@ptsize}} +% \changes{v2.7g}{2001/04/17}{symbolic value \opt{current} for the +% optional argument} +% \changes{v2.95}{2002/12/05}{execute \cs{@typearea@end} at the end of +% \cs{areaset}} +% If we have given width and height of the typing area we still can calculate +% the margins. Again we want to use this not only in the document preamble but +% also in the document body. +% \begin{macrocode} +%<*package&typearea&body> +\newcommand*\areaset[3][\z@]{% + \edef\@tempa{#1}\edef\@tempb{current}\ifx\@tempa\@tempb\else + \setlength{\ta@bcor}{#1}% + \fi +% \end{macrocode} +% We have to start a new page if we are inside the document body. +% \begin{macrocode} + \if@atdocument\newpage\fi +% \end{macrocode} +% Then we do the calculation. +% \changes{v2.96}{2006/09/12}{set \cs{topskip}} +% \changes{v3.00}{2008/10/08}{use \cs{ta@layoutinfo} to write layout +% information into the \file{log} file} +% \begin{macrocode} + \setlength{\textwidth}{#2}% + \setlength{\textheight}{#3}% + \def\@lastdiv{areaset}% + \KOMA@kav@removekey{.typearea.\scr@pkgextension}{DIV}% + \KOMA@kav@add{.typearea.\scr@pkgextension}{DIV}{areaset}% + \KOMA@kav@removekey{.typearea.\scr@pkgextension}{BCOR}% + \KOMA@kav@add{.typearea.\scr@pkgextension}{BCOR}{\the\ta@bcor}% + \ta@hblk=\paperwidth + \advance\ta@hblk by-\ta@bcor + \advance\ta@hblk by-\textwidth +% \end{macrocode} +% \changes{v3.11}{2012/04/17}{advanced version with different margin widths}% +% With v3.11 we will have an advanced version of \cs{areaset}. This +% version takes care to option \opt{mpinclude}. +% \begin{macrocode} + \if@areasetadvanced + \if@mincl + \divide\ta@hblk by4 + \else + \divide\ta@hblk by3 + \fi + \else + \divide\ta@hblk by3 + \fi + \oddsidemargin=-1in + \evensidemargin=-1in + \if@twoside + \if@semitwoside + \advance\oddsidemargin by1.5\ta@hblk + \advance\oddsidemargin by\ta@bcor +% \end{macrocode} +% \changes{v3.12}{2013/10/15}{use alternating \opt{BCOR} with +% \opt{twoside\quotechar=semi}} +% If \opt{twoside=semi} is used, form v3.12 we add the binding correction +% to the inner margin. If compatibility to version less than 3.12 has been +% selected the binding correction will be added to the left margin. +% \begin{macrocode} + \expandafter\ifnum\scr@ta@v@is@lt{3.12}\relax + \evensidemargin=\oddsidemargin + \else + \advance\evensidemargin by1.5\ta@hblk + \fi + \else + \advance\oddsidemargin by\ta@hblk + \advance\oddsidemargin by\ta@bcor + \advance\evensidemargin by2\ta@hblk + \fi + \else + \advance\oddsidemargin by1.5\ta@hblk + \advance\oddsidemargin by\ta@bcor + \evensidemargin\oddsidemargin + \fi + \scr@ifundefinedorrelax{@ptsize}{% + \topskip=\f@size\p@ + }{% + \topskip=\@ptsize\p@ + \advance\topskip by 10\p@ + }% +% \end{macrocode} +% \changes{v3.11}{2012/04/17}{advanced version with different margin widths}% +% With v3.11 we will have an advanced version of \cs{areaset}. This +% version uses the head height algorithm of \cs{typearea}. +% \begin{macrocode} + \if@areasetadvanced + \normalsize + \@ifundefined{ta@hh}{% + \headheight=1.25\baselineskip + }{% + \headheight=\ta@hh + }% + \else + \headheight=15\p@ + \advance\headheight by\f@size\p@ + \advance\headheight by-10\p@ + \fi + \headsep=1.5\baselineskip +% \end{macrocode} +% \changes{v3.12}{2013/03/26}{changes for height of foot} +% \begin{macrocode} + \@ifundefined{footheight}{\newlength\footheight}{} + \if@areasetadvanced + \@ifundefined{ta@fh}{% + \footheight=1.25\baselineskip + \footskip=3.5\baselineskip + }{% + \footheight=\ta@fh + \footskip=\dimexpr \footheight+2.25\baselineskip\relax + }% + \else + \footheight=1.25\baselineskip + \footskip=3.5\baselineskip + \fi + \ta@vblk=\paperheight + \advance\ta@vblk by-\textheight + \divide\ta@vblk by3 + \if@hincl + \advance\textheight by-\headheight + \advance\textheight by-\headsep + \fi + \if@fincl + \advance\textheight by-\footskip + \fi + \topmargin=-1in + \advance\topmargin by\ta@vblk + \if@hincl \else + \advance\topmargin by-\headheight + \advance\topmargin by-\headsep + \fi + \if@twoside + \if@semitwoside + \marginparwidth=\ta@hblk + \else + \marginparwidth=1.5\ta@hblk + \fi + \else + \marginparwidth=\ta@hblk + \fi + \marginparsep=1cc +% \end{macrocode} +% \changes{v3.11}{2012/04/17}{advanced version with different +% \cs{marginparwidth} and unchanged \cs{marginparsep}}% +% With version 3.11 we will have an advanced version of \cs{areaset}. This +% version supports \opt{mpinclude} option like \cs{typearea}. +% \begin{macrocode} + \if@areasetadvanced + \if@mincl + \marginparwidth=\ta@hblk + \if@twoside\if@semitwoside\else + \advance\evensidemargin by\marginparwidth + \fi\fi + \advance\marginparwidth by-\marginparsep + \fi + \fi + \marginparpush=0.45\baselineskip + \ta@layoutinfo{areaset}{}% +% \end{macrocode} +% \changes{v3.11}{2012/04/17}{using \cs{@areaset@end}} +% \changes{v3.16a}{2015/02/11}{using \cs{footheight} for calculation of +% page usage} +% Since v3.11 we also support \cs{AfterSettingArea} analogous to +% \cs{AfterCalculatingTypearea}: +% \begin{macrocode} + \@areaset@end + \activateareas + \ifdim \dimexpr 1in+\topmargin + +\headheight+\headsep + +\textheight + +\footskip+\footheight-\ht\strutbox\relax + >\paperheight + \PackageWarningNoLine{typearea}{% + page content and margins higher than paper.\MessageBreak + This may result in page footer out of paper.\MessageBreak + You should decrease DIV, decrease foot height,\MessageBreak + or decreate height of text area% + }% + \fi +} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\AfterSettingArea} +% \changes{v3.11}{2012/04/17}{added} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% The user may influence the result of \cs{areaset}. The star version works +% local while the non-star version is global. +% \begin{macrocode} +\newcommand*{\AfterSettingArea}{% + \kernel@ifstar \l@addto@macro \g@addto@macro \@areaset@end +} +% \end{macrocode} +% \begin{macro}{\@areaset@end} +% \changes{v3.11}{2012/04/17}{added} +% Macro \cs{@areaset@end} is a hook to make it possible to add some +% instructions to the end of the \cs{areaset} command. This will be executed +% before the activation of the settings inside a document. +% \begin{macrocode} +\newcommand*{\@areaset@end}{} +% +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \subsection{Deprecated options} +% +% Former versions of \KOMAScript{} had some options that are completely +% deprecated since \KOMAScript{} 3.00. Most of them but not all are pattern +% matching options. +% +% \begin{option}{DIVcalc,DIVclassic} +% \changes{v2.4g}{1996/11/04}{added} +% \changes{v2.95}{2002/12/04}{implemented using option \opt{DIV}} +% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}} +% \changes{v3.01a}{2008/11/21}{deprecated} +% The former form of \opt{DIV=}\opt{calc} and \opt{DIV=}\opt{classic}. +% \begin{macrocode} +%<*package&typearea&options> +\KOMA@DeclareDeprecatedOption[typearea]{DIVcalc}{DIV=calc} +\KOMA@DeclareDeprecatedOption[typearea]{DIVclassic}{DIV=classic} +% +% \end{macrocode} +% \end{option}^^A DIVcalc,DIVclassic +% +% \begin{option}{a...paper,b...paper,c...paper,d...paper} +% Formerly \opt{a}\meta{integer}\opt{paper}, +% \opt{b}\meta{integer}\opt{paper}, +% \opt{c}\meta{integer}\opt{paper}, +% \opt{d}\meta{integer}\opt{paper} has been documented. Since +% \KOMAScript{} v3.00 most of them are deprecated and has been replaced by +% option \opt{paper}. Nevertheless, for compatibility these options and the +% commands needed to recognize and handle them are still implemented. +% +% +% \begin{macro}{\x@paper} +% \begin{macro}{\x@@paper} +% \changes{v2.5}{1997/06/17}{pattern matching of paper sizes} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \changes{v3.28}{2019/11/18}{\cs{ifnumber} renamed to \cs{Ifnumber}} +% This macros will be needed when the paper size will be generated. +% \begin{command}{\isopaper} +% \changes{v2.5}{1997/06/17}{new} +% \changes{v2.95}{2002/12/03}{upper case letters are also allowed} +% \changes{v3.23}{2017/02/22}{using \cs{ISO@PaperNameToSize}} +% Because \cs{isopaper} is used inside the paper size detection by pattern +% matching to select a specific ISO/DIN paper size, it has to be defined +% before the pattern matching will be done. +% \begin{macrocode} +%<*package&typearea&options> +\newcommand\isopaper[2][a]{% +% \end{macrocode} +% The command has to parameters. The first one is optional and the basic size +% given by one of the letters: +% \begin{description} +% \item[a] -- ISO/DIN A sizes +% \item[b] -- ISO/DIN B sizes +% \item[c] -- ISO/DIN C sizes +% \item[d] -- ISO/DIN D sizes +% \end{description} +% The second and mandatory argument is the scale number +% \begin{macrocode} + \ISO@PaperNameToSize[typearea]#1#2\@nil +% \end{macrocode} +% Select either landscape or portrait: +% \changes{v2.97e}{2007/10/23}{landscape or portrait} +% \changes{v3.22}{2016/07/29}{adapting paper orientation} +% \begin{macrocode} + \expandafter\ifnum\scr@ta@v@is@ge{3.22}\relax + \scr@setpaperorientation + \else + \if@landscape\scr@switchpapersizes\fi + \fi +} +% \end{macrocode} +% \pkg*{typearea} uses its own error message. +% \begin{macro}{\scr@UnknownPaperSize@typearea} +% \changes{v3.23}{2017/02/22}{new} +% \begin{macrocode} +\ProvideUnknownPaperSizeError{typearea}{% + \PackageError{typearea}{% + Unknown ISO/DIN-papersize-letter #1% + }{% + There are only four defined paper scalings:\MessageBreak + a = ISO/DIN-A, b = ISO/DIN-B, c = ISO/DIN-C, + d = ISO/DIN-D\MessageBreak + Read KOMA-Script-documentation for further information.% + }% + \setlength{\paperwidth}{841sp}% + \setlength{\paperheight}{1189sp}% +} +% \end{macrocode} +% \end{macro}^^A \scr@UnknownPaperSize@typearea +% \end{command}^^A \isopaper +% \begin{macro}{\scr@setpaperorientation} +% \changes{v3.22}{2016/07/29}{new} +% Setup the paper orientation depending on \cs{if@landscape}. +% \begin{macrocode} +\newcommand*\scr@setpaperorientation{% + \ifdim\paperheight>\paperwidth + \if@landscape\scr@switchpapersizes\fi + \else + \if@landscape\else\scr@switchpapersizes\fi + \fi +} +% \end{macrocode} +% \begin{macro}{\scr@switchpapersizes} +% \changes{v3.22}{2016/07/29}{new} +% Switches the two lengths \len{paperwidth} and \len{paperheight}. +% \begin{macrocode} +\newcommand*\scr@switchpapersizes{% + \@tempdima\paperwidth\paperwidth\paperheight\paperheight\@tempdima +} +% \end{macrocode} +% \end{macro}^^A \scr@switchlength +% \end{macro}^^A \scr@setpaperorientation +% \begin{macro}{\iso@paper} +% \changes{v2.95}{2002/12/03}{new} +% Similar to \cs{isopaper} but with only one argument for the base size and +% the scale number. +% \begin{macro}{\iso@@paper} +% \changes{v2.95}{2002/12/03}{new} +% \changes{v3.28}{2019/11/18}{\cs{ifnumber} renamed to \cs{Ifnumber}} +% The single argument is split into base size letter and scale number by +% pattern matching. +% \begin{macrocode} +\newcommand*{\iso@paper}[1]{\expandafter\iso@@paper#1\@nil} +\newcommand*{\iso@@paper}{} +\def\iso@@paper#1#2\@nil{% + \@tempswafalse + \if #1a\@tempswatrue + \else\if #1A\@tempswatrue + \else\if #1b\@tempswatrue + \else\if #1B\@tempswatrue + \else\if #1c\@tempswatrue + \else\if #1C\@tempswatrue + \else\if #1d\@tempswatrue + \else\if #1D\@tempswatrue + \fi\fi\fi\fi\fi\fi\fi\fi + \if@tempswa + \Ifnumber{#2}{\isopaper[#1]{#2}}{\@tempswafalse}% + \fi +} +% +% \end{macrocode} +% \end{macro}^^A \iso@@paper +% \end{macro}^^A \iso@paper +% +% \begin{option}{DIV...} +% \begin{option}{BCOR...} +% Formerly \opt{DIV}\meta{integer}, \opt{BCOR}\meta{length}, +% \opt{headlines}\meta{real} has been documented as options. Since +% \KOMAScript{} 3.00 these have been replaced by \opt{DIV=}\meta{integer}, +% \opt{BCOR=}\meta{length} and +% \opt{headlines=}\meta{real}. Nevertheless, for compatibility the +% deprecated options are still handled by \cs{DeclareOption*} and so we +% need several helper macros to recognize them. +% +% +% \begin{macro}{\@BCOR} +% \begin{macro}{\@@BCOR} +% \changes{v2.5}{1997/06/17}{Single letter scanner replaced by pattern matching} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% Macro \cs{@BCOR} it needed to handle option \opt{BCOR\emph{BCOR}}. The +% option is recognized by pattern matching. +% \begin{macrocode} +%<*(class|(package&typearea))&options> +\newcommand*{\@BCOR}{\expandafter\@@BCOR\CurrentOption BCORBCOR\@@BCOR} +\newcommand*{\@@BCOR}{} +\def\@@BCOR #1BCOR#2BCOR#3\@@BCOR{% +% \end{macrocode} +% If it is option \opt{BCOR} the first argument is empty. +% \begin{macrocode} + \Ifstr{#1}{}{% +% \end{macrocode} +% Additionally the third argument is |BCOR|. +% \begin{macrocode} + \Ifstr{#3}{BCOR}{% +% \end{macrocode} +% Now, the second argument should be the size. If this is not the case, an +% error has to be reported. +% \changes{v3.22}{2016/07/29}{missing deprecated option warning added} +% \changes{v3.28}{2019/11/18}{\cs{ifdimen} renamed to \cs{Ifdimen}} +% \changes{v3.30}{2020/03/24}{avoid error message for unknown \opt{BCOR} +% value to \cs{documentclass}} +% \changes{v3.31}{2020/04/27}{improved valid value recognization} +% \begin{macrocode} +%<*class> + \Ifstrstart{#2}{=}{% + \edef\reserved@a{\noexpand\Ifdimen{\@gobble#2}}% + \reserved@a{\PassOptionsToPackage{BCOR#2}{typearea}}{\OptionNotUsed}% + }{% + \Ifdimen{#2}{\PassOptionsToPackage{BCOR#2}{typearea}}{\OptionNotUsed}% + }% +% +%<*package> + \Ifdimen{#2}{% + \KOMA@UseDeprecatedOption{% + \PackageWarningNoLine{typearea}}{BCOR#2}{BCOR=#2}% + }{\scr@pti@nerr@r}% +% +% \end{macrocode} +% In all other cases it is not this option. So we report an error. Instead of +% the error another option could be tested. +% \begin{macrocode} + }{\scr@pti@nerr@r}% + }{\scr@pti@nerr@r}% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@DIV} +% \begin{macro}{\@@DIV} +% \changes{v2.5}{1997/06/17}{Single letter scanner replaced by pattern matching} +% \changes{v3.22}{2016/07/29}{missing deprecated option warning added} +% \changes{v3.28}{2019/11/18}{\cs{ifnumber} renamed to \cs{Ifnumber}} +% \changes{v3.30}{2020/03/24}{avoid error message for unknown \opt{DIV} +% value to \cs{documentclass}} +% \changes{v3.31}{2020/04/27}{improved valid value recognization} +% Here we use more or less the same functionality as with \cs{@BCOR} and \cs{@@BCOR}. +% \begin{macrocode} +\newcommand*{\@DIV}{\expandafter\@@DIV\CurrentOption DIVDIV\@@DIV} +\newcommand*{\@@DIV}{} +\def\@@DIV #1DIV#2DIV#3\@@DIV{% + \edef\@tempa{#1}\ifx\@tempa\@empty + \edef\@tempa{#3}\def\@tempb{DIV}\ifx\@tempa\@tempb +%<*class> + \Ifstrstart{#2}{=}{% + \edef\reserved@a{\noexpand\Ifnumber{\@gobble#2}}% + \reserved@a{\PassOptionsToPackage{DIV#2}{typearea}}{\OptionNotUsed}% + }{% + \Ifnumber{#2}{\PassOptionsToPackage{DIV#2}{typearea}}{\OptionNotUsed}% + }% +% +%<*package> + \Ifnumber{#2}{% + \KOMA@UseDeprecatedOption{% + \PackageWarningNoLine{typearea}}{DIV#2}{DIV=#2}% + }{\scr@pti@nerr@r}% +% + \else\scr@pti@nerr@r\fi +% \end{macrocode} +% The only difference is, that we do not report an error but also test for +% \opt{BCOR}. +% \begin{macrocode} + \else\@BCOR\fi +} +% \end{macrocode} +% \end{macro}^^A \@@DIV +% \end{macro}^^A \@DIV +% +% \begin{option}{headlines...} +% \begin{macro}{\@headlines} +% \begin{macro}{\@@headlines} +% \changes{v2.7g}{2001/04/17}{neW pattern matching for the number of headlines} +% The macros are needed to recognize the deprecated option +% \opt{headlines\meta{integer}}. +% \begin{macrocode} +\newcommand{\@headlines}{% + \expandafter\@@headlines\CurrentOption headlines\@@headlines% +} +\newcommand*{\@@headlines}{} +\def\@@headlines #1headlines#2\@@headlines{ + \edef\@tempa{#2}\edef\@tempb{headlines}\ifx\@tempa\@tempb +% \PassOptionsToPackage{#1headlines}{typearea} +% \setlength{\@tempdima}{#1\baselineskip}% +% \def\ta@hh{#1\baselineskip}% + \else\@DIV\fi +} +% +% \end{macrocode} +% \end{macro}^^A \@headlines +% \end{macro}^^A \@@headlines +% +% Starting point for all the deprecated pattern matching options is +% \cs{DeclareOption*} for command \cs{x@paper} that uses pattern +% matching with \cs{x@@paper} to recognize the deprecated options. These +% are needed not only for package \pkg*{typearea} but also for the classes. +% +% Back to the pattern matching. This one is the most simple of all. +% \changes{v2.97e}{2007/10/23}{passing options \pkg*{typearea} using the new syntax} +% \begin{macrocode} +%<*(class|(package&typearea))&options> +\newcommand*{\x@paper}{% + \expandafter\x@@paper\CurrentOption paper\x@@paper% +} +\newcommand*{\x@@paper}{} +\def\x@@paper #1#2paper#3\x@@paper{% + \Ifstr{#3}{paper}{% + \Ifnumber{#2}{% + \Ifstr{#1}{a}{% +% \PassOptionsToPackage{#3=#1#2}{typearea}% +% \isopaper[a]{#2}% + }{% + \Ifstr{#1}{b}{% +% \PassOptionsToPackage{#3=#1#2}{typearea}% +% \isopaper[b]{#2}% + }{% + \Ifstr{#1}{c}{% +% \PassOptionsToPackage{#3=#1#2}{typearea}% +% \isopaper[c]{#2}% + }{% + \Ifstr{#1}{d}{% +% \PassOptionsToPackage{#3=#1#2}{typearea}% +% \isopaper[d]{#2}% + }{\scr@pti@nerr@r}% + }% + }% + }% + }{\scr@pti@nerr@r}% + }{% +% \@pt@scan +% \@headlines + }% +} +% \end{macrocode} +% +% \begin{macro}{\scr@pti@nerr@r} +% \changes{v2.95}{2002/06/20}{\cs{OptionNotUsed} instead of \cs{PackageError}} +% If the addition option is neither \opt{BCOR\dots} nor \opt{DIV\dots} nor +% \opt{headlines} nor a known paper size, it is still unused. +% \begin{macrocode} +\newcommand*{\scr@pti@nerr@r}{ +% \OptionNotUsed +% \@unknownoptionerror +} +% \end{macrocode} +% \end{macro} +% +% \changes{v2.97c}{2007/09/12}{\cs{lco@test} added to before pattern matching +% of options} +% \begin{macrocode} +\DeclareOption*{% +% \lco@test + \x@paper} +% +% \end{macrocode} +% \end{option}^^A headline... +% \end{option}^^A DIV... +% \end{option}^^A BCOR... +% \end{macro}^^A \x@paper +% \end{macro}^^A \x@@paper +% \end{option}^^A a...paper … d...paper +% +% +% ^^A This part should stay at the end of the source file! +% \subsection{Configuration file} +% +% At the very ending of the option section just before executing and +% processing the options you can add additional options the +% \pkg*{typearea}. This is a very seldom used feature and I recommend to +% not use it any longer. If you need additional options use +% |\BeforeFamilyProcessOptions[.typearea.sty]{KOMA}{...}|. +% +% \changes{v2.0e}{1994/10/28}{configuration file \file{typearea.cfg}} +% \begin{macrocode} +%<*package&typearea&options> +\InputIfFileExists{typearea.cfg}{% + \typeout{% + ***************************************^^J% + * Local config file typearea.cfg used^^J% + ***************************************% + } +}{} +% +% \end{macrocode} +% +% \subsection{Option execution} +% +% The paper size and telling the back-end driver information about the paper +% size are default. The default for the default paper size will be \opt{A4} +% if nothing else was defined by a class. Execution of option \opt{twoside} +% depends already on the setting of \cs{if@twoside} and +% \cs{if@semitwoside}. This may be surprising but nevertheless is correct. +% \changes{v2.3h}{1995/01/19}{\cs{relax} after \cs{ProcessOptions} added} +% \changes{v2.96}{2006/08/18}{processing options in order of usage instead of +% order of declaration} +% \changes{v2.97c}{2007/04/19}{Usage of \cs{KOMAExecuteOptions} instead of +% \cs{KOMAoptions}} +% \changes{v2.97c}{2007/04/19}{Usage of \cs{KOMAProcessOptions} instead of +% \cs{ProcessOptions}} +% \changes{v2.97c}{2007/04/19}{set only options that are not an implicit +% default} +% \changes{v2.97c}{2007/07/18}{explicit setting of a valid value to +% \opt{twoside}} +% \changes{v3.12}{2013/11/11}{the default paper size is given by +% \cs{defaultpagesize}} +% \changes{v3.17}{2015/03/02}{\opt{pagesize} is default} +% \begin{macro}{\defaultpapersize} +% \changes{v3.12}{2013/11/11}{added} +% The default paper size. Defined using \cs{providecommand} so it can be +% changed by a class or wrapper package or \file{typearea.cfg} or somewhere +% else before loading \pkg*{typearea}. +% \begin{macrocode} +%<*package&typearea&options> +\providecommand*{\defaultpapersize}{A4} +% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +%<*package&typearea&options> +\KOMAExecuteOptions{paper=\defaultpapersize,pagesize} +\if@twoside + \if@semitwoside + \KOMAExecuteOptions{twoside=semi} + \else + \KOMAExecuteOptions{twoside} + \fi +\else + \KOMAExecuteOptions{twoside=false} +\fi +\KOMAProcessOptions\relax +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrkernel-variables.dtx b/macros/latex/contrib/koma-script/scrkernel-variables.dtx new file mode 100644 index 0000000000..b58929f2e7 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrkernel-variables.dtx @@ -0,0 +1,463 @@ +% \iffalse meta-comment +% ====================================================================== +% scrkernel-variables.dtx +% Copyright (c) Markus Kohm, 2006-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrkernel-variables.dtx 3874 2022-06-05 10:38:02Z kohm $ +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrkernel-version.dtx b/macros/latex/contrib/koma-script/scrkernel-version.dtx new file mode 100644 index 0000000000..68e66a542b --- /dev/null +++ b/macros/latex/contrib/koma-script/scrkernel-version.dtx @@ -0,0 +1,263 @@ +% \iffalse meta-comment +% ====================================================================== +% scrkernel-version.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrkernel-version.dtx 3920 2022-07-04 08:01:38Z kohm $ +% +% ATTENTION: In this file parts of the code and documentation are before the +% driver. This must be, because this part of the code is needed by the driver +% in this file and most of the other KOMA-Script dtx-files. +% +% \fi^^A meta-comment +% +% \changes{v2.0e}{1994/07/07}{first release of \cls*{scrartcl}, +% \cls*{scrreprt}, and \cls*{scrbook}} +% \changes{v2.95}{2002/06/25}{first version of this file by splitting of +% \file{scrclass.dtx}} +% \changes{v3.36}{2022/02/11}{switch over from \cls*{scrdoc} to +% \cls*{koma-script-source-doc}} +% \changes{v3.36}{2022/02/11}{whole implementation documentation in English} +% +% \GetFileInfo{scrkernel-version.dtx} +% \title{The Version of the \href{https://komascript.de}{\KOMAScript} Kernel +% and therefore the Classes and most of the Packages} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Version \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% \filename{} is not only used for the code of all \KOMAScript{} classes and +% most of the \KOMAScript{} packages. It is also used by most of the +% installation drivers (\file{ins}-files) for the definition of +% \KOMAScript{} version. +% \end{abstract} +% \tableofcontents +% +% +% \section{User Manual} +% +% You can find the user documentation of the commands implemented here in the +% \KOMAScript{} manual, either the German \file{scrguide} or the English +% \file{scrguien}. +% +% \MaybeStop{\PrintIndex} +% +% \section{Implementation of the \KOMAScript{} Kernel Version Information} +% +% \begin{command}{\KOMAScriptVersion} +% \changes{v2.95}{2002/06/25}{added} +% This is the \KOMAScript{} version the file is related to. It is also added +% to the classes and most of the packages by the installation drivers. This is +% done using \file{scrdocstrip.tex} and additionally loading this file. +% \begin{macro}{\@CheckKOMAScriptVersion} +% \changes{v2.95}{2002/06/25}{added} +% Depending on \cs{KOMAScriptVersion} already defined or not, the existing +% definition is compared with the version here or \cs{KOMAScriptVersion} is +% newly and globally defined. This has to work not only in class or package +% files, but also in document files. So \cs{makeatletter} inside a group is +% needed for the internal macros. Additionally a guard \texttt{ignorethis} is +% used, to avoid adding code, that is needed only for the installation driver, +% also to classes or packages. +% \begin{macrocode} +\begingroup + \catcode`\@11\relax +%<*ignorethis> + \ifx\newcommand\undefined + \gdef\@CheckKOMAScriptVersion#1{% + \global\KOMAdefVariable{KOMAScriptVersion}{\space\space#1}% + \expandafter\ifx\csname ifbeta\endcsname\relax + \def\@defbeta##1 ##2 ##3KOMA-Script{% + \def\@cmpstrA{##3}\def\@cmpstrB{BETA }% + \ifx\@cmpstrA\@cmpstrB + \expandafter\expandafter\expandafter\global + \expandafter\expandafter\expandafter\let + \expandafter\csname ifbeta\expandafter\endcsname + \csname iftrue\endcsname + \fi + }\expandafter\@defbeta\KOMAvar@KOMAScriptVersion + \fi + \expandafter\ifx\csname ifbeta\endcsname\relax + \def\@defbeta##1 ##2.##3.##4 KOMA-Script\@nil{% + \def\@cmpstrA{##4}\def\@cmpstrB{}% + \ifx\@cmpstrA\@cmpstrB\else + \expandafter\expandafter\expandafter\global + \expandafter\expandafter\expandafter\let + \expandafter\csname ifbeta\expandafter\endcsname + \csname iftrue\endcsname + \fi + }\expandafter\@defbeta\KOMAvar@KOMAScriptVersion. KOMA-Script\@nil + \fi + \expandafter\ifx\csname ifbeta\endcsname\relax + \expandafter\expandafter\expandafter\global + \expandafter\expandafter\expandafter\let + \expandafter\csname ifbeta\expandafter\endcsname + \csname iffalse\endcsname + \fi + \aftergroup\endinput + }% + \else +% + \ifx\KOMAScriptVersion\undefined + \newcommand*{\@CheckKOMAScriptVersion}[1]{% + \gdef\KOMAScriptVersion{#1}% + }% + \else + \newcommand*{\@CheckKOMAScriptVersion}[1]{% + \def\@tempa{#1}% + \ifx\KOMAScriptVersion\@tempa\else + \@latex@warning@no@line{% + \noexpand\KOMAScriptVersion\space is + `\KOMAScriptVersion',\MessageBreak + but `#1' was expected!\MessageBreak + You should not use classes, packages or files + from\MessageBreak + different KOMA-Script versions% + }% + \fi + } +%<*ignorethis> + \fi +% + \fi +% \end{macrocode} +% Note: Following line will be patched by \file{makebetaorrelase.sh} and +% therefore the syntax or general structure of the line must not be changed! +% \begin{macrocode} + \@CheckKOMAScriptVersion{2022/07/04 v3.37 KOMA-Script}% +\endgroup +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \iffalse +%<*dtx> +\ProvidesFile{scrkernel-version.dtx}[\KOMAScriptVersion (versions)] +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\begin{document} + \DocInput{scrkernel-version.dtx} +\end{document} +% +% \fi +% +% \subsection{Implementation of class and package names and file names} +% +% \begin{description} +% \item[ToDo] Maybe, this should be split in one file for each class. The file +% extension code should be moved to \file{scrkernel-miscellaneous.dtx}. +% \end{description} +% +% \begin{macro}{\scr@pkgextension} +% \changes{v3.17}{2015/03/17}{added} +% \begin{macro}{\scr@clsextension} +% \changes{v3.17}{2015/03/17}{added} +% \changes{v3.18}{2015/06/17}{fixed} +% Last but not least same like \cs{@pkgextension} and \cs{@clsextension} but +% still valid after the preamble. +% \begin{macrocode} +%<*class|package> +%\providecommand*{\scr@pkgextension}{\@pkgextension} +%\providecommand*{\scr@clsextension}{\@clsextension} +\AtBeginDocument{% +% \let\scr@pkgextension\@pkgextension +% \let\scr@clsextension\@clsextension +} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{command}{\KOMAClassFileName} +% \changes{v3.17}{2014/03/12}{added} +% \begin{command}{\KOMAClassName} +% \changes{v2.95}{2004/11/04}{added} +% \begin{command}{\KOMALongClassFileName,\KOMALongClassName} +% \changes{v3.27}{2019/02/16}{added} +% \begin{command}{\ClassName} +% \changes{v2.95}{2004/11/04}{added} +% We define the name of each \KOMAScript{} class and the name of the +% \emph{class} of the class (usually name of the corresponding standard class) +% once. This allows to use code, that outputs the name of the class, for +% several classes without using always class specific code. +% \begin{macrocode} +%<*class> +\newcommand*{\KOMAClassName}{% +% scrartcl% +% scrreprt% +% scrbook% +% scrlttr2% +} +%<*!long> +\newcommand*{\KOMAClassFileName}{\KOMAClassName.\@clsextension} +\edef\KOMAClassFileName{\KOMAClassFileName} +% +\newcommand*{\ClassName}{% +% article% +% report% +% book% +% letter% +} +%<*long> +\newcommand*{\KOMALongClassName}{} +%\edef\KOMALongClassName{scr\ClassName} +%\def\KOMALongClassName{scrletter} +\newcommand*{\KOMALongClassFileName}{\KOMALongClassName.\@clsextension} +\edef\KOMALongClassFileName{\KOMALongClassFileName} +% +% \end{macrocode} +% \end{command} +% \end{command} +% \end{command} +% \end{command} +% \begin{macrocode} +%\ProvidesClass{\KOMAClassName}[% +%\ProvidesClass{\KOMALongClassName}[% +%!KOMAScriptVersion + document class (\ClassName)% +] +%<*long> +\let\ClassName\relax +%\providecommand*{\@ptsize}{12} +\expandafter\let\expandafter\KOMAClassName\expandafter\relax +\expandafter\LoadClassWithOptions\expandafter{\KOMAClassName} +%\RequirePackage{scrletter} +% +% +% \end{macrocode} +% +% \begin{macrocode} +%<*package&letter> +\ProvidesPackage{scrletter}[% +%!KOMAScriptVersion + letter package extending any KOMA-Script class% +] +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrlayer-notecolumn.dtx b/macros/latex/contrib/koma-script/scrlayer-notecolumn.dtx new file mode 100644 index 0000000000..f523537238 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrlayer-notecolumn.dtx @@ -0,0 +1,1703 @@ +% \iffalse^^A meta-comment +% ====================================================================== +% scrlayer-notecolumn.dtx +% Copyright (c) Markus Kohm, 2013-2022 +% +% 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 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.md. +% ---------------------------------------------------------------------- +% ====================================================================== +%%% From File: $Id: scrlayer-notecolumn.dtx 3915 2022-06-29 07:09:48Z kohm $ +%%%% (run: identify) +%%%% (run: init) +%%%% (run: options) +%%%% (run: body) +%%%% (run: final) +%<*dtx> +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\begingroup + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2022-06-29 09:09:48 +0200 (Mi, 29. Jun 2022) $ + \def\filerevision$#1: #2 ${\gdef\filerevision{v0.3.#2}} + \filerevision$Revision: 3915 $ + \edef\reserved@a{% + \noexpand\endgroup + \noexpand\ProvidesFile{scrlayer-notecolumn.dtx}% + [\filedate\space\filerevision\space + KOMA-Script package source + }% +\reserved@a +% +%<*identify|doc> +%\NeedsTeXFormat{LaTeX2e}[1995/12/01] +%\ProvidesPackage{scrlayer-notecolumn}[% +%\ProvidesFile{scrlayer-notecolumn.tex}[% +% Sometimes following will be replaced by !KOMASCRIPTVERSION: +%!SCRLAYERVERSION +% package +% +%<*dtx|identify|doc> + (end user interface for scrlayer)] +% +%<*dtx> +\ifx\documentclass\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \expandafter\let\csname ifbetawas\expandafter\endcsname + \csname ifbeta\endcsname + \expandafter\let\csname ifbeta\expandafter\endcsname + \csname iftrue\endcsname + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHTFROM}{2013} + \KOMAdefVariable{SCRLAYERVERSION}{% + \space\space\filedate\space\filerevision\space KOMA-Script + }% + \generate{\usepreamble\defaultpreamble + \file{scrlayer-notecolumn.sty}{% + \from{scrlayer-notecolumn.dtx}{interface,notecolumn,identify}% + \from{scrlayer.dtx}{interface,notecolumn,init}% + \from{scrlayer-notecolumn.dtx}{interface,notecolumn,init}% + \from{scrlayer.dtx}{interface,notecolumn,options}% + \from{scrlayer-notecolumn.dtx}{interface,notecolumn,options}% + \from{scrlayer.dtx}{interface,notecolumn,body}% + \from{scrlayer-notecolumn.dtx}{interface,notecolumn,body}% + \from{scrlayer-notecolumn.dtx}{interface,notecolumn,final}% + \from{scrlogo.dtx}{logo}% + }% + } + \expandafter\let\csname ifbeta\expandafter\endcsname + \csname ifbetawas\endcsname + \@@input scrstrop.inc +\else + \let\endbatchfile\relax +\fi +\endbatchfile +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\usepackage{hvlogos} +\setcounter{StandardModuleDepth}{2} +\begin{document} + \DocInput{scrlayer-notecolumn.dtx} +\end{document} +% +% \fi^^A meta-comment +% +% \changes{v0.0}{2013/04/26}{start of interface} +% \changes{v0.3.3532}{2020/09/11}{do not use deprecated interface commands} +% \changes{v3.36}{2022/02/10}{switch over from \cls*{scrdoc} to +% \cls*{koma-script-source-doc}} +% \changes{v3.36}{2022/02/10}{require package \pkg*{scrlogo} instead of +% defining \cs{KOMAScript}} +% +% \GetFileInfo{scrlayer-notecolumn.dtx} +% \title{Providing Note Columns Similar to \cs{marginpar} with +% \href{https://komascript.de}{\KOMAScript} Package +% \pkg*{scrlayer-notecolumn} as Proof of Concept about Layers with +% \href{https://komascript.de}{\KOMAScript} Package \pkg*{scrlayer}} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Version \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% This package is only a proof of concept. The main sense of the package is, +% to show the power of layers with \pkg{scrlayer}. It was never intended to +% be used as a productivity package. So there is no support for using +% it. Several features are only rudimentary. Several can be improved. Please +% feel free to fork this package. +% \end{abstract} +% \tableofcontents +% +% \section{User Manual} +% +% You can find the user manuals of \pkg*{scrlayer-notecolumn} in the \KOMAScript{} +% manual, either the German \file{scrguide} or the English \file{scrguien}. +% +% \MaybeStop{\PrintIndex} +% +% \section{Implementation of \pkg*{scrlayer-notecolumn}} +% +% \begin{macrocode} +%<*interface> +% \end{macrocode} +% +% +% \subsection{Initialising some values before the options} +% +% Initialization before all options (even the options from +% \file{scrlayer.dtx}). +% +% Here we test the used pdf\TeX{} primitives. +% \changes{v0.1}{2015/10/07}{ready for renaming \cs{pdfsavepos} and +% \cs{pdflastypos} in luaTeX} +% \changes{v0.1.2483}{2016/06/28}{grouping fixed} +% \begin{macrocode} +%<*init> +\@tempswatrue +\scr@ifundefinedorrelax{pdfsavepos}{% + \scr@ifundefinedorrelax{savepos}{% + \expandafter\@tempswafalse + }{% + \let\scr@savepos\savepos + }% +}{% + \let\scr@savepos\pdfsavepos +} +\scr@ifundefinedorrelax{pdflastypos}{% + \scr@ifundefinedorrelax{lastypos}{% + \expandafter\@tempswafalse + }{% + \let\scr@lastypos\lastypos + }% +}{% + \let\scr@lastypos\pdflastypos +}% +\if@tempswa\else + \PackageError{scrlayer-notecolumn}{missing pdfTeX/luaTeX features}{% + This package needs \string\pdfsavepos\space or \string\savepos\space + and\MessageBreak + \string\pdflastypos\space or \string\lastypos.\MessageBreak + This error is fatal, because usage of the package without these + features\MessageBreak + cannot work!\MessageBreak + You shouldn't continue, but if you'd try, I'll try to abort the LaTeX run + }% + \batchmode\csname @@end\endcsname\end +\fi +% +% \end{macrocode} +% +% +% \subsection{Making a note column} +% +% The package supports a various number of note columns. Each is referenced by +% a unique name. +% +% \begin{command}{\DeclareNoteColumn} +% \begin{description} +% \item[\oarg{option list}:] a comma-separated list of +% \texttt{\meta{key}=\meta{value}} pairs. +% \item[\marg{string}:] the name of the note column (must be fully expandable +% and expand to a string only). +% \end{description} +% That's the primary command for note columns. It defines everything, the note +% column needs. +% \begin{macrocode} +%<*body> +\newcommand*{\DeclareNoteColumn}[2][]{% +% \end{macrocode} +% First of all we need a box register. The contents of the note column will be +% build inside of this register. Since \eTeX{} registers shouldn't be a +% problem. User should use package \pkg{etex}, if he or she runs out of +% registers. Note, that the registers will stay allocated, if the interface +% will be removed! Nevertheless, the name will be destroyed! +% \begin{macrocode} + \@ifundefined{slnc@#2@box}{% + \expandafter\newsavebox\csname slnc@#2@box\endcsname + }{}% +% \end{macrocode} +% There's also a kind of item stack of unprocessed notes for each note column. +% \begin{macrocode} + \@ifundefined{slnc@#2@unprocessed}{% + \@namedef{slnc@#2@unprocessed}{}% + }{}% +% \end{macrocode} +% Next we need a horizontal positions and a width for the note column. Neither +% the horizontal position nor the width are stretchable or shrinkable. The +% position should be variable depending on the page. So it's better to use a +% macro instead of a length. The width isn't more variable than, e.g., the +% text width. So we can use a macro too. Both will be initialised to the +% normal marginal note column later. +% \changes{3.27}{2019/02/14}{initialization of one color stack per note column} +% For color support we also need one color stack per note column. A color +% stack is a feature only available for pdf\TeX{} and lua\TeX{}. +% \begin{macrocode} + \@ifundefined{slnc@#2@colorstack}{% + \scr@ifundefinedorrelax{pdfcolorstackinit}{% + \scr@ifundefinedorrelax{pdffeedback}{}{% + \expandafter\chardef\csname slnc@#2@colorstack\endcsname= + \pdffeedback colorstackinit direct {\slnc@initial@black}% + }% + }{% + \expandafter\chardef\csname slnc@#2@colorstack\endcsname= + \pdfcolorstackinit direct {\slnc@initial@black}% + }% + }{}% +% \end{macrocode} +% If there isn't a font element for the (new) note column, we define a new one +% and add it to the auto-remove code: +% \begin{macrocode} + \@ifundefined{scr@fnt@notecolumn.#2}{% + \@ifundefined{@notecolumn.#2font}{}{% + \PackageInfo{scrlayer-notecolumn}{using already defined + macro\MessageBreak + `\expandafter\string\csname @notecolumn.#2font\endcsname' for font + element\MessageBreak + `notecolumn.#2'% + }% + }% + \newkomafont{notecolumn.#2}{}% + }{% + \PackageInfo{scrlayer-notecolumn}{using already defined font + element\MessageBreak + `notecolumn.#2'% + }% + }% +% \end{macrocode} +% After the initialisation we process the options, that may change the initial +% values. +% \begin{macrocode} + \newcommand*{\slnc@name}{}% + \edef\slnc@name{#2}% + \FamilyExecuteOptions[.definenotecolumn]{KOMAarg}{marginpar,#1}% + \let\slnc@name\relax +% \end{macrocode} +% The values are set up, so they may be used to declare a layer. +% \begin{macrocode} + \DeclareLayer[% + foreground,% + align=tl,% + voffset=1in+\topmargin+\headheight+\headsep,% + height=\dimexpr\textheight+\topskip\relax,% + hoffset=\csname slnc@#2@pos\endcsname,% + width=\csname slnc@#2@width\endcsname,% + contents=\slnc@processnotes{#2}% + ]{notecolumn.#2} +% \end{macrocode} +% We need to add the layer to every page style. The easiest way to do this is +% to add it to the pseudo layer page style \pstyle{@everystyle@}. +% \changes{v0.1.1681}{2014/02/05}{add the layer only once} +% \begin{macrocode} + \IfLayerAtPageStyle{@everystyle@}{notecolumn.#2}{}{% + \AddLayersToPageStyle{@everystyle@}{notecolumn.#2}% + }% +% \end{macrocode} +% Last but not least, we add the new note column to the note column procession +% list. +% \begin{macrocode} + \@cons\slnc@processnotecolumns{{#2}}% +} +% \end{macrocode} +% \begin{macro}{\slnc@initial@black} +% \changes{v0.2.3085}{2019/02/14}{added} +% The initial black is the color used to initialize the color stacks. As long +% as only pdf\TeX{} and lua\TeX{} provide color stacks, we can initialize it +% with \texttt{0 g 0 G}. However it may be better to use the initial +% \cs{current@color} of the used color package. Using \cs{default@color} would +% be even better, but this is not available until \cs{begin\{document\}}. +% \begin{macrocode} +\newcommand*{\slnc@initial@black}{0 g 0 G}% +\AfterPackage*{color}{% + \let\slnc@initial@black\current@color + \AtBeginDocument{\let\slnc@initial@black\default@color}% +}% +\AfterPackage*{xcolor}{% + \let\slnc@initial@black\current@color + \AtBeginDocument{\let\slnc@initial@black\default@color}% +}% +% \end{macrocode} +% \end{macro}^^A \slnc@initial@black +% \begin{macro}{\slnc@processnotecolumns} +% This is a list of all declared note columns in \LaTeX{} syntax (using +% \cs{@cons} and \cs{@elt} etc.). +% \begin{macrocode} +\newcommand*{\slnc@processnotecolumns}{}% +% \end{macrocode} +% \end{macro}^^A \slnc@processnotecolumns +% \begin{macrocode} +% +% \end{macrocode} +% One note column will be declared by default: +% \begin{macrocode} +%<*final> +\DeclareNoteColumn{marginpar} +% +%<*body> +% \end{macrocode} +% \begin{macro}{\slnc@testforpagestylewarning} +% Not all page styles are layer page styles, but only layer page styles can be +% extended by the note column layers. So we warn, if another page style has +% been selected. +% \begin{macrocode} +\newcommand*{\slnc@testforpagestylewarning}{% + \IfLayerPageStyleExists{\currentpagestyle}{}{% + \PackageWarning{scrlayer-notecolumn}{% + output of note columns delayed,\MessageBreak + because with `\currentpagestyle'\MessageBreak + a page style has been selected, that\MessageBreak + isn't a layer page style,% + }% + }% +}% +\AfterSelectAnyPageStyle{\slnc@testforpagestylewarning} +% \end{macrocode} +% \end{macro}^^A \slnc@testforpagestylewarning +% \begin{option}{position,width,font,marginpar,normalmarginpar,reversemarginpar} +% Last but not least we have to define the options for the \meta{option +% list}. +% \begin{macrocode} +\DefineFamilyMember[.definenotecolumn]{KOMAarg} +\DefineFamilyKey[.definenotecolumn]{KOMAarg}{position}{% + \@namedef{slnc@\slnc@name @pos}{\dimexpr #1\relax}% + \FamilyKeyStateProcessed +} +\DefineFamilyKey[.definenotecolumn]{KOMAarg}{width}{% + \@namedef{slnc@\slnc@name @width}{\dimexpr #1\relax}% + \FamilyKeyStateProcessed +} +\DefineFamilyKey[.definenotecolumn]{KOMAarg}{font}{% + \setkomafont{notecolumn.\slnc@name}{#1}% + \FamilyKeyStateProcessed +} +\DefineFamilyKey[.definenotecolumn]{KOMAarg}{marginpar}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{marginpar}{#1}% + \edef\reserved@a{\noexpand\slnc@defpos{\slnc@name}}\reserved@a + \@namedef{slnc@\slnc@name @width}{\marginparwidth}% +} +% \end{macrocode} +% \begin{macro}{\slnc@defpos} +% Little helper for option \opt{marginpar}. The argument is the expanded +% name of the note column. +% \begin{macrocode} +\newcommand*\slnc@defpos[1]{% + \@namedef{slnc@#1@pos}{% + \ifodd\value{page} + \if@reversemargin +% \end{macrocode} +% The reverse marginal note column on odd pages is at the left margin. +% \begin{macrocode} + \dimexpr \oddsidemargin+1in + -\marginparsep-\csname slnc@#1@width\endcsname\relax + \else +% \end{macrocode} +% The normal marginal note column on odd pages is the right margin. +% \begin{macrocode} + \dimexpr \oddsidemargin+1in + +\textwidth+\marginparsep\relax + \fi + \else + \if@twoside + \if@reversemargin +% \end{macrocode} +% The reverse marginal note column on even pages is the right margin. +% \begin{macrocode} + \dimexpr \evensidemargin+1in + +\textwidth+\marginparsep\relax + \else +% \end{macrocode} +% The normal marginal note column on even pages is at the left margin. +% \begin{macrocode} + \dimexpr \evensidemargin+1in + -\marginparsep-\csname slnc@#1@width\endcsname\relax + \fi + \else +% \end{macrocode} +% \begin{macrocode} +% If not in two-side mode, do the same already done for odd pages. + \if@reversemargin + \dimexpr \oddsidemargin+1in + -\marginparsep-\csname slnc@#1@width\endcsname\relax + \else + \dimexpr \oddsidemargin+1in + +\textwidth+\marginparsep\relax + \fi + \fi + \fi + }% +}% +% \end{macrocode} +% \end{macro}^^A \slnc@defpos +% \begin{macrocode} +\DefineFamilyKey[.definenotecolumn]{KOMAarg}{normalmarginpar}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{normalmarginpar}{#1}% + \edef\reserved@a{\noexpand\slnc@defnormalpos{\slnc@name}}\reserved@a + \@namedef{slnc@\slnc@name @width}{\marginparwidth}% +} +% \end{macrocode} +% \begin{macro}{\slnc@defnormalpos} +% Little helper for option \opt{normalmarginpar}. The argument is the +% expanded name of the note column. +% \begin{macrocode} +\newcommand*\slnc@defnormalpos[1]{% + \@namedef{slnc@#1@pos}{% + \ifodd\value{page} +% \end{macrocode} +% The normal marginal note column on odd pages is the right margin. +% \begin{macrocode} + \dimexpr \oddsidemargin+1in + +\textwidth+\marginparsep\relax + \else + \if@twoside +% \end{macrocode} +% The normal marginal note column on even pages is at the left margin. +% \begin{macrocode} + \dimexpr \evensidemargin+1in + -\marginparsep-\csname slnc@#1@width\endcsname\relax + \else +% \end{macrocode} +% \begin{macrocode} +% If not in two-side mode, do the same already done for odd pages. + \dimexpr \oddsidemargin+1in + +\textwidth+\marginparsep\relax + \fi + \fi + }% +}% +% \end{macrocode} +% \end{macro}^^A \slnc@defnormalpos +% \begin{macrocode} +\DefineFamilyKey[.definenotecolumn]{KOMAarg}{reversemarginpar}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{reversemarginpar}{#1}% + \edef\reserved@a{\noexpand\slnc@defreversepos{\slnc@name}}\reserved@a + \@namedef{slnc@\slnc@name @width}{\marginparwidth}% +} +% \end{macrocode} +% \begin{macro}{\slnc@defreversepos} +% Little helper for option \opt{reversemarginpar}. The argument is the +% expanded name of the note column. +% \begin{macrocode} +\newcommand*\slnc@defreversepos[1]{% + \@namedef{slnc@#1@pos}{% + \ifodd\value{page} +% \end{macrocode} +% The reverse marginal note column on odd pages is at the left margin. +% \begin{macrocode} + \dimexpr \oddsidemargin+1in + -\marginparsep-\csname slnc@#1@width\endcsname\relax + \else + \if@twoside +% \end{macrocode} +% The reverse marginal note column on even pages is the right margin. +% \begin{macrocode} + \dimexpr \evensidemargin+1in + +\textwidth+\marginparsep\relax + \else +% \end{macrocode} +% \begin{macrocode} +% If not in two-side mode, do the same already done for odd pages. + \dimexpr \oddsidemargin+1in + -\marginparsep-\csname slnc@#1@width\endcsname\relax + \fi + \fi + }% +}% +% \end{macrocode} +% \end{macro}^^A \slnc@defreversepos +% \begin{macrocode} +% +% \end{macrocode} +% \end{option}^^A position … reversemarginpar +% \end{command}^^A \DeclareNoteColumn +% +% \begin{command}{\DeclareNewNoteColumn,\ProvideNoteColumn,\RedeclareNoteColumn} +% Like \cs{DeclareNoteColumn} but with restrictions, if the note column has +% (not) been declared already. +% \begin{macrocode} +%<*body> +\newcommand*{\DeclareNewNoteColumn}[2][]{% + \scr@ifundefinedorrelax{slnc@#2@box}{}{% + \PackageError{scrlayer-notecolumn}{note column `#2' already defined}{% + You may declare only note columns, that haven't been declared + previously using\MessageBreak + \string\DeclareNewNoteColumn. See also the alternatives + \string\RedeclareNoteColumn,\MessageBreak + \string\ProvideNoteColumn, and \string\DeclareNoteColumn.\MessageBreak + Nevertheless, if you'll continue, declaration will be done.% + }% + }% + \DeclareNoteColumn[{#1}]{#2}% +}% +\newcommand*{\ProvideNoteColumn}[2][]{% + \scr@ifundefinedorrelax{slnc@#2@box}{}{% + \PackageInfo{scrlayer-notecolumn}{\string\ProvideNoteColumn{#2} + ignored,\MessageBreak + because of already defined\MessageBreak + not column}% + }{% + \DeclareNoteColumn[{#1}]{#2}% + }% +}% +\newcommand*{\RedeclareNoteColumn}[2][]{% + \scr@ifundefinedorrelax{slnc@#2@box}{% + \PackageError{scrlayer-notecolumn}{note column `#2' undefined}{% + You may declare only note columns, that have been declared + previously using\MessageBreak + \string\RedeclareNoteColumn. See also the alternatives + \string\DeclareNewNoteColumn,\MessageBreak + \string\ProvideNoteColumn, and \string\DeclareNoteColumn.\MessageBreak + Nevertheless, if you'll continue, declaration will be done.% + }% + }{}% + \DeclareNoteColumn[{#1}]{#2}% +}% +% +% \end{macrocode} +% \end{command} +% +% +% \subsection{Setting a note column} +% +% We already have commands to declare note columns. But we also need a command +% to put contents into the note columns and to output the note columns. +% +% \begin{macro}{\tf@slnc} +% \changes{v0.1.2395}{2016/03/25}{write to \file{aux}-file with +% \cs{if@filesw}} +% \begin{macro}{\slnc@initwrite,\slnc@openwrite} +% \changes{v0.1.2928}{2018/02/02}{use \cs{closein} instead of \cs{closeout} +% to close \cs{slnc@file}} +% First of all we need a file to write the notes to. We use the +% \file{aux}-file to write into the file, because we need to read the file +% while the document will be typeset and the same time we need to write into +% the file. Note, that the file will be still reserved on auto-removing the +% interface! +% \begin{macrocode} +%<*body> +\newwrite\tf@slnc +\AtBeginDocument{% + \if@filesw + \immediate\write\@auxout{% + \noexpand\csname slnc@initwrite\noexpand\endcsname + }% + \fi +}% +\AtEndDocument{\let\slnc@initwrite\slnc@openwrite}% +\newcommand*{\slnc@initwrite}{}% +\newcommand*{\slnc@openwrite}{% + \immediate\closein\slnc@file +%<*trace> + \PackageInfo{scrlayer-notecolumn}{% + Opening `\jobname.slnc'\MessageBreak + for writing}% +% + \immediate\openout\tf@slnc\jobname.slnc +} +% \end{macrocode} +% After reading the main \file{aux}-file at |\end{document}|, we again +% calculate the md5 checksum of the \file{slnc}-file. If it has been changed +% we set |\if@tempswa| to |\iftrue| to provocate a rerun message. +% \changes{v0.1.2872}{2018/01/17}{usage of Lua function \texttt{slncmdfivesum}} +% \changes{v0.1.2972}{2018/04/01}{usage of not yet documented Xe\TeX{} +% primitive \cs{mdfivesum}} +% \begin{macrocode} +\AfterReadingMainAux{% + \immediate\closeout\tf@slnc + \begingroup + \scr@ifundefinedorrelax{pdfmdfivesum}{% + \scr@ifundefinedorrelax{mdfivesum}{% + \ifdefined\directlua + \edef\reserved@a{\directlua{slnc.mdfivesum(slnc.slncfile)}}% + \else + \let\reserved@a\relax + \fi + }{% + \edef\reserved@a{\mdfivesum file {\jobname.slnc}}% + }% + }{% + \edef\reserved@a{\pdfmdfivesum file {\jobname.slnc}}% + }% + \ifx\reserved@a\relax + \PackageWarningNoLine{scrlayer-notecolumn}{% + \string\pdfmdfivesum\space unavailable.\MessageBreak + The package needs \string\pdfmdfivesum,\MessageBreak + \string\mdfivesum, or LuaTeX to test whether\MessageBreak + or not one more LaTeX run is needed to place the\MessageBreak + note columns correctly. If these are unavailable\MessageBreak + you have to do the decision without the help\MessageBreak + of the package% + }% + \else + \ifx \slnc@mdfivesum\reserved@a +%<*trace> + \PackageInfo{scrlayer-notecolumn}{% + MD5 of current `\jobname.slnc':\MessageBreak + \reserved@a}% +% + \else +%<*trace> + \PackageWarningNoLine{scrlayer-notecolumn}{% + MD5 of slnc-file changed.\MessageBreak + Last: \slnc@mdfivesum\MessageBreak + New: \space \reserved@a\MessageBreak + At least one more LaTeX rerun needed to\MessageBreak + make note columns right% + }% +% + \aftergroup\@tempswatrue + \fi + \fi + \endgroup +} +% +% \end{macrocode} +% \changes{v0.3.3600}{2021/05/30}{use of \pkg*{scrwfile}'s never list}% +% The easiest way to make it compatible with \pkg*{scrwfile} is to put it +% on the \emph{never} list. +% \begin{macrocode} +%<*body> +\AfterPackage*{scrwfile}{% + \@ifundefined{scrwfile@never}{\def}{\g@addto@macro}% + \scrwfile@never{slnc}% +} +% +% \end{macrocode} +% \end{macro}^^A \slnc@initwrite,\slnc@openwrite +% \end{macro}^^A \tf@slnc +% +% \begin{command}{\makenote} +% \begin{description} +% \item[\oarg{string}:] the name of the note column the note should be added +% to (must be fully expandable and expand to a string only). The default +% value is |marginpar|. +% \item[\marg{code}:] the code, that should become par of the note +% column. Note, that this will be written protected to a file. So you have +% to use \cs{protect} if a macro shouldn't be expanded while writing or may +% break while writing. +% \end{description} +% There is a star variant with the same parameters, that writes the +% \meta{code} un-expanded. To do so, we need some internal commands. +% \begin{macro}{\slnc@unexpanded,\slnc@makenote} +% \changes{v0.1.2583}{2017/02/08}{added} +% \begin{macrocode} +%<*body> +\newcommand*{\slnc@unexpanded}{} +\let\slnc@unexpanded\detokenize +\newcommand*{\makenote}{% + \kernel@ifstar{\let\slnc@unexpanded\detokenize\slnc@makenote}% + {\let\slnc@unexpanded\@firstofone\slnc@makenote}% +}% +\newcommand{\slnc@makenote}[2][marginpar]{% + \@bsphack + \scr@savepos + \addtocontents{slnc}{% + \string\slnc@note{#1}% + {\noexpand\number\value{slncpage}}% + {\noexpand\number\scr@lastypos}% + {\slnc@unexpanded{#2}}% + }% + \@esphack +}% +% \end{macrocode} +% \begin{counter}{slncpage} +% This counter should be increased once per page with note column. This may +% be done simply at a once per page executed hook of +% \pstyle{@everystyle@}. You should note, that auto-remove wouldn't +% remove the counter. +% \begin{macrocode} +\@ifundefined{c@slncpage}{% + \newcounter{slncpage}% + \AddToLayerPageStyleOptions{@everystyle@}{% + onbackground=\stepcounter{slncpage}% + }% +}{} +% +% \end{macrocode} +% \end{counter}^^A slncpage +% \end{macro}^^A \slnc@makenote,\slnc@unexpanded +% \end{command}^^A \makenote +% +% \begin{macro}{\slnc@processnotes} +% \begin{description} +% \item[\marg{string}:] the name of the note column (must be fully expandable +% an expand to a string only). +% \end{description} +% Each note column typesets the notes with this command. It works in following +% steps: +% \begin{macrocode} +%<*body> +\newcommand*{\slnc@processnotes}[1]{% +% \end{macrocode} +% Read as long notes from the notes file until the number at \#2 of +% \cs{slnc@note} in the file is greater than \cnt{slncpage}. Put all +% these to the corresponding unprocessed list. +% \begin{macrocode} + \begingroup + \slnc@readnotes{\value{slncpage}}% +% \end{macrocode} +% Process the unprocessed list of the current note column +% \begin{macrocode} + \expandafter\let\expandafter\reserved@a + \csname slnc@#1@unprocessed\endcsname + \expandafter\global + \expandafter\let\csname slnc@#1@unprocessed\endcsname\@empty + \def\slnc@notesyncfonttest##1{% + \ifhmode + \PackageError{scrlayer-notecolumn}{% + illegal font setting for `notecolumn.##1'% + }{% + Current setting of font for `notecolumn.##1' switches + from\MessageBreak + vertical mode to horizontal mode. This is + illegal!\MessageBreak + You have to change the font setting to fix + this.\MessageBreak + If you'll continue vertical alignment of notes may fail% + }% + \par\vskip-\dimexpr \baselineskip+\parskip\relax + \fi + }% + \long\def\slnc@note##1##2##3##4{% +% \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): ##2<=\theslncpage?}% + \ifnum ##2>\value{slncpage}\relax +% \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): no: unprocess note}% + \expandafter\g@addto@macro\csname slnc@#1@unprocessed\endcsname{% + \slnc@note{##1}{##2}{##3}{##4}% + }% + \else + \ifnum ##2<\value{slncpage}\relax + \PackageWarning{scrlayer-notecolumn}{note of type `#1' delayed}% + \fi + \boxmaxdepth\maxdepth + \expandafter\setbox\csname slnc@#1@box\endcsname\vbox{% + \expandafter\hsize\csname slnc@#1@width\endcsname + \normalfont\normalsize +% \end{macrocode} +% \changes{v0.2.3085}{2019/02/14}{using color stack if available} +% If a color stack is available we switch to it before changing the font. So a +% color definition inside the font would overwrite every color change inside +% the column! But if we don't have a color stack, color switching is not +% permitted! +% \begin{macrocode} + \slnc@switchcolorstack{#1}% + {% + \usekomafont{notecolumn.#1}{% + \slnc@notesyncfonttest{#1}% + \expandafter\ifvoid\csname slnc@#1@box\endcsname + \expandafter\setbox\csname slnc@#1@box\endcsname\vbox{% + \kern\dimexpr\topskip-\baselineskip\relax + }% + \fi +% \end{macrocode} +% \changes{v0.1}{2015/10/07}{ready for renaming \cs{pdfpageheight} in +% luaTeX} +% From lua\TeX~0.80.1 \cs{pdfpageheight} will be renamed into +% \cs{pageheight}. So we have to do an extra test for the new primitive. +% \begin{macrocode} + \scr@ifundefinedorrelax{pdfpageheight}{% + \scr@ifundefinedorrelax{pageheight}{% + \@tempdima=\paperheight + }{% + \@tempdima=\pageheight + }% + }{% + \@tempdima=\pdfpageheight + }% + \@tempdima=\dimexpr \@tempdima-##3sp + -1in-\topmargin + -\headheight-\headsep + -\baselineskip + \relax + \@tempdimb=\dimexpr \expandafter\ht\csname slnc@#1@box\endcsname + +\expandafter\dp\csname slnc@#1@box\endcsname + \relax + \ifdim\@tempdima<\@tempdimb +%<*trace> + \PackageInfo{scrlayer-notecolumn}{% + Note moved down from\MessageBreak + \the\@tempdima\space to \the\@tempdimb\MessageBreak + at note box `#1' + }% +% + \else + \ifdim\@tempdima>\@tempdimb +%<*trace> + \PackageInfo{scrlayer-notecolumn}{% + Adding vertical white space from\MessageBreak + \the\@tempdimb\space to \the\@tempdima\MessageBreak + into note box `#1' + }% +% + \expandafter\setbox\csname slnc@#1@box\endcsname + \vbox {% + \expandafter\unvbox\csname slnc@#1@box\endcsname + \kern\dimexpr\@tempdima-\@tempdimb\relax + }% + \fi + \fi + \expandafter\ifvoid\expandafter\csname slnc@#1@box\endcsname + \else + \@tempdima\dimexpr + \dp\strutbox + -\dp\csname slnc@#1@box\endcsname + \relax + \expandafter\unvbox\csname slnc@#1@box\endcsname + \ifdim\@tempdima>\z@ \kern\@tempdima\fi + \fi +% \end{macrocode} +% \changes{v0.1.2582}{2017/02/08}{restore several commands} +% Some commands have to be restored when processing the note. +% \begin{macrocode} + \slnc@restoreinnote + \strut\ignorespaces ##4\par + }% + }% + }% + \fi + }% + \def\slnc@sync##1##2##3##4{% + \ifnum ##2>\value{slncpage}\relax + \expandafter\g@addto@macro\csname slnc@#1@unprocessed\endcsname{% + \slnc@sync{##1}{##2}{##3}{}% + }% + \else + \if@filesw + \expandafter\setbox\csname slnc@#1@box\endcsname\vbox{% + \expandafter\unvbox\csname slnc@#1@box\endcsname + \scr@savepos + \protected@write\@auxout{}{% + \string\newlabel{notecolumn.##1.##3.syncnote.label}{% + {% + \noexpand\number\scr@lastypos + }{\thepage}% + }% + }% + }% + \fi + \fi + }% + \reserved@a + \expandafter\ifvoid\csname slnc@#1@box\endcsname +%<*trace> + \PackageInfo{scrlayer-notecolumn}{Note box `#1' empty}% +% + \else + \ifdim \dimexpr \expandafter\ht\csname slnc@#1@box\endcsname + +\expandafter\dp\csname slnc@#1@box\endcsname + \relax >\textheight\relax +%<*trace> + \PackageInfo{scrlayer-notecolumn}{Split note box `#1'}% +% + \splittopskip\topskip + \splitmaxdepth\baselineskip +% \end{macrocode} +% Bring back the colors: +% \changes{v0.2.3085}{2019/02/14}{\cs{slnc@switchcolorstack} added} +% \begin{macrocode} + \usekomafont{notecolumn.#1}{% + \expandafter\vsplit\csname slnc@#1@box\endcsname to + \textheight\relax + }% + \expandafter\ifvoid\csname slnc@#1@box\endcsname + \else + \expandafter\setbox\csname slnc@#1@box\endcsname\vbox{% + \slnc@switchcolorstack{#1}% + \expandafter\unvbox\csname slnc@#1@box\endcsname + }% + \fi + \else +%<*trace> + \PackageInfo{scrlayer-notecolumn}{Flush note box `#1'}% +% +% \end{macrocode} +% Bring back the colors: +% \changes{v0.2.3085}{2019/02/14}{\cs{slnc@switchcolorstack} added} +% \begin{macrocode} + \usekomafont{notecolumn.#1}{% + \slnc@switchcolorstack{#1}% + \expandafter\box\csname slnc@#1@box\endcsname% + }% + \fi + \fi + \expandafter\global + \expandafter\setbox\csname slnc@#1@box\expandafter\endcsname + \expandafter\box\csname slnc@#1@box\endcsname + \endgroup +} +% \end{macrocode} +% \begin{macro}{\slnc@switchcolorstack} +% \changes{v0.2.3085}{2019/02/14}{added} +% This either redefines \cs{set@color} or switches to the color stack of the +% note column given by the argument. +% \begin{macrocode} +\newcommand*{\slnc@switchcolorstack}[1]{% + \scr@ifundefinedorrelax{slnc@#1@colorstack}{% + \def\set@color{% + \PackageWarningNoLine{scrlayer-notecolumn}{% + unsupported change of color!\MessageBreak + It seems you are using a TeX engine,\MessageBreak + that does not support switching the\MessageBreak + color stack like pdfTeX or luaTeX do.\MessageBreak + Because of this, usage of \string\color,\MessageBreak + \string\textcolor\space etc. inside a note + column\MessageBreak + is not supported% + }% + }% + }{% + \scr@ifundefinedorrelax{@pdfcolorstack}{% + }{% + \expandafter\let\expandafter\@pdfcolorstack + \csname slnc@#1@colorstack\endcsname + }% + \scr@ifundefinedorrelax{pdfcolorstack}{% + \scr@ifundefinedorrelax{pdfextension}{% + \PackageError{scrlayer-notecolumm}{% + color stack defined but not usable% + }{% + \expandafter\string + \csname slnc@#1@colorstack\endcsname\space defined + \MessageBreak + but neither \string\pdfcolorstack\space nor + \string\pdfextension.\MessageBreak + This should never happen!% + }% + }{% + \pdfextension colorstack + \csname slnc@#1@colorstack\endcsname current\relax + }% + }{% + \pdfcolorstack + \csname slnc@#1@colorstack\endcsname current\relax + }% + }% +}% +% \end{macrocode} +% \end{macro}^^A \slnc@switchcolorstack +% \begin{command}{\restoreinnote} +% \changes{v0.1.2582}{2017/02/08}{added} +% \begin{macro}{\slnc@restoreinnote} +% \changes{v0.1.2582}{2017/02/08}{added} +% Some commands have to be restored while processing the notes. By default +% these are \cs{label}, \cs{index}, \cs{glossary}. More can be added using +% \cs{restoreinnote}. The storage is \cs{slnc@restoreinnote}. +% \begin{macrocode} +\newcommand*{\slnc@restoreinnote}{} +\let\slnc@restoreinnote\@empty +\newcommand*\restoreinnote[1]{% + \AtBeginDocument{% + \expandafter\newcommand\expandafter*\csname slnc\string#1\endcsname{}% + \expandafter\let\csname slnc\string#1\endcsname#1% + \g@addto@macro\slnc@restoreinnote{% + \expandafter\let\expandafter#1\csname slnc\string#1\endcsname + }% + }% +} +\@onlypreamble\restoreinnote +\restoreinnote\label +\restoreinnote\index +\restoreinnote\glossary +% \end{macrocode} +% \end{macro}^^A \slnc@restoreinnote +% \end{command}^^A \restoreinnote +% \begin{macro}{\slnc@readnotes} +% Read as long notes from the notes file until the number at \#2 of +% \cs{slnc@note} or \cs{slnc@sync} in the file is greater than +% \cnt{slncpage}. Put all these to the corresponding unprocessed list. +% \begin{macro}{\slnc@catcodes} +% \changes{v0.3}{2019/03/02}{added} +% We need a helper macro \cs{slnc@catcodes} to restore (some of) the catcodes +% before reading from file. +% \begin{macrocode} +\newcommand*{\slnc@catcodes}{}% +\AtBeginDocument{% + \begingroup + \def\do#1{% + \protected@xdef\slnc@catcodes{\slnc@catcodes + \catcode`\protect#1=\the\catcode`#1\relax + }% + }% + \dospecials + \let\protect\noexpand + \xdef\slnc@catcodes{\slnc@catcodes\catcode`\protect\@=11\relax}% + \endgroup +} +% \end{macrocode} +% \end{macro}^^A \slnc@catcodes +% \begin{macrocode} +\newcommand*\slnc@readnotes[1]{% + \ifeof\slnc@file\else + \ifnum \number #1<\slnc@unprocessed\relax + \@tempswafalse + \else + \@tempswatrue + \fi + \@whilesw\if@tempswa\fi{% + \begingroup + \slnc@catcodes + \endlinechar\m@ne + \read\slnc@file to\reserved@a + \edef\reserved@a{% + \endgroup + \noexpand\def\noexpand\reserved@a{% + \unexpanded\expandafter{\reserved@a}% + }% + }% + \reserved@a + \expandafter\slnc@iofv\expandafter\reserved@b\reserved@a + \@empty\@empty\@empty\@empty\@empty + \@tempswafalse + \@for\reserved@c :={\slnc@note },{\slnc@sync }\do{% + \ifx\reserved@b\reserved@c \@tempswatrue\fi + }% + \if@tempswa + \@tempswafalse + \expandafter\slnc@iiiofv\expandafter\reserved@b\reserved@a + \@empty\@empty\@empty\@empty\@empty + \ifx\reserved@b\@empty + \PackageError{scrlayer-notecolumn}{internal syntax error}{% + Unexpected syntax of file `\jobname.slnc'.\MessageBreak + Second argument should be a number.\MessageBreak + I don't know what to do with\MessageBreak + \expandafter\detokenize\expandafter{\reserved@a}% + }% + \@tempswatrue + \else + \global\let\slnc@unprocessed\reserved@b + \expandafter\slnc@iiofv\expandafter\reserved@b\reserved@a + \@empty\@empty\@empty\@empty\@empty + \@ifundefined{slnc@\reserved@b @unprocessed}{% + \PackageWarning{scrlayer-notecolumn}{% + column `\reserved@b' undefined.\MessageBreak + You should declare the column before the usage.\MessageBreak + Notes will be lost% + }% + }{% + \expandafter\g@addto@macro + \csname slnc@\reserved@b @unprocessed\expandafter\endcsname + \expandafter{% + \reserved@a + }% + }% + \ifnum \number #1<\slnc@unprocessed\relax + \@tempswafalse + \else + \@tempswatrue + \fi + \fi + \else +%<*trace> + \PackageInfo{scrlayer-notecolumn}{% + Ignoring `\expandafter\detokenize\expandafter{\reserved@a}'}% +% + \@tempswatrue + \fi + \ifeof\slnc@file\@tempswafalse\fi + }% + \fi +}% +% \end{macrocode} +% \end{macro}^^A \slnc@readnotes +% \begin{macro}{\slnc@iofv,\slnc@iiofv,\slnc@iiiofv} +% \begin{macrocode} +\newcommand\slnc@iofv[6]{\def#1{#2}}% +\newcommand\slnc@iiofv[6]{\def#1{#3}}% +\newcommand\slnc@iiiofv[6]{\def#1{#4}}% +% \end{macrocode} +% \end{macro}^^A \slnc@iofv … \slnc@iiiofv +% \begin{macro}{\slnc@unprocessed} +% The \#2 of the last read note column from notes file. +% \begin{macrocode} +\newcommand*{\slnc@unprocessed}{0}% +% +% \end{macrocode} +% \begin{macro}{\slnc@file} +% The input file with the unprocessed notes. +% \changes{v0.1.2928}{2018/02/02}{use \cs{closein} instead of \cs{closeout} +% to close \cs{slnc@file}} +% \begin{macro}{\slnc@mdfivesum} +% \changes{v0.1.2872}{2018/01/17}{definition and usage of Lua function +% \texttt{slncmdfivesum}} +% \changes{v0.1.2972}{2018/04/01}{usage of not yet documented \XeTeX{} +% primitive \cs{mdfivesum}} +% \changes{v0.3.3591}{2021/03/25}{Lua function name changed to +% \texttt{slnc.mdfivesum}} +% \changes{v0.3.3591}{2021/03/25}{new Lua variable \texttt{slnc.slncfile}} +% The MD5 sum of the file before opening it for reading. +% \begin{macrocode} +%<*body> +\newcommand*{\slnc@mdfivesum}{} +\let\slnc@mdfivesum\@empty +\scr@ifundefinedorrelax{pdfmdfivesum}{% + \scr@ifundefinedorrelax{mdfivesum}{% + \ifdefined\directlua + \directlua{% + slnc = slnc or {} + function slnc.mdfivesum(filename) + local fh = io.open(filename,"rb") + if fh then + local sum=md5.sumhexa(fh:read("*a")) + tex.sprint(sum) + fh:close() + end + end + if (string.sub(tex.jobname,1,1) == '"') + and (string.sub(tex.jobname,string.len(tex.jobname),-1) == '"') + then + slnc.slncfile = string.sub(tex.jobname,2,-2) + else + slnc.slncfile = tex.jobname + end + slnc.slncfile = slnc.slncfile .. '.slnc' + }% + \xdef\slnc@mdfivesum{\directlua{slnc.mdfivesum(slnc.slncfile)}}% + \fi + }{% + \xdef\slnc@mdfivesum{\mdfivesum file {\jobname.slnc}}% + }% +}{% + \xdef\slnc@mdfivesum{\pdfmdfivesum file {\jobname.slnc}}% +}% +%<*trace> +\scr@ifundefinedorrelax{slnc@mdfivesum}{}{% + \PackageInfo{scrlayer-notecolumn}{% + MD5 of last `\jobname.slnc':\MessageBreak + \slnc@mdfivesum}% +}% +% +\newread\slnc@file +\immediate\openin\slnc@file \jobname.slnc +% +% \end{macrocode} +% \end{macro}^^A \slnc@mdfivesum +% \end{macro}^^A \slnc@file +% \end{macro}^^A \slnc@unprocessed +% \end{macro}^^A \slnc@processnotes +% +% \begin{option}{autoclearnotecolumns} +% \begin{macro}{\ifslnc@autoclearnotecolumns,\slnc@autoclearnotecolumnstrue, +% \slnc@autoclearnotecolumnsfalse} +% \begin{macrocode} +%<*options> +\KOMA@ifkey{autoclearnotecolumns}{slnc@autoclearnotecolumns} +\slnc@autoclearnotecolumnstrue +% +%<*final> +\let\reserved@a\clearpage +\def\clearpage{% + \ifslnc@autoclearnotecolumns\clearnotecolumns\relax\fi +}% +\expandafter\g@addto@macro\expandafter\clearpage\expandafter{\reserved@a} +% +% \end{macrocode} +% \end{macro} +% \end{option} +% +% \begin{command}{\clearnotecolumn} +% \begin{description} +% \item[\oarg{string}:] the name of the note column (must be fully +% expandable and expand to a string only). Default is |marginpar|. +% \end{description} +% Output as many (empty) pages as needed to output all unprocessed notes of +% one note column. Note, that the output of the first page may result in more +% unprocessed notes. But the output of the following (empty) pages shouldn't. +% \begin{macrocode} +%<*body> +\newcounter{slnc@clearnote@label}% +\newcommand*\clearnotecolumn[1][marginpar]{% + \begingroup + \slnc@autoclearnotecolumnsfalse +% \end{macrocode} +% First of all we need to know the note column page of this page. +% \begin{macrocode} + \stepcounter{slnc@clearnote@label}% + \if@filesw + \protected@write\@auxout{% + \let\theslncpage\relax + \let\slnc@voidtest\relax + }{% + \string\newlabel{notecolumn.\theslnc@clearnote@label}% + {{\theslncpage}{\slnc@voidtest{#1}}}% + }% + \fi + \scr@ifundefinedorrelax{r@notecolumn.\theslnc@clearnote@label}{% + \PackageInfo{scrlayer-notecolumn}{% + Using estimated to low value for clearing\MessageBreak + note colum `#1'% + } + \edef\slnc@cmp@value{\the\value{slncpage}}% + \let\reserved@a\z@ + }{% + \edef\reserved@a{% + \@nameuse{r@notecolumn.\theslnc@clearnote@label}\@empty\@empty + }% + \edef\slnc@cmp@value{\expandafter\slnc@firstof\reserved@a\@nil}% + \edef\reserved@a{\expandafter\slnc@secondof\reserved@a\@nil}% + }% +%<*trace> + \PackageInfo{scrlayer-notecolumn}{% + TRACE (slnc): clearnote=\@nameuse{theslnc@clearnote@label}, + abspage=\the\value{slncpage}, until page=\slnc@cmp@value, + process=\reserved@a, pagetotal=\the\pagetotal, topskip=\the\topskip}% +% + \ifvmode\ifdim \pagetotal<\topskip +% \end{macrocode} +% \cs{clearpage} wouldn't result in a new page, so we do not have to output +% the notes of this page but only until the previous. +% \begin{macrocode} + \edef\slnc@cmp@value{\the\numexpr\slnc@cmp@value-1}% +% \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): until page=\slnc@cmp@value}% + \fi\fi + \ifnum \reserved@a=\z@ +% \end{macrocode} +% Next we read all notes until the end of the current page, but only +% if a \cs{clearpage} wouldn't result in a new page. +% \begin{macrocode} + \ifvmode + \ifdim \pagetotal<\topskip + \else + \slnc@readnotes{\slnc@cmp@value}% + \fi + \else + \slnc@readnotes{\slnc@cmp@value}% + \fi + \begingroup + \aftergroup\@tempswafalse + \long\def\slnc@note##1##2##3##4{% + \ifnum ##2>\slnc@cmp@value\relax \else \aftergroup\@tempswatrue\fi + }% + \let\slnc@sync\slnc@note + \csname slnc@#1@unprocessed\endcsname + \endgroup + \else + \PackageInfo{scrlayer-notecolumn}{% + box of note column `#1'\MessageBreak + not empty after page of \string\clearnotecolumn}% + \@tempswatrue + \fi + \if@tempswa +% \end{macrocode} +% Yes, we have! +% \begin{macrocode} + \IfLayerPageStyleExists{\currentpagestyle}{}{% + \PackageWarning{scrlayer-notecolumn}{% + \string\clearnotecolumn\space while active non-layer page + style.\MessageBreak + Activate empty page style until note column\MessageBreak + has been cleared% + }% + \pagestyle{empty}% + }% + \@tempswatrue + \fi + \@whilesw\if@tempswa\fi{% +% \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): add \string\clearpage}% +% \end{macrocode} +% Yes, we have (maybe again)! +% \begin{macrocode} + \clearpage + \expandafter\ifcase \slnc@voidtest{#1}% + \begingroup + \aftergroup\@tempswafalse + \long\def\slnc@note##1##2##3##4{% + \ifnum ##2>\slnc@cmp@value\relax \else \aftergroup\@tempswatrue\fi + }% + \let\slnc@sync\slnc@note + \csname slnc@#1@unprocessed\endcsname + \endgroup + \else + \@tempswatrue + \fi + \if@tempswa +% \end{macrocode} +% And we still have: So we have to output one more page. +% \begin{macrocode} + \null + \fi + }% + \endgroup +} +% \end{macrocode} +% \begin{macro}{\slnc@firstof,\slnc@secondof} +% We need these little helpers, because some packages like +% \pkg{hyperref} extend the label mechanism by additional arguments. +% \begin{macrocode} +\newcommand*{\slnc@firstof}{} +\def\slnc@firstof#1#2\@nil{#1}% +\newcommand*{\slnc@secondof}{} +\def\slnc@secondof#1#2#3\@nil{#2}% +% \end{macrocode} +% \end{macro}^^A \slnc@firstof,\slnc@secondof +% \begin{macro}{\slnc@voidtest} +% \begin{description} +% \item[\marg{string}:] the name of a note column (must be fully +% expandable and expand to a string only). +% \end{description} +% If the box of the note column is empty/void it returns \cs{z@} otherwise +% \cs{@ne}. +% \begin{macrocode} +\newcommand*{\slnc@voidtest}[1]{% + \expandafter\ifvoid \csname slnc@#1@box\endcsname \z@\else \@ne\fi +} +% +% \end{macrocode} +% \end{macro}^^A \slnc@voidtest +% \end{command}^^A \clearnotecolumn +% +% \begin{command}{\clearnotecolumns} +% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added} +% \changes{v3.26}{2018/08/29}{removed spurious \cs{expandafter}} +% \begin{description} +% \item[\oarg{string list}:] comma separated list of note column names (must +% be fully expandable and each element must expand to a string only, that is +% the name of a note column); if omitted or empty all note columns will be +% used. +% \end{description} +% Output as many (empty) pages as needed to output all unprocessed notes of +% all (given) note columns. Note, that the output of the first page may +% result in more unprocessed notes. But the output of the following (empty) +% pages shouldn't. +% \begin{macrocode} +%<*body> +\newcommand*\clearnotecolumns[1][\relax]{% + \begingroup + \slnc@autoclearnotecolumnsfalse + \ifx\relax#1\relax\else + \let\slnc@processnotecolumns\@empty + \edef\reserved@a{#1}% + \@for\reserved@a:=\reserved@a\do {% + \scr@trim@spaces\reserved@a + \ifx\reserved@a\@empty\else + \expandafter\l@addto@macro\expandafter\slnc@processnotecolumns + \expandafter{\expandafter\@elt\expandafter{\reserved@a}}% + \fi + }% + \fi +% \end{macrocode} +% First of all we need to know the note column page of this page. +% \begin{macrocode} + \stepcounter{slnc@clearnote@label}% + \if@filesw + \begingroup + \def\@elt##1{+\slnc@voidtest{##1}}% + \protected@write\@auxout{% + \let\theslncpage\relax + \let\slnc@voidtest\relax + }{% + \string\newlabel{notecolumn.\theslnc@clearnote@label}% + {{\theslncpage}{\numexpr \slnc@processnotecolumns\relax}}% + }% + \endgroup + \fi + \scr@ifundefinedorrelax{r@notecolumn.\theslnc@clearnote@label}{% + \begingroup + \def\@elt##1{, `##1'}% + \PackageInfo{scrlayer-notecolumn}{% + Using estimated to low value for\MessageBreak + clearing note colums\MessageBreak + \expandafter\@gobble\slnc@processnotecolumns + }% + \endgroup + \edef\slnc@cmp@value{\the\value{slncpage}}% + \let\reserved@a\z@ + }{% + \edef\reserved@a{% + \@nameuse{r@notecolumn.\theslnc@clearnote@label}\@empty\@empty + }% + \edef\slnc@cmp@value{\expandafter\slnc@firstof\reserved@a\@nil}% + \edef\reserved@a{\expandafter\slnc@secondof\reserved@a\@nil}% + }% +%<*trace> + \PackageInfo{scrlayer-notecolumn}{% + TRACE (slnc): clearnote=\@nameuse{theslnc@clearnote@label}, + abspage=\theslncpage, until page=\slnc@cmp@value, + process=\reserved@a, pagetotal=\the\pagetotal, topskip=\the\topskip}% +% + \ifvmode\ifdim \pagetotal<\topskip +% \end{macrocode} +% \cs{clearpage} wouldn't result in a new page, so we do not have to output +% the notes of this page but only until the previous. +% \begin{macrocode} + \edef\slnc@cmp@value{\the\numexpr\slnc@cmp@value-1}% +% \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): until page=\slnc@cmp@value}% + \fi\fi + \ifnum \reserved@a=\z@ +% \end{macrocode} +% Next we read all notes until the end of the current page, but only +% if a \cs{clearpage} wouldn't result in a new page. +% \begin{macrocode} + \ifvmode + \ifdim \pagetotal<\topskip + \else + \slnc@readnotes{\slnc@cmp@value}% + \fi + \else + \slnc@readnotes{\slnc@cmp@value}% + \fi + \begingroup + \aftergroup\@tempswafalse + \long\def\slnc@note##1##2##3##4{% + \ifnum ##2>\slnc@cmp@value\relax \else \aftergroup\@tempswatrue\fi + }% + \let\slnc@sync\slnc@note + \def\@elt##1{\csname slnc@##1@unprocessed\endcsname}% + \slnc@processnotecolumns + \endgroup + \else + \PackageInfo{scrlayer-notecolumn}{% + box of at least one note column\MessageBreak + not empty after page of \string\clearnotecolumns}% + \@tempswatrue + \fi + \if@tempswa +% \end{macrocode} +% Yes, we have! +% \begin{macrocode} + \IfLayerPageStyleExists{\currentpagestyle}{}{% + \PackageWarning{scrlayer-notecolumn}{% + \string\clearnotecolumns\space while active non-layer page + style.\MessageBreak + Activate empty page style until note column\MessageBreak + has been cleared% + }% + \pagestyle{empty}% + }% + \@tempswatrue + \fi + \@whilesw\if@tempswa\fi{% +% \PackageInfo{scrlayer-notecolumn}{TRACE (slnc): adding \string\clearpage}% +% \end{macrocode} +% Yes, we have (maybe again)! +% \begin{macrocode} + \clearpage + \begingroup + \def\@elt##1{+\slnc@voidtest{##1}}% + \ifcase \numexpr \slnc@processnotecolumns\relax + \aftergroup\@tempswafalse + \long\def\slnc@note##1##2##3##4{% + \ifnum ##2>\slnc@cmp@value\relax \else \aftergroup\@tempswatrue\fi + }% + \let\slnc@sync\slnc@note + \def\@elt##1{\csname slnc@##1@unprocessed\endcsname}% + \slnc@processnotecolumns + \else + \aftergroup\@tempswatrue + \fi + \endgroup + \if@tempswa +% \end{macrocode} +% And we still have: So we have to output one more page. +% \begin{macrocode} + \null + \fi + }% + \endgroup +} +% +% \end{macrocode} +% \end{command}^^A \clearnotecolumns +% +% +% \subsection{Syncronisation of text and note} +% \label{sec:scrlayer-notecolumn.sync} +% +% Until yet we have the text and we have note columns. Normally note entries +% to a note column are in sync with the text position, that makes the +% note. But if there are collisions the sync may be lost. In this case the +% note may be later (but never earlier), so we need a mechanism to force +% synchronisation of the text with the note. +% +% \begin{command}{\syncwithnotecolumn,\syncwithnotecolumns} +% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added} +% \changes{v3.26}{2018/08/29}{removed spurious \cs{expandafter}} +% \begin{description} +% \item[\oarg{string}:] the name of the note column to sync with (this must be +% fully expandable and expand to the name of a note column). By default sync +% with note column |marginpar|. +% \end{description} +% \begin{counter}{slnc@syncpoint} +% Add at the \LaTeX{} run after the next \LaTeX{} run as much space to the +% text (not the note column!) as needed to reach the next position at the +% note column. This is not the same like \cs{clearnotecolumn}, because it +% doesn't need to go to the next page, but it needs at least three \LaTeX{} +% runs to terminate. +% \begin{macrocode} +%<*body> +\newcounter{slnc@syncpoint}% +\newcommand*{\syncwithnotecolumn}[1][marginpar]{% + \begingroup + \edef\reserved@a{\endgroup\noexpand\syncwithnotecolumns[{#1}]}% + \reserved@a +} +\newcommand*{\syncwithnotecolumns}[1][\relax]{% + \begingroup + \ifx\relax#1\relax\else + \let\slnc@processnotecolumns\@empty + \edef\reserved@a{#1}% + \@for\reserved@a:=\reserved@a\do {% + \scr@trim@spaces\reserved@a + \ifx\reserved@a\@empty\else + \expandafter\l@addto@macro\expandafter\slnc@processnotecolumns + \expandafter{\expandafter\@elt\expandafter{\reserved@a}}% + \fi + }% + \fi + \stepcounter{slnc@syncpoint}% + \def\@elt##1{% + \addtocontents{slnc}{% + \string\slnc@sync{##1}% + {\noexpand\number\value{slncpage}}% + {\theslnc@syncpoint}% + {}% + }% + }% + \slnc@processnotecolumns + \ifvmode + \let\slnc@voffset\@empty% + \expandafter\@firstofone + \else + \PackageWarning{scrlayer-notecolumn}{% + \string\syncwithnotecolumn\space in hmode.\MessageBreak + Using \string\syncwithnotecolumn\space in horizontal\MessageBreak + mode may result in unwanted vertical\MessageBreak + space inside paragraphs and may lost\MessageBreak + colors of text of notes. \space So perhaps you\MessageBreak + should move \string\syncwithnotecolumn\space before\MessageBreak + or after the paragraph% + }% + \let\slnc@voffset\@empty%\def\slnc@voffset{-\number\baselineskip}% + \expandafter\slnc@vadjust + \fi + {% + \if@filesw + \scr@savepos + \protected@write\@auxout{}{% + \string\newlabel{notecolumn.\theslnc@syncpoint.synctext.label}{% + {% + \noexpand\number + \numexpr \scr@lastypos\slnc@voffset\relax + }{\thepage}% + }% + }% + \fi + \@ifundefined{r@notecolumn.\theslnc@syncpoint.synctext.label}{% + \PackageInfo{scrlayer-notecolumn}{% + No text label for \string\syncwithnotecolumn.\MessageBreak + Need rerun to sync position}% + }{% + \edef\reserved@a{% + \@nameuse{r@notecolumn.\theslnc@syncpoint.synctext.label}% + \@empty\@empty + }% + \edef\slnc@textpos{\expandafter\slnc@firstof\reserved@a\@nil}% + \edef\slnc@textpage{\expandafter\slnc@secondof\reserved@a\@nil}% + \let\slnc@notepos\slnc@textpos + \let\slnc@notepage\slnc@textpage + \def\@elt##1{% + \@ifundefined{r@notecolumn.##1.\theslnc@syncpoint.syncnote.label}{% + \PackageInfo{scrlayer-notecolumn}{% + No note label for sync with note column\MessageBreak + `##1'.\MessageBreak + Need rerun to sync position}% + \G@refundefinedtrue + }{% + \edef\reserved@a{% + \@nameuse{r@notecolumn.##1.\theslnc@syncpoint.syncnote.label}% + \@empty\@empty + }% + \edef\reserved@b{\expandafter\slnc@firstof\reserved@a\@nil}% + \edef\reserved@c{\expandafter\slnc@secondof\reserved@a\@nil}% + \ifnum \slnc@notepage<\reserved@c\relax + \let\slnc@notepos=\reserved@b + \let\slnc@notepage=\reserved@c + \else + \ifnum \slnc@notepage=\reserved@c\relax + \ifnum \slnc@notepos>\reserved@b + \let\slnc@notepos=\reserved@b + \let\slnc@notepage=\reserved@c + \fi + \fi + \fi + }% + }% + \slnc@processnotecolumns + \ifnum\slnc@textpage>\slnc@notepage\relax + \PackageInfo{scrlayer-notecolumn}{% + Last note page before last text page.\MessageBreak + Need rerun to sync position}% + \else + \ifnum\slnc@textpage<\slnc@notepage\relax + \@whilenum \slnc@textpage<\slnc@notepage\do {% + \newpage\null\vskip-\dimexpr \baselineskip+\parskip\relax + \edef\slnc@textpage{\the\numexpr\slnc@textpage+1\relax}% + }% +% \end{macrocode} +% \changes{v0.1}{2015/10/07}{ready for renaming \cs{pdfpageheight} in +% luaTeX} +% From lua\TeX~0.80.1 \cs{pdfpageheight} will be renamed into +% \cs{pageheight}. So we have to do an extra test for the new primitive. +% \begin{macrocode} + \scr@ifundefinedorrelax{pdfpageheight}{% + \scr@ifundefinedorrelax{pageheight}{% + \@tempdima=\paperheight + }{% + \@tempdima=\pageheight + }% + }{% + \@tempdima=\pdfpageheight + }% + \@tempdima=\dimexpr \@tempdima + -\topmargin-1in + -\headheight-\headsep + -\topskip+\baselineskip + \relax + \edef\slnc@textpos{\number\@tempdima}% +%<*trace> + \PackageInfo{scrlayer-notecolumn}{% + Top position is \slnc@textpos% + }% +% + \fi + \ifnum\slnc@notepos>\slnc@textpos\relax + \PackageInfo{scrlayer-notecolumn}{% + Last note position before last text\MessageBreak + position.\MessageBreak + Need rerun to sync position% + }% + \else + \ifnum\slnc@notepos<\slnc@textpos\relax + \@tempdima=\numexpr \slnc@textpos-\slnc@notepos\relax sp + \PackageInfo{scrlayer-notecolumn}{% + skipping \the\@tempdima\space to sync% + }% + \vskip\@tempdima + \fi + \fi + \fi + }% + }% + \endgroup +} +% \end{macrocode} +% \end{counter} +% \begin{macro}{\slnc@vadjust} +% \begin{macrocode} +\newcommand{\slnc@vadjust}[1]{% + \@bsphack + \vadjust{#1}% + \@esphack +} +% +% \end{macrocode} +% \end{macro}^^A \slnc@vadjust +% \end{command}^^A \syncwithnotecolumn,\syncwithnotecolumns +% +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrlayer-scrpage.dtx b/macros/latex/contrib/koma-script/scrlayer-scrpage.dtx new file mode 100644 index 0000000000..f7c7565a2d --- /dev/null +++ b/macros/latex/contrib/koma-script/scrlayer-scrpage.dtx @@ -0,0 +1,2495 @@ +% \iffalse^^A meta-comment +% ====================================================================== +% scrlayer-scrpage.dtx +% Copyright (c) Markus Kohm, 2012-2022 +% +% 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 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.md. +% ====================================================================== +%%% From File: $Id: scrlayer-scrpage.dtx 3889 2022-06-09 12:11:14Z kohm $ +%%%% (run: identify) +%%%% (run: init) +%%%% (run: options) +%%%% (run: body) +%<*dtx> +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\begingroup + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2022-06-09 14:11:14 +0200 (Do, 09. Jun 2022) $ + \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} + \filerevision$Revision: 3889 $ + \edef\reserved@a{% + \noexpand\endgroup + \noexpand\ProvidesFile{scrlayer-scrpage.dtx}% + [\filedate\space\filerevision\space + KOMA-Script package source + }% +\reserved@a +% +%<*identify> +%\NeedsTeXFormat{LaTeX2e}[1995/12/01] +%\ProvidesPackage{scrlayer-scrpage}[% +%!KOMAScriptVersion +% package +% +%<*dtx|identify> + (end user interface for scrlayer)] +% +%<*dtx> +\ifx\documentclass\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHTFROM}{2012} + \generate{\usepreamble\defaultpreamble + \file{scrlayer-scrpage.sty}{% + \from{scrlayer-scrpage.dtx}{interface,scrpage,identify}% + \from{scrlayer.dtx}{interface,scrpage,init}% + \from{scrlayer-scrpage.dtx}{interface,scrpage,init}% + \from{scrlayer.dtx}{interface,scrpage,options}% + \from{scrlayer-scrpage.dtx}{interface,scrpage,options}% + \from{scrlayer.dtx}{interface,scrpage,body}% + \from{scrlayer-scrpage.dtx}{interface,scrpage,body}% + \from{scrlogo.dtx}{logo}% + }% + } + \@@input scrstrop.inc +\else + \let\endbatchfile\relax +\fi +\endbatchfile +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\setcounter{StandardModuleDepth}{2} +% We need (foo,bar) +\DeclareRobustCommand*{\pparg}[2]{\texttt(\meta{#1}\texttt,\meta{#2}\texttt)} +% and {foo:bar} +\DeclareRobustCommand*{\mmarg}[2]{% + \texttt{\char`\{}\meta{#1}\texttt:\meta{#2}\texttt{\char`\}}} +\begin{document} + \DocInput{scrlayer-scrpage.dtx} +\end{document} +% +% \fi^^A meta-comment +% +% \changes{v0.0}{2012/01/01}{start of interface} +% \changes{v3.32}{2020/09/11}{do not use deprecated interface commands} +% \changes{v3.36}{2022/02/09}{switch over from \cls*{scrdoc} to +% \cls*{koma-script-source-doc}} +% \changes{v3.36}{2022/02/09}{require package \pkg*{scrlogo} instead of +% defining \cs{KOMAScript}} +% \changes{v3.36}{2022/02/09}{whole implementation documentation in English} +% +% \GetFileInfo{scrlayer-scrpage.dtx} +% \title{The \texttt{scrlayer} Interface of +% \href{https://komascript.de}{\KOMAScript} Package \pkg*{scrlayer-scrpage}} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Revision \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% This package defines several extensions above \pkg*{scrlayer} for easy +% handling of pairs of \emph{headings} and \emph{plain} page styles. So this +% widely is a replacement of the not any longer supported, former +% \KOMAScript{} package \pkg{scrpage2}. +% \end{abstract} +% \tableofcontents +% +% \section{User Manual} +% +% You can find the user manuals of \pkg*{scrlayer-scrpage} in the \KOMAScript{} +% manual, either the German \file{scrguide} or the English \file{scrguien}. +% +% \MaybeStop{\PrintIndex} +% +% +% \section{Implementation of \pkg*{scrlayer-scrpage}} +% \label{sec:scrlayer-scrpage} +% +% This section if for developers only. +% +% \begin{macrocode} +%<*interface> +% \end{macrocode} +% +% +% \subsection{Initialising some values before the options} +% +% \begin{macrocode} +%<*init> +% \end{macrocode} +% +% Initialisation before all options (even the options from +% \file{scrlayer.dtx}). +% +% Currently nothing to do. +% +% \begin{macrocode} +% +% \end{macrocode} +% +% +% \subsection{Options} +% +% \begin{macrocode} +%<*options> +% \end{macrocode} +% +% Package \pkg{scrpage2} didn't support \KOMAScript{} options but only +% regular \LaTeX{} package options. This interface will also support those +% options, but uses \KOMAScript{} options for the implementation. This +% results in additional features of the interface. +% +% Note, that some options are already defined before this by the common option +% parts of \file{scrlayer.dtx}. All others will follow step by step in the +% main part. +% +% Options \opt{headinclude}, \opt{headexclude}, \opt{footinclude} and +% \opt{footexclude} of package \pkg{scrpage2} are deprecated since +% package version 2.3, 2008-12-08. They won't be supported by the +% \pkg*{scrlayer-scrpage} interface. +% +% Additional initialisation may be done here, but currently this isn't +% needed. +% +% \begin{macrocode} +% +% \end{macrocode} +% +% +% \subsection{Width of header and footer} +% +% \pkg{scrpage2} provided commands \cs{setheadwidth} and \cs{setfootwidth} to +% set the width of the page head or footer different from the width of the +% text area of the page. Optionally those commands allow to setup an +% horizontal offset for the head or footer. This interface provides the same +% feature but prefers to set up the widths and offsets with \KOMAScript{} +% options. Those options will become the primary interface. +% +% \begin{option}{headwidth} +% \changes{v0.9.1757}{2014/04/09}{new: two offsets available} +% \changes{v3.17}{2015/02/25}{new: store the values} +% \begin{option}{footwidth} +% \changes{v0.9.1757}{2014/04/09}{new: two offsets available} +% \changes{v3.15}{2014/12/28}{fix: missing colon in call of +% \cs{sls@split@at@iicolons}} +% \changes{v3.17}{2015/02/25}{new: store the values} +% \begin{description} +% \item[\texttt{=\meta{special dimensional expression}:\meta{special +% dimensional expression}}:] see \cs{sls@settowidthof} for information about +% the syntax of \meta{special dimensional expression}. The width of the page +% head or footer will be set to the result of the first on, the offset to +% the result of the second one. If the first one\,---\,the width\,---\,is +% omitted, the current width will be used. If the second one\,---\,the +% offset\,---\,is omitted and the width is the width of the text area plus +% the margin note column, the offset will be set to zero. If the second one +% is omitted and the width is not the width of the text area plus the margin +% note column, a special kind of centering will be used. +% \end{description} +% These options may be used to set up the widths of head and foot. +% \begin{macrocode} +%<*options> +\KOMA@key{headwidth}{% + \begingroup + \sls@split@at@iicolons#1:::\@nil + \ifx\reserved@a\@empty \let\reserved@a\sls@headwidth\fi + \edef\reserved@a{% + \noexpand\endgroup + \noexpand\sls@set@hf@width{head}{\reserved@b}{\reserved@c}{\reserved@a}% + \noexpand\FamilyKeyStateProcessed + \noexpand\KOMA@kav@replacevalue{.scrlayer-scrpage.sty}{headwidth}{% + \reserved@a:\reserved@b:\reserved@c + }% + }% + \reserved@a +} +\KOMA@key{footwidth}{% + \begingroup + \sls@split@at@iicolons#1:::\@nil + \ifx\reserved@a\@empty \let\reserved@a\sls@footwidth\fi + \edef\reserved@a{% + \noexpand\endgroup + \noexpand\sls@set@hf@width{foot}{\reserved@b}{\reserved@c}{\reserved@a}% + \noexpand\FamilyKeyStateProcessed + \noexpand\KOMA@kav@replacevalue{.scrlayer-scrpage.sty}{footwidth}{% + \reserved@a:\reserved@b:\reserved@c + }% + }% + \reserved@a +} +% \end{macrocode} +% \begin{macro}{\sls@split@at@iicolons} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{description} +% \item[\texttt{\meta{balanced}:\meta{balanced}:\meta{balanced}\cs{@nil}}:] +% first \meta{balanced} will be stored into \cs{reserved@a}, second into +% \cs{reserved@b}, third will be eaten and warn about if it is neither empty +% and nor a colon. +% \end{description} +% This little helper is used, e.g., by options \opt{headwidth} and +% \opt{footwidth}. +% \begin{macrocode} +\newcommand\sls@split@at@iicolons{} +\def\sls@split@at@iicolons#1:#2:#3:#4\@nil{% + \Ifstr{#4}{}{}{% + \Ifstr{#4}{:}{}{% + \Ifstr{#4}{::}{}{% + \PackageWarning{scrlayer}{extra `:' found!\MessageBreak + You've used more than two colons at the argument\MessageBreak + of a two value option.\MessageBreak + The extra value(s) will be ignored% + }% + }% + }% + }% + \def\reserved@a{#1}% + \def\reserved@b{#2}% + \def\reserved@c{#3}% +}% +% \end{macrocode} +% \end{macro}^^A \sls@split@at@iicolons +% \begin{macro}{\sls@set@hf@width} +% \changes{v0.9.1757}{2014/04/09}{new: two offsets available} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{description} +% \item[\marg{head or foot}:] to complete the macro names for page head or +% footer, either \texttt{head} or \texttt{foot}. +% \item[\marg{special dimensional expression}:] the offset odd page +% \item[\marg{special dimensional expression}:] the offset even page +% \item[\marg{special dimensional expression}:] the width +% \end{description} +% This helper will generally set up width an offset of either head or footer. +% \begin{macrocode} +\newcommand*{\sls@set@hf@width}[4]{% + \sls@settowidthof{\@tempdima}{#4}% + \ifdim\@tempdima>\paperwidth + \PackageWarning + {scrlayer-scrpage}% + {You've set width of #1 to a value\MessageBreak + greater than width of page!\MessageBreak% + I'll reduce width of #1 to width of page}% + \setlength{\@tempdima}{\paperwidth}% + \else + \ifdim\@tempdima<\z@ + \PackageWarning + {scrlayer-scrpage}% + {You've set width of #1 to negative value!\MessageBreak% + I'll set it to 0pt}% + \setlength{\@tempdima}{\z@}% + \fi + \fi + \expandafter\edef\csname sls@#1width\endcsname{\the\@tempdima}% + \setlength{\@tempdima}{\textwidth}% + \addtolength{\@tempdima}{-\csname sls@#1width\endcsname}% + \Ifstr{#2}{}{% + \ifdim \csname sls@#1width\endcsname + = \dimexpr \textwidth+\marginparwidth+\marginparsep\relax + \setlength{\@tempdimb}{\z@} + \else + \if@twoside + \setlength{\@tempdimb}{.3333333333\@tempdima}% + \else + \setlength{\@tempdimb}{.5\@tempdima}% + \fi + \fi + }{% + \sls@settowidthof{\@tempdimb}{#2}% + }% + \Ifstr{#3}{}{% + \addtolength{\@tempdima}{-\@tempdimb}% + }{% + \sls@settowidthof{\@tempdima}{#3}% + \setlength{\@tempdima}{-\@tempdima}% + }% + \ifdim\@tempdimb<\z@ + \setlength{\@tempdimb}{-\@tempdimb}% + \expandafter\edef\csname sls@odd#1shift\endcsname{-\the\@tempdimb}% + \else + \expandafter\edef\csname sls@odd#1shift\endcsname{\the\@tempdimb}% + \fi + \ifdim\@tempdima<\z@ + \setlength{\@tempdima}{-\@tempdima}% + \expandafter\edef\csname sls@even#1shift\endcsname{-\the\@tempdima}% + \else + \expandafter\edef\csname sls@even#1shift\endcsname{\the\@tempdima}% + \fi +}% +% \end{macrocode} +% \end{macro}^^A \sls@set@hf@width +% \begin{macro}{\sls@headwidth,\sls@oddheadshift,\sls@evenheadshift, +% \sls@footwidth,\sls@oddfootshift,\sls@evenfootshift} +% To store width and offset of page head an footer, we use macros. Those are +% also used by the options and therefore need to be initialised before option +% usage. +% \begin{macrocode} +\scr@ifundefinedorrelax{@headwidth}{% + \newcommand*{\sls@headwidth}{\textwidth}% + \KOMA@kav@add{.scrlayer-scrpage.sty}{headwidth}{\textwidth:0pt:0pt}% +}{% + \newcommand*{\sls@headwidth}{\@headwidth}% + \KOMA@kav@xadd{.scrlayer-scrpage.sty}{headwidth}{\@headwidth:0pt:0pt}% +}% +\newcommand*{\sls@oddheadshift}{0pt} +\newcommand*{\sls@evenheadshift}{0pt} +\scr@ifundefinedorrelax{@footwidth}{% + \newcommand*{\sls@footwidth}{\textwidth}% + \KOMA@kav@add{.scrlayer-scrpage.sty}{footwidth}{\textwidth:0pt:0pt} +}{% + \newcommand*{\sls@footwidth}{\@footwidth}% + \KOMA@kav@xadd{.scrlayer-scrpage.sty}{footwidth}{\@footwidth:0pt:0pt} +}% +\newcommand*{\sls@oddfootshift}{0pt} +\newcommand*{\sls@evenfootshift}{0pt} +% \end{macrocode} +% \end{macro}^^A \sls@headwidth … \sls@evenfootshift +% +% \begin{macro}{\sls@settowidthof,\sls@deftowidthof} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% the special dimensional expressions may be either one of the strings +% \texttt{paper}, \texttt{text}, \texttt{marginpar}, +% \texttt{textwithmarginpar}, \texttt{head}, \texttt{foot}, +% \texttt{headtopline}, \texttt{headsepline}, \texttt{footsepline}, +% \texttt{footbotline}, or \texttt{page} or a valid dimensional +% expression. But it cannot be both a dimensional expression using symbolic +% values! +% \begin{macrocode} +\newcommand*{\sls@settowidthof}[2]{% + \Ifstr{#2}{paper}{% + \setlength{#1}{\paperwidth}% + }{% + \Ifstr{#2}{text}{% + \setlength{#1}{\textwidth}% + }{% + \Ifstr{#2}{marginpar}{% + \setlength{#1}{\dimexpr \marginparwidth+\marginparsep\relax}% + }{% + \Ifstr{#2}{textwithmarginpar}{% + \setlength{#1}{\dimexpr\textwidth + +\marginparwidth + +\marginparsep\relax}% + }{% + \Ifstr{#2}{head}{% + \setlength{#1}{\sls@headwidth}% + }{% + \Ifstr{#2}{foot}{% + \setlength{#1}{\sls@footwidth}% + }{% + \Ifstr{#2}{headtopline}{% + \setlength{#1}{\sls@headabove@linelength}% + }{% + \Ifstr{#2}{headsepline}{% + \setlength{#1}{\sls@headbelow@linelength}% + }{% + \Ifstr{#2}{footsepline}{% + \setlength{#1}{\sls@footabove@linelength}% + }{% + \Ifstr{#2}{footbotline}{% + \setlength{#1}{\sls@footbelow@linelength}% + }{% + \Ifstr{#2}{page}{% + \setlength{#1}{\paperwidth}% + \begingroup + \expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname ta@bcor\endcsname\relax\else + \addtolength{#1}{-\ta@bcor}% + \fi + }{% + \setlength{#1}{\dimexpr #2\relax}% + }% + }% + }% + }% + }% + }% + }% + }% + }% + }% + }% +}% +\newcommand*{\sls@deftowidthof}[2]{% + \Ifstr{#2}{autohead}{% + \expandafter\def\csname #1\endcsname{\sls@headwidth}% + }{% + \Ifstr{#2}{autofoot}{% + \expandafter\def\csname #1\endcsname{\sls@footwidth}% + }{% + \sls@settowidthof{\@tempdima}{#2}% + \expandafter\edef\csname #1\endcsname{\the\@tempdima}% + }% + }% +}% +% +% \end{macrocode} +% \end{macro}^^A \sls@deftowidthof,\sls@settowidthof +% \end{option}^^A footwidth +% \end{option}^^A footheight +% +% \begin{command}{\setheadwidth,\setfootwidth} +% \changes{v3.36}{2022/02/09}{warning about deprecated command} +% For compatibility with \pkg{scrpage2}, map the commands to the options: +% \begin{macrocode} +%<*body> +\newcommand*{\setheadwidth}[2][]{% + \PackageWarning{scrlayer-scrpage}{% + Command `\string\setheadwidth' is deprecated.\MessageBreak + I'm using \detokenize{\KOMAoptions{headwidth=#2:#1}} instead,\MessageBreak + and so should you do}% + \KOMAoptions{headwidth=#2:#1}% +}% +\newcommand*{\setfootwidth}[2][]{% + \PackageWarning{scrlayer-scrpage}{% + Command `\string\setfootwidth' is deprecated.\MessageBreak + I'm using \detokenize{\KOMAoptions{footwidth=#2:#1}} instead,\MessageBreak + and so should you do}% + \KOMAoptions{footwidth=#2:#1}% +}% +% +% \end{macrocode} +% \end{command}^^A \setheadwidth,\setfootwidth +% +% +% \subsection{Lines in page head and footer} +% +% The interface implements the options \opt{headtopline}, \opt{headsepline}, +% \opt{footsepline}, \opt{footbotline}, \opt{plainheadtopline}, +% \opt{plainheadsepline}, \opt{plainfootsepline}, \opt{plainfootbotline}, +% \opt{ilines}, \opt{clines}, and \opt{olines}, the commands +% \cs{setheadtopline}, \cs{setheadsepline}, \cs{setfootsepline}, and +% \cs{setfootbotline}, and the corresponding \KOMAScript{} font elements of +% package \pkg{scrpage2}. Some of the options are extended to understand +% values. +% +% \begin{option}{headtopline,headsepline,footsepline,footbotline} +% \changes{v3.17}{2015/02/25}{new: store the values} +% \begin{description} +% \item[{\texttt{=\meta{dimensional expression}:\meta{dimensional +% expression}}:}] +% \end{description}\noindent +% Define thickness and length of the a default separation line between: +% \begin{description} +% \item[\opt{headtopline}:] the top margin of the page and the page head. +% \item[\opt{headsepline}:] the page head and the text area. +% \item[\opt{footsepline}:] the text area and the page footer. +% \item[\opt{footbotline}:] the page footer and the bottom margin. +% \end{description} +% Both \meta{dimensional expression} values may be omitted. In that case +% thickness would be 0.4\,pt, and length would be the width of the page head +% or footer. If the second argument, the length, has been omitted the +% \texttt{:} may also be omitted. +% \begin{macrocode} +%<*options> +\KOMA@key{headtopline}[:]{% + \sls@set@values[headtopline]{head}{above}{#1}% +} +\KOMA@key{headsepline}[:]{% + \sls@set@values[headsepline]{head}{below}{#1}% +} +\KOMA@key{footsepline}[:]{% + \sls@set@values[footsepline]{foot}{above}{#1}% +} +\KOMA@key{footbotline}[:]{% + \sls@set@values[footbotline]{foot}{below}{#1}% +} +% \end{macrocode} +% \begin{macro}{\sls@set@values} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{description} +% \item[\oarg{option name}:] either empty or the name of the option that sets +% the line, +% \item[\marg{head or foot}:] either \texttt{head} or \texttt{foot}, +% \item[\marg{above or below}:] either \texttt{above} or \texttt{below}, +% \item[\mmarg{dimension expression}{dimension expression}:] length an +% thickness of a line (both are optional). +% \end{description} +% Helper macros for the options to set two macros by two values of one +% option. The two values are separated by a colon. +% \begin{macrocode} +\newcommand*{\sls@set@values}[4][]{% + \begingroup + \Ifstr{#1}{}{% + \FamilyKeyStateUnknown + }{% + \KOMA@set@ifkey{#1}{@tempswa}{#4}% + }% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \if@tempswa + \edef\reserved@b{% + \noexpand\endgroup + \noexpand\@namedef{sls@#2#3@linethickness}{.4pt}% + \noexpand\@namedef{sls@#2#3@linelength}{% + \expandafter\noexpand\csname sls@#2width\endcsname + }% + }% + \else + \def\reserved@b{% + \endgroup + \@namedef{sls@#2#3@linethickness}{0pt}% + \@namedef{sls@#2#3@linelength}{0pt}% + }% + \fi + \else + \let\reserved@a\@empty + \let\reserved@b\@empty + \sls@split@at@colon#4::\@nil + \ifx\reserved@a\@empty + \def\reserved@a{\endgroup\@namedef{sls@#2#3@linethickness}{.4pt}}% + \else + \setlength{\@tempdima}{\dimexpr\reserved@a\relax}% + \edef\reserved@a{% + \noexpand\endgroup + \noexpand\@namedef{sls@#2#3@linethickness}{\the\@tempdima}% + }% + \fi + \ifx\reserved@b\@empty + \def\reserved@b{% + \reserved@a + \@namedef{sls@#2#3@linelength}{\@nameuse{sls@#2width}}% + }% + \else + \edef\reserved@b{% + \noexpand\reserved@a + \noexpand\sls@deftowidthof{sls@#2#3@linelength}{\reserved@b}% + }% + \fi + \fi + \reserved@b + \FamilyKeyStateProcessed + \Ifstr{#1}{}{}{% + \KOMA@kav@xreplacevalue{.scrlayer-scrpage.sty}{#1}{% + \csname sls@#2#3@linethickness\endcsname + :\csname sls@#2#3@linelength\endcsname + }% + }% +}% +% \end{macrocode} +% \end{macro}^^A \sls@set@values +% \begin{macro}{\sls@split@at@colon} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{description} +% \item[\texttt{\meta{balanced}:\meta{balanced}:\meta{balanced}\cs{@nil}}:] +% first \meta{balanced} will be stored into \cs{reserved@a}, second into +% \cs{reserved@b}, third will be eaten and warn about if it is neither empty +% and nor a colon. +% \end{description} +% This little helper is used, e.g., by options \opt{headwidth} and +% \opt{footwidth}. +% \begin{macrocode} +\newcommand*{\sls@split@at@colon}{} +\def\sls@split@at@colon#1:#2:#3\@nil{% + \Ifstr{#3}{}{}{% + \Ifstr{#3}{:}{}{% + \PackageWarning{scrlayer}{extra `:' found!\MessageBreak + You've used more than one colon at the argument\MessageBreak + of a two value option.\MessageBreak + The extra value(s) will be ignored% + }% + }% + }% + \def\reserved@a{#1}% + \def\reserved@b{#2}% +}% +% \end{macrocode} +% \end{macro}^^A \sls@split@at@colon +% \begin{macro}{\sls@headabove@linelength,\sls@headabove@linethickness, +% \sls@headbelow@linelength,\sls@headbelow@linethickness, +% \sls@footabove@linelength,\sls@footabove@linethickness, +% \sls@footbelow@linelength,\sls@footbelow@linethickness} +% To store length and thickness of the lines at the page head an footer, we +% use macros. Those are also used by the options and therefore need to be +% initialised before option usage. +% \begin{macrocode} +\newcommand*{\sls@headabove@linelength}{\sls@headwidth}% +\newcommand*{\sls@headabove@linethickness}{0pt}% +\KOMA@kav@xadd{.scrlayer-scrpage.sty}{headtopline}{% + \expandafter\noexpand\sls@headabove@linethickness:% + \expandafter\noexpand\sls@headabove@linelength +} +\newcommand*{\sls@headbelow@linelength}{\sls@headwidth}% +\newcommand*{\sls@headbelow@linethickness}{0pt}% +\KOMA@kav@xadd{.scrlayer-scrpage.sty}{headsepline}{% + \expandafter\noexpand\sls@headbelow@linethickness:% + \expandafter\noexpand\sls@headbelow@linelength +} +\newcommand*{\sls@footabove@linelength}{\sls@footwidth}% +\newcommand*{\sls@footabove@linethickness}{0pt}% +\KOMA@kav@xadd{.scrlayer-scrpage.sty}{footsepline}{% + \expandafter\noexpand\sls@footabove@linethickness:% + \expandafter\noexpand\sls@footabove@linelength +} +\newcommand*{\sls@footbelow@linelength}{\sls@footwidth}% +\newcommand*{\sls@footbelow@linethickness}{0pt}% +\KOMA@kav@xadd{.scrlayer-scrpage.sty}{footbotline}{% + \expandafter\noexpand\sls@footbelow@linethickness:% + \expandafter\noexpand\sls@footbelow@linelength +} +% +% \end{macrocode} +% \end{macro}^^A \sls@headabove@linelength … \sls@footbelow@linethickness +% \end{option}^^A headtopline … footbotline +% +% \begin{option}{plainheadtopline,plainheadsepline, +% plainfootsepline,plainfootbotline} +% \begin{macro}{\ifsls@plain@head@above@line,\sls@plain@head@above@linetrue, +% \sls@plain@head@above@linefalse, +% \ifsls@plain@head@below@line,\sls@plain@head@below@linetrue, +% \sls@plain@head@below@linefalse, +% \ifsls@plain@foot@above@line,\sls@plain@foot@above@linetrue, +% \sls@plain@foot@above@linefalse, +% \ifsls@plain@foot@below@line,\sls@plain@foot@below@linetrue, +% \sls@plain@foot@below@linefalse} +% \begin{description} +% \item[\texttt{=\meta{switch value}}:] +% \end{description}\noindent +% While these only switches the rule on or off, we need only some switches. +% \begin{macrocode} +%<*options> +\KOMA@ifkey{plainheadtopline}{sls@plain@head@above@line}% +\KOMA@ifkey{plainheadsepline}{sls@plain@head@below@line}% +\KOMA@ifkey{plainfootsepline}{sls@plain@foot@above@line}% +\KOMA@ifkey{plainfootbotline}{sls@plain@foot@below@line}% +% +% \end{macrocode} +% \end{macro}^^A \ifsls@plain@foot@below@line … \sls@plain@foot@below@linefalse +% \end{option}^^A plainheadtopline … plainfootbotline +% +% \begin{option}{ilines,clines,olines} +% \changes{v3.17}{2015/02/25}{storing values} +% \begin{macro}{\sls@hfline@adjust} +% Maybe it would be more useful to be able to adjust each line on its own or +% at most to define an offset. But \pkg{scrpage2} supports only these +% options. At least we can set the options inside a layer or page style. This +% may help. +% \begin{macrocode} +%<*options> +\newcommand*{\sls@hfline@adjust}{0}% +\KOMA@kav@add{.scrlayer-scrpage.sty}{ilines}{} +\KOMA@key{ilines}[]{% + \ifx\relax#1\relax + \renewcommand*{\sls@hfline@adjust}{0}% + \FamilyKeyStateProcessed + \KOMA@kav@removekey{.scrlayer-scrpage.sty}{ilines}% + \KOMA@kav@removekey{.scrlayer-scrpage.sty}{clines}% + \KOMA@kav@removekey{.scrlayer-scrpage.sty}{olines}% + \KOMA@kav@add{.scrlayer-scrpage.sty}{ilines}{}% + \else + \def\FamilyKeyStateProcessed{unexpected value}% + \fi +} +\KOMA@key{clines}[]{% + \ifx\relax#1\relax + \renewcommand*{\sls@hfline@adjust}{1}% + \FamilyKeyStateProcessed + \KOMA@kav@removekey{.scrlayer-scrpage.sty}{ilines}% + \KOMA@kav@removekey{.scrlayer-scrpage.sty}{clines}% + \KOMA@kav@removekey{.scrlayer-scrpage.sty}{olines}% + \KOMA@kav@add{.scrlayer-scrpage.sty}{clines}{}% + \else + \def\FamilyKeyStateProcessed{unexpected value}% + \fi +} +\KOMA@key{olines}[]{% + \ifx\relax#1\relax + \renewcommand*{\sls@hfline@adjust}{2}% + \FamilyKeyStateProcessed + \KOMA@kav@removekey{.scrlayer-scrpage.sty}{ilines}% + \KOMA@kav@removekey{.scrlayer-scrpage.sty}{clines}% + \KOMA@kav@removekey{.scrlayer-scrpage.sty}{olines}% + \KOMA@kav@add{.scrlayer-scrpage.sty}{olines}{}% + \else + \def\FamilyKeyStateProcessed{unexpected value}% + \fi +} +\KOMA@kav@add{.scrlayer-scrpage.sty}{ilines}{} +% +% \end{macrocode} +% \end{macro}^^A \sls@hfline@adjust +% \end{option}^^A ilines … olines +% +% \begin{command}{\setheadtopline,\setheadsepline, +% \setfootsepline,\setfootbotline} +% \begin{description} +% \item[\oarg{extended dimensional expression}:] the length of the line; if +% omitted the length will use the width of the page head or footer while +% printing the line. +% \item[\marg{dimensional expression}:] the thickness of the line. +% \item[\oarg{code}:] the font selection code for the line. You may use it for +% any kind of operation, that doesn't change the position, width, height, or +% depth, e.g., to change the colour of the line. +% \end{description} +% \begin{macrocode} +%<*body> +\newcommand*{\setheadtopline}{\sls@setline{head}{above}}% +\newcommand*{\setheadsepline}{\sls@setline{head}{below}}% +\newcommand*{\setfootsepline}{\sls@setline{foot}{above}}% +\newcommand*{\setfootbotline}{\sls@setline{foot}{below}}% +% \end{macrocode} +% \begin{macro}{\sls@setline} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \begin{macro}{\sls@@setline} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{macro}{\sls@@@setline} +% \changes{v3.17}[2015/02/27]{internal use of the corresponding options} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{macro}{\sls@@@@setline} +% \changes{v3.18}{2015/06/17}{explicit reuse of the current length} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% Helper to set up the line attributes processing the parameters of the +% commands above. +% \begin{macrocode} +\newcommand*\sls@setline[2]{% + \kernel@ifnextchar[%] + {\sls@@setline{#1}{#2}}{\sls@@@setline{#1#2}}% +}% +\newcommand*{\sls@@setline}{} +\def\sls@@setline#1#2[#3]{% + \Ifstr{#3}{auto}{% + \sls@deftowidthof{sls@#1#2@linelength}{#3#1}% + }{% + \sls@deftowidthof{sls@#1#2@linelength}{#3}% + }% + \sls@@@setline{#1#2}% +}% +\newcommand*{\sls@@@setline}[2]{% + \edef\@tempa{#2}\edef\@tempb{current}% + \Ifstr{#2}{}{}{% + \Ifstr{#2}{current}{}{% + \setlength{\@tempdima}{#2}% + \Ifstr{#1}{headabove}{% + \KOMAExecuteOptions[.scrlayer-scrpage.sty]% + {headtopline=\@tempdima:\csname sls@#1@linelength\endcsname}% + }{\Ifstr{#1}{headbelow}{% + \KOMAExecuteOptions[.scrlayer-scrpage.sty]% + {headsepline=\@tempdima:\csname sls@#1@linelength\endcsname}% + }{% + \Ifstr{#1}{footabove}{% + \KOMAExecuteOptions[.scrlayer-scrpage.sty]% + {footsepline=\@tempdima:\csname sls@#1@linelength\endcsname}% + }{% + \KOMAExecuteOptions[.scrlayer-scrpage.sty]% + {footbotline=\@tempdima:\csname sls@#1@linelength\endcsname}% + }% + }% + }% + }% + }% + \PackageWarning{scrlayer-scrpage}{% + Command deprecated!\MessageBreak + Usage of `\string\setheadtopline', + `\string\setheadsepline',\MessageBreak + `\string\setfootsepline', and `\string\setfootbotline'\MessageBreak + became deprecated with scrlayer-scrpage.\MessageBreak + You should use KOMA-Script options\MessageBreak + `headsepline', `headtopline', `footsepline',\MessageBreak + or `footbotline' with values\MessageBreak + `:' to setup\MessageBreak + the line length and thickness, and\MessageBreak + `\string\setkomafont' or `\string\addtokomafont' to\MessageBreak + setup the colour% + }% + \kernel@ifnextchar[%] + {% + \sls@@@@setline{#1}% + }{% + }% +}% +\newcommand*{\sls@@@@setline}{} +\def\sls@@@@setline#1[#2]{% + \Ifstr{#1}{headabove}{\setkomafont{headtopline}{#2}}{% + \Ifstr{#1}{headbelow}{\setkomafont{headsepline}{#2}}{% + \Ifstr{#1}{footabove}{\setkomafont{footsepline}{#2}}{% + \setkomafont{footbotline}{#2}% + }% + }% + }% +}% +% \end{macrocode} +% \end{macro}^^A \sls@setline +% \end{macro}^^A \sls@@setline +% \end{macro}^^A \sls@@@setline +% \end{macro}^^A \sls@@@@setline +% \begin{fontelement}{headtopline,headsepline,footsepline,footbotline} +% These are the font elements used in \cs{sls@hf@rule} to set the rules +% with, i.e., another colour. Note, that those may already be defined and +% become only part of the interface if they are not. +% \begin{macrocode} +\@ifundefined{scr@fnt@headtopline}{% + \newkomafont{headtopline}{}% +}{} +\@ifundefined{scr@fnt@headsepline}{% + \newkomafont{headsepline}{}% +}{} +\@ifundefined{scr@fnt@footsepline}{% + \newkomafont{footsepline}{}% +}{} +\@ifundefined{scr@fnt@footbotline}{% + \newkomafont{footbotline}{}% +}{} +% +% \end{macrocode} +% \end{fontelement}^^A headtopline … footbotline +% \end{command}^^A \setheadtopline … \setfootbotline +% +% \begin{length}{\headheight,\footheight} +% \changes{v3.24}{2017/05/22}{warning depends on option \opt{singlespacing}} +% Some classes set \len{headheight} to a very, very small value. We'll +% warn about that. +% \changes{v3.24}{2017/05/23}{also warn for low \cs{footheight}} +% If the \len{headheight} is OK, we also test for \len{footheight}. +% \begin{macrocode} +%<*body> +\AtBeginDocument{% + \ifdim \headheight + <\if@ps@singlespacing\f@baselineskip\else\baselineskip\fi\relax + \PackageWarningNoLine{scrlayer-scrpage}{Very small head height + detected!\MessageBreak + Using scrlayer-scrpage the head height\MessageBreak + should be at least \string\baselineskip, which is\MessageBreak + \if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi\space + currently.\MessageBreak + But head height is currently + \the\headheight\space only.\MessageBreak + You may use\MessageBreak + \@ifpackageloaded{geometry}{% + geometry option + `head=\if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi'% + }{% + \@ifpackageloaded{typearea}{% + typearea option `headheight=% + \if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi'% + }{% + \string\setlength{\string\headheight}% + {\if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi}% + }% + }\MessageBreak + \if@ps@singlespacing\else\ifdim \headheight<\f@baselineskip\else + or load package `scrlayer-scrpage' with\MessageBreak + option `singlespacing=true'\MessageBreak + \fi\fi + to avoid this warning% + }% + \else + \ifdim \footheight + <\if@ps@singlespacing\f@baselineskip\else\baselineskip\fi\relax + \PackageWarningNoLine{scrlayer-scrpage}{Very small foot height + detected!\MessageBreak + Using scrlayer-scrpage the foot height\MessageBreak + should be at least \string\baselineskip, which is\MessageBreak + \if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi\space + currently.\MessageBreak + But foot height is currently + \the\footheight\space only.\MessageBreak + You may use\MessageBreak + \@ifpackageloaded{typearea}{% + typearea option `footheight=% + \if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi'% + }{% + \string\setlength{\string\footheight}% + {\if@ps@singlespacing\f@baselineskip\else\the\baselineskip\fi}% + }% + \MessageBreak + \if@ps@singlespacing\else\ifdim \footheight<\f@baselineskip\else + or load package `scrlayer-scrpage' with\MessageBreak + option `singlespacing=true'\MessageBreak + \fi\fi + to avoid this warning% + }% + \fi + \fi +} +% +% \end{macrocode} +% \end{length}^^A \headheight,\footheight +% +% +% \subsection{Usual \LaTeX{} kernel commands} +% +% \pkg*{scrlayer-scrpage} uses some very usual \LaTeX{} kernel commands, that +% should really behave like the original \LaTeX{} kernel commands do. But some +% packages redefine them without restoring them in the output routine before +% the page head and foot is build. Such a redefinition could break +% \pkg*{scrlayer-scrpage} or even provoke errors. Here we try to make sure, +% that \pkg*{scrlayer-scrpage} uses the correct definitions. Note: This should +% not be needed, if other packages would be more careful. +% +% \begin{command}{\LaTeXcentering,\LaTeXraggedright,\LaTeXraggedleft} +% \changes{v3.27}{2019/04/05}{added} +% \pkg*{scrlayer-scrpage} needs \cs{centering} to center, \cs{raggedright} +% to left align and \cs{raggedleft} to right align the three elements of +% three-part header and footer. \pkg{ragged2e} optionally redefines them. This +% is not perfect but does not break \pkg*{scrlayer-scrpage} completely. But +% \pkg{tabu}\footnote{Note, package \pkg{tabu} is not officially maintained by +% anyone for several years. Unofficially some members of The \LaTeX{} Team +% fix some problems related to new \LaTeX{} kernel changes. But the package +% is without support for all other problems, even if they are known for +% years. But you have to decide yourself, whether it is a good idea to use +% such packages.} also redefines them an that breaks \pkg*{scrlayer-scrpage} +% in a way, that even error messages can occur. So from version~3.27 +% \pkg*{scrlayer-scrpage} does not longer use \cs{centering}, \cs{raggedright} +% or \cs{raggedleft} but \cs{LaTeXcentering}, \cs{LaTeXraggedright} and +% \cs{LaTeXraggedleft}. With \pkg{ragged2e} and its option +% \opt{newcommands}/\opt{NewCommands} this would be already defined and +% contain the original definition. On all other circumstances the commands +% have to be defined. But these commands should not be defined as part of the +% interface or removing the interface could break other packages like +% \pkg{ragged2e}. +% \begin{macrocode} +%<*body> +\@ifundefined{LaTeXcentering}{\let\LaTeXcentering\centering}{} +\@ifundefined{LaTeXraggedleft}{\let\LaTeXraggedleft\raggedleft}{} +\@ifundefined{LaTeXraggedright}{\let\LaTeXraggedright\raggedright}{} +% +% \end{macrocode} +% \end{command}^^A \LaTeXcentering … \LaTeXraggedright +% +% +% \subsection{Style of running heads} +% +% This implements not only options \opt{komastyle} and \opt{standardstyle} of +% \pkg{scrpage2}, but also activates the default style at the end of the +% package and takes care for the correct behave of option \opt{markcase}. +% +% \begin{option}{pagestyleset} +% \begin{description} +% \item[\texttt{=\meta{string}}:] a valid name of a predefined +% style-set. Currently only \optvalue{KOMA-Script} and \optvalue{standard} +% are supported. Maybe more will follow. +% \end{description} +% Note, that the following automatic style activation must be before the +% first option usage: +% \begin{macrocode} +%<*init> +\AtEndOfPackage{% + \sls@auto@pagestyleset% +} +% \end{macrocode} +% \begin{macro}{\sls@auto@pagestyleset} +% \changes{v0.9}{2014/01/22}{added} +% \begin{macrocode} +\newcommand*{\sls@auto@pagestyleset}{% + \scr@ifundefinedorrelax{KOMAClassName}{% +% \PackageInfoNoLine{scrlayer-scrpage}{% +% auto-selection of `pagestyleset=standard'}% + \FamilyExecuteOptions[.scrlayer-scrpage.sty]{KOMA}{pagestyleset=standard}% + }{% +% \PackageInfoNoLine{scrlayer-scrpage}{% +% auto-selection of `pagestyleset=KOMA-Script'}% + \FamilyExecuteOptions[.scrlayer-scrpage.sty]{KOMA}% + {pagestyleset=KOMA-Script}% + }% +} +% +% \end{macrocode} +% \end{macro}^^A \sls@auto@pagestyleset +% \changes{v3.17}{2015/02/25}{storing the values} +% \begin{macrocode} +%<*options> +\KOMA@key{pagestyleset}{% + \scr@ifundefinedorrelax{sls@ps@style@#1}{% + \FamilyKeyStateUnknownValue + }{% + \let\sls@auto@pagestyleset\relax + \@nameuse{sls@ps@style@#1}% + \FamilyKeyStateProcessed + \KOMA@kav@replacevalue{.scrlayer-scrpage.sty}{pagestyleset}{#1}% + }% +} +% \end{macrocode} +% \begin{macro}{\sls@ps@style@standard,\sls@ps@style@KOMA-Script} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% These are the predefined page style sets. +% \begin{macrocode} +\newcommand*{\sls@ps@style@standard}{% + \let\MakeMarkcase\MakeUppercase + \scrlayer@AtEndOfPackage{% + \pagestyle{scrheadings}% + \clearpairofpagestyles + \ihead{\headmark}% + \ohead{\pagemark}% + \cfoot[\if@twoside\else\pagemark\fi]{}% + }% +}% +\expandafter\newcommand\expandafter*\csname sls@ps@style@KOMA-Script\endcsname{% + \let\MakeMarkcase\@firstofone + \scrlayer@AtEndOfPackage{% + \pagestyle{scrheadings}% + \clearpairofpagestyles + \ohead{\if@twoside\headmark\fi}% + \chead{\if@twoside\else\headmark\fi}% + \ofoot[\if@twoside\pagemark\fi]{\if@twoside\pagemark\fi}% + \cfoot[\if@twoside\else\pagemark\fi]{\if@twoside\else\pagemark\fi}% + \scr@ifundefinedorrelax{KOMAClassName}{}{% + \Ifstr{\KOMAClassName}{scrlttr2}{% +% \end{macrocode} +% We are using \cls*{scrlttr2}, so we have to initialise the page style +% different: +% \changes{v3.18}{2015/06/24}{missing \cs{lofoot} and \cs{rofoot} added} +% \begin{macrocode} + \clearpairofpagestyles + \lehead[\ifnum\@pageat=\z@\pagemark\fi] + {\ifnum\@pageat=\z@\pagemark\else\leftmark\fi}% + \lohead[\ifnum\@pageat=\z@\pagemark\fi] + {\ifnum\@pageat=\z@\pagemark\else\leftmark\fi}% + \chead[\ifnum\@pageat=\@ne\pagemark\fi] + {\ifcase\@pageat \rightmark\or \pagemark\or \rightmark\fi}% + \rehead[\ifnum\@pageat=\tw@\pagemark\fi] + {\ifcase\@pageat \leftmark\or \rightmark\or \pagemark + \else \rightmark\fi}% + \rohead[\ifnum\@pageat=\tw@\pagemark\fi] + {\ifcase\@pageat \leftmark\or \rightmark\or \pagemark + \else \rightmark\fi}% + \lefoot[\ifnum\@pageat=\thr@@\pagemark\fi] + {\ifnum\@pageat=\thr@@\pagemark\fi}% + \lofoot[\ifnum\@pageat=\thr@@\pagemark\fi] + {\ifnum\@pageat=\thr@@\pagemark\fi}% + \cfoot[\ifnum\@pageat=4 \pagemark\fi] + {\ifnum\@pageat=4 \pagemark\fi}% + \refoot[\ifnum\@pageat=5 \pagemark\fi] + {\ifnum\@pageat=5 \pagemark\fi}% + \rofoot[\ifnum\@pageat=5 \pagemark\fi] + {\ifnum\@pageat=5 \pagemark\fi}% + }{}% + }% + }% +}% +% +% \end{macrocode} +% \end{macro}^^A \sls@ps@style@standard,\sls@ps@style@KOMA-Script +% \end{option}^^A pagestyleset +% +% \begin{option}{komastyle,standardstyle} +% These options are deprecated, but defined for compatibility with +% \pkg{scrpage2}: +% \begin{macrocode} +%<*options> +\KOMA@DeclareDeprecatedOption[scrlayer-scrpage]{komastyle}{% + pagestyleset=KOMA-Script} +\KOMA@DeclareDeprecatedOption[scrlayer-scrpage]{standardstyle}{% + pagestyleset=standard} +% +% \end{macrocode} +% \end{option}^^A komastyle,standardstyle +% +% +% \subsection{Extended mark mechanisms} +% +% Package options \opt{markuppercase}, \opt{markusedcase}, and +% \opt{nouppercase} of package \pkg{scrpage2} are mapped to \KOMAScript{} +% option \opt{markcase}. +% +% \begin{option}{markuppercase,markusedcase,nouppercase} +% For compatibility with \pkg{scrpage2}. +% \begin{macrocode} +%<*options> +\KOMA@DeclareDeprecatedOption[scrlayer-scrpage]{markuppercase}{markcase=upper} +\KOMA@DeclareDeprecatedOption[scrlayer-scrpage]{markusedcase}{markcase=used} +\KOMA@DeclareDeprecatedOption[scrlayer-scrpage]{nouppercase}{% + markcase=ignoreuppercase% +} +% +% \end{macrocode} +% \end{option}^^A markuppercase … nouppercase +% +% +% \subsection{Expert page style definition interface} +% +% This is the low level interface of \pkg{scrpage2} with \cs{defpagestyle}, +% \cs{newpagestyle}, \cs{renewpagestyle}, and \cs{providepagestyle}. We will +% also define is. In difference to \pkg{scrpage2} layers are used. Following +% layers will be defined for each page style: +% \begin{description} +% \item[\texttt{\meta{page style name}.head.above.line}] line above the head +% \item[\texttt{\meta{page style name}.head.odd}] odd page head (only twoside) +% \item[\texttt{\meta{page style name}.head.even}] even page head (only +% twoside) +% \item[\texttt{\meta{page style name}.head.oneside}] single-side head (only +% oneside) +% \item[\texttt{\meta{page style name}.head.below}] line below the head +% \item[\texttt{\meta{page style name}.foot.above.line}] line above the footer +% \item[\texttt{\meta{page style name}.foot.odd}] odd page footer (only +% twoside) +% \item[\texttt{\meta{page style name}.foot.even}] even side footer (only +% twoside) +% \item[\texttt{\meta{page style name}.foot.oneside}] single-side footer (only +% oneside) +% \item[\texttt{\meta{page style name}.foot.below.line}] line below the footer +% (only oneside) +% \end{description} +% Note: \pkg{scrpage2} also provided star versions of the page style +% definition commands, doing the same like the starless versions. This has +% been done for compatibility reasons with deprecated +% \pkg[https://www.ctan.org/pkg/koma-script-obsolete]{scrpage} and has been +% described as to be removed some times. The layer interface doesn't support +% this any longer. +% +% +% \begin{command}{\defpagestyle} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{description} +% \item[\marg{string}:] the name of the page style to be defined (must be +% fully expandable and expand to a string only). +% \item[\marg{head/foot definition}:] will be used to define the head (see +% \cs{sls@defhead}). +% \item[\marg{head/foot definition}:] will be used to define the foot (see +% \cs{sls@deffoot}). +% \end{description} +% \begin{macrocode} +%<*body> +\newcommand*{\defpagestyle}[3]{% + \sls@defhead{#1}#2\@empty\@empty\@empty + \sls@deffoot{#1}#3\@empty\@empty\@empty + \DeclarePageStyleByLayers{#1}{% + #1.head.odd,#1.head.even,#1.head.oneside,% + #1.head.above.line,#1.head.below.line,% + #1.foot.odd,#1.foot.even,#1.foot.oneside,% + #1.foot.above.line,#1.foot.below.line% + }% +}% +% \end{macrocode} +% \begin{macro}{\sls@defhead,\sls@@defhead} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \begin{macro}{\sls@@@defhead} +% \changes{v0.9}{2014/08/18}{fixed names of layers \texttt{\dots head.odd} and +% \texttt{\dots head.even}} +% \begin{description} +% \item[\pparg{dimensional expression}{dimensional expression}:] length and +% thickness of a line (ruler) above the page head. May be omitted and if so +% the values from option \opt{headtopline} will be used. +% \item[\marg{code}:] will be executed on even pages; used to define the +% contents of layer \texttt{\meta{page style name}.head.even}. +% \item[\marg{code}:] will be executed on odd pages within two-side layout; +% used to define the contents of layer \texttt{\meta{page style +% name}.head.odd}. +% \item[\marg{code}:] will be executed on single-side pages; used to define +% the contents of layer \texttt{\meta{page style name}.head.oneside}. +% \item[\pparg{dimensional expression}{dimensional expression}:] length and +% thickness of a line (ruler) below the page head. May be omitted and if so +% the values from option \opt{headsepline} will be used. +% \end{description} +% Helper to define the head layers. +% \begin{macrocode} +\newcommand*\sls@defhead[1]{% + \kernel@ifnextchar(%) + {\sls@@defhead{#1}}% + {\sls@@defhead{#1}(\sls@headabove@linelength,\sls@headabove@linethickness)}% +}% +\newcommand*{\sls@@defhead}{} +\def\sls@@defhead#1(#2,#3)#4#5#6{% + \kernel@ifnextchar(%) + {\sls@@@defhead{#1}({#2},{#3}){#4}{#5}{#6}}% + {\sls@@@defhead{#1}% + ({#2},{#3})% + {#4}{#5}{#6}% + (\sls@headbelow@linelength,\sls@headbelow@linethickness)}% +}% +\newcommand*{\sls@@@defhead}{} +\def\sls@@@defhead#1(#2,#3)#4#5#6(#7,#8){% +% \end{macrocode} +% The lines: +% \begin{macrocode} + \DeclareLayer[% + background,% + hoffset=\sls@leftmargin{head},% + voffset=\sls@topmargin+\dp\strutbox,% + width=\sls@headwidth,% + height=0pt,% + align=bl,% + contents={% + {\normalfont\usekomafont{pageheadfoot}{\usekomafont{pagehead}{% + \sls@hf@rule{headtop}{#2}{#3}}}}% + }% + ]{#1.head.above.line}% + \DeclareLayer[% + background,% + hoffset=\sls@leftmargin{head},% + voffset=\sls@topmargin+\headheight-\ht\strutbox+#8,% + width=\sls@headwidth,% + height=0pt,% + align=tl,% + contents={% + {\normalfont\usekomafont{pageheadfoot}{\usekomafont{pagehead}{% + \sls@hf@rule{headsep}{#7}{#8}}}}% + }% + ]{#1.head.below.line}% +% \end{macrocode} +% The odd side, even side and one side: +% \changes{v3.13b}{2014/10/16}{workaround: additional group added to avoid +% pdf\TeX{} color stack warnings} +% \begin{macrocode} + \DeclareLayer[% + background,evenpage,twoside,% + head,% + hoffset=\sls@leftmargin{head},% + width=\sls@headwidth,% + contents={% + \sls@secure@box\headheight{% + \normalfont{\usekomafont{pageheadfoot}{\usekomafont{pagehead}{#4}}}}}% + ]{#1.head.even}% + \DeclareLayer[% + background,oddpage,twoside,% + head,% + hoffset=\sls@leftmargin{head},% + width=\sls@headwidth,% + contents={% + \sls@secure@box\headheight{% + \normalfont{\usekomafont{pageheadfoot}{\usekomafont{pagehead}{#5}}}}}% + ]{#1.head.odd}% + \DeclareLayer[% + background,oddpage,oneside,% + head,% + hoffset=\sls@leftmargin{head},% + width=\sls@headwidth,% + contents={% + \sls@secure@box\headheight{% + \normalfont{\usekomafont{pageheadfoot}{\usekomafont{pagehead}{#6}}}}}% + ]{#1.head.oneside}% +}% +% \end{macrocode} +% \begin{macro}{\sls@deffoot,\sls@@deffoot} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \begin{macro}{\sls@@@deffoot} +% \changes{v0.9}{2014/08/18}{fixed names of layers \texttt{\dots foot.odd} and +% \texttt{\dots foot.even}} +% \begin{description} +% \item[\pparg{dimensional expression}{dimensional expression}:] length and +% thickness of a line (ruler) above the page footer. May be omitted and if +% so the values from option \opt{footsepline} will be used. +% \item[\marg{code}:] will be executed on even pages; used to define the +% contents of layer \texttt{\meta{page style name}.foot.even}. +% \item[\marg{code}:] will be executed on odd pages within two-side layout; +% used to define the contents of layer \texttt{\meta{page style +% name}.foot.odd}. +% \item[\marg{code}:] will be executed on single-side pages; used to define +% the contents of layer \texttt{\meta{page style name}.foot.oneside}. +% \item[\pparg{dimensional expression}{dimensional expression}:] length and +% thickness of a line (ruler) below the page footer. May be omitted and if +% so the values from option \opt{footbotline} will be used. +% \end{description} +% Helper to define the foot layers. +% \begin{macrocode} +\newcommand*\sls@deffoot[1]{% + \kernel@ifnextchar(%) + {\sls@@deffoot{#1}}% + {\sls@@deffoot{#1}(\sls@footabove@linelength,\sls@footabove@linethickness)}% +}% +\newcommand*{\sls@@deffoot}{} +\def\sls@@deffoot#1(#2,#3)#4#5#6{% + \kernel@ifnextchar(%) + {\sls@@@deffoot{#1}({#2},{#3}){#4}{#5}{#6}}% + {\sls@@@deffoot{#1}% + ({#2},{#3})% + {#4}{#5}{#6}% + (\sls@footbelow@linelength,\sls@footbelow@linethickness)}% +}% +\newcommand*{\sls@@@deffoot}{} +\def\sls@@@deffoot#1(#2,#3)#4#5#6(#7,#8){% +% \end{macrocode} +% The lines: +% \begin{macrocode} + \DeclareLayer[% + foreground,% + hoffset=\sls@leftmargin{foot},% + voffset=\sls@topmargin + +\headheight+\headsep + +\textheight + +\footskip-\footheight + +2\dp\strutbox,% + width=\sls@footwidth,% + height=0pt,% + align=bl,% + contents={% + {\normalfont\usekomafont{pageheadfoot}{\usekomafont{pagefoot}{% + \sls@hf@rule{footsep}{#2}{#3}}}}% + }% + ]{#1.foot.above.line}% + \DeclareLayer[% + foreground,% + hoffset=\sls@leftmargin{foot},% + voffset=\sls@topmargin + +\headheight+\headsep + +\textheight + +\footskip + +2\dp\strutbox + +#8,% + width=\sls@footwidth,% + height=0pt,% + align=bl,% + contents={% + {\normalfont\usekomafont{pageheadfoot}{\usekomafont{pagefoot}{% + \sls@hf@rule{footbot}{#7}{#8}}}}% + }% + ]{#1.foot.below.line}% +% \end{macrocode} +% The odd side, even side and one side: +% \begin{macrocode} + \DeclareLayer[% + foreground,evenpage,twoside,% + foot,% + hoffset=\sls@leftmargin{foot},% + width=\sls@footwidth,% + contents={% + \sls@secure@box\footheight{% + \normalfont\usekomafont{pageheadfoot}{\usekomafont{pagefoot}{#4}}}}% + ]{#1.foot.even}% + \DeclareLayer[% + foreground,oddpage,twoside,% + foot,% + hoffset=\sls@leftmargin{foot},% + width=\sls@footwidth,% + contents={% + \sls@secure@box\footheight{% + \normalfont\usekomafont{pageheadfoot}{\usekomafont{pagefoot}{#5}}}}% + ]{#1.foot.odd}% + \DeclareLayer[% + foreground,oddpage,oneside,% + foot,% + hoffset=\sls@leftmargin{foot},% + width=\sls@footwidth,% + contents={% + \sls@secure@box\footheight{% + \normalfont\usekomafont{pageheadfoot}{\usekomafont{pagefoot}{#6}}}}% + ]{#1.foot.oneside}% +}% +% \end{macrocode} +% \begin{macro}{\sls@secure@box} +% \changes{v3.34}{2021/05/16}{\LaTeX{} team requested for additional \cs{par}} +% \begin{description} +% \item[\marg{length}:] a \LaTeX{} length, that gives the maximum +% height + depth of the \meta{content}. It has to be either +% \cs{headheight} or \cs{footheight}. +% \item[\marg{content}:] what should be output (inside the box). +% \end{description} +% Note, that several length may be changed, to fit. +% \begin{macrocode} +\newcommand*{\sls@secure@box}[2]{% + \begingroup + \setbox\z@\vbox{% + \ifsls@leavevmode\leavevmode\expandafter\ignorespaces\fi + #2\par + }% + \ifdim #1<\dimexpr \ht\z@+\dp\z@\relax + \PackageWarning{scrlayer-scrpage}{% + \string#1 to low.\MessageBreak + At least \the\dimexpr \ht\z@+\dp\z@\relax\space needed,\MessageBreak + but only \the#1 found.\MessageBreak + \ifsls@autoenlarge + I'll enlarge \string#1, for further\MessageBreak + processing, but you should do this yourself,\MessageBreak + \else + You should enlarge \string#1,\MessageBreak + \fi + e.g., + \scr@ifundefinedorrelax{geometry}{% + \scr@ifundefinedorrelax{typearea}{% + using\MessageBreak + \space\space\string\setlength{\string#1}{% + \the\dimexpr \ht\z@+\dp\z@\relax}\MessageBreak + in your preamble% + }{% + setting typearea's option\MessageBreak + `\expandafter\@gobble\string#1=\the\dimexpr \ht\z@+\dp\z@\relax'% + }% + }{% + \ifx #1\headheight + setting geometry's option\MessageBreak + `head=\the\dimexpr \ht\z@+\dp\z@\relax'% + \else + using\MessageBreak + \space\space\string\setlength{\string#1}{% + \the\dimexpr \ht\z@+\dp\z@\relax}\MessageBreak + in your preamble% + \fi + }% + \ifsls@autoenlarge + .\MessageBreak + I'll also + \ifx #1\headheight decrease \string\topmargin + \else increase \string\footskip\fi + \fi + }% + \ifsls@autoenlarge + \@tempdima\dimexpr \ht\z@+\dp\z@\relax + \ifx #1\headheight + \global\advance\topmargin by \dimexpr #1-(\ht\z@+\dp\z@)\relax + \dp\z@\dimexpr \dp\z@+\ht\z@+\dp\z@-\headheight\relax + \else + \global\advance\footskip by \dimexpr \ht\z@+\dp\z@-#1\relax + \fi + \global#1\@tempdima + \fi + \fi + \usebox\z@ + \endgroup +}% +% +% \end{macrocode} +% \begin{option}{hmode} +% Switch automatically to the horizontal mode before setting a page head or +% page footer element. +% \begin{macrocode} +%<*options> +\KOMA@ifkey{hmode}{sls@leavevmode} +% +% \end{macrocode} +% \end{option}^^A hmode +% \begin{option}{autoenlargeheadfoot} +% \changes{v3.25}{2018/01/14}{added} +% Automaticly enlarge vertical size of head or foot if the contents is to +% large. This is the default. +% \begin{macrocode} +%<*options> +\KOMA@ifkey{autoenlargeheadfoot}{sls@autoenlarge} +\KOMAExecuteOptions{autoenlargeheadfoot=true} +% +% \end{macrocode} +% \end{option}^^A autoenlargeheadfoot +% \end{macro}^^A \sls@secure@box +% \end{macro}^^A \sls@@@deffoot +% \end{macro}^^A \sls@deffoot,\sls@@deffoot +% \end{macro}^^A \sls@@@defhead +% \end{macro}^^A \sls@defhead,\sls@@defhead +% \begin{command}{\headfont} +% The low level page head font command. It is deprecated to redefine or use +% this and it may already be defined. +% \begin{macro}{\scr@fnt@pagehead} +% \changes{v3.25}{2018/02/05}{don't use \cs{newkomafont} to avoid warning} +% \begin{macro}{\scr@fnt@wrn@pagehead} +% \changes{v0.9}{2014/01/13}{warning always deactivated} +% \begin{macro}{\scr@fnt@pageheadfoot} +% \begin{macrocode} +%<*body> +\@ifundefined{scr@fnt@pagehead}{% + \scr@ifundefinedorrelax{scr@fnt@instead@pagehead}{}{% + \PackageInfo{scrlayer-scrpage}{% + Makeing stand-alone element `pagehead' from\MessageBreak + alias to `pageheadfoot'% + }% + \let\scr@fnt@instead@pagehead\relax + }% + \@ifundefined{@pageheadfont}{% + \newcommand*{\@pageheadfont}{}% + }{}% + \newcommand*{\scr@fnt@pagehead}{\@pageheadfont}% +}{} +\@ifundefined{scr@fnt@pageheadfoot}{% + \newcommand*{\scr@fnt@pageheadfoot}{\headfont}% + \@ifundefined{headfont}{% + \newcommand*{\headfont}{\normalcolor\slshape}% + }{} +}{} +\scr@ifundefinedorrelax{scr@fnt@wrn@pagehead}{}{% +% \PackageInfo{scrlayer-scrpage}{% +% deactivating warning for font element\MessageBreak +% `pagehead'}% + \let\scr@fnt@wrn@pagehead\relax +} +% \end{macrocode} +% \end{macro}^^A \scr@fnt@pageheadfoot +% \end{macro}^^A \scr@fnt@wrn@pagehead +% \end{macro}^^A \scr@fnt@pagehead +% \end{command}^^A \headfont +% +% \begin{command}{\footfont} +% The low level page footer font command. It is deprecated to redefine or use +% this and it may already be defined. +% \begin{macro}{\scr@fnt@pagefoot} +% \begin{macro}{\scr@fnt@wrn@pagefoot} +% \changes{v0.9}{2014/01/13}{warning always deactivated} +% \begin{macrocode} +\@ifundefined{scr@fnt@pagefoot}{% + \def\scr@fnt@pagefoot{\footfont}% + \@ifundefined{footfont}{% + \newcommand*{\footfont}{}% + }{}% +}{} +\scr@ifundefinedorrelax{scr@fnt@wrn@pagefoot}{}{% +% \PackageInfo{scrlayer-scrpage}{% +% deactivating warning for font element\MessageBreak +% `pagefoot'}% + \let\scr@fnt@wrn@pagefoot\relax +} +% \end{macrocode} +% \end{macro}^^A \scr@fnt@wrn@pagefoot +% \end{macro}^^A \scr@fnt@pagefoot +% \end{command}^^A \footfont +% +% \begin{macro}{\sls@hf@rule} +% \changes{v3.34}{2021/05/16}{\LaTeX{} team requested for additional \cs{par}} +% \begin{description} +% \item[\marg{rule name}:] one of \texttt{headtop}, \texttt{headsep}, +% \texttt{footsep}, or \texttt{footbot} +% \item[\marg{dimensional expression}:] the line length (width) +% \item[\marg{dimensional expression}:] the line thickness (height) +% \end{description} +% Helper to draw the line. +% \begin{macrocode} +\newcommand*\sls@hf@rule[3]{% + \begingroup + \normalfont\usekomafont{#1line}{% + \vbox to \z@{% + \kern -\dimexpr #3\relax + \ifnum \sls@hfline@adjust>\z@ \@tempswatrue \else \@tempswafalse\fi + \if@twoside\ifodd\value{page}\else + \ifnum \sls@hfline@adjust<\tw@ \@tempswatrue\else \@tempswafalse\fi + \fi\fi + \if@tempswa + \hskip \z@\@plus 1fill\@minus \paperwidth + \fi + \vrule \@width\dimexpr #2\relax \@height\dimexpr #3\relax \@depth\z@ + \ifnum \sls@hfline@adjust<\tw@ \@tempswatrue\else \@tempswafalse\fi + \if@twoside\ifodd\value{page}\else + \ifnum \sls@hfline@adjust>\z@ \@tempswatrue \else \@tempswafalse\fi + \fi\fi + \if@tempswa + \hskip \z@\@plus 1fill\@minus \paperwidth\null + \fi + \par + }% + }% + \endgroup +}% +% \end{macrocode} +% \end{macro}^^A \sls@hf@rule +% \begin{macro}{\sls@topmargin,\sls@leftmargin} +% Two simple helper macros: +% \begin{macrocode} +\newcommand*{\sls@topmargin}{\dimexpr\topmargin+1in\relax}% +\newcommand*{\sls@leftmargin}[1]{% + \dimexpr + \if@twoside + \ifodd\value{page} + \oddsidemargin+\csname sls@odd#1shift\endcsname + \else + \evensidemargin+\csname sls@even#1shift\endcsname + \fi + \else + \oddsidemargin+\csname sls@odd#1shift\endcsname + \fi + +1in\relax +}% +% +% \end{macrocode} +% \end{macro}^^A \sls@topmargin … \sls@leftmargin +% \end{command}^^A \defpagestyle +% +% \begin{command}{\newpagestyle} +% \changes{v3.32}{2020/09/11}{test for \pkg{titlesec}} +% For the parameters see \cs{defpagestyle}. Define the pagestyle only, if not +% already defined. Unfortunately \pkg{titlesec} also defines this command. So +% new definition will fail. \textsf{titlesec} uses \cs{providecommand} so if +% the order would be changed, everything would be OK. +% \begin{macrocode} +%<*body> +\@ifpackageloaded{titlesec}{% + \@ifundefined{newpagestyle}{}{% + \@ifpackageloaded{titleps}{}{% + \PackageWarningNoLine{scrlayer-scrpage}{% + it seems that package `titlesec' is used\MessageBreak + and has already defined `\string\newpagestyle'.\MessageBreak + To avoid this warning message, you should\MessageBreak + load package `titlesec' not before package\MessageBreak + `scrlayer-scrpage'. If you need `titlesec'\MessageBreak + you could load it after `scrlayer-scrpage',\MessageBreak + but you still would not be able to use\MessageBreak + the `titlesec' implemenation of\MessageBreak + `\string\newpagestyle'% + }% + \let\newpagestyle\relax + }% + }% +}{} +\newcommand*\newpagestyle[3]{% + \@ifundefined{ps@#1}{\defpagestyle{#1}{#2}{#3}}{% + \PackageError{scrlayer-scrpage}{Page style `#1' already defined}{% + Only not yet defined page style may be defined using + \string\newpagestyle.\MessageBreak + You may use either \string\renewpagestyle, \string\providepagestyle, + or \string\defpagestyle\MessageBreak + with already defined page styles.\MessageBreak + If you'll continue, your command will be ignored.% + }% + }% +}% +% +% \end{macrocode} +% \end{command}^^A \newpagestyle +% +% \begin{command}{\renewpagestyle} +% \changes{v3.32}{2020/09/11}{test for \textsf{titlesec}} +% For the parameters see \cs{defpagestyle}. Define the pagestyle only, if not +% already defined. Unfortunately \textsf{titlesec} also defines this +% command. So new definition will fail. \textsf{titlesec} uses +% \cs{providecommand} so if the order would be changed, everything would be OK. +% \begin{macrocode} +%<*body> +\@ifpackageloaded{titlesec}{% + \@ifundefined{renewpagestyle}{}{% + \@ifpackageloaded{titleps}{}{% + \PackageWarningNoLine{scrlayer-scrpage}{% + It seems that package `titlesec' is used\MessageBreak + and has already defined `\string\renewpagestyle'.\MessageBreak + To avoid this warning message, you should\MessageBreak + load package `titlesec' not before package\MessageBreak + `scrlayer-scrpage'. If you need `titlesec'\MessageBreak + you could load it after `scrlayer-scrpage',\MessageBreak + but you still would not be able to use\MessageBreak + the `titlesec' implemenation of\MessageBreak + `\string\renewpagestyle'% + }% + \let\renewpagestyle\relax + }% + }% +}{} +\newcommand*\renewpagestyle[3]{% + \@ifundefined{ps@#1}{% + \PackageError{scrlayer-scrpage}{Undefined page style `#1'}{% + Only already defined page style may be re-defined using + \string\renewpagestyle.\MessageBreak + You may use either \string\newpagestyle, \string\providepagestyle, + or \string\defpagestyle\MessageBreak + with not yet defined page styles.\MessageBreak + If you'll continue, your command will be ignored.% + }% + }{% + \defpagestyle{#1}{#2}{#3}% + }% +}% +% +% \end{macrocode} +% \end{command}^^A \renewpagestyle +% +% \begin{command}{\providepagestyle} +% For the parameters see \cs{defpagestyle}. Define only, if not already defined: +% \begin{macrocode} +%<*body> +\newcommand*\providepagestyle[3]{% + \@ifundefined{ps@#1}{% + \defpagestyle{#1}{#2}{#3}% + }{% +%<*trace> + \PackageInfo{scrlayer-scrpage}{% + page style `#1' already defined.\MessageBreak + New definition ignored% + }% +% + }% +} +% +% \end{macrocode} +% \end{command}^^A \providepagestyle +% +% +% \subsection{User page style definition interface} +% +% This is the mid-level interface of \pkg{scrpage2} with \cs{deftripstyle}. As +% in \pkg{scrpage2} we simply use the expert page style definition interface +% to define the new user interface commands. But here the useless starred +% versions will not longer be supported. So users of them have to remove the +% star (nothing else). +% +% \begin{command}{\deftriplepagestyle,\newtriplepagestyle, +% \renewtriplepagestyle,\providetriplepagestyle} +% \begin{description} +% \item[\marg{string}:] the name of the page style to be defined (must be +% fully expandable and expand to a string only). +% \item[\oarg{dimensional expression}:] thickness of a horizontal line above +% the page head and below the page foot (default: 0\,pt). +% \item[\oarg{dimensional expression}:] thickness of a horizontal line below +% the page head and above the page foot (default: 0\,pt). +% \item[\marg{code}:] will be expanded left aligned at head of odd pages (with +% one-side layout all pages are odd) and right aligned at head of even +% pages. +% \item[\marg{code}:] will be expanded centered at head of odd and even pages. +% \item[\marg{code}:] will be expanded right aligned at head of odd pages +% (with one-side layout all pages are odd) and left aligned at head of even +% pages. +% \item[\marg{code}:] will be expanded left aligned at footer of odd pages +% (with one-side layout all pages are odd) and right aligned at footer of +% even pages. +% \item[\marg{code}:] will be expanded centered at footer of odd and even +% pages. +% \item[\marg{code}:] will be expanded right aligned at footer of odd pages +% (with one-side layout all pages are odd) and left aligned at footer of +% even pages. +% \end{description} +% \begin{macrocode} +%<*body> +\newcommand*{\deftriplepagestyle}[1]{% + \let\@tempa\defpagestyle + \scrlayer@triplestyle{#1}% +}% +\newcommand*{\newtriplepagestyle}[1]{% + \let\@tempa\newpagestyle + \scrlayer@triplestyle{#1}% +}% +\newcommand*{\renewtriplepagestyle}[1]{% + \let\@tempa\renewpagestyle + \scrlayer@triplestyle{#1}% +}% +\newcommand*{\providetriplepagestyle}[1]{% + \let\@tempa\providepagestyle + \scrlayer@triplestyle{#1}% +}% +% \end{macrocode} +% \begin{macro}{\scrlayer@triplestyle,\scrlayer@@triplestyle} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \begin{macro}{\scrlayer@@@triplestyle} +% Helpers, that do the real work. Parameters are same, but \cs{reserved@a} has +% to be one of \cs{defpagestyle}, \cs{newpagestyle}, +% \cs{renewpagestyle}, or \cs{providepagestyle}. +% \begin{macrocode} +\newcommand*{\scrlayer@triplestyle}[1]{% + \kernel@ifnextchar[%] + {\scrlayer@@triplestyle{#1}}% + {\scrlayer@@triplestyle{#1}[\z@]}% +} +\newcommand*{\scrlayer@@triplestyle}{} +\def\scrlayer@@triplestyle#1[#2]{% + \kernel@ifnextchar[%] + {\scrlayer@@@triplestyle{#1}[#2]}% + {\scrlayer@@@triplestyle{#1}[\z@][#2]}% +}% +\newcommand*{\scrlayer@@@triplestyle}{} +\def\scrlayer@@@triplestyle#1[#2][#3]#4#5#6#7#8#9{% + \@tempa{#1}{% + (\sls@headwidth,#2)% + {% + \makebox[\z@][l]{#6}\hfill + \makebox[\z@][c]{#5}\hfill + \makebox[\z@][r]{#4}% + }{% + \makebox[\z@][l]{#4}\hfill + \makebox[\z@][c]{#5}\hfill + \makebox[\z@][r]{#6}% + }{% + \makebox[\z@][l]{#4}\hfill + \makebox[\z@][c]{#5}\hfill + \makebox[\z@][r]{#6}% + }% + (\sls@headwidth,#3)% + }{% + (\sls@footwidth,#3)% + {% + \makebox[\z@][l]{#9}\hfill + \makebox[\z@][c]{#8}\hfill + \makebox[\z@][r]{#7}% + }{% + \makebox[\z@][l]{#7}\hfill + \makebox[\z@][c]{#8}\hfill + \makebox[\z@][r]{#9}% + }{% + \makebox[\z@][l]{#7}\hfill + \makebox[\z@][c]{#8}\hfill + \makebox[\z@][r]{#9}% + }% + (\sls@footwidth,#2)% + }% +}% +% \end{macrocode} +% \end{macro}^^A \scrlayer@@@triplestyle +% \end{macro}^^A \scrlayer@triplestyle,\scrlayer@@triplestyle +% \begin{command}{deftripstyle} +% Command \cs{deftripstyle} has been defined for compatibility with +% \pkg{scrpage2} only. It is deprecated now. +% The starred version \cs{deftripstyle*} is deprecated for several +% years and hasn't been described at the manual, it will not longer be +% defined. +% \begin{macrocode} +\newcommand*{\deftripstyle}{% + \PackageWarning{scrlayer-scrpage}{% + Command \string\deftripstyle\space is deprecate.\MessageBreak + You should replace it by \string\deftriplepagestyle,\MessageBreak + e.g.,% + }% + \let\deftripstyle\deftriplepagestyle + \deftripstyle +}% +% +% \end{macrocode} +% \end{command}^^A \deftripstyle +% \end{command}^^A \deftriplepagestyle … \providetriplepagestyle +% +% +% \subsection{Pre-defined page styles interface} +% +% This is the high-level interface of \pkg{scrpage2} with the page style +% \pstyle{scrheadings}, \pstyle{scrplain}, and \pstyle{useheadings}. Those +% will work as expected but will also be extended to support definition of +% additional styles using the same interface. +% +% \begin{command}{\defpairofpagestyles} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{description} +% \item[\oarg{string}:] name of a parent page style, that will be used to +% initialise the new page style (must be fully expandable and expand to the +% name of a page style). +% \item[\marg{string}:] name the page style to be defined (must be fully +% expandable and expand to the name of a page style). +% \item[\marg{code}:] several commands of \cs{ihead}, \cs{chead}, \cs{ohead}, +% \cs{lehead}, \cs{lohead}, \cs{cohead}, \cs{rehead}, \cs{cehead}, +% \cs{rohead}, \cs{ifoot}, \cs{cfoot}, \cs{ofoot}, \cs{lefoot}, \cs{cefoot}, +% \cs{lofoot}, \cs{refoot}, \cs{cofoot}, \cs{rofoot}, \cs{clearscrheadfoot}, +% \cs{clearscrheadings}, \cs{clearscrplain}. +% \end{description} +% Two page styles will be defined using \cs{defpagestyle}, page style named +% with the second argument and page style with the same name but an additional +% prefix ``\pstyle{plain.}''. This will be activated automatically to be the +% plain page style when the first page style will be used. If first argument +% is used this pair of page styles will be used to initialise the head and +% footer of the new. All the other commands are used to define the initial +% fields. Note, if one of those page styles is active, all further commands +% (see 3rd argument) depend on the active page style. If no one is active, +% they depend on page style \pstyle{scrheadings}. +% \begin{macrocode} +%<*body> +\newcommand*{\defpairofpagestyles}[3][]{% + \def\reserved@a##1##2##3##4##5##6##7\@nil{##1##2##3##4##5##6}% + \edef\reserved@a{\expandafter\reserved@a #2xxxxxx\@nil}% + \Ifstr\reserved@a{plain.}{% + \PackageError{scrlayer-scrpage}{plain page style `#2' not allowed}{% + You may not define a plain page style using + \string\defpairofpagestyles, \string\newpairofpagestyles, + \string\renewpairofpagestyles, or\MessageBreak + \string\providepairofpagestyles. I'd suggest to simply define the + corresponding\MessageBreak + non-plain page style to also define the plain one.\MessageBreak + If you'll continue, your command will be ignored.}% + }{% + \sls@init@pair@page@style*{#2}% + \sls@init@pair@page@style*{plain.#2}% + \ifx\relax #1\relax\else + \scr@ifundefinedorrelax{sls@ps@#1@even@left@head}{% + \PackageError{scrlayer-scrpage}{`#1' not a pair page style}{% + Only pair page styles may be used to initialise new pairs of page + styles. So\MessageBreak + optional argument of \string\defpairofpagestyles, + \string\newpairofpagestyles,\MessageBreak + \string\renewpairofpagestyles, or \string\providepairofpagestyle has + to be a pair\MessageBreak + page style or should be unused.\MessageBreak + If you'll continue, the initialisation will be ignored.}% + }{% + \sls@init@pair@page@style{#2}{#1}% + \scr@ifundefinedorrelax{sls@ps@plain.#1@even@left@head}{% + \sls@init@pair@page@style{plain.#2}{#1}% + }{% + \sls@init@pair@page@style{plain.#2}{plain.#1}% + }% + }% + \fi + \sls@def@pair@page@style@member{#2}% + \AddToLayerPageStyleOptions{#2}{% + onselect={% +% \end{macrocode} +% \changes{v3.15}{2015/01/08}{usage of \cs{DeclarePageStyleAlias} instead of +% \cs{let}} +% \begin{macrocode} + \DeclarePageStyleAlias{plain}{plain.#2}% + \DeclarePageStyleAlias{headings}{#2}% + \def\sls@currentheadings{#2}% + \def\sls@currentplain{plain.#2}% + #3% + }% + }% + \sls@def@pair@page@style@member{plain.#2}% + \AddToLayerPageStyleOptions{plain.#2}{% + onselect={% +% \end{macrocode} +% \changes{v3.15}{2015/01/08}{usage of \cs{DeclarePageStyleAlias} instead of +% \cs{let}} +% \begin{macrocode} + \DeclarePageStyleAlias{plain}{plain.#2}% + \DeclarePageStyleAlias{headings}{#2}% + \def\sls@currentheadings{#2}% + \def\sls@currentplain{plain.#2}% + #3% + },% + oninit={% + \expandafter + \ifx\csname ifsls@plain@head@above@line\expandafter\endcsname + \csname iftrue\endcsname\else + \let\sls@headabove@linelength\z@ + \let\sls@headabove@linethickness\z@ + \fi + \expandafter + \ifx\csname ifsls@plain@head@below@line\expandafter\endcsname + \csname iftrue\endcsname\else + \let\sls@headbelow@linelength\z@ + \let\sls@headbelow@linethickness\z@ + \fi + \expandafter + \ifx\csname ifsls@plain@foot@above@line\expandafter\endcsname + \csname iftrue\endcsname\else + \let\sls@footabove@linelength\z@ + \let\sls@footabove@linethickness\z@ + \fi + \expandafter + \ifx\csname ifsls@plain@foot@below@line\expandafter\endcsname + \csname iftrue\endcsname\else + \let\sls@footbelow@linelength\z@ + \let\sls@footbelow@linethickness\z@ + \fi + }% + }% + }% +}% +% \end{macrocode} +% \begin{macro}{\sls@currentheadings,\sls@currentplain} +% These little helpers will be set up at selection of each pair page style and +% stores the last activated page style pair of the scope. +% \begin{macrocode} +\newcommand*\sls@currentheadings{scrheadings}% +\newcommand*\sls@currentplain{plain.scrheadings}% +% \end{macrocode} +% \end{macro}^^A \sls@currentheadings,\sls@currentplain +% \begin{macro}{\sls@init@pair@page@style} +% \changes{v3.20}{2016/04/12}{\cs{ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\sls@init@@pair@page@style} +% \begin{description} +% \item[\marg{string}:] the name of the page style, that should be initialised +% to be one member of a page style pair. +% \item[\marg{string}:] the name of a member of a page style pair, that should +% be used to initialise one the member of a page style pair from first +% argument. +% \end{description} +% These are two little helpers for \cs{defpairofpagestyles}. The first command +% has two starred versions. With one star the commands for the page style will +% be initialised to \cs{@empty}, with two stars they will become +% \LaTeX-undefined (\cs{relax}). +% +% Note also, that the second argument may either be the plain or the non-plain +% member of the page style pair. +% \begin{macrocode} +\newcommand*{\sls@init@pair@page@style}{% + \kernel@ifstar {% + \kernel@ifstar {% + \sls@let@pair@page@style\relax + }{% + \sls@let@pair@page@style\@empty + } + }{% + \sls@init@@pair@page@style + }% +}% +\newcommand*{\sls@init@@pair@page@style}[2]{% + \expandafter\let\csname sls@ps@#1@even@left@head\expandafter\endcsname + \csname sls@ps@#2@even@left@head\endcsname + \expandafter\let\csname sls@ps@#1@even@middle@head\expandafter\endcsname + \csname sls@ps@#2@even@middle@head\endcsname + \expandafter\let\csname sls@ps@#1@even@right@head\expandafter\endcsname + \csname sls@ps@#2@even@right@head\endcsname + \expandafter\let\csname sls@ps@#1@odd@left@head\expandafter\endcsname + \csname sls@ps@#2@odd@left@head\endcsname + \expandafter\let\csname sls@ps@#1@odd@middle@head\expandafter\endcsname + \csname sls@ps@#2@odd@middle@head\endcsname + \expandafter\let\csname sls@ps@#1@odd@right@head\expandafter\endcsname + \csname sls@ps@#2@odd@right@head\endcsname + \expandafter\let\csname sls@ps@#1@even@left@foot\expandafter\endcsname + \csname sls@ps@#2@even@left@foot\endcsname + \expandafter\let\csname sls@ps@#1@even@middle@foot\expandafter\endcsname + \csname sls@ps@#2@even@middle@foot\endcsname + \expandafter\let\csname sls@ps@#1@even@right@foot\expandafter\endcsname + \csname sls@ps@#2@even@right@foot\endcsname + \expandafter\let\csname sls@ps@#1@odd@left@foot\expandafter\endcsname + \csname sls@ps@#2@odd@left@foot\endcsname + \expandafter\let\csname sls@ps@#1@odd@middle@foot\expandafter\endcsname + \csname sls@ps@#2@odd@middle@foot\endcsname + \expandafter\let\csname sls@ps@#1@odd@right@foot\expandafter\endcsname + \csname sls@ps@#2@odd@right@foot\endcsname +}% +% \end{macrocode} +% \end{macro}^^A \sls@init@@pair@page@style +% \begin{macro}{\sls@let@pair@page@style} +% \begin{description} +% \item[\marg{command}:] a single command used to initialise the commands of +% the page style commands. +% \item[\marg{string}:] the name of a member of a page style pair, that should +% be used to initialise one the member of a page style pair from first +% argument. +% \end{description} +% A little helper for \cs{sls@init@pair@page@style}. +% \begin{macrocode} +\newcommand*{\sls@let@pair@page@style}[2]{% + \expandafter\let\csname sls@ps@#2@even@left@head\endcsname #1% + \expandafter\let\csname sls@ps@#2@even@middle@head\endcsname #1% + \expandafter\let\csname sls@ps@#2@even@right@head\endcsname #1% + \expandafter\let\csname sls@ps@#2@odd@left@head\endcsname #1% + \expandafter\let\csname sls@ps@#2@odd@middle@head\endcsname #1% + \expandafter\let\csname sls@ps@#2@odd@right@head\endcsname #1% + \expandafter\let\csname sls@ps@#2@even@left@foot\endcsname #1% + \expandafter\let\csname sls@ps@#2@even@middle@foot\endcsname #1% + \expandafter\let\csname sls@ps@#2@even@right@foot\endcsname #1% + \expandafter\let\csname sls@ps@#2@odd@left@foot\endcsname #1% + \expandafter\let\csname sls@ps@#2@odd@middle@foot\endcsname #1% + \expandafter\let\csname sls@ps@#2@odd@right@foot\endcsname #1% +}% +% \end{macrocode} +% \end{macro}^^A \sls@let@pair@page@style +% \end{macro}^^A \sls@init@pair@page@style +% \begin{macro}{\sls@def@pair@page@style@member} +% \changes{v3.24}{2017/05/04}{improved \textsf{bidi} compatibility} +% \changes{v3.27}{2019/04/05}{\cs{centering} replaced by +% \cs{LaTeXcentering}} +% \changes{v3.27}{2019/04/05}{\cs{raggedright} replaced by +% \cs{LaTeXraggedright}} +% \changes{v3.27}{2019/04/05}{\cs{raggedleft} replaced by +% \cs{LaTeXraggedleft}} +% \begin{description} +% \item[\marg{string}:] name of the page style to be defined. +% \end{description} +% A little helper for \cs{defpairofpagestyles}. +% \begin{macrocode} +\newcommand*{\sls@def@pair@page@style@member}[1]{% + \defpagestyle{#1}{% + {% + \makebox[0pt][\IfRTL{r}{l}]{\parbox{\sls@headwidth}{\LaTeXraggedright + \strut\@nameuse{sls@ps@#1@even@left@head}\strut}}% + \parbox{\sls@headwidth}{\LaTeXcentering + \strut\@nameuse{sls@ps@#1@even@middle@head}\strut}% + \makebox[0pt][\IfRTL{l}{r}]{\parbox{\sls@headwidth}{\LaTeXraggedleft + \strut\@nameuse{sls@ps@#1@even@right@head}\strut}}% + }{% + \makebox[0pt][\IfRTL{r}{l}]{\parbox{\sls@headwidth}{\LaTeXraggedright + \strut\@nameuse{sls@ps@#1@odd@left@head}\strut}}% + \parbox{\sls@headwidth}{\LaTeXcentering + \strut\@nameuse{sls@ps@#1@odd@middle@head}\strut}% + \makebox[0pt][\IfRTL{l}{r}]{\parbox{\sls@headwidth}{\LaTeXraggedleft + \strut\@nameuse{sls@ps@#1@odd@right@head}\strut}}% + }{% + \makebox[0pt][\IfRTL{r}{l}]{\parbox{\sls@headwidth}{\LaTeXraggedright + \strut\@nameuse{sls@ps@#1@odd@left@head}\strut}}% + \parbox{\sls@headwidth}{\LaTeXcentering + \strut\@nameuse{sls@ps@#1@odd@middle@head}\strut}% + \makebox[0pt][\IfRTL{l}{r}]{\parbox{\sls@headwidth}{\LaTeXraggedleft + \strut\@nameuse{sls@ps@#1@odd@right@head}\strut}}% + }% + }{% + {% + \makebox[0pt][\IfRTL{r}{l}]{\parbox{\sls@footwidth}{\LaTeXraggedright + \strut\@nameuse{sls@ps@#1@even@left@foot}\strut}}% + \parbox{\sls@footwidth}{\LaTeXcentering + \strut\@nameuse{sls@ps@#1@even@middle@foot}\strut}% + \makebox[0pt][\IfRTL{l}{r}]{\parbox{\sls@footwidth}{\LaTeXraggedleft + \strut\@nameuse{sls@ps@#1@even@right@foot}\strut}}% + }{% + \makebox[0pt][\IfRTL{r}{l}]{\parbox{\sls@footwidth}{\LaTeXraggedright + \strut\@nameuse{sls@ps@#1@odd@left@foot}\strut}}% + \parbox{\sls@footwidth}{\LaTeXcentering + \strut\@nameuse{sls@ps@#1@odd@middle@foot}\strut}% + \makebox[0pt][\IfRTL{l}{r}]{\parbox{\sls@footwidth}{\LaTeXraggedleft + \strut\@nameuse{sls@ps@#1@odd@right@foot}\strut}}% + }{% + \makebox[0pt][\IfRTL{r}{l}]{\parbox{\sls@footwidth}{\LaTeXraggedright + \strut\@nameuse{sls@ps@#1@odd@left@foot}\strut}}% + \parbox{\sls@footwidth}{\LaTeXcentering + \strut\@nameuse{sls@ps@#1@odd@middle@foot}\strut}% + \makebox[0pt][\IfRTL{l}{r}]{\parbox{\sls@footwidth}{\LaTeXraggedleft + \strut\@nameuse{sls@ps@#1@odd@right@foot}\strut}}% + }% + }% +}% +% +% \end{macrocode} +% \end{macro}^^A \sls@def@pair@page@style@member +% \end{command}^^A \defpairofpagestyles +% +% \begin{command}{\newpairofpagestyles,\renewpairofpagestyles, +% \providepairofpagestyles} +% See \cs{defpairofpagestyles} for the arguments. +% \begin{macrocode} +%<*body> +\newcommand*{\newpairofpagestyles}[3][]{% + \scr@ifundefinedorrelax{ps@#2}{% + \@ifundefined{ps@plain.#2}{\defpairofpagestyles[#1]{#2}{#3}}{% + \PackageError{scrlayer-scrpage}{% + Plain page style of `#2' already defined}{% + You may only define a new pair of page styles, if neither the style + itself\MessageBreak + nor it's plain page style has already been defined.\MessageBreak + You may use only \string\defpairofpagestyles\space or + \string\providepairofpagestyles\space with partly\MessageBreak + already defined page styles.\MessageBreak + If you'll continue, your command will be ignored.% + }% + }% + }{% + \PackageError{scrlayer-scrpage}{% + Page style `#2' already defined}{% + You may only define a new pair of page styles, if neither the style + itself\MessageBreak + nor it's plain page style has already been defined.\MessageBreak + You may use either \string\renewpairsofpagestyles, + \string\defpairofpagestyles, or\MessageBreak + \string\providepairofpagestyles\space with already defined page + styles.\MessageBreak + If you'll continue, your command will be ignored.% + }% + }% +}% +\newcommand*{\renewpairofpagestyles}[3][]{% + \scr@ifundefinedorrelax{ps@#2}{% + \PackageError{scrlayer-scrpage}{% + Undefined page style `#2'}{% + You may only redefine existing pairs of page styles. You may use + either\MessageBreak + \string\newpairsofpagestyles, \string\defpairofpagestyles, or + \string\providepairofpagestyles\MessageBreak + with not yet defined page styles.\MessageBreak + If you'll continue, your command will be ignored.% + }% + }{% + \@ifundefined{ps@plain.#2}{% + \PackageError{scrlayer-scrpage}{% + Undefined plain page style of `#2'}{% + You may only redefine existing pairs of page styles. You may use + either\MessageBreak + \string\defpairofpagestyles\space or + \string\providepairofpagestyles\space with partly already + defined\MessageBreak + page styles.\MessageBreak + If you'll continue, your command will be ignored.% + }% + }{\defpairofpagestyles[#1]{#2}{#3}}% + }% +}% +\newcommand*{\providepairofpagestyles}[3][]{% + \scr@ifundefinedorrelax{ps@#2}{% + \@ifundefined{ps@plain.#2}{\defpairofpagestyles[#1]{#2}{#3}}{% +%<*trace> + \PackageInfo{scrlayer-scrpage}{% + Plain page style of `#2' already\MessageBreak + defined. Definition ignored}% +% + }% + }{% +%<*trace> + \PackageInfo{scrlayer-scrpage}{% + Page style of `#2' already defined.\MessageBreak + Definition ignored}% +% + }% +}% +% +% \end{macrocode} +% \end{command}^^A \newpairofpagestyles … \providepairofpagestyles +% +% +% \begin{pgstyle}{scrheading,plain.scrheadings} +% We have one predefined pair: \texttt{scrheadings} with plain page style +% \texttt{plain.scrheadings}. +% \begin{macrocode} +%<*body> +\newpairofpagestyles{scrheadings}{}% +% \end{macrocode} +% \begin{pgstyle}{scrplain} +% But with package \pkg{scrpage2} +% the plain page style was \texttt{scrplain}. So we make a kind of alias: +% \begin{macrocode} +\DeclarePageStyleAlias{scrplain}{plain.scrheadings} +% +% \end{macrocode} +% \end{pgstyle}^^A scrplain +% \end{pgstyle}^^A scrheadings,plain.scrheadings +% +% +% \begin{command}{\ihead,\ohead,\chead, +% \lehead,\lohead,\rehead,\rohead,\cehead,\cohead, +% \ifoot,\ofoot,\cfoot, +% \lefoot,\lofoot,\refoot,\rofoot,\cefoot,\cofoot} +% \changes{v3.14}{2014/09/19}{new star version double the argument} +% \changes{v3.20}{2016/04/12}{\cs{ifstar} replaced by \cs{kernel@ifstar}} +% We also need macros to define the contents of the three part head and +% foot. Each macro defines one of the part of head or foot of the +% \emph{headings} page style member and optional of the \emph{plain} page +% style member. +% \begin{macrocode} +%<*body> +\newcommand*{\ihead}{\kernel@ifstar {\@dblarg\@@@ihead}{\@ihead}}% +% \end{macrocode} +% \begin{macro}{\@ihead} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \begin{macro}{\@@ihead,\@@@ihead} +% \changes{v3.27}{2019/04/05}{long} +% Two helpers for the previous one to double the command and it's arguments. +% \begin{macrocode} +\newcommand*{\@ihead}{\kernel@ifnextchar[{\@@@ihead}{\@@ihead}}% +\newcommand{\@@ihead}[1]{\rehead{#1}\lohead{#1}}% +\newcommand{\@@@ihead}[2][]{\rehead[{#1}]{#2}\lohead[{#1}]{#2}}% +% \end{macrocode} +% \end{macro}^^A \@@ihead,\@@@ihead +% \end{macro}^^A \@ihead +% \begin{macrocode} +\newcommand*{\ohead}{\kernel@ifstar {\@dblarg\@@@ohead}{\@ohead}}% +% \end{macrocode} +% \begin{macro}{\@ohead} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \begin{macro}{\@@ohead,\@@@ohead} +% \changes{v3.27}{2019/04/05}{long} +% Two helpers for the previous one to double the command and it's arguments. +% \begin{macrocode} +\newcommand*{\@ohead}{\kernel@ifnextchar[{\@@@ohead}{\@@ohead}}% +\newcommand{\@@ohead}[1]{\lehead{#1}\rohead{#1}}% +\newcommand{\@@@ohead}[2][]{\lehead[{#1}]{#2}\rohead[{#1}]{#2}}% +% \end{macrocode} +% \end{macro}^^A \@@ohead,\@@@ohead +% \end{macro}^^A \@ohead +% \begin{macrocode} +\newcommand*{\chead}{\kernel@ifstar {\@dblarg\@@@chead}{\@chead}}% +% \end{macrocode} +% \begin{macro}{\@chead} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \begin{macro}{\@@chead,\@@@chead} +% \changes{v3.27}{2019/04/05}{long} +% Two helpers for the previous one to double the command and it's arguments. +% \begin{macrocode} +\newcommand*{\@chead}{\kernel@ifnextchar[{\@@@chead}{\@@chead}}% +\newcommand{\@@chead}[1]{\cehead{#1}\cohead{#1}}% +\newcommand{\@@@chead}[2][]{\cehead[{#1}]{#2}\cohead[{#1}]{#2}}% +% \end{macrocode} +% \end{macro}^^A \@@chead,\@@@chead +% \end{macro}^^A \@chead +% \begin{macrocode} +\newcommand*{\lehead}{\sls@renewelement{even}{left}{head}}% +\newcommand*{\lohead}{\sls@renewelement{odd}{left}{head}}% +\newcommand*{\rehead}{\sls@renewelement{even}{right}{head}}% +\newcommand*{\rohead}{\sls@renewelement{odd}{right}{head}}% +\newcommand*{\cehead}{\sls@renewelement{even}{middle}{head}}% +\newcommand*{\cohead}{\sls@renewelement{odd}{middle}{head}}% +% \end{macrocode} +% \begin{macrocode} +\newcommand*{\ifoot}{\kernel@ifstar {\@dblarg\@@@ifoot}{\@ifoot}}% +% \end{macrocode} +% \begin{macro}{\@ifoot} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \begin{macro}{\@@ifoot,\@@@ifoot} +% \changes{v3.27}{2019/04/05}{long} +% Two helpers for the previous one to double the command and it's arguments. +% \begin{macrocode} +\newcommand*{\@ifoot}{\kernel@ifnextchar[{\@@@ifoot}{\@@ifoot}}% +\newcommand{\@@ifoot}[1]{\refoot{#1}\lofoot{#1}}% +\newcommand{\@@@ifoot}[2][]{\refoot[{#1}]{#2}\lofoot[{#1}]{#2}}% +% \end{macrocode} +% \end{macro}^^A \@@ifoot,\@@@ifoot +% \end{macro}^^A \@ifoot +% \begin{macrocode} +\newcommand*{\ofoot}{\kernel@ifstar {\@dblarg\@@@ofoot}{\@ofoot}}% +% \end{macrocode} +% \begin{macro}{\@ofoot} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \begin{macro}{\@@ofoot,\@@@ofoot} +% \changes{v3.27}{2019/04/05}{long} +% Two helpers for the previous one to double the command and it's arguments. +% \begin{macrocode} +\newcommand*{\@ofoot}{\kernel@ifnextchar[{\@@@ofoot}{\@@ofoot}}% +\newcommand{\@@ofoot}[1]{\lefoot{#1}\rofoot{#1}}% +\newcommand{\@@@ofoot}[2][]{\lefoot[{#1}]{#2}\rofoot[{#1}]{#2}}% +% \end{macrocode} +% \end{macro}^^A \@@ofoot,\@@@ofoot +% \end{macro}^^A \@ofoot +% \begin{macrocode} +\newcommand*{\cfoot}{\kernel@ifstar {\@dblarg\@@@cfoot}{\@cfoot}}% +% \end{macrocode} +% \begin{macro}{\@cfoot} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \begin{macro}{\@@cfoot,\@@@cfoot} +% \changes{v3.27}{2019/04/05}{long} +% Two helpers for the previous one to double the command and it's arguments. +% \begin{macrocode} +\newcommand*{\@cfoot}{\kernel@ifnextchar[{\@@@cfoot}{\@@cfoot}}% +\newcommand{\@@cfoot}[1]{\cefoot{#1}\cofoot{#1}}% +\newcommand{\@@@cfoot}[2][]{\cefoot[{#1}]{#2}\cofoot[{#1}]{#2}}% +% \end{macrocode} +% \end{macro}^^A \@@cfoot,\@@@cfoot +% \end{macro}^^A \@cfoot +% \begin{macrocode} +\newcommand*{\lefoot}{\sls@renewelement{even}{left}{foot}}% +\newcommand*{\lofoot}{\sls@renewelement{odd}{left}{foot}}% +\newcommand*{\refoot}{\sls@renewelement{even}{right}{foot}}% +\newcommand*{\rofoot}{\sls@renewelement{odd}{right}{foot}}% +\newcommand*{\cefoot}{\sls@renewelement{even}{middle}{foot}}% +\newcommand*{\cofoot}{\sls@renewelement{odd}{middle}{foot}}% +% \end{macrocode} +% \begin{macro}{\sls@renewelement} +% \begin{macro}{\sls@@renewelement} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \changes{v3.20}{2016/04/12}{\cs{ifstar} replaced by \cs{kernel@ifstar}} +% \begin{macro}{\sls@@@renewelement,\sls@@@@renewelement, +% \sls@@renewplainelement} +% \changes{v3.27}{2019/04/05}{long} +% Little helper for several of the above commands. +% \begin{macrocode} +\newcommand*{\sls@renewelement}[3]{% + \kernel@ifstar{\@dblarg{\sls@@@@renewelement{#1}{#2}{#3}}}% + {\sls@@renewelement{#1}{#2}{#3}}% +}% +\newcommand*{\sls@@renewelement}[3]{% + \kernel@ifnextchar[%] + {\sls@@@@renewelement{#1}{#2}{#3}}% + {\sls@@@renewelement{#1}{#2}{#3}}% +}% +\newcommand{\sls@@@renewelement}[4]{% + \scr@ifundefinedorrelax{sls@ps@\sls@currentheadings @#1@#2@#3}{% + \@namedef{sls@ps@scrheadings@#1@#2@#3}{#4}% + }{% + \@namedef{sls@ps@\sls@currentheadings @#1@#2@#3}{#4}% + }% +}% +\newcommand*{\sls@@@@renewelement}{} +\long\def\sls@@@@renewelement#1#2#3[#4]#5{% + \sls@@renewplainelement{#1}{#2}{#3}{#4}% + \sls@@@renewelement{#1}{#2}{#3}{#5}% +}% +\newcommand{\sls@@renewplainelement}[4]{% + \scr@ifundefinedorrelax{sls@ps@\sls@currentplain @#1@#2@#3}{% + \@namedef{sls@ps@plain.scrheadings@#1@#2@#3}{#4}% + }{% + \@namedef{sls@ps@\sls@currentplain @#1@#2@#3}{#4}% + }% +}% +% +% \end{macrocode} +% \end{macro}^^A \sls@@@renewelement … \sls@@renewplainelement +% \end{macro}^^A \sls@@renewelement +% \end{macro}^^A \sls@renewelement +% \end{command}^^A \ihead … \cofoot +% +% +% \begin{command}{\clearmainofpairofpagestyles} +% \begin{command}{\clearscrheadings} +% \changes{v3.32}{2020/09/11}{deprecation warning added} +% Maybe you want to clear the currently defined head and foot. First +% let's clear only scrheadings pagestyle but not scrplain pagestyle. +% We do this simply using the already known command: +% \begin{macrocode} +%<*body> +\newcommand*{\clearmainofpairofpagestyles}{% + \ihead{}\chead{}\ohead{}\ifoot{}\cfoot{}\ofoot{}% +}% +\newcommand*{\clearscrheadings}{% + \PackageWarning{scrlayer-scrpage}{% + replacing deprecated \string\clearscrheading\space by\MessageBreak + \string\clearmainofpairofpagestyles + }% + \clearmainofpairofpagestyles +} +% +% \end{macrocode} +% \end{command}^^A \clearscrheadings +% \end{command}^^A \clearmainofpairofpagestyles +% \begin{command}{\clearplainofpairofpagestyles} +% \begin{command}{\clearscrplain} +% \changes{v3.32}{2020/09/11}{deprecation warning added} +% Now, we use the not recommended feature to set up a plain style: +% \begin{macrocode} +%<*body> +\newcommand*{\clearplainofpairofpagestyles}{% + \sls@@renewplainelement{odd}{left}{head}{}% + \sls@@renewplainelement{odd}{right}{head}{}% + \sls@@renewplainelement{odd}{middle}{head}{}% + \sls@@renewplainelement{even}{left}{head}{}% + \sls@@renewplainelement{even}{right}{head}{}% + \sls@@renewplainelement{even}{middle}{head}{}% + \sls@@renewplainelement{odd}{left}{foot}{}% + \sls@@renewplainelement{odd}{right}{foot}{}% + \sls@@renewplainelement{odd}{middle}{foot}{}% + \sls@@renewplainelement{even}{left}{foot}{}% + \sls@@renewplainelement{even}{right}{foot}{}% + \sls@@renewplainelement{even}{middle}{foot}{}% +}% +\newcommand*{\clearscrplain}{% + \PackageWarning{scrlayer-scrpage}{% + replacing deprecated \string\clearscrplain\space by\MessageBreak + \string\clearplainofpairofpagestyles + }% + \clearplainofpairofpagestyles +} +% +% \end{macrocode} +% \end{command}^^A \clearscrplain +% \end{command}^^A \clearplainofpairofpagestyles +% \begin{command}{\clearpairofpagestyles} +% \begin{command}{\clearscrheadfoot} +% \changes{v3.32}{2020/09/11}{deprecation warning added} +% Last but not least we clean up both, the main and the plain: +% \begin{macrocode} +%<*body> +\newcommand*{\clearpairofpagestyles}{% + \ihead[]{}\chead[]{}\ohead[]{}\ifoot[]{}\cfoot[]{}\ofoot[]{}% +}% +\newcommand*{\clearscrheadfoot}{% + \PackageWarning{scrlayer-scrpage}{% + replacing deprecated \string\clearscrheadfoot\space by\MessageBreak + \string\clearpairofpagestyles + }% + \clearpairofpagestyles +} +% +% \end{macrocode} +% \end{command}^^A \clearscrheadfoot +% \end{command}^^A \clearpairofpagestyles +% +% +% \begin{pgstyle}{useheadings,plain.useheadings} +% Not longer supported: +% \begin{macrocode} +%<*body> +\newcommand*\ps@useheadings{% + \PackageWarning{scrlayer-scrpage}{incompatible page style!\MessageBreak + Page styles like `headings' and `plain'\MessageBreak + are incompatible with the page styles\MessageBreak + of scrlayer-scrpage. You shouldn't mix\MessageBreak + them up. Therefore page style\MessageBreak + `useheadings' is not longer provided.\MessageBreak + Usage is deprecated and will be replaced\MessageBreak + by `scrheadings'% + }% + \let\ps@useheadings\ps@scrheadings + \ps@useheadings +}% +\expandafter\newcommand\expandafter*\csname ps@plain.useheadings\endcsname{% + \@nameuse{ps@plain.scrheadings}% +}% +% +% \end{macrocode} +% \end{pgstyle}^^A useheadings,plain.useheadings +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrlayer.dtx b/macros/latex/contrib/koma-script/scrlayer.dtx new file mode 100644 index 0000000000..6fe55f5868 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrlayer.dtx @@ -0,0 +1,4375 @@ +% \iffalse^^A meta-comment +% ====================================================================== +% scrlayer.dtx +% Copyright (c) Markus Kohm, 2012-2022 +% +% 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 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.md. +% ====================================================================== +%%% From File: $Id: scrlayer.dtx 3894 2022-06-19 10:25:46Z kohm $ +%%%% (run: identify) +%%%% (run: init) +%%%% (run: options) +%%%% (run: body) +%%%% (run: final) +%<*dtx> +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\begingroup + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2022-06-19 12:25:46 +0200 (So, 19. Jun 2022) $ + \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} + \filerevision$Revision: 3894 $ + \edef\reserved@a{% + \noexpand\endgroup + \noexpand\ProvidesFile{scrlayer.dtx}% + [\filedate\space\filerevision\space + KOMA-Script package source + }% +\reserved@a +% +%<*identify|doc> +%\NeedsTeXFormat{LaTeX2e}[1995/12/01] +%\ProvidesPackage{scrlayer}[% +%\ProvidesFile{scrlayer.tex}[% +%!KOMAScriptVersion +% package +% +%<*dtx|identify|doc> + (defining layers and page styles)] +% +%<*dtx> +\ifx\documentclass\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHTFROM}{2012} + \generate{\usepreamble\defaultpreamble + \file{scrlayer.sty}{% + \from{scrlayer.dtx}{package,scrlayer,identify}% + \from{scrlayer.dtx}{package,scrlayer,init}% + \from{scrlayer.dtx}{package,scrlayer,options}% + \from{scrlayer.dtx}{package,scrlayer,body}% + \from{scrlayer.dtx}{package,scrlayer,final}% + \from{scrlogo.dtx}{logo}% + }% + } + + \batchinput{scrlayer-scrpage.dtx} + \batchinput{scrlayer-notecolumn.dtx} + \@@input scrstrop.inc +\else + \let\endbatchfile\relax +\fi +\endbatchfile +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\setcounter{StandardModuleDepth}{2} +\begin{document} + \DocInput{scrlayer.dtx} +\end{document} +% +% \fi^^A meta-comment +% +% \changes{v0.0}{2012/01/01}{Start of new package} +% \changes{v0.9}{2014/07/25}{User documentation removed} +% \changes{v3.36}{2022/02/08}{switch over from \cls*{scrdoc} to +% \cls*{koma-script-source-doc}} +% \changes{v3.36}{2022/02/08}{require package \pkg*{scrlogo} instead of +% defining \cs{KOMAScript}} +% \changes{v3.36}{2022/02/08}{whole implementation documentation in English} +% +% \GetFileInfo{scrlayer.dtx} +% \title{Layers and Page Styles with \href{https://komascript.de}{\KOMAScript} +% Package \pkg*{scrlayer}} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Revision \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% Usually page styles only define the page header and page footer. But with +% \pkg*{scrlayer} page styles consist of multiple layers, that can be placed +% everywhere in the page background or foreground. +% \end{abstract} +% \tableofcontents +% +% \section{User Manual} +% +% You can find the user manuals of \pkg*{scrlayer} in the \KOMAScript{} manual, +% either the German \file{scrguide} or the English \file{scrguien}. +% +% \MaybeStop{\PrintIndex} +% +% \section{Implementation of \pkg*{scrlayer}} +% +% \begin{macrocode} +%<*package|interface|class> +% \end{macrocode} +% +% \subsection{Initialising some values before the options} +% +% \begin{macrocode} +%<*init> +% \end{macrocode} +% +% Initialisation before all options. +% +% \begin{macro}{\scrlayer@@inherited@options@cslist, +% \scrlayer@@add@inherited@option} +% \changes{v3.33}{2021/02/15}{added} +% \begin{macro}{\scrlayer@do@inherited@options, +% \scrlayer@inherit@option} +% \changes{v3.33}{2021/02/15}{added (interface command)} +% The options of \textsf{scrlayer} should be passed to \textsf{scrlayer} while +% loading an interface package. We use the comma-separated-list +% \cs{scrlayer@@inherited@options@cslist} to store all of them, so the +% interface packages are able to process them via +% \cs{scrlayer@do@inherited@options} which has an optional command, the +% \texttt{KOMA} member defined by the interface package. The default of the +% optional argument is (as usual) +% ``\texttt{.}\cs{@currname}\texttt{.}\cs{currext}''. This option is passed to +% the command, that is used a second argument, which is the first mandatory +% argument. +% Last but not least \cs{scrlayer@inherit@option} is the usual inheritance +% function. It adds a new \texttt{KOMA} option and also removes it at the end +% of the package. It should be used \emph{before} \cs{KOMAProcessOptions}. It +% has three arguments: the \texttt{KOMA} member and the option name. +% +% With this the usual execution order of an interface package would be: +% \begin{verbatim} +% \RequirePackage{scrlayer}[2021/02/15] +% \scrlayer@do@inherited@options{\scrlayer@inherit@option} +% \end{verbatim} +% \begin{macrocode} +%<*package> +\newcommand*{\scrlayer@@inherited@options@cslist}{} +\newcommand*{\scrlayer@@add@inherited@option}[1]{% + \ifx\scrlayer@@inherited@options@cslist\@empty + \g@addto@macro\scrlayer@@inherited@options@cslist{#1}% + \else + \g@addto@macro\scrlayer@@inherited@options@cslist{,#1}% + \fi +} +\newcommand*{\scrlayer@do@inherited@options}[2][.\@currname.\@currext]{% + \@for \reserved@a:=\scrlayer@@inherited@options@cslist \do {% + \edef\reserved@a{\unexpanded{#2}{#1}{\reserved@a}}% + \reserved@a + }% +} +\newcommand*{\scrlayer@inherit@option}[2]{% +% \typeout{TRACE: Define key `#2' of member `#1'}% + \DefineFamilyMember[#1]{KOMA}% + \expandafter\let\csname KV@KOMA#1@#2\expandafter\endcsname + \csname KV@KOMA.scrlayer.sty@#2\endcsname + \expandafter\let\csname KV@KOMA#1@#2@default\expandafter\endcsname + \csname KV@KOMA.scrlayer.sty@#2@default\expandafter\endcsname + \AtEndOfPackage{% + \RelaxFamilyKey[{#1}]{KOMA}{#2}% + }% +} +\@onlypreamble\scr@do@inherited@options +\@onlypreamble\scr@inherit@option +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% While there are \KOMAScript{} options, we need \pkg*{scrkbase} to declare +% them, but the interfaces also needs \pkg*{scrlayer} which already +% includes \pkg*{scrkbase}. +% \begin{macrocode} +%\RequirePackage{scrkbase}[2013/03/05] +%\RequirePackage{scrlayer} +% \end{macrocode} +% +% +% \begin{macro}{\scrlayer@AtEndOfPackage} +% Initial \cs{AtEndOfPackage}, but after end of package +% \cs{@firstofone}. +% \begin{macrocode} +\scr@ifundefinedorrelax{scrlayer@AtEndOfPackage}{% + \AtEndOfPackage{\let\scrlayer@AtEndOfPackage\@firstofone}% +}{% + \ifx\scrlayer@AtEndOfPackage\@firstofone + \AtEndOfPackage{\let\scrlayer@AtEndOfPackage\@firstofone}% + \fi +} +\let\scrlayer@AtEndOfPackage\AtEndOfPackage +% \end{macrocode} +% \end{macro}^^A \sls@AtEndOfPackage +% +% \begin{macro}{\scrlayer@testunexpectedarg} +% We'll have several \KOMAScript{} options, that didn't expect an +% value. So we use this general helper to test the value and report an error +% if it is not empty (or \cs{relax}). +% \begin{macrocode} +%<*package> +\newcommand*{\scrlayer@testunexpectedarg}[2]{% + \ifx\relax#2\relax\else + \PackageError{scrlayer}{unexpected value to `#1'}{% + Option `#1' doesn't expect any value.\MessageBreak + If you'll continue, the value `#2' will be ignored.% + }% + \fi +} +% +% \end{macrocode} +% \end{macro}^^A \scrlayer@testunexpectedarg +% +% \begin{macro}{\if@chapter,\@chaptertrue,\@chapterfalse} +% We need this later. But it is something general. So we initialise it as +% early as possible. +% \begin{macrocode} +%<*package> +\scr@ifundefinedorrelax{if@chapter}{% + \newif\if@chapter + \scr@ifundefinedorrelax{chapter}{\@chapterfalse}{\@chaptertrue}% +}{} +% \end{macrocode} +% \end{macro}^^A \if@chapter +% +% \begin{macro}{\if@mainmatter} +% Some classes define \cs{frontmatter} or \cs{mainmatter}, but do not +% define \cs{if@mainmatter}. But we nee some information about the matter, +% so in that case, we add it. +% \begin{macrocode} +\scr@ifundefinedorrelax{if@mainmatter}{% + \scr@ifundefinedorrelax{mainmatter}{% + \newif\if@mainmatter\@mainmattertrue + }{% + \PackageWarningNoLine{scrlayer}{% + \string\mainmatter\space defined without + \string\if@mainmatter!\MessageBreak + Note, that several packages need + \string\if@mainmatter\space\MessageBreak + to detect whether or no the main matter has been\MessageBreak + entered. So does scrlayer. Because of this\MessageBreak + it will extend \string\mainmatter, now% + }% + \newif\if@mainmatter\@mainmattertrue + \expandafter\def\expandafter\mainmatter\expandafter{% + \expandafter\@mainmattertrue\mainmatter}% + \scr@ifundefinedorrelax{frontmatter}{}{% + \expandafter\def\expandafter\frontmatter\expandafter{% + \expandafter\@mainmatterfalse\frontmatter} + }% + \scr@ifundefinedorrelax{backmatter}{}{% + \expandafter\def\expandafter\backmatter{% + \expandafter\@mainmatterfalse\backmattter}% + }% + }% +}{} +% +% \end{macrocode} +% \end{macro}^^A \if@mainmatter +% +% \begin{macrocode} +% +% \end{macrocode} +% +% +% \subsection{Process Options} +% +% \begin{macrocode} +%<*body> +% \end{macrocode} +% +% The very first thing at the body is processing the options: +% \begin{macrocode} +%<*package|interface> +\KOMAProcessOptions\relax +% +% \end{macrocode} +% +% \subsection{Body Initialisation} +% +% Currently not needed. +% +% \begin{macrocode} +% +% \end{macrocode} +% +% +% \subsection{Extended Running Heads} +% +% Package \pkg{scrpage2} changes and extends the running head mechanisms +% of \LaTeX{} and the classes. Most of this are basic features an therefore +% done already by \pkg*{scrlayer}. But not the deprecated options. +% +% \begin{option}{markcase} +% \begin{description} +% \item[\texttt{=\meta{setting}}] one of: \texttt{upper}, \texttt{lower}, +% \texttt{used}, or \texttt{ignoreuppercase}. +% \end{description}\noindent +% The two options \opt{markuppercase} and \opt{markusedcase} become +% deprecated and are replace be the single option \opt{markcase}. Note, +% that interface \pkg*{scrlayer-scrpage} has to delay this option to +% overload case setting of option \opt{pagestyleset}. +% \begin{macrocode} +%<*options> +\KOMA@key{markcase}{% +%\scrlayer@AtEndOfPackage{% + \begingroup + \KOMA@set@ncmdkey{markcase}{reserved@a}{% + {upper}{0},{lower}{1},{used}{2},% + {ignoreuppercase}{3},{nouppercase}{3},% + {ignoreupper}{3},{noupper}{3}% + }{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \aftergroup\FamilyKeyStateProcessed + \ifnum \reserved@a>\m@ne + \aftergroup\let\aftergroup\MakeMarkcase + \ifcase \reserved@a + \aftergroup\MakeUppercase + \aftergroup\scrlayer@forceignoreuppercasefalse + \or + \aftergroup\MakeLowercase + \aftergroup\scrlayer@forceignoreuppercasefalse + \or + \aftergroup\@firstofone + \aftergroup\scrlayer@forceignoreuppercasefalse + \else + \aftergroup\scrlayer@ignoreuppercase + \aftergroup\scrlayer@forceignoreuppercasetrue + \fi + \fi + \else + \aftergroup\FamilyKeyStateUnknownValue + \fi + \endgroup + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \KOMA@kav@removekey{.scrlayer.sty}{markcase}% + \KOMA@kav@xadd{.scrlayer.sty}{markcase}{#1}% + \fi +%}% +} +%\scrlayer@@add@inherited@option{markcase} +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @markcase\endcsname\relax +% +% \end{macrocode} +% \begin{command}{\MakeMarkcase} +% We use this instead of, e.g., \cs{MakeUppercase} for every layer! So the +% name seams to be wrong, but it is common, so we use it here. +% \begin{macrocode} +%<*package&options> +\@ifundefined{MakeMarkcase}{\let\MakeMarkcase\@firstofone}{} +\ifx\MakeMarkcase\@firstofone + \KOMA@kav@replacevalue{.scrlayer.sty}{markcase}{used}% +\else\ifx\MakeMarkcase\MakeUppercase + \KOMA@kav@replacevalue{.scrlayer.sty}{markcase}{upper}% + \else\ifx\MakeMarkcase\MakeLowercase + \KOMA@kav@replacevalue{.scrlayer.sty}{markcase}{lower}% + \else\ifx\MakeMarkcase\scr@ignoreuppercase + \KOMA@kav@replacevalue{.scrlayer.sty}{markcase}{ignoreuppercase}% +\fi\fi\fi\fi +% \end{macrocode} +% \begin{macro}{\scrlayer@ignoreuppercase} +% We span a group and set \cs{uppercase} and \cs{MakeUppercase} to +% \cs{@firstofone}. +% \begin{macrocode} +\DeclareRobustCommand*{\scrlayer@ignoreuppercase}[1]{% + \begingroup + \let\uppercase\@firstofone + \let\MakeUppercase\@firstofone + \expandafter\let\csname MakeUppercase \endcsname\@firstofone + #1% + \endgroup +} +% \end{macrocode} +% This is almost enough, but standard classes still would show upper-case +% letters at table of contents, list of figures, list of tables, index and +% bibliography. So we need an additional workaround. +% \begin{macro}{\ifscrlayer@forceignoreuppercase} +% \begin{macrocode} +\newif\ifscrlayer@forceignoreuppercase +% +% \end{macrocode} +% \end{macro}^^A \ifscrlayer@forceignoreuppercase +% \end{macro}^^A \scrlayer@ignoreuppercase +% \end{command}^^A \MakeMarkcase +% \end{option}^^A markcase +% +% \begin{command}{\rightfirstmark,\rightbotmark,\righttopmark} +% \changes{v3.16}{2015/01/14}{added} +% \cs{rightfirstmark} is simply the same like the \cs{rightmark} of the +% \LaTeX{} kernel. \cs{rightbotmark} uses \cs{botmark} instead of +% \cs{firstmark} and \cs{righttopmark} uses \cs{topmark}. +% \begin{macrocode} +%<*package&body> +\newcommand*{\rightfirstmark}{\expandafter\@rightmark\firstmark\@empty\@empty} +\newcommand*{\rightbotmark}{\expandafter\@rightmark\botmark\@empty\@empty} +\newcommand*{\righttopmark}{\expandafter\@rightmark\topmark\@empty\@empty} +% \end{macrocode} +% \end{command}^^A \rightfirstmark … +% +% \begin{command}{\leftfirstmark,\leftbotmark,\lefttopmark} +% \changes{v3.16}{2015/01/14}{added} +% \cs{leftbotmark} is simply the same like the \cs{leftmark} of the +% \LaTeX{} kernel. \cs{leftfirstmark} uses \cs{firstmark} instead of +% \cs{botmark} and \cs{lefttopmark} uses \cs{topmark}. +% \begin{macrocode} +\newcommand*{\leftfirstmark}{\expandafter\@leftmark\firstmark\@empty\@empty} +\newcommand*{\leftbotmark}{\expandafter\@leftmark\botmark\@empty\@empty} +\newcommand*{\lefttopmark}{\expandafter\@leftmark\topmark\@empty\@empty} +% +% \end{macrocode} +% \end{command}^^A \leftfirstmark … +% +% \begin{command}{\headmark} +% Inside a page style, this macro is either \cs{rightmark} or +% \cs{leftmark}. Outside its \LaTeX-undefined and therefore it's not an +% interface command, but has to be undefined: +% \begin{macrocode} +%<*package&body> +\@ifundefined{headmark}{}{% + \PackageWarningNoLine{scrlayer}{% + \string\headmark\space detected!\MessageBreak + \string\headmark\space will either be set to + \string\rightmark\MessageBreak + or \string\leftmark inside of page styles.\MessageBreak + This means, that \string\headmark\space will be overwritten\MessageBreak + at every page layer usage!\MessageBreak + Nevertheless it will stay unchanged outside\MessageBreak + of page layers.\MessageBreak + I hope, this won't break your document% + }% +} +% +% \end{macrocode} +% \end{command}^^A \headmark +% +% \begin{command}{\pagemark} +% The page number together with its font setting. It's robust and will never +% be part of the interface. +% \begin{macrocode} +%<*package&body> +\@ifundefined{pagemark}{% + \DeclareRobustCommand\pagemark{{\pnumfont{\thepage}}}% +}{}% +% \end{macrocode} +% \begin{command}{\pnumfont} +% \begin{macro}{\scr@fnt@pagenumber} +% The low-level page number font command. It is deprecated to redefine or use +% this and it may already be defined. These commands will not become part of +% the interface! +% \begin{macrocode} +\@ifundefined{pnumfont}{% + \newcommand{\pnumfont}{\normalfont}% +}{} +\@ifundefined{scr@fnt@pagenumber}{% + \newcommand{\scr@fnt@pagenumber}{\pnumfont}% +}{} +% +% \end{macrocode} +% \end{macro}^^A \scr@fnt@pagenumber +% \end{command}^^A \pnumfont +% \end{command}^^A \pagemark +% +% \begin{command}{\partmarkformat,\chaptermarkformat,\sectionmarkformat, +% \GenericMarkFormat} +% All the \cs{\dots markformat} macros of \KOMAScript{} are also +% supported by \pkg*{scrlayer} and it uses them actively. The generic +% definition has been moved from \cs{@seccntmarkformat} to +% \cs{GenericMarkFormat}. This is one more difference to +% \pkg{scrpage2}. The defaults are compatible to the standard +% classes. These commands will not become part of the interface and other +% interfaces should redefine them only, if they are not already defined. +% \begin{macrocode} +%<*package&body> +\providecommand*{\partmarkformat}{\partname\ \thepart. \ }% +\if@chapter + \providecommand*{\@chapapp}{\chaptername}% + \providecommand*{\chaptermarkformat}{\@chapapp\ \thechapter. \ }% + \providecommand*{\sectionmarkformat}{\thesection. \ }% +\else + \providecommand*{\sectionmarkformat}{\GenericMarkFormat{section}}% +\fi +\scr@ifundefinedorrelax{@seccntmarkformat}{% + \providecommand*{\GenericMarkFormat}{\@seccntformat}% +}{% + \providecommand*{\GenericMarkFormat}[1]{\@seccntmarkformat{#1}}% +} +% +% \end{macrocode} +% Note, that the other \cs{\dots markformat} will be defined by +% \cs{scrlayer@level@init}. +% \end{command}^^A \partmarkformat … +% +% \begin{macro}{\@mkleft,\@mkright} +% \changes{v3.25}{2017/10/13}{added to the \KOMAScript{} classes} +% \begin{macro}{\@mkdouble} +% \changes{v3.25}{2017/10/13}{added to the \KOMAScript{} classes} +% \changes{v3.27a}{2019/10/17}{long definition} +% These are new in \pkg*{scrlayer}. They may be updated, whenever +% \cs{@mkboth} will be updated. Otherwise they get a working default +% definition. These commands will not become part of the interface and other +% interfaces should redefine them only, if they are not already defined. +% \begin{macrocode} +%<*(package|class)&body> +\providecommand*{\@mkleft}{% + \IfActiveMkBoth{\markleft}{\@gobble}% +}% +\providecommand*{\@mkright}{% + \IfActiveMkBoth{\markright}{\@gobble}% +}% +\providecommand{\@mkdouble}[1]{% + \@mkboth{#1}{#1}% +} +% +% \end{macrocode} +% \end{macro}^^A \@mkdouble +% \end{macro}^^A \@mkright,\@mkleft +% +% \begin{command}{\markleft} +% \changes{v3.27a}{2019/10/17}{robust and long definition} +% \changes{v3.37}{2022/06/19}{respect extended mark mechanism of \LaTeX{} +% 2022/06/01} +% \begin{macro}{\@markleft} +% \LaTeX{} itself provides \cs{markboth} and \cs{markright} but not +% \cs{markleft}. So we add it. +% \begin{macrocode} +%<*package&body> +\csname ExplSyntaxOn\endcsname +\IfLTXAtLeastTF{2022/06/01}{% + \@ifundefined{markleft}{% + \DeclareRobustCommand{\markleft}[1]{% + \begingroup + \let\label\relax \let\index\relax \let\glossary\relax + \expandafter\@markleft\@themark {#1}% + \@temptokena \expandafter{\@themark}% + \mark_insert:nn{2e-left}{#1}% + \mark{\the\@temptokena}% + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi + }% + \providecommand{\@markleft}[3]{% + \@temptokena {#2}% + \unrestored@protected@xdef\@themark{{#3}{\the\@temptokena}}% + }% + }{}% +}{% + \@ifundefined{markleft}{% + \DeclareRobustCommand{\markleft}[1]{% + \begingroup + \let\label\relax \let\index\relax \let\glossary\relax + \expandafter\@markleft\@themark {#1}% + \@temptokena \expandafter{\@themark}% + \mark{\the\@temptokena}% + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi + }% + \providecommand{\@markleft}[3]{% + \@temptokena {#2}% + \unrestored@protected@xdef\@themark{{#3}{\the\@temptokena}}% + }% + }{}% +} +\csname ExplSyntaxOff\endcsname +% +% \end{macrocode} +% \end{macro}^^A \@markleft +% \end{command}^^A \markleft +% +% \begin{command}{\markdouble} +% \changes{v3.28}{2019/10/17}{added} +% This is easier, because it uses \cs{markboth}. So we do not need to declare +% it robust and we can use \cs{providecommand}. +% \begin{macrocode} +%<*package&body> +\providecommand{\markdouble}[1]{\markboth{#1}{#1}} +% +% \end{macrocode} +% \end{command}^^A \markdouble +% +% \begin{option}{autooneside} +% \begin{macro}{\ifscrlayer@autooneside} +% Decide whether or not use the optional argument of \cs{automark} in +% single-side layout. +% \begin{macrocode} +%<*options> +%<*package> +\KOMA@ifkey{autooneside}{scrlayer@autooneside}\scrlayer@autoonesidetrue +\scrlayer@@add@inherited@option{autooneside} +\KOMA@kav@replacebool{.scrlayer.sty}{autooneside}{scrlayer@autooneside} +% +%<*interface> +\KOMA@key{autooneside}[true]{% + \KOMA@set@ifkey{autooneside}{scrlayer@autooneside}{#1}% + \KOMA@kav@replacebool{.scrlayer.sty}{autooneside}{scrlayer@autooneside}% +} +% +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @autooneside\endcsname\relax +% +% \end{macrocode} +% \end{macro}^^A \ifscrlayer@autooneside +% \end{option}^^A autooneside +% +% +% \begin{option}{automark} +% \begin{option}{manualmark} +% Maybe we will extend these options later. Currently they do almost the +% same they do at \pkg{scrpage2}. The difference is, that single-side or +% two-side doesn't matter here (but it does inside of the definitions of the +% marks itself). +% +% \begin{description} +% \item[ToDo:] Maybe \opt{manualmark} should become deprecated and +% \opt{automark} should have simple values or a new option, that also +% handles \opt{autooneside}? +% \end{description} +% \changes{v3.22}{2016/12/07}{prepared for classes without \cs{section} or +% \cs{subsection}} +% \begin{macrocode} +%<*options> +\KOMA@key{automark}[]{% + \scrlayer@testunexpectedarg{automark}{#1}% + \scrlayer@AtEndOfPackage{% + \if@chapter + \scr@ifundefinedorrelax{section}{% + \automark{chapter}% + }{% + \automark[section]{chapter}% + }% + \else + \scr@ifundefinedorrelax{section}{% + \automark{}% + }{% + \scr@ifundefinedorrelax{subsection}{% + \automark{section}% + }{% + \automark[subsection]{section}% + } + }% + \fi + }% + \FamilyKeyStateProcessed + \KOMA@kav@removekey{.scrlayer.sty}{automark}% + \KOMA@kav@removekey{.scrlayer.sty}{manualmark}% + \KOMA@kav@add{.scrlayer.sty}{automark}{}% +} +%\scrlayer@@add@inherited@option{automark} +% +%<*interface&body> +\expandafter\let\csname KV@KOMA.\@currname.\@currext @automark\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @automark@default\endcsname\relax +% +%<*options> +\KOMA@key{manualmark}[]{% + \scrlayer@testunexpectedarg{manualmark}{#1}% + \scrlayer@AtEndOfPackage{\manualmark}% + \FamilyKeyStateProcessed + \KOMA@kav@removekey{.scrlayer.sty}{automark}% + \KOMA@kav@removekey{.scrlayer.sty}{manualmark}% + \KOMA@kav@add{.scrlayer.sty}{manualmark}{}% +} +%\scrlayer@@add@inherited@option{manualmark} +% +%<*interface&body> +\expandafter\let\csname KV@KOMA.\@currname.\@currext @manualmark\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @manualmark@default\endcsname\relax +% +% \end{macrocode} +% \end{option}^^A manualmark +% \end{option}^^A automark +% +% \begin{command}{\manualmark} +% Switch to manual marks. This resets \cs{@mkleft}, \cs{@mkright}, +% \cs{@mkdouble}, \cs{@mkboth} and the \cs{\dots mark} of all known +% levels. +% \begin{macrocode} +%<*package&body> +\newcommand*{\manualmark}{% + \begingroup + \def\@elt##1{% + \aftergroup\let\expandafter\aftergroup\csname ##1mark\endcsname + \aftergroup\@gobble + }% + \scrlayer@level@list + \endgroup + \let\@mkleft\@gobble + \let\@mkright\@gobble + \let\@mkdouble\@gobble + \let\@mkboth\@gobbletwo +} +% +% \end{macrocode} +% \end{command} +% +% \begin{command}{\automark} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} durch \cs{kernel@ifstar} +% ersetzt} +% \begin{macro}{\@automark} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% This is the brain knot of the game! I'll try to explain, what I'm doing: +% First of all the new starred version of \cs{automark} doesn't reset the +% mark commands. So it works cumulatively. This may be useful e.g. to have +% chapter marks as long as no section marks have been made etc. +% \begin{macrocode} +%<*package&body> +\newcommand*{\automark}{% + \kernel@ifstar{\@automark}{\manualmark\@automark}% +} +\newcommand*{\@automark}[2][]{% + \Ifstr{#2}{}{% + \Ifstr{#1}{}{% +% \end{macrocode} +% \cs{automark[]{}} or \cs{automark{}} has been used. This will activate +% the low level mark commands, but doesn't change the high level commands. It +% may be useful or may not, the user should know what he does: +% \begin{macrocode} + \automark@basics + }{% +% \end{macrocode} +% \cs{automark[\dots]{}} has been used. This will activate the higher level +% mark commands and also set up the right mark +% \begin{macrocode} + \automark@basics + \automark@righthigh{#1}% + }% + }{% + \Ifstr{#1}{}{% +% \end{macrocode} +% \cs{automark[]{\dots}} or \cs{automark{\dots}} has been used. This +% will activate the low level mark commands and also set up either the left or +% both marks. +% \begin{macrocode} + \automark@basics + \automark@leftlow{#2}% + }{% +% \end{macrocode} +% \cs{automark[\dots]{\dots}} has been used. This will activate the low +% level mark commands and also both high level marks. +% \begin{macrocode} + \automark@basics + \automark@both{#1}{#2}% + }% + }% +} +% \end{macrocode} +% \begin{macro}{\automark@basics} +% Activate all low level \cs{@mk\dots} commands: +% \begin{macrocode} +\newcommand*{\automark@basics}{% + \let\@mkleft\markleft + \let\@mkright\markright + \let\@mkboth\markboth + \def\@mkdouble##1{\@mkboth{##1}{##1}}% +} +% \end{macrocode} +% \end{macro}^^A \automark@basics +% \begin{macro}{\automark@righthigh} +% Set up the right mark of a higher level, but in single-side layout only if +% \opt{autooneside} hasn't been used. Note, that with this definition no +% special handling for \KOMAScript's \cs{addchap} and \cs{addsec} is +% needed. +% \begin{macrocode} +\newcommand*{\automark@righthigh}[1]{% + \ifscrlayer@level@prepared{#1}{% + \expandafter\def\csname #1mark\endcsname##1{% + \begingroup + \@tempswafalse + \if@twoside\@tempswatrue + \else\ifscrlayer@autooneside\else\@tempswatrue\fi\fi + \expandafter\endgroup + \if@tempswa + \@mkright{% + \MakeMarkcase{% + \ifnum \c@secnumdepth<\numexpr \csname #1numdepth\endcsname +0\relax + \else\if@mainmatter \csname #1markformat\endcsname\fi\fi + ##1% + }% + }% + \fi + }% + }{}% +} +% \end{macrocode} +% \end{macro}^^A \automark@righthigh +% \begin{macro}{\automark@leftlow} +% Set up the left mark of a low level, but in single-side layout the right +% mark has to be used. +% \begin{macrocode} +\newcommand*{\automark@leftlow}[1]{% + \ifscrlayer@level@prepared{#1}{% + \expandafter\def\csname #1mark\endcsname ##1{% + \if@twoside +% \end{macrocode} +% In two-side mode the left high mark has also to clear the right low +% mark. This would be unwanted, if the left mark is a low mark and the right +% mark is a high mark. But we cannot detect this if no right mark level has +% been given. So we simply use: +% \begin{macrocode} + \expandafter\@mkboth + \else +% \end{macrocode} +% In single-side mode there's no left high mark without a right low mark. So +% instead of only a left high mark, we set up both marks. +% \changes{v3.27}{2019/07/25}{replaced \cs{@empty} by \texttt{\{\}} to avoid +% \textsf{babel} issue} +% \begin{macrocode} + \expandafter\@mkdouble + \fi + {% + \MakeMarkcase{% + \ifnum \c@secnumdepth<\numexpr \csname #1numdepth\endcsname +0\relax + \else\if@mainmatter \csname #1markformat\endcsname\fi\fi + ##1% + }% + }{}% + }% + }{}% +} +% \end{macrocode} +% \end{macro}^^A \automark@leftlow +% \begin{macro}{\automark@both} +% Set up both marks, but in single-side layout depending on +% \opt{autooneside}. +% \begin{macrocode} +\newcommand*{\automark@both}[2]{% + \ifscrlayer@level@prepared{#1}{% + \ifscrlayer@level@prepared{#2}{% + \ifnum \numexpr \csname #1numdepth\endcsname +0\relax + > \numexpr \csname #2numdepth\endcsname +0\relax +% \end{macrocode} +% Level of left mark is greater than level of right mark. e.g., section > +% chapter. This is unusual. Nevertheless we'll handle it. +% \begin{macrocode} + \automark@leftlow{#2}% + \automark@righthigh{#1}% + \else \ifnum \numexpr \csname #1numdepth\endcsname +0\relax + = \numexpr \csname #2numdepth\endcsname +0\relax +% \end{macrocode} +% Level of left mark is equal to level of right mark. This is +% nice and very easy to handle. +% \begin{macrocode} + \expandafter\def\csname #2mark\endcsname##1{% + \@mkdouble{% + \MakeMarkcase{% + \ifnum \c@secnumdepth<\numexpr + \csname #2numdepth\endcsname +0\relax + \else + \if@mainmatter \csname #2markformat\endcsname\fi + \fi + ##1% + }% + }% + }% + \else +% \end{macrocode} +% Level of left mark is less than level of right mark. This is +% usual. +% \begin{macrocode} + \expandafter\def\csname #1mark\endcsname##1{% + \begingroup + \@tempswafalse + \if@twoside\@tempswatrue + \else\ifscrlayer@autooneside\else\@tempswatrue\fi\fi + \expandafter\endgroup + \if@tempswa + \@mkleft{% + \MakeMarkcase{% + \ifnum \c@secnumdepth + < \numexpr\csname #1numdepth\endcsname +0\relax + \else + \if@mainmatter \csname #1markformat\endcsname\fi + \fi + ##1% + }% + }% + \fi + }% + \expandafter\def\csname #2mark\endcsname##1{% + \@mkboth{}{% + \MakeMarkcase{% + \ifnum \c@secnumdepth + < \numexpr \csname #2numdepth\endcsname +0\relax + \else\if@mainmatter \csname #2markformat\endcsname\fi\fi + ##1% + }% + }% + }% + \fi + \fi + }{}% + }{}% +} +% \end{macrocode} +% \begin{macro}{\ifscrlayer@level@prepared} +% Test, whether or not this level has been prepared. +% \begin{macrocode} +\newcommand*{\ifscrlayer@level@prepared}[1]{% + \typeout{1: \detokenize{#1}}% + \scr@ifundefinedorrelax{#1numdepth}{% + \PackageError{scrlayer}{numbering depth of `#1' unknown}{% + Someone told me to use a section mark for level `#1',\MessageBreak + but the numbering depth hasn't been declared before. You may solve this + using\MessageBreak + \string\DeclareSectionNumberDepth{#1}{NUMBER}.% + }% + \@secondoftwo + }{% + \@firstoftwo + }% +} +% +% \end{macrocode} +% \end{macro}^^A \ifscrlayer@level@prepared +% \end{macro}^^A \automark@both +% \end{macro}^^A \@automark +% \end{command}^^A \automark +% +% \begin{command}{\DeclareSectionNumberDepth} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{description} +% \item[\marg{string}:] the name of the section level, e.g., +% part, chapter, section etc. (must be fully +% expandable and expand to a string). +% \item[\marg{numeric expression}:] the section number depth of the +% level, e.g., -1 for part, 0 for chapter etc. +% \end{description} +% Note that levels part, chapter, section, subsection, sub\dots subsection, +% paragraph, subparagraph, sub\dots subparagraph, minisec, subminisec, +% sub\dots subminisec will be recognised either at load time or at +% \cs{begin}\texttt\{\env{document}\texttt\} automatically if they have the +% usual levels. +% \begin{macrocode} +%<*package&body> +\newcommand*{\DeclareSectionNumberDepth}[2]{% + \expandafter\edef\csname #1numdepth\endcsname{\the\numexpr #2\relax}% + \@ifundefined{#1mark}{% + \expandafter\let\csname #1mark\endcsname\@gobble + }{}% + \@ifundefined{#1markformat}{% + \@namedef{#1markformat}{\GenericMarkFormat{#1}}% + }{}% + \begingroup + \@tempswatrue + \def\@elt##1{\Ifstr{#1}{##1}{\@tempswafalse}{}}% + \scrlayer@level@list + \if@tempswa + \aftergroup\@firstofone + \else + \aftergroup\@gobble + \fi + \endgroup + {% + \l@addto@macro\scrlayer@level@list{\@elt{#1}}% + }% +} +% \end{macrocode} +% \begin{macro}{\scrlayer@level@list,\scrlayer@level@init} +% Stores all the existing levels. +% \begin{macrocode} +\newcommand*{\scrlayer@level@list}{} +% \end{macrocode} +% Usually all levels are known on loading this package, but if a package +% defines additional levels later we'll do an additional test at +% \cs{begin}\texttt\{\env{document}\texttt\}. But we do not redo the part and +% the chapter test. +% \begin{macrocode} +\scr@ifundefinedorrelax{part}{}{% + \DeclareSectionNumberDepth{part}{-1}% +} +\if@chapter + \DeclareSectionNumberDepth{chapter}{0}% +\fi +\newcommand*{\scrlayer@level@init}{% + \@tempcnta=1 + \def\reserved@b##1{% + \@tempswatrue + \def\reserved@a{##1}% + \@whilesw \if@tempswa \fi {% + \scr@ifundefinedorrelax{\reserved@a}{% + \@tempswafalse + }{% + \@ifundefined{\reserved@a numdepth}{% + \expandafter\DeclareSectionNumberDepth + \expandafter{\reserved@a}{\@tempcnta}% + }{% + \expandafter\DeclareSectionNumberDepth + \expandafter{\reserved@a}{\csname \reserved@a numdepth\endcsname}% + }% + \advance \@tempcnta by \@ne + \edef\reserved@a{sub\reserved@a}% + }% + }% + }% + \reserved@b{section}% + \reserved@b{paragraph}% + \reserved@b{minisec}% +} +\scrlayer@level@init +\AtBeginDocument{% + \scrlayer@level@init +} +% +% \end{macrocode} +% \end{macro}^^A \scrlayer@level@init,\scrlayer@level@list +% \end{command}^^A DeclareSectionNumberDepth +% +% +% \subsection{Providing Layers} +% +% A layer is a virtual sheet of paper stacked behind or above the real sheet +% of paper. All the virtual and real sheets of one page may been seen +% simultanous, but material o one sheet may overlap material on sheets below. +% Layers provided by \pkg*{scrlayer} will not be stacked below or above +% real sheets unless they are used by a page style. +% +% While we use \meta{key}\texttt{=}\meta{value} arguments for several of the +% layer commands we define a new family with a new member: +% \begin{macrocode} +%<*package&body> +\DefineFamily{KOMAarg} +\DefineFamilyMember[.definelayer]{KOMAarg} +% +% \end{macrocode} +% +% \begin{command}{\DeclareLayer} +% \begin{description} +% \item[\oarg{option list}:] a comma separated list of +% \texttt{\meta{key}=\meta{value}} pairs. +% \item[\marg{string}:] the name of the layer (must be fully expandable +% and expand to a string only). +% \end{description} +% Layers are the basic elements of page styles. A layer has a name and several +% attributes. The attributes may be set as comma separated list at the first, +% optional argument of \cs{DeclareLayer}. The name must be set by the second, +% mandatory argument. +% \begin{macro}{\def@scr@l@pos} +% And a second helper macro to easily define $x, y, w, h$ of a layer. +% \begin{macrocode} +%<*package&body> +\newcommand*{\def@scr@l@pos}[4]{% + \@namedef{scr@l@\scr@current@layer @x}{#1}% + \@namedef{scr@l@\scr@current@layer @y}{#2}% + \@namedef{scr@l@\scr@current@layer @w}{#3}% + \@namedef{scr@l@\scr@current@layer @h}{#4}% +} +% \end{macrocode} +% \end{macro}^^A \def@scr@l@pos +% +% There are basic, primitive attributes and compounding attributes. The basic +% attributes are: +% \begin{description} +% \item[\texttt{mode=\meta{command sequence}}:] the mode that should be used +% to output the \texttt{contents}. A command \cs{layer\meta{command +% sequence}mode} with one argument need to be defined. +% \changes{v3.19}{2015/07/30}{new layer attribute \texttt{mode}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{mode}{% + \scr@ifundefinedorrelax{layer#1mode}{\FamilyKeyStateUnknownValue}{% + \@namedef{scr@l@\scr@current@layer @mode}{#1}% + \FamilyKeyStateProcessed + }% +} +% \end{macrocode} +% \item[\texttt{hoffset=\meta{dimension expression}}:] offset from the left +% edge of the paper. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{hoffset}{% + \@namedef{scr@l@\scr@current@layer @x}{\dimexpr #1\relax}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \item[\texttt{voffset=\meta{dimension expression}}:] offset from the top +% edge of the paper. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{voffset}{% + \@namedef{scr@l@\scr@current@layer @y}{\dimexpr #1\relax}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \item[\texttt{width=\meta{dimension expression}}:] width of the layer. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{width}{% + \@namedef{scr@l@\scr@current@layer @w}{\dimexpr #1\relax}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \item[\texttt{height=\meta{dimension expression}}:] height of the layer. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{height}{% + \@namedef{scr@l@\scr@current@layer @h}{\dimexpr #1\relax}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \item[\texttt{align=\meta{specification}}:] horizontal and vertical +% alignment of the layer. The \meta{specification} will interpreted +% character by character with the following valid characters: +% \begin{itemize} +% \item[l] -- align the layer with its left edge to the given horizontal +% offset. This means, that the layer's width will span right from the +% given horizontal offset. +% \item[r] -- align the layer with its right edge to the given horizontal +% offset. This means, that the layer's width will span left from the given +% horizontal offset. +% \item[c] -- align the layer centered to the given horizontal and vertical +% offset. This means, that the given offsets are at the middle of the +% layer width and total height. +% \item[t] -- align the layer with its top edge to the given vertical +% offset. This means that the layer's contents will span below the given +% vertical offset. +% \item[b] -- align the layer with its bottom edge to the given vertical +% offset. This means, that the layer's contents will span above the given +% vertical offset. +% \end{itemize} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{align}{% + \@namedef{scr@l@\scr@current@layer @align}{#1}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \item[\texttt{contents=\meta{output}}:] whatever should be printed by the +% layer. +% \changes{v3.14}{2014/10/20}{\texttt{contents} is \cs{long}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{contents}{% + \long\@namedef{scr@l@\scr@current@layer @contents}{#1}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \item[\texttt{background}:] restrict the layer to the page +% background. This means, that the main contents of the page may overprint +% the contents of the layer. Note, that this attribute has no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{background}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{background}{#1}% + \csname @scr@l@\scr@current@layer @backgroundtrue\endcsname + \csname @scr@l@\scr@current@layer @foregroundfalse\endcsname +} +% \end{macrocode} +% \item[\texttt{foreground}:] restrict the layer to the page +% foreground. This means, that the layer's contents may overprint the main +% contents of the page. Note, that this attribute has no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{foreground}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{foreground}{#1}% + \csname @scr@l@\scr@current@layer @backgroundfalse\endcsname + \csname @scr@l@\scr@current@layer @foregroundtrue\endcsname +} +% \end{macrocode} +% \item[\texttt{backandforeground}:] not really useful, but the counterpart of +% the restrictions above. +% \changes{v3.18}{2015/05/14}{new layer feature \texttt{backandforeground}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{backandforeground}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{backandforeground}{#1}% + \csname @scr@l@\scr@current@layer @backgroundtrue\endcsname + \csname @scr@l@\scr@current@layer @foregroundtrue\endcsname +} +% \end{macrocode} +% \item[\texttt{oddpage}:] restrict the layer to odd pages only. At +% two-sided layout only pages with odd page numbers are odd pages. At +% single-sided layout all pages are odd pages. Note, that this attribute has +% no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{oddpage}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{oddpage}{#1}% + \csname @scr@l@\scr@current@layer @oddtrue\endcsname + \csname @scr@l@\scr@current@layer @evenfalse\endcsname +} +% \end{macrocode} +% \item[\texttt{evenpage}:] restrict the layer to even pages only. At +% two-sided layout only pages with even page numbers are even pages. At +% single-sided layout there aren't even pages. Note, that this attribute has +% no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{evenpage}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{evenpage}{#1}% + \csname @scr@l@\scr@current@layer @oddfalse\endcsname + \csname @scr@l@\scr@current@layer @eventrue\endcsname +} +% \end{macrocode} +% \item[\texttt{oddorevenpage}:] do not restrict the layer to odd or even +% pages. +% \changes{v3.18}{2015/05/14}{new layer feature \texttt{oddorevenpage}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{oddorevenpage}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{oddorevenpage}{#1}% + \csname @scr@l@\scr@current@layer @oddtrue\endcsname + \csname @scr@l@\scr@current@layer @eventrue\endcsname +} +% \end{macrocode} +% \item[\texttt{evenoroddpage}:] same as \texttt{oddorevenpage} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{evenoroddpage}[\relax]{% + \PackageWarning{scrlayer}{Option `evenoroddpage' unknown.\MessageBreak + Using `oddorevenpage' instead}% + \ExecuteFamilyOptions[.definelayer]{KOMAarg}{oddorevenpage=#1} +} +% \end{macrocode} +% \item[\texttt{oddandevenpages}:] same as \texttt{oddorevenpage} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{oddandevenpages}[\relax]{% + \PackageWarning{scrlayer}{Option `oddandevenpages' unknown.\MessageBreak + Using `oddorevenpage' instead}% + \ExecuteFamilyOptions[.definelayer]{KOMAarg}{oddorevenpage=#1} +} +% \end{macrocode} +% \item[\texttt{evenandoddpages}:] same as \texttt{oddorevenpage} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{evenandoddpages}[\relax]{% + \PackageWarning{scrlayer}{Option `evenandoddpages' unknown.\MessageBreak + Using `oddorevenpage' instead}% + \ExecuteFamilyOptions[.definelayer]{KOMAarg}{oddorevenpage=#1} +} +% \end{macrocode} +% \item[\opt{floatpage}:] restrict the layer to float pages. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{floatpage}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{floatpage}{#1}% + \csname @scr@l@\scr@current@layer @nonfloatpagefalse\endcsname + \csname @scr@l@\scr@current@layer @floatpagetrue\endcsname +} +% \end{macrocode} +% \item[\opt{nonfloatpage}:] restrict the layer to pages, which aren't +% float pages. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{nonfloatpage}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{nonfloatpage}{#1}% + \csname @scr@l@\scr@current@layer @nonfloatpagetrue\endcsname + \csname @scr@l@\scr@current@layer @floatpagefalse\endcsname +} +% \end{macrocode} +% \item[\opt{floatornonfloatpage}:] don't restrict the layer to float or +% non-float pages. +% \changes{v3.18}{2015/05/14}{new layer feature \texttt{floatornonfloatpage}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{floatornonfloatpage}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{floatornonfloatpage}{#1}% + \csname @scr@l@\scr@current@layer @nonfloatpagetrue\endcsname + \csname @scr@l@\scr@current@layer @floatpagetrue\endcsname +} +% \end{macrocode} +% \item[\opt{nonfloatorfloatpage}:] same as \opt{floatornonfloatpage} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{nonfloatorfloatpage}[\relax]{% + \PackageWarning{scrlayer}{Option `nonfloatorfloatpage' unknown.\MessageBreak + Using `floatornonfloatpage' instead}% + \FamilyExecuteOptions[.definelayer]{KOMAarg}{floatornonfloatpage=#1}% +} +% \end{macrocode} +% \item[\opt{floatandnonfloatpages}:] same as \opt{floatornonfloatpage} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{floatandnonfloatpages}[\relax]{% + \PackageWarning{scrlayer}{Option `floatandnonfloatpages' unknown.\MessageBreak + Using `floatornonfloatpage' instead}% + \FamilyExecuteOptions[.definelayer]{KOMAarg}{floatornonfloatpage=#1}% +} +% \end{macrocode} +% \item[\opt{nonfloatandfloatpages}:] same as \opt{floatornonfloatpage} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{nonfloatandfloatpages}[\relax]{% + \PackageWarning{scrlayer}{Option `nonfloatandfloatpages' unknown.\MessageBreak + Using `floatornonfloatpage' instead}% + \FamilyExecuteOptions[.definelayer]{KOMAarg}{floatornonfloatpage=#1}% +} +% \end{macrocode} +% \item[\opt{everypage}:] remove all odd-, even-, float-, and +% nonfloat-restrictions. +% \changes{v3.18}{2015/05/14}{new layer feature \texttt{everypage}} +% \changes{v3.22}{2016/09/24}{foreground and background condition +% removed} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{everypage}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{everypage}{#1}% + \csname @scr@l@\scr@current@layer @oddtrue\endcsname + \csname @scr@l@\scr@current@layer @eventrue\endcsname + \csname @scr@l@\scr@current@layer @nonfloatpagetrue\endcsname + \csname @scr@l@\scr@current@layer @floatpagetrue\endcsname +} +% \end{macrocode} +% \item[\opt{oneside}:] restrict the layer to pages on single-sided +% layouts. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{oneside}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{oneside}{#1}% + \csname @scr@l@\scr@current@layer @twosidefalse\endcsname + \csname @scr@l@\scr@current@layer @onesidetrue\endcsname +} +% \end{macrocode} +% \item[\opt{twoside}:] restrict the layer to pages on two-sided +% layouts. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{twoside}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{twoside}{#1}% + \csname @scr@l@\scr@current@layer @twosidetrue\endcsname + \csname @scr@l@\scr@current@layer @onesidefalse\endcsname +} +% \end{macrocode} +% \item[\opt{everyside}:] remove all one- or two-side restrictions. +% \changes{v3.18}{2015/05/14}{new layer feature \texttt{everyside}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{everyside}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{everyside}{#1}% + \csname @scr@l@\scr@current@layer @twosidetrue\endcsname + \csname @scr@l@\scr@current@layer @onesidetrue\endcsname +} +% \end{macrocode} +% \item[\opt{unrestricted}:] remove all restrictions +% \changes{v3.18}{2015/05/14}{new layer feature \texttt{unrestricted}} +% \changes{v3.22}{2016/09/24}{missing background and foreground +% condition} +% \changes{v3.22}{2016/09/24}{nonfloatpage condition fixed} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{unrestricted}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{unrestricted}{#1}% + \csname @scr@l@\scr@current@layer @oddtrue\endcsname + \csname @scr@l@\scr@current@layer @eventrue\endcsname + \csname @scr@l@\scr@current@layer @backgroundtrue\endcsname + \csname @scr@l@\scr@current@layer @foregroundtrue\endcsname + \csname @scr@l@\scr@current@layer @nonfloatpagetrue\endcsname + \csname @scr@l@\scr@current@layer @floatpagetrue\endcsname + \csname @scr@l@\scr@current@layer @twosidetrue\endcsname + \csname @scr@l@\scr@current@layer @onesidetrue\endcsname +} +% \end{macrocode} +% \changes{v3.26}{2018/07/14}{new attribute \texttt{beforecontents}} +% \item[\opt{beforecontents}:] code to be executed immediately before +% setting the contents. See also modification attribute +% \texttt{addbeforecontents}. +% \begin{macrocode} +\FamilyCSKey[.definelayer]{KOMAarg}{beforecontents} + {scr@l@\scr@current@layer @precontents@hook} +% \end{macrocode} +% \changes{v3.26}{2018/07/14}{new attribute \texttt{aftercontents}} +% \item[\opt{aftercontents}:] code to be executed immediately before +% setting the contents. See also modification attribute +% \texttt{addaftercontents}. +% \begin{macrocode} +\FamilyCSKey[.definelayer]{KOMAarg}{aftercontents} + {scr@l@\scr@current@layer @postcontents@hook} +% \end{macrocode} +% \changes{v3.26}{2018/07/14}{new attribute \texttt{artifact}} +% \item[\opt{artifact}:] reserved for tagging packages. The artifact can +% either be a boolean or a general value. Boolean false will unset the +% attribute. Boolean true is the same like empty. All other values will be +% stored. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{artifact}[true]{% + \FamilySetBool{KOMAarg}{artifact}{@tempswa}{#1}% + \ifx\FamilyKeyState\FamilyKeyStateProcessed + \if@tempswa + \expandafter\let\csname scr@l@\scr@current@layer @artifact\endcsname + \@empty + \else + \expandafter\let\csname scr@l@\scr@current@layer @artifact\endcsname + \relax + \fi + \else + \FamilyKeyStateProcessed + \@namedef{scr@l@\scr@current@layer @artifact}{#1}% + \fi +} +% \end{macrocode} +% \end{description} +% +% Attribute modifications are attributes, that modify existing basic +% attributes: +% \begin{description} +% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addhoffset}} +% \item[\texttt{addhoffset=\meta{dimension expression}}:] add to offset from +% the left edge of the paper. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{addhoffset}{% + \expandafter\edef\csname scr@l@\scr@current@layer @x\endcsname{% + \noexpand\dimexpr \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @x\endcsname + (#1)\relax}}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addvoffset}} +% \item[\texttt{addvoffset=\meta{dimension expression}}:] add to offset from +% the top edge of the paper. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{addvoffset}{% + \expandafter\edef\csname scr@l@\scr@current@layer @y\endcsname{% + \noexpand\dimexpr \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @y\endcsname + (#1)\relax}}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addwidth}} +% \item[\texttt{addwidth=\meta{dimension expression}}:] add to width of the +% layer. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{addwidth}{% + \expandafter\edef\csname scr@l@\scr@current@layer @w\endcsname{% + \noexpand\dimexpr \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @w\endcsname + (#1)\relax}}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addheight}} +% \item[\texttt{addheight=\meta{dimension expression}}:] add to height of the +% layer. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{addheight}{% + \expandafter\edef\csname scr@l@\scr@current@layer @h\endcsname{% + \noexpand\dimexpr \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @h\endcsname + (#1)\relax}}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{addcontents}} +% \item[\texttt{addcontents=\meta{output}}:] append to whatever should be +% printed by the layer. +% \changes{v3.14}{2014/10/20}{\texttt{contents} is \cs{long}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{addcontents}{% + \expandafter\edef\csname scr@l@\scr@current@layer @contents\endcsname{% + \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @contents\endcsname #1}}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \changes{v3.16}{2015/01/26}{new layer attribute \texttt{pretocontents}} +% \item[\texttt{pretocontents=\meta{output}}:] prefix whatever should be +% printed by the layer. +% \changes{v3.14}{2014/10/20}{\texttt{contents} is \cs{long}} +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{pretocontents}{% + \expandafter\edef\csname scr@l@\scr@current@layer @contents\endcsname{% + \unexpanded{#1}\unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @contents\endcsname}}% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \changes{v3.26}{2018/07/14}{new attribute \texttt{addbeforecontents}} +% \item[\opt{addbeforecontents}:] code to be executed immediately before +% setting the contents. The new code will be added before the old code. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{addbeforecontents}{% + \scr@ifundefinedorrelax{scr@l@\scr@current@layer @precontents@hook}{% + \expandafter\def + \csname scr@l@\scr@current@layer @precontents@hook\endcsname{#1}% + }{% + \expandafter\edef + \csname scr@l@\scr@current@layer @precontents@hook\endcsname{% + \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @precontents@hook\endcsname}% + \unexpanded{#1} + }% + }% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \changes{v3.26}{2018/07/14}{new attribute \texttt{addaftercontents}} +% \item[\opt{addaftercontents}:] code to be executed immediately before +% setting the contents. The new code will be added after the old code. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{addaftercontents}{% + \scr@ifundefinedorrelax{scr@l@\scr@current@layer @postcontents@hook}{% + \expandafter\def + \csname scr@l@\scr@current@layer @postcontents@hook\endcsname{#1}% + }{% + \expandafter\edef + \csname scr@l@\scr@current@layer @postcontents@hook\endcsname{% + \unexpanded{#1}% + \unexpanded\expandafter\expandafter\expandafter{% + \csname scr@l@\scr@current@layer @postcontents@hook\endcsname}% + }% + }% + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \end{description} +% +% Compounding attributes are attributes, that set up several basic attributes +% with a single compounding attribute: +% \begin{description} +% \item[\texttt{page}:] set up \texttt{hoffset}, \texttt{voffset}, +% \texttt{width}, and \texttt{height} to values spanning the whole +% page aligned by the default alignment \texttt{tl}. Note, that this +% attribute has no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{page}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{page}{#1}% + \def@scr@l@pos{\z@}{\z@}{\paperwidth}{\paperheight}% + \@namedef{scr@l@\scr@current@layer @align}{tl}% +} +% \end{macrocode} +% \item[\texttt{topmargin}:] set up \texttt{hoffset}, \texttt{voffset}, +% \texttt{width}, and \texttt{height} to values vertically spanning the top +% margin of the page and horizontally spanning the whole page aligned by the +% default alignment \texttt{tl}. Note, that this attribute has no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{topmargin}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{topmargin}{#1}% + \def@scr@l@pos{\z@}{\z@}{\paperwidth}{\dimexpr \topmargin+1in\relax}% + \@namedef{scr@l@\scr@current@layer @align}{tl}% +} +% \end{macrocode} +% \item[\texttt{head}:] set up \texttt{hoffset}, \texttt{voffset}, +% \texttt{width}, and \texttt{height} to values vertically spanning the page +% head and horizontally spanning the text area aligned by usual head +% alignment \texttt{bl}. Note, that this attribute has no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{head}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{head}{#1}% + \def@scr@l@pos{% + \dimexpr + \if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi + \else\oddsidemargin\fi + +1in + \relax + }{% + \dimexpr \topmargin+1in+\headheight\relax + }{\textwidth}{\headheight}% + \@namedef{scr@l@\scr@current@layer @align}{bl}% +} +% \end{macrocode} +% \item[\texttt{headsep}:] set up \texttt{hoffset}, \texttt{voffset}, +% \texttt{width}, and \texttt{height} to values vertically spanning the area +% between page head and text area and horizontally spanning the text area +% aligned by the default alignment \texttt{t}. Note, that this attribute +% has no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{headsep}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{head}{#1}% + \def@scr@l@pos{% + \dimexpr + \if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi + \else\oddsidemargin\fi + +1in + \relax + }{% + \dimexpr \topmargin+1in+\headheight\relax + }{\textwidth}{\headsep}% + \@namedef{scr@l@\scr@current@layer @align}{tl}% +} +% \end{macrocode} +% \item[\texttt{textarea}:] set up \texttt{hoffset}, \texttt{voffset}, +% \texttt{width}, and \texttt{height} to values spanning the text area of +% the page aligned by the default alignment \texttt{t}. Note, that this +% attribute has no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{textarea}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{textarea}{#1}% + \def@scr@l@pos{% + \dimexpr + \if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi + \else\oddsidemargin\fi + +1in + \relax + }{% + \dimexpr \topmargin+1in+\headheight+\headsep\relax + }{\textwidth}{\textheight}% + \@namedef{scr@l@\scr@current@layer @align}{tl}% +} +% \end{macrocode} +% \item[\texttt{foot}:] set up \texttt{hoffset}, \texttt{voffset}, +% \texttt{width}, and \texttt{height} to values vertically spanning the page +% footer and horizontally spanning the text area aligned by the usual footer +% alignment \texttt{t}. Note, that this attribute has no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{foot}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{foot}{#1}% + \def@scr@l@pos{% + \dimexpr + \if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi + \else\oddsidemargin\fi + +1in + \relax + }{% + \dimexpr \topmargin+1in+\headheight+\headsep+\textheight + +\footskip+\dp\strutbox-\footheight\relax + }{\textwidth}{\footheight}% + \@namedef{scr@l@\scr@current@layer @align}{tl}% +} +% \end{macrocode} +% \item[\texttt{footskip}:] set up \texttt{hoffset}, \texttt{voffset}, +% \texttt{width}, and \texttt{height} to values vertically spanning the +% distance from the text area to the page +% footer and horizontally spanning the text area aligned by the usual footer +% alignment \texttt{t}. Note, that this attribute has no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{footskip}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{foot}{#1}% + \def@scr@l@pos{% + \dimexpr + \if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi + \else\oddsidemargin\fi + +1in + \relax + }{% + \dimexpr \topmargin+1in+\headheight+\headsep+\textheight\relax + }{\textwidth}{\dimexpr\footskip+\dp\strutbox-\footheight\relax}% + \@namedef{scr@l@\scr@current@layer @align}{tl}% +} +% \end{macrocode} +% \item[\texttt{bottommargin}:] set up \texttt{hoffset}, \texttt{voffset}, +% \texttt{width}, and \texttt{height} to values vertically spanning the +% page's bottom margin below the footer and horizontally spanning the page +% by the default alignment \texttt{t}. Note, that this attribute has no +% value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{bottommargin}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{bottommargin}{#1}% + \def@scr@l@pos{\z@}{% + \dimexpr \topmargin+1in+\headheight+\headsep + +\textheight + +\footskip+\dp\strutbox\relax + }{\paperwidth}{\dimexpr\paperheight-\layeryoffset\relax}% + \@namedef{scr@l@\scr@current@layer @align}{tl}% +} +% \end{macrocode} +% \item[\texttt{leftmargin}:] set up \texttt{hoffset}, \texttt{voffset}, +% \texttt{width}, and \texttt{height} to values vertically spanning the page +% and horizontally spanning the left margin of the page by the default +% alignment \texttt{t}. Note, that this attribute has no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{leftmargin}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{leftmargin}{#1}% + \def@scr@l@pos{\z@}{\z@}{% + \dimexpr + \if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi + \else\oddsidemargin\fi + +1in + \relax + }{\paperheight}% + \@namedef{scr@l@\scr@current@layer @align}{tl}% +} +% \end{macrocode} +% \item[\texttt{rightmargin}:] set up \texttt{hoffset}, \texttt{voffset}, +% \texttt{width}, and \texttt{height} to values vertically spanning the page +% and horizontally spanning the right margin of the page by the default +% alignment \texttt{t}. Note, that this attribute has no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{rightmargin}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{rightmargin}{#1}% + \def@scr@l@pos{\paperwidth}{\z@}{% + \dimexpr \paperwidth-1in-\textwidth + -\if@twoside\ifodd\value{page}\oddsidemargin\else\evensidemargin\fi + \else\oddsidemargin\fi\relax + }{\paperheight}% + \@namedef{scr@l@\scr@current@layer @align}{tr}% +} +% \end{macrocode} +% \item[\texttt{innermargin}:] set up \texttt{hoffset}, \texttt{voffset}, +% \texttt{width}, and \texttt{height} to values vertically spanning the page +% and horizontally spanning the right margin of even pages and the left +% margin of odd pages by the default alignment \texttt{t}. See attributes +% \texttt{oddpage} and \texttt{evenpage} for more information about odd and +% even pages. Note, that this attribute has no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{innermargin}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{innermargin}{#1}% + \def@scr@l@pos{% + \if@twoside + \ifodd\value{page} \z@ + \else \dimexpr \evensidemargin+1in+\textwidth\relax + \fi + \else \z@\fi + }{\z@}{% + \dimexpr + \if@twoside\ifodd\value{page} \oddsidemargin+1in + \else \paperwidth-\layerxoffset\fi + \else \oddsidemargin+1in\fi + \relax + }{\paperheight}% + \@namedef{scr@l@\scr@current@layer @align}{tl}% +} +% \end{macrocode} +% \item[\texttt{outermargin}:] set up \texttt{hoffset}, \texttt{voffset}, +% \texttt{width}, and \texttt{height} to values vertically spanning the page +% and horizontally spanning the left margin of even pages and the right +% margin of odd pages by the default alignment \texttt{t}. See attributes +% \texttt{oddpage} and \texttt{evenpage} for more information about odd and +% even pages. Note, that this attribute has no value! +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{outermargin}[\relax]{% + \FamilyKeyStateProcessed + \scrlayer@testunexpectedarg{outermargin}{#1}% + \def@scr@l@pos{% + \dimexpr + \if@twoside\ifodd\value{page} \oddsidemargin+1in+\textwidth + \else \z@\fi + \else \oddsidemargin+1in+\textwidth\fi + \relax + }{\z@}{% + \dimexpr + \if@twoside\ifodd\value{page}\paperwidth-\layerxoffset + \else \evensidemargin+1in\fi + \else \paperwidth-\layerxoffset\fi + \relax + }{\paperheight}% + \@namedef{scr@l@\scr@current@layer @align}{tl}% +} +% \end{macrocode} +% \item[\texttt{area=\{\meta{hoffset}\}\{\meta{voffset}\} +% \{\meta{width}\}\{\meta{height}\}}:] set up +% \texttt{hoffset}, \texttt{voffset}, \texttt{width}, and \texttt{height} to +% the given values. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{area}{% + \def@scr@l@pos#1 + \FamilyKeyStateProcessed +} +% \end{macrocode} +% \changes{v3.26}{2018/07/14}{clone code for \texttt{precontents@hook}, +% \texttt{postcontents@hook} and \texttt{artifact} added}^^A +% \item[\texttt{clone=\meta{layer}}:] set up the new layer by the settings +% of the given \meta{layer}. +% \begin{macrocode} +\DefineFamilyKey[.definelayer]{KOMAarg}{clone}{% + \scr@ifundefinedorrelax{scr@l@#1@x}{% + \FamilyKeyStateUnknownValue + \PackageError{scrlayer}{layer `#1' undefined}{% + You can clone only already defined layers.\MessageBreak + If you'll continue, `clone=#1' will be ignored.% + }% + }{% + \FamilyKeyStateProcessed + \scrlayer@clone@attribute{\scr@current@layer}{#1}{mode}% + \scrlayer@clone@attribute{\scr@current@layer}{#1}{x}% + \scrlayer@clone@attribute{\scr@current@layer}{#1}{y}% + \scrlayer@clone@attribute{\scr@current@layer}{#1}{w}% + \scrlayer@clone@attribute{\scr@current@layer}{#1}{h}% + \scrlayer@clone@attribute{\scr@current@layer}{#1}{align}% + \scrlayer@clone@attribute{\scr@current@layer}{#1}{contents}% + \scrlayer@clone@switch{\scr@current@layer}{#1}{background}% + \scrlayer@clone@switch{\scr@current@layer}{#1}{foreground}% + \scrlayer@clone@switch{\scr@current@layer}{#1}{odd}% + \scrlayer@clone@switch{\scr@current@layer}{#1}{even}% + \scrlayer@clone@switch{\scr@current@layer}{#1}{oneside}% + \scrlayer@clone@switch{\scr@current@layer}{#1}{twoside}% + \scrlayer@clone@switch{\scr@current@layer}{#1}{floatpage}% + \scrlayer@clone@switch{\scr@current@layer}{#1}{nonfloatpage}% + \scrlayer@clone@attribute{\scr@current@layer}{#1}{precontents@hook}% + \scrlayer@clone@attribute{\scr@current@layer}{#1}{postcontents@hook}% + \scrlayer@clone@attribute{\scr@current@layer}{#1}{artifact}% + }% +} +% \end{macrocode} +% \begin{macro}{\scrlayer@clone@attribute} +% \begin{macro}{\scrlayer@clone@switch} +% Two helpers used at option \texttt{clone} to clone either a macro-based +% attribute or a if-based attribute. +% \begin{macrocode} +\newcommand*{\scrlayer@clone@attribute}[3]{% + \expandafter\let\csname scr@l@#1@#3\expandafter\endcsname + \csname scr@l@#2@#3\expandafter\endcsname +} +\newcommand*{\scrlayer@clone@switch}[3]{% + \expandafter\let\csname if@scr@l@#1@#3\expandafter\endcsname + \csname if@scr@l@#2@#3\expandafter\endcsname +} +% \end{macrocode} +% \end{macro}^^A \scrlayer@clone@switch +% \end{macro}^^A \scrlayer@clone@attribute +% \end{description} +% +% \changes{v0.9}{2014/08/31}{missing reset of \cs{scr@current@layer} added} +% \changes{v3.14}{2014/10/20}{\cs{long}} +% \begin{macrocode} +\newcommand{\DeclareLayer}[2][]{% + \def\scr@current@layer{#2}% + \@namedef{scr@l@#2@mode}{text}% + \@namedef{scr@l@#2@x}{\z@}% + \@namedef{scr@l@#2@y}{\z@}% + \@namedef{scr@l@#2@w}{\paperwidth}% + \@namedef{scr@l@#2@h}{\paperheight}% + \@namedef{scr@l@#2@align}{tl}% + \@namedef{scr@l@#2@contents}{}% + \expandafter\newif\csname if@scr@l@#2@background\endcsname + \csname @scr@l@#2@backgroundtrue\endcsname + \expandafter\newif\csname if@scr@l@#2@foreground\endcsname + \csname @scr@l@#2@foregroundtrue\endcsname + \expandafter\newif\csname if@scr@l@#2@odd\endcsname + \csname @scr@l@#2@oddtrue\endcsname + \expandafter\newif\csname if@scr@l@#2@even\endcsname + \csname @scr@l@#2@eventrue\endcsname + \expandafter\newif\csname if@scr@l@#2@oneside\endcsname + \csname @scr@l@#2@onesidetrue\endcsname + \expandafter\newif\csname if@scr@l@#2@twoside\endcsname + \csname @scr@l@#2@twosidetrue\endcsname + \expandafter\newif\csname if@scr@l@#2@floatpage\endcsname + \csname @scr@l@#2@floatpagetrue\endcsname + \expandafter\newif\csname if@scr@l@#2@nonfloatpage\endcsname + \csname @scr@l@#2@nonfloatpagetrue\endcsname + \FamilyExecuteOptions[.definelayer]{KOMAarg}{#1}% + \let\scr@current@layer\@empty +} +% \end{macrocode} +% \begin{macro}{\scr@current@layer} +% Helper to hold the current layer and only valid in non recursive calls of +% \cs{DeclareLayer}. +% \begin{macrocode} +\newcommand*{\scr@current@layer}{} +% +% \end{macrocode} +% \end{macro}^^A \scr@current@layer +% \end{command}^^A \DeclareLayer +% +% \begin{command}{\IfLayerExists} +% \begin{description} +% \item[\marg{string}:] the name of the layer (must be fully expandable +% and expand to a string only). +% \item[\marg{then code}:] will be executed, if the layer exists. +% \item[\marg{else code}:] will be executed, if the layer doesn't exist. +% \end{description} +% Note, that we don't known really whether or not a layer exists, but have a +% heuristic. +% \begin{macrocode} +%<*package&body> +\newcommand*{\IfLayerExists}[1]{% + \scr@ifundefinedorrelax{scr@l@#1@mode}{% + \expandafter\@secondoftwo + }{% + \expandafter\@firstoftwo + }% +} +% +% \end{macrocode} +% \end{command}^^A \IfLayerExists +% +% \begin{command}{\DeclareNewLayer,\ProvideLayer,\RedeclareLayer} +% \changes{v3.14}{2014/10/20}{\cs{long}} +% \begin{command}{\ModifyLayer} +% \changes{v3.14}{2014/10/20}{\cs{long}} +% \changes{v0.9}{2014/08/31}{missing definition and reset of +% \cs{scr@current@layer} added} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% There are also two commands for declaration of layers, that haven't been +% declared before, with or without error message for already declared layers, +% and two commands for changing already declared layers, first one beginning +% again from scratch, second one for only setting up attributes, that should +% be changed. +% \begin{macrocode} +%<*package&body> +\newcommand{\DeclareNewLayer}[2][]{% + \IfLayerExists{#2}{% + \PackageError{scrlayer}{layer `#2' already defined}{% + You may declare only layer, that haven't been declared previously + using\MessageBreak + \string\DeclareNewLayer. See also the alternatives + \string\RedeclareLayer,\MessageBreak + \string\ModifyLayer\space and \string\ProvideLayer.\MessageBreak + If you'll continue, declaration will be ignored.}% + }{\DeclareLayer[{#1}]{#2}}% +} +\newcommand{\ProvideLayer}[2][]{% + \IfLayerExists{#2}{% +%<*trace> + \PackageInfo{scrlayer}{\string\ProvideLayer{#2} ignored,\MessageBreak + because of already defined layer}% +% + }{\DeclareNewLayer[{#1}]{#2}}% +} +\newcommand{\RedeclareLayer}[2][]{% + \IfLayerExists{#2}{}{% + \PackageError{scrlayer}{layer `#2' not yet defined}{% + You may declare only already declared layers using + \string\RedeclareLayer.\MessageBreak + See also the alternatives + \string\DeclareLayer and \string\ProvideLayer.\MessageBreak + Nevertheless, if you'll continue, declaration will be done.}% + }% + \DeclareLayer[{#1}]{#2}% +} +\newcommand{\ModifyLayer}[2][]{% + \IfLayerExists{#2}{% + \def\scr@current@layer{#2}% + \edef\reserved@a{% + \unexpanded{% + \FamilyExecuteOptions[.definelayer]{KOMAarg}{#1}% + \Ifstr{\csname scr@l@#2@mode\endcsname}% + }{\csname scr@l@#2@mode\endcsname}% + }\reserved@a{}{% + \PackageWarning{scrlayer}{% + change of layer mode could result in unexpected\MessageBreak + output and errors% + }% + }% + \let\scr@current@layer\@empty + }{% + \PackageError{scrlayer}{layer `#2' not yet defined}{% + You may modify only already declared layers using + \string\ModifyLayer.\MessageBreak + See also the alternatives + \string\DeclareLayer and \string\ProvideLayer.\MessageBreak + Nevertheless, if you'll continue, declaration will be done.}% + \DeclareLayer[{#1}]{#2}% + }% +} +% +% \end{macrocode} +% \end{command}^^A \ModifyLayer +% \end{command}^^A \DeclareNewLayer,\ProvideLayer,\RedeclareLayer +% +% \begin{command}{\ModifyLayers} +% \changes{v3.26}{2018/07/14}{added} +% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added} +% Like \cs{ModifyLayer} but allows a list of layers instead of only one layer. +% For the commands \cs{DeclareLayer}, \cs{ProvideLayer} and +% \cs{RedeclareLayer} this does not make any sense, so there are not similar +% list commands for these commands. +% \begin{macrocode} +%<*package&body> +\newcommand{\ModifyLayers}[2][]{% + \edef\scr@current@layer{#2}% + \@for\scr@current@layer:=\scr@current@layer\do{% + \scr@trim@spaces\scr@current@layer + \ifx\scr@current@layer\@emtpy\else + \edef\scr@current@layer{% + \unexpanded{\ModifyLayer[{#1}]}{\scr@current@layer}% + }% + \scr@current@layer + \fi + }% + \let\scr@current@layer\@empty +} +% +% \end{macrocode} +% \end{command}^^A \ModifyLayers +% +% \begin{command}{\GetLayerContents} +% \changes{v3.16}{2015/01/26}{added} +% \begin{description} +% \item[\marg{string}:] the name of the layer +% \end{description} +% Get the contents of the given layer. +% \begin{macrocode} +%<*package&body> +\newcommand*{\GetLayerContents}[1]{% + \IfLayerExists{#1}{\@nameuse{scr@l@#1@contents}}{% + \PackageError{scrlayer}{unknown layer `#1'}{% + You can ask only for the contents of an existing layer.}% + }% +} +% +% \end{macrocode} +% \end{command} +% +% +% \begin{command}{\DestroyLayer} +% \changes{v3.26}{2018/07/14}{destroy pre-contents hook, post-contents hook +% and artifact} +% \begin{description} +% \item[\marg{string}:] the name of the layer, that should be +% destroyed +% \end{description} +% Note: Nothing will be done to remove the layer from a page style, but this +% shouldn't matter, because layers with, e.g., +% \cs{if@scr@l@\dots@nonfloatpage}=\cs{relax} and +% \cs{if@scr@l@\dots@floatpage}=\cs{relax} won't be output ever. This +% command could be used by interfaces via +% \cs{scrlayerOnAutoRemoveInterface} to remove the generated +% layers, if the interface commands wouldn't be depreacted. +% However, it only destroys existing layers and doesn't care for not +% existing. +% \begin{macrocode} +%<*package&body> +\newcommand*{\DestroyLayer}[1]{% + \IfLayerExists{#1}{% + \expandafter\let\csname scr@l@#1@mode\endcsname\relax + \expandafter\let\csname scr@l@#1@x\endcsname\relax + \expandafter\let\csname scr@l@#1@y\endcsname\relax + \expandafter\let\csname scr@l@#1@w\endcsname\relax + \expandafter\let\csname scr@l@#1@h\endcsname\relax + \expandafter\let\csname scr@l@#1@align\endcsname\relax + \expandafter\let\csname scr@l@#1@contents\endcsname\relax + \expandafter\let\csname if@scr@l@#1@background\endcsname\relax + \expandafter\let\csname @scr@l@#1@backgroundfalse\endcsname\relax + \expandafter\let\csname @scr@l@#1@backgroundtrue\endcsname\relax + \expandafter\let\csname if@scr@l@#1@foreground\endcsname\relax + \expandafter\let\csname @scr@l@#1@foregroundfalse\endcsname\relax + \expandafter\let\csname @scr@l@#1@foregroundtrue\endcsname\relax + \expandafter\let\csname if@scr@l@#1@odd\endcsname\relax + \expandafter\let\csname @scr@l@#1@oddfalse\endcsname\relax + \expandafter\let\csname @scr@l@#1@oddtrue\endcsname\relax + \expandafter\let\csname if@scr@l@#1@even\endcsname\relax + \expandafter\let\csname @scr@l@#1@evenfalse\endcsname\relax + \expandafter\let\csname @scr@l@#1@eventrue\endcsname\relax + \expandafter\let\csname if@scr@l@#1@oneside\endcsname\relax + \expandafter\let\csname @scr@l@#1@onesidefalse\endcsname\relax + \expandafter\let\csname @scr@l@#1@onesidetrue\endcsname\relax + \expandafter\let\csname if@scr@l@#1@twoside\endcsname\relax + \expandafter\let\csname @scr@l@#1@twosidefalse\endcsname\relax + \expandafter\let\csname @scr@l@#1@twosidetrue\endcsname\relax + \expandafter\let\csname if@scr@l@#1@floatpage\endcsname\relax + \expandafter\let\csname @scr@l@#1@floatpagefalse\endcsname\relax + \expandafter\let\csname @scr@l@#1@floatpagetrue\endcsname\relax + \expandafter\let\csname if@scr@l@#1@nonfloatpage\endcsname\relax + \expandafter\let\csname @scr@l@#1@nonfloatpagefalse\endcsname\relax + \expandafter\let\csname @scr@l@#1@nonfloatpagetrue\endcsname\relax + \expandafter\let\csname scr@l@#1@precontents@hook\relax + \expandafter\let\csname scr@l@#1@postcontents@hook\relax + \expandafter\let\csname scr@l@#1@artifact\relax + }{% +%<*trace> + \PackageInfo{scrlayer}{\string\DestroyLayer{#1} ignored,\MessageBreak + because that layer doesn't exist\MessageBreak + (any longer)% + }% +% + }% +} +% +% \end{macrocode} +% \end{command}^^A \DestroyLayer +% +% +% \begin{command}{\layercontentsmeasure} +% \changes{v3.19}{2015/07/27}{\cs{@gobble} eliminated} +% This may used by used as the only value of the layer option +% \texttt{contents} to show measure lines around the layer. The left and the +% top measure line will be in centimeter, the right and the bottom measure +% line in inch. With option \texttt{draft=true} this also be used +% automatically and additionally for every layer of a page style. +% \begin{macrocode} +%<*package&body> +\newcommand*{\layercontentsmeasure}{% + \smash{\begin{picture}(0,0) + (0,\LenToUnit{% + \if t\layervalign -\ht\strutbox + \else + \if b\layervalign -\dimexpr\layerheight-\dp\strutbox\relax + \else -.5\dimexpr\layerheight+\ht\strutbox-\dp\strutbox\relax + \fi + \fi}) +% \end{macrocode} +% 1st horizontal cm +% \begin{macrocode} + \setlength{\unitlength}{1mm}% + \put(0,0){\line(1,0){\LenToUnit{\layerwidth}}}% + \@tempcnta=\numexpr \dimexpr\layerwidth + .5mm\relax/\dimexpr 1mm\relax\relax + \multiput(0,0)(1,0){\@tempcnta}{% + \line(0,-1){1}% + }% + \@tempcnta=\numexpr \dimexpr\layerwidth + 2.5mm\relax/\dimexpr 5mm\relax\relax + \multiput(0,0)(5,0){\@tempcnta}{% + \line(0,-1){2}% + }% + \@tempcnta=\numexpr \dimexpr\layerwidth + .5cm\relax/\dimexpr 1cm\relax\relax + \multiput(0,0)(10,0){\@tempcnta}{% + \put(0,0){\line(0,-1){3}}% + \put(0,-3.5){% + \makebox(0,0)[ct]{\the\numexpr\@tempcnta-\@multicnt\relax}}% + }% +% \end{macrocode} +% 2nd horizontal in: +% \begin{macrocode} + \put(0,\LenToUnit{-\layerheight}){\line(1,0){\LenToUnit{\layerwidth}}}% + \@tempcnta=\numexpr \dimexpr\layerwidth + .05in\relax/\dimexpr .1in\relax\relax + \multiput(0,\LenToUnit{-\layerheight})(2.54,0){\@tempcnta}{% + \line(0,1){1}% + }% + \@tempcnta=\numexpr \dimexpr\layerwidth + .25in\relax/\dimexpr .5in\relax\relax + \multiput(0,\LenToUnit{-\layerheight})(12.7,0){\@tempcnta}{% + \line(0,1){2}% + }% + \@tempcnta=\numexpr \dimexpr\layerwidth + .5in\relax/\dimexpr 1in\relax\relax + \multiput(0,\LenToUnit{-\layerheight})(25.4,0){\@tempcnta}{% + \put(0,0){\line(0,1){3}}% + \put(0,3.5){% + \makebox(0,0)[cb]{\the\numexpr\@tempcnta-\@multicnt\relax}}% + }% +% \end{macrocode} +% 3rd vertical cm: +% \begin{macrocode} + \put(0,0){\line(0,-1){\LenToUnit{\layerheight}}}% + \@tempcnta\numexpr \dimexpr\layerheight + .5mm\relax/\dimexpr 1mm\relax\relax + \multiput(0,0)(0,-1){\@tempcnta}{% + \line(1,0){1}% + }% + \@tempcnta\numexpr \dimexpr\layerheight + 2.5mm\relax/\dimexpr 5mm\relax\relax + \multiput(0,0)(0,-5){\@tempcnta}{% + \line(1,0){2}% + }% + \@tempcnta\numexpr \dimexpr\layerheight + .5cm\relax/\dimexpr 1cm\relax\relax + \multiput(0,0)(0,-10){\@tempcnta}{% + \put(0,0){\line(1,0){3}}% + \put(3.5,0){% + \makebox(0,0)[cl]{\the\numexpr\@tempcnta-\@multicnt\relax}}% + }% +% \end{macrocode} +% 4th vertical in: +% \begin{macrocode} + \put(\LenToUnit{\layerwidth},0){\line(0,-1){\LenToUnit{\layerheight}}}% + \@tempcnta\numexpr \dimexpr\layerheight + .05in\relax/\dimexpr .1in\relax\relax + \multiput(\LenToUnit{\layerwidth},0)(0,-2.54){\@tempcnta}{% + \line(-1,0){1}% + }% + \@tempcnta\numexpr \dimexpr\layerheight + .25in\relax/\dimexpr .5in\relax\relax + \multiput(\LenToUnit{\layerwidth},0)(0,-12.7){\@tempcnta}{% + \line(-1,0){2}% + }% + \@tempcnta\numexpr \dimexpr\layerheight + .5in\relax/\dimexpr 1in\relax\relax + \multiput(\LenToUnit{\layerwidth},0)(0,-25.4){\@tempcnta}{% + \put(0,0){\line(-1,0){3}}% + \put(-3.5,0){% + \makebox(0,0)[cr]{\the\numexpr\@tempcnta-\@multicnt\relax}}% + }% + \end{picture}}% +} +% \end{macrocode} +% \begin{command}{\LenToUnit} +% \changes{v3.19}{2015/07/27}{added} +% Due to an incompatibility of package \textsf{curve2e} I've eliminated +% \cs{@gobble} in the definition of \cs{layercontentsmeasure} and replaced it +% sometimes by \cs{LenToUnit} with the (not long) definition suggested by +% \textsf{curve2e} itself. +% \begin{macrocode} +\providecommand*{\LenToUnit}[1]{\strip@pt\dimexpr#1*\p@/\unitlength} +% +% \end{macrocode} +% \end{command}^^A \LenToUnit +% \end{command}^^A \layercontentsmeasure +% +% +% \subsection{Providing Page Styles} +% +% Page styles in \LaTeX{} consist of the elements: +% \begin{itemize} +% \item a header for odd pages, +% \item a header for even pages, +% \item a footer for odd pages, +% \item a footer for even pages, +% \end{itemize} +% and some optional additional commands, that will be expanded, whenever the +% page style will be activated. Note, that header and footer for even pages +% will be used only at two-sided mode. At one-sided mode the header and footer +% for odd pages will be used for all pages. +% +% With package \pkg*{scrlayer} layers will be linked to package styles and +% expanded at the four elements above. Background layers will expand only +% at the headers. Foreground layers will expand only at the +% footers. Layers, that haven't been restricted to background or foreground, +% will expand at both, page headers and page footers. +% +% Similar to the expansion of background and foreground layers, odd page +% layers will only expand in the headers or footers of odd pages and even page +% layers will only expand in the headers or footers of even pages. Layers, +% that haven't been restricted to odd or even pages, will expand in the +% headers or footers of odd pages and also in the headers or footers of even +% pages. +% +% One step more: Single-side layers will only expand in the headers or footers +% of pages in single-side layouts and two-side layers only in the headers or +% footers of pages in two-side layout. +% +% One more step: float page layers will only expand in the headers or footers +% of pages, that consists of page floats only, while non-float page layers +% will only expand in the headers of footers of pages, that doesn't have page +% floats. +% +% \begin{length}{\footheight} +% For the header \LaTeX{} already defines a length \len{headheight} to be +% the maximum height of the header. But for footer it only defines the +% distance of the baseline of the footer from the last baseline of the text +% area. \pkg*{scrlayer} changes this and also defines a new length +% \len{footheight}. This length will be initialised with magic value +% -12345\,sp. But if it is still that magic value at +% \cs{begin}\texttt\{\env{document}\texttt\} it will be reset to the value of +% \len{baselineskip}. +% \begin{macrocode} +%<*package&init> +\@ifundefined{footheight}{% + \newlength{\footheight}% + \setlength{\footheight}{-12345sp}% +}{% +%<*trace> + \PackageInfo{scrlayer}{Using already defined \string\footheight\MessageBreak + hoping, that this is a length and\MessageBreak + not only a macro}% +% +} +\AtBeginDocument{% + \ifdim\footheight=-12345sp +%<*trace> + \PackageInfo{scrlayer}{Setting magic \string\footheight\space to + \string\baselineskip\space while\MessageBreak + \string\begin{document}}% +% + \setlength{\footheight}{\baselineskip} + \fi +} +% +% \end{macrocode} +% \end{length}^^A \footheight +% +% +% Several of the following commands use \meta{key}=\meta{value} arguments. So +% we define a family with a new member: +% \begin{macrocode} +%<*package&body> +\DefineFamily{KOMAarg} +\DefineFamilyMember[.definelayerpagestyle]{KOMAarg} +% +% \end{macrocode} +% +% \begin{command}{\DeclarePageStyleByLayers} +% \begin{description} +% \item[\oarg{option list}:] comma separated list of named page +% style options (see below). +% \item[\marg{string}:] the name of the page style to be declared (must +% be expandable and result in a string). +% \item[\marg{string list}:] comma separated list of layer names (must +% be expandable and result in strings); first in the list will be added +% first. +% \end{description} +% Page styles may be declared using this command. It has one optional and +% two mandatory arguments. The first mandatory one is the name of the page +% style and the second one is a list of layers to be used for this page +% style. The page style itself will expand all background layers for odd +% pages in \cs{@oddhead}, all background layers for even pages on +% \cs{@evenhead}, all foreground layers for odd pages in \cs{@oddfoot}, and +% all foreground layers for even pages in \cs{@evenfoot}. This may be +% restricted by additional attributes, e.g., \opt{oneside} and +% \opt{twoside}. +% +% The optional argument may be used to define hooks. There are six named +% optional arguments to set up six hooks. And there are also \KOMAScript{} +% options for these, to define global pre-definitions. Note, that you may +% remove the global pre-definitions by emptying the local hooks. The local +% argument are named similar, but without ``\texttt{ps}'' after +% ``\texttt{on}''. +% \begin{option}{onselect} +% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}} +% \begin{option}{onpsselect} +% \begin{macro}{\@ps@initialhook} +% \begin{description} +% \item[\texttt{=\meta{code}}:] executes \meta{code} whenever the +% page style will be selected, e.g. using \cs{pagestyle} or +% \cs{thispagestyle} or the low level command defining the page +% style itself. +% \end{description} +% \begin{macrocode} +%<*options> +\KOMA@key{onpsselect}{% + \l@addto@macro{\@ps@initialhook}{#1}% + \FamilyKeyStateProcessed + \KOMA@kav@add{.scrlayer.sty}{onpsselect}{#1}% +} +%\scrlayer@@add@inherited@option{onpsselect} +%\newcommand*{\@ps@initialhook}{} +%\KOMA@kav@add{.scrlayer.sty}{onpsselect}{} +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsselect\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsselect@default\endcsname\relax +% +%<*package&body> +\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onselect}{% + \expandafter\l@addto@macro + \csname @ps@\scrlayer@current@pagestyle @initialhook\endcsname + {#1}% + \let\scr@opt@marker@initialhook\FamilyKeyStateProcssed + \FamilyKeyStateProcessed +} +% +% \end{macrocode} +% \end{macro}^^A \@ps@initialhook +% \end{option}^^A onpsselect +% \begin{option}{onpsinit} +% \begin{macro}{\@ps@hook} +% \begin{description} +% \item[\texttt{=\meta{code}}:] executes \meta{code} whenever the +% output of a layer stack is initialised. Note, that \meta{code} must not +% result in any page output. Otherwise the output of the layer stack will be +% broken! +% \end{description} +% \begin{macrocode} +%<*options> +\KOMA@key{onpsinit}{% + \l@addto@macro{\@ps@hook}{#1}% + \FamilyKeyStateProcessed + \KOMA@kav@add{.scrlayer.sty}{onpsinit}{#1}% +} +%\scrlayer@@add@inherited@option{onpsinit} +%\newcommand*{\@ps@hook}{} +%\KOMA@kav@add{.scrlayer.sty}{onpsinit}{} +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsinit\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsinit@default\endcsname\relax +% +%<*package&body> +\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{oninit}{% + \expandafter\l@addto@macro + \csname @ps@\scrlayer@current@pagestyle @hook\endcsname + {#1}% + \let\scr@opt@marker@hook\FamilyKeyStateProcssed + \FamilyKeyStateProcessed +} +% +% \end{macrocode} +% \end{macro}^^A \@ps@hook +% \end{option}^^A onpsinit +% \end{option}^^A oninit +% \begin{option}{ononeside} +% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}} +% \begin{option}{onpsoneside} +% \begin{macro}{\@ps@onesidehook} +% \begin{description} +% \item[\opt{=\meta{code}}:] executes \meta{code} after +% \opt{oninit}'s \meta{code} whenever the output of a layer stack of a +% page in single-side layout is initialised. Note, that \meta{code} must not +% result in any page output. Otherwise the output of the layer stack will be +% broken! +% \end{description} +% \begin{macrocode} +%<*options> +\KOMA@key{onpsoneside}{% + \l@addto@macro{\@ps@onesidehook}{#1}% + \FamilyKeyStateProcessed + \KOMA@kav@add{.scrlayer.sty}{onpsoneside}{#1}% +} +%\scrlayer@@add@inherited@option{onpsoneside} +%\newcommand*{\@ps@onesidehook}{} +%\KOMA@kav@add{.scrlayer.sty}{onpsoneside}{} +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsoneside\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsoneside@default\endcsname\relax +% +%<*package&body> +\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{ononeside}{% + \expandafter\l@addto@macro + \csname @ps@\scrlayer@current@pagestyle @onesidehook\endcsname + {#1}% + \let\scr@opt@marker@onesidehook\FamilyKeyStateProcssed + \FamilyKeyStateProcessed +} +% +% \end{macrocode} +% \end{macro}^^A \@ps@onesidehook +% \end{option}^^A onpsoneside +% \end{option}^^A ononeside +% \begin{option}{ontwoside} +% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}} +% \begin{option}{onpstwoside} +% \begin{macro}{\@ps@twosidehook} +% \begin{description} +% \item[\opt{=\meta{code}}:] executes \meta{code} after +% \opt{oninit}'s \meta{code} whenever the output of a layer stack of a +% page in two-side layout is initialised. Note, that \meta{code} must not +% result in any page output. Otherwise the output of the layer stack will be +% broken! +% \end{description} +% \begin{macrocode} +%<*options> +\KOMA@key{onpstwoside}{% + \l@addto@macro{\@ps@twosidehook}{#1}% + \FamilyKeyStateProcessed + \KOMA@kav@add{.scrlayer.sty}{onpstwoside}{#1}% +} +%\scrlayer@@add@inherited@option{onpstwoside} +%\newcommand*{\@ps@twosidehook}{} +%\KOMA@kav@add{.scrlayer.sty}{onpstwoside}{} +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpstwoside\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpstwoside@default\endcsname\relax +% +%<*package&body> +\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{ontwoside}{% + \expandafter\l@addto@macro + \csname @ps@\scrlayer@current@pagestyle @twosidehook\endcsname + {#1}% + \let\scr@opt@marker@twosidehook\FamilyKeyStateProcssed + \FamilyKeyStateProcessed +} +% +% \end{macrocode} +% \end{macro}^^A \@ps@twosidehook +% \end{option}^^A onpstwoside +% \end{option}^^A ontwoside +% \begin{option}{onoddpage} +% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}} +% \begin{option}{onpsoddpage} +% \begin{macro}{\@ps@oddpagehook} +% \begin{description} +% \item[\texttt{=\meta{code}}:] executes \meta{code} after +% \opt{ononeside}'s or \opt{ontwoside}'s \meta{code} whenever the +% output of a layer stack of an odd page is initialised. Note, that +% \meta{code} must not result in any page output. Otherwise the output of +% the layer stack will be broken! +% \end{description} +% \begin{macrocode} +%<*options> +\KOMA@key{onpsoddpage}{% + \l@addto@macro{\@ps@oddpagehook}{#1}% + \FamilyKeyStateProcessed + \KOMA@kav@add{.scrlayer.sty}{onpsoddpage}{#1}% +} +%\scrlayer@@add@inherited@option{onpsoddpage} +%\newcommand*{\@ps@oddpagehook}{} +%\KOMA@kav@add{.scrlayer.sty}{onpsoddpage}{} +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsoddpage\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsoddpage@default\endcsname\relax +% +%<*package&body> +\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onoddpage}{% + \expandafter\l@addto@macro + \csname @ps@\scrlayer@current@pagestyle @oddpagehook\endcsname + {#1}% + \let\scr@opt@marker@oddpagehook\FamilyKeyStateProcssed + \FamilyKeyStateProcessed +} +% +% \end{macrocode} +% \end{macro}^^A \@ps@oddpagehook +% \end{option}^^A onpsoddpage +% \end{option}^^A onoddside +% \begin{option}{onevenpage} +% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}} +% \begin{option}{onpsevenpage} +% \begin{macro}{\@ps@evenpagehook} +% \begin{description} +% \item[\texttt{=\meta{code}}:] executes \meta{code} after +% \opt{ononeside}'s or \opt{ontwoside}'s \meta{code} whenever the +% output of a layer stack of an even page is initialised. Note, that +% \meta{code} must not result in any page output. Otherwise the output of +% the layer stack will be broken! +% \end{description} +% \begin{macrocode} +%<*options> +\KOMA@key{onpsevenpage}{% + \l@addto@macro{\@ps@evenpagehook}{#1}% + \FamilyKeyStateProcessed + \KOMA@kav@add{.scrlayer.sty}{onpsevenpage}{#1}% +} +%\scrlayer@@add@inherited@option{onpsevenpage} +%\newcommand*{\@ps@evenpagehook}{} +%\KOMA@kav@add{.scrlayer.sty}{onpsevenpage}{} +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsevenpage\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsevenpage@default\endcsname\relax +% +%<*package&body> +\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onevenpage}{% + \expandafter\l@addto@macro + \csname @ps@\scrlayer@current@pagestyle @evenpagehook\endcsname + {#1}% + \let\scr@opt@marker@evenpagehook\FamilyKeyStateProcssed + \FamilyKeyStateProcessed +} +% +% \end{macrocode} +% \end{macro}^^A \@ps@evenpagehook +% \end{option}^^A onpsevenpage +% \end{option}^^A onevenside +% \begin{option}{onfloatpage} +% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}} +% \begin{option}{onpsfloatpage} +% \begin{macro}{\@ps@floatpagehook} +% \begin{description} +% \item[\opt{=\meta{code}}:] executes \meta{code} after +% \opt{onoddpage}'s or \opt{onevenpage}'s \meta{code} whenever a float +% column has been made (usually those pages are float pages). +% \end{description} +% \begin{macrocode} +%<*options> +\KOMA@key{onpsfloatpage}{% + \l@addto@macro{\@ps@floatpagehook}{#1}% + \FamilyKeyStateProcessed + \KOMA@kav@add{.scrlayer.sty}{onpsfloatpage}{#1}% +} +%\scrlayer@@add@inherited@option{onpsfloatpage} +%\newcommand*{\@ps@floatpagehook}{} +%\KOMA@kav@add{.scrlayer.sty}{onpsfloatpage}{} +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsfloatpage\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsfloatpage@default\endcsname\relax +% +%<*package&body> +\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onfloatpage}{% + \expandafter\l@addto@macro + \csname @ps@\scrlayer@current@pagestyle @floatpagehook\endcsname + {#1}% + \let\scr@opt@marker@floatpagehook\FamilyKeyStateProcssed + \FamilyKeyStateProcessed +} +% +% \end{macrocode} +% \end{macro}^^A \@ps@floatpagehook +% \end{option}^^A onpsfloatpage +% \end{option}^^A onfloatpage +% \begin{option}{onnonfloatpage} +% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}} +% \begin{option}{onpsnonfloatpage} +% \begin{macro}{\@ps@nonfloatpagehook} +% \begin{description} +% \item[\opt{=\meta{code}}:] executes \meta{code} after +% \opt{onoddpage}'s or \opt{onevenpage}'s \meta{code} whenever no +% float column has been made (usually those pages aren't float pages). +% \end{description} +% \begin{macrocode} +%<*options> +\KOMA@key{onpsnonfloatpage}{% + \l@addto@macro{\@ps@nonfloatpagehook}{#1}% + \FamilyKeyStateProcessed + \KOMA@kav@add{.scrlayer.sty}{onpsnonfloatpage}{#1}% +} +%\scrlayer@@add@inherited@option{onpsnonfloatpage} +%\newcommand*{\@ps@nonfloatpagehook}{} +%\KOMA@kav@add{.scrlayer.sty}{onpsnonfloatpage}{} +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsnonfloatpage\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsnonfloatpage@default\endcsname\relax +% +%<*package&body> +\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onnonfloatpage}{% + \expandafter\l@addto@macro + \csname @ps@\scrlayer@current@pagestyle @nonfloatpagehook\endcsname + {#1}% + \let\scr@opt@marker@nonfloatpagehook\FamilyKeyStateProcssed + \FamilyKeyStateProcessed +} +% +% \end{macrocode} +% \end{macro}^^A \@ps@nonfloatpagehook +% \end{option}^^A onpsnonfloatpage +% \end{option}^^A onnonfloatpage +% \begin{option}{onbackground} +% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}} +% \begin{option}{onpsbackground} +% \begin{macro}{\@ps@backgroundhook} +% \begin{description} +% \item[\texttt{=\meta{code}}:] executes \meta{code} after +% \opt{onfloatpage}'s or \opt{onnonfloatpage}'s \meta{code} whenever +% the output of a background layer stack is initialised. Note, that +% \meta{code} must not result in any page output. Otherwise the output of +% the layer stack will be broken! +% \end{description} +% \begin{macrocode} +%<*options> +\KOMA@key{onpsbackground}{% + \l@addto@macro{\@ps@backgroundhook}{#1}% + \FamilyKeyStateProcessed + \KOMA@kav@add{.scrlayer.sty}{onpsbackground}{#1}% +} +%\scrlayer@@add@inherited@option{onpsbackground} +%\newcommand*{\@ps@backgroundhook}{} +%\KOMA@kav@add{.scrlayer.sty}{onpsbackground}{} +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsbackground\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsbackground@default\endcsname\relax +% +%<*package&body> +\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onbackground}{% + \expandafter\l@addto@macro + \csname @ps@\scrlayer@current@pagestyle @backgroundhook\endcsname + {#1}% + \let\scr@opt@marker@backgroundhook\FamilyKeyStateProcssed + \FamilyKeyStateProcessed +} +% +% \end{macrocode} +% \end{macro}^^A \@ps@backgroundhook +% \end{option}^^A onbackground +% \end{option}^^A onbackground +% \begin{option}{onforeground} +% \changes{v3.28}{2019/11/28}{marker for \cs{ModifyLayerPageStyleOptions}} +% \begin{option}{onpsforeground} +% \begin{macro}{\@ps@foregroundhook} +% \begin{description} +% \item[\texttt{=\meta{code}}:] executes \meta{code} after +% \opt{onfloatpage}'s or \opt{onnonfloatpage}'s \meta{code} whenever +% the output of a foreground layer stack is initialised. Note, that +% \meta{code} must not result in any page output. Otherwise the output of +% the layer stack will be broken! +% \end{description} +% \begin{macrocode} +%<*options> +\KOMA@key{onpsforeground}{% + \l@addto@macro{\@ps@foregroundhook}{#1}% + \FamilyKeyStateProcessed + \KOMA@kav@add{.scrlayer.sty}{onpsforeground}{#1}% +} +%\scrlayer@@add@inherited@option{onpsforeground} +%\newcommand*{\@ps@foregroundhook}{} +%\KOMA@kav@add{.scrlayer.sty}{onpsforeground}{} +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsforeground\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @onpsforeground@default\endcsname\relax +% +%<*package&body> +\DefineFamilyKey[.definelayerpagestyle]{KOMAarg}{onforeground}{% + \expandafter\l@addto@macro + \csname @ps@\scrlayer@current@pagestyle @foregroundhook\endcsname + {#1}% + \let\scr@opt@marker@foregroundhook\FamilyKeyStateProcssed + \FamilyKeyStateProcessed +} +% +% \end{macrocode} +% \end{macro}^^A \@psforegroundhook +% \end{option}^^A onpsforeground +% \end{option}^^A onforeground +% \begin{option}{singlespacing} +% \changes{v3.24}{2017/05/22}{added} +% \begin{description} +% \item[\texttt{=\meta{simple switch}}:] if activated, all page styles will be +% set with line spread 1. This switch is global. If you want it for some +% styles only, add \cs{linespread}|{1}|\cs{selectfont} to +% option \opt{oninit} of only those styles. +%\end{description} +% \begin{macrocode} +%<*options> +\KOMA@ifkey{singlespacing}{@ps@singlespacing} +%\scrlayer@@add@inherited@option{singlespacing} +% +% \end{macrocode} +% \end{option} +% \begin{macrocode} +%<*package&body> +\newcommand*{\DeclarePageStyleByLayers}[3][]{% + \edef\scrlayer@current@pagestyle{\GetRealPageStyle{#2}}% + \expandafter\scrlayer@declare@ps@by@layers\expandafter{% + \scrlayer@current@pagestyle + }{#1}{#3}% +} +% \end{macrocode} +% \begin{macro}{\scrlayer@declare@ps@by@layers} +% \changes{v3.15}{2014/12/28}{fix: \cs{linewidth} replaced by +% \cs{textwidth}} +% \changes{v3.18}{2015/06/09}{usage of \cs{parbox[b]} instead of +% \cs{parbox[t]} because of strange effect with package +% \textsf{multicol}} +% \changes{v3.24}{2017/05/22}{test for \cs{if@ps@singlespacing} added} +% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% Needed, because of page style aliases. Same arguments like +% \cs{DeclarePageStyleByLayers} but, \#1 is the name of the page style, \#2 is +% the list of options and \#3 is still the list of layers. +% \begin{macrocode} +\newcommand*{\scrlayer@declare@ps@by@layers}[3]{% + \@namedef{@ps@#1@initialhook}{\@ps@initialhook}% + \@namedef{@ps@#1@hook}{\@ps@hook}% + \@namedef{@ps@#1@backgroundhook}{\@ps@backgroundhook}% + \@namedef{@ps@#1@foregroundhook}{\@ps@foregroundhook}% + \@namedef{@ps@#1@oddpagehook}{\@ps@oddpagehook}% + \@namedef{@ps@#1@evenpagehook}{\@ps@evenpagehook}% + \@namedef{@ps@#1@onesidehook}{\@ps@onesidehook}% + \@namedef{@ps@#1@twosidehook}{\@ps@twosidehook}% + \@namedef{@ps@#1@floatpagehook}{\@ps@floatpagehook}% + \@namedef{@ps@#1@nonfloatpagehook}{\@ps@nonfloatpagehook}% + \FamilyExecuteOptions[.definelayerpagestyle]{KOMAarg}{#2}% + \@namedef{ps@#1}{% + \renewcommand*{\currentpagestyle}{#1}% + \@nameuse{@ps@@everystyle@@initialhook}% + \@nameuse{@ps@#1@initialhook}% + \renewcommand*{\currentpagestyle}{#1}% + \renewcommand*{\@oddhead}{% + \begingroup + \let\headmark\rightmark + \if@ps@singlespacing\linespread{1}\selectfont\fi + \@nameuse{@ps@@everystyle@@hook}% + \@nameuse{@ps@#1@hook}% + \@nameuse{@ps@@everystyle@@\if@twoside two\else one\fi sidehook}% + \@nameuse{@ps@#1@\if@twoside two\else one\fi sidehook}% + \@nameuse{@ps@@everystyle@@oddpagehook}% + \@nameuse{@ps@#1@oddpagehook}% + \@nameuse{@ps@@everystyle@@\if@fcolmade\else non\fi floatpagehook}% + \@nameuse{@ps@#1@\if@fcolmade\else non\fi floatpagehook}% + \@nameuse{@ps@@everystyle@@backgroundhook}% + \@nameuse{@ps@#1@backgroundhook}% + \parbox[b][\headheight][t]{\textwidth}{% + \vskip \dimexpr -\topmargin-1in + -\ht\strutbox\relax + \hskip \dimexpr -\oddsidemargin-1in\relax + \strut\makebox[\z@][l]{% + \ForEachLayerOfPageStyle{@everystyle@}{% + \scrlayer@do@page@style@element@layer{background}{odd}% + {########1}% + }% + \ForEachLayerOfPageStyle{#1}{% + \scrlayer@do@page@style@element@layer{background}{odd}% + {########1}% + }% + }% + }% + \endgroup + }% + \renewcommand*{\@evenhead}{% + \begingroup + \let\headmark\leftmark + \if@ps@singlespacing\linespread{1}\selectfont\fi + \@nameuse{@ps@@everystyle@@hook}% + \@nameuse{@ps@#1@hook}% + \@nameuse{@ps@@everystyle@@twosidehook}% + \@nameuse{@ps@#1@twosidehook}% + \@nameuse{@ps@@everystyle@@evenpagehook}% + \@nameuse{@ps@#1@evenpagehook}% + \@nameuse{@ps@@everystyle@@\if@fcolmade\else non\fi floatpagehook}% + \@nameuse{@ps@#1@\if@fcolmade\else non\fi floatpagehook}% + \@nameuse{@ps@@everystyle@@backgroundhook}% + \@nameuse{@ps@#1@backgroundhook}% + \parbox[b][\headheight][t]{\textwidth}{% + \vskip \dimexpr -\topmargin-1in + -\ht\strutbox\relax + \hskip \dimexpr-\evensidemargin-1in\relax + \strut\makebox[\z@][l]{% + \ForEachLayerOfPageStyle{@everystyle@}{% + \scrlayer@do@page@style@element@layer{background}{even}% + {########1}% + }% + \ForEachLayerOfPageStyle{#1}{% + \scrlayer@do@page@style@element@layer{background}{even}% + {########1}% + }% + }% + }% + \endgroup + }% + \renewcommand*{\@oddfoot}{% + \begingroup + \let\headmark\rightmark + \if@ps@singlespacing\linespread{1}\selectfont\fi + \@nameuse{@ps@@everystyle@@hook}% + \@nameuse{@ps@#1@hook}% + \@nameuse{@ps@@everystyle@@\if@twoside two\else one\fi sidehook}% + \@nameuse{@ps@#1@\if@twoside two\else one\fi sidehook}% + \@nameuse{@ps@@everystyle@@oddpagehook}% + \@nameuse{@ps@#1@oddpagehook}% + \@nameuse{@ps@@everystyle@@\if@fcolmade\else non\fi floatpagehook}% + \@nameuse{@ps@#1@\if@fcolmade\else non\fi floatpagehook}% + \@nameuse{@ps@@everystyle@@foregroundhook}% + \@nameuse{@ps@#1@foregroundhook}% + \parbox[t][\headheight][t]{\textwidth}{% + \vskip \dimexpr -\topmargin-1in + -\headheight + -\headsep + -\textheight + -\footskip + -\ht\strutbox\relax + \hskip \dimexpr -\oddsidemargin-1in\relax + \strut\makebox[\z@][l]{% + \ForEachLayerOfPageStyle{@everystyle@}{% + \scrlayer@do@page@style@element@layer{foreground}{odd}% + {########1}% + }% + \ForEachLayerOfPageStyle{#1}{% + \scrlayer@do@page@style@element@layer{foreground}{odd}% + {########1}% + }% + }% + }% + \endgroup + }% + \renewcommand*{\@evenfoot}{% + \begingroup + \let\headmark\leftmark + \if@ps@singlespacing\linespread{1}\selectfont\fi + \@nameuse{@ps@@everystyle@@hook}% + \@nameuse{@ps@#1@hook}% + \@nameuse{@ps@@everystyle@@twosidehook}% + \@nameuse{@ps@#1@twosidehook}% + \@nameuse{@ps@@everystyle@@evenpagehook}% + \@nameuse{@ps@#1@evenpagehook}% + \@nameuse{@ps@@everystyle@@\if@fcolmade\else non\fi floatpagehook}% + \@nameuse{@ps@#1@\if@fcolmade\else non\fi floatpagehook}% + \@nameuse{@ps@@everystyle@@foregroundhook}% + \@nameuse{@ps@#1@foregroundhook}% + \parbox[t][\headheight][t]{\textwidth}{% + \vskip \dimexpr -\topmargin-1in + -\headheight + -\headsep + -\textheight + -\footskip + -\ht\strutbox\relax + \hskip \dimexpr-\evensidemargin-1in\relax + \strut\makebox[\z@][l]{% + \ForEachLayerOfPageStyle{@everystyle@}{% + \scrlayer@do@page@style@element@layer{foreground}{even}% + {########1}% + }% + \ForEachLayerOfPageStyle{#1}{% + \scrlayer@do@page@style@element@layer{foreground}{even}% + {########1}% + }% + }% + }% + \endgroup + }% + }% + \@namedef{@ps@#1@layers}{}% + \@for \reserved@a:=#3\do {% + \scr@trim@spaces\reserved@a + \Ifstr\reserved@a\@empty{}{% + \expandafter\@cons\csname @ps@#1@layers\endcsname{{\reserved@a}}% + }% + }% +} +% +% \end{macrocode} +% \end{macro}^^A \scrlayer@declare@ps@by@layers +% +% \begin{command}{\ForEachLayerOfPageStyle} +% \changes{v3.18}{2015/05/14}{star version of the command} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} durch \cs{kernel@ifstar} +% ersetzt} +% \begin{description} +% \item[\marg{string}:] a valid page style (must be fully expandable +% and expand to the name of a existing page style); note, that currently +% no exists test will be done. +% \item[\marg{code}:] any macro definition body with usage of at most +% one argument (\texttt{\#1}), that will be replaced by the layer's name +% \end{description} +% Do the given \meta{code} for each layer of the page style +% \meta{string}. Note, that the expansion of \meta{code} will be done inside +% a group. There's also a star version of the command, that delays execution +% of \meta{code} after the end of the group. +% \begin{macrocode} +%<*package&body> +\newcommand*{\ForEachLayerOfPageStyle}{% + \kernel@ifstar {\@s@ForEachLayerOfPageStyle}{\@ForEachLayerOfPageStyle}% +} +\newcommand*{\@ForEachLayerOfPageStyle}[2]{% + \begingroup + \edef\reserved@a{\GetRealPageStyle{#1}}% + \def\@elt##1{\ifscrlayer@deactivate@layers\else #2\fi}% + \@nameuse{@ps@\reserved@a @layers}% + \endgroup +} +\newcommand*{\@s@ForEachLayerOfPageStyle}[2]{% + \begingroup + \edef\reserved@a{\GetRealPageStyle{#1}}% + \def\reserved@b{\endgroup}% + \def\@elt##1{% + \l@addto@macro\reserved@b{% + \ifscrlayer@deactivate@layers\else #2\fi + }% + }% + \@nameuse{@ps@\reserved@a @layers}% + \reserved@b +} +% +% \end{macrocode} +% \begin{option}{deactivatepagestylelayers} +% \begin{macro}{\ifscrlayer@deactivate@layers} +% \begin{description} +% \item[\marg{simple switch}:] whether or not +% \cs{ForEachLayerOfPageStyle} should ignore the layers. +% \end{description} +% This is a global \KOMAScript{} options. Several other definitions and at +% least the usage of the page style will ignore the layers if +% \cs{ForEachLayerOfPageStyle} ignores them. So this is something like: +% hide the layers. It may also be useful inside the code for the hooks +% described above, because hooks may used to deactivate the layers with this +% option too. +% \begin{macrocode} +%<*options> +%<*package> +\KOMA@ifkey{deactivatepagestylelayers}{scrlayer@deactivate@layers} +%\scrlayer@@add@inherited@option{deactivatepagestylelayers} +% +%<*interface> +\KOMA@key{deactivatepagestylelayers}[true]{% + \KOMA@set@ifkey{deactivatepagestylelayers}{scrlayer@deactivate@layers}{#1}% + \KOMA@kav@replacebool{.scrlayer.sty}{deactivatepagestylelayers} + {scrlayer@deactivate@layers}% +} +% +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @deactivatepagestylelayers\endcsname + \relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @deactivatepagestylelayers@default\endcsname + \relax +% +% \end{macrocode} +% \end{macro}^^A \ifscrlayer@deactivate@layers +% \end{option}^^A deactivatepagestylelayers +% \end{command}^^A \ForEachLayerOfPageStyle +% +% \begin{macro}{\scrlayer@do@page@style@element@layer} +% \changes{v3.26}{2018/07/14}{added hooks and artifact code} +% Helper macro to show one layer. First argument is either ``background'' or +% ``foreground'', second argument is either ``odd'' or ``even'', and third +% argument is the name of the layer. Note, that in draft mode for every layer +% will be shown also a \cs{layercontentsmeasure}. +% \begin{macrocode} +%<*package&body> +\newcommand*{\scrlayer@do@page@style@element@layer}[3]{% + \begingroup + \expandafter\ifx\csname if@scr@l@#3@\if@fcolmade\else non\fi floatpage% + \expandafter\endcsname\csname iftrue\endcsname + \expandafter\ifx\csname if@scr@l@#3@\if@twoside two\else one\fi side% + \expandafter\endcsname\csname iftrue\endcsname + \expandafter + \ifx\csname if@scr@l@#3@#1\expandafter\endcsname + \csname iftrue\endcsname + \expandafter + \ifx\csname if@scr@l@#3@#2\expandafter\endcsname + \csname iftrue\endcsname + \ifscrlayer@draft + \scr@layerbox(\csname scr@l@#3@x\endcsname,% + \csname scr@l@#3@y\endcsname)% + (\csname scr@l@#3@w\endcsname,% + \csname scr@l@#3@h\endcsname)% + [\csname scr@l@#3@align\endcsname]% + {% + \scrlayer@predraftmeasure@hook + \scrlayer@beginartifact{}% + \layercontentsmeasure + \scrlayer@endartifact{}% + \scrlayer@postdraftmeasure@hook + }% + \fi + \scr@layerbox(\csname scr@l@#3@x\endcsname,% + \csname scr@l@#3@y\endcsname)% + (\csname scr@l@#3@w\endcsname,% + \csname scr@l@#3@h\endcsname)% + [\csname scr@l@#3@align\endcsname]% + {\csname layer\csname scr@l@#3@mode\endcsname + mode\expandafter\endcsname{% + \csname scr@l@#3@precontents@hook\endcsname + \scr@ifundefinedorrelax{scr@l@#3@artifact}{}{% + \expandafter\expandafter\expandafter + \scrlayer@beginartifact + \expandafter\expandafter\expandafter{% + \csname scr@l@#3@artifact\endcsname + }% + \csname scr@l@#3@contents\endcsname + \expandafter\expandafter\expandafter + \scrlayer@endartifact + \expandafter\expandafter\expandafter{% + \csname scr@l@#3@artifact\endcsname + }% + }{% + \csname scr@l@#3@contents\endcsname + }% + \csname scr@l@#3@postcontents@hook\endcsname + }% + }% + \fi + \fi + \fi + \fi + \endgroup +} +% \end{macrocode} +% \begin{macro}{\scrlayer@predraftmeasure@hook} +% \changes{v3.26}{2018/07/14}{added} +% The hooks that will be executed before setting the draft measuring. +% \begin{macrocode} +\newcommand*{\scrlayer@predraftmeasure@hook}{} +% \end{macrocode} +% \begin{command}{\BeforeDraftMeasuringLayer} +% \changes{v3.26}{2018/07/14}{added} +% New code will be added in front of the hook. +% \begin{macrocode} +\newcommand*{\BeforeDraftMeasuringLayer}[1]{% + \edef\scrlayer@predraftmeasure@hook{% + \unexpanded{#1}\unexpanded\expandafter{\scrlayer@predraftmeasure@hook}% + }% +} +% \end{macrocode} +% \end{command}^^A \BeforeDraftMeasuringLayer +% \end{macro}^^A \scrlayer@predraftmeasure@hook +% \begin{macro}{\scrlayer@postdraftmeasure@hook} +% \changes{v3.26}{2018/07/14}{added} +% The hook that will be executed after setting the draft measuring. +% \begin{macrocode} +\newcommand*{\scrlayer@postdraftmeasure@hook}{} +% \end{macrocode} +% \begin{command}{\AfterDraftMeasuringLayer} +% \changes{v3.26}{2018/07/14}{added} +% New code will be added at the end of the hook. +% \begin{macrocode} +\newcommand*{\AfterDraftMeasuringLayer}[1]{% + \expandafter\def\expandafter\scrlayer@postdraftmeasure@hook\expandafter{% + \scrlayer@postdraftmeasure@hook #1% + }% +} +% \end{macrocode} +% \end{command}^^A \AfterDraftMeasuringLayer +% \end{macro}^^A \scrlayer@postdraftmeasure@hook +% \begin{macro}{\scr@layerbox} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \begin{macro}{\scr@@layerbox} +% \changes{v3.24}{2017/05/08}{\cs{edef} replaced by \cs{protected@edef}} +% \changes{v3.24}{2017/05/08}{\cs{dimexpr} added to \cs{layer\dots}} +% \changes{v3.24}{2017/05/08}{\cs{dimexpr} removed from usage of +% \cs{layer\dots}} +% The layer box is used to output a layer in \cs{@oddhead}, \cs{@evenhead}, +% \cs{@oddfoot}, or \cs{@evenfoot}. Is has two pairs of arguments: ($x,y$) +% and ($w,h$), where $x$ is the distance from left paper edge, $y$ is the +% distance from the topmost edge of paper, $w$ is the width of the box and $h$ +% is the height of the box. The fifth argument is an optional vertical and +% horizontal alignment of the box. It may be a combination of the alignment +% characters described above. The sixth and last argument is the contents of +% the layer, to be placed into the last argument of the innermost +% \cs{parbox}. +% \begin{macrocode} +\def\scr@layerbox(#1,#2)(#3,#4){% + \kernel@ifnextchar [%] + {\scr@@layerbox(#1,#2)(#3,#4)}{\scr@@layerbox(#1,#2)(#3,#4)[]}% +} +\def\scr@@layerbox(#1,#2)(#3,#4)[#5]#6{% + \begingroup + \protected@edef\layerxoffset{\noexpand\dimexpr #1\relax}% + \protected@edef\layeryoffset{\noexpand\dimexpr #2\relax}% + \protected@edef\layerwidth{\noexpand\dimexpr #3\relax}% + \protected@edef\layerheight{\noexpand\dimexpr #4\relax}% + \def\layervalign{t}% + \def\layerhalign{l}% + \edef\reserved@b{#5}% + \expandafter\@tfor\expandafter\reserved@a\expandafter:\expandafter=% + \reserved@b\do{% + \if t\reserved@a + \def\layervalign{t}% + \else + \if c\reserved@a + \def\layervalign{c}% + \def\layerhalign{c}% + \else + \if b\reserved@a + \def\layervalign{b}% + \else + \if l\reserved@a + \def\layerhalign{l}% + \else + \if r\reserved@a + \def\layerhalign{r}% + \else + \PackageWarning{scrlayer}{% + Unknown alignment `\reserved@a' ignored}% + \fi + \fi + \fi + \fi + \fi + }% + \parbox[t][\z@][t]{\z@}{% + \vskip\layeryoffset + \if b\layervalign\vskip-\layerheight\fi + \if c\layervalign\vskip-.5\layerheight\fi +% \end{macrocode} +% \changes{3.23a}{2017/04/22}{\textsf{bidi} code added} +% \changes{v3.24}{2017/05/04}{usage of \textsf{scrbase}'s \cs{IfRTL}} +% If we are in right-to-left mode of package \textsf{bidi} or +% \textsf{xepersian} the horizontal output is in the opposite direction. So we +% need the \cs{makebox} to the right instead of the left and to move the +% contents additionally by its width. +% \begin{macrocode} + \makebox[\z@][\IfRTL{r}{l}]{% + \hskip\layerxoffset + \IfRTL{\hskip\layerwidth}{}% + \makebox[\z@][\layerhalign]{% + \parbox[\layervalign][\layerheight][\layervalign]{\layerwidth}{% + \vskip\z@\strut{% + \ifscrlayer@forceignoreuppercase + \expandafter\let\csname MakeUppercase \endcsname\@firstofone + \let\MakeUppercase\@firstofone + \let\uppercase\@firstofone + \fi + #6% + }\strut\vskip\z@ + }% + }% + }% + }% + \endgroup +} +% +% \end{macrocode} +% \end{macro}^^A \scr@@layerbox +% \end{macro}^^A \scr@layerbox +% +% \begin{command}{\layerrawmode,\layertextmode} +% \changes{v3.19}{2015/07/30}{added} +% This is the command to output layers in raw mode. This is very simple: +% \begin{macrocode} +%<*package&body> +\newcommand{\layerrawmode}[1]{#1} +\newcommand{\layertextmode}[1]{#1} +% +% \end{macrocode} +% \end{command}^^A \layerrawmode,\layertextmode +% +% \begin{command}{\layerpicturemode} +% \changes{v3.19}{2015/07/30}{added} +% \changes{v3.24}{2017/05/08}{redundant \cs{dimexpr} removed} +% This is a bit more complicated. It is the layer output for \texttt{picture} +% layers. In this case we use a picture environment and internally define some +% additional commands. +% \begin{macrocode} +%<*package&body> +\newcommand{\layerpicturemode}[1]{% + \begin{picture}(0,0) + (0,\LenToUnit{% + \if t\layervalign \dimexpr\layerheight-\ht\strutbox\relax + \else + \if b\layervalign \dp\strutbox + \else .5\dimexpr\layerheight-\ht\strutbox+\dp\strutbox\relax + \fi + \fi}) + \long\def\putLL##1{\put(0,0){##1}}% + \long\def\putUL##1{\put(0,\LenToUnit{\layerheight}){##1}}% + \long\def\putLR##1{\put(\LenToUnit{\layerwidth},0){##1}}% + \long\def\putUR##1{\put(\LenToUnit{\layerwidth},% + \LenToUnit{\layerheight}){##1}}% + \long\def\putC##1{\put(\LenToUnit{.5\layerwidth},% + \LenToUnit{.5\layerheight}){##1}}% + #1% + \end{picture}% +} +% +% \end{macrocode} +% \end{command}^^A \layerpicturemode +% +% \begin{option}{draft} +% \begin{macro}{\ifscrlayer@draft,\scrlayer@drafttrue,\scrlayer@draftfalse} +% \begin{description} +% \item[\marg{simple switch}:] whether or not to use the draft mode, +% that, i.e., activates visualisation of the layers. +% \end{description} +% When option is set, every layer is shown twice: one time with it's own +% contents and one time with contents \cs{layercontentsmeasure}. +% \begin{macrocode} +%<*options> +%<*package> +\KOMA@ifkey{draft}{scrlayer@draft} +%\scrlayer@@add@inherited@option{draft} +% +%<*interface> +\KOMA@key{draft}[true]{% + \KOMA@set@ifkey{draft}{scrlayer@draft}{#1}% + \KOMA@kav@replacebool{.scrlayer.sty}{draft}{scrlayer@draft}% +} +% +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @draft\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @draft@default\endcsname\relax +% +% \end{macrocode} +% \end{macro}^^A \ifscrlayer@draft +% \end{option}^^A draft +% \end{macro}^^A \scrlayer@do@page@style@element@layer +% \end{command}^^A \DeclarePageStyleByLayers +% +% +% \begin{command}{\DeclareNewPageStyleByLayers} +% Arguments like \cs{DeclarePageStyleByLayers}; results in error if the page +% style has been defined (or declared) already. +% \begin{command}{\ProvidePageStyleByLayers} +% Arguments like \cs{DeclarePageStyleByLayers}; doesn't define anything it +% the page style has been defined (or declared) already. +% \begin{command}{\RedeclarePageStyleByLayers} +% Arguments like \cs{DeclarePageStyleByLayers}; results in error if the page +% style hasn't been defined (or declared) already. +% \begin{macrocode} +%<*package&body> +\newcommand*{\DeclareNewPageStyleByLayers}[2][]{% + \@ifundefined{ps@#2}{}{% + \PackageError{scrlayer}{% + Page style `#2' already defined% + }{% + You may use \string\DeclareNewPageStyleByLayers\space to declare a new + page style only\MessageBreak + if that page style hasn't been declared or defined before.\MessageBreak + You may use either \string\ProvidePageStyleByLayers\space to declare the + page style only\MessageBreak + if it hasn't been declared or defined before, or + \string\RedeclarePageStyleByLayers\MessageBreak + to overwrite the former + declaration or definition of the page style% + \@ifundefined{@ps@#2@layers}{}{,\MessageBreak + or \string\AddLayersToPageStyle\space to add further layers to the + already declared\MessageBreak + page style, or \string\RemoveLayersFromPageStyle\space to remove + layers from the\MessageBreak + already declared page style}.\MessageBreak + Nevertheless, if you'll continue, the page style will be + overwritten\MessageBreak + by the new declaration.% + }% + }% + \DeclarePageStyleByLayers[{#1}]{#2}% +} +\newcommand*{\ProvidePageStyleByLayers}[3][]{% + \@ifundefined{ps@#2}{% + \DeclarePageStyleByLayers[{#1}]{#2}{#3}% + }{% +%<*trace> + \PackageInfo{scrlayer}{% + \string\ProvidePageStyleByLayers{#2}{#3} ignored,\MessageBreak + because page style `#2'\MessageBreak + already exists% + }% +% + }% +} +\newcommand*{\RedeclarePageStyleByLayers}[2][]{% + \@ifundefined{ps@#2}{% + \PackageError{scrlayer}{% + Page style `#2' not yet defined% + }{% + You may use \string\RedeclarePageStyleByLayers\space to declare a page + style only\MessageBreak + if that page style has already been declared or defined.\MessageBreak + You may use either \string\DeclareNewPageStyleByLayers, + \string\DeclarePageStyleByLayers,\MessageBreak + or \string\ProvidePageStyleByLayers\space to declare that not yet + defined page style.\MessageBreak + Nevertheless, if you'll continue, the page style will be declared.% + }% + }{}% + \DeclarePageStyleByLayers[{#1}]{#2}% +} +% +% \end{macrocode} +% \end{command}^^A \RedeclarePageStyleByLayers +% \end{command}^^A \ProvidePageStyleByLayers +% \end{command}^^A \DeclareNewPageStyleByLayers +% +% \begin{pgstyle}{@everystyle@,empty} +% We also declare page style \pstyle{@everystyle@} by default. You should +% not use this page style as an real page style (even not as the empty +% one). The layers of this page style will be used by every other layer page +% style. An we re-declare \pstyle{empty} to be a layer page style. +% \begin{macrocode} +%<*package&final> +\DeclareNewPageStyleByLayers{@everystyle@}{} +\RedeclarePageStyleByLayers{empty}{} +% +% \end{macrocode} +% \end{pgstyle} +% +% \begin{command}{\AddLayersToPageStyle} +% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{command}{\AddLayersAtBeginOfPageStyle,\AddLayersAtEndOfPageStyle} +% \begin{command}{\RemoveLayersFromPageStyle} +% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{description} +% \item[\marg{string}:] the name of the page style to be modified (must +% be expandable and result in a string). +% \item[\marg{string list}:] comma separated list of layer names (must +% be expandable and result in strings); first in the list will be added +% first. +% \end{description} +% Change the layer list of a given page style. The differences between the +% commands are: +% \begin{description} +% \item[\cs{AddLayersToPageStyle}:] first in the \meta{string list} will +% be added first at the end. +% \item[\cs{AddLayersAtBeginOfPageStyle}:] first in the \meta{string list} +% will be added first at the start. Note, that this will result in changing +% the order of the layers in \meta{string list}. +% \item[\cs{AddLayerAtEndOfPageStyle}:] same like +% \cs{AddLayerToPageStyle}. +% \item[\cs{RemoveLayersFromPageStyle}:] remove the layers from the page +% style's layer list. +% \end{description} +% \begin{macrocode} +%<*package&body> +\newcommand*{\AddLayersToPageStyle}[2]{% + \edef\reserved@b{\GetRealPageStyle{#1}}% + \IfLayerPageStyleExists{\reserved@b}{% + \@for \reserved@a:=#2\do {% + \scr@trim@spaces\reserved@a + \Ifstr\reserved@a\@empty{}{% + \expandafter\@cons\csname @ps@\reserved@b @layers\endcsname + {{\reserved@a}}% + }% + }% + }{% + \scrlayer@lpm@error{#1}{adding layers}% + }% +} +\newcommand*{\AddLayersAtEndOfPageStyle}{% + \AddLayersToPageStyle +} +\newcommand*{\AddLayersAtBeginOfPageStyle}[2]{% + \begingroup + \let\@cons\@snoc + \AddLayersToPageStyle{#1}{#2}% + \endgroup +} +% \end{macrocode} +% \begin{macro}{\@snoc} +% \cs{@snoc} is a helper macro similar to \cs{@cons} from \LaTeX{} kernel, but +% it appends at the front instead of the end. +% \begin{macrocode} +\newcommand*{\@snoc}[2]{% + \begingroup\let\@elt\relax\xdef#1{\@elt #2#1}\endgroup +} +% \end{macrocode} +% \end{macro}^^A \@snoc +% \begin{macrocode} +\newcommand*{\RemoveLayersFromPageStyle}[2]{% + \edef\reserved@b{\GetRealPageStyle{#1}}% + \IfLayerPageStyleExists{#1}{% + \@for \reserved@a:=#2\do {% + \scr@trim@spaces\reserved@a + \Ifstr\reserved@a\@empty{}{% + \expandafter\remove@layer@from@page@style\expandafter{\reserved@a}% + {\reserved@b}% + }% + }% + }{% + \scrlayer@lpm@error{#1}{removing layers}% + }% +} +% \end{macrocode} +% \begin{macro}{\remove@layer@from@page@style} +% \changes{v0.9}{2014/07/25}{cleaning of layer list must be global} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% Helper macro to remove exactly one layer (arg 1) from a page style (arg 2). +% \begin{macrocode} +\newcommand*{\remove@layer@from@page@style}[2]{% + \begingroup + \expandafter\let\expandafter\reserved@a\csname @ps@#2@layers\endcsname + \expandafter\global\expandafter\let\csname @ps@#2@layers\endcsname\@empty + \def\@elt##1{% + \Ifstr{#1}{##1}{}{% + \expandafter\@cons\csname @ps@#2@layers\endcsname{{##1}}% + }% + }\reserved@a + \endgroup +} +% \end{macrocode} +% \end{macro}^^A \remoce@layer@from@page@style +% \begin{macro}{\scrlayer@lpm@error} +% \begin{description} +% \item[\marg{string}:] the name of the page style to be modified (must +% be expandable and result in a string). +% \item[\marg{string}:] the kind of modification, that isn't allowed +% (must be expandable and result in a string). +% \end{description} +% Show an error because of page style it either not a defined or not a layer +% page style. +% \begin{macrocode} +\newcommand*{\scrlayer@lpm@error}[2]{% + \PackageError{scrlayer}{`#1' is not a layer page style}{% + \scr@ifundefinedorrelax{ps@#1}{% + Page style `#1' is not defined, + }{% + Page style `#1' is not a layer page style, + }% + but #2\MessageBreak + may be used only for layer page styles declared using\MessageBreak + \string\DeclarePageStyleByLayers, + \string\DeclareNewPageStyleByLayers,\MessageBreak + of \string\ProvidePageStyleByLayers.\MessageBreak + If you'll continue, your operation will be ignored.% + }% +} +% +% \end{macrocode} +% \end{macro}^^A \scrlayer@lpm@error +% \end{command}^^A \RemoveLayersFromPageStyle +% \end{command}^^A \AddLayersAtBeginOfPageStyle,\AddLayersAtEndOfPageStyle +% \end{command}^^A \AddLayersToPageStyle +% +% \begin{command}{\AddLayersToPageStyleBeforeLayer, +% \AddLayersToPageStyleAfterLayer} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added} +% \begin{description} +% \item[\marg{string}:] the name of the page style to be modified (must +% be expandable and result in a string). +% \item[\marg{string list}:] comma separated list of layer names (must +% be expandable and result in strings); first in the list will be added +% first. +% \item[\marg{string}:] the name of the layer before +% (\cs{AddLayersToPageStyleBeforeLayer}) or after +% (\cs{AddLayersToPageStyleAfterLayer}) that the layers of the list +% should be added. +% \end{description} +% Note: If the layer from third argument is not part of the page style's layer +% list, the new layers won't be added anywhere. +% \begin{macrocode} +%<*package&body> +\newcommand*{\AddLayersToPageStyleAfterLayer}[3]{% + \edef\reserved@b{\GetRealPageStyle{#1}}% + \IfLayerPageStyleExists{\reserved@b}{% + \begingroup + \expandafter\let\expandafter\reserved@a + \csname @ps@\reserved@b @layers\endcsname + \@namedef{@ps@\reserved@b @layers}{}% + \def\@elt##1{% + \Ifstr{##1}\@empty{}{% + \expandafter\@cons\csname @ps@\reserved@b @layers\endcsname{{##1}}% + \Ifstr{##1}{#3}{% + \@for \reserved@a:=#2\do {% + \scr@trim@spaces\reserved@a + \Ifstr\reserved@a\@empty{}{% + \expandafter\@cons\csname @ps@\reserved@b @layers\endcsname + {{\reserved@a}}% + }% + }% + }{}% + }% + }% + \reserved@a + \endgroup + }{% + \scrlayer@lpm@error{#1}{adding layers}% + }% +} +\newcommand*{\AddLayersToPageStyleBeforeLayer}[3]{% + \edef\reserved@b{\GetRealPageStyle{#1}}% + \IfLayerPageStyleExists{\reserved@b}{% + \begingroup + \expandafter\let\expandafter\reserved@a + \csname @ps@\reserved@b @layers\endcsname + \@namedef{@ps@\reserved@b @layers}{}% + \def\@elt##1{% + \Ifstr{##1}\@empty{}{% + \Ifstr{##1}{#3}{% + \@for \reserved@a:=#2\do {% + \scr@trim@spaces\reserved@a + \Ifstr\reserved@a\@empty{}{% + \expandafter\@cons\csname @ps@\reserved@b @layers\endcsname + {{\reserved@a}}% + }% + }% + }{}% + \expandafter\@cons\csname @ps@#1@layers\endcsname{{##1}}% + }% + }% + \reserved@a + \endgroup + }{% + \scrlayer@lpm@error{#1}{adding layers}% + }% +} +% +% \end{macrocode} +% \end{command}^^A \AddLayersToPageStyleBeforeLayer, +% ^^A \AddLayersToPageStyleAfterLayer +% +% +% \begin{command}{\UnifyLayersAtPageStyle} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{description} +% \item[\marg{string}:] the name of the page style to be unified (must +% be expandable and result in a string). +% \end{description} +% Remove doublets of layers from a page style. +% \begin{macrocode} +%<*package&body> +\newcommand*{\UnifyLayersAtPageStyle}[1]{% + \edef\reserved@b{\GetRealPageStyle{#1}}% + \IfLayerPageStyleExists{\reserved@b}{% + \expandafter\let\expandafter\reserved@a + \csname @ps@\reserved@b @layers\endcsname + \@namedef{@ps@\reserved@b @layers}{}% + \begingroup + \def\@elt##1{% + \Ifstr{##1}\@empty{}{% + \remove@layer@from@page@style{##1}{\reserved@b}% + \expandafter\@cons\csname @ps@\reserved@b @layers\endcsname{{##1}}% + }% + }% + \reserved@a + \endgroup + }{% + \scrlayer@lpm@error{#1}{unifying}% + }% +} +% +% \end{macrocode} +% \end{command}^^A \UnifyLayersAtPageStyle +% +% \begin{command}{\ModifyLayerPageStyleOptions,\AddToLayerPageStyleOptions} +% \begin{description} +% \item[\marg{string}:] the name of the page style to be modified (must +% be expandable and result in a string). +% \item[\marg{option list}:] comma separated list of named page +% style options. You may use any of the options provided for +% \cs{DeclarePageStyle}. +% \end{description} +% \cs{ModifyLayerPageStyleOptions} replaces the options and only the +% options from the list by their new +% values. \cs{AddToLayerPageStyleOptions} adds the new values to the +% already given. +% \begin{macrocode} +%<*package&body> +\newcommand*{\ModifyLayerPageStyleOptions}[2]{% + \edef\reserved@a{\GetRealPageStyle{#1}}% + \IfLayerPageStyleExists{#1}{% + \expandafter\scrlayer@modify@layer@ps@options\expandafter{% + \reserved@a + }{#2}% + }{% + \scrlayer@lpm@error{#1}{modifying}% + }% +} +% \end{macrocode} +% \begin{macro}{\scrlayer@modify@layer@ps@options} +% \changes{v3.28}{2019/11/28}{usage of marker makros} +% Helper needed because of alias page styles. Same parameters like +% \cs{ModifyLayerPageStyleOptions} +% \begin{macrocode} +\newcommand*{\scrlayer@modify@layer@ps@options}[2]{% + \begingroup + \def\scrlayer@current@pagestyle{#1}% + \@namedef{@ps@#1@initialhook}{}% + \@namedef{@ps@#1@hook}{}% + \@namedef{@ps@#1@backgroundhook}{}% + \@namedef{@ps@#1@foregroundhook}{}% + \@namedef{@ps@#1@oddpagehook}{}% + \@namedef{@ps@#1@evenpagehook}{}% + \@namedef{@ps@#1@onesidehook}{}% + \@namedef{@ps@#1@twosidehook}{}% + \@namedef{@ps@#1@floatpagehook}{}% + \@namedef{@ps@#1@nonfloatpagehook}{}% + \let\scr@opt@marker@initialhook\@empty + \let\scr@opt@marker@hook\@empty + \let\scr@opt@marker@backgroundhook\@empty + \let\scr@opt@marker@foregroundhook\@empty + \let\scr@opt@marker@oddpagehook\@empty + \let\scr@opt@marker@evenpagehook\@empty + \let\scr@opt@marker@onesidehook\@empty + \let\scr@opt@marker@twosidehook\@empty + \let\scr@opt@marker@floatpagehook\@empty + \let\scr@opt@marker@nonfloatpagehook\@empty + \FamilyExecuteOptions[.definelayerpagestyle]{KOMAarg}{#2}% + \def\reserved@a{\endgroup}% + \def\@sls@##1{% + \expandafter\ifx \csname scr@opt@marker@##1hook\endcsname\@empty\else + \expandafter\let\expandafter\reserved@b\csname @ps@#1@##1hook\endcsname + \l@addto@macro\reserved@a{\@namedef{@ps@#1@##1hook}}% + \expandafter\l@addto@macro\expandafter\reserved@a\expandafter{% + \expandafter{% + \reserved@b + }% + }% + \fi + }% + \@sls@{initial}% + \@sls@{}% + \@sls@{background}% + \@sls@{foreground}% + \@sls@{oddpage}% + \@sls@{evenpage}% + \@sls@{oneside}% + \@sls@{twoside}% + \@sls@{floatpage}% + \@sls@{nonfloatpage}% + \reserved@a +} +% \end{macrocode} +% \end{macro}^^A \scrlayer@modify@layer@ps@options +% \begin{macrocode} +\newcommand*{\AddToLayerPageStyleOptions}[2]{% + \IfLayerPageStyleExists{#1}{% + \def\scrlayer@current@pagestyle{#1}% + \FamilyExecuteOptions[.definelayerpagestyle]{KOMAarg}{#2}% + }{% + \scrlayer@lpm@error{#1}{modifying}% + }% +} +% +% \end{macrocode} +% \end{command}^^A \ModifyLayerPageStyleOptions,\AddToLayerPageStyleOptions +% +% +% \begin{macro}{\scrlayer@beginartifact,\scrlayer@endartifact} +% \changes{v3.26}{2018/07/14}{new (semi internal)} +% These macros are reserved for tagging packages. The first one is executed +% after the initial contents hook, the last one is executed after the final +% contents hook. Both executions are done only, if the \texttt{artifact} +% option of the layer has been used an was not boolean false. With boolean +% true the argument will be empty. All other values will be passed as +% argument. +% +% In case of package \textsf{tagpdf} the following definition would be +% usefull (here automatically done after loading the package, if the package +% does not do its own definitions): +% \begin{macrocode} +%<*package&body> +\RequirePackage{scrlfile} +\BeforePackage{tagpdf}{% +% \end{macrocode} +% Deactivation of the two commands before loading \textsf{tagpdf}, so that +% after loading the package \cs{providecommand} can be used to do a new +% default definition. +% \begin{macrocode} + \let\scrlayer@beginartifact\relax + \let\scrlayer@endartifact\relax +} +\AfterPackage*{tagpdf}{% + \providecommand*{\scrlayer@beginartifact}[1]{% + \Ifstr{#1}{}{% + \tagmcbegin{artifact}% + }{% + \tagmcbegin{artifact=#1}% + }% + }% + \providecommand*{\scrlayer@endartifact}[1]{% + \tagmcend + }% +} +% \end{macrocode} +% But the default definition (if \textsf{tagpdf} has not already been loaded) +% are simple dummies: +% \begin{macrocode} +\providecommand*{\scrlayer@beginartifact}[1]{} +\providecommand*{\scrlayer@endartifact}[1]{} +% +% \end{macrocode} +% \end{macro}^^A \scrlayer@beginartifact,\scrlayer@endartifact +% +% \begin{command}{\DeclarePageStyleAlias,\DeclareNewPageStyleAlias, +% \ProvidePageStyleAlias,\RedeclarePageStyleAlias} +% \begin{description} +% \item[\marg{string}:] The name of the page style to be declared +% (must be expandable and result in a string). +% \item[\marg{string}:] The name of the existing page style +% (must be expandable and result in a string). +% \end{description} +% \begin{macrocode} +%<*package&body> +\newcommand*{\DeclarePageStyleAlias}[2]{% + \edef\reserved@a{\GetRealPageStyle{#2}}% + \scr@ifundefinedorrelax{ps@\reserved@a}{% + \PackageError{scrlayer}{unknown real page style `#2'}{% + You've tried to declare an alias for page style `#2',\MessageBreak + but the real page style of `#2' is undefined.\MessageBreak + You can define aliases, only if the real page style has been + defined.\MessageBreak + If you'll continue, the declaration will be ignored.% + }% + \DestroyRealLayerPageStyle{#1}% + \DestroyLayerAlias{#1}% + }{% + \@namedef{@ps@#1@alias}{#2}% + \@namedef{ps@#1}{\pagestyle{\@nameuse{@ps@#1@alias}}}% + }% +} +\newcommand*{\DeclareNewPageStyleAlias}[1]{% + \@ifundefined{ps@#1}{}{% + \PackageError{scrlayer}{% + Page style `#1' already defined% + }{% + You may use \string\DeclareNewPageStyleAlias\space to declare a new + page style only\MessageBreak + if that page style hasn't been declared or defined before.\MessageBreak + You may use either \string\ProvidePageStyleAlias\space to declare the + page style only\MessageBreak + if it hasn't been declared or defined before, or + \string\RedeclarePageStyleAlias\MessageBreak + to overwrite the former declaration or definition of the page + style\MessageBreak + Nevertheless, if you'll continue, the page style will be + overwritten\MessageBreak + by the new alias.% + }% + }% + \DeclarePageStyleAlias{#1}% +} +\newcommand*{\ProvidePageStyleAlias}[2]{% + \@ifundefined{ps@#1}{% + \DeclarePageStyleAlias{#1}{#2}% + }{% +%<*trace> + \PackageInfo{scrlayer}{% + \string\ProvidePageStyleAlias{#1}{#2} ignored,\MessageBreak + because page style `#1' already\MessageBreak + exists% + }% +% + }% +} +\newcommand*{\RedeclarePageStyleAlias}[1]{% + \@ifundefined{ps@#1}{% + \PackageError{scrlayer}{% + Page style `#1' not yet defined% + }{% + You may use \string\RedeclarePageStyleAlias\space to declare a page + style only\MessageBreak + if that page style has already been declared or defined.\MessageBreak + You may use either \string\DeclareNewPageStyleAlias, + \string\DeclarePageStyleAlias,\MessageBreak + or \string\ProvidePageStyleAlias\space to declare that not yet + defined page style.\MessageBreak + Nevertheless, if you'll continue, the page style will be declared.% + }% + }{}% + \DeclarePageStyleAlias{#1}% +} +% \end{macrocode} +% \end{command}^^A \DeclarePageStyleAlias … +% +% \begin{command}{\DestroyPageStyleAlias} +% \begin{description} +% \item[\marg{string}:] the name of a page style (must be +% expandable and result in a string). +% \end{description} +% \begin{macrocode} +\newcommand*{\DestroyPageStyleAlias}[1]{% + \scr@ifundefinedorrelax{@ps@#1@alias}{}{% + \expandafter\let\csname @ps@#1@alias\endcsname\relax + \expandafter\let\csname ps@#1\endcsname\relax + }% +} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\GetRealPageStyle} +% \begin{description} +% \item[\marg{string}:] the name of a page style (must be +% expandable and result in a string). +% \end{description} +% Get the real name of the page style. +% \begin{macrocode} +\newcommand*{\GetRealPageStyle}[1]{% + \scr@ifundefinedorrelax{@ps@#1@alias}{#1}{% + \expandafter\GetRealPageStyle\expandafter{% + \expandafter\csname @ps@#1@alias\expandafter\endcsname\expandafter}% + }% +} +% +% \end{macrocode} +% \end{command} +% +% \begin{command}{\IfLayerPageStyleExists,\IfRealLayerPageStyleExists} +% \begin{description} +% \item[\marg{string}:] the name of the page style to be tested (must +% be expandable and result in a string). +% \item[\marg{code}:] whatever code should be expanded, if the test +% result is true. +% \item[\marg{code}:] whatever code should be expanded, if the test +% result is false. +% \end{description} +% Test, whether or not the page style is a declared layer page style. +% \begin{macrocode} +%<*package&body> +\newcommand*{\IfLayerPageStyleExists}[1]{% + \scr@ifundefinedorrelax{ps@#1}{% + \expandafter\@secondoftwo + }{% + \scr@ifundefinedorrelax{@ps@#1@layers}{% + \scr@ifundefinedorrelax{@ps@#1@alias}{% + \expandafter\@secondoftwo + }{% + \expandafter\IfLayerPageStyleExists\expandafter{% + \expandafter\csname @ps@#1@alias\expandafter\endcsname\expandafter}% + }% + }{% + \expandafter\@firstoftwo + }% + }% +} +\newcommand*{\IfRealLayerPageStyleExists}[1]{% + \scr@ifundefinedorrelax{ps@#1}{% + \expandafter\@secondoftwo + }{% + \scr@ifundefinedorrelax{@ps@#1@layers}{% + \expandafter\@secondoftwo + }{% + \expandafter\@firstoftwo + }% + }% +} +% +% \end{macrocode} +% \end{command}^^A \IfLayerPageStyleExists,\IfRealLayerPageStyleExists +% +% \begin{command}{\IfLayerAtPageStyle,\IfSomeLayersAtPageStyle} +% \changes{v3.26}{2018/08/29}{\cs{scr@trim@spaces} added} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{command}{\IfLayersAtPageStyle} +% \begin{description} +% \item[\marg{string}:] the name of the page style to be tested (must +% be expandable and result in a string). +% \item[\marg{string}:] the name(s) of the layer(s) to be tested (must be +% expandable and result in a string). +% \item[\marg{code}:] whatever code should be expanded, if the test +% result is true. +% \item[\marg{code}:] whatever code should be expanded, if the test +% result is false. +% \end{description} +% Tests: +% \begin{description} +% \item[\cs{IfLayerAtPageStyle}:] Test, whether or not the page style has a +% layer. The second argument is the name of one layer only! +% \item[\cs{IfSomeLayersAtPageStyle}:] Test, whether or not the page style +% has at least one layer of a list of layers. The second argument is a comma +% separated list of layer names. +% \item[\cs{IfLayersAtPageStyle}:] Test, whether or not the page style has +% every layer of a list of layers. The second argument is a comma separated +% list of layer names. +% \end{description} +% Note, that testing an page style, that is not a layer page style will result +% in an error and neither the third nor the fourth argument will be expanded. +% Note, that layers with empty name are only part of a layer page style +% without any layers. +% +% Note also, that with active \opt{deactivatepagestylelayers} layers are +% logically not longer part of the page styles. +% \begin{macrocode} +%<*package&body> +\newcommand*{\IfLayerAtPageStyle}[2]{% + \IfLayerPageStyleExists{#1}{% + \begingroup + \edef\reserved@a{\GetRealPageStyle{#1}}% + \@tempswafalse + \Ifstr{#2}{}{% + \expandafter\ifx\csname @ps@\reserved@a @layers\endcsname\@empty + \@tempswatrue + \fi + }{% + \expandafter\ForEachLayerOfPageStyle\expandafter{% + \reserved@a}{\Ifstr{##1}{#2}{\aftergroup\@tempswatrue}{}}% + }% + \if@tempswa \aftergroup\@firstoftwo \else \aftergroup\@secondoftwo \fi + \expandafter\endgroup + }{% + \scrlayer@lpm@error{#1}{testing for layers}% + \expandafter\@gobbletwo + }% +} +\newcommand*{\IfSomeLayersAtPageStyle}[2]{% + \IfLayerPageStyleExists{#1}{% + \begingroup + \@tempswafalse + \@for \reserved@a:=#2\do {% + \scr@trim@spaces\reserved@a + \edef\reserved@a{\noexpand\IfLayerAtPageStyle{#1}{\reserved@a}}% + \reserved@a{\@tempswatrue}{}% + }% + \if@tempswa \aftergroup\@firstoftwo \else \aftergroup\@secondoftwo \fi + \expandafter\endgroup + }{% + \scrlayer@lpm@error{#1}{testing for layers}% + \expandafter\@gobbletwo + }% +} +\newcommand*{\IfLayersAtPageStyle}[2]{% + \IfLayerPageStyleExists{#1}{% + \begingroup + \@tempswatrue + \Ifstr{#2}{}{% + \edef\reserved@a{\GetRealPageStyle{#1}}% + \expandafter\ifx\csname @scr@\reserved@a @layers\endcsname\@empty \else + \@tempswafalse + \fi + }{% + \@for \reserved@a:=#2\do {% + \scr@trim@spaces\reserved@a + \edef\reserved@a{\noexpand\IfLayerAtPageStyle{#1}{\reserved@a}}% + \reserved@a{}{\@tempswafalse}% + }% + }% + \if@tempswa \aftergroup\@firstoftwo \else \aftergroup\@secondoftwo \fi + \expandafter\endgroup + }{% + \scrlayer@lpm@error{#1}{testing for layers}% + \expandafter\@gobbletwo + }% +} +% +% \end{macrocode} +% \end{command}^^A \IfLayersAtPageStyle +% \end{command}^^A \IfLayerAtPageStyle,\IfSomeLayersAtPageStyle +% +% +% \begin{command}{\DestroyRealLayerPageStyle} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% \begin{description} +% \item[\marg{string}:] name of the layer page style to be destroyed. +% \end{description} +% Destroys the given layer page style but not the layers! If the page style is +% the current page style, the empty page style an empty page style will be +% activated. If the special page style is valid an the destroyed one, this +% will be removed. This command could be used, e.g., at +% \cs{scrlayerOnAutoRemoveInterface} after destroying the layers. However, +% the interface commands are deprecated. +% \begin{macrocode} +%<*package&body> +\newcommand*{\DestroyRealLayerPageStyle}[1]{% + \IfRealLayerPageStyleExists{#1}{% + \expandafter\let\csname @ps@#1@initialhook\endcsname\relax + \expandafter\let\csname @ps@#1@hook\endcsname\relax + \expandafter\let\csname @ps@#1@backgroundhook\endcsname\relax + \expandafter\let\csname @ps@#1@foregroundhook\endcsname\relax + \expandafter\let\csname @ps@#1@oddpagehook\endcsname\relax + \expandafter\let\csname @ps@#1@evenpagehook\endcsname\relax + \expandafter\let\csname @ps@#1@onesidehook\endcsname\relax + \expandafter\let\csname @ps@#1@twosidehook\endcsname\relax + \expandafter\let\csname @ps@#1@floatpagehook\endcsname\relax + \expandafter\let\csname @ps@#1@nonfloatpagehook\endcsname\relax + \expandafter\let\csname @ps@#1@layers\endcsname\relax + \expandafter\let\csname ps@#1\endcsname\relax + \Ifstr{\currentpagestyle}{#1}{% + \def\currentpagestyle{scrlayer@empty}% + \let\@oddhead\@empty\let\@evenhead\@empty + \let\@oddfoot\@empty\let\@evenfoot\@empty + }{}% + \if@specialpage + \Ifstr{\@specialstyle}{#1}{% + \global\let\@specialstyle\relax + \global\@specialpagefalse + }{}% + \fi + }{% +%<*trace> + \PackageInfo{scrlayer}{% + \string\DestroyRealLayerPageStyle{#1} ignored,\MessageBreak + because the layer page style isn't\MessageBreak + defined (any longer)% + }% +% + }% +} +% +% \end{macrocode} +% \end{command}^^A \DestroyRealLayerPageStyle +% +% +% \subsection{Kernel Patches} +% +% This package as so many others need to patch the \LaTeX{} kernel. This will +% be done, because we need information about the current active package style. +% +% \begin{command}{\pagestyle} +% \begin{command}{\currentpagestyle} +% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} +% We save the current page style. Note, that this doesn't work for special +% page styles\footnote{Special page styles are set by +% \cs{thispagestyle}.} that hasn't been defined using +% \pkg*{scrlayer}. As long as \cs{currentpagestyle} is empty, the +% current page style is unknown. And we add two hooks into page style +% selection: one before an one after the selection. +% \begin{macrocode} +%<*package&body> +\newcommand*{\currentpagestyle}{} +\PackageInfo{scrlayer}{patching LaTeX kernel macro \string\pagestyle} +\def\reserved@a{% + \iftoplevelpagestyle\edef\toplevelpagestyle{##1}\toplevelpagestylefalse\fi + \scrlayer@exec@before@pagestyle@hook{##1}% +} +\expandafter\expandafter\expandafter\renewcommand +\expandafter\expandafter\expandafter*% +\expandafter\expandafter\expandafter\pagestyle +\expandafter\expandafter\expandafter[% +\expandafter\expandafter\expandafter1% +\expandafter\expandafter\expandafter]% +\expandafter\expandafter\expandafter{% + \expandafter\reserved@a + \pagestyle{#1}% + \edef\currentpagestyle{\GetRealPageStyle{#1}}% + \scrlayer@exec@after@pagestyle@hook{#1}% + \toplevelpagestyletrue +} +\newif\iftoplevelpagestyle\toplevelpagestyletrue +\AtBeginDocument{% + \begingroup + \let\scrlayer@exec@before@pagestyle@hook\@gobble + \let\scrlayer@exec@after@pagestyle@hook\@gobble + \def\ps@test{}% + \pagestyle{test}% + \Ifstr{\currentpagestyle}{test}{}{% + \PackageError{scrlayer}{package incompatibility detected}{% + Another package redefines \string\pagestyle\space incompatible with + scrlayer.\MessageBreak + This disables setting of \string\currentpagestyle\space and may + be serious.\MessageBreak + Maybe you could prevent this loading package scrlayer + later.\MessageBreak + If not you should either not use scrlayer or not the other + package,\MessageBreak + that redefines \string\pagestyle.% + }% + }% + \endgroup +} +% +% \end{macrocode} +% \end{command}^^A \currentpagestyle +% +% \begin{command}{\BeforeSelectAnyPageStyle,\AfterSelectAnyPageStyle} +% \begin{macro}{\scrlayer@exec@before@pagestyle@hook, +% \scrlayer@exec@after@pagestyle@hook} +% We have two macros to locally add code to be executed whenever a page style +% changes using \cs{pagestyle}. The first one executes the code before the +% page style will be changed, the second one after the page style has been +% changed. Note, that you may use \#1 as a placeholder of the argument of +% \cs{pagestyle}. +% \begin{macrocode} +%<*package&body> +\newcommand*{\BeforeSelectAnyPageStyle}[1]{% + \expandafter\renewcommand\expandafter*% + \expandafter\scrlayer@exec@before@pagestyle@hook + \expandafter[\expandafter1\expandafter]\expandafter{% + \scrlayer@exec@before@pagestyle@hook{##1}#1}% +} +\newcommand*{\scrlayer@exec@before@pagestyle@hook}[1]{} +\newcommand*{\AfterSelectAnyPageStyle}[1]{% + \expandafter\renewcommand\expandafter*% + \expandafter\scrlayer@exec@after@pagestyle@hook + \expandafter[\expandafter1\expandafter]\expandafter{% + \scrlayer@exec@after@pagestyle@hook{##1}#1}% +} +\newcommand*{\scrlayer@exec@after@pagestyle@hook}[1]{} +% +% \end{macrocode} +% \end{macro}^^A \scrlayer@exec@after@pagestyle@hook … +% \end{command}^^A \BeforeSelectAnyPageStyle,\AfterSelectAnyPageStyle +% \end{command}^^A \pagestyle +% +% +% \subsection{Deprecated declaration of end user interfaces} +% +% \changes{v3.32}{2020/09/11}{the interface commands are deprecated} +% +% All commands of this subsection are deprecated. So they are declared as +% internal independent from their name. +% +% \begin{macro}{\scrlayerAddToInterface,\scrlayerAddCsToInterface} +% \begin{description} +% \item[\texttt{\{\meta{command}\textbar\meta{command sequence}\}}:] the +% command (with backslash) or the command sequence of the command (without +% backslash) of the command, that should be added to the interface. +% \item[\marg{code}:] will be executed, only if the command could be +% added to the interface. +% \end{description} +% Add either a command sequence or a command to the user interface. +% \begin{macrocode} +%<*package&body> +\newcommand*{\scrlayerAddToInterface}[2][\@currname.\@currext]{% + \scrlayer@report@deprecated{#1}{\scrlayerAddToInterface}% + \begingroup + \edef\reserve@a{% + \noexpand\scrlayerAddCsToInterface[#1]{\expandafter\@gobble\string #2}% + }% + \expandafter\endgroup\reserve@a +} +\newcommand{\scrlayerAddCsToInterface}[3][\@currname.\@currext]{% + \scrlayer@report@deprecated{#1}{\scrlayerAddCsToInterface}% + \@ifundefined{scrlayer@#1@commandlist}{% + \PackageError{scrlayer}{unkown interface `#1'}{% + I've been told to add a command sequence to an interface, that hasn't + been\MessageBreak + defined yet. Please initialise every interface using + \string\InitInterface\space before\MessageBreak + trying to add command sequences to it.\MessageBreak + If you'll continue, the command will be ignored.% + }% + }{% + \@ifundefined{#2}{% + \scrlayer@AddCsToInterface[#1]{#2}#3% + }{% + \@ifundefined{scrlayer@command@#2}{% + \ifscrlayer@forceoverwrite + \PackageWarning{scrlayer}{% + Overloading `\@backslashchar#2'!\MessageBreak + scrlayer detected, that the given command\MessageBreak + has been defined already, when\MessageBreak + `#1' tried to define it again.\MessageBreak + Nevertheless, while scrlayer is in force overwrite\MessageBreak + mode currently, the original definition will be\MessageBreak + removed% + }% + \expandafter\let\csname #2\endcsname\relax + \scrlayer@AddCsToInterface[#1]{#2}#3% + \else + \PackageError{scrlayer}{cannot define `\@backslashchar#2'}{% + scrlayer interface `#1' has tried to + define command\MessageBreak + `\@backslashchar#2', but this has already been defined\MessageBreak + and is not part of another interface. So it cannot be + defined.\MessageBreak + Before continuing you should solve this conflict.\MessageBreak + Nevertheless, you may use option `forceoverwrite' to get only a + warning instead\MessageBreak + of an error. But this wouldn't solve the problem at + all!\MessageBreak + This error is almost fatal, so you should abort the LaTeX + run.% + }% + \fi + }{% + \ifscrlayer@autoremoveinterfaces + \PackageInfo{scrlayer}{% + already define interface command\MessageBreak + `\@backslashchar#2' detected.\MessageBreak + Command has been defined by interface\MessageBreak + `\@nameuse{scrlayer@command@#2}'.\MessageBreak + To continue installation of interface\MessageBreak + `#1', interface\MessageBreak + `\@nameuse{scrlayer@command@#2}' will\MessageBreak + be removed% + }% + \@nameuse{scrlayer@\@nameuse{scrlayer@command@#2}@onremove}% + \begingroup + \def\@elt##1{% + \aftergroup\let\aftergroup##1\aftergroup\relax + }% + \@nameuse{scrlayer@\@nameuse{scrlayer@command@#2}@commandlist}% + \endgroup + \expandafter\let\csname + scrlayer@\@nameuse{scrlayer@command@#2}@commandlist\endcsname\relax + \expandafter\let\csname + scrlayer@\@nameuse{scrlayer@command@#2}@onremove\endcsname\relax + \expandafter\let\csname #2\endcsname\relax + \scrlayer@AddCsToInterface[#1]{#2}#3% + \else + \PackageError{scrlayer}{cannot define `\@backslashchar#2'}{% + Interface command `\@backslashchar#2' has already + been\MessageBreak + defined by interface + `\@nameuse{scrlayer@command@#2}'.\MessageBreak + So it cannot be defined again.\MessageBreak + You may try scrlayer option `autoremoveinterfaces' to + automatically remove\MessageBreak + older interfaces in such conflict situations.\MessageBreak + For now, it's recommended so solve the problem before you'll + continue.% + }% + \fi + }% + }% + }% +}% +% \end{macrocode} +% \begin{macro}{\scrlayer@AddCsToInterface} +% Little helper, to avoid repeating this \cs{expandafter} orgy. +% \begin{description} +% \item[\oarg{string}:] the interface name (must be expandable and +% expand to a string) +% \item[\marg{command sequence}] the command sequence of the command to +% be added. +% \end{description} +% \begin{macrocode} +\newcommand*\scrlayer@AddCsToInterface[2][\@currname.\@currext]{% + \scrlayer@report@deprecated{#1}{\scrlayer@AddCsToInterface}% + \expandafter\expandafter\expandafter\def\expandafter + \csname scrlayer@#1@commandlist\expandafter\expandafter\expandafter\endcsname + \expandafter\expandafter\expandafter{% + \csname scrlayer@#1@commandlist\expandafter\endcsname + \expandafter\@elt\csname #2\endcsname + }% + \@namedef{scrlayer@command@#2}{#1}% +} +% +% \end{macrocode} +% \begin{option}{forceoverwrite} +% \begin{macro}{\ifscrlayer@forceoverwrite} +% \begin{description} +% \item[\marg{simple switch}:] whether or not to overwrite already +% defined command. Note: If true, there will still be a warning. +% \end{description} +% \begin{macrocode} +%<*options> +%<*package> +\KOMA@ifkey{forceoverwrite}{scrlayer@forceoverwrite} +%\scrlayer@@add@inherited@option{forceoverwrite} +% +%<*interface> +\KOMA@key{forceoverwrite}[true]{% + \KOMA@set@ifkey{forceoverwrite}{scrlayer@forceoverwrite}{#1}% + \KOMA@kav@replacebool{.scrlayer.sty}{forceoverwrite}{scrlayer@forceoverwrite}% +} +% +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @forceoverwrite\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @forceoverwrite@default\endcsname\relax +% +% \end{macrocode} +% \end{macro}^^A \ifscrlayer@forceoverwrite +% \end{option}^^A forceoverwrite +% +% \begin{option}{autoremoveinterfaces} +% \begin{macro}{\ifscrlayer@autoremoveinterfaces} +% \begin{description} +% \item[\marg{simple switch}:] whether or not older interfaces may be +% automatically removed in conflict cases. +% \end{description} +% \begin{macrocode} +%<*options> +%<*package> +\KOMA@ifkey{autoremoveinterfaces}{scrlayer@autoremoveinterfaces} +%\scrlayer@@add@inherited@option{autoremoveinterfaces} +% +%<*interface> +\KOMA@key{autoremoveinterfaces}[true]{% + \scrlayer@report@deprecated{#1}{autoremoveinterface}% + \KOMA@set@ifkey{autoremoveinterfaces}{scrlayer@autoremoveinterfaces}{#1}% + \KOMA@kav@replacebool{.scrlayer.sty}{autoremoveinterfaces} + {scrlayer@autoremoveinterfaces}% +} +% +% +%<*interface&body> +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @autoremoveinterfaces\endcsname\relax +\expandafter\let + \csname KV@KOMA.\@currname.\@currext @autoremoveinterfaces@default\endcsname + \relax +% +% \end{macrocode} +% \end{macro}^^A \ifscrlayer@autoremoveinterfaces +% \end{option}^^A autoremoveinterfaces +% \end{macro}^^A \scrlayer@AddCsToInterface +% \end{macro}^^A \scrlayerAddToInterface,\scrlayerAddCsToInterface +% +% \begin{macro}{\scrlayerInitInterface} +% \begin{description} +% \item[\oarg{string}:] the name of the interface. Generally this is +% the file name of the package or class, that defines the interface +% (default: \texttt{\cs{@currname}.\cs{@currext}}). +% \end{description} +% This registers a new user interface. +% \begin{macrocode} +%<*package&body> +\newcommand*{\scrlayerInitInterface}[1][\@currname.\@currext]{% + \scrlayer@report@deprecated{#1}{\scrlayerInitInterface}% + \@ifundefined{scrlayer@#1@commandlist}{% + \@namedef{scrlayer@#1@commandlist}{}% + }{% + \begingroup + \def\@elt##1{\space\space\string##1\MessageBreak}% + \PackageError{scrlayer}{interface `#1' already initialised}{% + You've tried to initialise scrlayer interface `#1',\MessageBreak + but an interface of this name has been initialised + already.\MessageBreak + Here's a list of all macros of the already initialised + interface:\MessageBreak + \@nameuse{scrlayer@#1@commandlist}.% + If you'll continue, this re-initialisation will be ignored.% + }% + \endgroup + }% +} +% +% \end{macrocode} +% \end{macro}^^A \scrlayerInitInterface +% +% \begin{macro}{\scrlayerOnAutoRemoveInterface} +% \begin{description} +% \item[\oarg{string}:] the name of the interface. Generally this is +% the file name of the package or class, that defines the interface +% (default: \texttt{\cs{@currname}.\cs{@currext}}). +% \item[\marg{code}:] will be executed if the interface will be removed +% automatically (see option \opt{autoremoveinterfaces}). +% \end{description} +% \begin{macrocode} +%<*package&body> +\newcommand*{\scrlayerOnAutoRemoveInterface}[2][\@currname.\@currext]{% + \scrlayer@report@deprecated{#1}{\scrlayerOnAutoRemoveInterface}% + \@ifundefined{scrlayer@#1@onremove}{\@namedef{scrlayer@#1@onremove}{}}{}% + \expandafter\l@addto@macro\csname scrlayer@#1@onremove\endcsname{#2}% +} +% +% \end{macrocode} +% \end{macro}^^A \scrlayerOnAutoRemoveInterface +% +% \begin{macro}{\scrlayer@report@deprecated} +% \changes{v3.32}{2020/09/11}{added} +% Report that the deprecated interface commands are used but should not. But +% report this only once per interface. +% \begin{macrocode} +%<*package&init> +\newcommand*{\scrlayer@report@deprecated}[2]{% + \@ifundefined{scrlayer@deprecated@reported@for@#1}{% + \PackageWarning{scrlayer}{% + Deprecated interface detected for `#1'.\MessageBreak + There isn't any support for using, e.g.,\MessageBreak + `\string #2'% + }% + \@namedef{scrlayer@deprecated@reported@for@#1}{\string #2}% + }{}% +} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrlfile-hook.dtx b/macros/latex/contrib/koma-script/scrlfile-hook.dtx new file mode 100644 index 0000000000..0216ea1db6 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrlfile-hook.dtx @@ -0,0 +1,707 @@ +% \iffalse^^A meta-comment +% ====================================================================== +% scrlfile-hook.dtx +% Copyright (c) Markus Kohm, 2021-2022 +% +% This file is part of the work `scrlfile' which 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.md. +% ====================================================================== +% +%%% From File: $Id: scrlfile-hook.dtx$ +%<*dtx> +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\begingroup + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2022-06-05 12:38:02 +0200 (So, 05. Jun 2022) $ + \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} + \filerevision$Revision: 3874 $ + \edef\reserved@a{% + \noexpand\endgroup + \noexpand\ProvidesFile{scrlfile-hook.dtx}% + [\filedate\space\filerevision\space + KOMA-Script package source + }% +\reserved@a +% +%\ProvidesPackage{scrlfile-hook}[% +%\ProvidesPackage{scrlfile-hook-3.34}[% +%!KOMAScriptVersion +% package + (using LaTeX hooks)] +%<*dtx> +\ifx\documentclass\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHTFROM}{2002} + \generate{\usepreamble\defaultpreamble + \file{scrlfile-hook.sty}{% + \from{scrlfile-hook.dtx}{package,current}% + \from{scrlogo.dtx}{logo}% + }% + \file{scrlfile-hook-3.34.sty}{% + \from{scrlfile-hook.dtx}{package,3.34}% + \from{scrlogo.dtx}{logo}% + }% + }% + \@@input scrstrop.inc +\else + \let\endbatchfile\relax +\fi +\endbatchfile +\documentclass[USenglish]{l3doc}% Using class for documentation of expl3 style packages. +\usepackage{babel} +\expandafter\let\expandafter\nodriver\csname iffalse\endcsname +\expandafter\let\expandafter\endnodriver\csname fi\endcsname +\makeatletter\input{scrlogo.dtx}\makeatother +\CodelineIndex + +\begin{document} + \DocInput{scrlfile-hook.dtx} +\end{document} +% +% \fi^^A meta-comment +% +% \changes{v3.32}{2020/08/25}{new (sub-)package} +% \changes{v3.36}{2022/02/03}{use new documentation style} +% \changes{v3.36}{2022/02/03}{using \file{scrlogo.dtx} to define the logo} +% +% \GetFileInfo{scrlfile-hook.dtx} +% \title{\pkg{scrlfile} \KOMAScript{} Sub-Packages \pkg{scrlfile-hook} and +% \pkg{scrlfile-hook-3.34}} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Revision \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% This package provides hooks before and after loading files, packages or +% classes. It also provides a hook after the last \cs{clearpage} of the +% document. It allowes to replace files, packages and classes by other +% files, packages and classes. It is inteded to be used by package and class +% authors but may also be used by \LaTeX{} users. +% \end{abstract} +% \tableofcontents +% +% +% \section{User Manual} +% +% \pkg{scrlfile-hook} implements the \LaTeX-hook-based part of +% \pkg{scrlfile}. \pkg{scrlfile-hook-3.34} is a variant for \LaTeX{} kernel +% versions before 2021/06/01. +% +% There isn't any user manual for the user level \LaTeXe{} commands in this +% file. Please see the manual of \pkg{scrlfile} for more information about +% \pkg{scrlfile-hook} and \pkg{scrlfile-hook-3.34}. +% +% This section, however, contains the user manual of the \LaTeX3{} package +% author commands. +% +% \begin{function}[TF, added = 2020-08-26] +% {\scrlfile_if_class_loaded:n,\scrlfile_if_package_loaded:n} +% \begin{syntax} +% \cs{scrlfile_if_class_loaded:nTF} \Arg{class name} \Arg{true code} \Arg{false code} +% \cs{scrlfile_if_package_loaded:nTF} \Arg{package name} \Arg{true code} \Arg{false code} +% \end{syntax} +% Tests if the class \meta{class name} resp. the package \meta{package name} +% has been loaded completely. It runs the \Arg{true code} only, if the input +% of the class file with the name \meta{class +% name}\file{.}\cs{@clsextension} resp. the package file with the name +% \meta{package name}\file{.}\cs{@pkgextension} has already been +% finished. It runs the \Arg{false code}, if the class or package has not +% been loaded or the input of the class or package file is still in +% progress. +% \end{function} +% +% +% \MaybeStop{\PrintIndex} +% +% \section{Implementation of \pkg{scrlfile-hook}} +% +% \begin{macrocode} +%<@@=scrlfile> +% \end{macrocode} +% +% Test whether the used \LaTeX{} provides all commands we need. +% \changes{v3.34}{2021/04/21}{make it more robust agains not recommended +% direct usage} +% \changes{v3.35}{2021/10/31}{new file version because \LaTeX{} kernel +% 2021/11/15 has changed the field order of gerneric hooks} +% \changes{v3.36}{2022/02/03}{package name in messages fixed} +% \begin{macrocode} +\@ifundefined{IfFormatAtLeastTF}{% + \PackageError{scrlfile-hook}{not recommended usage of package}{% + It seems this package has been loaded directly using a LaTeX + version\MessageBreak + prior to 2020-10-01. This is not recommended. Please always load + package\MessageBreak + scrlfile instead of scrlfile-hook.\MessageBreak + If you would continue, I will try to load scrlfile-patcholdlatex% + }% + \RequirePackage{scrlfile-patcholdlatex}\endinput +}{% + \IfFormatAtLeastTF{2020/10/01}{% + \IfFormatAtLeastTF{2021/11/15}{% +%<*3.34> + \PackageError{scrlfile-hook-3.34}{LaTeX too new for this package}{% + It seems this package has ben loaded directly using a LaTeX + version\MessageBreak + newer than 2021-06-01. This is not recommended. Please always load + package\MessageBreak + scrlfile instead of scrlfile-hook-3.34.\MessageBreak + If you would continue, I will try to load scrlfile-hook% + }% + \RequirePackage{scrlfile-hook}\endinput +% + }{% +%<*current> + \PackageError{scrlfile-hook}{LaTeX too old for this package}{% + It seems this package has been loaded directly using LaTeX + version\MessageBreak + prior to 2021-11-15. This is not recommended. Please always load + package\MessageBreak + scrlfile instead of scrlfile-hook.\MessageBreak + If you would continue, I will try to load scrlfile-hook-3.34% + }% + \RequirePackage{scrlfile-hook-3.34}\endinput +% + }% + }{% + \PackageError{scrlfile-hook}{LaTeX too old for this package}{% + It seems this package has been loaded directly using a LaTeX + version\MessageBreak + prior to 2020-10-01. This is not recommended. Please always load + package\MessageBreak + scrlfile instead of scrlfile-hook.\MessageBreak + If you would continue, I will try to load scrlfile-patcholdlatex% + }% + \RequirePackage{scrlfile-patcholdlatex}\endinput + }% +} +% \end{macrocode} +% +% +% \subsection{Before and After Commands} +% +% The hook implementation is based on a \LaTeX{} version that provides +% \LaTeX3. So it makes sense to use it. +% +% \begin{macrocode} +\ExplSyntaxOn +% \end{macrocode} +% +% \begin{macro}[updated = 2021-10-31]{\BeforeFile} +% The hook version of this command is just a wrapper to the corresponding +% \LaTeX{} file hooks. It supports a mandatory \meta{file} argument, an +% optional \meta{label} argument and a mandatory \meta{hook code} argument. +% From \LaTeX{} kernel version 2021/11/15 the hook has +% been changed from \texttt{file/before/\meta{file name}} to +% \texttt{file/\meta{file name}/before}. +% \begin{macrocode} +\NewDocumentCommand \BeforeFile { m } + { +%<3.34> \AddToHook { file / before / #1 } +% \AddToHook { file / #1 / before } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[updated = 2021-10-31]{\AfterFile} +% The hook version of this command is just a wrapper to the corresponding +% \LaTeX{} file hooks. It supports a mandatory \meta{file} argument, an +% optional \meta{label} argument and a mandatory \meta{hook code} argument. +% From \LaTeX{} kernel version 2021/11/15 the hook has +% been changed from \texttt{file/after/\meta{file name}} to +% \texttt{file/\meta{file name}/after}. +% \begin{macrocode} +\NewDocumentCommand \AfterFile { m } + { +%<3.34> \AddToHook { file / after / #1 } +% \AddToHook { file / #1 / after } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\BeforeClass,\BeforePackage} +% The hook version of these commands are also wrappers to the +% \texttt{file/before} hooks, because the \meta{code} should also be executed +% already in the class or package context. +% \begin{macrocode} +\NewDocumentCommand \BeforeClass { m } + { + \BeforeFile { #1.\@clsextension } + } +\NewDocumentCommand \BeforePackage { m } + { + \BeforeFile { #1.\@pkgextension } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[updated = 2021-10-31, updated = 2021-11-09] +% {\AfterAtEndOfClass,\AfterAtEndOfPackage} +% \changes{v3.35}{2021/10/31}{field order of generic hooks changed in +% \LaTeX{} 2021/11/15} +% \changes{v3.35}{2021/11/09}{hooks became one-time hooks in +% \LaTeX{} 2021/11/15} +% With version 3.32 the syntax of these commands have been changed. Now, there +% is also a star variant, that runs the \meta{code} immediately if the class +% or package has already been loaded completely. Otherwise and in the normal +% variant the \meta{code} is added to the \texttt{class/after} or +% \texttt{package/after} hook, because this hook is used outside the context +% of the class or package and after the \cs{AtEndOfClass} or +% \cs{AtEndOfPackage} code. +% From \LaTeX{} kernel version 2021/11/15 the hooks has +% been changed from \texttt{class/after/\meta{class name}} to +% \texttt{class/\meta{class name}/after} and from +% \texttt{package/after/\meta{package name}} to +% \texttt{package/\meta{package name}/after}. Additionally the hooks became +% one-time hooks. So they are executed immediately, if the class or package +% has already been loaded. Because of this, we additionally have to test this +% case in the non star variant. +% \begin{macrocode} +\NewDocumentCommand \AfterAtEndOfClass { s m o +m } + { + \IfBooleanTF { #1 } + { + \scrlfile_if_class_loaded:nTF { #2 } + { #4 } +%<3.34> { \hook_gput_code:nnn { class / after / #2 } { #3 } { #4 } } +% { \hook_gput_code:nnn { class / #2 / after } { #3 } { #4 } } + } +%<3.34> { \hook_gput_code:nnn { class / after / #2 } { #3 } { #4 } } +%<*current> + { + \scrlfile_if_class_loaded:nF + { #2 } + { \hook_gput_code:nnn { class / #2 / after } { #3 } { #4 } } + } +% + } +\NewDocumentCommand \AfterAtEndOfPackage { s m o +m } + { + \IfBooleanTF { #1 } + { + \scrlfile_if_package_loaded:nTF { #2 } + { #4 } +%<3.34> { \hook_gput_code:nnn { package / after / #2 } { #3 } { #4 } } +% { \hook_gput_code:nnn { package / #2 / after } { #3 } { #4 } } + } +%<3.34> { \hook_gput_code:nnn { package / after / #2 } { #3 } { #4 } } +%<*current> + { + \scrlfile_if_package_loaded:nF + { #2 } + { \hook_gput_code:nnn { package / #2 / after } { #3 } { #4 } } + } +% + } +% \end{macrocode} +% \end{macro} +% +% \begin{variable}[added = 2020-06-26, +% updated = 2021-01-01]{\g__scrlfile_input_file_seq} +% \changes{3.33}{2021/01/01}{message definition moved outside function} +% \cs{g__scrlfile_input_file_seq} is a sequence of active file inputs (without +% path information). Two global hooks are used to setup the sequence. The new +% conditional tests if a file is in the sequence. And a message is defined for +% the case of more pops than pushs to the stack. +% \begin{macrocode} +\seq_new:N \g__scrlfile_input_file_seq +\hook_gput_code:nnn { file / before } { . } + { \seq_gpush:Nx \g__scrlfile_input_file_seq { \CurrentFile } } +\msg_new:nnn { scrlfile-hook } { too-many-pops } + { + More~file~names~popped~from~stack~than~put~to.~ + This~should~never~happen.~ + However,~it~could~happen~if~scrlfile-hook~is~loaded~by~another~ + package~or~class.~In~this~case~some~packages~or~classes~are~not~ + recognised~correctly. + } +\hook_gput_code:nnn { file / after } { . } + { + \seq_gpop:NNF \g__scrlfile_input_file_seq \l_tmpa_seq + { + \msg_warning:nn { scrlfile-hook } { too-many-pops } + } + } +% \end{macrocode} +% Unfortunately we need an ugly hack to initialise the stack using an internal +% kernel variable. This is a no go but I do not know a better solution for +% this, because loading of the package could be done late. +% \begin{description} +% \item[ToDo:] Decide, if the second or fourth token is correct. If fourth, +% \cs{CurrentFile} has to be used always instead of \cs{CurrentFileUsed}. +% \end{description} +% \begin{macrocode} +\cs_if_exist:NTF \g__filehook_input_file_seq + { + \seq_map_inline:Nn \g__filehook_input_file_seq + { + \seq_gput_right:Nx \g__scrlfile_input_file_seq + { \tl_item:nn { #1 } { 2 } } + } + } + { + \seq_gpush:Nx \g__scrlfile_input_file_seq { } + \cs_if_exist:NTF \CurrentFileUsed + { \seq_gpush:Nx \g__scrlfile_input_file_seq { \CurrentFileUsed } } + { \seq_gpush:Nx \g__scrlfile_input_file_seq { \CurrentFile } } + } +% \end{macrocode} +% \end{variable} +% \begin{function}[TF, added = 2020-06-26]{\@@_if_loading:n} +% Test if the file name is in the file name list. +% \begin{macrocode} +\prg_new_protected_conditional:Npnn \__scrlfile_if_loading:n #1 { T, F, TF } + { + \str_set:Nx \l_tmpa_str { #1 } + \seq_if_in:NxTF \g__scrlfile_input_file_seq { \str_use:N \l_tmpa_str } + { \prg_return_true: } + { \prg_return_false: } + } +% \end{macrocode} +% \end{function} +% +% \begin{function}[TF, added = 2020/08/22] +% {\scrlfile_if_class_loaded:n,\scrlfile_if_package_loaded:n} +% \cs{scrlfile_if_class_loaded:nTF} is similar to \cs{@ifclassloaded} and +% \cs{scrlfile_if_package_loaded:nTF} is similar to \cs{@ifpackageloaded} but in +% opposite to those they test, if the class or package has been loaded +% completely. +% \begin{macrocode} +\prg_new_protected_conditional:Npnn \scrlfile_if_class_loaded:n #1 { T, F, TF } + { + \@ifclassloaded { #1 } + { + \__scrlfile_if_loading:nTF { #1.\@clsextension } + { \prg_return_false: } + { \prg_return_true: } + } + { + \prg_return_false: + } + } +\prg_new_protected_conditional:Npnn \scrlfile_if_package_loaded:n #1 { T, F, TF } + { + \@ifpackageloaded { #1 } + { + \__scrlfile_if_loading:nTF { #1.\@pkgextension } + { \prg_return_false: } + { \prg_return_true: } + } + { + \prg_return_false: + } + } +% \end{macrocode} +% \end{function} +% +% \begin{macro}[updated = 2021-10-31]{\AfterClass,\AfterPackage} +% With version 3.32 these do not support plus or exclamation mark variants, +% but only the normal and the star variants. Instead of the plus or +% exclamation mark variants users should use the star variant of +% \cs{AfterAtEndOfClass} and \cs{AfterAtEndOfPackage}. The commands use the +% \texttt{file/after} hook, because the user manual declares, that \meta{code} +% is used before the code of \cs{AtEndOfClass} or \cs{AtEndOfPackage}. +% From \LaTeX{} kernel version 2021/11/15 the hook has +% been changed from \texttt{file/after/\meta{file name}} to +% \texttt{file/\meta{file name}/after}. +% \begin{macrocode} +\NewDocumentCommand \scrlfile@AfterClass { s m o +m } + { + \IfBooleanTF { #1 } + { + \@ifclassloaded{ #2 } + { #4 } + { + \hook_gput_code:nnn +%<3.34> { file / after / #2.\@clsextension } +% { file / #2.\@clsextension / after } + { #3 } + { #4 } + } + } + { +%<3.34> \hook_gput_code:nnn { file / after / #2.\@clsextension } { #3 } { #4 } +% \hook_gput_code:nnn { file / #2.\@clsextension / after } { #3 } { #4 } + } + } +\NewDocumentCommand \AfterClass { } { \scrlfile@AfterClass } +\NewDocumentCommand \scrlfile@AfterPackage { s m o +m } + { + \IfBooleanTF { #1 } + { + \@ifpackageloaded{ #2 } + { #4 } + { + \hook_gput_code:nnn +%<3.34> { file / after / #2.\@pkgextension } +% { file / #2.\@pkgextension / after } + { #3 } + { #4 } + } + } + { +%<3.34> \hook_gput_code:nnn { file / after / #2.\@pkgextension } { #3 } { #4 } +% \hook_gput_code:nnn { file / #2.\@pkgextension / after } { #3 } { #4 } + } + } +\NewDocumentCommand \AfterPackage { } { \scrlfile@AfterPackage } +% \end{macrocode} +% \end{macro} +% +% +% \subsection{File Substitution} +% +% With new file hooks the substitutions are so easy we even do not need +% \LaTeX3 syntax to implement them. +% +% \begin{macro}{\ReplaceInput} +% This is only the simplest wrapper to \cs{declare@file@substitution}. +% \begin{macrocode} +\NewDocumentCommand{\ReplaceInput}{}{\declare@file@substitution} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ReplaceClass} +% \begin{macro}{\ReplacePackage} +% These are also wrappers to \cs{declare@file@substitution}. But in this case +% we also have to add the extension. +% \begin{macrocode} +\NewDocumentCommand\ReplaceClass{mm}{% + \declare@file@substitution{#1.\@clsextension}{#2.\@clsextension}% +} +\NewDocumentCommand\ReplacePackage{mm}{% + \declare@file@substitution{#1.\@pkgextension}{#2.\@pkgextension}% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\UnReplaceInput} +% This is the simplest wrapper to \cs{undeclare@file@substitution}. +% \begin{macrocode} +\NewDocumentCommand{\UnReplaceInput}{}{\undeclare@file@substitution} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\UnReplaceClass} +% \begin{macro}{\UnReplacePackage} +% Also very simple but again we have to add the extension. +% \begin{macrocode} +\NewDocumentCommand\UnReplaceClass{m}{% + \undeclare@file@substitution{#1.\@clsextension}% +} +\NewDocumentCommand\UnReplacePackage{mm}{% + \undeclare@file@substitution{#1.\@pkgextension}% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Prevent Package from Loading} +% +% To store and reset the hole list of prevents we use a comma separated +% list. So we need again use \LaTeX3. +% +% \begin{variable}[added = 2020-09-02]{\g__scrlfile_prevents_clist} +% This local variable stores the list of files, that should be prevented from +% loading. It is needed to stay compatible with old \file{scrlfile}. Without +% this compatibility purpose we would be able to use simple wrappers to +% \cs{disable@package@load} and \cs{reenable@package@load}. +% \begin{macrocode} +\clist_new:N \g__scrlfile_prevent_clist +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\PreventPackageFromLoading} +% This is more than a wrapper to \cs{disable@package@load} because we have to +% manage an internal list and it is documented, that the re-enabling does not +% undefine the \meta{alternate-code} setting but only disables it. So we have +% to extra store it. Note: Local loading of packages does not make sense, so +% local changes of the prevent list also does not make sense. Therefore this +% is a global acting command! +% \begin{macrocode} +\NewDocumentCommand \PreventPackageFromLoading { s +o m } + { + \clist_set:Nx \l__scrlfile_package_clist { #3 } + \clist_map_inline:Nn \l__scrlfile_package_clist + { + \@ifpackageloaded { ##1 } + { + \IfBooleanTF { #1 } { \msg_info:nnn } { \msg_warning:nnn } + { scrlfile } { no-prevent-for-already-loaded } { ##1 } + } + { + \clist_if_in:NnF \g__scrlfile_prevent_clist { ##1 } + { \clist_gput_right:Nn \g__scrlfile_prevent_clist { ##1 } } + \tl_if_exist:cF { g__scrlfile_exclude_package_##1_tl } + { + \tl_new:c { g__scrlfile_exclude_package_##1_tl } + } + \IfValueT { #2 } + { + \tl_gput_right:cn { g__scrlfile_exclude_package_##1_tl } { #2 } + } + \disable@package@load { ##1 } + { \tl_use:c { g__scrlfile_exclude_package_##1_tl } } + } + } + \clist_clear:N \l__scrlfile_package_clist + } +% \end{macrocode} +% +% \begin{macro}{\l__scrlfile_package_clist} +% One local variable is used to process the \meta{package-list} argument of +% \cs{PreventPackageFromLoading}. +% \begin{macrocode} +\clist_new:N \l__scrlfile_package_clist +% \end{macrocode} +% \end{macro} +% +% And here comes the message, that could be used either as a warning or as an +% info. +% \begin{macrocode} +\msg_new:nnn { scrlfile } { no-prevent-for-already-loaded } + { + Cannot~prevent~package~`#1'~from~being~loaded,~ + because~it~has~been~loaded~already~before~line~\msg_line_number: + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\StorePreventPackageFromLoading} +% This simply copies the internal \texttt{clist} to a macro. +% \begin{macrocode} +\NewDocumentCommand \StorePreventPackageFromLoading { m } + { \edef #1 { \clist_use:Nn \g__scrlfile_prevent_clist { , } } } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ResetPreventPackageFromLoading} +% Map the internal list to a function that re-enables the package. At the end +% the internal list is cleared. +% \begin{macrocode} +\NewDocumentCommand \ResetPreventPackageFromLoading {} + { + \clist_map_function:NN \g__scrlfile_prevent_clist \reenable@package@load + \clist_gclear:N \g__scrlfile_prevent_clist + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\UnPreventPackageFromLoading} +% Here again the argument is a \meta{package-list} not only one +% \meta{package}. So we have to build a local \texttt{clist} and walk through +% it. +% \begin{macrocode} +\NewDocumentCommand \UnPreventPackageFromLoading { s m } + { + \clist_set:Nx \l__scrlfile_package_clist { #2 } + \clist_map_inline:Nn \l__scrlfile_package_clist + { + \clist_if_in:NnT \g__scrlfile_prevent_clist { ##1 } + { + \clist_gremove_all:Nn \g__scrlfile_prevent_clist { ##1 } + \reenable@package@load { ##1 } + \IfBooleanT { #1 } + { \cs_undefine:c { g__scrlfile_exclude_package_##1_tl } } + } + } + } +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Extra Document Hooks} +% +% \begin{macro}{\BeforeClosingMainAux} +% \changes{v3.32}{2020/09/10}{optional argument added} +% Here we cannot simply wrap this to the hook +% \texttt{enddocument/afterlastpage}, because it is documented, that inside +% the \meta{code} \cs{protected@write} is replaced by +% \cs{immediate@protected@write}. So we have to take extra care to it. +% \begin{macrocode} +\NewDocumentCommand \BeforeClosingMainAux { o m } + { + \hook_gput_code:nnn { enddocument / afterlastpage } { #1 } + { + \debug_suspend: + \RenewDocumentCommand \BeforeClosingMainAux { m } { ##1 } + \cs_set_eq:NN \__scrlfile_protected@write:Nnn \protected@write + \cs_set_eq:NN \protected@write \protected@immediate@write + #2 + \cs_set_eq:NN \protected@write \__scrlfile_protected@write:Nnn + \debug_resume: + } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\AfterReadingMainAux} +% \changes{v3.32}{2020/09/10}{optional argument added} +% Here we the exact same problem as with \cs{BeforeClosingMainAux}. +% \begin{macrocode} +\NewDocumentCommand \AfterReadingMainAux { o m } + { + \hook_gput_code:nnn { enddocument / afteraux } { #1 } + { + \debug_suspend: + \RenewDocumentCommand \AfterReadingMainAux { m } { ##1 } + \cs_set_eq:NN \__scrlfile_protected@write:Nnn \protected@write + \cs_set_eq:NN \protected@write \protected@immediate@write + #2 + \cs_set_eq:NN \protected@write \__scrlfile_protected@write:Nnn + \debug_resume: + } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\ExplSyntaxOff +% \end{macrocode} +% +% \subsection{Kernel Extensions not Using \LaTeX3} +% +% \begin{macro}{\protected@immediate@write} +% Like \LaTeX{} kernel's |\protected@write| but using |\immediate\write|. In +% this case it is even not a good idea to protect |\thepage|! +% \begin{macrocode} +\ProvideDocumentCommand\protected@immediate@write{m+m+m} + {% + \begingroup + #2% + \let\protect\@unexpandable@protect + \edef\reserved@a{\immediate\write#1{#3}}% + \reserved@a + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi + } +% \end{macrocode} +% \end{macro} +% +% \Finale +% \PrintChanges +% +% \endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrlfile-patcholdlatex.dtx b/macros/latex/contrib/koma-script/scrlfile-patcholdlatex.dtx new file mode 100644 index 0000000000..c3ed266236 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrlfile-patcholdlatex.dtx @@ -0,0 +1,1251 @@ +% \iffalse^^A meta-comment +% ====================================================================== +% scrlfile-patcholdlatex.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% This file is part of the work `scrlfile' which 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.md. +% ====================================================================== +%%% From File: $Id: scrlfile-patcholdlatex.dtx 3874 2022-06-05 10:38:02Z kohm $ +%<*dtx> +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\begingroup + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2022-06-05 12:38:02 +0200 (So, 05. Jun 2022) $ + \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} + \filerevision$Revision: 3874 $ + \edef\reserved@a{% + \noexpand\endgroup + \noexpand\ProvidesFile{scrlfile-patcholdlatex.dtx}% + [\filedate\space\filerevision\space + KOMA-Script package source + }% +\reserved@a +% +%\ProvidesPackage{scrlfile-patcholdlatex}[% +%!KOMAScriptVersion +% package + (patching old LaTeX kernels)] +%<*dtx> +\ifx\documentclass\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHTFROM}{2002} + \generate{\usepreamble\defaultpreamble + \file{scrlfile-patcholdlatex.sty}{% + \from{scrlfile-patcholdlatex.dtx}{package}% + \from{scrlogo.dtx}{logo}% + }% + } + \@@input scrstrop.inc +\else + \let\endbatchfile\relax +\fi +\endbatchfile +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\begin{document} + \DocInput{scrlfile-patcholdlatex.dtx} +\end{document} +% +% \fi^^A meta-comment +% +% \changes{v2.95}{2002/06/11}{First version split from hugh scrclass.dtx} +% \changes{v3.24}{2017/05/06}{standalone manual removed} +% \changes{v3.32}{2020/09/02}{new (sub)-package} +% \changes{v3.36}{2022/02/03}{switch over from \cls*{scrdoc} to +% \cls*{koma-script-source-doc}} +% \changes{v3.36}{2022/02/03}{using \file{scrlogo.dtx} to define the logo} +% +% \GetFileInfo{scrlfile-patcholdlatex.dtx} +% \title{\pkg*{scrlfile} \KOMAScript{} Sub-Package \pkg*{scrlfile-patcholdlatex}} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Revision \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% This package provides hooks before and after loading files, packages or +% classes. It also provides a hook after the last \cs{clearpage} of the +% document. It allowes to replace files, packages and classes by other +% files, packages and classes. It is inteded to be used by package and class +% authors but may also be used by \LaTeX{} users. +% \end{abstract} +% \tableofcontents +% +% +% \section{User Manual} +% +% \pkg*{scrlfile-patcholdlatex} implements the part of \pkg*{scrlfile} +% that patches old \LaTeX{} kernels. +% +% There isn't any user manual for the user level \LaTeXe{} commands in this +% file. Please see the manual of \pkg*{scrlfile} for more information about +% \pkg*{scrlfile-patcholdlatex}. +% +% \MaybeStop{\PrintIndex} +% +% \section{Implementation of \pkg*{scrlfile-patcholdlatex}} +% +% +% \subsection{Patching \LaTeX{} Kernel Macros} +% +% Test whether the used \LaTeX{} is old enough. +% \changes{v3.34}{2021/04/21}{make it more robust agains not recommended +% direct usage} +% \changes{3.35}{2021/10/31}{\LaTeX{} kernel change results in new variant of +% \pkg*{scrfile-hook}} +% \begin{macrocode} +\@ifundefined{IfFormatAtLeastTF}{}{% + \IfFormatAtLeastTF{2020/10/01}{% + \PackageError{scrlfile-hook}{LaTeX too young for this package}{% + It seems this package has been loaded directly using a LaTeX + version\MessageBreak + 2020-10-01 or newer. This is not recommended. Please always load + package\MessageBreak + scrlfile instead of scrlfile-patcholdlatex.\MessageBreak + If you would continue, I will try to load scrlfile-hook% + \IfFormatAtLeast{2021/11/15}{}{-3.34}% + }% + \IfFormatAtLeastTF{2021/11/15}{% + \RequirePackage{scrlfile-hook}% + }{% + \RequirePackage{scrlfile-hook-3.34}% + }% + \endinput + }{}% +} +% \end{macrocode} +% +% \begin{command}{\InputIfFileExists} +% \changes{v2.96}{2006/07/19}{replacement code added} +% \LaTeX{} uses this macro for loading files with +% \cs{input}\marg{filename}, \cs{include}, \cs{LoadClass}, +% \cs{LoadClassWithOptions}, \cs{documentclass}, \cs{documentstyle}, +% \cs{RequirePackage}, \cs{usepackage}. Only +% \cs{input}~\meta{filename} loads \meta{filename} without using +% \cs{InputIfFileExists}. +% +% Because of this, it's very easy to add stuff before and after +% loading a file. We simply change this macro and add to +% macros\,---\,one before loading the file and one after loading the +% file. But before we redefine the macro, we test, if the macro was +% defined like we expected. \LaTeX{} will warn, if not. +% \changes{v3.27}{2019/10/06}{\LaTeX{} 2019-10-01 changed the definition} +% +% \changes{v3.28}{2019/11/21}{support for \cls{memoir}} +% With \cls{memoir} their is a special case. It also redefines +% \cs{InputIfFileExists}. As shown in the source of the class it does so +% because \pkg*{scrlfile} does it. However it does it not compatible with +% \pkg*{scrlfile} and it does not emulate \pkg*{scrlfile} as it do for +% other packages. So if you try to use \pkg*{scrlfile} with memoir, +% \pkg*{scrbase} has to take care to \cls{memoir}. And in oposit to +% \pkg*{scrlfile} \cls{memoir} does not always fix the argument order bug +% of \LaTeX{} but do so only for the implementation of \LaTeX{} 2019-10-01. +% So in case of \cls{memoir} we just patch every version of it without +% testing. +% \begin{macrocode} +\@ifclassloaded{memoir}{% + \PackageInfo{scrlfile}{class `memoir' detected.\MessageBreak + Using a compatible redefinition of \string\InputIfFileExists,\MessageBreak + but always robust and with the fix of the\MessageBreak + argument order bug even for old versions of the\MessageBreak + LaTeX kernel% + }% +}{% + \long\def\reserved@a#1#2{% + \IfFileExists{#1}% + {#2\@addtofilelist{#1}\@@input \@filef@und}}% + \ifx\reserved@a\InputIfFileExists\else + \expandafter\CheckCommand\expandafter*\expandafter\InputIfFileExists + \expandafter{% + \expandafter\protect\csname InputIfFileExists \endcsname + }% + \expandafter\CheckCommand \csname InputIfFileExists \endcsname[2]{% + \IfFileExists {#1}{% + \expandafter \@swaptwoargs \expandafter {\@filef@und }% + {#2\@addtofilelist {#1}\@@input }% + }% + }% + \fi +} +% \end{macrocode} +% Now we can redefine the macro like described above: +% \begin{macrocode} +\expandafter\renewcommand\expandafter*\expandafter\InputIfFileExists +\expandafter{\expandafter + \protect\csname InputIfFileExists \endcsname}% +\expandafter\long\expandafter\def\csname InputIfFileExists \endcsname#1#2{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname #1-@alias\endcsname\relax + \expandafter\@secondoftwo + \else + \scr@replacefile@msg{\csname #1-@alias\endcsname}{#1}% + \expandafter\@firstoftwo + \fi + {% + \expandafter\InputIfFileExists\expandafter{\csname + #1-@alias\endcsname}{#2}% + }% + {\IfFileExists{#1}{% + \expandafter\scr@input@withhook\expandafter{\@filef@und}{#1}{#2}% + }}% +} +% \end{macrocode} +% \begin{macro}{\scr@input@withhook} +% \changes{v3.27}{2019/03/28}{added} +% \changes{v3.28}{2019/11/21}{support for \cls{memoir}} +% We need a new internal, because of expanding \cs{@file@und} before inputting +% the file. +% \begin{macrocode} +\@ifclassloaded{memoir}{% + \newcommand{\scr@input@withhook}[3]{% + \scr@load@hook{before}{#2}% + #3\@addtofilelist{#2}% + \@ifundefined{m@matbeginf}{}{\m@matbeginf{#2}}% + \@@input #1% + \@ifundefined{m@matendf}{}{\m@matendf{#2}}% + \@ifundefined{killm@matf}{}{\killm@matf{#2}}% + \scr@load@hook{after}{#2}% + }% +}{% + \newcommand{\scr@input@withhook}[3]{% + \scr@load@hook{before}{#2}% + #3\@addtofilelist{#2}% + \@@input #1% + \scr@load@hook{after}{#2}% + }% +} +% \end{macrocode} +% \end{macro}^^A \scr@input@withhook +% \end{command}^^A \InputIfFileExists +% +% \begin{macro}{\@loadwithoptions} +% \changes{v2.96}{2006/07/19}{re-implementation} +% \begin{macro}{\scr@loadwithoptions} +% \changes{v2.96}{2006/07/19}{added} +% \begin{macro}{\scr@@loadwithoptions} +% \changes{v2.97a}{2007/03/07}{added} +% \LaTeX{} uses this macro for loading classes and packages using +% \cs{LoadClassWithOptions} or \cs{RequirePackageWithOptions}. We simply say +% now: if the class or package should be replaced by another, try it again +% with the replacement name. The stack is used. This will result in an +% error if the replacements are nested too deep. This should be, because it +% will also result in an error using ring replacements. +% \begin{macrocode} +\newcommand*{\scr@@loadwithoptions}{} +\newcommand*{\scr@loadwithoptions}{} +\let\scr@loadwithoptions\@loadwithoptions +\renewcommand*{\@loadwithoptions}[3]{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname #3.#1-@aliasname\endcsname\relax + \def\scr@@loadwithoptions{\scr@loadwithoptions{#1}{#2}{#3}}% + \else + \scr@replacefile@msg{\csname #3.#1-@aliasname\endcsname.#1}{#3.#1}% + \def\scr@@loadwithoptions{% + \@loadwithoptions{#1}{#2}{\csname #3.#1-@aliasname\endcsname}% + }% + \fi + \scr@@loadwithoptions +} +% \end{macrocode} +% \end{macro}^^A \scr@@loadwithoptions +% \end{macro}^^A \scr@loadwithoptions +% \end{macro}^^A \@loadwithoptions +% +% \begin{macro}{\@onefilewithoption} +% \changes{v2.96}{2006/07/19}{re-implementation} +% \begin{macro}{\scr@onefilewithoption} +% \changes{v2.96}{2006/07/19}{added} +% \begin{macro}{\scr@@onefilewithoption} +% \changes{v2.98}{2007/12/18}{added} +% \LaTeX{} uses this macro for loading classes and packages using +% \cs{LoadClass}, \cs{documentclass}, \cs{RequirePackage}, and +% \cs{usepackage}. We simply say now: if the class or package should be +% replaced by another, try it again with the replacement name. The stack is +% used. This will result in an error if the replacements are nested too +% deep. This should be, because it will also result in an error using ring +% replacements. +% \begin{macrocode} +\newcommand*{\scr@onefilewithoptions}{} +\let\scr@onefilewithoptions\@onefilewithoptions +\def\@onefilewithoptions#1[#2][#3]#4{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname #1.#4-@aliasname\endcsname\relax +% \end{macrocode} +% Do this ridiculous definition and call outside of \cs{ifx}\dots\cs{fi} +% because of some errornous packages like some versions of +% \pkg{breakurl}. This does not avoid an error, but the message about +% unclosed \cs{if} will be outside of \pkg*{scrlfile}. +% \begin{macrocode} + \def\scr@@onefilewithoptions{\scr@onefilewithoptions{#1}}% + \else + \scr@replacefile@msg{\csname #1.#4-@aliasname\endcsname.#4}{#1.#4}% + \edef\scr@@onefilewithoptions{% + \noexpand\@onefilewithoptions{\csname #1.#4-@aliasname\endcsname}}% + \fi + \scr@@onefilewithoptions[{#2}][{#3}]{#4}% + \scr@load@hook{lateafter}{#1.#4}% +} +% \end{macrocode} +% \end{macro}^^A \scr@@onefilewithoption +% \end{macro}^^A \scr@onefilewithoption +% \end{macro}^^A \@onefilewithoption +% +% \begin{macro}{\scr@replacefile@msg} +% \changes{v2.96}{2006/07/19}{added} +% \changes{v2.98}{2007/12/18}{spellfix} +% Last but not least \pkg*{scrlfile} will write a message to the log file at +% every replacement. +% \begin{macrocode} +\newcommand*{\scr@replacefile@msg}[2]{% + \PackageInfo{scrlfile}{inputing `#1' instead of `#2'}% +} +% \end{macrocode} +% \end{macro}^^A \scr@replacefile@msg +% +% \begin{macro}{\scr@load@hook} +% \changes{v3.27a}{2019/10/16}{workaround for strange handling of +% \cs{AtEndOfPackage} hook in \cs{@onefilewithoptions}} +% This macro simply calls a load-file-hook, either the \emph{before} +% or the \emph{after} one, if the hook exists. After calling the hook +% it will be deleted. First argument is the type of hook +% (\meta{before} or \meta{after}), second argument is a filename. +% \begin{macrocode} +\newcommand*{\scr@load@hook}[2]{% +% \end{macrocode} +% \begin{macro}{\scrlfile@cmp@hook} +% \changes{v3.27a}{2019/10/23}{renamed} +% \begin{macro}{\scrlfile@hookname} +% \changes{v3.27a}{2019/10/23}{renamed} +% \changes{v3.29}{2020/06/01}{do the class and package load hooks only in the +% document preamble}^^A --> https://komascript.de/node/2274 +% Workaround for strange handling of the \cs{AtEndOfPackage} hook in +% \cs{@onefilewithoptions} (becomes \cs{@empty}, if the package already has +% been loaded and is not loaded again). This workaround is not nice but +% smart. Before loading a file it defines a marker macro and undefines it +% later. To decide whether to define or remove the marker, two local macros +% are used \cs{scrlfile@hookname} and \cs{scrlfile@cmp@hook}. The first has +% the name of the current hook from the first argument. The other is a compare +% string. The first one is also valid while processing the hook, but only in +% the document preamble. The names are very unique, so we do not reserve them +% using \cs{newcommand} outside. The name of the marker is less +% unique. Nevertheless it is not reserved. +% Note: For recursive loading of files this does not work. But this also does +% not matter, because it is needed only for packages and classes, which are +% never loaded recursive. For the same reason from \KOMAScript{} 3.29 this is +% only used inside the document preamble. After the document preamble it can +% be dangerous, e.g., inside a |tabular| or |array|. +% \begin{macrocode} + \ifx\@begindocumenthook\@undefined\else + \edef\scrlfile@hookname{#1}% + \def\scrlfile@cmp@hook{before}% + \ifx\scrlfile@hookname\scrlfile@cmp@hook + \expandafter\def\csname #2-l@ading\endcsname{#2}% + \fi + \let\scrlfile@cmp@hook\@undefined + \fi + \@ifundefined{#2-@#1}{}{% + \@nameuse{#2-@#1}% + \expandafter\let\csname #2-@#1\endcsname\relax + }% +% \end{macrocode} +% The hook could destroy \cs{scrlfile@hookname} so define it again: +% \begin{macrocode} + \ifx\@begindocumenthook\@undefined\else + \edef\scrlfile@hookname{#1}% + \def\scrlfile@cmp@hook{after}% + \ifx\scrlfile@hookname\scrlfile@cmp@hook + \expandafter\let\csname #2-l@ading\endcsname\@undefined + \fi + \let\scrlfile@cmp@hook\@undefined + \let\scrlfile@hookname\@undefined + \fi +} +% \end{macrocode} +% \end{macro}^^A \scrlfile@hookname +% \end{macro}^^A \scrlfile@cmp@hook +% \end{macro}^^A \scr@load@hook +% +% \begin{macro}{\scr@set@load@hook} +% This command adds stuff to a load-file-hook, either the +% \emph{before} or the \emph{after} one. First argument is the type of +% hook (\meta{before} or \meta{after}), second is a filename. There's +% a third argument not parsed by the macro itself but +% \cs{g@addto@macro}. This third argument is the stuff, which will be +% added to the hook. Because of using \cs{g@addto@macro} the hook must +% be defined. So we define it, if it isn't. +% \begin{description} +% \item[ToDo:] Handling/ignoring an optional argument to make it more +% compatible with \LaTeX's new \cs{AddToHook}. +% \end{description} +% \begin{macrocode} +\newcommand*{\scr@set@load@hook}[2]{% + \@ifundefined{#2-@#1}{\@namedef{#2-@#1}{}}{}% + \expandafter\g@addto@macro\csname #2-@#1\endcsname +} +% \end{macrocode} +% \end{macro}^^A \scr@set@load@hook +% +% +% \subsection{Before and After Commands} +% +% \begin{command}{\BeforeFile,\AfterFile} +% Just add code to the \emph{before} or \emph{after} hook of a file. The +% arguments are: +% \begin{description} +% \item[\meta{file name}:] mandatory argument with the file name as given by +% \cs{InputIfFileExists}. +% \item[\meta{code}:] this argument is not processed by \cs{BeforeFile} or +% \cs{AfterFile} but the internal \cs{scr@set@load@hook}. It is the code +% that should be added to either the \emph{before} or the \emph{after} hook. +% \end{description} +% \begin{macrocode} +\newcommand*{\BeforeFile}{\scr@set@load@hook{before}} +\newcommand*{\AfterFile}{\scr@set@load@hook{after}} +% \end{macrocode} +% \end{command}^^A \BeforeFile,\AfterFile +% +% \begin{command}{\BeforeClass} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% This is quite simple. It only has to add code to the \emph{before} hook +% already known by \cs{BeforeFile}. The arguments are: +% \begin{description} +% \item[\meta{package name}:] mandatory argument. +% \item[\meta{code}:] this argument is processed not by \cs{BeforeClass} but +% by the internal \cs{scr@set@load@hook} (see above), that will add the code +% to the \emph{before} hook of file \meta{code}\texttt{.cls} (or whatever the +% package extension is). +% \end{description} +% \begin{macrocode} +\newcommand*{\BeforeClass}[1]{% + \scr@set@load@hook{before}{#1.\@clsextension}% +} +% \end{macrocode} +% \end{command}^^A \BeforeClass +% +% \begin{command}{\AfterClass} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \changes{v3.32}{2020/09/02}{plus and exclamation mark variants removed} +% \begin{command}{\AfterAtEndOfClass} +% \changes{v3.32}{2020/09/02}{star variant replaces the exclamation mark +% variant of \cs{AfterClass}} +% These are more complicated. There are four forms: +% \begin{description} +% \item[\cs{AfterClass}] corresponds to \cs{AfterFile}. So the code will be +% added to the usual \emph{after} hook and the code is exexuted before code +% added by the class itself using \cs{AtEndOfClass}. Argument procession +% will be done by \cs{@AfterClass}. +% \item[\cs{AfterAtEndOfClass}] This uses the \emph{lateafter} hook, which +% is executed after the class has been loaded completely inclusive the +% execution of \cs{AtEndOfClass} code. However, the code will never be +% executed, if the class will not be loaded (again). But it does nothing, +% if the class has already been loaded. The arguments are: +% \begin{description} +% \item[\meta{class name}] mandatory argument +% \item[\meta{code}:] this argument is processed not by \cs{BeforeClass} +% but by the internal \cs{scr@set@load@hook} (see above), that will add +% the code to the \emph{lateafter} hook of file \meta{code}\texttt{.cls} +% (or whatever the class extension is), or by \cs{@gobble}. +% \end{description} +% \item[\cs{AfterClass*}] like \cs{AfterClass}, but if loading of the +% class has already began, the code will be executed immediately. So, if +% the command is used inside the class it is simply +% \cs{@firstofone}. Argument procession will be done by \cs{@sAfterClass}. +% \item[\cs{AfterAtEndOfClass*}] like \cs{AfterClass*}, but the code will be +% executed immediately only if the class already has been loaded +% completely. Inside \cs{AtEndOfClass} the code is executed after every all +% the \cs{AtEndOfClass} code. Argument procession will be done by +% \cs{@xAfterClass}. +% \end{description} +% \begin{macrocode} +\newcommand*{\scrlfile@AfterClass}{% + \kernel@ifstar \@sAfterClass\@AfterClass +} +\newcommand*{\AfterClass}{\scrlfile@AfterClass} +% \end{macrocode} +% \begin{macro}{\@AfterClass} +% \cs{AfterClass}\marg{class name}\marg{code}. +% It uses \cs{scr@set@load@hook} to add \meta{code} to the +% \emph{after} hook. The second argument will be processed by +% \cs{scr@set@load@hook}. +% \begin{macrocode} +\newcommand*{\@AfterClass}[1]{% + \scr@set@load@hook{after}{#1.\@clsextension}% +} +% \end{macrocode} +% \end{macro}^^A \@AfterClass +% \begin{macro}{\@sAfterClass} +% \changes{v3.27a}{2019/10/16}{group removed} +% This is the internal implementation of: +% \cs{AfterClass*}\marg{class name}\marg{code}. +% It tests, whether or not \LaTeX{} thinks that the class +% has already been loaded, but this only means whether or not the class +% loading has already been started. If so, it immediately executes the next +% argument. If not, is uses \cs{@AfterClass} to execute the \meta{code} +% after loading the class. +% \begin{macrocode} +\newcommand*{\@sAfterClass}[1]{% + \@ifclassloaded{#1}{% + \@secondoftwo + }{% + \@AfterClass + }% + {#1}% +} +% \end{macrocode} +% \end{macro}^^A \@sAfterClass +% \begin{macrocode} +\newcommand*{\AfterAtEndOfClass}{% + \kernel@ifstar \@sAfterAtEndOfClass\@AfterAtEndOfClass +} +% \end{macrocode} +% \begin{macro}{\@AfterAtEndOfClass} +% \changes{v3.32}{2020/09/02}{added} +% Note that \cs{AfterAtEndOfClass} executed the \meta{code} after each try +% to load a class, even if the class has already been loaded and you try +% to load it again. +% \begin{macrocode} +\newcommand*{\@AfterAtEndOfClass}[1]{% + \scr@set@load@hook{lateafter}{#1.\@clsextension}% +} +% \end{macrocode} +% \begin{macro}{\@sAfterAtEndOfClass} +% \changes{v3.09}{2011/03/09}{added} +% \changes{v3.27}{2019/08/26}{using inside class fixed} +% \changes{v3.27a}{2019/10/15}{renamed from \cs{@@@AfterClass}} +% \changes{v3.27a}{2019/10/16}{usage of \emph{l@ading} marker} +% \changes{v3.27a}{2019/10/16}{group removed} +% \changes{v3.32}{2020/09/02}{renamed from \cs{@xAfterClass}} +% This is the internal implementation of: +% \cs{AfterClass!}\marg{class name}\marg{code}. Note, that the exclamation +% mark has not already read. So the arguments are: +% \begin{description} +% \item[\texttt{!}:] static exclamation mark, to be ignored. +% \item[\meta{class name}] mandatory argument +% \item[\meta{code}:] this argument is processed not by \cs{BeforeClass} but +% by the internal \cs{@sAfterClass} or \cs{@AfterClass} (see above). +% \end{description} +% There are two differences to \cs{@pAfterClass}: +% \begin{enumerate} +% \item In case of \cs{\meta{class name}.cls-l@ading} is defined (and not +% \cs{relax}), while loading a class, it used \cs{AfterAtEndOfClass} +% instead of \cs{AfterClass} to add \meta{code} to the \emph{lateafter} +% hook instead of the \emph{after} hook. +% \item In case of \cs{\meta{class name}.cls-l@ading} is undefined (or +% \cs{relax}) it also has to test, whether or not the class has already +% been loaded. If so, it uses \cs{@sAfterClass} to execute the \meta{code} +% immediately, otherwise it uses \cs{AfterAtEndOfClass} to add the +% \meta{code} to the \emph{lateafter} hook. +% \end{enumerate} +% So it is more like (the not existing) \cs{AfterAtEndOfClass+} than +% \cs{AfterAtEndOfClass*}. +% \begin{macrocode} +\newcommand*{\@sAfterAtEndOfClass}[1]{% + \@ifundefined{#1.\@clsextension-l@ading}{% + \@ifclassloaded{#1}{% + \@secondoftwo + }{% + \@AfterAtEndOfClass + }% + }{% + \@AfterAtEndOfClass + }% + {#1}% +} +% \end{macrocode} +% \end{macro}^^A \@sAfterAtEndOfClass +% \end{macro}^^A \@AfterAtEndOfClass +% \end{command}^^A \AfterAtEndOfClass +% \end{command}^^A \AfterClass +% +% \begin{command}{\BeforePackage} +% This is quite simple. It only has to add code to the \emph{before} hook +% already known by \cs{BeforeFile}. The arguments are: +% \begin{description} +% \item[\meta{package name}:] mandatory argument. +% \item[\meta{code}:] this argument is processed not by \cs{BeforePackage} but +% by the internal \cs{scr@set@load@hook} (see above), that will add the code +% to the \emph{before} hook of file \meta{code}\texttt{.sty} (or whatever the +% package extension is). +% \end{description} +% \begin{macrocode} +\newcommand*{\BeforePackage}[1]{% + \scr@set@load@hook{before}{#1.\@pkgextension}% +} +% \end{macrocode} +% \end{command}^^A \BeforePackage +% +% \begin{command}{\AfterPackage} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \begin{command}{\AfterAtEndOfPackage} +% These are more complicated. There are four forms: +% \begin{description} +% \item[\cs{AfterPackage}] corresponds to \cs{AfterFile}. So the code will be +% added to the usual \emph{after} hook and the code is exexuted before code +% added by the package itself using \cs{AtEndOfPackage}. Argument procession +% will be done by \cs{@AfterPackage}. +% \item[\cs{AfterAtEndOfPackage}] This uses the \emph{lateafter} hook, which +% is executed after the package has been loaded completely inclusive the +% execution of \cs{AtEndOfPackage} code. However, the code will never be +% executed, if the package will not be loaded (again). But it does nothing, +% if the package has already been loaded. The arguments are: +% \begin{description} +% \item[\meta{package name}] mandatory argument +% \item[\meta{code}:] this argument is processed not by \cs{BeforePackage} +% but by the internal \cs{scr@set@loaf@hook} (see above), that will add +% the code to the \emph{lateafter} hook of file \meta{code}\texttt{.sty} +% (or whatever the package extension is), or by \cs{@gobble}. +% \end{description} +% \item[\cs{AfterPackage*}] like \cs{AfterPackage}, but if loading of the +% package has already began, the code will be executed immediately. So, if +% the command is used inside the package it is simply +% \cs{@firstofone}.. +% \item[\cs{AfterAtEndOfPackage*}] like \cs{AfterPackage*}, but the code will +% be executed immediately only if the package already has been loaded +% completely. Inside \cs{AtEndOfPackage} the code is executed after every +% all the \cs{AtEndOfPackage} code. +% \end{description} +% \begin{macrocode} +\newcommand*{\scrlfile@AfterPackage}{% + \kernel@ifstar \@sAfterPackage\@AfterPackage +} +\newcommand*{\AfterPackage}{\scrlfile@AfterPackage} +% \end{macrocode} +% \begin{macro}{\@AfterPackage} +% This is the internal implementation of: +% \cs{AfterPackage}\marg{package name}\marg{code}. +% It uses \cs{scr@set@load@hook} to add \meta{code} to the +% \emph{after} hook. The second argument will be processed by +% \cs{scr@set@load@hook}. +% \begin{macrocode} +\newcommand*{\@AfterPackage}[1]{% + \scr@set@load@hook{after}{#1.\@pkgextension}% +} +% \end{macrocode} +% \end{macro}^^A \@AfterPackage +% \begin{macro}{\@sAfterPackage} +% \changes{v3.27a}{2019/10/16}{group removed} +% This is the internal implementation of: +% \cs{AfterPackage*}\marg{package name}\marg{code}. +% It tests, whether or not \LaTeX{} thinks that the package +% has already been loaded, but this only means whether or not the package +% loading has already been started. If so, it immediately executes the next +% argument. If not, is uses \cs{@AfterPackage} to execute the \meta{code} +% after loading the package. +% \begin{macrocode} +\newcommand*{\@sAfterPackage}[1]{% + \@ifpackageloaded{#1}{% + \@secondoftwo + }{% + \@AfterPackage + }% + {#1}% +} +% \end{macrocode} +% \end{macro}^^A \@sAfterPackage +% \begin{macrocode} +\newcommand*{\AfterAtEndOfPackage}{% + \kernel@ifstar \@sAfterAtEndOfPackage\@AfterAtEndOfPackage +} +% \end{macrocode} +% \begin{macro}{\@sAfterAtEndOfPackage} +% \changes{v3.09}{2011/03/09}{added} +% \changes{v3.27}{2019/08/26}{using inside package fixed} +% \changes{v3.27a}{2019/10/15}{renamed from \cs{@@@AfterPackage}} +% \changes{v3.27a}{2019/10/16}{usage of \emph{l@ading} marker} +% \changes{v3.27a}{2019/10/16}{group removed} +% \changes{v3.32}{2020/09/02}{renamed from \cs{@xAfterPackage}} +% This is the internal implementation of: +% \cs{AfterAtEndOfPackage*}\marg{package name}\marg{code}. +% \begin{macrocode} +\newcommand*{\@sAfterAtEndOfPackage}[1]{% + \@ifundefined{#1.\@pkgextension-l@ading}{% + \@ifpackageloaded{#1}{% + \@secondoftwo + }{% + \@@AfterAtEndOfPackage + }% + }{% + \@@AfterAtEndOfPackage + }% + {#1}% +} +% \end{macrocode} +% \end{macro}^^A \@sAfterAtEndOfPackage +% \begin{macro}{\@AfterAtEndOfPackage} +% \changes{v3.32}{2020/09/02}{added} +% \begin{macro}{\@@AfterAtEndOfPackage} +% \changes{v3.27a}{2019/10/15}{added} +% \changes{v3.27a}{2019/10/16}{group removed} +% \changes{v3.32}{2020/09/02}{renamed from \cs{@AfterAtEndOfPackage}} +% Note that until 3.27a \cs{AfterAtEndOfPackage} executed the \meta{code} +% after each try to load a package, even if the package has already been +% loaded and you've try to load it again. Since 3.27a this is the +% functionality of \cs{@AfterAtEndOfPackage}. \cs{AfterAtEndOfPackage} now +% does not do anything for already loaded packages or while loading the +% package. +% \begin{macrocode} +\newcommand*{\@AfterAtEndOfPackage}[1]{% + \@ifpackageloaded{#1}{% + \@ifundefined{#1.\@pkgextension-l@ading}{% + \@gobbletwo + }{% + \@@AfterAtEndOfPackage + }% + }{% + \@@AfterAtEndOfPackage + }% + {#1}% +} +\newcommand*{\@@AfterAtEndOfPackage}[1]{% + \scr@set@load@hook{lateafter}{#1.\@pkgextension}% +} +% \end{macrocode} +% \end{macro}^^A \@@AfterAtEndOfPackage +% \end{macro}^^A \@AfterEndOfPackage +% \end{command}^^A \AfterAtEndOfPackage +% \end{command}^^A \AfterPackage +% +% +% \subsection{File Substitution} +% +% \begin{command}{\ReplaceInput} +% \changes{v2.96}{2006/07/19}{added} +% \changes{v3.12}{2013/11/15}{implemented} +% Defining the replacement by definition of \cs{\#1-@alias}. +% \begin{macrocode} +\newcommand*{\ReplaceInput}[2]{% + \expandafter\edef\csname #1-@alias\endcsname{#2}% +} +% \end{macrocode} +% \begin{command}{\ReplaceFile} +% \changes{v2.96}{2006/07/19}{added} +% \changes{v3.12}{2013/11/15}{throw error} +% Sorry, but I've implemented the wrong command some time ago. +% \begin{macrocode} +\newcommand*{\ReplaceFile}{% + \PackageError{scrlfile}{% + usage of not documented command `\string\ReplaceFile'% + }{% + Command `\string\ReplaceFile' has been implemented accidentally in + KOMA-Script 2.96\MessageBreak + and replaced by `\string\ReplaceInput' in KOMA-Script 3.12.\MessageBreak + You should replace `\string\ReplaceFile' by `\string\ReplaceInput' to + avoid this error\MessageBreak + message% + }% + \ReplaceInput +} +% \end{macrocode} +% \end{command}^^A \ReplaceFile +% \end{command}^^A \ReplaceInput +% +% \begin{command}{\UnReplaceInput} +% \changes{v3.12}{2013/11/15}{added} +% Do not longer replace a file. +% \begin{macrocode} +\newcommand*{\UnReplaceInput}[1]{% + \ifcsname #1-@alias\endcsname + \expandafter\let\csname #1-@alias\endcsname\relax + \fi +} +% \end{macrocode} +% \end{command}^^A \UnReplaceInput +% +% \begin{command}{\ReplacePackage,\ReplaceClass} +% \changes{v2.96}{2006/07/19}{added} +% \begin{macro}{\@replacefilewithext} +% \changes{v2.96}{2006/07/19}{added} +% \changes{v3.32}{2020/09/09}{works global} +% Note that replacing a package or class will not replace the input of the +% file of the package or class but only the input of package or class. +% \begin{macrocode} +\newcommand*{\@replacefilewithext}[3]{% + \expandafter\xdef\csname #1.#3-@aliasname\endcsname{#2}% +} +\newcommand*{\ReplacePackage}[2]{% + \@replacefilewithext{#1}{#2}\@pkgextension +} +\newcommand*{\ReplaceClass}[2]{% + \@replacefilewithext{#1}{#2}\@clsextension +} +% \end{macrocode} +% \end{macro}^^A \@replacefilewithext +% \end{command}^^A\ReplacePackage,\ReplaceClass +% +% \begin{command}{\UnReplacePackage,\UnReplaceClass} +% \changes{v3.12}{2013/11/15}{added} +% \begin{macro}{\@unreplacefilewithext} +% \changes{v3.12}{2013/11/15}{added} +% \changes{v3.32}{2020/09/09}{works global} +% Do not nolonger replace a class or package. +% \begin{macrocode} +\newcommand*{\@unreplacefilewithext}[2]{% + \ifcsname #1.#2-@aliasname\endcsname + \expandafter\global\expandafter\let\csname #1.#2-@aliasname\endcsname\relax + \fi +} +\newcommand*{\UnReplacePackage}[1]{% + \@unreplacefilewithext{#1}\@pkgextension +} +\newcommand*{\UnReplaceClass}[1]{% + \@unreplacefilewithext{#1}\@clsextension +} +% \end{macrocode} +% \end{macro}^^A \@unreplacefilewithext +% \end{command}^^A \UnReplacePackage,\UnReplaceClass +% +% +% \subsection{Prevent Package from Loading} +% +% \begin{command}{\PreventPackageFromLoading} +% \changes{v3.08}{2010/11/04}{added} +% \changes{v3.11a}{2012/06/13}{write fault error in \cs{MessageBreak} fixed} +% \changes{v3.12}{2012/06/15}{new star version allowes empty argument with +% info instead of warning} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% \changes{v3.32}{2020/09/09}{works global} +% \begin{macro}{\@PreventPackageFromLoading} +% \changes{v3.12}{2012/06/15}{added} +% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by +% \cs{kernel@ifnextchar}} +% \begin{macro}{\@@PreventPackageFromLoading} +% \changes{v3.12}{2013/11/22}{added} +% \changes{v3.12}{2013/11/22}{\cs{usepackage} before \cs{documentclass} +% fixed} +% \begin{macro}{\scrlfile@excludedpackages} +% \changes{v3.08}{2010/11/04}{added} +% \begin{macro}{\scrlfile@saved@RequirePackage} +% \changes{v3.08}{2010/11/04}{added} +% \begin{macrocode} +\newcommand*{\scrlfile@excludedpackages}{} +\let\scrlfile@excludedpackages\@empty +\newcommand*{\scrlfile@saved@RequirePackage}{} +\newcommand*{\PreventPackageFromLoading}{% + \kernel@ifstar{\@PreventPackageFromLoading\PackageInfo}% + {\@PreventPackageFromLoading\PackageWarning}% +} +\newcommand*{\@PreventPackageFromLoading}[1]{% + \kernel@ifnextchar [%] + {\@@PreventPackageFromLoading#1}{\@@PreventPackageFromLoading#1[]}% +} +\newcommand*{\@@PreventPackageFromLoading}{} +\def\@@PreventPackageFromLoading#1[#2]#3{% +% \end{macrocode} +% We do nothing, if the argument was empty: +% \begin{macrocode} + \edef\reserved@b{\zap@space#3 \@empty}% + \ifx \reserved@b\@empty + #1{scrlfile}{% + \string\PreventPackageFromLoading\space with empty packages\MessageBreak + argument ignored% + }% + \else +% \end{macrocode} +% If the argument was not empty we first need to patch \cs{RequirePackage} and +% maybe \cs{usepackage} too. +% \begin{macrocode} + \ifx\scrlfile@excludedpackages\@empty + \global\let\scrlfile@saved@RequirePackage\RequirePackage + \global\let\RequirePackage\scrlfile@RequirePackage + \def\reserved@a##1##{% + \@latex@error + {\noexpand \usepackage before \string\documentclass}% + {\noexpand \usepackage may only appear in the document + preamble, i.e.,\MessageBreak + between \noexpand\documentclass and + \string\begin{document}.}% + \@gobble}% + \ifx\reserved@a\usepackage\else + \ifx\usepackage\scrlfile@saved@RequirePackage\else + \PackageWarning{scrlfile}{% + Maybe serious problem: unexpected definition of\MessageBreak + \string\usepackage + }% + \fi + \global\let\usepackage\RequirePackage + \fi + \fi +% \end{macrocode} +% We have to test, if a package was already loaded. Only not yet loaded +% packages will be added to the exclusion list. Empty arguments will be +% ignored. +% \changes{v3.11a}{2012/06/11}{missing \cs{scrlfile@excludedpackages} at +% redefinition of \cs{scrlfile@excludedpackages} added} +% \changes{v3.26}{2018/08/29}{spurious \cs{expandafter} removed} +% \begin{macrocode} + \@for\reserved@a:=\reserved@b\do {% + \ifx\reserved@a\@empty + #1{scrlfile}{% + empty package argument for + \string\PreventPackageFromLoading\MessageBreak + ignored% + }% + \else + \expandafter\@ifpackageloaded\expandafter{\reserved@a}{% + #1{scrlfile}{% + package `\reserved@a' already loaded.\MessageBreak + Cannot prevent it from beeing loaded% + }% + }{% + \ifx\scrlfile@excludedpackages\@empty + \global\let\scrlfile@excludedpackages\reserved@a + \else + \xdef\scrlfile@excludedpackages{\scrlfile@excludedpackages,% + \reserved@a}% + \fi + \if\relax\detokenize{#2}\relax\else + \@ifundefined{scrlfile@exclude@package@\reserved@a @do}{% + \@namedef{scrlfile@exclude@package@\reserved@a @do}{}% + }{}% + \expandafter\gdef + \csname scrlfile@exclude@package@\reserved@a + @do\expandafter\expandafter\expandafter\endcsname + \expandafter\expandafter\expandafter{% + \csname scrlfile@exclude@package@\reserved@a @do\endcsname + #2% + }% + \fi + }% + \fi + }% +% \end{macrocode} +% If the exclusion list is still empty (because all packages has been loaded +% already), remove the patch: +% \begin{macrocode} + \ifx\scrlfile@excludedpackages\@empty + \ResetPreventPackageFromLoading + \fi + \fi +} +\@onlypreamble\PreventPackageFromLoading +% \end{macrocode} +% \begin{command}{\ResetPreventPackageFromLoading} +% \changes{v3.08}{2010/11/04}{added} +% \changes{v3.32}{2020/09/09}{works global} +% \begin{command}{\StorePreventPackageFromLoading} +% \changes{v3.08}{2010/11/04}{added} +% These two are very simple +% \begin{macrocode} +\newcommand*{\ResetPreventPackageFromLoading}{% + \global\let\scrlfile@excludedpackages\@empty + \ifx\RequirePackage\scrlfile@RequirePackage + \ifx\usepackage\RequirePackage + \global\let\usepackage\scrlfile@saved@RequirePackage + \fi + \global\let\RequirePackage\scrlfile@saved@RequirePackage + \fi +} +\@onlypreamble\ResetPreventPackageFromLoading +\newcommand*{\StorePreventPackageFromLoading}[1]{% + \let#1\scrlfile@excludedpackages +} +\@onlypreamble\StorePreventPackageFromLoading +% \end{macrocode} +% \begin{command}{\UnPreventPackageFromLoading} +% \changes{v3.12}{2013/11/22}{added} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} durch \cs{kernel@ifstar} +% ersetzt} +% \changes{v3.32}{2020/09/09}{works global} +% \begin{macro}{\@UnPreventPackageFromLoading} +% \changes{v3.12}{2013/11/22}{added} +% This removes packages from the prevent exclude list. The star variant also +% undefines the instead code. +% \begin{macrocode} +\newcommand*{\UnPreventPackageFromLoading}{% + \kernel@ifstar {\@tempswatrue\@UnPreventPackageFromLoading}% + {\@tempswafalse\@UnPreventPackageFromLoading}% +} +\newcommand*{\@UnPreventPackageFromLoading}[1]{% + \edef\reserved@b{\zap@space#1 \@empty}% + \if@tempswa + \@for\reserved@a:=\reserved@b\do {% + \ifx\reserved@a\@empty \else + \ifcsname scrlfile@exclude@package@\reserved@a @do\endcsname + \expandafter\let + \csname scrlfile@exclude@package@\reserved@a @do\endcsname + \undefined + \fi + \fi + }% + \fi + \ifcsname scrlfile@excludedpackages\endcsname + \let\reserved@a\scrlfile@excludedpackages + \let\scrlfile@excludedpackages\@empty + \expandafter\@for\expandafter\reserved@c + \expandafter:\expandafter=\reserved@a + \do{% + \ifx\reserved@c\@empty\else + \@expandtwoargs\in@{,\reserved@c,}{,\reserved@b,}% + \ifin@ + \else + \ifx\scrlfile@excludepackages\@empty + \global\let\scrlfile@excludepackages\reserved@c + \else + \xdef\scrlfile@excludedpackages{% + \scrlfile@excludedpackages,\reserved@c + }% + \fi + \fi + \fi + }% + \ifx\scrlfile@excludedpackages\@empty\ResetPreventPackageFromLoading\fi + \fi +} +% \end{macrocode} +% \end{macro}^^A \@UnPreventPackageFromLoading +% \end{command}^^A \UnPreventPackageFromLoading +% \begin{macro}{\scrlfile@RequirePackage} +% \changes{v3.08}{2010/11/04}{added} +% \changes{v3.12}{2013/11/22}{tolerate spaces} +% \changes{v3.12}{2013/11/22}{execute the optional argument of +% \cs{PreventPackageFromLoading}} +% This macro will replace \cs{RequirePackage} whenever the exlude list is not +% empty +% \begin{macrocode} +\newcommand*{\scrlfile@RequirePackage}[2][]{% + \let\reserved@c\@empty + \let\reserved@d\@empty + \edef\reserved@b{\zap@space#2 \@empty}% + \expandafter\@for\expandafter\reserved@b\expandafter:\expandafter=\reserved@b + \do {% + \begingroup + \@tempswatrue + \@for\reserved@a:=\scrlfile@excludedpackages\do {% + \ifx\reserved@a\reserved@b + \@tempswafalse + \fi + }% + \if@tempswa + \xdef\reserved@c{\reserved@c,\reserved@b}% + \else + \ifx\reserved@b\@empty\else + \PackageInfo{scrlfile}{Excluding package `\reserved@b'\MessageBreak + from loading}% + \@ifundefined{scrlfile@exclude@package@\reserved@b @do}{% + }{% + \expandafter\g@addto@macro\expandafter\reserved@d + \csname scrlfile@exclude@package@\reserved@b @do\endcsname + }% + \fi + \fi + \endgroup + }% + \ifx\reserved@c\@empty + \let\reserved@a\scr@gobbleopt + \else + \edef\reserved@a{\noexpand\scrlfile@saved@RequirePackage[#1]{% + \expandafter\@gobble\reserved@c\@empty}}% + \fi + \expandafter\reserved@d + \reserved@a +} +% \end{macrocode} +% \end{macro}^^A \scrlfile@RequirePackage +% \end{command}^^A \StorePreventPackageFromLoading +% \end{command}^^A \ResetPreventPackageFromLoading +% \end{macro}^^A \scrlfile@saved@RequirePackage +% \end{macro}^^A \scrlfile@excludedpackages +% \end{macro}^^A \@@PreventPackageFromLoading +% \end{macro}^^A \@PreventPackageFromLoading +% \end{command}^^A \PreventPackageFromLoading +% +% \begin{macro}{\scr@gobbleopt} +% \changes{v3.08}{2010/11/04}{added} +% \changes{v3.08a}{2011/02/11}{\cs{@gobbleopt} renamed due to compaibility +% problems with \texttt{ntheorem}} +% Eat the optional argument if it exists. +% \begin{macrocode} +\providecommand{\scr@gobbleopt}[1][]{} +% \end{macrocode} +% \end{macro}^^A \scr@gobbleopt +% +% \begin{macro}{\kernel@ifstar} +% \changes{v3.20}{2016/04/12}{added} +% I hope, the \LaTeX{} kernel will define this command in future. But +% nevertheless, there are \LaTeX{} kernels in real live without this +% command. So I do it again if needed: +% \begin{macrocode} +\providecommand*\kernel@ifstar[1]{\kernel@ifnextchar*{\@firstoftwo{#1}}} +% \end{macrocode} +% \end{macro}^^A \kernel@ifstar +% +% +% \subsection{Extra Document Hooks} +% +% \begin{command}{\BeforeClosingMainAux} +% \changes{v2.95}{2002/09/03}{added} +% \begin{command}{\AfterReadingMainAux} +% \changes{v3.03}{2009/03/25}{added} +% These are completly different. First we have to establish a new hook +% at \cs{end\{document\}}, just after closing the group and after the +% final \cs{clearpage}. +% \begin{description} +% \item[ToDo:] Handling/ignoring an optional argument to make them more +% compatible with \LaTeX's new \cs{AddToHook}. +% \end{description} +% \begin{macrocode} +\AtEndDocument{% + \let\scr@saved@checkend=\@checkend + \renewcommand*{\@checkend}[1]{% + \def\reserved@a{#1}\def\reserved@b{document}% + \scr@saved@checkend{#1}% + \ifx\reserved@a\reserved@b + \let\scr@saved@clearpage=\clearpage + \renewcommand*{\clearpage}{\scr@saved@clearpage + \scr@hook@bcma + \scr@restore@newpage + \let\clearpage=\scr@saved@clearpage}% + \fi% + \let\scr@saved@dofilelist\@dofilelist + \def\@dofilelist{% + \scr@hook@acma + \let\@dofilelist\scr@saved@dofilelist + \scr@saved@dofilelist + }% + }% +} +% \end{macrocode} +% \begin{macro}{\scr@saved@checkend} +% \changes{v2.95}{2002/09/03}{added} +% \begin{macro}{\scr@saved@dofilelist} +% \changes{v3.03}{2009/03/25}{added} +% You may see above, that we need save-to macros. +% \begin{macrocode} +\newcommand*{\scr@saved@checkend}{} +\newcommand*{\scr@saved@dofilelist}{} +% \end{macrocode} +% \end{macro}^^A \scr@saved@dofilelist +% \end{macro}^^A \scr@saved@checkend +% \begin{macro}{\scr@redefine@newpage} +% \changes{v3.00}{2008/07/09}{added} +% Some classes (e.g. \cls{letter}) write output to the aux file. +% Because of this, redefinition of \cs{newpage} will only be done, if +% \cs{BeforeClosingMainAux} is used. +% \begin{macro}{\scr@saved@newpage} +% \changes{v3.00}{2008/07/09}{added} +% And \cs{newpage} will be restored after the hook. +% \begin{macro}{\scr@restore@newpage} +% \begin{macrocode} +\newcommand*{\scr@redefine@newpage}{% + \let\scr@saved@newpage\newpage + \def\scr@restore@newpage{% + \renewcommand*{\newpage}{% + \PackageWarningNoLine{% + scrlfile% + }{% + \string\newpage\space at main aux file!\MessageBreak + You have output material at the main aux file.\MessageBreak + Note, that the \string\BeforeClosingMainAux\space commands\MessageBreak + are processed before the output from aux file% + }% + \let\newpage\scr@saved@newpage + \newpage + }% + }% + \renewcommand*{\newpage}{% + \PackageError{% + scrlfile% + }{% + \string\newpage\space at \string\BeforeClosingMainAux + }{% + You should never use \string\newpage\space or + \string\clear(double)page or other output material at the\MessageBreak + argument of \string\BeforeClosingMainAux!\MessageBreak + If you'll continue, the \string\newpage\space will be ignored to + avoid corruption of\MessageBreak + every prior use of \string\BeforeClosingMainAux. + }% + }% +} +\newcommand*{\scr@restore@newpage}{} +% \end{macrocode} +% \end{macro}^^A \scr@restore@newpage +% \end{macro}^^A \scr@saved@newpage +% \end{macro}^^A \scr@redefine@newpage +% \begin{macro}{\scr@hook@bcma} +% \changes{v2.95}{2002/09/03}{added} +% \begin{macro}{\scr@hook@acma} +% \changes{v3.03}{2009/03/25}{added} +% We also need macros, that saves the commands at the hooks and are +% extendable using \cs{g@addto@macro}. +% \begin{macrocode} +\newcommand*{\scr@hook@bcma}{} +\newcommand*{\scr@hook@acma}{} +% \end{macrocode} +% \end{macro}^^A \scr@hook@acma +% \end{macro}^^A \scr@hook@bcma +% Now we are able to write the user command. Here we also warn, if we detect +% one more \cs{newpage}\,---\,maybe at a \cs{clearpage} or +% \cs{cleardoublepage}. +% \begin{macrocode} +\newcommand*{\BeforeClosingMainAux}{% + \ifx\scr@hook@bcma\@empty + \gdef\scr@hook@bcma{% + \renewcommand*{\BeforeClosingMainAux}[1]{####1}% + \let\protected@write\protected@immediate@write + \scr@redefine@newpage + }% + \fi + \g@addto@macro\scr@hook@bcma% +} +\newcommand*{\AfterReadingMainAux}{% + \ifx\scr@hook@acma\@empty + \gdef\scr@hook@acma{% + \renewcommand*{\AfterReadingMainAux}[1]{####1}% + \let\protected@write\protected@immediate@write + }% + \fi + \g@addto@macro\scr@hook@acma% +} +% \end{macrocode} +% \end{command}^^A \AfterReadingMainAux +% \end{command}^^A \BeforeClosingMainAux +% +% \begin{macro}{\protected@immediate@write} +% Like \LaTeX{} kernel's |\protected@write| but using |\immediate\write|. In +% this case it is even not a good idea to protect |\thepage|! +% \begin{macrocode} +\long\def\protected@immediate@write#1#2#3{% + \begingroup + #2% + \let\protect\@unexpandable@protect + \edef\reserved@a{\immediate\write#1{#3}}% + \reserved@a + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi +} +% \end{macrocode} +% \end{macro} +% +% +% \Finale +% \PrintChanges +% \endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrlfile.dtx b/macros/latex/contrib/koma-script/scrlfile.dtx new file mode 100644 index 0000000000..027c998175 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrlfile.dtx @@ -0,0 +1,273 @@ +% \iffalse^^A meta-comment +% ====================================================================== +% scrlfile.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% This file is part of the work `scrlfile' which 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.md. +% ====================================================================== +%%% From File: $Id: scrlfile.dtx 3874 2022-06-05 10:38:02Z kohm $ +%<*dtx> +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\begingroup + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2022-06-05 12:38:02 +0200 (So, 05. Jun 2022) $ + \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} + \filerevision$Revision: 3874 $ + \edef\reserved@a{% + \noexpand\endgroup + \noexpand\ProvidesFile{scrlfile.dtx}% + [\filedate\space\filerevision\space + KOMA-Script package source + }% +\reserved@a +% +%\ProvidesPackage{scrlfile}[% +%!KOMAScriptVersion +% package + (file load hooks)] +%<*dtx> +\ifx\documentclass\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHTFROM}{2002} + \generate{\usepreamble\defaultpreamble + \file{scrlfile.sty}{% + \from{scrlfile.dtx}{package}% + \from{scrlogo.dtx}{logo}% + }% + } + \batchinput{scrlfile-hook.dtx} + \batchinput{scrlfile-patcholdlatex.dtx} + \@@input scrstrop.inc +\else + \let\endbatchfile\relax +\fi +\endbatchfile +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\setcounter{StandardModuleDepth}{1} +\begin{document} + \DocInput{scrlfile.dtx} +\end{document} +% +% \fi^^A meta-comment +% +% \changes{v2.95}{2002/06/11}{First version split from hugh scrclass.dtx} +% \changes{v3.24}{2017/05/06}{standalone manual removed} +% \changes{v3.32}{2020/09/11}{new implementation based on +% \pkg*{scrlfile-hook} and \pkg*{scrlfile-patcholdlatex}} +% \changes{v3.36}{2022/02/03}{switch over from \cls*{scrdoc} to +% \cls*{koma-script-source-doc}} +% \changes{v3.36}{2022/02/03}{using \file{scrlogo.dtx} to define the logo} +% +% \GetFileInfo{scrlfile.dtx} +% \title{File Loading Hooks with \href{https://komascript.de}{\KOMAScript} +% Package \pkg*{scrlfile}} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Revision \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% This package is the compatibility layer over \texttt{scrlfile-hook} and +% \texttt{scrlfile-patcholdlatex}. It provides package and class hook +% handling independent from the used \LaTeX{} release. +% \end{abstract} +% \tableofcontents +% +% +% \section{User Manual} +% +% You can find the user manual of \pkg*{scrlfile} in the \KOMAScript{} manual, +% either the German \file{scrguide} or the English \file{scrguien}. +% Here you can find interim documentation only (before it is added to the +% \KOMAScript{} manual). +% +% \DescribeOption{withdeprecated} +% Package option \opt{withdeprecated} enables the definition of deprecated +% commands \cs{AfterClass+}, \cs{AfterPackage+}, \cs{AfterClass!} and +% \cs{AfterPackage!}. All of them will be emulated by \cs{AfterAtEndOClass*} +% and \cs{AfterAtEndOfPackage*} so they are not completely compatible with the +% original deprecated commands. +% +% Users of classes or package, that use such deprecated commands can load +% \pkg*{scrlfile} already before the class using: +%\begin{verbatim} +% \RequirePackage[withdeprecated]{scrlfile} +%\end{verbatim}% +% or adding option \opt{withdeprecated} to the global options of +% \cs{documentclass}. Note, this is not a key-value option. It cannot be +% changed after loading \pkg*{scrlfile}. +% +% \MaybeStop{\PrintIndex} +% +% \section{Implementation of \pkg*{scrlfile}} +% +% We need to load one of the packages \pkg*{scrlfile-hook}, +% \pkg*{scrlfile-kook-3.34}, \pkg*{scrlfile-patcholdlatex}. +% \changes{v3.33}{2021/02/09}{do not test for existence of \cs{AddToHook} any +% longer, but \cs{IfFormatAtLeastTF} and the format version}% +% We cannot do the decision by testing the existence of macro \cs{AddToHook}, +% because package \pkg{latexrelease} does not rollback to prior format +% versions good enough. Instead of undefining the macro and so really +% reverting to the definition of \LaTeX{} kernels prior to 2020/10/01 it only +% redefines it to a do-nothing macro. Because of this and similar issues with +% \pkg{latexrelease} cannot (or only with provision) be used to simulate a +% real old \LaTeX{} kernel, i.e. for testing. So the only valid test for the +% existence of the wanted \cs{AddToHook} would be to test the definite +% definition of \cs{AddToHook} and the existence of the hooks we are +% using. But, because this is to much effort, we simply test the format +% version. Nevertheless, we know, this may fail! +% \begin{macrocode} +\@ifundefined{IfFormatAtLeastTF}{% + \RequirePackage{scrlfile-patcholdlatex}% + \RequirePackage{xparse}% +% \end{macrocode} +% \changes{v3.33}{2021/02/16}{workaround for \pkg{latexrelease} bug} +% Explicitly switch of \pkg{expl3} syntax because of a +% \pkg{latexrelease} bug related to the usage of \pkg{xparse-2020-10-01} in +% version 2020-02-02. +% \changes{v3.35}{2021/10/31}{new variant because of \LaTeX{} kernel change} +% \begin{macrocode} + \ExplSyntaxOff +}{% + \IfFormatAtLeastTF{2020/10/01}{% + \IfFormatAtLeastTF{2021/11/15}{% + \RequirePackage{scrlfile-hook}% + }{% + \RequirePackage{scrlfile-hook-3.34}% + }% + }{% + \RequirePackage{scrlfile-patcholdlatex}% + \RequirePackage{xparse}% +% \end{macrocode} +% Explicitly switch of \pkg{expl3} syntax because of a +% \pkg{latexrelease} bug in version 2020-02-02. +% \begin{macrocode} + \ExplSyntaxOff + }% +} +% \end{macrocode} +% +% \begin{option}{withdeprecated} +% \changes{v3.32}{2020/09/11}{added} +% Depending on this option we implement addition deprecated commands. +% \begin{macrocode} +\DeclareOption{withdeprecated}{% +% \end{macrocode} +% +% \begin{command}[noindex]{\AfterClass+,\AfterClass!} +% \cs{scrlfile@AfterClass} is used in the sub-packages to store the original +% \cs{AfterClass} and can be used to redefine \cs{AfterClass} to handle the +% plus and the exclamation mark variant. +% \begin{macrocode} + \RenewDocumentCommand\AfterClass{}{% +% \end{macrocode} +%^^A Hack for correct line numbers in the index: +%^^A - end environment, +%^^A - do index entries +%^^A - fix vertical spaces +%^^A - restart environment without printing and indexing +% \end{command} +% \SpecialMainCommandIndex{\AfterClass+} +% \SpecialMainCommandIndex{\AfterClass\quotechar!} +% \vskip-\dimexpr 2.2\baselineskip+\parskip\relax +% \begin{command}[noindex,noprint]{\AfterClass+,\AfterClass!} +% \begin{macrocode} + \kernel@ifnextchar +% + {\scrlfile@emulatedeprecated{Class}}% + {% + \kernel@ifnextchar !% + {\scrlfile@emulatedeprecated{Class}}% + \scrlfile@AfterClass + }% + } +% \end{macrocode} +% \end{command} +% +% \begin{command}[noindex]{\AfterPackage+,\AfterPackage!} +% \cs{scrlfile@AfterPackage} is used in the sub-packages to store the original +% \cs{AfterPackage} and can be used to redefine \cs{AfterPackage} to handle +% the plus and the exclamation mark variant. +% \begin{macrocode} + \RenewDocumentCommand\AfterPackage{}{% +% \end{macrocode} +%^^A Hack for correct line numbers in the index: +%^^A - end environment, +%^^A - do index entries +%^^A - fix vertical spaces +%^^A - restart environment without printing and indexing +% \end{command} +% \SpecialMainCommandIndex{\AfterPackage+} +% \SpecialMainCommandIndex{\AfterPackage\quotechar!} +% \vskip-\dimexpr 2.2\baselineskip+\parskip\relax +% \begin{command}[noindex,noprint]{\AfterPackage+,\AfterPackage!} +% \begin{macrocode} + \kernel@ifnextchar +% + {\scrlfile@emulatedeprecated{Package}}% + {% + \kernel@ifnextchar !% + {\scrlfile@emulatedeprecated{Package}}% + \scrlfile@AfterPackage + }% + } +% \end{macrocode} +% \end{command} +% +% \begin{macro}{\scrlfile@emulatedeprecated} +% \changes{v3.32}{2020/09/11}{added} +% This emulates \cs{AfterClass+}, \cs{AfterPackage+}, \cs{AfterClass!} and +% \cs{AfterPackage!} using \cs{AfterAtEndOfClass} or +% \cs{AfterAtEndOfPackage}. Note, that both, the plus and the exclamation mark +% variants, are emulated by the star variant of \cs{AfterAtEndOfClass} +% resp. \cs{AfterAtEndOfPackage}. So the emulation is not perfect. +% \begin{macrocode} + \newcommand*{\scrlfile@emulatedeprecated}[2]{% + \PackageWarning{scrlfile}{% + emulating deprecated \expandafter\string\csname After#1#2\endcsname + \space by\MessageBreak + \expandafter\string\csname AfterAtEndOf#1*\endcsname.\MessageBreak + Note, this may fail, so you should not use\MessageBreak + \expandafter\string\csname After#1#2\endcsname + }% + \csname AfterAtEndOf#1\endcsname*% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +} +% \end{macrocode} +% \end{option} +% +% Now, we just have to execute and process the options. +% \begin{macrocode} +\ExecuteOptions{} +\ProcessOptions\relax +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +% \endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrlogo.dtx b/macros/latex/contrib/koma-script/scrlogo.dtx new file mode 100644 index 0000000000..c2c05f1705 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrlogo.dtx @@ -0,0 +1,138 @@ +% \iffalse^^A meta-comment +% ====================================================================== +% scrlogo.dtx +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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 the file `scrlogo.dtx' at least. +% ====================================================================== +% +%%% From File: $Id: scrlogo.dtx 3688 2022-02-10 08:26:37Z kohm $ +%<*dtx> +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\begingroup + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2022-02-10 09:26:37 +0100 (Do, 10. Feb 2022) $ + \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} + \filerevision$Revision: 2631 $ + \edef\reserved@a{% + \noexpand\endgroup + \noexpand\ProvidesFile{scrlogo.dtx}% + [\filedate\space\filerevision\space + KOMA-Script package source + }% +\reserved@a +% +%<*dtx|package> +%\ProvidesPackage{scrlogo}[% +%!KOMAScriptVersion +% package + (logo)] +% +%<*dtx> +\ifx\documentclass\undefined + \ifx\ifTopLevel\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHTFROM}{2002} + \generate{\usepreamble\defaultpreamble + \file{scrlogo.sty}{\from{scrlogo.dtx}{package,logo}}% + } + \@@input scrstrop.inc + \fi +\else + \let\endbatchfile\relax +\fi +\endbatchfile +% Make it possible to load scrlogo.dtx directly. +\csname nodriver\endcsname +\expandafter\let\csname endnodriver\endcsname\relax +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\setcounter{StandardModuleDepth}{2} +\begin{document} + \DocInput{scrlogo.dtx} +\end{document} +\endnodriver +% +% \fi^^A meta-comment +% +% \changes{v3.36}{2022/02/02}{switch over from \cls*{scrdoc} to +% \cls*{koma-script-source-doc}} +% \changes{v3.36}{2022/02/02}{whole implementation documentation in English} +% +% \GetFileInfo{scrlogo.dtx} +% \title{\href{https://komascript.de}{\KOMAScript} \partname\ \file{\filename}} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Revision \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% This part of \KOMAScript{} provides not only the \cs{KOMAScript} command +% for all \KOMAScript{} classes and packages, but also a standalone package +% to provide the logo. +% \end{abstract} +% \tableofcontents +% +% \section{User Manual} +% +% You can find the user manual of \pkg*{scrlogo} in the \KOMAScript{} manual, +% either the German \file{scrguide} or the English \file{scrguien}. +% +% \MaybeStop{\PrintIndex} +% +% \section{Implementation of the \KOMAScript{} Logo} +% +% \begin{command}{\KOMAScript} +% \changes{v3.36}{2022/02/02}{respect \pkg{hyperref}} +% \changes{v3.36}{2022/02/02}{other packages and classes load \pkg*{scrlogo} +% instead of defining the command itself} +% From version~3.36, the letter spacing of the upper case letters is not used +% in PDF context of package \pkg{hyperref}. +% \begin{macrocode} +%<*logo> +%\IfFileExists{scrlogo.sty}{% +%\RequirePackage{scrlogo} +%}{}% +%<*(package|forcedefine)&logo> +\@ifundefined{KOMAScript}{% + \DeclareRobustCommand*{\KOMAScript}{\textsf{K\kern.05em O\kern.05em% + M\kern.05em A\kern.1em-\kern.1em Script}}% + \@ifundefined{pdfstringdefPreHook}{% + \def + }{% + \g@addto@macro + }% + \pdfstringdefPreHook{% + \def\KOMAScript{KOMA-Script}% + \expandafter\def\csname KOMAScript \endcsname{KOMA-Script}% + }% +}{} +% +% +% \end{macrocode} +% \end{command} +% +% \Finale +% \PrintChanges +% +\endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: + diff --git a/macros/latex/contrib/koma-script/scrmain.ins b/macros/latex/contrib/koma-script/scrmain.ins new file mode 100644 index 0000000000..5974260a79 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrmain.ins @@ -0,0 +1,457 @@ +% ====================================================================== +% scrmain.ins +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== + +% $Id: scrmain.ins 3889 2022-06-09 12:11:14Z kohm $ + +% ---------- KOMA-Script default docstrip declarations ----------------- + +\input scrdocstrip.tex +\@@input scrkernel-version.dtx +\@@input scrstrip.inc + +% ---------- File generation ------------------------------------------- + +\generate{\usepreamble\defaultpreamble + \file{scrextend.sty}{% + \from{scrextend.dtx}{package,extend,preidentify}% + \from{scrkernel-version.dtx}{package,extend}% + \from{scrextend.dtx}{package,extend,identify,prepare}% + \from{scrkernel-basics.dtx}{package,load}% + \from{scrkernel-sections.dtx}{package,extend,prepare}% + \from{scrkernel-compatibility.dtx}{package,extend,init}% +% \from{scrkernel-typearea.dtx}{package,extend,init}% + \from{scrextend.dtx}{package,extend,option}% + \from{scrkernel-compatibility.dtx}{package,extend,option}% + \from{scrkernel-miscellaneous.dtx}{package,extend,option}% + \from{scrkernel-fonts.dtx}{package,extend,option}% +% \from{scrkernel-typearea.dtx}{package,extend,option}% +% \from{scrkernel-paragraphs.dtx}{package,extend,option}% + \from{scrkernel-title.dtx}{package,extend,option}% + \from{scrkernel-sections.dtx}{package,extend,option}% + \from{scrkernel-pagestyles.dtx}{package,extend,option}% + \from{scrkernel-floats.dtx}{package,extend,option}% + \from{scrkernel-footnotes.dtx}{package,extend,option}% +% \from{scrkernel-listsof.dtx}{package,extend,option}% +% \from{scrkernel-bibliography.dtx}{package,extend,option}% +% \from{scrkernel-index.dtx}{package,extend,option}% + \from{scrkernel-listsandtabulars.dtx}{package,extend,option}% + \from{scrkernel-sections.dtx}{package,extend,execoption}% + \from{scrkernel-miscellaneous.dtx}{package,extend,execoption}% + \from{scrkernel-compatibility.dtx}{package,extend,body}% + \from{scrkernel-fonts.dtx}{package,extend,body}% +% \from{scrkernel-typearea.dtx}{package,extend,body}% +% \from{scrkernel-paragraphs.dtx}{package,extend,body}% + \from{scrkernel-title.dtx}{package,extend,body}% + \from{scrkernel-sections.dtx}{package,extend,body}% + \from{scrkernel-miscellaneous.dtx}{package,extend,body}% + \from{scrkernel-pagestyles.dtx}{package,extend,body}% + \from{scrkernel-floats.dtx}{package,extend,body}% + \from{scrkernel-footnotes.dtx}{package,extend,body}% +% \from{scrkernel-listsof.dtx}{package,extend,body}% +% \from{scrkernel-bibliography.dtx}{package,extend,body}% +% \from{scrkernel-index.dtx}{package,extend,body}% + \from{scrkernel-listsandtabulars.dtx}{package,extend,body}% + \from{scrlogo.dtx}{logo}% + }% +} + +\generate{\usepreamble\defaultpreamble +% \file{scrbook.cls}{% commented (long version is same as short version below) +% \from{scrkernel-version.dtx}{class,book,long}% +% }% + \file{scrreport.cls}{% + \from{scrkernel-version.dtx}{class,report,long}% + }% + \file{scrarticle.cls}{% + \from{scrkernel-version.dtx}{class,article,long}% + }% + \file{scrletter.cls}{% + \from{scrkernel-version.dtx}{class,letter,long}% + }% +} + +\generate{\usepreamble\defaultpreamble + \file{scrbook.cls}{% + \from{scrkernel-version.dtx}{class,book}% + \from{scrkernel-basics.dtx}{class,load}% + \from{scrkernel-listsof.dtx}{class,book,prepare}% + \from{scrkernel-tocstyle.dtx}{class,book,prepare}% + \from{scrkernel-sections.dtx}{class,book,prepare}% + \from{scrkernel-compatibility.dtx}{class,book,init}% + \from{scrkernel-typearea.dtx}{class,book,init}% + \from{scrkernel-compatibility.dtx}{class,book,option}% + \from{scrkernel-miscellaneous.dtx}{class,book,option}% + \from{scrkernel-language.dtx}{class,book,option}% + \from{scrkernel-fonts.dtx}{class,book,option}% + \from{scrkernel-typearea.dtx}{class,book,options}% + \from{scrkernel-paragraphs.dtx}{class,book,option}% + \from{scrkernel-title.dtx}{class,book,option}% + \from{scrkernel-tocstyle.dtx}{class,book,option}% + \from{scrkernel-sections.dtx}{class,book,option}% + \from{scrkernel-pagestyles.dtx}{class,book,option}% + \from{scrkernel-floats.dtx}{class,book,option}% + \from{scrkernel-footnotes.dtx}{class,book,option}% + \from{scrkernel-listsof.dtx}{class,book,option}% + \from{scrkernel-bibliography.dtx}{class,book,option}% + \from{scrkernel-index.dtx}{class,book,option}% + \from{scrkernel-listsandtabulars.dtx}{class,book,option}% + \from{scrkernel-sections.dtx}{class,book,execoption}% + \from{scrkernel-miscellaneous.dtx}{class,book,execoption}% + \from{scrkernel-compatibility.dtx}{class,book,body}% + \from{scrkernel-fonts.dtx}{class,book,body}% + \from{scrkernel-language.dtx}{class,book,body}% + \from{scrkernel-typearea.dtx}{class,book,body}% + \from{scrkernel-paragraphs.dtx}{class,book,body}% + \from{scrkernel-title.dtx}{class,book,body}% + \from{scrkernel-tocstyle.dtx}{class,book,body}% + \from{scrkernel-tocstyle.dtx}{class,book,style,part}% + \from{scrkernel-tocstyle.dtx}{class,book,style,chapter}% + \from{scrkernel-tocstyle.dtx}{class,book,style,section}% + \from{scrkernel-tocstyle.dtx}{class,book,style,default}% + \from{scrkernel-sections.dtx}{class,book,body}% + \from{scrkernel-miscellaneous.dtx}{class,book,body}% + \from{scrkernel-pagestyles.dtx}{class,book,body}% + \from{scrlayer.dtx}{class,book,body}% + \from{scrkernel-floats.dtx}{class,book,body}% + \from{scrkernel-footnotes.dtx}{class,book,body}% + \from{scrkernel-listsof.dtx}{class,book,body}% + \from{scrkernel-bibliography.dtx}{class,book,body}% + \from{scrkernel-index.dtx}{class,book,body}% + \from{scrkernel-listsandtabulars.dtx}{class,book,body}% + \from{scrlogo.dtx}{logo}% + }% + \file{scrreprt.cls}{% + \from{scrkernel-version.dtx}{class,report}% + \from{scrkernel-basics.dtx}{class,load}% + \from{scrkernel-listsof.dtx}{class,report,prepare}% + \from{scrkernel-tocstyle.dtx}{class,report,prepare}% + \from{scrkernel-sections.dtx}{class,report,prepare}% + \from{scrkernel-compatibility.dtx}{class,report,init}% + \from{scrkernel-typearea.dtx}{class,report,init}% + \from{scrkernel-compatibility.dtx}{class,report,option}% + \from{scrkernel-miscellaneous.dtx}{class,report,option}% + \from{scrkernel-language.dtx}{class,report,option}% + \from{scrkernel-fonts.dtx}{class,report,option}% + \from{scrkernel-typearea.dtx}{class,report,options}% + \from{scrkernel-paragraphs.dtx}{class,report,option}% + \from{scrkernel-title.dtx}{class,report,option}% + \from{scrkernel-tocstyle.dtx}{class,report,option}% + \from{scrkernel-sections.dtx}{class,report,option}% + \from{scrkernel-pagestyles.dtx}{class,report,option}% + \from{scrkernel-floats.dtx}{class,report,option}% + \from{scrkernel-footnotes.dtx}{class,report,option}% + \from{scrkernel-listsof.dtx}{class,report,option}% + \from{scrkernel-bibliography.dtx}{class,report,option}% + \from{scrkernel-index.dtx}{class,report,option}% + \from{scrkernel-listsandtabulars.dtx}{class,report,option}% + \from{scrkernel-sections.dtx}{class,report,execoption}% + \from{scrkernel-miscellaneous.dtx}{class,report,execoption}% + \from{scrkernel-compatibility.dtx}{class,report,body}% + \from{scrkernel-fonts.dtx}{class,report,body}% + \from{scrkernel-language.dtx}{class,report,body}% + \from{scrkernel-typearea.dtx}{class,report,body}% + \from{scrkernel-paragraphs.dtx}{class,report,body}% + \from{scrkernel-title.dtx}{class,report,body}% + \from{scrkernel-tocstyle.dtx}{class,report,body}% + \from{scrkernel-tocstyle.dtx}{class,report,style,part}% + \from{scrkernel-tocstyle.dtx}{class,report,style,chapter}% + \from{scrkernel-tocstyle.dtx}{class,report,style,section}% + \from{scrkernel-tocstyle.dtx}{class,report,style,default}% + \from{scrkernel-sections.dtx}{class,report,body}% + \from{scrkernel-miscellaneous.dtx}{class,report,body}% + \from{scrkernel-pagestyles.dtx}{class,report,body}% + \from{scrlayer.dtx}{class,report,body}% + \from{scrkernel-floats.dtx}{class,report,body}% + \from{scrkernel-footnotes.dtx}{class,report,body}% + \from{scrkernel-listsof.dtx}{class,report,body}% + \from{scrkernel-bibliography.dtx}{class,report,body}% + \from{scrkernel-index.dtx}{class,report,body}% + \from{scrkernel-listsandtabulars.dtx}{class,report,body}% + \from{scrlogo.dtx}{logo}% + }% + \file{scrartcl.cls}{% + \from{scrkernel-version.dtx}{class,article}% + \from{scrkernel-basics.dtx}{class,load}% + \from{scrkernel-listsof.dtx}{class,article,prepare}% + \from{scrkernel-tocstyle.dtx}{class,article,prepare}% + \from{scrkernel-sections.dtx}{class,article,prepare}% + \from{scrkernel-compatibility.dtx}{class,article,init}% + \from{scrkernel-typearea.dtx}{class,article,init}% + \from{scrkernel-compatibility.dtx}{class,article,option}% + \from{scrkernel-miscellaneous.dtx}{class,article,option}% + \from{scrkernel-language.dtx}{class,article,option}% + \from{scrkernel-fonts.dtx}{class,article,option}% + \from{scrkernel-typearea.dtx}{class,article,options}% + \from{scrkernel-paragraphs.dtx}{class,article,option}% + \from{scrkernel-title.dtx}{class,article,option}% + \from{scrkernel-tocstyle.dtx}{class,article,option}% + \from{scrkernel-sections.dtx}{class,article,option}% + \from{scrkernel-pagestyles.dtx}{class,article,option}% + \from{scrkernel-floats.dtx}{class,article,option}% + \from{scrkernel-footnotes.dtx}{class,article,option}% + \from{scrkernel-listsof.dtx}{class,article,option}% + \from{scrkernel-bibliography.dtx}{class,article,option}% + \from{scrkernel-index.dtx}{class,article,option}% + \from{scrkernel-listsandtabulars.dtx}{class,article,option}% + \from{scrkernel-sections.dtx}{class,article,execoption}% + \from{scrkernel-miscellaneous.dtx}{class,article,execoption}% + \from{scrkernel-compatibility.dtx}{class,article,body}% + \from{scrkernel-fonts.dtx}{class,article,body}% + \from{scrkernel-language.dtx}{class,article,body}% + \from{scrkernel-typearea.dtx}{class,article,body}% + \from{scrkernel-paragraphs.dtx}{class,article,body}% + \from{scrkernel-title.dtx}{class,article,body}% + \from{scrkernel-tocstyle.dtx}{class,article,body}% + \from{scrkernel-tocstyle.dtx}{class,article,style,part}% + \from{scrkernel-tocstyle.dtx}{class,article,style,section}% + \from{scrkernel-tocstyle.dtx}{class,article,style,subsection}% + \from{scrkernel-tocstyle.dtx}{class,article,style,default}% + \from{scrkernel-sections.dtx}{class,article,body}% + \from{scrkernel-miscellaneous.dtx}{class,article,body}% + \from{scrkernel-pagestyles.dtx}{class,article,body}% + \from{scrlayer.dtx}{class,article,body}% + \from{scrkernel-floats.dtx}{class,article,body}% + \from{scrkernel-footnotes.dtx}{class,article,body}% + \from{scrkernel-listsof.dtx}{class,article,body}% + \from{scrkernel-bibliography.dtx}{class,article,body}% + \from{scrkernel-index.dtx}{class,article,body}% + \from{scrkernel-listsandtabulars.dtx}{class,article,body}% + \from{scrlogo.dtx}{logo}% + }% +}% + +\generate{\usepreamble\defaultpreamble + \file{scrsize10pt.clo}{% + \from{scrkernel-version.dtx}{clo,10pt}% + \from{scrkernel-fonts.dtx}{clo,10pt}% + \from{scrkernel-paragraphs.dtx}{clo,10pt}% + }% + \file{scrsize11pt.clo}{% + \from{scrkernel-version.dtx}{clo,11pt}% + \from{scrkernel-fonts.dtx}{clo,11pt}% + \from{scrkernel-paragraphs.dtx}{clo,11pt}% + }% + \file{scrsize12pt.clo}{% + \from{scrkernel-version.dtx}{clo,12pt}% + \from{scrkernel-fonts.dtx}{clo,12pt}% + \from{scrkernel-paragraphs.dtx}{clo,12pt}% + }% +}% + +\generate{\usepreamble\defaultpreamble + \file{scrfontsizes.sty}{% + \from{scrkernel-version.dtx}{package}% + \from{scrkernel-fonts.dtx}{package,generator,identify}% + \from{scrkernel-fonts.dtx}{package,generator,option}% + \from{scrkernel-fonts.dtx}{package,generator,body}% + \from{scrlogo.dtx}{logo}% + }% +}% + +\generate{\usepreamble\defaultpreamble + \file{scrlttr2.cls}{% + \from{scrkernel-version.dtx}{class,letter}% + \from{scrkernel-basics.dtx}{class,load}% + \from{scrkernel-compatibility.dtx}{class,letter,init}% + \from{scrkernel-typearea.dtx}{class,scrlttr2,init}% + \from{scrkernel-compatibility.dtx}{class,letter,option}% + \from{scrkernel-miscellaneous.dtx}{class,letter,option}% + \from{scrkernel-letterclassoptions.dtx}{class,letter,option}% + \from{scrkernel-language.dtx}{class,letter,option}% + \from{scrkernel-fonts.dtx}{class,letter,option}% + \from{scrkernel-variables.dtx}{class,letter,option}% + \from{scrkernel-pseudolengths.dtx}{class,letter,option}% + \from{scrkernel-typearea.dtx}{class,letter,options}% + \from{scrkernel-paragraphs.dtx}{class,letter,option}% + \from{scrkernel-pagestyles.dtx}{class,letter,option}% + \from{scrkernel-floats.dtx}{class,letter,option}% + \from{scrkernel-footnotes.dtx}{class,letter,option}% + \from{scrkernel-listsandtabulars.dtx}{class,letter,option}% + \from{scrkernel-notepaper.dtx}{class,letter,option}% + \from{scrkernel-addressfiles.dtx}{class,letter,option}% + \from{scrkernel-miscellaneous.dtx}{class,letter,execoption}% + \from{scrkernel-compatibility.dtx}{class,letter,body}% + \from{scrkernel-fonts.dtx}{class,letter,body}% + \from{scrkernel-miscellaneous.dtx}{class,letter,body}% + \from{scrkernel-letterclassoptions.dtx}{class,letter,body}% + \from{scrkernel-language.dtx}{class,letter,body}% + \from{scrkernel-variables.dtx}{class,letter,body}% + \from{scrkernel-pseudolengths.dtx}{class,letter,body}% + \from{scrkernel-typearea.dtx}{class,letter,body}% + \from{scrkernel-paragraphs.dtx}{class,letter,body}% + \from{scrkernel-pagestyles.dtx}{class,letter,body}% + \from{scrkernel-floats.dtx}{class,letter,body}% + \from{scrkernel-footnotes.dtx}{class,letter,body}% + \from{scrkernel-listsandtabulars.dtx}{class,letter,body}% + \from{scrkernel-notepaper.dtx}{class,letter,body}% + \from{scrkernel-addressfiles.dtx}{class,letter,body}% + \from{scrlogo.dtx}{logo}% + }% +} + +\generate{\usepreamble\defaultpreamble + \file{scrletter.sty}{% + \from{scrkernel-version.dtx}{package,letter}% + \from{scrkernel-basics.dtx}{package,load}% + \from{scrkernel-miscellaneous.dtx}{package,letter,init}% +% \from{scrkernel-compatibility.dtx}{package,letter,init}% + \from{scrkernel-typearea.dtx}{package,letter,init}% +% \from{scrkernel-compatibility.dtx}{package,letter,option}% + \from{scrkernel-miscellaneous.dtx}{package,letter,option}% + \from{scrkernel-letterclassoptions.dtx}{package,letter,option}% + \from{scrkernel-language.dtx}{package,letter,option}% + \from{scrkernel-fonts.dtx}{package,letter,option}% + \from{scrkernel-variables.dtx}{package,letter,option}% + \from{scrkernel-pseudolengths.dtx}{package,letter,option}% +% \from{scrkernel-typearea.dtx}{package,letter,option}% +% \from{scrkernel-paragraphs.dtx}{package,letter,option}% + \from{scrkernel-pagestyles.dtx}{package,letter,option}% +% \from{scrkernel-floats.dtx}{package,letter,option}% +% \from{scrkernel-footnotes.dtx}{package,letter,option}% +% \from{scrkernel-listsandtabulars.dtx}{package,letter,option}% + \from{scrkernel-notepaper.dtx}{package,letter,option}% + \from{scrkernel-addressfiles.dtx}{package,letter,option}% + \from{scrkernel-miscellaneous.dtx}{package,letter,execoption}% +% \from{scrkernel-compatibility.dtx}{package,letter,body}% + \from{scrkernel-fonts.dtx}{package,letter,body}% + \from{scrkernel-miscellaneous.dtx}{package,letter,body}% + \from{scrkernel-letterclassoptions.dtx}{package,letter,body}% + \from{scrkernel-language.dtx}{package,letter,body}% + \from{scrkernel-variables.dtx}{package,letter,body}% + \from{scrkernel-pseudolengths.dtx}{package,letter,body}% +% \from{scrkernel-typearea.dtx}{package,letter,body}% +% \from{scrkernel-paragraphs.dtx}{package,letter,body}% + \from{scrkernel-pagestyles.dtx}{package,letter,body}% +% \from{scrkernel-floats.dtx}{package,letter,body}% +% \from{scrkernel-footnotes.dtx}{package,letter,body}% +% \from{scrkernel-listsandtabulars.dtx}{package,letter,body}% + \from{scrkernel-notepaper.dtx}{package,letter,body}% + \from{scrkernel-addressfiles.dtx}{package,letter,body}% + \from{scrlogo.dtx}{logo}% + }% +}% + +\generate{\usepreamble\defaultpreamble + \file{visualize.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{scrkernel-letterclassoptions.dtx}{lco,visualize,head}% + \from{scrkernel-letterclassoptions.dtx}{lco,visualize,body}% + \from{scrkernel-notepaper.dtx}{lco,visualize,body}% + }% + \file{KOMAold.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{scrkernel-letterclassoptions.dtx}{lco,KOMAold,head}% + \from{scrkernel-letterclassoptions.dtx}{lco,KOMAold,body}% + \from{scrkernel-notepaper.dtx}{lco,KOMAold,body}% + }% + \file{DIN.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{scrkernel-letterclassoptions.dtx}{lco,DIN,head}% + \from{scrkernel-letterclassoptions.dtx}{lco,DIN,body}% + }% + \file{DINmtext.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{scrkernel-letterclassoptions.dtx}{lco,DINmoretext,head}% + \from{scrkernel-letterclassoptions.dtx}{lco,DINmoretext,body}% + }% + \file{DIN5008A.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{scrkernel-letterclassoptions.dtx}{lco,5008,A,head}% + \from{scrkernel-letterclassoptions.dtx}{lco,5008,A,body}% + }% + \file{DIN5008B.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{scrkernel-letterclassoptions.dtx}{lco,5008,B,head}% + \from{scrkernel-letterclassoptions.dtx}{lco,5008,B,body}% + }% + \file{SN.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{scrkernel-letterclassoptions.dtx}{lco,SN,head}% + \from{scrkernel-letterclassoptions.dtx}{lco,SN,body}% + }% + \file{SNleft.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{scrkernel-letterclassoptions.dtx}{lco,SwissLeft,head}% + \from{scrkernel-letterclassoptions.dtx}{lco,SwissLeft,body}% + }% + \file{NF.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{scrkernel-letterclassoptions.dtx}{lco,NF,head}% + \from{scrkernel-letterclassoptions.dtx}{lco,NF,body}% + }% + \file{UScommercial9.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{scrkernel-letterclassoptions.dtx}{lco,UScommercial9,head}% + \from{scrkernel-letterclassoptions.dtx}{lco,UScommercial9,body}% + }% + \file{UScommercial9DW.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{scrkernel-letterclassoptions.dtx}{lco,UScommercial9DW,head}% + \from{scrkernel-letterclassoptions.dtx}{lco,UScommercial9DW,body}% + }% +}% + +% \generate{\usepreamble\defaultpreamble +% \file{USletter2w.lco}{% +% \from{scrkernel-version.dtx}{trace}% +% \from{scrkernel-letterclassoptions.dtx}{lco,USletter2w,head}% +% \from{scrkernel-letterclassoptions.dtx}{lco,USletter2w,body}% +% }% +% } + +\generate{\usepreamble\defaultpreamble + \file{scrkbase.sty}{% + \from{scrkernel-version.dtx}{package,scrkbase}% + \from{scrkernel-basics.dtx}{package,prepare,koma}% + \from{scrkernel-basics.dtx}{package,option,koma}% + \from{scrkernel-fonts.dtx}{package,option,scrkbase}% + \from{scrkernel-basics.dtx}{package,body,koma}% + \from{scrkernel-fonts.dtx}{package,body,scrkbase}% + \from{scrlogo.dtx}{logo}% + }% +} + +% --- additional package batches (maybe used with other classes, too) -- + +\batchinput{japanlco.dtx}% several Japanese lco-files +\batchinput{scrlogo.dtx}% scrlogo.sty +\batchinput{scrkernel-typearea.dtx}% typearea.sty +\batchinput{scrkernel-basics.dtx}% scrbase.sty +\batchinput{scrhack.dtx}% scrhack.sty and the hak files +\batchinput{scrtime.dtx}% scrtime.sty, scrdate.sty +\batchinput{scrlfile.dtx}% scrlfile.sty +\batchinput{scraddr.dtx}% scraddr.sty +\batchinput{tocbasic.dtx}% tocbasic.sty +\batchinput{scrlayer.dtx}% scrlayer.sty, scrlayer-scrpage.sty ... +\batchinput{scrwfile.dtx}% scrwfile.sty +\batchinput{scrjura.dtx}% scrjura.sty + +% ---------- end of docstrip process ----------------------------------- + +\@@input scrstrop.inc + +\endbatchfile + +% +% end of file `scrmain.ins' +%%% Local Variables: +%%% mode: TeX +%%% TeX-master: t +%%% End: diff --git a/macros/latex/contrib/koma-script/scrstrip.inc b/macros/latex/contrib/koma-script/scrstrip.inc new file mode 100644 index 0000000000..ba8bd193ee --- /dev/null +++ b/macros/latex/contrib/koma-script/scrstrip.inc @@ -0,0 +1,92 @@ +% ====================================================================== +% scrstrip.inc +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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. +% +% In particular, NO PERMISSION is granted to modify the contents of this +% file since it contains the legal notices that are placed in the files +% it generates. +% +% This work consists of all files listed in MANIFEST.md. +% ====================================================================== +% This file will be included at startup of every KOMA-Script +% docstrip batch file. +% ====================================================================== +% $Id: scrstrip.inc 3915 2022-06-29 07:09:48Z kohm $ + +% ---------- start of docstrip ----------------------------------------- + +\KOMAdefVariable{AUTHOR}{Markus Kohm} +\KOMAdefVariable{EMAIL}{[komascript at gmx info]} +\KOMAdefVariable{COPYRIGHTFROM}{1994} +\KOMAdefVariable{COPYRIGHTTILL}{2021} + +\ifToplevel{% + \Msg{+======================================================================} + \Msg{| KOMA-Script} + \Msg{| a versatile LaTeX2e bundle} + \Msg{+----------------------------------------------------------------------} + \Msg{| This batchfile will unpack some or all parts of KOMA-Script.} + \Msg{| On errors press either `h' or ask an expert for help after reading} + \Msg{| `README'.} + \Msg{+----------------------------------------------------------------------} +% ---------- some docstrip switchs ------------------------------------- + \keepsilent + \askforoverwritefalse +} + +% ---------- defining preambles ---------------------------------------- + +\preamble + +\noexpand\KOMAuseVariable{COPYRIGHT} + +This file was generated from file(s) of the KOMA-Script bundle. +--------------------------------------------------------------- + +It may be distributed under the conditions of the +LaTeX Project Public License in the version distributed together +with KOMA-Script, see file `lppl.txt' or `lppl-de.txt'. + +This file may only be distributed together with a copy of the +KOMA-Script bundle. You may however distribute the +KOMA-Script bundle without all such generated files. See also +`lppl.txt' or `lppl-de.txt' for additional information. + +The list of files belonging to KOMA-Script distribution is given in +the file `MANIFEST.md'. See also `lppl.txt' or `lppl-de.txt' for +additional information. + +If this file is a beta version, you may not be allowed to distribute +it. Look at the comments below to see if this is the case. + +English and German manuals are part of KOMA-Script bundle. +---------------------------------------------------------- + +See `README'. + +The KOMA-Script bundle (but maybe not this file) was based upon the +LaTeX 2.09 Script family created by Frank Neukam 1993 and the LaTeX2e +standard classes created by The LaTeX3 Project 1994-1996. You can +find a complete unmodified copy of LaTeX2e at +. + +\endpreamble + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% End: diff --git a/macros/latex/contrib/koma-script/scrstrop.inc b/macros/latex/contrib/koma-script/scrstrop.inc new file mode 100644 index 0000000000..70c2256474 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrstrop.inc @@ -0,0 +1,50 @@ +% ====================================================================== +% scrstrop.inc +% Copyright (c) Markus Kohm, 2002-2022 +% +% 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.md. +% ====================================================================== +% This file will be included at end of every KOMA-Script +% docstrip batch file. +% ====================================================================== +% $Id: scrstrop.inc 3874 2022-06-05 10:38:02Z kohm $ + +% ---------- end of docstrip ----------------------------------------- + +\ifToplevel{% + \Msg{| Unpacking finished successfully.} + \Msg{+----------------------------------------------------------------------} + \ifbeta + \Msg{| YOU SHOULD NOTE, THAT THIS IS NOT AN OFFICIAL RELEASE!} + \Msg{| THIS VERSION IS INTENDED TO BE USED FOR TESTING ONLY!} + \Msg{| USAGE FOR PURPOSES OTHER THAN INDENTED IS DANGEROUS!} + \Msg{| DON'T EXPECT ANY SUPPORT FOR THIS VERSION!} + \else + \Msg{| To finish the installation you have to move some files into} + \Msg{| a directory searched by TeX, e.g., `tex/latex/koma-script/'} + \Msg{| of a local or personal TEXMF tree.} + \Msg{| See `INSTALL.txt' (English) or `INSTALLD.txt' (German)} + \Msg{| for additional information about the installation and} + \Msg{| the user manual.} + \fi + \Msg{+======================================================================} +} + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% End: diff --git a/macros/latex/contrib/koma-script/scrtime.dtx b/macros/latex/contrib/koma-script/scrtime.dtx new file mode 100644 index 0000000000..771bd7d206 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrtime.dtx @@ -0,0 +1,765 @@ +% \iffalse +% ====================================================================== +% scrtime.dtx +% Copyright (c) Markus Kohm, 1995-2022 +% +% 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.md. +% ====================================================================== +%%% From File: $Id: scrtime.dtx 3889 2022-06-09 12:11:14Z kohm $ +%\NeedsTeXFormat{LaTeX2e}[1995/06/01] +%<*driver> +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\begingroup + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2022-06-09 14:11:14 +0200 (Do, 09. Jun 2022) $ + \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} + \filerevision$Revision: 3889 $ +\endgroup +\ProvidesFile{scrtime.dtx}[\filedate\space\filerevision\space +% +%<*driver|package> +%\ProvidesPackage{scrtime}[% +%\ProvidesPackage{scrdate}[% +%<*driver|identify> +%!KOMAScriptVersion + package +% +% (time of LaTeX run)% +% (day of the week)% +%<*driver|identify> +] +% +% +%<*dtx> +\ifx\documentclass\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHFROM}{1995} + \generate{\usepreamble\defaultpreamble + \file{scrtime.sty}{% + \from{scrkernel-version.dtx}{package,scrtime}% + \from{scrtime.dtx}{package,scrtime,identify}% + \from{scrkernel-basics.dtx}{load}% + \from{scrtime.dtx}{package,scrtime,option}% + \from{scrtime.dtx}{package,scrtime,body}% + \from{scrlogo.dtx}{logo}% + } % + \file{scrdate.sty}{% + \from{scrkernel-version.dtx}{package,scrdate}% + \from{scrtime.dtx}{package,scrdate,identify}% + \from{scrkernel-basics.dtx}{load}% + \from{scrtime.dtx}{package,scrdate,option}% + \from{scrtime.dtx}{package,scrdate,body}% + \from{scrlogo.dtx}{logo}% + } % + } + \@@input scrstrop.inc +\else + \let\endbatchfile\relax +\fi +\endbatchfile +% +%<*driver> +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\setcounter{StandardModuleDepth}{2} +\begin{document} + \DocInput{scrtime.dtx} +\end{document} +% +% \fi +% +% \changes{v3.36}{2022/02/07}{switch over from \cls*{scrdoc} to +% \cls*{koma-script-source-doc}} +% \changes{v3.36}{2022/02/07}{require package \pkg*{scrlogo} instead of +% defining \cs{KOMAScript}} +% +% \GetFileInfo{scrtime.dtx} +% \title{The Current Time and Name of the Day with +% \href{https://komascript.de}{\KOMAScript} Packages \pkg*{scrtime} and +% \pkg*{scrdate}} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Revision \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% This bundle includes a package \pkg*{scrtime} defining some macros to +% handle compilation-time. It's a very simple implementation similar to +% \pkg{time}. I've tried to not use additional registers. +% +% The second package \pkg*{scrdate} defines some macros to handle the name +% of the day! +% \end{abstract} +% \tableofcontents +% +% \section{User Manual} +% +% You can find the user manuals of \pkg*{scrtime} and \pkg*{scrdate} in the +% \KOMAScript{} manual, either the German \file{scrguide} or the English +% \file{scrguien}. +% +% \MaybeStop{\PrintIndex} +% +% \section{Implementation} +% +% \subsection{Options} +% +% Since version~1.2 both packages use \pkg*{scrkbase} for options and +% additional features. This is loaded by the \file{ins}-file, so we don't need +% to load it here. +% +% \begin{macrocode} +%<*option> +% \end{macrocode} +% +% +% \subsubsection{Options of \pkg*{scrtime}} +% +% \begin{macrocode} +%<*scrtime> +% \end{macrocode} +% +% \begin{option}{12h} +% \changes{v1.1b}{1995/02/15}{Option \opt{12h} added.} +% \changes{v1.2}{2010/03/10}{Option uses \pkg*{scrkbase}.} +% \begin{option}{24h} +% \changes{v1.1b}{1995/02/15}{Option \opt{24h} added.} +% \changes{v1.2}{2010/03/10}{Option is deprecated.} +% \begin{macro}{\if@Hxii,\@Hxiitrue,\@Hxiifalse} +% \changes{v1.1b}{1995/02/15}{new switch} +% There are two the two Options |24h| and |12h|. We need a switch to +% distinguish. +% \begin{macrocode} +\newif\if@Hxii +% \end{macrocode} +% \end{macro} +% So the options are simple. +% \begin{macrocode} +\KOMA@ifkey{12h}{@Hxii} +\KOMA@DeclareDeprecatedOption[scrtime]{24h}{12h=false} +% \end{macrocode} +% \end{option} +% \end{option} +% +% Currently only \pkg*{scrtime} uses options, so only \pkg*{scrtime} needs +% to process them. +% \begin{macrocode} +\KOMAProcessOptions\relax +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% +% \subsection{Commands and Macros} +% +% \begin{macrocode} +%<*body> +% \end{macrocode} +% +% \subsubsection{Commands and Macros of \pkg*{scrtime}} +% +% \begin{macrocode} +%<*scrtime> +% \end{macrocode} +% +% \begin{command}{\thistime} +% \changes{v1.1b}{1995/02/15}{\cs{thistime*} added} +% \changes{v1.1b}{1995/02/15}{\cs{thistime} fixed} +% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}} +% First we have to decide, is it a star-version ore not. +% \begin{macrocode} +\def\thistime{% + \kernel@ifstar + {\let\@tempif\iffalse\@thistime} + {\let\@tempif\iftrue\@thistime}} +% \end{macrocode} +% \begin{macro}{\@thistime} +% \changes{v1.1b}{1995/02/15}{added} +% Know we have to calculate the hours and minutes. \cs{@tempcnta} are the +% hours and \cs{@tempcntb} are the minutes. We use a group to encapsulate the +% usage of the two local counters of from the \LaTeX{} kernel. +% \begin{macrocode} +\newcommand*{\@thistime}[1][:]{% + \begingroup + \@tempcnta\time\divide\@tempcnta60\multiply\@tempcnta60 + \@tempcntb\time\advance\@tempcntb-\@tempcnta + \divide\@tempcnta60 +% \end{macrocode} +% If we use 12h-mode, we have to cut the houres. +% \changes{v1.1d}{1996/01/14}{space added at \cs{@thistime} between -12 +% and \cs{fi} (Martin Schroeder)} +% \begin{macrocode} + \if@Hxii\ifnum\@tempcnta>12 \advance\@tempcnta-12 \fi\fi +% \end{macrocode} +% Know we have to compose the value. If the minutes are less than 10 +% maybe there has to be an additional 0. +% \begin{macrocode} + \the\@tempcnta{#1}\@tempif\ifnum\@tempcntb<10 0\fi\fi\the\@tempcntb% + \endgroup} +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\settime} +% \changes{v1.1b}{1995/02/15}{redefines \cs{@thistime}} +% \changes{v1.1c}{1995/05/24}{missing macrocode-environment inserted} +% We simply have to set \cs{@thistime}. +% \begin{macrocode} +\newcommand*{\settime}[1]{\renewcommand*{\@thistime}[1][]{#1}} +% \end{macrocode} +% \end{command} +% +% +% \begin{macrocode} +% +% \end{macrocode} +% +% +% \subsubsection{Commands and Macros of \pkg*{scrdate}} +% +% \begin{macrocode} +%<*scrdate> +% \end{macrocode} +% +% \changes{v1.1a}{1995/02/12}{changed all but the user-interface} +% \changes{v3.05a}{2010/03/10}{changed everything} +% With version~3.05a \pkg*{scrdate} was rewritten. First step was to make +% more macros full expandable to provide \cs{MakeUppercase} and +% \cs{MakeLowercase}. Second was to extend the user interface by some new +% functionality. +% +% \begin{command}{\CenturyPart} +% \changes{v3.05a}{2010/03/10}{added} +% This is the century part of a year number and so only a shortcut to +% |\XdivY{...}{100}|, that is defined at \pkg*{scrbase}. +% \begin{macrocode} +\newcommand*{\CenturyPart}[1]{\XdivY{#1}{100}} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\DecadePart} +% \changes{v3.05a}{2010/03/10}{added} +% This is the year number withoud the century part and therefrso only a +% shortcut to |\XmodY{...}{100}|, that is defined at \pkg*{scrbase}. +% \begin{macrocode} +\newcommand*{\DecadePart}[1]{\XmodY{#1}{100}} +% \end{macrocode} +% \end{command} +% +% \begin{macro}{\@GaussYear} +% \changes{v3.05a}{2010/03/10}{added} +% At the Gauss calculation of the day of the week January and February relates +% to the year before. This macro does the correction for any date. +% \begin{macrocode} +\newcommand*{\@GaussYear}[3]{% + \ifcase #2 + \PackageError{scrdate}{month out of range}{% + You've asked for the Gauss year of ISO date #1-#2-#3,\MessageBreak + this means, that month hat invalid value '#2'.}% + \or + \numexpr #1 - 1\relax + \or + \numexpr #1 - 1\relax + \else + #1 + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{command}{\DayNumber} +% \changes{v3.05a}{2010/03/10}{added} +% Returns the numerical value of the day of week. Note, that Sunday is 0, +% Monday is 1, \dots, Saturday is 6. We use the Gauss calculation of the day +% of the week. First argument is the year, second the month and last the day +% of the month. +% \begin{macrocode} +\newcommand*{\DayNumber}[3]{% + \XmodY{% + \numexpr #3 + + \ifcase #2 + \PackageError{scrdate}{month out of range}{% + You've asked for the dayname of ISO date #1-#2-#3,\MessageBreak + this means, that month hat invalid value '#2'.}% + \or 28 \or 31 \or 2 \or 5 \or 7 \or 10 \or 12 \or 15 \or 18 + \or 20 \or 23 \or 25 + \else + \PackageError{scrdate}{month out of range}{% + You've asked for the dayname of ISO date #1-#2-#3,\MessageBreak + this means, that month hat invalid value '#2'.}% + \fi + + \DecadePart{\@GaussYear{#1}{#2}{#3}} + + \XdivY{\DecadePart{\@GaussYear{#1}{#2}{#3}}}{4} + + \XdivY{\CenturyPart{\@GaussYear{#1}{#2}{#3}}}{4} + - 2 * \CenturyPart{\@GaussYear{#1}{#2}{#3}} \relax + }{7}% +} +% \end{macrocode} +% \end{command} +% \begin{command}{\ISODayNumber} +% \changes{v3.05a}{2010/03/10}{added} +% The same like \cs{DayNumber} but with ISO date argument. +% \begin{macrocode} +\newcommand*{\ISODayNumber}[1]{\expandafter\@IsoDayNumber#1\@nil} +% \end{macrocode} +% \begin{macro}{\@IsoDayNumber} +% \changes{v3.05a}{2010/03/10}{added} +% \begin{macrocode} +\newcommand*{\@IsoDayNumber}{} +\def\@IsoDayNumber#1-#2-#3\@nil{\DayNumber{#1}{#2}{#3}} +% \end{macrocode} +% \end{macro} +% \end{command} +% +% \begin{command}{\DayName} +% \changes{v3.05a}{2010/03/10}{added} +% Returns the name of the day of the week. Arguments like \cs{DayNumber}. +% \begin{macrocode} +\newcommand*{\DayName}[3]{\@dayname{\DayNumber{#1}{#2}{#3}}} +% \end{macrocode} +% \end{command} +% \begin{command}{\ISODayName} +% \changes{v3.05a}{2010/03/10}{added} +% The same like \cs{DayName} but with ISO date argument. +% \begin{macrocode} +\newcommand*{\ISODayName}[1]{\@dayname{\ISODayNumber{#1}}} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\DayNameByNumber} +% \changes{v3.05a}{2010/03/10}{added} +% Returns the name of the day of the week. The argument is a number that will +% be transposed to the range 0\dots6. +% \begin{macrocode} +\newcommand*{\DayNameByNumber}[1]{% + \@dayname{\XmodY{#1}{7}}% +} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\ISOToday} +% \changes{v3.05a}{2010/03/10}{added} +% Returns the ISO date. +% \begin{macrocode} +\newcommand*{\ISOToday}{% + \the\year-\ifnum \month<10 0\fi\the\month-\ifnum \day<10 0\fi\the\day% +} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\IsoToday} +% \changes{v3.05a}{2010/03/10}{added} +% Returns the ISO date. +% \begin{macrocode} +\newcommand*{\IsoToday}{% + \the\year-\the\month-\the\day% +} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\todaysname} +% \changes{v3.05a}{2010/03/10}{re-implemented} +% Using \cs{DayName} this is very, very simple. +% \begin{macrocode} +\newcommand*{\todaysname}{\DayName{\year}{\month}{\day}} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\todaysnumber} +% \changes{v3.05a}{2010/03/11}{added} +% Using \cs{DayNumber} this is very, very simple. +% \begin{macrocode} +\newcommand*{\todaysnumber}{\DayNumber{\year}{\month}{\day}} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\nameday} +% \changes{v3.05a}{2010/03/10}{no longer \cs{long}} +% We simply have to redefine \cs{todaysname}. +% \begin{macrocode} +\newcommand\nameday[1]{\renewcommand*{\todaysname}{#1}} +% \end{macrocode} +% \end{command} +% +% \begin{command}{\newdaylanguage} +% \changes{v3.05a}{2010/03/10}{Sunday is 0} +% We write a macro to define the name of the days. +% \begin{macro}{\scrdate@languagenamewarning} +% But before this, we have to define a once only warning. +% \begin{macrocode} +\newcommand*\scrdate@languagenamewarning{% + \PackageWarningNoLine{scrdate} + {\string\languagename\space not + defined, using \string\language.\MessageBreak + This may result in use of wrong language!\MessageBreak + You should use a compatible language + package\MessageBreak + (e.g. `babel', `german', `french', ...)}% + \let\scrdate@languagenamewarning\relax +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\newcommand\newdaylanguage[8]{% +% \end{macrocode} +% First we check, if the language is defined at the format, the user uses. +% If it is not defined, we do not define the name of the days and warn. +% \begin{macrocode} + \scr@ifundefinedorrelax{l@#1}{% + \PackageInfoNoLine{scrdate}{Language #1\space not defined.\MessageBreak + \protect\dayname@#1\space skipped}% +% \end{macrocode} +% \changes{v1.1c}{1995/05/24}{missing \cs{end\{macrocode\}} added} +% If it is defined, we define the name-selection-macro +% \cs{dayname@\meta{language}}. +% First we define the new macro \cs{dayname@\meta{language}}: +% \changes{v3.05a}{2010/03/10}{group removed} +% \changes{v3.15}{2014/12/11}{more robust \cs{ifcase}} +% \begin{macrocode} + }{% + \@namedef{dayname@#1}##1{% + \ifcase\numexpr \XmodY{##1}{7}\relax + #8\or #2\or #3\or #4\or #5\or #6\or #7\fi% + }% +% \end{macrocode} +% Then we define, what to do at \cs{begin\{document\}}: +% \begin{macrocode} + \AtBeginDocument{% +% \end{macrocode} +% There we first have to test, if \cs{date\meta{language}} is defined +% (e.g. using package \pkg{german}). If not, we have to warn once more. +% \begin{macrocode} + \scr@ifundefinedorrelax{date#1}{% + \PackageInfoNoLine{scrdate} + {\protect\date#1\space not defined.\MessageBreak + \protect\todaysname\space probably cannot use + \protect\dayname@#1}% +% \end{macrocode} +% But if it is defined, we can use it +% \begin{macrocode} + }{% +% \end{macrocode} +% There we first save \cs{date\meta{language}} as \cs{D@date\meta{language}}. +% \begin{macrocode} + \expandafter\let\csname D@date#1\expandafter\endcsname + \csname date#1\endcsname +% \end{macrocode} +% Now we redefine \cs{date\meta{language}}. It first defines \cs{@dayname} and +% then calls saved macro. +% \begin{macrocode} + \@namedef{date#1}{% + \expandafter\let\expandafter\@dayname\csname dayname@#1\endcsname + \@nameuse{D@date#1}}% +% \end{macrocode} +% Last we have to select this new \cs{date\meta{language}}. +% \changes{v1.1j}{2000/01/20}{use of \cs{languagename} if defined} +% \changes{v3.08b}{2011/03/31}{one \% added} +% \begin{macrocode} + \@ifundefined{languagename}{% + \scrdate@languagenamewarning + \ifnum\language=\@nameuse{l@#1} + \@nameuse{date#1}% + \fi + }{% + \@ifundefined{date\languagename}% + {}% + {\@nameuse{date\languagename}}% + }% + }% + }% + }% +} +% \end{macrocode} +% \end{command} +% +% \begin{macro}{\@dayname} +% This should be named selecting the language. Since I changed the definitions +% package \pkg{german} and equal may be loaded before or after \pkg*{scrdate} +% or not. +% +% First we define the usual languages using \cs{newdaylanguage}: +% \begin{macro}{\dayname@german} +% \begin{macrocode} +\newdaylanguage{german}{Montag}{Dienstag}{Mittwoch} + {Donnerstag}{Freitag}{Samstag}{Sonntag} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@ngerman} +% \changes{v1.1i}{1999/10/09}{new language ``ngerman''.} +% \begin{macrocode} +\newdaylanguage{ngerman}{Montag}{Dienstag}{Mittwoch} + {Donnerstag}{Freitag}{Samstag}{Sonntag} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@naustrian} +% \changes{v3.08b}{2011/02/22}{new language ``naustrian''.} +% \begin{macrocode} +\newdaylanguage{naustrian}{Montag}{Dienstag}{Mittwoch} + {Donnerstag}{Freitag}{Samstag}{Sonntag} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@austrian} +% \changes{v3.08b}{2011/02/22}{new language ``austrian''.} +% \begin{macrocode} +\newdaylanguage{austrian}{Montag}{Dienstag}{Mittwoch} + {Donnerstag}{Freitag}{Samstag}{Sonntag} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@swissgerman} +% \changes{v3.13}{2014/01/23}{new language ``swissgerman''.} +% \begin{macrocode} +\newdaylanguage{swissgerman}{Montag}{Dienstag}{Mittwoch} + {Donnerstag}{Freitag}{Samstag}{Sonntag} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@nswissgerman} +% \changes{v3.13}{2014/01/23}{new language ``nswissgerman''.} +% \begin{macrocode} +\newdaylanguage{nswissgerman}{Montag}{Dienstag}{Mittwoch} + {Donnerstag}{Freitag}{Samstag}{Sonntag} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dayname@american} +% \changes{v3.13}{2014/01/23}{new language ``american''.} +% \begin{macrocode} +\newdaylanguage{american}{Monday}{Tuesday}{Wednesday} + {Thursday}{Friday}{Saturday}{Sunday} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@australian} +% \changes{v3.13}{2014/01/23}{new language ``australian''.} +% \begin{macrocode} +\newdaylanguage{australian}{Monday}{Tuesday}{Wednesday} + {Thursday}{Friday}{Saturday}{Sunday} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@british} +% \changes{v3.13}{2014/01/23}{new language ``british''.} +% \begin{macrocode} +\newdaylanguage{british}{Monday}{Tuesday}{Wednesday} + {Thursday}{Friday}{Saturday}{Sunday} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@canadian} +% \changes{v3.13}{2014/01/23}{new language ``canadian''.} +% \begin{macrocode} +\newdaylanguage{canadian}{Monday}{Tuesday}{Wednesday} + {Thursday}{Friday}{Saturday}{Sunday} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@english} +% \changes{v1.1g}{1997/06/21}{correct name is ``tuesday''.} +% \begin{macrocode} +\newdaylanguage{english}{Monday}{Tuesday}{Wednesday} + {Thursday}{Friday}{Saturday}{Sunday} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@newzealand} +% \changes{v3.13}{2014/01/23}{new language ``newzealand''.} +% \begin{macrocode} +\newdaylanguage{newzealand}{Monday}{Tuesday}{Wednesday} + {Thursday}{Friday}{Saturday}{Sunday} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@UKenglish} +% \changes{v3.13}{2014/01/23}{new language ``UKenglish''.} +% \begin{macrocode} +\newdaylanguage{UKenglish}{Monday}{Tuesday}{Wednesday} + {Thursday}{Friday}{Saturday}{Sunday} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@ukenglish} +% \changes{v3.24}{2017/05/29}{new language ``ukenglish''.} +% \begin{macrocode} +\newdaylanguage{ukenglish}{Monday}{Tuesday}{Wednesday} + {Thursday}{Friday}{Saturday}{Sunday} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@USenglish} +% \changes{v1.1g}{1997/06/21}{correct name is ``tuesday''.} +% \begin{macrocode} +\newdaylanguage{USenglish}{Monday}{Tuesday}{Wednesday} + {Thursday}{Friday}{Saturday}{Sunday} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@usenglish} +% \changes{v3.24}{2017/05/29}{new language ``usenglish''.} +% \begin{macrocode} +\newdaylanguage{usenglish}{Monday}{Tuesday}{Wednesday} + {Thursday}{Friday}{Saturday}{Sunday} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dayname@acadian} +% \changes{v3.13}{2014/01/23}{new language ``acadian''.} +% \begin{macrocode} +\newdaylanguage{acadian}{Lundi}{Mardi}{Mercredi} + {Jeudi}{Vendredi}{Samedi}{Dimanche} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@canadien} +% \changes{v3.13}{2014/01/23}{new language ``canadien''.} +% \begin{macrocode} +\newdaylanguage{canadien}{Lundi}{Mardi}{Mercredi} + {Jeudi}{Vendredi}{Samedi}{Dimanche} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@francais} +% \changes{v3.13}{2014/01/23}{new language ``francais''.} +% \begin{macrocode} +\newdaylanguage{francais}{Lundi}{Mardi}{Mercredi} + {Jeudi}{Vendredi}{Samedi}{Dimanche} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@french} +% \begin{macrocode} +\newdaylanguage{french}{Lundi}{Mardi}{Mercredi} + {Jeudi}{Vendredi}{Samedi}{Dimanche} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@italian} +% \changes{v1.1f}{1997/06/06}{New (thanks to Lorenzo M.\ Catucci)} +% \begin{macrocode} +\newdaylanguage{italian}{Luned\`\i}{Marted\`\i}{Mercoled\`\i} + {Gioved\`\i}{Venerd\`\i}{Sabato}{Domenica} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@spanish} +% \changes{v1.1h}{1997/07/26}{New (thanks to Ralph J.\ Hangleiter)} +% \begin{macrocode} +\newdaylanguage{spanish}{Lunes}{Martes}{Mi\'ercoles} + {Jueves}{Viernes}{S\'abado}{Domingo} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@croatian} +% \changes{v1.1l}{2001/10/05}{New (thanks to Branka Lon\v{c}arevi\'{c})} +% \begin{macrocode} +\newdaylanguage{croatian}{Ponedjeljak}{Utorak}{Srijeda} + {\v{C}etvrtak}{Petak}{Subota}{Nedjelja} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\dayname@dutch} +% \changes{v1.1m}{2002/02/02}{New (thanks to Henk Jongbloets)} +% \changes{v1.1p}{2009/01/01}{fixed to upper case} +% \begin{macrocode} +\newdaylanguage{dutch}{Maandag}{Dinsdag}{Woensdag} + {Donderdag}{Vrijdag}{Zaterdag}{Zondag} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dayname@finnish} +% \changes{v1.1n}{2005/02/07}{New (thanks to Hannu V\"ais\"anen)} +% \begin{macrocode} +\newdaylanguage{finnish}{Maanantai}{Tiistai}{Keskiviikko} + {Torstai}{Perjantai}{Lauantai}{Sunnuntai} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dayname@norsk} +% \changes{v1.1p}{2009/01/01}{New (thank to Sveinung Heggen)} +% \begin{macrocode} +\newdaylanguage{norsk}{Mandag}{Tirsdag}{Onsdag} + {Torsdag}{Fredag}{L\o{}rdag}{S\o{}ndag} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dayname@danish} +% \changes{v3.08}{2011/01/18}{New (thanks to Benjamin Hell)} +% \begin{macrocode} +\newdaylanguage{danish}{Mandag}{Tirsdag}{Onsdag} + {Torsdag}{Fredag}{L\o{}rdag}{S\o{}ndag} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dayname@swedish} +% \changes{v3.08}{2011/01/18}{New (thanks to Benjamin Hell)} +% \begin{macrocode} +\newdaylanguage{swedish}{M\aa{}ndag}{Tisdag}{Onsdag} + {Torsdag}{Fredag}{L\"ordag}{S\"ondag} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dayname@polish} +% \changes{v3.13}{2014/01/07}{New (thanks to Blandyna Bogdol)} +% \changes{v3.13}{2014/01/23}{Fixed (thanks to Elke Schubert)} +% \begin{macrocode} +\newdaylanguage{polish}{Poniedzia\l{}ek}{Wtorek}{\'Sroda} + {Czwartek}{Pi\aob{}tek}{Sobota}{Niedziela} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dayname@czech} +% \changes{v3.13}{2014/01/23}{New (thanks to Elke Schubert)} +% \begin{macrocode} +\newdaylanguage{czech}{Pond\v{e}l\'\i}{\'Uter\'y}{St\v{r}eda} + {\v{C}tvrtek}{P\'atek}{Sobota}{Ned\v{e}le} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dayname@slovak} +% \changes{v3.13}{2014/02/26}{New (thanks to Elke Schubert)} +% \begin{macrocode} +\newdaylanguage{slovak}{Pondelok}{Utorok}{Streda} + {\v{S}tvrtok}{Piatok}{Sobota}{Nede\v{l}a} +% \end{macrocode} +% \end{macro} +% +% If there are no language-definitions, we simply want the US-english names +% of the days. +% \changes{v1.1g}{1997/06/21}{correct name is ``tuesday''.} +% \changes{v3.15}{2014/12/11}{default language definition fixed.} +% \begin{macrocode} +\let\@dayname\dayname@english +% \end{macrocode} +% \end{macro} +% +% Last but not least file \file{scrdate.cfg} has to be included, +% if it exists. +% \begin{macrocode} +\InputIfFileExists{scrdate.cfg} + {\typeout{*************************************^^J% + * Local config file scrdate.cfg used^^J% + *************************************}} + {} +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +% \endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/scrwfile.dtx b/macros/latex/contrib/koma-script/scrwfile.dtx new file mode 100644 index 0000000000..3973363618 --- /dev/null +++ b/macros/latex/contrib/koma-script/scrwfile.dtx @@ -0,0 +1,502 @@ +% \iffalse meta-comment +% ====================================================================== +% scrwfile.dtx +% Copyright (c) Markus Kohm, 2010-2022 +% +% 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 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.md. +% ====================================================================== +%%% From File: $Id: scrwfile.dtx 3889 2022-06-09 12:11:14Z kohm $ +%<*dtx> +\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi +\ProvidesFile{scrwfile.dtx} +% +%<(package&identify)|driver>\NeedsTeXFormat{LaTeX2e}[1995/06/01] +%\ProvidesPackage{scrwfile} +%\ProvidesFile{scrwfile.drv} +%<*dtx|(package&identify)|driver> + [2021/05/30 v0.1.10 KOMA-Script package (write and clone files)] +% +%<*dtx> +\ifx\documentclass\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHTFROM}{2010} + + \generate{\usepreamble\defaultpreamble + \file{scrwfile.sty}{% + \from{scrwfile.dtx}{package,scrwfile,identify,option,body}% + \from{scrlogo.dtx}{logo}% + }% + } + + \@@input scrstrop.inc +\else + \let\endbatchfile\relax +\fi +\endbatchfile +% +%<*driver> +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} +\usepackage{hvlogos} +\setcounter{StandardModuleDepth}{2} +\begin{document} +\DocInput{scrwfile.dtx} +\end{document} +% +% \fi +% +% \changes{v0.1}{2010/10/01}{start of new package} +% \changes{v0.1.7}{2014/10/13}{manual moved to \KOMAScript{} manual} +% \changes{v0.1.9}{2021/05/30}{version number scheme changed} +% \changes{v0.1.10}{2022/02/05}{switch over from \cls*{scrdoc} to +% \cls*{koma-script-source-doc}} +% +% \GetFileInfo{scrwfile.dtx} +% \title{Saving Write Handles with the Experimental +% \href{https://komascript.de}{\KOMAScript} Package \pkg*{scrwfile}} +% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}} +% \date{Version \fileversion{} of \filedate} +% \maketitle +% \begin{abstract} +% The \TeX{} engines \TeX, \pdfTeX, and \XeTeX{} (but not \LuaTeX) do +% provide only 16 handles for simultaneously write open files. Some of them +% are already used by \LaTeX{}. Moreover, for every file using +% \cs{@starttoc} \LaTeX{} keeps a write file open from usage of +% \cs{@starttoc}, e.g., inside \cs{tableofcontents}, \cs{listoffigures} +% etc., until the end of the document. Additional write files are used for +% the index, glossary etc. So sometimes it happens, that there are not +% enough handles to open another one. \pkg*{scrwfile} was made to change the +% \LaTeX{} internal handling of all the helper files bases on \cs{@starttoc} +% to not keep them open simultaneously, but use only one file handle for all +% of them. So you should never run out of write file handles. +% \end{abstract} +% +% \section{User Manual} +% +% You can find the user manual of \pkg*{scrwfile} in the \KOMAScript{} manual, +% either the German \file{scrguide} or the English \file{scrguien}. But please +% note: +% \begin{quote}\bfseries +% This is an experimental package. Usage of this package is on your own +% risk. There is no support, if you are using this package, not only for +% this package but also for the class you are using or other packages, that +% use \cs{@starttoc} or \cs{@writefile} like \pkg{caption}, \pkg{float}, +% \pkg*{tocbasic}, \pkg{listings} and many more. +% \end{quote} +% +% \MaybeStop{\PrintIndex} +% +% +% \section{Implementation of \pkg*{scrwfile}} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \begin{macrocode} +%<*identify> +\PackageWarningNoLine{scrwfile}{% + THIS IS AN EXPERIMENTAL PACKAGE!\MessageBreak + USAGE OF THIS PACKAGE IS ON YOUR OWN RISK!\MessageBreak + EVERYTHING MAY HAPPEN!\MessageBreak + EVERYTHING MAY CHANGE IN FUTURE!\MessageBreak + THERE IS NO SUPPORT, IF YOU USE THIS PACKAGE!\MessageBreak + Maybe, it would be better not to load this package% +} +% +% \end{macrocode} +%\iffalse +%\fi +% +% \subsection{Options} +% \iffalse +%<*option> +% \fi +% Currently we don't need options. +% \iffalse +% +% \fi +% +% \subsection{Body} +% \begin{macrocode} +%<*body> +% \end{macrocode} +% +% \subsubsection{Needed Packages} +% +% Package \pkg*{scrbase} is needed, because of using several \KOMAScript{} +% basic commands. +% \begin{macrocode} +\RequirePackage{scrbase}[2010/09/17] +% \end{macrocode} +% +% Package \pkg*{scrlfile} is needed because of the \file{aux}-file +% handling and \cs{protected@immediate@write}. +% \begin{macrocode} +\RequirePackage{scrlfile}[2010/09/30] +% \end{macrocode} +% +% \changes{v0.1.10}{2022/02/04}{\pkg{iftex} is required} +% Package \pkg{iftex} is used to detect Lua\LaTeX. +% \begin{macrocode} +\RequirePackage{iftex} +% \end{macrocode} +% +% \subsubsection{Is is needed?} +% +% \changes{v0.1.9}{2021/05/30}{with Lua\LaTeX{} using is not recommended} +% \changes{v0.1.10}{2022/02/04}{using \cs{ifluatex}} +% \changes{v0.1.10}{2022/02/04}{\cs{PackageInfoNoLine} replaced by +% \cs{PackageWarningNoLine}} +% If the user uses Lua\LaTeX{} usage of \pkg*{scrwfile} should not be +% needed. +% \begin{macrocode} +\ifluatex + \PackageWarningNoLine{scrwfile}{LuaLaTeX detected.\MessageBreak + With LuaLaTeX you should never get an error message:\MessageBreak + \space\space`No room for a new \string\write'.\MessageBreak + So scrwfile could make much more harm than benefit\MessageBreak + and using it is not recommended}% +\fi +% \end{macrocode} +% +% \subsubsection{\LaTeX{} Kernel Patchs} +% +% For some features we need to patch \LaTeX{} kernel macros. Those features +% and macros are: +% \begin{description} +% \item[Single handle feature] means, that \LaTeX{} will no longer need a file +% handle for every help file, but only one for all files. We will patch +% \cs{@starttoc} and \cs{@writefile} to do so. +% \item[Clone file feature] means, that every write to one file may be done to +% another file, too. We will patch \cs{@writefile} to do so. +% \end{description} +% Every patch should be minimum invasive, so that files, that are not under +% \pkg*{scrwfile}'s control are changed as little as possible. +% +% \begin{macro}{\scrwfile@if@only} +% First of all we check, if the file should be handled by \pkg*{scrwfile}. +% \begin{macrocode} +\newcommand*{\scrwfile@if@only}[1]{% + \begingroup + \scr@ifundefinedorrelax{scrwfile@only}{\@tempswatrue}{% + \@tempswafalse + \edef\reserved@b{#1}% + \@for\reserved@a:=\scrwfile@only\do + {\ifx\reserved@a\reserved@b\@tempswatrue\fi}% + }% + \if@tempswa + \scr@ifundefinedorrelax{scrwfile@never}{}{% + \edef\reserved@b{#1}% + \@for\reserved@a:=\scrwfile@never\do + {\ifx\reserved@a\reserved@b\@tempswafalse\fi}% + }% + \fi + \expandafter\endgroup + \if@tempswa + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\scrwfile@starttoc,\scrwfile@@starttoc} +% This is the internal redefinition of \cs{@starttoc}. First of all test, if it +% should be used, then use it or not. +% \begin{macrocode} +\newcommand*{\scrwfile@starttoc}[1]{% + \scrwfile@if@only{#1}{\scrwfile@@starttoc}{\scrwfile@saved@starttoc}{#1}% +} +\newcommand*{\scrwfile@@starttoc}[1]{% +% \PackageInfo{scrwfile}{% +% Using my own \string\@starttoc\space for `#1'}% + \begingroup + \if@filesw + \xdef\scrwfile@writefilelist{\scrwfile@writefilelist,#1}% + \fi + \@fileswfalse + \scrwfile@saved@starttoc{#1}% + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\scrwfile@writefile,\scrwfile@@writefile,\scrwfile@wrtout, +% \scrwfile@writefilelist} +% This is the internal redefinition of \cs{@writefile}. First of all test, if +% it should be used, then use it or not. +% \begin{macrocode} +\newcommand*{\scrwfile@writefile}[1]{% + \scrwfile@if@only{#1}{\scrwfile@@writefile}{\scrwfile@saved@writefile}{#1}% +} +\newcommand{\scrwfile@@writefile}[2]{% +% \PackageInfo{scrwfile}{% +% Using my own \string\@writefile\space for `#1'}% + \ifnum\scrwfile@wrtout>0 + \begingroup + \@temptokena{#2}% + \immediate\write\scrwfile@wrtout{% + \string\@writefile{#1}{\the\@temptokena}% + }% +% \end{macrocode} +% This was the entry for the real file. But we also may have clone files: +% \begin{macrocode} + \scrwfile@process@clones{#1}% + \endgroup + \fi +} +\chardef\scrwfile@wrtout\z@ +\newcommand*{\scrwfile@writefilelist}{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@writefile,\scrwfile@saved@writefile} +% We have to add the single handle feature and the clone file feature to +% \cs{@writefile} and therefore save the original +% definition. \cs{scrwfile@saved@writefile} is used, whenever a file is not +% under \pkg*{scrwfile}'s control. +% \begin{macrocode} +\newcommand*{\scrwfile@saved@writefile}{} +\BeforeClosingMainAux{% + \ifx\scrwfile@writefilelist\@empty\else + \let\scrwfile@saved@writefile\@writefile + \let\scrwfile@wrtout\@partaux + \immediate\openout\scrwfile@wrtout \jobname.wrt + \let\@writefile\scrwfile@writefile + \fi +} +\AfterReadingMainAux{% + \ifx\scrwfile@writefilelist\@empty\else + \immediate\closeout\scrwfile@wrtout + \chardef\scrwfile@wrtout\z@ + \begingroup + \let\@writefile\scrwfile@saved@writefile + \@for\@currext:=\scrwfile@writefilelist\do{% + \begingroup + \ifx\@currext\@empty\else + \scr@ifundefinedorrelax{tf@\@currext}{% +% \typeout{Process extension: `\@currext'} + \immediate\openout\@partaux \jobname.\@currext + \expandafter\let\csname tf@\@currext\endcsname\@partaux + \@input@{\jobname.wrt}% + \immediate\closeout\@partaux + }{}% + \fi + \endgroup + }% + \endgroup + \fi +} +% \end{macrocode} +% \changes{v0.1.8}{2021/05/30}{added order rule for +% \pkg*{scrlayer-notecolumn}} +% Note: Here we use a \LaTeX{} version test, because a do-nothing-definition +% like the one of \pkg{latexrelease} wouldn't be correct, if the command is +% not supported by the current \LaTeX{} kernel version setting. +% \begin{macrocode} +\IfLTXAtLeastTF{2020/10/01}{% + \DeclareHookRule{enddocument/afteraux}% + {scrwfile}{before}{scrlayer-notecolumn}% +}{% + \@ifpackageloaded{scrlayer-notecolumn}{% + \PackageWarningNoLine{scrwfile}{% + Dangerous package order detected!\MessageBreak + As a general rule, you should load scrwfile as soon\MessageBreak + as possible, maybe even before `\string\documentclass'\MessageBreak + (using `\string\RequirePackage' instead of + `\string\usepackage').\MessageBreak + Following packages should be loaded after scrwfile:\MessageBreak + \space - scrlayer-notecolumn}% + }{}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@starttoc,\scrwfile@saved@starttoc} +% We have to add the single handle feature to \cs{@starttoc} and therefore +% save the original definition. +% \changes{v0.1.5}{2013/07/24}{take care for unfriendly \textsl{hyperref}} +% \cs{scrwfile@saved@starttoc} is be used, whenever the file is not under +% \pkg*{scrwfile}'s control. Because of package \textsl{hyperref}, that does +% a hard redefinition without any care for changed definitions, we have to +% take care for that unfriendly package and cannot do a simple +% \begin{verbatim} +% \let\scrwfile@saved@starttoc\@starttoc +% \let\@starttoc\scrwfile@starttoc +% \end{verbatim} +% \begin{macrocode} +\newcommand*{\scrwfile@saved@starttoc}{} +\AtBeginDocument{% + \begingroup + \@ifpackageloaded{hyperref}{% + \scr@ifundefinedorrelax{Hy@AtBeginDocument}{% + \PackageWarning{scrwfile}{% + Incompatible `hyperref` package detected!\MessageBreak + You are using a `hyperref` version, that\MessageBreak + doesn't provide `\string\Hy@AtBeginDocument`.\MessageBreak + This may or may not work.\MessageBreak + Using immediate redefinition% + }% + \aftergroup\@firstofone + }{% + \def\reserved@a{\AtBeginDocument}% + \ifx\Hy@AtBeginDocumentHook\@undefined + \PackageInfo{scrwfile}{% + Using immediate redefinition% + }% + \aftergroup\@firstofone + \else + \PackageInfo{scrwfile}{% + Using `\string\Hy@AtBeginDocument`% + }% + \aftergroup\Hy@AtBeginDocument + \fi + }% + }{% + \aftergroup\@firstofone + }% + \endgroup + {% + \PackageInfo{scrwfile}{% + Extending `\string\@starttoc` + }% + \let\scrwfile@saved@starttoc\@starttoc + \let\@starttoc\scrwfile@starttoc + }% +} +% \end{macrocode} +% \end{macro} +% +% +% \subsubsection{Clone TOC Feature} +% +% \pkg*{scrwfile} may clone a TOC, that means, every entry to one file will +% be copied to other files, too. You must not clone recursively! +% +% \begin{description} +% \item[ToDo:]The whole feature should be moved to \pkg*{tocbasic}. But this +% would need a complete re-implementation and would result in one more write +% handle for every cloned file. So maybe it wouldn't be a really good idea +% to do so. +% \end{description} +% +% \begin{macro}{\scrwfile@process@clones} +% \begin{macrocode} +\newcommand*{\scrwfile@process@clones}[1]{% + \scr@ifundefinedorrelax{scrwfile@clone@#1}{}{% + \begingroup + \let\@@protect\protect\let\protect\@empty\afterassignment\restore@protect + \edef\reserved@b{\csname scrwfile@clone@#1\endcsname}% + \edef\reserved@c{,#1}% + \@for \reserved@a:=\reserved@b\do {% + \@tempswatrue + \@for \reserved@d:=\reserved@c\do {% + \ifx\reserved@d\reserved@a\@tempswafalse\fi + }% + \if@tempswa +% \typeout{clone entry from `#1' to `\reserved@a'}% + \immediate\write\scrwfile@wrtout{% + \string\@writefile{\reserved@a}{\the\@temptokena}% + }% + \edef\reserved@c{\reserved@c,\reserved@a}% + \fi + }% + \endgroup + }% +}% +% \end{macrocode} +% \end{macro} +% +% \begin{command}{\TOCclone} +% \changes{v0.1.8}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}} +% \changes{v0.1.8}{2019/11/19}{\cs{ifattoclist} replaced by \cs{Ifattoclist}} +% \changes{v0.1.8}{2019/11/19}{\cs{iftocfeature} replaced by +% \cs{Iftocfeature}} +% \changes{v0.1.8}{2020/02/25}{spurious space in warning message removed} +% \changes{v0.1.9}{2021/05/30}{requires package \pkg*{tocbasic}} +% \changes{v0.1.9}{2021/05/30}{can be used only in preamble} +% Clone the entries from the second (first mandatory) argument TOC to the +% third (second mandatory) argument TOC. If the first (optional) argument was +% given, define |\listof#3name| to this and also define |\listof#3| and clone +% the toc features \texttt{leveldown}, \texttt{numbered}, \texttt{onecolumn} +% and \texttt{totoc} of |#2| to |#3|. The toc feature \texttt{nobabel} will +% always be set, because the babel entries at TOC |#3| will be cloned from TOC +% |#2|. +% \begin{description} +% \item{Note:} We use owner \texttt{TOCclone} for all cloned extensions. +% \end{description} +% \begin{macrocode} +\newcommand*{\TOCclone}[3][]{% + \RequirePackage{tocbasic}% + \scr@ifundefinedorrelax{scrwfile@clone@#2}{% + \expandafter\protected@edef\csname scrwfile@clone@#2\endcsname{% + #3,\protect\csname scrwfile@clone@#3\endcsname + }% + }{% + \edef\reserved@b{\csname scrwfile@clone@#2\endcsname}% + \expandafter\protected@edef\csname scrwfile@clone@#2\endcsname{% + \csname scrwfile@clone@#2\endcsname,% + #3,% + \protect\csname scrwfile@clone@#3\endcsname + }% + }% + \scr@ifundefinedorrelax{scrwfile@clone@#3}{% + \expandafter\let\csname scrwfile@clone@#3\endcsname\@empty + }{}% + \Ifattoclist{#3}{% + \PackageWarning{scrwfile}{`#3' already under control of + tocbasic.\MessageBreak + Nevertheless features will be set% + }% + }{% + \addtotoclist[TOCclone]{#3}% + }% + \setuptoc{#3}{nobabel}% + \Ifstr{#1}{}{% + }{% + \@namedef{listof#3name}{#1}% + \@namedef{listof#3}{\listoftoc{#3}}% + \Iftocfeature{#2}{leveldown}{\setuptoc{#3}{leveldown}}{}% + \Iftocfeature{#2}{numbered}{\setuptoc{#3}{numbered}}{}% + \Iftocfeature{#2}{onecolumn}{\setuptoc{#3}{leveldownonecolumn}}{}% + \Iftocfeature{#2}{totoc}{\setuptoc{#3}{totoc}}{}% + }% +} +\@onlypreamble\TOCClone +% +% \end{macrocode} +% \end{command} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintChanges +% +% \endinput +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: diff --git a/macros/latex/contrib/koma-script/source-doc/Makefile b/macros/latex/contrib/koma-script/source-doc/Makefile deleted file mode 100644 index 16d4526d57..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/Makefile +++ /dev/null @@ -1,219 +0,0 @@ -# ====================================================================== -# Makefile -# Copyright (c) Markus Kohm, 2002-2020 -# -# 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. -# ---------------------------------------------------------------------- -# Makefile -# Copyright (c) Markus Kohm, 2002-2020 -# -# 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. -# ====================================================================== - -# ---------------------------------------------------------------------- -# Directory with basics -BASEDIR ?= $(PWD)/../ -export BASEDIR - -# ---------------------------------------------------------------------- -# All directories with Makefiles -SUBDIRS = english ngerman - -# ---------------------------------------------------------------------- -# Default rules -.PHONY: default clean default_local install_local \ - uninstall_local clean_local dist_local \ - distclean_local maintainclean_local - -# Recursive make function -ifdef SUBDIRS -define make_recursive - for dir in $(SUBDIRS); \ - do \ - $(MAKE) -C $$dir $@ || exit $$?; \ - done -endef -else -define make_recursive -endef -endif - -default: default_local - -clean: clean_local - -# Load variable definitions -include $(BASEDIR)Makefile.baseinit -include Makefile.latexinit - -# Temporary folder, used to create distribution. -# Same folder with postfix "-maintain" will be used to create maintain- -# distribution. -ifdef DISTDIR -export DISTDIR := $(DISTDIR)/doc -endif -ifdef MAINTAINDIR -export MAINTAINDIR := $(MAINTAINDIR)/doc -endif -ifdef INSTALLSRCDIR -export INSTALLSRCDIR := $(INSTALLSRCDIR)/doc -endif - -# ---------------------------------------------------------------------- - -# ---------------------------------------------------------------------- -# List of all Makefiles -MAKE_FILES = Makefile Makefile.latexinit Makefile.guide - -# ---------------------------------------------------------------------- -MISC_SRC = $(MAKE_FILES) - -STATIC_DOC_SRC = koma-script.html - -STATIC_DOC_LINKS= komascript.html komascr.html \ - scrbook.html scrreprt.html scrartcl.html scrlttr2.html \ - scrletter.html \ - scrextend.html \ - typearea.html scraddr.html scrlfile.html \ - scrwfile.html \ - scrtime.html scrdate.html tocbasic.html \ - scrlayer.html scrlayer-scrpage.html \ - scrlayer-notecolumn.html \ - scrbase.html scrhack.html - -DOC_SRC = scrguide.cls scrguide.ist scrguide.gst \ - guide.tex guide.bib plength.dtx \ - linkalias.tex - -DOC_FILES = - -DOC_DIR = doc - -STATIC_DOC = $(STATIC_DOC_SRC) $(STATIC_DOC_LINKS) - -DIST_SRC = $(MISC_SRC) $(DOC_SRC) $(STATIC_DOC_SRC) - -DIST_FILES = $(DIST_SRC) $(STATIC_DOC_LINKS) $(DOC_FILES) - -BIN_DIR = bin - -BIN_FILES = $(BIN_DIR)/genhtmlidx.pl $(BIN_DIR)/genindex.pl - -MAINTAIN_FILES = $(DIST_FILES) -# ---------------------------------------------------------------------- - -# ---------------------------------------------------------------------- -# local rules -prepare_local: $(STATIC_DOC_LINKS) - $(make_recursive) - -default_local: $(STATIC_DOC) $(DOC_FILES) - $(make_recursive) - -$(STATIC_DOC_LINKS): $(STATIC_DOC_SRC) - $(SYMLINK) $< $@ - -install_local: $(DIST_FILES) - @if ! $(MKDIR) $(INSTALLSRCDIR) || \ - ! $(MKDIR) $(INSTALLSRCDIR)/$(BIN_DIR) || \ - ! $(MKDIR) $(INSTALLDOCDIR) ; then \ - echo '--------------------------------------------------'; \ - echo '| Cannot install to' $(INSTALLSRCDIR) or $(INSTALLSRCDIR)/$(BIN_DIR) or $(INSTALLDOCDIR)!; \ - echo '| You should try:'; \ - echo '| sudo "make install"'; \ - echo '--------------------------------------------------'; \ - exit 1; \ - fi - $(INSTALL) $(DIST_SRC) $(INSTALLSRCDIR) - $(foreach file,$(STATIC_DOC),$(SYMLINK) ../../../../doc/latex/koma-script/$(file) $(INSTALLSRCDIR)/$(file);) - $(INSTALLEXECUTABLE) $(BIN_FILES) $(INSTALLSRCDIR)/$(BIN_DIR) - $(INSTALL) $(STATIC_DOC) $(DOC_FILES) $(INSTALLDOCDIR) - $(make_recursive) - $(SECHO) ------------------------------------------------------------ - $(SECHO) Installed files at $(INSTALLSRCDIR): - $(SECHO) $(DIST_SRC) - $(SECHO) ------------------------------------------------------------ - $(SECHO) Installed files at $(INSTALLSRCDIR)/$(BIN_DIR): - $(SECHO) $(BIN_FILES) - $(SECHO) ------------------------------------------------------------ - $(SECHO) Installed files at $(INSTALLDOCDIR): - $(SECHO) $(STATIC_DOC) $(DOC_FILES) - $(SECHO) ------------------------------------------------------------ - $(SECHO) Links at $(INSTALLSRCDIR): - $(SECHO) $(SATIC_DOC) - $(SECHO) ------------------------------------------------------------ - - -uninstall_local: - @if [ -d $(INSTALLSRCDIR) ]; then \ - $(RM) -v $(foreach file,$(DIST_SRC),$(INSTALLSRCDIR)/$(file)); \ - if [ ls $(INSTALLSRCDIR) > /dev/null 2>&1; then \ - $(RMDIR) -v $(INSTALLSRCDIR); \ - else \ - echo "$(INSTALLSRCDIR) not empty!"; \ - fi; \ - else \ - echo "$(INSTALLSRCDIR) not found --> nothing to uninstall!"; \ - fi - @if [ -d $(INSTALLDOCDIR) ]; then \ - $(RM) -v $(foreach file,$(STATIC_DOC),$(INSTALLDOCDIR)/$(file)); \ - else \ - echo "$(INSTALLDOCDIR) not found --> nothing to uninstall!"; \ - fi - $(make_recursive) - -clean_local: - $(SRM) *.aux *.glo *.idx *.lof *.log *.lot *.synctex.gz *.toc *.slnc - $(make_recursive) - -dist_local: $(DIST_FILES) - -$(RMDIR) $(DISTDIR) - $(MKDIR) $(DISTDIR) - $(MKDIR) $(DISTDIR)/$(BIN_DIR) - $(CP) $(DIST_FILES) $(DISTDIR) - $(CP) $(BIN_FILES) $(DISTDIR)/$(BIN_DIR) -# $(CP) $(DOC_FILES) $(DISTDIR)/$(DOC_DIR) - $(make_recursive) - -maintain_local: - -$(RMDIR) $(MAINTAINDIR) - $(MKDIR) $(MAINTAINDIR) - $(MKDIR) $(MAINTAINDIR)/$(BIN_DIR) - $(CP) $(MAINTAIN_FILES) $(MAINTAINDIR) - $(CP) $(BIN_FILES) $(MAINTAINDIR)/$(BIN_DIR) - $(make_recursive) - -distclean_local: - $(make_recursive) - -maintainclean_local: - $(SRM) ChangeLog.svn ChangeLog.bak $(STATIC_DOC_LINKS) $(DOC_FILES) - $(make_recursive) - -edit: - $(EDITOR) guide.tex diff --git a/macros/latex/contrib/koma-script/source-doc/Makefile.guide b/macros/latex/contrib/koma-script/source-doc/Makefile.guide deleted file mode 100644 index 8e10721663..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/Makefile.guide +++ /dev/null @@ -1,337 +0,0 @@ -# ====================================================================== -# Makefile.guide -# Copyright (c) Markus Kohm, 2002-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. -# ---------------------------------------------------------------------- -# Makefile.guide -# Copyright (c) Markus Kohm, 2002-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. -# ====================================================================== - -# ---------------------------------------------------------------------- -# Load common rules -include $(BASEDIR)Makefile.baserules -# Load variable definitions -include $(BASEDIR)Makefile.baseinit -include $(DOCDIR)Makefile.latexinit -# ---------------------------------------------------------------------- -# Temporary folder, used to create distribution. -# Same folder with postfix "-maintain" will be used to create maintain- -# distribution. -ifdef DISTDIR -export DISTDIR := $(DISTDIR)/$(LANGUAGE) -endif -ifdef MAINTAINDIR -export MAINTAINDIR := $(MAINTAINDIR)/$(LANGUAGE) -endif -ifdef INSTALLSRCDIR -export INSTALLSRCDIR := $(INSTALLSRCDIR)/$(LANGUAGE) -endif - -# ---------------------------------------------------------------------- -# List of all Makefiles -MAKE_FILES = Makefile - -# ---------------------------------------------------------------------- -GUIDENAME = scrgui$(LANGUAGESHORTCUT) - -ifeq ($(LANGUAGE),english) -TEX_APPENDICES = japanlco.tex -else -TEX_APPENDICES = -endif - -TEX_CHAPTERS = preface.tex introduction.tex \ - authorpart.tex typearea.tex scrbookreportarticle.tex \ - scrlttr2.tex scrlayer-scrpage.tex \ - scrdatetime.tex scraddr.tex \ - adrconvnote.tex scrextend.tex scrjura.tex \ - expertpart.tex scrbase.tex scrlfile.tex scrwfile.tex \ - tocbasic.tex scrhack.tex \ - scrlayer.tex \ - scrlayer-scrpage-experts.tex scrlayer-notecolumn.tex \ - typearea-experts.tex scrbookreportarticle-experts.tex \ - scrlttr2-experts.tex \ - $(TEX_APPENDICES) - -TEX_MISC = ../guide.tex ../linkalias.tex \ - common-options.tex \ - common-compatibility.tex \ - common-draftmode.tex \ - common-typearea.tex \ - common-fontsize.tex \ - common-textmarkup.tex \ - common-parmarkup.tex \ - common-oddorevenpage.tex \ - common-interleafpage.tex \ - common-footnotes.tex \ - common-footnotes-experts.tex \ - common-lists.tex \ - common-marginpar.tex \ - common-titles.tex \ - common-dictum.tex \ - common-headfootheight.tex \ - common-pagestylemanipulation.tex - -EXAMPLE_LETTER_DTX = scrlttr2examples.dtx - -EXAMPLE_LETTER_LETTERS = $(foreach num,\ - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 \ - 20 21 22 23 nipponA nipponB,\ - letter-$(num).tex) - -EXAMPLE_LETTER_DTX_RESULT = $(EXAMPLE_LETTER_LETTERS) musterlogo.eps ich.lco - -EXAMPLE_NOTECOLUMN_SRC = scrlayer-notecolumn-example.tex -EXAMPLE_NOTECOLUMN_PDF = $(addsuffix .pdf,$(basename $(EXAMPLE_NOTECOLUMN_SRC))) - -EXAMPLE_JURA_SRC = scrjuraexample.tex - -EXAMPLE_JURA_PDF = $(addsuffix .pdf,$(basename $(EXAMPLE_JURA_SRC))) - -PLENGTH_DTX = $(DOCDIR)plength.dtx - -PLENGTH_DTX_RESULT = plength.drv plenDIN.mp varDIN.mp plinc.mp \ - pltex-vars.mp pltex-terms.mp pllcoDIN.mp - -PLENGTH_PDF = plenDIN.pdf varDIN.pdf - -PDF_EPS_SRC = musterlogo.eps - -PDF_EPS = $(addsuffix .pdf,$(basename $(PDF_EPS_SRC))) - -EXAMPLE_LETTER_TEX_SRC = $(EXAMPLE_LETTER_LETTERS) ich.lco -EXAMPLE_LETTER_SRC = $(EXAMPLE_LETTER_TEX_SRC) $(PDF_EPS) -EXAMPLE_LETTER_PDF = $(addsuffix .pdf,$(basename $(EXAMPLE_LETTER_LETTERS))) - -GENERATED_SRC = $(EXAMPLE_LETTER_PDF) $(PLENGTH_PDF) \ - $(EXAMPLE_NOTECOLUMN_PDF) $(EXAMPLE_JURA_PDF) - -GENERATED_CLEAN = $(GENERATED_SRC) \ - $(EXAMPLE_LETTER_DTX_RESULT) letter-label.tex \ - $(PDF_EPS) \ - $(PLENGTH_DTX_RESULT) - -TEX_SRC = guide-$(LANGUAGELONG).tex $(TEX_CHAPTERS) $(TEX_MISC) - -MISC_SRC = $(MAKE_FILES) htmlsetup - -DIST_SRC = $(MISC_SRC) $(TEX_SRC) $(EXAMPLE_LETTER_DTX) \ - $(EXAMPLE_NOTECOLUMN_SRC) $(EXAMPLE_JURA_SRC) - -GUIDE_FILES = $(GUIDENAME).pdf $(GUIDENAME).html - -DIST_FILES = $(DIST_SRC) $(GUIDE_FILES) - -MAINTAIN_SRC = $(DIST_SRC) - -MAINTAIN_FILES = $(MAINTAIN_SRC) - -# ---------------------------------------------------------------------- -# local rules -default_local: $(GUIDE_FILES) - -prepare_local: -# $(ECHO) $(GENERATED_SRC) - -clean_local: - $(RM) *.aux *.bbl *.blg *.glo *.idx *.ilg *.ind *.lof *.log *.lot \ - *.dvi *.tmp mpxerr.tex *.1 *.mp.keep *.mpo \ - *.md5 *.toc *.mpx *.drv *.chn *.xref *.slnc - -distclean_local: clean_local - $(RM) $(GENERATED_CLEAN) - -maintainclean_local: distclean_local - $(RM) guide.pdf $(GUIDENAME).pdf $(GUIDENAME).html - -ifdef DISTDIR - -install_local: $(DIST_FILES) - @if ! $(MKDIR) $(INSTALLSRCDIR) || \ - ! [ -d $(INSTALLDOCDIR) ]; then \ - echo '--------------------------------------------------'; \ - echo '| Cannot install to' $(INSTALLSRCDIR) or $(INSTALLDOCDIR)!; \ - echo '| You should try:'; \ - echo '| sudo "make install"'; \ - echo '--------------------------------------------------'; \ - exit 1; \ - fi - $(INSTALL) $(DIST_SRC) $(INSTALLSRCDIR) - $(INSTALL) $(GUIDE_FILES) $(INSTALLDOCDIR) - $(foreach file,$(GUIDE_FILES),$(SYMLINK) ../../../../doc/latex/koma-script/$(file) $(INSTALLSRCDIR)/../$(file);) - $(SECHO) ------------------------------------------------------------ - $(SECHO) Installed files at $(INSTALLSRCDIR): - $(SECHO) $(DIST_SRC) - $(SECHO) ------------------------------------------------------------ - $(SECHO) Installed files at $(INSTALLDOCDIR): - $(SECHO) $(GUIDE_FILES) - $(SECHO) ------------------------------------------------------------ - $(SECHO) Links at $(INSTALLSRCDIR)/..: - $(SECHO) $(GUIDE_FILES) - $(SECHO) ------------------------------------------------------------ - -uninstall_local: - @if [ -d $(INSTALLSRCDIR) ]; then \ - $(RM) -v $(foreach file,$(DIST_SRC),$(INSTALLSRCDIR)/$(file)); \ - if [ ls $(INSTALLSRCDIR) > /dev/null 2>&1; then \ - $(RMDIR) -v $(INSTALLSRCDIR); \ - else \ - echo "$(INSTALLSRCDIR) not empty!"; \ - fi; \ - else \ - echo "$(INSTALLSRCDIR) not found --> nothing to uninstall!"; \ - fi - @if [ -d $(INSTALLDOCDIR) ]; then \ - $(RM) -v $(foreach file,$(GUIDE_FILES),$(INSTALLDOCDIR)/$(file)); \ - else \ - echo "$(INSTALLDOCDIR) not found --> nothing to uninstall!"; \ - fi - -dist_local: $(DIST_FILES) - -$(RMDIR) $(DISTDIR) - $(MKDIR) $(DISTDIR) - $(CP) $(DIST_FILES) $(DISTDIR) - -maintain_local: - -$(RMDIR) $(MAINTAINDIR) - $(MKDIR) $(MAINTAINDIR) - $(CP) $(MAINTAIN_FILES) $(MAINTAINDIR) - -else - -install_local: - $(error install not supported at local make) - -uninstall_local: - $(error uninstall not supported at local make) - -dist_local: - $(error dist not supported at local make) - -maintain_prior: - $(error maintain not supported at local make) - -endif - -# ---------------------------------------------------------------------- -# usefull addons - -edit: - $(EDITOR) $(TEX_SRC) - -# ---------------------------------------------------------------------- -# file rules - -CKSUMFILES = $(BIBTEX_SRC) $(MAKEINDEXSTYLE) $(MAKECHANGESTYLE) \ - guide.aux guide.ind guide.idx guide.bbl guide.toc guide.lot \ - guide.chn guide.glo \ - $(foreach file,$(TEX_CHAPTERS) $(TEX_NONFREECHAPTERS),$(basename $(file)).aux) - -define latex - $(SMV) $@ guide.pdf || exit 0 - @while ! $(CKSUM) -c guide.md5; do \ - $(CKSUM) $(CKSUMFILES) > guide.md5 \ - && $(PDFLATEX) guide.tex \ - && ( $(BIBTEX) guide || [ $$? -le $(BIBTEXNOERROR) ] || exit 1 ) \ - && $(BIBTEXFIX) guide.bbl \ - && $(MAKEINDEX) guide.ind guide.idx \ - && $(INDEXPOSTOP) guide \ - && $(MAKECHANGE) guide.chn guide.glo \ - || exit 1;\ - done - $(SMV) guide.pdf $@ -endef - -$(GUIDENAME).html: htmlsetup guide.aux \ - $(foreach file,$(TEX_CHAPTERS) $(TEX_NONFREECHAPTERS),\ - $(basename $(file)).aux) - $(GENHTMLINDEX) $(addsuffix .aux,\ - $(basename $(TEX_CHAPTERS) $(TEX_NONFREECHAPTERS)))\ - >$@ - -$(GUIDENAME).pdf: $(DOCDIR)scrguide.cls $(DOCDIR)guide.tex $(GENERATED_SRC)\ - guide.aux guide.bbl $(BIBTEX_SRC) \ - $(MAKEINDEXSTYLE) guide.ind guide.idx \ - $(MAKECHANGESTYLE) guide.chn guide.glo \ - $(TEX_SRC) $(TEX_NONFREECHAPTERS) $(TEX_NONFREEMISC) - $(SRM) guide.md5 - $(latex) - -$(PLENGTH_DTX_RESULT): $(PLENGTH_DTX) - $(PDFLATEX) $< - -$(PLENGTH_PDF): $(PLENGTH_DTX_RESULT) - $(MPOST) $(addsuffix .mp,$(basename $@)) - $(MPTOPDF) $(addsuffix .mp,$(basename $@)) - @if [ -r $(addsuffix -1.pdf,$(basename $@)) ];\ - then $(MV) $(addsuffix .pdf,$(basename $@)-1) $@;\ - fi - -$(PDF_EPS): $(PDF_EPS_SRC) - $(EPSTOPDF) $(addsuffix .eps,$(basename $@)) - -$(EXAMPLE_LETTER_PDF): $(EXAMPLE_LETTER_SRC) - $(PDFLATEX) $(addsuffix .tex,$(basename $@)) - -$(EXAMPLE_LETTER_DTX_RESULT): $(EXAMPLE_LETTER_DTX) - $(PDFLATEX) $< - -ifdef EXAMPLE_NOTECOLUMN_SRC -$(EXAMPLE_NOTECOLUMN_PDF): $(EXAMPLE_NOTECOLUMN_SRC) - $(PDFLATEX) $< - $(PDFLATEX) $< - $(PDFLATEX) $< - $(PDFLATEX) $< -endif - -ifdef EXAMPLE_JURA_SRC -$(EXAMPLE_JURA_PDF): $(EXAMPLE_JURA_SRC) - $(PDFLATEX) $(addsuffix .tex,$(basename $@)) - $(PDFLATEX) $(addsuffix .tex,$(basename $@)) - $(PDFLATEX) $(addsuffix .tex,$(basename $@)) -endif - -guide.ind: guide.idx - $(MAKEINDEX) $@ $< - $(INDEXPOSTOP) guide - -guide.chn: guide.glo - $(MAKECHANGE) $@ $< - -guide.bbl: $(BIBTEX_SRC) guide.aux - $(BIBTEX) guide || test $$? -le $(BIBTEXNOERROR) - $(BIBTEXFIX) guide.bbl - -guide.glo guide.idx guide.aux: $(DOCDIR)guide.tex $(TEX_SRC) \ - $(TEX_NONFREECHAPTERS) $(TEX_NONFREEMISC) - $(PDFLATEX) guide.tex - -# ---------------------------------------------------------------------- diff --git a/macros/latex/contrib/koma-script/source-doc/Makefile.latexinit b/macros/latex/contrib/koma-script/source-doc/Makefile.latexinit deleted file mode 100644 index b8a2e70833..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/Makefile.latexinit +++ /dev/null @@ -1,68 +0,0 @@ -# Makefile.latexinit -# Copyright (c) Markus Kohm, 2002-2016 -# -# 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. -# ---------------------------------------------------------------------- -# Makefile.latexinit -# Copyright (c) Markus Kohm, 2002-2016 -# -# 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. -# ====================================================================== - -# Read input first from basedir and doc dir -TEXINPUTS := ./:$(DOCDIR):$(BASEDIR):$(TEXINPUTS) - -BIBINPUTS = $(DOCDIR):$(shell kpsewhich -expand-var=\$$BIBINPUTS) -BSTINPUTS = $(DOCDIR):$(shell kpsewhich -expand-var=\$$BSTINPUTS) -BIBTEX_SRC = $(DOCDIR)guide.bib - -MAKEINDEXSTYLE = $(DOCDIR)scrguide.ist -MAKEINDEXOPT = -r -s $(MAKEINDEXSTYLE) -o -MAKEINDEX = makeindex $(MAKEINDEXOPT) - -MAKECHANGESTYLE = $(DOCDIR)scrguide.gst -MAKECHANGEOPT = -r -s $(MAKECHANGESTYLE) -o -MAKECHANGE = makeindex $(MAKECHANGEOPT) - -PDFLATEX = $(LATEX) $(NONSTOPMODE) \ - '\def\languagename{'$(LANGUAGELONG)'}' \ - $(PDFOUTPUT) -INDEXPOSTOP = $(DOCDIR)bin/genindex.pl -GENHTMLINDEX = $(DOCDIR)bin/genhtmlidx.pl -#BIBTEX = bibtex8 -#BIBTEXNOERROR = 1 # BibTeX8 returns 1 after warnings -BIBTEX = bibtex -BIBTEXNOERROR = 0 # BibTeX returns 0 on ok -BIBTEXFIX = sed -i -e 's/\\btxurlfont[[:space:]]*$$/\\expandafter&/' - -MPOST = mpost -tex=latex -interaction=batchmode -MPTOPDF = mptopdf - -EPSTOPDF = epstopdf - -export TEXINPUTS BIBINPUTS BSTINPUTS diff --git a/macros/latex/contrib/koma-script/source-doc/bin/genhtmlidx.pl b/macros/latex/contrib/koma-script/source-doc/bin/genhtmlidx.pl deleted file mode 100755 index a101681f5b..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/bin/genhtmlidx.pl +++ /dev/null @@ -1,205 +0,0 @@ -#! /usr/bin/perl -w -eval 'exec perl -S $0 ${1+"$@"}' - if 0; #$running_under_some_shell - -# ====================================================================== -# genhtmlidx.pl -# Copyright (c) Markus Kohm, 2002-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. -# ---------------------------------------------------------------------- -# genhtmlidx.pl -# Copyright (c) Markus Kohm, 2002-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. -# ====================================================================== -# This perl script generates a html file with an index using the -# \newlabel entries at the aux files. -# -# Usage: genhtmlidx.pl ... -# ---------------------------------------------------------------------- -# Dieses perl-Script erzeugt aus den \newlabel-Eintraegen der -# aux-Dateien eine html-Datei mit einer Art Index. -# -# Verwendung: genhtmlidx.pl ... -# ====================================================================== - -use strict; - -my $auxfile; -my @option; -my @macro; -my @environment; -my @plength; -my @variable; -my @pagestyle; -my @counter; -my @floatstyle; -my @fontelement; -my @file; -my @length; -my @dohook; - -my $baselink; -my $htmlhead; -my $htmlend; -my %titles; - -my $setup=""; -open SETUP,") { - $setup .= $_; -} -close SETUP; -eval $setup; - -while ( $auxfile=shift ) { - open AUX,"<$auxfile" or die "Cannot read $auxfile!\n"; - while () { - my $line=$_; - if ( /^\\newlabel\{(desc:[^\}]+)\}\{(.*)\}$/ ) { - my $label=$1; - my $refargs=$2; - if ( $refargs =~ /^\{([^\{\}]*(\{((?:(?>[^\{\}]*)|(?1))*)\})*)\}\{([^\}]+)\}(.*)$/ ) { - my $ref=$1; - my $page=$4; - my $rest=$5; - if ( $rest =~ /^\{([^\{\}]*(\{((?:(?>[^\{\}]*)|(?1))*)\})*)\}\{([^\}]*)\}\{(.*)\}$/ ) { - my $title=$1; - my $anchor=$4; - my $ignore=$5; -# print STDERR "ref=\"$ref\", page=\"$page\", title=\"$title\", anchor=\"$anchor\", ignore=\"$ignore\"\n"; - my $entry; - if ( $anchor =~ /^desc:([^.]+)\.([^.]+)\.([^.]+)$/ ) { - $entry = "$3.$page.$1.$2"; - if ( "$2" eq "option" ) { - my $i=$1; - if ( $3 =~ /^([^=]+)=(.+)$/ ) { - $entry = "$1.$page.$i.option"; - } - push @option,$entry; - } elsif ( "$2" eq "cmd" ) { - push @macro,$entry; - } elsif ( "$2" eq "env" ) { - push @environment,$entry; - } elsif ( "$2" eq "plength" ) { - push @plength,$entry; - } elsif ( "$2" eq "variable" ) { - push @variable,$entry; - } elsif ( "$2" eq "pagestyle" ) { - push @pagestyle,$entry; - } elsif ( "$2" eq "counter" ) { - push @counter,$entry; - } elsif ( "$2" eq "floatstyle" ) { - push @floatstyle,$entry; - } elsif ( "$2" eq "fontelement" ) { - push @fontelement,$entry; - } elsif ( "$2" eq "package" ) { - push @file,$entry; - } elsif ( "$2" eq "length" ) { - push @length,$entry; - } elsif ( "$2" eq "dohook" ) { - push @dohook,$entry; - } else { - print STDERR "Unknown type $2!\n"; - } - } - } - } - } - } - close AUX; -} - -sub process { - my $group=shift; - my $prefix=shift; - my $arrayref=shift; - my @entries=sort { $a cmp $b } @$arrayref; - my $entry=""; - my $lastpage=""; - my $lastlink=""; - my $pageprefix=""; - if ( @entries > 0 ) { - print "

$titles{$group}

\n"; - print "
\n"; - } -} - -print $htmlhead; - -print "
\n"; - -process "option","",\@option; -process "macro","\\",\@macro; -process "environment","",\@environment; -process "length","",\@length; -process "plength","",\@plength; -process "variable","",\@variable; -process "pagestyle","",\@pagestyle; -process "counter","",\@counter; -process "floatstyle","",\@floatstyle; -#process "fontelement","",\@fontelement; -print STDERR "Ignoring index: $titles{fontelement}\n" if ( @fontelement ); -#process "file","",\@file; -print STDERR "Ignoring index: $titles{files}\n" if ( @file ); -#process "dohook","",\@dohook; -print STDERR "Ignoring index: $titles{dohook}\n" if ( @dohook ); -print $htmlend; diff --git a/macros/latex/contrib/koma-script/source-doc/bin/genindex.pl b/macros/latex/contrib/koma-script/source-doc/bin/genindex.pl deleted file mode 100755 index 879d259e35..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/bin/genindex.pl +++ /dev/null @@ -1,204 +0,0 @@ -#! /usr/bin/perl -w -eval 'exec perl -S $0 ${1+"$@"}' - if 0; #$running_under_some_shell - -# ====================================================================== -# genindex.pl -# Copyright (c) Markus Kohm, 2002-2006 -# -# 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. -# ---------------------------------------------------------------------- -# genindex.pl -# Copyright (c) Markus Kohm, 2002-2006 -# -# 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. -# ====================================================================== -# This perl scripts splits the index of scrguide or scrguien into -# several files, each with one index section. -# -# Usage: genindex.pl -# -# If has no extension ``.ind'', this extension will be added. -# ---------------------------------------------------------------------- -# Dieses perl Script spaltet den Index des scrguide in mehrere getrennte -# Dateien auf, von denen jede jeweils einen Index-Abschnitt enthlt. -# -# Verwendung: genindex.pl -# -# Wenn die ohne Endung ".ind" angegeben wird, so wird diese -# Endung automatisch angehngt. -# ====================================================================== - -use strict; -use Fcntl; - -my $indexinput = $ARGV[0]; -my $indexbase; -my $line; -my $entry = ""; -my %indfile; - -$indexinput = "$indexinput.ind" if ( ! ( $indexinput =~ /^.*\.ind\z/ ) ); -$indexbase = $1 if $indexinput =~ /^(.*)\.ind/; - -print "Generate multiindex for $indexinput\n"; - -# pass 1: search for and open destination index files -open (IDX, "<$indexinput") || - die "Cannot open $indexinput for reading\n"; -print "Search for index:\n"; -while ( ) { - if ( /\\UseIndex *\{([^\}]*)\}/ ) { - my $file; - if ( !$indfile{"$1"} ) { - print " Open new index $indexbase-$1.ind\n"; - open ( $file, ">$indexbase-$1.ind" ) || - die "Cannot open $indexbase-$1.ind for writing\n"; - $indfile{"$1"} = $file; - } - } -} -# we must have a general index -if ( !$indfile{"gen"} ) { - print " Open new index $indexbase-gen.ind\n" ; - open ( $indfile{"gen"}, ">$indexbase-gen.ind" ) || - die "Cannot open $indexbase-gen.ind for writing\n"; -} - -# pass 2: copy to destination index files -seek (IDX, 0, 0) || - die "Cannot rewind $indexinput\n"; -print "Copy entries:\n"; -# step 1: copy to every index file until first \indexsectione -while ( defined( ( $line = ) ) - && ( ! ( $line =~ /^( *\\indexsection *\{)/ ) ) ) { - printtoallind( "$line" ); - $line = ""; -} -# copy also \indexsection-line -printtoallind( "$line" ) if ( $line ); - -# step 2: read complete \indexsection, \indexspace, \item, \subitem or -# \subsubitem and process it (= copy it to destination index files) -while ( $line = ) { - if ( $line =~ /^ *((\\indexsection|\\end) *\{|\\indexspace)/ ) { - processentry( "$entry" ); - $entry = ""; - printtoallind( "$line" ); - } elsif ( $line =~ /^ *\\(sub(sub)?)?item +/ ) { - processentry( "$entry" ); - $entry = $line; - } else { - $entry = "$entry$line"; - } -} - -close (IDX); -closeallind (); - -# post optimization of all destination index files -print "Optimize every index:\n"; -optimizeallind (); - -exit; - -# close all destination index files -sub closeallind { - my $name; - my $file; - while (($name,$file) = each %indfile) { - print " Close $indexbase-$name.ind\n" ; - close ($file); - $indfile{"$name"}=0; - } -} - -# optimize all destination index files -sub optimizeallind { - my $name; - my $file; - while (($name,$file) = each %indfile) { - print " $indexbase-$name.ind\n"; - optimizeind( "$name" ); - } -} - -# print arg 1 to all destination index files -sub printtoallind { - my $line = shift; - my $name; - my $file; - while (($name,$file) = each %indfile) { - print ($file $line); - } -} - -# process an index entry (copy it to valid destination index files) -sub processentry { - my $line = shift; - my $file = $indfile{"gen"}; - if ( $line =~ /\\UseIndex *\{([^\}]*)\} *(.*)/ ) { - $file = $indfile{"$1"}; - print ($file $line); - } else { - print ($file $line); - } -} - -# optimize an index files (remove \indexsection without \item) -sub optimizeind { - my $idx = shift; - my $interstuff = ""; - my $line; - - open (IN, "<$indexbase-$idx.ind" ) || - die "Cannot open $indexbase-$idx.ind for reading"; - open (OUT, ">$indexbase-$idx.new" ) || - die "Cannot open $indexbase-$idx.new for writing"; - - while ( $line= ) { - if ( $line =~ /^ *\\indexspace/ ) { - $interstuff = "\n$line"; - } elsif ( ( $line =~ /^ *\\indexsection *\{/ ) || - ( $line =~ /^$/ ) ) { - $interstuff = "$interstuff$line"; - } else { - print (OUT $interstuff) if ( !( $interstuff =~ /^$/ ) - && !( $line =~ /^ *\\end\{theindex\}/ ) ); - $interstuff = ""; - print (OUT $line); - } - } - - close (OUT); - close (IN); - unlink "$indexbase-$idx.ind" || - die "Cannot delete $indexbase-$idx.ind"; - rename "$indexbase-$idx.new", "$indexbase-$idx.ind" || - die "Cannot rename $indexbase-$idx.new to indexbase-$idx.ind"; -} diff --git a/macros/latex/contrib/koma-script/source-doc/english/Makefile b/macros/latex/contrib/koma-script/source-doc/english/Makefile deleted file mode 100644 index b418a621f7..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# ====================================================================== -# Makefile -# Copyright (c) Markus Kohm, 2002-2015 -# -# 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. -# ---------------------------------------------------------------------- -# Makefile -# Copyright (c) Markus Kohm, 2002-2015 -# -# 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. -# ====================================================================== - -# ---------------------------------------------------------------------- -# Directory with basics -BASEDIR ?= $(PWD)/../../ -DOCDIR = $(BASEDIR)doc/ -# language -LANGUAGE = english -LANGUAGESHORTCUT = en -LANGUAGELONG = english - -include $(DOCDIR)Makefile.guide - -# ---------------------------------------------------------------------- - -maintainclean_local: distclean_local - $(RM) guide.pdf $(GUIDENAME).pdf $(GUIDENAME).html - [ -L tocbasic.tex ] && $(RM) tocbasic.tex || true -# -# end of file `Makefile' diff --git a/macros/latex/contrib/koma-script/source-doc/english/adrconvnote.tex b/macros/latex/contrib/koma-script/source-doc/english/adrconvnote.tex deleted file mode 100644 index 62b212b3d4..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/adrconvnote.tex +++ /dev/null @@ -1,99 +0,0 @@ -% ====================================================================== -% adrconvnote.tex -% Copyright (c) Markus Kohm, 2001-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. -% ---------------------------------------------------------------------- -% adrconvnote.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Chapter about adrconv of the KOMA-Script guide -% Maintained by Jens-Uwe Morawski (with help from Markus Kohm) -% -% ---------------------------------------------------------------------- -% -% Kapitel ueber adrconv in der KOMA-Script-Anleitung -% Verwaltet von Jens-Uwe Morawski (mit Unterstuetzung von Markus Kohm) -% -% ====================================================================== - -\KOMAProvidesFile{adrconvnote.tex} - [$Date: 2019-10-10 09:50:23 +0200 (Do, 10. Okt 2019) $ - KOMA-Script guide (chapter: adrconv)] - -\translator{Jens-Uwe Morawski\and Gernot Hassenpflug\and Markus Kohm\and - Karl Hagen} - -% Date of the translated German file: 2019-10-10 - -\chapter{Creating Address Files from an Address Database}% -\labelbase{addrconv}% -\Index{address>file}% -\Index{address>database}% -\IndexPackage{addrconv} - -In previous versions of \KOMAScript{}, the \Package{addrconv} package was an -integral part of the \KOMAScript{} system. The main connection to -\KOMAScript{} was that with the help of this package, it was possible to -create address files compatible with the \KOMAScript{} letter class or with -the \Package{scraddr} package from an address database in \BibTeX{} format. - -\begin{lstlisting}[morekeywords={@address}] - @address{HMUS, - name = {Carl McExample}, - title = {Dr.}, - city = {Anywhere}, - zip = 01234, - country = {Great Britain}, - street = {A long Road}, - phone = {01234 / 5 67 89}, - note = {always forget his birthday}, - key = {HMUS}, - } -\end{lstlisting} - -From entries such as the one above, you can use \BibTeX{} and various -{\BibTeX} styles to create address files. There are also some special \LaTeX{} -files that make it possible to create various telephone and address lists from -the address files. - -However, the \Package{addrconv} package was actually an independent package, -including features beyond what is required for \KOMAScript{}. That is why -\Package{addrconv} has not been included in \KOMAScript{} for some time. The -\Package{adrconv} package, with a single \emph{d}, entirely replaces -\Package{addrconv}. If it is not included in your \TeX{} distribution, you can -download it from \cite{package:adrconv} and install it separately. - -%%% Local Variables: -%%% mode: latex -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/authorpart.tex b/macros/latex/contrib/koma-script/source-doc/english/authorpart.tex deleted file mode 100644 index 37b4d7bc8a..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/authorpart.tex +++ /dev/null @@ -1,80 +0,0 @@ -% ====================================================================== -% authorpart.tex -% Copyright (c) Markus Kohm, 2002-2018 -% -% 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. -% ---------------------------------------------------------------------- -% authorpart.tex -% Copyright (c) Markus Kohm, 2002-2018 -% -% 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. -% ====================================================================== -% -% First part: KOMA-Script for Authors -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Erster Teil: KOMA-Script fuer Autoren -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\ProvidesFile{authorpart.tex}[2012/04/02 Part KOMA-Script for Authors] -\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} - -\setpartpreamble{% - \vspace*{2\baselineskip}% - \setlength{\parindent}{1em}% - - \noindent This part provides information for writers of articles, reports, - books, and letters. The average user is probably less interested in how - things are implemented in \KOMAScript{} and what pitfalls exist. Also, - normal users aren't interested in obsolete options and instructions. They - want to know how to achieve things using current options and instructions, - and perhaps in some background information about typography. - - The few passages in this part which contain extra information and - explanations that may be of less interest for the impatient reader are set - in a sans-serif typeface and can be skipped if desired. For those who are - interested in more information about the implementation, side-effects with - other packages, or obsolete options and instructions, please refer to - \autoref{part:forExperts} beginning on \autopageref{part:forExperts}. That - part of the \KOMAScript{} guide also describes all the features that were - created specially for authors of packages and classes.% -} - -\part{\KOMAScript{} for Authors\label{part:forAuthors}} - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% coding: us-ascii -%%% TeX-master: "guide.tex" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-compatibility.tex b/macros/latex/contrib/koma-script/source-doc/english/common-compatibility.tex deleted file mode 100644 index 27bdc04910..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-compatibility.tex +++ /dev/null @@ -1,197 +0,0 @@ -% ====================================================================== -% common-compatibility.tex -% Copyright (c) Markus Kohm, 2001-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-compatibility.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-compatibility.tex} - [$Date: 2019-10-31 08:38:01 +0100 (Do, 31. Okt 2019) $ - KOMA-Script guide (common paragraphs)] -\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} - -% Date of the translated German file: 2019-10-31 - -\section{Compatibility with Earlier Versions of \KOMAScript} -\seclabel{compatibilityOptions} -\BeginIndexGroup -\BeginIndex{}{Compatibility} - -\IfThisCommonFirstRun{}{% - The information in - \autoref{sec:\ThisCommonFirstLabelBase.compatibilityOptions} applies equally - to this chapter. - \IfThisCommonLabelBase{scrlttr2}{However, this feature has existed in - \Class{scrlttr2} since version~2.9t, whereas \Package{scrletter} does not - offer it. }{}% - So if you have already read and understood - \autoref{sec:\ThisCommonFirstLabelBase.compatibilityOptions} you can skip - ahead to \autopageref{sec:\ThisCommonLabelBase.compatibilityOptions.next}, - \autopageref{sec:\ThisCommonLabelBase.compatibilityOptions.next}.% -} - -\IfThisCommonLabelBaseOneOf{typearea,maincls,scrlttr2}{% - Those who produce their documents from source code typically attach the - utmost importance to the fact that future \LaTeX{} runs will yield exactly - the same result. In some cases, however, improvements and bug fixes to the - \IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{class}{package} will - result in changes of behaviour, especially to the layout. This, however, - may be undesirable.% -}{% - \IfThisCommonLabelBase{scrextend}{% - % In some cases, improvements and bug fixes to the package will result - % in changes of behaviour, especially to the layout. This, however, - % may be undesirable. Those who produce their documents from source code - % typically attach the utmost importance to the fact that future - % \LaTeX{} runs will yield exactly the same result.% - }{% - \ThisCommonLabelBaseFailure - % \IfThisCommonLabelBase{scrlttr2}{% - % In some cases, improvements and bug fixes to the package will result - % in changes of behaviour, especially to the layout. This, however, - % may be undesirable. - % }{}% - }% -}% - - -\begin{Declaration} - \OptionVName{version}{value}% - \OptionValue{version}{first}% - \OptionValue{version}{last} -\end{Declaration} -%\ChangedAt{v2.96a}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% -%\ChangedAt{v2.9t}{\Class{scrlttr2}}% -%\ChangedAt{v3.01b}{\Package{typearea}}% -\IfThisCommonLabelBase{scrextend}{With \Package{scrextend}, you can}{Since - \IfThisCommonLabelBase{typearea}{% - Version~3.01b, \Package{typearea}\ChangedAt{v3.01b}{\Package{typearea}}}{% - \IfThisCommonLabelBase{maincls}{% - Version~2.96a, \KOMAScript{}\ChangedAt{v2.96a}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}}}{% - \IfThisCommonLabelBase{scrlttr2}{% - Version~2.9t, \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}}% - \ChangedAt{v2.9t}{\Class{scrlttr2}}}{% - \InteralCommonFileUsageError}% - }% - }% -\ has been able to } -choose whether the source file should, as much as possible, -continue to produce exactly the same result within a \LaTeX{} run or should -be formatted according to the modifications of the latest version% -\IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{ of the class}{}. You -can specify the version with which you want your file to be compatible by -using the \Option{version} option. Compatibility with the oldest supported -\KOMAScript{} version can be achieved with -\OptionValue{version}{first}\important{\OptionValue{version}{first}} or -\OptionValue{version}{2.9} or \OptionValue{version}{2.9t}. Setting -\PName{value} to an unknown release number will result in a warning message -and selects \OptionValue{version}{first} for safety. - -With \OptionValue{version}{last}\important{\OptionValue{version}{last}}% -\textnote{default}, you can select the latest version. In this case, you give -up backwards compatibility. If the option is used without a value, -\PValue{last} is assumed. This\ChangedAt{v3.01a}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}\and \Class{scrlttr2}\and - \Package{scrextend}} also corresponds to the default setting, as long as you -do not use any deprecated options. - -\IfThisCommonLabelBase{scrextend}{% scrextend doesn't recognize obsolete options -}{% - If\textnote{Attention!} you use a deprecated option of \KOMAScript~2, - \KOMAScript~3 will switch to \OptionValue{version}{first} automatically. - This will also result in a warning message that explains how to prevent - this switch. Alternatively, you can choose a different setting for - \Option{version} with the desired compatibility after the deprecated - option.% -} - -Compatibility is primarily a question of line and page breaks (wrapping). If -you choose compatibility with an older version, new options that do not affect -wrapping are still available. The \Option{version} option does not affect any -wrapping changes that are the result of fixing unambiguous errors. -If\textnote{Hint!} you need unconditional wrapping compatibility even in the -case of bugs, you should physically save the old \KOMAScript{} version you -need together with your document. - -\IfThisCommonLabelBase{scrlttr2}{% - \begin{Example} - The example letters in this chapter should use all the features of the - latest version of \KOMAScript{}. For this, the we set the compatibility - correspondingly when loading the class:% - \lstinputcode[xleftmargin=1em,lastline=1]{letter-0.tex}% - In this case the symbolic value \PValue{last} has been used to select the - latest version.% - \iftrue% Umbruchkorrektur - Here, the latest version was simply chosen with the symbolic value - \PValue{last}.% - \else% - In order not to have to specify a new version number for each new version, - the symbolic value \PValue{last} was chosen here.% - \fi - \end{Example}}{} - -Note\textnote{Attention!} that you cannot change the \Option{version} option -after loading the % -\IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{class}{% - \IfThisCommonLabelBase{typearea}{\Package{typearea}}{% - \IfThisCommonLabelBase{scrextend}{\Package{scrextend}}{% - \InternalCommonFileUsageError }% - }% -\ package}. Setting this option with -\DescRef{\ThisCommonLabelBase.cmd.KOMAoptions} or -\DescRef{\ThisCommonLabelBase.cmd.KOMAoption} will -therefore cause an error.% -\EndIndexGroup -% -\EndIndexGroup - -\phantomsection -\label{sec:\ThisCommonLabelBase.compatibilityOptions.end} -\endinput - -%%% Local Variables: -%%% mode: latex -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-dictum.tex b/macros/latex/contrib/koma-script/source-doc/english/common-dictum.tex deleted file mode 100644 index e59a2b41b0..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-dictum.tex +++ /dev/null @@ -1,260 +0,0 @@ -% ====================================================================== -% common-dictum.tex -% Copyright (c) Markus Kohm, 2001-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-dictum.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-dictum.tex} - [$Date: 2019-11-20 08:38:35 +0100 (Mi, 20. Nov 2019) $ - KOMA-Script guide (common paragraphs)] -\translator{Gernot Hassenpflug\and Markus Kohm\and Krickette Murabayashi\and - Karl Hagen} - -% Date of the translated German file: 2019-11-20 - -\section{Dicta} -\seclabel{dictum}% -\BeginIndexGroup -\BeginIndex{}{saying}% -\BeginIndex{}{dictum}% -\BeginIndex{}{epigraph}% - -\IfThisCommonFirstRun{}{% - The information in \autoref{sec:\ThisCommonFirstLabelBase.dictum} applies - equally to this chapter. % - \IfThisCommonLabelBase{scrextend}{% - However, \Package{scrextend} does not support the commands - \DescRef{maincls.cmd.setchapterpreamble} and - \DescRef{maincls.cmd.setpartpreamble}. - \iftrue% Umbruchvariante - Whether the class you are using offers an equivalent instruction - can be found in the documentation for the respective class .% - \fi% - }{}% - So if you have already read and understood - \autoref{sec:\ThisCommonFirstLabelBase.dictum}, you can skip ahead to - \autoref{sec:\ThisCommonLabelBase.dictum.next}, - \autopageref{sec:\ThisCommonLabelBase.dictum.next}.% -}{}% - -\IfThisCommonLabelBase{scrextend}{% Umbruchkorrekturvarianten - A common element in a document is an epigraph or quotation that is set above - or below a chapter or section heading, typically right-justified. The - epigraph and its source are usually specially formatted.% -}{% - A common element in a document is an epigraph or quotation that is set above - or below a chapter or section heading, along with a reference to the source - and its own formatting.% -} % -\KOMAScript{} refers to such an epigraph as a \emph{dictum}. - -\begin{Declaration} - \Macro{dictum}\OParameter{author}\Parameter{text}% - \Macro{dictumwidth}% - \Macro{dictumauthorformat}\Parameter{author}% - \Macro{dictumrule}% - \Macro{raggeddictum}% - \Macro{raggeddictumtext}% - \Macro{raggeddictumauthor} -\end{Declaration}% -You can set such a saying with the help of the \Macro{dictum} command. % -\IfThisCommonLabelBase{maincls}{% - This\textnote{Hint!} macro can be included in the mandatory argument of - either the \DescRef{maincls.cmd.setchapterpreamble} or the - \DescRef{maincls.cmd.setpartpreamble} command. However, this is not - obligatory.\par% -}{}% -The dictum, along with an optional \PName{author}, is inserted in a -\Macro{parbox}\IndexCmd{parbox} (see \cite{latex:usrguide}) of width -\Macro{dictumwidth}. However, \Macro{dictumwidth} is not a length which can be -set with \Macro{setlength}. It is a macro that can be redefined using -\Macro{renewcommand}. The default is \PValue{0.3333\Length{textwidth}}, which -is one third of the text width. The box itself is aligned with the command -\Macro{raggeddictum}. The default is \Macro{raggedleft}\IndexCmd{raggedleft}, -that is, right justified. \Macro{raggeddictum} can be redefined -with \IfThisCommonLabelBase{scrextend}{% Umbruchoptimierung -}{the help of }\Macro{renewcommand}. - -You can align the \PName{dictum} within the box using -\Macro{raggeddictumtext}\important{\Macro{raggeddictumtext}}. -The default is \Macro{raggedright}\IndexCmd{raggedright}, that is, left -justified. You can also redefine this macro with \Macro{renewcommand}.% -\BeginIndexGroup -\BeginIndex{FontElement}{dictum}\LabelFontElement{dictum}% -\LabelFontElement{dictumtext}% -The output uses the default font setting for the element -\FontElement{dictum}\important{\FontElement{dictum}}, which can be changed -with the commands \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and -\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (see -\autoref{sec:\ThisCommonLabelBase.textmarkup}, -\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}). Default settings are -listed in \autoref{tab:maincls.dictumfont}% -\IfThisCommonFirstRun{.% - \begin{table} -% \centering% - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% -% \caption - \begin{captionbeside}{Default settings for the elements of a dictum} - [l] - \begin{tabular}[t]{ll} - \toprule - Element & Default \\ - \midrule - \DescRef{\LabelBase.fontelement.dictum} & - \Macro{normalfont}\Macro{normalcolor}\Macro{sffamily}\Macro{small}\\ - \DescRef{\LabelBase.fontelement.dictumauthor} & - \Macro{itshape}\\ - \bottomrule - \end{tabular} - \end{captionbeside} - \label{tab:\ThisCommonLabelBase.dictumfont} - \end{table} -}{% - , \autopageref{tab:\ThisCommonFirstLabelBase.dictumfont}.% -} -\EndIndexGroup - -If an \PName{author} is defined, it is separated from the \PName{dictum} by -a horizontal rule spanning the full width of the \Macro{parbox}. This% -\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrextend}{% - \ChangedAt{v3.10}{\Package{scrextend}}% - }{\InternalCommonFileUsageError}% -} % -rule is defined in \Macro{dictumrule}\important{\Macro{dictumrule}} as a -vertical object with -\begin{lstcode} - \newcommand*{\dictumrule}{\vskip-1ex\hrulefill\par} -\end{lstcode} - -The \Macro{raggeddictumauthor}\important{\Macro{raggeddictumauthor}} command -defines the alignment for the rule and the \PName{author}. The default is -\Macro{raggedleft}. This command can also be redefined using -\Macro{renewcommand}. The format is defined with -\Macro{dictumauthorformat}\important{\Macro{dictumauthorformat}}. This macro -expects the \PName{author} text as its argument. By default -\Macro{dictumauthorformat} is defined as -\begin{lstcode} - \newcommand*{\dictumauthorformat}[1]{(#1)} -\end{lstcode} -Thus the \PName{author} is set enclosed in rounded parentheses. -\BeginIndexGroup -\BeginIndex{FontElement}{dictumauthor}\LabelFontElement{dictumauthor}% -For the \FontElement{dictumauthor}\important{\FontElement{dictumauthor}} -element, you can define a different font than that used for the -\DescRef{\LabelBase.fontelement.dictum} element. The default settings are -listed in \autoref{tab:maincls.dictumfont}. Changes can be made using the -\DescRef{\ThisCommonLabelBase.cmd.setkomafont} and -\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\ThisCommonLabelBase.textmarkup}, -\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}).% -\EndIndexGroup - -\IfThisCommonLabelBase{maincls}{% - If you use \Macro{dictum} within the - \DescRef{maincls.cmd.setchapterpreamble} or - \DescRef{maincls.cmd.setpartpreamble} macro, \Length{textwidth} is not the - width of the whole text body but the current text width. If - \Macro{dictumwidth} is set to \PValue{.5\Length{textwidth}} and - \DescRef{maincls.cmd.setchapterpreamble} has an optional width of - \PValue{.5\Length{textwidth}} too, you will get a box with a width one - quarter of the text width. The horizontal positioning of the dictum inside - the box is always done with \Macro{raggeddictum}. The optional argument for - horizontal positioning which is implemented for these two commands has no - effect to the \Macro{text}. If you use \Macro{dictum} you should - refrain from setting the optional width for - \DescRef{maincls.cmd.setchapterpreamble} or - \DescRef{maincls.cmd.setpartpreamble}. - - If\textnote{Hint!} you have more than one dictum, one under another, you - should separate them by an additional vertical space, which is easily - accomplished using the \Macro{bigskip}\IndexCmd{bigskip} command.% - \iftrue% -}{\csname iffalse\endcsname} - - \begin{Example} - You are writing a chapter about modern marriage, and you want to place a - dictum in the preamble to the chapter heading. You write: -\begin{lstcode} - \setchapterpreamble[u]{% - \dictum[Schiller]{So pause ye who would link your fates~\dots}} - \chapter{Modern Marriage} -\end{lstcode} - The output would look as follows: - \begin{ShowOutput} - {\usekomafont{disposition}\usekomafont{chapter}% - 17\enskip Modern Marriage\par} \vspace{\baselineskip} - \dictum[Schiller]{So pause ye who would link - your fates~\dots} - \end{ShowOutput} - - If you want the dictum to span only a quarter of the text width - rather than a third, you can redefine \Macro{dictumwidth} this way: -\begin{lstcode} - \renewcommand*{\dictumwidth}{.25\textwidth} -\end{lstcode} -\end{Example} - -\IfThisCommonLabelBase{maincls}{}{% Umbruchkorrekturtext - At this point, note the \Package{ragged2e}\important{\Package{ragged2e}}% - \IndexPackage{ragged2e} package, with which you can produce unjustified text - that uses hyphenation (see \cite{package:ragged2e}).% -}% -\fi -% -\EndIndexGroup -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% coding: us-ascii -%%% ispell-local-dictionary: "en_GB" -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-draftmode.tex b/macros/latex/contrib/koma-script/source-doc/english/common-draftmode.tex deleted file mode 100644 index 5edbb4b2c4..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-draftmode.tex +++ /dev/null @@ -1,131 +0,0 @@ -% ====================================================================== -% common-draftmode.tex -% Copyright (c) Markus Kohm, 2001-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-draftmode.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-draftmode.tex} - [$Date: 2019-10-31 08:46:30 +0100 (Do, 31. Okt 2019) $ - KOMA-Script guide (common paragraphs)] -\translator{Markus Kohm\and Gernot Hassenpflug\and Krickette Murabayashi\and - Karl Hagen} - -% Date of the translated German file: 2019-10-31 - -\section{Draft Mode} -\seclabel{draft}% -\BeginIndexGroup -\BeginIndex{}{draft mode}% - -\IfThisCommonFirstRun{}{% - The information in \autoref{sec:\ThisCommonFirstLabelBase.draft} applies - equally to \IfThisCommonLabelBase{scrlttr2}{\Class{scrlttr2}% - \OnlyAt{\Class{scrlttr2}}}{this chapter}. So if you have already read - and understood \autoref{sec:\ThisCommonFirstLabelBase.draft}, you can skip - ahead to \autoref{sec:\ThisCommonLabelBase.draft.next} on - \autopageref{sec:\ThisCommonLabelBase.draft.next}.% - \IfThisCommonLabelBase{scrlttr2}{ The \Package{scrletter} package does not - provide a draft mode itself but relies upon the class you use.}{}% -} - -\IfThisCommonLabelBase{scrextend}{}{% - Many classes and packages provide a draft mode in addition to the normal - typesetting mode. The differences between these two are as diverse as the - classes and packages that offer this distinction.% - \IfThisCommonLabelBase{scrextend}{% Umbruchkorrekturtext - \ The draft mode of some packages also results in changes to the output - that affect the document's layout. This is not the case with - \Package{scrextend}.% - }{}% -} - -\begin{Declaration} - \OptionVName{draft}{simple switch} - \OptionVName{overfullrule}{simple switch} -\end{Declaration}% -The \Option{draft}\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrartcl}\and - \Class{scrreprt}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.00}{\Class{scrlttr2}}\OnlyAt{\Class{scrlttr2}}% - }{}% -} option distinguishes between documents being drafted and finished -documents\Index{final version}. The \PName{simple switch} can be one of the -standard values for simple switches from \autoref{tab:truefalseswitch}, -\autopageref{tab:truefalseswitch}. If you activate this -option\important{\OptionValue{draft}{true}}, small black boxes will be output -at the end of overly long lines. These boxes make it easier for the untrained -eye to locate the paragraphs that require manual post-processing. By contrast, -the default, \OptionValue{draft}{false}, shows no such boxes. Incidentally, -such lines often disappear when you use the -\Package{microtype}\IndexPackage{microtype}\important{\Package{microtype}} -package \cite{package:microtype}. - -Since\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.25}{\Class{scrbook}\and \Class{scrartcl}\and - \Class{scrreprt}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.25}{\Class{scrlttr2}}% - }{% - \IfThisCommonLabelBase{scrextend}{% - \ChangedAt{v3.25}{\Package{scrextend}}% - }{}% - }% -} the \Option{draft} option can lead to all sorts of unwanted effects with -various packages, \KOMAScript{} allows you to control this marking of overly -long lines separately with the -\Option{overfullrule}\important{\OptionValue{overfullrule}{true}} option. If -this option is enabled, the marker is again displayed.% -% -\EndIndexGroup -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-fontsize.tex b/macros/latex/contrib/koma-script/source-doc/english/common-fontsize.tex deleted file mode 100644 index 56235e612b..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-fontsize.tex +++ /dev/null @@ -1,189 +0,0 @@ -% ====================================================================== -% common-fontsize.tex -% Copyright (c) Markus Kohm, 2001-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-fontsize.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-fontsize.tex} - [$Date: 2019-12-06 10:52:05 +0100 (Fr, 06. Dez 2019) $ - KOMA-Script guide (common paragraphs: fontsize)] -\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} - -% Date of the translated German file: 2019-12-06 - -\section{Choosing the Document Font Size} -\seclabel{fontOptions}% -\BeginIndexGroup -\BeginIndex{}{font>size}% - -\IfThisCommonFirstRun{% - The main font and its size are central elements in the design of a document. - As stated in \autoref{cha:typearea}, the division of the page into the text - area and the margins fundamentally depends on them. The main font is the one - that is used for most of the text in a document. All variations, whether in - shape, thickness, slant, or size, are related to the main font.% -}{% - The information in \autoref{sec:\ThisCommonFirstLabelBase.fontOptions} - applies equally to - \IfThisCommonLabelBase{scrlttr2}{\Class{scrlttr2}\OnlyAt{scrlttr2}}% - {this chapter}. \IfThisCommonLabelBase{scrlttr2}{By contrast, the - \Package{scrletter} package by itself does not offer font-size selection - but depends completely on the class you use.}{} So if you have already - read and understood \autoref{sec:\ThisCommonFirstLabelBase.fontOptions}, you - can \IfThisCommonLabelBase{scrlttr2}{continue to - \autopageref{sec:\ThisCommonLabelBase.fontOptions.end} at the end of this - section. If you use \Package{scrletter}, you can }{}% - skip directly to \autoref{sec:\ThisCommonLabelBase.fontOptions.next}, - \autopageref{sec:\ThisCommonLabelBase.fontOptions.next}.% -} - -\begin{Declaration} - \OptionVName{fontsize}{size} -\end{Declaration} -While\IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{% - \textnote{\KOMAScript{} vs. standard classes}} the standard classes support -only a very limited number of font sizes, -\IfThisCommonLabelBase{scrlttr2}{\Class{scrlttr2}}{\KOMAScript} provides the -ability to specify any \PName{size} for the main font. You can also use any -known \TeX unit as a unit for the \PName{size}. If the \PName{size} is -specified without a unit, it is assumed to be \PValue{pt}.\iffree{}{ The exact - procedure for setting the font size is documented for experts and interested - users in \autoref{sec:maincls-experts.addInfos}, - \DescPageRef{maincls-experts.option.fontsize}.} - -If you set the option within the document, the main font size and the -dependent font sizes of the commands \Macro{tiny}, \Macro{scriptsize}, -\Macro{footnotesize}, \Macro{small}, \Macro{normalsize}, \Macro{large}, -\Macro{Large}, \Macro{LARGE}, \Macro{huge} and \Macro{Huge} are changed. This -can be useful, for example, if you want % -\IfThisCommonLabelBase{scrlttr2}{another letter }{the appendix }% -to be set in a smaller font size. - -Note\textnote{Attention!} that using this option after -\IfThisCommonLabelBase{scrextend}{potentially loading - \hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea}% - \important{\hyperref[cha:typearea]{\Package{typearea}}}}{loading the class} -does not automatically recalculate the type area and margins (see -\DescRef{typearea.cmd.recalctypearea}\IndexCmd{recalctypearea}, -\autoref{sec:typearea.typearea}, -\DescPageRef{typearea.cmd.recalctypearea}). However, if this recalculation is -performed, it will be based on the current main font size. The effects of -changing the main font size upon other loaded packages or the class used -depends on these packages and on the class. \IfThisCommonLabelBase{maincls}{% - This means that you can encounter errors which are not the fault of - \KOMAScript, and even the \KOMAScript{} classes themselves do not - recalculate all lengths if the main font size changes after loading the - class.% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - You can encounter errors which are not the fault of \KOMAScript{}, and - further, the \Class{scrlttr2} class itself does not recalculate all - lengths if the main font size changes after loading the class.% - }{% - This means that you can encounter errors which are not the fault of - \KOMAScript{}.% - }% -}% - -This\textnote{Attention!} option should by no means be misinterpreted as a -substitute for \Macro{fontsize} (see \cite{latex:fntguide}). Also, you should -not use it in place of one of the font size commands that are relative to the -main font, from \Macro{tiny} to \Macro{Huge}. -\IfThisCommonLabelBase{scrlttr2}{% - For \Class{scrlttr2} the default is \OptionValue{fontsize}{12pt}. - - \begin{Example} - \phantomsection\label{sec:\ThisCommonLabelBase.fontOptions.end}% - Suppose the organization in the sample letter is the \emph{``Friends of - Noxious Font Sizes''}, for which reason it should be set in 14\Unit{pt} - instead of 12\Unit{pt}. You can achieve this by making a small change to - the first line:% - \lstinputcode[xleftmargin=1em]{letter-6}% - Alternatively, the option could be set as an optional argument to - \DescRef{\LabelBase.env.letter}: - \lstinputcode[xleftmargin=1em]{letter-5}% - Since the text area is not recalculated in this late change of the font - size, the two results differ in \autoref{fig:scrlttr2.letter-5-6}. - \begin{figure} - \centering - \frame{\includegraphics[width=.4\textwidth]{letter-5}}\quad - \frame{\includegraphics[width=.4\textwidth]{letter-6}} - \caption[{Example: letter with address, salutation, text, closing phrase, - postscript, enclosures, distribution list, and noxiously large font - size}] - {result of a short letter with recipient, opening, text, closing, - postscript, enclosures, distribution list, and a noxiously large font - (the date is set by default): in the left-hand version, the font size - has been defined by the optional argument of - \DescRef{\LabelBase.env.letter}; in the right-hand one, the optional - argument of \DescRef{\LabelBase.cmd.documentclass} has been used} - \label{fig:scrlttr2.letter-5-6} - \end{figure} - \end{Example} - \ExampleEndFix -}{% - \IfThisCommonLabelBase{maincls}{% - \par - \phantomsection\label{sec:\ThisCommonLabelBase.fontOptions.end}% - The default for \Class{scrbook}, \Class{scrreprt}, and \Class{scrartcl} is - \OptionValue{fontsize}{11pt}.\textnote{\KOMAScript{} vs. standard classes} - In contrast, the default size in the standard classes is \Option{10pt}. - You may need to account for this difference if you switch from a standard - class to a \KOMAScript{} class\iffree{}{ or when using the - \DescRef{maincls-experts.option.emulatestandardclasses}% - \IndexOption{emulatestandardclasses} option}.% - }{}% -}% -% -\EndIndexGroup -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% coding: us-ascii -%%% ispell-local-dictionary: "en_GB" -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-footnotes-experts.tex b/macros/latex/contrib/koma-script/source-doc/english/common-footnotes-experts.tex deleted file mode 100644 index 142ec880f2..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-footnotes-experts.tex +++ /dev/null @@ -1,54 +0,0 @@ -% ====================================================================== -% common-footnotes-experts.tex -% Copyright (c) Markus Kohm, 2022 -% -% 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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-footnotes-experts.tex} - [$Date: 2022-02-16 10:57:02 +0100 (Mi, 16. Feb 2022) $ - KOMA-Script guide (common paragraphs: Footnotes)] -\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} - -% Date of the translated German file: 2022-02-16 - -\begin{Declaration} - \DoHook{footnote/text/begin}% - \DoHook{footnote/text/end}% -\end{Declaration} -\BeginIndex{}{hook}% -For\ChangedAt{v3.36}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}\and \Package{scrextend}} experts there are also two hooks -of type \emph{do-hook} (see \autoref{sec:scrbase.hooks} from -\autopageref{sec:scrbase.hooks}). The first of these is used at the very -beginning of \Macro{@makefntext} before -\DescRef{maincls.cmd.raggedfootnote} is executed. The second one at the end -before the paragraph is finished. Currently neither hook is used by -\KOMAScript{} itself.% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% coding: utf-8 -%%% ispell-local-dictionary: "en_US" -%%% eval: (flyspell-mode 1) -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-footnotes.tex b/macros/latex/contrib/koma-script/source-doc/english/common-footnotes.tex deleted file mode 100644 index fbf2d311db..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-footnotes.tex +++ /dev/null @@ -1,636 +0,0 @@ -% ====================================================================== -% common-footnotes.tex -% Copyright (c) Markus Kohm, 2001-2022 -% -% 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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-footnotes.tex} - [$Date: 2022-02-16 10:57:02 +0100 (Mi, 16. Feb 2022) $ - KOMA-Script guide (common paragraphs: Footnotes)] -\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} - -% Date of the translated German file: 2022-02-16 - -\section{Footnotes} -\seclabel{footnotes}% -\BeginIndexGroup -\BeginIndex{}{footnotes}% - -\IfThisCommonFirstRun{}{% - The information in \autoref{sec:\ThisCommonFirstLabelBase.footnotes} applies - equally to this chapter. So if you have already read and understood - \autoref{sec:\ThisCommonFirstLabelBase.footnotes}, you can skip ahead to - \autopageref{sec:\ThisCommonLabelBase.footnotes.next}, - \autopageref{sec:\ThisCommonLabelBase.footnotes.next}.% - \IfThisCommonLabelBase{scrlttr2}{ % - If you do not use a \KOMAScript{} class, \Package{scrletter}% - \OnlyAt{\Package{scrletter}} relies on the - \hyperref[cha:scrextend]{\Package{scrextend}}\IndexPackage{scrextend}% - \important{\hyperref[cha:scrextend]{\Package{scrextend}}} package. - Therefore, see also \autoref{sec:scrextend.footnotes}, - \autopageref{sec:scrextend.footnotes} when using \Package{scrletter}.% - \iffalse% Umbruchkorrekturtext - \ Note in particular that in this case some typical \KOMAScript{} - extensions are not active by default\textnote{default}. Instead, the - footnotes make use of the class used, or the \LaTeX{} kernel.% - \fi% - }{}% -} - -\IfThisCommonLabelBase{maincls}{% - Unlike\textnote{\KOMAScript{} vs. standard classes} the standard classes, - \KOMAScript{} offers the ability to configure the format of the footnote - block.% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - You can find the basic commands to set footnotes in any introduction to - \LaTeX, for example \cite{lshort}. \KOMAScript{}% - \textnote{\KOMAScript{} vs. standard classes} provides additional features - to change the format of the footnote block. % - \iffalse % Umbruchoptimierung - - Whether footnotes should be allowed for letters depends very much on the - type of letter and its layout. For example, you should not allow - footnotes to overlap visually with the letterhead footer or be confused - with the courtesy-copy list. Doing so is the responsibility of the - user.% - - Since footnotes are rarely used in letters, examples in this section have - been omitted. If you need examples, you can find them in - \autoref{sec:\ThisCommonFirstLabelBase.footnotes}, - \autopageref{sec:\ThisCommonFirstLabelBase.footnotes}.% - \fi% - }{% - \IfThisCommonLabelBase{scrextend}{% - The footnote capabilities of the \KOMAScript{} classes are also - provided by \Package{scrextend}. By default, the formatting of - footnotes is left to the class used. This changes as soon as you - issue the \DescRef{\ThisCommonLabelBase.cmd.deffootnote} command, - which is explained in detail on - \DescPageRef{\ThisCommonLabelBase.cmd.deffootnote}. - - The options for adjusting the dividing line above footnotes, however, - are not provided by \Package{scrextend}.% - }{\InternalCommonFileUsageError}% - }% -}% - -\begin{Declaration} - \OptionVName{footnotes}{setting} - \Macro{multfootsep} -\end{Declaration} -\IfThisCommonLabelBase{scrextend}{Many classes mark footnotes }{% - Footnotes % - \IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - }{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.00}{\Class{scrlttr2}}% - }{}% - }% - are marked % -}% -by default in the text with a small superscript number. If several footnotes -appear in succession at the same point, it gives the impression that there is -one footnote with a large number rather than multiple footnotes (e.\,g. -footnote 12 instead of footnotes 1 and 2). -With\important{\OptionValue{footnotes}{multiple}} -\OptionValue{footnotes}{multiple}\IndexOption{footnotes=~multiple}, footnotes -that follow each other directly are separated with a delimiter instead. The -default delimiter in \Macro{multfootsep}\important{\Macro{multfootsep}} is -defined as a comma without a space: -\begin{lstcode} - \newcommand*{\multfootsep}{,} -\end{lstcode} -This can be redefined. - -The whole mechanism is compatible with the -\Package{footmisc}\IndexPackage{footmisc}\important{\Package{footmisc}} -package, version~5.3d to 5.5b (see \cite{package:footmisc}). It affects -footnote markers placed using -\DescRef{\ThisCommonLabelBase.cmd.footnote}\IndexCmd{footnote}, as well as -those placed directly with -\DescRef{\ThisCommonLabelBase.cmd.footnotemark}\IndexCmd{footnotemark}. - -You can switch back to the default -\OptionValue{footnotes}{nomultiple} at any time using the -\DescRef{\ThisCommonLabelBase.cmd.KOMAoptions} or -\DescRef{\ThisCommonLabelBase.cmd.KOMAoption} command. However, if you -encounter any problems using another package that alters the footnotes, you -should not use this option, nor should you change the \PName{setting} anywhere -inside the document. - -A summary of the available \PName{setting} values of \Option{footnotes} can -be found in \autoref{tab:\ThisCommonFirstLabelBase.footnotes}% -\IfThisCommonFirstRun{% - . - \begin{table} - \caption[{Available values for the \Option{footnotes} option}] - {Available values for the \Option{footnotes} option to configure footnotes} - \label{tab:\ThisCommonLabelBase.footnotes} - \begin{desctabular} - \pventry{multiple}{% - Consecutive footnote marks will be separated by - \DescRef{\ThisCommonLabelBase.cmd.multfootsep}\IndexCmd{multfootsep}.% - \IndexOption{footnotes~=\textKValue{multiple}}}% - \pventry{nomultiple}{% - Consecutive footnote marks will be handled like single footnotes - and not separated from each other.% - \IndexOption{footnotes~=\textKValue{nomultiple}}}% - \end{desctabular} - \end{table}% -}{, - \autopageref{tab:\ThisCommonFirstLabelBase.footnotes}.% -}% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{footnote}\OParameter{number}\Parameter{text}% - \Macro{footnotemark}\OParameter{number}% - \Macro{footnotetext}\OParameter{number}\Parameter{text}% - \Macro{multiplefootnoteseparator}% -\end{Declaration}% -Footnotes in \KOMAScript{} are produced, as they are in the standard classes, -with the \Macro{footnote} command, or alternatively the pair of commands -\Macro{footnotemark} and \Macro{footnotetext}. As in the standard classes, -it is possible for a page break to occur within a footnote. Normally this -happens if the footnote mark is placed so near the bottom of a page as to -leave \LaTeX{} no choice but to move the footnote to the next page. -Unlike\textnote{\KOMAScript{} vs. standard classes} -\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.00}{\Class{scrlttr2}}% - }{}% -} % -the standard classes, \KOMAScript{} can recognize and separate consecutive -footnotes automatically. -See\important{\DescRef{\ThisCommonLabelBase.option.footnotes}} the previously -documented option \DescRef{\ThisCommonLabelBase.option.footnotes}. - -If instead you want to place this delimiter manually, you can do so by calling -\Macro{multiplefootnoteseparator}. However, users should not redefine this -command, as it contains not only the delimiter but also the delimiter's -formatting, for example the font size selection and the superscript. The -delimiter itself is stored in the previously described -\DescRef{\ThisCommonLabelBase.cmd.multfootsep}% -\important{\DescRef{\ThisCommonLabelBase.cmd.multfootsep}}% -\IndexCmd{multfootsep} command. - -\IfThisCommonFirstRun{\iftrue}{% - You can find examples and additional hints in - \autoref{sec:\ThisCommonFirstLabelBase.footnotes} from - \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.footnote}.% - \csname iffalse\endcsname }% - \begin{Example} - \phantomsection\xmpllabel{cmd.footnote}% - Suppose you want to put two footnotes after a single word. First you try -\begin{lstcode} - Word\footnote{1st footnote}\footnote{2nd footnote} -\end{lstcode} - Let's assume that the footnotes are numbered 1 and 2. Since the two - footnote numbers follow each other directly, it creates the impression - that the word has only one footnote numbered 12. You can change this - behaviour by using -\begin{lstcode} - \KOMAoptions{footnotes=multiple} -\end{lstcode} - to enable the automatic recognition of footnote sequences. Alternatively, - you can use -\begin{lstcode} - word\footnote{Footnote 1}% - \multiplefootnoteseparator - \footnote{Footnote 2} -\end{lstcode} - This should give you the desired result even if automatic detection - fails or cannot be used for some reason. - - Now suppose you also want the footnote numbers to be separated not just by - a comma, but by a comma and a space. In this case, write -\begin{lstcode} - \renewcommand*{\multfootsep}{,\nobreakspace} -\end{lstcode} - in the preamble of your document. - \Macro{nobreakspace}\IndexCmd{nobreakspace} was used here instead of a - normal space to avoid paragraph or page breaks within the sequence of - footnotes. - \end{Example}% -\fi% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{footref}\Parameter{reference} -\end{Declaration} -Sometimes\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.00}{\Class{scrlttr2}}% - }{}} you have a footnote in a document to which there are several references -in the text. An inconvenient way to typeset this would be to use -\DescRef{\ThisCommonLabelBase.cmd.footnotemark} to set the number directly. -The disadvantage of this method is that you need to know the number and -manually set every \DescRef{\ThisCommonLabelBase.cmd.footnotemark} command. -And if the number changes because you add or remove an earlier footnote, you -will have to change each \DescRef{\ThisCommonLabelBase.cmd.footnotemark}. -\KOMAScript{} thefore offers the \Macro{label}\IndexCmd{label}% -\important{\Macro{label}} mechanism to handle such cases. After placing a -\Macro{label} inside the footnote, you can use \Macro{footref} to set all the -other marks for this footnote in the text. -\IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname}% - \begin{Example} - \phantomsection\xmpllabel{cmd.footref}% - You are writing a text in which you must create a footnote each time a - brand name occurs, indicating that it is a registered trademark. You can - write, for example, -\begin{lstcode} - Company SplishSplash\footnote{This is a registered trade name. - All rights are reserved.\label{refnote}} - produces not only SplishPlump\footref{refnote} - but also SplishPlash\footref{refnote}. -\end{lstcode} - This will produce the same footnote mark three times, but only one - footnote text. The first footnote mark is produced by - \DescRef{\ThisCommonLabelBase.cmd.footnote} itself, and the following two - footnote marks are produced by the additional \Macro{footref} - commands. The footnote text will be produced by - \DescRef{\ThisCommonLabelBase.cmd.footnote}. - \end{Example} -\fi% -When setting footnote marks with the \Macro{label} mechanism, any -changes to the footnote numbers will require at least two \LaTeX{} runs to -ensure correct numbers for all \Macro{footref} marks.% -\IfThisCommonLabelBaseOneOf{scrlttr2,scrextend}{\par% - You can find an example of how to use \Macro{footref} in - \autoref{sec:\ThisCommonFirstLabelBase.footnotes} on - \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.footref}. % -}{}% -\IfThisCommonLabelBase{scrlttr2}{}{% - \par - Note\textnote{Attention!} that statements like \Macro{ref}\IndexCmd{ref} - or \Macro{pageref}\IndexCmd{pageref} are fragile and therefore you should - put \Macro{protect}\IndexCmd{protect} in front of them if they appear in - moving arguments such as headings. % -}% -By the way, from\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}\and \Package{scrextend}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.33}{\Class{scrlttr2}}% - }{}% -} % -\LaTeX{} 2021-05-01 on, the command is provided by \LaTeX{} itself.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{deffootnote}\OParameter{mark width}\Parameter{indent}% - \Parameter{parindent}\Parameter{definition}% - \Macro{deffootnotemark}\Parameter{definition}% - \Macro{thefootnotemark} -\end{Declaration}% -\IfThisCommonLabelBase{maincls}{The \KOMAScript{} classes set}{\KOMAScript{} - sets}\textnote{\KOMAScript{} vs. standard classes} footnotes slightly -differently than the standard classes do. As in the standard classes, the -footnote mark in the text is rendered with small, superscript numbers. The -same formatting is used in the footnote itself. The mark in the footnote is -typeset right-justified in a box with a width of \PName{mark width}. The first -line of the footnote follows directly. - -All subsequent lines will be indented by the length of \PName{indent}. If the -optional parameter \PName{mark width} is not specified, it defaults to -\PName{indent}. If the footnote consists of more than one paragraph, the first -line of each paragraph is indented by the value of \PName{parindent}. - -\autoref{fig:\ThisCommonFirstLabelBase.deffootnote} % -\IfThisCommonFirstRun{}{on - \autopageref{fig:\ThisCommonFirstLabelBase.deffootnote} }{}% -shows the different parameters% -\IfThisCommonLabelBase{maincls}{ again}{}% -. The default configuration of the \KOMAScript{} classes is as follows: -\IfThisCommonLabelBase{scrextend}{\iftrue}{\csname iffalse\endcsname}% -\begin{lstcode} - \deffootnote[1em]{1.5em}{1em}{% - \textsuperscript{\thefootnotemark}} -\end{lstcode} -\else -\begin{lstcode} - \deffootnote[1em]{1.5em}{1em}{% - \textsuperscript{\thefootnotemark}% - } -\end{lstcode} -\fi% -\Macro{textsuperscript} controls both the -superscript and the smaller font size. The command \Macro{thefootnotemark} -contains the current footnote mark without any formatting.% -\IfThisCommonLabelBase{scrextend}{ % - The \Package{scrextend} package, by contrast, does not change the default - footnote settings of the class you are using. Simply loading the package, - therefore, should not lead to any changes in the formatting of footnote - marks or footnote text. To use the default settings of the \KOMAScript{} - classes with \Package{scrextend}, you must change the settings above - yourself. For example, you can insert the line of code above immediately - after loading the \Package{scrextend} package.% -}{}% - -\IfThisCommonLabelBase{maincls}{% - \begin{figure} -% \centering - \KOMAoption{captions}{bottombeside} - \setcapindent{0pt}% - \begin{captionbeside} - [{Parameters that control the footnote layout}]% - {\label{fig:\ThisCommonLabelBase.deffootnote}\hspace{0pt plus 1ex}% - Parameters that control the footnote layout}% - [l] - \setlength{\unitlength}{1mm} - \begin{picture}(100,22) - \thinlines - % frame of following paragraph - \put(5,0){\line(1,0){90}} - \put(5,0){\line(0,1){5}} - \put(10,5){\line(0,1){5}}\put(5,5){\line(1,0){5}} - \put(95,0){\line(0,1){10}} - \put(10,10){\line(1,0){85}} - % frame of first paragraph - \put(5,11){\line(1,0){90}} - \put(5,11){\line(0,1){5}} - \put(15,16){\line(0,1){5}}\put(5,16){\line(1,0){10}} - \put(95,11){\line(0,1){10}} - \put(15,21){\line(1,0){80}} - % box of the footnote mark - \put(0,16.5){\framebox(14.5,4.5){\mbox{}}} - % description of paragraphs - \put(45,16){\makebox(0,0)[l]{\textsf{first paragraph of a footnote}}} - \put(45,5){\makebox(0,0)[l]{\textsf{next paragraph of a footnote}}} - % help lines - \thicklines - \multiput(0,0)(0,3){7}{\line(0,1){2}} - \multiput(5,0)(0,3){3}{\line(0,1){2}} - % parameters - \put(2,7){\vector(1,0){3}} - \put(5,7){\line(1,0){5}} - \put(15,7){\vector(-1,0){5}} - \put(15,7){\makebox(0,0)[l]{\small\PName{parindent}}} - % - \put(-3,13){\vector(1,0){3}} - \put(0,13){\line(1,0){5}} - \put(10,13){\vector(-1,0){5}} - \put(10,13){\makebox(0,0)[l]{\small\PName{indent}}} - % - \put(-3,19){\vector(1,0){3}} - \put(0,19){\line(1,0){14.5}} - \put(19.5,19){\vector(-1,0){5}} - \put(19.5,19){\makebox(0,0)[l]{\small\PName{mark width}}} - \end{picture} - \end{captionbeside} - \end{figure}} - -\BeginIndexGroup -\BeginIndex{FontElement}{footnote}\LabelFontElement{footnote}% -\BeginIndex{FontElement}{footnotelabel}\LabelFontElement{footnotelabel}% -The footnote\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v2.8q}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}% -}}{}, including the footnote mark, uses the font specified in the -\FontElement{footnote}\important{\FontElement{footnote}} element. You can -change the font of the footnote mark separately using the -\DescRef{\ThisCommonLabelBase.cmd.setkomafont} and -\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\ThisCommonLabelBase.textmarkup}, -\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) -for the \FontElement{footnotelabel}\important{\FontElement{footnotelabel}} -element. See also \autoref{tab:\ThisCommonLabelBase.fontelements}, -\autopageref{tab:\ThisCommonLabelBase.fontelements}. -The default setting is no change to the font.% -\IfThisCommonLabelBase{scrextend}{ % - However, with \Package{scrextend} these elements will only change the fonts - if footnotes are handled by the package, that is, after using - \Macro{deffootnote}.% -}{} Please don't misuse this element for other purposes, for example to set -the footnotes ragged right (see also \DescRef{\LabelBase.cmd.raggedfootnote}, -\DescPageRef{\LabelBase.cmd.raggedfootnote}). - -\BeginIndex{FontElement}{footnotereference}% -\LabelFontElement{footnotereference}% -The footnote mark in the text is defined separately from the mark in -front of the actual footnote. This is done with -\Macro{deffootnotemark}. The default setting is: -\begin{lstcode} - \deffootnotemark{% - \textsuperscript{\thefootnotemark}} -\end{lstcode} -With\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v2.8q}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{} this default, the font for the -\FontElement{footnotereference}\important{\FontElement{footnotereference}} -element is used (see \autoref{tab:\ThisCommonLabelBase.fontelements}, -\autopageref{tab:\ThisCommonLabelBase.fontelements}). Thus, the footnote marks -in the text and in the footnote itself are identical. You can change the font -with the commands \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and -\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (see -\autoref{sec:\ThisCommonLabelBase.textmarkup}, -\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}). - -\IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname}% - \begin{Example} - \phantomsection - \xmpllabel{cmd.deffootnote}% - One\textnote{Hint!} feature that is often requested is footnote marks - which are neither in superscript nor in a smaller font. They should not - touch the footnote text but be separated by a small space. You can - accomplish this as follows: -\begin{lstcode} - \deffootnote{1em}{1em}{\thefootnotemark\ } -\end{lstcode} - This will set the footnote mark and subsequent space right-aligned in a - box of width 1\Unit{em}. The lines of the footnote text that follow are - also indented by 1\Unit{em} from the left margin. - - Another\textnote{Hint!} layout that is often requested is footnote marks - that are left-aligned. You can obtain them with the following - definition: -\begin{lstcode} - \deffootnote{1.5em}{1em}{% - \makebox[1.5em][l]{\thefootnotemark}} -\end{lstcode} - - If, however you want to change the font for all footnotes, for example - to sans serif, this can easily be done with the commands - \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and - \DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (see - \autoref{sec:\ThisCommonLabelBase.textmarkup}, - \DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}): -\begin{lstcode} - \setkomafont{footnote}{\sffamily} -\end{lstcode} - \end{Example}% - \IfThisCommonLabelBase{scrextend}{}{% - As the examples show, {\KOMAScript} allows a wide variety of different - footnote formats with this simple user interface.% - }% -\fi% -\IfThisCommonFirstRun{}{% - For examples, see \autoref{sec:\ThisCommonFirstLabelBase.footnotes}, - \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.deffootnote}.% -}{}% -% -\EndIndexGroup -\EndIndexGroup - -\IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname} -\begin{Declaration} - \Macro{setfootnoterule}\OParameter{thickness}\Parameter{length}% -\end{Declaration}% -Generally,\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.06}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.06}{\Class{scrlttr2}}% - }{% - \IfThisCommonLabelBase{scrextend}{% - \ChangedAt{v3.06}{\Package{scrextend}}% - }{}% - }% -} a horizontal rule is set between the text area and the footnote area, but -normally this rule does not extend the full width of the type area. With -\Macro{setfootnoterule}, you can set the exact thickness and length of the -rule. In this case, the parameters \PName{thickness} and \PName{length} are -only evaluated when setting the rule itself. If the optional argument -\PName{thickness} has been omitted, the thickness of the rule will not be -changed. Empty arguments for \PName{thickness} or \PName{length} are also -allowed and do not change the corresponding parameters. Using absurd values -will result in warning messages both when setting and when using the -parameters. - -\BeginIndexGroup -\BeginIndex{FontElement}{footnoterule}\LabelFontElement{footnoterule}% -You can% -\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.07}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.07}{\Class{scrlttr2}}% - }{% - \IfThisCommonLabelBase{scrextend}{% - \ChangedAt{v3.07}{\Package{scrextend}}% - }{}% - }% -} % -change the colour of the rule with the -\FontElement{footnoterule}\important{\FontElement{footnoterule}} element using -the \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and -\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\ThisCommonLabelBase.textmarkup}, -\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}). The default is no change -of font or colour. In order to change the colour, you must also load a colour -package like -\Package{xcolor}\IndexPackage{xcolor}\important{\Package{xcolor}}.% -\EndIndexGroup -\EndIndexGroup -\fi - -\begin{Declaration} - \Macro{raggedfootnote} -\end{Declaration} -By default% -\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.23}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.23}{\Class{scrlttr2}}% - }{% - \IfThisCommonLabelBase{scrextend}{% - \ChangedAt{v3.23}{\Package{scrextend}}% - }{}% - }% -} % -\KOMAScript{} justifies footnotes just as in the standard classes. -But\IfThisCommonLabelBase{scrextend}{% - \ if you use \DescRef{\LabelBase.cmd.deffootnote}% - \important{\DescRef{\LabelBase.cmd.deffootnote}}% - \IndexCmd{deffootnote}% -}{% - \textnote{\KOMAScript{} vs. standard classes}% -} you can also change the justification separately from the rest of the -document by redefining \Macro{raggedfootnote}. Valid definitions are -\Macro{raggedright}\IndexCmd{raggedright}, -\Macro{raggedleft}\IndexCmd{raggedleft}, -\Macro{centering}\IndexCmd{centering}, \Macro{relax}\IndexCmd{relax} or an -empty definition, which is the default. The alignment commands of the -\Package{ragged2e}\IndexPackage{ragged2e} package are also valid (see -\cite{package:ragged2e}). \IfThisCommonLabelBase{scrextend}{% - You can find a suitable example in - \autoref{sec:\ThisCommonFirstLabelBase.footnotes}, - \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.raggedfootnote}.% - \iffalse }{\csname iftrue\endcsname}% - \begin{Example} - \phantomsection\xmpllabel{cmd.raggedfootnote}% - Suppose you are using footnotes only to provide references to very long - links, where line breaks would produce poor results if justified. You can - use -\begin{lstcode} - \let\raggedfootnote\raggedright -\end{lstcode} - in your document's preamble to switch to ragged-right footnotes. - \end{Example}% -\fi -\EndIndexGroup - -\begin{Declaration} - \DoHook{footnote/text/begin}% - \DoHook{footnote/text/end}% -\end{Declaration} -\BeginIndex{}{hook}% -For\ChangedAt{v3.36}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}\and \Package{scrextend}} experts there are also two hooks -of type \emph{do-hook} (see \autoref{sec:scrbase.hooks} from -\autopageref{sec:scrbase.hook}). The first of these is used at the very -beginning of \Macro{@makefntext} before -\DescRef{\LabelBase.cmd.raggedfootnote} is executed. The second one at the end -before the paragraph is finished. Currently neither hook is used by -\KOMAScript{} itself.% -\EndIndexGroup -% -\EndIndexGroup - - -%%% Local Variables: -%%% mode: latex -%%% coding: utf-8 -%%% ispell-local-dictionary: "en_US" -%%% eval: (flyspell-mode 1) -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-headfootheight.tex b/macros/latex/contrib/koma-script/source-doc/english/common-headfootheight.tex deleted file mode 100644 index b80e43e7fb..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-headfootheight.tex +++ /dev/null @@ -1,163 +0,0 @@ -% ====================================================================== -% common-headfootheight.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-headfootheight.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-headfootheight.tex} - [$Date: 2019-11-13 12:33:18 +0100 (Mi, 13. Nov 2019) $ - KOMA-Script guide (common paragraph: Head and Foot Height)] -\translator{Markus Kohm\and Jana Schubert\and Jens H\"uhne\and Karl Hagen} - -% Date of the translated German file: 2019-11-13 - -\section{Header and Footer Height} -\seclabel{height} -\BeginIndexGroup -\BeginIndex{}{header>height}% -\BeginIndex{}{footer>height}% -\IfThisCommonLabelBase{scrlayer-scrpage}{% - \begin{Explain}% - The \LaTeX{} standard classes do not use the footer much, and if they do - use it, they put the contents into a \Macro{mbox} which results in the - footer being a single text line. This is probably the reason that \LaTeX{} - itself does not have a well-defined footer height. Although the distance - between the last baseline of the text area and the baseline of the footer - is defined with \Length{footskip}\IndexLength[indexmain]{footskip}, if the - footer consists of more than one text line, there is no definite statement - whether this length should be the distance to the first or the last - baseline of the footer. - - Although the page header of the standard classes will also be put into a - horizontal box, and therefore is also a single text line, \LaTeX{} in fact - provides a length to set the height of the header. The reason for this may - be that this height is needed to determine the start of the text area. - \end{Explain}% -}{% - The header and footer of a page are central elements not just of a page - style. They can also serve to restrict layers using the appropriate options - (see \autoref{tab:scrlayer.layerkeys}, - \autopageref{tab:scrlayer.layerkeys}). Therefore the heights of these - elements must be defined.% -} - -\IfThisCommonFirstRun{}{% - The information in \autoref{sec:\ThisCommonFirstLabelBase.height} applies - equally to this chapter. So if you have already read and understood - \autoref{sec:\ThisCommonFirstLabelBase.height}, you can skip ahead to - \autoref{sec:\ThisCommonLabelBase.height.next}, - \autopageref{sec:\ThisCommonLabelBase.height.next}.% -} - -\begin{Declaration} - \Length{footheight} - \Length{headheight} - \IfThisCommonLabelBase{scrlayer-scrpage}{% - \OptionVName{autoenlargeheadfoot}{simple switch}% - }{}% -\end{Declaration} -The \Package{scrlayer} package introduces a new length, \Length{footheight}, -analogous to \Length{headheight}% -\IfThisCommonLabelBase{scrlayer-scrpage}{}{of the \LaTeX{} kernel}. -Additionally, -\Package{scrlayer\IfThisCommonLabelBase{scrlayer-scrpage}{-scrpage}{}} -interprets \Length{footskip} to be the distance from the last baseline of the -text area to the first normal baseline of the footer. The -\hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea}% -\important{\hyperref[cha:typearea]{\Package{typearea}}} package interprets -\Length{footheight} in the same way, so \Package{typearea}'s options for the -footer height can also be used to set the values for the \Package{scrlayer} -package. See the \DescRef{typearea.option.footheight} and -\DescRef{typearea.option.footlines} options in -\autoref{sec:typearea.typearea}, \DescPageRef{typearea.option.footheight}) -and option \DescRef{typearea.option.footinclude} on -\DescPageRef{typearea.option.footinclude} of the same section. - -If you do not use the \hyperref[cha:typearea]{\Package{typearea}}% -\important{\hyperref[cha:typearea]{\Package{typearea}}} package, you should -adjust the header and footer heights using appropriate values for the lengths -where necessary. For the header, at least, the \Package{geometry} package, for -example, provides similar settings. -\IfThisCommonLabelBase{scrlayer-scrpage}{\par% - If you choose a header or footer height that is too small for the actual - content, \Package{scrlayer-scrpage} tries by default to adjust the lengths - appropriately. At the same time, it will issue a warning containing - suggestions for suitable settings. These automatic changes take effect - immediately after the need for them has been detected and are not - automatically reversed, for example, when the content of the header or - footer becomes smaller afterwards. - However,\ChangedAt{v3.25}{\Package{scrlayer-scrpage}}, this behaviour can be - changed by using the \Option{autoenlargeheadfoot} option. This option - recognizes the values for simple switches in \autoref{tab:truefalseswitch}, - \autopageref{tab:truefalseswitch}. The option is activated by default. If it - is deactivated, the header and footer are no longer enlarged - automatically. Only a warning with hints for suitable settings is issued.% -}{% - \IfThisCommonLabelBase{scrlayer}{\par% - If you choose a header or footer height that is too small for the actual - content, \Package{scrlayer} usually accepts this without issuing an error - message or a warning. The header then expands according to its height, - usually upwards, with the footer moved down accordingly. Information about - this change is not obtained automatically. However, packages like - \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% - \important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% - \IndexPackage{scrlayer-scrpage} that build upon \Package{scrlayer} may - contain their own tests which can lead to their own actions (see - \DescRef{scrlayer-scrpage.length.headheight} and - \DescRef{scrlayer-scrpage.length.footheight} on - \DescPageRef{scrlayer-scrpage.length.headheight}).% - }{}% -}% -\EndIndexGroup -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% coding: us-ascii -%%% ispell-local-dictionary: "en_GB" -%%% TeX-master: "../guide.tex" -%%% TeX-PDF-mode: t -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-interleafpage.tex b/macros/latex/contrib/koma-script/source-doc/english/common-interleafpage.tex deleted file mode 100644 index 8281b370f9..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-interleafpage.tex +++ /dev/null @@ -1,340 +0,0 @@ -% ====================================================================== -% common-interleafpage.tex -% Copyright (c) Markus Kohm, 2001-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-interleafpage.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-interleafpage.tex}% - [$Date: 2019-11-11 08:22:00 +0100 (Mo, 11. Nov 2019) $ - KOMA-Script guide (common paragraphs: Interleaf Pages)] -\translator{Markus Kohm\and Gernot Hassenpflug\and Krickette Murabayashi\and - Karl Hagen} - -% Date of the translated German file: 2019-11-11 - -\section{Interleaf Pages} -\seclabel{emptypage}% -\BeginIndexGroup -\BeginIndex{}{interleaf page}%% -\BeginIndex{}{page>style}% - -\IfThisCommonFirstRun{}{% - The information in \autoref{sec:\ThisCommonFirstLabelBase.emptypage} applies - equally to this chapter. So if you have already read and understood - \autoref{sec:\ThisCommonFirstLabelBase.emptypage}, you can skip ahead to - \autoref{sec:\ThisCommonLabelBase.emptypage.next}, - \autopageref{sec:\ThisCommonLabelBase.emptypage.next}.% -} - -\IfThisCommonLabelBase{scrextend}{}{% - Interleaf pages are pages that are inserted between parts of a document. - Traditionally, these pages are completely blank. \LaTeX{}, however, sets - them by default with the current page style. \KOMAScript{} provides several - extensions to this functionality. - - Interleaf pages are mostly found in books. Because book chapters commonly - start on the right (recto) page of a two-page spread, an empty left (verso) - page must be inserted if the previous chapter ends on a recto page. For this - reason, interleaf pages really only exist for two-sided printing. -% - \iffalse % Umbruchkorrektur - The blank versos in one-sided printing are not true interleaf pages, - although they may appear as such in counting the printed sheets.% - \fi% - - \IfThisCommonLabelBase{scrlttr2}{% - Interleaf pages are unusual in letters. This is not least because - two-sided letters are rare, as letters are usually not - bound. Nevertheless, \KOMAScript{} also supports interleaf pages for - two-sided letters. However, since the commands described here are seldom - used in letters, you will not find any examples here. If necessary, please - refer to the examples in \autoref{sec:maincls.emptypage}, starting on - \autopageref{sec:maincls.emptypage}.% - }{}% -}% - -\begin{Declaration} - \OptionVName{cleardoublepage}{page style} - \OptionValue{cleardoublepage}{current} -\end{Declaration}% -With this option,\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.00}{\Class{scrlttr2}}% - }{}% -} you can define the page style of the interleaf pages created by the commands -\DescRef{\LabelBase.cmd.cleardoublepage}, -\DescRef{\LabelBase.cmd.cleardoubleoddpage}, or -\DescRef{\LabelBase.cmd.cleardoubleevenpage} to advance to the desired page. -You can use any previously defined \PName{page style} (see -\autoref{sec:\ThisCommonLabelBase.pagestyle} from -\autopageref{sec:\ThisCommonLabelBase.pagestyle} and -\autoref{cha:scrlayer-scrpage} from \autopageref{cha:scrlayer-scrpage}). -In addition, \OptionValue{cleardoublepage}{current} is also possible. -This case corresponds to the default prior to \KOMAScript~2.98c and creates an -interleaf page without changing the page style. Starting with -\KOMAScript~3.00\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.00}{\Class{scrlttr2}}% - }{}% -}, the default\textnote{default} follows the recommendation of most -typographers and creates interleaf pages with the -\IfThisCommonLabelBase{scrextend}{% - \DescRef{maincls.pagestyle.empty}}{% - \DescRef{\ThisCommonLabelBase.pagestyle.empty}}\IndexPagestyle{empty} -page style unless you switch compatibility to earlier \KOMAScript{} versions -(see option \DescRef{\ThisCommonLabelBase.option.version}% -\important{\OptionValueRef{\LabelBase}{version}{2.98c}}, -\autoref{sec:\ThisCommonLabelBase.compatibilityOptions}, -\DescPageRef{\ThisCommonLabelBase.option.version}). -\IfThisCommonLabelBase{maincls}{\iftrue}{\csname iffalse\endcsname} - \begin{Example} - \phantomsection\xmpllabel{option.cleardoublepage}% - Suppose you want interleaf pages that are empty except for the pagination% - \iffree{, so they are created with \IfThisCommonLabelBase{scrextend}{% - \DescRef{maincls.pagestyle.plain}}{% - \DescRef{\LabelBase.pagestyle.plain}}}{}. You can achieve this, - for example, with: -\begin{lstcode} - \KOMAoptions{cleardoublepage=plain} -\end{lstcode} - You can find more information about the - \IfThisCommonLabelBase{scrextend}{% - \DescRef{maincls.pagestyle.plain}}{\DescRef{\LabelBase.pagestyle.plain}} - page style in \IfThisCommonLabelBase{scrextend}{% - \autoref{sec:maincls.pagestyle}}{% - \autoref{sec:\LabelBase.pagestyle}}, - \IfThisCommonLabelBase{scrextend}{% - \DescPageRef{maincls.pagestyle.plain}}{% - \DescPageRef{\LabelBase.pagestyle.plain}}. - \end{Example} -\else - \IfThisCommonLabelBase{scrextend}{% - You can find an example for setting the page style of interleaf pages in - \autoref{sec:\ThisCommonFirstLabelBase.emptypage}, - \PageRefxmpl{\ThisCommonFirstLabelBase.option.cleardoublepage}.% - \iffalse% Umbruchvariante ohne Beispiel - }{\csname iffalse\endcsname} - \begin{Example} - \phantomsection\xmpllabel{option.cleardoublepage}% - Suppose you want interleaf pages that are empty except for the pagination, - so they are created with the \IfThisCommonLabelBase{scrextend}{% - \DescRef{maincls.pagestyle.plain}}{\DescRef{\LabelBase.pagestyle.plain}} - page style. You can achieve this with -\begin{lstcode} - \KOMAoptions{cleardoublepage=plain} -\end{lstcode} - You can find more information about the - \DescRef{maincls.pagestyle.plain} page style in - \autoref{sec:maincls.pagestyle}, \DescPageRef{maincls.pagestyle.plain}. - \end{Example}% - \fi% -\fi% -\EndIndexGroup - - -\begin{Declaration} - \Macro{clearpage}% - \Macro{cleardoublepage}% - \Macro{cleardoublepageusingstyle}\Parameter{page style}% - \Macro{cleardoubleemptypage}% - \Macro{cleardoubleplainpage}% - \Macro{cleardoublestandardpage}% - \Macro{cleardoubleoddpage}% - \Macro{cleardoubleoddpageusingstyle}\Parameter{page style}% - \Macro{cleardoubleoddemptypage}% - \Macro{cleardoubleoddplainpage}% - \Macro{cleardoubleoddstandardpage}% - \Macro{cleardoubleevenpage}% - \Macro{cleardoubleevenpageusingstyle}\Parameter{page style}% - \Macro{cleardoubleevenemptypage}% - \Macro{cleardoubleevenplainpage}% - \Macro{cleardoubleevenstandardpage} -\end{Declaration}% -The\textnote{standard classes} {\LaTeX} kernel provides the \Macro{clearpage} -command, which ensures that all pending floats are output and then starts a -new page. There is also the \Macro{cleardoublepage} command, which works like -\Macro{clearpage} but which starts a new right-hand page in two-sided printing -(see the \Option{twoside} layout option in \autoref{sec:typearea.options}, -\DescPageRef{typearea.option.twoside}). An empty left-hand page in the current -page style is output if necessary. - -With\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.00}{\Class{scrlttr2}}% - }{}% -} \Macro{cleardoubleoddstandardpage}, {\KOMAScript}\textnote{\KOMAScript} -works as exactly in the way just described for the standard classess. The -\Macro{cleardoubleoddplainpage}% -\important{\IfThisCommonLabelBase{scrextend}{% - \DescRef{maincls.pagestyle.plain}}{\DescRef{\LabelBase.pagestyle.plain}}} -command, on the other hand, additionally changes the page style of the empty -left page to \IfThisCommonLabelBase{scrextend}{% - \DescRef{maincls.pagestyle.plain}}{\DescRef{\LabelBase.pagestyle.plain}}% -\IndexPagestyle{plain} in order to suppress the -\IfThisCommonLabelBase{scrlttr2}{page header}{running title}. Likewise, the -\Macro{cleardoubleoddemptypage}\important{% - \IfThisCommonLabelBase{scrextend}{\DescRef{maincls.pagestyle.empty}}{% - \DescRef{\LabelBase.pagestyle.empty}}} command uses the -\IfThisCommonLabelBase{scrextend}{\DescRef{maincls.pagestyle.empty}}{% - \DescRef{\LabelBase.pagestyle.empty}}\IndexPagestyle{empty} page style to -suppress both \IfThisCommonLabelBase{scrlttr2}{page header and page footer}% -{running title and page number} on the empty left-hand side. The page is thus -completely empty. If you want to specify your own \PName{page style} for the -interleaf page, this should be given as an argument of -\Macro{cleardoubleoddusingpagestyle}. You can use any previously defined -\PName{page style} (see \autoref{cha:scrlayer-scrpage}). - -\IfThisCommonLabelBase{scrlttr2}{}{% - Sometimes\textnote{odd-side interleaf pages} you want chapters to start not - on the right-hand but on the left-hand page. Although this layout contradicts - classic typography, it can be appropriate if the double-page spread at the - beginning of the chapter very specific contents. For this reason, - \KOMAScript{} provides the \Macro{cleardoubleevenstandardpage} command, - which is equivalent to the \Macro{cleardoubleoddstandardpage} command - except that the next page is a left page. The same applies to the - \Macro{cleardoubleevenplainpage}, \Macro{cleardoubleevenemptypage}, and - \Macro{cleardoubleevenpageusingstyle} commands% - \IfThisCommonLabelBase{maincls}{% Umbruchoptimierungsalternative - , the last of which expects an argument}{}.% -} - -The \Macro{cleardoublestandardpage}, \Macro{cleardoubleemptypage}, and -\Macro{cleardoubleplainpage} commands, and the single-argument -\Macro{cleardoublepageusingstyle} command, as well as the standard -\Macro{cleardoublepage} command, % -\IfThisCommonLabelBase{maincls}{% - depend on the \DescRef{maincls.option.open}\IndexOption{open}% - \important{\DescRef{maincls.option.open}} option explained in - \autoref{sec:maincls.structure}, \DescPageRef{maincls.option.open} and, - depending on that setting, correspond to one of the commands explained in - the preceding paragraphs. }{% - correspond to the commands previously explained for the - \IfThisCommonLabelBase{scrlttr2}{\Class{scrlttr2} class}{% - \IfThisCommonLabelBase{scrextend}{\Package{scrextend} package}{% - \InternalCommonFileUsageError}% - }% - \IfThisCommonLabelBase{scrlttr2}{. % - The remaining commands are defined in \Class{scrlttr2} for completeness - only. You can find more information on them in - \autoref{sec:maincls.emptypage}, \DescPageRef{maincls.cmd.cleardoublepage} - if necessary% - }{% - \ to transition to the next odd page% - }.% -}% -\IfThisCommonLabelBaseOneOf{scrlttr2,scrextend}{\iffalse}{\csname - iftrue\endcsname} - \begin{Example} - \phantomsection\xmpllabel{cmd.cleardoublepage}% - Suppose you want to insert a double-page spread into your document with a - picture on the left-hand page and a new chapter starting on the right-hand - page. If the previous chapter ends with a left-hand page, an interleaf - page has to be added, which should be completely empty. The picture should - be the same size as the text area without any header or footer. -\iffalse% Umbruchkorrekturtext - First of all, -\begin{lstcode} - \KOMAoptions{cleardoublepage=empty} -\end{lstcode} - ensures that interleaf pages use the - \IfThisCommonLabelBase{scrextend}{\DescRef{maincls.pagestyle.empty}}{% - \DescRef{\LabelBase.pagestyle.empty}} page style. You can put this - setting in the document preamble, or you can set it as an optional - argument of \DescRef{\ThisCommonLabelBase.cmd.documentclass}. -\fi - - At the relevant place in your document, write: -\begin{lstcode} - \cleardoubleevenemptypage - \thispagestyle{empty} - \includegraphics[width=\textwidth,% - height=\textheight,% - keepaspectratio]% - {picture} - \chapter{Chapter Heading} -\end{lstcode} - The first of these lines switches to the next left-hand page. If needed it - also adds a completely blank right-hand page. The second line makes sure - that the following left-hand page will also be set using the - \IfThisCommonLabelBase{scrextend}{\DescRef{maincls.pagestyle.empty}}{% - \DescRef{\LabelBase.pagestyle.empty}} page style. The third through - sixth lines load an image file named \File{picture} and scale it to the - desired size without distorting it. This command requires the - \Package{graphicx}\IndexPackage{graphicx} package (see - \cite{package:graphics}). The last line starts - a new chapter on the next page, which will be a right-hand one. - \end{Example}% -\fi% - -In two-sided printing, \Macro{cleardoubleoddpage} always moves to the next -left-hand page and \Macro{cleardoubleevenpage} to the next right-hand -page. The style of the interleaf page to be inserted if necessary is defined -with the \DescRef{\LabelBase.option.cleardoublepage} option.% -\IfThisCommonLabelBase{scrextend}{\par% - For an example that uses \Macro{cleardoubleevenemptypage}, see - \autoref{sec:maincls.emptypage}, - \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.cleardoublepage}.% -}{}% -\EndIndexGroup -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% coding: us-ascii -%%% ispell-local-dictionary: "en_GB" -%%% TeX-master: "../guide" -%%% End: - -% LocalWords: mutatis mutandis Interleaf interleaf diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-lists.tex b/macros/latex/contrib/koma-script/source-doc/english/common-lists.tex deleted file mode 100644 index 5f048c5ed6..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-lists.tex +++ /dev/null @@ -1,858 +0,0 @@ -% ====================================================================== -% common-lists.tex -% Copyright (c) Markus Kohm, 2001-2021 -% -% 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-lists.tex -% Copyright (c) Markus Kohm, 2001-2021 -% -% 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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-lists.tex} - [$Date: 2021-02-15 19:40:44 +0100 (Mo, 15. Feb 2021) $ - KOMA-Script guide (common paragraphs)] -\translator{Gernot Hassenpflug\and Markus Kohm\and Krickette Murabayashi\and - Karl Hagen} - -% Date of the translated German file: 2021-02-15 - -\section{Lists} -\seclabel{lists}% -\BeginIndexGroup -\BeginIndex{}{lists}% - -\IfThisCommonFirstRun{}{% - The information in \autoref{sec:\ThisCommonFirstLabelBase.lists} applies - equally to this chapter. So if you have already read and understood - \autoref{sec:\ThisCommonFirstLabelBase.lists}, you can skip ahead to - \autoref{sec:\ThisCommonLabelBase.lists.next}, - \autopageref{sec:\ThisCommonLabelBase.lists.next}.% - \IfThisCommonLabelBaseOneOf{scrextend,scrlttr2}{ % - \IfThisCommonLabelBase{scrlttr2}{% - The \Package{scrletter}\OnlyAt{\Package{scrletter}} package does not - define any list environments itself but leaves them to the class - used. If this is not a \KOMAScript{} class, it will load - \hyperref[cha:scrextend]{\Package{scrextend}}\IndexPackage{scrextend}% - \important{\hyperref[cha:scrextend]{\Package{scrextend}}}. % - }{}% - However, the \Package{scrextend} package only defines the - \DescRef{\ThisCommonLabelBase.env.labeling}, - \DescRef{\ThisCommonLabelBase.env.addmargin}, and - \DescRef{\ThisCommonLabelBase.env.addmargin*} environments. All other list - environments are left to the responsibility of the class used.% - }{}% -} - -\IfThisCommonLabelBase{scrextend}{}{% - Both {\LaTeX} and the standard classes\textnote{\KOMAScript{} vs. standard - classes} offer different environments for lists. Naturally, {\KOMAScript} - also offers all these environments, though slightly modified or extended in - some cases. In general, all lists\,---\,even those of different - kinds\,---\,can be nested up to four levels deep. From a typographical view, - anything more would make no sense, as lists of more than three levels cannot - easily be apprehended. In such cases, I recommend\textnote{Hint!} that you - split a large list into several smaller ones.% -} - -\IfThisCommonFirstRun{}{% - Because lists are standard elements of \LaTeX{}, examples have been omitted - in this section. Nevertheless, you can find examples either in - \autoref{sec:\ThisCommonFirstLabelBase.lists}, - \autopageref{sec:\ThisCommonFirstLabelBase.lists} or in any \LaTeX{} - tutorial.% -} - -\IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname} - \begin{Declaration} - \begin{Environment}{itemize} - \begin{Body} - \Macro{item} \dots - \BodyDots - \end{Body} - \end{Environment} - \Macro{labelitemi} - \Macro{labelitemii} - \Macro{labelitemiii} - \Macro{labelitemiv} - \end{Declaration}% - \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}% - The simplest form of a list is the itemized list\textnote{itemized list}, - \Environment{itemize}. % - \iffalse % Umbruckoptimierungstext - The users of a certain disliked word processing package often refer to this - form of a list as \emph{bullet points}. Presumably, they cannot imagine - that, depending on the level, a symbol other than a large dot could be used - to introduce each point. % - \fi% - Depending on the level, \KOMAScript{} classes use the following marks: - ``{\labelitemi}'', ``{\labelitemii}'', ``{\labelitemiii}'', and - ``{\labelitemiv}''. The definition of these symbols is specified in the - macros \Macro{labelitemi}, \Macro{labelitemii}, \Macro{labelitemiii}, and - \Macro{labelitemiv}, all of which you can redefine using - \Macro{renewcommand}. - \BeginIndex{FontElement}{itemizelabel}\LabelFontElement{itemizelabel}% - \BeginIndex{FontElement}{labelitemi}\LabelFontElement{labelitemi}% - \BeginIndex{FontElement}{labelitemii}\LabelFontElement{labelitemii}% - \BeginIndex{FontElement}{labelitemiii}\LabelFontElement{labelitemiii}% - \BeginIndex{FontElement}{labelitemiv}\LabelFontElement{labelitemiv}% - With the \KOMAScript{} classes the - fonts\Index{font>style}\ChangedAt{v3.33}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}} used to format the symbols for the - different levels can be changed using - \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and - \DescRef{\ThisCommonLabelBase.cmd.addtokomafont} (see - \autoref{sec:\ThisCommonLabelBase.textmarkup}, - \DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) for the elements - \FontElement{labelitemi}\important{\FontElement{labelitemi}}, - \FontElement{labelitemii}\important{\FontElement{labelitemii}}, - \FontElement{labelitemiii}\important{\FontElement{labelitemiii}} and - \FontElement{labelitemiv}\important{\FontElement{labelitemiv}}. By default - these all use the font setting for element - \FontElement{itemizelabel}\important{\FontElement{itemizelabel}}. Only - element \FontElement{labelitemii} additionally uses \Macro{bfseries}. The - default of \FontElement{itemizelabel} itself is \Macro{normalfont}. Every - item is introduced with \Macro{item}.% - \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname} - \begin{Example} - \phantomsection\xmpllabel{env.itemize}% - You have a simple list which is nested in several levels. You write, - for example: -\begin{lstcode} - \minisec{Vehicles in the game} - \begin{itemize} - \item aeroplanes - \begin{itemize} - \item biplane - \item transport planes - \begin{itemize} - \item single-engine - \begin{itemize} - \item jet propelled - \item propeller driven - \end{itemize} - \item twin-engine - \begin{itemize} - \item jet propelled - \item propeller driven - \end{itemize} - \end{itemize} - \item helicopters - \end{itemize} - \item motorcycles - \item automobiles - \begin{itemize} - \item racing cars - \item passenger cars - \item lorries - \end{itemize} - \item bicycles - \end{itemize} -\end{lstcode} - As output you get: - \begin{ShowOutput}[\baselineskip] - \minisec{Vehicles in the game} - \begin{itemize} - \item aeroplanes - \begin{itemize} - \item biplanes - \item transport planes - \begin{itemize} - \item single-engine - \begin{itemize} - \item jet-propelled - \item propeller-driven - \end{itemize} - \item twin-engine - \begin{itemize} - \item jet propelled - \item propeller driven - \end{itemize} - \end{itemize} - \item helicopters - \end{itemize} - \item motorcycles - % \begin{itemize} - % \item historically accurate - % \item futuristic, not real - % \end{itemize} - \item automobiles - \begin{itemize} - \item racing cars - \item passenger cars - \item lorries - \end{itemize} - \item bicycles - \end{itemize} - \end{ShowOutput} - \end{Example} - \fi - % - \EndIndexGroup - - - \begin{Declaration} - \begin{Environment}{enumerate}\labelsuffix[enumerate] - \begin{Body} - \Macro{item} \dots - \BodyDots - \end{Body} - \end{Environment} - \Macro{theenumi}% - \Macro{theenumii}% - \Macro{theenumiii}% - \Macro{theenumiv}% - \Macro{labelenumi}% - \Macro{labelenumii}% - \Macro{labelenumiii}% - \Macro{labelenumiv} - \end{Declaration}% - \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}The numbered - list\textnote{numbered list} is also very common and already provided by the - {\LaTeX} kernel. The numbering\Index{numbering} differs according to the - level, with Arabic numbers, small letters, small Roman numerals, and capital - letters, respectively. The style of numbering is defined with the macros - \Macro{theenumi} down to \Macro{theenumiv}. The output format is determined - by the macros \Macro{labelenumi} to \Macro{labelenumiv}. While the small - letter of the second level is followed by a right parenthesis, the values of - all other levels are followed by a dot. Every item is introduced with - \Macro{item}.% - \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname} - \begin{Example} - \phantomsection\xmpllabel{env.enumerate}% - Let's shorten the previous example, using an - \DescRef{\ThisCommonLabelBase.env.itemize} environment instead of the - \Environment{enumerate} environment: - \begin{ShowOutput}[\baselineskip] - \minisec{Vehicles in the game} - \begin{enumerate} - \item aeroplanes - \begin{enumerate} - \item biplanes - \item transport planes - \begin{enumerate} - \item single-engine - \begin{enumerate} - \item jet-propelled\label{xmp:maincls.jets} - \item propeller-driven - \end{enumerate} - \item twin-engine - \end{enumerate} - % \item helicopters - \end{enumerate} - \item motorcycles - \begin{enumerate} - \item historically accurate - \item futuristic, not real - \end{enumerate} - %\item automobiles - % \begin{enumerate} - % \item racing cars - % \item private cars - % \item lorries - % \end{enumerate} - %\item bicycles - \end{enumerate} - \end{ShowOutput} - Within the list, you can set labels in the normal way with - \Macro{label} and then reference then with \Macro{ref}. - In the example above, a label was set after the jet-propelled, - single-engine transport planes with - ``\Macro{label}\PParameter{xmp:jets}''. The \Macro{ref} value is then - ``\ref{xmp:maincls.jets}''. - \end{Example} - \fi% - % - \EndIndexGroup - - - \begin{Declaration} - \begin{Environment}{description}\labelsuffix[description] - \begin{Body} - \Macro{item}\OParameter{keyword} \dots - \BodyDots - \end{Body} - \end{Environment} - \end{Declaration}% - \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}Another list - form is the description list\textnote{description list}. It primarily serves - to describe individual items or keywords. The item itself is specified as an - optional parameter in \Macro{item}. % - \BeginIndex{FontElement}{descriptionlabel}% - \LabelFontElement{descriptionlabel}% - The font\Index{font>style}\ChangedAt{v2.8p}{% - \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% - \ used to format the keyword can be changed with the - \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and - \DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see - \autoref{sec:\ThisCommonLabelBase.textmarkup}, - \DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) for the - \FontElement{descriptionlabel}\important{\FontElement{descriptionlabel}} - element (see \autoref{tab:\ThisCommonLabelBase.fontelements}, - \autopageref{tab:\ThisCommonLabelBase.fontelements}). The default is - \Macro{sffamily}\linebreak[1]\Macro{bfseries}.% - \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname} - \begin{Example} - \phantomsection\xmpllabel{env.description}% - You want the keywords to be printed bold and in the normal font instead - of bold and sans serif. Using -\begin{lstcode} - \setkomafont{descriptionlabel}{\normalfont\bfseries} -\end{lstcode} - you redefine the font accordingly. - - An example for a description list is the output of the page styles - listed in \autoref{sec:maincls.pagestyle}. The (abbreviated) source is: -\begin{lstcode} - \begin{description} - \item[empty] is the page style without any header or footer. - \item[plain] is the page style without headings. - \item[headings] is the page style with running headings. - \item[myheadings] is the page style for manual headings. - \end{description} -\end{lstcode} - This gives: - \begin{ShowOutput} - \begin{description} - \item[empty] is the page style without any header or footer. - \item[plain] is the page style without headings. - \item[headings] is the page style with running headings. - \item[myheadings] is the page style for manual headings. - \end{description} - \end{ShowOutput} - \end{Example} - \fi% - % - \EndIndexGroup% -\fi - -\begin{Declaration} - \begin{Environment}{labeling}\OParameter{delimiter} - \Parameter{widest pattern} - \labelsuffix[labeling] - \begin{Body} - \Macro{item}\OParameter{keyword}\dots - \BodyDots - \end{Body} - \end{Environment} -\end{Declaration}% -Another form of description list\textnote{alternative description list} is -only available in the {\KOMAScript} classes% -\IfThisCommonLabelBase{scrextend}{ and \Package{scrextend} }{% - \IfThisCommonLabelBase{scrlttr2}{ and - \hyperref[cha:scrextend]{\Package{scrextend}}}{}% -}% -: the \Environment{labeling} environment. Unlike -\IfThisCommonLabelBase{scrextend}{% - \DescRef{\ThisCommonFirstLabelBase.env.description}% -}{% - the \DescRef{\ThisCommonLabelBase.env.description} described above% -}, you can specify a pattern for \Environment{labeling} whose length -determines the indentation of all items. Furthermore, you can put an optional -\PName{delimiter} between the item and its description. % -\BeginIndexGroup -\BeginIndex{FontElement}{labelinglabel}\LabelFontElement{labelinglabel}% -\BeginIndex{FontElement}{labelingseparator}% -\LabelFontElement{labelingseparator}% -The font\Index{font>style}% -\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.02}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.02}{\Class{scrlttr2}}% - }{% - \IfThisCommonLabelBase{scrextend}{% - \ChangedAt{v3.02}{\Package{scrextend}}% - }{\InternalCommonFileUsageError}% - }% -} used to format the item and the separator can be changed with the -\DescRef{\ThisCommonLabelBase.cmd.setkomafont} and -\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\ThisCommonLabelBase.textmarkup}, -\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}) for the element -\FontElement{labelinglabel} and \FontElement{labelingseparator} (see -\autoref{tab:\ThisCommonLabelBase.fontelements}, -\autopageref{tab:\ThisCommonLabelBase.fontelements}). -\IfThisCommonFirstRun{\iftrue}{\par\csname iffalse\endcsname} - \begin{Example} - \phantomsection\xmpllabel{env.labeling}% - \IfThisCommonLabelBase{scrextend}{% - A small example of a list like this can be written as follows:% - }{% - Slightly changing the example from the - \DescRef{\ThisCommonLabelBase.env.description} environment, we could - write the following:% - }% -\begin{lstcode} - \setkomafont{labelinglabel}{\ttfamily} - \setkomafont{labelingseparator}{\normalfont} - \begin{labeling}[~--]{myheadings} - \item[empty] - Page style without header or footer - \item[plain] - Page style for chapter beginnings without headings - \item[headings] - Page style for running headings - \item[myheadings] - Page style for manual headings - \end{labeling} -\end{lstcode} - The result is this: - \begin{ShowOutput} - \setkomafont{labelinglabel}{\ttfamily} - \setkomafont{labelingseparator}{\normalfont} - \begin{labeling}[~--]{myheadings} - \item[empty] - Page style without header or footer - \item[plain] - Page style for chapter beginnings without headings - \item[headings] - Page style for running headings - \item[myheadings] - Page style for manual headings - \end{labeling} - \end{ShowOutput} - As this example shows, you can set a font-changing command in the usual - way. But if you do not want the font of the separator to be changed in the - same way as the font of the label, you have to set the font of the - separator as well. - \end{Example} -\fi% -\EndIndexGroup -Originally, this environment was implemented for things like ``Premise, -Evidence, Proof'', or ``Given, Find, Solution'' that are often used in -lecture handouts. These days, however, the environment has very different -applications. For example, the environment for examples in this guide was -defined with the \Environment{labeling} environment.% -% -\EndIndexGroup - - -\IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname} - \begin{Declaration} - \begin{Environment}{verse}\end{Environment} - \end{Declaration}% - \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{} The - \Environment{verse} environment\textnote{verse} is not normally perceived - as a list environment because you do not work with \Macro{item} commands. - Instead, fixed line breaks are used within the \Environment{flushleft} - environment. Internally, however, both the standard classes as well as - {\KOMAScript} implement it as a list environment. - - In general, the \Environment{verse} environment is used for - poetry\Index{poetry}. Lines are indented both left and right. Individual - lines of verse are ended by a fixed line break: \verb|\\|. Verses are set as - paragraphs, separated by an empty line. Often also - \Macro{medskip}\IndexCmd{medskip} or \Macro{bigskip}\IndexCmd{bigskip} is - used instead. To avoid a page break at the end of a line of verse you can, - as usual, insert \verb|\\*| instead of \verb|\\|. - \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname} - \begin{Example} - \phantomsection\xmpllabel{env.verse}% - \iffalse - As an example, the first lines of ``Little Red Riding Hood and the - Wolf'' by Roald Dahl: -\begin{lstcode} - \begin{verse} - As soon as Wolf began to feel\\* - that he would like a decent meal,\\* - He went and knocked on Grandma's door.\\* - When Grandma opened it, she saw\\* - The sharp white teeth, the horrid grin,\\* - And Wolfie said, `May I come in?' - \end{verse} -\end{lstcode} - The result is as follows: - \begin{ShowOutput} - \begin{verse} - As soon as Wolf began to feel\\* - That he would like a decent meal,\\* - He went and knocked on Grandma's door.\\* - When Grandma opened it, she saw\\* - The sharp white teeth, the horrid grin,\\* - And Wolfie said, `May I come in?' - \end{verse} - \end{ShowOutput} - \else - As an example, Emma Lazarus's sonnet from the pedestal of Liberty - Enlightening the World\footnote{The lines from Roald Dahl's poem - ``Little Red Riding Hood and the Wolf'', which was used in former - releases, has been replaced, because in these times certain - politicians around the world really seem to need ``The New - Colossus'' as urgent reminder.}: -\begin{lstcode} - \begin{verse} - Not like the brazen giant of Greek fame\\* - With conquering limbs astride from land to land\\* - Here at our sea-washed, sunset gates shall stand\\* - A mighty woman with a torch, whose flame\\* - Is the imprisoned lightning, and her name\\* - Mother of Exiles. From her beacon-hand\\* - Glows world-wide welcome; her mild eyes command\\* - The air-bridged harbor that twin cities frame.\\* - ``Keep, ancient lands, your storied pomp!'' cries she\\* - With silent lips. ``Give me your tired, your poor,\\* - Your huddled masses yearning to breathe free,\\* - The wretched refuse of your teeming shore.\\* - Send these, the homeless, tempest-tossed to me:\\* - I lift my lamp beside the golden door.'' - \end{verse} -\end{lstcode} - The result is as follows: - \begin{ShowOutput} - \begin{verse} - Not like the brazen giant of Greek fame\\* - With conquering limbs astride from land to land\\* - Here at our sea-washed, sunset gates shall stand\\* - A mighty woman with a torch, whose flame\\* - Is the imprisoned lightning, and her name\\* - Mother of Exiles. From her beacon-hand\\* - Glows world-wide welcome; her mild eyes command\\* - The air-bridged harbor that twin cities frame.\\* - ``Keep, ancient lands, your storied pomp!'' cries she\\* - With silent lips. ``Give me your tired, your poor,\\* - Your huddled masses yearning to breathe free,\\* - The wretched refuse of your teeming shore.\\* - Send these, the homeless, tempest-tossed to me:\\* - I lift my lamp beside the golden door.'' - \end{verse} - \end{ShowOutput} - \fi - However, if you have very long lines of verse where a line - break occurs within a line of verse: -\begin{lstcode} - \begin{verse} - Both the philosopher and the house-owner - always have something to repair.\\* - \bigskip - Don't trust a man, my son, who tells you - that he has never lied. - \end{verse} -\end{lstcode} - \begin{ShowOutput} - \begin{verse} - Both the philosopher and the house-owner always have something to - repair.\\ - \bigskip Don't trust a man, my son, who tells you that he has never - lied. - \end{verse} - \end{ShowOutput} - in this case \verb|\\*| can not prevent a page break occurring within a - verse at such a line break. To prevent such a page break, a change of - \Macro{interlinepenalty}\IndexCmd{interlinepenalty} would have to be - inserted at the beginning of the environment: -\begin{lstcode} - \begin{verse}\interlinepenalty 10000 - Both the philosopher and the house-owner - always have something to repair.\\ - \bigskip - Don't trust a man, my son, who tells you - that he has never lied. - \end{verse} -\end{lstcode} - \iftrue% Umbruchkorrekturtext - Here are two sayings that should always be considered when confronted - with seemingly strange questions about {\LaTeX} or its accompanying - explanations: -\begin{lstcode} - \begin{verse} - A little learning is a dangerous thing.\\* - Drink deep, or taste not the Pierian Spring;\\ - \bigskip - Our judgments, like our watches, none\\* - go just alike, yet each believes his own. - \end{verse} -\end{lstcode} - \begin{ShowOutput} - \iffree{}{\vskip-.8\baselineskip}% Umbruchkorrektur - \begin{verse} - A little learning is a dangerous thing.\\* - Drink deep, or taste not the Pierian Spring;\\ - \bigskip - Our judgments, like our watches, none\\* - go just alike, yet each believes his own. - \end{verse} - \end{ShowOutput} - \fi - Incidentally, \Macro{bigskip} was used in these examples to separate two - sayings. - \end{Example} - \fi - % - \EndIndexGroup - - \iffalse% Umbruchkorrekturvarianten - \begin{Declaration} - \begin{Environment}{quote}\end{Environment} - \end{Declaration}% - \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}This is - internally also a list environment\textnote{block quote with paragraph - spacing} and can be found both in the standard classes and in - {\KOMAScript}. The content of the environment is set fully justified. - The environment is often used to format longer quotes\Index{quotes}. - Paragraphs within the environment are distinguished with vertical space.% - \EndIndexGroup - - \begin{Declaration} - \begin{Environment}{quotation}\end{Environment} - \end{Declaration}% - \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{}This - environment\textnote{block quote with paragraph indent} is comparable to - \DescRef{\ThisCommonLabelBase.env.quote}. While - \DescRef{\ThisCommonLabelBase.env.quote} paragraphs are indicated by - vertical spacing, \Environment{quotation} indents the first line of each - paragraph horizontally. This also applies to the first paragraph of a - \Environment{quotation} environment. If you want to prevent the - indentation there, you must precede it with the - \Macro{noindent}\IndexCmd{noindent} command.% - \else - \begin{Declaration} - \begin{Environment}{quote}\end{Environment} - \begin{Environment}{quotation}\end{Environment} - \end{Declaration}% - \IfThisCommonLabelBase{scrlttr2}{\OnlyAt{\Class{scrlttr2}}}{} These two - environments\textnote{block quotes} are also set internally as list - environments and can be found in both the standard and the {\KOMAScript} - classes. Both environments use justified text which is indented on both - the left and the right side. Often they are used to separate longer - quotations\Index{quotations} from the main text. The difference between - the two lies in in the manner in which paragraphs are typeset. While - \Environment{quote} paragraphs are distinguished by vertical space, in - \Environment{quotation} paragraphs, the first line is indented. This also - applies to the first line of a \Environment{quotation} - environment% Umbruchkorrektur - \IfThisCommonLabelBase{maincls}{% - , unless it is preceded by \Macro{noindent}\IndexCmd{noindent}.% - }{% - \IfThisCommonLabelBase{scrlttr2}{% - . If you want to prevent the indentation there, you must precede it - with the \Macro{noindent} command\IndexCmd{noindent}.% - }{\InternalCommonFileUsageError}% - }% - \fi % Umbruchkorrekturvarianten - \IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname} - \begin{Example} - \phantomsection\xmpllabel{env.quote}% - You want to highlight a short anecdote. You write the following - \Environment{quotation} environment for this:% -\begin{lstcode} - A small example for a short anecdote: - \begin{quotation} - The old year was turning brown; the West Wind was - calling; - - Tom caught the beechen leaf in the forest falling. - ``I've caught the happy day blown me by the breezes! - Why wait till morrow-year? I'll take it when me pleases. - This I'll mend my boat and journey as it chances - west down the withy-stream, following my fancies!'' - - Little Bird sat on twig. ``Whillo, Tom! I heed you. - I've a guess, I've a guess where your fancies lead you. - Shall I go, shall I go, bring him word to meet you?'' - \end{quotation} -\end{lstcode} - The result is: - \begin{ShowOutput} - A small example for a short anecdote: - \begin{quotation} - The old year was turning brown; the West Wind was - calling; - - Tom caught the beechen leaf in the forest falling. - ``I've caught the happy day blown me by the breezes! - Why wait till morrow-year? I'll take it when me pleases. - This I'll mend my boat and journey as it chances - west down the withy-stream, following my fancies!'' - - Little Bird sat on twig. ``Whillo, Tom! I heed you. - I've a guess, I've a guess where your fancies lead you. - Shall I go, shall I go, bring him word to meet you?'' - \end{quotation} - \end{ShowOutput} - % - Using a \Environment{quote} environment instead you get: - % - \begin{ShowOutput} - A small example for a short anecdote: - \begin{quote}\setlength{\parskip}{4pt plus 2pt minus 2pt} - The old year was turning brown; the West Wind was - calling; - - Tom caught the beechen leaf in the forest falling. - ``I've caught the happy day blown me by the breezes! - Why wait till morrow-year? I'll take it when me pleases. - This I'll mend my boat and journey as it chances - west down the withy-stream, following my fancies!'' - - Little Bird sat on twig. ``Whillo, Tom! I heed you. - I've a guess, I've a guess where your fancies lead you. - Shall I go, shall I go, bring him word to meet you?'' - \end{quote} - \end{ShowOutput} - % - \end{Example} - \fi - % - \EndIndexGroup -\fi - -\begin{Declaration} - \begin{Environment}{addmargin} - \OParameter{left indentation}\Parameter{indentation} - \end{Environment} - \begin{Environment}{addmargin*} - \OParameter{inner indentation}\Parameter{indentation} - \end{Environment} -\end{Declaration} -Like \IfThisCommonLabelBase{scrextend}{% - \DescRef{\ThisCommonFirstLabelBase.env.quote} and - \DescRef{\ThisCommonFirstLabelBase.env.quotation}, which are available in - the standard and the \KOMAScript{} classes}{% - \DescRef{\ThisCommonLabelBase.env.quote} and - \DescRef{\ThisCommonLabelBase.env.quotation}% -}, the \Environment{addmargin} environment changes the margin\Index{margin}. -However, unlike the first two environments, \Environment{addmargin} lets the -user change the width of the indentation. Apart from this change, this -environment does not change the indentation of the first line nor the vertical -spacing between paragraphs. - -If only the obligatory argument \PName{indentation} is given, both the left -and right margin are expanded by this value. If the optional argument -\PName{left indentation} is given as well, then the value \PName{left - indentation} is used for the left margin instead of \PName{indentation}. - -The starred variant \Environment{addmargin*}% -\important{\Environment{addmargin*}} differs from the normal version only in -the two-sided mode. Furthermore, the difference only occurs if the optional -argument \PName{inner indentation} is used. In this case, the value of -\PName{inner indentation} is added to the normal inner indentation. For -right-hand pages this is the left margin; for left-hand pages, the right -margin. Then the value of \PName{indentation} determines the width of the -opposite margin. - -Both versions of this environment allow negative values for all parameters. -\IfThisCommonLabelBase{scrextend}{% - The environment then protrudes into the margin accordingly.% -}{% - This can be done so that the environment protrudes into the margin.% -}% -\IfThisCommonFirstRun{\iftrue}{\csname iffalse\endcsname} - \begin{Example} - \phantomsection\xmpllabel{env.addmargin}% -\begin{lstcode} - \newenvironment{SourceCodeFrame}{% - \begin{addmargin*}[1em]{-1em}% - \begin{minipage}{\linewidth}% - \rule{\linewidth}{2pt}% - }{% - \rule[.25\baselineskip]{\linewidth}{2pt}% - \end{minipage}% - \end{addmargin*}% - } -\end{lstcode} - If you now put your source code in such an environment, it will show - up as: - \begin{ShowOutput} - \newenvironment{SourceCodeFrame}{% - \begin{addmargin*}[1em]{-1em}% - \begin{minipage}{\linewidth}% - \rule{\linewidth}{2pt}% - }{% - \rule[.25\baselineskip]{\linewidth}{2pt}% - \end{minipage}% - \end{addmargin*}% - } - You define the following environment: - \begin{SourceCodeFrame} -\begin{lstcode} -\newenvironment{\SourceCodeFrame}{% - \begin{addmargin*}[1em]{-1em}% - \begin{minipage}{\linewidth}% - \rule{\linewidth}{2pt}% -}{% - \rule[.25\baselineskip]{\linewidth}{2pt}% - \end{minipage}% - \end{addmargin*}% -} -\end{lstcode} - \end{SourceCodeFrame} - This may be feasible or not. In any case, it shows the usage of this - environment. - \end{ShowOutput} - The optional argument of the \Environment{addmargin*} environment - makes sure that the inner margin is extended by 1\Unit{em}. In turn - the outer margin is decreased by 1\Unit{em}. The result is a shift - by 1\Unit{em} to the outside. Instead of \PValue{1em}, you can of - course use a length, for example, \PValue{2\Macro{parindent}}. - \end{Example} -\fi% - -Whether a page is going to be on the left or right side of the book cannot be -determined reliably on the first {\LaTeX} run. For details please refer to -the explanation of the commands -\DescRef{\ThisCommonLabelBase.cmd.Ifthispageodd} -(\autoref{sec:\ThisCommonLabelBase.oddOrEven}, -\DescPageRef{\ThisCommonLabelBase.cmd.Ifthispageodd}) and -\iffree{\Macro{ifthispagewasodd}}{% - \DescRef{maincls-experts.cmd.ifthispagewasodd}} -(\autoref{sec:maincls-experts.addInfos}\iffree{}{, -\DescPageRef{maincls-experts.cmd.Ifthispageodd}}). -\IfThisCommonLabelBase{scrlttr2}{}{% -\begin{Explain} - The interplay of environments such as lists and paragraphs gives rise to - frequent questions. Therefore, you can find further explanation in the - description of the \Option{parskip} option in - \autoref{sec:maincls-experts.addInfos}\iffree{}{, - \DescPageRef{maincls-experts.option.parskip}. Also in the expert section, in - \autoref{sec:maincls-experts.addInfos}, - \DescPageRef{maincls-experts.env.addmargin*}, you can find additional - information about page breaks inside \Environment{addmargin*}}.% -\end{Explain}}% -% -\EndIndexGroup -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-marginpar.tex b/macros/latex/contrib/koma-script/source-doc/english/common-marginpar.tex deleted file mode 100644 index 2300fa625d..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-marginpar.tex +++ /dev/null @@ -1,144 +0,0 @@ -% ====================================================================== -% common-marginpar.tex -% Copyright (c) Markus Kohm, 2001-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-marginpar.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-marginpar.tex} - [$Date: 2019-11-04 08:19:23 +0100 (Mo, 04. Nov 2019) $ - KOMA-Script guide (common paragraphs)] -\translator{Gernot Hassenpflug\and Markus Kohm\and Karl Hagen} - -% Date of the translated German file: 2019-11-04 - -\section{Marginal Notes} -\seclabel{marginNotes}% -\BeginIndexGroup -\BeginIndex{}{marginal notes}% - -\IfThisCommonFirstRun{}{% - The information in \autoref{sec:\ThisCommonFirstLabelBase.marginNotes} - applies equally to this chapter. So if you have already read and understood - \autoref{sec:\ThisCommonFirstLabelBase.marginNotes}, you can skip ahead to - \autoref{sec:\ThisCommonLabelBase.marginNotes.next}, - \autopageref{sec:\ThisCommonLabelBase.marginNotes.next}.% -} - -In addition to the text area, which normally fills the type area, documents -often contain a column for marginalia. You can set marginal notes in this -area. -\IfThisCommonLabelBase{scrlttr2}{% - In letters, however, marginal notes are unusual and should be used - sparingly.% -}{% - This \iffree{guide}{book} makes frequent use of them.% -}% - - -\begin{Declaration} - \Macro{marginpar}\OParameter{margin note left}\Parameter{margin note}% - \Macro{marginline}\Parameter{margin note} -\end{Declaration}% -Marginal notes\Index[indexmain]{marginal notes} in {\LaTeX} are usually -inserted with the \Macro{marginpar} command. They are placed in the outer -margin. One-sided documents use the right border. Although you can specify a -different marginal note for \Macro{marginpar} in case it winds up in the left -margin, marginal notes are always fully justified. However, experience has -shown that many users prefer left- or right-justified marginal notes -instead. For this purpose, {\KOMAScript} offers the \Macro{marginline} -command. - -\IfThisCommonFirstRun{% - \iftrue% -}{% - For a detailed example, see - \autoref{sec:\ThisCommonFirstLabelBase.marginNotes} at - \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.marginline}.% - \csname iffalse\endcsname% -}% - \begin{Example} - \phantomsection\xmpllabel{cmd.marginline}% - In some parts of this \iffree{guide}{book}, the class name - \Class{scrartcl} can be found in the margin. You can produce this with:% - \iffalse% Umbruchkorrekturtext - \footnote{Actually, instead of \Macro{texttt}, a semantic markup - was used. To avoid confusion, this has been replaced in the example.}% - \fi -\begin{lstcode} - \marginline{\texttt{scrartcl}} -\end{lstcode} - - Instead of \Macro{marginline} you could have used \Macro{marginpar}. In fact - the first command is implemented internally as: -\begin{lstcode} - \marginpar[\raggedleft\texttt{scrartcl}] - {\raggedright\texttt{scrartcl}} -\end{lstcode} - Thus \Macro{marginline} is really just a shorthand notation for the - code above.% -\end{Example}% -\fi - -Advanced users\textnote{Attention!} will find notes about difficulties that -can arise using \Macro{marginpar} in \autoref{sec:maincls-experts.addInfos}% -\iffree{}{, on \DescPageRef{maincls-experts.cmd.marginpar}}. These remarks -also apply to \Macro{marginline}. In addition, -\autoref{cha:scrlayer-notecolumn} introduces a package that you can use to -create note columns with their own page breaks.% -\iffalse% Umbruchkorrektur - \ However, the - \hyperref[cha:scrlayer-notecolumn]{\Package{scrlayer-notecolumn}}% - \IndexPackage{scrlayer-notecolumn} package is more a proof of concept than a - finished package.% -\fi% -% -\EndIndexGroup -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-oddorevenpage.tex b/macros/latex/contrib/koma-script/source-doc/english/common-oddorevenpage.tex deleted file mode 100644 index 2c3926698f..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-oddorevenpage.tex +++ /dev/null @@ -1,151 +0,0 @@ -% ====================================================================== -% common-oddorevenpage.tex -% Copyright (c) Markus Kohm, 2001-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-oddorevenpage.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-oddorevenpage.tex} - [$Date: 2019-11-19 12:56:28 +0100 (Di, 19. Nov 2019) $ - KOMA-Script guide (common paragraph: Detection of Odd and - Even Pages)] -\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} - -% Date of the translated German file: 2019-11-19 - -\section{Detecting Odd and Even Pages} -\seclabel{oddOrEven}% -\BeginIndexGroup% -\BeginIndex{}{page>odd}% -\BeginIndex{}{page>even}% - -\IfThisCommonFirstRun{}{% - The information in \autoref{sec:maincls.oddOrEven} applies equally to this - chapter. So if you have already read and understood - \autoref{sec:\ThisCommonFirstLabelBase.oddOrEven}, you can skip ahead to - \autopageref{sec:\ThisCommonLabelBase.oddOrEven.next}, - \autopageref{sec:\ThisCommonLabelBase.oddOrEven.next}.% -} - -In two-sided documents we distinguish left and right pages. Left pages always -have an even page number, and right pages always have an odd page number. % -\IfThisCommonLabelBase{maincls}{% - Identifying right and left pages is equivalent to identifying even- or - odd-numbered pages, and so we normally refer to them as even and odd pages - in this \iffree{guide}{book}. - - % Umbruchkorrekturtext - \iftrue% - In one-sided documents, the distinction between left and right pages does - not exist. Nevertheless, there are still pages with even and odd page - numbers.% - \fi% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - As a rule, letters will be set one-sided. However, if you need to print - letters using both sides of the paper or, in exceptional cases, are - generating real two-sided letters, it may be useful to know whether you - are currently on an even or odd page.% - }{}% -} - - -\begin{Declaration} - \Macro{Ifthispageodd}\Parameter{true part}\Parameter{false part} -\end{Declaration}% -If\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.28}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.28}{\Class{scrlttr2}}% - }{% - \IfThisCommonLabelBase{scrextend}{% - \ChangedAt{v3.28}{\Package{scrextend}}% - }{}% - }% -} % -you want to determine whether text appears on an even or odd page, -\KOMAScript{} provides the \Macro{Ifthispageodd} command. The \PName{true - part} argument is executed only if you are currently on an odd page. -Otherwise the \PName{false part} argument is executed. -% -\IfThisCommonLabelBase{scrextend}{\iffalse}{\csname iftrue\endcsname}% -\begin{Example} - Suppose you simply want to show whether a text will be placed onto an - even or odd page. You may achieve that - using{\phantomsection\xmpllabel{Ifthispageodd}} -\begin{lstcode} - This page has an \Ifthispageodd{odd}{even} - page number. -\end{lstcode} - This results in the output - \begin{quote} - This page has an \Ifthispageodd{odd}{even} page number. - \end{quote} -\end{Example} -\fi - -Because the \Macro{Ifthispageodd} command uses a mechanism that is very -similar to a label and a reference to it, at least two {\LaTeX} runs are -required after each change to the text. Only then will the decision be -correct. In the first run, a heuristic is used to make the initial choice. - -In \autoref{sec:maincls-experts.addInfos}, -\DescPageRef{maincls-experts.cmd.Ifthispageodd}, advanced users can find more -information about the problems of detecting left and right pages, or even and -odd page numbers.% -\IfThisCommonLabelBase{scrextend}{% - An example for \Macro{Ifthispageodd} is shown on - \PageRefxmpl{maincls.Ifthispageodd} in \autoref{sec:maincls.oddOrEven}.% -}{}% -% -\EndIndexGroup -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-options.tex b/macros/latex/contrib/koma-script/source-doc/english/common-options.tex deleted file mode 100644 index a00baa01c8..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-options.tex +++ /dev/null @@ -1,221 +0,0 @@ -% ====================================================================== -% common-options.tex -% Copyright (c) Markus Kohm, 2001-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-options.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-options.tex} - [$Date: 2017-12-07 23:10:55 -0800 (Thu, 07 Dec 2017) $ - KOMA-Script guide (common paragraphs)] -\translator{Gernot Hassenpflug\and Krickette Murabayashi\and Karl Hagen} - -% Date of the translated German file: 2019-10-29 - -\section{Early or Late Selection of Options} -\seclabel{options} -\BeginIndexGroup -\BeginIndex{}{options}% - -\IfThisCommonFirstRun{% - This section introduces a special feature of \KOMAScript{} which, in - addition to \IfThisCommonLabelBase{typearea}{\Package{typearea}}{% - \IfThisCommonLabelBase{maincls}{\Class{scrbook}, \Class{scrreprt}, and - \Class{scrartcl}}{% - \IfThisCommonLabelBase{scrlttr2}{the \Class{scrlttr2} class}{% - \IfThisCommonLabelBase{scrextend}{the classes and - \Package{scrextend}}{% - \IfThisCommonLabelBase{scrhack}{\Package{scrhack}}{% - \IfThisCommonLabelBase{scrjura}{\Package{scrjura}}{% - \IfThisCommonLabelBase{scrlayer}{\Package{scrlayer}}{% - \IfThisCommonLabelBase{scrlayer-scrpage}{% - \Package{scrlayer-scrpage}}{% - \IfThisCommonLabelBase{scrlayer-notecolumn}{% - \Package{scrlayer-notecolumn}}{% - \InternalCommonFileUsageError}}}}}}}}}% - , is also relevant to other \KOMAScript{} packages and classes. % - \IfThisCommonLabelBase{scrlttr2}{So that each chapter may stand on its own, - this section appears in nearly identical form in several chapters, but if - you are studying all of \KOMAScript{}, you of course only need to read it - one time.% - }{This section appears in nearly identical form in several chapters, so you - can find all the information about a single package or class in the - relevant chapter. Users who are interested not just in a particular - package or class but in getting an overview of \KOMAScript{} as a whole - only need to read this section in one of the chapters and can - \IfThisCommonLabelBase{maincls}{skip the rest of the chapter.}{% - then skip it as they study the guide.}% - }% -}{% - The information in \autoref{sec:\ThisCommonFirstLabelBase.options} applies - equally to this chapter. So if you have already read and understood - \autoref{sec:\ThisCommonFirstLabelBase.options}, you can skip ahead to - \autoref{sec:\ThisCommonLabelBase.options.next}, - \autopageref{sec:\ThisCommonLabelBase.options.next}.% -} - - - -\begin{Declaration} - \Macro{documentclass}\OParameter{option list}% - \Parameter{{\KOMAScript} class} - \Macro{usepackage}\OParameter{option list}% - \Parameter{package list} -\end{Declaration} -\LaTeX{} allows users to pass class options\textnote{class options} as a -comma-separated list of keywords in the optional argument to -\Macro{documentclass}. In addition to being passed to the class, these options -are also passed on to all packages\textnote{global options} that can -understand them. Users can also pass a similar comma-separated list of -keywords in the optional argument of \Macro{usepackage}\textnote{packet - options}. \KOMAScript{} extends\ChangedAt{v3.00}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}\and \Package{scrextend}\and - \Package{typearea}} the option mechanism for -\IfThisCommonLabelBaseOneOf{scrextend,scrjura}{}{the \KOMAScript{} classes and -} some packages with further options. Thus most \KOMAScript{} options can also -take a value, so an option does not necessarily take the form \PName{option}, -but can also take the form \PName{option}\texttt{=}\PName{value}% -\important{\PName{option}\texttt{=}\PName{value}}. Except for this difference, -\Macro{documentclass} and \Macro{usepackage} in \KOMAScript{} function as -described in \cite{latex:usrguide} or any introduction to \LaTeX, for example -\cite{lshort}. - -\IfThisCommonLabelBaseNotOneOf{% - scrjura,scrhack,scrlayer,scrlayer-scrpage,scrlayer-notecolumn,scrextend% -}{% - When using a \KOMAScript{} class\textnote{Attention!}, you should not - specify options when loading the \Package{typearea} or \Package{scrbase} - packages. The reason for this restriction is that the class already loads - these packages without options, and \LaTeX{} refuses to load a package - multiple times with different option settings.% - \IfThisCommonLabelBaseOneOf{maincls,scrlttr2}{ In general, it is not - necessary to load either one of these packages explicitly when using any - \KOMAScript{} class.}{}% - \par -}{} - -% The alternative text for wrapping optimization was redundant and, as -% it's not required for the English version, has been deleted. -Setting the options with \Macro{documentclass} has one\textnote{Attention!} -major disadvantage: unlike the interface described below, the options in -\Macro{documentclass} are not robust. So commands, lengths, counters, and -similar constructs may break inside the optional argument of this command. -For example, with many non-\KOMAScript{} classes, using a \LaTeX{} length -in the value of an option results in an error% -\IfThisCommonLabelBaseNotOneOf{maincls,scrlttr2}{ before the value is passed - to a \KOMAScript{} package and it can take control of the option - execution}{}% -. So if you want to use a \LaTeX{} length, counter, or command as part of the -value of an option, you should use \DescRef{\LabelBase.cmd.KOMAoptions} or -\DescRef{\LabelBase.cmd.KOMAoption}. These commands will be described next.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{KOMAoptions}\Parameter{option list} - \Macro{KOMAoption}\Parameter{option}\Parameter{value list} -\end{Declaration} -\KOMAScript{}\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}\and \Package{scrextend}\and \Package{typearea}} also -provides the ability to change the values of most -\IfThisCommonLabelBaseOneOf{scrextend,scrjura}{}{class and }package options -even after loading the \IfThisCommonLabelBaseOneOf{scrextend,scrjura}{}{% - class or} package. You can use the \Macro{KOMAoptions} command to change the -values of a list of options, as in -\DescRef{\ThisCommonLabelBase.cmd.documentclass} or -\DescRef{\ThisCommonLabelBase.cmd.usepackage}. Each option in the -\PName{option list} has the form \PName{option}\texttt{=}\PName{value}% -\important{\PName{option}\texttt{=}\PName{value},\dots}. - -Some options also have a default value. If you do not specify a value, that is -if you give the option simply as \PName{option}, then this default value will -be used. - -Some options can have several values simultaneously. For such options, it is -possible, with the help of \Macro{KOMAoption}, to pass a list of values to a -single \PName{option}. The individual values are given as a comma-separated -\PName{value list}\important{\PName{value},\dots}. - -\begin{Explain} - \KOMAScript{} uses the commands \DescRef{scrbase.cmd.FamilyOptions} and - \DescRef{scrbase.cmd.FamilyOption} with the family ``\PValue{KOMA}'' to - implement this ability. - \IfThisCommonLabelBaseOneOf{typearea}{% Umbruchkorrektur - Advanced users will find more on these instructions in - \autoref{sec:scrbase.keyvalue}, \DescPageRef{scrbase.cmd.FamilyOptions}. - }{% - See \autoref{part:forExperts}, \autoref{sec:scrbase.keyvalue}, - \DescPageRef{scrbase.cmd.FamilyOptions}. }% -\end{Explain} - -Options set with \Macro{KOMAoptions} or \Macro{KOMAoption} will reach -\IfThisCommonLabelBase{scrextend}{}{both the \KOMAScript{} class and }any -previously loaded \KOMAScript{} packages that recognise these options. If an -option or a value is unknown, \hyperref[cha:scrbase]{\Package{scrbase}}% -\IndexPackage{scrbase}\important{\hyperref[cha:scrbase]{\Package{scrbase}}} -will report it as an error.% -% -\iffalse% Umbruchkorrekturtext -\iffree{}{\IfThisCommonLabelBase{scrlayer-scrpage}{\par - Incidentally, the \Package{scrpage2}\IndexPackage{scrpage2}% - \important{\Package{scrpage2}}, which is considered obsolete, does not have - this extension. Options can therefore only be set when the package is loaded - with the option explained previously.}{}}% -\fi% -% -\EndIndexGroup -% -\EndIndexGroup - -\phantomsection -\label{sec:\ThisCommonLabelBase.options.end} -\endinput - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% coding: us-ascii -%%% ispell-local-dictionary: "en_GB" -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-pagestylemanipulation.tex b/macros/latex/contrib/koma-script/source-doc/english/common-pagestylemanipulation.tex deleted file mode 100644 index cc42a49a50..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-pagestylemanipulation.tex +++ /dev/null @@ -1,1058 +0,0 @@ -% ====================================================================== -% common-pagestylemanipulation.tex -% Copyright (c) Markus Kohm, 2013-2021 -% -% 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-2021 -% -% 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-12-06 - -\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} - \IfThisCommonLabelBase{scrlayer}{% - \Option{automark} - \OptionVName{autooneside}{simple switch} - \Option{manualmark} - }{}% - \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% - 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}.% - }{% - \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. -% TODO: Fix new translation - With \Package{scrlayer} the distinction is done with the two commands - \Macro{automark} and \Macro{manualmark}.% -% :ODOT - }{\InternalCommonFileUsageError}% - }% - - 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 - - \IfThisCommonLabelBase{scrlayer}{}{% - \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 - - \IfThisCommonLabelBaseOneOf{scrlayer,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}{\par% - You can find additional background information and examples of how to use - these commands in the documentation for the \Package{scrlayer} package - \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% - in \autoref{sec:scrlayer-scrpage.pagestyle.content}, starting on - \DescPageRef{scrlayer-scrpage.cmd.manualmark}.% - }{% - \EndIndexGroup% - }% - \EndIndexGroup - - - \IfThisCommonLabelBase{scrlayer}{% already described at \layercontentsmeasure - }{% - \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} - \OptionVName{markcase}{value} - \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}. Using the \DescRef{\LabelBase.option.markcase}% - \IndexOption{markcase}\important{\DescRef{\LabelBase.option.markcase}} - option with one of the values of \autoref{tab:scrlayer-scrpage.markcase} - also redefines \Macro{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 -\fi - - -\IfThisCommonLabelBase{scrlayer-scrpage}{\iffalse}{\csname iftrue\endcsname} - \begin{Declaration} - \Macro{righttopmark} - \Macro{rightbotmark} - \Macro{rightfirstmark} - \Macro{rightmark} - \Macro{lefttopmark} - \Macro{leftbotmark} - \Macro{leftfirstmark} - \Macro{leftmark} - \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 -\fi - - -\IfThisCommonLabelBase{scrlayer-scrpage-experts}{\iffalse}{% - \csname iftrue\endcsname}% - \begin{Declaration} - \IfThisCommonLabelBase{scrlayer-scrpage}{% - \Macro{leftmark} - \Macro{rightmark} - }{}% - \Macro{headmark} - \Macro{pagemark} - \end{Declaration} - \IfThisCommonLabelBase{scrlayer-scrpage}{% - 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 used 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} - \renewcommand*{\sectionmarkformat}{} -\end{lstcode} - \end{Example} - \ExampleEndFix - \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} - \Macro{markdouble}\Parameter{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% -% TODO: Fix new translation - The\ChangedAt{v3.28}{\Package{scrlayer}} command - \Macro{markdouble}\important{\Macro{markdouble}} does change the left mark - and the right mark to the same contents. So - \Macro{markdouble}\Parameter{mark} is a shorter form of - \Macro{markboth}\Parameter{mark}\Parameter{mark} with two identical - arguments.% -% :ODOT - \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[headheight=19.6pt]{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} - % TODO: New translation - Here, option \DescRef{typearea.option.headheight} is used to eliminate - the warning, that also has been reported in the previous example.% - % :ODOT - \end{Example} - \fi% - \EndIndexGroup -\fi - - -\IfThisCommonLabelBase{scrlayer-scrpage}{\iffalse}{\csname iftrue\endcsname} - \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: - -% LocalWords: scrlayer diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-parmarkup.tex b/macros/latex/contrib/koma-script/source-doc/english/common-parmarkup.tex deleted file mode 100644 index 125af2a056..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-parmarkup.tex +++ /dev/null @@ -1,271 +0,0 @@ -% ====================================================================== -% common-parmarkup.tex -% Copyright (c) Markus Kohm, 2001-2020 -% -% 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-parmarkup.tex -% Copyright (c) Markus Kohm, 2001-2020 -% -% 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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-parmarkup.tex} - [$Date: 2020-03-12 08:27:32 +0100 (Do, 12. Mär 2020) $ - KOMA-Script guide (common paragraph: Paragraph Markup)] -\translator{Gernot Hassenpflug\and Markus Kohm\and Krickette Murabayashi\and - Karl Hagen} - -% Date of the translated German file: 2020-03-12 - -\section{Marking Paragraphs} -\seclabel{parmarkup}% -\BeginIndexGroup -\BeginIndex{}{paragraph>marking}% - -\IfThisCommonLabelBase{maincls}{% - The\textnote{paragraph indent vs. paragraph spacing} standard classes - normally set paragraphs\Index[indexmain]{paragraph} indented and without any - vertical, inter-paragraph space. This is the best solution when using a - regular page layout like the ones produced with the \Package{typearea} - package. If neither indentation nor vertical space is used, only the length - of the last line would give the reader a guide to the paragraph break. In - extreme cases, it is very difficult to tell whether a line is full or not. - Furthermore, typographers find that a signal given at the paragraph's end is - easily forgotten by the start of the next line. A signal at the paragraph's - beginning is more easily remembered. Inter-paragraph spacing has the - drawback of disappearing in some contexts. For instance, after a displayed - formula it would be impossible to detect if the previous paragraph continues - or a new one begins. Also, at the top of a new page, it might be necessary - to look at the previous page to determine if a new paragraph has been - started or not. All these problems disappear when using indentation. A - combination of indentation and vertical inter-paragraph spacing is redundant - and therefore should be avoided. Indentation\Index[indexmain]{indentation} - alone is sufficient. The only drawback of indentation is that it shortens - the line length. The use of inter-paragraph spacing\Index{paragraph>spacing} - is therefore justified when using short lines, such as in a newspaper.% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - The preliminaries of \autoref{sec:maincls.parmarkup}, - \autopageref{sec:maincls.parmarkup} explain why paragraph indentation is - preferred to paragraph spacing. But the elements to which this explanation - refers, for example figures, tables, lists, equations, and even new pages, - are rare in normal letters. Letters are usually not so long that an - unrecognised paragraph will have serious consequences to the readability - of the document. The arguments for indentation, therefore, are less - consequential for standard letters. This may be one reason that you often - find paragraphs in letters marked with vertical spacing. But two - advantages of paragraph indentation remain. One is that such a letter - stands out from the crowd. Another is that it maintains the \emph{brand - identity}, that is the uniform appearance, of all documents from a single - source.% - }{\InternalCommonFileUsageError}% -} % -\IfThisCommonFirstRun{}{% - Apart from these suggestions, the information described in - \autoref{sec:\ThisCommonFirstLabelBase.parmarkup} for the other - \KOMAScript{} classes is valid for letters too. So if you have already read - and understood \autoref{sec:\ThisCommonFirstLabelBase.parmarkup} you can - skip ahead to \autoref{sec:\ThisCommonLabelBase.parmarkup.next} on - \autopageref{sec:\ThisCommonLabelBase.parmarkup.next}.% - \IfThisCommonLabelBase{scrlttr2}{ % - This also applies if you work not with the - \Class{scrlttr2}\OnlyAt{scrlttr2} class but with the \Package{scrletter} - package. The package does not provide its own settings for paragraph - formatting but relies entirely on the class being used.% - }{}% -} - - -\begin{Declaration} - \OptionVName{parskip}{method} -\end{Declaration} -\IfThisCommonLabelBase{maincls}{% - Once in a while you may require a document layout with vertical - inter-paragraph spacing instead of indentation. The \KOMAScript{} classes - provide several ways to accomplish this with the - \Option{parskip}\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} option.% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - In letters, you often encounter paragraphs marked not by indentation of - the first line but by a vertical space between them. The \KOMAScript{} - class \Class{scrlttr2}\OnlyAt{scrlttr2} provides ways to accomplish this - with the \Option{parskip} option.% - }{\InternalCommonFileUsageError}% -} % -The \PName{method} consists of two elements. The first element is either -\PValue{full}\important{\OptionValue{parskip}{full}\\ - \OptionValue{parskip}{half}} or \PValue{half}, where \PValue{full} stands -for a paragraph spacing of one line and \PValue{half} stands for a paragraph -spacing of half a line. The second element consists of one of the characters -``\PValue{*}'', ``\PValue{+}'', or ``\PValue{-}'' and can be omitted. Without -the second element\important{\OptionVName{parskip}{distance}}, the final line -of a paragraph will end with a white space of at least 1\Unit{em}. With the -plus character as the second element% -\important{\OptionValue{parskip}{\PName{distance}+}}, the white space will be -at least one third\,---\,and with the -asterisk\important{\OptionValue{parskip}{\PName{distance}*}} one -fourth\,---\,the width of a normal line. With the minus variant% -\important{\OptionValue{parskip}{\PName{Abstand}-}}, no provision is made for -white space in the last line of a paragraph. - -You can change the setting at any time. If you change it inside the document, -the \Macro{selectfont}\IndexCmd{selectfont}% -\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.08}{\Class{scrlttr2}}% - }{% - \InternalComonFileUsageError% - }% -} % -command will be called implicitly. Changes to paragraph spacing within a -paragraph will not be visible until the end of the paragraph. - -In addition to the resulting eight combinations for \PName{method}, you can -use the values for simple switches shown in \autoref{tab:truefalseswitch}, -\autopageref{tab:truefalseswitch}. Activating the option% -\important{\Option{parskip}\\\OptionValue{parskip}{true}} corresponds to using -\PValue{full} with no second element and therefore results in inter-paragraph -spacing of one line with at least 1\Unit{em} white space at the end of the -last line of each paragraph. Deactivating% -\important{\OptionValue{parskip}{false}} the option re-activates the default -indentation of 1\Unit{em} at the first line of the paragraph instead of -paragraph spacing. A summary of all possible values for \PName{method} are -shown in \autoref{tab:\ThisCommonFirstLabelBase.parskip}% -\IfThisCommonFirstRun{.% - \begin{desclist} -% \begin{table} - \desccaption -% \caption - [{Available values of option \Option{parskip}}]{% - Available values of option \Option{parskip} to select - how paragraph are - distinguished\label{tab:\ThisCommonFirstLabelBase.parskip}% - }% - {% - Available values of option \Option{parskip} (\emph{continuation})% - }% - % \begin{desctabular} - \entry{\PValue{false}, \PValue{off}, \PValue{no}% - \IndexOption{parskip~=\textKValue{false}}}{% - Paragraphs are identified by indentation of the first line by 1em. - There is no spacing requirement at the end of the last line - of a paragraph.}% - \entry{\PValue{full}, \PValue{true}, \PValue{on}, \PValue{yes}% - \IndexOption{parskip~=\textKValue{full}}% - }{% - Paragraphs are identified by a vertical space of one line between - paragraphs. There must be at least 1\Unit{em} of free space at the - end of the last line of the paragraph.}% - \pventry{full-}{% - Paragraphs are identified by a vertical space of one line between - paragraphs. There is no spacing requirement at the end of the last line - of a paragraph.\IndexOption{parskip~=\textKValue{full-}}}% - \pventry{full+}{% - Paragraphs are identified by a vertical space of one line between - paragraphs. There must be at least a third of a line of free space at the - end of a paragraph.\IndexOption{parskip~=\textKValue{full+}}}% - \pventry{full*}{% - Paragraphs are identified by a vertical space of one line between - paragraphs. There must be at least a quarter of a line of free space at - the end of a paragraph.\IndexOption{parskip~=\textKValue{full*}}}% - \pventry{half}{% - Paragraphs are identified by a vertical space of half a line between - paragraphs. There must be at least 1\Unit{em} free space at the end of the - last line of a paragraph.\IndexOption{parskip~=\textKValue{half}}}% - \pventry{half-}{% - Paragraphs are identified by a vertical space of half a line between - paragraphs. There is no spacing requirement at the end of the last line - of a paragraph.\IndexOption{parskip~=\textKValue{half-}}}% - \pventry{half+}{% - Paragraphs are identified by a vertical space of half a line between - paragraphs. There must be at least a third of a line of free space at the - end of a paragraph.\IndexOption{parskip~=\textKValue{half+}}}% - \pventry{half*}{% - Paragraphs are identified by a vertical space of half a line between - paragraphs. There must be at least a quarter of a line of free space at - the end of a paragraph.\IndexOption{parskip~=\textKValue{half*}}}% - \pventry{never}{% - No% - \IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - }{% - \IfThisCommonLabelBase{scrlttr2}{% - \ChangedAt{v3.08}{\Class{scrlttr2}}% - }{}% - } % - inter-paragraph spacing will be inserted even if additional vertical - spacing is needed for vertical adjustment with - \Macro{flushbottom}.\IndexCmd{flushbottom}% - \IndexOption{parskip~=\textKValue{never}}}% -% \end{desctabular} -% \end{table}% - \end{desclist}% -}{ at \autopageref{tab:\ThisCommonFirstLabelBase.parskip}.} - -All\textnote{Attention!} eight \PValue{full} and \PValue{half} option values -also change the spacing before, after, and inside list environments. This -prevents these environments or the paragraphs inside them from having -a larger separation than that between the paragraphs of normal text.% -\IfThisCommonLabelBase{maincls}{ % - Additionally, these options ensure that the table of contents and the lists - of figures and tables are set without any additional spacing.% -}{ % - Several elements of the letterhead are always set without inter-paragraph - spacing.% -}% - -The default\textnote{default} behaviour of \KOMAScript{} is -\OptionValue{parskip}{false}. In this case, there is no spacing between -paragraphs, only an indentation of the first line by 1\Unit{em}.% -% -\EndIndexGroup -% -\EndIndexGroup - - -%%% Local Variables: -%%% mode: latex -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-textmarkup.tex b/macros/latex/contrib/koma-script/source-doc/english/common-textmarkup.tex deleted file mode 100644 index 7092a65ce4..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-textmarkup.tex +++ /dev/null @@ -1,870 +0,0 @@ -% ====================================================================== -% common-textmarkup.tex -% Copyright (c) Markus Kohm, 2001-2021 -% -% 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-textmarkup.tex -% Copyright (c) Markus Kohm, 2001-2021 -% -% 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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-textmarkup.tex} - [$Date: 2021-02-15 19:40:44 +0100 (Mo, 15. Feb 2021) $ - KOMA-Script guide (common paragraphs)] -\translator{Gernot Hassenpflug\and Markus Kohm\and Krickette Murabayashi\and - Karl Hagen} - -% Date of the translated German file: 2021-05-15 - -\section{Text Markup} -\seclabel{textmarkup}% -\BeginIndexGroup% -\BeginIndex{}{text>markup}% -\BeginIndex{}{font}% - -\IfThisCommonFirstRun{}{% - The information in in \autoref{sec:\ThisCommonFirstLabelBase.textmarkup} - largely applies to this chapter. So if you have already read and understood - \autoref{sec:\ThisCommonFirstLabelBase.textmarkup}, you can - \IfThisCommonLabelBaseOneOf{scrextend,scrjura,scrlayer-notecolumn}{}{% - limit yourself to examining - \autoref{tab:\ThisCommonLabelBase.fontelements}, - \autopageref{tab:\ThisCommonLabelBase.fontelements} and then }% - skip ahead to \autoref{sec:\ThisCommonLabelBase.textmarkup.next}, - \autopageref{sec:\ThisCommonLabelBase.textmarkup.next}.% - \IfThisCommonLabelBase{scrextend}{\ In this case, however, - note\textnote{limitation} that \Package{scrextend} supports only the - elements for the document title, the dictum, the footnotes, and the - \DescRef{maincls.env.labeling} environment. from - \autoref{tab:maincls.fontelements}, - \autopageref{tab:maincls.fontelements}. Although the - \DescRef{maincls.fontelement.disposition} element exists, - \Package{scrextend} uses it only for the document title.% - }{}% -} - -% Umbruchkorrektur -\IfThisCommonLabelBaseOneOf{scrlayer-scrpage,scrextend}{}{% - {\LaTeX} offers different possibilities for logical and direct - markup\Index{logical markup}\Index{markup} of text. % - \IfThisCommonLabelBaseOneOf{scrlttr2}{}{% - In addition to the choice of the font, this includes commands for choosing - the font size and orientation. % - } For more information about the standard font facilities, see - \cite{lshort}, \cite{latex:usrguide}, and \cite{latex:fntguide}.% -} - -% Both commands are in LaTeX for a long time, so I do not describe them any -% longer despite \textsubscript is still defined by KOMA-Script if needed. -%\IfThisCommonLabelBaseOneOf{scrlayer-scrpage,scrjura,scrlayer-notecolumn}{% - \iffalse -%}{% -% \csname iftrue\endcsname}% - \begin{Declaration} - \Macro{textsuperscript}\Parameter{text}% - \Macro{textsubscript}\Parameter{text} - \end{Declaration} - The \LaTeX{} kernel defines the command - \Macro{textsuperscript}\IndexCmd{textsuperscript} to put text in - superscript\Index{text>superscript}\Index{superscript}. Unfortunately, - \LaTeX{}\textnote{\Latex~2015/01/01} itself did not offer a command to - produce text in subscript\Index{text>subscript}\Index{subscript} until - release 2015/01/01. \KOMAScript{} defines \Macro{textsubscript} for this - purpose. % - \ifthiscommonfirst - \begin{Example} - \phantomsection - \xmpllabel{cmd.textsubscript}% - You are writing a text on human metabolism. From time to time you - have to give some simple chemical formulas in which the numbers are - in subscript. To allow for logical markup, you first define in the - document preamble or in a separate package: -\begin{lstcode} - \newcommand*{\molec}[2]{#1\textsubscript{#2}} -\end{lstcode} - \newcommand*{\molec}[2]{#1\textsubscript{#2}} - Using this you then write: -\begin{lstcode} - The cell produces its energy partly from the reaction of \molec C6\molec - H{12}\molec O6 and \molec O2 to produce \molec H2\Molec O{} and - \molec C{}\molec O2. However, arsenic (\molec{As}{}) has quite a - detrimental effect on the metabolism. -\end{lstcode} - The output looks as follows: - \begin{ShowOutput} - The cell produces its energy partly from the reaction of \molec C6\molec - H{12}\molec O6 and \molec O2 to produce \molec H2\molec O{} and - \molec C{}\molec O2. However, arsenic (\molec{As}{}) has quite a - detrimental effect on the metabolism. - \end{ShowOutput} - - Some time later you decide that the chemical formulas should be - typeset in sans serif. Now you can see the advantages of using - logical markup. You only have the redefine the \Macro{molec} - command: -\begin{lstcode} - \newcommand*{\molec}[2]{\textsf{#1\textsubscript{#2}}} -\end{lstcode} - \renewcommand*{\molec}[2]{\textsf{#1\textsubscript{#2}}} - Now the output in the whole document changes to: - \begin{ShowOutput} - The cell produces its energy partly from the reaction of \molec - C6\molec H{12}\molec O6 and \molec O2 to produce \molec H2\molec - O{} and \molec C{}\molec O2. However, arsenic (\molec{As}{}) has - quite a detrimental effect on the metabolism. - \end{ShowOutput} - \end{Example} - \iftrue - \begin{Explain} - The example above uses the notation ``\verb|\molec C6|''. - This makes use of the fact that arguments consisting of only one - character do not have to be enclosed in parentheses. That is why - ``\verb|\molec C6|'' is similar to ``\verb|\molec{C}{6}|''. You - may already be familiar with this notation from indices or powers in - mathematical environments, such as ``\verb|$x^2$|'' instead of - ``\verb|$x^{2}$|'' - for ``$x^2$''. - \end{Explain} - \else % maybe some time I've made an English book - Advanced users can find information about the reason the example above - does work unless you put all arguments of \Macro{molec} into braces in - \autoref{sec:experts.knowhow}, - \DescPageRef{experts.macroargs}.% - \fi% - \else% - You can find an example that uses it in - \autoref{sec:\ThisCommonFirstLabelBase.textmarkup}, - \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.textsubscript}. - \fi% - \EndIndexGroup% -\fi - - -\begin{Declaration} - \Macro{setkomafont}\Parameter{element}\Parameter{commands}% - \Macro{addtokomafont}\Parameter{element}\Parameter{commands}% - \Macro{usekomafont}\Parameter{element} -\end{Declaration}% -With% -\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{} the help of the \Macro{setkomafont} and \Macro{addtokomafont} -commands, you can attach particular font styling \PName{commands} that change -the appearance of a given \PName{element}. Theoretically, all statements, -including literal text, can be used as \PName{commands}. You -should\textnote{Attention!}, however, limit yourself to those statements that -really change font attributes only. These are usually commands like -\Macro{rmfamily}, \Macro{sffamily}, \Macro{ttfamily}, \Macro{upshape}, -\Macro{itshape}, \Macro{slshape}, \Macro{scshape}, \Macro{mdseries}, -\Macro{bfseries}, \Macro{normalfont}, as well as the font size commands -\Macro{Huge}, \Macro{huge}, \Macro{LARGE}, \Macro{Large}, \Macro{large}, -\Macro{normalsize}, \Macro{small}, \Macro{footnotesize}, \Macro{scriptsize}, -and \Macro{tiny}. You can find these commands explained in \cite{lshort}, -\cite{latex:usrguide}, or \cite{latex:fntguide}. Colour switching commands -like \Macro{normalcolor} (see \cite{package:graphics} and -\cite{package:xcolor}) are also acceptable.% -\iffalse % Umbruchkorrekturtext - \ The behaviour when using other commands, especially those that lead to - redefinitions or generate output, is undefined. Strange behaviour is possible - and does not represent a bug. -\else - \ The use of other commands, in particular those that redefine things or - or lead to output, is not supported. Strange behaviour is possible in these - cases and does not represent a bug. -\fi - -The command \Macro{setkomafont} provides an element with a completely new -definition of its font styling. In contrast, the \Macro{addtokomafont} command -merely extends an existing definition. You should not use either command -inside the document body but only in the preamble. For examples of their use, -refer to the sections for the respective element.% -\IfThisCommonLabelBase{scrlayer-notecolumn}{}{% - \ The name and meaning of each element - \IfThisCommonLabelBaseOneOf{scrlayer-scrpage,scrjura}{, as well as their - defaults,}{} are listed in \IfThisCommonLabelBase{scrextend}{% - \autoref{tab:maincls.fontelements}, \autopageref{tab:maincls.fontelements} - }{% - \autoref{tab:\ThisCommonLabelBase.fontelements} % - }.% - \IfThisCommonLabelBase{scrextend}{ % - However, in \Package{scrextend} only\textnote{limitation} the listed - elements for the document title, dictum, footnotes, and the - \DescRef{maincls.env.labeling} environment are supported. Although the - \DescRef{maincls.fontelement.disposition} element exists, - \Package{scrextend} uses it only for the document title.% - }{% - \IfThisCommonLabelBase{scrlayer-scrpage}{ % - The specified defaults apply only if the corresponding element has not - already been defined before loading \Package{scrlayer-scrpage}. For - example, the \KOMAScript classes define - \DescRef{maincls.fontelement.pageheadfoot}, and then - \Package{scrlayer-scrpage} uses the setting it finds.% - }{% - \IfThisCommonLabelBase{scrjura}{}{ % - The default values can be found in the corresponding sections.% - }% - }% - }% -}% - -\IfThisCommonLabelBaseOneOf{scrlttr2,scrextend}{% Umbruchvarianten - The \Macro{usekomafont} command can be used to switch the current font style - to the specified \PName{Element}.% -}{% - With the \Macro{usekomafont} command, the current font style can be changed - to the one defined for the specified \PName{element}.% -} - -\IfThisCommonLabelBase{maincls}{\iftrue}{\csname iffalse\endcsname} - \begin{Example} - \phantomsection\xmpllabel{cmd.setkomafont}% - Suppose you want to use the same font specification for the element - \DescRef{\ThisCommonLabelBase.fontelement.captionlabel} - that is used with - \DescRef{\ThisCommonLabelBase.fontelement.descriptionlabel}. This can be - easily done with: -\begin{lstcode} - \setkomafont{captionlabel}{% - \usekomafont{descriptionlabel}% - } -\end{lstcode} - You can find other examples in the explanation of each element. - \end{Example} - - \begin{desclist} - \desccaption{% - Elements whose font style can be changed in \Class{scrbook}, - \Class{scrreprt} or \Class{scrartcl} with \Macro{setkomafont} and - \Macro{addtokomafont}% - \label{tab:maincls.fontelements}% - \label{tab:scrextend.fontelements}% - }{% - Elements whose font style can be changed (\emph{continued})% - }% - \feentry{author}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}\and \Package{scrextend}}% - author of the document in the title, i.\,e., the argument of - \DescRef{\ThisCommonLabelBase.cmd.author} when - \DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see - \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.author})}% - \feentry{caption}{text of a figure or table caption (see - \autoref{sec:maincls.floats}, \DescPageRef{maincls.cmd.caption})}% - \feentry{captionlabel}{label of a figure or table caption; applied in - addition to the \DescRef{\ThisCommonLabelBase.fontelement.caption} - element (see \autoref{sec:maincls.floats}, - \DescPageRef{maincls.cmd.caption})}% - \feentry{chapter}{title of the sectioning command - \DescRef{\ThisCommonLabelBase.cmd.chapter} (see - \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.chapter})}% - \feentry{chapterentry}{% - table of contents entry for the sectioning command - \DescRef{\ThisCommonLabelBase.cmd.chapter} (see - \autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}% - \feentry{chapterentrydots}{% - \ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}}% - optional points connecting table-of-content entries for the - \DescRef{\ThisCommonLabelBase.cmd.chapter} level, differing from the - \DescRef{\ThisCommonLabelBase.fontelement.chapterentry} element, - \Macro{normalfont} and \Macro{normalsize} (see - \autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}% - \feentry{chapterentrypagenumber}{% - page number of the table of contents entry for the sectioning command - \DescRef{\ThisCommonLabelBase.cmd.chapter}, differing from the element - \DescRef{\ThisCommonLabelBase.fontelement.chapterentry} (see - \autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}% - \feentry{chapterprefix}{% - label, e.\,g., ``Chapter'', appearing before the chapter number in both - \OptionValueRef{maincls}{chapterprefix}{true} and - \OptionValueRef{maincls}{appendixprefix}{true} (see - \autoref{sec:maincls.structure}, - \DescPageRef{maincls.option.chapterprefix})}% - \feentry{date}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}\and \Package{scrextend}}% - date of the document in the main title, i.\,e., the argument of - \DescRef{\ThisCommonLabelBase.cmd.date} when - \DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see - \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.date})}% - \feentry{dedication}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}\and \Package{scrextend}}% - dedication page after the main title, i.\,e., the argument of - \DescRef{\ThisCommonLabelBase.cmd.dedication} when - \DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see - \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.dedication})}% - \feentry{descriptionlabel}{labels, i.\,e., the optional argument of - \DescRef{\ThisCommonLabelBase.cmd.item.description} in the - \DescRef{\ThisCommonLabelBase.env.description} environment (see - \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.description})}% - \feentry{dictum}{dictum or epigraph (see \autoref{sec:maincls.dictum}, - \DescPageRef{maincls.cmd.dictum})}% - \feentry{dictumauthor}{author of a dictum or epigraph; applied in addition - to the element \DescRef{\ThisCommonLabelBase.fontelement.dictum} (see - \autoref{sec:maincls.dictum}, \DescPageRef{maincls.cmd.dictum})}% - \feentry{dictumtext}{alternative name for - \DescRef{\ThisCommonLabelBase.fontelement.dictum}}% - \feentry{disposition}{all sectioning command titles, i.\,e., the arguments - of \DescRef{\ThisCommonLabelBase.cmd.part} down to - \DescRef{\ThisCommonLabelBase.cmd.subparagraph} and - \DescRef{\ThisCommonLabelBase.cmd.minisec}, including the title of the - abstract; applied before the element of the respective unit (see - \autoref{sec:maincls.structure}, \autopageref{sec:maincls.structure})}% - \feentry{footnote}{footnote text and marker (see - \autoref{sec:maincls.footnotes}, \DescPageRef{maincls.cmd.footnote})}% - \feentry{footnotelabel}{marker for a footnote; applied in addition to the - element \DescRef{\ThisCommonLabelBase.fontelement.footnote} (see - \autoref{sec:maincls.footnotes}, \DescPageRef{maincls.cmd.footnote})}% - \feentry{footnotereference}{footnote reference in the text (see - \autoref{sec:maincls.footnotes}, \DescPageRef{maincls.cmd.footnote})}% - \feentry{footnoterule}{% - horizontal rule\ChangedAt{v3.07}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}} above the footnotes at the end - of the text area (see \autoref{sec:maincls.footnotes}, - \DescPageRef{maincls.cmd.setfootnoterule})}% - \feentry{itemizelabel}{% - \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - Default for the preset symbols of the environment - \DescRef{\ThisCommonLabelBase.env.itemize} (see - \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% - \feentry{labelinglabel}{labels, i.\,e., the optional argument of - \DescRef{\ThisCommonLabelBase.cmd.item.labeling} in the - \DescRef{\ThisCommonLabelBase.env.labeling} environment (see - \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.labeling})}% - \feentry{labelingseparator}{separator, i.\,e., the optional argument of - the \DescRef{\ThisCommonLabelBase.env.labeling} environment; applied in - addition to the element - \DescRef{\ThisCommonLabelBase.fontelement.labelinglabel} (see - \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.labeling})}% - \feentry{labelitemi}{% - \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - Font to be used in the item symbol definition - \DescRef{\ThisCommonLabelBase.cmd.labelitemi} (see - \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% - \feentry{labelitemii}{% - \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - Font to be used in the item symbol definition - \DescRef{\ThisCommonLabelBase.cmd.labelitemii} (see - \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% - \feentry{labelitemiii}{% - \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - Font to be used in the item symbol definition - \DescRef{\ThisCommonLabelBase.cmd.labelitemiii} (see - \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% - \feentry{labelitemiv}{% - \ChangedAt{v3.33}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - Font to be used in the item symbol definition - \DescRef{\ThisCommonLabelBase.cmd.labelitemiv} (see - \autoref{sec:maincls.lists}, \DescPageRef{maincls.env.itemize})}% - \feentry{minisec}{title of \DescRef{\ThisCommonLabelBase.cmd.minisec} (see - \autoref{sec:maincls.structure} ab \DescPageRef{maincls.cmd.minisec})}% - \feentry{pagefoot}{only used if package \Package{scrlayer-scrpage} has - been loaded (see \autoref{cha:scrlayer-scrpage}, - \DescPageRef{scrlayer-scrpage.fontelement.pagefoot})}% - \feentry{pagehead}{alternative name for - \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}}% - \feentry{pageheadfoot}{the header and footer of a page (see - \autoref{sec:maincls.pagestyle} from - \autopageref{sec:maincls.pagestyle})}% - \feentry{pagenumber}{page number in the header or footer (see - \autoref{sec:maincls.pagestyle})}% - \feentry{pagination}{alternative name for - \DescRef{\ThisCommonLabelBase.fontelement.pagenumber}}% - \feentry{paragraph}{title of the sectioning command - \DescRef{\ThisCommonLabelBase.cmd.paragraph} (see - \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.paragraph})}% - \feentry{part}{title of the \DescRef{\ThisCommonLabelBase.cmd.part} - sectioning command, without the line containing the part number (see - \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.part})}% - \feentry{partentry}{% - table of contents entry for the sectioning command - \DescRef{\ThisCommonLabelBase.cmd.part} (see \autoref{sec:maincls.toc}, - \DescPageRef{maincls.cmd.tableofcontents})}% - \feentry{partentrypagenumber}{% - page number of the table of contents entry for the sectioning command - \DescRef{\ThisCommonLabelBase.cmd.part}; applied in addition to the - element \DescRef{\ThisCommonLabelBase.fontelement.partentry} (see - \autoref{sec:maincls.toc}, \DescPageRef{maincls.cmd.tableofcontents})}% - \feentry{partnumber}{line containing the part number in a title of the - sectioning command \DescRef{\ThisCommonLabelBase.cmd.part} (see - \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.part})}% - \feentry{publishers}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}\and \Package{scrextend}}% - publishers of the document in the main title, i.\,e., the argument of - \DescRef{\ThisCommonLabelBase.cmd.publishers} when - \DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see - \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.publishers})}% - \feentry{section}{title of the sectioning command - \DescRef{\ThisCommonLabelBase.cmd.section} (see - \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.section})}% - \feentry{sectionentry}{% - table of contents entry for sectioning command - \DescRef{\ThisCommonLabelBase.cmd.section} (only available in - \Class{scrartcl}, see \autoref{sec:maincls.toc}, - \DescPageRef{maincls.cmd.tableofcontents})}% - \feentry{sectionentrydots}{% - \ChangedAt{v3.15}{\Class{scrartcl}}% - optional points connecting table-of-content entries for the - \DescRef{\ThisCommonLabelBase.cmd.section} level, differing from the - \DescRef{\ThisCommonLabelBase.fontelement.sectionentry} element, - \Macro{normalfont} and \Macro{normalsize} (only available in - \Class{scrartcl}, see \autoref{sec:maincls.toc}, - \DescPageRef{maincls.cmd.tableofcontents})}% - \feentry{sectionentrypagenumber}{% - page number of the table of contents entry for the sectioning command - \DescRef{\ThisCommonLabelBase.cmd.section}; applied in addition to - element \DescRef{\ThisCommonLabelBase.fontelement.sectionentry} (only - available in \Class{scrartcl}, see \autoref{sec:maincls.toc}, - \DescPageRef{maincls.cmd.tableofcontents})}% - \feentry{sectioning}{alternative name for - \DescRef{\ThisCommonLabelBase.fontelement.disposition}}% - \feentry{subject}{% - topic of the document, i.\,e., the argument of - \DescRef{\ThisCommonLabelBase.cmd.subject} on the main title page (see - \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.subject})}% - \feentry{subparagraph}{title of the sectioning command - \DescRef{\ThisCommonLabelBase.cmd.subparagraph} (see - \autoref{sec:maincls.structure}, - \DescPageRef{maincls.cmd.subparagraph})}% - \feentry{subsection}{title of the sectioning command - \DescRef{\ThisCommonLabelBase.cmd.subsection} (see - \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.subsection})}% - \feentry{subsubsection}{title of the sectioning command - \DescRef{\ThisCommonLabelBase.cmd.subsubsection} (see - \autoref{sec:maincls.structure}, - \DescPageRef{maincls.cmd.subsubsection})}% - \feentry{subtitle}{% - subtitle of the document, i.\,e., the argument of - \DescRef{\ThisCommonLabelBase.cmd.subtitle} on the main title page (see - \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.title})}% - \feentry{title}{main title of the document, i.\,e., the argument of - \DescRef{\ThisCommonLabelBase.cmd.title} (for details about the title - size see the additional note in the text of - \autoref{sec:maincls.titlepage} from \DescPageRef{maincls.cmd.title})}% - \feentry{titlehead}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}\and \Package{scrextend}}% - heading above the main title of the document, i.\,e., the argument of - \DescRef{\ThisCommonLabelBase.cmd.titlehead} when - \DescRef{\ThisCommonLabelBase.cmd.maketitle} is used (see - \autoref{sec:maincls.titlepage}, \DescPageRef{maincls.cmd.titlehead})}% - \end{desclist} -\else - \IfThisCommonLabelBase{scrextend}{\iftrue}{\csname iffalse\endcsname} - \begin{Example} - Suppose you want to print the document title in a red serif font. - You can do this using: -\begin{lstcode} - \setkomafont{title}{\color{red}} -\end{lstcode} - You will need the \Package{color} or the \Package{xcolor} package for - the \Macro{color}\PParameter{red} command. Using \Macro{normalfont} is - unnecessary in this case because it is already part of the definition of - the title itself. This\textnote{Attention!} example also needs the - \OptionValueRef{scrextend}{extendedfeature}{title} option (see - \autoref{sec:scrextend.optionalFeatures}, - \DescPageRef{scrextend.option.extendedfeature}). - \end{Example} - \else - \IfThisCommonLabelBase{scrlttr2}{% - You can find a general example that uses both \Macro{setkomafont} and - \Macro{usekomafont} in \autoref{sec:maincls.textmarkup} on - \PageRefxmpl{maincls.cmd.setkomafont}. - - \begin{desclist} - \desccaption{% - Elements whose font style can be changed in the \Class{scrlttr2} - class or the \Package{scrletter} package with the - \Macro{setkomafont} and \Macro{addtokomafont} - commands\label{tab:scrlttr2.fontelements}% - }{% - Elements whose font style can be changed (\emph{continued})% - }% - \feentry{addressee}{recipient's name and address in the address field - (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.option.addrfield})}% - \feentry{backaddress}{% - return address for a window envelope - (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.option.backaddress})}% - \feentry{descriptionlabel}{% - label, i.\,e. the optional argument of - \DescRef{\ThisCommonLabelBase.cmd.item.description}, in a - \DescRef{\ThisCommonLabelBase.env.description} environment - (\autoref{sec:scrlttr2.lists}, - \DescPageRef{scrlttr2.env.description})}% - \feentry{foldmark}{% - fold mark on the letterhead page; allows change of line colour - (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.option.foldmarks})}% - \feentry{footnote}{% - footnote text and marker (\autoref{sec:scrlttr2.footnotes}, - \DescPageRef{scrlttr2.cmd.footnote})}% - \feentry{footnotelabel}{% - footnote marker; applied in addition to the - \DescRef{\ThisCommonLabelBase.fontelement.footnote} element - (\autoref{sec:scrlttr2.footnotes}, - \DescPageRef{scrlttr2.cmd.footnote})}% - \feentry{footnotereference}{% - footnote reference in the text (\autoref{sec:scrlttr2.footnotes}, - \DescPageRef{scrlttr2.cmd.footnote})}% - \feentry{footnoterule}{% - horizontal rule\ChangedAt{v3.07}{\Class{scrlttr2}} above the - footnotes at the end of the text area - (\autoref{sec:maincls.footnotes}, - \DescPageRef{maincls.cmd.setfootnoterule})}% - \feentry{fromaddress}{% - sender's address in the letterhead - (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.variable.fromaddress})}% - \feentry{fromname}{% - sender's name in the letterhead, not including \PValue{fromaddress} - (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.variable.fromname})}% - \feentry{fromrule}{% - horizontal rule in the letterhead; intended for colour changes - (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.option.fromrule})}% - \feentry{itemizelabel}{% - \ChangedAt{v3.33}{\Class{scrlttr2}}% - Default for the preset symbols of the environment - \DescRef{\ThisCommonLabelBase.env.itemize} (see - \autoref{sec:scrlttr2.lists}, \DescPageRef{scrlttr2.env.itemize})}% - \feentry{labelinglabel}{% - labels, i.\,e. the optional argument of - \DescRef{\ThisCommonLabelBase.cmd.item.labeling} in the - \DescRef{\ThisCommonLabelBase.env.labeling} environment % - (see \autoref{sec:scrlttr2.lists}, - \DescPageRef{scrlttr2.env.labeling})}% - \feentry{labelingseparator}{% - separator, i.\,e. the optional argument of the - \DescRef{\ThisCommonLabelBase.env.labeling} environment; applied in - addition to the - \DescRef{\ThisCommonLabelBase.fontelement.labelinglabel} element - (see \autoref{sec:scrlttr2.lists}, - \DescPageRef{scrlttr2.env.labeling})}% - \feentry{labelitemi}{% - \ChangedAt{v3.33}{\Class{scrlttr2}}% - Font to be used in the item symbol definition - \DescRef{\ThisCommonLabelBase.cmd.labelitemi} (see - \autoref{sec:scrlttr2.lists}, \DescPageRef{scrlttr2.env.itemize})}% - \feentry{labelitemii}{% - \ChangedAt{v3.33}{\Class{scrlttr2}}% - Font to be used in the item symbol definition - \DescRef{\ThisCommonLabelBase.cmd.labelitemii} (see - \autoref{sec:scrlttr2.lists}, \DescPageRef{scrlttr2.env.itemize})}% - \feentry{labelitemiii}{% - \ChangedAt{v3.33}{\Class{scrlttr2}}% - Font to be used in the item symbol definition - \DescRef{\ThisCommonLabelBase.cmd.labelitemiii} (see - \autoref{sec:scrlttr2.lists}, \DescPageRef{scrlttr2.env.itemize})}% - \feentry{labelitemiv}{% - \ChangedAt{v3.33}{\Class{scrlttr2}}% - Font to be used in the item symbol definition - \DescRef{\ThisCommonLabelBase.cmd.labelitemiv} (see - \autoref{sec:scrlttr2.lists}, \DescPageRef{scrlttr2.env.itemize})}% - \feentry{pagefoot}{% - depending on the page style used after the - \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot} element for - the footer (\autoref{sec:\LabelBase.pagestyle}, - \DescPageRef{\LabelBase.fontelement.pagefoot})}% - \feentry{pagehead}{% - depending on the page style used after the - \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot} element for - the header (\autoref{sec:\LabelBase.pagestyle}, - \DescPageRef{\LabelBase.fontelement.pagefoot})}% - \feentry{pageheadfoot}{% - the header and footer of a page for all page styles that have been - defined using \KOMAScript{} (\autoref{sec:\LabelBase.pagestyle}, - \DescPageRef{\ThisCommonLabelBase.fontelement.pageheadfoot})}% - \feentry{pagenumber}{% - page number in the header or footer % - (\autoref{sec:\LabelBase.pagestyle}, - \DescPageRef{\ThisCommonLabelBase.fontelement.pagenumber})}% - \feentry{pagination}{% - alternative name for - \DescRef{\ThisCommonLabelBase.fontelement.pagenumber}}% - \feentry{placeanddate}{% - \ChangedAt{v3.12}{\Class{scrlttr2}}% - place and date, if a date line will be used instead of a normal - reference line (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.variable.placeseparator})}% - \feentry{refname}{% - description or title of the fields in the reference line % - (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.variable.yourref})}% - \feentry{refvalue}{% - content of the fields in the reference line % - (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.variable.yourref})}% - \feentry{specialmail}{% - delivery type in the address field % - (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.variable.specialmail})}% - \feentry{lettersubject}{% - \ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}}% - subject in the opening of the letter % - (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.variable.subject})}% - \feentry{lettertitle}{% - \ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}}% - title in the opening of the letter % - (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.variable.title})}% - \feentry{toaddress}{% - variation of the - \DescRef{\ThisCommonLabelBase.fontelement.addressee} element to - format the recipient's address, not including the name, in the - address field (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.variable.toaddress})}% - \feentry{toname}{% - variation of the - \DescRef{\ThisCommonLabelBase.fontelement.addressee} element to - format the recipient's name in the address field - (\autoref{sec:scrlttr2.firstpage}, - \DescPageRef{scrlttr2.variable.toname})}% - \end{desclist} - }{% - \IfThisCommonLabelBase{scrlayer-scrpage}{% - \begin{desclist} - \desccaption[{Elements of \Package{scrlayer-scrpage} whose font - styles can be changed with the \Macro{setkomafont} and - \Macro{addtokomafont} commands}]% - {Elements of \Package{scrlayer-scrpage} whose font styles can be - changed with the \Macro{setkomafont} and \Macro{addtokomafont} - commands, and their defaults, if they have not been defined - before loading \Package{scrlayer-scrpage}% - \label{tab:scrlayer-scrpage.fontelements}% - }% - {Elements whose font style can be changed (\emph{continued})}% - \feentry{footbotline}{% - horizontal line below the footer of a page style defined using - \Package{scrlayer-scrpage}. The font will be applied after - \Macro{normalfont}\IndexCmd{normalfont} and the fonts of elements - \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% - \IndexFontElement{pageheadfoot} and - \DescRef{\ThisCommonLabelBase.fontelement.pagefoot}% - \IndexFontElement{pagefoot}. It is recommended to use this element - for colour changes only.\par - \mbox{Default: \emph{empty}}% - }% - \feentry{footsepline}{% - horizontal line above the footer of a page style defined using - \Package{scrlayer-scrpage}. The font will be applied after - \Macro{normalfont}\IndexCmd{normalfont} and the fonts of elements - \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% - \IndexFontElement{pageheadfoot} and - \DescRef{\ThisCommonLabelBase.fontelement.pagefoot}% - \IndexFontElement{pagefoot}. It is recommended to use this element - for colour changes only.\par - \mbox{Default: \emph{empty}}% - }% - \feentry{headsepline}{% - horizontal line below the header of a page style defined using - \Package{scrlayer-scrpage}. The font will be applied after - \Macro{normalfont}\IndexCmd{normalfont} and the fonts of elements - \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% - \IndexFontElement{pageheadfoot} and - \DescRef{scrlayer-scrpage.fontelement.pagehead}% - \IndexFontElement{pagehead}. It is recommended to use this element - for colour changes only.\par - Default: \emph{empty}% - }% - \feentry{headtopline}{% - horizontal line above the header of a page style defined using - \Package{scrlayer-scrpage}. The font will be applied after - \Macro{normalfont}\IndexCmd{normalfont} and the fonts of elements - \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% - \IndexFontElement{pageheadfoot} and - \DescRef{scrlayer-scrpage.fontelement.pagehead}% - \IndexFontElement{pagehead}. It is recommended to use this element - for colour changes only.\par - \mbox{Default: \emph{empty}}% - }% - \feentry{pagefoot}{% - contents of the page footer of a page style defined using - \Package{scrlayer-scrpage}. The font will be applied after - \Macro{normalfont}\IndexCmd{normalfont} and the font of element - \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% - \IndexFontElement{pageheadfoot}.\par - \mbox{Default: \emph{empty}}% - }% - \feentry{pagehead}{% - contents of the page header of a page style defined using - \Package{scrlayer-scrpage}. The font will be applied after - \Macro{normalfont}\IndexCmd{normalfont} and the font of element - \DescRef{\ThisCommonLabelBase.fontelement.pageheadfoot}% - \IndexFontElement{pageheadfoot}.\par - \mbox{Default: \emph{empty}}% - }% - \feentry{pageheadfoot}{% - contents of the page header or footer of a page style defined - using \Package{scrlayer-scrpage}. The font will be applied after - \Macro{normalfont}\IndexCmd{normalfont}.\par - \mbox{Default: \Macro{normalcolor}\Macro{slshape}}% - }% - \feentry{pagenumber}{% - pagination set with - \DescRef{\ThisCommonLabelBase.cmd.pagemark}. If you redefine - \DescRef{\ThisCommonLabelBase.cmd.pagemark}, you have to be sure - that your redefinition also uses - \Macro{usekomafont}\PParameter{pagenumber}!\par - \mbox{Default: \Macro{normalfont}}% - }% - \end{desclist} - }{% - \IfThisCommonLabelBase{scrjura}{% - \begin{table} - \caption{Elements whose \Package{scrjura} font styles can be - changed with \Macro{setkomafont} and \Macro{addtokomafont}, - including their default settings}% - \label{tab:scrjura.fontelements}% - \begin{desctabular} - \feentry{Clause}{% - alias for \FontElement{\PName{environment name}.Clause} - within a contract environment, for example - \FontElement{contract.Clause} within - \DescRef{\ThisCommonLabelBase.env.contract}; if no - corresponding element is defined, - \FontElement{contract.Clause} is used% - }% - \feentry{contract.Clause}{% - heading of a paragraph within - \DescRef{\ThisCommonLabelBase.env.contract} (see - \autoref{sec:\ThisCommonLabelBase.contract}, - \DescPageRef{\ThisCommonLabelBase.fontelement.contract.Clause}); - \par - \mbox{Default: \Macro{sffamily}\Macro{bfseries}\Macro{large}}% - }% - \entry{\DescRef{\ThisCommonLabelBase.fontelement./Name/.Clause}}{% - \IndexFontElement[indexmain]{\PName{name}.Clause}% - heading of a paragraph within a \PName{name} environment - defined with - \DescRef{\ThisCommonLabelBase.cmd.DeclareNewJuraEnvironment} - as long as the setting was made with \Option{ClauseFont} or - the item was subsequently defined (see - \autoref{sec:\ThisCommonLabelBase.newenv}, - \DescPageRef{\ThisCommonLabelBase.fontelement./Name/.Clause}); - \par - \mbox{Default: \emph{none}}% - }% - \feentry{parnumber}{% - paragraph numbers within a contract environment (see - \autoref{sec:\ThisCommonLabelBase.par}, - \DescPageRef{\ThisCommonLabelBase.fontelement.parnumber});\par - \mbox{Default: \emph{empty}}% - }% - \feentry{sentencenumber}{% - \ChangedAt{v3.26}{\Package{scrjura}}% - sentence number of \DescRef{\ThisCommonLabelBase.cmd.Sentence} - (see \autoref{sec:\ThisCommonLabelBase.sentence}, - \DescPageRef{% - \ThisCommonLabelBase.fontelement.sentencenumber});\par - \mbox{Default: \emph{empty}}% - }% - \end{desctabular} - \end{table} - }{% - \IfThisCommonLabelBase{scrlayer-notecolumn}{}{% - \InternalCommonFileUsageError% - }% - }% - }% - }% - \fi% -\fi -\EndIndexGroup - - -\begin{Declaration} - \Macro{usefontofkomafont}\Parameter{element}% - \Macro{useencodingofkomafont}\Parameter{element}% - \Macro{usesizeofkomafont}\Parameter{element}% - \Macro{usefamilyofkomafont}\Parameter{element}% - \Macro{useseriesofkomafont}\Parameter{element}% - \Macro{useshapeofkomafont}\Parameter{element} -\end{Declaration} -Sometimes\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}\and \Package{scrextend}}, although this is not recommended, -the font setting of an element is used for settings that are not actually -related to the font. If you want to apply only the font setting of an element -but not those other settings, you can use \Macro{usefontofkomafont} instead of -\DescRef{\ThisCommonLabelBase.cmd.usekomafont}. This will activate the font -size and baseline skip, the font encoding, the font family, the font series, -and the font shape of an element, but no further settings as long as those -further settings are local. - -You can also switch to a single one of those attributes using one of the other -commands. Note that \Macro{usesizeofkomafont} uses both the font -size and the baseline skip.% -% -\IfThisCommonLabelBase{scrextend}{% Umbruchvariante! -}{% - \IfThisCommonLabelBase{scrjura}{% - \par% - However, the misuse of the font settings is strongly discouraged (see - \autoref{sec:maincls-experts.fonts}, - \DescPageRef{maincls-experts.cmd.addtokomafontrelaxlist})!% - }{% - \par% - However, you should not take these commands as legitimizing the insertion - of arbitrary commands in an element's font setting. To do so can lead - quickly to errors (see \autoref{sec:maincls-experts.fonts}, - \DescPageRef{maincls-experts.cmd.addtokomafontrelaxlist}).% - }% -}% -\EndIndexGroup -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% coding: us-ascii -%%% ispell-local-dictionary: "en_GB" -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-titles.tex b/macros/latex/contrib/koma-script/source-doc/english/common-titles.tex deleted file mode 100644 index b13637fb67..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-titles.tex +++ /dev/null @@ -1,680 +0,0 @@ -% ====================================================================== -% common-titles.tex -% Copyright (c) Markus Kohm, 2001-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-titles.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-titles.tex} - [$Date: 2019-12-03 09:41:21 +0100 (Di, 03. Dez 2019) $ - KOMA-Script guide (common paragraphs)] - -\translator{Gernot Hassenpflug\and Markus Kohm\and Krickette Murabayashi\and - Karl Hagen} - -% Date of the translated German file: 2019-12-03 - -\section{Document Titles} -\seclabel{titlepage}% -\BeginIndexGroup -\BeginIndex{}{title}% - -\IfThisCommonFirstRun{}{% - This information in \autoref{sec:\ThisCommonFirstLabelBase.titlepage} - largely applies to this chapter. So if you have already read and understood - \autoref{sec:\ThisCommonFirstLabelBase.titlepage}, you can skip to - \autoref{sec:\ThisCommonLabelBase.titlepage.next}, - \autopageref{sec:\ThisCommonLabelBase.titlepage.next}.% -}% -\IfThisCommonLabelBase{scrextend}{\iftrue}{\csname iffalse\endcsname}% - \ However,\textnote{Attention!} the capabilities of \Package{scrextend} - for handling the document title are part of the optional, advanced - features. Therfore they are only available, if - \OptionValueRef{\ThisCommonLabelBase}{extendedfeature}{title} is - selected while loading the package (see - \autoref{sec:\ThisCommonLabelBase.optionalFeatures}, - \DescRef{\ThisCommonLabelBase.option.extendedfeature}). - - Furthermore, \Package{scrextend} cannot be used with a \KOMAScript{} - class. Because of this, you should replace -\begin{lstcode} - \documentclass{scrbook} -\end{lstcode} - with -\begin{lstcode} - \documentclass{book} - \usepackage[extendedfeature=title]{scrextend} -\end{lstcode} - for all examples from \autoref{sec:maincls.titlepage}, if you want to - try them with \Package{scrextend}. -\fi - -\IfThisCommonLabelBase{scrextend}{}{% - In general, we distinguish two kinds of document titles. First, there are - title pages. These include title of the document, together with additional - information such as the author, on a separate page. In addition to the main - title page, there may be several other title pages, such as the half-title - or bastard title, publisher data, dedication, and so on. Second, there is - the in-page title. This kind of title appears at the top of a new page, - usually the first, and is specially emphasized. It too may be accompanied by - additional information, but it will be followed by more material on the same - page, for example by an abstract, the table of contents, or even a section.% -}% - -\begin{Declaration} - \OptionVName{titlepage}{simple switch}% - \OptionValue{titlepage}{firstiscover} - \Macro{coverpagetopmargin} - \Macro{coverpageleftmargin} - \Macro{coverpagerightmargin} - \Macro{coverpagebottommargin} -\end{Declaration}% -This option\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{} determines whether to use document title pages\Index{title>pages} or -in-page titles\Index{title>in-page} when using -\DescRef{\ThisCommonLabelBase.cmd.maketitle} (see -\DescPageRef{\ThisCommonLabelBase.cmd.maketitle}). Any value from -\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} can be used -for \PName{simple switch}. - -With the \OptionValue{titlepage}{true}% -\important{\OptionValue{titlepage}{true}} -\IfThisCommonLabelBase{scrextend}{}{or \Option{titlepage}} option, -invoking \DescRef{\ThisCommonLabelBase.cmd.maketitle} creates titles on -separate pages. These pages are set inside a -\DescRef{\ThisCommonLabelBase.env.titlepage} environment, and they -normally have neither header nor footer. Compared to standard {\LaTeX}, -{\KOMAScript} significantly expands the handling of the titles. These -additional elements can be found on the following pages. - -In contrast, with the -\OptionValue{titlepage}{false}\important{\OptionValue{titlepage}{false}} -option, invoking \DescRef{\ThisCommonLabelBase.cmd.maketitle} creates an -\emph{in-page} title. This means that the title is specially emphasized, but -it may be followed by more material on the same page, for instance an abstract -or a section.% - -The third choice,% -\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrextend}{% - \ChangedAt{v3.12}{\Package{scrextend}}% - }{\InternalCommonFileUseError}% -} \OptionValue{titlepage}{firstiscover}% -\important{\OptionValue{titlepage}{firstiscover}} not only activates title -pages but also prints the first title page of -\DescRef{\ThisCommonLabelBase.cmd.maketitle}\IndexCmd{maketitle}, i.\,e. -either the half-title or the main title, as a cover\Index{cover} page. Any -other setting of the \Option{titlepage} option will cancel this setting. The -margins\important{\Macro{coverpage\dots margin}} of the cover page are given -by \Macro{coverpagetopmargin}, \Macro{coverpageleftmargin}, -\Macro{coverpagerightmargin}, and \Macro{coverpagebottommargin}. The defaults -of these depend on the lengths of \Length{topmargin}\IndexLength{topmargin} -and \Length{evensidemargin}\IndexLength{evensidemargin} and can be changed -with \Macro{renewcommand}. - -\IfThisCommonLabelBase{maincls}{% - The default of the \Class{scrbook} and \Class{scrreprt} classes is to use - title pages. The \Class{scrartcl} class, on the other hand, uses in-page - titles by default.% -}{% - \IfThisCommonLabelBase{scrextend}{% - The default depends on the class used and \Package{scrextend} recognizes - it in a way that compatible with the standard class. If a class does not - set up a comparable default, it will be an in-page title.% - }{\InternalCommonFileUsageError}% -}% -% -\EndIndexGroup - - -\begin{Declaration} - \begin{Environment}{titlepage}\end{Environment}% -\end{Declaration}% -The standard classes and {\KOMAScript} set all title pages in a special -environment: the \Environment{titlepage} environment. This environment always -starts a new page\,---\,in two-sided printing a new right-hand page\,---\,and -in single-column mode. For this page, the style is changed to -\DescRef{maincls.cmd.thispagestyle}% -\PParameter{\DescRef{maincls.pagestyle.empty}}, so that neither page number -nor running head is output. At the end of the environment, the page is -automatically shipped out. Should you not be able to use the automatic layout -of the title pages provided by \DescRef{\ThisCommonLabelBase.cmd.maketitle}, -described next, you should design a new one with the help of this environment. - -\IfThisCommonFirstRun{\iftrue}{% - A simple example for a title page with \Environment{titlepage} is shown in - \autoref{sec:\ThisCommonFirstLabelBase.titlepage} on - \PageRefxmpl{\ThisCommonFirstLabelBase.env.titlepage}% - \csname iffalse\endcsname% -}% - \begin{Example} - \phantomsection\xmpllabel{env.titlepage} - Suppose you want a title page on which only the word ``Me'' stands at - the top on the left, as large as possible and in bold\,---\,no - author, no date, nothing else. The following document creates just - that: -\begin{lstcode} - \documentclass{scrbook} - \begin{document} - \begin{titlepage} - \textbf{\Huge Me} - \end{titlepage} - \end{document} -\end{lstcode} - It's simple, isn't it? - \end{Example} -\fi% -\EndIndexGroup - - -\begin{Declaration} - \Macro{maketitle}\OParameter{page number} -\end{Declaration}% -While\textnote{\KOMAScript{} vs. standard classes} the standard classes -produce at most one title page that can have three items (title, author, and -date), with \KOMAScript{} \Macro{maketitle} can produce up to six pages. In -contrast to the standard classes, \Macro{maketitle} in {\KOMAScript} accepts -an optional numeric argument. If it is used, this number is the page number of -the first title page. This page number is not output, but it affects the -subsequent numbering. You should definitely choose an odd number, because -otherwise the whole count gets mixed up. In my opinion, there are only two -useful applications for the optional argument. On the one hand, you could give -the the logical page number -1 to the half-title\Index[indexmain]{half-title} -in order to give the full title page the number 1. On the other hand, you -could use it to start at a higher page number, for example, 3, 5, or 7, to -accommodate other title pages added by the publishing house. The optional -argument is ignored for \emph{in-page} titles. You can change the page style -of such a title page by redefining the -\DescRef{\ThisCommonLabelBase.cmd.titlepagestyle} macro (see -\autoref{sec:maincls.pagestyle}, \DescPageRef{maincls.cmd.titlepagestyle}). - -The following commands do not lead immediately to the ship-out of the titles. -The typesetting and ship-out of the title pages are always done by -\Macro{maketitle}. Note also that \Macro{maketitle} should not be used inside -a \DescRef{\ThisCommonLabelBase.env.titlepage} environment. -As\textnote{Attention!} shown in the examples, you should use either -\Macro{maketitle} or \DescRef{\ThisCommonLabelBase.env.titlepage}, but not -both. - -The following commands only define the contents of the title. Therefore they -must be used before \Macro{maketitle}. It is, however, not necessary and, when -using the \Package{babel} package\IndexPackage{babel} not recommended, to -include these in the preamble before \Macro{begin}\PParameter{document} (see -\cite{package:babel}). You can find examples -\IfThisCommonFirstRun{in the descriptions of the other commands in this - section}{in \autoref{sec:\ThisCommonFirstLabelBase.titlepage}, starting on - \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.extratitle}}. - - -\begin{Declaration} - \Macro{extratitle}\Parameter{half-title} - \Macro{frontispiece}\Parameter{frontispiece} -\end{Declaration}% -\begin{Explain}% - In earlier times the inner book was often not protected from dirt by a - cover. This function was then assumed by the first page of the book, which - usually had just a short title, known as the \emph{half-title}. Nowadays the - extra page often appears before the real main title and contains information - about the publisher, series number, and similar information. -\end{Explain} -With {\KOMAScript}, it is possible to include a page before the real title -page. The \PName{half-title} can be arbitrary text\,---\,even several -paragraphs. The contents of the \PName{half-title} are output by {\KOMAScript} -without additional formatting. Their organisation is completely left to the -user. The verso of the half-title\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.25}{\Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrextend}{% - \ChangedAt{v3.25}{\Package{scrextend}}% - }{\ThisCommonLabelBaseFailure}% -} is the frontispiece. The half-title is set on its own page even when in-page -titles are used. The output of the half-title defined with \Macro{extratitle} -takes place as part of the title produced by -\DescRef{\ThisCommonLabelBase.cmd.maketitle}. - -\IfThisCommonFirstRun{\iftrue}{% - An example of a simple title page with half-title and main title is shown - in \autoref{sec:\ThisCommonFirstLabelBase.titlepage} on - \PageRefxmpl{\ThisCommonFirstLabelBase.cmd.extratitle}% - \csname iffalse\endcsname% -}% - \begin{Example} - \phantomsection\xmpllabel{cmd.extratitle} - Let's return to the previous example and suppose - that the Spartan ``Me'' is the half-title. The full title should - still follow the half-title. You can proceed as follows: -\begin{lstcode} - \documentclass{scrbook} - \begin{document} - \extratitle{\textbf{\Huge Me}} - \title{It's me} - \maketitle - \end{document} -\end{lstcode} - You can centre the half-title horizontally and put it a little lower down - the page: -\begin{lstcode} - \documentclass{scrbook} - \begin{document} - \extratitle{\vspace*{4\baselineskip} - \begin{center}\textbf{\Huge Me}\end{center}} - \title{It's me} - \maketitle - \end{document} -\end{lstcode} - The command\textnote{Attention!} \DescRef{\ThisCommonLabelBase.cmd.title} - is necessary in order to make the examples above work correctly. It is - explained next. - \end{Example} -\fi% -\EndIndexGroup - - -\begin{Declaration} - \Macro{titlehead}\Parameter{title head}% - \Macro{subject}\Parameter{subject}% - \Macro{title}\Parameter{title}% - \Macro{subtitle}\Parameter{subtitle}% - \Macro{author}\Parameter{author}% - \Macro{date}\Parameter{date}% - \Macro{publishers}\Parameter{publisher}% - \Macro{and}% - \Macro{thanks}\Parameter{footnote} -\end{Declaration}% -There are seven elements available for the content of the main title page. The -main title page is output as part of the title pages created by -\DescRef{\ThisCommonLabelBase.cmd.maketitle}, while the definitions given here -only apply to the respective elements. - -\BeginIndexGroup\BeginIndex{FontElement}{titlehead}% -\LabelFontElement{titlehead}% -The\important{\Macro{titlehead}} \PName{title head}% -\Index[indexmain]{title>head} is defined with the command -\Macro{titlehead}. It occupies the entire text width, at the top of the page, -in normal justification, and it can be freely designed by the user. It uses -the font element\important{\FontElement{titlehead}} with same name (see -\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, -\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% -\EndIndexGroup - -\BeginIndexGroup\BeginIndex{FontElement}{subject}\LabelFontElement{subject}% -The\important{\Macro{subject}} \PName{subject}\Index[indexmain]{subject} is -output with the font element\important{\FontElement{subject}} of the same name -immediately above the \PName{title}.% -\EndIndexGroup - -\BeginIndexGroup\BeginIndex{FontElement}{title}\LabelFontElement{title}% -The\important{\Macro{title}} \PName{title} is set in a very large font size. -Along\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}}{} with the font size, the font element -\FontElement{title}\IndexFontElement[indexmain]{title}% -\important{\FontElement{title}} is applied (see -\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, -\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% -\EndIndexGroup - -\BeginIndexGroup\BeginIndex{FontElement}{subtitle}\LabelFontElement{subtitle}% -The\important{\Macro{subtitle}} -\PName{subtitle}\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v2.97c}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}}{} is set just below the title using the font -element\important{\FontElement{subtitle}} of the same name (see -\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, -\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% -\EndIndexGroup - -\BeginIndexGroup\BeginIndex{FontElement}{author}\LabelFontElement{author}% -Below\important{\Macro{author}} the \PName{subtitle} appears the -\PName{author}\Index[indexmain]{author}. Several authors can be specified in -the argument of \Macro{author}. They should be separated by -\Macro{and}\important{\Macro{and}}. The output uses the font -element\important{\FontElement{author}} of the same name. (see -\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, -\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% -\EndIndexGroup - -\BeginIndexGroup\BeginIndex{FontElement}{date}\LabelFontElement{date}% -Below\important{\Macro{date}} the author or authors appears the -date\Index{date} in the font of the element of the same name. The default -value is the current date, as produced by \Macro{today}\IndexCmd{today}. The -\Macro{date} command accepts arbitrary information\,---\,even an empty -argument. The output uses the font element\important{\FontElement{date}} of -the same name (see \autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, -\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% -\EndIndexGroup - -\BeginIndexGroup\BeginIndex{FontElement}{publishers}% -\LabelFontElement{publishers}% -Finally\important{\Macro{publishers}} comes the -\PName{publisher}\Index[indexmain]{publisher}. Of course this command can also -be used for any other information of minor importance. If necessary, the -\Macro{parbox} command can be used to typeset this information over the full -page width like a regular paragraph instead of centring it. It should then be -considered equivalent to the title head. Note, however, that this field is -placed above any existing footnotes. The output uses the font -element\important{\FontElement{publishers}} of the same name (see -\autoref{tab:\ThisCommonFirstLabelBase.mainTitle}, -\autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}).% -\EndIndexGroup - -Footnotes\important{\Macro{thanks}}\Index{footnotes} on the title page are -produced not with \Macro{footnote}, but with \Macro{thanks}. They serve -typically for notes associated with the authors. Symbols are used as footnote -markers instead of numbers. Note\textnote{Attention!} that \Macro{thanks} has -to be used inside the argument of another command, such as in the -\PName{author} argument of the command \Macro{author}. -\IfThisCommonLabelBase{scrextend}{% - However, in order for the \DescRef{\ThisCommonLabelBase.fontelement.footnote} - element to be aware of the \Package{scrextend} package, not only does the - title extension need to be enabled, it must also be set to use footnotes - with this package (see the introduction to - \autoref{sec:\ThisCommonLabelBase.footnotes}, - \autopageref{sec:\ThisCommonLabelBase.footnotes}). Otherwise, the font - specified by the class or other packages used for the footnotes will be - used.% -}{}% - -For% -\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrextend}{% - \ChangedAt{v3.12}{\Package{scrextend}}% - }{\InternalCommonFileUsageError}% -} the output of the title elements, the font\textnote{font} can be set using -the \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and -\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} command (see -\autoref{sec:\ThisCommonLabelBase.textmarkup}, -\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}). The defaults are listed -in \autoref{tab:\ThisCommonFirstLabelBase.titlefonts}% -\IfThisCommonFirstRun{}{% - , \autopageref{tab:\ThisCommonFirstLabelBase.titlefonts}% -}.% -\IfThisCommonFirstRun{% - \begin{table} -% \centering -% \caption - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% -% \addtokomafont{caption}{\raggedright}% - \begin{captionbeside} - [{Font defaults for the elements of the title}] - {\label{tab:\ThisCommonLabelBase.titlefonts}% - \hspace{0pt plus 1ex}Font defaults for the elements of the title} - [l] - \begin{tabular}[t]{ll} - \toprule - Element name & Default \\ - \midrule - \FontElement{author} & \Macro{Large} \\ - \FontElement{date} & \Macro{Large} \\ - \FontElement{dedication} & \Macro{Large} \\ - \FontElement{publishers} & \Macro{Large} \\ - \FontElement{subject} & - \Macro{normalfont}\Macro{normalcolor}% - \Macro{bfseries}\Macro{Large} \\ - \FontElement{subtitle} & - \DescRef{\ThisCommonLabelBase.cmd.usekomafont}% - \PParameter{title}\Macro{large} \\ - \FontElement{title} & - \DescRef{\ThisCommonLabelBase.cmd.usekomafont}% - \PParameter{disposition} \\ - \FontElement{titlehead} & \\ - \bottomrule - \end{tabular} - \end{captionbeside} - \end{table}% -}{}% - -With the exception of \PName{title head} and any footnotes, all output is -centred horizontally. % -\iffree{% - \IfThisCommonLabelBase{scrextend}{The formatting of each element is}{These - details are} briefly summarized in - \autoref{tab:\ThisCommonFirstLabelBase.mainTitle}\IfThisCommonFirstRun{}{% - , \autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}}.% -}{% - \IfThisCommonLabelBase{scrextend}{% - The alignment of individual elements can also be found in - \autoref{tab:\ThisCommonFirstLabelBase.mainTitle}\IfThisCommonFirstRun{}{% - , \autopageref{tab:\ThisCommonFirstLabelBase.mainTitle}}.% - }{% - For a summary, see \autoref{tab:\ThisCommonFirstLabelBase.mainTitle}.% - }% -}% -\IfThisCommonFirstRun{% - \begin{table} - % \centering - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% - % \caption - \begin{captionbeside}[Main title]{% - \hspace{0pt plus 1ex}% - Font and horizontal positioning of the elements in the main title page - in the order of their vertical position from top to bottom when - typeset with \DescRef{\ThisCommonLabelBase.cmd.maketitle}} - [l] - \setlength{\tabcolsep}{.85\tabcolsep}% Umbruchoptimierung - \begin{tabular}[t]{llll} - \toprule - Element & Command & Font & Alignment \\ - \midrule - Title head & \Macro{titlehead} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{titlehead} & justified \\ - Subject & \Macro{subject} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{subject} & centred \\ - Title & \Macro{title} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{title}\Macro{huge} & centred \\ - Subtitle & \Macro{subtitle} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{subtitle} & centred \\ - Authors & \Macro{author} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{author} & centred \\ - Date & \Macro{date} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{date} & centred \\ - Publishers & \Macro{publishers} & \DescRef{\ThisCommonLabelBase.cmd.usekomafont}\PParameter{publishers} & centred \\ - \bottomrule - \end{tabular} - \end{captionbeside} - \label{tab:maincls.mainTitle} - \end{table} -}{} - -Note\textnote{Attention!} that for the main title, \Macro{huge} will be used -after the font switching element -\DescRef{\ThisCommonLabelBase.fontelement.title}\IndexFontElement{title}. So -you cannot change the size of the main title using -\DescRef{\ThisCommonLabelBase.cmd.setkomafont} or -\DescRef{\ThisCommonLabelBase.cmd.addtokomafont}.% - -\IfThisCommonFirstRun{\iftrue}{% - An example for a title page using all the elements offered by \KOMAScript{} - is shown in \autoref{sec:\ThisCommonFirstLabelBase.titlepage} on - \PageRefxmpl{\ThisCommonFirstLabelBase.maintitle}.% - \csname iffalse\endcsname% -}% - \begin{Example} - \phantomsection\xmpllabel{maintitle}% - Suppose you are writing a dissertation. The title page should have the - university's name and address at the top, flush left, and the semester, - flush right. As usual, a title including author and submission date - should be given. The adviser must also be indicated, together with the - fact that the document is a dissertation. You can do this as follows: -\begin{lstcode} - \documentclass{scrbook} - \usepackage[english]{babel} - \begin{document} - \titlehead{{\Large Unseen University - \hfill SS~2002\\} - Higher Analytical Institute\\ - Mythological Rd\\ - 34567 Etherworld} - \subject{Dissertation} - \title{Digital space simulation with the DSP\,56004} - \subtitle{Short but sweet?} - \author{Fuzzy George} - \date{30. February 2002} - \publishers{Adviser Prof. John Eccentric Doe} - \maketitle - \end{document} -\end{lstcode} - \end{Example}% -\fi - -\begin{Explain} - A common misconception concerns the function of the full title page. It is - often erroneously assumed to be the cover\Index{cover} or dust jacket. - Therefore, it is frequently expected that the title page will not follow the - normal layout for two-sided typesetting but will have equally large left and - right margins. - - But if you pick up a book and open it, you will quickly find at least one - title page inside the cover, within the so-called book block. Precisely - these title pages are produced by - \DescRef{\ThisCommonLabelBase.cmd.maketitle}. - - As is the case with the half-title, the full title page belongs to the book - block, and therefore should have the same page layout as the rest of the - document. A cover is actually something that you should create in a - separate document. After all, it often has a very distinct format. It can - also be designed with the help of a graphics or DTP program. A separate - document should also be used because the cover will be printed on a - different medium, such as cardboard, and possibly with another printer. - - Nevertheless, since \KOMAScript~3.12 the first title page issued by - \DescRef{\ThisCommonLabelBase.cmd.maketitle} can be formatted as a cover - page with different margins. Changes to the margins on this page do not - affect the other margins. For more information about this option, see - \OptionValueRef{\ThisCommonLabelBase}{titlepage}{firstiscover}% - \IndexOption{titlepage~=\textKValue{firstiscover}} on - \DescPageRef{\ThisCommonLabelBase.option.titlepage}. -\end{Explain} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{uppertitleback}\Parameter{titlebackhead}% - \Macro{lowertitleback}\Parameter{titlebackfoot} -\end{Declaration}% -In\textnote{\KOMAScript{} vs. standard classes} two-sided printing, the -standard classes leave the back (verso) of the title page empty. However, with -{\KOMAScript} the back of the full title page can be used for other -information. There are exactly two elements which the user can freely format: -\PName{titlebackhead}\Index{title>back}\Index{title>verso} and -\PName{titlebackfoot}. The header can extend to the footer and vice versa. -\iffree{Using this guide as an example, the legal disclaimer was set with the - help of the \Macro{uppertitleback} command.}{The publishers information of - this book, for example, could have been set either with - \Macro{uppertitleback} or \Macro{lowertitleback}.}% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{dedication}\Parameter{dedication} -\end{Declaration}% -{\KOMAScript} offers its own dedication page. This -dedication\Index{dedication} is centred and set by default with a slightly -larger font\textnote{font}. -\BeginIndexGroup\BeginIndex{FontElement}{dedication}% -\LabelFontElement{dedication} -The% -\IfThisCommonLabelBase{maincls}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% -}{% - \IfThisCommonLabelBase{scrextend}{% - \ChangedAt{v3.12}{\Package{scrextend}}% - }{\InternalCommonFileUseError}% -}\important{\FontElement{dedication}} exact font setting for the -\FontElement{dedication} element, which is taken from -\autoref{tab:\ThisCommonFirstLabelBase.titlefonts}, -\autopageref{tab:\ThisCommonFirstLabelBase.titlefonts}, can be changed with -the \DescRef{\ThisCommonLabelBase.cmd.setkomafont} and -\DescRef{\ThisCommonLabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\ThisCommonLabelBase.textmarkup}, -\DescPageRef{\ThisCommonLabelBase.cmd.setkomafont}).% -\EndIndexGroup - -\IfThisCommonFirstRun{\iftrue}{% - An example with all title pages provided by \KOMAScript{} is shown in - \autoref{sec:\ThisCommonFirstLabelBase.titlepage} on - \PageRefxmpl{\ThisCommonFirstLabelBase.fulltitle}.% - \csname iffalse\endcsname% -}% - \begin{Example} - \phantomsection\xmpllabel{fulltitle}% - Suppose you have written a book of poetry and want to - dedicate it to your spouse. A solution would look like this: -\begin{lstcode} - \documentclass{scrbook} - \usepackage[english]{babel} - \begin{document} - \extratitle{\textbf{\Huge In Love}} - \title{In Love} - \author{Prince Ironheart} - \date{1412} - \lowertitleback{This poem book was set with% - the help of {\KOMAScript} and {\LaTeX}} - \uppertitleback{Self-mockery Publishers} - \dedication{To my treasured hazel-hen\\ - in eternal love\\ - from your dormouse.} - \maketitle - \end{document} -\end{lstcode} - Please use your own favourite pet names to personalize it. - \end{Example}% -\fi% -\EndIndexGroup -% -\EndIndexGroup -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/common-typearea.tex b/macros/latex/contrib/koma-script/source-doc/english/common-typearea.tex deleted file mode 100644 index 935a24dfe1..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/common-typearea.tex +++ /dev/null @@ -1,91 +0,0 @@ -% ====================================================================== -% common-typearea.tex -% Copyright (c) Markus Kohm, 2001-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-typearea.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Paragraphs that are common for several chapters of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{common-typearea.tex} - [$Date: 2019-10-28 10:05:40 +0100 (Mo, 28. Okt 2019) $ - KOMA-Script guide (common paragraphs: typearea)] -\translator{Markus Kohm\and Krickette Murabayashi\and Karl Hagen} - -% Date of the translated German file: 2019-10-228 - -\section{Page Layout} -\seclabel{typearea} -\BeginIndexGroup -\BeginIndex{}{page>layout} - -Each page of a document consists of different layout elements, such as the -margins, the header, the footer, the text area, the marginal note column, and -the distances between these elements. \KOMAScript{} additionally distinguishes -the entire page, also known as the paper, and the visible page. Without doubt, -the separation of the page into these different parts is one of the basic -features of a class\IfThisCommonLabelBase{scrlttr2}{\OnlyAt{scrlttr2}}{}. -\KOMAScript{} delegates this work to the package -\hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea}. This -package can also be used with other classes. The \KOMAScript{} classes, -however, load \Package{typearea} on their own. Therefore, it's neither -necessary nor sensible to load the package explicitly with \Macro{usepackage} -while using a \KOMAScript{} class. See also -\autoref{sec:\ThisCommonLabelBase.options}, -\autopageref{sec:\ThisCommonLabelBase.options}. - -Some settings of \KOMAScript{} classes affect the page layout and vice versa. -Those effects are documented at the corresponding settings. - -For more information about the choice of paper format, the division of the -page into margins and type area, and the choice between one- and two-column -typesetting, see the documentation for the -\hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea} -package. You can find it in \autoref{cha:typearea}, starting on -\autopageref{cha:typearea}. - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% coding: us-ascii -%%% ispell-local-dictionary: "en_GB" -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/expertpart.tex b/macros/latex/contrib/koma-script/source-doc/english/expertpart.tex deleted file mode 100644 index 7e7458a0ca..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/expertpart.tex +++ /dev/null @@ -1,78 +0,0 @@ -% ====================================================================== -% expertpart.tex -% Copyright (c) Markus Kohm, 2002-2018 -% -% 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. -% ---------------------------------------------------------------------- -% expertpart.tex -% Copyright (c) Markus Kohm, 2002-2018 -% -% 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. -% ====================================================================== -% -% First part: KOMA-Script for Authors -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Erster Teil: KOMA-Script fuer Autoren -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{expertpart.tex} - [$Date: 2018-02-28 13:23:23 +0100 (Mi, 28. Feb 2018) $ - Part KOMA-Script for Experts] -\translator{Markus Kohm\and Karl Hagen} - -\setpartpreamble{% - \vspace*{2\baselineskip}% - \setlength{\parindent}{1em}% - - \noindent In this part, you can find information for the authors of LaTeX - packages and classes. This applies not only to commands that are useful for - implementing new packages and classes, but also to interfaces that allow - further alteration of \KOMAScript{}. Moreover, this part provides - information on obsolete options and instructions, as well as background - information on the implementation of \KOMAScript{}. - - This part is intended to supplement the information for authors of articles, - reports, books and letters in \autoref{part:forAuthors}. More information - and examples for those users can be found in that part. -} - -\part{\KOMAScript{} for Advanced Users and Experts} -\label{part:forExperts} - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% coding: us-ascii -%%% TeX-master: "guide.tex" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/guide-english.tex b/macros/latex/contrib/koma-script/source-doc/english/guide-english.tex deleted file mode 100644 index 5e24e1d8f7..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/guide-english.tex +++ /dev/null @@ -1,541 +0,0 @@ -% ====================================================================== -% guide-english.tex -% Copyright (c) Markus Kohm, 2002-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 -% https://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. -% ---------------------------------------------------------------------- -% guide-english.tex -% Copyright (c) Markus Kohm, 2002-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 -% https://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. -% ====================================================================== -% -% Language dependencies (english) of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Sprachabhaengigkeiten (english) der KOMA-Script-Anleitung -% Verwaltet von Markus Kohm -% -% ====================================================================== -% -\KOMAProvidesFile{guide-english.tex} - [$Date: 2019-12-01 13:41:51 +0100 (So, 01. Dez 2019) $ - KOMA-Script guide language dependencies] -% -% \section{Extra Packages} -% -\RequirePackage[normal]{engord} -% -% \section{Title} -% -% \begin{macro}{\GuideSubject} -% \begin{macro}{\GuideTitle} -% \begin{macro}{\GuideSubTitle} -% \begin{macro}{\GuideAuthorHeadline} -% \begin{macro}{\GuideTranslatorHeadline} -% \begin{macro}{\GuideWarrantyHeadline} -% \begin{macro}{\GuideWarranty} -% \begin{macro}{\GuideCopyright} -% \begin{macro}{\GuideDedication} -% Language dependencies of all the title pages. -% \begin{macrocode} -\newcommand*{\GuideSubject}{The Guide}% -\newcommand*{\GuideTitle}{\KOMAScript}% -\newcommand*{\GuideSubTitle}{a versatile {\LaTeXe} bundle% - % Ugly note - \vfill - \noindent Note: This document is a translation of the German \KOMAScript{} - manual. Several authors have been involved to this translation. Some of them - are native English speakers. Others, like me, are not. Improvements of the - translation by native speakers or experts are welcome at all times!% -}% -\newcommand*{\GuideAuthorHeadline}{Authors of the {\KOMAScript} Bundle}% -\newcommand*{\GuideTranslatorHeadline}{English translation of this manual by: -} \newcommand*{\GuideWarrantyHeadline}{Legal Notes:}% -\newcommand*{\GuideWarranty}{There is no warranty for any part of the - documented software. The authors have taken care in the preparation of this - guide, but make no expressed or implied warranty of any kind and assume no - responsibility for errors or omissions. No liability is assumed for - incidental or consequential damages in connection with or arising out of the - use of the information or programs contained here.\par\medskip% - Many of the designations used by manufacturers and sellers to distinguish - their products are claimed as trademarks. Where those designations appear in - this book, and the authors were aware of a trademark claim, the designations - have been printed with initial capital letters or in all capitals.}% -\newcommand*{\GuideCopyright}{Free screen version without any optimization of - paragraph and page breaks\par\medskip% - This guide is part of {\KOMAScript}, which is free under the terms and - conditions of {\LaTeX} Project Public License Version 1.3c. A version of - this license, which is valid for {\KOMAScript}, is part of {\KOMAScript} (see - \File{lppl.txt}). Distribution of this manual\,---\,even if it is - printed\,---\,is allowed provided that all parts of {\KOMAScript} are - distributed with it. Distribution without the other parts of {\KOMAScript} - requires an explicit, additional authorization by the authors.}% -\newcommand*{\GuideDedication}{To all my friends all over the world!}% -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% -% \section{CTAN Server to be Used} -% -% \begin{macro}{\GuideCTANserver} -% Unused since 2015-09-30. -% \begin{macrocode} -%\newcommand*{\GuideCTANserver}{ftp.ctan.org} -% \end{macrocode} -% \end{macro} -% -% -% \section{Terms} -% -% Some terms, e.g. used at index notes. -% -% \begin{macro}{\GuideClass} -% \begin{macro}{\GuideClassIndexCategory} -% \begin{macro}{\GuideClassIndexCategoryExpanded} -% The term ``class''. -% \begin{macrocode} -\newcommand*{\GuideClass}{class} -\newcommand*{\GuideClassIndexCategory}{classes} -\let\GuideClassIndexCategoryExpanded\GuideClassIndexCategory -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuideCounter} -% \begin{macro}{\GuideCounterIndexCategory} -% \begin{macro}{\GuideCounterIndexCategoryExpanded} -% The term ``counter''. -% \begin{macrocode} -\newcommand*{\GuideCounter}{counter} -\newcommand*{\GuideCounterIndexCategory}{counters} -\let\GuideCounterIndexCategoryExpanded\GuideCounterIndexCategory -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuideEnvironment} -% \begin{macro}{\GuideEnvIndexCategory} -% \begin{macro}{\GuideEnvIndexCategoryExpanded} -% The term ``environment''. -% \begin{macrocode} -\newcommand*{\GuideEnvironment}{environment} -\newcommand*{\GuideEnvIndexCategory}{environments} -\let\GuideEnvIndexCategoryExpanded\GuideEnvIndexCategory -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuideExample} -% The term ``Example'' used at a kind of heading, so it should be upper case. -% \begin{macrocode} -\newcommand*{\GuideExample}{Example} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\GuideFile} -% \begin{macro}{\GuideFileIndexCategory} -% \begin{macro}{\GuideFileIndexCategoryExpanded} -% The term ``file''. -% \begin{macrocode} -\newcommand*{\GuideFile}{file} -\newcommand*{\GuideFileIndexCategory}{files} -\let\GuideFileIndexCategoryExpanded\GuideFileIndexCategory -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuideFloatstyle} -% \begin{macro}{\GuideFloatstyleIndexCategory} -% \begin{macro}{\GuideFloatstyleIndexCategoryExpanded} -% The term ``\Package{float} style''. -% \begin{macrocode} -\newcommand*{\GuideFloatstyle}{\Package{float} style} -\newcommand*{\GuideFloatstyleIndexCategory}{\Package{float} styles} -\newcommand*{\GuideFloatstyleIndexCategoryExpanded}{float styles} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuideFontElement} -% \begin{macro}{\GuideFontElementIndexCategory} -% \begin{macro}{\GuideFontElementIndexCategoryExpanded} -% The term ``element''. -% \begin{macrocode} -\newcommand*{\GuideFontElement}{element} -\newcommand*{\GuideFontElementIndexCategory}{elements} -\let\GuideFontElementIndexCategoryExpanded\GuideFontElementIndexCategory -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuideLength} -% \begin{macro}{\GuideLengthIndexCategory} -% \begin{macro}{\GuideLengthIndexCategoryExpanded} -% The term ``length''. -% \begin{macrocode} -\newcommand*{\GuideLength}{length} -\newcommand*{\GuideLengthIndexCategory}{lengths} -\let\GuideLengthIndexCategoryExpanded\GuideLengthIndexCategory -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuideMacro} -% \begin{macro}{\GuideMacroIndexCategory} -% \begin{macro}{\GuideMacroIndexCategoryExpanded} -% \begin{macro}{\GuideCommand} -% \begin{macro}{\GuideCommandIndexCategory} -% \begin{macro}{\GuideCommandIndexCategoryExpanded} -% The term ``command''. -% \begin{macrocode} -\newcommand*{\GuideMacro}{command} -\let\GuideCommand\GuideMacro -\newcommand*{\GuideMacroIndexCategory}{commands} -\let\GuideCommandIndexCategory\GuideMacroIndexCategory -\let\GuideMacroIndexCategoryExpanded\GuideMacroIndexCategory -\let\GuideCommandIndexCategoryExpanded\GuideCommandIndexCategory -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuideOption} -% \begin{macro}{\GuideOptionIndexCategory} -% \begin{macro}{\GuideOptionIndexCategoryExpanded} -% The term ``option''. -% \begin{macrocode} -\newcommand*{\GuideOption}{option} -\newcommand*{\GuideOptionIndexCategory}{options} -\let\GuideOptionIndexCategoryExpanded\GuideOptionIndexCategory -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuidePackage} -% \begin{macro}{\GuidePackageIndexCategory} -% \begin{macro}{\GuidePackageIndexCategoryExpanded} -% The term ``package''. -% \begin{macrocode} -\newcommand*{\GuidePackage}{package} -\newcommand*{\GuidePackageIndexCategory}{packages} -\let\GuidePackageIndexCategoryExpanded\GuidePackageIndexCategory -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuidePagestyle} -% \begin{macro}{\GuidePagestyleIndexCategory} -% \begin{macro}{\GuidePagestyleIndexCategoryExpanded} -% The term ``page style''. -% \begin{macrocode} -\newcommand*{\GuidePagestyle}{page style} -\newcommand*{\GuidePagestyleIndexCategory}{page styles} -\let\GuidePagestyleIndexCategoryExpanded\GuidePagestyleIndexCategory -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuidePLength} -% \begin{macro}{\GuidePLengthIndexCategory} -% \begin{macro}{\GuidePLengthIndexCategoryExpanded} -% \begin{macro}{\GuidePseudoPrefix} -% The prefix ``pseudo'' at the term ``pseudo length'' and the term itself. -% \begin{macrocode} -\newcommand*{\GuidePseudoPrefix}{pseudo-} -\newcommand*{\GuidePLength}{\GuidePseudoPrefix\GuideLength} -\newcommand*{\GuidePLengthIndexCategory}{\GuidePseudoPrefix\GuideLengthIndexCategory} -\let\GuidePLengthIndexCategoryExpanded\GuidePLengthIndexCategory -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuideVariable} -% \begin{macro}{\GuideVariableIndexCategory} -% \begin{macro}{\GuideVariableIndexCategoryExpanded} -% The term ``variable''. -% \begin{macrocode} -\newcommand*{\GuideVariable}{variable} -\newcommand*{\GuideVariableIndexCategory}{variables} -\let\GuideVariableIndexCategoryExpanded\GuideVariableIndexCategory -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuideHook} -% \begin{macro}{\GuideHookIndexCategory} -% \begin{macro}{\GuideHookIndexCategoryEpanded} -% The term ``hook''. -% \begin{macrocode} -\newcommand*{\GuideHook}{hook} -\newcommand*{\GuideHookIndexCategory}{hooks} -\let\GuideHookIndexCategoryExpanded\GuideHookIndexCategory -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuideAnd} -% The ``and'' at a list of two. -% \begin{macrocode} -\newcommand*{\GuideAnd}{ and } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\GuideListAnd} -% The ``and'' at a list of more than two. -% \begin{macrocode} -\newcommand*{\GuideListAnd}{, and } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\GuideLoadNonFree} -% Note, that the non free manual contains more information. -% \begin{macrocode} -\newcommand*{\GuideLoadNonFree}{% - Currently, additional information on this topic can be found at the same - point in the German \KOMAScript{} book \cite{book:komascript} only. -} -% \end{macrocode} -% \end{macro} -% -% -% \section{Index} -% -% \begin{macro}{\GuidegenIndex} -% \begin{macro}{\GuidecmdIndex} -% \begin{macro}{\GuidecmdIndexShort} -% \begin{macro}{\GuidelenIndex} -% \begin{macro}{\GuidelenIndexShort} -% \begin{macro}{\GuideelmIndex} -% \begin{macro}{\GuideelmIndexShort} -% \begin{macro}{\GuidefilIndex} -% \begin{macro}{\GuidefilIndexShort} -% \begin{macro}{\GuideoptIndex} -% \begin{macro}{\GuideoptIndexShort} -% \begin{macro}{\GuidehokIndex} -% \begin{macro}{\GuidehokIndexShort} -% The titles and short titles of each single index. -\newcommand*{\GuidegenIndex}{General Index}% -\newcommand*{\GuidecmdIndex}{Index of Commands, Environments, and Variables}% -\newcommand*{\GuidecmdIndexShort}{Index of Commands, etc.}% -\newcommand*{\GuidelenIndex}{Index of Lengths and Counters}% -\newcommand*{\GuidelenIndexShort}{Index of Lengths, etc.}% -\newcommand*{\GuideelmIndex}{Index of Elements Capable of - Adjusting Fonts}% -\newcommand*{\GuideelmIndexShort}{Index of Elements}% -\newcommand*{\GuidefilIndex}{Index of Files, Classes, and Packages}% -\newcommand*{\GuidefilIndexShort}{Index of Files, etc.}% -\newcommand*{\GuideoptIndex}{Index of Class and Package Options}% -\newcommand*{\GuideoptIndexShort}{Index of Options}% -\newcommand*{\GuidehokIndex}{Index of Do-Hooks} -\let\GuidehokIndexShort\GuidehokIndex -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\GuideIndexPreamble} -% The preamble text of the whole index. -\newcommand*{\GuideIndexPreamble}{% - There are two kinds of page numbers in this index. The numbers in bold - show the pages where the topic is defined or explained. The numbers in - ordinary type show the pages of where the topic is mentioned.% -} -% \end{macro} -% -% -% \begin{macro}{\GuideIndexSees} -% These are all see index entries. -\newcommand*{\GuideIndexSees}{% -} -% \end{macro} -% -% \begin{macro}{\GuideIndexSeeAlsos} -% These are all see also index entries. -\newcommand*{\GuideIndexSeeAlsos}{% -} -% \end{macro} -% -% \section{Bibliography} -% -% \begin{macro}{\GuideBibPreamble} -% \begin{macrocode} -\newcommand*{\GuideBibPreamble}{% - In the following, you will find many references. All of them are referenced - in the main text. In many cases the reference points to documents or - directories which can be accessed via the Internet. In these cases, the - reference includes a URL instead of a publisher. If the reference points to - a {\LaTeX} package then the URL is written in the form - ``\url{CTAN://}\emph{destination}''. The prefix ``\url{CTAN://}'' means the - \TeX{} archive on a CTAN server or mirror. For example, you can replace the - prefix with \url{https://mirror.ctan.org/}. For {\LaTeX} packages, it is also - important to mention that we have tried to give a version number appropriate - to the text that cites the reference. But for some packages is is very - difficult to find a consistent version number and release date. - Additionally, the given version is not always the current version. If you - want install new packages, be sure that the package is the most up-to-date - version and check first if the package is already available on your system.% -} -% \end{macrocode} -% \end{macro} -% -% -% \section{Change Log} -% -% \begin{macro}{\GuideChangeLogPreamble} -% The preamble of the change log index. -% \begin{macrocode} -\newcommand*{\GuideChangeLogPreamble}{% - In this list of changes, you will find all significant changes to the user - interface of the {\KOMAScript} bundle at the last few versions. The list was - sorted by the names of the classes and packages and their version. The - numbers after the version are the pages where the changes are described. In - the margins of these pages, you will find corresponding version marks.% -} -% \end{macrocode} -% \end{macro} -% -% -% \section{Language Extensions} -% -% Some terms should be part of the captions of the language. -% \begin{macro}{\GuideLanguageExtensions} -% This macro has to be defined, because the class will add it to the language -% at |\begin{document}| and it will also call it. -% \begin{macrocode} -\newcommand*{\GuideLanguageExtensions}{% -% \end{macrocode} -% \begin{macro}{\pageautorefname} -% The term ``page'' that will be put before the reference of a page set by -% |\autopageref|. -% \begin{macrocode} - \def\pageautorefname{page}% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\partautorefname} -% \begin{macro}{\figureautorefname} -% \begin{macro}{\tableautorefname} -% \begin{macro}{\subsectionautorefname} -% \begin{macro}{\subsubsectionautorefname} -% \begin{macro}{\paragraphautorefname} -% \begin{macro}{\subparagraphautorefname} -% I'll call them all ``section''. -% \begin{macrocode} - \def\partautorefname{part}% - \def\figureautorefname{figure}% - \def\tableautorefname{table}% - \def\appendixautorefname{appendix}% - \let\subsectionautorefname=\sectionautorefname - \let\subsubsectionautorefname=\sectionautorefname - \let\paragraphautorefname=\sectionrefname - \let\subparagraphautorefname=\sectionrefname -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \begin{macro}{\changelogname} -% The name of the change log index. -% \begin{macrocode} - \def\changelogname{Change Log}% -% \end{macrocode} -% \end{macro} -% \begin{macro}{\descriptionname} -% \begin{macro}{\contentsname} -% \begin{macrocode] - \def\descriptionname{description}% - \def\contentname{contents}% -% \end{macrocode} -% \end{macro} -% \end{macro} -% \begin{macro}{\lengthname} -% \begin{macrocode} - \def\lengthname{length}% -% \end{macrocode} -% \end{macro} -% \begin{macrocode} -} -% \end{macrocode} -% \end{macro} -% -% -% \section{Hyphenation} -% -% This is not realy a good place to put them~-- but better late than never: -% \begin{macrocode} -\hyphenation{% -} -% \end{macrocode} -% -% -% -\endinput -%%% Local Variables: -%%% mode: doctex -%%% coding: us-ascii -%%% TeX-master: "guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/guide.tex b/macros/latex/contrib/koma-script/source-doc/english/guide.tex deleted file mode 120000 index 4e897d1e39..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/guide.tex +++ /dev/null @@ -1 +0,0 @@ -../guide.tex \ No newline at end of file diff --git a/macros/latex/contrib/koma-script/source-doc/english/htmlsetup b/macros/latex/contrib/koma-script/source-doc/english/htmlsetup deleted file mode 100644 index 7364ac8bce..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/htmlsetup +++ /dev/null @@ -1,65 +0,0 @@ -# ====================================================================== -# htmlsetup -# Copyright (c) Markus Kohm, 2002-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. -# ---------------------------------------------------------------------- -# htmlsetup -# Copyright (c) Markus Kohm, 2002-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. -# ====================================================================== - -$baselink="scrguien.pdf"; -$htmlhead=" - -Index - - - -

Index of the KOMA-Script Guide

-

This is an index of the elements defined at KOMA-Script. This index is related to the KOMA-Script guide. To improve the survey this index has serveral functional sections:

-"; -$htmlend="

- -"; -%titles=( "option" => "Options", - "macro" => "Commands", - "environment" => "Environments", - "length" => "Lengths", - "plength" => "Pseudolengths", - "variable" => "Variables", - "pagestyle" => "Page Styles", - "counter" => "Counter", - "floatstyle" => "Styles for the float Package", - "fontelement" => "Elements (Font May Be Changed)", - "dohook" => "Do-Hooks for Low-Level Manipulation" ); - -# end of file diff --git a/macros/latex/contrib/koma-script/source-doc/english/introduction.tex b/macros/latex/contrib/koma-script/source-doc/english/introduction.tex deleted file mode 100644 index 6fb46de0f4..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/introduction.tex +++ /dev/null @@ -1,352 +0,0 @@ -% ====================================================================== -% introduction.tex -% Copyright (c) Markus Kohm, 2001-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. -% ---------------------------------------------------------------------- -% introduction.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Introduction of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Einleitung der KOMA-Script-Anleitung -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{introduction.tex} - [$Date: 2019-10-21 10:41:13 +0200 (Mo, 21. Okt 2019) $ - KOMA-Script guide introduction] -\translator{Kevin Pfeiffer\and Gernot Hassenpflug\and - Krickette Murabayashi\and Markus Kohm\and Karl Hagen} - -% Date of the translated German file: 2019-10-21 - -\chapter{Introduction} -\labelbase{introduction} - -This chapter contains, among other things, important information about the -structure of the manual and the history of {\KOMAScript}, which begins -years before the first version. You will also find information on how to -install {\KOMAScript} and what to do if you encounter errors. - -\section{Preface}\seclabel{preface} - -{\KOMAScript} is very complex. This is due to the fact that it consists of not -just a single class or a single package but a bundle of many classes and -packages. Although the classes are designed as counterparts to the standard -classes, that does not mean they provide only the commands, environments, and -settings of the standard classes, or that they imitate their appearance. The -capabilities of {\KOMAScript} sometimes far surpass those of the standard -classes. Some of them should be considered extensions to the basic -capabilities of the \LaTeX{} kernel. - -The foregoing means that the documentation of {\KOMAScript} has to be -extensive. In addition, {\KOMAScript} is not normally taught. That means there -are no teachers who know their students and can therefore choose the teaching -materials and adapt them accordingly. It would be easy to write documentation -for a specific audience. The difficulty facing the author, however, is that -the manual must serve all potential audiences. I have tried to create a guide -that is equally suitable for the computer scientist and the fishmonger's -secretary. I have tried, although this is actually an impossible task. The -result is numerous compromises, and I would ask you to take this issue into -account if you have any complaints or suggestions to help improve the current -situation. - -Despite the length of this manual, I would ask you to consult the -documentation first in case you have problems. You should start by referring -to the multi-part index at the end of this document. In addition to this -manual, documentation includes all the text documents that are part of the -bundle. See \File{manifest.tex} for a complete list. - -\section{Structure of the Guide}\seclabel{structure} - -This manual is divided into several parts: There is a section for average -users, one for advanced users and experts, and an appendix with further -information and examples for those who want to understand {\KOMAScript} -thoroughly. - -\autoref{part:forAuthors} is intended for all {\KOMAScript} users. This means -that some information in this section is directed at newcomers to \LaTeX. In -particular, this part contains many examples that are intended to clarify the -explanations. Do not hesitate to try these examples yourself and discover how -{\KOMAScript} works by modifying them. That said, the {\KOMAScript} user guide -is not intended to be a {\LaTeX} primer. Those new to {\LaTeX} should look at -\emph{The Not So Short Introduction to {\LaTeXe}} \cite{lshort} or -\emph{{\LaTeXe} for Authors} \cite{latex:usrguide} or a {\LaTeX} reference -book. You will also find useful information in the many {\LaTeX} FAQs, -including the \emph{{\TeX} Frequently Asked Questions on the Web} -\cite{UK:FAQ}. Although the length of the \emph{{\TeX} Frequently Asked - Questions on the Web} is considerable, you should get at least a rough -overview of it and consult it in case you have problems, as well as this -\iffree{guide}{book}. - -\autoref{part:forExperts} is intended for advanced {\KOMAScript} users, those -who are already familiar with \LaTeX{} or who have been working with -{\KOMAScript} for a while and want to understand more about how {\KOMAScript} -works, how it interacts with other packages, and how to perform more -specialized tasks with it. For this purpose, we return to some aspects of the -class descriptions from \autoref{part:forAuthors} and explain them in more -detail. In addition we document some commands that are particularly intended -for advanced users and experts. This is supplemented by the documentation of -packages that are normally hidden from the user, insofar as they do their work -beneath the surface of the classes and user packages. These packages are -specifically designed to be used by authors of classes and packages. - -The appendix\iffree{, which can only be found in the German book version,}{} -contains information beyond that which is covered in \autoref{part:forAuthors} -and \autoref{part:forExperts}. Advanced users will find background information -on issues of typography to give them a basis for their own decisions. In -addition, the appendix provides examples for aspiring package authors. These -examples are not intended simply to be copied. Rather, they provide -information about planning and implementing projects, as well as some basic -\LaTeX{} commands for package authors. - -The guide's layout should help you read only those parts that are actually of -interest. Each class and package typically has its own chapter. -Cross-references to another chapter are thus usually also references to -another part of the overall package. However, since the three main classes -(\Class{scrbook}, \Class{scrrprt}, and \Class{scrartcl}) largely agree, they -are introduced together in \autoref{cha:maincls}. Differences between the -classes, e.\,g., for something that only affects the class -\Class{scrartcl}\OnlyAt{\Class{scrartcl}}, are clearly highlighted in the -margin, as shown here with \Class{scrartcl}. - -\begin{Explain} - The primary documentation for {\KOMAScript} is in German and has been - translated for your convenience; like most of the {\LaTeX} world, its - commands, environments, options, etc., are in English. In a few cases, the - name of a command may sound a little strange, but even so, we hope and - believe that with the help of this guide, {\KOMAScript} will be usable - and useful to you. -\end{Explain} - -At this point you should know enough to understand the guide. -It might, however, still be worth reading the rest of this chapter. - -\section{History of {\KOMAScript}}\seclabel{history} - -%\begin{Explain} -In the early 1990s, Frank Neukam needed a method to publish an instructor's -lecture notes. At that time {\LaTeX} was {\LaTeX}2.09 and there was no -distinction between classes and packages\,---\,there were only \emph{styles}. -Frank felt that the standard document styles were not good enough for his -work; he wanted additional commands and environments. At the same time he was -interested in typography and, after reading Tschichold's \emph{Ausgew\"ahlte - Aufs\"atze \"uber Fragen der Gestalt des Buches und der Typographie} -(Selected Articles on the Problems of Book Design and Typography) -\cite{JTsch87}, he decided to write his own document style\,---\,and not just -a one-time solution to his lecture notes, but an entire style family, one -specifically designed for European and German typography. Thus {\Script} was -born. - -Markus Kohm, the developer of {\KOMAScript}, came across {\Script} in December -1992 and added an option to use the A5 paper format. At that time neither the -standard style nor {\Script} provided support for A5 paper. Therefore it did -not take long until Markus made the first changes to {\Script}. This and other -changes were then incorporated into {\ScriptII}, released by Frank in December -1993. - -In mid-1994, {\LaTeXe} became available and brought with it many changes. -Users of {\ScriptII} were faced with either limiting their usage to -{\LaTeXe}'s compatibility mode or giving up {\Script} altogether. This -situation led Markus to put together a new {\LaTeXe} package, released on -7~July 1994 as {\KOMAScript}. A few months later, Frank declared {\KOMAScript} -to be the official successor to {\Script}. {\KOMAScript} originally provided -no \emph{letter} class, but this deficiency was soon remedied by Axel -Kielhorn, and the result became part of {\KOMAScript} in December 1994. Axel -also wrote the first true German-language user guide, which was followed by an -English-language guide by Werner Lemberg. - -Since then much time has passed. {\LaTeX} has changed in only minor ways, but -the {\LaTeX} landscape has changed a great deal; many new packages and classes -are now available and {\KOMAScript} itself has grown far beyond what it was in -1994. The initial goal was to provide good {\LaTeX} classes for -German-language authors, but today its primary purpose is to provide -more-flexible alternatives to the standard classes. {\KOMAScript}'s success -has led to e-mail from users all over the world, and this has led to many new -macros\,---\,all needing documentation; hence this ``small guide.'' -%\end{Explain} - - -\section{Special Thanks} -\seclabel{thanks} - -Acknowledgements in the introduction? No, the proper acknowledgements can be -found in the addendum. My comments here are not intended for the authors of -this guide\,---\,and those thanks should rightly come from you, the reader, -anyhow. I, the author of {\KOMAScript}, would like to extend my personal -thanks to Frank Neukam. Without his {\Script} family, {\KOMAScript} would not -have come about. I am indebted to the many persons who have contributed to -{\KOMAScript}, but with their indulgence, I would like to specifically mention -Jens-Uwe Morawski and Torsten Kr\"uger. The English translation of the guide -is, among many other things, due to Jens's untiring commitment. Torsten was -the best beta-tester I ever had. His work has particularly enhanced the -usability of \Class{scrlttr2} and \Class{scrpage2}. Many thanks to all who -encouraged me to go on, to make things better and less error-prone, or to -implement additional features. - -Special thanks go as well to the founders and members of DANTE, -Deutschsprachige Anwendervereinigung {\TeX}~e.V\kern-.18em, (the -German-Language {\TeX} User Group). Without the DANTE server, {\KOMAScript} -could not have been released and distributed. Thanks as well to everybody on -the {\TeX} newsgroups and mailing lists who answer questions and have helped -me provide support for {\KOMAScript}. - -My thanks also go to all those who have always encouraged me to go further and -to implement this or that feature better, with fewer flaws, or simply as an -extension. I would also like to thank the very generous donor who has given me -the most significant amount of money I have ever been paid for the work done -so far on \KOMAScript{}. - -\section{Legal Notes} -\seclabel{legal} - -{\KOMAScript} is released under the {\LaTeX} Project Public License. You will -find it in the file \File{lppl.txt}. An unofficial German-language translation -is also available in \File{lppl-de.txt} and is valid for all German-speaking -countries. - -\iffree{This document and the {\KOMAScript} bundle are provided ``as is'' and - without warranty of any kind.}% -{Please note: the printed version of this guide is not free under the - conditions of the {\LaTeX} Project Public Licence. If you need a free - version of this guide, use the version that is provided as part of the - {\KOMAScript} bundle.} - - -\section{Installation} -\seclabel{installation} - -The three most important \TeX{} distributions, Mac\TeX, MiK\TeX, and -\TeX{}~Live, make {\KOMAScript} available through their package management -software. You should install and update {\KOMAScript} using these tools, if -possible. Manual installation without using the package managers is described -in the file \File{INSTALL.txt}, which is part of every {\KOMAScript} -distribution. You should also read the documentation that comes with the -{\TeX} distribution you are using. - - -\section{Bug Reports and Other Requests} -\seclabel{errors} - -If you think you have found an error in the documentation or a bug in one of -the {\KOMAScript} classes, packages, or another part of {\KOMAScript}, please -do the following: First check on CTAN to see if a newer version of -{\KOMAScript} has been released. If a newer version is available, install this -new version and check if the problem persists. - -If the bug still occurs and your installation is fully up to date, please -provide a short {\LaTeX} file that demonstrates the problem. Such a file is -known as a minimal working example (MWE). You should include only minimal text -and use only the packages and definitions essential to demonstrate the -problem. Avoid using any unusual packages as much as possible. - -By preparing such an example it often becomes clear whether the problem is -truly a {\KOMAScript} bug or caused by something else. To check if another -package or class is actually causing the problem, you can also test your -example with the corresponding standard class instead of a {\KOMAScript} -class. If your problem still occurs, you should address your error report to -the author of the appropriate package than to the author of {\KOMAScript}. -Finally, you should carefully review the instructions for the appropriate -package, classes, and {\KOMAScript} component. A solution to your problem may -already exist, in which case an error report is unnecessary. - -If you think you have found a previously unreported error, or if for some -other reason you need to contact the author of {\KOMAScript}, don't forget the -following: - -\begin{itemize} -\item Does the problem also occur if a standard class is used instead of a - {\KOMAScript} class? In this case, the error is most likely not with - {\KOMAScript}, and it makes more sense to ask your question in a public - forum, a mailing list, or Usenet. -\item Which {\KOMAScript} version do you use? For related information, see the - \File{log} file of the \LaTeX{} run of any document that uses a - {\KOMAScript} class. -\item Which operating system and which \TeX{} distribution do you use? This - information might seem rather superfluous for a system-independent package - like {\KOMAScript} or {\LaTeX}, but time and again they have certainly been - shown to play a role. -\item What exactly is the problem or the error? Describe the problem. It's - better to be too detailed than too short. Often it makes sense to explain - the background. -\item What does a minimal working example look like? You can easily create one - by commenting out content and packages from the document step by step. The - result is a document that only contains the packages and parts necessary to - reproduce the problem. In addition, all loaded images should be replaced by - \Macro{rule} statements of the appropriate size. Before sending your - MWE,remove the commented-out parts, insert the command \Macro{listfiles} in - the preamble, and perform another {\LaTeX} run. At the end of the \File{log} - file, you will see an overview of the packages used. Add the MWE and the log - file to the end of your description of the problem. -\end{itemize} - -Do not send packages, PDF, PS, or DVI files. If the entire issue or bug -description, including the minimal example and the \File{log} file is larger -than a few tens of kilobytes, you're likely doing something wrong. - -If you've followed all these steps, please send your {\KOMAScript} (only) bug -report to \href{mailto:komascript@gmx.info}{komascript@gmx.info}. - -If you want to ask your question in a Usenet group, mailing list, or Internet -forum, you should follow the procedures mentioned above and include a minimal -working example as part of your question, but usually you don't need to -provide the \File{log}-file. Instead, just add the list of packages and -package versions from the \File{log}-file and, if your MWE compiles with -errors, you should quote those messages from the \File{log} file. - -Please note that default settings which are not typographically optimal do not -represent errors. For reasons of compatibility, defaults are preserved -whenever possible in new versions of {\KOMAScript}. Furthermore, typographical -best practices are partly a matter of language and culture, and so the default -settings of {\KOMAScript} are necessarily a compromise. - -\section{Additional Information} -\seclabel{moreinfos} - -Once you become familiar with {\KOMAScript}, you may want examples that show -how to accomplish more difficult tasks. Such examples go beyond the basic -instructional scope of this manual and so are not included. However, you will -find more examples on the website of the {\KOMAScript} Documentation Project -\cite{homepage}. These examples are designed for advanced {\LaTeX} users and -are not particularly suitable for beginners. The main language of the site -is German, but English is also welcome. - -\endinput -%%% Local Variables: -%%% mode: latex -%%% coding: us-ascii -%%% TeX-master: "../guide.tex" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/japanlco.tex b/macros/latex/contrib/koma-script/source-doc/english/japanlco.tex deleted file mode 100644 index fd6b2becad..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/japanlco.tex +++ /dev/null @@ -1,600 +0,0 @@ -% ====================================================================== -% japanlco.tex -% Copyright (c) Gernot Hassenpflug and Markus Kohm, 2001-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. -% ---------------------------------------------------------------------- -% japanlco.tex -% Copyright (c) Gernot Hassenpflug und Markus Kohm, 2001-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. -% ====================================================================== -% -% Chapter about Japanise paper size, envelopes and letters -% Maintained by Gernot Hassenplug (with help from Markus Kohm) -% -% ---------------------------------------------------------------------- -% -% Kapitel ueber japanische Papierformate, Umschlaege und Briefe -% Verwaltet von Gernot Hassenplug (mit Unterstuetzung von Markus Kohm) -% -% ====================================================================== -% -% Special Note: Originally in English by Gernot Hassenpflug as part of -% KOMA-Script bundle. -% - -\KOMAProvidesFile{japanlco.tex} - [$Date: 2019-10-10 09:50:23 +0200 (Do, 10. Okt 2019) $ - KOMA-Script guide (appendix: japanlco)] - -\appendix - -\chapter[{Japanese Letter Support for \Class{scrlttr2}}] -{Japanese Letter Support for \Class{scrlttr2}\footnote{This chapter was - originally written by Gernot Hassenpflug.}} -\labelbase{japanlco} -\Index{letter>Japanese} - -Since version~2.97e, \Class{scrlttr2} has provided support not only for -European ISO~envelope sizes and window envelopes but also for Japanese -envelopes, in the form of \File{lco} files which set the layout of the paper. -This chapter documents this support and provides a few examples of using the -provided \File{lco} files to print letters intended for Japanese envelopes. - -\section{Japanese standard paper and envelope sizes} -\seclabel{PaperEnvelope} - -The Japan Industrial Standard (JIS) defines paper sizes and envelope sizes for -national use, which both overlap with the ISO and US sizes and include some -metricated traditional Japanese sizes. Envelope window size and position have -not been defined internationally as yet; hence, there exists a plethora of -envelopes with differing window sizes and positions. The following subsections -give some background on Japanese paper sizes and envelopes. - -\subsection{Japanese paper sizes} -\seclabel{Paper} - -The JIS defines two main series of paper sizes: -\begin{enumerate} -\item the JIS A-series, which is identical to the ISO A-series but - with slightly different tolerances; and -\item the JIS B-series, which is not identical to the ISO/DIN - B-series. Instead, the JIS B-series paper has an area 1.5 times that - of the corresponding A-series paper, so that the length ratio is - approximately 1.22 times the length of the corresponding A-series - paper. The aspect ratio of the paper is the same as for A-series - paper. -\end{enumerate} - -Both JIS A-series and B-series paper is widely available in Japan and most -photocopiers and printers are loaded with at least A4 and B4 paper. The -ISO/JIS~A-series and the different ISO and JIS~B-series sizes are listed in -\autoref{tab:japanlco.jpapersizes1}. - -%% ISO/JIS standard comparison -\begin{table} -\begin{minipage}{\textwidth}\renewcommand*{\footnoterule}{}% -\centering -\caption[{ISO and JIS standard paper sizes}] -{ISO and JIS standard paper sizes}%; trim sizes are given with width -% preceding height, both in millimeters} -\begin{tabular}{lr@{$\times$}llr@{$\times$}llr@{$\times$}l}\toprule -ISO/JIS\,A & \multicolumn2l{W$\times$H in mm} & ISO\,B & -\multicolumn2l{W$\times$H in mm} & JIS\,B & \multicolumn2l{W$\times$H - in mm} \\ \midrule -A0 & 841 & 1189 & B0 & 1000 & 1414 & B0 & 1030 & 1456 \\ -A1 & 594 & 841 & B1 & 707 & 1000 & B1 & 728 & 1030 \\ -A2 & 420 & 594 & B2 & 500 & 707 & B2 & 515 & 728 \\ -A3 & 297 & 420 & B3 & 353 & 500 & B3 & 364 & 515 \\ -A4 & 210 & 297 & B4 & 250 & 353 & B4 & 257 & 364 \\ -A5 & 148 & 210 & B5 & 176 & 250 & B5 & 182 & 257 \\ -A6 & 105 & 148\footnotemark[1] & B6 & 125 & 176 & B6 & 128 & 182 \\ -A7 & 74 & 105 & B7 & 88 & 125 & B7 & 91 & 128 \\ -A8 & 52 & 74 & B8 & 62 & 88 & B8 & 64 & 91 \\ -A9 & 37 & 52 & B9 & 44 & 62 & B9 & 45 & 64 \\ -A10 & 26 & 37 & B10 & 31 & 44 & B10 & 32 & 45 \\ -A11 & 18 & 26 & & \multicolumn2l{} & B11 & 22 & 32 \\ -A12 & 13 & 18 & & \multicolumn2l{} & B12 & 16 & 22 \\ -\bottomrule -\end{tabular} -\label{tab:japanlco.jpapersizes1} -\footnotetext[1]{Although Japan's official postcard size - appears to be A6, it is actually 100$\times$148\Unit{mm}, 5 millimetres - narrower than A6.} -\end{minipage} -\end{table} - -There are also a number of traditional paper sizes, which are now used -mostly only by printers. The most common of these old series are the -Shiroku-ban and the Kiku paper sizes. The difference of these types compared -to the JIS~B-series are shown in \autoref{tab:japanlco.jpapersizes2}. -Finally, there are some common stationery sizes, listed in -\autoref{tab:japanlco.jpapersizes3}. You may come across these when buying -stationery. - -%% JIS B-series variants -\begin{table} -\centering -\caption[{Japanese B-series variants}] -{Japanese B-series variants}%; trim sizes are given with width -% preceding height, both in millimeters} -\begin{tabular}{lr@{$\times$}lr@{$\times$}lr@{$\times$}l}\toprule -Format & \multicolumn{2}{l}{JIS B-series} & \multicolumn{2}{l}{Shiroku-ban} & -\multicolumn{2}{l}{Kiku} \\ -Size & \multicolumn{2}{l}{W$\times$H in mm} & \multicolumn{2}{l}{W$\times$H in mm} & \multicolumn{2}{l}{W$\times$H in mm} \\ \midrule -4 & 257 & 364 & 264 & 379 & 227 & 306 \\ -5 & 182 & 257 & 189 & 262 & 151 & 227 \\ -6 & 128 & 182 & 189 & 262 & \multicolumn2l{} \\ -7 & 91 & 128 & 127 & 188 & \multicolumn2l{} \\ -\bottomrule -\end{tabular} -\label{tab:japanlco.jpapersizes2} -\end{table} - -%% Japanese contemporary sizes -\begin{table} -\centering -\caption[{Main Japanese contemporary stationery}] -{Main Japanese contemporary stationery}%; trim sizes are given with width -% preceding height, both in millimeters} -\begin{tabular}{lr@{$\times$}ll}\toprule -Name & \multicolumn{2}{l}{W$\times$H in mm} & Usage and Comments \\ \midrule -Kokusai-ban & 216 & 280 & ``international size'' \\ - & \multicolumn2l{} & i.\,e., US letter size \\ -Semi B5 or & 177 & 250 & ``standard size'' \\ -Hyoujun-gata & \multicolumn2l{} & (formerly called ``Hyoujun-gata''),\\ - & \multicolumn2l{} & semi B5 is almost identical to ISO B5 \\ -Oo-gata & 177 & 230 & ``large size'' \\ -Chuu-gata & 162 & 210 & ``medium size'' \\ -Ko-gata & 148 & 210 & ``small size'' \\ -Ippitsu sen & 82 & 185 & ``note paper'' \\ -\bottomrule -\end{tabular} -\label{tab:japanlco.jpapersizes3} -\end{table} - -The ISO~C-series is not a paper size as such but a standard developed for -envelopes and intended for the corresponding A-series paper. It is discussed -in the next subsection. - -%\clearpage -\subsection{Japanese envelope sizes} -\seclabel{envelope} - -ISO (International Organization for Standardization) envelope sizes are the -official international metric envelope sizes; however, Japan uses also JIS and -metricated traditional envelope sizes. Sizes identified as non-standard do not -conform to Universal Postal Union requirements for correspondence envelopes. - -\subsubsection{ISO envelope sizes} -The ISO C-series envelope sizes, and possibly B-series envelope sizes, are -available in Japan. C-series envelopes can hold the corresponding A-series -paper, while B-series envelopes can hold either the corresponding A-series -paper or the corresponding C-series envelope. The ISO envelope sizes commonly -for Japan are listed in \autoref{tab:japanlco.jenvsizes1}, with the -corresponding paper they are intended for, and the folding required. - -%%%%%% JIS Japanese Envelopes - -%% ISO envelope sizes -%{\onelinecaptionsfalse -%\begin{longtable}{lr@{$\times$}ll} -\begin{table} -\begin{minipage}{\textwidth}\renewcommand*{\footnoterule}{} -\caption[{Japanese ISO envelope sizes}] -{Japanese ISO envelope sizes}%; trim sizes are given with width -% preceding height, both in millimeters% -\label{tab:japanlco.jenvsizes1}% -%}\\ -\begin{tabular}{lr@{$\times$}ll} -\toprule -Name & \multicolumn2l{W$\times$H in mm} & Usage and Comments \\ -%\endfirsthead -%\caption[]{Japanese envelope sizes (\emph{continued})}\\ -%\toprule -%Name & \multicolumn2l{W$\times$H in mm} & Usage and Comments \\ -%\midrule -%\endhead -%\midrule -%\multicolumn{4}{r@{}}{\dots}\\ -%\endfoot -%\bottomrule -%\endlastfoot -\midrule -C0 & 917 & 1297 & for flat A0 sheet; \\* - & \multicolumn2l{} & non-standard \\ -C1 & 648 & 917 & for flat A1 sheet; \\* - & \multicolumn2l{} & non-standard \\ -C2 & 458 & 648 & for flat A2 sheet, A1 sheet folded in half; \\* - & \multicolumn2l{} & non-standard \\ -C3 & 324 & 458 & for flat A3 sheet, A2 sheet folded in half; \\* - & \multicolumn2l{} & non-standard \\ -B4 & 250 & 353 & C4 envelope \\ -C4 & 229 & 324 & for flat A4 sheet, A3 sheet folded in half; \\* - & \multicolumn2l{} & very common; non-standard \\ -B5 & 176 & 250 & C5 envelope \\ -C5 & 162 & 229 & for flat A5 sheet, A4 sheet folded in half; \\* - & \multicolumn2l{} & very common; non-standard \\ -B6 & 125 & 176 & C6 envelope; A4 folded in quarters; \\* - & \multicolumn2l{} & very common \\ -C6 & 114 & 162 & for A5 sheet folded in half, \\* - & \multicolumn2l{} & A4 sheet folded in quarters; \\* - & \multicolumn2l{} & very common \\ -C6/C5 & 114 & 229 & A4 sheet folded in thirds; \\* - & \multicolumn2l{} & very common \\ -C7/6 & 81 & 162 & for A5 sheet folded in thirds; uncommon; \\* - & \multicolumn2l{} & non-standard \\ -C7 & 81 & 114 & for A5 sheet folded in quarters; uncommon; \\* - & \multicolumn2l{} & non-standard \\ -C8 & 57 & 81 & \\ -C9 & 40 & 57 & \\ -C10 & 28 & 40 & \\ -DL\footnotemark[1] & 110 & 220 & for A4 sheet folded in thirds, \\* - & \multicolumn2l{} & A5 sheet folded in half lengthwise; \\* - & \multicolumn2l{} & very common \\ -%\end{longtable}}\vspace{-\baselineskip} -\bottomrule -\end{tabular} -%\noindent\begin{minipage}{\textwidth} -%\renewcommand*{\footnoterule}{} -\footnotetext[1]{Although DL is not part of the - ISO C-series, it is a very widely used standard size. DL, probably - at one time the abbreviation of DIN Lang (Deutsche Industrie Norm, - long), is now identified as ``Dimension Lengthwise'' by ISO 269.} -\end{minipage} -\end{table} - -\subsubsection{JIS and traditional envelope sizes} -The JIS classifies envelopes into three categories based on the -general shape of the envelope and where the flap is located: - -\begin{description} -\item[You:] these envelopes are of the `commercial' type, rectangular, - and correspond largely to Western envelope sizes, and also have the - flap on the long dimension (`Open Side') in `commercial' or `square' - style. `You-kei' means Western-style. -\item[Chou:] these are also `commercial' type envelopes, with the same - shape as the corresponding `You' type, but with the flap on the - short dimension (`Open End') in `wallet' style. `Chou-kei' means - long-style. -\item[Kaku:] these envelopes are more square in appearance and are - made for special use, and correspond to `announcement' - envelopes. The flap is on the long side, in the `square' style. They - generally do not fall under the ordinary envelope postage - rates. `Kaku-kei' means square-style. -\end{description} - -The main JIS and traditional envelope sizes, the corresponding paper, and -its required folding are listed in \autoref{tab:japanlco.jenvsizes2}. - -%% JIS and other envelope sizes -%\begin{table} -%\begin{minipage}{\textwidth}\renewcommand*{\footnoterule}{}% -%\centering -{\onelinecaptionsfalse -\begin{longtable}{llr@{$\times$}ll} -\caption[{Japanese envelope sizes 3}] -{Japanese JIS and other envelope sizes\label{tab:japanlco.jenvsizes2}}% -%; trim sizes are given with width preceding height, both in millimeters}% -\\ -%\begin{tabular}{llr@{$\times$}ll} -\toprule -JIS & Name & \multicolumn2l{W$\times$ in mm} & Usage and Comments \\ -\endfirsthead -\caption[]{Japanese JIS and other envelope sizes (\emph{continued})}\\ -\toprule -JIS & Name & \multicolumn2l{W$\times$ in mm} & Usage and Comments \\ -\midrule -\endhead -\midrule -\multicolumn{5}{r@{}}{\dots}\\ -\endfoot -\bottomrule -\endlastfoot -\midrule - & Chou 1 & 142 & 332 & for A4 folded in half lengthwise;\\* - & & \multicolumn2l{} & non-standard \\ -Yes & Chou 2 & 119 & 277 & for B5 folded in half lengthwise;\\* - & & \multicolumn2l{} & non-standard \\ -Yes & Chou 3 & 120 & 235 & for A4 folded in thirds;\\* - & & \multicolumn2l{} & very common \\ - & Chou 31 & 105 & 235 & for A4 folded in thirds \\ - & Chou 30 & 92 & 235 & for A4 folded in fourths\footnotemark[3] \\ - & Chou 40 & 90 & 225 & for A4 folded in fourths\footnotemark[3] \\ -Yes & Chou 4 & 90 & 205 & for JIS B5 folded in fourths\footnotemark[3];\\* - & & \multicolumn2l{} & very common \\ - & Kaku A3 & 320 & 440 & for A3 flat, A2 folded in half\\* - & & \multicolumn2l{} &; non-standard \\ - & Kaku 0 & 287 & 382 & for B4 flat, B3 folded in half;\\* - & & \multicolumn2l{} & non-standard \\ - & Kaku 1 & 270 & 382 & for B4 flat, B3 folded in half;\\* - & & \multicolumn2l{} & non-standard \\ -Yes & Kaku 2 & 240 & 332 & for A4 flat, A3 folded in half;\\* - & & \multicolumn2l{} & non-standard \\ - & Kaku & 229 & 324 & for A4 flat, A3 folded in half;\\* - & Kokusai A4 & \multicolumn2l{} & same size as ISO C4;\\* - & & \multicolumn2l{} & non-standard \\ -Yes & Kaku 3 & 216 & 277 & for B5 flat, B4 folded in half;\\* - & & \multicolumn2l{} & non-standard \\ -Yes & Kaku 4 & 197 & 267 & for B5 flat, B4 folded in half;\\* - & & \multicolumn2l{} & non-standard \\ -Yes & Kaku 5 & 190 & 240 & for A5 flat, A4 folded in half\\* - & & \multicolumn2l{} &; non-standard \\ -Yes & Kaku 6 & 162 & 229 & for A5 flat, A4 folded in half;\\* - & & \multicolumn2l{} & same size as ISO C5;\\* - & & \multicolumn2l{} & non-standard \\ -Yes & Kaku 7 & 142 & 205 & for B6 flat, B5 folded in half;\\* - & & \multicolumn2l{} & non-standard \\ -Yes & Kaku 8 & 119 & 197 & pay envelope (for salaries, wages)\\* - & & \multicolumn2l{} &; common for direct mail \\ -Yes & You 0\footnotemark[1] & 235 & 120 & for A4 folded in thirds;\\* - & or Furusu 10 & \multicolumn2l{} & same size as Chou 3 but with \\* - & & \multicolumn2l{} & `Open Side' style flap \\ - & You 0\footnotemark[1] & 197 & 136 & for kyabine\footnotemark[1] (cabinet) size photos \\* - & & \multicolumn2l{} & (165\Unit{mm}$\times$120\Unit{mm});\\* - & & \multicolumn2l{} & non-standard \\ - & You 1\footnotemark[2] & 176 & 120 & for B5 folded in quarters \\ - & You 1\footnotemark[2] & 173 & 118 & for B5 folded in quarters \\ -Yes & You 2 & 162 & 114 & for A5 folded in half,\\* - & & \multicolumn2l{} & A4 folded in quarters;\\* - & & \multicolumn2l{} & same size as ISO C6 \\ -Yes & You 3 & 148 & 98 & for B6 folded in half \\ -Yes & You 4 & 235 & 105 & for A4 folded in thirds \\ -Yes & You 5 & 217 & 95 & for A4 folded in fourths\footnotemark[3] \\ -Yes & You 6 & 190 & 98 & for B5 folded in thirds \\ -Yes & You 7 & 165 & 92 & for A4 folded in quarters,\\* - & & \multicolumn2l{} & B4 folded in quarters \\ -%\bottomrule -%\end{tabular}% -\end{longtable}}\vskip-\baselineskip -\noindent\begin{minipage}{\textwidth}\renewcommand*{\footnoterule}{}% - \footnotetext[1]{Because two different sizes are called You~0, the - JIS You~0 is normally called Furusu~10; Furusu (`fools') derives - from `foolscap'; Kyabine is a metricated traditional Japanese - size.}% - \footnotetext[2]{Two slightly different sizes are sold as You~1; the - smaller size (173\Unit{mm}$\times$118\Unit{mm}) is the - paper-industry standard size.}% - \footnotetext[3]{Twice in the same direction.}% -\end{minipage} -%\end{table} - - -\subsubsection{Window variants} -There are a large number of window subtypes existing within the -framework explained in the previous subsection. The most common window -sizes and locations are listed in \autoref{tab:japanlco.jwinsizes1}. - -%% my table of windows -\begin{table} -\begin{minipage}{\textwidth}\renewcommand*{\footnoterule}{} -\centering -\caption[{Supported Japanese envelope types, window sizes, and - locations}] {Supported Japanese envelope types, window sizes, and - locations.} -\begin{tabular}{lllll} -\toprule -Envelope type & Window name\footnotemark[1] & - size\footnotemark[2] & - location\footnotemark[3] & \File{lco} file\footnotemark[4] \\ -\midrule -Chou 3 & A & 90$\times$45 & l 23, t 13 & \Option{NipponEL} \\ -Chou 3 & F & 90$\times$55 & l 23, t 13 & \Option{NipponEH} \\ -Chou 3 & Hisago & 90$\times$45 & l 23, t 12 & \Option{NipponEL} \\ -Chou 3 & Mutoh 1 & 90$\times$45 & l 20, t 11 & \Option{NipponEL} \\ -Chou 3 & Mutoh 101 & 90$\times$55 & l 20, t 11 & \Option{NipponEH} \\ -Chou 3 & Mutoh 2 & 80$\times$45 & l 20, t 11 & \Option{NipponEL} \\ -Chou 3 & Mutoh 3 & 90$\times$45 & l 25, t 11 & \Option{NipponLL} \\ -Chou 3 & Mutoh 301 & 90$\times$55 & l 25, t 11 & \Option{NipponLH} \\ -Chou 3 & Mutoh 6 & 100$\times$45 & l 20, t 11 & \Option{NipponEL} \\ -Chou 3 & v.2\footnotemark[5] & 90$\times$45 & l 24, t 12 & \Option{NipponLL} \\ -Chou 40 & A & 90$\times$45 & l 23, t 13 & \Option{NipponEL} \\ -Chou 4 & A & 90$\times$45 & l 23, t 13 & \Option{NipponEL} \\ -Chou 4 & B & 80$\times$45 & l 98, t 28 & \Option{NipponRL} \\ -Chou 4 & C & 80$\times$45 & l 21, t 13 & \Option{NipponEL} \\ -Chou 4 & K & 80$\times$45 & l 22, t 13 & \Option{NipponEL} \\ -Chou 4 & Mutoh 1 & 80$\times$45 & l 40, b 11 & --- \\ -Chou 4 & Mutoh 2 & 80$\times$45 & l 20, t 11 & \Option{NipponEL} \\ -Chou 4 & Mutoh 3 & 90$\times$45 & l 20, t 11 & \Option{NipponEL} \\ -Chou 4 & Mutoh 6 & 100$\times$45 & l 20, t 11 & \Option{NipponEL} \\ -Chou 4 & v.2\footnotemark[5] & 80$\times$45 & l 20, t 12 & \Option{NipponEL} \\ -Chou 4 & v.3\footnotemark[5] & 90$\times$45 & l 20, t 12 & \Option{NipponEL} \\ -Kaku A4 & v.1\footnotemark[6] & 95$\times$45 & l 20, t 24 & \Option{KakuLL} \\ -You 0 & Cruise 6 & 90$\times$45 & l 20, t 12 & \Option{NipponEL} \\ -You 0 & Cruise 601 & 90$\times$55 & l 20, t 12 & \Option{NipponEH} \\ -You 0 & Cruise 7 & 90$\times$45 & l 20, b 12 & \Option{NipponEL} \\ -You 0 & Cruise 8 & 90$\times$45 & l 24, t 12 & \Option{NipponLL} \\ -You 0 & v.2\footnotemark[5] & 90$\times$45 & l 24, t 12 & \Option{NipponEL} \\ -You 0 & v.3\footnotemark[5] & 90$\times$45 & l 23, t 13 & \Option{NipponEL} \\ -You 4 & A & 90$\times$45 & l 23, t 13 & \Option{NipponEL} \\ -\bottomrule -\end{tabular}% -\footnotetext[1]{Names (acting as subtype information) are taken from - the manufacturer catalogue.}% -\footnotetext[2]{Given as width by height in millimetres.}% -\footnotetext[3]{Given as offset from left (l) or right (r), followed by - offset from bottom (b) or top (t).}% -\footnotetext[4]{The \File{lco} file, which provides support (see - \autoref{tab:japanlco.lcolist}).}% -\footnotetext[5]{In the absence of any other information, a numerical - variation number for the subtype name is provided.}% -\footnotetext[6]{Dimensions apply when envelope is held in portrait mode.}% -\label{tab:japanlco.jwinsizes1}% -\end{minipage} -\end{table} - -\section{Provided \File{lco} files} -In \Class{scrlttr2}, support is provided for Japanese envelope and -window sizes through a number of \File{lco} files which customize the -fold marks required for different envelope sizes and subvariants with -different window positions and sizes. - -The \File{lco} files provided together with the envelope types that they -support are listed at \autoref{tab:japanlco.lcolist}. See -\autoref{tab:japanlco.jenvsizes1} for the full list of Japanese envelopes and -the paper they take, and \autoref{tab:japanlco.jwinsizes1} for the common -window sizes and locations. The rightmost column indicates which \File{lco} -file provides the support. - -The tolerances for location is about 2\Unit{mm}, so it is possible to -accommodate all the envelope and window variants of -\autoref{tab:japanlco.jwinsizes1} with just a small number of \File{lco} -files. The difference between Chou/You~3 and Chou/You~4 is determined -by paper size. - -\begin{table} -\begin{minipage}{\textwidth}\renewcommand*{\footnoterule}{} -\centering -\caption{\File{lco} files provided by \Class{scrlttr2} for Japanese window - envelopes} -\begin{tabular}{llll} -\toprule -\File{lco} file & Supported & Window size\footnotemark[1] & Window -location\footnotemark[1] \\ -\midrule -\Option{NipponEL} & Chou/You 3 and 4 & 90$\times$45 & l 22, t 12 \\ -\Option{NipponEH} & Chou/You 3 and 4 & 90$\times$55 & l 22, t 12 \\ -\Option{NipponLL} & Chou/You 3 and 4 & 90$\times$45 & l 25, t 12 \\ -\Option{NipponLH} & Chou/You 3 and 4 & 90$\times$55 & l 25, t 12 \\ -\Option{NipponRL} & Chou/You 3 and 4 & 90$\times$45 & l 98, t 28 \\ -\Option{KakuLL} & Kaku A4 & 90$\times$45 & l 25, t 24 \\ -\bottomrule -\end{tabular}% -\label{tab:japanlco.lcolist}% -\footnotetext[1]{Window size is given in width by height, location as - offset from left (l) or right (r), followed by offset from bottom (b) or top - (t). All Values in millimeters.}% -\end{minipage} -\end{table} - -\section{Examples of Japanese Letter Usage} -Suppose you want to write a letter on A4 size paper and will post it in -a Japanese envelope. If the envelope has no window, then it is enough -to determine whether the envelope dimensions match a European -one\,---\,the standard \File{DIN.lco} style may suffice for many such -cases. - -If you wish to use a windowed envelope, please note that owing to the -large variety, not all existing subvariants are currently -supported. If you notice that the window dimensions and positions -of your particular windowed envelope differ significantly (more than -approximately 2\Unit{mm}) from those of any of the supported subvariants, -please contact the author of {\KOMAScript} to obtain support as soon as -possible, and in the meantime, create a customized \File{lco} file for your -own use, using one of the existing ones as a template and reading the -{\KOMAScript} documentation attentively. - -If your window envelope subvariant is supported, this is how you would -go about using it: simply select the required \File{lco} file and -activate the horizontal and vertical fold marks as required. Another, -independent, mark is the hole-punch mark, which divides a sheet in two -horizontally for easy punching and filing. - -\subsection{Example 1:} -Your favourite envelope happens to be a You~3 with window subvariant -Mutoh~3, left over from when the company had its previous name, and -you do not wish them to go to waste. Thus, you write your letter with -the following starting code placed before the letter environment: - -\begin{lstlisting} -\LoadLetterOption{NipponLL}\setkomavar{myref}{NipponLL} -\begin{letter}{Martina Muster\\Address} -... -\end{letter} -\end{lstlisting} - -\subsection{Example 2:} -You originally designed your letter for a You~3 envelope, but suddenly -you get handed a used electrical company envelope with cute manga -characters on it which you simply cannot pass up. Surprisingly, you -find it conforms fairly closely to the Chou~4 size and C window -subvariant, such that you realize you can alter the following in your -document preamble: - -\begin{lstlisting} -\LoadLetterOption{NipponEL}\setkomavar{myref}{NipponEL} -\begin{letter}{Martina Muster\\Address} -... -\end{letter} -\end{lstlisting} - -Now, \Class{scrlttr2} automatically reformats the letter for you to -fit the required envelope. - -% \LoadLetterOption{NipponEL}\setkomavar{myref}{NipponEL} -% \begin{letter}{Martina Muster\\at and\\there\\and one\\more} -% \opening{Dear Martina,} -% \lipsum[1-2] -% \closing{Regards} -% \ps{PS: Forgotten to say.} -% \encl{Something} -% \cc{Somebody\\Someone} -% \end{letter} - -% \LoadLetterOption{NipponEH}\setkomavar{myref}{NipponEH} -% \begin{letter}{Martina Muster\\at and\\there\\and one\\more} -% \opening{Dear Martina,} -% \lipsum[1-2] -% \closing{Regards} -% \end{letter} - -% \LoadLetterOption{NipponLL}\setkomavar{myref}{NipponLL} -% \begin{letter}{Martina Muster\\at and\\there\\and one\\more} -% \opening{Dear Martina,} -% \lipsum[1-2] -% \closing{Regards} -% \end{letter} - -% \LoadLetterOption{NipponLH}\setkomavar{myref}{NipponLH} -% \begin{letter}{Martina Muster\\at and\\there\\and one\\more} -% \opening{Dear Martina,} -% \lipsum[1-2] -% \closing{Regards} -% \end{letter} - -%% comparison of US common paper sizes, wider and shorter -% Millimetres Inches Points -% Height Width Height Width Height Width -% Letter 279.4 215.9 11.00 8.50 792 612 -% Legal 355.6 215.9 14.00 8.50 1008 612 -% Ledger 431.8 279.4 17.00 11.00 1224 792 -% Tabloid 279.4 431.8 11.00 17.00 792 1224 -% Executive 266.7 184.1 10.55 7.25 756 522 - -%% English foolscap is here for reference -% Millimetres Inches Points -% Height Width Height Width Height Width -%Foolscap 419 336 16.50 13.25 1188 954 -% - -%% nice reference on envelope types and windows in the US -%http://www.belightsoft.com/products/companion/paper/envelopes.php - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: t -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/linkalias.tex b/macros/latex/contrib/koma-script/source-doc/english/linkalias.tex deleted file mode 120000 index dd3b49476e..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/linkalias.tex +++ /dev/null @@ -1 +0,0 @@ -../linkalias.tex \ No newline at end of file diff --git a/macros/latex/contrib/koma-script/source-doc/english/preface.tex b/macros/latex/contrib/koma-script/source-doc/english/preface.tex deleted file mode 100644 index 00eaba8cd2..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/preface.tex +++ /dev/null @@ -1,126 +0,0 @@ -% ====================================================================== -% preface.tex -% Copyright (c) Markus Kohm, 2008-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. -% ---------------------------------------------------------------------- -% preface.tex -% Copyright (c) Markus Kohm, 2008-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. -% ====================================================================== - -\KOMAProvidesFile{preface.tex} - [$Date: 2019-12-19 10:20:31 +0100 (Do, 19. Dez 2019) $ - Preface to version 3.25] -\translator{Markus Kohm\and Karl Hagen\and DeepL} - -% Date of the translated German file: 2019-12-19 - -\addchap{Preface to \KOMAScript~3.28} - -The \KOMAScript~3.28 manual,\,---\,not only the German version\,---\,once -again benefits from the fact that a new edition of the print version -\cite{book:komascript} and the eBook version \cite{ebook:komascript} will be -published at almost the same time as this version. This has led to many -improvements which also affect the free manual, in both the German and the -English version. - -In \KOMAScript~3.28 there are also some significant changes. In some cases, -compatibility with earlier versions has been waived. Thus a recommendation -from the ranks of \emph{The LaTeX Project Team} regarding \Macro{if\dots} -statements is complied with. If you use such statements, you should refer to -the manual again. - -It is not just about the manual that I now receive little criticism. I -conclude from this fact that \KOMAScript{} has reached the level that it -fulfils all desires. At the same time, the project has\,---\,not only starting -with the current release\,---\,reached a scale that makes it almost impossible -for a single person to accomplish -\begin{itemize} -\item the search for and elimination of errors, -\item the development and implementation of new functions, -\item the observation of changes in other packages and the \LaTeX{} kernel - with regard to effects on \KOMAScript, -\item the rapid response to such changes, -\item the maintenance of the guides in two languages, -\item help for beginners far beyond the functions of \KOMAScript{} down to the - basic operation of a computer, -\item assistance in the implementation of tricky solutions for advanced users - and experts, -\item moderation and participation in the maintenance of a forum for all kind - of help around \KOMAScript. -\end{itemize} -While I am personally have most fun with the development of new functions, I -consider troubleshooting in existing features, compatibility with new \LaTeX{} -kernel versions, and above all instructing users for the most important -tasks. Therefore I will focus in the future on and new functions will be -available only in exceptional cases. Therefore already in \KOMAScript~3.28 -some experimental functions and packages have been removed. In future releases -this should be continued. - -This, of course, also reduces the effort for the documentation of new -functions. Readers of this free, screen version, however, still have to live -with some restrictions. So some information\,---\,mainly intended for advanced -users or capable of turning an ordinary user into an advanced one\,---\,is -reserved for the printed book, which currently exists only in German. As a -result, some links in this manual lead to a page that simply mentions this -fact. In addition, the free version is scarcely suitable for making a -hard-copy. The focus, instead, is on using it on screen, in parallel with the -document you are working on. It still has no optimized wrapping but is almost -a first draft, in which both the paragraph and page breaks are in some cases -quite poor. Corresponding optimizations are reserved for the German book -editions. - -Another important improvement to the English guide has been accomplished by -Karl Hagen, who has continued the translation of the entire manual. Many, many -thanks to him! Everything that is fine in this English manual is because of -him. Everything that is not good in this manual\,---\,like the translation of -this preface\,---\,is because of me. Additional editors or translators, -however, would still be welcome! - -But the biggest thanks go to my family and above all to my wife. They absorb -all my unpleasant experiences on the Internet. They have also tolerated it for -more than 25~years, when I am again not approachable, because I am completely -lost in \KOMAScript{} or some \LaTeX{} problems. The fact that I can afford to -invest an incredible amount of time in such a project is entirely thanks to my -wife. - -\bigskip\noindent -Markus Kohm, Neckarhausen in the foggy December of 2019. - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% ispell-local-dictionary: "english" -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: - diff --git a/macros/latex/contrib/koma-script/source-doc/english/scraddr.tex b/macros/latex/contrib/koma-script/source-doc/english/scraddr.tex deleted file mode 100644 index 4404230796..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scraddr.tex +++ /dev/null @@ -1,261 +0,0 @@ -% ====================================================================== -% scraddr.tex -% Copyright (c) Markus Kohm, 2001-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. -% ---------------------------------------------------------------------- -% scraddr.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Chapter about scraddr of the KOMA-Script guide -% Maintained by Jens-Uwe Morawski (with help from Markus Kohm) -% -% ---------------------------------------------------------------------- -% -% Kapitel ueber scraddr in der KOMA-Script-Anleitung -% Verwaltet von Jens-Uwe Morawski (mit Unterstuetzung von Markus Kohm) -% -% ====================================================================== - -\KOMAProvidesFile{scraddr.tex} - [$Date: 2019-10-30 09:32:39 +0100 (Mi, 30. Okt 2019) $ - KOMA-Script guide (chapter: scraddr)] -\translator{Jens-Uwe Morawski\and Gernot Hassenpflug\and Markus Kohm\and Karl - Hagen} - -% Date of the translated German file: 2019-10-30 - -\chapter{Accessing Address Files with \Package{scraddr}}% -\labelbase{scraddr}% -\BeginIndexGroup -\BeginIndex{Package}{scraddr} - -The \Package{scraddr} package is a small extension to \KOMAScript{}'s letter -class and letter package. Its goal is to make access to the data in address -files easier and more flexible. - -\section{Overview}\seclabel{overview} -Basically, the package provides a new loading mechanism for address files -consisting of \DescRef{\LabelBase.cmd.adrentry} and the newer -\DescRef{\LabelBase.cmd.addrentry} format entries, as described in -\autoref{cha:scrlttr2} starting on \DescPageRef{scrlttr2.cmd.adrentry}. - -\begin{Declaration} -\Macro{InputAddressFile}\Parameter{file name} -\end{Declaration}% -The \Macro{InputAddressFile} command is the main command of \Package{scraddr}. -It reads the content of the address file\Index{address>file} given as its -parameter. If the file is not found, an error message is issued. - -For each entry in this address file, the command generates a set of -macros to access the data. For large address files, this will require -a lot of \TeX{} memory. -% -\EndIndexGroup - -\begin{Declaration}% - \Macro{adrentry}\Parameter{Lastname}\Parameter{Firstname}% - \Parameter{Address}\Parameter{Phone}\Parameter{F1}\Parameter{F2}% - \Parameter{Comment}\Parameter{Key}% - % - \Macro{addrentry}\Parameter{Lastname}\Parameter{Firstname}% - \Parameter{Address}\Parameter{Phone}\Parameter{F1}\Parameter{F2}% - \Parameter{F3}\Parameter{F4}\Parameter{Key}% - % - \Macro{adrchar}\Parameter{initial}% - \Macro{addrchar}\Parameter{initial}% -\end{Declaration}% -The structure of the address entries in the address file was discussed in -detail in \autoref{sec:scrlttr2.addressFile}, starting on -\DescPageRef{scrlttr2.cmd.adrentry}. The subdivision of the address file with -the help of \Macro{adrchar} or \Macro{addrchar}, also discussed there, has no -meaning for \Package{scraddr} and is simply ignored by the package.% -\EndIndexGroup - -\begin{Declaration} - \Macro{Name}\Parameter{key}% - \Macro{FirstName}\Parameter{key}% - \Macro{LastName}\Parameter{key}% - \Macro{Address}\Parameter{key}% - \Macro{Telephone}\Parameter{key}% - \Macro{FreeI}\Parameter{key}% - \Macro{FreeII}\Parameter{key}% - \Macro{Comment}\Parameter{key}% - \Macro{FreeIII}\Parameter{key}% - \Macro{FreeIV}\Parameter{key} -\end{Declaration}% -These commands give access to data of your address file. The last parameter, -that is, parameter 8 for the \DescRef{\LabelBase.cmd.adrentry} entry and -parameter 9 for the \DescRef{\LabelBase.cmd.addrentry} entry, is the -identifier of an entry, thus the \PName{key} has to be unique and non-empty. -To guarantee safe functioning, you should use only ASCII letters in the -\PName{key}. - -Furthermore, if the file contains more than one entry with the same -\PName{key} name, the last occurrence will be used.% -% -\EndIndexGroup - - -\section{Usage}\seclabel{usage} -\BeginIndexGroup -\BeginIndex[indexother]{Cmd}{addrentry}% -\BeginIndex[indexother]{Cmd}{adrentry}% -To use the package, we need a valid address file. For example, the file -\File{lotr.adr} contains the following entries: -\begin{lstcode} - \addrentry{Baggins}{Frodo}% - {The Hill\\ Bag End/Hobbiton in the Shire}{}% - {Bilbo Baggins}{pipe-weed}% - {the Ring-bearer}{Bilbo's heir}{FRODO} - \adrentry{Gamgee}{Samwise}% - {3 Bagshot Row\\Hobbiton in the Shire}{}% - {Rosie Cotton}{taters}% - {the Ring-bearer's faithful servant}{SAM} - \adrentry{Bombadil}{Tom}% - {The Old Forest}{}% - {Goldberry}{trill queer songs}% - {The Master of Wood, Water and Hill}{TOM} -\end{lstcode} - -The fourth parameter, the telephone number, has been left blank, since there -are no phones in Middle Earth. And as you can see, blank fields are possible. -On the other hand, you cannot simply omit an argument altogether. - -\BeginIndexGroup -\BeginIndex[indexother]{Cmd}{InputAddressFile} -With the \Macro{InputAddressFile} command described above, we read the address -file into our letter document: -\begin{lstcode} - \InputAddressFile{lotr} -\end{lstcode} -\EndIndexGroup - -\BeginIndexGroup -\BeginIndex[indexother]{Cmd}{Name}% -\BeginIndex[indexother]{Cmd}{Address}% -\BeginIndex[indexother]{Cmd}{FirstName}% -\BeginIndex[indexother]{Cmd}{LastName}% -\BeginIndex[indexother]{Cmd}{FreeI}% -\BeginIndex[indexother]{Cmd}{FreeII}% -\BeginIndex[indexother]{Cmd}{FreeIII}% -\BeginIndex[indexother]{Cmd}{FreeIV}% -\BeginIndex[indexother]{Cmd}{Comment}% -With the help of the commands introduced in this chapter we can now write a -letter to old \textsc{Tom Bombadil}, in which we ask him if he can remember -two companions from olden times. -\begin{lstcode} - \begin{letter}{\Name{TOM}\\\Address{TOM}} - \opening{Dear \FirstName{TOM} \LastName{TOM},} - - Or \FreeIII{TOM}, as your beloved \FreeI{TOM} calls you. Do - you still remember Mr \LastName{FRODO}, or more precisely - \Name{FRODO}, since there was also Mr \FreeI{FRODO}. He was - \Comment{FRODO} in the Third Age and \FreeIV{FRODO}. \Name{SAM}, - \Comment{SAM}, accompanied him. - - Their passions were very worldly. \FirstName{FRODO} enjoyed - smoking \FreeII{FRODO}. His companion appreciated a good meal - with \FreeII{SAM}. - - Do you remember? Certainly Mithrandir has told you much - about their deeds and adventures. - \closing{``O spring-time and summer-time - and spring again after!\\ - O wind on the waterfall, - and the leaves' laughter!''} - \end{letter} -\end{lstcode} -You can also produce the combination of \Macro{FirstName}\Parameter{key} and -\Macro{LastName}\Parameter{key} used in the \DescRef{scrlttr2.cmd.opening} of -this letter with \Macro{Name}\PParameter{key}. - -You can use the fifth and sixth parameters of the -\DescRef{\LabelBase.cmd.adrentry} or \DescRef{\LabelBase.cmd.adrentry} for any -purpose you wish. You can access them with the \Macro{FreeI} and -\Macro{FreeII} commands. In this example, the fifth parameter contains the -name of the most important person in the life of the person in the entry. The -sixth contains the person's favourite thing. The seventh parameter is a -comment or in general also a free parameter. You can access it with the -\Macro{Comment} or \Macro{FreeIII} commands. \Macro{FreeIV} is only valid for -\DescRef{\LabelBase.cmd.addrentry} entries. For -\DescRef{\LabelBase.cmd.adrentry} entries, it results in an error. You can -find more details in the next section. -% -\EndIndexGroup -\EndIndexGroup - - -\section{Package Warning Options} - -As mentioned above, you cannot use the \Macro{FreeIV} command with -\DescRef{\LabelBase.cmd.adrentry} entries. However, you can configure how -\Package{scraddr} reacts in such a situation by package options. -Note\textnote{Attention!} that this package does not support the extended -options interface with \DescRef{maincls.cmd.KOMAoptions} and -\DescRef{maincls.cmd.KOMAoption}. You should therefore specify the options -either as global options in \DescRef{maincls.cmd.documentclass} or as local -options in \DescRef{maincls.cmd.usepackage} - - -\begin{Declaration} - \Option{adrFreeIVempty}% - \Option{adrFreeIVshow}% - \Option{adrFreeIVwarn}% - \Option{adrFreeIVstop}% -\end{Declaration}% -These four options let you choose from four different reactions, ranging -from \emph{ignore} to \emph{abort}, if \Macro{FreeIV} is used -within an \DescRef{\LabelBase.cmd.adrentry} entry. - -\begin{labeling}[~--]{\Option{adrFreeIVempty}} -\item[\Option{adrFreeIVempty}] - the command \Macro{FreeIV} will be ignored -\item[\Option{adrFreeIVshow}] - the warning ``(entry FreeIV undefined at \PName{key})'' will be - written in the text -\item[\Option{adrFreeIVwarn}] - a warning is written in the logfile -\item[\Option{adrFreeIVstop}] - the \LaTeX{} run will abort with an error message -\end{labeling} -The default setting is \Option{adrFreeIVshow}.% -\EndIndexGroup -% -\EndIndexGroup - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrbase.tex b/macros/latex/contrib/koma-script/source-doc/english/scrbase.tex deleted file mode 100644 index 72742d9792..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrbase.tex +++ /dev/null @@ -1,1928 +0,0 @@ -% ====================================================================== -% scrbase.tex -% Copyright (c) Markus Kohm, 2002-2022 -% -% 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. -% ====================================================================== -% -% Package scrbase for Package and Class Authors -% Maintained by Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{scrbase.tex} - [$Date: 2022-02-02 12:07:57 +0100 (Mi, 02. Feb 2022) $ - KOMA-Script package scrbase] -\translator{Markus Kohm\and Melvin Hendrix\and Karl Hagen} - -% Date of the translated German file: 2022-02-02 - -\chapter{Basic Functions in the \Package{scrbase} Package} -\labelbase{scrbase} -\BeginIndexGroup -\BeginIndex{Package}{scrbase}% - -The \Package{scrbase} package provides basic features intended for use by -authors of packages and classes. Its use is not limited merely to wrapper -classes which in turn load a \KOMAScript{} class. Authors of classes that -otherwise have nothing to do with \KOMAScript{} can also benefit from the -functionality of \Package{scrbase}. - -\section{Loading the Package} -\seclabel{loadit} - -Whereas users load packages with \Macro{usepackage}, authors of packages or -classes should use \Macro{RequirePackage}\IndexCmd{RequirePackage}. Authors of -wrapper packages can also use \Macro{RequirePackageWithOptions}. The -\Macro{RequirePackage} command has the same optional argument for package -options as \Macro{usepackage}. In contrast, \Macro{RequirePackageWithOptions} -does not have an optional argument but passes to this package all the options -that were previously given when loading the wrapper package or class. See -\cite{latex:clsguide} for more information about these commands. - -The \Package{scrbase} package needs the functionality of the -\Package{keyval}\IndexPackage{keyval} package internally. This can also be -provided by the \Package{xkeyval} package. If needed, \Package{scrbase} itself -loads \Package{keyval}. - -The \Package{keyval} package lets you define keys and assign values to them. -The options provided by \Package{scrbase} also use \Package{keyval} syntax: -\PName{key}\texttt{=}\PName{value}. - - -\section{Keys as Attributes of Families and Their Members} -\seclabel{keyvalue} - -As already mentioned in \autoref{sec:scrbase.loadit}, \Package{scrbase} uses -the \Package{keyval} package to set keys and their values. However, -\Package{scrbase} extends this functionality. Whereas with \Package{keyval} a -key belongs to only one family, \Package{scrbase} also recognizes family -members. A key can therefore belong to both a family and one or more family -members. Additionally, you can assign a value to the key of a family member, -to the key of a family, or to the keys of all family members. - -\begin{Declaration} - \Macro{DefineFamily}\Parameter{family}% - \Macro{DefineFamilyMember}\OParameter{member}\Parameter{family}% -\end{Declaration} -\Package{scrbase} needs to know the members of a family for various reasons. -Therefore, you must first define a new family using \Macro{DefineFamily}, -which produces an empty member list. If the family has already been defined, -nothing happens. Therefore an existing member list will not be overwritten. - -Next, you can add a new member to the family using \Macro{DefineFamilyMember}. -If the family does not exist, this will result in an error message. If the -member already exists, nothing happens. If the optional \PName{member} is -omitted, the default value -``\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}'' is used. While -the class or package is being loaded, \Macro{@currname} and \Macro{@currext} -together represent the file name of the class or package. - -Theoretically, it is possible, to define a member without a name using an -empty optional \PName{member} argument. But this is the same as the family -itself. You should use only letters and digits for the \PName{family} name, -and the first character of \PName{member} should be something else, preferably -a point. Otherwise, it could happen that the members of one family will clash -with the members of other families. - -\Package{scrbase} assigns the family ``\PValue{KOMA}'' to itself and adds the -member ``\PValue{.scrbase.sty}''. The values ``\PValue{KOMA}'' and -``\PValue{KOMAarg}'' are reserved for \KOMAScript{}. If you are creating a -bundle of packages, you should use the name of the bundle as \PName{family} -and the name of each package as \PName{member} of that \PName{family}. -% -\begin{Example} - Suppose you are writing a bundle called ``master butcher''. Within that - bundle, you have the packages \File{salami.sty}, \File{mettwurst.sty}, - and \File{kielbasa.sty}. Therefore, you decide to use family name - ``\PValue{butcher}'' and you add the lines -\begin{lstcode} - \DefineFamily{butcher} - \DefineFamilyMember{butcher} -\end{lstcode} - to each of the package files. When loading the three packages, this will - add the members ``\PValue{.salami.sty}'', ``\PValue{.mettwurst.sty}'', - and ``\PValue{.kielbasa.sty}'' to the family ``\PValue{butcher}''. After - loading all three packages, all three members will be defined. -\end{Example} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{DefineFamilyKey}\OParameter{member}\Parameter{family}% - \Parameter{key}% - \OParameter{default}\Parameter{action}% - \Macro{FamilyKeyState}% - \Macro{FamilyKeyStateUnknown}% - \Macro{FamilyKeyStateProcessed}% - \Macro{FamilyKeyStateUnknownValue}% - \Macro{FamilyKeyStateNeedValue} -\end{Declaration} -The \Macro{DefineFamilyKey} command defines a \PName{key}. If you specify a -\PName{member}, the \PName{key} becomes an attribute of that member in the -given \PName{family}. If you do not specify a \PName{member}, the member -``\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}'' is assumed. If you -later assign a value to the \PName{key}, the \PName{action} will be -executed and the value made an argument of \PName{action}. Within -\PName{action}, ``\lstinline{#1}'' stands for that value. If you omit the value, -the \PName{default} is used instead. If you do not specify a \PName{default}, -the \PName{key} then always requires you to pass an explicit value. - -%\begin{Explain} - \phantomsection\label{explain:scrbase.macro.DefineFamilyKey}% - Ultimately, -\begin{lstcode}[escapeinside=`'] - \DefineFamilyKey[`\PName{member}']{`\PName{family}'}{`\PName{key}'} - [`\PName{default}']{`\PName{action}'} -\end{lstcode} - results in a call to -\begin{lstcode}[moretexcs={define@key},escapeinside=`'] - \define@key{`\PName{family\,member}'}{`\PName{key}'} - [`\PName{default}']{`\PName{extended action}'} -\end{lstcode} - where \Macro{define@key} is provided by the - \Package{keyval}\IndexPackage{keyval} package (see \cite{package:keyval}). - However, there are some additional precautions taken with the call to - \Macro{define@key}, and the \PName{action} will be extended to include these - precautions. -%\end{Explain} - -Success\ChangedAt{v3.12}{\Package{scrbase}} or failure in executing the -\PName{action} should be reported back to \Package{scrbase} through -\Macro{FamilyKeyState} so that the package itself can take further action as -needed. This could be, for example, an error message or merely warning of an -unknown option. You should not report errors directly! - -The default state of \PName{action} before execution is -\Macro{FamilyKeyStateUnknown}. This indicates that it is not known whether or -not the key could be processed successfully. If this state remains unchanged -after the \PName{action} has been executed, \Package{scrbase} writes a -message to the \File{log} file and assumes the that state is -\Macro{FamilyKeyStateProcessed}. - -The \Macro{FamilyKeyStateProcessed} state indicates that the key and the value -assigned to it have been successfully processed and everything is OK. You can -switch to this state by calling \Macro{FamilyKeyStateProcessed} itself. - -The \Macro{FamilyKeyStateUnknownValue} state indicates that the key has been -processed but that the value passed to it was either unknown or not allowed. -For example, \hyperref[cha:typearea]{\Package{typearea}} reports this -condition if you try to set the \DescRef{typearea.option.twoside} option to -\PValue{unknown}. You can set this state by simply calling -\Macro{FamilyKeyStateUnknownValue}. - -The \Macro{FamilyKeyStateNeedValue} state indicates that the key could not be -processed because it expects a value, but it was called without such a value. -This state is set automatically if you use a key that does not have a -\PName{default} value without assigning a value. Theoretically, you could -set this state explicitly with \Macro{FamilyKeyStateNeedValue}, but you should -not need to set it yourself. - -In addition, you can define additional error conditions by redefining -\Macro{FamilyKeyState} with a short text message. Generally, however, the four -predefined states should be sufficient. - -\begin{Example} - Suppose each of the three packages from the previous example should have a - key named \PValue{coldcuts}. When used, a switch should be set in each of - the packages. For the \Package{salami} package, for example, this could look - like this: -\begin{lstcode} - \newif\if@salami@coldcuts - \DefineFamilyKey{butcher}% - {coldcuts}[true]{% - \expandafter\let\expandafter\if@salami@coldcuts - \csname if#1\endcsname - \FamilyKeyStateProcessed - } -\end{lstcode} - When called, the value will therefore be either \PValue{true} or - \PValue{false}. This example does not test for illegal values. Instead, - it is always reported that the key was processed completely and correctly. - If the key is used later, one of the permitted values, or no value, must be - used. In the second case, the default \PName{true} value will be used. - - The definitions for the other packages are nearly identical. Only the string - ``\texttt{salami}'' has to be replaced. -\end{Example} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{RelaxFamilyKey}\OParameter{member}\Parameter{family}% - \Parameter{key} -\end{Declaration} -If\ChangedAt{v3.15}{\Package{scrbase}} a \PName{key} has been previously -defined as a \PName{member} of a \PName{family}, that definition will be -cancelled. Afterwards the \PName{key} will no longer be defined for this -\PName{member} of the \PName{family}. You can use \Macro{RelaxFamilyKey} for a -\PName{key} that is not defined for this \PName{member} of the \PName{family}. - -If you do not specify a \PName{member}, then the member -``\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}'' is assumed, just as -with \DescRef{\LabelBase.cmd.DefineFamilyKey}. However, \Macro{RelaxFamilyKey} -is only rarely used while loading a package rather than at runtime. Therefore -the \PName{member} should usually be specified explicitly as well.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{FamilyProcessOptions}\OParameter{member}\Parameter{family} -\end{Declaration} -In essence, extending keys from families to both families and family members -means that either keys or key-value pairs can be used as normal class or -package options. The \Macro{FamilyProcessOptions} command is an extension of -\Macro{ProcessOption*} from the \LaTeX{} kernel (see \cite{latex:clsguide}, -which processes not only options declared with \Macro{DeclareOption}, but also -all keys of the given member. If you omit the optional argument -\PName{member}, the member -``\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}'' is used. - -One feature worth noting is that keys which are attached not to a family -member but to a family have an empty family member. Such keys are set before -the keys of the members. -\begin{Example} - If, in the packages from the previous example, you add the line -\begin{lstcode} - \FamilyProcessOptions{butcher} -\end{lstcode} - after you define the key, you can specify the \Option{coldcuts} option when - loading the package. If you specify the option globally in - \Macro{documentclass}, the option will be passed automatically to all three - packages if they are loaded later. -\end{Example} -Note\textnote{Attention!} that packages always process global options -before local options. While unknown global options result in an entry in the -\File{log} file and the option being otherwise ignored, unknown local -options result in an error message. - -You can think of \Macro{FamilyProcessOptions} as an extension of either -\Macro{ProcessOption*} or the \PName{key=value} mechanism -of \Package{keyval}. Ultimately, with the help of -\Macro{FamilyProcessOptions}, \PName{key=value} pairs become options.% - -As with\textnote{Attention!} \Macro{ProcessOptions}, -\Macro{FamilyProcessOptions} must not be used while executing options code. -In particular, you cannot load packages while processing options.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{BeforeFamilyProcessOptions}\OParameter{member}\Parameter{family}% - \Parameter{code}% -\end{Declaration} -Authors\ChangedAt{v3.18}{\Package{scrbase}} of wrapper classes in particular -sometimes need a hook to execute \PName{code} before -\DescRef{\LabelBase.cmd.FamilyProcessOptions}. The \Package{scrbase} package -provides such a hook, and you can add \PName{code} to it with -\Macro{BeforeFamilyProcessOptions}. The \PName{member} and \PName{family} -parameters are same as those of \DescRef{\LabelBase.cmd.FamilyProcessOptions}. -However, you can also add \PName{code} to the hook for families or members -that have not yet been defined. - -Note that the hook of a family member is automatically deleted after it is -executed. But if you use an empty \PName{member}, this hook\Index{hook} will -be executed for every member of the \PName{family} and will not be deleted. - -\begin{Example} - You are writing a \Package{smokedsausage} package that loads - \Package{mettwurst}. But you do not want to be able to set the - \Option{coldcut} option with this package. So you use - \Macro{BeforeFamilyProcessOptions} to deactivate that option before you load - the package: -\begin{lstcode} - \RequirePackage{scrbase} - \BeforeFamilyProcessOptions[.mettwurst.sty]{butcher}{% - \RelaxFamilyKey[.mettwurst.sty]{butcher}{coldcut}% - } - \RequirePackageWithOptions{mettwurst} -\end{lstcode} - If a user tries to load your package with the \Option{coldcut} option, the - \Package{mettwurst} package will throw an undefined option error. If - \Option{coldcut} is used as a global option, the \Package{mettwurst} - package will ignore it. But default settings inside \Package{mettwurst}, - for example using \DescRef{\LabelBase.cmd.FamilyExecuteOptions} before - \DescRef{\LabelBase.cmd.FamilyProcessOptions} are not affected. Of course, - you can also insert your own default for \Package{smokedsausage} via - \Macro{BeforeFamilyProcessOptions} in \Package{mettwurst}. -\end{Example} -\EndIndexGroup - - -\begin{Declaration} - \Macro{FamilyExecuteOptions}\OParameter{member}\Parameter{family}% - \Parameter{options list} -\end{Declaration} -This command is an extension of \Macro{ExecuteOptions} from the \LaTeX{} -kernel (see \cite{latex:clsguide}). The command processes not only options -defined with \Macro{DeclareOption} but also all keys of the given -\PName{family}. If you omit the optional argument \Macro{member}, -``\texttt{.}\Macro{@currname}\texttt{.}\Macro{@currext}'' is used. - -One feature worth noting is that keys which are attached not to a family -member but to a family have an empty family member. Such keys are set before -the keys of the members. -\begin{Example} - Suppose the \Option{coldcuts} option should be set by default in the - previous examples. In this case only line -\begin{lstcode} - \FamilyExecuteOptions{butcher}{coldcuts} -\end{lstcode} - has to be added. -\end{Example} - -If\ChangedAt{v3.20}{\Package{scrbase}} you call \Macro{FamilyExecuteOptions} -with an unknown option inside the \PName{options list}, you will get an error. -An exception to this rule occurs when the \PName{member} has an option called -\Option{@else@}. In this case, the \Option{@else@} option will be used instead -of the unknown one. The value passed to the \Option{@else@} option is the -unknown option with the value specified in the call. \KOMAScript{} itself uses -this feature, for example inside the definition of sectioning commands, -to evaluate the style option before all other attributes. - -You can also use this command inside the code executed when processing the -option.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{FamilyOptions}\Parameter{family}\Parameter{options list}% -\end{Declaration} -Unlike normal options defined with \Macro{DeclareOption}, the \PName{key}s can -also be set after loading a class or package. To do this, you call -\Macro{FamilyOptions}. The \PName{options list} has the form -\begin{flushleft}\vskip\dp\strutbox\begin{tabular}{l} - \PName{key}\texttt{=}\PName{value}\texttt{,}% - \PName{key}\texttt{=}\PName{value}\dots -\end{tabular}\vskip\dp\strutbox\end{flushleft} -after which the value assignment can be omitted for \PName{key}s that have a -defined default. - -The statement sets the keys of all members of the specified family. If a -\PName{key} also exists as an attribute of the family itself, then the family -key is set first, followed by the member keys in the order in which they were -defined. If a given \PName{key} does not exist, either for the family or for -any member of the family, then \Macro{FamilyOptions} will throw an error. An -error also occurs if a \PName{key} exists for some members but each of those -members returns an error through \DescRef{\LabelBase.cmd.FamilyKeyState}. -\begin{Example} - You extend your butcher project with a \Package{sausagesalad} package. If - this package has been loaded, all sausage packages should generate cold - cuts: -\begin{lstcode} - \ProvidesPackage{sausagesalad}% - [2008/05/06 nonsense package] - \DefineFamily{butcher} - \DefineFamilyMember{butcher} - \FamilyProcessOptions{butcher}\relax - \FamilyOptions{butcher}{coldcuts} -\end{lstcode} - If no sausage package has yet been loaded, the undefined option - \Option{coldcuts} leads to an error message. You can avoid this by defining - a corresponding key for the package before the last line of the code above: -\begin{lstcode} - \DefineFamilyKey{butcher}% - {coldcuts}[true]{}% -\end{lstcode} - However, sausage packages loaded after \Package{sausagesalad} still do not - produce cold cuts. You can correct this by replacing the previous command - with: -\begin{lstcode} - \AtBeginDocument{% - \DefineFamiyKey[.sausagesalad.sty]% - {butcher}% - {coldcuts}[true]{}% - } - \DefineFamilyKey{butcher}% - {coldcuts}[true]{% - \AtBeginDocument{\FamilyOptions{butcher}% - {coldcuts=#1}}% - }% -\end{lstcode} - Thus, the option is defined during \Macro{begin}\PParameter{document} so - that it no longer functions for the \Package{sausagesalad} package. Because - \Macro{@currname} and \Macro{@currext} no longer contain the file name of - the package, you must use the optional argument of - \DescRef{\LabelBase.cmd.DefineFamilyKey}. - - But until this redefinition is performed, it uses a definition that executes - the option again for the family and all its members during - \Macro{begin}\PParameter{document}, thus setting it for other sausage - packages. The delay in executing \Macro{FamilyOptions} is crucial here. For - one thing, it includes only the packages loaded afterwards. For another, it - ensures that its own \Option{coldcuts} option has already been redefined. - This avoids endless recursion. -\end{Example} - -Like\ChangedAt{v3.27}{\Package{scrbase}} -\DescRef{\LabelBase.cmd.FamilyExecuteOptions}, \Macro{FamilyOptions} offers -special handling for an option named -\Option{@else@}\important{\Option{@else@}}. If a family member has such an -option, it will be executed whenever an option in the \PName{option list} is -unrecognized by the member. If the family itself defines an option -\Option{@else@}, it will only be called if neither the family nor any of its -members were able to fully process the given option by executing -\DescRef{\LabelBase.cmd.FamilyKeyStateProcessed}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{FamilyOption}\Parameter{family}% - \Parameter{option}\Parameter{value list}% -\end{Declaration} -In addition to options that have mutually exclusive values, there may be -options that can take multiple values at the same time. To use -\DescRef{\LabelBase.cmd.FamilyOptions} for that type of option, it would be -necessary to invoke the same option several times with different value -assignments. Instead, you can easily assign a whole list of values to a single -\PName{option} using \Macro{FamilyOption}. The \PName{value list} is a comma -separated list of values, also known as \emph{csv}: -%\begin{flushleft}\begin{tabular}{l} - \PName{value}\texttt{,}\PName{value}\dots -%\end{tabular}\end{flushleft} -Note in this context that you can use a comma in a value by putting the value -inside braces. This command's other functionality is the same previously -described for \DescRef{\LabelBase.cmd.FamilyOptions}. -\begin{Example} - The \Package{sausagesalad} package should have one more option to add - additional ingredients. Each of the ingredients sets a switch, as was done - previously for the cold cuts. -\begin{lstcode} - \newif\if@saladwith@onions - \newif\if@saladwith@gherkins - \newif\if@saladwith@chillies - \DefineFamilyKey{butcher}{ingredient}{% - \csname @saladwith@#1true\endcsname - } -\end{lstcode} - Here the three ingredients ``onions'', ``gherkins'', and ``chillies'' have - been defined. There is no error message for unknown ingredients. - - For a salad with onions and gherkins, you can use -\begin{lstcode} - \FamilyOptions{butcher}{% - ingredient=onions,ingredient=gherkins} -\end{lstcode} - or simply -\begin{lstcode} - \FamilyOption{butcher} - {ingredient}{onions,gherkins} -\end{lstcode} -\end{Example} - -An\ChangedAt{v3.27}{\Package{scrbase}} \Option{@else@} option is processed -in the same manner as with \DescRef{\LabelBase.cmd.FamilyOptions}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{AtEndOfFamilyOptions}\Parameter{action}% - \Macro{AtEndOfFamilyOptions*}\Parameter{action}% -\end{Declaration} -Sometimes\ChangedAt{v3.12}{\Package{scrbase}} it is useful to delay the -execution of an \PName{action} that is part of a value assignment to a key -until all assignments inside one -\DescRef{\LabelBase.cmd.FamilyProcessOptions}\IndexCmd{FamilyProcessOptions}, -\DescRef{\LabelBase.cmd.FamilyExecuteOptions}\IndexCmd{FamilyExecuteOptions}, -\DescRef{\LabelBase.cmd.FamilyOptions}\IndexCmd{FamilyOptions}, or -\DescRef{\LabelBase.cmd.FamilyOption}\IndexCmd{FamilyOptions} is finished. -You can do this using \Macro{AtEndOfFamilyOptions} or its starred -variant\ChangedAt{v3.23}{\Package{scrbase}} inside an option definition. -However, reporting failure states of \PName{action} is not possible with this -command, nor should it be used outside an option definition. - -The two variants differ in case there are nested option definitions, when -executing an option requires further option calls. In this case all actions -specified by \Macro{AtEndOfFamilyOptions} will be executed when the innermost -option call returns. In contrast, the actions of \Macro{AtEndOfFamilyOptions*} -are not executed until the outermost option call returns. -However,\textnote{Attention!} the order of the actions of both commands is -emphatically undefined! It is not guaranteed that the action requested first -will be executed first, nor the converse.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{FamilyBoolKey}\OParameter{member}\Parameter{family}% - \Parameter{key}\Parameter{switch name}% - \Macro{FamilySetBool}\Parameter{family}% - \Parameter{key}\Parameter{switch name}\Parameter{value} -\end{Declaration} -Boolean switches have been used several times in the previous examples. In the -example with \Option{coldcuts} option, the user had to assign either -\PValue{true} or \PValue{false} as a value. There was no error message if the -user provided the wrong value. Because boolean switches are a common use case, -you can easily define them with \Package{scrbase} using \Macro{FamilyBoolKey}. -The \PName{member}, \PName{family}, and \PName{key} arguments are the same as -those used by \DescRef{\LabelBase.cmd.DefineFamilyKey} (see -\DescPageRef{scrbase.cmd.DefineFamilyKey}). The \PName{switch name} is the -name of the switch without the prefix \Macro{if}. If a switch with this name -does not exist already, \Macro{FamilyBoolKey} will define it and initialize it -to \PName{false}. Internally, \Macro{FamilyBooKey} uses \Macro{FamilySetBool} -as the \PName{action} of \DescRef{\LabelBase.cmd.DefineFamilyKey}. The -\PName{default} for such an option is always \PValue{true}. - -\Macro{FamilySetBool}, on the other hand, accepts \PValue{on} and -\PValue{yes}, in addition to \PName{true}, to turn the switch on, and -\PName{off} and \PName{no}, in addition to \PName{false}, to turn it off. -Unknown values will result in a call to -\DescRef{\LabelBase.cmd.FamilyUnknownKeyValue} with the arguments -\PName{family}, \PName{key}, and \PName{value}, which sets -\DescRef{\LabelBase.cmd.FamilyKeyState} accordingly. As a result, an error -message about an unknown value assignment is printed if necessary (see also -\DescPageRef{scrbase.cmd.FamilyUnknownKeyValue} and -\DescPageRef{scrbase.cmd.FamilyKeyState}). -\begin{Example} - The key \Option{coldcuts} should be defined more robustly in the sausage - packages. Additionally, all sausage packages should use the same key, so - that either all sausage packages will produce cold cuts or none will. -\begin{lstcode} - \FamilyBoolKey{butcher}{coldcuts}% - {@coldcuts} -\end{lstcode} - A test of whether to produce cold cuts would look like this: -\begin{lstcode} - \if@coldcuts - ... - \else - ... - \fi -\end{lstcode} - This would be the same in all three sausage packages, thereby - defining the attribute ``coldcuts'' as a family option: -\begin{lstcode}[moretexcs={define@key}] - \@ifundefined{if@coldcuts}{% - \expandafter\newif\csname if@coldcuts\endcsname - }{}% - \DefineFamilyKey[]{butcher}{coldcuts}[true]{% - \FamilySetBool{butcher}{coldcuts}% - {@coldcuts}% - {#1}% - } -\end{lstcode} - or shorter: -\begin{lstcode} - \FamilyBoolKey[]{butcher}{coldcuts}% - {@coldcuts} -\end{lstcode} - taking advantage of the treatment of empty family members as opposed to - omitting the optional argument explained on - \autopageref{explain:scrbase.macro.DefineFamilyKey}, which applies not only - to \DescRef{\LabelBase.cmd.DefineFamilyKey} but also for - \Macro{FamilyBoolKey}. - - Since \DescRef{\LabelBase.cmd.FamilyKeyState} is already set by - \Macro{FamilySetBool}, you can check its status with the help of - \DescRef{\LabelBase.cmd.DefineFamilyKey}. For example, in the first case you - could add an equivalence test to \Macro{FamilySetBool} to perform additional - actions depending on whether \Macro{FamilySetBool} succeeded or not: - \begin{lstcode} - \ifx\FamilyKeyState\FamilyKeyStateProcessed - ... - \else - ... - \fi - \end{lstcode} - Note\textnote{Attention!} that it is essential to perform the test with - \Macro{ifx} at this point. Fully expanding tests like \Macro{ifstr} should - be avoided here. Depending on the current status and the comparison status, - they can lead to different error messages as well as incorrect results. -\end{Example}% -\EndIndexGroup - -\begin{Declaration} - \Macro{FamilyInverseBoolKey}\OParameter{member}\Parameter{family} - \Parameter{key}\Parameter{switch name} - \Macro{FamilySetInverseBool}\Parameter{family} - \Parameter{key}\Parameter{switch name} - \Parameter{value} -\end{Declaration} -These\ChangedAt{v3.27}{\Package{scrbase}} two commands differ from -\DescRef{\LabelBase.cmd.FamilyBoolKey} and -\DescRef{\LabelBase.cmd.FamilySetBool}, respectively, only in that the -logic is inverted. This means that the values \PValue{true}, \PValue{yes}, and -\PValue{on} set the boolean switch given by \PName{switch name} to -\Macro{iffalse} and therefore deactivate it. The values \PValue{false}, -\PValue{no}, and \PValue{off} set the boolean switch to \Macro{iftrue} and -therefore activate it.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{FamilyNumericalKey}\OParameter{member}\Parameter{family}% - \Parameter{key}% - \OParameter{default}\Parameter{command}% - \Parameter{value list}% - \Macro{FamilySetNumerical}\Parameter{family}\Parameter{key}% - \Parameter{command}\Parameter{value list}% - \Parameter{value} -\end{Declaration} -While switches can accept only two values, there are also keys that recognize -several values. For example an alignment can be not just left or not-left, but -left, centred, or right. Internally, such differentiation is often made using -\Macro{ifcase}. This \TeX{} command expects a numerical value. Therefore in -\Package{scrbase} the command to define a macro by a \PName{key} has been -named \Macro{FamilyNumericalKey}. The \PName{value list} has the form: -%\begin{flushleft}\vskip\dp\strutbox\begin{tabular}{l} - \Parameter{value}\Parameter{definition}\texttt{,}\linebreak[1]% - \Parameter{value}\Parameter{definition}\texttt{,}~\dots -%\end{tabular}\vskip\dp\strutbox\end{flushleft} -The \PName{value list} defines not just the values permitted for the -\PName{key}. For each \PName{value}, the \PName{definition} of the macro -\Macro{\PName{command}} also is given. Usually, the \PName{definition} is just -a numerical value. Although other content is possible, there is currently a -restriction that the \PName{definition} must be fully expandable, and it will -be expanded during the assignment. -\begin{Example} - The sausage for the sausage salad can be cut differently. For example, the - cold cuts could simply remain uncut or be cut into thick or thin slices. - This information should be stored in the command \Macro{cuthow}. -\begin{lstcode} - \FamilyNumericalKey{butcher}% - {saladcut}{cuthow}{% - {none}{none},{no}{none},{not}{none}% - {thick}{thick},% - {thin}{thin}% - } -\end{lstcode} - Not cutting anything can be selected by -\begin{lstcode} - \FamilyOptions{butcher}{saladcut=none} -\end{lstcode} - or -\begin{lstcode} - \FamilyOptions{butcher}{saladcut=no} -\end{lstcode} - or -\begin{lstcode} - \FamilyOptions{butcher}{saladcut=not} -\end{lstcode} - In all three cases \Macro{cuthow} would be defined with the content - \PValue{none}. It can be useful to provide several values for the same - result, as shown in this example. - - Now it's very likely that the manner of cutting will not be printed but - should be evaluated later. In this case, a textual definition would be - rather impractical. If the key is defined like this: -\begin{lstcode} - \FamilyNumericalKey{butcher}% - {saladcut}{cuthow}{% - {none}{0},{no}{0},{not}{0}% - {thick}{1},% - {thin}{2}% - } -\end{lstcode} - then you can use a condition like the following: -\begin{lstcode} - \ifcase\cuthow - % uncut - \or - % thickly cut - \else - % thinly cut - \fi -\end{lstcode} -\end{Example} -Internally, \Macro{FamilyNumericalKey} uses \Macro{FamilySetNumerical} as the -\PName{action} of \DescRef{\LabelBase.cmd.DefineFamilyKey}. If an unknown -value is assigned to such a key, \Macro{FamilySetNumerical} will call -\DescRef{\LabelBase.cmd.FamilyUnknownKeyValue} with the \PName{family}, -\PName{key} and \PName{value} arguments. This leads to an error signalled with -the \DescRef{\LabelBase.cmd.FamilyKeyStateUnknownValue} status in -\DescRef{\LabelBase.cmd.FamilyKeyState}. Similarly, when calling -\Macro{FamilySetNumerical} the success is signalled via -\DescRef{\LabelBase.cmd.FamilyKeyStateProcessed} in -\DescRef{\LabelBase.cmd.FamilyKeyState}.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{FamilyCounterKey}\OParameter{member}\Parameter{family}% - \Parameter{key}% - \OParameter{default}\Parameter{\LaTeX{} counter}% - \Macro{FamilySetCounter}\Parameter{family}% - \Parameter{key}\Parameter{\LaTeX{} counter}\Parameter{value} -\end{Declaration} -While\ChangedAt{v3.12}{\Package{scrbase}} -\DescRef{\LabelBase.cmd.FamilyNumericalKey} defines a macro in which a numeric -value corresponds to a symbolic value, there are, of course, circumstances -when a \PName{key} directly represents a \PName{\LaTeX{} counter} to which a -numeric value should be assigned immediately. For this case, you can use -\Macro{FamilyCounterKey}, which calls \Macro{FamilySetCounter} internally. -There are some basic tests of the \PName{value} argument to determine if the -\PName{value} argument appears to be suitable for assignment to a counter. The -assignment will only be made if these tests succeed. However, not all errors -can be detected here, so an incorrect assignment can also lead to an error -message from \TeX{} itself. Errors that are detected, however, are signalled -by \DescRef{\LabelBase.cmd.FamilyKeyStateUnknownValue}. - -If\ChangedAt{v3.15}{\Package{scrbase}} the value is omitted, the -\PName{default} is used instead. If there is no \PName{default}, the -\PName{key} can be used only with an explicit value.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{FamilyCounterMacroKey}\OParameter{member}\Parameter{family}% - \Parameter{key}% - \OParameter{default}\Parameter{macro}% - \Macro{FamilySetCounterMacro}\Parameter{family}% - \Parameter{key}\Parameter{macro}\Parameter{value}% -\end{Declaration} -These\ChangedAt{v3.12}{\Package{scrbase}} two commands differ from the -previously described \DescRef{\LabelBase.cmd.FamilyCounterKey} and -\DescRef{\LabelBase.cmd.FamilySetCounter} only by the fact that they do not -assign a \PName{value} to a \LaTeX{} counter, but define a \Macro{macro} with -the \PName{value}. This \PName{value} is locally assigned to a counter and -then its expanded value is used. Therefore, its value at the time the option -is called applies.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{FamilyLengthKey}\OParameter{member}\Parameter{family} - \Parameter{key} - \OParameter{default}\Parameter{length} - \Macro{FamilySetLength}\Parameter{family} - \Parameter{key}\Parameter{length}\Parameter{value} - \Macro{FamilyLengthMacroKey}\OParameter{member}\Parameter{family} - \Parameter{key} - \OParameter{default}\Parameter{macro} - \Macro{FamilySetLengthMacro}\Parameter{family} - \Parameter{key}\Parameter{macro} - \Parameter{value} - \Macro{FamilyUseLengthMacroKey}\OParameter{member}\Parameter{family} - \Parameter{key} - \OParameter{default}\Parameter{macro} - \Macro{FamilySetUseLengthMacro}\Parameter{family} - \Parameter{key}\Parameter{macro} - \Parameter{value} -\end{Declaration} -With\ChangedAt{v3.12}{\Package{scrbase}} \Macro{FamilyLengthKey}, you can -define a \PName{key} that represents a \PName{length}. It does not matter -whether the \PName{length} is a \LaTeX{} length, a \TeX{} skip, or a \TeX{} -dimension. Internally the \PName{length} will be set to the \PName{value} -using \Macro{FamilySetLength}. There are some basic tests to decide whether -this \PName{value} is valid to assign to \PName{length}. The assignment will -only take place if these tests succeed. However, not all errors can be -detected, so an inaccurate \PName{value} can still result in a \TeX{} error. -Errors that are detected, however, are signalled by -\DescRef{\LabelBase.cmd.FamilyKeyStateUnknownValue}. - -If\ChangedAt{v3.15}{\Package{scrbase}} the value is omitted, the -\PName{default} is used instead. If there is no \PName{default}, the -\PName{key} can be used only with an explicit value. - -When you use \Macro{FamilyLengthMacroKey} and \Macro{FamilySetLengthMacroKey}, -or \Macro{FamilySetLengthMacro} and \Macro{FamilySetUseLengthMacro}, the -\PName{value} is stored not in a \PName{length} but in a -\PName{macro}. \Macro{FamilyLengthMacroKey} and -\Macro{FamilySetLengthMacroKey} define the \PName{macro} to be the -\PName{value} as evaluated at the point of definition, similar to -\Macro{setlength}. In contrast, -\Macro{FamilyUseLengthMacroKey}\ChangedAt{v3.20}{\Package{scrbase}} and -\Macro{FamilySetUseLengthMacroKey} store the \PName{value} directly, and -so the \PName{value} is reevaluated each time the \PName{macro} is used.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{FamilyStringKey}\OParameter{member}\Parameter{family}% - \Parameter{key}% - \OParameter{default}\Parameter{command} - \Macro{FamilyCSKey}\OParameter{member}\Parameter{family}% - \Parameter{key}% - \OParameter{default}\Parameter{command name} -\end{Declaration} -This defines\ChangedAt{v3.08}{\Package{scrbase}} a \PName{key} that accepts -any value. The value will be stored in the specified \Macro{command}. If there -is no optional argument for the \PName{default}, \Macro{FamilyStringKey} is -the same as: -\begin{lstcode}[escapeinside=`'] - \DefineFamilyKey[`\PName{member}']{`\PName{family}'}{`\PName{key}'} - {\def`\PName{command}'{#1}} -\end{lstcode} -If you use the optional argument \PName{default}, \Macro{FamilyStringKey} -corresponds to: -\begin{lstcode}[escapeinside=`'] - \DefineFamilyKey[`\PName{member}']{`\PName{family}'}{`\PName{key}'} - [`\PName{default}'] - {\def`\PName{command}'{#1}\FamilyKeyStateProcessed} -\end{lstcode} - -\begin{Example} - By default 250\Unit{g} of sausage salad should be produced. However, the - amount should be configurable by an option. To do so, the quantity to be - created is stored in the macro \Macro{saladweight}. The option to change - the weight should also be called \PValue{saladweight}: -\begin{lstcode} - \newcommand*{\saladweight}{250g} - \FamilyStringKey{butcher}% - {saladweight}[250g]{\saladweight} -\end{lstcode} - To switch back to the default weight after changing it, you can simply - call the option without the weight: -\begin{lstcode} - \FamilyOptions{butcher}{saladweight} -\end{lstcode} - This is possible because the default quantity was also set as the default - value in the definition. -\end{Example} -In this case, there are no unknown values because all values are simply used -for a macro definition. Note, however, that paragraph breaks are not allowed -when assigning a value to the key. - -In contrast\ChangedAt{v3.25}{\Package{scrbase}} to \Macro{FamilyStringKey}, -the \Macro{FamilyCSKey} command expects for the final argument not a macro but -only the name of a command, for example \PParameter{saladweight} instead of -\PParameter{\Macro{saladweight}}.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{FamilyUnknownKeyValue}\Parameter{family}\Parameter{key}% - \Parameter{value}\Parameter{value list}% -\end{Declaration} -The command \Macro{FamilyUnknownKeyValue} throws an error message due to an -unknown or illegal values by means of \DescRef{\LabelBase.cmd.FamilyKeyState}. -The \PName{value list} is a comma separated list of permissible values in the -form -%\begin{flushleft}\vskip\dp\strutbox\begin{tabular}{l} - `\PName{value}'\texttt{,} `\PName{value}' \dots -%\end{tabular}\vskip\dp\strutbox\end{flushleft} -However\ChangedAt{v3.12}{\Package{scrbase}}, the \PName{value list} is -currently not evaluated by \Package{scrbase}. -\begin{Example} - The user should now also be able to select whether the cold cuts should be - cut thick or thin. Thick should be the default setting, which should be used - even if the user does not specify how to cut the coldcuts. -\begin{lstcode} - \@ifundefined{if@thincut}{% - \expandafter - \newif\csname if@thincut\endcsname}{}% - \@ifundefined{if@coldcuts}{% - \expandafter - \newif\csname if@coldcuts\endcsname}{} - \DefineFamilyKey{butcher}% - {coldcuts}[true]{% - \FamilySetBool{butcher}{coldcuts}% - {@coldcuts}% - {#1}% - \ifx\FamilyKeyState\FamilyKeyStateProcessed - \@thincutfalse - \else - \Ifstr{#1}{thin}{% - \@coltcutstrue - \@finecuttrue - \FamilyKeyStateProcessed - }{% - \FamilyUnknownKeyValue{butcher}% - {coldcuts}% - {#1}{% - `true', `on', `yes', - `false`, `off`, `no', - `thin'% - }% - }% - \fi - }% -\end{lstcode} - First we try to set the boolean coldcuts switch using - \DescRef{\LabelBase.cmd.FamilySetBool}. If this succeeds, i.\,e. if - \DescRef{\LabelBase.cmd.FamilyKeyState} corresponds to - \DescRef{\LabelBase.cmd.FamilyKeyStateProcessed}, thincut will be - deactivated. Otherwise, we check if the value is equal to \PValue{thin} - rather than one of the valid values for a boolean switch. In this case, both - coldcuts and thincut are activated and the state will be switched to - \DescRef{\LabelBase.cmd.FamilyKeyStateProcessed}. If the previous test - fails, the error state signalled by \DescRef{\LabelBase.cmd.FamilySetBool} - is reset to \DescRef{\LabelBase.cmd.FamilyKeyStateUnknownValue}. The list of - the permissible values will be added to it. However, since this list is no - longer used, it would have been easy to skip the call to - \Macro{FamilyUnknownKeyValue} in the example and thus assume the error - status of \DescRef{\LabelBase.cmd.FamilySetBool}. - - The \Macro{ifstr} command used in the test is explained on - \DescPageRef{scrbase.cmd.Ifstr} in \autoref{sec:scrbase.if}. -\end{Example} -% -\EndIndexGroup - - -\section{Conditional Execution} -\seclabel{if} - -The \Package{scrbase} package provides several commands for conditional -execution. Mostly it does not rely on the \TeX{} syntax of conditionals such -as -\begin{lstcode} - \iftrue - ... - \else - ... - \fi -\end{lstcode} -but uses the \LaTeX{} syntax with arguments similar to those used by \LaTeX{} -commands like \Macro{IfFileExists}, \Macro{@ifundefined}, -\Macro{@ifpackageloaded}, and many others. - -% TODO: Fix translation (note: this text does not really correspond to the -% German manual but there is a similar note at the (not free) German book -From \KOMAScript~3.28, following a recommendation from \LaTeX{} team members, -\Package{scrbase} does not longer use \Macro{if\dots} but \Macro{If\dots} for -commands that expect an argument instead of using the \TeX{} -syntax. Some commands from prior versions of \KOMAScript{} have been -removed. You may use package \Package{iftex} (see \cite{package:iftex}) to -replace the functionality. Others have been renamed. -% :ODOT - -\begin{Declaration} - \Macro{Ifundefinedorrelax}% - \Parameter{name}\Parameter{then code}\Parameter{else code} -\end{Declaration} -This\ChangedAt{v3.28}{\Package{scrbase}} command works like -\Macro{@ifundefined} from the \LaTeX{} kernel (see \cite{latex:source2e}). So -the \PName{then code} is executed if \PName{name} is the name of a -command that is currently either not defined or \Macro{relax}. Otherwise, the -\PName{else code} is executed. Unlike \Macro{@ifundefined}, no hash -memory is allocated nor is \Macro{\PName{Name}} set to \Macro{relax} if -\Macro{\PName{name}} was previously undefined.% -\EndIndexGroup - -\begin{Declaration} - \Macro{Ifnotundefined}\Parameter{name}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.28}{\Package{scrbase}} the command with the given name has -already been defined, the \PName{then code} is executed. Otherwise, the -\PName{else code} is executed. Since \eTeX{} already has a primitive -\Macro{ifdefined}, this somewhat unwieldy name, unfortunately, had to be -chosen. There is no corresponding internal command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifstr}\Parameter{string 1}\Parameter{string 2}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -Both\ChangedAt{v3.28}{\Package{scrbase}} \PName{string} arguments are expanded -and then compared. If the expansions are the same, the \PName{then code} is -executed. Otherwise the \PName{else code} is executed. There is no -corresponding internal command. -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifstrstart}\Parameter{string 1}\Parameter{string 2}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -Both\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} -\PName{string} arguments are expanded and then compared. If \PName{string 1}, -apart from white space, begins with \PName{string 2}, the \PName{then code} is -executed. Otherwise, the \PName{else code} is executed. There is no -corresponding internal command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{IfArgIsEmpty}\Parameter{argument} - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.19}{\Package{scrbase}} the \PName{argument} is empty, the -\PName{then code} is executed, otherwise the \PName{else code} is -executed. Even one whitespace character is considered non-empty. Since the -\PName{argument} is not expanded, macros that expand to an empty result are -also considered to be a non-empty \PName{argument}. The same applies to -\Macro{relax} or undefined macros.% -\EndIndexGroup - - -\iffalse % internal -\begin{Declaration} - \Macro{scr@ifluatex} - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.21}{\Package{scrbase}} you use lua\TeX{}, the \PName{then -code} will be executed. Otherwise, the \PName{else code} will be executed. -\iftrue% Umbruchkorrekturtext -This test is rarely useful. % -\fi% -As a rule, it is better to test directly for the command you want. -There\textnote{Attention!} is no user equivalent for this instruction. Use the -\Package{ifluatex}\important{\Package{ifluatex}} package instead (see -\cite{package:ifluatex}).% -\EndIndexGroup -\fi - - -\iffalse% It makes no sense to document this instruction yet -\begin{Declaration} - \Macro{scr@ifpdforluatex} - \Parameter{then code}\Parameter{else code} -\end{Declaration} -Until lua\TeX~0.85, it was mostly irrelevant whether you used pdf\TeX{} or -lua\TeX{}. This command, which executes the \PName{then code} in both cases, -derives from that fact. If neither pdf\TeX{} nor lua\TeX{} is used, the -\PName{else code} will be executed. Since version~0.85, lua\TeX{} has given up -compatibility with many of its commands. Therefore this distinction is no -longer useful in practice and is no longer used by \KOMAScript{} itself. There -is no user equivalent of this statement.% -\EndIndexGroup -\fi - -\iffalse % internal -\begin{Declaration} - \Macro{scr@ifpdftex}% - \Parameter{then code}\Parameter{else code}% -\end{Declaration} -If you use pdf\TeX{}, the \PName{then code} will be executed. Otherwise, the -\PName{else code} will be executed. It does not matter whether a PDF-file is -actually generated or not. This test is rarely useful. As a rule, you should -test directly for the command you want instead.% -\EndIndexGroup -\fi - -\iffalse % internal -\begin{Declaration} - \Macro{scr@ifVTeX}% - \Parameter{then code}\Parameter{else code}% -\end{Declaration} -If you use V\TeX{}, the \PName{then code} is executed. Otherwise, the -\PName{else code} is executed. This test is seldom useful. As a rule, -you should test directly for the command you want instead.% -% -\EndIndexGroup -\fi - - -\begin{Declaration} - \Macro{Ifpdfoutput}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.28}{\Package{scrbase}} a PDF file is generated, the -\PName{then code} is executed. Otherwise, the \PName{else code} is -executed. It does not matter whether PDF file is created using lua\TeX{}, -pdf\TeX{}, or V\TeX{}, or \XeTeX{}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifpsoutput}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.28}{\Package{scrbase}} a PostScript file is generated, the -\PName{then code} is executed. Otherwise, the \PName{else code} is -executed. V\TeX{} can generate PostScript directly, which is recognized -here. However, if V\TeX{} is not used but the switch \Macro{if@dvips} has been -defined, the decision depends on that switch. \KOMAScript{} provides -\Macro{if@dvips} in -\hyperref[cha:typearea]{\Package{typearea}}\IndexPackage{typearea}% -\IndexCmd{if@dvips}. -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifdvioutput}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.28}{\Package{scrbase}} a DVI-file is generated, the -\PName{then code} is executed. Otherwise, the \PName{else code} is -executed. A DVI file is always assumed to be generated if no direct output of -a PDF file or a PostScript file can be detected.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifisdimen}\Parameter{expression}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} -\PName{expression} expands to a \Macro{dimen}, i.\,e. a \TeX{} length -register, the \PName{then code} is executed. Otherwise the \PName{else - code} is executed. The command is not completely expandable, and there -is no corresponding internal command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifisdimension}\Parameter{expression}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} -\PName{expression} expands to something syntactically equivalent to a length, -the \PName{then code} is executed. Otherwise the \PName{else code} is -executed. Note\textnote{Attention!} that unknown units cause an error -message. The command is not completely expandable, and there is no -corresponding internal command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifdimen}\Parameter{string}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -The \PName{then code}\ChangedAt{v3.28}{\Package{scrbase}} is executed if -the first-order expansion of \PName{string} consists of digits and a valid -length unit. Otherwise, the \PName{else code} is used. There is no -corresponding internal command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifisdimexpr}\Parameter{expression}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} -\PName{expression} expands to an \eTeX{} \Macro{dimexpr}\IndexCmd{dimexpr}, -the \PName{then code} is executed. Otherwise, the \PName{else code} is -executed. Note\textnote{Attention!} that illegal expressions result in -error messages. The command is not completely expandable, and there is no -corresponding internal command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifisskip}\Parameter{expression}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} -\PName{expression} expands to a \Macro{skip}, i.\,e. a \TeX{} distance, the -\PName{then code} is executed. Otherwise, the \PName{else code} is -executed. The command is not completely expandable, and there is no -corresponding internal command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifisglue}\Parameter{expression}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} -\PName{expression} expands to something syntactically equivalent of the value -of a skip, the \PName{then code} is executed. Otherwise, the \PName{else - code} is executed. Note\textnote{Attention!} that invalid units -result in an error message. The command is not completely expandable, and -there is no corresponding internal command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifisglueexpr}\Parameter{expression}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} -\PName{expression} expands to a \Macro{glueexpr}, i.\,e. an \eTeX{} distance -expression, the \PName{then code} is executed. Otherwise, the \PName{else - code} is executed. Note,\textnote{Attention!} that illegal expressions -result in error messages. The command is not completely expandable, and -there is no corresponding internal command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifiscounter}\Parameter{counter}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} -\PName{counter} is defined as a \LaTeX{} counter, the \PName{then code} is -executed. Otherwise, the \PName{else code} is executed. The command is -not completely expandable, and there is no corresponding internal command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifiscount}\Parameter{count}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} -\PName{count} expands to a \Macro{count}, i.\,e. a \TeX{} counter, the -\PName{then code} is executed. Otherwise, the \PName{else code} is -executed. The command is not completely expandable, and there is no -corresponding internal command. For tests of \LaTeX{} counters, see -\DescRef{\LabelBase.cmd.Ifiscounter}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifisinteger}\Parameter{expression}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} -\PName{expression} expands to something syntactically equivalent to of the -value of a counter, i.\,e. a negative or positive integer, the \PName{then - code} is executed. Otherwise, the \PName{else code} is -executed. The command is not completely expandable, and there is no -corresponding internal command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifnumber}\Parameter{string}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -The\ChangedAt{v3.28}{\Package{scrbase}} \PName{then code} is executed if -the first-order expansion of \PName{string} consists only of -digits. Otherwise, the \PName{else code} is used. There is no -corresponding internal command. -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifisnumexpr}\Parameter{expression}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -If\ChangedAt{v3.12}{\Package{scrbase}}\ChangedAt{v3.28}{\Package{scrbase}} -\PName{expression} expands to a \Macro{numexpr}, i.\,e. an \eTeX{} number -expression, the \PName{then code} is executed. Otherwise, the \PName{else - code} is executed. Note\textnote{Attention!} that illegal expressions -result in error messages. The command is not completely expandable, and -there is no corresponding internal command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{IfActiveMkBoth}\Parameter{then code}\Parameter{else code} -\end{Declaration} -The\ChangedAt{v3.27}{\Package{scrbase}} \LaTeX{} kernel uses -\DescRef{scrlayer.cmd.@mkboth}\important{\Macro{@mkboth}}\IndexCmd{@mkboth} to -distinguish between automatic and manual running heads. Usually, it sets both -marks with automatic running heads. With manual running heads, it does not set -any mark. To determine whether automatic running heads are active, many -packages compare \DescRef{scrlayer.cmd.@mkboth} with either -\DescRef{maincls.cmd.markboth}\IndexCmd{markboth} or \Macro{@gobbletwo}. But -this does not account for all cases in which \DescRef{scrlayer.cmd.@mkboth} -may be redefined. Therefore \Macro{IfActiveMkBoth} tests if -\DescRef{scrlayer.cmd.@mkboth} would actually set a mark, even when -\Macro{marks} appears in the definition of \DescRef{scrlayer.cmd.@mkboth}. If -such an active \DescRef{scrlayer.cmd.@mkboth} is detected, the -\PName{then code} is executed. In all other cases, the \PName{else code} is -used.% -\begin{Example} - For example, suppose you want to set the right mark if and only if - automatic running heads are used, e.\,g., the pagestyle - \PageStyle{headings}\IndexPagestyle{headings}. For a first attempt, - you might use: -\begin{lstcode} - \ifx\@mkboth\markboth \markright{running head}\fi -\end{lstcode} - Later you discover that some package does not use the usual -\begin{lstcode} - \let\@mkboth\markboth -\end{lstcode} - but -\begin{lstcode} - \renewcommand{\@mkboth}{\markboth} -\end{lstcode} - to activate automatic running heads. Because of this, your comparison always - fails and never calls \DescRef{maincls.cmd.markright}. To solve this, you - try the following change: -\begin{lstcode} - \ifx\@mkboth\@gobbletwo\else \markright{running head}\fi -\end{lstcode} - Unfortunately, now \DescRef{maincls.cmd.markright} is also called for - manual running heads, because someone has defined -\begin{lstcode} - \renewcommand{\@mkboth}[2]{% - \typeout{DEBUG: ignoring running head setting}% - } -\end{lstcode} - for this case. - - Fortunately, both problems are easy to solve with \Package{scrbase}: -\begin{lstcode} - \IfActiveMkBoth{\markright{Kolumnentitel}}{} -\end{lstcode}% -\end{Example} -By the way, an even simpler solution for the problem in the example -would be to use \DescRef{scrlayer.cmd.@mkright} from package -\hyperref[cha:scrlayer]{\Package{scrlayer}} (see -\autoref{sec:scrlayer.pagestyle.content}, -\DescPageRef{scrlayer.cmd.@mkright}).% -\EndIndexGroup - - -\begin{Declaration} - \Macro{if@atdocument}\ \PName{then code}\ % - \textMacro{else}\ \PName{else code}\ \textMacro{fi} -\end{Declaration} -This conditional command intentionally exists only as an internal command. In -the document preamble, \Macro{if@atdocument} corresponds to \Macro{iffalse}. -After \Macro{begin}\PParameter{document}, it corresponds to \Macro{iftrue}. -Authors of classes and packages may find this command useful if a command -should behave differently depending on whether it is used in the preamble or -inside document body. Note\textnote{Attention!} that this command is a -condition using \TeX{} syntax and not \LaTeX{} syntax! -% -\EndIndexGroup - - -\section{Defining Language-Dependent Terms} -\seclabel{languageSupport} -\BeginIndexGroup -\BeginIndex{}{language>definition} -\index{language>dependent terms|see{language definition}} -\index{terms>language-dependent|see{language definition}} - -Beginners often find it difficult to change language-dependent terms -\Macro{listfigurename}\IndexCmd{listfigurename}, by default usually ``List of -Figures.'' For example, if these are simply redefined with -\Macro{renewcommand} in the document preamble, they will not survive a later -change of language. If you use \Package{babel}\IndexCmd{babel}, the -redefinition in the preamble is overwritten with -\Macro{begin}\PParameter{document}. - -To define or change language-dependent terms, you normally have to redefine -commands like \Macro{captionsenglish} so that the new or redefined terms are -defined in addition to the previous terms. This is made more difficult by the -fact that some packages like \Package{german}\IndexPackage{german} or -\Package{ngerman}\IndexPackage{ngerman} redefine those settings when they are -loaded. These definitions, unfortunately, occur in a way that undoes all the -previous changes. For this reason, it makes sense to delay changes until -\Macro{begin}\PParameter{document} by using \Macro{AtBeginDocument}, that is, -after all packages have been loaded. A user can also use -\Macro{AtBeginDocument} or redefine the language-dependent terms not in the -preamble but after \Macro{begin}\PParameter{document}. - -Adding further to the difficulty, some packages define additional -language-dependent terms in \Macro{captions\PName{language}}, while others use -\Macro{extras\PName{language}}. So the user must understand the commands very -well in order to use the correct one in the right way. - -The \Package{scrbase} package therefore provides additional commands to define -or modify language-dependent terms, relieving the user of many of these -problems. These commands also let you simultaneously define or change the -language-dependent terms of several dialects or forms of a language. - -\begin{Declaration} - \Macro{defcaptionname}% - \Parameter{language list}\Parameter{term}\Parameter{definition}% - \Macro{providecaptionname}% - \Parameter{language list}\Parameter{term}\Parameter{definition}% - \Macro{newcaptionname}% - \Parameter{language list}\Parameter{term}\Parameter{definition}% - \Macro{renewcaptionname}% - \Parameter{language list}\Parameter{term}\Parameter{definition}% - \Macro{defcaptionname*}% - \Parameter{language list}\Parameter{term}\Parameter{definition}% - \Macro{providecaptionname*}% - \Parameter{language list}\Parameter{term}\Parameter{definition}% - \Macro{newcaptionname*}% - \Parameter{language list}\Parameter{term}\Parameter{definition}% - \Macro{renewcaptionname*}% - \Parameter{language list}\Parameter{term}\Parameter{definition} -\end{Declaration} -With these four commands and their starred variants, you can assign a -\PName{definition} for a particular language to a \PName{term}. Several -languages can be concatenated with comma in the \PName{language list}. - -The \PName{term} is always a macro. The commands differ depending on whether a -given language or a \PName{term} within a given language is already defined at -the time the command is called. - -If a language is not defined, \Macro{providecaptionname} does nothing other -than write a message to the log file. This happens only once for each -language. If a language is defined but does not yet contain a corresponding -\PName{term}, it will be defined using \PName{definition}. However, the -\PName{term} will not be redefined if the language already has such a -definition; instead, an appropriate message is written to the log file. - -On the other hand, if a language has not yet been defined, -\Macro{newcaptionname} defines a new language command will be created. For the -language \PValue{USenglish}, for example, this would be the language command -\Macro{captionsUSenglish}. This definition will also be noted in the log file. -If \PName{term} is not yet defined in this language, it will be defined using -\PName{definition}. If the \PName{term} already exists in a language, an error -message is issued. - -The \Macro{renewcaptionname} command behaves still differently. If a language -is undefined, an error message is issued. If the \PName{term} is not defined -in this language, an error message is also issued. If the \PName{term} is -defined in the language, it will be redefined to \PName{definition}. - -The\ChangedAt{v3.12}{\Package{scrbase}} \Macro{defcaptionname} command always -defines the \PName{term}, thus overwriting any previous definition. As with -\Macro{providecaptionname}, the language specified need not be previously -defined. - -\KOMAScript{} itself uses \Macro{providecaptionname} to define the commands in -\autoref{sec:scrlttr2-experts.languages}. -\DescPageRef{scrlttr2-experts.cmd.yourrefname}. - -\begin{Example} - If you prefer ``fig.'' instead of ``figure'' in \PValue{USenglish}, you can - achieve this using: -\begin{lstcode} - \renewcaptionname{USenglish}{\figurename}{fig.} -\end{lstcode} - If you want the same change not only in \PValue{USenglish} but also in - \PValue{UKenglish}, you do not need an additional: -\begin{lstcode} - \renewcaptionname{UKenglish}{\figurename}{fig.} -\end{lstcode} - but can simply extend the \PName{language list}: -\begin{lstcode} - \renewcaptionname{USenglish,UKenglish}{\figurename}{fig.} -\end{lstcode} - You can extend the \PName{language list} in the same manner with - \PValue{american}, \PValue{australian}, \PValue{british}, \PValue{canadian}, - and \PValue{newzealand}. -\end{Example} - -Since \KOMAScript~3.12\ChangedAt{v3.12}{\Package{scrbase}}, you no longer need -to delay the definition or redefinition until -\Macro{begin}\PParameter{document} using \Macro{AtBeginDocument} because -\Package{scrbase} does this itself if the commands are called in the -document's preamble. Additionally, \Package{scrbase} now checks if a term -should be redefined in \Macro{extras\PName{language}} instead of -\Macro{captions\PName{language}}. The new starred variants of the commands -always use \Macro{extras\PName{language}}. So redefining language-dependent -terms for packages like \Package{hyperref} that use -\Macro{extras\PName{language}} should work as expected. - -Language-dependent terms that are commonly defined by classes and language -packages are described in \autoref{tab:scrbase.commonNames}. - -\begin{desclist} - \renewcommand*{\abovecaptionskipcorrection}{-\normalbaselineskip}% - \desccaption[{% - Overview of common language-dependent terms% - }]{% - Overview of language-dependent terms of typical language packages% - \label{tab:scrbase.commonNames}% - }{% - Overview of common language dependent terms - (\emph{continued})% - }% - \entry{\Macro{abstractname}}{% - heading of the abstract% - \IndexCmd{abstractname}% - }% - \entry{\Macro{alsoname}}{% - ``see also'' in additional cross references of the index% - \IndexCmd{alsoname}% - }% - \entry{\Macro{appendixname}}{% - ``appendix'' in the heading of an appendix chapter% - \IndexCmd{appendixname}% - }% - \entry{\Macro{bibname}}{% - heading of the bibliography% - \IndexCmd{bibname}% - }% - \entry{\Macro{ccname}}{% - prefix heading for the distribution list of a letter% - \IndexCmd{ccname}% - }% - \entry{\Macro{chaptername}}{% - ``chapter'' in the heading of a chapter% - \IndexCmd{chaptername}% - }% - \entry{\Macro{contentsname}}{% - heading of the table of contents% - \IndexCmd{contentsname}% - }% - \entry{\Macro{enclname}}{% - prefix heading for the enclosures of a letter% - \IndexCmd{enclname}% - }% - \entry{\Macro{figurename}}{% - prefix heading of figure captions% - \IndexCmd{figurename}% - }% - \entry{\Macro{glossaryname}}{% - heading of the glossary% - \IndexCmd{glossaryname}% - }% - \entry{\Macro{headtoname}}{% - ``to'' in header of letter pages% - \IndexCmd{headtoname}% - }% - \entry{\Macro{indexname}}{% - heading of the index% - \IndexCmd{indexname}% - }% - \entry{\Macro{listfigurename}}{% - heading of the list of figures% - \IndexCmd{listfigurename}% - }% - \entry{\Macro{listtablename}}{% - heading of the list of tables% - \IndexCmd{listtablename}% - }% - \entry{\Macro{pagename}}{% - ``page'' in the pagination of letters% - \IndexCmd{pagename}% - }% - \entry{\Macro{partname}}{% - ``part'' in the heading of a part% - \IndexCmd{partname}% - }% - \entry{\Macro{prefacename}}{% - heading of the preface% - \IndexCmd{prefacename}% - }% - \entry{\Macro{proofname}}{% - prefix heading of mathematical proofs% - \IndexCmd{proofname}% - }% - \entry{\Macro{refname}}{% - heading of the list of references% - \IndexCmd{refname}% - }% - \entry{\Macro{seename}}{% - ``see'' in cross references of the index% - \IndexCmd{seename}% - }% - \entry{\Macro{tablename}}{% - prefix heading at table captions% - \IndexCmd{tablename}% - }% -\end{desclist} -% -\EndIndexGroup -% -\EndIndexGroup - - -\section{Identifying \KOMAScript} -\seclabel{identify} - -Although\,---\,or especially because\,---\,\Package{scrbase} is generally -designed as a package for authors of classes and packages, it is of course -used by the \KOMAScript{} classes and most \KOMAScript{} packages. It -therefore contains a that is present in all \KOMAScript{} classes -and all basic \KOMAScript{} packages. - -\begin{Declaration} - \Macro{KOMAScriptVersion} -\end{Declaration} -\KOMAScript{} defines the major version of \KOMAScript{} in this command. It -has the form ``\PName{date} \PName{version} \texttt{KOMA-Script}''. This major -version is same for all \KOMAScript{} classes and all \KOMAScript{} packages -used by the classes. For this reason, it can be queried after you -load \Package{scrbase}, too. For example, this guide was made using -\KOMAScript{} version ``\KOMAScriptVersion''. -% -\EndIndexGroup - - -\section{Extensions to the \LaTeX{} Kernel} -\seclabel{latexkernel} - -Sometimes the \LaTeX{} kernel itself provides commands but lacks other very -similar commands that would often be useful. A few such commands are provided -by \Package{scrbase} for authors of packages and classes. - -\begin{Declaration} - \Macro{ClassInfoNoLine}\Parameter{class name}\Parameter{information}% - \Macro{PackageInfoNoLine}\Parameter{package name}\Parameter{information}% -\end{Declaration}% -The \LaTeX{} kernel already provides authors of classes and packages commands -like \Macro{ClassInfo} and \Macro{PackageInfo} to write information, along -with the current line number, to the log file. In addition to -\Macro{PackageWarning} and \Macro{ClassWarning}, which throw warning messages -with line numbers, it also provides \Macro{PackageWarningNoLine} and -\Macro{ClassWarningNoLine} for warning messages without line numbers. However -the obvious commands \Macro{ClassInfoNoLine} and \Macro{PackageInfoNoLine}, -for writing information without line numbers into the log file, are missing. -The \Package{scrbase} package provides them. -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{l@addto@macro}\Parameter{command}\Parameter{extension}% -\end{Declaration}% -The \LaTeX{} kernel provides an internal command \Macro{g@addto@macro} to -extend the definition of macro \Macro{command} globally with -\PName{extension}. This works in this form only for macros that have no -arguments. However, sometimes you may need a command like this that works -locally within the current group. The \Package{scrbase} package provides such -a command with \Macro{l@addto@macro}. An alternative is to use the -\Package{etoolbox}\IndexPackage{etoolbox} or -\Package{xpatch}\IndexPackage{xpatch} package, which offers a whole range of -such commands for different purposes (see \cite{package:etoolbox} or -\cite{package:xpatch}).% -\EndIndexGroup - - -\section{Extensions to the Mathematical Features of \eTeX} -\seclabel{etex} - -\eTeX{}, which is used by \LaTeX{} and loaded by \KOMAScript{}, has extended -capabilities for calculating simple arithmetic with \TeX{} counters and -integers using \Macro{numexpr}\IndexCmd{numexpr}. The four basic arithmetic -operations and parentheses are supported. Division is rounded -correctly. Sometimes additional operators would be useful. - -\begin{Declaration} - \Macro{XdivY}\Parameter{dividend}\Parameter{divisor}% - \Macro{XmodY}\Parameter{dividend}\Parameter{divisor}% -\end{Declaration}% -The\ChangedAt{v3.05a}{\Package{scrbase}} \Macro{XdivY} command returns the -value of the integer quotient, with the \Macro{XmodY} command giving the value -of the remainder. This type of of division is defined by the equation -\[ -\textit{dividend} = \textit{divisor} \cdot -\textit{integer quotient} + \textit{remainder} -\] -where \textit{dividend}, \textit{divisor}, and \textit{remainder} are -integers, \textit{remainder} is greater or equal to 0 and less than -\textit{divisor}, and \textit{divisor} is a natural number greater than 0. - -You can assign the value to a counter or use it directly within an expression -using \Macro{numexpr}. To output the value as an Arabic number, you must -prefix it with \Macro{the}.% -% -\EndIndexGroup - - -\section[{General Mechanism for Multi-Level Hooks}] -{General Mechanism for Multi-Level - Hooks\ChangedAt[2019/01]{v3.27}{\Package{scrbase}}} -\seclabel{hooks} - -\BeginIndexGroup -\BeginIndex{}{Hooks} -The \LaTeX{} kernel provides a few \emph{hooks} in the processing of -a document where additional code can be inserted. Class and package authors -should be very familiar with \Macro{AtBeginDocument} and -\Macro{AtEndDocument}. \KOMAScript{} offers similar features in some places, -for example to hook code into the execution of -\hyperref[sec:maincls.structure]{sectioning commands}. Over the years, there -have been two problems: -\begin{itemize} - \item There are never enough hooks. - \item There is some code that should only be executed once, as if it almost - drops off the hook, as well as code that must be executed each time the - hook is encountered, thus remaining permanently on the hook. -\end{itemize} -Usually, to define a single hook you must define a command that collects the -code for each hook. This code is then stored in another internal macro, which -must be inserted at the point where the collected code is executed. The more -hooks you insert, the more such commands there are. To allow for both -single-use code and permanent code may even require two hooks, and therefore -twice the number of commands to be defined. - -The example of sectioning commands shows that the first problem can sometimes -be exacerbated by having only a single point for code execution. One package -author may need only one way to execute the same code for all sectioning -commands. Another package author would prefer to execute different code for -certain sectioning commands only. Meeting both these demands would require a -general hook as well as a hook for each sectioning command. These requirements -are doubled again because of the second problem. - -\KOMAScript{} therefore offers a generalized hook mechanism in -\Package{scrbase} that provides multi-level hooks for both single-use and -persistent code. These hooks are named \emph{do-hooks} because of their -implementation. From this also comes the names of the instructions by which -they are controlled. - -\begin{Declaration} - \Macro{ExecuteDoHook}\Parameter{specifier} -\end{Declaration} -Hooks\ChangedAt[2019/01]{v3.27}{\Package{scrbase}} are implemented with this -command. The \PName{specifier} determines the name or names of the hook. The -\PName{specifier} is always completely expanded for analysis. - -The \PName{specifier} generally consists of strings separated by forward -slashes (``/''). Initially, \Macro{ExecuteDoHook} divides the string at the -first slash. The first part is the name. The remainder (without the slash) is -the argument. Then the code for the hook with this name is executed. Next the -first part of the remaining string is divided again from the remainder, -combined with a slash after the name to form a new name, and the code with -this name is executed. This process continues until the code for the hook with -the name \PName{specifier} has been executed and the argument is empty. - -In the simplest case, the \PName{specifier} consists of a single name. In this -case, the persistent code is executed first, with an empty argument, for -exactly one hook specified by this name. - -At each stage of execution, single-use code is also executed after the hook's -persistent code, and then the single-use code is globally removed from the -hook. - -\begin{Example} - By inserting \DescRef{\LabelBase.cmd.ExecuteDoHook}% - \PParameter{heading/begingroup/\PName{name}} into the execution of each - sectioning command defined with - \DescRef{maincls-experts.cmd.DeclareSectionCommand}, the \KOMAScript{} - classes ultimately have six hooks inserted at that code-point, executed in - this order: - \begin{enumerate} - \item \PValue{heading} with the argument \PValue{begingroup/}\PName{name} - for persistent code, - \item \PValue{heading} with the argument \PValue{begingroup/}\PName{name} - for single-use code, - \item \PValue{heading/begingroup} with the argument \PName{name} for - persistent code, - \item \PValue{heading/begingroup} with the argument \PName{name} for - single-use code, - \item \PValue{heading/begingroup/}\PName{name} with an empty argument for - persistent code, - \item \PValue{heading/begingroup/}\PName{name} with an empty argument for - single-use code. - \end{enumerate} - The \PName{name} is the name of section level specified in - \DescRef{maincls-experts.cmd.DeclareSectionCommand}, - \DescRef{maincls-experts.cmd.DeclareNewSectionCommand} or - \DescRef{maincls-experts.cmd.ProvideSectionCommand}, or the sectioning - command specified by it, for example \PValue{chapter} or - \PValue{subparagraph}. Looking at the list above, and considering that there - are various sectioning commands, it becomes clear that the \PValue{heading} - and \PValue{heading/begingroup} hooks will be called multiple times for each - sectioning command.% -\end{Example}% -% -\EndIndexGroup - -\begin{Declaration} - \Macro{AddtoDoHook}\Parameter{name}\Parameter{command} - \Macro{AddtoOneTimeDoHook}\Parameter{name}\Parameter{command} -\end{Declaration} -\Macro{AddtoDoHook}\ChangedAt[2019/01]{v3.27}{\Package{scrbase}} appends -persistent code to the hook named \PName{name}. The code to be added is the -\PName{command}, to which the argument mentioned in the description of -\DescRef{\LabelBase.cmd.ExecuteDoHook} is appended as a parameter. -\begin{Example} - Suppose you want to count how many times the \Macro{section} command is - executed. This would be simple, continuing the previous example: -\begin{lstcode} - \newcounter{sectionCounter} - \AddtoDoHook{heading/begingroup/section} - {\stepcounter{sectionCounter}} -\end{lstcode} - However, in reality, \Macro{stepcounter}\PParameter{sectionCounter}% - \PParameter{} would be executed. Remember that an argument is always appended - as a parameter. In the case of the hook named - \PValue{heading/begingroup/section}, this argument is empty. Since an empty - parameter becomes an empty group here, it is better to consume this empty - parameter: -\begin{lstcode} - \newcommand*{\stepcountergobble}[2]{% - \stepcounter{#1}% - } - \AddtoDoHook{heading/begingroup/section} - {\stepcountergobble{sectionCounter}} -\end{lstcode} - Here, the appended, empty parameter of \Macro{stepcountergobble} is read but - not used. - - If instead of \Macro{section}, you want to count all sectioning commands, you - only need to change the hook name: -\begin{lstcode} - \AddtoDoHook{heading/begingroup} - {\stepcountergobble{sectionCounter}} -\end{lstcode} - By the way, the appended parameter is not empty in this case but contains the - name of the sectioning level or sectioning command. If you wanted to count - the sectioning commands individually, you could just use this: -\begin{lstcode} - \newcommand*{\stepCounter}[1]{% - \stepcounter{#1Counter}% - } - \AddtoDoHook{heading/begingroup} - {\stepCounter} -\end{lstcode} - Of course, you must also define the counters \Counter{partCounter}, - \Counter{chapterCounter} down to \Counter{subparagraphCounter}. -\end{Example} - -The \Macro{AddtoOneTimeDoHook} command works similarly but adds the -\PName{command} to the single-use code. This code will be globally removed -after the first execution.% -\EndIndexGroup - -\begin{Declaration} - \Macro{ForDoHook}\Parameter{specification}\Parameter{command} -\end{Declaration} -While\ChangedAt[2019/01]{v3.27}{\Package{scrbase}} -\DescRef{\LabelBase.cmd.ExecuteDoHook} executes the commands previously stored -with \DescRef{\LabelBase.cmd.AddtoDoHook} or -\DescRef{\LabelBase.cmd.AddtoOneTimeDoHook} for the hook given by the -\PName{specifier}, this macro executes the \PName{command} immediately. There -are two parameters added to the \PName{command}. The first is the hook's name; -the second, the hook's argument. - -This command is a byproduct of the implementation of -\DescRef{\LabelBase.cmd.ExecuteDoHook}. Normally, neither end users nor package -authors should need this command.% -\EndIndexGroup - -\begin{Declaration} - \Macro{SplitDoHook}\Parameter{specifier}\Parameter{head macro} - \Parameter{remainder macro} -\end{Declaration} -As\ChangedAt[2019/01]{v3.27}{\Package{scrbase}} can be seen from the preceding -explanations, the parameter of a \PName{command} added with -\DescRef{\LabelBase.cmd.AddtoDoHook} or -\DescRef{\LabelBase.cmd.AddtoOneTimeDoHook} can also be a multi-part -\PName{specifier}. You can use \Macro{SplitDoHook} to divide a -\PName{specifier} into the front element and the remainder. The -\PName{head macro} will be set to the front element. The \PName{remainder -macro} will be set to the rest. If there is no remainder left, the -\PName{remainder macro} is set to empty. If the \PName{specifier} was already -empty, a warning is issued and both the \PName{head macro} and the -\PName{remainder macro} are set to empty. - -\begin{Example} - If you want to increase a counter at the start of a group in which a heading - is issued but decrease it at the end, you can do this with two hooks: -\begin{lstcode} - \AddtoDoHook{heading/begingroup} - {\stepCounter} - \newcommand*{\restepCounter}[1]{% - \addtocounter{#1Counter}{-1}% - } - \AddtoDoHook{heading/endgroup} - {\restepCounter} -\end{lstcode} - But you could also use a single hook and split its parameters: -\begin{lstcode} - \newcommand*{\changeCounter}[1]{% - \SplitDoHook{#1}{\Group}{\Level}% - \Ifstr{\Group}{begingroup}{% - \stepcounter{\Level Counter}% - }{% - \Ifstr{\Group}{endgroup}{% - \addtocounter{\Level Counter}{-1}% - }{}% - }% - } - \AddtoDoHook{heading} - {\changeCounter} -\end{lstcode} - As you can see, the first solution is much simpler. In addition, it would - be easy to overlook including the empty group for the second false-case in - the second example. That would be fatal, however, as there make be other - hooks with named \PValue{heading} but with different arguments. -\end{Example} - -Strictly speaking, this command is a byproduct of the implementation of -\DescRef{\LabelBase.cmd.ForDoHook}.% -\EndIndexGroup -% -\EndIndexGroup - -\section{Obsolete Options and Commands} -\seclabel{obsolete} - -% TODO: Fix new translation -Prior release of \Package{scrbase} provided some options and commands that has -been removed or replaced meanwhile. Those are documented in this section only -for completeness but shouldn't be used any longer. -% :ODOT - -% \LoadNonFree{scrbase}{0}% not available in English -\begin{Explain} - \begin{Declaration} - \Macro{FamilyElseValues} - \end{Declaration} - Since version 3.12 the command is deprecated. Nevertheless, - \Package{scrbase} detects its use and issues a message requesting that you - update the code accordingly.% - \EndIndexGroup% - - - \begin{Declaration} - \OptionVName{internalonly}{value} - \end{Declaration} - Since version 3.28 this option is deprecated. For compatibility it is - processed (see \DescRef{\LabelBase.cmd.FamilyKeyStateProcessed}) but - ignored.% - \EndIndexGroup% -\end{Explain}% -% -\EndIndexGroup - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% ispell-local-dictionary: "en_GB" -%%% coding: utf-8 -%%% TeX-master: "../guide.tex" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrbookreportarticle-experts.tex b/macros/latex/contrib/koma-script/source-doc/english/scrbookreportarticle-experts.tex deleted file mode 100644 index 10616f7167..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrbookreportarticle-experts.tex +++ /dev/null @@ -1,1898 +0,0 @@ -% ====================================================================== -% scrbookreportarticle-experts.tex -% Copyright (c) Markus Kohm, 2001-2022 -% -% 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. -% ====================================================================== -% -% Chapter about scrbook, scrreprt, and scrartcl of the KOMA-Script guide -% expert part -% Maintained by Markus Kohm -% -% ============================================================================ - -\KOMAProvidesFile{scrbookreportarticle-experts.tex} - [$Date: 2022-02-16 11:28:04 +0100 (Mi, 16. Feb 2022) $ - KOMA-Script guide (chapter: scrbook, scrreprt, scrartcl for - experts)] - -\translator{Gernot Hassenpflug\and Markus Kohm\and Karl Hagen} - -% Date of the translated German file: 2022-02-02 - -\chapter[{Additional Information about the Main Classes and - \Package{scrextend}}]{Additional Information about the Main Classes - \Class{scrbook}, - \Class{scrreprt}, and \Class{scrartcl} as well as the Package - \Package{scrextend}} -\labelbase{maincls-experts} - -\BeginIndexGroup% -\BeginIndex{Class}{scrartcl}% -\BeginIndex{Class}{scrbook}% -\BeginIndex{Class}{scrreprt}% -\BeginIndex{Package}{scrextend}% -This chapter provides additional information about the \KOMAScript{} classes -\Class{scrbook}, \Class{scrreprt}, and \Class{scrartcl} and some commands that -are also available in \Package{scrextend}. \iffree{Some parts of the chapter - are found only in the German \KOMAScript{} book \cite{book:komascript}. This - should not be a problem because the}{The} average user, who only wants to -use the classes, will seldom need this information. Some of this information -is addressed to users with non-standard requirements or who want to write -their own classes based on a \KOMAScript{} class. Because such descriptions -are not addressed to beginners, they are condensed and require deeper -knowledge of \LaTeX. Other parts describe features that exist only for the -sake of compatibility with the standard classes or earlier versions of -\KOMAScript{}.\iffree{}{ - Portions that describe features that exist only for reasons of compatibility - with earlier versions of \KOMAScript{} are printed in sans serif font. You - should not use them any longer.} - -\LoadNonFree{scrbookreportarticle-experts}{0} - -\section{Extensions to User Commands} -\seclabel{addInfos} - -\LoadNonFree{scrbookreportarticle-experts}{1} - -\iffree{\LoadCommonFile{footnotes-experts}}{} - -\section{\KOMAScript's Interaction with Other Packages} -\seclabel{coexistence} - -\LoadNonFree{scrbookreportarticle-experts}{2} - - -\section{Detection of \KOMAScript{} Classes} -\seclabel{identify} - -Package authors sometimes need to detect a \KOMAScript{} class. Mostly this is -of little or no interest to the average user. To identify the version of -\KOMAScript{} that is being used, refer to -\DescRef{scrbase.cmd.KOMAScriptVersion} in \autoref{sec:scrbase.identify}, -\DescPageRef{scrbase.cmd.KOMAScriptVersion}. - -\begin{Declaration} - \Macro{KOMAClassName}% - \Macro{ClassName} -\end{Declaration} -\Macro{KOMAClassName} stores the name of the \KOMAScript{} class currently in -use. So if you want to know if a \KOMAScript{} class is used, you can easily -test for this command. In contrast, \Macro{ClassName} indicates which standard -class has been replaced by this \KOMAScript{} class. - -Note\textnote{Attention!} in this context, however, that the existence of -\DescRef{scrlogo.cmd.KOMAScript}\IndexCmd{KOMAScript} cannot guarantee that a -\KOMAScript{} class is in use. For one thing, all \KOMAScript{} packages -define this command. For another, other packages may find it useful to define -the \KOMAScript{} label using this name.% -% -\EndIndexGroup - -\section{Entries to the Table of Contents} -\seclabel{toc} - -\KOMAScript{} classes provide advanced methods for generating and -manipulating entries in the table of contents. Some of these are based on -the \Package{tocbasic} package (see \autoref{sec:tocbasic.tocstyle} starting -on \autopageref{sec:tocbasic.tocstyle}). Other are implemented directly in the -classes. - -\begin{Declaration} - \Macro{raggedchapterentry} -\end{Declaration} -In\ChangedAt{v3.21}{\Class{scrbook}\and \Class{scrreprt}} earlier versions of -\KOMAScript{}, it was possible to define the \Macro{raggedchapterentry} macro -as \Macro{raggedright} to print chapter entries in the table of contents -left-aligned instead of fully justified. Officially, this feature has not -existed in \KOMAScript{} since version~3.21. - -In fact, the \PValue{raggedentrytext} attribute for the \PValue{tocline} -TOC-entry style of the \Package{tocbasic}\IndexPackage{tocbasic} package is -implemented by setting the \Macro{ragged\PName{entry level}entry} macro to -either \Macro{relax} or \Macro{raggedright}. This attribute is evaluated by -checking whether the corresponding macro is defined as \Macro{raggedright}. If -so, the text is printed left-aligned. With any other definition, no ragged -margins are used. - -Since it was previously documented that \Macro{raggedchapterentry} should not -be defined as anything other than \Macro{raggedright}, this behaviour is -compatible with the documented behaviour of earlier versions. As noted in -earlier releases, other definitions of \Macro{raggedchapterentry}\,---\,and -now also of \Macro{raggedsectionentry} and similar macros for other entry -levels\,---\,may lead to unexpected results. - -You should select the desired justification for the all table-of-contents -entries using the \PValue{raggedentrytext} attribute of \PValue{tocline} -rather than attempting to set the attribute for specific entry levels.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{addtocentrydefault}\Parameter{level}\Parameter{number}% - \Parameter{heading} -\end{Declaration} -The\ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} \KOMAScript{} classes do not use -\Macro{addcontentsline}\IndexCmd{addcontentsline}% -\important{\Macro{addcontentsline}} directly to make entries in the table of -contents. Instead, they call \Macro{addtocentrydefault} with similar -arguments. The command can be used for both numbered and unnumbered entries. -The \PName{level} is the sectioning level, that is \PValue{part}, -\PValue{chapter}, \PValue{section}, \PValue{subsection}, -\PValue{subsubsection}, \PValue{paragraph}, or \PValue{subparagraph}. The -formatted sectioning number is given the second argument, \PName{number}. This -argument can be empty. The text of the entry is given by the \PName{heading} -argument. You should protect fragile commands inside this argument with -\Macro{protect}\IndexCmd{protect}\important{\Macro{protect}}. - -One notable feature of the \PName{number} argument is that an empty argument -indicates that an unnumbered entry should be generated. By default, -\KOMAScript{} uses -\begin{quote} - \Macro{addcontentsline}\PParameter{toc}\Parameter{level}% - \Parameter{heading} -\end{quote} -for this. If the argument is not empty, however, an entry with number -will be created and \PName{number} is the formatted heading -number. \KOMAScript{} uses -\begin{quote}\raggedright - \Macro{addcontentsline}\PParameter{toc}\Parameter{level}% - \PParameter{\%\\ - \quad\Macro{protect}\DescRef{tocbasic.cmd.numberline}\Parameter{number}% - \PName{heading}\%\\ - } -\end{quote} -to create this entry. - -Package authors and authors of wrapper classes can redefine this command to -alter the entries. For example\textnote{Example}, you could use -\begin{lstcode} - \renewcommand{\addtocentrydefault}[3]{% - \IfArgIsEmpty{#3}{% - \IfArgIsEmpty{#2}{% - \addcontentsline{toc}{#1}{#3}% - }{% - \addcontentsline{toc}{#1}{\protect\numberline{#2}#3}% - }% - }% - }% -\end{lstcode} -to\IndexCmd{IfArgIsEmpty} omit entries with an empty \PName{heading}. In -practice, such a change is not necessary because the \KOMAScript{} classes -already use another method to suppress empty entries. See the description of -the sectioning commands in \autoref{sec:maincls.structure}, starting on -\DescPageRef{maincls.cmd.part} for this.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{addparttocentry}\Parameter{number}\Parameter{heading} - \Macro{addchaptertocentry}\Parameter{number}\Parameter{heading} - \Macro{addsectiontocentry}\Parameter{number}\Parameter{heading} - \Macro{addsubsectiontocentry}\Parameter{number}\Parameter{heading} - \Macro{addsubsubsectiontocentry}\Parameter{number}\Parameter{heading} - \Macro{addparagraphtocentry}\Parameter{number}\Parameter{heading} - \Macro{addsubparagraphtocentry}\Parameter{number}\Parameter{heading} -\end{Declaration}% -The\ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} \KOMAScript{} classes call the previously described -command -\DescRef{\LabelBase.cmd.addtocentrydefault}\IndexCmd{addtocentrydefault}% -\important{\DescRef{\LabelBase.cmd.addtocentrydefault}} directly only if no -individual command for the \PName{level} has been defined or if that command -is \Macro{relax}\IndexCmd{relax}\important{\Macro{relax}}. By default, all -these commands simply pass their own \PName{level} and arguments directly to -\DescRef{\LabelBase.cmd.addtocentrydefault}.% -% -\EndIndexGroup - - -\section{Font Settings} -\seclabel{fonts} - -\KOMAScript{} classes not only provide an extended selection of basic font -sizes, but they also let you define, manipulate, and apply elements with -their own font settings. - -% Note: Instead of -% \LoadNonFree{scrbookreportarticle-experts}{5} -% here is the content of that file: -\begin{Declaration} - \Macro{@fontsizefilebase}% - \Macro{changefontsizes}\Parameter{font size} -\end{Declaration} -The \File{scrsize} prefix for file names of font-size files described -in \autoref{sec:maincls-experts.addInfos}\iffree{}{ on -\DescPageRef{maincls-experts.option.fontsize}} is just the default for the -internal \Macro{@fontsizefilebase}\IndexCmd{@fontsizefilebase} macro. This -default is used only when the macro is not yet defined when loading a -\KOMAScript{} class or the \Package{scrextend} package. Authors of wrapper -classes can redefine this macro to use completely different font-size files. -Similarly\textnote{Hint!} authors of wrapper classes can change or deactivate -the fallback solution for unknown font sizes by redefining the -\Macro{changefontsizes}\important{\Macro{changefontsizes}} macro. This macro -has exactly one argument: the desired \PName{font size}. -However\textnote{Attention!}, the \Macro{changefontsizes} macro is not -designed as an end-user instruction.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{newkomafont}\OParameter{warning}\Parameter{element}% - \Parameter{default}% - \Macro{aliaskomafont}\Parameter{alias}\Parameter{element} -\end{Declaration} -Experts can use \Macro{newkomafont} to define a \PName{default} for the font -style of an \PName{element}. Subsequently, that default can be changed with -the \DescRef{maincls.cmd.setkomafont} and \DescRef{maincls.cmd.addtokomafont} -commands (see \autoref{sec:maincls.textmarkup}, -\DescPageRef{maincls.cmd.setkomafont}). Of course, merely defining the font -style does not actually put it to use. You must make sure you include the -\DescRef{maincls.cmd.usekomafont}% -\important{\DescRef{maincls.cmd.usekomafont}}\IndexCmd{usekomafont} command -(see \DescPageRef{maincls.cmd.usekomafont}) for this \PName{element} in your -code at the appropriate places. Calling \Macro{newkomafont} for an existing -element will result in error messages. - -The optional \PName{warning} argument defines a warning message. The -\KOMAScript{} classes output it with \Macro{ClassWarning}, and the -\Package{scrextend} package with \Macro{PackageWarning}, whenever the default -font style of that \PName{element} is changed. The package \Package{scrkbase} -is listed as the generator of the warning. - -The \Macro{aliaskomafont} command defines an \PName{alias} for a previously -defined \PName{element}. \KOMAScript{} informs the user in the \File{log} file -about the actual name of the element if it uses an \PName{alias}. -You\textnote{Hint!} can use an \PName{alias}, for example, if you think of a -better name for an element and the old name should remain usable for the sake -of compatibility. It can also increase user-friendliness by creating aliases -for all the terms that different users may intuitively choose. \KOMAScript{} -itself makes use of this possibility.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{addtokomafontrelaxlist}\Parameter{macro} - \Macro{addtokomafontonearglist}\Parameter{macro} - \Macro{addtokomafontgobblelist}\Parameter{macro} -\end{Declaration} -As already mentioned in \autoref{part:forAuthors} of this manual, font -settings of elements should consist only of commands to select the size, -family, encoding, series, shape, or colour. Colour changes are not -always transparent in \LaTeX{} and therefore can cause in unwanted side-effects -if you use \DescRef{maincls.cmd.usekomafont} at an inappropriate place. - -Users tend to put very different, sometimes critical, things into the font -setting of an element, such as \Macro{MakeUppercase} at the very end of the -setting. As much as possible, the internal use of the font settings has been -implemented so that many of these prohibited elements still do no harm, and it -usually works even if the last command in a font setting expects an argument, -for example using \Macro{textbf} instead of \Macro{bfseries}. But there is no -guarantee for that. - -Internally, \KOMAScript{} must sometimes limit font changes to real font -settings. This is accomplished, for example, by using -\DescRef{maincls.cmd.usefontofkomafont}% -\IndexCmd{usefontofkomafont}% -\IndexCmd{usesizeofkomafont}\IndexCmd{useencodingofkomafont}% -\IndexCmd{usefamilyofkomafont}\IndexCmd{useseriesofkomafont}% -\IndexCmd{useshapeofkomafont} instead of \DescRef{maincls.cmd.usekomafont} -(see \autoref{sec:maincls.textmarkup}, -\DescPageRef{maincls.cmd.usefontofkomafont}). - -Nevertheless, the \DescRef{maincls.cmd.usefontofkomafont} command and its -siblings have their limitations. Therefore you must not use a command that -always needs a fully expandable argument inside the font setting of an -element. But this is exactly what \Macro{MakeUppercase} needs. -Therefore\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and -\Class{scrartcl}} \KOMAScript{} maintains an internal list of macros that -should become \Macro{relax} inside \DescRef{maincls.cmd.usefontofkomafont} and -its siblings. Since \KOMAScript~3.24\ChangedAt{v3.24}{\Class{scrbook}\and -\Class{scrreprt}\and \Class{scrartcl}} only \Macro{normalcolor} is added to -this list by default. - -Note that the given \PName{macro} is actually just set to \Macro{relax}. So -any arguments within the font setting will be executed locally, if applicable. -Therefore you should never add commands like \Macro{setlength} to the list. -You are responsible for all errors resulting caused by using -\Macro{addtokomafontrelaxlist}. Also, do not take this command as license to -add all sorts of commands to the font settings! - -For\ChangedAt{v3.24}{\Class{scrbook}\and \Class{scrreprt}\and -\Class{scrartcl}} commands whose first argument should be executed without an -additional group, there is \Macro{addtokomatfontonearglist}. The specified -macro is set to \Macro{@firstofone}. By default \Macro{MakeUppercase} and -\Macro{MakeLowercase} are added to this list. - -If\ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}\and -\Class{scrartcl}}, on the other hand, a \PName{macro} and its first argument -should be ignored locally inside \DescRef{maincls.cmd.usefontofkomafont} and -its siblings, you can use \Macro{addtokomafontgobblelist} instead of -\Macro{addtokomafontrelaxlist}. An example of this is the command -\Macro{color}, which must be ignored along with the colour name and therefore -is a member of this list by default. - -Note the defaults of these three lists may change in future version. If you -need a certain commands in one of the lists, you should should explicitly add -them yourself.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{IfExistskomafont}\Parameter{element}\Parameter{then code}% - \Parameter{else code} - \Macro{IfIsAliaskomafont}\Parameter{element}\Parameter{then code}% - \Parameter{else code} -\end{Declaration} -Which\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}\and \Class{scrlttr2}} elements are defined depends on the -version of \KOMAScript. So it sometimes makes sense to test in advance whether -a specific \PName{element} even exists. The \Macro{IfExistskomafont} command -executes the \PName{then code} if and only if an \PName{element} has been -defined using \DescRef{\LabelBase.cmd.newkomafont} or -\DescRef{\LabelBase.cmd.aliaskomafont} and therefore can also be changed using -\DescRef{maincls.cmd.setkomafont} or \DescRef{maincls.cmd.addtokomafont} and -can be used by one of the \Macro{use\dots komafont} commands. Otherwise it -executes the \PName{else code}.% - -In contrast, \Macro{IfIsAliaskomafont}\ChangedAt{v3.25}{\Class{scrbook}\and -\Class{scrreprt}\and \Class{scrartcl}\and \Class{scrlttr2}} executes -\PName{then code} only if \PName{element} has been defined with -\DescRef{\LabelBase.cmd.aliaskomafont} as an alias of another element. For -undefined elements as well as for elements defined with -\DescRef{\LabelBase.cmd.newkomafont}, however, it executes the -\PName{else code}.% -\EndIndexGroup - -\section{Paragraph Indention or Gap} -\seclabel{parskip} - -Because the \KOMAScript{} classes offer extended features for setting the -paragraph indention or gap, direct changes of the standard lengths -\Length{parskip}\IndexLength{parskip}, \Length{parindent}\IndexLength{parskip} -and \Length{parfillskip}\IndexLength{parskip} are not only unnecessary but -mostly inadvisable. - -\begin{Declaration} - \Macro{setparsizes}\Parameter{indent}\Parameter{distance} - \Parameter{last-line end space} -\end{Declaration} -\KOMAScript{} provides the option to set the indent of the first line of a new -paragraph, the distance between paragraphs, and the white space required at the -end of the last line of each paragraph. You should use this command whenever -the \OptionValueRef{maincls}{parskip}{relative} option should recognize these -changes. \KOMAScript{}\textnote{example} itself uses this command, for -example, in the form -\begin{lstcode} - \setparsizes{0pt}{0pt}{0pt plus 1fil} -\end{lstcode} -to eliminate both the paragraph indentation and inter-paragraph spacing, as -well as to allow any amount of white space at the end of the last line of the -paragraph. Such values are useful if a paragraph consists of only a box that -should be printed without vertical spacing and filling the whole column -width. If, on the other hand, the box should only span the whole width but use -the current settings for indentation and distance between paragraphs, then -\begin{lstcode} - \setlength{\parfillskip}{0pt plus 1fil} -\end{lstcode} -is preferable. - -Starting with \KOMAScript~3.17\ChangedAt{v3.17}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}}, recalculating or -reactivating\IndexCmd{activateareas} the type area or the margins (see -\autoref{cha:typearea}) also readjusts the values of \Macro{setparsizes} if -they have not been changed in the meantime. This is one more reason not to -change these values without using \KOMAScript. Setting compatibility to a -\KOMAScript{} version prior to 3.17 (see -\autoref{sec:maincls.compatibilityOptions}, -\DescPageRef{maincls.option.version}, option \DescRef{maincls.option.version}% -\IndexOption{version}\important{\OptionValueRef{maincls}{version}{3.17}}) -disables this recalculation.% -% -\EndIndexGroup - -\section{Counters} -\seclabel{counter} - -\LoadNonFree{scrbookreportarticle-experts}{3} - -\section{Sections} -\seclabel{sections} - -The \KOMAScript{} classes provide a wide range of options for modifying -sectioning levels and their corresponding headings. You can even define new -levels. - -\begin{Declaration} - \Macro{DeclareSectionCommand}\OParameter{attributes}\Parameter{name}% - \Macro{DeclareNewSectionCommand}\OParameter{attributes}\Parameter{name}% - \Macro{RedeclareSectionCommand}\OParameter{attributes}\Parameter{name}% - \Macro{ProvideSectionCommand}\OParameter{attributes}\Parameter{name} -\end{Declaration} -With\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} these commands you can either define a new sectioning -command, \Macro{\PName{name}}, or modify an existing sectioning command, -\Macro{\PName{name}}. To do so, you use the optional argument to set several -\PName{attributes}. The \PName{attributes} are a comma-separated list of -\PName{key}=\PName{value} assignments. In addition to the style-independent -attributes shown in \autoref{tab:maincls-experts.declaresection.keys}, -\autopageref{tab:maincls-experts.declaresection.keys}, there are also -attributes that depend on the style. Currently the following styles are -available: -\begin{description}\setkomafont{descriptionlabel}{} -\item[\PValue{chapter}:] \ChangedAt{v3.18}{\Class{scrbook}\and - \Class{scrreprt}}The style for chapter headings. This style is used by - default for \DescRef{maincls.cmd.chapter}\IndexCmd{chapter} and indirectly - for \DescRef{maincls.cmd.addchap}\IndexCmd{addchap}. You can define new - sectioning commands using this style, but then they do not automatically - have an \Macro{add\dots} variant. To configure existing or new sectioning - commands, you can also use the attributes of - \autoref{tab:maincls-experts.declarechapterstyle.keys}, - \autopageref{tab:maincls-experts.declarechapterstyle.keys}. - The\textnote{Attention!} \DescRef{maincls.cmd.addchap} command, - like the starred variants, is configured automatically with - \DescRef{maincls.cmd.chapter} and cannot be modified independently. Note - that \Class{scrartcl}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} does not - provide this style. -\item[\PValue{part}:] \ChangedAt{v3.18}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}}The style for part headings. This - style is used by default for \DescRef{maincls.cmd.part}\IndexCmd{part} and - indirectly for \DescRef{maincls.cmd.addpart}\IndexCmd{addpart}. You can - define new sectioning commands using this style, but then they do not - automatically have an \Macro{add\dots} variant. To configure existing or new - sectioning commands, you can also use the attributes of - \autoref{tab:maincls-experts.declarepartstyle.keys}, - \autopageref{tab:maincls-experts.declarepartstyle.keys}. - Note\textnote{Attention!} that the \DescRef{maincls.cmd.addpart} command, - like the starred variants, is configured automatically with - \DescRef{maincls.cmd.part} and cannot be modified independently. -\item[\PValue{section}:] The style for section headings. This style is currently - used for \DescRef{maincls.cmd.section}\IndexCmd{section}, - \DescRef{maincls.cmd.subsection}\IndexCmd{subsection}, - \DescRef{maincls.cmd.subsubsection}\IndexCmd{subsubsection}, - \DescRef{maincls.cmd.paragraph}\IndexCmd{paragraph}, and - \DescRef{maincls.cmd.subparagraph}\IndexCmd{subparagraph}. You can define - new sectioning commands using this style. To configure existing or new - sectioning commands, you can also use the attributes of - \autoref{tab:maincls-experts.declaresectionstyle.keys}, - \autopageref{tab:maincls-experts.declaresectionstyle.keys}. When redefining - a command, the \ChangedAt{v3.24}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}} \PName{key}s - \PValue{style}, \PValue{afterskip}, \PValue{beforeskip}, and \PValue{level} - are mandatory. The keys - \PValue{afterindent}\ChangedAt{v3.26}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}},\PValue{font} and \PValue{indent} - are recommended. \PValue{tocindent} and - \PValue{tocnumwidth} may also be required depending on the command's - \PName{name}. This also applies if a command that was not previously a - sectioning command is redefined as a sectioning command using - \Macro{RedeclareSectionCommand}. Note\textnote{Attention!} that the - \Macro{addsec} command and its starred variants are configured automatically - with \DescRef{maincls.cmd.section} and cannot be changed independently. -\end{description} -Defining a sectioning command also creates an element with the same -\PName{name}, if it does not already exist. For \PValue{chapter} and -\PValue{part}, elements are also created for the prefix line. You can change -its font settings using \DescRef{maincls.cmd.setkomafont} or -\DescRef{maincls.cmd.addtokomafont} (see \autoref{sec:maincls.textmarkup}, -\DescPageRef{maincls.cmd.setkomafont}). - -\begin{table} - \caption[{Style-independent attributes for declaring sectioning - commands}]{Available \PName{key}s and \PName{value}s for - style-independent \PName{attributes} when declaring sectioning command}% - \label{tab:maincls-experts.declaresection.keys}% - \begin{tabularx}{\linewidth}{llX} - \toprule - \PName{key} & \PName{value} & Description \\ - \midrule% - \PValue{counterwithin} - & \PName{counter name} - & The value of the counter of the heading should depend on \PName{counter - name}. Whenever \Macro{stepcounter} or \Macro{refstepcounter} increases - the value of \PName{counter name}, the value of the counter of this - heading is reset to 0. In addition, \Macro{the\PName{counter name}} is - prefixed with a dot when this counter is output.\\ - \PValue{counterwithout}% - \ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - & \PName{counter name} - & Cancels a prior \PValue{counterwithin} setting. Therefore it makes sense - only if you redefine an existing sectioning command.\\ - \PValue{expandtopt} - & \PName{switch} - & If the switch is on, all subsequent values for lengths will be - completely expanded, evaluated, and stored as \texttt{pt} values when - they are defined. This means lengths no longer depend on the current - font size. If the switch is off, all subsequent values for lengths will - be tentatively expanded and evaluated but stored for full evaluation at - application time. You can use any values from - \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. - The default is \PValue{false}.\\ - \PValue{level} - & \PName{integer} - & The numerical value of the sectioning level (see the - \DescRef{maincls.counter.secnumdepth} counter, - \autoref{sec:maincls.structure}, - \DescPageRef{maincls.counter.secnumdepth}); the value should be unique - and is mandatory for new levels.\\ - \PValue{style} - & \PName{name} - & Defines the style of the heading.\\ - \ChangedAt{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - \PValue{tocstyle} - & \PName{name} - & Defines the style of the entries in the table of contents. You can use - every previously defined TOC-entry style (see - \autoref{sec:tocbasic.tocstyle}). An empty \PName{name} prevents a new - definition of the TOC-entry command \Macro{l@\dots}.\\ - \ChangedAt{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - \PValue{toc\PName{option}} - & \PName{value} - & Additional options depending on the TOC-entry style selected with - \Option{tocstyle}. See \autoref{sec:tocbasic.tocstyle}, - \autopageref{sec:tocbasic.tocstyle} for additional information about - TOC-entry styles. You can find the attributes that can be used as - \PName{option}s for the predefined TOC-entry styles of the - \Package{tocbasic} package in - \autoref{tab:tocbasic.tocstyle.attributes}, - \autopageref{tab:tocbasic.tocstyle.attributes}.\\ - % \PValue{tocindent} - % & \PName{length} - % & Total indentation from the left margin of the entry in the table of - % contents corresponding to this heading, if and only if such an - % entry will be made (see \DescRef{maincls.counter.tocdepth}, - % \autoref{sec:maincls.toc}, \DescPageRef{maincls.counter.tocdepth}).\\ - % \PValue{toclevel} - % & \PName{integer} - % & A number denoting the depth of the entry in the table of contents - % corresponding to this heading, if this should differ from - % \PValue{level} (see \DescRef{maincls.counter.tocdepth}, - % \autoref{sec:maincls.toc}, \DescPageRef{maincls.counter.tocdepth}). \\ - % \PValue{tocnumwidth} - % & \PName{length} - % & Width of the box for the number of the entry in the table of - % contents.\\ - \bottomrule - \end{tabularx} -\end{table} - -\begin{table} - \caption[{Attributes of the \PValue{section} style when declaring a - sectioning command}]{Additional \PName{key}s and \PName{value}s for - attributes when declaring a sectioning command with the \PValue{section} - style}% - \label{tab:maincls-experts.declaresectionstyle.keys}% - \begin{tabularx}{\linewidth}{llX} - \toprule - \PName{key} & \PName{value} & Description \\ - \midrule - \PValue{afterindent}% - \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - & \PName{switch} - & The \PName{switch} determines whether the current paragraph indent is - applied to the first line following a freestanding heading (see - \PValue{runin}). With the default, \PValue{bysign}, the sign of - \PValue{beforeskip} determines the behaviour. If the value of - \PValue{beforeskip} is negative, the indentation of the first paragraph - following the heading is suppressed. You can use any value from - \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} to - explicitly enable or disable this indentation.\\ - \PValue{afterskip} - & \PName{length} - & In the case of a run-in heading (see \PValue{runin}), the absolute value - of the \PName{length} is the horizontal space after the heading. That is, - a positive distance is always inserted. In the case of a freestanding - heading, the \PName{length} is the vertical skip below the heading. With - \OptionValue{runin}{bysign}, a positive value results in a freestanding - heading, while a negative value or zero results in a run-in heading.\\ - \PValue{beforeskip} - & \PName{length} - & Specifies the vertical space before the heading. With - \OptionValue{afterindent}{bysign}, if the value is negative, a positive - distance\,---\,the amount of \PName{length}\,---\,is still inserted, but - in this case the indentation of the paragraph following the heading is - suppressed.\\ - \PValue{font} - & \PName{font commands} - & The font settings that should be used for the heading in addition to - \DescRef{maincls.fontelement.disposition}. You can use all settings that - are allowed for \DescRef{maincls.cmd.setkomafont} and - \DescRef{maincls.cmd.addtokomafont} for the element of the heading.\\ - \PValue{indent} - & \PName{length} - & The indentation of heading from the left margin.\\ - \PValue{runin} - \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - & \PName{switch} - & Defines whether to use a run-in or a freestanding heading. With - the default, \PValue{bysign}, the sign of \PValue{afterskip} determines - the behaviour. In this case, a positive value of \PValue{afterskip} - results in a freestanding heading. You can use any values from - \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} to - explicitly enable or disable a run-in heading.\\ - \bottomrule - \end{tabularx} -\end{table} - -\begin{table} - \caption[{Attributes of the \PValue{chapter} style when declaring a - sectioning command}]{Additional \PName{keys} and \PName{value}s for - attributes when declaring a sectioning command with the \PValue{chapter} - style}% - \label{tab:maincls-experts.declarechapterstyle.keys}% - \begin{tabularx}{\linewidth}{llX} - \toprule - \PName{key} & \PName{value} & Description \\ - \midrule - \PValue{afterindent}% - \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - & \PName{switch} - & The \PName{switch} determines whether to apply the indentation of the - first paragraph following a heading. With the default, \PValue{bysign}, - the sign of \PValue{beforeskip} defines the behaviour. If the value of - \PValue{beforeskip} is negative, the indentation of the paragraph - following the heading is suppressed. You can use any value from - \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} to - explicitly enable or disable this indentation.\\ - \PValue{afterskip}% - \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - & \PName{length} - & The vertical skip below the heading.\\ - \PValue{beforeskip} - & \PName{length} - & The vertical skip before the heading. With - \OptionValue{afterindent}{bysign}, if the value is negative, a positive - distance\,---\,the amount of \PName{length}\,---\,is still inserted, but - in this case the indentation of the first paragraph following the heading - is suppressed.\\ - \PValue{font} & \PName{font commands} & The font setting to use for the - heading in addition to \DescRef{maincls.fontelement.disposition}. You - can use all settings, that are allowed for - \DescRef{maincls.cmd.setkomafont} and - \DescRef{maincls.cmd.addtokomafont} for this element.\\ - \PValue{innerskip} & \PName{length} & The vertical skip between the prefix - line and the heading's text, if a prefix line is used.\\ - \PValue{pagestyle} & \PName{page style name} & The name of the page style - to use automatically for pages with the heading. There is no check to - see if the \PName{page style name} is valid. Therefore, incorrect names - will result in error messages when the sectioning command is used.\\ - \PValue{prefixfont} & \PName{font commands} & The font setting to use - for the prefix line of the heading, in addition to the - \DescRef{maincls.fontelement.disposition} and sectioning command - elements. You can use all settings that are allowed for - \DescRef{maincls.cmd.setkomafont} and - \DescRef{maincls.cmd.addtokomafont} for the element of the prefix - line.\\ - \bottomrule - \end{tabularx} -\end{table} - -\begin{table} - \caption[{Attributes of the \PValue{part} style when declaring a sectioning - command}]{Additional \PName{keys} and \PName{value}s for attributes - when declaring a sectioning command with the \PValue{part} style}% - \label{tab:maincls-experts.declarepartstyle.keys}% - \begin{tabularx}{\linewidth}{llX} - \toprule - \PName{key} & \PName{value} & Description \\ - \midrule - \PValue{afterindent}% - \ChangedAt{v3.26}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - & \PName{switch} - & The \PName{switch} determines whether to apply the indentation of the - first paragraph following a heading. With the value \PValue{bysign}, - the sign of \PValue{beforeskip} determines the behaviour. If the value - of \PValue{beforeskip} is negative, the indentation of the first - paragraph following the heading is suppressed. You can use any value - from \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} to - explicitly enable or disable this indentation. For compatibility, - the default is \PValue{false} for \Class{scrartcl} and \PValue{true} for - \Class{scrbook} and \Class{scrreprt}.\\ - \PValue{afterskip} & \PName{length} & The value is the vertical skip below - the heading.\\ - \PValue{beforeskip} - & \PName{length} - & The vertical skip before the heading. With - \OptionValue{afterindent}{bysign}, if the value is negative, a positive - distance\,---\,the amount of \PName{length}\,---\,is still inserted, but - in this case the indentation of the first paragraph following the heading - is suppressed.\\ - \PValue{font} & \PName{font commands} & The font setting to use for the - heading in addition to \DescRef{maincls.fontelement.disposition}. You - can use all settings that are allowed for - \DescRef{maincls.cmd.setkomafont} and - \DescRef{maincls.cmd.addtokomafont} for the element of the heading.\\ - \PValue{innerskip} & \PName{length} & % \OnlyAt{\Class{scrbook}\and - % \Class{scrreprt}}% - The vertical skip between the prefix line and the heading text in - \Class{scrbook} and \Class{scrreprt}.\\ - \PValue{pagestyle} & \PName{page style name} & - % \OnlyAt{\Class{scrbook}\and - % \Class{scrreprt}}% - The name of the page style to use automatically on pages with the - heading. There is no check to see if \PName{page style name} is valid. - Therefore, incorrect names will result in error messages when the - sectioning command is used. This feature only exists in \Class{scrbook} - and\Class{scrreprt}.\\ - \PValue{prefixfont} & \PName{font commands} & The font setting to use for - the prefix line of the heading, in addition to the - \DescRef{maincls.fontelement.disposition} and sectioning command - elements. You can use all settings that are allowed for - \DescRef{maincls.cmd.setkomafont} and - \DescRef{maincls.cmd.addtokomafont} for the element of the prefix - line.\\ - \bottomrule - \end{tabularx} -\end{table} - -\Macro{DeclareNewSectionCommand} defines a new sectioning command. If the -same \PName{name} is already used by \TeX{} for something else, the command -will result in an error message and will not define anything. - -\Macro{ProvideSectionSommand} behaves similarly but does not issue an error -message. - -\Macro{RedeclareSectionCommand}, on the other hand, can only change an -existing command to a sectioning command with the specified -\PName{attributes}. It does not check whether \Macro{\PName{name}} is already -a sectioning command. It only needs to be a \PName{name} already a \TeX -command. - -\Macro{DeclareSectionCommand} does not check whether or not \PName{name} is -an existing \TeX{} command name. It just defines a sectioning -command \Macro{\PName{name}} with the specified \PName{attributes}. - -Each sectioning command also has a corresponding counter with the same -\PName{name} that is allocated with \Macro{newcounter} if necessary. The same -naming rule applies to the corresponding output of the counter -(\Macro{the\PName{name}}), the counter's format (\Macro{\PName{name}format}), -the command to generate a running head (\Macro{\PName{name}mark}), the format -of the counter in the running head (\Macro{\PName{name}markformat}), the font -element (\FontElement{\PName{name}}), and the section-depth number -(\Macro{\PName{name}numdepth}). The command for the running head, -\Macro{\PName{name}mark}, is defined by default not to generate a running -head. The default output of the counter \Macro{the\PName{name}} is an Arabic -number. If the counter is defined as depending on another counter with the -\PValue{counterwithin} \PName{key}, the output of this counter will be -prefixed by a dot. - -In\ChangedAt[2016/03]{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} addition to the sectioning command itself, a command for -corresponding entries to the table of contents is also defined. This is done -using the \hyperref[cha:tocbasic]{\Package{tocbasic}}% -\important{\hyperref[cha:tocbasic]{\Package{tocbasic}}}\IndexPackage{tocbasic} -package. The \PName{tocstyle} attribute defines the style of those entries. If -you set an empty \PName{name}, e.\,g. using \OptionValue{tocstyle}{} or -\OptionValue{tocstyle}{\{\}}, the command for the TOC entry will not be -changed. This is important, for example, if you use another package to modify -the table of contents. If you do not set the \PValue{tocstyle} attribute, the -previous style will be used again during the redefinition. - -The\ChangedAt[2016/03]{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} different TOC-entry styles also have different additional -attributes. You can set them directly if you prefix them with \PValue{toc}. -For example, you can set the level of the TOC entries, \PValue{level}, using -\PValue{toclevel}, the indention, \PValue{indent}, using \PValue{tocindent}, -or the number width, \PValue{numwidth}, using \PValue{tocnumwidth}. For more -TOC-entry style attributes see \autoref{sec:tocbasic.tocstyle}, -\autopageref{sec:tocbasic.tocstyle}. - -\begin{Example} - For some unknown reason, you want to redefine the - \DescRef{maincls.cmd.paragraph} headings so that they are no longer run-in - headings but are similar to \DescRef{maincls.cmd.subsubsection}. The - vertical skip above the heading should be 10\Unit{pt} and no additional - vertical skip below the heading. To do so, you can use: -\begin{lstcode} - \RedeclareSectionCommand[% - beforeskip=-10pt,% - afterskip=1sp% - ]{paragraph} -\end{lstcode} - The negative value of \PValue{beforeskip} creates a positive vertical skip - before the heading and simultaneously disables the paragraph indentation of - the following text. Even though the specification did not want any vertical - skip after the heading, a value of 1\Unit{sp} has been given here. This is - because \LaTeX{} doesn't recognize 0\Unit{pt} as positive value. So - 1\Unit{sp} is the smallest possible positive value. - - Generally, it is better to have some tolerance for adjusting the vertical - spacing, the so-called \emph{glue}: -\begin{lstcode} - \RedeclareSectionCommand[% - beforeskip=-10pt plus -2pt minus -1pt,% - afterskip=1sp plus -1sp minus 1sp% - ]{paragraph} -\end{lstcode} - Note that the glue also switches the algebraic sign before becoming a skip, - if the value is negative. That is the reason for the negative glue values in - the example. Additionally we used the occasion to minimize the vertical skip - after the heading using glue too. -\end{Example} - -In the example above, we only needed to define the keys \PValue{beforeskip} -and \PValue{afterskip} because since v3.15 \KOMAScript{} has defined -\DescRef{maincls.cmd.paragraph} internally using -\Macro{DeclareSectionCommand}, and therefore the other settings can be adopted -unchanged. The original definition of \DescRef{maincls.cmd.paragraph} in -\Class{scrartcl} reads: -\begin{lstcode} - \DeclareSectionCommand[% - level=4, - indent=0pt, - beforeskip=3.25ex plus 1ex minus .2ex, - afterskip=-1em, - font={}, - tocindent=7em, - tocnumwidth=4.1em, - counterwithin=subsubsection - ]{paragraph} -\end{lstcode} -\Class{scrreprt} and \Class{scrbook} use slightly different values. - -Some settings of \DescRef{maincls.cmd.chapter} depend on the -\DescRef{maincls.option.headings} option (see \autoref{sec:maincls.structure}, -\DescPageRef{maincls.option.headings}). -\hyperref[tab:maincls.chapter.skips]{Table~\ref*{tab:maincls.chapter.skips}} -shows the default values of these settings. An overview of all settings is -shown in \autoref{tab:maincls.section.defaults}. For more -information\ChangedAt[2016/03]{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and -\Class{scrartcl}} about the default of the TOC-entry styles see -\autoref{sec:tocbasic.tocstyle}\important{\Package{tocbasic}}, -\autopageref{sec:tocbasic.tocstyle}. Note that \PValue{1ex} and -\Length{baselineskip} depend on the default font size of the heading or the -table of contents entry.% - -\begin{table} - \centering - \caption{Defaults for the chapter headings of \Class{scrbook} - and \Class{scrreprt} depending on the \DescRef{maincls.option.headings} - option} - \label{tab:maincls.chapter.skips} - \begin{tabular}{ll} - \multicolumn{2}{@{}l}{\bfseries - With \OptionValueRef{maincls}{headings}{big}:}\\ - \toprule - Attribute & Default Value \\ - \midrule - \PValue{afterskip} - & \PValue{1.725\Length{baselineskip} plus .115\Length{baselineskip} - minus .192\Length{baselineskip}} \\ - \PValue{beforeskip} - & \PValue{-3.3\Length{baselineskip}-\Length{parskip}} \\ - \PValue{font} & \Macro{huge} \\ - \bottomrule\\ - \multicolumn{2}{@{}l}{\bfseries - With \OptionValueRef{maincls}{headings}{normal}:}\\ - \toprule - Attribute & Default Value \\ - \midrule - \PValue{afterskip} - & \PValue{1.5\Length{baselineskip} plus .1\Length{baselineskip} - minus .167\Length{baselineskip}} \\ - \PValue{beforeskip} - & \PValue{-3\Length{baselineskip}-\Length{parskip}} \\ - \PValue{font} & \Macro{LARGE} \\ - \bottomrule\\ - \multicolumn{2}{@{}l}{\bfseries - With \OptionValueRef{maincls}{headings}{small}:}\\ - \toprule - Attribute & Default Value \\ - \midrule - \PValue{afterskip} - & \PValue{1.35\Length{baselineskip} plus .09\Length{baselineskip} - minus .15\Length{baselineskip}} \\ - \PValue{beforeskip} - & \PValue{-2.8\Length{baselineskip}-\Length{parskip}} \\ - \PValue{font} & \Macro{Large} \\ - \bottomrule - \end{tabular} -\end{table} - -%begin{table} -% \centering - \begin{longtable}{@{}p{\columnwidth}@{}} - \caption{Defaults for the headings of \Class{scrbook} and - \Class{scrreprt}}% - \label{tab:maincls.section.defaults}\\ - \endfirsthead - \caption[]{Default for the headings of \Class{scrbook} and - \Class{scrreprt} \emph{(continued)}}\\ - \addlinespace[-\normalbaselineskip] - \endhead - \raggedleft\dots\\ - \endfoot - \endlastfoot - \DescRef{maincls.cmd.part}: \\* - \begin{tabularx}{\linewidth}{ll} - \toprule - Attribute & Default Value \\ - \midrule - \PValue{afterskip} & \PValue{0pt plus 1fil} \\ - \PValue{beforeskip} & \PValue{0pt plus 1fil + \Length{baselineskip}} \\ - \PValue{font} & see element \DescRef{maincls.fontelement.part}, - \autoref{tab:maincls.structureElementsFont}, - \autopageref{tab:maincls.structureElementsFont} \\ - \PValue{innerskip} & \PValue{20pt} \\ - \PValue{level} & -1 \\ - \PValue{prefixfont} & see element - \DescRef{maincls.fontelement.partnumber}, - \autoref{tab:maincls.structureElementsFont}, - \autopageref{tab:maincls.structureElementsFont} \\ - \PValue{tocindent} & \PValue{0pt} \\ - \PValue{toclevel} & -1 \\ - \PValue{tocnumwidth} & \PValue{2em} \\ - \PValue{tocstyle} & \PValue{part} \\ - \bottomrule - \end{tabularx} \\ - \addlinespace[\normalbaselineskip] - \DescRef{maincls.cmd.chapter}: \\* - \begin{tabularx}{\linewidth}{ll} - \toprule - Attribute & Default Value \\ - \midrule - \PValue{afterskip} & see \autoref{tab:maincls.chapter.skips} \\ - \PValue{beforeskip} & see \autoref{tab:maincls.chapter.skips} \\ - \PValue{font} & see element \DescRef{maincls.fontelement.chapter}, - \autoref{tab:maincls.structureElementsFont}, - \autopageref{tab:maincls.structureElementsFont} \\ - \PValue{innerskip} & \PValue{0.5\Length{baselineskip}} \\ - \PValue{level} & 0 \\ - \PValue{prefixfont} & see element - \DescRef{maincls.fontelement.chapterprefix}, - \autoref{tab:maincls.structureElementsFont}, - \autopageref{tab:maincls.structureElementsFont} \\ - \PValue{tocindent} & \PValue{0pt} \\ - \PValue{toclevel} & 0 \\ - \PValue{tocnumwidth} & \PValue{1.5em} \\ - \PValue{tocstyle} & \PValue{chapter} \\ - \bottomrule - \end{tabularx} \\ - \addlinespace[\normalbaselineskip] - \DescRef{maincls.cmd.section}: \\* - \begin{tabularx}{\linewidth}{ll} - \toprule - Attribute & Default Value \\ - \midrule - \PValue{afterskip} & \PValue{2.3ex plus .2ex} \\ - \PValue{beforeskip} & \PValue{-3.5ex plus -1ex minus -.2ex} \\ - \PValue{font} & see element \DescRef{maincls.fontelement.section}, - \autoref{tab:maincls.structureElementsFont}, - \autopageref{tab:maincls.structureElementsFont} \\ - \PValue{indent} & \PValue{0pt} \\ - \PValue{level} & 1 \\ - \PValue{tocindent} & \PValue{1.5em}\\ - \PValue{toclevel} & 1 \\ - \PValue{tocnumwidth} & \PValue{2.3em}\\ - \PValue{tocstyle} & \PValue{section} \\ - \bottomrule - \end{tabularx} \\ - \addlinespace[\normalbaselineskip] - \DescRef{maincls.cmd.subsection}: \\* - \begin{tabularx}{\linewidth}{ll} - \toprule - Attribute & Default Value \\ - \midrule\nopagebreak - \PValue{afterskip} & \PValue{1.5ex plus .2ex} \\ - \PValue{beforeskip} & \PValue{-3.25ex plus -1ex minus -.2ex} \\ - \PValue{font} & see element - \DescRef{maincls.fontelement.subsection}, - \autoref{tab:maincls.structureElementsFont}, - \autopageref{tab:maincls.structureElementsFont} \\ - \PValue{indent} & \PValue{0pt} \\ - \PValue{level} & 2 \\ - \PValue{tocindent} & \PValue{3.8em}\\ - \PValue{toclevel} & 2 \\ - \PValue{tocnumwidth} & \PValue{3.2em}\\ - \PValue{tocstyle} & \PValue{section} \\ - \bottomrule - \end{tabularx} \\ - \addlinespace[\normalbaselineskip] - \DescRef{maincls.cmd.subsubsection}: \\* - \begin{tabularx}{\linewidth}{ll} - \toprule - Attribute & Default Value \\ - \midrule\nopagebreak - \PValue{afterskip} & \PValue{1.5ex plus .2ex} \\ - \PValue{beforeskip} & \PValue{-3.25ex plus -1ex minus -.2ex} \\ - \PValue{font} & see element - \DescRef{maincls.fontelement.subsubsection}, - \autoref{tab:maincls.structureElementsFont}, - \autopageref{tab:maincls.structureElementsFont} \\ - \PValue{indent} & \PValue{0pt} \\ - \PValue{level} & 3 \\ - \PValue{tocindent} & \PValue{7.0em}\\ - \PValue{tocnumwidth} & \PValue{4.1em}\\ - \PValue{toclevel} & 3 \\ - \PValue{tocstyle} & \PValue{section} \\ - \bottomrule - \end{tabularx} \\ - \addlinespace[\normalbaselineskip] - \DescRef{maincls.cmd.paragraph}: \\* - \begin{tabularx}{\linewidth}{ll} - \toprule - Attribute & Default Value \\ - \midrule\nopagebreak - \PValue{afterskip} & \PValue{-1em} \\ - \PValue{beforeskip} & \PValue{3.25ex plus 1ex minus .2ex} \\ - \PValue{font} & see element \DescRef{maincls.fontelement.paragraph}, - \autoref{tab:maincls.structureElementsFont}, - \autopageref{tab:maincls.structureElementsFont} \\ - \PValue{indent} & \PValue{0pt} \\ - \PValue{level} & 4 \\ - \PValue{tocindent} & \PValue{10em}\\ - \PValue{toclevel} & 4 \\ - \PValue{tocnumwidth} & \PValue{5em}\\ - \PValue{tocstyle} & \PValue{section} \\ - \bottomrule - \end{tabularx} \\ - \addlinespace[\normalbaselineskip] - \DescRef{maincls.cmd.subparagraph}: \\* - \begin{tabularx}{\linewidth}{ll} - \toprule - Attribute & Default Value \\ - \midrule\nopagebreak - \PValue{afterskip} & \PValue{-1em} \\ - \PValue{beforeskip} & \PValue{3.25ex plus 1ex minus .2ex} \\ - \PValue{font} & see element - \DescRef{maincls.fontelement.subparagraph}, - \autoref{tab:maincls.structureElementsFont}, - \autopageref{tab:maincls.structureElementsFont} \\ - \PValue{indent} & \Macro{scr@parindent} \\ - \PValue{level} & 5 \\ - \PValue{tocindent} & \PValue{12em}\\ - \PValue{toclevel} & 5 \\ - \PValue{tocnumwidth} & \PValue{6em}\\ - \PValue{tocstyle} & \PValue{section} \\ - \bottomrule - \end{tabularx} - \end{longtable} -%end{table} -Incidentally, the internal macro \Macro{scr@parindent} used in the settings -for \DescRef{maincls.cmd.subparagraph} is the paragraph indent set by the -\DescRef{maincls.option.parskip} option or the -\DescRef{maincls-experts.cmd.setparsizes} command. -\EndIndexGroup - - -\begin{Declaration} - \Macro{DeclareSectionCommands}\OParameter{attributes} - \Parameter{list of names}% - \Macro{DeclareNewSectionCommands}\OParameter{attributes} - \Parameter{list of names}% - \Macro{RedeclareSectionCommands}\OParameter{attributes} - \Parameter{list of names}% - \Macro{ProvideSectionCommands}\OParameter{attributes} - \Parameter{list of names} -\end{Declaration} -These\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} commands can define or change a whole series of -sectioning commands at once. The names of the sectioning commands are given by -the comma-separated \PName{list of names}. - -These commands differ in two other ways from the previously described commands -that only define or change a single sectioning command. First, in case of -error\,---\,that is if a command already exists with -\Macro{DeclareNewSectionCommands} or is undefined with -\Macro{RedeclareSectionCommands}\,---\,the definition will be performed -regardless. An appropriate an error message will, of course, be reported -anyway. - -Second, there is another attribute, -\important{\PValue{increaselevel}}\OptionVName{increaselevel}{integer}. This -attribute changes the meaning of the attributes \PValue{level} and -\PValue{toclevel} (see \autoref{tab:maincls-experts.declaresection.keys}) so -that their values become starting values for the first sectioning command of -the \PName{list of names}. For all other sectioning command in the \PName{list -of names}, the values of \PValue{level} and \PValue{toclevel} are successively -increased by the value of \PValue{increaselevel}. If the -\PValue{increaselevel} attribute is used without assigning a value, 1 is -assumed.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{IfSectionCommandStyleIs}\Parameter{name}\Parameter{style} - \Parameter{then code}\Parameter{else code} -\end{Declaration} -In\ChangedAt{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} -rare cases, it is useful to be able to test whether a sectioning command -belongs to a specific \PName{style}. If \KOMAScript{} has defined the -sectioning command \Macro{\PName{name}} using the given \PName{style}, the -\PName{then code} will be used. Otherwise the \PName{else code} will be -executed. An error is reported if \Macro{\PName{name}} is undefined or if it -is not a \KOMAScript{} sectioning command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{chapterheadstartvskip} - \Macro{chapterheadmidvskip} - \Macro{chapterheadendvskip} - \Macro{partheadstartvskip} - \Macro{partheadmidvskip} - \Macro{partheadendvskip} - \Macro{partheademptypage} -\end{Declaration} -These\important[i]{\DescRef{maincls.cmd.chapter}\\ - \DescRef{maincls.cmd.part}\\ - \DescRef{maincls.cmd.addchap}\\ - \DescRef{maincls.cmd.addpart}\\ - \DescRef{maincls.cmd.chapter*}\\ - \DescRef{maincls.cmd.part*}\\ - \DescRef{maincls.cmd.addchap*}\\ - \DescRef{maincls.cmd.addpart*}} commands are used inside the headings of the -previously described \PValue{chapter} and \PValue{part} styles and thus for -the definitions of \DescRef{maincls.cmd.chapter}\IndexCmd{chapter}, -\DescRef{maincls.cmd.part}\IndexCmd{part}, -\DescRef{maincls.cmd.addchap}\IndexCmd{addchap}, and -\DescRef{maincls.cmd.addpart}\IndexCmd{addpart}, as well as their starred -variants \DescRef{maincls.cmd.chapter*}\IndexCmd{chapter*}, -\DescRef{maincls.cmd.part*}\IndexCmd{part*}, -\DescRef{maincls.cmd.addchap*}\IndexCmd{addchap*}, and -\DescRef{maincls.cmd.addpart*}\IndexCmd{addpart*}. -The \Macro{chapterheadstartvskip} command is intended to insert a -vertical skip before the chapter heading. Similarly, -\Macro{chapterheadendvskip} is a command intended to insert a vertical -skip after the chapter heading. If\ChangedAt{v3.15}{\Class{scrbook}\and - \Class{scrreprt}} the chapter heading has a prefix number line (see option -\DescRef{maincls.option.chapterprefix} in \autoref{sec:maincls.structure}, -\DescPageRef{maincls.option.chapterprefix}), \Macro{chapterheadmidvskip} -is also used between the number line and the heading text. - -The \Macro{partheadstartvskip} and \Macro{partheadendvskip} commands insert -vertical skips above and below part headings. A page break is interpreted as -part of the vertical distance. Such a page break is part of the default -definitions of \Macro{partheadendvskip} in -\Class{scrbook}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} and -\Class{scrreprt}. The -\Macro{partheademptypage}\ChangedAt{v3.02}{\Class{scrbook}\and -\Class{scrreprt}} command produces an empty page after the part heading page -of \Class{scrbook} and \Class{scrreprt}. - -Starting with \KOMAScript~3.15\ChangedAt{v3.15}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}}, the defaults of these seven commands -are independent from the \DescRef{maincls.option.headings} option (see -\autoref{sec:maincls.structure}, -\DescPageRef{maincls.option.headings}). The default definitions for the -chapter headings starting with -\KOMAScript~3.17\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} correspond to:\IndexLength{@tempskipa} -\begin{lstcode} - \newcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}} - \newcommand*{\chapterheadmidvskip}{\par\nobreak\vskip\@tempskipa} - \newcommand*{\chapterheadendvskip}{\vskip\@tempskipa} -\end{lstcode} -These defaults are reactivated every time you use -\OptionValueRef{maincls}{headings}{big}\IndexOption{headings}, -\OptionValueRef{maincls}{headings}{normal}, or -\OptionValueRef{maincls}{headings}{small}. As a side effect, these options may -affect not only chapter titles but all headings in the \PValue{chapter} style - -The \PValue{chapter} style automatically sets the internal length -\Length{@tempskipa} to the value that results from the -\DescRef{\LabelBase.cmd.DeclareSectionCommand}\IndexCmd{DeclareSectionCommand} -attribute \PValue{beforeskip} before calling \Macro{chapterheadstartvskip}. -Similarly, it sets this length to the value of the \PValue{afterskip} -attribute before calling \Macro{chapterheadendvskip}, and to -\PValue{innerskip} before calling \Macro{chapterheadmidvskip}. - -The default values of the distances of \DescRef{maincls.cmd.part} do not -depend on the \DescRef{maincls.option.headings} option. So the corresponding -commands will not be redefined by this option. -Their\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and -\Class{scrartcl}} default definitions in \Class{scrbook} and \Class{scrreprt} -correspond to: -\begin{lstcode} - \newcommand*{\partheadstartvskip}{% - \null\vskip-\baselineskip\vskip\@tempskipa - } - \newcommand*{\partheadmidvskip}{% - \par\nobreak - \vskip\@tempskipa - } - \newcommand*{\partheadendvskip}{% - \vskip\@tempskipa\newpage - } -\end{lstcode} -and of \Class{scrartcl}: -\begin{lstcode} - \newcommand*{\partheadstartvskip}{% - \addvspace{\@tempskipa}% - } - \newcommand*{\partheadmidvskip}{% - \par\nobreak - } - \newcommand*{\partheadendvskip}{% - \vskip\@tempskipa - } -\end{lstcode} -The \PValue{part} style once again sets the internal length -\Length{@tempskipa}\IndexLength{@tempskipa} according to the settings of -\DescRef{\LabelBase.cmd.DeclareSectionCommand}\IndexCmd{DeclareSectionCommand} -before using the commands. - -If you redefine one of the commands used for the vertical skip in the original -\Length{@tempskipa} but still want to be able to configure the lengths, for -example with \DescRef{\LabelBase.cmd.RedeclareSectionCommand}, you should also -use \Length{@tempskipa} in the new definition. -Since\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} you can more easily configure the distances above, within, -and below the headings using \DescRef{\LabelBase.cmd.RedeclareSectionCommand}, -you generally should not redefine the commands described here. Changing them -should be reserved for more complex changes that cannot be accomplished with -\DescRef{\LabelBase.cmd.RedeclareSectionCommand}. An\textnote{Example!} -example that redefines \Macro{chapterheadstartvskip} and -\Macro{chapterheadendvskip} to print extra rules above and below the chapter -heading can be found at \cite{homepage} (in German).% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{partlineswithprefixformat}% - \Parameter{level}\Parameter{number}\Parameter{text}% -\end{Declaration} -This\ChangedAt{v3.25}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} command is used by headings with the \PValue{part} style to -output the heading number and heading text. The \PName{number} and -\PName{text} arguments are already formatted, including the font -selections. Ultimately, this command controls the arrangement of the two parts -of the heading. For unnumbered headings, \PName{number} is a completely empty -argument, so it does not contain any formatting commands. - -The default definition is rather Spartan: -\begin{lstcode} - \newcommand{\partlineswithprefixformat}[3]{% - #2#3% - } -\end{lstcode} - -\begin{Example} - You want to have part headings in a light blue box with blue frame. The - box should occupy only about three quarters of full width of the text - area. So you try: -\begin{lstcode} - \documentclass{scrbook} - \usepackage{xcolor} - \renewcommand*{\partlineswithprefixformat}[3]{% - \fcolorbox{blue}{blue!25}{% - \parbox{.75\linewidth}{#2#3}% - }% - } - \begin{document} - \part{Framed Part} - \end{document} -\end{lstcode} - But surprisingly the heading is not longer centred\,---\,neither the box - itself nor the text inside the box. - - The reason for the missing centring of the box is that the end of the - paragraph is hidden in the third argument of the command. So it still - finishes the paragraph of the text inside the box but not the paragraph of - the \Macro{parbox} itself. To solve this you add a \Macro{par} at the end of - the definition. - - The reason for the missing centring inside the box is that the alignment of - \DescRef{maincls.cmd.raggedpart} is valid outside the box but not - automatically inside a \Macro{parbox}. To solve this you add - \Macro{raggedpart} inside the box. - - With -\begin{lstcode} - \documentclass{scrbook} - \usepackage{xcolor} - \renewcommand*{\partlineswithprefixformat}[3]{% - \fcolorbox{blue}{blue!25}{% - \parbox{.75\linewidth}{\raggedpart #2#3}% - }% - } - \par - \begin{document} - \part{Framed Part} - \end{document} -\end{lstcode} - you get the expected result. -\end{Example} - -As the example shows, users who redefine this command must watch out for -several side effects. In addition to preserving the text alignment, they also -must prevent page breaks within the headings, for example if they insert extra -paragraphs or space. The example above does not have this problem. Not only -does the box prevent a page breaks anyway, but \KOMAScript{} itself also -changes \Macro{interlinepenalty} as part of \PName{text} so to prevent page -breaks there. It also finishes \PName{text} with an internal paragraph break -using \Macro{@@par}. - -The default definition of \Macro{partlineswithprefixformat} does not use the -first argument, \PName{level}, nor is it needed in the example above. It is of -interest only if you want to define several commands with the \PValue{part} -style and need to distinguish the different levels. The predefined commands -\DescRef{maincls.cmd.part}, \DescRef{maincls.cmd.part*}, -\DescRef{maincls.cmd.addpart}, and \DescRef{maincls.cmd.addpart*} all share -the same \PName{level} \PName{part}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{chapterlineswithprefixformat}% - \Parameter{level}\Parameter{number}\Parameter{text}% - \Macro{chapterlinesformat}% - \Parameter{level}\Parameter{number}\Parameter{text} -\end{Declaration} -These\ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}} commands are used -by headings with the \PValue{chapter} style to output the heading number and -heading text, depending on the -\DescRef{maincls.option.chapterprefix}\IndexOption{chapterprefix}% -\textnote{\DescRef{maincls.option.chapterprefix}} option (see -\autoref{sec:maincls.structure}, -\DescPageRef{maincls.option.chapterprefix}). If the option is \PValue{true}, -\Macro{chapterlineswithprefixformat} is used. Otherwise -\Macro{chapterlinesformat} determines the ouput. - -The \PName{number} and \PName{text} arguments are already formatted, including -the font selections. Ultimately, these commands thus control the arrangement -of the two parts of the heading. For unnumbered headings, the \PName{number} -argument is completely empty, so it does not contain any formatting commands. - -The\textnote{default} defaults for these commands are: -\begin{lstcode} - \newcommand{\chapterlinesformat}[3]{% - \@hangfrom{#2}{#3}% - } - \newcommand{\chapterlineswithprefixformat}[3]{% - #2#3% - } -\end{lstcode} - -\begin{Example} - You want to have chapter headings with yellow background. For the headings - without a prefix line, you use the following definition in the document - preamble: -\begin{lstcode} - \makeatletter - \renewcommand{\chapterlinesformat}[3]{% - \colorbox{yellow}{% - \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep}{% - \@hangfrom{#2}#3% - }% - }% - } - \makeatother -\end{lstcode} - For chapter headings with prefix line, you use: -\begin{lstcode} - \renewcommand{\chapterlineswithprefixformat}[3]{% - \colorbox{yellow}{% - \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep}{% - #2#3% - }% - }% - } -\end{lstcode} - Unfortunately, you discover that these redefinitions result in justified - text for the headings. The reason is the \Macro{parbox} command. To change - this, you can use the \DescRef{maincls.cmd.raggedchapter} command (see - \autoref{sec:maincls.structure}, \DescPageRef{maincls.cmd.raggedchapter}) - inside the argument of \Macro{parbox}. Otherwise \Macro{raggedchapter} would - be used only before \Macro{chapterlineswithprefixformat} and - \Macro{chapterlinesformat}: -\begin{lstcode} - \makeatletter - \renewcommand{\chapterlinesformat}[3]{% - \colorbox{yellow}{% - \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep}{% - \raggedchapter - \@hangfrom{#2}#3% - }% - }% - } - \makeatother - \renewcommand{\chapterlineswithprefixformat}[3]{% - \colorbox{yellow}{% - \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep}{% - \raggedchapter - #2#3% - }% - }% - } -\end{lstcode} - Remember to use \Macro{makeatletter} and \Macro{makeatother} only in the - document preamble. Do not use it inside your own wrapper class or package. - They are only needed here because of \Macro{@hangfrom} in the definition of - \Macro{chapterlinesformat}. -\end{Example} - -As the example shows, users who redefine this command must watch out for -several side effects. In addition to preserving the text alignment, they also -must prevent page breaks within the headings, for example if they insert extra -paragraphs or space. The example above does not have this problem. Not only -does the box prevent a page breaks anyway, but \KOMAScript{} itself also -changes \Macro{interlinepenalty} as part of \PName{text} so to prevent page -breaks there. It also finishes \PName{text} with an internal paragraph break -using \Macro{@@par}. - -Incidentally, the \DescRef{maincls.cmd.raggedchapter} command is not part of -\PName{text}, as otherwise using \Macro{MakeUppercase} inside redefined -versions of these two commands would be much more difficult. Note, however, -that typographic rules require individual adjustments of letter spacing in -capitalised text. However the \LaTeX{} \Macro{MakeUppercase} command does not -do this. - -The default definitions do not use the first argument, \PName{level}, nor is -it needed in the example above. It is of interest only if you want to define -several commands with the \PValue{chapter} style and need to distinguish the -different levels. The predefined commands \DescRef{maincls.cmd.chapter}, -\DescRef{maincls.cmd.chapter*}, \DescRef{maincls.cmd.addchap}, and -\DescRef{maincls.cmd.addchap*} all share the same \PName{level} -\PName{chapter}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{sectionlinesformat}% - \Parameter{level}\Parameter{indent}\Parameter{number}\Parameter{text}% - \Macro{sectioncatchphraseformat}% - \Parameter{level}\Parameter{indent}\Parameter{number}\Parameter{text}% -\end{Declaration} -These\ChangedAt{v3.19}{\Class{scrbook}\and \Class{scrreprt}\and -\Class{scrartcl}} commands are used by headings with the \PValue{section} -style depending on whether the heading is run-in or on its own line. -Free-standing headings use \Macro{sectionlinesformat} for their output, while -run-in headings use \Macro{sectioncatchphraseformat}. - -In both cases \PName{indent} is the value of the horizontal indention of the -heading relative to the text area. If the value is negative, the heading can -protrude into the left margin. - -The arguments \PName{number} and \PName{text} are already formatted, including -the font settings. Ultimately, these commands thus control the arrangement of -the two parts of the heading. For unnumbered headings, the \PName{number} -argument is completely empty, so it does not contain any formatting commands. - -The default definitions are: -\begin{lstcode} -\newcommand{\sectionlinesformat}[4]{% - \@hangfrom{\hskip #2#3}{#4}% -} -\newcommand{\sectioncatchphraseformat}[4]{% - \hskip #2#3#4% -} -\end{lstcode} - -If you redefine one of these commands, you are responsible for preventing page -breaks inside heading. \KOMAScript{} itself only changes -\Macro{interlinepenalty} to impede page breaks. - -\begin{Example} - As in the previous example with chapter headings, the free-standing headings - of the \PValue{section} \PName{level} should now be printed with a - background colour. Headings of lower levels should not be changed: -\begin{lstcode} - \makeatletter - \renewcommand{\sectionlinesformat}[4]{% - \@tempswafalse - \Ifstr{#1}{section}{% - \hspace*{#2}% - \colorbox{yellow}{% - \parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep-#2}{% - \raggedsection - \@hangfrom{#3}{#4}% - }% - }% - }{% - \@hangfrom{\hskip #2#3}{#4}% - }% - } - \makeatother -\end{lstcode} - With this code, area of the indention is not coloured if the heading is - indented. If, however, the heading is placed in the left margin with - negative indention, this area of the margin is also highlighted. You can - move the \Macro{hspace*} command into the \Macro{colorbox} to change this - behaviour. - - Again, remember to use \Macro{makeatletter} and \Macro{makeatother} only in - the document preamble. You should omit them inside your own wrapper class or - package. They are only needed because of \Macro{@hangfrom} in the definition - of \Macro{sectionlinesformat}. -\end{Example} - -The first argument, \PName{level}, is not used by the default definition. The -example shows how to use it to distinguish different heading levels of the -same style \PValue{section}.% -\EndIndexGroup - - -\begin{Declaration} -\DoHook{heading/preinit/\PName{name}}% -\DoHook{heading/postinit/\PName{name}}% -\DoHook{heading/branch/star/\PName{name}}% -\DoHook{heading/branch/nostar/\PName{name}}% -\DoHook{heading/begingroup/\PName{name}}% -\DoHook{heading/endgroup/\PName{name}}% -\end{Declaration} -\BeginIndex{}{hooks}% -In\ChangedAt[2019/01]{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} addition to all their attributes, -\DescRef{\LabelBase.cmd.DeclareSectionCommand}, -\DescRef{\LabelBase.cmd.DeclareNewSectionCommand}, -\DescRef{\LabelBase.cmd.ProvideSectionCommand} and -\DescRef{\LabelBase.cmd.RedeclareSectionCommand} provide several hooks in -sectioning commands that can be manipulated using -\DescRef{scrbase.cmd.AddtoDoHook}. For information about the functionality of -these \emph{do-hooks} see \autoref{sec:scrbase.hooks}, -\autopageref{sec:scrbase.hooks}. The last element of the specifier is the -\PName{name} of the sectioning command, as it is for the declaration commands -mentioned above. - -It is important\important{Attention!} to avoid adding code to these hooks that -would affect the page breaking or the position of the heading. Therefore only -advanced users should use these hooks. In case of doubt, refer to the class's -source code for information about exactly when a hook is executed. These hooks -serve as a fallback before you indeed would need to resort to redefining -a section command without using \KOMAScript{} features. - -The\textnote{\DoHHook{\dits/preinit/\dots}} hook -\DoHook{heading/preinit/\PName{name}} is executed immediately before the -sectioning command is initialised. At this point, no settings have been -initialised. Even the paragraph that precedes the heading is not -necessarily finished yet. - -The\textnote{\DoHook{\dots/postinit/\dots}} hook -\DoHook{heading/postinit/\PName{name}} is executed somewhat later. At this -point, some settings have been initialised and the previous paragraph has -already ended. - -Only\textnote{\DoHook{\dots/branch/\dots}} one of the hooks -\DoHook{heading/branch/nostar/\PName{name}} or -\DoHook{heading/branch/star/\PName{name}} is executed, after determining -whether the starred or normal variant of the section command is used. At this -point, the vertical gap above the heading has already been inserted. - -The\textnote{\DoHook{\dots/begingroup/\dots}} hook -\DoHook{heading/begingroup/\PName{name}} is executed at the beginning of -the group used to process the heading. This is also the last opportunity to -intervene before the heading is printed. - -Similarly\textnote{\DoHook{\dots/begingroup/\dots}}, the hook -\DoHook{heading/begingroup/\PName{name}} will be executed at the end of the -group used to process the heading. Currently this is the last hook inside -a section command. - -Note\textnote{\DescRef{maincls.cmd.minisec}} that -\DescRef{maincls.cmd.minisec} is not a real sectioning command and therefore -these hooks are not available for it.% -\EndIndexGroup - -\begin{Declaration} - \Macro{IfUseNumber}\Parameter{then code}\Parameter{else code} -\end{Declaration} -Strictly\ChangedAt{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} speaking, this is an internal command. It is defined -inside sectioning commands only between the \DoHook{\dots/begingroup/\dots} -and \DoHook{\dots/endgroup/\dots} hooks. In this case, the -\Parameter{then code} is executed if the sectioning heading uses the non-star -variant and should be numbered according to the value of -\DescRef{maincls.counter.secnumdepth}. If the heading should not be numbered -because the sectioning command uses the star variant or because of the value -of \DescRef{maincls.counter.secnumdepth}, the \PName{else code} is executed. -Headings in the \PValue{chapter} style also take into account whether -the headings appears in the main matter. - -If you use the command outside a sectioning command, the result is -unspecified. In this case, it will usually result in an error message and -execute neither the \PName{then code} nor the \PName{else code}.% -\EndIndexGroup - -\begin{Declaration} - \Macro{SecDef}\Parameter{star command}\Parameter{command}% - \Macro{scr@startsection}\Parameter{name}\Parameter{level}\Parameter{indent}% - \Parameter{beforeskip}\Parameter{afterskip}% - \Parameter{style commands}% - \OParameter{short version}\Parameter{heading}% - \labelsuffix[*]% - \Macro{scr@startsection}\Parameter{name}\Parameter{level}\Parameter{indent}% - \Parameter{beforeskip}\Parameter{afterskip}% - \Parameter{style commands}% - \PValue{*}\Parameter{heading}% - \labelsuffix% -\end{Declaration} -As\ChangedAt[2014/09]{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and -\Class{scrartcl}} already explained in \autoref{sec:maincls.structure} in the -description of the sectioning commands beginning with -\DescPageRef{maincls.cmd.chapter}, \KOMAScript{} provides additional features -for the optional argument of those commands. To achieve this, it was necessary -to replace some \LaTeX{} kernel commands: -\begin{itemize} -\item Instead of - \Macro{@startsection}\IndexCmd{@startsection}\important{\Macro{@startsection}} - \KOMAScript{} uses \Macro{scr@startsection}. However, the definition of - \Macro{@startsection} is checked. If the implementation differs from the - expected one, a warning is issued, several features of \KOMAScript{} - are deactivated, and \Macro{scr@startsection} uses a copy of - \Macro{@startsection} while \Macro{@startsection} is redefined to use - \Macro{scr@startsection}. -\item Instead of \Macro{@dblarg}\IndexCmd{@dblarg}\important{\Macro{@dblarg}} - \KOMAScript{} uses an internal command to define sectioning commands. -\item Instead of \Macro{secdef}\IndexCmd{secdef}\important{\Macro{secdef}}, - \KOMAScript{} uses \Macro{SecDef} to change \Macro{@dblarg} as - mentioned above. If the implementation of \Macro{secdef} differs from the - expected one, a warning is issued. -\item \Macro{@sect}\IndexCmd{@sect}\important{\Macro{@sect}} is redefined to - implement various extensions of \KOMAScript. -\item \Macro{@ssect}\IndexCmd{@ssect}\important{\Macro{@ssect}} is redefined - to implement various extensions of \KOMAScript. -\item \Macro{@xsect}\IndexCmd{@xsect}\important{\Macro{@xsect}} is redefined - to implement various extensions of \KOMAScript. -\end{itemize} -In future versions of \KOMAScript{}, consideration is being given to avoid -changing the \LaTeX{} kernel commands mentioned above and to replace them -completely with custom, internal commands. Loading truly incompatible -sectioning packages would automatically disable \KOMAScript{} extensions -and transfer the responsibility for the sectioning commands entirely -to these packages. On the other hand, extra effort would be required -to maintain compatibility with other packages. - -Package authors can use these commands as they would use the corresponding -\LaTeX{} kernel commands and therefore gain access to the additional features -of \KOMAScript. However, these commands should not be redefined, as they may -changed at any time, and then this redefinition could compromise -\KOMAScript{}'s functionality. The meaning of the parameters for these -commands can be found in the \LaTeX{} kernel manual \cite{latex:source2e}. -As\ChangedAt[2019/01]{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} an alternative to redefining such commands, \KOMAScript{} -offers the hooks described previously.% -\EndIndexGroup - -\begin{Explain} - \begin{Declaration} - \Macro{At@startsection}\Parameter{code} - \Macro{Before@ssect}\Parameter{code} - \Macro{Before@sect}\Parameter{code} - \end{Declaration} - Until\ChangedAt[2019/01]{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} \KOMAScript~v3.26b, these commands were available as an - alternative to redefine \DescRef{\LabelBase.cmd.scr@startsection} or - \DescRef{\LabelBase.cmd.SecDef}. Since\textnote{outdated \KOMAScript{} - command} \KOMAScript~v3.27, these commands are deprecated. - - Internally \Macro{At@startsection} is now implemented with the - \DescRef{\LabelBase.dohook.heading/postinit} hook. \Macro{Before@ssect} is - implemented with \DescRef{\LabelBase.dohook.heading/branch/star}, and - \Macro{Before@sect} uses - \DescRef{\LabelBase.dohook.heading/branch/nostar}. The \PName{code} is added - using \DescRef{scrbase.cmd.AddtoDoHook}. There are no provisions to remove - this code once it has been added.% - \EndIndexGroup -\end{Explain} - -% \section{Appendix} -% \seclabel{appendix} - - -\begin{Declaration} - \Macro{appendixmore} -\end{Declaration}% -The \KOMAScript{} classes have an unusual feature within the -\DescRef{maincls.cmd.appendix} command. If the \Macro{appendixmore} command -is defined, \DescRef{maincls.cmd.appendix} will also execute this -it. Internally, the \KOMAScript{} classes -\Class{scrbook}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} and -\Class{scrreprt} take advantage of this behaviour to implement the -\DescRef{maincls.option.appendixprefix} layout option (see -\autoref{sec:maincls.structure}, -\DescPageRef{maincls.option.appendixprefix}). You\textnote{Attention!} should -take note of this in case you decide to define or redefine the -\Macro{appendixmore} macro. If this option has been used, you will receive an -error message when using \verb|\newcommand{\appendixmore}{|\dots\verb|}|. This -behaviour is intended to prevent you from overriding the options without -realising it. - -\begin{Example} - You do not want the chapters in the main part of the classes \Class{scrbook} - or \Class{scrreprt} to be introduced by a prefix line (see the - \DescRef{maincls.option.chapterprefix} layout option in - \autoref{sec:maincls.structure}, - \DescPageRef{maincls.option.chapterprefix}). For consistency, you also do - not want such a line in the appendix either. Instead, you would like to see - the word ``Chapter'' in the language of your choice written in front of the - chapter letter and, simultaneously, in the page headings. Instead of using - the \DescRef{maincls.option.appendixprefix} layout option, you define the - following in the document preamble: -% -\begin{lstcode} - \newcommand*{\appendixmore}{% - \renewcommand*{\chapterformat}{% - \appendixname~\thechapter\autodot\enskip} - \renewcommand*{\chaptermarkformat}{% - \appendixname~\thechapter\autodot\enskip} - } -\end{lstcode} -% - In case you subsequently change your mind and decide to use the option - \DescRef{maincls.option.appendixprefix} at a later stage, you will get an - error message because of the already defined \Macro{appendixmore} command. - This behaviour prevents the definition made above from invisibly changing - the settings intended with the option. - - It is also possible to get a similar behaviour for the appendix of the class - \Class{scrartcl}. For example, you can write in the preamble of your - document: -\begin{lstcode}[moretexcs={ifthenelse,equal}] - \newcommand*{\appendixmore}{% - \renewcommand*{\sectionformat}{% - \appendixname~\thesection\autodot\enskip}% - \renewcommand*{\sectionmarkformat}{% - \appendixname~\thesection\autodot\enskip}} -\end{lstcode} - - The redefined commands are explained in more detail in - \autoref{sec:maincls.structure}, - \DescPageRef{maincls.cmd.chapterformat} and - \DescPageRef{maincls.cmd.chaptermarkformat}. -\end{Example} -% -\EndIndexGroup - - -\section{Bibliography} -\seclabel{bibliography} - -The information in this section is less important if you use packages like -\Package{biblatex}. In that case, the extensive features of such packages -will supersede the extensions of the \KOMAScript{} classes described here. - -\begin{Declaration} - \Macro{newbibstyle}\OParameter{parent style}\Parameter{name}%^^A - \Parameter{commands}% - \Macro{newblock}% - \Macro{@openbib@code}% - \Macro{bib@beginhook}% - \Macro{bib@endhook} -\end{Declaration} -The standard classes\textnote{standard classes} already provide the -\Macro{newblock} command to structure bibliography entries. The exact purpose -of this command depends on the class options. Using option -\Option{openbib}\important{\Option{openbib}} redefines the commands -\Macro{@openbib@code} and \Macro{newblock} itself at the end of the standard -class. The standard classes execute the \Macro{@openbib@code} command when -starting the bibliography list, or more precisely, when defining the -parameters for the list. You can assume that many packages which redefine the -bibliography will execute this command. - -The \KOMAScript{} classes\textnote{\KOMAScript} do something similar. However, -they do not redefine \Macro{@openbib@code} at the end of the class. Instead, -\Macro{newbibstyle} defines the \PValue{openstyle} bibliography style. The -\PName{commands} given in the implementation contain the appropriate -redefinition of \Macro{@openbib@code} and \Macro{newblock}. If you select this -bibliography style using the -\OptionValueRef{maincls}{bibliography}{openstyle}% -\IndexOption{bibliography~=\PValue{openstyle}}% -\important{\OptionValueRef{maincls}{bibliography}{openstyle}} option, the -\PName{commands} will be executed immediately. This will redefine -\Macro{@openbib@code} and \Macro{newblock}. - -In addition to \Macro{@openbib@code} and \Macro{newblock}, -\Macro{bib@beginhook} and \Macro{bib@endhook} can also be redefined by the -\PName{commands} of the style. The \Macro{bib@beginhook} command is executed -immediately after the heading and preamble of the bibliography but before the -beginning of the list of bibliographic entries. The \Macro{bib@endhook} -command will be executed immediately after this list, at the end of the -bibliography. If \DescRef{maincls.cmd.BreakBibliography} (see -\autoref{sec:maincls.bibliography}, -\DescPageRef{maincls.cmd.BreakBibliography}) is used to interrupt the -bibliography, these commands will also executed at the beginning and end of -each part of the bibliography, immediately before and after -\DescRef{maincls.cmd.BreakBibliography}. - -The \Macro{newblock}, \Macro{@openbib@code}, \Macro{bib@beginhook}, and -\Macro{bib@endhook} commands are initially defined to be empty when using a -new bibliography style. After this, the \PName{commands} of the \PName{parent -style} that was optionally specified when defining the style will be executed, -followed by the \PName{commands} for the bibliography style itself. As a -result, these commands must be defined, if necessary, with -\Macro{renewcommand}\IndexCmd{renewcommand}\important{\Macro{renewcommand}}, -not \Macro{newcommand}, inside the \PName{instructions} argument. - -If you use the -\DescRef{maincls.cmd.AtEndBibliography}\IndexCmd{AtEndBibliography} and -\DescRef{maincls.cmd.AfterBibliographyPreamble}% -\IndexCmd{AfterBibliographyPreamble} commands to declare additional -\PName{commands} to be executed after the preamble or at the end of the -bibliography, the \PName{commands} specified with -\DescRef{maincls.cmd.AfterBibliographyPreamble} will only be executed once, at -the beginning of the bibliography after the \Macro{bib@beginhook} -\PName{commands}, and the \PName{commands} of -\DescRef{maincls.cmd.AtEndBibliography} will be executed only once at the end -of the bibliography, before \Macro{bib@endhook}. - -For\textnote{Example!} example, the -\Package{multicol}\IndexPackage{multicol}\important{\Package{multicol}} -package (see \cite{package:multicol}) could be used to define a bibliography -style for printing the bibliography with two columns: -% Umbruchkorrektur: listings korrigiert -\begin{lstcode} - \newbibstyle{twocolumstyle}{% - \renewcommand*{\bib@beginhook}{\begin{multicols}{2}}% - \renewcommand*{\bib@endhook}{\end{multicols}}}% -\end{lstcode} -If you also want to define an open variation of this style, you can use -the possibilities of inheritance here and specify a \PName{parent style}: -% Umbruchkorrektur: listings korrigiert -\begin{lstcode} - \newbibstyle{twocolumopenstyle}[openstyle]{% - \renewcommand*{\bib@beginhook}{\begin{multicols}{2}}% - \renewcommand*{\bib@endhook}{\end{multicols}}}% -\end{lstcode} -You can then select these newly defined styles with the -\DescRef{maincls.option.bibliography} option as usual. - -Like\textnote{Achtung!} \DescRef{maincls.cmd.BreakBibliography}, these -commands lose all or part of their effect when \Environment{thebibliography} -is redefined, for example by using -\Package{biblatex}\IndexPackage{biblatex}\important{\Package{biblatex}}.% -\EndIndexGroup - - -\section{More or Less Obsolete Options and Commands} -\seclabel{obsolete} - -\LoadNonFree{scrbookreportarticle-experts}{4} -% -\EndIndexGroup - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% ispell-local-dictionary: "english" -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: - -% LocalWords: Amongst legitimation diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrbookreportarticle.tex b/macros/latex/contrib/koma-script/source-doc/english/scrbookreportarticle.tex deleted file mode 100644 index 286d2b035f..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrbookreportarticle.tex +++ /dev/null @@ -1,4701 +0,0 @@ -% ====================================================================== -% scrbookreportarticle.tex -% Copyright (c) Markus Kohm, 2001-2020 -% -% 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. -% ---------------------------------------------------------------------- -% scrbookreportarticle.tex -% Copyright (c) Markus Kohm, 2001-2020 -% -% 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. -% ====================================================================== -% -% Chapter about scrbook, scrreprt, and scrartcl of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Kapitel ueber scrbook, scrreprt und scrartcl in der KOMA-Script-Anleitung -% Verwaltet von Markus Kohm -% -% ============================================================================ - -\KOMAProvidesFile{scrbookreportarticle.tex} - [$Date: 2020-07-16 10:09:01 +0200 (Do, 16. Jul 2020) $ - KOMA-Script guide (chapter: scrbook, scrreprt, scrartcl)] - -\translator{Jens-Uwe Morawski\and Gernot Hassenpflug\and Markus Kohm\and - Krickette Murabayashi\and Jana Schubert\and Jens H\"uhne\and Karl Hagen} - -% Date of the translated German file: 2019-12-06 - -\chapter{The Main Classes: \Class{scrbook}, \Class{scrreprt}, and - \Class{scrartcl}} -\labelbase{maincls}% -\BeginIndexGroup -\BeginIndex{Class}{scrbook}% -\BeginIndex{Class}{scrreprt}% -\BeginIndex{Class}{scrartcl}% - -\AddSeeIndex{instruction}{gen}{\GuidecmdIndexShort}{cmd}% -\AddSeeIndex{macro}{gen}{\GuidecmdIndexShort}{cmd}% -The main classes of the {\KOMAScript} bundle are designed as counterparts to -the standard {\LaTeX} classes. This means that the {\KOMAScript} bundle -contains replacements for the three standard classes, -\Class{book}\IndexClass{book}, \Class{report}\IndexClass{report}, and -\Class{article}\IndexClass{article}. There is also a replacement for the -standard \Class{letter}\IndexClass{letter} class. The document class for -letters is described in a separate chapter because it is fundamentally -different from the three main classes (see \autoref{cha:scrlttr2}). - -The simplest way to use a {\KOMAScript} class instead of a standard one is to -substitute the class name in the \verb|\documentclass| command in accordance -with \autoref{tab:\LabelBase.overview}. For example, you can replace -\Macro{documentclass}\PParameter{book} with -\Macro{documentclass}\PParameter{scrbook}. Normally, {\LaTeX} should process -the document without errors, just as before the substitution. The layout, -however, should be different. Additionally, the {\KOMAScript} classes provide -new possibilities and options that are described in the following sections. - -\begin{table} -% \centering - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% -% \caption - \begin{captionbeside} - [Class correspondence]{\label{tab:\LabelBase.overview}Correspondence between - standard classes and {\KOMAScript} classes} - [l] - \begin{tabular}[t]{ll} - \toprule - standard class & \KOMAScript{} class \\%& \Script-Stil (\LaTeX2.09)\\ - \midrule - \Class{article} & \Class{scrartcl} \\%& \File{script\textunderscore s} \\ - \Class{report} & \Class{scrreprt} \\%& \File{script} \\ - \Class{book} & \Class{scrbook} \\%& \File{script} \\ - \Class{letter} & \Class{scrlttr2} \\%& \File{script\textunderscore l} \\ - \bottomrule - \end{tabular} - \end{captionbeside} -\end{table} - -% TODO: Fix translation -However, it should be noted here that some package authors develop their -packages based on the implementation and even internal code of the standard -classes, without regard to completely independent developments like the -\KOMAScript{} classes. In such cases, the first \LaTeX{} run after the change -may well result in error messages or additional warnings. These can usually be -corrected in a simple way. Often the extended capabilities of \KOMAScript{} -can be used for this purpose, which completely eliminates the problematic -package. Sometimes the \hyperref[cha:scrhack]{package - \Package{scrhack}}\IndexPackage{scrhack} documented in \autoref{cha:scrhack} -starting on \autopageref{cha:scrhack} can also help. Replacing obsolete -packages with current successors can also help to eliminate such -problems. Sometimes even the \KOMAScript{} classes provide warnings to help -solve incompatibilities. -% :ODOT - -Let me say something before describing the classes. When beginning to write a -document, you are often unsure which specific options to choose. Some -settings, for instance the choice of paper size, may be fixed in advance. But -even the question of the appropriate page layout could be difficult to answer -initially. On the other hand, these settings should be nearly irrelevant, in -the beginning, to the main business of an author: planning the document -structure, writing the text, preparing figures, tables, lists, index, and -other data. As an author, you should concentrate initially on the content. -When that is done, you can take on the fine points of presentation. In -addition to the choice of options, this includes correcting hyphenation, -optimizing page breaks, and placing tables and figures. - - -% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\LoadCommonFile{options}% \section{Early or Late Selection of Options} - -\LoadCommonFile{compatibility}% \section{Compatibility with Earlier Versions of KOMA-Script} - -\LoadCommonFile{draftmode}% \section{Draft Mode} - -\LoadCommonFile{typearea}% \section{Page Layout} - -\begin{Declaration} - \Macro{flushbottom} - \Macro{raggedbottom} -\end{Declaration} -\begin{Explain} - In two-sided documents especially, it is preferable to have the same visual - baseline not only for the first lines of each text area in a two-page spread - but also for the last lines. If a page consists only of text without - paragraphs or headings, this is generally the result. But a paragraph - spacing of half a line would be enough to prevent you from achieving this - goal if the number of paragraphs on each page of the two-page spread differs - by an odd number. In this case, at least some of the paragraph distances - need to be stretched or shrunk to reach the target again. \TeX{} defines - stretchable and shrinkable distances for this purpose, and \LaTeX{} lets you - perform this kind of \emph{vertical adjustment}\Index{adjustment} - automatically. -\end{Explain} - -Using two-sided printing with the -\Option{twoside}\IndexOption{twoside}\important{\Option{twoside}} option (see -\autoref{sec:typearea.options}, \DescPageRef{typearea.option.twoside}) or -two-column formatting with the -\Option{twocolumn}\IndexOption{twocolumn}\important{\Option{twocolumn}} option -(see \DescPageRef{typearea.option.twocolumn}) also activates this vertical -adjustment. But\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} this does not apply with a compatibility setting for a -\KOMAScript{} version prior to 3.17 (see -\autoref{sec:\LabelBase.compatibilityOptions}, -\DescPageRef{\LabelBase.option.version}, option -\DescRef{\LabelBase.option.version}\IndexOption{version}% -\important{\OptionValueRef{\LabelBase}{version}{3.17}}) if you use -\DescRef{\LabelBase.cmd.KOMAoption} or \DescRef{\LabelBase.cmd.KOMAoptions} to -change the setting of these options. - -You can also explicitly request vertical adjustment at any time starting with -the current page by using \Macro{flushbottom}. \Macro{raggedbottom} has the -opposite effect, switching off vertical adjustment starting with the current -page. This corresponds to the default for one-sided printing. - -By the way, \KOMAScript{} uses a slightly modified method for adjusting the -vertical skip. This has been done to move footnotes to the bottom of the -text area instead of having them close to the last text line used. -\iffree{}{ - You can find more information about this at - \autoref{sec:maincls-experts.addInfos}, - \DescPageRef{maincls-experts.cmd.footnoterule}.}% -% -\EndIndexGroup -% -\EndIndexGroup - - -\LoadCommonFile{fontsize}% \section{Choosing the Document Font Size} - -\LoadCommonFile{textmarkup}% \section{Text Markup} - -\LoadCommonFile{titles}% \section{Document Titles} - -\section{Abstract} -\seclabel{abstract} -\BeginIndexGroup -\BeginIndex{}{abstract}% - -Particularly with articles, more rarely with reports, there is an abstract, or -summary, directly beneath the title and before the table of contents. When -using an in-page title, this abstract is normally a kind of left- and -right-indented block. In comparison, the abstract appears as a chapter or -section when using title pages. - -\begin{Declaration} - \OptionVName{abstract}{simple switch} -\end{Declaration}% -In\OnlyAt{\Class{scrreprt}\and\Class{scrartcl}} the standard -classes\textnote{\KOMAScript{} vs. standard classes}, the -\DescRef{\LabelBase.env.abstract} environment sets the text ``\abstractname'' -centred before the abstract text. This used to be the normal practice. Since -then, reading newspapers has trained us to recognize a suitably highlighted -text at the beginning of an article or report as the abstract. This is even -more true when the text comes before the table of contents. It is also -confusing if, of all things, this title appears small and centred. -{\KOMAScript}\ChangedAt{v3.00}{\Class{scrreprt}\and \Class{scrartcl}} offers -the option to include or exclude the abstract's title with the -\Option{abstract} option. For \PName{simple switch}, you can use any value -from \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. The -default for \KOMAScript{} is \PValue{false}. - -Books typically use a different kind of summary. There, you usually place an -appropriate chapter at the beginning or the end of the work. This chapter is -often combined with either the introduction or a description of a larger -prospectus. Therefore, the \Class{scrbook} class has no -\DescRef{\LabelBase.env.abstract} environment. A\textnote{Hint!} summary -chapter is also recommended for reports in a wider sense, such as a Master's -thesis or Ph.D. dissertation. See the commands -\DescRef{\LabelBase.cmd.chapter*}\IndexCmd{chapter*}, -\DescRef{\LabelBase.cmd.addchap}\IndexCmd{addchap}, and -\DescRef{\LabelBase.cmd.addchap*}\IndexCmd{addchap*} documented in -\autoref{sec:maincls.structure}, from \DescPageRef{\LabelBase.cmd.chapter*}.% -\EndIndexGroup - - -\begin{Declaration} - \begin{Environment}{abstract}\end{Environment} -\end{Declaration}% -\OnlyAt{\Class{scrartcl}\and \Class{scrreprt}}% -Some {\LaTeX} classes provide a special environment for this summary: the -\Environment{abstract} environment. This is output directly, so it is not part -of the title created with \DescRef{\LabelBase.cmd.maketitle}. -Please\textnote{Attention!} note that \Environment{abstract} is an -environment, not a command. Whether the abstract has a heading or not is -determined by the \DescRef{\LabelBase.option.abstract} option (see above). - -For books, the abstract is usually part of the introduction or a separate -chapter at the end of the document. Therefore \Class{scrbook} does not provide -an \Environment{abstract} environment. When using the \Class{scrreprt} class, -it is definitely worth considering whether to proceed in the same way. See the -commands \DescRef{\LabelBase.cmd.chapter*}\IndexCmd{chapter*} and -\DescRef{\LabelBase.cmd.addchap}\IndexCmd{addchap}, or -\DescRef{\LabelBase.cmd.addchap*} in \autoref{sec:\LabelBase.structure} -from \DescPageRef{\LabelBase.cmd.chapter*} for more on this. - -When using an in-page title\Index{title>in-page} (see option -\DescRef{\LabelBase.option.titlepage}, \autoref{sec:\LabelBase.titlepage}, -\DescPageRef{\LabelBase.option.titlepage}), the abstract is set internally -using the \DescRef{\LabelBase.env.quotation}\IndexEnv{quotation} environment -(see \autoref{sec:\LabelBase.lists}, \DescPageRef{\LabelBase.env.quotation}). -This way paragraphs will be set with the first line indented. If the first -paragraph of the abstract should not be indented, you can suppress this indent -by using \Macro{noindent}\IndexCmd{noindent}% -\important{\Macro{noindent}} \iffree{just after - \Macro{begin}\PParameter{abstract}}{at the beginning of the environment}.% -% -\EndIndexGroup -% -\EndIndexGroup - - -\section{Table of Contents} -\seclabel{toc} -\BeginIndexGroup -\BeginIndex{}{table of contents} - -The title and optional abstract are normally followed by a table of contents. -Often you also find additional lists of the floating environments, such as -tables and figures, after the table of contents (see -\autoref{sec:\LabelBase.floats}). - -\iffalse% - Note that in addition to the options documented in this section, the - commands \DescRef{maincls-experts.cmd.DeclareSectionCommand}, - \DescRef{maincls-experts.cmd.DeclareNewSectionCommand}, - \DescRef{maincls-experts.cmd.RedeclareSectionCommand}, and - \DescRef{maincls-experts.cmd.ProvideSectionCommand} can also affect the - table of contents. See \autoref{sec:maincls-experts.sections}, - \DescPageRef{maincls-experts.cmd.DeclareSectionCommand}.% -\else% - In addition to the options documented in this section, the - \hyperref[cha:tocbasic]{\Package{tocbasic}}% - \important{\hyperref[cha:tocbasic]{\Package{tocbasic}}}% - \IndexPackage{tocbasic} package style selected and configured with - \DescRef{tocbasic.cmd.DeclareTOCStyleEntry}\IndexCmd{DeclareTOCStyleEntry}% - \important[O]{\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}} (see - \DescPageRef{tocbasic.cmd.DeclareTOCStyleEntry}) also has a significant - impact on the appearance of the table of contents. Similarly, the commands - \DescRef{maincls-experts.cmd.DeclareSectionCommand}% - \important[O]{\DescRef{maincls-experts.cmd.DeclareSectionCommand}}% - \IndexCmd{DeclareSectionCommand}, - \DescRef{maincls-experts.cmd.ProvideSectionCommand}% - \IndexCmd{ProvideSectionCommand}, - \DescRef{maincls-experts.cmd.DeclareNewSectionCommand}% - \IndexCmd{DeclareNewSectionCommand} and - \DescRef{maincls-experts.cmd.RedeclareSectionCommand}% - \IndexCmd{RedeclareSectionCommand} documented in - \autoref{sec:maincls-experts.sections}, - \DescPageRef{maincls-experts.cmd.DeclareSectionCommand} can also affect the - table of contents.% -\fi - - -\begin{Declaration} - \OptionVName{toc}{setting} -\end{Declaration} -It is becoming increasingly common to include lists of tables and figures, -the bibliography, and sometimes even the index in the table of contents. This -is surely related to the recent trend of putting lists of figures and tables -at the end of the document. Both lists are similar to the table of contents in -structure and intention. I'm therefore sceptical of this evolution. -Since\important{\OptionValue{toc}{listof}} it makes no sense to include only -the list of tables or that of figures in the table of contents without the -other, there is only one \PName{setting}\ChangedAt{v3.00}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}} -\PValue{listof}\IndexOption{toc~=\textKValue{listof}}, which causes entries -for both types of lists to be included. This also includes any lists produced -with version~1.2e or later of the \Package{float} package\IndexPackage{float} -from Version~1.2e (see \cite{package:float}) or \Package{floatrow} (see -\cite{package:floatrow}). None\important{\OptionValue{toc}{listofnumbered}} -of these lists are generally given a chapter number. If you want to ignore -this principle, use the \PName{setting} -\PValue{listofnumbered}\IndexOption{toc~=\textKValue{listofnumbered}}. - -\leavevmode\LabelOptionValue{toc}{index}\nobreak -The\important{\OptionValue{toc}{index}} -\OptionValue{toc}{index}\IndexOption{toc~=\textKValue{index}} option causes an -entry for the index to be included in the table of contents. The index is -unnumbered since it too only includes references to the contents of the other -sectioning levels. Despite\ChangedAt{v3.18}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}} -\important{\OptionValue{toc}{indexnumbered}} the author's concerns, -\KOMAScript{} does support deviating from this principle with -\OptionValue{toc}{indexnumbered}\IndexOption{toc~=\textKValue{indexnumbered}}. - -\leavevmode\LabelOptionValue{toc}{bibliography}\nobreak The bibliography is a -slightly different kind of listing. It does not list the contents of the -present document but refers instead to external sources. -For\important{\OptionValue{toc}{bibliographynumbered}} that reason, it could -be argued that it qualifies as a chapter (or section) and, as such, should be -numbered. The \OptionValue{toc}{bibliographynumbered}% -\IndexOption{toc~=\textKValue{bibliographynumbered}} option has this effect, -and puts the appropriate entry in the table of contents. However, I think that -this reasoning would lead us to consider even a classic, annotated source list -to be a separate chapter. Moreover, the bibliography is ultimately not -something that you wrote yourself. -Therefore\important{\OptionValue{toc}{bibliography}} the bibliography merits, -at best, an unnumbered entry in the table of contents, and you can achieve -this achieved with -\OptionValue{toc}{bibliography}\IndexOption{toc~=\textKValue{bibliography}}. - -\leavevmode\LabelOptionValue{toc}{graduated}\nobreak -The table of contents is normally\ChangedAt{v2.8q}{% - \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% -\important{\OptionValue{toc}{graduated}} formatted so that different levels of -sectioning commands have different indentations. The number for each level is -set left-justified in a fixed-width field. This default set-up is selected -with the\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} -\OptionValue{toc}{graduated}\IndexOption{toc~=\textKValue{graduated}} option. - -\leavevmode\LabelOptionValue{toc}{flat}\nobreak -If the sectioning level which appears in the table of contents is too deep, the -number for that level can be so wide that the space reserved for the number is -insufficient. The German FAQ \cite{DANTE:FAQ} suggests redefining the table of -contents in such a case. \KOMAScript{}\important{\OptionValue{toc}{flat}} -offers an alternative format that avoids the problem completely. If you use -the \OptionValue{toc}{flat}\IndexOption{toc~=\textKValue{flat}} option, no -graduated indentation is applied to the headings of the sectioning levels. -Instead, a table-like organisation is used, where all sectioning numbers and -headings are set in a left-justified column. The space necessary for the -section numbers is thus determined automatically. - -You can find an overview of all available values for the \PName{setting} of -\Option{toc}. in \autoref{tab:\LabelBase.toc}. - -\begin{desclist} - \desccaption[{Available values for the \Option{toc} option}]{% - Available values for the \Option{toc} option to set the format and contents - of the table of contents\label{tab:\LabelBase.toc}% - }{% - Available values for the \Option{toc} option (\emph{continued})% - }% - \entry{\PValue{bibliography}, \PValue{bib}}{% - The bibliography has an unnumbered entry in the table of contents.% - \IndexOption{toc~=\textKValue{bibliography}}}% - \entry{\PValue{bibliographynumbered}, \PValue{bibnumbered}, - \PValue{numberedbibliography}, \PValue{numberedbib}}{% - The bibliography has a numbered entry in the table of contents.% - \IndexOption{toc~=\textKValue{bibliographynumbered}}}% - \entry{\PValue{chapterentrywithdots}, \PValue{chapterentrydotfill}}{% - \ChangedAt[2014/12]{v3.15}{\Class{scrbook}\and \Class{scrreprt}}% - The chapter entries for the \Class{scrbook} and \Class{scrreprt} classes - also use dots to separate the heading text from the page numbers.% - \IndexOption{toc~=\textKValue{chapterentrywithdots}}}% - \entry{\PValue{chapterentrywithoutdots}, \PValue{chapterentryfill}}{% - \ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}}% - The chapter entries of the \Class{scrbook} and \Class{scrreprt} classes - use white space to separate the heading text from the page numbers. This - corresponds to the default setting.% - \IndexOption{toc~=\textKValue{chapterentrywithoutdots}}}% - \entry{\PValue{flat}, \PValue{left}}{% - The table of contents is set in table form. The numbers of the headings - are in the first column, the heading text in the second column, and the - page number in the third column. The amount of space needed for the - numbers of the headings is determined by the required amount of space - detected during the previous \LaTeX{} run.% - \IndexOption{toc~=\textKValue{flat}}}% - \entry{\PValue{graduated}, \PValue{indent}, \PValue{indented}}{% - The table of contents is set in hierarchical form. The amount of space for - the heading numbers is limited. This corresponds to the default setting.% - \IndexOption{toc~=\textKValue{graduated}}}% - \entry{\PValue{indenttextentries}, \PValue{indentunnumbered}, - \PValue{numberline}}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - The \PValue{numberline} property (see \autoref{sec:tocbasic.toc}, - \DescPageRef{tocbasic.cmd.setuptoc}) is set for the table of contents. As - a result, unnumbered entries are left aligned with the text of numbered - entries of the same level.% - \IndexOption{toc~=\textKValue{numberline}}}% - \entry{\PValue{index}, \PValue{idx}}{% - The index has an unnumbered entry in the table of contents.% - \IndexOption{toc~=\textKValue{index}}}% - \entry{\PValue{indexnumbered}, \PValue{idxnumbered}, \PValue{numberedindex}, - \PValue{numberedidx}}{% - \ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - The index has a numbered entry in the table of contents.% - \IndexOption{toc~=\textKValue{index}}}% - \entry{\PValue{leftaligntextentries}, \PValue{leftalignunnumbered}, - \PValue{nonumberline}}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - The \PValue{numberline} property (see \autoref{sec:tocbasic.toc}, - \DescPageRef{tocbasic.cmd.setuptoc}) is deleted for the table of contents. - This places unnumbered entries left-aligned with the number of - numbered entries of the same level. This corresponds to the default - setting.% - \IndexOption{toc~=\textKValue{numberline}}}% - \pventry{listof}{% - The lists of floating environments, e.\,g. figures and tables, have - unnumbered entries in the table of contents.% - \IndexOption{toc~=\textKValue{listof}}}% - \entry{\PValue{listofnumbered}, \PValue{numberedlistof}}{% - The lists of floating environments, e.\,g. figures and tables, have - numbered entries in the table of contents.% - \IndexOption{toc~=\textKValue{listofnumbered}}}% - \entry{\PValue{nobibliography}, \PValue{nobib}}{% - The bibliography does not have an entry in the table of contents. This - corresponds to the default setting.% - \IndexOption{toc~=\textKValue{nobibliography}}}% - \entry{\PValue{noindex}, \PValue{noidx}}{% - The index does not have an entry in the table of contents. This - corresponds to the default setting.% - \IndexOption{toc~=\textKValue{noindex}}}% - \pventry{nolistof}{% - The lists of floating environments, e.\,g. figures and tables, do not - have entries in the table of contents. This corresponds to the default - setting.% - \IndexOption{toc~=\textKValue{nolistof}}}% - \entry{\PValue{sectionentrywithdots}, \PValue{sectionentrydotfill}}{% - \ChangedAt[2014/12]{v3.15}{\Class{scrartcl}}% - The section entries of the \Class{scrartcl} class also use dots to - separate the heading text from the page numbers.% - \IndexOption{toc~=\textKValue{sectionentrywithdots}}}% - \entry{\PValue{sectionentrywithoutdots}, \PValue{sectionentryfill}}{% - \ChangedAt{v3.15}{\Class{scrartcl}}% - The section entries of the \Class{scrartcl} class use white space to - separate the heading text from the page number. This corresponds to the - default setting.% - \IndexOption{toc~=\textKValue{sectionentrywithoutdots}}}% -\end{desclist} -% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{chapterentrydots}{simple switch}\\ - \OptionVName{sectionentrydots}{simple switch} -\end{Declaration} -These\ChangedAt[2014/12]{v3.15}{\Class{scrbook}\and \Class{scrreprt}} options -configure a dotted connecting line between the text and page number of the -chapter entries for the \Class{scrbook} and -\Class{scrreprt}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} classes, or for -the section entries of the \Class{scrartcl}\OnlyAt{\Class{scrartcl}} class, in -the table of contents. For the \PName{simple switch}, you can use any value from -\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. -The default is \PValue{false}. It selects an empty gap instead of dots. - -\BeginIndex{FontElement}{chapterentrydots}\LabelFontElement{chapterentrydots}% -\BeginIndex{FontElement}{sectionentrydots}\LabelFontElement{sectionentrydots}% -If a dotted line is used, you can change its font using the element -\FontElement{chapterentrydots}% -\important[i]{\FontElement{chapterentrydots}\\ - \FontElement{sectionentrydots}} or \FontElement{sectionentrydots} (see also -\DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont}, \autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}, as well as -\autoref{tab:maincls.fontelements}, -\autopageref{tab:maincls.fontelements}). The defaults of the elements are -shown in \autoref{tab:maincls.tocelements}, from -\autopageref{tab:maincls.tocelements}. Note\textnote{Attention!} that the dots -of all entries will be equally spaced only if all dots use the same -font. Because of this the base font is always -\Macro{normalfont}\Macro{normalsize} and only the colour of -\DescRef{\LabelBase.fontelement.chapterentry} or -\DescRef{\LabelBase.fontelement.sectionentry} is also used for the dots.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{tableofcontents} -\end{Declaration}% -The table of contents is output by the \Macro{tableofcontents} command. To get -correct values in the table of contents requires at least two {\LaTeX} runs -after every change. The \DescRef{\LabelBase.option.toc} option described above -can also affect the extent and format of the table of contents. After changing -the settings of this option, at least two \LaTeX{} runs are needed again. - -Entries for \DescRef{\LabelBase.cmd.chapter}\IndexCmd{chapter} with -\Class{scrbook}\IndexClass{scrbook} and \Class{scrreprt}\IndexClass{scrreprt}, -or \DescRef{\LabelBase.cmd.section}\IndexCmd{section} with -\Class{scrartcl}\IndexClass{scrartcl}, and the sectioning level -\DescRef{\LabelBase.cmd.part}\IndexCmd{part} are not indented. Additionally, -there are no dots between the text of this heading and the page number. The -typographical logic for this behaviour is that the font is usually distinct -and appropriate emphasis is desirable. -However\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}, you can change this behaviour with the previously -documented options. The table of contents of this \iffree{guide}{book} is -created with the default settings and serves as an example. - -\BeginIndex{FontElement}{partentry}\LabelFontElement{partentry}% -\BeginIndex{FontElement}{chapterentry}\LabelFontElement{chapterentry}% -\BeginIndex{FontElement}{sectionentry}\LabelFontElement{sectionentry}% -The\ChangedAt{v2.97c}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}\important{\FontElement{partentry}\\ - \FontElement{chapterentry}\\ - \FontElement{sectionentry}} font style of the top two levels in the table of -contents is also affected by the settings for the \FontElement{partentry} -element, as well as by the \FontElement{chapterentry} element for the -\Class{scrbook} and \Class{scrreprt} classes, and by the -\FontElement{sectionentry} element for the \Class{scrartcl} class. -\BeginIndex{FontElement}{partentrypagenumber}% -\LabelFontElement{partentrypagenumber}% -\LabelFontElement{pagination}% -\BeginIndex{FontElement}{chapterentrypagenumber}% -\LabelFontElement{chapterentrypagenumber}% -\BeginIndex{FontElement}{sectionentrypagenumber}% -\LabelFontElement{sectionentrypagenumber}% -You can set the font style of the page numbers separately from these elements -using \FontElement{partentrypagenumber}% -\important{\FontElement{partentrypagenumber}} and -\FontElement{chapterentrypagenumber}% -\important{\FontElement{chapterentrypagenumber}\\ - \FontElement{sectionentrypagenumber}}\,---\,for \Class{scrbook} and -\Class{scrreprt}\,---\,or \FontElement{sectionentrypagenumber}\,---\,for -\Class{scrartcl}\,---\, (see \DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont} in \autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}, or -\autoref{tab:maincls.fontelements}, \autopageref{tab:maincls.fontelements}). -If\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} you use dotted lines connecting the heading entries -(chapter or section depending on the class) to the page numbers using the -\DescRef{\LabelBase.option.toc}% -\IndexOption{toc~=\textKValue{chapterentrywithdots}}% -\IndexOption{toc~=\textKValue{sectionentrywithdots}} -\DescRef{\LabelBase.option.chapterentrydots}% -\IndexOption{chapterentrydots~=\PName{simple switch}} or -\DescRef{\LabelBase.option.sectionentrydots}% -\IndexOption{sectionentrydots~=\PName{simple switch}} option, you can change -their font style using the \DescRef{\LabelBase.fontelement.chapterentrydots}% -\IndexFontElement{chapterentrydots}% -\important{\DescRef{\LabelBase.fontelement.chapterentrydots}\\ - \DescRef{\LabelBase.fontelement.sectionentrydots}} and -\DescRef{\LabelBase.fontelement.sectionentrydots}% -\IndexFontElement{sectionentrydots} elements. The defaults for these -elements are found in \autoref{tab:maincls.tocelements}. -\begin{table} -% \centering -% \caption - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% - \begin{captionbeside} - [Default font styles for the elements of the table of contents] - {\label{tab:maincls.tocelements}% - Default font styles for the elements of the table of contents} - [l] - \setlength{\tabcolsep}{.9\tabcolsep}% Umbruchoptimierung! - \begin{tabular}[t]{ll} - \toprule - Element & Default font style \\ - \midrule - \FontElement{partentry} & - \DescRef{\LabelBase.cmd.usekomafont}\PParameter{disposition}\Macro{large} \\ - \FontElement{partentrypagenumber} & \\ - \FontElement{chapterentry} & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{disposition}\\ - \FontElement{chapterentrydots} & \Macro{normalfont} \\ - \FontElement{chapterentrypagenumber} & \\ - \FontElement{sectionentry} & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{disposition} \\ - \FontElement{sectionentrydots} & \Macro{normalfont} \\ - \FontElement{sectionentrypagenumber} & \\ - \bottomrule - \end{tabular} - \end{captionbeside} -\end{table} -% -\EndIndexGroup - - -\begin{Declaration} - \Counter{tocdepth} - \Macro{parttocdepth} - \Macro{sectiontocdepth} - \Macro{subsectiontocdepth} - \Macro{subsubsectiontocdepth} - \Macro{paragraphtocdepth} - \Macro{subparagraphtocdepth} -\end{Declaration}% -Normally, the sectioning divisions included in the table of contents are all -those from \DescRef{\LabelBase.cmd.part} to -\DescRef{\LabelBase.cmd.subsection} for the \Class{scrbook} and -\Class{scrreprt} classes, or from \DescRef{\LabelBase.cmd.part} to -\DescRef{\LabelBase.cmd.subsubsection} for the \Class{scrartcl} class. Whether -or not to include a sectioning level in the table of contents is controlled by -the \Counter{tocdepth} counter. This has the value -1 for -\DescRef{\LabelBase.cmd.part}, 0 for \DescRef{\LabelBase.cmd.chapter}, and so -on. By incrementing or decrementing the counter, you can choose the lowest -sectioning level to include in the table of contents. Incidentally, the -standard classes work the same way. -Unlike\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}\textnote{\KOMAScript{} vs. standard classes} with the -standard classes, with \KOMAScript{} you do not need to remember these values. -\KOMAScript{} defines a \Macro{\PName{level}tocdepth} command for each -sectioning level with the appropriate value which you can use to set -\Counter{tocdepth}. - -Please note\textnote{Attention!} that in -\Class{scrartcl}\OnlyAt{\Class{scrartcl}}, the values of \Counter{tocdepth} -and \DescRef{\LabelBase.counter.secnumdepth}\IndexCounter{secnumdepth} (see -\autoref{sec:\LabelBase.structure}, -\DescPageRef{\LabelBase.counter.secnumdepth}) for -\DescRef{\LabelBase.cmd.part} are not the same. This behaviour was copied from -the standard \Class{article} class for compatibility. Thus, for example, you -should not use \DescRef{\LabelBase.cmd.partnumdepth}\IndexCmd{partnumdepth} to -set the value of \Counter{tocdepth}.% -\begin{Example} - Suppose you are preparing an article that uses the sectioning level - \DescRef{\LabelBase.cmd.subsubsection}. However, you do not want this - sectioning level to appear in the table of contents. The preamble of your - document might contain the following: -\begin{lstcode} - \documentclass{scrartcl} - \setcounter{tocdepth}{\subsectiontocdepth} -\end{lstcode} - Thus you set the \Counter{tocdepth} counter to the value of the - \Macro{subsectiontocdepth} command. That value is normally 2, but this way, - you do not have to remember it. - - If instead you simply want to include one less level in the table of - contents than you normally would, you can simply subtract one from the - default value of \Counter{tocdepth}: -\begin{lstcode} - \documentclass{scrartcl} - \addtocounter{tocdepth}{-1} -\end{lstcode} - The\textnote{Hint!} value that you need to add to or subtract from - \Counter{tocdepth} is listed in the table of contents after at least two - \LaTeX{} runs. -\end{Example}% -\EndIndexGroup -% -\EndIndexGroup - - -\LoadCommonFile{parmarkup}% \section{Paragraph Markup} - -\LoadCommonFile{oddorevenpage}% \section{Detecting Odd or Even Pages} - - -\section{Headers and Footers Using Predefined Page Styles} -\seclabel{pagestyle} - -\BeginIndexGroup -\BeginIndex{}{page>style}% -One of the general characteristics of a document is the page style. In -\LaTeX{} this primarily consists of the contents of headers and footers. - - -\begin{Declaration} - \OptionVName{headsepline}{simple switch} - \OptionVName{footsepline}{simple switch} -\end{Declaration}% -You\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} can use these options to specify whether a horizontal rule -appears beneath the header or above the footer. You can use any of the values -for simple switches shown in \autoref{tab:truefalseswitch}, -\autopageref{tab:truefalseswitch}. Setting the \Option{headsepline} option to -true or invoking it with no value results in a line beneath the header. -Similarly, activating the \Option{footsepline} option results in a rule above -the footer. Deactivating either option switches off the respective rule. - -The\textnote{Attention!} \Option{headsepline} option naturally has no effect -with the \DescRef{\LabelBase.pagestyle.empty} and -\DescRef{\LabelBase.pagestyle.plain} page styles, which are described below, -because these styles explicitly dispense with a header\Index{page>header}. -Typographically, such a line has the effect of making the header appear to be -closer to the text. This does not mean that the header then needs to be moved -farther away from the body of the text\Index{text>body}. Instead, the header -should be considered as belonging to the text body for the purpose of -calculating the type area. \KOMAScript{} takes this into account by passing -the \Option{headsepline} option to the -\hyperref[cha:typearea]{\Package{typearea}}% -\important{\hyperref[cha:typearea]{\Package{typearea}}}\IndexPackage{typearea} -package, which then automatically executes the package option -\DescRef{typearea.option.headinclude}% -\IndexOption{headinclude}\important{\DescRef{typearea.option.headinclude}} -with the same value. The same applies to the footer separation line. Unlike -\Option{headsepline}, the \Option{footsepline} option also affects the -\PValue{plain} page style because \PValue{plain} prints a page number in the -footer. - -The options themselves do not automatically recalculate the type area. To -recalculate it, use the \DescRef{typearea.option.DIV} option with the values -\hyperref[desc:typearea.option.DIV.last]{\PValue{last}} or -\hyperref[desc:typearea.option.DIV.current]{\PValue{current}} (see -\DescPageRef{typearea.option.DIV.last}) or the -\DescRef{typearea.cmd.recalctypearea} command (see -\DescPageRef{typearea.cmd.recalctypearea}) in \autoref{cha:typearea}. - -The \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% -\IndexPackage{scrlayer-scrpage}% -\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} -package (see \autoref{cha:scrlayer-scrpage}) offers further possibilities for -adjusting lines in headers and footers.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{pagestyle}\Parameter{page style} - \Macro{thispagestyle}\Parameter{local page style} -\end{Declaration}% -There are usually four different page styles: -\begin{description} -\item[{\PageStyle{empty}% - \BeginIndex[indexmain]{Pagestyle}{empty}\LabelPageStyle{empty}}] is the - page style with completely empty headers and footers. In {\KOMAScript} - this is identical to the standard classes.% -\item[{\PageStyle{headings}% - \BeginIndex[indexmain]{Pagestyle}{headings}\LabelPageStyle{headings}}] is - the page style with running heads in the header. In this style, headings are - automatically\Index[indexmain]{running heads>automatic} inserted into the - header. \OnlyAt{\Class{scrbook}\and\Class{scrreprt}}% - With the classes \Class{scrbook}\IndexClass{scrbook} and - \Class{scrreprt}\IndexClass{scrreprt}, the headings of chapters and sections - are repeated in the header for two-sided printing\,---\,on the outer side - with {\KOMAScript}\textnote{\KOMAScript{} vs. standard classes}, on the - inner side with the standard classes. {\KOMAScript} puts the page number on - the outer side of the footer; the standard classes put it on the inner side - of the header. In one-sided printing, {\KOMAScript} uses only the chapter - headings, which are centred in the header, and puts the page numbers centred - in the footer. - \OnlyAt{\Class{scrartcl}}\Class{scrartcl}\IndexClass{scrartcl} behaves - similarly but starts one a level deeper in the sectioning hierarchy, with - sections and subsections, because the chapter level does not exist in this - case. - - While the standard classes\textnote{\KOMAScript{} vs. standard classes} - automatically convert the running heads to upper-case letters, - {\KOMAScript} uses the capitalisation found in the headings. There are - several typographical reasons for this. Upper-case letters are actually far - too massive as a text decoration. If you use them anyway, they should be set - one point smaller and with slightly tighter spacing. The standard classes do - not take these points into consideration. - - In addition, the {\KOMAScript} classes support rules below the header and - above the footer with the \DescRef{\LabelBase.option.headsepline} and - \DescRef{\LabelBase.option.footsepline} options (see - \DescPageRef{\LabelBase.option.headsepline}).% -\item[{\PageStyle{myheadings}% - \BeginIndex[indexmain]{Pagestyle}{myheadings}\LabelPageStyle{myheadings}}] - mostly corresponds to the \PValue{headings} page style, but the running - heads are not generated automatically% - \Index[indexmain]{running heads>manual}\,---\,they have to be defined by the - user. You can use the \DescRef{\LabelBase.cmd.markboth}\IndexCmd{markboth} - and \DescRef{\LabelBase.cmd.markright}\IndexCmd{markright}\important{% - \DescRef{\LabelBase.cmd.markboth}\\ - \DescRef{\LabelBase.cmd.markright}} commands for that purpose (see - \DescPageRef{\LabelBase.cmd.markright}). -\item[{\PageStyle{plain}% - \BeginIndex[indexmain]{Pagestyle}{plain}\LabelPageStyle{plain}}] is the - page style with no running head\Index{running head} and only a page number% - \Index{page>number} in the footer. The\textnote{\KOMAScript{} vs. standard - classes} standard classes always centre this page number in the footer. - {\KOMAScript} puts the page number on the outer side of the footer in - two-sided\Index{two-sided} mode. {\KOMAScript} behaves like the - standard classes in one-sided printing.% -\end{description} - -You\important{\Macro{pagestyle}} can set the page style at any time with the -help of the \Macro{pagestyle} command, and this setting takes effect with the -next page that is output. If\textnote{Hint!} you use \Macro{pagestyle} just -before a command that results in an implicit page break and if the new page -style should be used on the resulting new page, a -\DescRef{\LabelBase.cmd.cleardoublepage} just before \Macro{pagestyle} will be -useful. But usually you set the page style only once, at the beginning of the -document or in the preamble. - -To\important{\Macro{thispagestyle}} change the page style of the current page -only, use the \Macro{thispagestyle} command. This occurs automatically at some -points in the document. For example, the -\Macro{thispagestyle}\PParameter{\DescRef{\LabelBase.cmd.chapterpagestyle}} -command is issued implicitly on the first page of a chapter. - -Note\textnote{Attention!} that when you use the -\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% -\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} -package, switching between automatic and manual running heads is no longer -accomplished by changing the page styles but with special instructions. You -should not use the \PValue{headings} and \PValue{myheadings} page styles with -this package. - -\BeginIndexGroup \BeginIndex[indexother]{}{font>style}% -\BeginIndex{FontElement}{pageheadfoot}\LabelFontElement{pageheadfoot}% -\LabelFontElement{pagehead}% -\BeginIndex{FontElement}{pagefoot}\LabelFontElement{pagefoot}% -\BeginIndex{FontElement}{pagenumber}\LabelFontElement{pagenumber}% -To change the font style used for the header, the footer, or the page -number\ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}, use the \DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}). The same element, -\FontElement{pageheadfoot}\IndexFontElement{pageheadfoot}% -\important{\FontElement{pageheadfoot}}, is used for the header and the footer. -The element for the page number within the header or footer is called -\FontElement{pagenumber}\IndexFontElement{pagenumber}% -\important{\FontElement{pagenumber}}. The -\FontElement{pagefoot}\IndexFontElement{pagefoot}% -\important{\FontElement{pagefoot}} element, which is also provided by the -\KOMAScript{} classes, is used only if you define a page style with the -\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% -\IndexPackage{scrlayer-scrpage} package in which the footer contains text (see -\autoref{cha:scrlayer-scrpage}, -\DescPageRef{scrlayer-scrpage.fontelement.pagefoot}). - -You can find the default settings in -\autoref{tab:\LabelBase.defaultFontsHeadFoot}. -% -\begin{table} -% \centering% -% \caption - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% -% \addtokomafont{caption}{\raggedright}% - \begin{captionbeside} - [{Default values for page style elements}] - {\label{tab:maincls.defaultFontsHeadFoot}% - \hspace{0pt plus 1ex}% - Default values for page style elements} - [l] - \begin{tabular}[t]{ll} - \toprule - Element & Default \\ - \midrule - \FontElement{pagefoot}\IndexFontElement{pagefoot} & - \\ - \FontElement{pageheadfoot}\IndexFontElement{pageheadfoot} & - \Macro{normalfont}\Macro{normalcolor}\Macro{slshape} \\ - \FontElement{pagenumber}\IndexFontElement{pagenumber} & - \Macro{normalfont}\Macro{normalcolor}\\ - \bottomrule - \end{tabular} - \end{captionbeside} -\end{table} -% -\begin{Example} - \leavevmode\phantomsection\xmpllabel{cmd.pagestyle}% - Suppose you want to set header and footer in a smaller type size - and in italics. However, the page number should not be set in - italics but in bold. Apart from the fact that the result will look - horrible, you can do this as follows: -\begin{lstcode} - \setkomafont{pageheadfoot}{% - \normalfont\normalcolor\itshape\small} - \setkomafont{pagenumber}{\normalfont\bfseries} -\end{lstcode} - On the other hand, if you only want a smaller font to be used along with the - default slanted text, you can use the following: -\begin{lstcode} - \addtokomafont{pagehead}{\small} -\end{lstcode} - As you can see, the previous example uses the - \FontElement{pagehead}\important{\FontElement{pagehead}} element. You can - achieve the same result using \PValue{pageheadfoot} instead (see - \autoref{tab:\LabelBase.fontelements} on - \autopageref{tab:\LabelBase.fontelements}). -\end{Example} -It is not possible to use these methods to force upper-case letters to be used -automatically for the running heads. Although you can redefine -\DescRef{tocbasic.cmd.MakeMarkcase}\IndexCmd{MakeMarkcase}, in such cases you -should instead use the -\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} package (see -\autoref{cha:scrlayer-scrpage}, -\DescPageRef{scrlayer-scrpage.option.markcase}). - -If\textnote{Hint!} you define your own page styles, the commands -\DescRef{\LabelBase.cmd.usekomafont}\PParameter{pageheadfoot}, -\DescRef{\LabelBase.cmd.usekomafont}\PParameter{pagenumber}, and -\DescRef{\LabelBase.cmd.usekomafont}\PParameter{pagefoot} can be useful. In -particular, if you do not use the {\KOMAScript} package -\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} (see -\autoref{cha:scrlayer-scrpage}) but use, for example, the -\Package{fancyhdr}\IndexPackage{fancyhdr}\important{\Package{fancyhdr}} -package (see \cite{package:fancyhdr}), you can use these commands in your -definitions. In this way you can maintain compatibility with {\KOMAScript} as -much as possible. If you do not use these commands in your own definitions, -changes such as those shown in the previous examples have no effect. The -\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% -\IndexPackage{scrlayer-scrpage} package tries to maintain maximum -compatibility as long as, for example, -\iffree{\Macro{thepage}}{\DescRef{\LabelBase-experts.cmd.thepage}}% -\IndexCmd{thepage} is not used directly for the page number rather than the -\iffree{\Macro{pagemark}}{\DescRef{\LabelBase-experts.cmd.pagemark}}% -\IndexCmd{pagemark} which is provided for it.% -\EndIndexGroup -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{markboth}\Parameter{left mark}\Parameter{right mark} - \Macro{markright}\Parameter{right mark} -\end{Declaration} -The \DescRef{\LabelBase.pagestyle.myheadings}% -\important{\DescRef{\LabelBase.pagestyle.myheadings}}% -\IndexPagestyle{myheadings} page style does not set the running head. Instead, -you set it with the help of the \Macro{markboth} and \Macro{markright} -commands. This way the \PName{left mark} will normally be used in the header -of even pages and \PName{right mark} in the header of odd pages. With -one-sided printing, only the \PName{right mark} exists. With the -\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% -\IndexPackage{scrlayer-scrpage}% -\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} -package, the \DescRef{scrlayer-scrpage.cmd.markleft}% -\IndexCmd{markleft}\important{\DescRef{scrlayer-scrpage.cmd.markleft}} command -is also available. - -You can use these commands with other page styles too. However, when combined -with automatic running heads, for example with the -\DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings} page style, -the effect of the commands lasts only until the next time the respective marks -are set automatically.% -% -\EndIndexGroup - -\begin{Declaration} - \Macro{titlepagestyle} - \Macro{partpagestyle} - \Macro{chapterpagestyle} - \Macro{indexpagestyle} -\end{Declaration}% -\Index{title>page style}% -\Index{part>page style}% -\Index{chapter>page style}% -\Index{index>page style}% -On some pages, a different page style is chosen automatically with the help of -the \DescRef{\LabelBase.cmd.thispagestyle} command. Which page style this -actually is, is defined by these four macros, of which \Macro{partpagestyle} -and \Macro{chapterpagestyle}\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} are -found only with classes \Class{scrbook} and \Class{scrreprt}, and not in -\Class{scrartcl}. The default value for all four cases is -\DescRef{\LabelBase.pagestyle.plain}\IndexPagestyle{plain}. You can find the -meaning of these macros in \autoref{tab:specialpagestyles}. -% -\begin{table} - \centering - \caption{Macros to set up the page style of special pages} - \label{tab:specialpagestyles} - \begin{desctabular} - \mentry{titlepagestyle}{Page style for a title page when using - \emph{in-page} titles.}% - \mentry{partpagestyle}{Page style for pages with - \DescRef{\LabelBase.cmd.part} titles.}% - \mentry{chapterpagestyle}{Page style for the first page of a chapter.}% - \mentry{indexpagestyle}{Page style for the first page of the index.}% - \end{desctabular} -\end{table} -% -You can redefine the page styles with the \Macro{renewcommand} macro. -\begin{Example} - Suppose you do not want the pages with a \DescRef{\LabelBase.cmd.part} - heading to be numbered. You can use the following command in the preamble of - your document: -\begin{lstcode} - \renewcommand*{\partpagestyle}{empty} -\end{lstcode} - As mentioned previously on \DescPageRef{\LabelBase.pagestyle.empty}, - the \PValue{empty} page style is exactly what is required in this - example. Of course, you can also use a user-defined page style. - - Suppose you have defined your own page style for initial chapter pages with - the \hyperref[cha:scrlayer]{\Package{scrlayer}} (see - \autoref{sec:scrlayer.pagestyles}) or the - \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} package (see - \autoref{sec:scrlayer-scrpage-experts.pagestyle.pairs}). You have given this - page style the fitting name of \PValue{chapter}. To actually use this style, - you must redefine \Macro{chapterpagestyle} in this way: -\begin{lstcode} - \renewcommand*{\chapterpagestyle}{chapter} -\end{lstcode} - - Suppose you do not want the table of contents\Index{table of contents}% - \textnote{table of contents} of a book to have page numbers. Everything - after the table of contents, however, should use the \PValue{headings} - page style, including the \PValue{plain} page style for the first - page of every chapter. You can use the following: -\begin{lstcode} - \clearpage - \pagestyle{empty} - \renewcommand*{\chapterpagestyle}{empty} - \tableofcontents - \clearpage - \pagestyle{headings} - \renewcommand*{\chapterpagestyle}{plain} -\end{lstcode} - You can also keep the redefinition local by using a group. This method has - the advantage that you do not need to make any assumptions about the what - the previous page style was in order to restore it after your local change: -\begin{lstcode} - \clearpage - \begingroup - \pagestyle{empty} - \renewcommand*{\chapterpagestyle}{empty} - \tableofcontents - \clearpage - \endgroup -\end{lstcode} - Note,\important{Attention!} however, that you never should put a numbered - sectioning command into a group. Otherwise you may get unpredictable results - with commands like \Macro{label}. - - On \DescPageRef{tocbasic.cmd.AfterTOCHead} in \autoref{sec:tocbasic.toc}, - you will discover the \DescRef{tocbasic.cmd.AfterTOCHead} command, which - makes a solution even easier: -\begin{lstcode} - \AfterTOCHead[toc]{% - \thispagestyle{empty}% - \pagestyle{empty}% - } -\end{lstcode}% - This takes advantage of the fact that if there are several - \DescRef{\LabelBase.cmd.thispagestyle} commands on the same page, the last - one always wins. -\end{Example} - -\begin{Explain} - You might think that you can put running heads on the first page of a - chapter simply by using the -\begin{lstcode} - \renewcommand*{\chapterpagestyle}{headings} -\end{lstcode} - command. Before you try this, you should read \iffree{}{more about the - background to \DescRef{maincls-experts.cmd.rightmark} in - \autoref{sec:maincls-experts.addInfos} on - \DescPageRef{maincls-experts.cmd.rightmark}. Also, }the remarks on - \DescRef{scrlayer-scrpage-experts.cmd.rightfirstmark} starting on page - \DescPageRef{scrlayer-scrpage-experts.cmd.rightfirstmark} in - \autoref{cha:scrlayer-scrpage-experts}, \autoref{part:forExperts} - \iffree{}{provide important information}.% -\end{Explain} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{pagenumbering}\Parameter{numbering style} -\end{Declaration} -This command works the same way in {\KOMAScript} as in the standard classes. -Strictly speaking, it is a feature of neither the standard classes nor the -\KOMAScript{} classes but of the {\LaTeX} kernel. This command is used to -change the \PName{numbering style} of page numbers. - -The changes take effect immediately, i.\,e., starting from the page that -contains the command. If necessary, you should first close the current page -with \DescRef{\LabelBase.cmd.clearpage} or better -\DescRef{\LabelBase.cmd.cleardoubleoddpage}% -\important{\DescRef{\LabelBase.cmd.cleardoubleoddpage}}% -\IndexCmd{cleardoubleoddpage}. You can find the available settings for -\PName{numbering style} in \autoref{tab:numberKind}. -% -\begin{table} - % \centering - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% - % \caption - \begin{captionbeside} - {\label{tab:numberKind}% - Available numbering styles of page numbers} - \begin{tabular}[t]{lll} - \toprule - numbering style & example & description \\ - \midrule - \PValue{arabic} & 8 & Arabic numbers \\ - \PValue{roman} & viii & lower-case Roman numbers \\ - \PValue{Roman} & VIII & upper-case Roman numbers \\ - \PValue{alph} & h & letters \\ - \PValue{Alph} & H & capital letters \\ - \bottomrule - \end{tabular} - \end{captionbeside} -\end{table} - -Calling\textnote{Attention!} \Macro{pagenumbering} always resets the page -number\Index{page>number}. The current page becomes number 1 in the selected -\PName{numbering style}. In order that two-sided documents produce the correct -results on an even page, so that the left-hand page is not missing, you should -always add \DescRef{\LabelBase.cmd.cleardoubleoddpage}% -\important{\DescRef{\LabelBase.cmd.cleardoubleoddpage}}% -\IndexCmd{cleardoubleoddpage} before \Macro{pagenumbering}. The next section -provides more information about potentially inserted blank pages. - -\begin{Explain} - Let me say a word about a common mistake found in various templates - circulating on the Internet. If you encounter lines like the - following\,---\,without the initial comment naturally\,---\,this is an - unmistakable sign that the creator did not read or understand the - remark above: -\begin{lstcode} - % Attention! This example contains errors! - % Please note the explanation in the text! - \tableofcontents - \pagenumbering{arabic} - \setcounter{page}{1} -\end{lstcode} - Since \DescRef{\LabelBase.cmd.tableofcontents} outputs the table of contents - but does not automatically issue a page break at the end, the page numbering - is already changed on the last page of the table of contents. Because it - lacks a \DescRef{\LabelBase.cmd.cleardoubleoddpage} command before - \Macro{pagenumbering}, it receives a pagination of the Arabic number 1. - Additionally, the final line which sets the page numbering to 1 is - superfluous, since this is already done by \Macro{pagenumbering}. - - Sometimes\,---\,without the initial comment, naturally\,---\, you find: -\begin{lstcode} - % Attention! This example contains errors! - % Please note the explanation in the text! - \tableofcontents - \pagebreak - \pagenumbering{arabic} - \setcounter{page}{1} -\end{lstcode} - Here the creator tried to solve the problem with the final page of the table - of contents with the help of \Macro{pagebreak}\IndexCmd{pagebreak}. - - Unfortunately, this solution is not much better. Here there is a page break - after the last page of the table of contents. This may cause entries on the - last page of a two-sided document to have excess vertical spacing (see - \DescRef{\LabelBase.cmd.flushbottom}, - \DescPageRef{\LabelBase.cmd.flushbottom}). \Macro{pagebreak} is clearly - the wrong command here. - - Furthermore, \Macro{newpage}\IndexCmd{newpage} or - \DescRef{\LabelBase.cmd.clearpage} would not be sufficient for a two-sided - document. For example, if the last page of the table of contents had the - Roman numeral vii, the Arabic numbered right-side page 1 would immediately - follow the Roman numeral right-side page. A left-side page between the two - would be missing, which could cause serious problems with later printing. - - My advice: Avoid using templates that contain errors with respect to such - simple things. Incidentally, the correct way would be: -\begin{lstcode} - \tableofcontents - \cleardoubleoddpage - \pagenumbering{arabic} -\end{lstcode} - This also applies if \Class{scrartcl}\OnlyAt{\Class{scrartcl}} uses a class - that usually does not start a new page after the table of contents. If you - switch the page numbering, a new right-hand page must be started. If you do - not want such a change, you should keep the numbering style of pages - consistent throughout the document without changing it in between. -\iffalse% Umbruchkorrekturtext - For articles or other short documents, this is generally recommended. -\fi - - It is easier to change the numbering style when using - \Class{scrbook}\OnlyAt{\Class{scrbook}}. There you have the support of two - commands, \DescRef{\LabelBase.cmd.frontmatter}% - \important{\DescRef{\LabelBase.cmd.frontmatter}\\ - \DescRef{\LabelBase.cmd.mainmatter}}% - \IndexCmd{fontmatter} and \DescRef{\LabelBase.cmd.mainmatter}% - \IndexCmd{mainmatter}, for the most commonly used switching. For more - information, please see - \autoref{sec:maincls.separation}, - \DescPageRef{\LabelBase.cmd.mainmatter}.% -\end{Explain}% -\EndIndexGroup -\EndIndexGroup - - -\LoadCommonFile{interleafpage}% \section{Interleaf Pages} - -\LoadCommonFile{footnotes}% \section{Footnotes} - -\section[Book Structure]{Book Structure\protect\OnlyAt{\Class{scrbook}}} -\seclabel{separation} - -Sometimes books are loosely divided into \emph{front matter}% -\Index{front matter}, \emph{main matter}\Index{main matter}, and -\emph{back matter}\Index{back matter}. \KOMAScript{} also provides this -capability for \Class{scrbook}. - - -\begin{Declaration} - \Macro{frontmatter} - \Macro{mainmatter} - \Macro{backmatter} -\end{Declaration}% -The front matter includes all the material which appears before the main -text begins, including title pages, preface, and table of contents. It is -initiated with -\Macro{frontmatter}\important{\Macro{frontmatter}}. In the front matter, -Roman numerals are used for the page numbers, and chapter headings in -the header are not numbered. However, section headings are numbered -consecutively, starting from chapter 0. This typically does not matter, as the -front matter is used only for the title pages, table of contents% -\Index{table of contents}, lists of figures\Index{list of>figures}% -\Index{figures>list of} and tables\Index{tables>list of}, and a -preface\Index{preface} or foreword\Index{foreword}. The preface can thus be -created as a normal chapter. A preface should be as short as possible and -never divided into sections. The preface thus does not require a deeper level -of structure than the chapter. - -If you see things differently and want to use numbered -sections\Index{section>number} in the chapters of the front matter, as of -version~2.97e,\ChangedAt{v2.97e}{\Class{scrbook}}% -\important{\OptionValueRef{\LabelBase}{version}{2.97e}} the section numbering -no longer contains the chapter number. This change only takes effect when the -compatibility option is set to at least version~2.97e (see option -\DescRef{\LabelBase.option.version}, -\autoref{sec:\LabelBase.compatibilityOptions}, -\DescPageRef{\LabelBase.option.version}). It is explicitly noted that this -creates confusion with chapter numbers! The use of -\DescRef{\LabelBase.cmd.addsec} and \DescRef{\LabelBase.cmd.section*} (see -\autoref{sec:\LabelBase.structure}, \DescPageRef{\LabelBase.cmd.section*} and -\DescPageRef{\LabelBase.cmd.addsec}) are thus, in the author's opinion, -greatly preferable. - -As of version~2.97e\ChangedAt{v2.97e}{\Class{scrbook}} the numbering of -floating environments, such as tables\Index{table>number} and -figures\Index{figure>number}, and equation numbers\Index{equation>number} in -the front matter also contains no chapter-number part. To take effect, this -too requires the corresponding compatibility setting (see the -\DescRef{\LabelBase.option.version} option, -\autoref{sec:\LabelBase.compatibilityOptions}, -\DescPageRef{\LabelBase.option.version}). - -The part of the book with the main text is introduced -with \Macro{mainmatter}\important{\Macro{mainmatter}}. If there is no front -matter, you can omit this command. The default page numbering in the main -matter uses Arabic numerals and (re)starts the page count at 1 at the start of -the main matter. - -The back matter is introduced with -\Macro{backmatter}\important{\Macro{backmatter}}. Opinions differ as to what -belongs in the back matter. So in some cases you will find only the -bibliography\Index{bibliography}, in some cases only the index\Index{index}, -and in other cases both of these as well as the appendices. The chapters in -the back matter are similar to the chapters in the front matter, but page -numbering is not reset. If you do require separate page numbering, you can use -the \DescRef{\LabelBase.cmd.pagenumbering}% -\important{\DescRef{\LabelBase.cmd.pagenumbering}} command in -\autoref{sec:\LabelBase.pagestyle}, -\DescPageRef{\LabelBase.cmd.pagenumbering}.% -% -\EndIndexGroup - - -\section{Document Structure} -\seclabel{structure}% -\BeginIndexGroup -\BeginIndex{}{document structure} - -The structure refers to dividing a document into parts, chapters, sections, -and additional levels of structure. - - -\begin{Declaration} - \OptionVName{open}{method} -\end{Declaration}% -The\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} \KOMAScript{} classes -\Class{scrbook} and \Class{scrreprt} give you the choice of where to start a -new chapter with two-sided printing. By default \Class{scrreprt} starts a new -chapter\Index{chapter>start} on the next page. This is equivalent to -\PName{method} \PValue{any}. However, \Class{scrbook} starts new chapters at -the next right-hand page. This is equivalent to \PName{method} \PValue{right} -and is usually used in books. But sometimes chapters should start on the -left-hand page of a two-page spread. You can accomplish this with the -\PName{method} \PValue{left}\ChangedAt{v3.00}{\Class{scrbook}\and - \Class{scrreprt}}. You can find a summary of the available values in -\autoref{tab:\LabelBase.open}. The table also describes the effects of -\DescRef{\LabelBase.cmd.cleardoublepage}, -\DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, -\DescRef{\LabelBase.cmd.cleardoublestandardpage}, -\DescRef{\LabelBase.cmd.cleardoubleplainpage}, and -\DescRef{\LabelBase.cmd.cleardoubleemptypage} (see -\autoref{sec:\LabelBase.emptypage}, -\DescPageRef{\LabelBase.cmd.cleardoublepage}). - -\begin{table} - \caption[{Available values for the \Option{open} option}]{Available values - for the \Option{open} option to select page breaks with interleaf pages - using \Class{scrbook} or \Class{scrreprt}} - \begin{desctabular} - \pventry{any}{% - Parts, chapter, index, and back matter use - \DescRef{\LabelBase.cmd.clearpage}, not - \DescRef{\LabelBase.cmd.cleardoublepage}; - \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, - \DescRef{\LabelBase.cmd.cleardoublestandardpage}, - \DescRef{\LabelBase.cmd.cleardoubleplainpage}, - \DescRef{\LabelBase.cmd.cleardoubleemptypage}, and - \DescRef{\LabelBase.cmd.cleardoublepage} behave the same as using - \OptionValue{open}{right}.% - \IndexOption{open~=\textKValue{any}}}% - \pventry{left}{% - Part, chapter, index, and back matter use - \DescRef{\LabelBase.cmd.cleardoublepage}; the commands - \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, - \DescRef{\LabelBase.cmd.cleardoublestandardpage}, - \DescRef{\LabelBase.cmd.cleardoubleplainpage}, - \DescRef{\LabelBase.cmd.cleardoubleemptypage}, and - \DescRef{\LabelBase.cmd.cleardoublepage} result in a page break and add - an interleaf page\Index{page>interleaf} if needed to reach the next - left-hand page.% - \IndexOption{open~=\textKValue{left}}}% - \pventry{right}{% - Part, chapter, index, and back matter use - \DescRef{\LabelBase.cmd.cleardoublepage}; the commands - \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, - \DescRef{\LabelBase.cmd.cleardoublestandardpage}, - \DescRef{\LabelBase.cmd.cleardoubleplainpage}, - \DescRef{\LabelBase.cmd.cleardoubleemptypage}, and - \DescRef{\LabelBase.cmd.cleardoublepage} result in a page break and add - an interleaf page\Index{page>interleaf} if needed to reach the next - right-hand page.% - \IndexOption{open~=\textKValue{right}}}% - \end{desctabular} - \label{tab:\LabelBase.open} -\end{table} - -Since \LaTeX{} does not differentiate between left-hand and right-hand pages -in one-sided printing, the option has no effect in that case. - -In the \Class{scrartcl} class, the section is the first structural element -below the part. For this reason, \Class{scrartcl} does not support this -option. -% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{chapterprefix}{simple switch} - \OptionVName{appendixprefix}{simple switch} - \Macro{IfChapterUsesPrefixLine}\Parameter{then code}\Parameter{else code} -\end{Declaration}% -With\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} the standard classes -\Class{book} and \Class{report}, a chapter -heading\Index[indexmain]{chapter>heading} consists of a line with the word -``Chapter''\footnote{When using another language the word ``Chapter'' is of -course translated to the appropriate language.} followed by the chapter -number. The heading itself is set left-justified on the following line. The -same effect is obtained in {\KOMAScript} with the \Option{chapterprefix} -option. You can use any value from \autoref{tab:truefalseswitch}, -\autopageref{tab:truefalseswitch} as the \PName{simple switch}. The default, -however, is \OptionValue{chapterprefix}{false}, the opposite -behaviour\textnote{\KOMAScript{} vs. standard classes} of that of the standard -classes, which corresponds to \OptionValue{chapterprefix}{true}. These options -also affect the automatic running heads in the headers (see -\autoref{sec:\LabelBase.pagestyle}, -\DescPageRef{\LabelBase.pagestyle.headings}). - -Sometimes you may want to use the simplified chapter headings produced by -\OptionValue{chapterprefix}{false} but at the same time to have the heading of -an appendix\Index{appendix} preceded by a line with ``Appendix'' followed by -the appendix letter. This is achieved by using the \Option{appendixprefix} -option (see \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}). -Since this results in an inconsistent document layout, I advise against using -this option. Ultimately, this option changes the \Option{chapterprefix} option -automatically at the beginning of the \DescRef{\LabelBase.cmd.appendix}. - -You\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}} can execute code -depending on the current setting for the chapter preceding line using -\Macro{IfChapterUsesPrefixLine}. If \Option{chapterprefix} is currently -active, the \PName{then code} is executed; otherwise, the \PName{else code} is -executed. - -\BeginIndex{FontElement}{chapterprefix}% -You can change the font style of the chapter number line that uses -\OptionValue{chapterprefix}{true} or \OptionValue{appendixprefix}{true} -by using the -\FontElement{chapterprefix}\ChangedAt{v2.96a}{\Class{scrbook}\and - \Class{scrreprt}} element with the \DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}). The default is to use the -\DescRef{\LabelBase.fontelement.chapter}\IndexFontElement{chapter} element -(see \DescPageRef{\LabelBase.cmd.chapter}, as well as -\autoref{tab:\LabelBase.structureElementsFont}, -\autopageref{tab:\LabelBase.structureElementsFont}). - -You can find additional settings for chapter headings in the explanation for -\DescRef{maincls-experts.cmd.RedeclareSectionCommand} and the commands -\DescRef{maincls-experts.cmd.chapterlineswithprefixformat} and -\DescRef{maincls-experts.cmd.chapterlinesformat} in -\autoref{sec:maincls-experts.sections}, \autoref{part:forExperts}.% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{headings}{setting} -\end{Declaration} -Headings\index{heading}\index{document structure} of sectioning levels -normally use a relatively large font size in both the standard classes and -{\KOMAScript}. This choice does not appeal to everyone and is especially -problematic for small paper sizes. Consequently, {\KOMAScript} provides, in -addition to the large headings defined by the -\OptionValue{headings}{big}\IndexOption{headings~=\textKValue{big}}% -\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% -\important{\OptionValue{headings}{big}\\ - \OptionValue{headings}{normal}\\ - \OptionValue{headings}{small}} option, the options -\OptionValue{headings}{normal}\IndexOption{headings~=\textKValue{normal}} and -\OptionValue{headings}{small}\IndexOption{headings~=\textKValue{small}}, which -allow for smaller headings. The font sizes resulting from these options for -\Class{scrbook} and \Class{scrreprt} are shown in -\autoref{tab:\LabelBase.structureElementsFont}, -\autopageref{tab:\LabelBase.structureElementsFont}. Specifically, all three -settings reset the elements \DescRef{\LabelBase.fontelement.chapter}% -\IndexFontElement{chapter}, -\DescRef{\LabelBase.fontelement.section}\IndexFontElement{section}, -\DescRef{\LabelBase.fontelement.subsection}\IndexFontElement{subsection}, -\DescRef{\LabelBase.fontelement.subsubsection}% -\IndexFontElement{subsubsection}, -\DescRef{\LabelBase.fontelement.paragraph}\IndexFontElement{paragraph}, and -\DescRef{\LabelBase.fontelement.subparagraph}\IndexFontElement{subparagraph} -to the corresponding defaults. \Class{scrartcl}\OnlyAt{\Class{scrbook}\and - \Class{scrreprt}} generally uses slightly smaller headings. The spacing -before and after chapter headings is also reset by these options. - -\iffalse% - Chapter headings also have the \Option{headings} option with the - \PValue{twolinechapter} or \PValue{onelinechapter} settings, which are - equivalent to the - \OptionValueRef{\LabelBase}{chapterprefix}{true} and - \OptionValueRef{\LabelBase}{chapterprefix}{false} options. In the appendix - there are additional effects of the \PValue{onelineappendix} and - \PValue{twolineappendix} options upon the \Option{headings} option, which - corresponds to - \OptionValueRef{\LabelBase}{appendixprefix}{false} and - \OptionValueRef{\LabelBase}{appendixprefix}{true} (see also - above). % -\else% - Chapter headings\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} also - have\important{% - \OptionValue{headings}{twolinechapter}\\ - \OptionValue{headings}{onelinechapter}\\ - \OptionValue{headings}{twolineappendix}\\ - \OptionValue{headings}{onelineappendix}% - } the two options \OptionValue{headings}{twolinechapter} and - \OptionValue{headings}{onelinechapter}, which correspond to - \OptionValueRef{\LabelBase}{chapterprefix}{true} and - \OptionValueRef{\LabelBase}{chapterprefix}{false} explained above. For the - appendix, - \OptionValueRef{\LabelBase}{appendixprefix}{true} and - \OptionValueRef{\LabelBase}{appendixprefix}{false} serve as alternatives for - the \OptionValue{headings}{twolineappendix} and - \OptionValue{headings}{onelineappendix} options. % - \iffalse% - For the appendix, \OptionValue{headings}{twolineappendix} and - \OptionValue{headings}{onelineappendix} are available, which correspond to - the \OptionValueRef{\LabelBase}{appendixprefix}{true} and - \OptionValueRef{\LabelBase}{appendixprefix}{false} options (also see above). - \fi% - Of course, these options do not exist with \Class{scrartcl}% - \iffree{}{% Umbruchkorrekturtext - , since this class does not have chapters}% - .% -\fi - -The\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} \OptionValue{headings}{standardclasses}% -\important{\OptionValue{headings}{standardclasses}} option adjusts the font -sizes of the headings to those of the standard classes. In addition, the font -for the \DescRef{\LabelBase.fontelement.disposition}% -\IndexFontElement{disposition} element is set to \Macro{bfseries}. It -therefore no longer uses a sans-serif font for the headings. If you use -\Class{scrbook}\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} or -\Class{scrreprt}, \OptionValue{headings}{twolinechapter} is also set and the -spacing between the chapter headings is adjusted to that of the standard -classes. - -You\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} can set the method to specify -the page on which new chapters begin with -\OptionValue{headings}{openany}\important{% - \OptionValue{headings}{openany}\\ - \OptionValue{headings}{openright}\\ - \OptionValue{headings}{openleft}}, \OptionValue{headings}{openright}, and -\OptionValue{headings}{openleft}, or alternatively with the -\DescRef{\LabelBase.option.open} option, which takes the values \PValue{any}, -\PValue{right}, and \PValue{left} (see above). - -Another\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} special feature of \KOMAScript{} is the handling of the -optional argument of the sectioning commands \DescRef{\LabelBase.cmd.part}, -\DescRef{\LabelBase.cmd.chapter}, etc. down to -\DescRef{\LabelBase.cmd.subparagraph}. You can change its function and -meaning\important{\OptionValue{headings}{optiontohead}\\ - \OptionValue{headings}{optiontotoc}\\ - \OptionValue{headings}{optiontoheadandtoc}} with the options -\OptionValue{headings}{optiontohead}% -\IndexOption{headings~=\textKValue{optiontohead}}, -\OptionValue{headings}{optiontotoc}% -\IndexOption{headings~=\textKValue{optiontotoc}} and -\OptionValue{headings}{optiontoheadandtoc}% -\IndexOption{headings~=\textKValue{optiontoheadandtoc}}. - -See \autoref{tab:\LabelBase.headings} for a summary of all available settings -for the \Option{headings} option. The explanations of the sectioning commands -below contain examples using some of these settings. -\begin{desclist} - \desccaption[{Available values for the \Option{headings} option}]{% - Available values for the \Option{headings} option to format - section headings% - \label{tab:\LabelBase.headings}% - }{% - Available values for the \Option{headings} option (\emph{continued})% - }% - \pventry{big}{% - Use large fonts in the headings for each of the default sectioning levels - with wide spacing above and below the titles. - \IndexOption{headings~=\textKValue{big}}}% - \pventry{normal}{% - Use medium-sized fonts in the headings with medium spacing above and below - the titles. \IndexOption{headings~=\textKValue{normal}}}% - \entry{\PValue{onelineappendix}, \PValue{noappendixprefix}, - \PValue{appendixwithoutprefix}, \PValue{appendixwithoutprefixline}% - \IndexOption{headings~=\textKValue{onelineappendix}}}{% - Chapter headings in the appendix are set like other headings.% - }% - \entry{\PValue{onelinechapter}, \PValue{nochapterprefix}, - \PValue{chapterwithoutprefix}, \PValue{chapterwithoutprefixline}% - \IndexOption{headings~=\textKValue{onelinechapter}}}{% - Chapter titles are set like other headings.% - }% - \pventry{openany}{% - The commands \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, - \DescRef{\LabelBase.cmd.cleardoublestandardpage}, - \DescRef{\LabelBase.cmd.cleardoubleplainpage}, - \DescRef{\LabelBase.cmd.cleardoubleemptypage}, and - \DescRef{\LabelBase.cmd.cleardoublepage} generate a page break and insert - an interleaf page\Index{interleaf page} if needed to reach the next - right-hand page in two-sided printing, the same as in - \OptionValue{headings}{openright}. Parts, chapter, the index, and back - matter use \DescRef{\LabelBase.cmd.clearpage} instead of - \DescRef{\LabelBase.cmd.cleardoublepage}.% - \IndexOption{headings~=\textKValue{openany}}}% - \pventry{openleft}{% - The commands \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, - \DescRef{\LabelBase.cmd.cleardoublestandardpage}, - \DescRef{\LabelBase.cmd.cleardoubleplainpage}, - \DescRef{\LabelBase.cmd.cleardoubleemptypage}, and - \DescRef{\LabelBase.cmd.cleardoublepage} generate a page break and insert - an interleaf page if needed to reach the next left-hand page in two-sided - printing. Part, chapter, index and back matter use - \DescRef{\LabelBase.cmd.cleardoublepage}.% - \IndexOption{headings~=\textKValue{openleft}}}% - \pventry{openright}{% - The commands \DescRef{\LabelBase.cmd.cleardoublepageusingstyle}, - \DescRef{\LabelBase.cmd.cleardoublestandardpage}, - \DescRef{\LabelBase.cmd.cleardoubleplainpage}, - \DescRef{\LabelBase.cmd.cleardoubleemptypage}, and - \DescRef{\LabelBase.cmd.cleardoublepage} generate a page break and insert - an interleaf page if needed to reach the next right-hand page in two-sided - printing. Part, chapter, index and back matter use - \DescRef{\LabelBase.cmd.cleardoublepage}.% - \IndexOption{headings~=\textKValue{openright}}}% - \pventry{optiontohead}{% - The\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} advanced functionality of the optional argument of the - sectioning commands \DescRef{\LabelBase.cmd.part} down to - \DescRef{\LabelBase.cmd.subparagraph} is activated. By default, the - optional argument is used only for the running head.% - \IndexOption{headings~=\textKValue{optiontohead}}% - }% - \entry{\PValue{optiontoheadandtoc}, \PValue{optiontotocandhead}% - \IndexOption{headings~=\textKValue{optiontoheadandtoc}}}{% - The\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} advanced functionality of the optional argument of the - sectioning commands \DescRef{\LabelBase.cmd.part} down to - \DescRef{\LabelBase.cmd.subparagraph} is activated. By default, the - optional argument is used for the running head and the table of contents.% - }% - \pventry{optiontotoc}{% - The\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} advanced functionality of the optional argument of the - sectioning commands \DescRef{\LabelBase.cmd.part} down to - \DescRef{\LabelBase.cmd.subparagraph} is activated. By default, the - optional argument is used only for the table of contents.% - \IndexOption{headings~=\textKValue{optiontohead}}% - }% - \pventry{small}{% - Use small fonts in the headings with small spacing above and below the - titles.% - \IndexOption{headings~=\textKValue{small}}}% - \pventry{standardclasses}{% - \ChangedAt{v3.12}{\Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}}% - Reset the font settings for each of the standard sectioning levels and use - headings with the sizes of the standard classes. For chapter headings, - \Class{scrbook} und \Class{scrreprt} set - \OptionValue{headings}{twolinechapter}.% - }% - \entry{\PValue{twolineappendix}, \PValue{appendixprefix}, - \PValue{appendixwithprefix}, \PValue{appendixwithprefixline}% - \IndexOption{headings~=\textKValue{twolineappendix}}}{% - Chapter titles in the appendix are set with a number line whose format is - determined by - \DescRef{\LabelBase.cmd.chapterformat}\IndexCmd{chapterformat}.% - }% - \entry{\PValue{twolinechapter}, \PValue{chapterprefix}, - \PValue{chapterwithprefix}, \PValue{chapterwithprefixline}% - \IndexOption{headings~=\textKValue{twolinechapter}}}{% - Chapter titles are set with a number line whose format is determined by - \DescRef{\LabelBase.cmd.chapterformat}\IndexCmd{chapterformat}.% - }% -\end{desclist} -% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{numbers}{setting} -\end{Declaration}% -According to {\small DUDEN}, if only Arabic numerals are used to number -section headings\Index{headings}, the German practice is to have no point at -the end (see \cite[R\,3]{DUDEN}). On the other hand, if Roman numerals or -letters appear in the numbering, then a point should appear at the end of the -numbering (see \cite[R\,4]{DUDEN}). {\KOMAScript} has a mechanism that tries -to automate this somewhat complex rule. The result is that normally after -the sectioning commands \DescRef{\LabelBase.cmd.part} and -\DescRef{\LabelBase.cmd.appendix} the numbering switches to using a final -point. This information is saved in the \File{aux} file and takes effect on -the next {\LaTeX} run. - -Sometimes the mechanism for placing or omitting the final point may fail. -Sometimes other languages have different rules. Therefore you can force the -use of the final point with the option -\OptionValue{numbers}{endperiod}\IndexOption{numbers~=\textKValue{endperiod}}% -\important{\OptionValue{numbers}{endperiod}\\ -\OptionValue{numbers}{noendperiod}} or to prohibit it with -\OptionValue{numbers}{noendperiod}. - -Note\textnote{Attention!} that this mechanism only takes effect on the -next {\LaTeX} run. Therefore, before you try to use these options to force -the correct numbering format, you should always perform another \LaTeX{} run -without modifying the document. - -You can find a summary of the available values for the \PName{setting} of -\PName{numbers} in \autoref{tab:\LabelBase.numbers}. Unlike most other -settings, this option can only be set in the document preamble, i.\,e. before -\Macro{begin}\PParameter{document}. - -\begin{table} - \caption[{Available values for the \Option{numbers} option}]{Available values - of the \Option{numbers} option to configure the final points of the - numbers for section headings} - \label{tab:\LabelBase.numbers} - \begin{desctabular} - \entry{\PValue{autoendperiod}, \PValue{autoenddot}, \PValue{auto}}{% - \KOMAScript{} decides whether to set the point at the end of sectioning - command numbers. If there are only Arabic numerals, the point will - be omitted. If a letter or Roman numeral is found, the - point is set. However, references to these numbers are set without - a final point.% - \IndexOption{numbers~=\textKValue{autoendperiod}}}% - \entry{\PValue{endperiod}, \PValue{withendperiod}, \PValue{periodatend}, - \PValue{enddot}, \PValue{withenddot}, \PValue{dotatend}}{% - All numbers of sectioning commands and their subordinate numbers are set - with a final point. Only references will be set without the final - point.% - \IndexOption{numbers~=\textKValue{endperiod}}}% - \entry{\PValue{noendperiod}, \PValue{noperiodatend}, - \PValue{noenddot}, \PValue{nodotatend}}{% - All numbers of sectioning commands are set without a final point.% - \IndexOption{numbers~=\textKValue{noendperiod}}}% - \end{desctabular} -\end{table} -% -\EndIndexGroup - - -\begin{Declaration} - \Option{chapteratlists}% - \OptionVName{chapteratlists}{value} -\end{Declaration}% -As mentioned in \autoref{sec:\LabelBase.floats}, -\DescPageRef{\LabelBase.option.listof}\OnlyAt{\Class{scrbook}\and - \Class{scrreprt}}, every chapter that is created with -\DescRef{\LabelBase.cmd.chapter} normally inserts a vertical space in the -lists of floating environments (e.\,g., tables and figures). -Since version~2.96a,\important{\OptionValueRef{\LabelBase}{version}{2.96a}}% -\ChangedAt{v2.96a}{\Class{scrbook}\and \Class{scrreprt}} this also applies to -the \DescRef{\LabelBase.cmd.addchap} command unless you choose a compatibility -setting for an earlier version (see the \DescRef{\LabelBase.option.version} -option in \autoref{sec:\LabelBase.compatibilityOptions}, -\DescPageRef{\LabelBase.option.version}). - -In addition, you can use the \Option{chapteratlists} option to change the -vertical spacing by specifying the desired distance as the \PName{value}. -The default with \OptionValueRef{\LabelBase}{listof}{chaptergapsmall}% -\IndexOption{listof~=\textKValue{chaptergapsmall}} % -is 10\Unit{pt} (see the\DescRef{\LabelBase.option.version} option in -\autoref{sec:\LabelBase.compatibilityOptions}, -\DescPageRef{\LabelBase.option.version}). - -If you use \OptionValue{chapteratlists}{entry}% -\IndexOption{chapteratlists~=\textKValue{entry}}% -\important{\OptionValue{chapteratlists}{entry}} or \Option{chapteratlists} -without specifying a value, instead of a vertical space, the chapter entry -itself will be entered into the lists. Note that such an entry occurs even if -the chapter does not contain a floating environment. A method where only -chapters with floating environments are displayed in the respective list can -be found in the German-language \KOMAScript{} forum at -\cite{https://komascript.de/comment/5070}. - -Please\textnote{Attention!} note that changes to this option only takes -effect after two additional {\LaTeX} runs.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{part}\OParameter{short version}\Parameter{heading}% - \Macro{chapter}\OParameter{short version}\Parameter{heading}% - \Macro{section}\OParameter{short version}\Parameter{heading}% - \Macro{subsection}\OParameter{short version}\Parameter{heading}% - \Macro{subsubsection}\OParameter{short version}\Parameter{heading}% - \Macro{paragraph}\OParameter{short version}\Parameter{heading}% - \Macro{subparagraph}\OParameter{short version}\Parameter{heading} -\end{Declaration}% -\Index[indexmain]{part}% -\Index[indexmain]{chapter}% -\Index[indexmain]{section}% -The standard sectioning commands in {\KOMAScript} work the same way as those -in the standard classes. Thus, you can specify an alternative text for the -table of contents and running heads as an optional argument to the sectioning -commands. - -However, with\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}\textnote{\KOMAScript{} vs. standard classes} the -\important{\DescRef{\LabelBase.option.headings}} -\OptionValueRef{\LabelBase}{headings}{optiontohead}% -\IndexOption[indexmain]{headings~=\textKValue{optiontohead}} option, -\KOMAScript{} only uses the optional argument \PName{short version} in the -running head, not the table of contents. Of course, this text will only appear -if you use a page style\Index{page>style} that puts the corresponding -sectioning level in the running head. See \autoref{sec:\LabelBase.pagestyle} -and \autoref{cha:scrlayer-scrpage}. With the -\OptionValueRef{\LabelBase}{headings}{optiontotoc}% -\IndexOption[indexmain]{headings~=\textKValue{optiontotoc}} option, -\KOMAScript{} uses the optional argument \PName{short version} exclusively for -the table of contents and not the running head. However, the entry will be -shown only if the \DescRef{\LabelBase.counter.tocdepth} counter is great -enough (see \autoref{sec:\LabelBase.toc}, -\DescPageRef{\LabelBase.counter.tocdepth}). With the -\OptionValueRef{\LabelBase}{headings}{optiontoheadandtoc}% -\IndexOption[indexmain]{headings~=\textKValue{optiontoheadandtoc}} option, -\KOMAScript{} uses the optional argument \PName{short version} in both the -table of contents and the running head. These three options all activate the -extended interpretation of the optional argument \PName{short version}, which -is not active by default. - -The \ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} extended interpretation of the optional argument checks to -see if there is an equals sign in \PName{short version}. If so, the optional -argument will be interpreted as an \PName{option list}. -Three options\,---\,\OptionVName{head}{running head}\important{\Option{head}\\ - \Option{tocentry}\\ - \Option{reference}\\ - \Option{nonumber}}, \OptionVName{tocentry}{table of contents entry}, -\OptionVName{reference}{reference title}% -\ChangedAt{v3.22}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}, -and \OptionVName{nonumber}{simple switch}\ChangedAt{v3.27}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}}\,---\,are supported with this -format. To use commas or equals signs within the values of those options, you -must enclose them in braces. - -Please\textnote{Attention!} note that this mechanism only works as long as -\KOMAScript{} controls the sectioning commands. If you use package that -redefines the \KOMAScript{}'s or the internal \LaTeX{} kernel's sectioning -commands, \KOMAScript{} can no longer provide this extended mechanism. This -also applies to a \KOMAScript{} extension that is always active: sectioning -commands with no heading text\textnote{empty headings} do not create entries -in the table of contents. If you really want an entry with empty heading text, -you can use an invisible entry like \lstinline|\mbox{}|. - -\begin{Example} - Suppose you have a document with very long chapter headings. These headings - should appear in the table of contents, but you want to limit the running - head to short, single-line headings. You can do this with the optional - argument of \Macro{chapter}. -\begin{lstcode} - \chapter[short version of chapter heading] - {The Sectioning Command for Chapters - Supports not only the Heading Text - Itself but also a Short Version Whose - Use can be Controlled} -\end{lstcode} - - A little later you realize that the line breaks for this long heading are - very inappropriate. You therefore want to choose the breaks - yourself. Nevertheless, you still want automatic line breaking in the table - of contents. With -\begin{lstcode} - \chapter[head={short version of chapter heading}, - tocentry={The Sectioning - Command for Chapters Supports not - only the Heading Text Itself but - also a Short Version Whose Use - can be Controlled}] - {The Sectioning\\ - Command for Chapters\\ - Supports not only\\ - the Heading Text Itself\\ - but also\\ - a Short Version Whose\\ - Use can be Controlled} -\end{lstcode} - you create separate entries for the table of contents, running head, and - chapter heading itself. The arguments of the options \Option{head} and - \Option{tocentry} have been enclosed in braces so their contents - can be arbitrary. - - The need for braces in the example above is best illustrated by another - example. Suppose you chose the - \OptionValueRef{\LabelBase}{headings}{optiontotoc} option and set the title - this way: -\begin{lstcode} - \section[head=\emph{value}] - {Option head=\emph{value}} -\end{lstcode} - This results in the entry ``Option head=\emph{value}'' in the table of - contents but ``\emph{value}'' in the running head. But surely you wanted the - entry ``head=\emph{value}'' in the table of contents and the complete - heading text in the running head. You can do this using braces: -\begin{lstcode} - \section[head{=}\emph{value}] - {Option head=\emph{value}} -\end{lstcode} - - A similar case concerns the comma. Using the same - \DescRef{\LabelBase.option.headings} option as before -\begin{lstcode} - \section[head=0, 1, 2, 3, \dots] - {Natural Numbers Including the Zero} -\end{lstcode} - results in an error because the comma is interpreted as the - separator between the individual options of the option list % - ``\lstinline|0, 1, 2, 3, \dots|''. But writing -\begin{lstcode} - \section[head={0, 1, 2, 3, \dots}] - {Natural Numbers Including the Zero} -\end{lstcode} - makes ``\lstinline|0, 1, 2, 3, \dots|'' the argument of - the \Option{head} option. -\end{Example} - -Like\ChangedAt{v3.22}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} setting the title of a running head with the \Option{head} -option, or setting the title of a table-of-contents entry with the -\Option{tocentry} option, you can set the title of a reference with the -\Package{nameref}\IndexPackage{nameref}\important{\Package{nameref}\\ - \Package{titleref}\\ - \Package{zref-titleref}} or -\Package{titleref}\IndexPackage{titleref} packages, or with the -\Package{titleref}\IndexPackage{zref-titleref} module of the -\Package{zref}\IndexPackage{zref} package, using the \Option{reference}% -\important{\Option{reference}} option. Note that the support for the -\Package{titleref} package is rather rudimentary, since that package's -performance is poor compared to the other two, and it is not fully compatible -with \Package{hyperref}\IndexPackage{hyperref}\important{\Package{hyperref}}. - -You can deactivate the numbering using -\OptionValue{nonumber}{true}\important{\Option{nonumber}}% -\ChangedAt{v3.27}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} -in the extended optional argument. In contrast to the -\hyperref[desc:maincls.cmd.part*]{starred versions of the sectioning commands} -explained below, the titles will still be added to the table of contents and, -if applicable, used for the running head. For \Macro{part}, \Macro{chapter}, -and \Macro{section}, using \OptionValue{nonumber}{true} this essentially -corresponds to the \DescRef{\LabelBase.cmd.addpart}, -\DescRef{\LabelBase.cmd.addchap}, and \DescRef{\LabelBase.cmd.addsec} -commands, which are explained on \DescPageRef{\LabelBase.cmd.addpart}. - -The part-level title\important{\Macro{part}} (\Macro{part}) differs from other -sectioning levels by being numbered independently. This means that the chapter -level (in \Class{scrbook} or \Class{scrreprt}), or the section level (in -\Class{scrartcl}) is numbered consecutively over all parts. Furthermore, for -the \Class{scrbook}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} and -\Class{scrreprt} classes, the title of the part level together with the -corresponding preamble (see \DescRef{\LabelBase.cmd.setpartpreamble}, -\DescPageRef{\LabelBase.cmd.setpartpreamble}) is set on a separate page. - -The \Macro{chapter}\important{\Macro{chapter}}\OnlyAt{\Class{scrbook}\and - \Class{scrreprt}} command only exists in the book and report classes, that -is, in \Class{book}, \Class{scrbook}, \Class{report} and \Class{scrreport}, -but not in the article classes \Class{article} and \Class{scrartcl}. -Furthermore, the \Macro{chapter}\textnote{\KOMAScript{} vs. standard classes} -command in {\KOMAScript} differs substantially from the version in the -standard classes. In the standard classes, the chapter number is used together -with the prefix ``Chapter'', or the corresponding word in the appropriate -language, on a separate line above the actual chapter title text. -\KOMAScript{} replaces this -overpowering\important{\DescRef{\LabelBase.option.chapterprefix}\\ - \DescRef{\LabelBase.option.appendixprefix}} style with a simple chapter -number before the chapter title, but you can restore the original behaviour -with the \DescRef{\LabelBase.option.chapterprefix} option (see -\DescPageRef{\LabelBase.option.chapterprefix}). - -Please\textnote{Attention!} note that \Macro{part} and \Macro{chapter} in the -\Class{scrbook} and \Class{scrreprt} -\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} classes change the page style for -one page. The page style applied in {\KOMAScript} is defined in the macros -\DescRef{\LabelBase.cmd.partpagestyle} and -\DescRef{\LabelBase.cmd.chapterpagestyle} (see -\autoref{sec:\LabelBase.pagestyle}, -\DescPageRef{\LabelBase.cmd.titlepagestyle}). - -\BeginIndexGroup -\BeginIndex[indexother]{}{font}% -\BeginIndex[indexother]{}{font>style}% -\BeginIndex[indexother]{}{font>size}% -\BeginIndex{FontElement}{part}\LabelFontElement{part}% -\BeginIndex{FontElement}{partnumber}\LabelFontElement{partnumber}% -\BeginIndex{FontElement}{chapter}\LabelFontElement{chapter}% -\BeginIndex{FontElement}{chapterprefix}\LabelFontElement{chapterprefix}% -\BeginIndex{FontElement}{section}\LabelFontElement{section}% -\BeginIndex{FontElement}{subsection}\LabelFontElement{subsection}% -\BeginIndex{FontElement}{subsubsection}\LabelFontElement{subsubsection}% -\BeginIndex{FontElement}{paragraph}\LabelFontElement{paragraph}% -\BeginIndex{FontElement}{subparagraph}\LabelFontElement{subparagraph}% -\BeginIndex{FontElement}{disposition}\LabelFontElement{disposition}% -You\ChangedAt{v2.8p}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} can change the font style for all headings with the -\DescRef{\LabelBase.cmd.setkomafont}\IndexCmd{setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont}\IndexCmd{addtokomafont} commands (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}). In doing so, the element -\FontElement{disposition}\important{\FontElement{disposition}} is applied -first, followed by the specific element\important{% - \FontElement{part}\\ - \FontElement{chapter}\\ - \FontElement{section}\\ - \FontElement{subsection}\\ - \FontElement{paragraph}\\ - \FontElement{subparagraph}} for each sectioning level (see -\autoref{tab:\LabelBase.fontelements}, -\autopageref{tab:\LabelBase.fontelements}). There is a separate elements, -\FontElement{partnumber}, for the number of the part heading, and -\FontElement{chapterprefix}, for the optional prefix line of chapter headings. -The initial definition for the \FontElement{disposition} element is -\Macro{normalcolor}\linebreak[2]\Macro{sffamily}\linebreak[2]\Macro{bfseries}. -The default font sizes for the specific elements depends on the options -\OptionValueRef{\LabelBase}{headings}{big}, -\OptionValueRef{\LabelBase}{headings}{normal}, and -\OptionValueRef{\LabelBase}{headings}{small} (see -\DescPageRef{\LabelBase.option.headings}). They are listed in -\autoref{tab:\LabelBase.structureElementsFont}. -% Umbruchkorrektur: Tabelle verschoben -\begin{table} -% \centering% -% \caption - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% - \begin{captionbeside}[{Default font sizes for different levels of document - sectioning}]{% - \label{tab:\LabelBase.structureElementsFont}% - Default font sizes for different levels of document sectioning in - \Class{scrbook} and \Class{scrreprt}}[l] - \begin{tabular}[t]{lll} - \toprule - Class Option & Element & Default\\ - \midrule - \OptionValueRef{\LabelBase}{headings}{big} - & \DescRef{\LabelBase.fontelement.part}\IndexFontElement{part} - & \Macro{Huge} \\ - & \DescRef{\LabelBase.fontelement.partnumber}% - \IndexFontElement{partnumber} - & \Macro{huge} \\ - & \DescRef{\LabelBase.fontelement.chapter}\IndexFontElement{chapter} - & \Macro{huge} \\ - & \DescRef{\LabelBase.fontelement.chapterprefix}% - \IndexFontElement{chapterprefix} - & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{chapter} \\ - & \DescRef{\LabelBase.fontelement.section}\IndexFontElement{section} - & \Macro{Large} \\ - & \DescRef{\LabelBase.fontelement.subsection}% - \IndexFontElement{subsection} - & \Macro{large} \\ - & \DescRef{\LabelBase.fontelement.subsubsection}% - \IndexFontElement{subsubsection} - & \Macro{normalsize} \\ - & \DescRef{\LabelBase.fontelement.paragraph}\IndexFontElement{paragraph} - & \Macro{normalsize} \\ - & \DescRef{\LabelBase.fontelement.subparagraph}% - \IndexFontElement{subparagraph} - & \Macro{normalsize} \\[1ex] - \OptionValueRef{\LabelBase}{headings}{normal} - & \DescRef{\LabelBase.fontelement.part} & \Macro{huge} \\ - & \DescRef{\LabelBase.fontelement.partnumber} & \Macro{huge} \\ - & \DescRef{\LabelBase.fontelement.chapter} & \Macro{LARGE} \\ - & \FontElement{chapterprefix}\IndexFontElement{chapterprefix} - & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{chapter} \\ - & \DescRef{\LabelBase.fontelement.section} & \Macro{Large} \\ - & \DescRef{\LabelBase.fontelement.subsection} & \Macro{large} \\ - & \DescRef{\LabelBase.fontelement.subsubsection} & \Macro{normalsize} \\ - & \DescRef{\LabelBase.fontelement.paragraph} & \Macro{normalsize} \\ - & \DescRef{\LabelBase.fontelement.subparagraph} & \Macro{normalsize} \\[1ex] - \OptionValueRef{\LabelBase}{headings}{small} - & \DescRef{\LabelBase.fontelement.part} & \Macro{LARGE} \\ - & \DescRef{\LabelBase.fontelement.partnumber} & \Macro{LARGE} \\ - & \DescRef{\LabelBase.fontelement.chapter} & \Macro{Large} \\ - & \FontElement{chapterprefix}\IndexFontElement{chapterprefix} - & \DescRef{\LabelBase.cmd.usekomafont}\PParameter{chapter} \\ - & \DescRef{\LabelBase.fontelement.section} & \Macro{large} \\ - & \DescRef{\LabelBase.fontelement.subsection} & \Macro{normalsize} \\ - & \DescRef{\LabelBase.fontelement.subsubsection} & \Macro{normalsize} \\ - & \DescRef{\LabelBase.fontelement.paragraph} & \Macro{normalsize} \\ - & \DescRef{\LabelBase.fontelement.subparagraph} & \Macro{normalsize}\\ - \bottomrule - \end{tabular} - \end{captionbeside} -\end{table} -% -\begin{Example} - Suppose you use the \OptionValueRef{\LabelBase}{headings}{big} class option - and notice that the very large headings of the document parts are too bold. - You could change this as follows: -\begin{lstcode} - \setkomafont{disposition}{\normalcolor\sffamily} - \part{Appendices} - \addtokomafont{disposition}{\bfseries} -\end{lstcode} -Using the command above you only switch off the font attribute -\textbf{bold} for a heading ``Appendices''. A much more convenient -and elegant solution is to change all \Macro{part} headings at once. -This is done either by: -\begin{lstcode} - \addtokomafont{part}{\normalfont\sffamily} - \addtokomafont{partnumber}{\normalfont\sffamily} -\end{lstcode} - or simply: -\begin{lstcode} - \addtokomafont{part}{\mdseries} - \addtokomafont{partnumber}{\mdseries} -\end{lstcode} -The second version is preferred because it gives you the correct result -even if you change the \DescRef{\LabelBase.fontelement.disposition} -element\IndexFontElement{disposition}, for instance: -\begin{lstcode} - \setkomafont{disposition}{\normalcolor\bfseries} -\end{lstcode} - With this change, it is possible to set all section levels at once to no - longer use sans serif fonts. -\end{Example} - -I strongly advise against using the ability to switch fonts in order to mix -fonts, font sizes, and font attributes wildly. Picking the right font for the -job is a matter for experts and has almost nothing to do with the personal -tastes of non-experts. See the citation at the end of -\autoref{sec:typearea.tips}, \autopageref{sec:typearea.tips.cite} and to the -following explanation. - -\begin{Explain} - It is possible to use different font types for different sectioning - levels in {\KOMAScript}. Non-experts in typography should absolutely avoid - doing so for excellent typographical reasons. - - A rule of typography states that you should mix as few fonts as possible. - Using sans serif for headings already seems to violate this rule. However, - you should realize that large, bold, serif letters are much too heavy for - headings. Strictly speaking, you should then use a normal instead of a bold - or semi-bold font. However, in deeper levels of the sectioning, a normal - font may then appear too light. On the other hand, sans serif fonts have a - very pleasant appearance in headings, and almost solely in headings. There - is, therefore, good reason why sans serif is the default in {\KOMAScript}. - - Greater variety should, however, be avoided. Font mixing is something for - professionals. For this reason, if you want to use fonts other than the - standard {\TeX} fonts\,---\,regardless of whether these are CM\Index{CM - fonts}, EC\Index{EC fonts}, or LM fonts\Index{LM fonts}\,---\,you should - consult an expert about the compatibility of the sans serif and serif fonts, - or redefine the element - \DescRef{\LabelBase.fontelement.disposition}\IndexFontElement{disposition} - as a precautionary measure. The author considers the commonly encountered - combinations of Times and Helvetica or Palatino with Helvetica to be - awkward. -\end{Explain} -\EndIndexGroup -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{part*}\Parameter{heading}% - \Macro{chapter*}\Parameter{heading}% - \Macro{section*}\Parameter{heading}% - \Macro{subsection*}\Parameter{heading}% - \Macro{subsubsection*}\Parameter{heading}% - \Macro{paragraph*}\Parameter{heading}% - \Macro{subparagraph*}\Parameter{heading} -\end{Declaration}% -The starred variants of all sectioning commands produce -unnumbered\Index{numbering} headings which do not appear in the table of -contents\Index{table>of contents}\Index{contents>table of} or in the running -head\Index{running head}. The absence of a running head often has an unwanted -side effect. If, for example, a chapter set using \Macro{chapter*} spans -several pages, then the running head of the previous chapter suddenly -reappears. {\KOMAScript} offers a solution for this problem, described below. -\Macro{chapter*}\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} only exists in -book and report classes, that is, \Class{book}, \Class{scrbook}, -\Class{report} and \Class{scrreport}, not in the article classes -\Class{article} and \Class{scrartcl}. - -Please\textnote{Attention!} note that \DescRef{\LabelBase.cmd.part} and -\DescRef{\LabelBase.cmd.chapter} change the page style for one page. While the -standard classes use the \PageStyle{plain} page style, {\KOMAScript} applies -the style defined in the \DescRef{\LabelBase.cmd.partpagestyle} and -\DescRef{\LabelBase.cmd.chapterpagestyle} macros (see -\autoref{sec:\LabelBase.pagestyle}, -\DescPageRef{\LabelBase.cmd.titlepagestyle}). - -The possibilities for switching fonts\ChangedAt{v2.8p}{% - \Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}} % -described above for the unstarred variants apply without change. The elements -use the same names since they do not indicate variants but structuring -levels.% -% -\EndIndexGroup - - -\iffalse% Umbruchkorrekturtext - In the standard classes\textnote{\KOMAScript{} vs. standard classes} there - are no further structuring commands. In particular, there are no commands - which can produce unnumbered chapters or sections which show up in the table - of contents and in the running heading.% -\fi - - -\begin{Declaration} - \Macro{addpart}\OParameter{short version}\Parameter{heading}% - \Macro{addpart*}\Parameter{heading}% - \Macro{addchap}\OParameter{short version}\Parameter{heading}% - \Macro{addchap*}\Parameter{heading}% - \Macro{addsec}\OParameter{short version}\Parameter{heading}% - \Macro{addsec*}\Parameter{heading} - \textnote[n]{\KOMAScript{} vs. standard classes} -\end{Declaration}% -In addition to the commands of the standard classes, {\KOMAScript} offers the -new commands \Macro{addpart}, \Macro{addsec} and \Macro{addchap}. They are -similar to the standard commands \DescRef{\LabelBase.cmd.part}\IndexCmd{part}% -\important{\DescRef{\LabelBase.cmd.part}, \DescRef{\LabelBase.cmd.chapter}, - \DescRef{\LabelBase.cmd.section}}, -\DescRef{\LabelBase.cmd.chapter}\IndexCmd{chapter} and -\DescRef{\LabelBase.cmd.section}\IndexCmd{section} except that they are -unnumbered. They thus produce both a running head and an entry in the table of -contents which take into account the \DescRef{\LabelBase.option.headings}% -\important{\DescRef{\LabelBase.option.headings}} option settings, especially -the handling of the optional argument. However, enabling or disabling the -\Option{nonumber} switch will have no effect. - -The starred variants \Macro{addchap*} and \Macro{addsec*} are similar to the -standard commands \DescRef{\LabelBase.cmd.chapter*} and -\DescRef{\LabelBase.cmd.section*} except for a small but important difference: -the running heads are deleted. This eliminates the side effect of obsolete -headers mentioned above. Instead, the running heads on subsequent pages remain -empty. \OnlyAt{\Class{book}\and \Class{scrreprt}}\Macro{addchap} and -\Macro{addchap*} only exist, of course, in book and report classes, namely -\Class{book}, \Class{scrbook}, \Class{report} and \Class{scrreport}, not in -the article classes \Class{article} and \Class{scrartcl}. - -The \Macro{addpart} command produces an unnumbered document part with an -entry in the table of contents. Since the running heads are already deleted -by \DescRef{\LabelBase.cmd.part} and \DescRef{\LabelBase.cmd.part*} the -previously mentioned problem with obsolete headers does not exist. The starred -version \Macro{addpart*} is thus identical to \DescRef{\LabelBase.cmd.part*} -and is only defined for reasons of consistency. - -Please note\textnote{Attention!} that \Macro{addpart} and \Macro{addchap} and -their starred variants change the page style for one page. The particular page -style is defined in the macros \DescRef{\LabelBase.cmd.partpagestyle} and -\DescRef{\LabelBase.cmd.chapterpagestyle} (see -\autoref{sec:\LabelBase.pagestyle}, -\DescPageRef{\LabelBase.cmd.titlepagestyle}). -\iffree{\iffalse}{\csname iftrue\endcsname}% Umbruchkorrekturbeispiel - \begin{Example} - You write a book with a long afterword that spans several pages. This - should receive neither a running head nor an entry in the table of - contents. Therefore, you first use \DescRef{\LabelBase.cmd.chapter*}: -\begin{lstcode} - \documentclass{scrbook} - \usepackage{blindtext} - \begin{document} - \tableofcontents - \blinddocument - \chapter*{Afterword} - \Blindtext[10] - \end{document} -\end{lstcode} - However, you discover that the running head of the previous chapter - reappears on the second and third pages of the afterword. Naturally, you do - not want that. Therefore, you use \Macro{addchap*}: -\begin{lstcode} - \documentclass{scrbook} - \usepackage{blindtext} - \begin{document} - \tableofcontents - \blinddocument - \addchap*{Afterword} - \Blindtext[10] - \end{document} -\end{lstcode} - The complete postscript is now without a running head, if that is what you - want. But even that does not quite meet your expectations. A running head - would be nice. With -\begin{lstcode} - \documentclass{scrbook} - \usepackage{blindtext} - \begin{document} - \tableofcontents - \blinddocument - \addchap{Afterword} - \Blindtext[10] - \end{document} -\end{lstcode} - you now get both ``Afterword'' as the running head on the even pages and an - entry in the table of contents. But this entry bothers your publisher. He - insists that the afterword have no entry in the table of contents. Even if - that seems strange to you, you want to satisfy the publisher, so with - \OptionValueRef{\LabelBase}{headings}{optiontotocandhead} you first - activate the extended function for the optional argument and then - explicitly set an empty argument for the table of contents: -\begin{lstcode} - \documentclass[headings=optiontotocandhead] - {scrbook} - \usepackage{blindtext} - \begin{document} - \tableofcontents - \blinddocument - \addchap[tocentry={}]{Afterword} - \Blindtext[10] - \end{document} -\end{lstcode} - The running head is not changed by \OptionValue{tocentry}{\{\}}. Since - \Class{scrbook} automatically omits empty entries in the table of contents, - the publisher is now satisfied. - \end{Example}% -\fi - -The possibilities for switching fonts\ChangedAt{v2.8p}{% - \Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}} % -described above for the unstarred variant of the sectioning commands apply -without change. The elements have the same names since they do not designate -variants but sectioning levels.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{minisec}\Parameter{heading} -\end{Declaration}% -Sometimes you want a heading\Index{heading} that is highlighted but also -closely linked to the following text. Such a heading should not be separated -by a large vertical skip. - -The \Macro{minisec} command is designed for this situation. This heading is -not associated with any sectioning level\textnote{no sectioning level}. Such a -\emph{mini-section} does not produce an entry in the table of contents, nor -does it receive any numbering. - -\BeginIndexGroup -\BeginIndex{FontElement}{minisec}\LabelFontElement{minisec}% -You can change the font of the \Macro{minisec} command using the -\DescRef{\LabelBase.fontelement.disposition}% -\important{\DescRef{\LabelBase.fontelement.disposition}\\ -\FontElement{minisec}} and \FontElement{minisec}\ChangedAt{v2.96a}{% - \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} element (see -\autoref{tab:maincls.fontelements}, \autopageref{tab:maincls.fontelements}). -The default of the \FontElement{minisec} element is empty, so by default only -the \DescRef{\LabelBase.fontelement.disposition} element is used.% -\EndIndexGroup - -\begin{Example} - You have developed a kit for building a mouse trap and want the - documentation separated into a list of necessary items and an - assembly description. You could write the following: -\begin{lstcode} - \documentclass{scrartcl} - - \begin{document} - - \title{DIY Projects} - \author{Two Left Thumbs} - \date{\today} - \maketitle - - \section{Mousetrap} - - The first project is suitable for beginners and only requires - a few components that should be found in every household. - - \minisec{Material Required} - - \begin{flushleft} - 1 board ($100\times 50 \times 12$)\\ - 1 swing-top cap of a beer-bottle\\ - 1 ballpoint pen\\ - 1 push pin\\ - 2 screws\\ - 1 hammer\\ - 1 knife - \end{flushleft} - - \minisec{Assembly} - First, find the mouse hole and put the push pin directly behind - the hole so that the mouse cannot escape during the following - actions. - - Next tap the swing-top cap into the mouse hole with the hammer. - If the cap is not big enough to block the hole completely and - permanently, take the board instead and screw it to the front - of the mouse hole using the two screws and the knife. Of - course, you can use a screwdriver instead of a knife. The - ballpoint pen has fallen victim to animal welfare. - \end{document} -\end{lstcode} - The main part, starting with the heading ``Material Required'' will look - like this: - \begin{ShowOutput}[\baselineskip]\setlength{\parindent}{1em} - \minisec{Material Required} - - \begin{flushleft} - 1 board ($100\times 50 \times 12$)\\ - 1 swing-top cap of a beer-bottle\\ - 1 ballpoint pen\\ - 1 push pin\\ - 2 screws\\ - 1 hammer\\ - 1 knife - \end{flushleft} - - \minisec{Assembly} - First, find the mouse hole and put the push pin directly behind the hole - so that the mouse cannot escape during the following actions. - - Next tap the swing-top cap into the mouse hole with the hammer. If the cap - is not big enough to block the hole completely and permanently, take the - board instead and screw it to the front of the mouse hole using the two - screws and the knife. Of course, you can use a screwdriver instead of a - knife. The ballpoint pen has fallen victim to animal welfare. - \end{ShowOutput} -\end{Example} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{raggedsection}% - \Macro{raggedchapter}% - \Macro{raggedpart} -\end{Declaration}% -In the standard classes\textnote{\KOMAScript{} vs. standard classes}, headings -are set as justified text. That means that hyphenated words can occur and -multi-line headings are stretched up to the text width. This approach is -rather uncommon in typography. {\KOMAScript} therefore sets the -headings left aligned with hanging indentation using \Macro{raggedsection} -with the default: -\begin{lstcode} - \newcommand*{\raggedsection}{\raggedright} -\end{lstcode} -You can redefine this command with \Macro{renewcommand}. -\begin{Example} - You prefer justified headings, so you write in the preamble of your document: -\begin{lstcode} - \renewcommand*{\raggedsection}{} -\end{lstcode} - or more compactly: -\begin{lstcode} - \let\raggedsection\relax -\end{lstcode} - You will get heading formatting which is very close to that of the standard - classes. It will become even closer when you combine this change with the - change to the - \DescRef{\LabelBase.fontelement.disposition}\IndexFontElement{disposition} - element mentioned above. -\end{Example} - -Because\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}} some users want -a different alignment for the \DescRef{\LabelBase.cmd.chapter} level than for -the other sectioning levels, you can change the -\DescRef{\LabelBase.cmd.chapter} justification separately by redefining -\Macro{raggedchapter}. By default, however, this command simply uses -\Macro{raggedsection}, so changing \Macro{raggedsection} indirectly affects -\Macro{raggedchapter}. - -By default, part headings (\DescRef{\LabelBase.cmd.part}) are set horizontally -centred rather than ragged right. This formatting is performed by the -\Macro{raggedpart} statement, which has the default definition -\begin{lstcode} - \let\raggedpart\centering -\end{lstcode} -You can also redefine this command using \Macro{renewcommand}. -\begin{Example} - You want the headings for \DescRef{\LabelBase.cmd.part} to be formatted the - same as any other sectioning command. To do so, put -\begin{lstcode} - \renewcommand*{\raggedpart}{\raggedsection} -\end{lstcode} - in the preamble of your document. In\textnote{Hint!} this case, and unlike - in the example above, we did not use \Macro{let} because \Macro{let} would - set \Macro{raggedpart} to the underlying value of \Macro{raggedsection}. - Subsequent changes to \Macro{raggedsection} would then not change the - behaviour of \Macro{raggedpart}. By redefining with \Macro{renewcommand}, - \Macro{raggedpart} will use the current meaning of \Macro{raggedsection} at - the time it is used rather than when it was redefined. -\end{Example}% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{partformat} - \Macro{chapterformat} - \Macro{sectionformat} - \Macro{subsectionformat} - \Macro{subsubsectionformat} - \Macro{paragraphformat} - \Macro{subparagraphformat} - \Macro{othersectionlevelsformat}\Parameter{sectioning name}\Parameter{} - \Parameter{counter output} - \Macro{IfUsePrefixLine}\Parameter{then code}\Parameter{else code} - \Macro{autodot} -\end{Declaration}% -{\KOMAScript} adds another logical layer above \Macro{the\PName{sectioning - name}} to format the sectioning numbers. The counters for each heading are -not merely output. They are formatted using the commands \Macro{partformat}, -\Macro{chapterformat}, down to -\Macro{subparagraphformat}\ChangedAt{v3.17}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}}. Of course the \Macro{chapterformat} -command, like \Macro{thechapter}, does not exist in the \Class{scrartcl} -class, but only in the \Class{scrbook} and \Class{scrreprt} -classes.\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} - -As already explained for the \DescRef{\LabelBase.option.numbers}% -\important{\DescRef{\LabelBase.option.numbers}} option at the beginning of -this section (see \DescPageRef{\LabelBase.option.numbers}), {\KOMAScript}'s -handling of points in section numbers implements the rules given in -\cite{DUDEN}, which are standard in German-language typography, in the -\Macro{autodot} command. In all levels except for -\DescRef{\LabelBase.cmd.part}, a point is followed by a further -\Macro{enskip}. This corresponds to a horizontal skip of 0.5\Unit{em}. - -Since \KOMAScript~3.17\ChangedAt{v3.17}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}}, the command -\Macro{othersectionlevelsformat} is used only in rare circumstances, i.\,e., -if the corresponding format command to a section command does not exist or is -\Macro{relax}. This should not happen for any section commands defined by -\KOMAScript{} itself. Therefore the command is no longer officially -documented. Nevertheless, if you select a compatibility level prior to -3.17\important{\OptionValueRef{\LabelBase}{version}{3.17}} (see option -\DescRef{\LabelBase.option.version}, -\autoref{sec:\LabelBase.compatibilityOptions}, -\DescPageRef{\LabelBase.option.version}), commands \Macro{sectionformat} down -to \Macro{subparagraphformat} are ignored by \KOMAScript{}. Instead, these -layers will continue to use \Macro{othersectionlevelsformat}. - -You can redefine the formatting commands using \Macro{renewcommand} to fit -them to your personal needs. The following default definitions are used by the -{\KOMAScript} classes: -\begin{lstcode} - \newcommand*{\partformat}{\partname~\thepart\autodot} - \newcommand*{\chapterformat}{% - \mbox{\chapappifchapterprefix{\nobreakspace}\thechapter - \autodot\IfUsePrefixLine{}{\enskip}}} - \newcommand*{\sectionformat}{\thesection\autodot\enskip} - \newcommand*{\subsectionformat}{% - \thesubsection\autodot\enskip} - \newcommand*{\subsubsectionformat}{% - \thesubsubsection\autodot\enskip} - \newcommand*{\paragraphformat}{\theparagraph\autodot\enskip} - \newcommand*{\subparagraphformat}{% - \thesubparagraph\autodot\enskip} - \newcommand*{\othersectionlevelsformat}[3]{% - #3\autodot\enskip} -\end{lstcode} - -Because\ChangedAt{v3.17}{\Class{scrbook}\and \Class{scrreprt}} it uses -\Macro{IfUsePrefixLine}, \Macro{chapterformat} should not be used outside of -\DescRef{\LabelBase.cmd.chapter}. \Macro{IfUsePrefixLine} is only valid inside -\KOMAScript{} sectioning commands. Within those commands, it executes the -\PName{then code} if a prefix line for the number is used and the \PName{else -code} otherwise. - -Please also remember\textnote{Attention!} to replace \Macro{newcommand} with -\Macro{renewcommand} if you want to redefine one of the commands above. - -\begin{Example} - Suppose you do not want the word ``Part'' written in front of the part - number when you use \DescRef{\LabelBase.cmd.part}. You can put the - following command in the preamble of your document: -\begin{lstcode} - \renewcommand*{\partformat}{\thepart\autodot} -\end{lstcode} - In fact, you could do without \Macro{autodot} here and insert a fixed point - instead. Since \DescRef{\LabelBase.cmd.part} is numbered with Roman numerals, - it must be followed by a point according to \cite{DUDEN}. However, by using - \Macro{autodot} you retain the ability to use the - \DescRef{\LabelBase.option.numbers}% - \important{\DescRef{\LabelBase.option.numbers}} option - \OptionValueRef{\LabelBase}{numbers}{endperiod} and thus deviate from - the rule. You can find more details concerning class options on - \DescPageRef{\LabelBase.option.numbers}. - - Another possibility is to place the section numbers in the left margin in - such a way that the heading text is left aligned with the surrounding text. - You can accomplish this with: -\begin{lstcode} - \renewcommand*{\sectionformat}{% - \makebox[0pt][r]{\thesection\autodot\enskip}} - \renewcommand*{\subsectionformat}{% - \makebox[0pt][r]{\thesubsection\autodot\enskip}} - \renewcommand*{\subsubsectionformat}{% - \makebox[0pt][r]{% - \thesubsubsection\autodot\enskip}} - \renewcommand*{\paragraphformat}{% - \makebox[0pt][r]{\theparagraph\autodot\enskip}} - \renewcommand*{\paragraphformat}{% - \makebox[0pt][r]{% - \thesubparagraph\autodot\enskip}} -\end{lstcode} - The optional arguments of the \Macro{makebox} command require \LaTeX{} to - create a zero-width box with right-justified content. As a result, the - contents of the box are output to the left of the current position.% - \iffree{}{ %Umbruchkorrekturtext - This popular trick avoids the need first to measure the width of the - number and the spacing, and then to change the current position - appropriately with \Macro{hspace}.} - You can find more about the optional arguments of \Macro{makebox} in - \cite{latex:usrguide}. -\end{Example} - -For formatting changes in the headings that go beyond merely formatting the -unit number, please refer to -\DescRef{maincls-experts.cmd.partlineswithprefixformat}% -\IndexCmd{partlineswithprefixformat}, -\DescRef{maincls-experts.cmd.chapterlineswithprefixformat}% -\IndexCmd{chapterlineswithprefixformat} and -\DescRef{maincls-experts.cmd.chapterlinesformat}\IndexCmd{chapterlinesformat}, -as well as -\DescRef{maincls-experts.cmd.sectionlinesformat}\IndexCmd{sectionlinesformat} -and its \DescRef{maincls-experts.cmd.sectioncatchphraseformat}% -\IndexCmd{sectioncatchphraseformat} format in -\autoref{sec:maincls-experts.sections}, starting from -\DescPageRef{maincls-experts.cmd.partlineswithprefixformat}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{chapappifchapterprefix}\Parameter{additional text}% - \Macro{chapapp} -\end{Declaration}% -These\ChangedAt{v2.8o}{\Class{scrbook}\and\Class{scrreprt}} two commands are -used internally by {\KOMAScript} and also made available to the user. Later, -you will see how to use them, for example to redefine other commands.% -\OnlyAt{\Class{scrbook}\and\Class{scrreprt}} - -If you use the layout option \OptionValueRef{\LabelBase}{chapterprefix}{true}% -\important{\DescRef{\LabelBase.option.chapterprefix}} (see -\DescPageRef{\LabelBase.option.chapterprefix}), \Macro{chapappifchapterprefix} -outputs the word ``Chapter''\Index{chapter>heading} in the body of the text in -the current language, followed by \PName{additional text}. In the -appendix\Index{appendix}, the word ``Appendix'' in the current language is -output instead, followed by \PName{additional text}. If the option -\OptionValue{\LabelBase}{chapterprefix}{false} is set, then nothing is output. - -The \Macro{chapapp} command always outputs the word ``Chapter'' or -``Appendix'', regardless of the setting of the -\DescRef{\LabelBase.option.chapterprefix} option. - -Since chapters only exist in the classes \Class{scrbook} and \Class{scrreprt}, -these commands only exist in these classes.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{chaptermark}\Parameter{running head}% - \Macro{addchapmark}\Parameter{running head}% - \Macro{sectionmark}\Parameter{running head}% - \Macro{addsecmark}\Parameter{running head}% - \Macro{subsectionmark}\Parameter{running head}% - \Macro{chaptermarkformat}% - \Macro{sectionmarkformat}% - \Macro{subsectionmarkformat} -\end{Declaration}% -\begin{Explain}% - As mentioned in \autoref{sec:\LabelBase.pagestyle}, the - \DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings}% - \important{\DescRef{\LabelBase.pagestyle.headings}} page style works with - automatic running heads\Index{running heads>automatic}. For this, the - commands \Macro{chaptermark} and \Macro{sectionmark}, or \Macro{sectionmark} - and \Macro{subsectionmark}, are defined accordingly. Every sectioning - command (\DescRef{\LabelBase.cmd.chapter}, \DescRef{\LabelBase.cmd.section}, - etc.) automatically executes the corresponding \Macro{\dots mark} command. - The parameter passed contains the text of the section heading% - \Index{heading}. The corresponding section number is added automatically in - the \Macro{\dots mark} command. The formatting is done according to the - sectioning level with one of the three commands \Macro{chaptermarkformat}, - \Macro{sectionmarkformat}, or \Macro{subsectionmarkformat}. - - Note\textnote{Attention!} that the running heads of - \DescRef{\LabelBase.cmd.addchap}\IndexCmd{addchap} and - \DescRef{\LabelBase.cmd.addsec}\IndexCmd{addsec} are also based on - \Macro{chaptermark} and \Macro{sectionmark}. However, the - \DescRef{\LabelBase.counter.secnumdepth} counter is set locally to a value - that switches off the numbering of chapters or sections. You should consider - this, for example, if you redefine \Macro{chaptermark} or - \Macro{sectionmark} (see \DescRef{\LabelBase.cmd.Ifnumbered} on - \DescPageRef{\LabelBase.cmd.Ifnumbered}). The starred variants - \DescRef{\LabelBase.cmd.addchap*} and \DescRef{\LabelBase.cmd.addsec*} use - additional commands \Macro{addchapmark} and \Macro{addsecmark} that are also - defined based on \Macro{chaptermark} and \Macro{sectionmark} with local - changes of \DescRef{\LabelBase.counter.secnumdepth}. - - Although\OnlyAt{\Class{scrartcl}} there is no \Macro{chaptermark} or - \Macro{chaptermarkformat} command in \Class{scrartcl}, there are two - commands, \Macro{subsectionmark} and \Macro{subsectionmarkformat}, which - exist only in \Class{scrartcl}. However using the - \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% - \IndexPackage{scrlayer-scrpage} package changes this (see - \autoref{cha:scrlayer-scrpage}). -\end{Explain} -Just as numbers in the sectioning-command headers are formatted with -\DescRef{\LabelBase.cmd.partformat} down to -\DescRef{\LabelBase.cmd.subparagraphformat}, \Macro{chaptermarkformat}, -\Macro{sectionmarkformat}, and \Macro{subsectionmarkformat} define the -formatting of the sectioning numbers in the automatic running heads. They can -be adapted to your personal needs with \Macro{renewcommand}. The original -definitions for the {\KOMAScript} classes are: -\begin{lstcode} - \newcommand*{\chaptermarkformat}{% - \chapappifchapterprefix{\ }\thechapter\autodot\enskip} - \newcommand*{\sectionmarkformat}{% - \thesection\autodot\enskip} - \newcommand*{\subsectionmarkformat}{% - \thesubsection\autodot\enskip} -\end{lstcode} -\begin{Example} - Suppose you want the word ``Chapter'' to precede the chapter number in the - running head. You could put the following definition in the preamble of your - document: -\begin{lstcode} - \renewcommand*{\chaptermarkformat}{% - \chapapp~\thechapter\autodot\enskip} -\end{lstcode} -\end{Example} -As you can see, both \DescRef{\LabelBase.cmd.chapapp} and -\DescRef{\LabelBase.cmd.chapappifchapterprefix}, explained above, are used -here.% -\EndIndexGroup - - -\begin{Declaration} - \Counter{secnumdepth} - \Macro{partnumdepth} - \Macro{chapternumdepth} - \Macro{sectionnumdepth} - \Macro{subsectionnumdepth} - \Macro{subsubsectionnumdepth} - \Macro{paragraphnumdepth} - \Macro{subparagraphnumdepth} -\end{Declaration}% -\BeginIndex{}{Nummerierung}% -Normally, the \Class{scrbook}\IndexClass{scrbook} and -\Class{scrreport}\IndexClass{scrreprt} classes number the section headings -from \DescRef{\LabelBase.cmd.part}\IndexCmd{part}\IndexCmd{chapter}% -\IndexCmd{section} down to -\DescRef{\LabelBase.cmd.subsection}\IndexCmd{subsection} and the -\Class{scrartcl}\IndexClass{scrartcl} class numbers them from -\DescRef{\LabelBase.cmd.part} down to -\DescRef{\LabelBase.cmd.subsubsection}\IndexCmd{subsubsection}. The actual -depth to which headings are numbered is controlled by the \LaTeX{} counter -\Counter{secnumdepth}. - -To\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} -save users the trouble of having to remember abstract numbers, the commands -\Macro{partnumdepth} to \Macro{subparagraphnumdepth} return the appropriate -number for the section level in their name. - -\begin{Example} - For a book project, you want the section levels from part down to section - to be numbered. To achieve this, you have to set counter - \Counter{secnumdepth} to the value represented by \Macro{sectionnumdepth} in - the preamble of your document: -\begin{lstcode} - \setcounter{secnumdepth}{\sectionnumdepth} -\end{lstcode} -\end{Example} -No provision is made for redefining these commands. Doing so could lead to -unexpected results, not only with \KOMAScript{} but also with third party -packages. Thus, you should never redefine them. - -Do\textnote{Attention!} not confuse the \Counter{secnumdepth} and -\DescRef{\LabelBase.counter.tocdepth} counters (see -\autoref{sec:\LabelBase.toc}, \DescPageRef{\LabelBase.counter.tocdepth}). -Depending on the class you are using, the meaning of the values of the -\Counter{secnumdepth} and \DescRef{\LabelBase.counter.tocdepth} counters may -differ for the same section level.% -% -\EndIndexGroup - -\begin{Declaration} - \Macro{Ifnumbered}\Parameter{section level}% - \Parameter{then code}\Parameter{else code}% - \Macro{Ifunnumbered}\Parameter{section level}% - \Parameter{then code}\Parameter{else code} -\end{Declaration} -The\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}\ChangedAt{v3.28}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} commands \Macro{Ifnumbered} and \Macro{Ifunnumbered} -determine which section-level headings are numbered, using the technique -described above, and execute code depending on whether a \PName{section level} -is numbered or not. If a \PName{section level} is numbered with the current -settings, \Macro{Ifnumbered} executes the \PName{then code}. If the section -level is unnumbered, the \PName{else code} is executed. The -\Macro{Ifunnumbered} command behaves in exactly the opposite manner, executing -the \PName{then code} if the current level is unnumbered and the \PName{else - code} if it is. The \PName{section level} parameter is simply the \LaTeX{} -name of a section like \PValue{part}, \PValue{chapter}, \PValue{section}, -\PValue{subsection}, \PValue{subsubsection}, \PValue{paragraph} oder -\PValue{subparagraph}.\PValue{part}, \PValue{chapter}, \PValue{section}, -\PValue{subsection}, \PValue{subsubsection}, \PValue{paragraph}, or -\PValue{subparagraph}. - -\KOMAScript{} itself uses these tests, for example, in the definition of -\DescRef{\LabelBase.cmd.chaptermark}\IndexCmd{chaptermark} in the -\DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings} page style. -This indirectly ensures that headings inserted by -\DescRef{\LabelBase.cmd.addchap} do not set a number inside the running head -(see also \DescRef{\LabelBase.cmd.addchapmark}, -\DescPageRef{\LabelBase.cmd.addchapmark}).% -\EndIndexGroup - - -\begin{Declaration} - \Macro{setpartpreamble}% - \OParameter{position}\OParameter{width}\Parameter{preamble} - \Macro{setchapterpreamble}% - \OParameter{position}\OParameter{width}\Parameter{preamble} -\end{Declaration}% -Parts\OnlyAt{\Class{scrbook}\and - \Class{scrreprt}}\Index{part>preamble}\Index{chapter>preamble} and chapters -in {\KOMAScript} can be given a \PName{preamble}. This is particularly useful -when you are using a two-column format with the class option -\Option{twocolumn}\IndexOption{twocolumn}, since the heading and the -\PName{preamble} are always set in a one-column layout. The \PName{preamble} -can contain more than one paragraph. The command to set the \PName{preamble} -must come before the respective \DescRef{\LabelBase.cmd.part}, -\DescRef{\LabelBase.cmd.addpart}, \DescRef{\LabelBase.cmd.chapter}, or -\DescRef{\LabelBase.cmd.addchap} command. -\begin{Example} - You are writing a report about the condition of a company. You organize the - report in such a way that every department gets its own partial report. - Each of these parts should be introduced by an abstract on the corresponding - title page. You could write the following: -\begin{lstcode} - \setpartpreamble{% - \begin{abstract} - This is a filler text. It serves merely to demonstrate the - capabilities of {\KOMAScript}. If you read this text, you will - get no information. - \end{abstract} - } - \part{Department for Word Processing} -\end{lstcode} - Depending on the settings for the heading font size\Index{heading} - (see \DescPageRef{\LabelBase.option.headings}) and the options for - the \DescRef{\LabelBase.env.abstract} environment\IndexEnv{abstract} (see - \autoref{sec:\LabelBase.abstract}, - \DescPageRef{\LabelBase.option.abstract}), the result will look something - like this: - \begin{ShowOutput}\centering - {\LARGE\usekomafont{disposition} Part III.\par\vspace{14pt}} - {\LARGE\usekomafont{disposition} Department for Word Processing\strut\par} - \begin{quote}\small - \vspace{4ex} - \begin{center} - \usekomafont{disposition}\abstractname - \end{center} - \vspace{2ex} - This is a filler text. It serves merely to demonstrate the - capabilities of {\KOMAScript}. If you read this text, you will - get no information. - \end{quote} - \end{ShowOutput} -\end{Example} -Please\textnote{Attention!} note that \emph{you} are responsible for the -spacing between the heading, preamble, and the following text. Note also that -there is no \DescRef{\LabelBase.env.abstract} environment in the -\Class{scrbook} class (see \autoref{sec:\LabelBase.abstract}, -\DescPageRef{\LabelBase.env.abstract}). - -The\ChangedAt{v2.8p}{\Class{scrbook}\and\Class{scrreprt}} first optional -argument, \PName{position}, determines the position at which the preamble -is placed with the help of one or two letters. For vertical placement -there are two possibilities at present: -\begin{labeling}[~--]{\quad\PValue{o}}\itemsep=0pt -\item [\quad\texttt{o}] above the heading -\item [\quad\texttt{u}] below the heading -\end{labeling} -You can therefore put one preamble above and another below a heading. For -horizontal placement you have three options: -\begin{labeling}[~--]{\quad\PValue{o}}\itemsep=0pt -\item [\quad\texttt{l}] left-aligned -\item [\quad\texttt{r}] right-aligned -\item [\quad\texttt{c}] centred -\end{labeling} -This setting does not affect the alignment of the text in the -\PName{preamble}. Instead, it aligns the box that contains the preamble. The -width of this box is determined by the second optional argument, -\PName{width}. If you omit this second argument, the box uses the full text -width. In that case, the option for horizontal positioning has no effect. You -can combine exactly one letter from the vertical with one letter from the -horizontal positioning. - -A typical use for \Macro{setchapterpreamble} would be something like an -epigraph, a wise saying, or a dictum. The -\DescRef{\LabelBase.cmd.dictum}\IndexCmd{dictum} command, which you can use -for this purpose, is described in the next section. You will also find an -example there. - -Please note\textnote{Attention!} that a \PName{preamble} placed above the -heading is set within the existing vertical space above the heading. The -heading will not be moved down. You are therefore responsible for ensuring -that the \PName{preamble} is not too large and that the space above the -heading is sufficient. See also the \Option{beforeskip} setting for -\DescRef{maincls-experts.cmd.RedeclareSectionCommand} in -\autoref{sec:maincls-experts.sections}, -\autoref{tab:maincls-experts.declarechapterstyle.keys}, -\autopageref{tab:maincls-experts.declarechapterstyle.keys}. -% -% -\EndIndexGroup -% -\EndIndexGroup - - -\LoadCommonFile{dictum}% \section{Dicta} - -\LoadCommonFile{lists}% \section{Lists} - -\section{Mathematics} -\seclabel{math}% -\BeginIndexGroup -\BeginIndex{}{equations}% -\BeginIndex{}{formulas}% -\BeginIndex{}{mathematics}% - -\KOMAScript{} classes do not provide their own environments for formulas, -systems of equations, or similar mathematical elements. Instead, \KOMAScript{} -relies fully on the maths features of the \LaTeX{} kernel. This also applies to -the the options \DescRef{\LabelBase.option.leqno} and -\DescRef{\LabelBase.option.fleqn}. - -You will not find a description of the maths environments of the \LaTeX{} -kernel here. If you want to use -\Environment{displaymath}\IndexEnv{displaymath}, -\Environment{equation}\IndexEnv{equation}, or -\Environment{eqnarray}\IndexEnv{eqnarray} you should read an introduction to -\LaTeX{} like \cite{lshort}. But\textnote{Hint!} if you want more than very -simple mathematics, you should use the \Package{amsmath} package (see -\cite{package:amsmath}). - -\begin{Declaration} - \Option{leqno} -\end{Declaration}% -Equations are normally numbered\Index{equation>number} on the right. The -\Option{leqno} option loads the standard option file \File{leqno.clo}. The -equations are then numbered on the left. You\textnote{Attention!} must use -this option as an optional argument of \DescRef{\LabelBase.cmd.documentclass}. -Using it as an argument of \DescRef{\LabelBase.cmd.KOMAoptions} or -\DescRef{\LabelBase.cmd.KOMAoption} is not supported. The latter -would not make sense because the recommended maths package \Package{amsmath} -can only respond to this option at load time and does not react to run-time -changes of the option. -% -\EndIndexGroup - - -\begin{Declaration} - \Option{fleqn} -\end{Declaration}% -Displayed equations\Index{equation>alignment} are normally centred. The -standard option \Option{fleqn} loads the standard option file -\File{fleqn.clo}. Displayed equations are then left-justified. -You\textnote{Attention!} must use this option as an optional argument of -\DescRef{\LabelBase.cmd.documentclass}. Using it as an argument of -\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption} is -not supported. The latter would not make sense because the recommended maths -package \Package{amsmath} can only respond to this option at load time and -does not react to run-time changes of the option. -% -\EndIndexGroup -% -\EndIndexGroup - - -\section{Floating Environments for Tables and Figures} -\seclabel{floats} -\BeginIndexGroup -\BeginIndex{}{floats}% -\BeginIndex{}{tables}% -\BeginIndex{}{figures}% - -With the floating environments, {\LaTeX} offers a powerful and convenient -mechanism to arrange figures\Index{figure} and tables\Index{table} -automatically. -% Im Deutschen ist hier ein Absatz, den wir nicht uebernehmen! -Frequently,\textnote{Attention!} beginners do not properly understand these -floating environments\Index[indexmain]{floating environments}. They often ask -to specify the exact position of a table or figure within the text. However, -this is usually unnecessary, since the text will contain references to these -floating environments. It is also not sensible because such an object can only -be set on the page if there is enough space left for it. If this is not the -case, the object would have to be shifted onto the next page, possibly leaving -a huge empty space on the previous page. - -Often\textnote{Attention!} a document will use the same optional argument to -position every floating object. This also makes no sense. In such cases, you -should instead change the default value globally. For more details, see -\cite{DANTE:FAQ}. - -One\textnote{Attention!} final, important note before starting this section: -most of mechanisms described here, which extend the capabilities of the -standard classes, no longer work correctly when used with packages that modify -the appearance of figure and table captions. This should be self-evident, but -it is often overlooked. - - -\begin{Declaration} - \OptionVName{captions}{setting} -\end{Declaration} -In the standard classes, the titles of floating environments, which are -formatted with the \DescRef{\LabelBase.cmd.caption}\IndexCmd{caption} command -(see below), are set off from the float with vertical spacing appropriate for -putting the caption beneath the float, like a signature. They also distinguish -between one-line and multi-line captions. One-line captions are centred while -multi-line captions are left-justified. - -\leavevmode\LabelOptionValue{captions}{tableheading}\nobreak% -For tables, however, you want the caption% -\important{\Option{captions}{tableheading}} to appear as a heading instead of -a signature. That's because tables can span multiple pages. With such tables, -the reader wants to know the purpose of the table on the first page. -Furthermore, tables are usually read row by row, from top to bottom. So there -are normally at least two good reasons to provide all tables with headings. -\KOMAScript{} therefore offers the \OptionValue{captions}{tableheading}% -\IndexOption{captions~=\textKValue{tableheading}} option, which changes the -formatting of table captions for use above the table. - -Note\textnote{Attention!} that multi-page tabulars cannot use a floating -environment. To have an automatic page break in a tabular you need an -additional package like \Package{longtable}\IndexPackage{longtable} (see -\cite{package:longtable}) or \Package{supertabular}\IndexPackage{supertabular} -(see \cite{package:supertabular}). - -You\important{\OptionValue{captions}{tablesignature}} can switch back to the -default caption formatting using \OptionValue{captions}{tablesignature}% -\IndexOption{captions~=\textKValue{tablesignature}}. Note\textnote{Attention!} -that these options change only the formatting, not the actual position of the -caption. Whether the caption is placed above or below a float depends solely -upon where you use the \DescRef{\LabelBase.cmd.caption} command inside float -environment. However, this can change when using the \Package{float}% -\IndexPackage{float} package with the \Macro{restylefloats} command (see -\cite{package:float}). - -Of course\important{\OptionValue{captions}{figureheading}\\ - \OptionValue{captions}{figuresignature}}, corresponding functions -exist\ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} for figures using the options -\OptionValue{captions}{figureheading}% -\IndexOption{captions~=\textKValue{figureheading}} and -\OptionValue{captions}{figuresignature}% -\IndexOption{captions~=\textKValue{figuresignature}}. However, figures such as -photos tend to be viewed as a whole, and a diagram or graph will mostly be -examined starting from the lower left. Therefore, it only rarely makes sense -to change the caption format for figures alone from signatures to headings. - -Sometimes, however, all floating environments should use headings. Therefore -\KOMAScript{} provides\ChangedAt{v3.09}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}} -options\important{\OptionValue{captions}{heading}\\ - \OptionValue{captions}{signature}} -\OptionValue{captions}{heading}\IndexOption{captions~=\textKValue{heading}} -and \OptionValue{captions}{signature}% -\IndexOption{captions~=\textKValue{signature}} to switch the format of every -floating environment. These options can also be used inside a floating -environment. - -Please note\textnote{Achtung!}\OnlyAt{\Package{float}}\IndexPackage{float} -when using the \Package{float} package that the settings for signatures or -headings will no longer work once \Macro{restylefloat} is applied to tables or -figures. For details about the \Package{float} package and -\Macro{restylefloat}, please refer to \cite{package:float}. This also applies -to \DescRef{\LabelBase.cmd.caption} within new floating environments defined -with \Package{float}. You can find additional support which \KOMAScript{} -provides when using the \Package{float} package in the explanation of -\PValue{komaabove} (see \DescPageRef{\LabelBase.floatstyle.komaabove}). As an -alternative to \Package{float}, you can also consult -\DescRef{\LabelBase.cmd.captionof} (see -\DescPageRef{\LabelBase.cmd.captionof}) and -\DescRef{tocbasic.cmd.DeclareNewTOC} (see -\DescPageRef{tocbasic.cmd.DeclareNewTOC}). Additionally, when using -\Package{float}, the -\hyperref[cha:scrhack]{\Package{scrhack}}\IndexPackage{scrhack}% -\important{\hyperref[cha:scrhack]{\Package{scrhack}}} package is -expressly recommended (see \autoref{cha:scrhack} from -\autopageref{cha:scrhack} in \autoref{part:forExperts}). - -\leavevmode -\LabelOptionValue{captions}{nooneline}\nobreak -\LabelOptionValue{captions}{oneline}\nobreak -Furthermore\important{\OptionValue{captions}{nooneline}}, \KOMAScript{} offers -the option to disable the distinction between one-line and multi-line captions -using the \OptionValue{captions}{nooneline}% -\IndexOption{captions~=\textKValue{nooneline}}% -\important{\OptionValue{captions}{nooneline}} option. This can be useful, for -example, if you do not want one-line captions to be centred. The default, -where one-line captions are centred, corresponds to -\OptionValue{captions}{oneline}. - -Another special feature of \KOMAScript{} is the ability to put the caption -beside the floating object rather than above or below it. For this, you need -the environment\important{\DescRef{\LabelBase.env.captionbeside}} -\DescRef{\LabelBase.env.captionbeside}\IndexEnv{captionbeside}, which is -explained starting on \DescPageRef{\LabelBase.env.captionbeside}. The settings -for this environment can also be changed with the \Option{caption} option. You -can find the available values for the corresponding \PName{settings} in -\autoref{tab:\LabelBase.captions}. -% -\begin{desclist} - \desccaption[{Available values for the \Option{captions}} option]{% - Available values for the \Option{captions} option for setting formatting of - captions as headings or signatures in floating environments% - \label{tab:\LabelBase.captions}% - }{% - Available values for the \Option{captions} option (\emph{continued})% - }% - \entry{\PValue{bottombeside}, \PValue{besidebottom}}{% - Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see - \autoref{sec:\LabelBase.floats}, - \DescPageRef{\LabelBase.env.captionbeside}) are vertically aligned with - the bottommost baseline of the contents of the floating environment.% - \IndexOption{captions~=\textKValue{bottombeside}}}% - \entry{\PValue{centeredbeside}, \PValue{besidecentered}, - \PValue{middlebeside}, \PValue{besidemiddle}}{% - Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see - \autoref{sec:\LabelBase.floats}, - \DescPageRef{\LabelBase.env.captionbeside}) are vertically aligned with - the center of the contents of the floating environment.% - \IndexOption{captions~=\textKValue{centeredbeside}}}% - \entry{\PValue{figureheading}, \PValue{figureabove}, \PValue{abovefigure}, - \PValue{topatfigure}% - \IndexOption{captions~=\textKValue{figureheading}}}{% - \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - Captions for figures use heading format\,---\,possibly deviating from - \OptionValue{captions}{signature}.% - }% - \entry{\PValue{figuresignature}, \PValue{belowfigure}, - \PValue{bottomatfiggure}% - \IndexOption{captions~=\textKValue{figuresignature}}}{% - \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - Captions for figures use signature format\,---\,possibly deviating - from \OptionValue{captions}{headings}.% - }% - \entry{\PValue{heading}, \PValue{above}, \PValue{top}% - \IndexOption{captions~=\textKValue{heading}}}{% - \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} Captions for floating environments use formatting - suitable for use in a heading. This setting does not control whether they - are placed at the top or the bottom of the object. This option also - implies \OptionValue{captions}{tableheading} and - \OptionValue{captions}{figureheading}.% - }% - \entry{\PValue{innerbeside}, - \PValue{besideinner}\IndexOption{captions~=\textKValue{innerbeside}}}{% - Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see - \autoref{sec:\LabelBase.floats}, - \DescPageRef{\LabelBase.env.captionbeside}) are placed inside of and next - to the contents of the environment in two-sided printing. In one-sided - printing, \OptionValue{captions}{leftbeside} is used.% - }% - \entry{\PValue{leftbeside}, - \PValue{besideleft}\IndexOption{captions~=\textKValue{leftbeside}}}{% - Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see - \autoref{sec:\LabelBase.floats}, - \DescPageRef{\LabelBase.env.captionbeside}) are placed to the left of - the contents of the floating environment.% - }% - \pventry{nooneline}{% - Single-line captions are handled the same as multi-line captions.% - \IndexOption{captions~=\textKValue{nooneline}}}% - \pventry{oneline}{% - Single-line captions are centred horizontally.% - \IndexOption{captions~=\textKValue{oneline}}}% - \entry{\PValue{outerbeside}, \PValue{besideouter}% - \IndexOption{captions~=\textKValue{outerbeside}}}{% - Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see - \autoref{sec:\LabelBase.floats}, - \DescPageRef{\LabelBase.env.captionbeside}) are placed outside of and - next to the contents of the environment in two-sided printing. In - one-sided printing, \OptionValue{captions}{rightbeside} is used.% - }% - \entry{\PValue{rightbeside}, \PValue{besideright}% - \IndexOption{captions~=\textKValue{rightbeside}}}{% - Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see - \autoref{sec:\LabelBase.floats}, - \DescPageRef{\LabelBase.env.captionbeside}) are placed to the right of the - contents of the floating environment.% - }% - \entry{\PValue{signature}, \PValue{below}, \PValue{bot}, \PValue{bottom}% - \IndexOption{captions~=\textKValue{signature}}}{% - \ChangedAt{v3.09}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - Captions for floating environments use signature format. This setting - does not control whether they are placed at the top or the bottom of the - object. This options also implies \OptionValue{captions}{tablesignature} - and \OptionValue{captions}{figuresignature}.% - }% - \entry{\PValue{tableheading}, \PValue{tableabove}, \PValue{abovetable}, - \PValue{abovetabular}, \PValue{topattable}% - \IndexOption{captions~=\textKValue{tableheading}}}{% - Captions for tables use heading format\,---\,possibly deviating from - \OptionValue{captions}{signature}.% - }% - \entry{\PValue{tablesignature}, \PValue{belowtable}, \PValue{belowtabular}, - \PValue{bottomattable}% - \IndexOption{captions~=\textKValue{tablesignature}}}{% - Captions for tables use signature format\,---\,possibly deviating - from \OptionValue{captions}{heading}.% - }% - \entry{\PValue{topbeside}, \PValue{besidetop}}{% - Captions for the \DescRef{\LabelBase.env.captionbeside} environment (see - \autoref{sec:\LabelBase.floats}, - \DescPageRef{\LabelBase.env.captionbeside}) are vertically aligned to the - baseline at the top of the floating environment.% - \IndexOption{captions~=\textKValue{topbeside}}}% -\end{desclist}% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{caption}\OParameter{entry}\Parameter{title} - \Macro{captionbelow}\OParameter{entry}\Parameter{title} - \Macro{captionabove}\OParameter{entry}\Parameter{title} -\end{Declaration}% -In the standard classes, tables and figures are given captions with the -\Macro{caption} command placed below the table or figure. For figures, this is -generally correct. For tables, opinions differ as to whether captions should -be placed above the table or, consistent with captions of -figures\Index{caption>of figure}, below it\Index{caption>of table}. Therefore -{\KOMAScript}\textnote{\KOMAScript{} vs. standard classes}, -unlike the standard classes, offers \Macro{captionbelow} for captions -below and \Macro{captionabove} for captions above tables or -figures. - -For tables and figures, or in general for all floating environments, you can -control the behaviour of \Macro{caption} with the -\DescRef{\LabelBase.option.captions}\IndexOption{captions} option described at -the beginning of this section. For compatibility reasons, the default -behaviour of \Macro{caption} for all floating environments is like -\Macro{captionbelow}. However, you\textnote{Hint!} should use the -\OptionValueRef{\LabelBase}{captions}{tableheading} option, which switches the -behaviour of \Macro{caption} inside table environments to -\Macro{captionabove}. Alternatively, you can use \Macro{captionabove} instead -of \Macro{caption} inside every \Environment{table} environment. -% -\begin{Example} - Instead of using captions below a table, you want to place your - captions above it\Index{table>caption}, because you have tables - which span more then one page. In the standard classes you could - only write: -\begin{lstcode} - \begin{table} - \caption{This is an example table} - \begin{tabular}{llll} - This & is & an & example.\\\hline - This & is & an & example.\\ - This & is & an & example. - \end{tabular} - \end{table} -\end{lstcode} - Then you would get this unsatisfying result: - \begin{ShowOutput}\centering - {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:} - This is an example table.}\\ - \begin{tabular}{llll} - This & is & an & example.\\\hline - This & is & an & example.\\ - This & is & an & example. - \end{tabular} -\end{ShowOutput} - Using {\KOMAScript} you write instead: -\begin{lstcode} - \begin{table} - \captionabove{This is just an example table} - \begin{tabular}{llll} - This & is & an & example.\\\hline - This & is & an & example.\\ - This & is & an & example. - \end{tabular} - \end{table} -\end{lstcode} - Then you get: - \begin{ShowOutput}\centering - {\usekomafont{caption}{\usekomafont{captionlabel}\tablename~30.2:} - This is just an example table}\\\vskip\abovecaptionskip - \begin{tabular}{llll} - This & is & an & example.\\\hline - This & is & an & example.\\ - This & is & an & example. - \end{tabular} - \end{ShowOutput} - Since you want all your tables typeset with captions above, you could - of course use the \OptionValueRef{\LabelBase}{captions}{tableheading} option - instead (see \DescPageRef{\LabelBase.option.captions.tableheading}). Then - you can use \Macro{caption} as you would in the standard classes. You will - get the same result as with \Macro{captionabove}. -\end{Example} - -\BeginIndex[indexother]{}{font>style}% -\BeginIndex{FontElement}{caption}\LabelFontElement{caption}% -\BeginIndex{FontElement}{captionlabel}\LabelFontElement{captionlabel}% -The font style\ChangedAt{v2.8p}{% - \Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}} for the description -and the label\,---\,``Figure'' or ``Table'', followed by the number and the -delimiter\,---\,can be changed with the commands -\DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont} (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}). The respective elements for this -are \FontElement{caption}\important[i]{\FontElement{caption}\\ - \FontElement{captionlabel}} and \FontElement{captionlabel} (see -\autoref{tab:\LabelBase.fontelements}, -\autopageref{tab:\LabelBase.fontelements}). The font style for the element -\FontElement{caption} is applied to the element \FontElement{captionlabel} -before the font style of \FontElement{captionlabel} itself is applied. The -default settings are listed in \autoref{tab:\LabelBase.captionFont}. -% -\begin{table} -% \centering% -% \caption - \begin{captionbeside} - {Font defaults for the elements of figure or table captions} - [l] - \begin{tabular}[t]{ll} - \toprule - element & default \\ - \midrule - \DescRef{\LabelBase.fontelement.caption} & \Macro{normalfont} \\ - \DescRef{\LabelBase.fontelement.captionlabel} & \Macro{normalfont}\\ - \bottomrule - \end{tabular} - \end{captionbeside} - \label{tab:\LabelBase.captionFont} -\end{table} -% -\begin{Example} - You want the table and figure descriptions typeset in a smaller font - size. Thus you could write the following in the preamble of your - document: -\begin{lstcode} - \addtokomafont{caption}{\small} -\end{lstcode} - Furthermore, you would like the labels to be printed in sans serif and - bold. You add: -\begin{lstcode} - \setkomafont{captionlabel}{\sffamily\bfseries} -\end{lstcode} - As you can see, simple extensions of the default definitions are - possible. -\end{Example}% -\EndIndexGroup - - -\begin{Declaration} - \Macro{captionof}\Parameter{float type}\OParameter{entry}% - \Parameter{title}% - \Macro{captionbelowof}\Parameter{float type}\OParameter{entry}% - \Parameter{title}% - \Macro{captionaboveof}\Parameter{float type}\OParameter{entry}% - \Parameter{title} -\end{Declaration}% -Like\ChangedAt{v3.05}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} the \Package{caption}\IndexPackage{caption} and -\Package{capt-of}\IndexPackage{capt-of} packages, \KOMAScript{} offers the -\Macro{captionof} command, with which you can put a caption for a floating -environment, together with an entry in the corresponding environment list, -outside of the floating environment or even in a different floating -environment. Unlike \DescRef{\LabelBase.cmd.caption}, the type of floating -environment must be specified as the first parameter. - -In addition, \KOMAScript{} also provides the commands -\Macro{captionaboveof}\ChangedAt{v3.09}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}} and \Macro{captionbelowof}. These are -like \DescRef{\LabelBase.cmd.captionabove} and -\DescRef{\LabelBase.cmd.captionbelow} but with the additional features and -parameter of \Macro{captionof}. - -Of course\ChangedAt{v3.09a}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} \Macro{captionof} takes into account the \PValue{heading} -and \PValue{signature} settings of the \DescRef{\LabelBase.option.captions} -option. But this feature may be lost if you load the -\Package{capt-of}\IndexPackage{capt-of} or -\Package{caption}\IndexPackage{caption} packages. When using -\Package{caption}, you must follow the instructions for that package (see -\cite{package:caption})! -\begin{Example} - Suppose you want to create a floating object with a table and a figure next - to each other. Since there are no mixed floating environments, you primarily - use a \Environment{figure} environment: -\begin{lstcode} - \begin{figure} - \begin{minipage}{.5\linewidth} - \centering - \rule{4cm}{5cm} - \caption{A rectangle}\label{fig:rechteck} - \end{minipage}% - \begin{minipage}{.5\linewidth} - \centering - \captionaboveof{table} - [Measure of the rectangle in - figure~\ref{fig:rechteck}]% - {Measure of the rectangle} - \label{tab:rechteck} - \begin{tabular}{ll} - Width: & 4\,cm\\ - Height: & 5\,cm - \end{tabular} - \end{minipage} - \end{figure} -\end{lstcode} - Two \Environment{minipage} environments were used to place the figure - and the table side by side. The\textnote{Attention!} percent sign after the - end of the first \Environment{minipage} is important. Without it, an - additional space would appear between the \Environment{minipage} - environments. - - The figure caption was created with \DescRef{\LabelBase.cmd.caption}. The - table caption was created with \Macro{captionaboveof} with \PValue{table} - as the first argument. Because of this, \KOMAScript{} knows that this is a - table caption even though it is inside the \Environment{figure} environment. - - The optional argument of \Macro{captionaboveof} creates an entry in the - list of tables. Without the optional argument, the caption specified in the - final mandatory argument would have been used for the list of tables too. - Although this caption text is sufficient for the environment itself, it - would not be very meaningful in the list of tables. Therefore, a different - title is used for the list of tables using the optional argument. - \autoref{fig:\LabelBase.captionaboveof} shows the result of the example code.% -\begin{figure} -% \centering -% \caption - \KOMAoptions{captions=bottombeside}% - \setcapindent{0pt}% - \begin{captionbeside} - [{Example: Using \Macro{captionaboveof} inside another floating - environment}] - {Example: Using \Macro{captionaboveof} inside another floating - environment\label{fig:\LabelBase.captionaboveof}} - [l] - \begin{minipage}[b]{.66\linewidth}% - \raisebox{\depth}{\fbox{\KOMAoptions{captions=oneline}% - \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax} - \centering - \rule{4cm}{5cm} - \caption[Example: A rectangle]{A rectangle}\label{fig:\LabelBase.rechteck} - \end{minipage}% - \begin{minipage}{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax} - \centering - \captionaboveof{table}[Example: Measure of the rectangle in - figure~\ref{fig:\LabelBase.rechteck}]{Rectangle size} - \label{tab:\LabelBase.rechteck} - \begin{tabular}{ll} - Width: & 4\,cm\\ - Height: & 5\,cm - \end{tabular} - \end{minipage}}}% - \end{minipage}% - \end{captionbeside}% -\end{figure}% -\end{Example}% -You can produce a non-floating table with a caption in the same way as the -table inside a figure environment in the example above. In such a case, a -\Environment{minipage} environment should also be used to avoid page breaks -between the caption and the table. In addition, you should embed the -\Environment{minipage} environment in a \Environment{flushleft} environment -both to achieve a pleasing separation between the surrounding text and to -avoid the paragraph indentation of the \Environment{minipage} environment.% -\EndIndexGroup - - -\begin{Declaration} - \begin{Environment}{captionbeside} - \OParameter{short title} - \Parameter{caption text} - \OParameter{placement} - \OParameter{width} - \OParameter{offset} - \end{Environment} - \labelsuffix[*]% - \begin{Environment}{captionbeside} - \OParameter{short title} - \Parameter{caption text} - \OParameter{placement} - \OParameter{width} - \OParameter{offset}\PValue{*}% - \end{Environment} -\end{Declaration} -In addition\ChangedAt{v2.8q}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} to captions above and below the figure, you will often -find captions, in particular for small figures, which are placed beside the -figure. The bottom edge of the caption is normally aligned with the bottom of -the figure. Of course, you can achieve the same thing in the standard classes -with some fiddling and the use of two \Macro{parbox} commands. However, -\KOMAScript{} offers a special environment for this which you can use within -the floating environments. The first optional parameter, -\PName{short title}\important{\PName{short title}\\\PName{caption text}}, and -the required parameter \PName{caption text} have the same meaning as the -corresponding parameters of \DescRef{\LabelBase.cmd.caption}, -\DescRef{\LabelBase.cmd.captionabove} or -\DescRef{\LabelBase.cmd.captionbelow}. The \PName{caption text} is -placed beside the content of the environment in this case. - -The \PName{placement}\important{\PName{placement}} parameter can determine -whether the \PName{caption text} is placed on the left or the right. Exactly -one of the following letters is allowed: -\begin{labeling}[~--]{\quad\PValue{o}}\setlength{\itemsep}{-1\parsep plus 1ex}% - \item[\PValue{l}] left - \item[\PValue{r}] right - \item[\PValue{i}] inner margin in two-sided printing - \item[\PValue{o}] outer margin in two-sided printing -\end{labeling} -The default placement is to the right of the content of the environment. You -can change this default\ChangedAt{v3.00}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}} using the -\DescRef{\LabelBase.option.captions}\IndexOption{captions}% -\important{\DescRef{\LabelBase.option.captions}} option (see -\DescPageRef{\LabelBase.option.captions}) with values like -\PValue{innerbeside}\IndexOption[indexmain]{captions~=\textKValue{innerbeside}}, -\PValue{leftbeside}\IndexOption[indexmain]{captions~=\textKValue{leftbeside}}, -\PValue{outerbeside}\IndexOption[indexmain]{captions~=\textKValue{outerbeside}}, -and -\PValue{rightbeside}\IndexOption[indexmain]{captions~=\textKValue{rightbeside}}. -If either \PValue{o} or \PValue{i} are used you may need to run {\LaTeX} twice -to obtain the correct placement. - -Normally\important{\PName{width}}, the content of the environment and the -\PName{caption text} fill the entire available text width. However, you can -specify a different width using the optional parameter \PName{width}. This can -be greater than the current text width. - -When specifying a \PName{width}\important{\PName{width}\\\PName{offset}}, the -width used is usually centred with respect to the body text. Using the -optional parameter \PName{offset}, you can shift the environment relative to -the left margin. A positive value corresponds to a shift to the right, whereas -a negative value corresponds to a shift to the left. An \PName{offset} of -0\Unit{pt} gives you a left-aligned output. - -If\important{\PValue{*}} you add a star to the optional \PName{offset} -parameter, the value represents a shift relative to the right margin on -left-hand pages in a two-sided layout. A positive value corresponds to a shift -towards the outer margin, whereas a negative value corresponds to a shift -towards the inner margin. An \PName{offset} of 0\Unit{pt} means alignment with -the inner margin. This variant may require two {\LaTeX} runs to achieve the -correct offset. - -The default vertical alignment is bottom. This means that the bottommost base -lines of the contents of the environment and of the caption are aligned. -You\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} can change this setting using the -\DescRef{\LabelBase.option.captions}\IndexOption{captions}% -\important{\DescRef{\LabelBase.option.captions}} option (see -\DescPageRef{\LabelBase.option.captions}) with the value -\PValue{topbeside}\IndexOption[indexmain]{captions~=\textKValue{topbeside}}, -\PValue{centeredbeside}% -\IndexOption[indexmain]{captions~=\textKValue{centeredbeside}}, or -\PValue{bottombeside}% -\IndexOption[indexmain]{captions~=\textKValue{bottombeside}}. -With the setting \PValue{topbeside}, the topmost base lines of the environment -contents and caption will be aligned. With \PValue{centeredbeside}, they will -be centred vertically. In this context, note that the base line of a figure is -usually the bottom of the figure. You can change this using, for example, -\Macro{raisebox}\IndexCmd{raisebox}. - -\begin{Example} - You can find an example using the \Environment{captionbeside} environment in - \autoref{fig:\LabelBase.captionbeside}. This figure was typeset with: -\begin{lstcode} - \begin{figure} - \begin{captionbeside}[Example: Figure beside description]% - {A figure description which is neither above nor - below, but beside the figure}[i][\linewidth][% - [i][\linewidth][% - \dimexpr\marginparwidth+\marginparsep\relax]* - \fbox{% - \parbox[b][5\baselineskip][c]{.25\textwidth} - {% - \hspace*{\fill}\KOMAScript - \hspace*{\fill}\par - }% - } - \end{captionbeside} - \label{fig:\LabelBase.captionbeside} - \end{figure} -\end{lstcode} - \begin{figure} - \begin{captionbeside}[Example: Figure beside description]% - {A figure description which is neither above nor - below, but beside the figure}[i][\linewidth][2em]* - \fbox{% - \parbox[b][5\baselineskip][c]{.25\textwidth}{% - \hspace*{\fill}\KOMAScript\hspace*{\fill}\par}} - \end{captionbeside} - \label{fig:\LabelBase.captionbeside} - \end{figure} - The total width is thus the currently available width of - \PValue{\Macro{linewidth}}. However, this width is shifted - $\Length{marginparwidth} + \Length{marginparsep}$ to the outside. The - caption text or description is placed on the inner side beside the figure. - The figure itself is shifted 2\Unit{em} into the outer margin. - -\iffalse% Umbruchkorrekturtext - The \Macro{dimexp} macro is an \eTeX{} command. This should not be a - problem at all because \KOMAScript{} itself requires \eTeX{} and every almost - up-to-date \LaTeX{} distribution uses \eTeX already. -\fi - - \hyperref[fig:\LabelBase.captionbesidecentered]% - {Figure~\ref*{fig:\LabelBase.captionbesidecentered}} - shows a centred caption with: -\begin{lstcode} - \KOMAoption{captions}{centeredbeside} -\end{lstcode} -\iffalse % Umbruchalternativen - Even a typographical novice will immediately realize that you should - usually avoid this alignment. -\else - This is certainly not a recommended solution. -\fi - - \begin{figure} - \begin{captionbeside}[Example: Description centered beside figure]% - {A figure description which is neither above nor - below, but centred beside the figure}[i][\linewidth][2em]* - \fbox{% - \parbox[b][5\baselineskip][c]{.25\textwidth}{% - \hspace*{\fill}\KOMAScript\hspace*{\fill}\par}} - \end{captionbeside} - \label{fig:\LabelBase.captionbesidecentered} - \end{figure} - - In contrast, you can use the top-aligned format seen in - \autoref{fig:\LabelBase.captionbesidetop}. To illustrate how to shift the - baseline using \Macro{raisebox}, here is a complete example. You can apply - this not only to a substitute figure, as previously shown, but also, for - example, to \Macro{includegraphics} (see \cite{package:graphics}). -\begin{lstcode} - \documentclass[captions=topbeside]{scrbook} - \usepackage[english]{babel} - \usepackage{graphics} - \begin{document} - \chapter{An Example} - \begin{figure} - \begin{captionbeside}% - [Example: Figure title top beside]% - {A figure description which is neither above nor - below, but top beside the figure}% - [i][\linewidth][% - \dimexpr\marginparwidth+\marginparsep\relax - ]* - \raisebox{% - \dimexpr\baselineskip-\totalheight\relax - }{% - \includegraphics{examplepicture}% - }% - \end{captionbeside} - \label{fig:\LabelBase.captionbesidetop} - \end{figure} - \end{document} -\end{lstcode} - \begin{figure} - \KOMAoption{captions}{topbeside} - \begin{captionbeside}[Example: Figure title top beside]% - {A figure description which is neither above nor - below, but top beside the figure}% - [i][\linewidth] - \raisebox{\dimexpr\baselineskip-\totalheight}{% - \fbox{% - \parbox[b][5\baselineskip][c]{.25\textwidth}{% - \hspace*{\fill}\KOMAScript\hspace*{\fill}\par}}% - }% - \end{captionbeside} - \label{fig:\LabelBase.captionbesidetop} - \end{figure} -\end{Example} -% -\EndIndexGroup - - -\begin{Declaration} - \begin{Environment}{captionofbeside} - \Parameter{float type} - \OParameter{short title} - \Parameter{caption text} - \OParameter{placement} - \OParameter{width} - \OParameter{offset} - \begin{Body}\BodyDots\end{Body} - \end{Environment} - \labelsuffix[*]% - \begin{Environment}{captionofbeside} - \Parameter{float type} - \OParameter{short title} - \Parameter{caption text} - \OParameter{placement} - \OParameter{width} - \OParameter{offset}\PValue{*}% - \begin{Body}\BodyDots\end{Body} - \end{Environment} -\end{Declaration} -As\ChangedAt{v3.10}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} is the case for \DescRef{\LabelBase.cmd.caption}, there is -a variant for \DescRef{\LabelBase.cmd.captionof} where the \PName{float type} -is not defined by using it within a floating environment of this type, so you -can specify a suitable environment for \DescRef{\LabelBase.env.captionbeside} -with \Environment{captionofbeside}. In contrast to -\DescRef{\LabelBase.env.captionbeside}, the \PName{float type} must be -specified as an additional, first argument.% -% -\EndIndexGroup - -\begin{Declaration} - \FloatStyle{komaabove}% - \FloatStyle{komabelow} -\end{Declaration}% -If you use\OnlyAt{\Package{float}} the \Package{float}\IndexPackage{float} -package, the appearance of the float environments is solely defined by the -\emph{float} style. This includes whether captions appear above or below. In -the \Package{float} package, there is no predefined style which gives you the -same output and offers the same setting options (see below) as \KOMAScript{}. -Therefore \KOMAScript{} defines the two additional styles, \PValue{komaabove} -and \PValue{komabelow}. When using the \Package{float} package, you can -activate these styles just like the styles -\PValue{plain}\IndexFloatstyle{plain}, \PValue{boxed}\IndexFloatstyle{boxed}, -or \PValue{ruled}\IndexFloatstyle{ruled} defined in \Package{float}. For -details refer to \cite{package:float}. The style \PValue{komaabove} inserts -\DescRef{\LabelBase.cmd.caption}, \DescRef{\LabelBase.cmd.captionabove}, and -\DescRef{\LabelBase.cmd.captionbelow} above, whereas \PValue{komabelow} -inserts them below the float content. -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{captionformat} -\end{Declaration}% -In {\KOMAScript} there are various ways to change the formatting of -the caption text. The definition of different font styles has already -been explained above. The delimiter or delimiters between the label and -actual caption text is specified by the macro \Macro{captionformat}. -In contrast to all other \Macro{\dots}format commands, this is not the counter -but only the items which follow it. The original definition is: -\begin{lstcode} - \newcommand*{\captionformat}{:\ } -\end{lstcode} -You can change this too with \Macro{renewcommand}. -\begin{Example} - For some inexplicable reason, you want a dash surrounded by spaces - instead of a colon followed by a space as a label delimiter. You - therefore define: -\begin{lstcode} - \renewcommand*{\captionformat}{~--~} -\end{lstcode} -This definition should be put in the preamble of your document. -\end{Example} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{figureformat}% - \Macro{tableformat} -\end{Declaration}% -It has already been mentioned that \DescRef{\LabelBase.cmd.captionformat} does -not contain formatting for the label itself. You should not alter this by -redefining the commands for the output of the \Macro{thefigure} or -\Macro{thetable} counters. Such a redefinition would have unwanted side -effects on the output of \Macro{ref}, the table of contents, the list of -figures, and the list of tables. Instead, {\KOMAScript} offers two -\Macro{\dots format} commands. These have the following defaults: -\begin{lstcode} - \newcommand*{\figureformat}{\figurename~\thefigure\autodot} - \newcommand*{\tableformat}{\tablename~\thetable\autodot} -\end{lstcode} -They can also be customised to your requirements with \Macro{renewcommand}. -\begin{Example} - From time to time, it is required to have captions without labels or - delimiters. With {\KOMAScript} the following definitions suffice to - achieve this: -\begin{lstcode} - \renewcommand*{\figureformat}{} - \renewcommand*{\tableformat}{} - \renewcommand*{\captionformat}{} -\end{lstcode} - It should be noted, however, that although no numbering is output, the - internal counters are nevertheless incremented. This becomes especially - important if this redefinition is applied only to selected - \Environment{figure} or \Environment{table} environments. -\end{Example} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{setcapindent}\Parameter{indent}% - \Macro{setcapindent*}\Parameter{xindent}% - \Macro{setcaphanging} -\end{Declaration}% -As mentioned previously, in the standard classes the captions are set in a -non-hanging style. In other words, in multi-line captions the second and -subsequent lines start directly beneath the label. The standard classes -provide no direct mechanism to change this behaviour. In {\KOMAScript}, on the -contrary, beginning at the second line all lines are indented by the width of -the label so that the caption text is aligned. - -You can change this behaviour, which corresponds to using -\Macro{setcaphanging}, at any time with the \Macro{setcapindent} or -\Macro{setcapindent*} command. Here the parameter \PName{indent} determines -the indentation of the second and subsequent lines. If you want a line break -after the label and before the caption text, then you can define the -indentation \PName{xindent} of the caption text with the starred version of -the command instead: \Macro{setcapindent*}. - -A negative value of \PName{indent}, on the other hand, results in a line break -before the caption text, and only the first line of the caption text, not -subsequent lines, is indented by the absolute value of \PName{indent}. - -Whether one-line captions are set the same way as multi-line captions or are -treated separately is specified with the option -\DescRef{\LabelBase.option.captions}. For details please refer to the -explanations of this option on -\DescPageRef{\LabelBase.option.captions.oneline}. - -\begin{Example} - The illustrations~\ref{fig:\LabelBase.caption.first} to - \ref{fig:\LabelBase.caption.last} show the effects of different settings. As - you can see, using a fully hanging indentation with a narrow column width is - awkward. To illustrate, the source code for the second figure is given here - with a modified caption text: -\begin{lstcode} - \begin{figure} - \setcapindent{1em} - \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} - \caption{Example with partially indented caption - starting from the second line} - \end{figure} -\end{lstcode} - As you can see, the formatting can also be changed locally within the - \Environment{figure} environment\IndexEnv{figure}. The change then affects - only the current figure. Subsequent figures once again use the default - settings or global settings that you set, for example, in the preamble. This - also, of course, applies to tables. - \begin{figure} - \typeout{^^J--- Ignore underfull and overfull \string\hbox:} - \addtokomafont{caption}{\small} - \addtokomafont{captionlabel}{\bfseries} - \centering% - \begin{minipage}{.9\linewidth} - \begin{minipage}[t]{.48\linewidth}\sloppy - \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} - \caption[Example: Default caption]% - {\sloppy With the default setting, like using - \Macro{setcaphanging}} - \label{fig:\LabelBase.caption.first} - \end{minipage} - \hspace{.02\linewidth} - \begin{minipage}[t]{.48\linewidth}\sloppy - \setcapindent{1em} - \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} - \caption[Example: Caption with partially hanging indention]% - {With partially hanging indentation starting from the second line - by using \Macro{setcapindent}\PParameter{1em}} - \end{minipage} - \end{minipage} - - \vspace*{2ex}\noindent% - \begin{minipage}{.9\linewidth} - \begin{minipage}[t]{.48\linewidth}\sloppy - \setcapindent*{1em} - \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} - \caption[Example: Caption with hanging indention and line break]% - {With hanging indentation starting from the second line and line - break before the description using - \Macro{setcapindent*}\PParameter{1em}} - \end{minipage} - \hspace{.02\linewidth} - \begin{minipage}[t]{.48\linewidth}\sloppy - \setcapindent{-1em} - \fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}} - \caption[Example: Caption with indention in the second line]% - {With indentation only in the second line and a line break - before the description using - \Macro{setcapindent}\PParameter{-1em}} - \label{fig:\LabelBase.caption.last} - \end{minipage} - \end{minipage} - \typeout{^^J--- Don't ignore underfull and overfull - \string\hbox:^^J} - \end{figure} -\end{Example} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{setcapwidth}\OParameter{justification}\Parameter{width}% - \Macro{setcapdynwidth}\OParameter{justification}\Parameter{width}% - \Macro{setcapmargin}\OParameter{left margin}\Parameter{margin}% - \Macro{setcapmargin*}\OParameter{inside margin}\Parameter{margin} -\end{Declaration} -Using\ChangedAt{v2.8q}{% - \Class{scrbook}\and\Class{scrreprt}\and\Class{scrartcl}} these three -commands, you can specify the width and justification of the caption -text. Normally, the entire text or column width is available for the caption. - -With\important{\Macro{setcapwidth}} the \Macro{setcapwidth} command, you can -decrease this \PName{width}. The mandatory argument determines the maximum -\PName{width} of the caption. As an optional argument, you can supply exactly -one letter which specifies the horizontal justification. The possible -justifications are given in the following list: -\begin{labeling}[~--]{\quad\PValue{o}}% - \itemsep=.5\topsep plus .5\topsep minus .5\topsep - \rightskip=1em -\item[\PValue{l}] left-justified -\item[\PValue{c}] centred -\item[\PValue{r}] right-aligned -\item[\PValue{i}] aligned to the inner margin in two-sided printing -\item[\PValue{o}] aligned to the outer margin in two-sided printing -\end{labeling} -Inside and outside justification corresponds to left-aligned and right-aligned -justification, respectively, in one-sided printing. -Within\textnote{Attention!} \Package{longtable}\IndexPackage{longtable}% -\important{\Package{longtable}} tables, inside and outside justification does -not work correctly. In particular, the captions on subsequent pages of such -tables are aligned according to the format of the caption on the first page of -the table. This is a conceptual problem in the implementation of the -\Package{longtable} package. - -Note\ChangedAt{v3.20}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}\textnote{Attention!} that \Macro{setcapwidth} immediately -sets the width to the value of the \PName{width} parameter at the time of the -assignment, as \Macro{setlength} does. If\important{\Macro{setcapdynwidth}} -you instead want to use the current value of \PName{width} when the caption is -set, you should use \Macro{setcapdynwidth}. There can be significant -differences in the result if, for example, you use lengths like -\Length{linewidth} or other commands as \PName{width} arguments. - -With\important{\Macro{setcapmargin}} the \Macro{setcapmargin} command, instead -of specifying the width of the caption text, you can specify a \PName{margin} -to be set next to the caption text in addition to the normal text margin. If -you want margins with different widths on the left and right sides, you can -use the optional argument to specify a \PName{left margin} that differs from -\PName{margin}. Instead of a \PName{left margin}, the starred version -\Macro{setcapmargin*} defines an \PName{inside margin} in a two-sided layout. -The same problem arises here with with inside and outside justification inside -\Package{longtable}\IndexPackage{longtable}\important{\Package{longtable}} -tables that occurs with \Macro{setcapwidth}. Furthermore, using -\Macro{setcapmargin} or \Macro{setcapmargin*} activates the -\OptionValueRef{\LabelBase}{captions}{nooneline} option (see -\DescPageRef{\LabelBase.option.captions.nooneline}) for captions which are -typeset with this margin setting. - -You\textnote{Hint!} can also specify negative values for \PName{margin} and -\PName{left margin} or \PName{inside margin}. This has the effect of making -the caption protrude into the margin.% -\iffalse\par% Anhang wurde entfernt. -Experts\textnote{Hint!} and advanced users can find a a somewhat tricky -application of \Macro{setcapwidth} in -\iffree{\cite{book:komascript}}{\autoref{cha:floattricks}, - \autopageref{cha:floattricks}}.% -\fi% -% -\EndIndexGroup - -\begin{Declaration} - \Macro{setcaptionalignment}\OParameter{float type}\Parameter{alignment} -\end{Declaration} -Normally\ChangedAt{v3.25}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}, multi-line\textnote{alignment of multi-line captions} -captions are fully justified. This corresponds to -\Macro{setcaptionalignment}\PParameter{j}. Sometimes, however, you want a -different alignment, for example ragged right. An appropriate change is -possible at any time with \Macro{setcaptionalignment}. You can specify exactly -one of the letters listed in \autoref{tab:maincls.captionalignment} for the -\PName{alignment}. If you specify an unknown \PName{alignment}, you will -receive an error message. -% -\begin{table} -% \centering - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% - \begin{captionbeside} - [{Alignments for multi-line captions of floating environments}] - {\label{tab:maincls.captionalignment}% - Alignments for multi-line captions of floating environments} - [l] - \begin{tabular}[t]{ll} - \toprule - c & centred \\ - j & fully justified \\ - l & left justified \\ - r & right justified \\ - C & centred with \Package{ragged2e} \\ - J & fully justified with \Package{ragged2e} \\ - L & left justified with \Package{ragged2e} \\ - R & right justified with \Package{ragged2e} \\ - \bottomrule - \end{tabular} - \end{captionbeside} -\end{table} - -The four possibilities with the -\Package{ragged2e}\important{\Package{ragged2e}}\IndexPackage{ragged2e} -package are only available if that package was loaded before you use -\Macro{setcaptionalignment}. Otherwise, they are converted to the -corresponding options without \Package{ragged2e}. For safety reasons, a -warning is issued in this case. - -When using this command without\textnote{without optional parameter} the -optional parameter, the result depends on whether the call occurs inside our -outside of a floating environment. Within a floating environment, the -alignment is then set for this floating environment. Outside, on the other -hand, the optional parameter is assumed to be empty. - -Using this command with an empty\textnote{empty optional parameter} optional -parameter, or outside a floating environment and also without any optional -parameter, sets the general alignment. This is used whenever the current -floating environment type does not define an alignment. - -If you only want to set the alignment of a particular type of floating -environment\textnote{with \PName{float type}} without changing the -\PName{alignment} for other types of floating environments, then the type of -floating environment, e.\,g., \PValue{figure} or \PValue{table}, is given as -the optional parameter \PName{float type}. -% -\begin{Example} - You want captions to be centred under the images even if they are - multi-line. To text this for a single image, use\textnote{in the - floating environment}: -\begin{lstcode} - \begin{figure} - \centering - \setcaptionalignment{c} - \includegraphics{example-image} - \caption{\blindtext} - \end{figure} -\end{lstcode} - Since you are satisfied with the result, you move the\textnote{in the - preamble} -\begin{lstcode} - \setcaptionalignment{c} -\end{lstcode} - command to the document preamble. Thereafter, however, you decide you do not - like this change for table captions at all. Therefore, you use\textnote{only - for figures} -\begin{lstcode} - \setcaptionalignment[figure]{c} -\end{lstcode} - to limit the centring to figures. - - A little later, you realize that the centring is not so suitable. Instead, - you now prefer to have ragged right alignment. So you change the alignment - again: -\begin{lstcode} - \setcaptionalignment[figure]{l} -\end{lstcode} - However, you do not like the fact that the lines are very different in - length. This is caused by the lack of hyphenation, causing long words to - wrap completely onto the next line, leaving large gaps. You want to allow - hyphenation as needed. This is easy to achieve with the help of the - \Package{ragged2e}\important{\Package{ragged2e}}\IndexPackage{ragged2e} - package. However, it is not enough to use -\begin{lstcode} - \usepackage{ragged2e} -\end{lstcode} - to load the package. Using the \Option{newcommands} option when loading the - package does not help. Instead, the \PName{alignment} must also be changed: -\begin{lstcode} - \usepackage{ragged2e} - \setcaptionalignment[figure]{L} -\end{lstcode} - Note\textnote{Attention!} the upper-case letter for the \PName{alignment}. -\end{Example} -\EndIndexGroup - - -\begin{Declaration} - \Option{origlongtable} -\end{Declaration}% -\BeginIndex{Package}{longtable}% -If you do not want the table captions produced by the \Package{longtable} -package (see \cite{package:longtable}) to be redefined by the {\KOMAScript} -classes, activate the \Option{origlongtable} option. This\textnote{Attention!} -option must be used in the optional argument of -\DescRef{\LabelBase.cmd.documentclass}. It cannot be used as a setting of -\DescRef{\LabelBase.cmd.KOMAoptions} or \DescRef{\LabelBase.cmd.KOMAoption}. -% -\EndIndexGroup -% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{listof}{setting} -\end{Declaration} -Normally\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} lists of floating environments\,---\,like -tables\Index{tables>list of} or figures\Index{figures>list of}\,---\,are -neither numbered nor included in the table of contents. You can find more -information about this behaviour in \autoref{sec:\LabelBase.toc}. As an -alternative to the settings \OptionValueRef{\LabelBase}{toc}{nolistof}% -\IndexOption{toc~=\textKValue{nolistof}}, -\OptionValueRef{\LabelBase}{toc}{listof}\IndexOption{toc~=\textKValue{listof}}, -and \OptionValueRef{\LabelBase}{toc}{listofnumbered}% -\IndexOption{toc~=\textKValue{listofnumbered}} mentioned there, you can also -look at this behaviour from perspective of the lists themselves. Therefore -you can achieve the same results with the settings -\OptionValue{listof}{notoc}, \OptionValue{listof}{totoc}, and -\OptionValue{listof}{numbered}. - -By default, the headings in the lists of floating environments use the topmost -level below \DescRef{\LabelBase.cmd.part}. This is the chapter level in -\Class{scrbook} and \Class{scrreprt} and the section level in -\Class{scrartcl}. By contrast,\ChangedAt{v3.06}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}} -\OptionValue{listof}{leveldown}\important{\OptionValue{listof}{leveldown}} -uses the next lower level to be used instead. -\important{\OptionValue{listof}{standardlevel}}% -\ChangedAt{v3.15}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% -\OptionValue{listof}{standardlevel} switches back to the default sectioning -level, if necessary. -\begin{Example} - In a book, you want to put the list of figures and the list of tables as - sub-lists into a common list named ``Figures and Tables''. Simply use: -\begin{lstcode} - \KOMAoption{listof}{leveldown} -\end{lstcode} - to use the section instead of the chapter level for both lists, and put the - following at the appropriate place in your document: -\begin{lstcode} - \addchap*{Figures and Tables} - \listoffigures - \listoftables -\end{lstcode} - You can find more information about the \DescRef{\LabelBase.cmd.addchap*} - command in \autoref{sec:\LabelBase.structure} on - \DescPageRef{\LabelBase.cmd.addchap*}. -\end{Example} - -Normally\ChangedAt{v2.8q}{% - \Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} the lists of -floating environments use a fixed-width space for the caption number of the -entries. At the same time, all entries are somewhat indented. This behaviour -corresponds to the -\OptionValue{listof}{graduated}\IndexOption{listof~=\textKValue{graduated}} -setting. - -If the numbers become very wide, for example because you have many tables or -figures, the space provided may at some point no longer be sufficient. -\KOMAScript{} offers the setting \OptionValue{listof}{flat}% -\important{\OptionValue{listof}{flat}}\IndexOption{listof~=\textKValue{flat}} -for lists of floating environments, comparable to -\OptionValueRef{\LabelBase}{toc}{flat}\IndexOption{toc~=\textKValue{flat}} for -the table of contents. The width required to print the number is -determined automatically and the space is adjusted accordingly. See the -\OptionValueRef{\LabelBase}{toc}{flat} option, \autoref{sec:\LabelBase.toc}, -\DescPageRef{\LabelBase.option.toc.flat} for more information about side -effects and how it works. Note\textnote{Attention!} again that you need more -than one \LaTeX{} run before the lists of floating environments reach -their final state. - -The \OptionValue{listof}{entryprefix}\ChangedAt{v3.06}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}} setting automatically activates -\OptionValue{listof}{flat} too. -Normally\important{\OptionValue{listof}{entryprefix}}, it does not make sense -to add a prefix such as ``figure'' or ``table'' to each entry in the lists of -floating environments because, of course, only figures are included in the -list of figures and only tables are included in the list of tables. Such a -prefix provides no additional information and is thus omitted by default. -However, you can add such prefixes using the -\OptionValue{listof}{entryprefix} option. With this, all entries in the same -list will get the same prefix. The prefix depends on the file extension of the -auxiliary file that is used for the corresponding list. For the list of -figures, the file extension is ``\File{lof}'' and therefore -\Macro{listoflofentryname} is used. For the list of tables, the file extension -is ``\File{lot}'' and \Macro{listoflotentryname} is used. - -For the \Class{scrbook} and \Class{scrreprt}\OnlyAt{\Class{scrbook}\and - \Class{scrreprt}} classes, \KOMAScript{} adds a vertical space to the lists -of floating environments whenever a new chapter starts. This behaviour, which -also exists in the standard classes, groups the lists by chapters. In -\KOMAScript{}, it corresponds to setting \ChangedAt{v3.00}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}}% -\OptionValue{listof}{chaptergapsmall}% -\LabelOptionValue{listof}{chaptergapsmall}% -\important{\OptionValue{listof}{chaptergapsmall}}% -\IndexOption{listof~=\textKValue{chaptergapsmall}}. In this case, is uses a -fixed vertical space of 10\Unit{pt}. -With\important{\OptionValue{listof}{chaptergapline}} the -\OptionValue{listof}{chaptergapline}% -\IndexOption{listof~=\textKValue{chaptergapline}} option, you instead get a -vertical space the height of one standard text line. With -\OptionValue{listof}{nochaptergap}% -\IndexOption{listof~=\textKValue{nochaptergap}}% -\important{\OptionValue{listof}{nochaptergap}}, you can completely remove the -vertical space. The\important{\OptionValue{listof}{chapterentry}} -\OptionValue{listof}{chapterentry}% -\IndexOption{listof~=\textKValue{chapterentry}} option is a special feature. -Instead of a vertical space, the table of contents entry for the chapter is -inserted into the lists of floating environments. Note\textnote{Attention!} -that this happens even if the chapter does not contain a floating environment. -You can find a method where only chapters containing floating environments -appear in the respective lists at \cite{https://komascript.de/comment/5070}. -You can achieve a more direct control over what appears in the lists of -floating environments with the \DescRef{\LabelBase.option.chapteratlists} -option, which is explained in \autoref{sec:\LabelBase.structure}, on -\DescPageRef{\LabelBase.option.chapteratlists}. - -You can find an overview of all settings for the \Option{listof} option in -\autoref{tab:\LabelBase.listof}. - -\begin{desclist} - \desccaption[{Available values for the \Option{listof} option}]{% - Available values for the \Option{listof} option for modifying the format - and contents of the lists of floating - environments\label{tab:\LabelBase.listof}% - }{% - Available values for the \Option{listof} option (\emph{continued})% - }% - \entry{\PValue{chapterentry}, \PValue{withchapterentry}}{% - Indicates the beginning of chapters in the lists of floating environments - with copies of their table-of-contents entries.% - \IndexOption{listof~=\textKValue{chapterentry}}}% - \entry{\PValue{chaptergapline}, \PValue{onelinechaptergap}}{% - Indicates the beginning of chapters in the lists of floating environments - with a vertical space the height of one standard text line.% - \IndexOption{listof~=\textKValue{chaptergapline}}}% - \entry{\PValue{chaptergapsmall}, \PValue{smallchaptergap}}{% - Indicates the beginning of chapters in the lists of floating environments - with a small vertical space.% - \IndexOption{listof~=\textKValue{chaptergapsmall}}}% - \entry{\PValue{entryprefix}}{% - \ChangedAt{v3.06}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - Adds a prefix before the number of each floating-environment list entry. - The prefix is usually language-dependent, e.\,g., in English ``Figure'' is - used for the list of figures and ``Table'' for the list of tables, each - followed by a white space.% - \IndexOption{listof~=\textKValue{entryprefix}}}% - \entry{\PValue{flat}, \PValue{left}}{% - Prints the lists of floating environments in tabular form. The caption - numbers are the first column, the caption texts the second column, and the - page numbers the third column. The space reserved for the caption numbers - depends on the previous \LaTeX{} run.% - \IndexOption{listof~=\textKValue{flat}}}% - \entry{\PValue{graduated}, \PValue{indent}, \PValue{indented}}{% - Prints the lists of floating environments in a hierarchical form. The - space reserved for the caption numbers is limited.% - \IndexOption{listof~=\textKValue{graduated}}}% - \entry{\PValue{leveldown}}{% - Uses headings that are one level lower in the sectioning hierarchy than - the default for lists of floating environments.% - \IndexOption{listof~=\textKValue{leveldown}}}% - \entry{\PValue{indenttextentries}, \PValue{indentunnumbered}, - \PValue{numberline}}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - The \PValue{numberline} property (see \autoref{sec:tocbasic.toc}, - \DescPageRef{tocbasic.cmd.setuptoc}) is set for the lists of floating - environments such as figures and tables. As a result, unnumbered entries - are left-aligned with the text of numbered entries of the same level. - However, the \KOMAScript{} classes themselves do not put unnumbered - entries in these lists. This option therefore affects only entries that - are generated not by the \KOMAScript{} classes themselves but with the - help of \DescRef{tocbasic.cmd.addxcontentsline} (see - \autoref{sec:tocbasic.toc}, \DescPageRef{tocbasic.cmd.addxcontentsline}).% - \IndexOption{toc~=\textKValue{numberline}}}% - \entry{\PValue{leftaligntextentries}, \PValue{leftalignunnumbered}, - \PValue{nonumberline}}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - The \PValue{nonumberline} property (see \autoref{sec:tocbasic.toc}, - \DescPageRef{tocbasic.cmd.setuptoc}) is set for the lists of floating - environments. This will place unnumbered entries left-aligned with the - number of numbered entries. However, the \KOMAScript{} classes themselves - do not put unnumbered entries in these lists. This option therefore - affects only entries that are generated not by the \KOMAScript{} classes - themselves but with the help of \DescRef{tocbasic.cmd.addxcontentsline} - (see \autoref{sec:tocbasic.toc}, - \DescPageRef{tocbasic.cmd.addxcontentsline}).% - \IndexOption{toc~=\textKValue{nonumberline}}}% - \entry{\PValue{nochaptergap}, \PValue{ignorechapter}}{% - The beginnings of chapters are not marked in the lists of floating - environments.% - \IndexOption{listof~=\textKValue{nochaptergap}}}% - \entry{\PValue{notoc}, \PValue{nottotoc}, \PValue{plainheading}}{% - The lists of floating environments do not generate entries in the table of - contents.% - \IndexOption{listof~=\textKValue{nottotoc}}}% - \entry{\PValue{numbered}, \PValue{totocnumbered}, \PValue{tocnumbered}, - \PValue{numberedtoc}, \PValue{numberedtotoc}}{% - The lists of floating environments receive numbered entries in the table - of contents.% - \IndexOption{listof~=\textKValue{numbered}}}% - \entry{\PValue{standardlevel}}{% - The lists use the normal sectioning level.% - \IndexOption{listof~=\textKValue{standardlevel}}}% - \entry{\PValue{totoc}, \PValue{toc}, \PValue{notnumbered}}{% - The lists of floating environment generate entries in the table of - contents, but their headings are unnumbered.% - \IndexOption{listof~=\textKValue{totoc}}}% -\end{desclist} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{listoftables}% - \Macro{listoffigures} -\end{Declaration} -These commands generate a list of tables or figures. Changes affecting these -lists will require two \LaTeX{} runs to take effect. The layout of the lists -can be influenced by the \DescRef{\LabelBase.option.listof}% -\important{\DescRef{\LabelBase.option.listof}} option with the values -\PValue{graduated} or \PValue{flat} (see -\DescPageRef{\LabelBase.option.listof}). In addition, the \PValue{listof} and -\PValue{listofnumbered} values of the \DescRef{\LabelBase.option.toc}% -\important{\DescRef{\LabelBase.option.toc}} option (see -\autoref{sec:\LabelBase.toc}), as well as the \PValue{totoc} and -\PValue{numbered} values of the \DescRef{\LabelBase.option.listof} option -described above indirectly affect these lists. - -As\textnote{Hint!} a rule, you will find the lists of the floating -environments immediately after the table of contents. In some documents, they -go into the appendix. However, the author of this guide prefers them -immediately after the table of contents.% -% -\EndIndexGroup - - -\LoadCommonFile{marginpar}% \section{Marginal Notes} - - -\section{Appendix} -\seclabel{appendix} -\BeginIndexGroup -\BeginIndex{}{Appendix} - -The appendix of a document mostly consists of supplements to the document. -Typical parts of an appendix include a bibliography, an index, and a glossary. -However you should not start an appendix for these parts alone because their -format already distinguishes them from the main document. But if there are -additional elements in the appendix, such as quoted third-party documents, -endnotes, figures, or tabulars, the standard elements such as the bibliography -should also be part of the appendix. - - -\begin{Declaration} - \Macro{appendix} -\end{Declaration}% -The appendix is started in the standard as well as the {\KOMAScript} classes -with \Macro{appendix}. Among other things, this command changes the chapter -numbering to upper-case letters while ensuring that the rules according to -\cite{DUDEN} for numbering the sectioning levels are followed (for -German-speaking regions). These rules are explained in more detail in the -description of the \DescRef{\LabelBase.option.numbers} option in -\autoref{sec:\LabelBase.structure}, \DescPageRef{\LabelBase.option.numbers}. - -The format of the chapter headings\OnlyAt{\Class{scrbook}\and - \Class{scrreprt}} in the appendix is influenced by the -\DescRef{\LabelBase.option.chapterprefix}% -\important{\DescRef{\LabelBase.option.chapterprefix}\\ - \DescRef{\LabelBase.option.appendixprefix}} and -\DescRef{\LabelBase.option.appendixprefix} options. See -\autoref{sec:\LabelBase.structure}, -\DescPageRef{\LabelBase.option.appendixprefix} for more information. - -Please\textnote{Attention!} note that \Macro{appendix} is a command, -\emph{not} an environment! This command does not expect an argument. Chapters -and sections in the appendix use \DescRef{\LabelBase.cmd.chapter} and -\DescRef{\LabelBase.cmd.section}, just as in the main text.% -% -\EndIndexGroup -% -\EndIndexGroup - - -\section{Bibliography} -\seclabel{bibliography} -\BeginIndexGroup -\BeginIndex{}{bibliography} - -The bibliography makes external sources accessible. As a rule, the -bibliography is created from an external file with a database-like structure -using the \BibTeX{} program. You can use the \BibTeX{} style to change both -the format of the entries and their sorting. If you use an additional -bibliography package like \Package{natbib}\IndexPackage{natbib}, -\Package{babelbib}\IndexPackage{babelbib}, or -\Package{biblatex}\IndexPackage{biblatex}, \KOMAScript{}'s influence over the -bibliography disappears. In such cases, you must follow the manual of the -relevant bibliography package. You can find general information about -bibliographies in \cite{lshort}. - - -\begin{Declaration} - \OptionVName{bibliography}{setting} -\end{Declaration} -For a start,\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} you can select any predefined bibliography style in -\PName{setting}. There are two such bibliography styles predefined in -\KOMAScript{}. You should not confuse them with the styles used by -\BibTeX\Index{BibTeX=\BibTeX}, which you select with -\Macro{bibstyle}. While \BibTeX{} determines both the sorting and the -contents of the bibliography, \KOMAScript{} influences only some basic -features of the bibliography and few properties of the entry format. - -The\important{\OptionValue{bibliography}{oldstyle}} -\OptionValue{bibliography}{oldstyle}% -\IndexOption{bibliography~=\textKValue{oldstyle}} option selects a compact -format for bibliography entries. In this case, using the -\DescRef{maincls-experts.cmd.newblock}\IndexCmd{newblock} command results in -only a small glue between the entries. The name comes from the fact that this -is the most common classic form of a bibliography. -In\important{\OptionValue{bibliography}{openstyle}} contrast, the -\OptionValue{bibliography}{openstyle}% -\IndexOption{bibliography~=\textKValue{openstyle}} setting selects a more -modern and open kind of bibliography. The name comes from the fact that the -\DescRef{maincls-experts.cmd.newblock} command inserts a paragraph break. The -bibliography entries appear more structured. They are less compact and seem -more relaxed or open. Information about defining new bibliography styles can -be found in the description of the \DescRef{maincls-experts.cmd.newbibstyle} -command in \autoref{sec:maincls-experts.bibliography}, -\DescPageRef{maincls-experts.cmd.newbibstyle}. - -In addition to the formatting style, you can select one more feature using -\PName{setting}. The bibliography is a kind of list of contents. But instead -of listing the contents of the document itself, it references external works. -With this reasoning, you could argue that the bibliography is a separate -chapter or section and therefore deserves a chapter or section number. The -\OptionValue{bibliography}{numbered}% -\important{\OptionValue{bibliography}{numbered}}% -\IndexOption{bibliography~=\textKValue{numbered}} setting does exactly that, -including creating an entry in the table of contents. In my opinion, a -traditional, annotated source list should by this reasoning be a separate -chapter too. Moreover, the bibliography is ultimately nothing you've written -yourself and so merits at most an unnumbered entry in the table of contents, -which is achieved with the \OptionValue{bibliography}{totoc}% -\IndexOption{bibliography~=\textKValue{totoc}} option. The default setting, -where the bibliography is produced as an unnumbered chapter and does not -receive an entry in the table of contents corresponds to -\OptionValue{bibliography}{nottotoc}% -\IndexOption{bibliography~=\textKValue{nottotoc}}. For more information, see -the \DescRef{\LabelBase.option.toc} option in \autoref{sec:\LabelBase.toc}, -especially the \PValue{bibliographynumbered}, \PValue{bibliography}, -and\PValue{nobibliography} values for this option on -\DescPageRef{\LabelBase.option.toc.bibliography}. - -Sometimes\ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} a document made using \Class{scrbook} or \Class{scrreprt} -will have a bibliography for every chapter rather than one bibliography for -the whole document. In that case, it makes sense for the bibliography -itself\important{\OptionValue{bibliography=leveldown}} to be not a chapter but -a section. You can achieve this using the -\OptionValue{bibliography}{leveldown}% -\IndexOption{bibliography~=\textKValue{leveldown}} option. You can also use -this if you want the bibliography to appear with other lists under a common -heading, therefore this option is also available with \Class{scrartcl}. - -You can find a summary of available values for the \Option{bibliography} -option in \autoref{tab:\LabelBase.bibliography}. Note, however, that you can -define new values with -\DescRef{maincls-experts.cmd.newbibstyle}\IndexCmd{newbibstyle}. - -\begin{table} - \caption[{Available values for the \Option{bibliography} option}]{% - Predefined values for the \Option{bibliography} option for setting the - bibliography format} - \label{tab:\LabelBase.bibliography} - \begin{desctabular} - \pventry{leveldown}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - The bibliography uses a sectioning command one level lower than - the default.% - \IndexOption{bibliography~=\textKValue{leveldown}}}% - \entry{\PValue{notoc}, \PValue{nottotoc}, \PValue{plainheading}}{% - The bibliography receives neither an entry in the table of contents nor - a number.% - \IndexOption{bibliography~=\textKValue{nottotoc}}}% - \entry{\PValue{numbered}, \PValue{tocnumbered}, \PValue{totocnumbered}, - \PValue{numberedtoc}, \PValue{numberedtotoc}}{% - The bibliography receives an entry in the table of contents and a - number.% - \IndexOption{bibliography~=\textKValue{numbered}}}% - \pventry{oldstyle}{% - The bibliography uses the classic, compact formation, where - \DescRef{maincls-experts.cmd.newblock}\IndexCmd{newblock} generates only - a horizontal glue.% - \IndexOption{bibliography~=\textKValue{oldstyle}}}% - \pventry{openstyle}{% - The bibliography uses the structured, open format where - \DescRef{maincls-experts.cmd.newblock}\IndexCmd{newblock} generates a - paragraph break.% - \IndexOption{bibliography~=\textKValue{openstyle}}}% - \pventry{standardlevel}{% - \ChangedAt{v3.12}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - The bibliography uses the standard sectioning command level.% - \IndexOption{bibliography~=\textKValue{standardlevel}}}% - \entry{\PValue{toc}, \PValue{totoc}, \PValue{notnumbered}}{% - The bibliography receives an entry in the table of contents but no - number.% - \IndexOption{bibliography~=\textKValue{totoc}}}% - \end{desctabular} -\end{table} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{setbibpreamble}\Parameter{preamble} -\end{Declaration}% -You can use the \Macro{setbibpreamble} command to set a preamble for the -bibliography\Index{bibliography}. This preamble must be placed before the -command for issuing the bibliography. However, it need not be directly -in front of it. For example, it could be placed at the beginning of -the document. Like\textnote{Attention!} the -\OptionValueRef{\LabelBase}{bibliography}{totoc} and -\OptionValueRef{\LabelBase}{bibliography}{totocnumbered} options, this command -only works if you have not loaded a package which prevents this from happening -by redefining the \Environment{thebibliography} environment. Although the -\Package{natbib} package\IndexPackage{natbib} uses undocumented, internal -{\KOMAScript} macros, \Macro{setbibpreamble} could still work with the current -version of \Package{natbib} (see \cite{package:natbib}). -\begin{Example} - You want to point out that the bibliographical references are sorted - alphabetically by the names of the authors. You therefore use the following - command: -\begin{lstcode} - \setbibpreamble{References are in alphabetical order. - References with more than one author are sorted - according to the first author.\par\bigskip} -\end{lstcode} - The \Macro{bigskip}\IndexCmd{bigskip} command ensures that the - preamble and the first reference are separated by a large vertical - space.% -\end{Example}% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{BreakBibliography}\Parameter{interruption code} -\end{Declaration} -This\textnote{Attention!}\ChangedAt{v3.00}{\Class{scrbook}\and - \Class{scrreprt}\and \Class{scrartcl}} command exists only if the -environment \Environment{thebibliography} has not been redefined by another -package. With this instruction, you can insert a break into the -bibliography. The \PName{interruption code} will be expanded inside a -group. Such a break may be, for example, a heading using -\DescRef{\LabelBase.cmd.minisec}. Unfortunately there is currently no way to -have this command automatically generated, for example by using a special -entry in the \BibTeX{} database. Therefore, it can currently only be used by -users who edit the bibliography directly. For this reason, its usefulness is -very limited.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{AfterBibliographyPreamble}\Parameter{code}% - \Macro{AtEndBibliography}\Parameter{code} -\end{Declaration} -In\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}} -some cases, it may be useful to add some \PName{code} after the bibliography -preamble or just before the end of the bibliography. This is possible with the -help of these two instructions. -\begin{Example} - You want to set the bibliography not justified but ragged right. You can - achieve this with: -\begin{lstcode} - \AfterBibliographyPreamble{\raggedright} -\end{lstcode} - You can put this instruction anywhere before the bibliography. However, it is - recommended to do so in the preamble of the document or a separate package. -\end{Example} -The\textnote{Attention!} functionality of this instruction depends on -cooperation with packages modifying the bibliography, if you use such a -package\iffree{}{(see \autoref{sec:maincls-experts.coexistence}, -\DescPageRef{maincls-experts.cmd.AfterBibliographyPreamble})}.% -% -\EndIndexGroup -% -\EndIndexGroup - - -\section{Index} -\seclabel{index} -\BeginIndexGroup - -For general information about making a keyword index, see \cite{lshort}, -\cite{makeindex}, and \cite{xindy}. Using a package that redefines -commands or environments for the index \KOMAScript{}'s ability to influence -the index may disappear. This applies, for example, when using the -\Package{index}\IndexPackage{index} package, but not when using the -\Package{splitidx}\IndexPackage{splitidx} package (see -\cite{package:splitindex}). - -\begin{Declaration} - \OptionVName{index}{setting}% -\end{Declaration} -\ChangedAt{v3.00}{\Class{scrbook}\and \Class{scrreprt}\and \Class{scrartcl}}% -By default or with \OptionValue{index}{default}% -\IndexOption{index~=\textKValue{default}}, the index is an unnumbered chapter -(\Class{scrbook} or \Class{scrreprt}) or section (\Class{scrartcl}) without an -entry in the table of contents. Since\important{\OptionValue{index}{totoc}} -the index usually comes last in a book or similar document, it does not -actually need an entry in the table of contents. Nevertheless, if you want to -do this, for example because you are working with a multi-index keyword -dictionary such as the one that appears in this \iffree{guide}{book}, you can -create this with the -\OptionValue{index}{totoc}\IndexOption{index~=\textKValue{totoc}} option. -You\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}} can even number the index using the -\OptionValue{index}{numbered}\IndexOption{index~=\textKValue{numbered}} -setting. See also the \DescRef{\LabelBase.option.toc} option with the -\PValue{index} or \PValue{indexnumbered} values in -\autoref{sec:\LabelBase.toc} starting at -\DescPageRef{\LabelBase.option.toc.index}. - -For example, if you create multiple indexes with -\Package{splitidx}\IndexPackage{splitidx} (see \cite{package:splitindex}), -it may be useful to group them under a common heading. To make this possible, -\OptionValue{index}{leveldown}% -\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}\important{\OptionValue{index}{leveldown}} places the index -one sectioning level deeper than usual. In \Class{scrbook} and -\Class{scrreprt}, it is no longer a chapter but a section; with -\Class{scrartcl}, a subsection. The \OptionValue{index}{standardlevel}% -\ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}\important{\OptionValue{index}{standardlevel}} option is -the counterpart to this and cancels any instance of -\OptionValue{index}{leveldown} used previously. - -You can find a summary of the available values for the \PName{setting} of -\Option{index} in \autoref{tab:maincls.index}. - -\begin{table} - \caption{Available values for the \Option{index} option} - \label{tab:maincls.index} - \begin{desctabular} - \pventry{leveldown}{% - \ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - The index is moved down by one sectioning level.% - \IndexOption{index~=\textKValue{leveldown}}% - }% - \entry{\PValue{notoc}, \PValue{nottotoc}, \PValue{plainheading}}{% - The index does not receive an entry in the table of contents.% - \IndexOption{index~=\textKValue{nottotoc}}}% - \entry{\PValue{numbered}, \PValue{tocnumbered}, \PValue{totocnumbered}, - \PValue{numberedtoc}, \PValue{numberedtotoc}}{% - \ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - The index receives an entry in the table of contents and is numbered.% - \IndexOption{index~=\textKValue{numbered}}}% - \pventry{standardlevel}{% - \ChangedAt{v3.18}{\Class{scrbook}\and \Class{scrreprt}\and - \Class{scrartcl}}% - The index is at the usual sectioning level.% - \IndexOption{index~=\textKValue{standardlevel}}% - }% - \entry{\PValue{toc}, \PValue{totoc}, \PValue{notnumbered}}{% - The index receives an entry in the table of contents without being - numbered.% - \IndexOption{index~=\textKValue{totoc}}}% - \end{desctabular} -\end{table} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{setindexpreamble}\Parameter{preamble} -\end{Declaration}% -As with the bibliography, you can also provide a preamble to the -index. This is often the case if you have more than one index or if -you mark different kinds of references by highlighting the page -numbers in different ways. -\begin{Example} - You have a document in which terms are both defined and used. The - page numbers of definitions are in bold. Of course you want to make - your reader aware of this fact. Thus you insert a preamble for the - index: -\begin{lstcode} - \setindexpreamble{All page numbers printed in \textbf{bold} - refer to definitions of terms. Page numbers printed - normally refer to pages where the term is used.\par\bigskip} -\end{lstcode} -\end{Example} - -Note\textnote{Attention!} that the page style is changed for the first page -of the index. The page style that is applied is defined in the macro -\DescRef{\LabelBase.cmd.indexpagestyle} (see -\autoref{sec:\LabelBase.pagestyle}, -\DescPageRef{\LabelBase.cmd.indexpagestyle}). - -The usual \LaTeX{} packages and additional programs are responsible for -creating, sorting, and outputting the index.% -\iftrue % Umbruchoptimierung - \iffree{}{ % - For example, the \Package{imakeidx}\IndexPackage{imakeidx} package - (see \cite{package:imakeidx}), which among other things automates the - invocation of the \File{makeindex} or \File{xindy} program, is highly - recommended. This eliminates a common source of error, particularly for - \LaTeX{} beginners.% - } - {\KOMAScript}, like the standard classes, provides only the basic macros - and environments for them.% -\fi -% -\EndIndexGroup -% -\EndIndexGroup -% -\EndIndexGroup - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% ispell-local-dictionary: "english" -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrdatetime.tex b/macros/latex/contrib/koma-script/source-doc/english/scrdatetime.tex deleted file mode 100644 index 356f07cb06..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrdatetime.tex +++ /dev/null @@ -1,443 +0,0 @@ -% ====================================================================== -% scrdatetime.tex -% Copyright (c) Markus Kohm, 2001-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. -% ---------------------------------------------------------------------- -% scrdatetime.tex -% Copyright (c) Markus Kohm, 2001-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. -% ====================================================================== -% -% Chapter about scrpage2 of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Kapitel ueber scrpage2 in der KOMA-Script-Anleitung -% Verwaltet von Markus Kohm -% -% ============================================================================ - -\KOMAProvidesFile{scrdatetime.tex} - [$Date: 2019-11-15 08:07:56 +0100 (Fr, 15. Nov 2019) $ - KOMA-Script guide (chapter: scrdate, scrtime)] -\translator{Markus Kohm\and Gernot Hassenpflug\and Karl Hagen} - -% Date of the translated German file: 2019-11-15 - -\chapter{The Day of the Week with \Package{scrdate}} -\labelbase{scrdate} -\BeginIndexGroup -\BeginIndex{Package}{scrdate} - -Originally, the \Package{scrdate} package could only give the day of the week -for the current date. Nowadays, it offers this and more for any date in the -Gregorian calendar. - -\begin{Declaration} - \Macro{CenturyPart}\Parameter{year}\\% - \Macro{DecadePart}\Parameter{year}% -\end{Declaration}% -The\ChangedAt{v3.05a}{\Package{scrdate}} \Macro{CenturyPart} command returns -the value of the century digits\,---\,thousands and hundreds\,---\,of a -\PName{year}. The \Macro{DecadePart} command, on the other hand, gives the -value of the remaining digits, i.\,e. the tens and the units. The -\PName{year} can have any number of digits. You can assign the value directly -to a counter or use it for calculations with -\Macro{numexpr}\IndexCmd{numexpr}. To output\textnote{Attention!} it as an -Arabic number, you should prefix it with \Macro{the}\IndexCmd{the}. - -\begin{Example} - You want to calculate and print the century of the current year. -\begin{lstcode} - The year \the\year\ is year \the\DecadePart{\year} - of the \engord{\numexpr\CenturyPart{\year}+1\relax} century. -\end{lstcode} - The result would be: - \begin{ShowOutput} - The year \the\year\ is year \the\DecadePart{\year} - of the \engordnumber{\numexpr\CenturyPart{\year}+1\relax} century. - \end{ShowOutput} - This example uses the \Package{engord}\IndexPackage{engord} package. - See \cite{package:engord} for more information. -\end{Example} - -Note\textnote{Attention!} that the counting method used here treats the year -2000 as year~0\,---\,and therefore the first year\,---\,of the 21st~century. -If necessary, however, you can make a correction with \Macro{numexpr}, as -shown for the ordinal number in the example.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{DayNumber}\Parameter{year}\Parameter{month}\Parameter{day}\\% - \Macro{ISODayNumber}\Parameter{ISO-date}% -\end{Declaration}% -These\ChangedAt{v3.05a}{\Package{scrdate}} two commands return the value of -the day-of-the-week\Index{day>of the week} number for any date. They differ -only in the method of specifying the date. While the \Macro{DayNumber} command -requires the \PName{year}, \PName{month}, and \PName{day} as separate -parameters, the \Macro{ISODayNumber} command expects an \PName{ISO-date} as a -single argument, \PName{ISO-date}, using the ISO notation -\PName{year}\texttt{-}\PName{month}\texttt{-}\PName{day}. It does not matter -if the \PName{month} or \PName{day} have one or two digits. You can use the -result of both commands to assign directly to a counter or for calculations -using \Macro{numexpr}\IndexCmd{numexpr}. To print\textnote{Attention!} it as -an Arabic number, you should prefix it with \Macro{the}\IndexCmd{the}. - -\begin{Example} - You want to know the number of the day of the week of the 1st~May~2027. -\begin{lstcode} - The 1st~May~2027 has \the\ISODayNumber{2027-5-1} - as the number of the day of the week. -\end{lstcode} - The result will be: - \begin{ShowOutput} - The 1st~May~2027 has \the\ISODayNumber{2027-5-1} - as the number of the day of the week. - \end{ShowOutput} -\end{Example} - -It is particularly worth noting that you can even step a specified number of -days into the future or or the past from a given date. -\begin{Example} - You want to know the number of the day of the week 12~days from now - and 24~days before the 24th~December~2027. -\begin{lstcode} - In 12~days, the number of the day of the week - will be \the\DayNumber{\year}{\month}{\day+12}, and - 24~days before the 24th~December~2027 it will be - \the\ISODayNumber{2027-12-24-24}. -\end{lstcode} - The result could be, for example: - \begin{ShowOutput} - In 12~days, the number of the day of the week - will be \the\DayNumber{\year}{\month}{\day+12}, and - 24~days before the 24th~December~2027 it will be - \the\ISODayNumber{2027-12-24-24}. - \end{ShowOutput} -\end{Example} - -The days of the week are numbered as follows: Sunday\,=\,0, Monday\,=\,1, -Tuesday\,=\,2, Wednesday\,=\,3, Thursday\,=\,4, Friday\,=\,5, and -Saturday\,=\,6.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{DayNameByNumber}\Parameter{number of the day of the week}\\% - \Macro{DayName}\Parameter{year}\Parameter{month}\Parameter{day}\\% - \Macro{ISODayName}\Parameter{ISO-date}% -\end{Declaration}% -Usually\ChangedAt{v3.05a}{\Package{scrdate}} you are less interested in the -number of the day of the week than in its name. Therefore, the -\Macro{DayNameByNumber} command returns the name of the day of the week -corresponding to a day-of-the-week number. This number can be the result, for -example, of \Macro{DayNumber} or \Macro{ISODayNumber}. The two commands -\Macro{DayName} and \Macro{ISODayName} directly return the name of the day of -the week of a given date. - -\begin{Example} - You want to know the name of the day of the week of the 24th~December~2027. -\begin{lstcode} - Please pay by \ISODayName{2027-12-24}, - 24th~December~2027 the amount of \dots. -\end{lstcode} - The result will be: - \begin{ShowOutput} - Please pay by \ISODayName{2027-12-24}, - 24th~December~2027 the amount of \dots. - \end{ShowOutput} -\end{Example} - -Once again, it is particularly worth noting that you can perform calculations, -to a certain extent: -\begin{Example} - You want to know the names of the day of the week 12~days from now - and 24~days before the 24th~December~2027. -\begin{lstcode} - In 12~days, the name of the day of the week - will be \DayName{\year}{\month}{\day+12}, and - 24~days before the 24th~December~2027 it will be - \ISODayName{2027-12-24-24}, while two weeks - and three days after a Wednesday will be a - \DayNameByNumber{3+2*7+3}. -\end{lstcode} - The result could be, for example: - \begin{ShowOutput} - In 12~days, the name of the day of the week - will be \DayName{\year}{\month}{\day+12}, and - 24~days before the 24th~December~2027 it will be - \ISODayName{2027-12-24-24}, while two weeks - and three days after a Wednesday will be a - \DayNameByNumber{3+2*7+3}. - \end{ShowOutput} -\end{Example}% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{ISOToday}% - \Macro{IsoToday}% - \Macro{todaysname}% - \Macro{todaysnumber}% -\end{Declaration}% -In the previous examples, the current date was always specified cumbersomely -using the \TeX{} registers \Macro{year}\IndexCmd{year}, -\Macro{month}\IndexCmd{month}, and \Macro{day}\IndexCmd{day}. The -\Macro{ISOToday}\ChangedAt{v3.05a}{\Package{scrdate}} and \Macro{IsoToday} -commands directly return the current date in ISO-notation. These commands -differ only in the fact that \Macro{ISOToday} always outputs a two-digit month -and day, while \Macro{IsoToday} outputs single-digit numbers for values less -than 10. The \Macro{todaysname} command directly returns the name of the -current day of the week, while \Macro{todaysnumber} returns the number of the -current day of the week. You can find more information about using this value -in the explanations of \DescRef{scrdate.cmd.DayNumber} and -\DescRef{scrdate.cmd.ISODayNumber}. - -\begin{Example} - I want to show you on what day of the week this document was typeset: -\begin{lstlisting} - This document was created on a \todaysname. -\end{lstlisting} - This will result, for example, in: - \begin{ShowOutput} - This document was created on a \todaysname. - \end{ShowOutput} -\end{Example} - -For languages that have a case system for nouns, note that the package cannot -decline words. The terms are given in the form appropriate for displaying a -date in a letter, which is the nominative singular for the currently supported -languages. Given this limitation, the example above will not work correctly if -translated directly into some other languages. - -\begin{Explain} - The\textnote{Hint!} names of the weekdays in \Package{scrdate} all have - initial capital letters. If you need the names completely in lower case, for - example because that is the convention in the relevant language, simply wrap - the command with the \LaTeX{} \Macro{MakeLowercase}\IndexCmd{MakeLowercase}% - \important{\Macro{MakeLowercase}} command: - % Umbruchkorrektur: listings -\begin{lstcode} - \MakeLowercase{\todaysname} -\end{lstcode} - This converts the whole argument into lower-case letters. Of course, you can - also do this for - \DescRef{scrdate.cmd.DayNameByNumber}\IndexCmd{DayNameByNumber}, - \DescRef{scrdate.cmd.DayName}\IndexCmd{DayName}, and - \DescRef{scrdate.cmd.ISODayName}\IndexCmd{ISODayName} commands described - above.% -\end{Explain}% -\EndIndexGroup - - -\begin{Declaration} - \Macro{nameday}\Parameter{name} -\end{Declaration}% -Just as you can directly modify the output of \Macro{today} with -\DescRef{maincls.cmd.date}\IndexCmd{date}, so you can change the output of -\DescRef{scrdate.cmd.todaysname} to \PName{name} with \Macro{nameday}. -\begin{Example} - You change the current date to a fixed value using - \DescRef{maincls.cmd.date}. You are not interested in the actual name of the - day, but want only to show that it is a workday. So you write: -\begin{lstlisting} - \nameday{workday} -\end{lstlisting} - After this, the previous example will result in: - \begin{ShowOutput}\nameday{workday} - This document was created on a \todaysname. - \end{ShowOutput} -\end{Example} -There's no corresponding command to change the result of -\DescRef{scrdate.cmd.ISOToday}\IndexCmd{ISOToday} or -\DescRef{scrdate.cmd.IsoToday}\IndexCmd{IsoToday}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{newdaylanguage}\Parameter{language}% - \Parameter{Monday}\Parameter{Tuesday}% - \Parameter{Wednesday}\Parameter{Thursday}% - \Parameter{Friday}\Parameter{Saturday} - \Parameter{Sunday}% -\end{Declaration} -Currently the \Package{scrdate} package recognizes the following languages: -\begin{itemize}\setlength{\itemsep}{.5\itemsep} -\item Croatian (\PValue{croatian}), -\item Czech (\PValue{czech}\ChangedAt{v3.13}{\Package{scrdate}}), -\item Danish (\PValue{danish}), -\item Dutch (\PValue{dutch}), -\item English (\PValue{american}\ChangedAt{v3.13}{\Package{scrdate}}, - \PValue{australian}, \PValue{british}, \PValue{canadian}, \PValue{english}, - \PValue{UKenglish}, and USenglish), -\item Finnish (\PValue{finnish}), -\item French (\PValue{acadian}, \PValue{canadien}, - \PValue{francais}\ChangedAt{v3.13}{\Package{scrdate}}, and \PValue{french}), -\item German (\PValue{austrian}\ChangedAt{v3.08b}{\Package{scrdate}}, - \PValue{german}, \PValue{naustrian}, \PValue{ngerman}, - \PValue{nswissgerman}, and - \PValue{swissgerman}\ChangedAt{v3.13}{\Package{scrdate}}), -\item Italian (\PValue{italian}), -\item Norwegian (\PValue{norsk}), -\item Polish (\PValue{polish}\ChangedAt{v3.13}{\Package{scrdate}}), -\item Slovak (\PValue{slovak}), -\item Spanish (\PValue{spanish}), -\item Swedish (\PValue{swedish}). -\end{itemize} -You can also configure it for additional languages. To do so, the first -argument of \Macro{newdaylanguage} is the name of the language, and the other -arguments are the names of the corresponding days of the week. - -In the current implementation, it does not matter whether you load -\Package{scrdate} before or after \Package{ngerman}\IndexPackage{ngerman}, -\Package{babel}\IndexPackage{babel}, or similar packages. In each case the -correct language will be used provided it is supported. - -\begin{Explain} - To be more precise, as long as you select a language in a way that is - compatible with \Package{babel}\IndexPackage{babel}, \Package{scrdate} will - use the correct language. If this is not the case, you will get (US) English - names. -\end{Explain} - -Of course, if you create definitions for a language that was previously -unsupported, please mail them to the author of \KOMAScript{}. There is a good -chance that future versions of \KOMAScript{} will add support for that -language.% -\EndIndexGroup -% -\EndIndexGroup - - -\chapter{The Current Time with \Package{scrtime}} -\labelbase{scrtime} -\BeginIndexGroup -\BeginIndex{Package}{scrtime} - -This package lets you find the current time. Starting with version~3.05, the -package also supports the option interface already familiar from the -\KOMAScript{} classes and various other \KOMAScript{} packages. See, for -example, \autoref{sec:typearea.options} for more information. - -\begin{Declaration}% - \Macro{thistime}\OParameter{delimiter}% - \Macro{thistime*}\OParameter{delimiter} -\end{Declaration}% -\Macro{thistime} returns the current time\Index{time} in hours and minutes. -The delimiter between the values of hour, minutes and seconds can be given in -the optional argument. The default is the character ``\PValue{:}''. - -\Macro{thistime*} works in almost the same way as \Macro{thistime}. The only -difference is that, unlike \Macro{thistime}, \Macro{thistime*} does not add a -leading zero to the minute field when its value is less than 10. Thus, with -\Macro{thistime} the minute field has always two places. -\begin{Example} - The line -\begin{lstlisting} - Your train departs at \thistime. -\end{lstlisting} - results, for example, in: - \begin{ShowOutput} - Your train departs at \thistime. - \end{ShowOutput} - or: - \begin{ShowOutput} - Your train departs at 23:09. - \end{ShowOutput} - \bigskip - In contrast to the previous example a line like: -\begin{lstlisting} - This day is already \thistime*[\ hours and\ ] minutes old. -\end{lstlisting} - results in: - \begin{ShowOutput} - This day is already \thistime*[\ hours and\ ] minutes old. - \end{ShowOutput} - or: - \begin{ShowOutput} - This day is already 12 hours and 25 minutes old. - \end{ShowOutput} -\end{Example} -\EndIndexGroup - - -\begin{Declaration}% - \Macro{settime}\Parameter{time} -\end{Declaration}% -\Macro{settime} sets the output of \DescRef{scrtime.cmd.thistime} and -\DescRef{scrtime.cmd.thistime*} to a fixed value. In this case, the optional -parameter of \DescRef{scrtime.cmd.thistime} or \DescRef{scrtime.cmd.thistime*} -is ignored, since the complete string returned by -\DescRef{scrtime.cmd.thistime} or \DescRef{scrtime.cmd.thistime*} has been -explicitly defined. \Macro{settime}.% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{12h}{simple switch}% -\end{Declaration}% -\BeginIndex{Option}{24h}% -With the \Option{12h}\ChangedAt{v3.05a}{\Package{scrtime}} option, you can -select whether to print the time given by \DescRef{scrtime.cmd.thistime} and -\DescRef{scrtime.cmd.thistime*} in 12- or 24-hour format. The option accepts -the values for simple switches listed in \autoref{tab:truefalseswitch}, -\autopageref{tab:truefalseswitch}. Using the option without a value is -equivalent to \OptionValue{12h}{true}, and therefore activates the -12-hour-format. The default, however, is \Option{24h}. - -You can set this option globally in the optional argument of -\DescRef{typearea.cmd.documentclass}, as a package option in the optional -argument of \DescRef{typearea.cmd.usepackage}, or even after loading the -package using \DescRef{typearea.cmd.KOMAoptions} or -\DescRef{typearea.cmd.KOMAoption} (see, e.\,g. \autoref{sec:typearea.options}, -\DescPageRef{typearea.cmd.KOMAoptions}). However the option no longer has any -effect on the if you call \DescRef{scrtime.cmd.settime}. After invoking this -command, the time is output only with the value and in the format specified -there. - -For\textnote{Attention!} the sake of compatibility with earlier versions of -\Package{scrtime}, the option \Option{24h} will switch to 24-hour format if -used in the optional argument of \Macro{documentclass} or \Macro{usepackage}. -However, you should not use this option any longer.% -\EndIndexGroup -% -\EndIndexGroup - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrextend.tex b/macros/latex/contrib/koma-script/source-doc/english/scrextend.tex deleted file mode 100644 index 7fbaa31696..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrextend.tex +++ /dev/null @@ -1,222 +0,0 @@ -% ====================================================================== -% scrextend.tex -% Copyright (c) Markus Kohm, 2002-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. -% ---------------------------------------------------------------------- -% scrextend.tex -% Copyright (c) Markus Kohm, 2002-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. -% ====================================================================== -% -% Package scrextend for Document Writers -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Paket scrextend fuer Dokument-Autoren -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{scrextend.tex} - [$Date: 2019-11-18 10:57:08 +0100 (Mo, 18. Nov 2019) $ - KOMA-Script package scrextend] -\translator{Markus Kohm\and Karl Hagen} - -% Date of the translated German file: 2019-11-18 - -\chapter[{\KOMAScript{} Features for Other Classes with \Package{scrextend}}] - {Using Basic Features of the \KOMAScript{} Classes in Other Classes with the - \Package{scrextend} Package} -\labelbase{scrextend} -\BeginIndexGroup% -\BeginIndex{Package}{scrextend}% - -There are some features that are common to all \KOMAScript{} classes. This -applies not only to the \Class{scrbook}, \Class{scrreprt}, and -\Class{scrartcl} classes, which are intended to replace the standard classes -\Class{book}, \Class{report}, and \Class{article}, but also to a large extend -the \KOMAScript{} class \Class{scrlttr2}, the successor to \Class{scrlettr}, -which is intended for letters. These basic features, which can be found in the -classes mentioned above, are also provided by package \Package{scrextend} from -\KOMAScript{} version~3.00 onward. This\textnote{Attention!} package should -not be used with \KOMAScript{} classes. It is intended for use with other -classes only. If you attempt to load the package with a \KOMAScript{} class, -\Package{scrextend} will detect this and reject loading it with a warning -message. - -The fact that \hyperref[cha:scrlttr2]{\Package{scrletter}}% -\IndexPackage{scrletter} can be used not only with \KOMAScript{} classes but -also with the standard classes is partly due to \Package{scrextend}. If -\hyperref[cha:scrlttr2]{\Package{scrletter}} detects that it is not being used -with a \KOMAScript class, it automatically loads \Package{scrextend}. Doing -so makes all required \KOMAScript{} classes available. - -Of course, there is no guarantee that \Package{scrextend} will work with all -classes. The package has been designed primarily to extend the standard -classes and those derived from them. In any case, before you use -\Package{scrextend}, you should first make sure that the class you are using -does not already provide the feature you need. - -In addition to the features described in this chapter, there are a few more -that are primarily intended for authors of classes and packages. These can be -found in \autoref{cha:scrbase}, starting on \autopageref{cha:scrbase}. The -\hyperref[cha:scrbase]{\Package{scrbase}}% -\important{\hyperref[cha:scrbase]{\Package{scrbase}}}\IndexPackage{scrbase} -package documented there is used by all \KOMAScript{} classes and the -\Package{scrextend} package. - -All \KOMAScript{} classes and the \Package{scrextend} package also load the -\hyperref[cha:scrlfile]{\Package{scrlfile}}% -\important{\hyperref[cha:scrlfile]{\Package{scrlfile}}}\IndexPackage{scrlfile} -package described in \autoref{cha:scrlfile} starting on -\autopageref{cha:scrlfile}. Therefore the features of this package are also -available when using \Package{scrextend}. - -\iftrue % Umbruchkorrekturtext -In contrast, only the \KOMAScript{} classes \Class{scrbook}, \Class{scrreprt}, -and \Class{scrartcl} load the \hyperref[cha:tocbasic]{\Package{tocbasic}} -package (see \autoref{cha:tocbasic} starting on \autopageref{cha:tocbasic}), -which is designed for authors of classes and packages. For this reason, the -features defined there are found only in those classes and not in -\Package{scrextend}. Of course you can still use -\hyperref[cha:tocbasic]{\Package{tocbasic}} together with -\Package{scrextend}.% -\fi - -\LoadCommonFile{options}% \section{Early or late Selection of Options} - -\LoadCommonFile{compatibility}% \section{Compatibility with Earlier Versions of \KOMAScript} - - -\section{Optional, Extended Features} -\seclabel{optionalFeatures} - -The \Package{scrextend} package provides some optional, extended features. -These features are not available by default but can be activated. These -features are optional because, for example, they may conflict with features of -the standard classes of other commonly used packages. - -\begin{Declaration} - \OptionVName{extendedfeature}{feature} -\end{Declaration} -With this option, you can activate an extended \PName{feature} of -\Package{scrextend}. This option is available only while loading -\Package{scrextend}. You must therefore specify this option in the optional -argument of \DescRef{\LabelBase.cmd.usepackage}\PParameter{scrextend}. % -\iffree{% - An overview of all available features is shown in - \autoref{tab:scrextend.optionalFeatures}. - - \begin{table} - \caption[{Available extended features of - \Package{scrextend}}]{Overview of the optional extended - features of \Package{scrextend}} - \label{tab:scrextend.optionalFeatures} - \begin{desctabular} - \entry{\PName{title}}{% - title pages have the additional features of the \KOMAScript{} classes; - this applies not only to the commands for the title page but also to - the \DescRef{\LabelBase.option.titlepage} option (see - \autoref{sec:scrextend.titlepage}, from - \autopageref{sec:scrextend.titlepage})% - }% - \end{desctabular} - \end{table} -}{% - \par% - Currently the only available extended \PName{feature} is - \PValue{title}\IndexOption[indexmain]{extendedfeature~=\textKValue{title}}% - \important{\OptionValue{extendedfeature}{title}}. - This \PName{feature} gives title pages the features of the \KOMAScript{} - classes, as described in \autoref{sec:scrextend.titlepage} starting on - \autopageref{sec:scrextend.titlepage}.% -}% -% -\EndIndexGroup - - -\LoadCommonFile{draftmode}% \section{Draft Mode} - -\LoadCommonFile{fontsize}% - -\LoadCommonFile{textmarkup}% \section{Text Markup} - -\LoadCommonFile{titles}% \section{Document Title Pages} - -\LoadCommonFile{oddorevenpage}% \section{Detection of Odd and Even Pages} - -\section{Choosing a Predefined Page Style} -\seclabel{pagestyle} - -One of the basic features of a document is the page -style\Index[indexmain]{page>style}. In \LaTeX{}, the page style primarily -determines the content of headers and footers. The \Package{scrextend} package -does not define any page styles itself. Instead it uses the page styles of the -\LaTeX{} kernel. - - -\begin{Declaration} - \Macro{titlepagestyle} -\end{Declaration}% -\Index{title>page style}% -On some pages \DescRef{maincls.cmd.thispagestyle}\IndexCmd{thispagestyle} -automatically selects a different page style. Currently, \Package{scrextend} -only does this for title pages, and only if -\OptionValueRef{\LabelBase}{extendedfeature}{title} has been used (see -\autoref{sec:scrextend.optionalFeatures}, -\DescPageRef{scrextend.option.extendedfeature}). In this case the page style -specified in \DescRef{maincls.cmd.thispagestyle} will be used. The default for -\DescRef{maincls.cmd.thispagestyle} is -\PageStyle{plain}\IndexPagestyle{plain}. This page style is defined by the -\LaTeX{} kernel, so it should always be available.% -\EndIndexGroup - -\LoadCommonFile{interleafpage}% \section{Interleaf Pages} - -\LoadCommonFile{footnotes}% \section{Footnotes} - -\LoadCommonFile{dictum}% \section{Dicta} - -\LoadCommonFile{lists}% \section{Lists} - -\LoadCommonFile{marginpar}% \section{Margin Notes} -% -\EndIndexGroup - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% ispell-local-dictionary: "english" -%%% coding: us-ascii -%%% TeX-master: "../guide.tex" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrhack.tex b/macros/latex/contrib/koma-script/source-doc/english/scrhack.tex deleted file mode 100644 index 9642786ef9..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrhack.tex +++ /dev/null @@ -1,309 +0,0 @@ -% ====================================================================== -% scrhack.tex -% Copyright (c) Markus Kohm, 2001-2021 -% -% 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. -% ---------------------------------------------------------------------- -% scrhack.tex -% Copyright (c) Markus Kohm, 2001-2021 -% -% 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. -% ====================================================================== -% -% Chapter about scrhack of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------------- -% -% Kapitel ueber scrhack in der KOMA-Script-Anleitung -% Verwaltet von Markus Kohm -% -% ============================================================================ - -\KOMAProvidesFile{scrhack.tex} - [$Date: 2021-06-03 19:56:49 +0200 (Do, 03. Jun 2021) $ - KOMA-Script guide (chapter: scrhack)] -\translator{Markus Kohm\and Karl Hagen} - -% Date of the translated German file: 2021-06-03 - -\chapter{Improving Third-Party Packages with \Package{scrhack}} -\labelbase{scrhack} - -\BeginIndexGroup -\BeginIndex{Package}{scrhack} -Some packages from other authors do not work well with \KOMAScript{}. It is -often very tedious for the author of \KOMAScript{} to convince the authors of -these packages to make specific improvements. This also applies to packages -whose development has been discontinued. That's why the \Package{scrhack} was -created. This package alters the commands and definitions of other to work -better with \KOMAScript{}. Some changes are also useful when using other -classes. - -It is recommended to load the \Package{scrhack} package as early as -possible. In particular, loading should be done before the affected packages. - -\section{Development Status} -\label{scr:scrhack.draft} - -Although this package has been part of \KOMAScript{} for long time and is used -by many users, there's one problem with it. Redefining macros from third-party -packages depends on knowing the exact definition and use of those macros. This -also means that it depends on specific versions of those packages. If you use -a unknown version of such a package, \Package{scrhack} may not be able to -execute the required patch. In extreme cases, patching an unknown version can -lead to an error. - -Because \Package{scrhack} must be continuously modified to accommodate new -releases of third-party packages, it can never be considered complete. -Therefore \Package{scrhack} will remain permanently in a beta version. -Although its use will generally be a benefit, its correct functioning cannot -be permanently guaranteed. - -\LoadCommonFile{options}% \section{Early or late Selection of Options} - -\section{Using \Package{tocbasic}} -\seclabel{improvement} - -In the early days of \KOMAScript{}, users wanted to handle lists of floating -environments created with the -\Package{float}\IndexPackage{float}\important{\Package{float}} package in the -same way as the list of figures and list of tables created by \KOMAScript{} -itself. At that time the author of \KOMAScript{} contacted the author of -\Package{float} to propose an interface to support such an extension. A -somewhat modified form of that interface was implemented with the -\Macro{float@listhead}\IndexCmd[indexmain]{float@listhead} and -\Macro{float@addtolists}\IndexCmd[indexmain]{float@addtolists} commands. - -Later it became apparent that these two commands were not flexible enough to -fully support all of \KOMAScript's capabilities. Unfortunately, the author of -\Package{float} had already ceased development by that point, so further -changes to this package cannot be expected. - -Other package authors have also adopted these two commands, and it became -apparent that the implementation in some packages, including \Package{float}, -means that all these packages can only be loaded in a specific order, even -though they are otherwise unrelated to each other. - -To overcome all these disadvantages and problems, \KOMAScript{} no longer -officially supports this old interface. Instead, \KOMAScript{} warns if the -old interface is used. At the same time, the -\Package{tocbasic}\IndexPackage{tocbasic}\important{\Package{tocbasic}} -package (see \autoref{cha:tocbasic}) has been designed and implemented as a -central interface for managing of table of contents and similar content lists. -This package provides many more advantages and features than the two old -commands. - -Although the effort to use this package is very small, so far the authors of -most of the packages that use the old interface have not made any adjustments. -Therefore \Package{scrhack} contains appropriate modifications of the -\Package{float}\IndexPackage{float}\important{\Package{float}, -\Package{floatrow}, \Package{listings}}, -\Package{floatrow}\IndexPackage{floatrow}, and -\Package{listings}\IndexPackage{listings} packages. Merely loading -\Package{scrhack} is sufficient to make these packages recognize not only the -setting of the \KOMAScript{} option -\DescRef{maincls.option.listof}\IndexOption{listof~=\PName{setting}}, but also -to react to the language switching features of the -\Package{babel}\IndexPackage{babel} package. You can find more information -about the features available by switching packages to \Package{tocbasic} in -\autoref{sec:tocbasic.toc}. - -If you do not want this modification for any of the packages, or if it causes -problems, you can deactivate it selectively with the -\OptionValue{float}{false}\IndexOption[indexmain]{float~=\textKValue{false}}, -\OptionValue{floatrow}{false}\IndexOption[indexmain]{floatrow~=\textKValue{false}}, -or -\OptionValue{listings}{false}\IndexOption[indexmain]{listings~=\textKValue{false}} -option. Note\textnote{Attention!} that changing these options after loading -the associated package has no effect! - - -\section{Incorrect Assumptions about \Macro{@ptsize}} -\seclabel{ptsize} - -Some packages assume that the class-internal macro -\Macro{@ptsize}\IndexCmd{@ptsize} both is defined and expands to an integer. -For compatibility, \KOMAScript{} defines \Macro{@ptsize} even if the basic -font size is something other than 10\Unit{pt}, 11\Unit{pt}, or 12\Unit{pt}. -\KOMAScript{} also allows non-integer font sizes. So \Macro{@ptsize} can, of -course, also expand to a non-integer number. - -One\ChangedAt{v3.17}{\Package{scrhack}} of the packages that cannot cope with -a non-integer \Macro{@ptsize} is -\Package{setspace}\IndexPackage[indexmain]{setspace}. Additionally, the values -set by this package are always dependent on the basic font size, even if the -setting is made in the context of another font size. The \Package{scrhack} -package solves both problems by redefining \Macro{onehalfspacing} and -\Macro{doublespacing} to set the spacing relative to the actual font size. - -If you do not want this modification for the package, or if it causes -problems, you can deactivate it selectively with the -\OptionValue{setspace}{false}\IndexOption[indexmain]{setspace~=\textKValue{false}} -option. Note\textnote{Attention!} that changing this option after loading -\Package{setspace} has no effect! Likewise, if you use \Package{setspace} with -either the \Option{onehalfspacing} or \Option{doublespacing} option, you must -load \Package{scrhack} first. - - -\section{Older Versions of \Package{hyperref}} -\seclabel{hyperref} - -Versions of \Package{hyperref} before 6.79h set the link -anchors after the heading of the starred versions of commands like -\DescRef{maincls.cmd.part*}, \DescRef{maincls.cmd.chapter*}, etc. instead of -before them. Since then, this problem has been resolved at the suggestion of -\KOMAScript{}'s author. But because the change took more than a year, a patch -was added to \Package{scrhack}. Although this can also be deactivated with -\OptionValue{hyperref}{false}, you should instead use the current -\Package{hyperref} release. In this case \Package{scrhack} automatically -deactivates this unnecessary patch.% - - -\section{Inconsistent Handling of \Length{textwidth} and \Length{textheight}} -\seclabel{lscape} - -The\ChangedAt{v3.18}{\Package{scrhack}} -\Package{lscape}\IndexPackage[indexmain]{lscape} package defines a -\Environment{landscape}\IndexEnv{landscape} environment to set the page -contents, but not the header or footer in landscape mode. Inside this -environment, \Length{textheight}\IndexLength{textheight} is set to the value -of \Length{textwidth}, but \Length{textwidth} is not set to the former value -of \Length{textheight}. This is inconsistent. As far as I know, -\Length{textwidth} is left unchanged because setting it to \Length{textheight} -could interfere with other packages or user commands. But changing -\Length{textheight} also has this potential, and indeed it breaks, for -example, \Package{showframe}\IndexPackage{showframe} and -\Package{scrlayer}\IndexPackage{scrlayer}. Thus it would be best if -\Length{textheight} too remained unchanged. \Package{scrhack} uses the -\Package{xpatch} package (see \cite{package:xpatch}) to modify the -\Macro{landscape} environment's start macro appropriately. - -If you do not want this modification, or if it causes problems, you can -deactivate it with the -\OptionValue{lscape}{false}\IndexOption[indexmain]{lscape~=\textKValue{false}} -option. Note\textnote{Attention!} that changing \Option{lscape} subsequently -with \DescRef{\LabelBase.cmd.KOMAoption}\IndexCmd{KOMAoption} or -\DescRef{\LabelBase.cmd.KOMAoptions}\IndexCmd{KOMAoptions} has an effect only -if it was not \PValue{false} while loading \Package{lscape}. - -Incidentally, the \Package{pdflscape}\IndexPackage[indexmain]{pdflscape} -package also uses \Package{lscape}, so \Package{scrhack} affects the -functioning of this package too.% - - -\section{Special Case for \Package{nomencl}} -\label{sec:nomencl} - -The\ChangedAt{v3.23}{\Package{scrhack}} hack for the -\Package{nomencl}\IndexPackage[indexmain]{nomencl} represents a somewhat -special case. First, it ensures that the optional table of contents entry for -the nomenclature observes the \OptionValueRef{maincls}{toc}{indentunnumbered} -option. Somewhat incidentally, it also reserves the file extensions \File{nlo} -and \File{nls} for the owner \PValue{nomencl} (see -\DescRef{tocbasic.cmd.addtotoclist}, \autoref{sec:tocbasic.basics}, -\DescPageRef{tocbasic.cmd.addtotoclist}). - -It also changes the \Environment{thenomenclature}\IndexEnv{thenomenclature} -environment to use -\DescRef{tocbasic.cmd.tocbasic@listhead}\IndexCmd{tocbasic@listhead} for the -heading (see \autoref{sec:tocbasic.internals}, -\DescPageRef{tocbasic.cmd.tocbasic@listhead}). In this way, the hack lets you -set various attribute for the \File{nls} extension using -\DescRef{tocbasic.cmd.setuptoc}\IndexCmd{setuptoc}% -\important{\DescRef{tocbasic.cmd.setuptoc}}. For example, not only can you -enter the nomenclature in the table of contents with -\DescRef{tocbasic.cmd.setuptoc}\PParameter{nls}\PParameter{numbered}, but you -can also number it immediately. You can find more about -\DescRef{tocbasic.cmd.setuptoc} and its available settings in -\autoref{sec:tocbasic.toc}, starting on \DescPageRef{tocbasic.cmd.setuptoc}. -As a small but important side effect, this patch also gives the nomenclature -also matching running head, if automatic running heads are activated, for -example by using the \DescRef{maincls.pagestyle.headings} page style. - -This rather simple patch is an example of how packages that do not define -floating environments can still benefit from \Package{tocbasic}. However, you -do not want this change, or if it causes problems, you can deactivate it with -the \OptionValue{nomencl}{false}% -\IndexOption[indexmain]{nomencl~=\textKValue{false}} option. -The\textnote{Achtung!} setting of the option when \Package{nomencl} is loaded -is crucial! Later changes to the option with -\DescRef{\LabelBase.cmd.KOMAoption} or \DescRef{\LabelBase.cmd.KOMAoptions} -have no influence and will lead to a corresponding warning.% - - -\section{Special Case for Section Headings} -\seclabel{sections} - -Various\ChangedAt{v3.27}{\Package{scrhack}} packages assume that the -sectioning commands are defined in a specific way, corresponding to the -definitions in the standard classes. But for some classes this is not the -case. For example, the \KOMAScript{} classes use a completely different -implementation to provide many additional features. But this can cause -problems for packages that depend on the definition of the standard classes. -As of version~3.27, \Package{scrhack} offers the option to force the -sectioning commands \DescRef{maincls.cmd.part}\IndexCmd{part}, -\DescRef{maincls.cmd.chapter}\IndexCmd{chapter}, -\DescRef{maincls.cmd.section}\IndexCmd{section}, -\DescRef{maincls.cmd.subsection}\IndexCmd{subsection}, -\DescRef{maincls.cmd.subsubsection}\IndexCmd{subsubsection}, -\DescRef{maincls.cmd.paragraph}\IndexCmd{paragraph}, and -\DescRef{maincls.cmd.subparagraph}\IndexCmd{subparagraph} to be compatible -with those in the standard classes. When \DescRef{maincls.cmd.chapter} is -defined, the definitions are based on those in \Class{book}. When -\DescRef{maincls.cmd.chapter} is undefined, the definitions of -\Class{article} are used. - -If you are using a \KOMAScript{} class, several features of these classes are -also deactivated as side effect. For example, the commands to define or -modify sectioning commands described in -\autoref{sec:maincls-experts.sections} or option -\DescRef{maincls.option.headings} are no longer available, and commands like -\DescRef{maincls.cmd.partformat} have different defaults. - -Because this hack has the potential to do more harm than good, it issues -several warnings. Also it is not activated simply by loading the -\Package{scrhack} package. If you want to use it, you must explicitly activate -it with the \Option{standardsections}\IndexOption[indexmain]{standardsections} -option when you load the package. Late activation or deactivation is not -supported. - -Since there are often less invasive solutions to fix the problem of package -incompatibilities, using this hack is not recommended. It is provided only as -a last resort for emergencies.% -\EndIndexGroup - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% ispell-local-dictionary: "english" -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrjura.tex b/macros/latex/contrib/koma-script/source-doc/english/scrjura.tex deleted file mode 100644 index 3a8e60b877..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrjura.tex +++ /dev/null @@ -1,1188 +0,0 @@ -% ====================================================================== -% scrjura.tex -% Copyright (c) Markus Kohm, 2011-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. -% ---------------------------------------------------------------------- -% scrjura.tex -% Copyright (c) Markus Kohm, 2011-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. -% ====================================================================== -% -% Chapter about scrjura of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Kapitel ueber scrjura in der KOMA-Script-Anleitung -% Verwaltet von Markus Kohm -% -% ====================================================================== - -\KOMAProvidesFile{scrjura.tex}% - [$Date: 2021-02-25 13:15:44 +0100 (Do, 25. Feb 2021) $ - KOMA-Script guide (chapter: scrjura)] - -\translator{Alexander Willand\and Markus Kohm\and Karl Hagen} - -% Date of the translated German file: 2021-05-25 - -\chapter{Support for the Law Office with \Package{scrjura}} -\labelbase{scrjura} -\BeginIndexGroup -\BeginIndex{Package}{scrjura} - -If you want to write a contract\Index{contract}, the articles of association -for a company or an association, a law, or a legal commentary, the package -\Package{scrjura} will provide typographical support. Although -\Package{scrjura} is intended to provide general help for legal documents, the -contract is the central element of the package. Particular attention is paid -to clauses, titles, and numbered provisions\,---\,if there are several of -them in a clause\,---, numbered sentences, entries in the table of -contents, and cross references according to German standards. - -The package has been developed in cooperation with Dr Alexander Willand of -Karlsruhe. Many of its features go back to constructive inquiries from Prof -Heiner Richter of the Hochschule Stralsund University of Applied Sciences. - -Note\textnote{Attention!} that the package works with -\Package{hyperref}\IndexPackage{hyperref}. Nevertheless, \Package{hyperref} -has to be loaded after \Package{scrjura} as usual. - -\LoadCommonFile{options}% \section{Early or late Selection of Options} - -\LoadCommonFile{textmarkup}% \section{Text Markup} - -\section{Table of Contents} -\seclabel{toc} - -The headings of clauses can also be added automatically to the table of -contents, if desired. -% TODO: Fix new translation -Therefore\ChangedAt{v3.27}{\Package{scrjura}} the package uses -\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}\IndexCmd{DeclareTOCStyleEntry} -(see \autoref{sec:tocbasic.tocstyle}, -\DescPageRef{tocbasic.cmd.DeclareTOCStyleEntry}) to define an \PName{entry - level} named \PValue{cpar}. -% :ODOT - - -\begin{Declaration} - \OptionVName{juratotoc}{simple switch}% - \OptionVName{juratotoc}{level number} -\end{Declaration} -Clauses\Index{clause} are shown in the table of contents only if their -\PName{level number} is less than or equal to the -\DescRef{maincls.counter.tocdepth}% -\important{\DescRef{maincls.counter.tocdepth}}\IndexCounter{tocdepth} counter -(see \autoref{sec:maincls.toc}, \DescPageRef{maincls.counter.tocdepth}). By -default, the \PName{level number} is \Length{maxdimen}, which is also used if -the option is switched off with the \PName{simple - switch}\important{\OptionValue{juratotoc}{false}} (see -\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}). Because the -\DescRef{maincls.counter.tocdepth} counter usually has a one-digit value, -clause entries are therefore not normally displayed in the table of contents. - -If you switch on the option using the \PName{simple switch}% -\important{\OptionValue{juratotoc}{true}}, the \PName{level number} 2 is used -so that clauses are shown in the table of contents on the same level as -subsections. For the default setting of \DescRef{maincls.counter.tocdepth}, -clauses are then shown in all \KOMAScript{} classes. - -% TODO: Fix new translation -Internally\ChangedAt{v3.27}{\Package{scrjura}} usage of this option results in -a call of -\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}\IndexCmd{DeclareTOCStyleEntry} -with the \PName{style} \PValue{default} and a corresponding value of -\Option{level} in the \PName{option list}.% -% :ODOT -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{juratocindent}{indent}% - \OptionVName{juratocnumberwidth}{number width} -\end{Declaration} -These two options can be used to determine the indentation for the clause -entries in the table of contents as well as the space reserved for the numbers -there. The defaults are the same as for subsection entries in -\Class{scrartcl}. - -% TODO: Fix new translation -Internally\ChangedAt{v3.27}{\Package{scrjura}} usage of these options results -in calls of -\DescRef{tocbasic.cmd.DeclareTOCStyleEntry}\IndexCmd{DeclareTOCStyleEntry} -with the \PName{style} \PValue{default} and \OptionVName{indent}{indent} -respectively \OptionVName{numwidth}{number width} in the \PName{option list}.% -% :ODOT -\EndIndexGroup - - -\section{Environment for Contracts} -\seclabel{contract} - -\BeginIndexGroup -\BeginIndex{}{contract} -The essential mechanisms of \Package{scrjura} are available only inside the -contract environment. - -\begin{Declaration} - \begin{Environment}{contract}\end{Environment} -\end{Declaration} -Currently, this is the one and only environment for \Package{scrjura}. Using -it activates automatic numbering of paragraphs and the -\DescRef{\LabelBase.cmd.Clause} and \DescRef{\LabelBase.cmd.SubClause} -commands, which will be documented below, are given concrete form. - -The\textnote{Attention!} \DescRef{\LabelBase.env.contract} environment must -not be nested within itself. Within a document, however, you can use the -environment several times. The clauses within these environments are treated -as if they were within a single environment. As a result, ending the -environment really only temporarily interrupts it, and the old environment is -continued by the beginning of a new environment. However, you cannot end the -environment within a clause.% -\EndIndexGroup - - -\begin{Declaration} - \Option{contract} -\end{Declaration} -The whole document becomes a contract if you use this option while loading the -package with \DescRef{\LabelBase.cmd.usepackage}% -\important{\DescRef{\LabelBase.cmd.usepackage}} or as a global option with -\DescRef{\LabelBase.cmd.documentclass}% -\important{\DescRef{\LabelBase.cmd.documentclass}}. The document then behaves -exactly as if it contained one \DescRef{\LabelBase.env.contract} environment. - -Note\textnote{Attention!} that you cannot set the \Option{contract} option -with \DescRef{\LabelBase.cmd.KOMAoption} or -\DescRef{\LabelBase.cmd.KOMAoptions}. Thus you cannot switch the option off -again. Instead, you should use a \DescRef{\LabelBase.env.contract} environment -directly.% -\EndIndexGroup - - -\subsection{Clauses} -\label{sec:scrjura.clause} -\index{section|seealso{clause}} - -Clauses\footnote{% - In English, a ``clause'' in a legal document is a section, paragraph, or - phrase that relates to a particular point. Although it is common in English - to also use the terms ``article'' or ``section'' for what we here call a - ``clause'', we use the latter term throughout to avoid confusion with the - \Class{article} class and the \DescRef{maincls.cmd.section} and - \DescRef{maincls.cmd.paragraph} sectioning divisions of most document - classes.} in a legal sense are defined in \Package{scrjura} only within -contracts, that is inside the \DescRef{\LabelBase.env.contract} environment or -other environments declared with -\DescRef{\LabelBase.cmd.DeclareNewJuraEnvironment} (see -\autoref{sec:\LabelBase.newenv}, -\DescPageRef{\LabelBase.cmd.DeclareNewJuraEnvironment}). - -\begin{Declaration} - \Macro{Clause}\OParameter{options}% - \Macro{SubClause}\OParameter{options} -\end{Declaration} -These are the most important commands inside of a contract. Without using any -additional \PName{options}, \Macro{Clause} creates the heading of a clause, -which consists of the sign ``\S'', followed by its number. In contrast, -\Macro{SubClause} creates the heading of a clause with the last number used by -\Macro{Clause} and adds a lower-case letter. \Macro{SubClause} is mainly -intended for cases where an act or a contract is amended and not only are -clauses changed or deleted but new clauses are inserted between existing ones -without completely changing the numbering. - -Both commands accept a a comma-separated list of \PName{options}. An overview -of the available properties is shown in \autoref{tab:scrjura.Clause.options}. -The most important of them will be discussed in more detail. - -\begin{table} - \caption{Available properties for the optional argument of \Macro{Clause} and - \Macro{SubClause}} - \label{tab:scrjura.Clause.options} - \begin{desctabular} - \entry{\Option{dummy}}{% - The heading will not be printed but is counted in the automatic - numbering.% - }% - \entry{\OptionVName{head}{running head}}{% - If running heads are active, this \PName{running head} is used instead of - the clause \PName{title}.% - }% - \entry{\Option{nohead}}{% - The running head stays unchanged.% - }% - \entry{\Option{notocentry}}{% - Does not make an entry into the table of contents.% - }% - \entry{\OptionVName{number}{number}}{% - Uses \PName{number} for the output of the clause number.% - }% - \entry{\OptionVName{preskip}{skip}}{% - Changes the vertical \PName{skip} before the clause heading.% - }% - \entry{\OptionVName{postskip}{skip}}{% - Changes the vertical \PName{skip} after the clause heading.% - }% - \entry{\OptionVName{title}{title}}{% - The clause \PName{title} will be printed in addition to the clause - number. This is also used as the default for the \PName{running head} - and the \PName{entry} in the table of contents.% - }% - \entry{\OptionVName{tocentry}{entry}}{% - Regardless of the clause \PName{title}, an \PName{entry} into the - table of contents will be made, if such entries are activated.% - }% - \end{desctabular} -\end{table} - -By default, a skip of two lines is inserted before the heading and a skip of -one line afterwards. You can change the size of these skips with the -\Option{preskip}\important[i]{\Option{preskip}, \Option{postskip}} and -\Option{postskip} options. The new values apply not only to the current -clause but from the current clause until the end of the current contract -environment. You can also make the appropriate settings in advance with -\begin{flushleft}\quad\small - \textbf{\Macro{setkeys}}\PParameter{contract}% - \PParameter{preskip=\PName{skip},\\ - \normalsize\quad\small - \hspace{11.5em}postskip=\PName{skip}} -\end{flushleft} -regardless of the specific clause and outside of a contract environment. You -can also set these options inside the preamble after loading -\Package{scrjura}, but you cannot set them while loading the package or by -using \DescRef{\LabelBase.cmd.KOMAoptions} or -\DescRef{\LabelBase.cmd.KOMAoption}. - -\BeginIndex{FontElement}{contract.Clause}\LabelFontElement{contract.Clause}% -\BeginIndex{FontElement}{Clause}\LabelFontElement{Clause}% -By default, clause headings use the font style -\Macro{sffamily}\Macro{bfseries}\Macro{large}. You can change this font style -at any time using the -\FontElement{contract.Clause}\important{\FontElement{contract.Clause}} element -with \DescRef{\LabelBase.cmd.setkomafont}% -\important[i]{\DescRef{\LabelBase.cmd.setkomafont}, -\DescRef{\LabelBase.cmd.addtokomafont}} and -\DescRef{\LabelBase.cmd.addtokomafont} (see \autoref{sec:maincls.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}). Inside the -\DescRef{\LabelBase.env.contract} environment, you can also use -\FontElement{Clause}\important{\FontElement{Clause}} instead of -\FontElement{contract.Clause}.% -\EndIndex{FontElement}{Clause}% -\EndIndex{FontElement}{contract.Clause} - -With the \Option{title}\important[i]{\Option{title}, \Option{head}, - \Option{tocentry}}, \Option{head}, and \Option{tocentry} options, you can -title a clause in addition to the number. You\textnote{Attention!} should put -the value of each options inside curly brackets. Otherwise, for example, -commas which are meant to be part of the value will be confused with the -delimiters between different options. Empty values for \Option{head} and -\Option{tocentry} cause empty entries. If you want to avoid an entry, use the -\Option{nohead}\important[i]{\Option{nohead}, \Option{notocentry}} and -\Option{notocentry} options. - -Instead of consecutive numbers, you can also set a clause number manually with -the \Option{number}\important{\Option{number}} option. However, this does not -affect the numbers of the subsequent clauses. Empty numbers are not possible. -Fragile commands inside \PName{number} have to be protected with -\Macro{protect}. You\textnote{Attention!} should use only numbers and letters -as a \Option{number}. - -With the \Option{dummy}\important{\Option{dummy}} option, you can suppress the -output of the whole heading of a clause. The automatic numbering, however, -will still count this clause. In this way, you can skip an automatically -numbered clause with\textnote{Example} -\begin{lstcode} - \Clause{dummy} -\end{lstcode} -in case the clause corresponding clause has been deleted in a later version of -a contract. - -Note\textnote{Attention!} that the \Option{dummy} option only accepts the -values \PValue{true} and \PValue{false}. All other values are usually ignored, -but can lead to an error message in the worst case scenario.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Clauseformat}\Parameter{number} -\end{Declaration} -As already mentioned, clauses and subclauses are normally numbered. The number -is formatted with the help of the \Macro{Clauseformat} command, which expects -the number as the only argument. The default is the following: -\begin{lstcode} - \newcommand*{\Clauseformat}[1]{\S~#1} -\end{lstcode} -This produces the section mark, \Macro{S}\IndexCmd{S} (\S), followed by a -non-breaking space and the number. If you redefine this command, be sure it -remains expandable.% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{juratitlepagebreak}{simple switch} -\end{Declaration}% -Usually, page breaks are prohibited within heading of all kinds. However, some -lawyers require page breaks within clause headings. You can allow such a break -by using \Option{juratitlepagebreak}\important{\Option{juratitlepagebreak}}. -You can find the available values for \PName{simple switch} in -\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}.% -\EndIndexGroup - -\begin{Declaration} - \OptionVName{clausemark}{value} -\end{Declaration}% -Since clauses are a subordinate structure with independent numbering, they do -not produce running heads by default. You can, however, create running heads -with various settings. You can find the available \PName{values} and their -meanings in \autoref{tab:scrjura.clausemark}.% -% -\begin{table} - \caption{Available values for the \Option{clausemark} option to activate - running heads}% - \label{tab:scrjura.clausemark}% - \begin{desctabular} - \entry{\PValue{both}}{% - Clauses generate left and right marks for running heads, if the document - provides automatic running heads.% - \IndexOption{clausemark~=\textKValue{both}}% - }% - \entry{\PValue{false}, \PValue{off}, \PValue{no}}{% - Clauses do not generate marks for running heads and therefore do not - change running heads.% - \IndexOption{clausemark~=\textKValue{false}}% - }% - \entry{\PValue{forceboth}}{% - Clauses use \DescRef{maincls.cmd.markboth} to generate left and right - marks for running heads even if the document does not provide automatic - running heads for the current page style.% - \IndexOption{clausemark~=\textKValue{forceboth}}% - }% - \entry{\PValue{forceright}}{% - Clauses use \DescRef{maincls.cmd.markright} to generate right marks for - running heads even if the document does not provide automatic running - heads for the current page style.% - \IndexOption{clausemark~=\textKValue{forceright}}% - }% - \entry{\PValue{right}}{% - Clauses generate right marks for running heads, if the document provides - automatic running heads.% - \IndexOption{clausemark~=\textKValue{right}}% - }% - \end{desctabular} -\end{table} -% -\EndIndexGroup - - -\subsection{Paragraphs} -\label{sec:scrjura.par} -\BeginIndexGroup -\BeginIndex{}{paragraph>numbering}% -Within clauses, \Package{scrjura} usually numbers paragraphs automatically. -With this, the paragraphs provide a powerful structuring element, similar to -\DescRef{maincls.cmd.paragraph} or \DescRef{maincls.cmd.subparagraph} in -normal documents. For this reason, contracts usually use a vertical skip -between paragraphs. The \Package{scrjura} package does not provide its own -mechanism for this. Instead, it uses the \DescRef{maincls.option.parskip}% -\IndexOption{parskip}\important{\DescRef{maincls.option.parskip}} option of -the \KOMAScript{} classes (see \autoref{sec:maincls.parmarkup}, -\DescPageRef{maincls.option.parskip}). - - -\begin{Declaration} - \OptionVName{parnumber}{value} -\end{Declaration} -The default numbering of paragraphs is \OptionValue{parnumber}{auto} and -\OptionValue{parnumber}{true}. Sometimes you may need to disable the automatic -numbering. You can do this with \OptionValue{parnumber}{false}% -\important{\OptionValue{parnumber}{false}}% -\IndexOption{parnumber~=\textKValue{false}}. In this case, only the sentence -numbering is reset. - -To implement this option, it has been necessary to hook into the -paragraph-building mechanism of \LaTeX. In some rare cases, this can have a -negative effect. If so, you can undo the change with -\OptionValue{parnumber}{manual}% -\important{\OptionValue{parnumber}{manual}}% -\IndexOption{parnumber~=\textKValue{manual}}. On the other hand, \LaTeX{} -itself sometimes undoes the change. In those cases you can activate it again -with \OptionValue{parnumber}{auto}% -\important{\OptionValue{parnumber}{auto}}% -\IndexOption{parnumber~=\textKValue{auto}}. - -Clauses that consist of a single paragraph do not automatically receive a -paragraph number. For this to work, there must not be two clauses with an -identical number in a document. However should you ever need such numbering, -you should switch to another contract environment (see -\DescRef{\LabelBase.cmd.DeclareNewJuraEnvironment}, -\autoref{sec:\LabelBase.newenv}, -\DescPageRef{\LabelBase.cmd.DeclareNewJuraEnvironment}). -Note\textnote{Attention!} that the number of paragraphs in a clause is not -available before the end of the clause. Therefore you need a least two -\LaTeX{} runs before the automatic paragraph numbering is correct.% -\EndIndexGroup - - -\begin{Declaration} - \Counter{par}% - \Macro{thepar}% - \Macro{parformat}% - \Macro{parformatseparation} -\end{Declaration}% -For numbering the paragraphs inside a clause we use the \Counter{par} counter. -The output of \Macro{thepar} will display an Arabic number, because the -default is \Macro{arabic}\PParameter{par}. \Macro{parformat} provides the -format, which is \Macro{thepar} in rounded brackets. When numbering a -paragraph manually, you should also use \Macro{parformat}. It makes sense to -call \Macro{parformat} with a subsequent \Macro{parformatseparation}, or at -least a \Macro{nobreakspace} or tilde. - -With\ChangedAt{v0.7}{\Package{scrjura}} automatic numbering, \Macro{parformat} -is followed by \Macro{parformatseparation}, which currently consists of -\Macro{nonbreakspace}, the non-breakable space. - -\BeginIndex{FontElement}{parnumber}\LabelFontElement{parnumber}% -The paragraph number is usually printed using the currently active font. -However, you can change this default for the \FontElement{parnumber} element -at any time with \DescRef{\LabelBase.cmd.setkomafont}% -\important[i]{\DescRef{\LabelBase.cmd.setkomafont}, -\DescRef{\LabelBase.cmd.addtokomafont}} and -\DescRef{\LabelBase.cmd.addtokomafont} (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}).% -\EndIndex{FontElement}{parnumber}% - -Note\textnote{Attention!} that \Package{scrjura} assumes internally that -\Macro{thepar} is an Arabic number. Therefore you should definitely not -redefine it!% -\EndIndexGroup - - -\begin{Declaration} - \Macro{withoutparnumber} -\end{Declaration} -If the paragraph number is not printed, \Package{scrjura} executes the -\Macro{withoutparnumber} command at the beginning of the new paragraph. The -initial definition of this command is empty. This means it is a kind of dummy -command that does nothing. It has been implemented because of a user request. -Most users can ignore this command.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{ellipsispar}\OParameter{number}% - \Macro{parellipsis} -\end{Declaration} -Sometimes\ChangedAt{v0.7}{\Package{scrjura}}\,---\,particularly in comparative -commentaries\,---\,it is desirable to omit paragraphs but to mark the -omission. Those omitted paragraphs\Index{paragraph>omission} should be taken -into account by the paragraph counter. The package \Package{scrjura} provides -the command \Macro{ellipsispar} to do this. - -By default, \Macro{ellipsispar} omits precisely one paragraph. Using the -optional argument, you can omit multiple paragraphs. In any case, the output -shows just one unnumbered paragraph, which consists only of the ellipsis -defined by \Macro{parellipsis}. The automatic numbering of paragraphs takes -the \PName{number} of omitted paragraphs into account. -\begin{Example} - Suppose you are writing a comment on the German\footnote{Please remember, - this translation does not refer to an existing law but is only an example - of how you might realise such a commentary with \Package{scrjura}.} penal - code, but only on paragraph 3 of \S~2. Nevertheless, you'd like to indicate - the omission indirectly. You can do this with: -\begin{lstcode} - \documentclass[parskip=half]{scrartcl} - \usepackage{scrjura} - \begin{document} - \begin{contract} - \Clause{title={Temporal application},number=2} - \ellipsispar[2] - - If the law that applies at the time the criminal act is - committed is changed before the verdict, then the most - lenient law shall be applicable. - - \ellipsispar[3] - \end{contract} - \end{document} -\end{lstcode} - To see the result, just give it a try. -\end{Example} - -The ellipsis is by default \Macro{textellipsis}\IndexCmd{textellipsis}, if -such a command is defined. If not, \Macro{dots} is used. You can redefine -\Macro{parellipsis} at any time with \Macro{renewcommand}.% -\EndIndexGroup -% -\EndIndexGroup - - -\subsection{Sentences} -\label{sec:scrjura.sentence} - -\BeginIndexGroup% -\BeginIndex{}{sentence>number}% -Paragraphs in contracts consist of one or more sentences, some of which may -also be numbered. However, as automatic numbering is cumbersome and -error-prone, it has not yet been implemented in -\Package{scrjura}. Semi-automatic numbering, however, is supported. - -\begin{Declaration} - \Counter{sentence} - \Macro{thesentence} - \Macro{sentencenumberformat} - \Macro{Sentence} -\end{Declaration} -Manual numbering of sentences is done with the \Macro{Sentence} command. It -adds one to the \Counter{sentence} counter. By default, -\Macro{sentencenumberformat}\ChangedAt{v3.26}{\Package{scrjura}} prints -\Macro{thesentence} as an Arabic number in superscript. - -\BeginIndex{FontElement}{sentencenumber}\LabelFontElement{sentencenumber}% -The\ChangedAt{v3.26}{\Package{scrjura}} sentence number is usually printed -using the currently active font. However, you can change this default for the -\FontElement{parnumber} element at any time with -\DescRef{\LabelBase.cmd.setkomafont}% -\important[i]{\DescRef{\LabelBase.cmd.setkomafont}, - \DescRef{\LabelBase.cmd.addtokomafont}} and -\DescRef{\LabelBase.cmd.addtokomafont} (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}).% -\EndIndex{FontElement}{sentencenumber}% - -Using\textnote{Hint!} \Package{babel}\IndexPackage{babel} offers an easy way -to define a shorthand for \Macro{Sentence}:% -\phantomsection\label{sec:scrjura.shorthandexample}% -\begin{lstcode}[moretexcs={useshorthands,defineshorthand}] - \useshorthands{'} - \defineshorthand{'S}{\Sentence\ignorespaces} -\end{lstcode} -With this definition, any space after \lstinline|'S| will be ignored. You can -even use the dot as an abbreviation for a dot and a new sentence number: -\begin{lstcode}[moretexcs={useshorthands,defineshorthand}] - \defineshorthand{'.}{. \Sentence\ignorespaces} -\end{lstcode} -For details regarding \Macro{useshorthands} and \Macro{defineshorthands}, -please consult the manual of the \Package{babel} package (see -\cite{package:babel}). You can find an example of their application in -\autoref{sec:scrjura.example}, \autopageref{sec:scrjura.example}.% -\EndIndexGroup -% -\EndIndexGroup -% -\EndIndexGroup - - -\section{Cross-References} -\seclabel{ref} - -The conventional mechanism to set cross-references using -\Macro{label}\IndexCmd{label}\important{\Macro{label}}, \Macro{ref}, and -\Macro{pageref} does not suffice for clauses, paragraphs, and sentences. -Therefore \Package{scrjura} provides additional commands. - -\begin{Declaration} - \Macro{ref}\Parameter{label}% - \Macro{refL}\Parameter{label}% - \Macro{refS}\Parameter{label}% - \Macro{refN}\Parameter{label} -\end{Declaration} -The commands \Macro{refL}, \Macro{refS}, and \Macro{refN} give a full -reference to clause, paragraph and sentence. \Macro{refL} is a long text, -\Macro{refS} a short text, and \Macro{refN} an abbreviated, numeric form. -\Macro{ref} defaults to \Macro{refL}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{refClause}\Parameter{label}% - \Macro{refClauseN}\Parameter{label} -\end{Declaration} -These commands reference a clause without displaying the paragraph or -sentences. \Macro{refClause} puts a section mark (\S) in front of the -reference, while \Macro{refClauseN} does not.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{refPar}\Parameter{label}% - \Macro{refParL}\Parameter{label}% - \Macro{refParS}\Parameter{label}% - \Macro{refParN}\OParameter{number format}\Parameter{label} -\end{Declaration} -You can reference just a paragraph with \Macro{refParL}, \Macro{refParS} and -\Macro{refParN}. The differences between the forms correspond to the -differences between \DescRef{\LabelBase.cmd.refL}, -\DescRef{\LabelBase.cmd.refN} and \DescRef{\LabelBase.cmd.refS}. A feature -worth noting is the optional argument of \Macro{refParN}. Usually the numeric -reference to a paragraph uses a Roman number. You can, however, specify a -different \PName{number format} in the optional argument. This option -primarily makes sense to use Arabic numbers. By default, \Macro{refPar} is -\Macro{refParL}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{refSentence}\Parameter{label}% - \Macro{refSentenceL}\Parameter{label}% - \Macro{refSentenceS}\Parameter{label}% - \Macro{refSentenceN}\Parameter{label} -\end{Declaration} -You can reference a sentence with \Macro{refSentenceL}, \Macro{refSentenceS}, -or \Macro{refSentenceN}. Again, there is a long text form, a short text form, -and a numerical form. By default, \Macro{refSentence} is -\Macro{refSentenceL}.% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{ref}{value} -\end{Declaration} -The results of \DescRef{\LabelBase.cmd.ref}, \DescRef{\LabelBase.cmd.refPar}, -and \DescRef{\LabelBase.cmd.refSentence} depend on the \PName{value} of the -\Option{ref} option. The defaults are \DescRef{\LabelBase.cmd.refL}, -\DescRef{\LabelBase.cmd.refParL} and \DescRef{\LabelBase.cmd.refSentenceL}. -You can find the available values and their meaning in -\autoref{tab:scrjura.ref}.% -% -\begin{table} -%\begin{desclist} -% \desccaption - \caption[{% - Available values for the \Option{ref} option to configure the - cross-reference format% - }]{% - Available values for the \Option{ref} option to configure the - cross-reference format of \DescRef{\LabelBase.cmd.ref}, - \DescRef{\LabelBase.cmd.refPar}, and \DescRef{\LabelBase.cmd.refSentence}% - \label{tab:scrjura.ref}% - }% - \begin{desctabular} - \entry{\PValue{long}}{% - A combination of \PValue{parlong} and \PValue{sentencelong}.% - \IndexOption{ref~=\textKValue{long}}% - }% - \entry{\PValue{numeric}}{% - A combination of \PValue{parnumeric} and \PValue{sentencenumeric}.% - \IndexOption{ref~=\textKValue{numeric}}% - }% - \entry{\PValue{clauseonly}, \PValue{onlyclause}, \PValue{ClauseOnly}, - \PValue{OnlyClause}}{% - A combination of \PValue{paroff} and \PValue{sentenceoff}. Note that - \DescRef{\LabelBase.cmd.refPar} and \DescRef{\LabelBase.cmd.refSentence} - produce empty results!% - \IndexOption{ref~=\textKValue{long}}% - }% - \entry{\PValue{parlong}, \PValue{longpar}, \PValue{ParL}}{% - Paragraphs are referenced in long textual form.% - \IndexOption{ref~=\textKValue{parlong}}% - }% - \entry{\PValue{parnumeric}, \PValue{numericpar}, \PValue{ParN}}{% - Paragraphs are referenced in simple numerical form.% - \IndexOption{ref~=\textKValue{parnumeric}}% - }% - \entry{\PValue{paroff}, \PValue{nopar}}{% - Paragraphs have no reference. Note that \DescRef{\LabelBase.cmd.refPar} - produces an empty result!% - \IndexOption{ref~=\textKValue{paroff}}% - }% - \entry{\PValue{parshort}, \PValue{shortpar}, \PValue{ParS}}{% - Paragraphs are referenced in short textual form.% - \IndexOption{ref~=\textKValue{parshort}}% - }% - \entry{\PValue{sentencelong}, \PValue{longsentence}, \PValue{SentenceL}}{% - Sentences are referenced in long textual form.% - \IndexOption{ref~=\textKValue{parlong}}% - }% - \entry{\PValue{sentencenumeric}, \PValue{numericsentence}, - \PValue{SentenceN}}{% - Sentences are referenced in simple numeric form.% - \IndexOption{ref~=\textKValue{sentencenumeric}}% - }% - \entry{\PValue{sentenceoff}, \PValue{nosentence}}{% - Sentences have no reference. Note that - \DescRef{\LabelBase.cmd.refSentence} produces an empty result!% - \IndexOption{ref~=\textKValue{sentenceoff}}% - }% - \entry{\PValue{sentenceshort}, \PValue{shortsentence}, - \PValue{SentenceS}}{% - Sentences are referenced in short textual form.% - \IndexOption{ref~=\textKValue{sentenceshort}}% - }% - \entry{\PValue{short}}{% - A combination of \PValue{parshort} and \PValue{sentenceshort}.% - \IndexOption{ref~=\textKValue{value}}% - }% -\end{desctabular} -\end{table} - -\begin{Example} - Suppose you always want to reference paragraphs in the form ``paragraph 1 - in clause 1''. As there is no predefined command for this, you have - to create your own definition from the available options. You can achieve - this easily with:% -\begin{lstcode} - \newcommand*{\refParM}[1]{% - paragraph~\refParN[arabic]{#1} - in clause~\refClauseN{#1}% - } -\end{lstcode} - This new command can be used in the same way as - \DescRef{\LabelBase.cmd.refParL}.% -\end{Example}% - -You can find examples of results of the basic commands in -\autoref{tab:scrjura.refexamples}.% -% -\begin{table} - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% - \begin{captionbeside}{Example outputs of the \Option{ref}-independent - cross-reference commands}[l] - \begin{tabular}[t]{ll} - \toprule - Command & Example output \\ - \midrule - \DescRef{\LabelBase.cmd.refL}\Parameter{label} & \S{} 1 paragraph 1 sentence 1 \\ - \DescRef{\LabelBase.cmd.refS}\Parameter{label} & \S{} 1 par. 1 sent. 1 \\ - \DescRef{\LabelBase.cmd.refN}\Parameter{label} & \S{} 1 I 1. \\ - \DescRef{\LabelBase.cmd.refClause}\Parameter{label} & \S{} 1 \\ - \DescRef{\LabelBase.cmd.refClauseN}\Parameter{label} & 1 \\ - \DescRef{\LabelBase.cmd.refParL}\Parameter{label} & paragraph 1 \\ - \DescRef{\LabelBase.cmd.refParS}\Parameter{label} & par. 1 \\ - \DescRef{\LabelBase.cmd.refParN}\Parameter{label} & I \\ - \DescRef{\LabelBase.cmd.refParN}\POParameter{arabic}\Parameter{label} & 1 \\ - \DescRef{\LabelBase.cmd.refParN}\POParameter{roman}\Parameter{label} & i \\ - \DescRef{\LabelBase.cmd.refSentenceL}\Parameter{label} & sentence 1 \\ - \DescRef{\LabelBase.cmd.refSentenceS}\Parameter{label} & sent. 1 \\ - \DescRef{\LabelBase.cmd.refSentenceN}\Parameter{label} & 1. \\ - \bottomrule - \end{tabular} - \end{captionbeside} - \label{tab:scrjura.refexamples} -\end{table} -\EndIndexGroup - - -\section{Additional Environments} -\seclabel{newenv} - -Some users do not use \Package{scrjura} to draft contracts or commentaries on -individual laws but to examine different types of laws, which may not -necessarily use the section prefix (\S) before the title of each clause but -perhaps something like ``Art.'' or ``IAS'', and so forth. An independent -counter is also required for each of these different clause types. - -\begin{Declaration} - \Macro{DeclareNewJuraEnvironment}\Parameter{name}\OParameter{options}% - \Parameter{start commands}\Parameter{end commands} -\end{Declaration} -You\ChangedAt{v0.9}{\Package{scrjura}} can use this command to define new and -independent environments for contracts or other legal texts. The argument -\PName{name} is the name of the new environment, of course. The \PName{start -commands} are commands which will be executed at the beginning of the -environment, as if they were added directly after -\Macro{begin}\Parameter{name}. Correspondingly \PName{end commands} will be -executed at the end of the environment, as if added directly before -\Macro{end}\Parameter{name}. Without any \PName{options} the new environment -behaves like the \DescRef{\LabelBase.env.contract} environment, but with its -own counters. It is possible to set \PName{options} in a comma-separated list. -See \autoref{tab:\LabelBase.DeclareNewJuraEnvironment} for the currently -supported \PName{options}. - -\begin{desclist} - \desccaption{Options provided by \Macro{DeclareNewJuraEnvironment} for new - contract environments\label{tab:\LabelBase.DeclareNewJuraEnvironment}}% - {Options of \Macro{DeclareNewJuraEnvironment} (\emph{continued})}% - \entry{\OptionVName{Clause}{command}}{% - Defines the \PName{command} to which the \DescRef{\LabelBase.cmd.Clause} - command is mapped within the environment. This \PName{command}, like the - one documented for \DescRef{\LabelBase.env.contract}, expects exactly one - argument. To use it correctly requires advanced knowledge of the - \Package{scrjura}'s internal functioning. Furthermore, the requirements - for the \PName{command} may change in future versions. Therefore it is - recommended not to use this option!% - }% - \entry{\OptionVName{ClauseFont}{commands}}{% - \leavevmode\BeginIndex{FontElement}{\PName{Name}.Clause}% - \LabelFontElement{\PName{Name}.Clause}% - If this option is used, a new - \FontElement{\PName{Name}.Clause}\IndexFontElement{\PName{Name}.Clause} - element is defined using - \DescRef{maincls-experts.cmd.newkomafont}\IndexCmd{newkomafont}, with the - \PName{commands} used as its default setting. If the element was - previously defined as an alias (see - \DescRef{maincls-experts.cmd.aliaskomafont} in - \autoref{sec:maincls-experts.fonts}, - \DescPageRef{maincls-experts.cmd.aliaskomafont}), it will become an - independent element instead. If it has already been defined as an - independent element, \DescRef{\LabelBase.cmd.setkomafont} is used to set - the \PName{commands} a new font settings. Please note the limitations for - font settings in \autoref{sec:\LabelBase.textmarkup}, - \DescPageRef{\LabelBase.cmd.setkomafont}. - \EndIndex{FontElement}{\PName{Name}.Clause}% - }% - \entry{\OptionVName{SubClause}{command}}{% - Defines the \PName{command} to which the - \DescRef{\LabelBase.cmd.SubClause} command is mapped within the - environment. This \PName{command}, like the one documented for - \DescRef{\LabelBase.env.contract}, expects exactly one argument. To use it - correctly requires advanced knowledge of the \Package{scrjura}'s internal - functioning. Furthermore, the requirements for the \PName{command} may - change in future versions. Therefore it is recommended not to use this - option!% - }% - \entry{\OptionVName{Sentence}{command}}{% - Defines the \PName{command} to which the - \DescRef{\LabelBase.cmd.Sentence} is mapped within the environment. This - \PName{command} must not have an argument. Typically it should add one to - the \Counter{sentence}\IndexCounter{sentence} (using - \Macro{refstepcounter}\IndexCmd{refstepcounter}) counter and display it - appropriately. It is particularly important to avoid adding unwanted - spaces.% - }% - \entry{\OptionVName{ClauseNumberFormat}{command}}{% - Formats the numbers of clauses within the environment. The \PName{command} - should expect exactly one argument: the number of the clause. If the - \PName{command} implements a series of commands and the number is the last - argument of a that series, you can directly use the series of commands as - \PName{command}.% - } -\end{desclist} -\begin{Example} - To define the environment for articles we mentioned in the preface of this - section, it is sufficient to write: -\begin{lstcode} - \DeclareNewJuraEnvironment{Article}[ClauseNumberFormat=Art.~]{}{} -\end{lstcode} - If we are using a \KOMAScript{} class and want to separate the paragraphs in - this environment with space instead of using paragraph indentation, we can - use: -\begin{lstcode} - \DeclareNewJuraEnvironment{Article}[ClauseNumberFormat=Art.~] - {\KOMAoptions{parskip}}{} -\end{lstcode} - In cross-references, ``Art.'' will of course be used instead of ``\S''.% - - The new environment is used like \DescRef{\LabelBase.env.contract}: -\begin{lstcode} - \begin{Article} - \Clause{} - Human dignity is inviolable. To respect and protect people is a - duty of all state authority. - \end{Article} -\end{lstcode} -\end{Example}% -\EndIndexGroup - - -\section{Support for Different Languages} -\seclabel{babel} - -The \Package{scrjura} package has been developed in cooperation with a German -lawyer. Therefore it initially supported only the languages \PValue{german}, -\PValue{ngerman}, \PValue{austrian}, and \PValue{naustrian}. Nevertheless, it -has been designed to support common language packages like -\Package{babel}\important{\Package{babel}}\IndexPackage{babel}. Users can -easily make changes by using \DescRef{scrbase.cmd.providecaptionname} (see -\autoref{sec:scrbase.languageSupport}, -\DescPageRef{scrbase.cmd.providecaptionname}). If you have definitive -information about the correct legal terms and conventions of a language, -please contact the \KOMAScript{} author. Support for English has been added in -this way, and so \Package{scrjura} now also provides terms for the languages -\PValue{english}, \PValue{american}, \PValue{british}, \PValue{canadian}, -\PValue{USenglish}, and \PValue{UKenglish}. - -\begin{Declaration} - \Macro{parname}% - \Macro{parshortname}% - \Macro{sentencename}% - \Macro{sentenceshortname} -\end{Declaration} -These are the language-dependent terms used by \Package{scrjura}. The meaning -of the terms and their English defaults are shown in -\autoref{tab:scrjura.captionnames}. The package itself defines them by using -\DescRef{scrbase.cmd.providecaptionname} inside -\Macro{begin}\PParameter{document} only if other requirements have not already -been met. If you use \Package{scrjura} with an unsupported language, the -package will throw an error.% -% -\begin{table} - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% - \begin{captionbeside} - [{% - Meanings and English defaults of language-dependent terms% - }]{% - Meanings and English defaults of language-dependent terms, if not - already defined% - } [l] - \begin{tabular}[t]{lll} - \toprule - Command & Meaning & Default \\ - \midrule - \Macro{parname} & long form ``paragraph'' & paragraph \\ - \Macro{parshortname} & short form ``paragraph'' & par. \\ - \Macro{sentencename} & long form ``sentence'' & sentence \\ - \Macro{sentenceshortname} & short form ``sentence'' & sent. \\ - \bottomrule - \end{tabular} - \end{captionbeside} - \label{tab:scrjura.captionnames} -\end{table} -% -\EndIndexGroup - - -\section{A Detailed Example} -\seclabel{example} - -You may remember the letter from \autoref{cha:scrlttr2}, in which a club -member wanted to remind the board about an overdue meeting that was prescribed -by the club's by-laws. Such club by-laws are a kind of contract, and you can -create them using \Package{scrjura}. - -\lstinputcode[{xleftmargin=2em,% - linerange=1-2}]{scrjuraexample.tex}% -We use class \Class{scrartcl}. Because paragraph distance instead of paragraph -indentation is usual in club by-laws, we load the class with option -\OptionValueRef{maincls}{parskip}{half} (see \autoref{sec:maincls.parmarkup}, -\DescPageRef{maincls.option.parskip}). - -\lstinputcode[{xleftmargin=2em,% - linerange=4-4}]{scrjuraexample.tex}% -The club rules are in British English. Therefore we load the \Package{babel} -package with the \Option{british} option too. - -\lstinputcode[{xleftmargin=2em,% - linerange={6-7,9-9}}]{scrjuraexample.tex}% -We make some default font settings and load the \Package{textcomp} package -because it provides an improved section mark (\S) and\,---\,something that may -be useful in other circumstances\,---\,a usable Euro symbol for some fonts. - -%\lstinputcode[{moretexcs=SelectInputMappings,xleftmargin=2em,% -% linerange=11-15}]{scrjuraexample.tex}% -Although it is not relevant for English, if we were writing an another -language, we would want to input non-ASCII characters directly. To do so, we -could let \LaTeX{} detect the input encoding with the \Package{selinput} or -set it with the \Package{inputenc} packages. - -\lstinputcode[{xleftmargin=2em,% - linerange=11-11}]{scrjuraexample.tex}% -Later in the document, we want lists numbered not with Arabic numbers but with -lower-case letters. We can do this easily with the \Package{enumerate} package. - -\lstinputcode[{moretexcs={useshorthands,defineshorthand},% - xleftmargin=2em,% - linerange=13-21}]{scrjuraexample.tex}% -Now it is time for \Package{scrjura}. The -\OptionValueRef{\LabelBase}{clausemark}{forceboth} option forces clauses to -create left and right marks for the running head. On the other hand, we do not -want \DescRef{maincls.cmd.section} to change the marks for the running head. -Therefore we use the \PageStyle{myheadings} page style. This page style -generally does not provide automatic running heads. - -Later, we also want a table of contents with the clauses. This can be achieved -with the \DescRef{\LabelBase.option.juratotoc} option. Doing so we will see -that the default width for these numbers is insufficient for the clause -numbers in the table of contents. With -\OptionValueRef{\LabelBase}{juratocnumberwidth}{2.5em}, we reserve more space. - -The definition of shorthands has already been explained in -\autoref{sec:scrjura.shorthandexample}. In this example we do the same thing -to simplify the input. - -\lstinputcode[{xleftmargin=2em,% - linerange=23-23}]{scrjuraexample.tex}% -It is time to begin the actual document. - -\lstinputcode[{xleftmargin=2em,% - linerange=25-29}]{scrjuraexample.tex}% -Like other documents, the by-laws have a title. We created it with the usual -\KOMAScript{} commands (see \autoref{sec:maincls.titlepage}, starting on -\autopageref{sec:maincls.titlepage}). - -\lstinputcode[{xleftmargin=2em,% - linerange=31-31}]{scrjuraexample.tex}% -As already mentioned, we want to create a table of contents. - -\lstinputcode[{xleftmargin=2em,% - linerange=33-37}]{scrjuraexample.tex}% -Preambles are not unusual in club by-laws. Here we use -\DescRef{maincls.cmd.addsec} to create one because we want it to have an entry -in the table of contents. - -\lstinputcode[{xleftmargin=2em,% - linerange=39-39}]{scrjuraexample.tex}% -Here we use a small trick. The articles of the club by-laws should be numbered -with upper-case letters instead of Arabic numbers, just as -the appendix sections of an article using \Class{scrartcl} are. - -\lstinputcode[{xleftmargin=2em,% - linerange=41-43}]{scrjuraexample.tex}% -We begin the contract with the first article. - -\lstinputcode[{xleftmargin=2em,% - linerange=44-54}]{scrjuraexample.tex}% -The first clause has a number and a title. We will do the same with all -following clauses. - -The first paragraph of the clause contains nothing unusual. Because it is not -the only paragraph, every paragraph will be automatically preceded by a -paragraph number. Note that the numbering the first paragraph requires at -least two \LaTeX{} runs. Since this is the case for the table of contents as -well, this does not create any additional problems. - -In the second paragraph we have two sentences. Here we can see the shorthands -\texttt{'S} and \texttt{'.} in action. The first one only generates the -sentence number. The second one generates not only the full stop but also the -sentence number. With this, both sentences are numbered. - -\lstinputcode[{xleftmargin=2em,% - linerange=55-70}]{scrjuraexample.tex}% -The second clause: again this contains several paragraphs, some of which -include several sentences. The second paragraph also has a numbered list. In -the last paragraph, we set a label, because we want to reference it later. - -\lstinputcode[{xleftmargin=2em,% - linerange=72-78}]{scrjuraexample.tex}% -The third clause contains something special: a cross-reference. Here we use -the long form with clause, paragraph, and sentence. If we decided later that -sentences should not be included in the reference, we could use the -\OptionValueRef{\LabelBase}{ref}{nosentence} option to set this globally. - -\lstinputcode[{xleftmargin=2em,% - linerange=80-81}]{scrjuraexample.tex}% -Here we have a special kind of clause. In earlier versions of the club by-laws, -this was a real clause, but it was later removed. However, the -numbering of the following clauses should not be changed by removing this -one. Therefore the \DescRef{\LabelBase.cmd.Clause} statement has not been -removed but supplemented by option \Option{dummy}. With this, we also can set -a label even though the clause will not be printed. - -\lstinputcode[{xleftmargin=2em,% - linerange=82-86}]{scrjuraexample.tex}% -Another article begins. To avoid problems with the paragraph numbering, we -interrupt the \DescRef{\LabelBase.env.contract} environment. - -\lstinputcode[{xleftmargin=2em,% - linerange=87-87}]{scrjuraexample.tex}% -The first clause of the next article also has been deleted. - -\lstinputcode[{xleftmargin=2em,% - linerange=89-98}]{scrjuraexample.tex}% -Here we have a real clause again. We cross-reference one of the deleted -clauses and also set a label. - -\lstinputcode[{xleftmargin=2em,% - linerange=100-104}]{scrjuraexample.tex}% -Once more, this is a special kind of clause. This time we have not removed a -clause but added one without renumbering the following clauses. To do so, -we use \DescRef{\LabelBase.cmd.SubClause}. Therefore the clause number is the -same like the previous one but with an appended ``a''. - -\lstinputcode[{xleftmargin=2em,% - linerange=106-126}]{scrjuraexample.tex}% -The other clauses of this article are very usual. You already know all the -features used for them. - -\lstinputcode[{xleftmargin=2em,% - linerange=128-141}]{scrjuraexample.tex}% -There follows another article no special features. - -\lstinputcode[{xleftmargin=2em,% - linerange=143-143}]{scrjuraexample.tex}% -Then the \LaTeX{} document ends. You can see first three pages in -\autoref{fig:scrjura.example}.% -% -\begin{figure} - \setcapindent{0pt}% - \iffree{% - {\hfill - \frame{\includegraphics[page=1,width=.482\textwidth,% - height=.49\textheight,keepaspectratio]{scrjuraexample}}\enskip - \frame{\includegraphics[page=2,width=.482\textwidth,% - height=.49\textheight,keepaspectratio]{scrjuraexample}}\par - \smallskip} - \begin{captionbeside}[{% - Example: First three pages of the example club by-laws of - \protect\autoref{sec:scrjura.example}% - }]{% - First three pages of the example club by-laws of - \protect\autoref{sec:scrjura.example}% - }% - [l] - \frame{\includegraphics[page=3,width=.482\textwidth,% - height=.49\textheight,keepaspectratio]{scrjuraexample}}\enskip - \end{captionbeside} - }{% - {\hfill - \frame{\includegraphics[page=1,width=.482\textwidth]{scrjuraexample}}% - \enskip - \frame{\includegraphics[page=2,width=.482\textwidth]{scrjuraexample}}\par - \smallskip} - \begin{captionbeside}[{% - Example: First three pages of the example club by-laws of - \protect\autoref{sec:scrjura.example}% - }]{% - First three pages of the example club by-laws of - \protect\autoref{sec:scrjura.example}% - }% - [l] - \frame{\includegraphics[page=3,width=.482\textwidth]{scrjuraexample}}% - \enskip - \end{captionbeside} - }% - \label{fig:scrjura.example} -\end{figure} - -\section{State of Development} -\seclabel{draft} - -Since \KOMAScript~3.24, the \Package{scrjura} package has shared the version -number of the classes and other important packages of \KOMAScript. -Nevertheless, you should note that so far, the interaction of the -\DescRef{\LabelBase.env.contract} environment with the many different settings -possible with other \LaTeX{} environments, packages, or classes has not been -tested. The main reason for this is that \Package{scrjura} is very specialised -and far beyond the author's ordinary practice. So the author mostly relies on -detailed user feedback.% -\EndIndexGroup - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% ispell-local-dictionary: "en_GB" -%%% TeX-PDF-mode: t -%%% TeX-master: "guide.tex" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrjuraexample.tex b/macros/latex/contrib/koma-script/source-doc/english/scrjuraexample.tex deleted file mode 100644 index d9ef923b49..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrjuraexample.tex +++ /dev/null @@ -1,143 +0,0 @@ -\documentclass[fontsize=12pt,parskip=half] - {scrartcl} - -\usepackage[british]{babel} - -\usepackage[T1]{fontenc} -\usepackage{lmodern} -\usepackage{charter,helvet} -\usepackage{textcomp} - -\usepackage{enumerate} - -\usepackage[clausemark=forceboth, - juratotoc, - juratocnumberwidth=2.5em] - {scrjura} -\useshorthands{'} -\defineshorthand{'S}{\Sentence\ignorespaces} -\defineshorthand{'.}{. \Sentence\ignorespaces} - -\pagestyle{myheadings} - -\begin{document} - -\subject{By-Laws} -\title{CfCH} -\subtitle{Club for Club Hoppers} -\date{11.\,11.\,2011} -\maketitle - -\tableofcontents - -\addsec{Preamble} - -The club landscape in England is diverse. But we have -unfortunately been forced to conclude that it often -suffers seriously when dealing with seriousness. - -\appendix - -\section{Overview} - -\begin{contract} -\Clause{title={Name, Legal Form, Headquarters}} - -The name of this club shall be the ``Club for Club -Hoppers'' and is not registered in any club register. - -'S The club is a non-economic, useless club'. It has no -headquarters because its members heads are in their -hindquarters. - -The fiscal year is from March 31st through April 1st. - -\Clause{title={Purpose of the Club}} - -'S The club is pointless but not useless'. Rather, -it should put the serious handling of seriousness on a -sound footing. - -For this purpose, the club members can -\begin{enumerate}[\qquad a)] -\item pick their noses, -\item crack nuts, -\item such their thumbs. -\end{enumerate} - -The club is selfish and stands by it. - -The club has no financial means.\label{a:mittel} - -\Clause{title={Club Officers}} - -The club officers hold honorary positions. - -'S If the club had resources (see \ref{a:mittel}), it -could afford a full-time manager'. Without the necessary -funds, this is not possible. - -\Clause{title={Club Hopper},dummy} -\label{p.maier} -\end{contract} - -\section{Membership} - -\begin{contract} -\Clause{title={Types of Members},dummy} - -\Clause{title={Becoming a Member}} - -Everyone can purchase a membership from one of the -associations listed in \refClause{p.maier}.\label{a.preis} - -'S To become a member, an informal application is -required'. This application should be submitted in green -ink on pink paper. - -Membership applications cannot be rejected. - -\SubClause{title={Amendment to the Previous Clause}} - -'S With the repeal of \refClause{p.maier}, -\ref{a.preis} has become impractical'. In its place, -memberships can be inherited. - -\Clause{title={Termination of Membership}} - -'S Membership ends with one's life'. For non-living -members, membership does not end. - -\Clause{title={General Meeting}} - -A general meeting shall take place twice per year. - -The interval between two general meetings shall be -no more than 6~months, 1~week, and 2~days. - -The invitation to the next general meeting shall be sent -no earlier than 6~months from the previous general -meeting. - -\SubClause{title={Amendment to the General Meeting}} - -The general meeting may be held at the earliest 2~weeks after -the invitation is received. -\end{contract} - -\section{Validity} - -\begin{contract} -\Clause{title={Effective Date}} - -These articles will enter into force on 11.\,11.\,2011 at -11:11~am. - -'S If any provision of these by-laws is in conflict with -any other, the by-laws will be repealed on -11.\,11.\,2011 at 11:11~am and 11~seconds'. The club is -considered to be dissolved in this case. - -\end{contract} - -\end{document} diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrlayer-notecolumn-example.tex b/macros/latex/contrib/koma-script/source-doc/english/scrlayer-notecolumn-example.tex deleted file mode 100644 index 164c646e1f..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrlayer-notecolumn-example.tex +++ /dev/null @@ -1,121 +0,0 @@ -% ====================================================================== -% scrlayer-notecolumn-example.tex -% Copyright (c) Markus Kohm, 2018 -% -% 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. -% ---------------------------------------------------------------------- -% scrlayer-notecolumn-example.tex -% Copyright (c) Markus Kohm, 2018 -% -% 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. -% ====================================================================== -% -% Example file for the chapter about scrlayer-notecolumn -% of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Beispieldatei für das Kapitel über scrlayer-notecolumn -% in der KOMA-Script-Anleitung -% Verwaltet von Markus Kohm -% -% ============================================================================ -\documentclass{scrartcl} -\usepackage{lmodern} -\usepackage{xcolor} - -\usepackage{scrjura} -\setkomafont{contract.Clause}{\bfseries} -\setkeys{contract}{preskip=-\dp\strutbox} - -\usepackage{scrlayer-scrpage} -\usepackage{scrlayer-notecolumn} - -\newlength{\paragraphscolwidth} -\AfterCalculatingTypearea{% - \setlength{\paragraphscolwidth}{.333\textwidth}% - \addtolength{\paragraphscolwidth}{-\marginparsep}% -} -\recalctypearea -\DeclareNewNoteColumn[% - position=\oddsidemargin+1in - +.667\textwidth - +\marginparsep, - width=\paragraphscolwidth, - font=\raggedright\footnotesize - \color{blue} -]{paragraphs} - -\begin{document} - -\title{Commentary on the SCRACH} -\author{Professor R. O. Tenase} -\date{11/11/2011} -\maketitle -\tableofcontents - -\section{Preamble} -The SCRACH is without doubt the most important law on the manners of humour -that has been passed in the last thousand years. The first reading took place -on 11/11/1111 in the Supreme Manic Fun Congress, but the law was rejected by -the Vizier of Fun. Only after the ludicrous, Manic Fun monarchy was -transformed into a representative, witty monarchy by W. Itzbold, on 9/9/1999 -was the way finally clear for this law. - -\section{Analysis} - -\begin{addmargin}[0pt]{.333\textwidth} - \makenote[paragraphs]{% - \protect\begin{contract} - \protect\Clause{title={No Joke without an Audience}} - A joke can only be funny if is has an audience. - \protect\end{contract} - } - This is one of the most central statements of the law. It is so fundamental - that it is quite appropriate to bow to the wisdom of the authors. - - \syncwithnotecolumn[paragraphs]\bigskip - \makenote[paragraphs]{% - \protect\begin{contract} - \protect\Clause{title={Humor of a Culture}} - \setcounter{par}{0}The humour of a joke can be determined by the - cultural environment in which it is told. - - The humour of a joke can be determined by the cultural environment in - which it acts. - \protect\end{contract} - } - The cultural component of a joke is, in fact, not negligible. Although the - political correctness of using the cultural environment can easily be - disputed, nonetheless the accuracy of such comedy in the appropriate - environment is striking. On the other hand, a supposed joke in the wrong - cultural environment can also be a real danger for the joke teller. -\end{addmargin} - -\end{document} diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrlayer-notecolumn.tex b/macros/latex/contrib/koma-script/source-doc/english/scrlayer-notecolumn.tex deleted file mode 100644 index 90097824f3..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrlayer-notecolumn.tex +++ /dev/null @@ -1,723 +0,0 @@ -% ====================================================================== -% scrlayer-notecolumn.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. -% ---------------------------------------------------------------------- -% scrlayer-notecolumn.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. -% ====================================================================== -% -% Chapter about scrlayer-notecolumn of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Kapitel ueber scrlayer-notecolumn in der KOMA-Script-Anleitung -% Verwaltet von Markus Kohm -% -% ============================================================================ - -\KOMAProvidesFile{scrlayer-notecolumn.tex} - [$Date: 2018-02-05 01:50:56 -0800 (Mon, 05 Feb 2018) $ - KOMA-Script guide (chapter:scrlayer-notecolumn)] - -\translator{Markus Kohm\and Arndt Schubert\and Karl Hagen} - -% Date of the translated German file: 2019-12-03 - -\chapter{Note Columns with \Package{scrlayer-notecolumn}} -\labelbase{scrlayer-notecolumn} - -\BeginIndexGroup -\BeginIndex{Package}{scrlayer-notecolumn}% -Through version~3.11b, \KOMAScript{} supported note columns only in the form -of marginal notes that get their contents from \DescRef{maincls.cmd.marginpar} -and \DescRef{maincls.cmd.marginline} (see \autoref{sec:maincls.marginNotes}, -\DescPageRef{maincls.cmd.marginline}). This kind of note column has several -disadvantages: -\begin{itemize} -\item Marginal notes must be set completely on a single page. Page - breaks\textnote{page break} inside marginal notes are not possible. This - sometimes causes the marginal notes to protrude into the lower margin. -\item Marginal notes near page breaks sometimes float to the next page and - then, in the case of two-sided printing, cause alternate marginal columns to - appear in the wrong margin.\textnote{assignment to the correct margin}. This - problem can be solved with the additional package - \Package{mparhack}\IndexPackage{mparhack} or by using \Macro{marginnote} - from the \Package{marginnote}\IndexPackage{marginnote} package (see - \cite{package:marginnote}). -\item Marginal notes inside floating environments\textnote{floating - environments} or footnotes\textnote{footnotes} are not possible. This - problem can also be solved with \Macro{marginnote} of the - \Package{marginnote}\IndexPackage{marginnote} package. -\item There is only one marginal note column\textnote{several note columns}, - or at most two if you use \Macro{reversemarginpar} and - \Macro{normalmarginpar}. Note that \Macro{reversemarginpar} is of less - utility with two-sided documents. -\end{itemize} -Using \Package{marginnote}\IndexPackage{marginnote} leads to one more problem. -Because the package does not have any collision detection, marginal notes that -are set near to each other can partially or totally overlap. Moreover, -depending on the settings used, \Macro{marginnote} sometimes changes the -baseline distance of the normal text. - -The \Package{scrlayer-notecolumn} package should solve all these problems. To -do so, it relies on the basic functionality of -\hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer}% -\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}}. However, using this -package has a drawback:\textnote{Attention!} you can only output notes on -pages that use a page style based on -\hyperref[cha:scrlayer]{\Package{scrlayer}}. This disadvantage, however, can -easily be resolved, or even turned into an advantage, with the help of -\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% -\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% -\IndexPackage{scrlayer-scrpage}. - -\section{Note about the State of Development} -\seclabel{draft} - -This package was originally developed as a so-called \emph{proof of - concept}\textnote{proof of concept} to demonstrate the potential of -\hyperref[cha:scrlayer]{\Package{scrlayer}}% -\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}}. Although it is still -in its early stages of development, most of its stability is less a question -of \Package{scrlayer-notecolumn} than of -\hyperref[cha:scrlayer]{\Package{scrlayer}}. Nevertheless, you can assume that -there are still bugs in \Package{scrlayer-notecolumn}. Please report such bugs -whenever you find them. Some of the package's shortcomings are caused by the -attempt to minimise complexity. For example, although note columns can break -across several pages, there is no new paragraph break. \TeX{} itself does not -provide this. - -Because the package is rather experimental\textnote{experimental}, its -instructions are found here in the second part of \iffree{the \KOMAScript{} -manual}{this book}. Accordingly, it is primarily directed towards experienced -users. If you are a beginner or a user on the way to become an -expert\textnote{for experts}, some of the following explanations may be -unclear or even incomprehensible. -\iffree{Please understand that I want to keep the effort spent on the manual - to something halfway bearable when it comes to experimental packages.}{% - However, this should be enough to solve simple tasks with - \Package{scrlayer-notecolumn}. At the same time, developers will hopefully - find useful stimulus for their own ideas.} - -\iffalse% Umbruchoptimierung -Note also\textnote{Attention!} that the author of \KOMAScript{} does not -guarantee the further development of this package and offers only limited -support for it. This is the nature of a package written solely for the -purposes of demonstration.% -\fi - -\LoadCommonFile{options}% \section{Early or late Selection of Options} - -\LoadCommonFile{textmarkup}% \section{Text Markup} - -\section{Declaring New Note Columns} -\seclabel{declaration} - -Loading the package automatically declares a note column named -\PValue{marginpar}. As the name implies, this note column is placed in the -area of the normal marginal column used by \DescRef{maincls.cmd.marginpar} and -\DescRef{maincls.cmd.marginline}. The \Macro{reversemarginpar} and -\Macro{normalmarginpar} settings are also taken into account, but only for all -the notes on a page instead of note by note. The relevant setting is the one -that applies at the end of the page, namely during the output of the note -column. If you want to have notes in both the left and right margin of the -same page, you should define a second note column. - -The default settings for all newly declared note columns are the same as the -defaults for \PValue{marginpar}. % -\iftrue% Umbruchoptimierung -But you can easily change them during their initialisation.% -\fi - -Note\textnote{Attention!} that note columns can be output only on pages that -use a page style based on the -\hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer}% -\important{\hyperref[cha:scrlayer]{\Package{scrlayer}}} package. The -\Package{scrlayer-notecolumn} package automatically loads -\hyperref[cha:scrlayer]{\Package{scrlayer}}, which by default provides only -\PageStyle{empty}\IndexPagestyle{empty} page style. If you need additional -page styles, \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% -\IndexPackage{scrlayer-scrpage}% -\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} is -recommended. - -\begin{Declaration} - \Macro{DeclareNoteColumn}% - \OParameter{option~list}\Parameter{note~column~name}% - \Macro{DeclareNewNoteColumn}% - \OParameter{option~list}\Parameter{note~column~name}% - \Macro{ProvideNoteColumn}% - \OParameter{option~list}\Parameter{note~column~name}% - \Macro{RedeclareNoteColumn}% - \OParameter{option~list}\Parameter{note~column~name}% -\end{Declaration} -You can use these commands to create note columns. \Macro{DeclareNoteColumn} -creates the note column regardless of whether it already exists. -\Macro{DeclareNewNoteColumn} throws an error if the \PName{note column name} -has already been used for another note column. \Macro{ProvideNoteColumn} -simply does nothing in that case. You can use \Macro{RedeclareNoteColumn} only -to reconfigure an existing note column. - -By the way, when reconfiguring existing note columns with -\Macro{DeclareNoteColumn} or \Macro{RedeclareNoteColumn}, the notes that have -already been generated for this column are retained. - -\BeginIndex{FontElement}{notecolumn.\PName{note column name}}% -\BeginIndex{FontElement}{notecolumn.marginpar}% -Declaring a new note column always defines a new element for changing its font -attributes with \DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont}, if such an element does not yet exist. -The name of the element is \PValue{notecolumn.}\PName{note column name}. For -this reason, the default note column \PValue{marginnote} has the -element\textnote{element name} \FontElement{notecolumn.marginpar}. You can -directly specify the initial setting of the element's font when declaring a -note column by using the \Option{font} option within the \PName{option list}.% -\EndIndex{FontElement}{notecolumn.marginpar}% -\EndIndex{FontElement}{notecolumn.\PName{note column name}}% - -The \PName{option list} is a comma-separated list of keys with or without -values, also known as options. The available options are listed in -\autoref{tab:scrlayer-notecolumn.note.column.options}, -\autopageref{tab:scrlayer-notecolumn.note.column.options}. -The\textnote{default: option \Option{marginpar}} \Option{marginpar} option is -set by default, but you can overwrite this default with your individual -settings. - -Because note columns are implemented using \Package{scrlayer}, a -layer\Index{layer} is created for each note column. The layer -name\textnote{layer name} is the same as the name of the element, -\PValue{notecolumn.}\PName{note column name}. For more information about -layers see \autoref{sec:scrlayer.layers}, starting on -\autopageref{sec:scrlayer.layers}. -% -\begin{Example} - Suppose you are a professor of comedy law and want to write a treatise on - the new ``Statute Concerning the Riotous Airing of Common Humour'', SCRACH - for short. The better part of the work will consist of commentary on - individual paragraphs of the statute. You decide on a two-column layout, - with the comments in the main column and the paragraphs placed in a smaller - note column on the right of the main column using a font that is - smaller\iffree{ and in a different colour}{}. -\begin{lstcode} - \documentclass{scrartcl} - \usepackage{lmodern} - \usepackage{xcolor} - - \usepackage{scrjura} - \setkomafont{contract.Clause}{\bfseries} - \setkeys{contract}{preskip=-\dp\strutbox} - - \usepackage{scrlayer-scrpage} - \usepackage{scrlayer-notecolumn} - - \newlength{\paragraphscolwidth} - \AfterCalculatingTypearea{% - \setlength{\paragraphscolwidth}{% - .333\textwidth}% - \addtolength{\paragraphscolwidth}{% - -\marginparsep}% - } - \recalctypearea - \DeclareNewNoteColumn[% - position=\oddsidemargin+1in - +.667\textwidth - +\marginparsep, - width=\paragraphscolwidth, - font=\raggedright\footnotesize - \color{blue} - ]{paragraphs} -\end{lstcode} - The treatise should be a one-sided article. The font is Latin Modern, and - the colour selection uses the \Package{xcolor}\IndexPackage{xcolor} package. - - For formatting legal texts\textnote{legal texts with - \hyperref[cha:scrjura]{\Package{scrjura}}} with the - \hyperref[cha:scrjura]{\Package{scrjura}}\IndexPackage{scrjura} package, see - \autoref{cha:scrjura}. - - Since this document uses a page style\textnote{page style with - \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} with a - page number, the - \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% - \IndexPackage{scrlayer-scrpage} package is loaded. Thus, note columns can be - output on all pages. - - Next, the \Package{scrlayer-notecolumn}\textnote{note columns with - \Package{scrlayer-notecolumn}} package is loaded. The required width of the - note column is calculated with - \DescRef{typearea-experts.cmd.AfterCalculatingTypearea}% - \IndexPackage{typearea}\IndexCmd{AfterCalculatingTypearea} after any - recalculation\textnote{type area with - \hyperref[cha:typearea]{\Package{typearea}}}% - \IndexPackage{typearea} of the type area. It should be one third of the type - area minus the distance between the main text and the note column. % - - With this information, we define the new note column. For the positions, we - use a simple dimension expression. Note that \Length{oddsidemargin} is not - the total left margin but for historical reasons the left margin minus - 1\Unit{inch}. So we have to add this value. - - This concludes the definition. Note that the note column would currently be - placed inside the type area. This means that the note column would overwrite - the text. - -\begin{lstcode} - \begin{document} - - \title{Commentary on the SCRACH} - \author{Professor R. O. Tenase} - \date{11/11/2011} - \maketitle - \tableofcontents - - \section{Preamble} - The SCRACH is without doubt the most important law - on the manners of humour that has been passed in - the last thousand years. The first reading took - place on 11/11/1111 in the Supreme Manic Fun - Congress, but the law was rejected by the Vizier - of Fun. Only after the ludicrous, Manic Fun - monarchy was transformed into a representative, - witty monarchy by W. Itzbold, on 9/9/1999 was - the way finally clear for this law. -\end{lstcode} - Because\textnote{Attention!} the text area was not reduced, the preamble is - output extending over the whole width of the type area. To test this, you - can temporarily add: -\begin{lstcode} - \end{document} -\end{lstcode} -\end{Example} -% -In the example, the question of how the text for the commentary can be set in -a narrower column remains unresolved. You will discover how to do this by -continuing the example below.% -% -%\begin{table}% Umbruchoptimierung: Tabelle hinter das Beispiel verschoben -\begin{desclist} - \desccaption{% -% \caption[Available settings for declaring note columns]{% - Available settings for declaring note columns% -% }% - \label{tab:scrlayer-notecolumn.note.column.options}% - }{% - Available settings for declaring note columns - (\emph{continued})% - }% -% \begin{desctabular} - \entry{\OptionVName{font}{font attribute}}{% - The font attributes of the note column set with - \DescRef{\LabelBase.cmd.setkomafont}. For possible values, refer to - \autoref{sec:maincls.textmarkup}, - \DescPageRef{maincls.cmd.setkomafont}.\par% - Default: \emph{empty}% - }% - \entry{\Option{marginpar}}{% - Sets \Option{position} and \Option{width} to correspond to the marginal - note column of \DescRef{maincls.cmd.marginpar}. Switching between - \Macro{reversemarginpar}\IndexCmd{reversemarginpar} and - \Macro{normalmarginpar}\IndexCmd{normalmarginpar} is only considered at - the end of the page when the note column is output. Note that this - option does not expect or allow any value.\par% - Default: \emph{yes}% - }% - \entry{\Option{normalmarginpar}}{% - Sets \Option{position} and \Option{width} to use the normal marginal - note column and ignore \Macro{reversemarginpar} and - \Macro{normalmarginpar}. Note that this option does not expect or allow - a value.\par% - Default: \emph{no}% - }% - \entry{\OptionVName{position}{offset}}{% - Sets the horizontal offset of the note column from the left edge of the - paper. The \PName{offset} can be a complex expression as long as it is - fully expandable and expands to a length or a dimensional expression at - the time the note column is output. See \cite[section~3.5]{manual:eTeX} - for more information about dimensional expressions.\par% - Default: \emph{through the \Option{marginpar} option}% - }% - \entry{\Option{reversemarginpar}}{% - Sets \Option{position} and \Option{width} to use the reverse marginal - note column of \DescRef{maincls.cmd.marginpar} with the - \Macro{reversemarginpar} setting. Note that this option does not expect - or allow a value.\par% - Default: \emph{no}% - }% - \entry{\OptionVName{width}{length}}{% - Sets the width of the note column. The \PName{length} can be a complex - expression as long as it is fully expandable and expands to a length or - a dimensional expression at the time the note column is output. See - \cite[section~3.5]{manual:eTeX} for more information about dimensional - expressions.\par% - Default: \emph{through the \Option{marginpar} option}% - }% -% \end{desctabular} -%\end{table} -\end{desclist} -\EndIndexGroup - - -\section{Making a Note} -\seclabel{makenote} - -After you declare a note column, you can create notes for this column. But -these notes are not be output immediately. Initially, they are written to an -auxiliary file with extension ``\File{.slnc}''. Specifically, they are first -written to the \File{aux}-file and, when the \File{aux}-file is read inside -\Macro{end}\PParameter{document}, they are copied to the \File{slnc}-file. If -necessary, the \Macro{nofiles}\IndexCmd{nofiles} setting is also taken into -account. At the next \LaTeX{} run, this auxiliary file will be read piece by -piece, according to the progress of the document, and at the end of the page -the notes for that page will be output. - -Note\textnote{Attention!}, however, that note columns are output only on pages -whose page style is based on the \Package{scrlayer}\IndexPackage{scrlayer} -package. This package is loaded automatically by \Package{scrlayer-notecolumn} -and by default provides only the \PageStyle{empty}\IndexPagestyle{empty} page -style. If you need additional page styles, the -\Package{scrlayer-scrpage}\IndexPackage{scrlayer-scrpage} package is -recommended. - -\begin{Declaration} - \Macro{makenote}\OParameter{note-column name}\Parameter{note}\\ - \Macro{makenote*}\OParameter{note-column name}\Parameter{note}\\ -\end{Declaration} -You can use this command to make a new \PName{note}. The current vertical -position is used as the vertical position for the start of the \PName{note}. -The horizontal position for the note results from the defined position of the -note column. To work correctly, the package relies on -\Macro{pdfsavepos}\IndexCmd{pdfsavepos}, -\Macro{pdflastypos}\IndexCmd{pdflastypos}, and -\Macro{pdfpageheight}\IndexLength{pdfpageheight} or their equivalent in newer -Lua\TeX{} versions. Without these commands, \Package{scrlayer-notecolumn} will -not work. The primitives should act exactly as they would using pdf\TeX. - -However, if the package detects a collision\textnote{collision avoidance} with -a previous \PName{note} in the same note column, the new \PName{note} is moved -below that earlier \PName{note}. If the \PName{note} does not fit on the -page\textnote{page break}\Index{page>break}, it will be moved completely or -partially to the next page. - -The optional argument \PName{note column name} determines which note column -should be used for the \PName{note}. If the optional argument is omitted, the -default note column \PValue{marginpar} is used.% -\begin{Example} - Let's add a commented paragraph to the example of the previous section. The - paragraph itself should be placed in the newly defined note column: -\begin{lstcode} - \section{Analysis} - \begin{addmargin}[0pt]{.333\textwidth} - \makenote[paragraphs]{% - \protect\begin{contract} - \protect\Clause{% - title={No Joke without an Audience}% - } - A joke can only be funny if is has an - audience. - \protect\end{contract}% - } - This is one of the most central statements of - the law. It is so fundamental that it is quite - appropriate to bow to the wisdom of the authors. -\end{lstcode} - The \DescRef{maincls.env.addmargin}\IndexEnv{addmargin}% - \textnote{column width with \DescRef{maincls.env.addmargin}} environment, - which is described in \autoref{sec:maincls.lists}, - \DescPageRef{maincls.env.addmargin}, is used to reduce the width of the main - text by the width of the column for the paragraphs. - - Here you can see one of the few problems of using \Macro{makenote}. Because - the mandatory argument is written to an auxiliary file, - commands\textnote{fragile commands} inside this argument can, unfortunately, - \emph{break}. To avoid this, you should use \Macro{protect} in front of all - commands that should not expand when written to the auxiliary file. - Otherwise, using a command inside this argument could result in error - messages. - - In principle you could now finish this example with -\begin{lstcode} - \end{addmargin} - \end{document} -\end{lstcode} - to see a preliminary result. -\end{Example} -If you test this example, you will see that the column for the legal text is -longer than that of the commentary. If\textnote{Attention!} you add another -section with another paragraph, you may encounter the problem that the -commentary will not continue below the legal text but immediately after the -previous comment. Next you will find a solution to this problem. - -The\ChangedAt{v0.1.2583}{\Package{scrlayer-notecolumn}} problem with fragile -commands mentioned in the example above does not occur with the starred -variant\important{\Macro{makenote*}}. It uses \Macro{detokenize} to prevent -the expansion of commands. But this also means that you should not use -commands in the \PName{note} that change their definition within the -document. - -Unfortunately, both commands have two other known -limitations\textnote{Attention!}. The first issue is related to colours using -\Package{color}\IndexPackage{color} or \Package{xcolor}\IndexPackage{xcolor} -within the note columns. To make such colour changes possible each note column -requires its own colour management using so-called \emph{colour stacks}. -Because the package was designed only as a \emph{proof of concept} and because -\XeTeX{} does not support multiple colour stacks, \XeTeX{} colour switching is -restricted to the attributes of the font element -\FontElement{notecolumn.\PName{note column name}}, a limitation which -eliminates the time and effort required to implement custom colour management. - -The second issue is of a more conceptual nature. The content of the auxiliary -file that contains the note-column information is read while processing the -page header. This has consequences in particular if the read occurs while -an environment like \Environment{verbatim} is active. In this case, the -\Macro{catcode} settings of this environment would be active while reading the -auxiliary file. This will inevitably lead to errors in processing and output. -To attenuate this risk, the \Macro{catcodes} of the characters from -\Macro{dospecials}\IndexCmd{dospecials} are stored during -\Macro{begin}\PParameter{document} and explicitly restored when reading from -the auxiliary file.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{syncwithnotecolumn}\OParameter{note column name} -\end{Declaration} -This command adds a -synchronisation\textnote{synchronisation}\Index{synchronisation} point in a -note column and in the main text of the document. Whenever a synchronisation -point is reached during the output of a note column or the main text, a mark -will be generated that consists of the current page and the current vertical -position. - -In parallel with the generation of synchronisation points, -\Package{scrlayer-notecolumn} determines whether a mark has been set in the -note column or the main text during the previous \LaTeX{} run. If so, it -compares their values. If the mark of the note column is lower on the current -page or on a later page, the main text will be moved down to the position of -the mark. - -As a rule,\textnote{Hint!} you should not place synchronisation points within -paragraphs of the main text but only between them. If you nonetheless use -\Macro{syncwithnotecolumn} inside a paragraph, the synchronisation point will -be delayed until the current line has been output. This behaviour is similar -to that of, e.\,g., \Macro{vspace}\IndexCmd{vspace} in this respect. - -Because synchronisation points are not recognized until the next \LaTeX{} -run\textnote{several \LaTeX{} runs}, this mechanism requires at least three -\LaTeX{} runs. Any new synchronisation may also result in shifts of later -synchronisation points, which in turn will require additional \LaTeX{} runs. -Such shifts are usually indicated by the message: ``\LaTeX{} Warning: Label(s) -may have changed. Rerun to get cross-references right.'' But reports about -undefined labels may also indicate the need for another \LaTeX{} run. - -If you omit the optional argument, the default note column \PValue{marginpar} -will be used. Note\textnote{Attention!} that an empty optional argument is not -the same as omitting the optional argument! - -You cannot use\textnote{Attention!} \Macro{syncwithnotecolumn} inside a note -itself, that is, inside the mandatory argument of -\Macro{makenote}\IndexCmd{makenote}! Currently the package cannot recognise -such a mistake, and it causes new shifts of the synchronisation point with -each \LaTeX{} run, so the process will never terminate. To synchronise two or -more note columns, you have to synchronise each of them with the main text. -The recommended command for this is described below.% -% -\begin{Example} - Let's extend the example above by first adding a synchronisation point - and then another paragraph with a comment: -\begin{lstcode} - \syncwithnotecolumn[paragraphs]\bigskip - \makenote[paragraphs]{% - \protect\begin{contract} - \protect\Clause{title={Humor of a Culture}} - \setcounter{par}{0}% - The humour of a joke can be determined by the - cultural environment in which it is told. - - The humour of a joke can be determined by the - cultural environment in which it acts. - \protect\end{contract} - } - The cultural component of a joke is, in fact, not - negligible. Although the political correctness of - using the cultural environment can easily be - disputed, nonetheless the accuracy of such comedy - in the appropriate environment is striking. On - the other hand, a supposed joke in the wrong - cultural environment can also be a real danger - for the joke teller. -\end{lstcode} - In addition to the synchronisation point, a vertical skip has been added - with \Macro{bigskip} to better distinguish each paragraph and the - corresponding comments. - - Further\textnote{Attention}, this example illustrates another potential - problem. Because the note columns uses boxes that are assembled and - disassembled, counters\textnote{counter in note column} inside note columns - can sometimes jitter. In the example, therefore, the first paragraph would - be numbered 2 instead of 1. This, however, can easily be fixed by a direct - reset of the corresponding counter. - - The example is almost complete. You just have to close the environments: -\begin{lstcode} - \end{addmargin} - \end{document} -\end{lstcode} - In reality, of course, all the remaining section of the law should also be - commented. But let us focus on the main purpose. -\end{Example} -But stop! What if, in this example, the \PName{paragraphs} would no longer fit -on the page? Would it be printed on the next page? We will answer this -question in the next section.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{syncwithnotecolumns}\OParameter{list of note column names} -\end{Declaration} -This command synchronises the main text with all note columns of the -comma-separated \PName{list of note column names}. The main text -will be synchronised with the note column whose mark is closest to the -end of the document. As a side effect, the note columns will be synchronised -with each other. - -If the optional argument is omitted or empty (or begins with \Macro{relax}), -synchronisation will be done with all currently declared note columns.% -\EndIndexGroup - - -\section{Forced Output of Note Columns} -\seclabel{clearnotes} - -In addition to the normal output of note columns described in the previous -section, you may sometimes need to output all collected notes that have -not yet been output. This is especially useful when large notes cause more and -more notes to be moved down to new pages. A good time to force the -output\textnote{force output} is, for example, the end of a chapter or the end -of the document. - -\begin{Declaration} - \Macro{clearnotecolumn}\OParameter{note column name} -\end{Declaration} -This command prints all notes\textnote{pending notes} of a particular note -column that have not yet been output by the end of the current page but which -were created on that or a previous page. Blank pages are generated as needed -to output these pending notes. During the output of the pending notes of this -note column, notes of other note columns may also be output, but only as -necessary to output the pending notes of the specified note column. - -During the output of the pending notes, notes created in the previous \LaTeX{} -run on the pages that are now replaced by the inserted blank pages may be -output by mistake. This will be corrected automatically in one of the -subsequent \LaTeX{} runs. Such shifts are usually indicated by the message: -``\LaTeX{} Warning: Label(s) may have changed. Rerun to get cross-references -right.'' - -The note column whose pending notes are to be output is indicated by the -optional argument \PName{note column name}. If this argument is omitted, the -notes of the default note column \PValue{marginpar} will be output. - -The attentive reader\textnote{forced output vs. synchronisation} will have -noticed that the forced output of a note column is not unlike synchronisation. -But if the forced output actually results in an output, it will be at the -start of a new page and not just below the previous output. Nonetheless, a -forced output usually results in fewer \LaTeX{} runs.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{clearnotecolumns}\OParameter{list of note column names} -\end{Declaration} -This command is similar to \DescRef{\LabelBase.cmd.clearnotecolumn}, but the -the optional argument here can be not only the name of one note column but a -comma-separated \PName{list of note column names}. The pending notes of all -these note columns are then ouput. - -If you omit the optional argument or leave it empty, all pending notes of all -note columns will be output.% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{autoclearnotecolumns}{simple switch} -\end{Declaration} -As a rule, pending notes will always be output if a document -implicitly\,---\,e.\,g. because of a \DescRef{maincls.cmd.chapter} -command\,---\,or explicitly executes \DescRef{maincls.cmd.clearpage}. This is -also the case at the end of the document within -\Macro{end}\PParameter{document}. The \Option{autoclearnotecolumns} option can -be used to control whether \DescRef{\LabelBase.cmd.clearnotecolumns} should be -executed automatically without arguments when running -\DescRef{maincls.cmd.clearpage}. - -Since this is generally the desired behaviour, the option is active by -default. But you can change this with the appropriate value for a simple -switch (see \autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}) -at any time. - -Note\textnote{Attention!} that disabling the automatic output of pending notes -can result in lost notes at the end of the document. So in this case you -should insert \DescRef{\LabelBase.cmd.clearnotecolumns} before -\Macro{end}\PParameter{document} fore safety's sake. - -The question from the end of the last section should now be answered. If the -paragraph is to be completely output, it had to be wrapped to the next page. -This is, of course, the default setting. However, since this would happen -after the end of the \DescRef{maincls.env.addmargin} environment, the forced -output could still overlap with subsequent text. So in the example it would -make sense to add another synchronisation point after the -\DescRef{maincls.env.addmargin} environment. - -The result of the example is shown in -\autoref{fig:scrlayer-notecolumn.example}.\iffree{}{ Only the colour has been -changed from blue to grey.} - -\begin{figure} - \KOMAoptions{captions=bottombeside}% - \setcapindent{0pt}% - \begin{captionbeside}[{A sample page for the example in - \autoref{cha:scrlayer-notecolumn}}]{A sample page for the example in - this chapter\label{fig:scrlayer-notecolumn.example}}[l] - \frame{\includegraphics[width=.5\textwidth,keepaspectratio]% - {scrlayer-notecolumn-example}} - \end{captionbeside} -\end{figure} -\EndIndexGroup -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% ispell-local-dictionary: "en_GB" -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrlayer-scrpage-experts.tex b/macros/latex/contrib/koma-script/source-doc/english/scrlayer-scrpage-experts.tex deleted file mode 100644 index 62988c9513..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrlayer-scrpage-experts.tex +++ /dev/null @@ -1,393 +0,0 @@ -% ====================================================================== -% scrlayer-scrpage-experts.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. -% ---------------------------------------------------------------------- -% scrlayer-scrpage-experts.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. -% ====================================================================== -% -% Expert chapter about scrlayer-scrpage of the KOMA-Script guide -% -% ---------------------------------------------------------------------- -% -% Expertenkapitel ueber scrlayer-scrpage in der KOMA-Script-Anleitung -% -% ============================================================================ - -\KOMAProvidesFile{scrlayer-scrpage-experts.tex}% - [$Date: 2019-12-06 10:44:53 +0100 (Fr, 06. Dez 2019) $ - KOMA-Script guide (chapter: scrlayer-scrpage-experts)] -\translator{Markus Kohm\and Karl Hagen} - -% Date version of the translated file: 2019-12-06 - -\chapter[{Additional Features of \Package{scrlayer-scrpage}}] - {Additional Features\ChangedAt{v3.12}{\Package{scrlayer-scrpage}} with - the \Package{scrlayer-scrpage} package} -\labelbase{scrlayer-scrpage-experts} -% -\BeginIndexGroup -\BeginIndex{Package}{scrlayer-scrpage}% -The \Package{scrlayer-scrpage} package offers many features beyond what has -been described in \autoref{cha:scrlayer-scrpage} of \autoref{part:forAuthors} -of this \iffree{guide}{book}. However, the average user will not normally need -these extensions, and some of them are only provided for compatibility with -\Package{scrpage2}. The documentation here in \autoref{part:forExperts} serves -to deepen and broaded your knowledge, and its mastery goes beyond basic -skills. - -\LoadCommonFile{pagestylemanipulation}% \section{Manipulating Defined Page Styles} - -\section{Defining New Pairs of Page Styles} -\seclabel{pagestyle.pairs} - -The two page styles \PageStyle{scrheadings} and \PageStyle{plain.scrheadings} -were described in \autoref{sec:scrlayer-scrpage.predefined.pagestyles}. You -can view them as a kind of pair, with \PageStyle{scrheadings} intended as the -main page style for a running head and \PageStyle{plain.scrheadings} the -corresponding \PageStyle{plain} page style without a running head but -generally with pagination. In addition to configuring this predefined pair, -\Package{scrlayer-scrpage} also lets you define additional pairs of page -styles. The name of the main page style, for example \PageStyle{scrheadings}, -also serves as the name of the page-style pair. - -\iffree{ - The vast majority of users will not need more than the one predefined - page-style pair, \PageStyle{scrheadings}. So the commands documented in this - section are therefore extensions for special cases. Since I have not come - across any suitable applications while writing this manual, there are no - detailed examples. Should I ever run across a particularly nice application - while providing support, I will happily include it in future versions. At - the same time, however, I'm virtually certain that all such cases could also - be solved using the predefined pair only.}{} - -\begin{Declaration} - \Macro{defpairofpagestyles}% - \OParameter{parent pair}\Parameter{name}\Parameter{definition}% - \Macro{newpairofpagestyles}% - \OParameter{parent pair}\Parameter{name}\Parameter{definition}% - \Macro{renewpairofpagestyles}% - \OParameter{parent pair}\Parameter{name}\Parameter{definition}% - \Macro{providepairofpagestyles}% - \OParameter{parent pair}\Parameter{name}\Parameter{definition} -\end{Declaration} -You can use these commands to define pairs of page styles similar to -\PageStyle{scrheadings} and \PageStyle{plain.scrheadings}, where \PName{name} -is the name of the main page style corresponding to \PageStyle{scrheadings}. -The name of the equivalent \PageStyle{plain} page style will be prefixed by -\PValue{plain.} automatically. So \PName{name} is not only the name of the -pair of page styles, but also the name of the main page style of that pair, -while \PValue{plain.}\PName{name} is the name of the \PageStyle{plain} page -style of this pair. - -If you provide the optional \PName{parent pair} argument, this is the name of -a page-style pair whose settings are used to initialise the new page-style -pair. So the new pair inherits the configuration of the \PName{parent pair}. - -Although \autoref{sec:scrlayer-scrpage.predefined.pagestyles} might have -created the impression that the commands described there apply only to -\PageStyle{scrheadings} and \PageStyle{plain.scrheadings} only, this is true -only so long as those two page styles are the only defined page-style pair. As -soon as there are multiple page-style pairs, -\DescRef{scrlayer-scrpage.cmd.lehead}, \DescRef{scrlayer-scrpage.cmd.cehead}, -\DescRef{scrlayer-scrpage.cmd.rehead}, \DescRef{scrlayer-scrpage.cmd.lohead}, -\DescRef{scrlayer-scrpage.cmd.cohead}, \DescRef{scrlayer-scrpage.cmd.rohead}, -\DescRef{scrlayer-scrpage.cmd.lefoot}, \DescRef{scrlayer-scrpage.cmd.cefoot}, -\DescRef{scrlayer-scrpage.cmd.refoot}, \DescRef{scrlayer-scrpage.cmd.lofoot}, -\DescRef{scrlayer-scrpage.cmd.cofoot}, \DescRef{scrlayer-scrpage.cmd.rofoot}, -\DescRef{scrlayer-scrpage.cmd.ihead}, \DescRef{scrlayer-scrpage.cmd.chead}, -\DescRef{scrlayer-scrpage.cmd.ohead}, \DescRef{scrlayer-scrpage.cmd.ifoot}, -\DescRef{scrlayer-scrpage.cmd.cfoot}, and \DescRef{scrlayer-scrpage.cmd.ofoot} -all refer to page-style pair that was most recently activated. - -In addition to those eighteen commands mentioned above, the three commands -described below, \DescRef{\LabelBase.cmd.clearmainofpairofpagestyles}, -\DescRef{\LabelBase.cmd.clearplainofpairofpagestyles}, and -\DescRef{\LabelBase.cmd.clearpairofpagestyles}, are designed to be used inside -the \PName{definition} argument. In this case, they represent a kind of -default configuration of the page-style pair that is executed each time the -pair is activated. You activate a page-style pair by activating either one two -page styles in the pair. Typically, you do so with -\DescRef{maincls.cmd.pagestyle}\IndexCmd{pagestyle}. - -Note that the commands of \autoref{sec:scrlayer-scrpage.pagestyle.content} on -\autopageref{sec:scrlayer-scrpage.pagestyle.content} are general in nature and -apply to all page styles defined with \Package{scrlayer-scrpage}. - -Although \Macro{defpairofpagestyles} defines a page-style pair regardless of -whether the corresponding page styles already exist, -\Macro{newpairofpagestyles} and \Macro{providepairofpagestyles} do so only if -the page styles are currently undefined. If at least one of the page styles is -already defined, the new definition of \Macro{providepairofpagestyles} will be -ignored, whereas using \Macro{newpairofpagestyles} results in an error -message. To redefine existing page-style pairs, you can use -\Macro{renewpairofpagestyles}. With this an is thrown if either one of the two -page styles of the pair does not already exist.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{clearmainofpairofpagestyles}% - \Macro{clearplainofpairofpagestyles}% - \Macro{clearpairofpagestyles} -\end{Declaration} -The \Macro{clearmainofpairofpagestyles} command sets the main page style of -the most recently activated page-style pair to be empty. In contrast, the -\Macro{clearplainofpairofpagestyles} command sets the \PageStyle{plain} page -style of the active page-style pair to be empty. Finally, -\Macro{clearpairofpagestyle} sets both page styles of the activate pair to be -empty. - -But note\textnote{Attention!} that none of these commands removes the -definitions of the \PName{definition} argument that was specified when -defining the page-style pair (see above). So if you activate the pair of page -styles again, those definitions will be used again! - -You can use these commands inside the \PName{definition} of the page-style -pair explained above. But you can also use them outside this definition. In -this case, they refer to the most recently activated page-style pair.% -\EndIndexGroup - - -\section{Defining Complex Page Styles} -\seclabel{pagestyle.experts} - -In addition to the predefined page styles, \Package{scrlayer-scrpage} also -provides a more basic interface for defining new page styles. The page-style -definitions discussed so far use this interface internally, as do the obsolete -commands in \autoref{sec:\LabelBase.pagestyle.triple}. -\Package{scrlayer-scrpage}. Because of its complexity, however, only advanced -users should try to use it directly. Less experienced users can already -achieve almost everything possible with this low-level interface by using the -possibilities described previously. - -\begin{Declaration} - \Macro{defpagestyle}% - \Parameter{name}\Parameter{header specification}\Parameter{footer specification}% - \Macro{newpagestyle}% - \Parameter{name}\Parameter{header specification}\Parameter{footer specification}% - \Macro{providepagestyle}% - \Parameter{name}\Parameter{header specification}\Parameter{footer specification}% - \Macro{renewpagestyle}% - \Parameter{name}\Parameter{header specification}\Parameter{footer specification}% -\end{Declaration} -You can use these commands to define a single page style with maximum -flexibility, where \PName{name} is the name of the page style that you want to -define. - -The parameters \PName{header specification} and \PName{footer specification} -have identical structure: -\begin{quote}\raggedright - \texttt{% - (\PName{length of the line above},\PName{thickness of the line above})\%\\ - \Parameter{specification for the left page in two-side layout}\%\\ - \Parameter{specification for the right page in two-side layout}\%\\ - \Parameter{specification for all pages in one-side laypout}\%\\ - (\PName{length of the line below},\PName{thickness of the line below})% - } -\end{quote} -The arguments in the round brackets are optional. That is, you can omit them -together with the brackets. In that case, the length and thickness of the -corresponding horizontal rules are based on the \KOMAScript{} options -\DescRef{scrlayer-scrpage.option.headtopline}, -\DescRef{scrlayer-scrpage.option.headsepline}, -\DescRef{scrlayer-scrpage.option.footsepline}, and -\DescRef{scrlayer-scrpage.option.footbotline} (see -\autoref{sec:scrlayer-scrpage.pagestyle.content}, -\DescPageRef{scrlayer-scrpage.option.headtopline}). - -All three arguments in curly brackets are mandatory and are used depending on -the page and the layout settings. Their content can be anything you want. For -page styles with running heads, however, you should use -\DescRef{scrlayer-scrpage.cmd.headmark}, -\DescRef{scrlayer-scrpage.cmd.leftmark}, or -\DescRef{scrlayer-scrpage.cmd.rightmark} inside the specification. Under no -circumstances should you directly put the number or text of a sectioning -command here. Because of the \LaTeX{}'s asynchronous page construction, the -wrong numbers or text can appear in the header or footer if you do so. - -The \Macro{defpagestyle} command defines the page style regardless of whether -it already exists or not. In contrast, \Macro{newpagestyle} throws an error if -a page style of the same \PName{name} already exists. On the other hand, -\Macro{providepagestyle} simply ignores the definition if the \PName{name} has -already been used for a page style. Conversely, \Macro{renewpagestyle} can -only redefine an existing page style. For a new \PName{name}, it throws an -error. - -All four commands are based on the -\DescRef{scrlayer.cmd.DeclarePageStyleByLayers}% -\IndexCmd{DeclarePageStyleByLayers} command of the -\hyperref[cha:scrlayer]{\Package{scrlayer}}\IndexPackage{scrlayer} package. -You can find the layers that are defined for a page style \PName{name} in -\autoref{tab:scrlayer-scrpage-experts.layersperstyle}, and more information -about layers and layer-page in \autoref{cha:scrlayer}, starting on -\autopageref{cha:scrlayer}.% - -\begin{table} -% \KOMAoptions{captions=topbeside} -% \setcapindent{0pt} -% \begin{captionbeside} - \caption - [{The layers \Package{scrlayer-scrpage} defines for a page style}] - {The layers \Package{scrlayer-scrpage} defines for a \PName{name} page - style\label{tab:scrlayer-scrpage-experts.layersperstyle}} -% [l] - \begin{tabular}{ll} - \toprule - Name of the layer & Meaning of the layer \\ - \midrule - \PName{name}\PValue{.head.above.line} - & horizontal line above the header\\ - \PName{name}\PValue{.head.odd} - & header of odd pages in two-sided printing\\ - \PName{name}\PValue{.head.even} - & header of even pages in two-sided printing\\ - \PName{name}\PValue{.head.oneside} - & header in one-sided printing\\ - \PName{name}\PValue{.head.below.line} - & horizontal line below the header\\ - \PName{name}\PValue{.foot.above.line} - & horizontal line above the footer\\ - \PName{name}\PValue{.foot.odd} - & footer of odd pages in two-sided printing\\ - \PName{name}\PValue{.foot.even} - & footer of even pages in two-sided printing\\ - \PName{name}\PValue{.foot.oneside} - & footer in one-sided printing\\ - \PName{name}\PValue{.foot.below.line} - & horizontal line below the footer\\ - \bottomrule - \end{tabular} -% \end{captionbeside} -\end{table} - -\begin{Example} - Suppose you want to set a background colour for the header of the - \PageStyle{scrheadings} page style. From the introduction to this chapter - and \autoref{tab:scrlayer-scrpage-experts.layersperstyle}, you know that - \PageStyle{scrheadings} is a layer page style that includes the layers - \PValue{scrheadings.head.even}, \PValue{scrheadings.head.odd}, and - \PValue{scrheadings.head.oneside}. You now define three more layers for - their backgrounds and add them at the beginning of the page style: -\begin{lstcode} - \documentclass{scrartcl} - \usepackage[automark]{scrlayer-scrpage} - \usepackage{xcolor} - \usepackage{blindtext} - \DeclareLayer[clone=scrheadings.head.oneside, - contents={% - \color{yellow}\rule[-\dp\strutbox]{\layerwidth}{\layerheight}% - }% - ]{scrheadings.head.oneside.background} - \DeclareLayer[clone=scrheadings.head.odd, - contents={% - \color{yellow}\rule[-\dp\strutbox]{\layerwidth}{\layerheight}% - }% - ]{scrheadings.head.odd.background} - \DeclareLayer[clone=scrheadings.head.even, - contents={% - \color{yellow}\rule[-\dp\strutbox]{\layerwidth}{\layerheight}% - }% - ]{scrheadings.head.even.background} - \AddLayersAtBeginOfPageStyle{scrheadings}{% - scrheadings.head.oneside.background,% - scrheadings.head.odd.background,% - scrheadings.head.even.background% - } - \pagestyle{scrheadings} - \begin{document} - \blinddocument - \end{document} -\end{lstcode} - As you can see, the example uses three layers so that the position and size - of the background layers could simply be copied from the corresponding - header layer using the \Option{clone} option. This is easier than using only - one background layer and dynamically calculating its position each time. - - The coloured background itself was created using a \Macro{rule} command. The - size arguments of this \Macro{rule} are given by - \DescRef{scrlayer.cmd.layerwidth} and \DescRef{scrlayer.cmd.layerheight} - which contain the current width and height of the layer itself. The optional - argument of \Macro{rule} is used to move the rule down by the height of a - descender. -\end{Example} -% -Instead of using new layers to colour the background in the example above, -\Macro{colorbox} and \DescRef{scrlayer-scrpage.cmd.chead} could have been -used. You can work out a solution using this method as an exercise. Likewise, -you could have added the background layers individually just before the -corresponding content layer. You can implement this as an exercise too.% -\EndIndexGroup - -\section{Defining Simple Page Styles with a Tripartite Header and Footer} -\seclabel{pagestyle.triple} - -\LoadNonFree{scrlayer-scrpage-experts}{1} - -\section{Legacy Features of \Package{scrpage2}} -\seclabel{obsolete} - -\begin{Explain} - The \Package{scrlayer-scrpage} package contains some legacy features that - derive from \Package{scrpage2} and exist only to be as compatible as possible - with that package. Users only need to understand these features if they want - to edit an old document based on \Package{scrpage2}. You\textnote{Attention!} - should not use the items documented here in new documents! -\end{Explain} - -\begin{Declaration} - \OptionVName{hmode}{simple switch} -\end{Declaration} -The \Package{scrpage2} package always outputs headers and footers in -horizontal mode. In contrast, \Package{scrlayer-scrpage} in the default -setting only switches into horizontal mode when horizontal material is output. -However, if you activate the \Option{hmode} option, \Package{scrlayer-scrpage} -will behave like \Package{scrpage2} and switch to horizontal mode before any -output. This can affect both the processing of white space at the beginning of -the output and vertical alignment. - -The options recognizes the standard values for simple switches listed in -\autoref{tab:truefalseswitch} on \autopageref{tab:truefalseswitch}. The option -is deactivated by default.% -\EndIndexGroup - -\LoadNonFree{scrlayer-scrpage-experts}{0} -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% coding: us-ascii -%%% ispell-local-dictionary: "en_GB" -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrlayer-scrpage.tex b/macros/latex/contrib/koma-script/source-doc/english/scrlayer-scrpage.tex deleted file mode 100644 index 586b3312ca..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrlayer-scrpage.tex +++ /dev/null @@ -1,1184 +0,0 @@ -% ====================================================================== -% scrlayer-scrpage.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. -% ---------------------------------------------------------------------- -% scrlayer-scrpage.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. -% ====================================================================== -% -% Chapter about scrlayer-scrpage of the KOMA-Script guide -% -% ---------------------------------------------------------------------- -% -% Kapitel ueber scrlayer-scrpage in der KOMA-Script-Anleitung -% -% ============================================================================ - -\KOMAProvidesFile{scrlayer-scrpage.tex}% - [$Date: 2019-12-06 11:44:37 +0100 (Fr, 06. Dez 2019) $ - KOMA-Script guide (chapter: scrlayer-scrpage)] -\translator{Markus Kohm\and Jana Schubert\and Jens H\"uhne\and Karl Hagen} - -% Date version of the translated file: 2019-11-29 - -\chapter[{Headers and Footers with \Package{scrlayer-scrpage}}] - {Headers\ChangedAt{v3.12}{\Package{scrlayer-scrpage}} and - Footers with \Package{scrlayer-scrpage}} -\labelbase{scrlayer-scrpage} -% -\BeginIndexGroup -\BeginIndex{Package}{scrlayer-scrpage}% -\begin{Explain} - Until version 3.11b of \KOMAScript, the \Package{scrpage2}% - \IndexPackage[indexmain]{scrpage2}\important{\Package{scrpage2}} package was - the recommended way to customise headers and footers beyond the options - provided by the \PageStyle{headings}, \PageStyle{myheadings}, - \PageStyle{plain}, and \PageStyle{empty} page styles of the \KOMAScript{} - classes. - \iffalse% - The still older \Package{scrpage}\IndexPackage{scrpage} package was marked - obsolete in 2001 and removed from the regular \KOMAScript{} distribution in - 2013.\par - \fi% - Since 2013, the \hyperref[cha:scrlayer]{\Package{scrlayer}}% - \important{\hyperref[cha:scrlayer]{\Package{scrlayer}}}% - \IndexPackage{scrlayer} package has been included as a basic module of - \KOMAScript. This package provides a layer model and a new page-style model - based upon it. However, the package's interface is almost too flexible and - consequently not easy for the average user to comprehend. For more - information about this interface, see \autoref{cha:scrlayer} in - \autoref{part:forExperts}. However, a few of the options that are actually - part of \Package{scrlayer}, and which are therefore taken up again in that - chapter, are also documented here because they are required to use - \Package{scrlayer-scrpage}. - - Many users are already familiar with the commands from \Package{scrpage2}. - For this reason, \Package{scrlayer-scrpage} provides a method for - manipulating headers and footers which is based on \Package{scrlayer}, is - largely compatible with \Package{scrpage2}, and at the same time greatly - expands the user interface. If you are already familiar with - \Package{scrpage2} and refrain from direct calls to its internal commands, - you can usually use \Package{scrlayer-scrpage} as a drop-in replacement. - This also applies to most examples using \Package{scrpage2} found in - \LaTeX{} books or on the Internet.% - \iffalse% - \iffree{}{\par With the release of this book, \Package{scrlayer-scrpage} - for \KOMAScript{} is recommended as the tool of choice when it comes to - changing the predefined page styles. Using the obsolete package - \Package{scrpage2}\IndexPackage[indexmain]{scrpage2}% - \important{\Package{scrpage2}} is now deprecated. Therefore, the - commands for this outdated package are no longer part of this book. If - you encounter older documents that still use \Package{scrpage2}, - consider switching to \Package{scrlayer-scrpage}. Notwithstanding, this - chapter does contain some hints for using \Package{scrpage2}.}% - \fi -\end{Explain} - -In addition to \Package{scrlayer-scrpage}\iffree{ or \Package{scrpage2}}{}, -you could also use \Package{fancyhdr}\IndexPackage{fancyhdr} (see -\cite{package:fancyhdr}) to configure the headers and footers of pages. -However, this package has no support for several \KOMAScript{} features, -for example the element scheme (see \DescRef{\LabelBase.cmd.setkomafont}, -\DescRef{\LabelBase.cmd.addtokomafont}, and -\DescRef{\LabelBase.cmd.usekomafont} in \autoref{sec:maincls.textmarkup}, -\DescPageRef{maincls.cmd.setkomafont}) or the configurable numbering format -for dynamic headers (see the \DescRef{maincls.option.numbers} option and, -for example, \DescRef{\LabelBase.cmd.chaptermarkformat} in -\autoref{sec:maincls.structure}, \DescPageRef{maincls.option.numbers} and -\DescPageRef{maincls.cmd.chaptermarkformat}). Hence, if you are using a -\KOMAScript{} class, you should use the new \Package{scrlayer-scrpage} -package. \iffree{If you have problems, you can still use -\Package{scrpage2}.}{\ignorespaces} Of course, you can also use -\Package{scrlayer-scrpage} with other classes, such as the standard \LaTeX{} -ones. - -Apart from the features described in this chapter, \Package{scrlayer-scrpage} -provides several more functions that are likely only of interest to a very -small number of users and therefore are described in -\autoref{cha:scrlayer-scrpage-experts} of \autoref{part:forExperts}, starting -at \autopageref{cha:scrlayer-scrpage-experts}. Nevertheless, if the options -described in \autoref{part:forAuthors} are insufficient for your purposes, you -should examine \autoref{cha:scrlayer-scrpage-experts}. - -\LoadCommonFile{options} % \section{Early or late Selection of Options} - -\LoadCommonFile{headfootheight} % \section{Header and Footer Height} - -\LoadCommonFile{textmarkup} % \section{Text Markup} - -\section{Using Predefined Page Styles} -\seclabel{predefined.pagestyles} - -The easiest way to create custom headers and footers with -\Package{scrlayer-scrpage} is to use one of the predefined page styles. -% -\iffalse % Umbruchoptimierung - This section introduces the page styles defined by the - \Package{scrlayer-scrpage} package as it loads. It also explains the - commands that you can use to create basic settings for these page - styles. You can find further options, commands, and background information - in the following sections and in - \autoref{sec:scrlayer-scrpage-experts.pagestyle.pairs} in - \autoref{part:forExperts}.% -\fi - -\begin{Declaration} - \PageStyle{scrheadings}% - \PageStyle{plain.scrheadings} -\end{Declaration} -The \Package{scrlayer-scrpage} package provides two page styles that you can -reconfigure to your liking. The first page style is -\PageStyle{scrheadings}\important{\PageStyle{scrheadings}}, which is intended -as a page style with running heads. Its defaults are similar to the page style -\PageStyle{headings}\IndexPagestyle{headings} of the standard \LaTeX{} or -\KOMAScript{} classes. You can configure exactly what appears in the header or -footer with the commands and options described below. - -The second page style is \PageStyle{plain.scrheadings}% -\important{\PageStyle{plain.scrheadings}}, which is intended to be a style -with no running head. Its defaults resemble those of the -\PageStyle{plain}\IndexPagestyle{plain} page style of the standard or -\KOMAScript{} classes. You can configure exactly what appears in the header or -footer with the commands and options described below. - -You could, of course, configure \PageStyle{scrheadings} to be a page style -without a running head and \PageStyle{plain.scrheadings} to be a page style -with a running head. It is, however, advisable to adhere to the conventions -mentioned above. The two page styles mutually influence one another. Once you -apply one of these page styles, \PageStyle{scrheadings} will become accessible -as \PageStyle{headings}\important{\PageStyle{headings}}% -\IndexPagestyle{headings} and the page style \PageStyle{plain.scrheadings} -will become accessible as \PageStyle{plain}\important{\PageStyle{plain}}% -\IndexPagestyle{plain}. Thus, if you use a class or package that automatically -switches between \PageStyle{headings} and \PageStyle{plain}, you only need to -select \PageStyle{scrheadings} or \PageStyle{plain.scrheadings} once. Direct -patches to the corresponding classes or packages are not necessary. This pair -of page styles can thus serve as a drop-in replacement for -\PageStyle{headings} and \PageStyle{plain}. If you need more such pairs, -please refer to \autoref{sec:scrlayer-scrpage-experts.pagestyle.pairs} in -\autoref{part:forExperts}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{lehead}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{cehead}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{rehead}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{lohead}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{cohead}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{rohead}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content} -\end{Declaration} -You can set the contents of the header for the -\DescRef{\LabelBase.pagestyle.plain.scrheadings} and -\DescRef{\LabelBase.pagestyle.scrheadings} page styles with these commands. -The optional argument sets the content of an element of the -\DescRef{\LabelBase.pagestyle.plain.scrheadings} page style, while the -mandatory argument sets the content of the corresponding element of the -\DescRef{\LabelBase.pagestyle.scrheadings} page style. - -The contents of even\,---\,or left-hand\,---\,pages\textnote{left-hand pages} -can be set with \Macro{lehead}, \Macro{cehead}, and \Macro{rehead}. The -``\texttt{e}'' appearing as the second letter of the commands' names stands -for ``\emph{even}''. - -The contents of odd\,---\,or right-hand\,---\,pages\textnote{right-hand pages} -can be set with \Macro{lohead}, \Macro{cohead}, and \Macro{rohead}. The -``\texttt{o}'' appearing as the second letter of the commands' names stands -for ``\emph{odd}''. - -Note\textnote{Attention!} that in one-sided printing, only right-hand pages -exist, and \LaTeX{} designates these as odd pages regardless of their page -number. - -Each header consists of a left-aligned\textnote{left aligned} element that can -be set with \Macro{lehead} or \Macro{lohead}. The ``\texttt{l}'' appearing as -the first letter of the commands' names stands for ``\emph{left aligned}''. - -Similarly, each header has a centred\textnote{centred} element that can be set -with \Macro{cehead} or \Macro{cohead}. The ``\texttt{c}'' appearing as the -first letter of the command' names stands for ``\emph{centred}''. - -Likewise, each header has a right-aligned\textnote{right aligned} element that -can be set with \Macro{rehead} or \Macro{rohead}. The ``\texttt{r}'' appearing -as the first letter of the commands' names stands for ``\emph{right -aligned}''. - -\BeginIndexGroup -\BeginIndex{FontElement}{pagehead}\LabelFontElement{pagehead}% -\BeginIndex{FontElement}{pageheadfoot}\LabelFontElement{pageheadfoot}% -These elements do not have individual font attributes that you can -change using the commands \DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont} (see \autoref{sec:maincls.textmarkup}, -\DescPageRef{maincls.cmd.setkomafont}). Instead, they use an element named -\FontElement{pagehead}. Before this element is applied, the -\FontElement{pageheadfoot} element will also be applied. See -\autoref{tab:scrlayer-scrpage.fontelements} for the defaults of these -elements.% -\EndIndexGroup - -The meaning of each command for headers in two-sided printing is illustrated -in \autoref{fig:scrlayer-scrpage.head}.% -% -\begin{figure}[tp] - \centering - \begin{picture}(\textwidth,30mm)(0,-10mm) - \thinlines - \small\ttfamily - % left/even page - \put(0,20mm){\line(1,0){.49\textwidth}}% - \put(0,0){\line(0,1){20mm}}% - \multiput(0,0)(0,-1mm){10}{\line(0,-1){.5mm}}% - \put(.49\textwidth,5mm){\line(0,1){15mm}}% - \put(.05\textwidth,10mm){% - \color{ImageRed}% - \put(-.5em,0){\line(1,0){4em}}% - \multiput(3.5em,0)(.25em,0){5}{\line(1,0){.125em}}% - \put(-.5em,0){\line(0,1){\baselineskip}}% - \put(-.5em,\baselineskip){\line(1,0){4em}}% - \multiput(3.5em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% - \makebox(4em,5mm)[l]{\Macro{lehead}}% - }% - \put(.465\textwidth,10mm){% - \color{ImageBlue}% - \put(-4em,0){\line(1,0){4em}}% - \multiput(-4em,0)(-.25em,0){5}{\line(1,0){.125em}}% - \put(0,0){\line(0,1){\baselineskip}}% - \put(-4em,\baselineskip){\line(1,0){4em}}% - \multiput(-4em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% - \put(-4.5em,0){\makebox(4em,5mm)[r]{\Macro{rehead}}}% - }% - \put(.2525\textwidth,10mm){% - \color{ImageGreen}% - \put(-2em,0){\line(1,0){4em}}% - \multiput(2em,0)(.25em,0){5}{\line(1,0){.125em}}% - \multiput(-2em,0)(-.25em,0){5}{\line(1,0){.125em}}% - \put(-2em,\baselineskip){\line(1,0){4em}}% - \multiput(2em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% - \multiput(-2em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% - \put(-2em,0){\makebox(4em,5mm)[c]{\Macro{cehead}}}% - }% - % right/odd page - \put(.51\textwidth,20mm){\line(1,0){.49\textwidth}}% - \put(.51\textwidth,5mm){\line(0,1){15mm}}% - \put(\textwidth,0){\line(0,1){20mm}}% - \multiput(\textwidth,0)(0,-1mm){10}{\line(0,-1){.5mm}}% - \put(.5325\textwidth,10mm){% - \color{ImageBlue}% - \put(0,0){\line(1,0){4em}}% - \multiput(4em,0)(.25em,0){5}{\line(1,0){.125em}}% - \put(0,0){\line(0,1){\baselineskip}}% - \put(0em,\baselineskip){\line(1,0){4em}}% - \multiput(4em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% - \put(.5em,0){\makebox(4em,5mm)[l]{\Macro{lohead}}}% - }% - \put(.965\textwidth,10mm){% - \color{ImageRed}% - \put(-4em,0){\line(1,0){4em}}% - \multiput(-4em,0)(-.25em,0){5}{\line(1,0){.125em}}% - \put(0,0){\line(0,1){\baselineskip}}% - \put(-4em,\baselineskip){\line(1,0){4em}}% - \multiput(-4em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% - \put(-4.5em,0){\makebox(4em,5mm)[r]{\Macro{rohead}}}% - }% - \put(.75\textwidth,10mm){% - \color{ImageGreen}% - \put(-2em,0){\line(1,0){4em}}% - \multiput(2em,0)(.25em,0){5}{\line(1,0){.125em}}% - \multiput(-2em,0)(-.25em,0){5}{\line(1,0){.125em}}% - \put(-2em,\baselineskip){\line(1,0){4em}}% - \multiput(2em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% - \multiput(-2em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% - \put(-2em,0){\makebox(4em,5mm)[c]{\Macro{cohead}}}% - }% - % commands for both pages - \color{ImageBlue}% - \put(.5\textwidth,0){\makebox(0,\baselineskip)[c]{\Macro{ihead}}}% - \color{ImageGreen}% - \put(.5\textwidth,-5mm){\makebox(0,\baselineskip)[c]{\Macro{chead}}} - \color{ImageRed}% - \put(.5\textwidth,-10mm){\makebox(0,\baselineskip)[c]{\Macro{ohead}}} - \put(\dimexpr.5\textwidth-2em,.5\baselineskip){% - \color{ImageBlue}% - \put(0,0){\line(-1,0){1.5em}}% - \put(-1.5em,0){\vector(0,1){5mm}}% - \color{ImageGreen}% - \put(0,-1.25\baselineskip){\line(-1,0){\dimexpr .25\textwidth-2em\relax}}% - \put(-\dimexpr - .25\textwidth-2em\relax,-1.25\baselineskip){\vector(0,1){\dimexpr - 5mm+1.25\baselineskip\relax}} - \color{ImageRed}% - \put(0,-2.5\baselineskip){\line(-1,0){\dimexpr .45\textwidth-4em\relax}}% - \put(-\dimexpr - .45\textwidth-4em\relax,-2.5\baselineskip){\vector(0,1){\dimexpr - 5mm+2.5\baselineskip\relax}} - }% - \put(\dimexpr.5\textwidth+2em,.5\baselineskip){% - \color{ImageBlue}% - \put(0,0){\line(1,0){1.5em}}% - \put(1.5em,0){\vector(0,1){5mm}}% - \color{ImageGreen}% - \put(0,-1.25\baselineskip){\line(1,0){\dimexpr .25\textwidth-2em\relax}} - \put(\dimexpr - .25\textwidth-2em\relax,-1.25\baselineskip){\vector(0,1){\dimexpr - 5mm+1.25\baselineskip\relax}} - \color{ImageRed}% - \put(0,-2.5\baselineskip){\line(1,0){\dimexpr .45\textwidth-4em\relax}} - \put(\dimexpr - .45\textwidth-4em\relax,-2.5\baselineskip){\vector(0,1){\dimexpr - 5mm+2.5\baselineskip\relax}} - }% - \end{picture} - \caption[Commands for setting the page header]% - {The meaning of the commands for setting the contents of page headers - shown on a two-page schematic} - \label{fig:scrlayer-scrpage.head} -\end{figure} -% -\begin{Example} - Suppose you're writing a short article and you want the author's name to - appear on the left side of the page and the article's title to appear - right. You can write, for example: -\begin{lstcode} - \documentclass{scrartcl} - \usepackage{scrlayer-scrpage} - \lohead{John Doe} - \rohead{Page style with \KOMAScript} - \begin{document} - \title{Page styles with \KOMAScript} - \author{John Doe} - \maketitle - \end{document} -\end{lstcode} - But what happens? On the first page there's only a page number in the - footer, while the header remains empty! - - The explanation is simple: The \Class{scrartcl} class, like the default - \Class{article} class, switches to the \PageStyle{plain} page style for the - page which contains the title. After the command - \DescRef{maincls.cmd.pagestyle}\PParameter{scrheadings} in the preamble of - our example, this actually refers to the - \DescRef{\LabelBase.pagestyle.plain.scrheadings} page style. The default for - this page style when using a \KOMAScript{} class is an empty page header and - a page number in the footer. In the example, the optional arguments of - \Macro{lohead} and \Macro{rohead} are omitted, so the - \DescRef{\LabelBase.pagestyle.plain.scrheadings} page style remains - unchanged and the result for the first page is actually correct. - - Now add enough text to the example after \DescRef{maincls.cmd.maketitle} - so that a second page is printed. You can simply add - \Macro{usepackage}\PParameter{lipsum}\IndexPackage{lipsum} to the document - preamble and \Macro{lipsum}\IndexCmd{lipsum} below - \DescRef{maincls.cmd.maketitle}. You will see that the header of the second - page now contains the author and the document title as we wanted. - - For comparison, you should also add the optional argument to - \Macro{lohead} and \Macro{rohead}. Change the example as follows: -\begin{lstcode} - \documentclass{scrartcl} - \usepackage{scrlayer-scrpage} - \lohead[John Doe] - {John Doe} - \rohead[Page style with \KOMAScript] - {Page style with \KOMAScript} - \begin{document} - \title{Page styles with \KOMAScript} - \author{John Doe} - \maketitle - \end{document} -\end{lstcode} - Now you have a header on the first page just above the title itself. - That is because you have reconfigured page style - \DescRef{\LabelBase.pagestyle.plain.scrheadings} with the two optional - arguments. As you probably appreciate, it would be better to leave this page - style unchanged, as a running head above the document title is rather - annoying. - - By the way, as an alternative to configuring - \DescRef{\LabelBase.pagestyle.plain.scrheadings} you could, if you were - using a \KOMAScript{} class, have changed the page style for pages that - contain title headers. See \DescRef{maincls.cmd.titlepagestyle}% - \important{\DescRef{maincls.cmd.titlepagestyle}}% - \IndexCmd{titlepagestyle} in \autoref{sec:maincls.pagestyle}, - \DescPageRef{maincls.cmd.titlepagestyle}. -\end{Example} - -Note\textnote{Attention!} that you should never put a section -heading or section number directly into the header using one of these -commands. Because of the asynchronous way that \TeX{} lays out and outputs -pages, doing so can easily result in the wrong number or heading text in the -running head. Instead you should use the mark mechanism, ideally in -conjunction with the procedures explained in the next section.% -\EndIndexGroup - -\begin{Declaration} - \Macro{lehead*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{cehead*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{rehead*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{lohead*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{cohead*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{rohead*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content} -\end{Declaration} -The starred versions\ChangedAt{v3.14}{\Package{scrlayer-scrpage}} of the -previously described commands differ from the ordinary versions only if you -omit the optional argument \PName{plain.scrheadings content}. In this case, -the version without the star does not change the contents of -\DescRef{\LabelBase.pagestyle.plain.scrheadings}. The starred version, on the -other hand, uses the mandatory argument \PName{scrheading content} -for \DescRef{\LabelBase.pagestyle.plain.scrheadings} as well. So if both -arguments should be the same, you can simply use the starred version with only -the mandatory argument.% - -\begin{Example} - You can shorten the previous example using the starred versions of - \DescRef{\LabelBase.cmd.lohead} and \DescRef{\LabelBase.cmd.rohead}: -\begin{lstcode} - \documentclass{scrartcl} - \usepackage{scrlayer-scrpage} - \lohead*{John Doe} - \rohead*{Page style with \KOMAScript} - \begin{document} - \title{Page styles with \KOMAScript} - \author{John Doe} - \maketitle - \end{document} -\end{lstcode}% -\end{Example}% -\EndIndexGroup -\ExampleEndFix - - -\begin{Declaration} - \Macro{lefoot}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{cefoot}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{refoot}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{lofoot}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{cofoot}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{rofoot}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content} -\end{Declaration} -You can define the contents of the footer for -\DescRef{\LabelBase.pagestyle.scrheadings} and -\DescRef{\LabelBase.pagestyle.plain.scrheadings} with these commands. The -optional argument defines the content of an element of -\DescRef{\LabelBase.pagestyle.plain.scrheadings}, while the mandatory argument -sets the content of the corresponding element of -\DescRef{\LabelBase.pagestyle.scrheadings}. - -The contents of even\,---\,or left-hand\,---\,pages\textnote{left-hand page} -are set with \Macro{lefoot}, \Macro{cefoot}, and \Macro{refoot}. The -``\texttt{e}'' appearing as the second letter of the commands' names stands -for ``\emph{even}''. - -The contents of odd\,---\,or right-hand\,---\,pages\textnote{right-hand page} -are set with \Macro{lofoot}, \Macro{cofoot}, and \Macro{rofoot}. The -``\texttt{o}'' appearing as the second letter of the commands' names stands -for ``\emph{odd}''. - -Note\textnote{Attention!} that in one-sided printing, only right-hand pages -exist, and \LaTeX{} designates these as odd pages regardless of their page -number. - -Each footer consists of a left-aligned\textnote{left aligned} element that can -be set with \Macro{lefoot} or \Macro{lofoot}. The ``\texttt{l}'' appearing as -the first letter of the commands' names stands for ``\emph{left aligned}''. - -Similarly, each footer has a centred\textnote{centred} element that can be set -with \Macro{cefoot} or \Macro{cofoot}. The ``\texttt{c}'' in the first letter -of the command' names stands for ``\emph{centred}''. - -Likewise, each footer has a right-aligned\textnote{right aligned} element that -can be set with \Macro{refoot} or \Macro{rofoot}. The ``\texttt{r}'' in the -first letter of the commands' names stands for ``\emph{right aligned}''. - -\BeginIndexGroup -\BeginIndex{FontElement}{pagefoot}\LabelFontElement{pagefoot}% -\BeginIndex{FontElement}{pageheadfoot}\LabelFontElement[foot]{pageheadfoot}% -However, these elements do not have individual font attributes that can be -changed with the \DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont} commands (see -\autoref{sec:maincls.textmarkup}, \DescPageRef{maincls.cmd.setkomafont}). -Instead, they use an element named -\FontElement{pagefoot}\important{\FontElement{pagefoot}}. Before this element -is applied, the font element -\FontElement{pageheadfoot}\important{\FontElement{pageheadfoot}} is also -applied. See \autoref{tab:scrlayer-scrpage.fontelements} for the defaults of -the fonts of these elements.% -\EndIndexGroup - -The meaning of each command for footers in two-sided printing is illustrated -in \autoref{fig:scrlayer-scrpage.foot}.% -% -\begin{figure}[bp] - \centering - \begin{picture}(\textwidth,30mm) - \thinlines - \small\ttfamily - % left page - \put(0,0){\line(1,0){.49\textwidth}}% - \put(0,0){\line(0,1){20mm}}% - \multiput(0,20mm)(0,1mm){10}{\line(0,1){.5mm}}% - \put(.49\textwidth,0){\line(0,1){15mm}}% - \put(.05\textwidth,5mm){% - \color{ImageRed}% - \put(-.5em,0){\line(1,0){4em}}% - \multiput(3.5em,0)(.25em,0){5}{\line(1,0){.125em}}% - \put(-.5em,0){\line(0,1){\baselineskip}}% - \put(-.5em,\baselineskip){\line(1,0){4em}}% - \multiput(3.5em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% - \makebox(4em,5mm)[l]{\Macro{lefoot}}% - }% - \put(.465\textwidth,5mm){% - \color{ImageBlue}% - \put(-4em,0){\line(1,0){4em}}% - \multiput(-4em,0)(-.25em,0){5}{\line(1,0){.125em}}% - \put(0,0){\line(0,1){\baselineskip}}% - \put(-4em,\baselineskip){\line(1,0){4em}}% - \multiput(-4em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% - \put(-4.5em,0){\makebox(4em,5mm)[r]{\Macro{refoot}}}% - }% - \put(.2525\textwidth,5mm){% - \color{ImageGreen}% - \put(-2em,0){\line(1,0){4em}}% - \multiput(2em,0)(.25em,0){5}{\line(1,0){.125em}}% - \multiput(-2em,0)(-.25em,0){5}{\line(1,0){.125em}}% - \put(-2em,\baselineskip){\line(1,0){4em}}% - \multiput(2em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% - \multiput(-2em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% - \put(-2em,0){\makebox(4em,5mm)[c]{\Macro{cefoot}}}% - }% - % right page - \put(.51\textwidth,0){\line(1,0){.49\textwidth}}% - \put(.51\textwidth,0){\line(0,1){15mm}}% - \put(\textwidth,0){\line(0,1){20mm}}% - \multiput(\textwidth,20mm)(0,1mm){10}{\line(0,1){.5mm}}% - \put(.5325\textwidth,5mm){% - \color{ImageBlue}% - \put(0,0){\line(1,0){4em}}% - \multiput(4em,0)(.25em,0){5}{\line(1,0){.125em}}% - \put(0,0){\line(0,1){\baselineskip}}% - \put(0em,\baselineskip){\line(1,0){4em}}% - \multiput(4em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% - \put(.5em,0){\makebox(4em,5mm)[l]{\Macro{lofoot}}}% - }% - \put(.965\textwidth,5mm){% - \color{ImageRed}% - \put(-4em,0){\line(1,0){4em}}% - \multiput(-4em,0)(-.25em,0){5}{\line(1,0){.125em}}% - \put(0,0){\line(0,1){\baselineskip}}% - \put(-4em,\baselineskip){\line(1,0){4em}}% - \multiput(-4em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% - \put(-4.5em,0){\makebox(4em,5mm)[r]{\Macro{rofoot}}}% - }% - \put(.75\textwidth,5mm){% - \color{ImageGreen}% - \put(-2em,0){\line(1,0){4em}}% - \multiput(2em,0)(.25em,0){5}{\line(1,0){.125em}}% - \multiput(-2em,0)(-.25em,0){5}{\line(1,0){.125em}}% - \put(-2em,\baselineskip){\line(1,0){4em}}% - \multiput(2em,\baselineskip)(.25em,0){5}{\line(1,0){.125em}}% - \multiput(-2em,\baselineskip)(-.25em,0){5}{\line(1,0){.125em}}% - \put(-2em,0){\makebox(4em,5mm)[c]{\Macro{cofoot}}}% - }% - % both pages - \color{ImageBlue}% - \put(.5\textwidth,15mm){\makebox(0,\baselineskip)[c]{\Macro{ifoot}}}% - \color{ImageGreen}% - \put(.5\textwidth,20mm){\makebox(0,\baselineskip)[c]{\Macro{cfoot}}} - \color{ImageRed}% - \put(.5\textwidth,25mm){\makebox(0,\baselineskip)[c]{\Macro{ofoot}}} - \put(\dimexpr.5\textwidth-2em,.5\baselineskip){% - \color{ImageBlue}% - \put(0,15mm){\line(-1,0){1.5em}}% - \put(-1.5em,15mm){\vector(0,-1){5mm}}% - \color{ImageGreen}% - \put(0,20mm){\line(-1,0){\dimexpr .25\textwidth-2em\relax}}% - \put(-\dimexpr .25\textwidth-2em\relax,20mm){\vector(0,-1){10mm}}% - \color{ImageRed}% - \put(0,25mm){\line(-1,0){\dimexpr .45\textwidth-4em\relax}}% - \put(-\dimexpr .45\textwidth-4em\relax,25mm){\vector(0,-1){15mm}}% - }% - \put(\dimexpr.5\textwidth+2em,.5\baselineskip){% - \color{ImageBlue}% - \put(0,15mm){\line(1,0){1.5em}}% - \put(1.5em,15mm){\vector(0,-1){5mm}}% - \color{ImageGreen}% - \put(0,20mm){\line(1,0){\dimexpr .25\textwidth-2em\relax}}% - \put(\dimexpr .25\textwidth-2em\relax,20mm){\vector(0,-1){10mm}}% - \color{ImageRed}% - \put(0,25mm){\line(1,0){\dimexpr .45\textwidth-4em\relax}}% - \put(\dimexpr .45\textwidth-4em\relax,25mm){\vector(0,-1){15mm}}% - }% - \end{picture} - \caption[Commands for setting the page footer]% - {The meaning of the commands for setting the contents of page - footers shown on a two-page schematic}% - \label{fig:scrlayer-scrpage.foot} -\end{figure} -% -\begin{Example} - Let's return to the example of the short article. Let's say you want to - specify the publisher in the left side of the footer. You would change the - example above to: -\begin{lstcode} - \documentclass{scrartcl} - \usepackage{scrlayer-scrpage} - \lohead{John Doe} - \rohead{Page style with \KOMAScript} - \lofoot{Smart Alec Publishing} - \usepackage{lipsum} - \begin{document} - \title{Page styles with \KOMAScript} - \author{John Doe} - \maketitle - \lipsum - \end{document} -\end{lstcode} - Once again the publisher is not printed on the first page with the title. - The reason is the same as in the example with - \DescRef{\LabelBase.cmd.lohead} above. And the solution for getting the - publisher on the first page is similar: -\begin{lstcode} - \lofoot[Smart Alec Publishing] - {Smart Alec Publishing} -\end{lstcode} - Now you decide\textnote{font change}\important{\FontElement{pageheadfoot}}% - \IndexFontElement{pageheadfoot} that the header and footer should use an - upright but smaller font in place of the default slanted font: -\begin{lstcode} - \setkomafont{pageheadfoot}{\small} -\end{lstcode} - In addition, the header, but not the footer, should be bold: -\begin{lstcode} - \setkomafont{pagehead}{\bfseries} -\end{lstcode} - It is important\textnote{Attention!} that this command does not occur until - after \Package{scrpage-scrlayer} has been loaded because the \KOMAScript{} - class defines \DescRef{\LabelBase.fontelement.pagehead} as an alias for - \DescRef{\LabelBase.fontelement.pageheadfoot}. Only by loading - \Package{scrpage-scrlayer} will \DescRef{\LabelBase.fontelement.pagehead} - become an element independent of - \DescRef{\LabelBase.fontelement.pageheadfoot}. - - Now add one more \Macro{lipsum} and the - \Option{twoside}\IndexOption{twoside}\important{\Option{twoside}} option - when loading \Class{scrartcl}. First of all, you will see the page number - moves from the centre to the outer margin of the page footer, due to the - changed defaults of \DescRef{\LabelBase.pagestyle.scrheadings} and - \DescRef{\LabelBase.pagestyle.plain.scrheadings} for two-sided printing with - a \KOMAScript{} class. - - Simultaneously, the author, document title, and publisher will vanish from - page~2. They only appear on page~3. That's because we've only used - commands for odd pages. You can recognise this by the ``\texttt{o}'' in the - second position of the command names. - - Now, we could simply copy those commands and replace the ``\texttt{o}'' with - an ``\texttt{e}'' to define the contents of \emph{even} pages. But with - two-sided printing, it makes more sense to use mirror-inverted elements, - i.\,e. the left element of an even page should become the right element of - the odd page and visa versa. To achieve this, we also replace the first - letter ``\texttt{l}'' with ``\texttt{r}'': -\begin{lstcode} - \documentclass[twoside]{scrartcl} - \usepackage{scrlayer-scrpage} - \lohead{John Doe} - \rohead{Page style with \KOMAScript} - \lofoot[Smart Alec Publishing] - {Smart Alec Publishing} - \rehead{John Doe} - \lohead{Page style with \KOMAScript} - \refoot[Smart Alec Publishing] - {Smart Alec Publishing} - \usepackage{lipsum} - \begin{document} - \title{Page styles with \KOMAScript} - \author{John Doe} - \maketitle - \lipsum\lipsum - \end{document} -\end{lstcode} -\end{Example} -% -Since it is a bit cumbersome to define left and right pages separately in -cases such as the previous example, a simpler solution for this common case is -introduced below. - -Allow me once again an important note:\textnote{Attention!} you should -never put a section heading or section number directly into the footer using -one of these commands. Because of the asynchronous way that \TeX{} lays out and -outputs pages, doing so can easily result in the wrong number or heading text -in the running head. Instead you should use the mark mechanism, ideally in -conjunction with the procedures explained in the next section.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{lefoot*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{cefoot*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{refoot*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{lofoot*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{cofoot*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{rofoot*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content} -\end{Declaration} -The starred versions\ChangedAt{v3.14}{\Package{scrlayer-scrpage}} of the -previously described commands differ only if you omit the optional argument -\OParameter{plain.scrheadings content}. In this case, the version without the -star does not change the contents of -\DescRef{\LabelBase.pagestyle.plain.scrheadings}. The starred version, on the -other hand, uses the mandatory argument \PName{scrheading content} for -\DescRef{\LabelBase.pagestyle.plain.scrheadings} as well. So if both arguments -should be the same, you can simply use the starred version with just the -mandatory argument.% - -\begin{Example} - You can shorten the previous example using the star versions of - \DescRef{\LabelBase.cmd.lofoot} and \DescRef{\LabelBase.cmd.refoot}: -\begin{lstcode} - \documentclass[twoside]{scrartcl} - \usepackage{scrlayer-scrpage} - \lohead{John Doe} - \rohead{Page style with \KOMAScript} - \lofoot*{Smart Alec Publishing} - \rehead{John Doe} - \lohead{Page style with \KOMAScript} - \refoot*{Smart Alec Publishing} - \usepackage{lipsum} - \begin{document} - \title{Page styles with \KOMAScript} - \author{John Doe} - \maketitle - \lipsum\lipsum - \end{document} -\end{lstcode} -\end{Example} -% -\EndIndexGroup -\ExampleEndFix - - -\begin{Declaration} - \Macro{ohead}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{chead}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{ihead}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{ofoot}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{cfoot}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{ifoot}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content} -\end{Declaration} -To configure the headers and footers for two-sided printing with the -previously described commands, you would have to configure the left and right -sides separately from one another. In most cases, however, the left and right -sides are more or less symmetrical. An item that appears on the left of an -even page should appear on the right of an odd page and vice versa. Centred -elements are usually centred on both sides. - -To simplify the definition of such symmetric page styles, -\Package{scrlayer-scrpage} has shortcuts. The \Macro{ohead} command -corresponds to a call to both \DescRef{\LabelBase.cmd.lehead} and -\DescRef{\LabelBase.cmd.rohead}. The \Macro{chead} command corresponds to a -call to both \DescRef{\LabelBase.cmd.cehead} and -\DescRef{\LabelBase.cmd.cohead}. And the \Macro{ihead} command corresponds to -a call to both \DescRef{\LabelBase.cmd.rehead} and -\DescRef{\LabelBase.cmd.lohead}. The same applies to the equivalent commands -for the page footer. An outline of these relationships can also be found in -\autoref{fig:scrlayer-scrpage.head} on \autopageref{fig:scrlayer-scrpage.head} -and \autoref{fig:scrlayer-scrpage.foot} on -\autopageref{fig:scrlayer-scrpage.foot}. -% -\begin{Example} - You can simplify the previous example using the new commands: -\begin{lstcode} - \documentclass[twoside]{scrartcl} - \usepackage{scrlayer-scrpage} - \ihead{John Doe} - \ohead{Page style with \KOMAScript} - \ifoot[Smart Alec Publishing] - {Smart Alec Publishing} - \usepackage{lipsum} - \begin{document} - \title{Page styles with \KOMAScript} - \author{John Doe} - \maketitle - \lipsum\lipsum - \end{document} -\end{lstcode} -\iffalse% - As you can see, you can use half the number of commands but get the same - result. % -\fi% -\end{Example}% -Because one-sided printing treats all pages as odd pages, these commands are -synonymous with the corresponding right-side commands when in one-sided mode. -Therefore in most cases you will only need these six commands instead of the -twelve described before. - -Allow me once again an important note:\textnote{Attention!} you should never -put a section heading or section number directly into the footer using one of -these commands. Because of the asynchronous way that \TeX{} lays out and -outputs pages, doing so can easily result in the wrong number or heading text -in the running head. Instead you should use the mark mechanism, ideally in -conjunction with the procedures explained in the next section.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{ohead*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{chead*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{ihead*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{ofoot*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{cfoot*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content}% - \Macro{ifoot*}\OParameter{plain.scrheadings content}% - \Parameter{scrheadings content} -\end{Declaration} -The previously described commands also have starred -versions\ChangedAt{v3.14}{\Package{scrlayer-scrpage}} that differ only if you -omit the optional argument \OParameter{plain.scrheadings content}. In this -case, the version without a star does not change the content of -\DescRef{\LabelBase.pagestyle.plain.scrheadings}. The version with the star, -on the other hand, also uses the mandatory argument \PName{scrheadings -content} for \DescRef{\LabelBase.pagestyle.plain.scrheadings}. So if both -arguments should be the same, you can simply use the starred version with only -the mandatory argument.% - -\begin{Example} - You can shorten the previous example using the star version of - \DescRef{\LabelBase.cmd.ifoot}: -\begin{lstcode} - \documentclass[twoside]{scrartcl} - \usepackage{scrlayer-scrpage} - \ihead{John Doe} - \ohead{Page style with \KOMAScript} - \ifoot*{Smart Alec Publishing} - \usepackage{lipsum} - \begin{document} - \title{Page styles with \KOMAScript} - \author{John Doe} - \maketitle - \lipsum\lipsum - \end{document} -\end{lstcode}% -\end{Example}% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{pagestyleset}{setting} -\end{Declaration} -\BeginIndex{Option}{pagestyleset~=KOMA-Script}% -\BeginIndex{Option}{pagestyleset~=standard}% -The examples above refer several times to the default settings of the page -styles \DescRef{\LabelBase.pagestyle.scrheadings}\IndexPagestyle{scrheadings} -and \DescRef{\LabelBase.pagestyle.plain.scrheadings}% -\IndexPagestyle{plain.scrheadings}. In fact, \Package{scrlayer-scrpage} -currently provides two different defaults for these page styles. You can -select them manually with the \Option{pagestyleset} option. - -The -\PValue{KOMA-Script}\important{\OptionValue{pagestyleset}{KOMA-Script}} -\PName{setting} selects the defaults, which are also set automatically if the -option is not specified and a \KOMAScript{} class is detected. In two-sided -printing, \DescRef{\LabelBase.pagestyle.scrheadings} uses outer-aligned -running heads in the header and outer-aligned page numbers in the footer. -In one-sided printing, the running head will be printed in the -middle of the header and the page number in the middle of the footer. Upper- -and lower-case letters are used in the automatic running heads as they -actually appear in the sectioning headings. This corresponds to the -\OptionValueRef{\LabelBase}{markcase}{used}\IndexOption{markcase~=used}% -\important{\OptionValueRef{\LabelBase}{markcase}{used}} option. The -\DescRef{\LabelBase.pagestyle.plain.scrheadings} page style has no running -heads, but the page numbers are printed in the same manner. - -However, if the \hyperref[cha:scrlttr2]{\Class{scrlttr2}}% -\important{\hyperref[cha:scrlttr2]{\Class{scrlttr2}}}% -\IndexClass{scrlttr2} class is detected, the default settings are based on the -page styles of that class. See \autoref{sec:scrlttr2.pagestyle}, -\autopageref{sec:scrlttr2.pagestyle}. - -The -\PValue{standard}\important{\OptionValue{pagestyleset}{standard}} -\PName{setting} selects defaults that match the page styles of the standard -classes. This is also activated automatically if the option has not been -specified and no \KOMAScript{} class is detected. In this case, for two-sided -printing \DescRef{\LabelBase.pagestyle.scrheadings} uses running heads -inner-aligned in the header, and the page numbers will be printed\,---\,also -in the header\,---\,outer-aligned. One-sided printing uses the same settings, -but since only right-hand pages exist in this mode, the running head will -always be left-aligned and the page number right-aligned. The automatic -running heads\,---\,despite considerable typographic objections\,---\,are -converted to capital letters, as they would be with -\OptionValueRef{\LabelBase}{markcase}{upper}\IndexOption{markcase~=upper}% -\important{\OptionValueRef{\LabelBase}{markcase}{upper}}. In one-sided -printing, the \DescRef{\LabelBase.pagestyle.plain.scrheadings} page style -differs considerably from \DescRef{\LabelBase.pagestyle.scrheadings} because -the page number is printed in the middle of the footer. -Unlike\textnote{\KOMAScript{} vs. standard classes} the \PageStyle{plain} page -style in the standard classes, -\DescRef{\LabelBase.pagestyle.plain.scrheadings} omits the page number in -two-sided printing. The standard classes print the page number in the middle -of the footer, which does not match the rest of the page styles in two-sided -printing. -\iffalse % Umbruchkorrekturtext - If you want the page number back -\begin{lstcode} - \cfoot[\pagemark]{} -\end{lstcode} - will restore it. % -\fi% -The running head is omitted in \DescRef{\LabelBase.pagestyle.plain.scrheadings}. - -Note\textnote{Attention!} that using this option activates the -\DescRef{\LabelBase.pagestyle.scrheadings}\IndexPagestyle{scrheadings}% -\important{\DescRef{\LabelBase.pagestyle.scrheadings}} page style. -\iffalse% Umbruchkorrektur - This also applies if you use the option within the document.% -\fi -% -\EndIndexGroup - - -\LoadCommonFile{pagestylemanipulation} % \section{Manipulating Defined Page Styles} - -\begin{Declaration} - \OptionVName{headwidth}{width\textup{:}offset\textup{:}offset}% - \OptionVName{footwidth}{width\textup{:}offset\textup{:}offset} -\end{Declaration} -By default the header\Index{header>width} and footer\Index{footer>width} are -as wide as the type area. However, you can change this using these -\KOMAScript{} options. The value \PName{width} is the desired width of the -header or footer. The \PName{offset} defines how far the header or footer -should be moved towards the outer\,---\,in one-sided printing to the -right\,---\,margin. All three\ChangedAt{v3.14}{\Package{scrlayer-scrpage}} -values are optional and can be omitted. If you omit a value, you can also omit -the associated colon to the left of it. If only one \PName{offset} is -specified, it is used for both odd and even pages. Otherwise, the first -\PName{offset} is used for odd and the second \PName{offset} for even pages in -two-sided mode. If you only use one value without a colon, this will be the -\PName{width}. - -For both the \PName{width} and the \PName{offset} you can use any valid length -value, \LaTeX{} length, \TeX{} dimension, or \TeX{} skip. In addition, you can -use an \eTeX{} dimension expression with the basic arithmetic operations -\texttt{+}, \texttt{-}, \texttt{*}, \texttt{/}, and parentheses. See -\cite[section~3.5]{manual:eTeX} for more information on such expressions. See -\autoref{sec:scrlayer-scrpage.options} for more information on using a -\LaTeX{} length as an option value. The \PName{width} can also be one of the -symbolic values shown in \autoref{tab:scrlayer-scrpage.symbolic.values}. - -By default the header and the footer are the width of the text area. The -default \PName{offset} depends on the selected \PName{width}. One-sided -printing typically uses half the difference between \PName{width} and the -width of the text area. This centres the header horizontally above the text -area. Two-sided printing, on the other hand, uses only a third of the -difference between \PName{width} and the width of the text area. However, if -\PName{width} is the width of the whole text area and the marginal note -column, the default \PName{offset} will be zero. If this is too complicated -for you, you should simply specify the desired \PName{offset} yourself. -% -\begin{table} - \centering - \caption[Symbolic values for the \Option{headwidth} and \Option{footwidth} - options]{Available symbolic values for the \PName{width} value of options - \Option{headwidth} and \Option{footwidth}} - \label{tab:scrlayer-scrpage.symbolic.values} - \begin{desctabular} - \entry{\PValue{foot}}{% - the current width of the footer% - }% - \entry{\PValue{footbotline}}{% - the current length of the horizontal line below the footer% - }% - \entry{\PValue{footsepline}}{% - the current length of the horizontal line above the footer% - } \entry{\PValue{head}}{% - the current width of the header% - }% - \entry{\PValue{headsepline}}{% - the current length of the horizontal line below the header% - }% - \entry{\PValue{headtopline}}{% - the current length of the horizontal line above the header% - }% - \entry{\PValue{marginpar}}{% - the width of the marginal note column including the distance - between the text area and the marginal note column% - }% - \entry{\PValue{page}}{% - the width of the page taking into account any binding correction defined - with the help of the \Package{typearea} package (see the - \DescRef{typearea.option.BCOR} option in - \autoref{sec:typearea.typearea}, \DescPageRef{typearea.option.BCOR})% - }% - \entry{\PValue{paper}}{% - the width of the paper without considering any binding correction% - }% - \entry{\PValue{text}}{% - the width of the text area% - }% - \entry{\PValue{textwithmarginpar}}{% - the width of the text area including the marginal note column and - the distance between the two (Note: only in this case is - the default for \PName{offset} zero)% - }% - \end{desctabular} -\end{table} -% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{headtopline}{thickness\textup{:}length}% - \OptionVName{headsepline}{thickness\textup{:}length}% - \OptionVName{footsepline}{thickness\textup{:}length}% - \OptionVName{footbotline}{thickness\textup{:}length} -\end{Declaration} -\BeginIndex{Option}{headtopline~=\PName{thickness\textup{:}length}}% -\BeginIndex{Option}{headsepline~=\PName{thickness\textup{:}length}}% -\BeginIndex{Option}{footsepline~=\PName{thickness\textup{:}length}}% -\BeginIndex{Option}{footbotline~=\PName{thickness\textup{:}length}}% -The \KOMAScript{} classes provide only one separation line below the header -and another above the footer, and you can only switch these lines on or off. -But the \Package{scrlayer-scrpage} package also lets you place lines above the -header and below the footer. And for all four lines, you can not only switch -them on an off but also configure their \PName{length} and \PName{thickness}. - -Both values are optional. If you omit the \PName{thickness}, a default value -of 0.4\Unit{pt} is used, producing a so-called \emph{hairline}. If you omit -the \PName{length}, the width of the header or footer will be used. If you -omit both, you can also omit the colon. If you use only one value without -colon, this is the \PName{thickness}. - -Of course, the \PName{length} can be not just shorter than the current width -of the header or footer but also longer. See also the options -\DescRef{\LabelBase.option.ilines}\IndexOption{ilines}% -\important{\DescRef{\LabelBase.option.ilines}, -\DescRef{\LabelBase.option.clines}, \DescRef{\LabelBase.option.olines}}, -\DescRef{\LabelBase.option.clines}\IndexOption{clines} and -\DescRef{\LabelBase.option.olines}\IndexOption{olines} later in this section. - -\BeginIndexGroup -\BeginIndex{FontElement}{headtopline}\LabelFontElement{headtopline}% -\BeginIndex{FontElement}{headsepline}\LabelFontElement{headsepline}% -\BeginIndex{FontElement}{footsepline}\LabelFontElement{footsepline}% -\BeginIndex{FontElement}{footbotline}\LabelFontElement{footbotline}% -In addition to the length and thickness, you can also change the colour of the -lines. Initially the colour depends on the colour of the header or footer. In -addition to this, however, the settings of the corresponding elements -\important[i]{\FontElement{headtopline}\\ - \FontElement{headsepline}\\ - \FontElement{footsepline}\\ - \FontElement{footbotline}} \FontElement{headtopline}, -\FontElement{headsepline}, \FontElement{footsepline} and -\FontElement{footbotline} are applied. You can -change these using the \DescRef{\LabelBase.cmd.setkomafont} or -\DescRef{\LabelBase.cmd.addtokomafont} commands (see -\autoref{sec:maincls.textmarkup}, \DescPageRef{maincls.cmd.setkomafont}). -By default these elements are empty, so they do not change the current font or -colour. Font changes at this point, unlike colour changes, make little sense -anyway and are therefore not recommended for these elements.% -\EndIndexGroup -% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{plainheadtopline}{simple switch}% - \OptionVName{plainheadsepline}{simple switch}% - \OptionVName{plainfootsepline}{simple switch}% - \OptionVName{plainfootbotline}{simple switch} -\end{Declaration} -You can use these options to apply the settings for the lines to the -\PageStyle{plain} page style. You can find the available values for -\PName{simple switch} in \autoref{tab:truefalseswitch} on -\autopageref{tab:truefalseswitch}. If one of these options is activated, the -\PageStyle{plain} page style will use the line settings given by the options -and commands described above. If the option is deactivated, the -\PageStyle{plain} will not show the corresponding line.% -\EndIndexGroup - - -\begin{Declaration} - \Option{ilines}% - \Option{clines}% - \Option{olines} -\end{Declaration} -As previously explained, dividing lines for the header or footer can be longer -or shorter than the width of the header or footer respectively. But the -question remains how these lines are aligned. By default, all lines are -aligned to the left margin in one-sided printing and to the inner margin in -two-sided printing. This corresponds to using the \Option{ilines} option. -Alternatively, you can use the \Option{clines} option to centre the lines with -respect to the width of the header or footer, or the \Option{olines} option to -align them to the outer (or right) margin.% -\EndIndexGroup -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% coding: us-ascii -%%% ispell-local-dictionary: "en_GB" -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrlayer.tex b/macros/latex/contrib/koma-script/source-doc/english/scrlayer.tex deleted file mode 100644 index 48418d7193..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrlayer.tex +++ /dev/null @@ -1,1631 +0,0 @@ -% ====================================================================== -% scrlayer.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. -% ---------------------------------------------------------------------- -% scrlayer.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. -% ====================================================================== -% -% Chapter about scrlayer of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Kapitel ueber scrlayer in der KOMA-Script-Anleitung -% Verwaltet von Markus Kohm -% -% ============================================================================ - -\KOMAProvidesFile{scrlayer.tex} - [$Date: 2019-12-06 12:04:10 +0100 (Fr, 06. Dez 2019) $ - KOMA-Script guide (chapter:scrlayer)] - -\translator{Markus Kohm\and Karl Hagen} - -% Date of the translated German file: 2019-12-03 - -\chapter[{Defining Layers and Page Styles with \Package{scrlayer}}] - {Defining\ChangedAt{v3.12}{\Package{scrlayer}} Layers and Page Styles with - \Package{scrlayer}} -\labelbase{scrlayer} - -\BeginIndexGroup -\BeginIndex{Package}{scrlayer}% -\BeginIndex{}{layer}% -Most users of graphics software are already familiar with the layer model for -a page. Such a model is rather alien to \LaTeX{} itself, but some packages, -like \Package{eso-pic} or \Package{textpos}, provide a kind of -background or foreground layer. \Package{scrlayer} is another package that -provides such background and foreground layers, but unlike the packages -mentioned above, these layers are part of the page style. As a result, you can -switch between different layers simply by switching the page style. - -To do so, the package also supports a low-level interface for defining page -styles that are based on a stack or list of layers, for adding layers to such -a layer stack, either at the top or the bottom, or before or after a specific -layer, and for removing individual layers and duplicates from a stack. In a -nutshell, the page style interface of \Package{scrlayer} provides commands to -define page styles based on a stack of layers and to manage those stacks. - -Nevertheless, using the layers directly is recommended for advanced users -only. Interfaces for beginners and average users are provided by additional -packages that in turn load \Package{scrlayer}. See -\autoref{cha:scrlayer-scrpage} in \autoref{part:forAuthors} of this -\iffree{manual}{book}. - - -\LoadCommonFile{options} % \section{Early or Late Selection of Options} - -\section{Generic Information} -\seclabel{generic.information} - -The package needs some generic information about the class being used. Class -authors can help \Package{scrlayer} by providing the appropriate information. -Otherwise the package will try to determine this information for itself. This -works, for example, for the standard and the \KOMAScript{} classes. It may -work with other classes, or it may fail in whole or in part. - -This section describes some of the information that class authors can provide. -Normally, users should not have to worry about it. - -\begin{Declaration} - \Macro{if@chapter}\ \PName{then code}\ \textMacro{else}\ % - \PName{else code}\ \textMacro{fi}% -\end{Declaration} -If \Macro{if@chapter} is defined and corresponds to -\Macro{iftrue}\IndexCmd{iftrue}, \Package{scrlayer} takes the chapter level -into account when, for example, processing the -\DescRef{\LabelBase.option.automark} option. If it is defined but is not -\Macro{iftrue}, \Package{scrlayer} handles only the -\DescRef{maincls.cmd.part}, \DescRef{maincls.cmd.section}, -\DescRef{maincls.cmd.subsection}, \Macro{sub\dots subsection}, -\DescRef{maincls.cmd.paragraph}, \DescRef{maincls.cmd.subparagraph}, -\Macro{sub\dots subparagraph} sectioning units. If the macro is undefined, -\Package{scrlayer} searches for \DescRef{maincls.cmd.chapter}. If -\DescRef{maincls.cmd.chapter} is defined and does not correspond to -\Macro{relax}, \Package{scrlayer} defines \Macro{if@chapter} to -\Macro{iftrue}. Otherwise \Macro{if@chapter} becomes -\Macro{iffalse}\IndexCmd{iffalse}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{if@mainmatter}\ \PName{then code}\ % - \textMacro{else}\ \PName{else code}\ \textMacro{fi}% -\end{Declaration} -Classes like \Class{book} or \Class{scrbook} provide -\DescRef{maincls.cmd.frontmatter}\IndexCmd{frontmatter}, -\DescRef{maincls.cmd.mainmatter}\IndexCmd{mainmatter}, and -\DescRef{maincls.cmd.backmatter}\IndexCmd{backmatter} to switch between the -front, main, and end parts of a book. Typically, these classes also use -\Macro{if@mainmatter} internally to decide whether the current text is part of -the main body of the document or not. Classes like \Class{report} and -\Class{article} have no \DescRef{maincls.cmd.frontmatter}, -\DescRef{maincls.cmd.mainmatter}, or \DescRef{maincls.cmd.backmatter} and -therefore also lack \Macro{if@mainmatter}. - -It is easier for \Package{scrlayer} to avoid constantly testing for the -existence of these commands to decide whether to work in the main matter or -not, and instead to use \Macro{if@mainmatter}\IndexCmd{iftrue} with classes -like \Class{report} and \Class{article}. So if \Macro{if@mainmatter} is not -defined, \Package{scrlayer} defines it as a synonym for \Macro{iftrue}. - -Some classes, however, define \DescRef{maincls.cmd.frontmatter}, -\DescRef{maincls.cmd.mainmatter}, or \DescRef{maincls.cmd.backmatter} but not -\Macro{if@mainmatter}. In this case, \Package{scrlayer} also defines -\Macro{if@mainmatter} to be \Macro{iftrue} and it extends definition of -\DescRef{maincls.cmd.frontmatter}, \DescRef{maincls.cmd.mainmatter}, and -\DescRef{maincls.cmd.backmatter} to set \Macro{if@mainmatter} properly. -However, if there are other, comparable commands for switching between -different document parts. \Package{scrlayer} will not recognize them, does not -test for them, and therefore cannot extend them appropriately. In this case, -\Package{scrlayer} needs help of the class author to set \Macro{if@mainmatter} -correctly.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{DeclareSectionNumberDepth}\Parameter{level name}% - \Parameter{level depth} -\end{Declaration} -Generally each section level is assigned an integer number indicating its -depth in the document structure. \LaTeX{} needs this to manage the hierarchy -of the section levels. But normally these values are known only to the -particular class that defines the section commands. This class then uses the -appropriate numbers inside the corresponding commands. - -The \Package{scrlayer} package also needs information about the section -hierarchy. With the help of \Macro{DeclareSectionNumberDepth}, you can map the -name of a heading level to a corresponding \PName{level depth}. For example, -for the standard \Class{book} class, the \PName{level name}s would be -\PValue{part}, \PValue{chapter}, \PValue{section}, \PValue{subsection}, -\PValue{subsubsection}, \PValue{paragraph}, and \PValue{subparagraph}, and the -corresponding \PName{level depth}s would be -1, 0, 1, 2, 3, 4, and 5. - -The \Package{scrlayer} package tries to determine the \PName{level depth}s on -its own while loading and again during \Macro{begin}\PParameter{document}. But -if this fails, for example because you use completely different sectioning -commands, you can define the relationship explicitly with -\Macro{DeclareSectionNumberDepth}.% -\EndIndexGroup - - -\section{Declaring Layers} -\seclabel{layers} - -A layer is an abstract model of a page. Unlike a real, physical sheet of -paper, this page is completely transparent. Typically, multiple layers are -stacked atop one another and opaque material on one layer hides material on -the layers below. The stack of layers is then merged to form the physical -page. The \Package{scrlayer} package provides two such stacks for each page: a -background stack and a foreground stack. The background stack is printed -beneath the normal page content, while the foreground stack is printed above -it. The normal page content is therefore a kind of a dividing layer between -the two layer stacks. - -A layer has several attributes that can be understood as answers to some basic -questions: -\iffree{\begin{description}}{% - \begingroup - \RedeclareSectionCommand[beforeskip=.5\baselineskip plus .25\baselineskip - minus .1\baselineskip]{paragraph}% - \renewcommand*\item[4][]{\paragraph*{#3{#4}#1}}% - }% -\item[Does the layer belong to the foreground or the background?]% - \leavevmode\textnote{foreground or background}\hskip 0pt - Background layers are output before the normal content of the page. - Therefore they appear behind or beneath the normal content of the page. - Foreground layers are then output after the normal content. Therefore they - appear on top of the normal content of the page. By default, a layer is both - a background layer \emph{and} a foreground layer and therefore is printed - twice. Usually it makes sense to limit the layer explicitly to either the - foreground or the background. -\item[What is the position of the layer?]% - \leavevmode\textnote{horizontal and vertical position}\hskip 0pt - To answer this question, there are attributes to define the layer's - horizontal and vertical position. -\item[How big is the layer?\textnote{horizontal and vertical size}]% - As with the position, there are also attributes to define the width and - height of a layer. Thus a layer can be smaller or larger than the paper - and it can be placed at different positions on the paper. -\item[How are the horizontal and vertical positions measured?]% - \leavevmode\textnote{alignment}\hskip 0pt - This question is answered by the alignment attribute. The horizontal - position can be measured from the left edge of the paper to the left edge of - the layer, to the centre of the layer, to the right edge of the layer. - Similarly, the vertical position can be measured from the top edge of the - paper to the top edge of the layer, the centre of the layer, or the bottom - edge of the layer. -\item[Is the layer intended for text or picture output?]% - \leavevmode\textnote{text or picture}\hskip 0pt - This question is closely related to the position. For example, users often - expect the origin for a picture to be at the lower left corner of the layer. - But this would not be suitable for text output. Therefore the origin of a - text layer is the height of a standard text line below the top left corner - of the layer. Picture layers, on the other hand, create a - \Environment{picture}\IndexEnv{picture} environment in which additional - positioning commands are available. -\item[Should the layer be printed on left or right pages?]% - \leavevmode\textnote{left or right page}\hskip 0pt - By default a layer will be printed on all pages. Note that \LaTeX{} treats - even pages as left-side pages and odd pages as right-side pages, but in - one-sided printing, only right-hand pages exist regardless of the page - number. -\item[Should the layer be printed in one-sided or two-sided mode?]% - \leavevmode\textnote{one-sided or two-sided}\hskip 0pt - By default a layer will be printed in both one-sided and two-sided - printing. Nonetheless, a layer that is restricted to even pages will never - be printed in one-sided printing and therefore is not a one-sided layer. -\item[Should the layer be printed on float pages or normal pages?]% - \leavevmode\textnote{float page or normal page}\hskip 0pt - \LaTeX{} produces float pages for objects from environments like tables or - figures if they are allowed to appear on a page without normal page contents - (see option \PValue{p} for \Environment{figure} or \Environment{table}). In - effect, the entire page is allowed to float within the document. Normal - pages in this sense are all pages that are not float pages. Normal pages can - also contain floats at the top, in the middle, or at the bottom of the page. - Very large floats can give the impression of being page floats, while in - reality they are floating environments placed at the top of a normal page. -\item[What are the contents of the layer?]% - \leavevmode\textnote{contents}\hskip 0pt - The corresponding attribute simply contains what should be printed whenever - the layer is output. -\iffree{\end{description}}{% - \endgroup\par\bigskip\noindent\ignorespaces -}% -These eight questions immediately give rise to a number of attributes. Later -\iffree{in this guide}, we will describe additional attributes. However, they -are only defined for convenience and can be expressed by a combination of -these primary attributes. - - -\begin{Declaration} - \Macro{DeclareLayer}\OParameter{option list}\Parameter{layer name}% - \Macro{DeclareNewLayer}\OParameter{option list}\Parameter{layer name}% - \Macro{ProvideLayer}\OParameter{option list}\Parameter{layer name}% - \Macro{RedeclareLayer}\OParameter{option list}\Parameter{layer name}% - \Macro{ModifyLayer}\OParameter{option list}\Parameter{layer name} -\end{Declaration} -These commands can be used to define layers. The \PName{layer name} must be -fully expandable and should expand to ASCII letters only. Some additional -characters are accepted, but their use is only recommended for advanced users. - -The \Macro{DeclareLayer} command does not care whether or not a layer with the -given \PName{layer name} already exists. It will under all circumstances -define the layer with the attributes specified in the \PName{option list}. An -\PName{option} can be either a key or a key followed by an equal sign and -a value. Multiple options are separated by commas. To use a comma or a white -space within the value of an option, you must put the value inside curly -brackets. See \autoref{tab:scrlayer.layerkeys} for more information on keys, -values, and the corresponding attributes. - -Unlike \Macro{DeclareLayer}, \Macro{DeclareNewLayer} reports an error if a -layer with the same \PName{layer name} already exists. This prevents the user -from accidentally using the same \PName{layer name} more than once. This -is especially useful when classes or packages also define layers internally. - -In contrast, \Macro{ProvideLayer} only defines a layer if there is no layer -with the same name already. If the name is in use for another layer, the new -definition is ignored. Therefore this command has the meaning, \emph{define - the layer only if it does not already exist.} - -If you want to redefine an existing layer, you can use \Macro{RedeclareLayer} -or \Macro{ModifyLayer}. With \Macro{RedeclareLayer}, the layer is first reset -to the default settings and then completely redefined via the specified -options list. In contrast, \Macro{ModifyLayer} does not reset the layer. -Only those attributes which are explicitly set in the \PName{option list} will -be changed. Applying either command to a previously undefined \PName{layer - name} results in an error. - -\begin{desclist} - \desccaption{% - Options for defining page layers and the meaning of the - corresponding layer attribute\label{tab:scrlayer.layerkeys}% - }{% - Options for defining layers (\emph{continued})% - }% - \entry{% - \ChangedAt{v3.16}{\Package{scrlayer}}% - \OptionVName{addcontents}{Code}}{% - The specified \PName{code} will be appended to the current value of the - \Option{contents} attribute, so the new content will appear at the end of - the existing content. For more information about the handling of - \PName{code} see the \Option{contents} option.% - }% - \entry{% - \ChangedAt{v3.16}{\Package{scrlayer}}% - \OptionVName{addheight}{additional height}}{% - The current value of the \Option{height} attribute will be increased by - the value of this option. You can use the same kind of values as for - \Option{height}.% - }% - \entry{% - \ChangedAt{v3.16}{\Package{scrlayer}}% - \OptionVName{addhoffset}{additional horizontal offset}}{% - The current value of the \Option{hoffset} attribute will be increased by - the value of this option. You can use the same kind of values as for - \Option{hoffset}.% - }% - \entry{% - \ChangedAt{v3.16}{\Package{scrlayer}}% - \OptionVName{addvoffset}{additional vertical offset}}{% - The current value of the \Option{voffset} attribute will be increased by - the value of this option. You can use the same kind of values as for - \Option{voffset}.% - }% - \entry{% - \ChangedAt{v3.16}{\Package{scrlayer}}% - \OptionVName{addwidth}{additional width}}{% - The current value of the \Option{width} attribute will be increased by - the value of this option. You can use the same kind of values as for - \Option{width}.% - }% - \nentry{\KOption{align}{\PName{alignment characters}}}{% - The \PName{alignment characters} define the desired alignment of the - layer. Each \PName{alignment character} determines how the \PName{length} - of either the \Option{hoffset} or the \Option{voffset} option is - interpreted. Multiple \PName{alignment character}s can be used together - (without spaces or commas) and are evaluated in the order they occur. - Macros are not permitted in the value of the option. Valid - \PName{alignment character}s are: - \begin{description} - \item[\PValue{b} --] align the layer at its bottom edge; the value of - \Option{voffset} is the distance from the top edge of the paper to the - bottom of the layer. - \item[\PValue{c} --] align the layer at its centre; the values of - \Option{voffset} and \Option{hoffset} are interpreted as the distance - from the top left corner of the paper to the centre of the layer. - \item[\PValue{l} --] align the layer at its left edge; the value of - \Option{hoffset} is interpreted as the distance from the left edge of - the paper to the left edge of the layer. - \item[\PValue{r} --] align the layer at its right edge; the value of - \Option{hoffset} is interpreted as the distance from the left edge of - the paper to the right edge of the layer. - \item[\PValue{t} --] align the layer at its top edge; the value of - \Option{voffset} is interpreted as the distance from the top edge of the - paper to the top edge of the layer. - \end{description}% - }% - \entry{\KOption{area}{% - \Parameter{hoffset}\Parameter{voffset}% - \Parameter{width}\Parameter{height}}}{% - This composite option sets the primary attributes - \OptionValue{hoffset}{horizontal offset}, \OptionValue{voffset}{vertical - offset}, \OptionValue{width}{width}, \OptionValue{height}{height}.% - }% - \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% - \Option{backandforeground}}{% - This option removes the restriction of a layer to the foreground or the - background. In general, this option makes little sense, but it is provided - for the sake of a complete user interface. This option does not expect or - allow a value.% - }% - \entry{\Option{background}}{% - This option displays the layer in the background only. The default is to - display layers in both the background and the foreground. This option does - not expect or allow a value.% - }% - \entry{\Option{bottommargin}}{% - This composite option sets the primary attributes \Option{hoffset}, - \Option{voffset}, \Option{width}, \Option{height}, and \Option{align} so - that the layer spans the paper horizontally from the left edge to the - right and vertically from immediately beneath the footer to the bottom - edge of the paper.% - }% - \entry{\KOption{clone}{\PName{layer name}}}{% - This composite option sets all primary attributes of the layer to the same - values as the primary attributes of the layer with the given \PName{layer - name}. See the notes on the \PName{layer name} at the beginning of the - explanation for \Macro{DeclareLayer}. The layer to be cloned must also - already exist.% - }% - \entry{\KOption{contents}{\PName{code}}}{% - The specified \PName{code} will be expanded whenever the layer is printed. - This \PName{code} defines what you see for the layer. No tests are made to - see if the code is valid. Errors in the \PName{code} can therefore lead to - multiple error messages on each page that prints the layer.% - }% - \entry{\Option{evenpage}}{% - This option causes the layer to appear on even pages only, unlike the - default, where a layer will appear on both even and odd pages. Since even - pages only appear in two-sided printing, this option implies - \Option{twoside}. This option does not expect or allow a value.% - }% - \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% - \Option{everypage}}{% - This option is a combination of \Option{oddorevenpage} and - \Option{floatornonfloatpage}. This option does not expect or allow a - value.% - }% - \entry{\Option{everyside}}{% - This option removes any restriction of the layer to one-sided or two-sided - printing. This is the default setting. This option does not expect or - allow a value.% - }% - \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% - \Option{floatornonfloatpage}}{% - This option removes any restriction of the layer to float or non-float - pages and restores the default setting. This option does not expect or - allow a value.% - }% - \entry{\Option{floatpage}}{% - This option restricts the layer to appearing on float pages only. The - default setting is for layers to appear on both float and non-float pages. - This option does not expect or allow a value.% - }% - \entry{\Option{foot}}{% - This composite option sets \Option{hoffset}, \Option{voffset}, - \Option{width}, \Option{height}, and \Option{align} so that the layer - spans the page footer over the width of the text area. This option does - not expect or allow a value.% - }% - \entry{\Option{footskip}}{% - This composite option sets \Option{hoffset}, \Option{voffset}, - \Option{width}, \Option{height}, and \Option{align} so that the layer - spans the vertical distance between the text area and the page footer over - the width of the text area. Note, however, that although the height of - this area depends on \Length{footskip}, it is not the same. This option - does not expect or allow a value.% - }% - \entry{\Option{foreground}}{% - This option displays the layer in the foreground only. The default is to - display layers in both the background and the foreground. The option does - not expect or allow a value.% - }% - \entry{\Option{head}}{% - This composite option sets \Option{hoffset}, \Option{voffset}, - \Option{width}, \Option{height}, and \Option{align} so that the layer - spans the vertical area of the page header for the width of the text area. - The height corresponds to the length \Length{headheight}. This option does - not expect or allow a value.% - }% - \entry{\Option{headsep}}{% - This composite option sets \Option{hoffset}, \Option{voffset}, - \Option{width}, \Option{height}, and \Option{align} so that the layer - spans the vertical distance between the page header and the text area for - the width of the text area. The height corresponds to the length - \Length{headsep}. This option does not expect or allow a value.% - }% - \entry{\KOption{height}{\PName{length}}}{% - Sets the height of the layer. Note that the \PName{length} can be a - \LaTeX{} length declared with \Macro{newlength}, a \TeX{} length declared - with \Macro{newdimen} or \Macro{newskip}, a length value like 10\,pt, or a - dimensional expression using +, -, /, *, (, and ). For more information - about valid dimensional expressions see \cite[section~3.5]{manual:eTeX}.% - }% - \entry{\KOption{hoffset}{\PName{length}}}{% - Sets the distance of the layer from the left edge of the paper. How the - distance is measured depends on the \Option{align} option. See the - \Option{height} option for more information about valid expressions for - \PName{length}.% - }% - \entry{\Option{innermargin}}{% - This composite option sets \Option{hoffset}, \Option{voffset}, - \Option{width}, \Option{height}, and \Option{align} so that the layer - spans the inner margin, from the edge of the page to the edge of the text - area and from the top to the bottom of the page. In one-sided printing, - the inner margin corresponds to the left margin. This option does not - expect or allow a value.% - }% - \entry{\Option{leftmargin}}{% - This composite option sets \Option{hoffset}, \Option{voffset}, - \Option{width}, \Option{height}, and \Option{align} so that the layer - spans the left margin, from the left edge of the paper to the left edge of - the text area and from the top of the paper to the bottom. This option - does not expect or allow a value.% - }% - \entry{\ChangedAt{v3.19}{\Package{scrlayer}}% - \OptionVName{mode}{mode}}{% - This primary option defines the \PName{mode} in which the layer's content - is output. The default is \OptionValue{mode}{text}. The baseline of the - first text line is placed the height of one standard text line below the - top edge of the layer, so the text is usually neatly aligned with the top - of the layer. In \PValue{picture} \PName{mode}, on the other hand, the - layer spans a \Environment{picture} environment with the origin at the - bottom left corner of the layer. The \PValue{raw} \PName{mode} is also - also defined. By default it corresponds to \PValue{text} \PName{mode}. - Changing\textnote{Attention!} the \PName{mode} of a layer usually results - the contents shifting. Furthermore, the \PValue{picture} \PName{mode} - provides additional commands that result in errors with another - \PName{mode}. Therefore it usually makes no sense to change the - \PName{mode} of a layer after its initial declaration!% - }% - \entry{\Option{nonfloatpage}}{% - This option restricts the layer to pages that are not float pages. The - default is for the layer to appear on both float and non-float pages. This - option does not expect or allow a value.% - }% - \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% - \Option{oddorevenpage}}{% - This option removes any restriction of the layer to odd or even pages, - restoring the default behaviour that the layer should appear on both odd - and even pages. The option does not expect or allow a value.% - }% - \entry{\Option{oddpage}}{% - This option restricts the layer to odd pages only. The default is for - layers to appear on both odd pages and on even pages. Note that in - one-sided printing, all pages are odd, regardless of the page number. This - option does not expect or allow a value.% - }% - \entry{\Option{oneside}}{% - This option restricts the layer to one-sided printing only. The default is - for layers to appear in both one-sided and two-sided printing. This option - does not expect or allow a value.% - }% - \entry{\Option{outermargin}}{% - The composite option sets \Option{hoffset}, \Option{voffset}, - \Option{width}, \Option{height}, and \Option{align} so that the layer - spans the outer margin of the page, from the top to the bottom of the - paper. The outer margin corresponds to the right margin in one-sided - printing. This option does not expect or allow a value.% - }% - \entry{\Option{page}}{% - This composite option sets \Option{hoffset}, \Option{voffset}, - \Option{width}, \Option{height}, and \Option{align} so that the layer - spans the the whole paper. This option does not expect or allow a value.% - }% - \entry{\ChangedAt{v3.16}{\Package{scrlayer}}% - \OptionVName{pretocontents}{code}}{% - The value of \PName{code} is prefixed the current value of the - \Option{contents} attribute, so the new content will appear before the - existing content. For more information about the handling of \PName{code}, - see the \Option{contents} option.% - }% - \entry{\Option{rightmargin}}{% - This composite option sets \Option{hoffset}, \Option{voffset}, - \Option{width}, \Option{height}, and \Option{align} so that the layer - spans the right margin, from the right edge of the text area to the right - edge of the paper and from the top to the bottom edge of the paper. This - option does not expect or allow a value.% - }% - \entry{\Option{textarea}}{% - This composite option sets \Option{hoffset}, \Option{voffset}, - \Option{width}, \Option{height}, and \Option{align} so that the layer - spans the entire text area. This option does not expect or allow a value.% - }% - \entry{\Option{topmargin}}{% - This composite option sets \Option{hoffset}, \Option{voffset}, - \Option{width}, \Option{height}, and \Option{align} so that the layer - spans the vertical distance between the top edge of the paper to the - header for the entire width of the paper. This option does not expect or - allow a value.% - }% - \entry{\Option{twoside}}{% - This option restricts the layer to two-sided printing. The default is for - layers to appear in both one-sided and two-sided printing. This option - does not expect or allow a value.% - }% - \entry{\ChangedAt{v3.18}{\Package{scrlayer}}% - \Option{unrestricted}}{% - This option removes all output restrictions. It is a combination of - \Option{backandforeground}, \Option{everyside}, and - \Option{floatornonfloatpage}. This option does not expect or allow a - value.% - }% - \entry{\KOption{voffset}{\PName{length}}}{% - Sets the distance of the layer from the top of the paper. How the distance - is measured depends on the \Option{align} option. See the \Option{height} - option for more information about valid expressions for \PName{length}.% - }% - \entry{\KOption{width}{\PName{length}}}{% - Sets the width of the layer. See the \Option{height} option for more - information about valid expressions for \PName{length}.% - }% -\end{desclist} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{ModifyLayers}\OParameter{option list}\Parameter{layer list} -\end{Declaration} -This\ChangedAt{v3.26}{\Package{scrlayer}} command executes -\DescRef{\LabelBase.cmd.ModifyLayer} with the given \PName{option list} for -all layers of the comma-separated layer list. Therefore the option can be used -to change attributes of several layers simultaneously.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{layerhalign}% - \Macro{layervalign}% - \Macro{layerxoffset}% - \Macro{layeryoffset}% - \Macro{layerwidth}% - \Macro{layerheight}% -\end{Declaration} -These commands are only valid in the \PName{code} specified with -\Option{contents}, \Option{addcontents}, or \Option{pretocontents}. In this -case, they contain the layer's actual alignment, position, and dimensions that -will be used for the output. However, this is not necessarily the actual -dimensions of the layer's contents, e.\,g., if the contents are oversized or -do not fill the layer completely. - -The primary layer attribute \PValue{align} is mapped to -\Macro{layerhalign}\ChangedAt{v3.19}{\Package{scrlayer}} and -\Macro{layervalign}. The horizontal values \PValue{l} and \PValue{r} are -copied to \Macro{layerhalign}. The vertical values \PValue{t} and \PValue{b} -are copied to \Macro{layervalign}. The value \PValue{c}, which is both -horizontal and vertical, is copied to both commands. If there are several -conflicting values for \PValue{align}, only the last one is copied. Thus the -resulting \Macro{layerhalign} is either \PValue{l}, \PValue{c}, or \PValue{r}, -and the resulting \Macro{layervalign} is either \PValue{t}, \PValue{c}, or -\PValue{b}. - -Redefining\textnote{Attention!} these instructions to change the values stored -in them is not permitted, as it would lead to unpredictable results.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{LenToUnit}\Parameter{length} -\end{Declaration} -This\ChangedAt{v3.19}{\Package{scrlayer}} command originally came from -\Package{eso-pic}\IndexPackage{eso-pic}~2.0f. It converts lengths into -multiples of \Length{unit length} and can therefore be used everywhere \LaTeX{} -expects \Environment{picture} coordinates or \Length{unit length}-dependent -values. For more information, see \cite{package:eso-pic} and the descriptions -of \Macro{putUR}, \Macro{putLL}, and \Macro{putLR} below. If the command is -already defined, e.\,g., by loading \Package{eso-pic} before -\Package{scrlayer}, the package does not define it again.% -\iffalse% Umbruchkorrekturtext -\par -It should be noted at this point that using package -\Package{picture}\IndexPackage{picture}\textnote{\Package{picture}} (see -\cite{package:picture}) supersedes \Macro{LenToUnit} more or less. The package -extends environment \Environment{picture} and the picture commands so that you -can use \LaTeX{} lengths directly for coordinates.% -\fi -\EndIndexGroup - - -\begin{Declaration} - \Macro{putUL}\Parameter{content}% - \Macro{putUR}\Parameter{content}% - \Macro{putLL}\Parameter{content}% - \Macro{putLR}\Parameter{content}% - \Macro{putC}\Parameter{content} -\end{Declaration} -You\ChangedAt{v3.19}{\Package{scrlayer}} can use these commands inside the -value of \PValue{contents} layer option if the layer is declared with -\OptionValue{mode}{picture}. In this case, \Macro{putUL} places the -\PName{content} relative to the upper left corner of the layer and therefore -is the same as -\lstinline[breaklines=false]|\put(0,\LenToUnit{\layerheight})|. \Macro{putUR} -places the \PName{content} relative to the upper right corner of the layer and -therefore is the same as -\lstinline[breaklines=false] -|\put(\LenToUnit{\layerwidth},\LenToUnit{\layerheight})|. -\Macro{putLL} places the \PName{content} relative to the lower left corner of -the layer and therefore is the same as -\lstinline[breaklines=false]|\put(0,0)|. \Macro{putLR} places the -\PName{content} relative to the lower right corner and therefore is the same -as \lstinline[breaklines=false]|\put(\LenToUnit{\layerwidth},0)|. Last but -not least, \Macro{putC} places the \PName{content} relative to the centre of -the layer.% -\begin{Example} - You want to determine exactly how accurately - \OptionValueRef{typearea}{DIV}{classic} sets the height of the text area to - the width of the page size. You declare a layer that both borders the text - area and places a circle with a diameter of the paper width in the centre of - the text area: -\begin{lstcode} - \documentclass[DIV=classic]{scrartcl} - \usepackage{pict2e} - \usepackage{scrlayer} - \DeclareNewLayer[% - textarea,background,mode=picture, - contents={% - \putLL{\line(1,0){\LenToUnit{\layerwidth}}}% - \putLR{\line(0,1){\LenToUnit{\layerheight}}}% - \putUR{\line(-1,0){\LenToUnit{\layerwidth}}}% - \putUL{\line(0,-1){\LenToUnit{\layerheight}}}% - \putC{\circle{\LenToUnit{\paperwidth}}}% - } - ]{showtextarea} - \DeclareNewPageStyleByLayers{test}{showtextarea} - \pagestyle{test} - \begin{document} - \null - \end{document} -\end{lstcode} - You will notice that \Package{typearea}'s mapping to an integer \PName{DIV} - value is very accurate in this example. -\end{Example} -Incidentally, you will find more information about late medieval book-page -canon sketched in the example in \autoref{sec:typearea.circleConstruction}, -\autopageref{sec:typearea.circleConstruction}. - -The \Macro{DeclareNewPageStyleByLayers}\IndexCmd{DeclareNewPageStyleByLayers} -command just used in the example defines a new page style using the newly -declared layer. It will be explained in \autoref{sec:scrlayer.pagestyles}, -\DescPageRef{scrlayer.cmd.DeclareNewPageStyleByLayers}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{GetLayerContents}\Parameter{layer~name} -\end{Declaration} -This\ChangedAt{v3.16}{\Package{scrlayer}} command returns the whole contents -of a layer. It is important to note\textnote{Attention!} that using this -command inside the \PName{code} of the layer attributes \Option{contents}, -\Option{addcontents}, or \Option{pretocontents} can result in -infinite recursion when referencing the contents of the current layer. You -are responsible for avoiding such situations!% -\EndIndexGroup - - -\begin{Declaration} - \Macro{IfLayerExists}\Parameter{layer~name} - \Parameter{then-code}\Parameter{else-code} -\end{Declaration} -This command can be used to execute code depending on whether or not a layer -with the specified \PName{layer name} exists. If the layer exists, the -\PName{then-code} will be executed; otherwise, the \PName{else-code} will be -executed. Note that the command cannot really test whether a layer exists. -Instead it uses a heuristic which will never yield a false negative but which, -in extreme cases, could yield a false positive. -\iffalse% Umbruchvarianten -Nevertheless, if the test yields a false positive, something has gone wrong. -For example, this could indicate an incompatible package or that the user is -doing something he or she should not.% -\else -False positives indicate a problem, such as the use of an incompatible package -or a bad choice of internal macro names by the user. -\fi -\EndIndexGroup - - -\begin{Declaration} - \Macro{DestroyLayer}\Parameter{layer~name} -\end{Declaration} -If a layer with the given \PName{layer name} exists, all macros belonging to -it will be set to \Macro{relax}. In page styles already defined with -\Package{scrlayer}, such destroyed layers are ignored. Destroyed layers can be -redefined using \DescRef{\LabelBase.cmd.DeclareNewLayer} or -\DescRef{\LabelBase.cmd.ProvideLayer}, but they can no longer be changed using -\DescRef{\LabelBase.cmd.RedeclareLayer} or -\DescRef{\LabelBase.cmd.ModifyLayer}.% -\iffalse % See the note at the beginning of the end user interface section -\par -The command is intended to be used inside -\DescRef{\LabelBase.cmd.scrlayerOnAutoRemoveInterface} (see -\autoref{sec:scrlayer.enduserinterfaces}, -\DescPageRef{scrlayer.cmd.scrlayerOnAutoRemoveInterface}) -to remove layers defined using removable macros of an interface along with -that interface.% -\fi -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{draft}{simple switch} - \Macro{layercontentsmeasure}% -\end{Declaration} -The \KOMAScript{} option \Option{draft} can be used to active the draft mode -of \Package{scrlayer}. The draft mode uses the \Macro{layercontentsmeasure} -command to print a ruler at each layer edge, of which the top and left one is -labelled in centimetres and the right and bottom one in inches. The rulers are -drawn behind the content of each layer. This command can also be used as -exclusive content of a layer.% -\EndIndexGroup - - -\section{Declaring and Managing Page Styles} -\seclabel{pagestyles} - -\BeginIndexGroup -\BeginIndex{}{page>style}% -We now understand how to define and manage layers, but so far we do not know -how they are used. The possibly surprising answer is, with page styles. In -\LaTeX{}, page styles usually define headers and footers of the page. - -The header and footer of odd or right-hand pages\textnote{even or odd page} -are printed on pages with odd page numbers in two-sided printing or on all -pages in one-sided printing. This is directly comparable to the layer -options\important[i]{\Option{evenpage}\\\Option{oddpage}} \Option{oddpage} and -\Option{evenpage}. - -The page header\textnote{header or footer} is output before the main page -contents. The page footer is output after the main page contents. This -corresponds directly to the layer -options\important[i]{\Option{background}\\\Option{foreground}} -\Option{background} and \Option{foreground}. - -Therefore it makes sense to define page styles as lists of layers. But instead -of just the four options mentioned above, you can use all the properties -explained in \autoref{sec:scrlayer.layers}, \autoref{tab:scrlayer.layerkeys}, -on \autopageref{tab:scrlayer.layerkeys}. - -As a result of these considerations, layer page -styles\textnote{layer page style}\Index{page style>layer}% -\Index{layer>page style}\Index{page>style} are one type of page style that -\Package{scrlayer} provides. A layer page style consists of layers as well as -several hooks. The layers have already been described in -\autoref{sec:scrlayer.layers}. The hooks\Index[indexmain]{hooks}% -\textnote{hooks} are points in the expansion or execution of page styles to -which you can add code. Experienced users already know this concept from -commands like \Macro{AtBeginDocument} (see \cite{latex:usrguide}) or -\DescRef{scrlfile.cmd.BeforeClosingMainAux} (see -\DescPageRef{scrlfile.cmd.BeforeClosingMainAux}). - -Page-style aliases are another type of page style which \Package{scrlayer} -provides. A page-style alias is actually a different page style. In other -words, the name of a page-style alias is an alternative name for another -page-style alias or for a page style. As a result, manipulating a page-style -alias results in manipulating the original page style. If the original page -style is itself an alias, its manipulation again results in the manipulation -of the alias's original page style, and so on until a real page style is -finally changed. The term \emph{real page style}\textnote{real page style} is -used to distinguish it from a page-style alias. All page styles that are not -page-style aliases are real page styles. Aliases can be defined for all page -styles, not just those defined with \Package{scrlayer}. - -\begin{Declaration} - \Macro{currentpagestyle} - \Macro{toplevelpagestyle} -\end{Declaration} -The \Package{scrlayer} package patches the \DescRef{maincls.cmd.pagestyle} -command so that it sets \Macro{currentpagestyle} to the currently active page -style. Note that \DescRef{maincls.cmd.thispagestyle} does not change -\Macro{currentpagestyle}. If you use \DescRef{maincls.cmd.thispagestyle}, -however, \Macro{currentpagestyle} can change within the \LaTeX{} output -routine. However, this change will only occur if \Macro{currentpagestyle} has -been actively protected from expansion until the execution of the output -routine. - -Note that the layer page styles described later in this section do not rely on -this \DescRef{maincls.cmd.pagestyle} extension because they redefine -\Macro{currentpagestyle} themselves. This patch was made so that other, -non-\Package{scrlayer} page styles can use \Macro{currentpagestyle}. -Additionally, \Macro{currentpagestyle} is empty after loading -\Package{scrlayer} and before using \DescRef{maincls.cmd.pagestyle} for the -first time. Therefore, when defining an end-user interface, you may find it -useful to set the current page style to a default with an implicit -\DescRef{maincls.cmd.pagestyle} statement. - -If \DescRef{maincls.cmd.pagestyle} activates an alias page style, -\Macro{currentpagestyle} shows not the alternative name but the name of -the real page style. You\ChangedAt{v3.16}{\Package{scrlayer}} can get the -alternative name using \Macro{toplevelpagestyle}. However, it is not -recommended to define page styles that produce different results depending on -\Macro{toplevelpagestyle}, e.\,g., using \DescRef{scrbase.cmd.Ifstr}. If you -were to activate such a page style using \DescRef{maincls.cmd.thispagestyle} -you could get the wrong result.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{BeforeSelectAnyPageStyle}\Parameter{code}% - \Macro{AfterSelectAnyPageStyle}\Parameter{code}% -\end{Declaration} -The \Macro{BeforeSelectAnyPageStyle} command adds \PName{code} to the hook% -\textnote{hook} that will be executed inside \DescRef{maincls.cmd.pagestyle}, -just before the page style is selected. Within the \PName{code}, you can use -\texttt{\#1} as a place-holder for the argument of -\DescRef{maincls.cmd.pagestyle}. - -The \Macro{AfterSelectAnyPageStyle} command works similarly, but the -\PName{code} will be executed just after the page style has been selected and -after \DescRef{\LabelBase.cmd.currentpagestyle} has been set to the name of -the real page style. - -Note\textnote{Attention!} that the \PName{code} of both commands is executed -only if a page style is selected with \DescRef{maincls.cmd.pagestyle} and not -if it is chosen in a different way, e.\,g., using -\DescRef{maincls.cmd.thispagestyle}. Note also that you cannot remove -\PName{code} from the hook after adding it. But the \PName{code} will be added -locally, so you can use a group to limit the scope of the \PName{code}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{DeclarePageStyleAlias}\Parameter{page~style~alias~name} - \Parameter{original~page~style~name} - \Macro{DeclareNewPageStyleAlias}\Parameter{page~style~alias~name} - \Parameter{original~page~style~name} - \Macro{ProvidePageStyleAlias}\Parameter{page~style~alias~name} - \Parameter{original~page~style~name} - \Macro{RedeclarePageStyleAlias}\Parameter{page~style~alias~name} - \Parameter{original page style name} -\end{Declaration} -\BeginIndex{}{page style>alias}% -\BeginIndex{}{alias>page style}% -These commands can be used to define a page style with name \PName{page style - alias name} that is simply an alias for an existing page style with the -name \PName{original page style name}. If there is already a page style -\PName{page style alias name}, using \Macro{DeclarePageStyleAlias} or -\Macro{RedeclarePageStyleAlias} will destroy the alias before recreating it. - -\Macro{DeclareNewPageStyleAlias} will throw an error message if a page style -\PName{page style alias name} has already been defined. It does not matter if -the previously defined page style is a layer-page style, a page style alias, -or another page style. - -\Macro{ProvidePageStyleAlias} will define the alias only if the -\PName{page style alias name} page style has not been defined before. If the -\PName{page style alias name} page style already exists, nothing will be done. - -\Macro{RedeclarePageStyleAlias} expects an existing -\PName{page style alias name} page style. It will destroy that page style and -afterwards define the alias. If the \PName{page style alias name} page style -does not exist, you will get an error.% -\iffree{\csname @tempswafalse\endcsname}{\csname @tempswatrue\endcsname}% -\csname if@tempswa\endcsname% Umbruchkorrekturtext - \begin{Example} - Suppose you write a class and use the \PageStyle{chapter} page style for the - first page of each chapter. By default, this page style should match the - \PageStyle{plain} page style. Therefore, you can use the \Package{scrlayer} - package and use -\begin{lstcode} - \DeclareNewPageStyleAlias{chapter}{plain} -\end{lstcode} - to define the \PageStyle{chapter} page style as an alias for the - \PageStyle{plain} page style. If, on the other hand, you later decide that - the \PageStyle{chapter} plage style should correspond to the - \PageStyle{empty} page style, you can achieve this with: -\begin{lstcode} - \RedeclarePageStyleAlias{chapter}{empty} -\end{lstcode}% - \end{Example}% -\fi -\EndIndexGroup - - -\begin{Declaration} - \Macro{DestroyPageStyleAlias}\Parameter{page~style~name}% -\end{Declaration} -\BeginIndex{}{page style>alias}% -\BeginIndex{}{alias>page style}% -This command renders the page style named \PName{page style name} undefined -for \LaTeX{} if it is an alias for another page style. Afterwards, the page -style can be newly defined with -\DescRef{\LabelBase.cmd.DeclareNewPageStyleAlias} or -\DescRef{\LabelBase.cmd.ProvidePageStyleAlias}.% -\iffalse % See the note at the beginning of the end user interface section -\par -This command is intended to be used inside the argument code of -\DescRef{\LabelBase.cmd.scrlayerOnAutoRemoveInterface} to remove page styles -that have been declared as part of an end-user interface when removing this -interface automatically.% -\fi% -\EndIndexGroup - - -\begin{Declaration} - \Macro{GetRealPageStyle}\Parameter{page~style~name}% -\end{Declaration} -\BeginIndex{}{page style>alias}% -\BeginIndex{}{alias>page style}% -This command will result in the (recursive) real page name of the page style -if \PName{page style name} is an alias of another page style. In all other -cases, even if there's no alias and no page style named \PName{page style - name}, the result is simply \PName{page style name}. The command is fully -expandable and may be used, e.g., in the second argument of \Macro{edef}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{DeclarePageStyleByLayers}\OParameter{option list} - \Parameter{page style name} - \Parameter{layer list} - \Macro{DeclareNewPageStyleByLayers}\OParameter{option list} - \Parameter{page style name} - \Parameter{layer list} - \Macro{ProvidePageStyleByLayers}\OParameter{option list} - \Parameter{page style name} - \Parameter{layer list} - \Macro{RedeclarePageStyleByLayers}\OParameter{option list} - \Parameter{page style name} - \Parameter{layer list} -\end{Declaration} -\BeginIndex{}{page style>layers}% -\BeginIndex{}{layers>page style}% -These commands declare a page style named \PName{page style name}. The page -style will consist of the layers given in \PName{layer list}, a comma -separated list of layer names. Note\textnote{Attention!} that the \PName{page - style name} and the layer names in the \PName{layer list} must be fully -expandable and should expand to letters. Several other characters are also -accepted, but their use is recommended only for experienced users. - -The \PName{option list} is a comma-separated list of options in the form -\texttt{\PName{key}=\PName{value}}. These options may be used to set -additional features. Currently they are used to set the code that should be -expanded or executed at several hooks\Index{hooks}. See the introduction to -this section for more general information about hooks. See -\autoref{tab:scrlayer.pagestyle.hooks} for detailed information on specific -hooks. - -\begin{desclist} - \desccaption{% - Hook options for page styles (in order of - execution)\label{tab:scrlayer.pagestyle.hooks}% - }{% - Hook options for page styles (\emph{continued})% - }% - \entry{\OptionVName{onselect}{code}}{% - The \PName{code} of this hook\Index{hook} is executed whenever the page - style is selected, for example with \DescRef{maincls.cmd.pagestyle}. Note - that \DescRef{maincls.cmd.thispagestyle} itself does not directly select a - page style. In this case, the page style is only activated within \LaTeX's - output routine.% - }% - \entry{\OptionVName{oninit}{code}}{% - The \PName{code} of this hook\Index{hook} is executed whenever the output - of the page style's layers is initialised. Note that this happens twice - for each page: once for background layers and once for foreground layers.% - }% - \entry{\OptionVName{ononeside}{code}}{% - The \PName{code} of this hook\Index{hook} is executed whenever the output - of the page style's layers in one-sided printing is initialised. Note that - this happens twice for each page: once for background layers and once for - foreground layers.% - }% - \entry{\OptionVName{ontwoside}{code}}{% - The \PName{code} of this hook\Index{hook} is executed whenever the output - of the page style's layers in two-sided printing is initialised. Note that - this happens twice for each page: once for background layers and once for - foreground layers.% - }% - \entry{\OptionVName{onoddpage}{code}}{% - The \PName{code} of this hook\Index{hook} is executed whenever the output - of the page style's layers on an odd page is initialised. Note that this - happens twice for each page: once for background layers and once for - foreground layers. Note also that in one-sided printing all pages are odd - pages, not just those with odd page numbers.% - }% - \entry{\OptionVName{onevenpage}{code}}{% - The \PName{code} of this hook\Index{hook} is executed whenever the output - of the page style's layers on an even page is initialised. Note that this - happens twice for each page: once for background layers and once for - foreground layers. Note also that in one-sided printing there are no even - pages. Instead, all pages are treated as odd pages, not just those with - odd page numbers.% - }% - \entry{\OptionVName{onfloatpage}{code}}{% - The \PName{code} of this hook\Index{hook} is executed whenever the output - of the page style's layers on a float page is initialised. Note that this - happens twice for each page: once for background layers and once for - foreground layers. Note also that float pages are only those pages with - one or more p-placed floating environments.% - }% - \entry{\OptionVName{onnonfloatpage}{code}}{% - The \PName{code} of this hook\Index{hook} is executed whenever the output - of the page style's layers on a non-float page is initialised. Note that - this happens twice for each page: once for background layers and once for - foreground layers. Note also that float pages are only the pages on which - one or more p-placed floating environments are output. Other pages may - well have t-, h-, or b-placed floating environments.% - }% - \entry{\OptionVName{onbackground}{code}}{% - The \PName{code} of this hook\Index{hook} is executed whenever the output - of the page style's background layers is initialised. Note that this - happens once each page.% - }% - \entry{\OptionVName{onforeground}{code}}{% - The \PName{code} of this hook\Index{hook} is executed whenever the output - of the page style's foreground layers is initialised. Note that this - happens once each page.% - }% -\end{desclist} - -\iffalse% Umbruchvarianten - While the \Macro{DeclarePageStyleByLayers} command always defines the page - style, \Macro{DeclareNewPageStyleByLayers} generates an error message if a - page style with the same name already exists. Note\textnote{Attention!} that - the declaration of a page style that is already an alias for another page - style (see, for example, \Macro{DeclareAliasPageStyle} earlier in this - section) will redefine not the specified page style alias but the real page - style (see \DescRef{\LabelBase.cmd.GetRealPageStyle} earlier in this - section).% -\else% - The \Macro{DeclarePageStyleByLayers} command defines the page style - regardless of whether a page style of \PName{page style name} already - exists. If necessary, the existing page style is completely - redefined. However, if a page style alias \PName{page style name} already - exists, the associated real page style, not the page style alias itself, is - redefined (see \DescRef{\LabelBase.cmd.GetRealPageStyle} earlier in this - section). - - The \Macro{DeclareNewPageStyleByLayers} command differs if a page style of - the same name already exists. Regardless of whether it is a real or an alias - page style, an error will be reported in this case. -\fi - -In contrast, \Macro{ProvidePageStyleByLayers} preserves the page style -unchanged if a page style with name \PName{page style name} already exists. If -no such page style exists, it is defined as in -\Macro{DeclarePageStyleByLayers}. - -The \Macro{RedeclarePageStyleByLayers} in turn expects that a page style of -of the name \PName{page style name} already exists and then redefines its real -page style. However, if no page style of the specified name exists, an error -message results. - -Also note the remarks below about the pseudo-page style -\PageStyle{@everystyle@}.% -\EndIndexGroup - - -\begin{Declaration} - \PageStyle{@everystyle@}% - \PageStyle{empty} -\end{Declaration} -\BeginIndex{}{page style>layers}% -\BeginIndex{}{layers>page style}% -The \Package{scrlayer} package defines two specific page styles worth noting. -The first of these is \PageStyle{@everystyle@}% -\important{\PageStyle{@everystyle@}}. This page style should never be used -like a normal page style, for example with \DescRef{maincls.cmd.pagestyle} or -\DescRef{maincls.cmd.thispagestyle}, or as the target of a page-style alias. -Instead, the layers and hooks\Index{hooks} of this page style are used by all -other layer page styles. The hooks of \PageStyle{@everystyle@} are placed in -front of their respective hooks, and the layers in front of the respective -layers, of the active page style. - -Thus adding a layer to the pseudo-page style \PageStyle{@everystyle@} or code -to a hook of this page style is like adding a layer or hook code to all layer -page styles, even the empty one. There's one crucial difference: commands that -reference the layers of a page style which include -\DescRef{\LabelBase.cmd.ForEachLayerOfPageStyle}, e.\,g., the commands -\DescRef{\LabelBase.cmd.AddLayersToPageStyleBeforeLayer} or -\DescRef{\LabelBase.cmd.AddLayersToPageStyleAfterLayer}, disregard the layers -of the page style \PageStyle{@everystyle@} when applied to a different layer -page style. - -The second, slightly different page style is \PageStyle{empty}. Normally the -\LaTeX{} kernel defines the \PageStyle{empty} page style to have an empty -header and footer. The \Package{scrlayer} package redefines this page style as -a layerless page style. Nonetheless, you can use it like any other layer page -style. The main advantage of the layer page style over the original page -style from the \LaTeX{} kernel is that it also executes the hooks and layers -of the psuedo-layer page style \PageStyle{@everystyle@}.% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{onpsselect}{code}% - \OptionVName{onpsinit}{code}% - \OptionVName{onpsoneside}{code}% - \OptionVName{onpstwoside}{code}% - \OptionVName{onpsoddpage}{code}% - \OptionVName{onpsevenpage}{code}% - \OptionVName{onpsfloatpage}{code}% - \OptionVName{onpsnonfloatpage}{code}% - \OptionVName{onpsbackground}{code}% - \OptionVName{onpsforeground}{code} -\end{Declaration} -\BeginIndex{}{page style>layers}% -\BeginIndex{}{layers>page style}% -There is also a \KOMAScript{} option for each of the hooks\Index{hooks} in -\autoref{tab:scrlayer.pagestyle.hooks}% -\iftrue -. The names of the \KOMAScript{} options are similar to those for declaring -page style layers, except that a ``\texttt{ps}'' is inserted after -``\texttt{on}'' at the beginning of the name -\else -, into the names of which a ``\texttt{ps}'' is inserted -\fi -. The values of these \KOMAScript{} options are used as the initial values for -the corresponding hooks. These initial values are then extended by all the -values assigned to the corresponding hooks in the \PName{option list} of the -declaration commands. You can remove the default with -\DescRef{\LabelBase.cmd.ModifyLayerPageStyleOptions}, which is explained later -in this section.% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{singlespacing}{simple switch} -\end{Declaration} -If\ChangedAt{v3.24}{\Package{scrlayer}\and \Package{scrlayer-scrpage}} a -document is printed with increased line spacing, e.\,g., using the -\Package{setspace}\IndexPackage{setspace}\important{\Package{setspace}} -package, it is often undesirable for the header and footer to be printed with -this increased spacing. This is particularly true if the header and footer -consist of only a single line. In this case you can use \KOMAScript{} option -\Option{singlespacing}. However, the default\textnote{default} is -\OptionValue{singlespacing}{false}! The option generally applies to all layer -page styles. If you want single-spacing for only some page styles, use -\OptionValue{oninit}{\Macro{linespread}\PParameter{1}\Macro{selectfont}} for -those page styles.% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{deactivatepagestylelayers}{simple switch}% - \Macro{ForEachLayerOfPageStyle}\Parameter{page style name}\Parameter{code}% - \Macro{ForEachLayerOfPageStyle*}\Parameter{page style name}\Parameter{code} -\end{Declaration} -\BeginIndex{}{page style>layers}% -\BeginIndex{}{layers>page style}% -As long as the \KOMAScript{} option \Option{deactivatepagestylelayers} is not -enabled, the \Macro{ForEachLayerOfPageStyle} command can execute arbitrary -\PName{code} for each layer of the page style named \PName{page style name}. -Inside of \PName{code}, the place holder \PValue{\#1} serves as a -reference to the name of the current layer. -\begin{Example} - If you want to print the names of all layers of the \PValue{scrheadings} - page style as a comma-separated list, you can use: -\begin{lstcode} - \let\commaatlist\empty - \ForEachLayerOfPageStyle{scrheadings}{% - \commaatlist#1\gdef\commaatlist{, }} -\end{lstcode} -\end{Example} -In\textnote{Attention!} the example above, we had to use \Macro{gdef} instead -of \Macro{def} because \Macro{ForEachLayerOfPageStyle} executes the -\PName{code} inside a group to minimise side effects. However, \Macro{gdef} -redefines \Macro{commaatlist} globally so the change will persist when the -\PName{code} for the next layer is executed. - -Alternatively,\ChangedAt{v3.18}{\Package{scrlayer}} you can use \Macro{def} -with the starred variant \Macro{ForEachLayerOfPageStyle*}. This form dispenses -with the extra group when executing \PName{code}. However, the user then has -to take make sure that the \PName{code} has no unwanted side effects. In -particular, deactivating all layers using -\OptionValue{deactivatepagestylelayers}{true} within \PName{code} would -persist beyond the call to \Macro{ForEachLayerOfPageStyle*}. - -Various \Package{scrlayer} commands also use \Macro{ForEachLayerOfPageStyle} -internally. Their behaviour can therefore also be changed using the -\KOMAScript{} option \Option{deactivatepagestylelayers}. With this option, -you can temporarily disable and thus hide all layers of all layer page -styles.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{AddLayersToPageStyle}% - \Parameter{page style name}\Parameter{layer list}% - \Macro{AddLayersAtBeginOfPageStyle}% - \Parameter{page style name}\Parameter{layer list}% - \Macro{AddLayersAtEndOfPageStyle}% - \Parameter{page style name}\Parameter{layer list}% - \Macro{RemoveLayersFromPageStyle}% - \Parameter{page style name}\Parameter{layer list}% -\end{Declaration} -\BeginIndex{}{page style>layers}% -\BeginIndex{}{layers>page style}% -You can use these commands to add layers to a layer page style or to remove -layers from a layer page style. The page style is referenced by its -\PName{page style name}. The layers are given by a comma-separated -\PName{layer list}. - -Both the \Macro{AddLayersToPageStyle} and the -\Macro{AddLayersAtEndOfPageStyle}\textnote{add at the end} commands insert the -new layers at the bottom of the page style's layer list. Logically, the newly -added layers lie above or in front of the old layers. Background layers, of -course, still are logically behind the text layer and thus behind all -foreground layers. - -In contrast, the \Macro{AddLayersAtBeginOfPageStyle}\textnote{add at the - beginning} command inserts the new layers at the top of the page style's -layer list. The layers are separately inserted to the top of the list in the -same order they appear in the \PName{layer list} parameter. This means that -the last layer in the \PName{layer list} parameter will become the first, and -thus the lowest, layer of the page style. - -\iffalse% Umbruchkorrekturtext (beim Aktiveren muss unten \textnote{remove} -% entfernt werden!) -The \Macro{RemoveLayersFromPageStyle} command is exactly the opposite. It -removes\textnote{remove} the specified page-style levels.% -\fi - -The \Macro{RemoveLayersFromPageStyle}\textnote{remove} command removes layers -from the layer list of the page style named \PName{page style name}. -Attempting to remove layers which are not part of the page style's layer list -will be ignored. But attempting to add layers to or remove layers from a page -style that is neither a layer page style nor a page-style alias is an error -and will be reported as such.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{AddLayersToPageStyleBeforeLayer}% - \Parameter{page style name}\Parameter{layer list}% - \Parameter{reference layer name}% - \Macro{AddLayersToPageStyleAfterLayer}% - \Parameter{page style name}\Parameter{layer list}% - \Parameter{reference layer name} -\end{Declaration} -\BeginIndex{}{page style>layers}% -\BeginIndex{}{layers>page style}% -\iffalse% Umbruchvarianten -These two commands are similar to the previous ones, but they take an -additional parameter, \Parameter{reference layer name}. The layer list of -the page style named in \Parameter{page style name} is searched for this -reference layer. % -\else% -These commands are similar to the previous ones. The existing layers of the -page style, however, are searched for the \PName{reference layer name}. % -\fi% -The layers in the \Parameter{layer list} parameter are then inserted -before\textnote{add before/after layer} or after this reference layer% -\iffalse% Umbruchkorrekturtext -in the layers of the page style% -\fi% -. The order of the layers in the \PName{layer list} is retained. - -If the reference layer named \PName{reference layer name} is not part of the -given page style, nothing is inserted. On the other hand, if the page style is -neither a layer page style nor a page-style alias, an error will be reported.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{UnifyLayersAtPageStyle}\Parameter{page style name} -\end{Declaration} -\BeginIndex{}{page style>layers}% -\BeginIndex{}{layers>page style}% -The commands for defining page styles or adding layers to a page style do not -care how many times a layer appears in a page style, so it is quite -permissible for a layer to appear multiple times. In most cases, however, it -does not make sense to use the same layer several times in one page style. -Therefore, you can use \Macro{UnifyLayersAtPageStyle} to remove all layer -duplicates from the layer page style of the specified \Parameter{page style - name}. - -Note\textnote{Attention!} that this function can change the order of layers. -So if you need a specific order, you should remove all layers and add the -layers in the order you want instead of using \Macro{UnifyLayersAtPageStyle}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{ModifyLayerPageStyleOptions}% - \Parameter{page style name}\Parameter{option list}% - \Macro{AddToLayerPageStyleOptions}% - \Parameter{page style name}\Parameter{option list} -\end{Declaration} -\BeginIndex{}{page style>layers}% -\BeginIndex{}{layers>page style}% -These two commands can be used to modify the options, and thus the -hooks\Index{hooks}, of a layer page style. With -\Macro{ModifyLayerPageStyleOptions}\textnote{change page-style options}, only -the options in the comma-separated \PName{option list} will be set to the new -values given there. The previous values are lost. All options from -\autoref{tab:scrlayer.pagestyle.hooks}, -\autopageref{tab:scrlayer.pagestyle.hooks} are allowed. Options or hooks that -are not specified in the \PName{option list} will remain unchanged. If you -want to set an option to do nothing you can set it to the value \Macro{relax}. -Setting an option to a new value using \Macro{ModifyLayerPageStyleOptions} -will remove the previous value, including the global default value. This -statement is the only way to remove the global defaults of the \KOMAScript{} -options from a page style. - -\Macro{AddToLayerPageStyleOptions}\textnote{extend page-style options}, on the -other hand, does not overwrite the previous values. Instead it adds\,---\,or, -more precisely, concatenates\,---\, the new values to old ones.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{IfLayerPageStyleExists}% - \Parameter{page style name}\Parameter{then code}\Parameter{else code}% - \Macro{IfRealLayerPageStyleExists}%^ - \Parameter{page style name}\Parameter{then code}\Parameter{else code}% -\end{Declaration} -\BeginIndex{}{page style>layers}% -\BeginIndex{}{layers>page style}% -With these commands, you can execute code depending on whether a page style is -a layer page style or not. The \Macro{IfLayerPageStyleExists} command executes -the \PName{then code} if \PName{page style name} is the name of a layer page -style or a page-style alias that results in a layer page style. Otherwise, the -command executes the \PName{else code}. Internally, this command is often used -to throw an error message if you use one of the layer page style commands with -an \PName{page style name} that does not correspond to a layer page style. - -The \Macro{IfRealLayerPageStyleExists} command goes one step further and -executes the \PName{then code} only if the page style specified by \PName{page - style name} is itself a layer page style. So if \PName{page style name} is a -page-style alias, this command executes the \PName{else code} even if the -alias resolves to a real layer page style.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{IfLayerAtPageStyle}% - \Parameter{page style name}\Parameter{layer name}% - \Parameter{then code}\Parameter{else code}% - \Macro{IfSomeLayerAtPageStyle}% - \Parameter{page style name}\Parameter{layer list}%^ - \Parameter{then code}\Parameter{else code}% - \Macro{IfLayersAtPageStyle}% - \Parameter{page style name}\Parameter{layer list}% - \Parameter{then code}\Parameter{else code}% -\end{Declaration} -\BeginIndex{}{page style>layers}% -\BeginIndex{}{layers>page style}% -These commands can be used to test whether one or more layers are part of a -page style. The \Macro{IfLayerAtPageStyle} command expects exactly one -\PName{layer name}\textnote{exactly one layer} as the second argument. If this -layer is part of the page style specified in \PName{page style name}, the -\PName{then code} will be executed. Otherwise, the \PName{else code} will be -executed. - -The \Macro{IfSomeLayerAtPageStyle} and \Macro{IfLayersAtPageStyle} commands -allow a comma-separated \PName{layer list}. \Macro{IfSomeLayerAtPageStyle} -will execute the \PName{then code} if \emph{at least one} of the layers in the -\PName{layer list} parameter is part of the layer list of \PName{page style - name}. In contrast, \Macro{IfLayersAtPageStyle} executes the \PName{then - code} only if \emph{all} the layers in the \PName{layer list} parameter are -part of the page style. If the condition is not met, the \PName{else code} -will be executed. - -With suitable nesting of these commands, you can construct complex conditions. -If you use only one \PName{layer name} in the \PName{layer list}, all three -statements are synonymous.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{DestroyRealLayerPageStyle}\Parameter{page style name} -\end{Declaration} -\BeginIndex{}{page style>layers}% -\BeginIndex{}{layers>page style}% -\iftrue -This statement makes a layer page style undefined. If a page-style alias or -ordinary page style is specified, the command is ignored. -\else -With this command you can remove a the definition of a layer page style. -However, this only occurs if a layer page style named \PName{page style name} -exists. If, instead, it is a page-style alias, a different (non-layer) page -style, or not a page style at all, nothing happens; the command is ignored.% -\fi - -If \PName{page style name} is the name of the current page style, the current -page style will becomes a kind of empty page style. If the page style set with -\DescRef{maincls.cmd.thispagestyle} is \PName{page style name}, it will simply -be reset. The previous \DescRef{maincls.cmd.thispagestyle} command loses its -current effect. - -Note\textnote{Attention!} that the layers of the page style are not destroyed -automatically. If you want to destroy the layers too, you can do this with: -\begin{lstcode} - \ForEachLayerOfPageStyle{...}{\DestroyLayer{#1}} -\end{lstcode} -before destroying the layer page style itself.% -\iffalse % See the note at the beginning of the end user interface section -\par -The command is intended to be used within the \PName{code} argument of -\DescRef{\LabelBase.cmd.scrlayerOnAutoRemoveInterface} to remove page styles -that are defined as part of an end-user interface. See -\autoref{sec:scrlayer.enduserinterfaces} below for more information about -auto-removal code.% -\fi% -\EndIndexGroup -\EndIndexGroup - -\LoadCommonFile{headfootheight}% \section{Height of Page Head and Foot} - -\LoadCommonFile{pagestylemanipulation}% \section{Manipulation of Defined Page Styles} - -\section{Defining and Managing Interfaces for End Users} -\seclabel{enduserinterfaces} - -\iftrue% The whole mechanism is deprecated and should not be used any - % longer. So the documentation is also deactivated. -% TODO: Fix new translation -Until version 3.27\ChangedAt{v3.28}{\Package{scrlayer}} package -\Package{scrlayer} provided mechanism to manage concurrent end user -interfaces. The mechanism has been marked as experimental and the usability -limited. Only \KOMAScript{} itself has used this mechanism and from version -3.28 it is marked as deprecated. So the commands -\Macro{scrlayerInitInterface}\IndexCmd{scrlayerInitInterface}, -\Macro{scrlayerAddToInterface}\IndexCmd{scrlayerAddToInterface}, -\Macro{scrlayerAddCsToInterface}\IndexCmd{scrlayerAddCsToInterface}, -\Macro{scrlayerOnAutoRemoveInterface}\IndexCmd{scrlayerOnAutoRemoveInterface}% -\important{\Macro{scrlayerOnAutoRemoveInterface}} -and the options -\Option{forceoverwrite}\IndexOption{forceoverwrite}, -\Option{autoremoveinterfaces}\IndexOption{autoremoveinterfaces} -should not be used any longer.% -% :ODOT -\else% -The \Package{scrlayer} package provides an experimental interface to define -and manage (concurrent) interfaces for end users. \iffree{In the long run, - this interface may disappear from \Package{scrlayer} and be taken over by - \Package{scrbase} instead.}{} Currently, this interface is highly -experimental% -\iffree{ and therefore \Package{scrlayer} provides these interface commands - only for the use of subpackages of \Package{scrlayer}}{}% -. Given the current state of development, you should not depend on automatic -removal of a concurrent interface to work. Instead, you should avoid using -concurrent end-user interfaces. - -This section only describes the interface commands for defining an end-user -interface. For end users themselves, it is of little interest. Rather, this -section is intended for authors of packages and classes that build on -\Package{scrlayer}. End users will find information about specific end-user -interfaces in \autoref{cha:scrlayer-scrpage}, -\autoref{cha:scrlayer-scrpage-experts}, and \autoref{cha:scrlayer-notecolumn}. - -\begin{Declaration} - \Macro{scrlayerInitInterface}\OParameter{interface name} -\end{Declaration} -The \Macro{scrlayerInitInterface} command registers a new interface named -\PName{interface name}. The \PName{interface name} must be unique. If an -interface with the same name has already been registered, an error will occur. - -This command should always appear as the first command when defining an -end-user interface and therefore is described here first. If the optional -argument\,---\,including the square brackets\,---\,is omitted, -\PValue{\Macro{@currname}.\Macro{@currext}} will be used instead. For classes -and packages, this is the file name of the class or package. But of course you -can use any other sequence of characters with a category of \emph{letter} or -\emph{other}. This is useful, for example, when a class or package defines -multiple end-user interfaces% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{forceoverwrite}{simple switch}% - \OptionVName{autoremoveinterfaces}{simple switch}% - \Macro{scrlayerAddToInterface}% - \OParameter{interface name}\Parameter{command}\Parameter{code}% - \Macro{scrlayerAddCsToInterface}% - \OParameter{interface name}\Parameter{command sequence}\Parameter{code} -\end{Declaration} -One of the special features of \Package{scrlayer}'s end user interfaces is -that they should register all interface-dependent commands (also known as -\emph{macros}). You can do this using \Macro{scrlayerAddToInterface}. The -optional argument \PName{interface name} must be an interface name previously -registered with \DescRef{\LabelBase.cmd.scrlayerInitInterface}. An error will -occur if the interface has not been initialised. - -If\textnote{Attention!} your interface defines macros not just when the class -or package is being loaded but also at runtime, you must provide the interface -name in the optional argument even if it corresponds to the file name of the -class or package, since the values of \Macro{@currname} and \Macro{@currext} -are only valid while the class or package is being loaded. - -The first mandatory argument is the \PName{command}\footnote{The - \PName{command} consists of a backslash followed by a \PName{command - sequence} that consists of characters of the category code \emph{letter}, - or of exactly one character of the category \emph{other}, or of a character - of the category \emph{active} (without the backslash).} to be added to the -interface. If the command can be defined, this will be done. In addition, it -will set to \Macro{relax} and \PName{code} will be executed. Within -\PName{code}, you can then define \PName{command}, e.\,g., using -\Macro{newcommand}. - -But when can a command be defined? If a command is undefined or \Macro{relax}, -it can always be defined. If a command has already been defined \emph{and} -registered for another interface \emph{and} if the \KOMAScript{} option -\Option{autoremoveinterfaces} has been activated, the other interface will be -removed automatically, and the \PName{command} will be set to \Macro{relax} -and registered for the new interface specified. If a \PName{command} is -already defined but is \emph{not} part of another interface, \emph{and} if the -\KOMAScript{} option \Option{forceoverwrite} has been activated, the -\PName{command} is also set to \Macro{relax} and registered for the specified -interface. In all other cases, however, the command is not definable, in -particular if it is already defined and the \KOMAScript{} options -\Option{autoremoveinterfaces} and \Option{forceoverwrite} are deactivated. - -The \Macro{scrlayerAddCsToInterface} command is similar to -\Macro{scrlayerAddToInterface} but it expects the first argument to be not a -\PName{command} but a command sequence\footnote{A command sequence must be - fully expandable and its expansion must result in characters of the category - code \emph{letter}, \emph{other}, or \emph{space}.}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{scrlayerOnAutoRemoveInterface}% - \OParameter{interface name}\Parameter{code} -\end{Declaration} -The \Macro{scrlayerOnAutoRemoveInterface} command registers \PName{code} to be -executed in the event that the end-user interface with the specified -\PName{interface name} is automatically removed (see -\DescRef{\LabelBase.option.autoremoveinterfaces} earlier in this section). -This can be used, for example, to automatically destroy layers or page styles -that rely on commands from the end-user interface (see -\DescRef{\LabelBase.cmd.DestroyLayer}, -\DescRef{\LabelBase.cmd.DestroyPageStyleAlias}, and -\DescRef{\LabelBase.cmd.DestroyRealLayerPageStyle}). Regarding the default for -the optional argument, please refer to the explanation for -\DescRef{\LabelBase.cmd.scrlayerInitInterface}.% -\EndIndexGroup% -\fi% -% -\EndIndexGroup - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% coding: us-ascii -%%% ispell-local-dictionary: "en_GB" -%%% TeX-master: "../guide" -%%% End: - - diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrlfile.tex b/macros/latex/contrib/koma-script/source-doc/english/scrlfile.tex deleted file mode 100644 index cdcf20657e..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrlfile.tex +++ /dev/null @@ -1,702 +0,0 @@ -% ====================================================================== -% scrlfile.tex -% Copyright (c) Markus Kohm, 2001-2021 -% -% 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. -% ---------------------------------------------------------------------- -% scrlfile.tex -% Copyright (c) Markus Kohm, 2001-2021 -% -% 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. -% ====================================================================== -% -% Chapter about scrlfile of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------------- -% -% Kapitel ueber scrlfile in der KOMA-Script-Anleitung -% Verwaltet von Markus Kohm -% -% ============================================================================ - -\KOMAProvidesFile{scrlfile.tex} - [$Date: 2021-11-01 13:25:07 +0100 (Mo, 01. Nov 2021) $ - KOMA-Script guide (chapter: scrlfile)] -\translator{Gernot Hassenpflug\and Markus Kohm\and Karl Hagen} - -% Date of the translated German file: 2021-11-01 - -\chapter{Controlling Package Dependencies with \Package{scrlfile}} -\labelbase{scrlfile} -\BeginIndexGroup -\BeginIndex{Package}{scrlfile} - -The introduction of \LaTeXe{} in 1994 brought many changes in the handling of -\LaTeX{} extensions. The package author today has a whole series of macros -available to determine if another package or class has been loaded and whether -specific options are being used. The package author can even load other -packages or specify certain options in case the package is loaded later. This -has led to the expectation that the order in which package are loaded would -not be important. Sadly, this hope has not been fulfilled. - -\section{About Package Dependencies} -\seclabel{dependency} -%\begin{Explain} -More and more often, different packages either newly define or redefine the -same macro. In such a case, the order in which a package is loaded becomes -very important. Sometimes, users find it very difficult to understand the -resulting behaviour. Sometimes it is necessary to react in a specific way when -another package is loaded. - -As a simple example, consider loading the \Package{longtable} package with a -\KOMAScript{} document class. The \Package{longtable} package defines its own -table captions. These are perfectly suited to the standard classes, but they -do not match the default settings for \KOMAScript{} captions, nor do they -react to the relevant configuration options. To solve this problem, the -\Package{longtable} package commands which are responsible for the table -captions need to be redefined. However, by the time the \Package{longtable} -package is loaded, the \KOMAScript{} class has already been processed. - -Previously, the only way to solve this problem was to delay the redefinition -until the beginning of the document using \Macro{AtBeginDocument}. However, if -users want to change the relevant commands themselves, they should do so in -the preamble of the document. But this is impossible because \KOMAScript{} -will overwrite the users' definitions at \Macro{begin}\PParameter{document}. -They would also need to perform the redefinition with \Macro{AtBeginDocument}. - -But \KOMAScript{} does not actually need to wait for -\Macro{begin}\PParameter{document} to redefine the macros. It would be -sufficient to postpone the redefinition until after the \Package{longtable} -package has been loaded. Unfortunately, the \LaTeX{} kernel does not define -necessary commands. The \Package{scrlfile} package provides a remedy for this -problem. - -It is also conceivable that you would like to save the definition of a macro -in a temporary macro before a package is loaded and restore it after the -package has been loaded. The \Package{scrlfile} package allows this, too. - -The use of \Package{scrlfile} is not limited to package dependencies. -Dependencies can also be considered for any other file. For example, you can -ensure that loading the not unimportant file \File{french.ldf} automatically -leads to a warning. - -Although the package is particularly of interest for package authors, there -are also applications for normal \LaTeX{} users. Therefore, this chapter -gives examples for both groups. -%\end{Explain} - -\begin{Declaration} - \Option{withdeprecated} -\end{Declaration} -With\ChangedAt{v3.32}{\Package{scrlfile}} \LaTeX{} 2020-10-01 a completely new -hook mechanism is available. Instead of redefining macros of the \LaTeX{} -kernel, \Package{scrlfile} 3.32 and newer makes use of it. For this purpose it -loads the internal package -\Package{scrfile-hook}\IndexPackage[indexmain]{scrlfile-hook}. With older -\LaTeX{} versions, depending\ChangedAt{v3.35}{\Package{scrlfile}} on the -kernel version, either the internal package -\Package{scrlayer-hook-3.34}\IndexPackage[indexmain]{scrlfile-hook-3.34} or -\Package{scrlayer-patcholdkernel}% -\IndexPackage[indexmain]{scrlfile-patcholdkernel} is used. However, since it -was not possible to achieve identical functionality with the new mechanism in -\LaTeX, some commands of \Package{scrlfile} were marked as -deprecated. Furthermore, the opportunity was taken to organize the -proliferation of command variants. If a user uses a class or package that is -still based on the commands that are no longer supported by -\Package{scrlfile}, the package \Package{scrlfile} can be loaded with -\begin{lstcode} - \RequirePackage[withdeprecated]{scrlfile} -\end{lstcode} -before loading the class. \Package{scrlfile} then additionally emulates some -of the deprecated commands in a way that should be sufficient in most -cases. In any case, the author of the corresponding class or package should be -informed, so that he or she can make an adaptation to the current version of -\Package{scrlfile} or directly to \LaTeX{} from version 2021-11-15.% -% -\EndIndexGroup - -\section{Actions Before and After Loading} -\seclabel{macros} - -The \Package{scrlfile} package can execute actions both before and after -loading files. The commands used to do so distinguish between ordinary files, -classes, and packages. - -\begin{Declaration} - \Macro{BeforeFile}\Parameter{file}\OParameter{label}\Parameter{commands}% - \Macro{AfterFile}\Parameter{file}\OParameter{label}\Parameter{commands} -\end{Declaration}% -\Macro{BeforeFile} ensures that the \PName{commands} are executed before the -next time \PName{file} is loaded. \Macro{AfterFile} works in a similar -fashion, and the \PName{commands} will be executed after the \PName{file} has -been loaded. Of course, if \PName{file} is never loaded, the \PName{commands} -will never be executed. For \PName{file}, you should specify any extensions as -part of the file name, as you would with \Macro{input}. - -To implement those featuresfor \LaTeX{} before version 2020-10-01, -\Package{scrlfile-patcholdlatex} redefines the well-known \LaTeX{} command -\Macro{InputIfFileExists}. If this command does not have the expected -definition, \Package{scrlfile-patcholdlatex} issues a warning. This occurs in -case the command has already been redefined by an incompatible package. - -With\ChangedAt{v3.32}{\Package{scrlfile}}\IndexCmd{AddToHook} \LaTeX{} from -version 2020-10-01 on, \Package{scrlfile-hook} uses -\Macro{AddToHook}\PParameter{file/before/\PName{file}}\OParameter{label}\Parameter{commands} -or -\Macro{AddToHook}\PParameter{file/after/\PName{file}}\OParameter{label}\Parameter{commands}. -For more information on the meaning of the optional argument \PName{label}, -please refer to the corresponding manual of the \LaTeX{} core statement -\Macro{AddToHook}. As a rule, the omission of the optional argument is -recommended. With older \LaTeX{} versions this is ignored anyway. - -\LaTeX{} uses the \Macro{InputIfFileExists} command every time it loads a -file. This occurs regardless of whether the file is loaded with -\Macro{include}, \Macro{LoadClass}, \Macro{documentclass}, \Macro{usepackage}, -\Macro{RequirePackage}, or similar commands. Only -\begin{lstcode} - \input foo -\end{lstcode} -loads the file \texttt{foo} without using -\Macro{InputIfFileExists}. You should therefore always use -\begin{lstcode} - \input{foo} -\end{lstcode} -instead. Notice the parentheses surrounding the file name!% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{BeforeClass}\Parameter{class}\OParameter{label}\Parameter{commands}% - \Macro{BeforePackage}\Parameter{package}\OParameter{label}\Parameter{commands} -\end{Declaration}% -These two commands work the same way as \DescRef{\LabelBase.cmd.BeforeFile}. -The only difference is that the \PName{class} or \PName{package} is specified -with its class or package name and not with its file name. That means you -should omit the file extensions \File{.cls} or \File{.sty}. - -Note,\important{Attention!} \Package{scrlfile-hook} also uses \PValue{file} -and not \PValue{class} or \PValue{package} for the hook. This is the only way -to ensure that the execution of the \PName{commands} already takes place in -the context of the class or package. For the meaning of the optional argument -\PName{label} please refer to the \LaTeX{} core statement -\Macro{AddToHook}\IndexCmd{AddToHook}. As a rule, the omission of the optional -argument is recommended. With older \LaTeX{} versions this is ignored anyway.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{AfterClass}\Parameter{class}\OParameter{label}\Parameter{commands}% - \Macro{AfterClass*}\Parameter{class}\OParameter{label}\Parameter{commands}% - \Macro{AfterAtEndOfClass}\Parameter{class}\OParameter{label}\Parameter{commands}% - \Macro{AfterAtEndOfClass*}\Parameter{class}\OParameter{label}\Parameter{commands}% - \Macro{AfterPackage}\Parameter{package}\OParameter{label}\Parameter{commands}% - \Macro{AfterPackage*}\Parameter{package}\OParameter{label}\Parameter{commands}% - \Macro{AfterAtEndOfPackage}\Parameter{package}\OParameter{label}\Parameter{commands} - \Macro{AfterAtEndOfPackage*}\Parameter{package}\OParameter{label}\Parameter{commands} -\end{Declaration}% -The \Macro{AfterClass} and \Macro{AfterPackage} commands work much like -\DescRef{\LabelBase.cmd.AfterFile}. The only difference is that the -\PName{class} or \PName{package} is specified with its class or package name -and not with its file name. That means you should omit the file extensions -\File{.cls} or \File{.sty}. - -The\important[i]{\Macro{AfterClass*}\\\Macro{AfterPackage*}} starred versions -function somewhat differently. If the class or package has already been -loaded, they execute the \PName{commands} immediately rather than waiting -until the next time the class or package is loaded. - -However\ChangedAt{v3.09}{\Package{scrlfile}}% -\important[i]{\Macro{AfterAtEndOfClass}\\\Macro{AfterAtEndOfPackage}}, code -whose execution is delayed by \Macro{AtEndOfClass} or \Macro{AtEndOfPackage} -within the class or package is first executed afterwards. In contrast, -\Macro{AfterAtEndOfClass} or \Macro{AfterAtEndOfPackage} ensures that -\PName{commands} are executed after such code. - -Again\ChangedAt{v3.32}{\Package{scrlfile}}% -\important[i]{\Macro{AfterAtEndOfClass*}\\\Macro{AfterAtEndOfPackage*}}, there -are star variants that ensure that \PName{commands} are executed immediately -if the class or package is already completely loaded. If a class or package is -currently loaded, the execution is delayed like in the version without star. - -Note that \Package{scrlfile-hook} uses a \PValue{file/after} hook for -\Macro{AfterClass}, \Macro{AfterPackage} and their star variants. In contrast -\Macro{AfterAtEndOfClass} and its star variant set a \PValue{class/after} hook -and \Macro{AfterAtEndOfPackage} and its star variant set a -\PValue{package/after} hook accordingly. For the meaning of the optional -argument \PName{label} please refer to the \LaTeX{} core statement -\Macro{AddToHook}\IndexCmd{AddToHook}. As a rule, the omission of the optional -argument is recommended. With older \LaTeX{} versions this is ignored anyway. - -\begin{Example} - The following example for class and package authors shows how \KOMAScript{} - itself makes use of the new commands. The class \Class{scrbook} contains the - following: -\begin{lstcode} - \AfterPackage{hyperref}{% - \@ifpackagelater{hyperref}{2001/02/19}{}{% - \ClassWarningNoLine{scrbook}{% - You are using an old version of the hyperref - package!\MessageBreak% - This version has a buggy hack in many - drivers,\MessageBreak% - causing \string\addchap\space to behave - strangely.\MessageBreak% - Please update hyperref to at least version - 6.71b}}} -\end{lstcode} - Old versions of the \Package{hyperref} package redefine a macro of the - \Class{scrbook} class in a way that is incompatible with newer \KOMAScript{} - versions. Newer versions of \Package{hyperref} refrain from making this - change if a newer version of \KOMAScript{} is detected. In case - \Package{hyperref} is loaded at a later stage, \Class{scrbook} ensures that - a check for an acceptable version of \Package{hyperref} is performed - immediately after the package is loaded. If this is not the case, a warning - is issued. - - Elsewhere in three of the \KOMAScript{} classes, you can find the following: -\begin{lstcode} - \AfterPackage{caption2}{% - \renewcommand*{\setcapindent}{% -\end{lstcode} - After loading \Package{caption2}, and only if it has been loaded, - \KOMAScript{} redefines its own \DescRef{maincls.cmd.setcapindent} command. - The exact code of the redefinition is irrelevant. The important thing to - note is that \Package{caption2} takes control of the - \DescRef{maincls.cmd.caption} macro and that therefore the normal definition - of the \DescRef{maincls.cmd.setcapindent} command would have no effect. The - redefinition thus improves interoperability with \Package{caption2}. - - There are also, however, instances where these commands are useful to normal - \LaTeX{} users. For example, suppose you create a document from which you - want to generate both a PostScript file, using \LaTeX{} and dvips, and a PDF - file, using \mbox{pdf{\LaTeX}}. The document should also contain hyperlinks. - In the table of contents, you have entries that span several lines. This is - not a problem for the \mbox{pdf{\LaTeX}} method, since here hyperlinks can - be broken across multiple lines. However, this is not possible with the - \Package{hyperref} driver for dvips or \mbox{hyper{\TeX}}. In this case, you - would like \Package{hyperref} to use the \Option{linktocpage} option. The - decision as to which driver is loaded is made automatically by - \File{hyperref}. - - Everything else can now be left to \DescRef{\LabelBase.cmd.AfterFile}: -\begin{lstcode} - \documentclass{article} - \usepackage{scrlfile} - \AfterFile{hdvips.def}{\hypersetup{linktocpage}} - \AfterFile{hypertex.def}{\hypersetup{linktocpage}} - \usepackage{hyperref} - \begin{document} - \listoffigures - \clearpage - \begin{figure} - \caption{This is an example of a fairly long figure caption, but - one that does not use the optional caption argument that would - allow you to write a short caption in the list of figures.} - \end{figure} - \end{document} -\end{lstcode} - If either of the \Package{hyperref} drivers \Option{hypertex} or - \Option{dvips} is used, the useful \Package{hyperref} option - \Option{linktocpage} will be set. However, if you create a PDF file - with \mbox{pdf{\LaTeX}}, the option - will not be set because then the \Package{hyperref} driver - \File{hpdftex.def} will be used. This means that neither \File{hdvips.def} - nor \File{hypertex.def} will be loaded. -\end{Example} -\iffalse% Umbruchkorrekturtext (der besser nicht mehr verwendet wird!) - Furthermore\textnote{Hint!}, you can also load \Package{scrlfile} and the - \DescRef{\LabelBase.cmd.AfterFile} command into a private - \File{hyperref.cfg}. In this case, however, you should use - \Macro{RequirePackage} instead of \Macro{usepackage} to load the package - (see \cite{latex:clsguide}). In the example above, the new lines have to be - inserted directly after the \Macro{ProvidesFile} line, that is, immediately - before the \Option{dvips} or \Option{pdftex} options are executed.% -\fi -Incidentally\textnote{Hint!}, you can also load \Package{scrlfile} before -\DescRef{maincls.cmd.documentclass}\IndexCmd{documentclass}. In this case, -however, you should use \Macro{RequirePackage}\IndexCmd{RequirePackage} -instead of \DescRef{maincls.cmd.usepackage} (see \cite{latex:clsguide}).% -\EndIndexGroup - - -\begin{Declaration} - \Macro{BeforeClosingMainAux}\Parameter{commands}% - \Macro{AfterReadingMainAux}\Parameter{commands}% -\end{Declaration}% -These commands differ in one detail from the commands explained previously. -Those commands enable actions before or after loading files. That is not the -case here. Package authors often want to write something to the \File{aux} -file after the last document page has been shipped out. To do so, ignoring the -resulting problems they create, they often use code such as the following: -\begin{lstcode} - \AtEndDocument{% - \if@filesw - \write\@auxout{% - \protect\writethistoaux% - }% - \fi - } -\end{lstcode} -However, this does not really solve the problem. If the last page of the -document has already been shipped out before \Macro{end}\PParameter{document}, -the code above will not result in any output to the \File{aux} file. If you -try to fix this new problem using \Macro{immediate} just before \Macro{write}, -you would have the opposite problem: if the last page has not yet been shipped -out before \Macro{end}\PParameter{document}, \Macro{writethistoaux} would be -written to the \File{aux} file too early. Therefore you often see solutions -like: -\begin{lstcode} - \AtEndDocument{% - \if@filesw - \clearpage - \immediate\write\@auxout{% - \protect\writethistoaux% - }% - \fi - } -\end{lstcode} -However, this solution has the disadvantage that it forces the last page to be -shipped out. A command such as -\begin{lstcode} - \AtEndDocument{% - \par\vspace*{\fill}% - Note at the end of the document.\par - } -\end{lstcode} -will no longer cause the note to appear beneath the text of the last real page -of the document but at the end of one additional page. Furthermore, -\Macro{writethistoaux} will again be written to the \File{aux} file one page -too early. - -The best solution for this problem would be if you could write directly to the -\File{aux} file immediately after the final \DescRef{maincls.cmd.clearpage} -that is part of \Macro{end}\PParameter{document} but before closing the -\File{aux} file. This is the purpose of \Macro{BeforeClosingMainAux}: -\begin{lstcode} - \BeforeClosingMainAux{% - \if@filesw - \immediate\write\@auxout{% - \protect\writethistoaux% - }% - \fi - } -\end{lstcode} -This will be successful even if the final \DescRef{maincls.cmd.clearpage} -inside of \Macro{end}\PParameter{document} does not actually ship out any page -or if \DescRef{maincls.cmd.clearpage} is used within an \Macro{AtEndDocument} -command. - -However, there one important limitation using \Macro{BeforeClosingMainAux}: -you should not use any typesetting commands inside the \PName{commands} of -\Macro{BeforeClosingMainAux}! If you ignore this restriction, the result is -just as unpredictable as the results of the problematic suggestions above that -use \Macro{AtEndDocument}. - -The \Macro{AfterReadingMainAux}\ChangedAt{v3.03}{\Package{scrlfile}} command -actually executes the \PName{commands} after closing and reading the -\File{aux} file inside \Macro{end}\PParameter{document}. This is only useful -in a few very rare cases, for example to write statistical information to the -\File{log} file which is valid only after reading the \File{aux} file, or to -implement additional \emph{rerun} requests. Typesetting commands are even more -dangerous inside these \PName{commands} than inside the argument of -\Macro{BeforeClosingMainAux}.% -% -\EndIndexGroup - - -\section{Replacing Files at Input} -\seclabel{replace} - -The previous sections in this chapter have explained commands to perform -actions before or after loading a particular file, package, or class. You can -also use \Package{scrlfile} to input a completely different file than the one -that was requested. - -\begin{Declaration} - \Macro{ReplaceInput}\Parameter{original file}% - \Parameter{replacement file}% -\end{Declaration}% -This command\ChangedAt{v2.96}{\Package{scrlfile}} defines a replacement -for the file specified in the first argument, \PName{original file}. If -\LaTeX{} is instructed to load this file, the \PName{replacement file} will be -loaded instead. The replacement-file definition affects all files loaded using -\Macro{InputIfFileExists}, whether they are loaded by the user or internally -by \LaTeX{}. To do so, \Package{scrlfile} redefines \Macro{InputIfFileExists}. - -When\ChangedAt{v3.32}{\Package{scrlfile}} using a \LaTeX{} version up to -2020-04-01, the package \Package{scrlfile-patcholdlatex} must redefine the -\Macro{InputIfFileExists} statement for this purpose. When using \LaTeX{} from -version 2020-10-01 on, \Package{scrlfile-hook} uses the internal \LaTeX{} -statement \Macro{declare@file@substitution}. The \LaTeX{} team asks to make -such a substitution only if there is no other way to achieve the desired -result, for example if such a substitution is indispensable to maintain -compatibility and if the \PName{replacement file} provides the same -functionality. - -\begin{Example} - You want to input the \File{\Macro{jobname}.tol} file instead of the - \File{\Macro{jobname.lot}} file. To do this, you use -\begin{lstcode} - \ReplaceInput{\jobname.tol}{\jobname.lot} -\end{lstcode} - If additionally you replace \File{\Macro{jobname}.tol} by - \File{\Macro{jobname}.tlo} using -\begin{lstcode} - \ReplaceInput{\jobname.tol}{\jobname.tlo} -\end{lstcode} - then \File{\Macro{jobname}.tol} will also be replaced by - \File{\Macro{jobname}.tlo}. In this way, you can process the whole - replacement chain. - - However, a replacement that results in a loop such as -\begin{lstcode} - \ReplaceInput{\jobname.lot}{\jobname.tol} - \ReplaceInput{\jobname.tol}{\jobname.lot} -\end{lstcode} - will cause an error. So it is not possible to replace - a file that has already been replaced once by itself again. -\end{Example} - -In theory, it would also be possible to use this command to replace one -package or class with another .However, it is recommended to use the following -instructions for replacing a package or class. For older \LaTeX{} versions -this is even mandatory.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{ReplaceClass}\Parameter{original class}% - \Parameter{replacement class}% - \Macro{ReplacePackage}\Parameter{original package}% - \Parameter{replacement package}% -\end{Declaration}% -You\ChangedAt{v2.96}{\Package{scrlfile}}\textnote{Attention!} should never -replace a class or package using the \DescRef{\LabelBase.cmd.ReplaceInput} -command described above. Instead, \Macro{ReplacePackage} should be used for -package replacements and \Macro{ReplaceClass} for class replacements. Note -that in this case, as with \Macro{documentclass} and \Macro{usepackage}, you -should give the name of the class or package and not the complete file name. - -The replacement class works for all classes loaded with -\Macro{documentclass}, \Macro{LoadClassWithOptions}, or \Macro{LoadClass}. The -replacement package works for all packages loaded with -\Macro{usepackage}, \Macro{RequirePackageWithOptions}, or -\Macro{RequirePackage}. - -Please\textnote{Attention!} note that the \PName{replacement class} or the -\PName{replacement package} will be loaded with the same options that would -have been passed to the \PName{original class} or \PName{original package}. If -you replace a class or package with one that does not support a requested -option, you will receive the usual warnings and errors. - -Of course, to replace classes, you must load \Package{scrlfile} before the -class using \Macro{RequirePackage} instead of \Macro{usepackage}. - -When\ChangedAt{v3.32}{\Package{scrlfile}} using a \LaTeX{} version up to -2020-04-01 the package \Package{scrlfile-patcholdlatex} must redefine the -internal statements \Macro{@onefilewithoptions} and -\Macro{@loadwithoptions}. When using \LaTeX{} from version 2020-10-01 on, -\Package{scrlfile-hook} uses the internal \LaTeX{} statement -\Macro{declare@file@substitution}. The \LaTeX{} Team asks to perform such a -substitution only if there is no other way to achieve the desired result, -e.g. if such a substitution is indispensable to maintain compatibility and the -\PName{replacement package} or \PName{replacement class} provides the same -functionality.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{UnReplaceInput}\Parameter{file name}% - \Macro{UnReplacePackage}\Parameter{package}% - \Macro{UnReplaceClass}\Parameter{class}% -\end{Declaration} -You\ChangedAt{v3.12}{\Package{scrlfile}} can also remove a replacement. You -should remove the replacement definition for an input file using -\Macro{UnReplaceInput}, for a package using \Macro{UnReplacePackage}, and for -a class using \Macro{UnReplaceClass}.% -\EndIndexGroup - - -\section{Preventing File Loading} -\seclabel{prevent} - -Classes\ChangedAt{v3.08}{\Package{scrlfile}} and packages written for use -within companies or academic institutions often load many packages only -because users need them frequently, not because they are required by the class -or package itself. If a problem occurs with one of these automatically loaded -packages, you somehow have to keep the problematic package from being loaded. -Once again, \Package{scrlfile} provides a simple solution. - -\begin{Declaration} - \Macro{PreventPackageFromLoading}\OParameter{alternate code}% - \Parameter{package list}% - \Macro{PreventPackageFromLoading*}\OParameter{alternate code}% - \Parameter{package list} -\end{Declaration} -Calling this command\ChangedAt{v3.08}{\Package{scrlfile}} before loading a -package with \Macro{usepackage}\IndexCmd{usepackage}, -\Macro{RequirePackage}\IndexCmd{RequirePackage}, or -\Macro{RequirePackageWithOptions}\IndexCmd{RequirePackageWithOptions} -effectively prevents the package from being loaded if it is found in the the -\PName{package list}. -% -\begin{Example} - Suppose you work at a company where all documents are created using Latin - Modern. The company class, \Class{compycls}, therefore contains these lines: -\begin{lstcode} - \RequirePackage[T1]{fontenc} - \RequirePackage{lmodern} -\end{lstcode} - But now, for the first time, you want to use \XeLaTeX{} or Lua\LaTeX{}. - Since the recommended \Package{fontspec} package uses Latin Modern as the - default font anyway, and loading \Package{fontenc} would not be a good idea, - you want to prevent both packages from being loaded. Therefore, you load the - class in your own document as follows: -\begin{lstcode} - \RequirePackage{scrlfile} - \PreventPackageFromLoading{fontenc,lmodern} - \documentclass{firmenci} -\end{lstcode} -\end{Example} -The example above also shows that you can load \Package{scrlfile} before the -class. In this case, you must use -\Macro{RequirePackage}\IndexCmd{RequirePackage} because \Macro{usepackage} -before \Macro{documentclass} is not permitted. - -If you specify an empty \PName{package list} or if it contains a package that -has already been loaded, \Macro{PreventPackageFromLoading} issues a warning, -while\ChangedAt{v3.12}{\Package{scrlfile}} \Macro{PreventPackageFromLoading*} -merely writes a note to the log file only. - -You\ChangedAt{v3.12}{\Package{scrlfile}} can use the optional argument to -execute code instead of loading the package. But you cannot load any other -packages or files inside \PName{alternate code}. To load another package, see -\DescRef{\LabelBase.cmd.ReplacePackage} in \autoref{sec:scrlfile.macros} on -\DescPageRef{\LabelBase.cmd.ReplacePackage}. Note also that the -\PName{alternate code} will be executed several times if you try to load the -package more than once!% -\EndIndexGroup - - -\begin{Declaration} - \Macro{StorePreventPackageFromLoading}\Parameter{\textMacro{command}}% - \Macro{ResetPreventPackageFromLoading} -\end{Declaration} -\Macro{StorePreventPackageFromLoad}\ChangedAt{v3.08}{\Package{scrlfile}} -defines \Macro{command} to be the current list of packages that should not be -loaded. In contrast, -\Macro{ResetPreventPackageFromLoading}\ChangedAt{v3.08}{\Package{scrlfile}} -resets the list of packages that should not be loaded. After -\Macro{ResetPreventPackageFromLoading}, you can load all packages again. -\begin{Example} - Suppose you need to load a package inside another package and you do not - want the user to be able to prevent that package from being loaded with - \DescRef{\LabelBase.cmd.PreventPackageFromLoading}% - \IndexCmd{PreventPackageFromLoading}. So you reset the do-not-load list - before you load this package: -\begin{lstcode} - \ResetPreventPackageFromLoading - \RequirePackage{foo} -\end{lstcode} - Unfortunately, from this point on the user's entire do-not-load list would - be lost. To avoid this, you first store the list and then restore it later: -\begin{lstcode} - \newcommand*{\Users@PreventList}{}% - \StorePreventPackageFromLoading\Users@PreventList - \ResetPreventPackageFromLoading - \RequirePackage{foo} - \PreventPackageFromLoading{\Users@PreventList} -\end{lstcode} - Note\textnote{Attention!} that \Macro{StorePreventPackageFromLoading} - defines the \Macro{Users@PreventList} macro even if it has already been - defined. In other words, calling \Macro{StorePreventPackageFromLoading} - overwrites existing \Macro{command} definitions without checking. Therefore - this example uses \Macro{newcommand*} to get an error message if - \Macro{Users@PreventList} has already been defined. -\end{Example} -Note that when you manipulate the list stored by -\Macro{StorePreventPackageFromLoading}, you are responsible for making sure it -can be restored. For example, the list elements must be separated by comma, -must not contain white space or group braces, and must be fully expandable. - -Also note\textnote{Attention!}, that \Macro{ResetPreventPackageFromLoading} -does not clear the \PName{alternate code} for a package. But this code -will not be executed so long as the package is not added again to the -do-not-load list.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{UnPreventPackageFromLoading}\Parameter{package list}% - \Macro{UnPreventPackageFromLoading*}\Parameter{package list} -\end{Declaration} -Instead\ChangedAt{v3.12}{\Package{scrlfile}} of completely resetting the list -of packages that should not be loaded, you can also specify individual -packages to remove from the list. The starred version of the command also -deletes the \PName{alternate code}. For example, restoring packages to the -do-not-load list from a stored list will not reactivate their \PName{alternate -code} in this case.% -% -\begin{Example} - Suppose you want to prevent a \Package{foo} package from being loaded, but - you do not want to execute any outdated \PName{alternate code} that may - exist. Instead, only your new \PName{alternate code} should be executed. You - can do this as follows: -\begin{lstcode} - \UnPreventPackageFromLoading*{foo} - \PreventPackageFromLoading[\typeout{alternate code}]{foo} -\end{lstcode} - For the \Macro{UnPreventPackageFromLoading} command, it does not matter - whether or not the package has been prevented from being loaded before. - - Of course you can also use the command to indirectly delete the - \PName{alternate code} of all packages: -\begin{lstcode} - \StorePreventPackageFromLoading\TheWholePreventList - \UnPreventPackageFromLoading*{\TheWholePreventList} - \PreventPackageFromLoading{\TheWholePreventList} -\end{lstcode} - In this case the packages that have been prevented from being loaded are - still prevented from being loaded, but their \PName{alternate code} has been - deleted and will no longer be executed.% -\end{Example}% -\EndIndexGroup -% -\EndIndexGroup - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% ispell-local-dictionary: "english" -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrlttr2-experts.tex b/macros/latex/contrib/koma-script/source-doc/english/scrlttr2-experts.tex deleted file mode 100644 index 69daaf7e6e..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrlttr2-experts.tex +++ /dev/null @@ -1,847 +0,0 @@ -% ====================================================================== -% scrlttr2-experts.tex -% Copyright (c) Markus Kohm, 2002-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. -% ---------------------------------------------------------------------- -% scrlttr2-experts.tex -% Copyright (c) Markus Kohm, 2002-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. -% ====================================================================== -% -% Chapter about scrlttr2 of the KOMA-Script guide expert part -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Kapitel ueber scrlttr2 im Experten-Teil der KOMA-Script-Anleitung -% Verwaltet von Markus Kohm -% -% ============================================================================ - -\KOMAProvidesFile{scrlttr2-experts.tex} - [$Date: 2019-12-03 09:41:21 +0100 (Di, 03. Dez 2019) $ - KOMA-Script guide (chapter: scrlttr2 for experts)] - -\translator{Harald Bongartz\and Georg Grandke\and Raimund Kohl\and Jens-Uwe - Morawski\and Stephan Hennig\and Gernot Hassenpflug\and Markus Kohm\and - Karl Hagen} - -% Date of the translated German file: 2019-12-03 - -\chapter{Additional Information about the \Class{scrlttr2} Class and the - \Package{scrletter} Package} -\labelbase{scrlttr2-experts} - -\BeginIndexGroup -\BeginIndex{Class}{scrlttr2} -This chapter provides additional information about the \KOMAScript{} class -\Class{scrlttr2}. \iffree{Some parts of the chapter are found only in the - German \KOMAScript{} book \cite{book:komascript}. This should not be a - problem, because the}{The} average user, who only wants to use the class -or package, will not normally need this information. Part of this information -is addressed to users for whom the default options are insufficient. Thus, -for example, the first section describes in detail the pseudo-lengths that -specify the letterhead page and which can be used be used to modify the its -layout.% -\iffalse% Es wird Zeit das komplett rauszuwerfen! - In addition, this chapter also describes features that exist only to - provide compatibility with the deprecated \Class{scrlettr} class. It also - explains in detail how to convert a document from this obsolete class - to the current class. -\fi - -\BeginIndex{Package}{scrletter}% -Starting with \KOMAScript~3.15\ChangedAt[2014/11]{v3.15}{\Package{scrletter}}, -you can use the \Package{scrletter} package with one of the \KOMAScript{} -classes \Class{scrartcl}, \Class{scrreprt}, or \Class{scrbook}. It provides -nearly all the features of \Class{scrlttr2} for those classes. There are, -however, a few differences described later in this chapter.% - - -\section{Variables for Experienced Users} -\seclabel{variables} -\BeginIndexGroup -\BeginIndex{}{variables} - -\KOMAScript{} provides commands not only to use predefined variables but also -to define new variables or to change their automatic use within the reference -line\Index{reference line}. - -\begin{Declaration} - \Macro{newkomavar}\OParameter{description}\Parameter{name}% - \Macro{newkomavar*}\OParameter{description}\Parameter{name}% - \Macro{addtoreffields}\Parameter{name} - \Macro{removereffields}% - \Macro{defaultreffields}% -\end{Declaration} -\Macro{newkomavar} defines a new variable. This variable is referenced as -\PName{name}. Optionally, you can define a \PName{description} for the -\PName{name} variable. Unlike the \PName{name}, the \PName{description} is not -used to reference a variable. Instead, the \PName{description} acts as a -supplement to the content of a variable that can be printed as a label along -with its content. - -You can use the \Macro{addtoreffields} command to add the \PName{name} -variable to the reference line\Index{reference line} (see -\autoref{sec:scrlttr2.firstpage}, \DescPageRef{scrlttr2.option.refline}). The -\PName{description} and the content of the variable are added to the end of -the reference line. The starred version \Macro{newkomavar*} is similar to the -unstarred version but also calls the \Macro{addtoreffields} command. Thus, the -starred version automatically adds the variable to the reference line. -\begin{Example} - Suppose you need an additional field for a telephone extension in the - reference line. You can define this field with -\begin{lstcode} - \newkomavar[Extension]{myphone} - \addtoreffields{myphone} -\end{lstcode} - or more concisely with -\begin{lstcode} - \newkomavar*[Extension]{myphone} -\end{lstcode} -\end{Example} -When\textnote{Attention!} you define a variable for the reference line, you -should always give it a description. - -You can use the \Macro{removereffields} command to remove all variables from -the reference field. This includes the predefined variables of the class. The -reference line is then empty. This can be useful, for example, if you wish to -change the order of the variables in the reference fields line. - -The \Macro{defaultreffields} command resets the reference fields line to its -predefined format. In doing so, all custom-defined variables are removed from -the reference fields line. - -You\textnote{Attention!} should not add the date to the reference line with -the \Macro{addtoreffields} command. Instead you should use the -\DescRef{scrlttr2.option.refline}% -\important{\OptionValueRef{scrlttr2}{refline}{dateleft}\\ -\OptionValueRef{scrlttr2}{refline}{dateright}\\ -\OptionValueRef{scrlttr2}{refline}{nodate}}% -\IndexOption{refline~=\textKValue{dateleft}}% -\IndexOption{refline~=\textKValue{dateright}}% -\IndexOption{refline~=\textKValue{nodate}} option to select whether the date -should appear on the left or right side of the reference line, or not at all. -These settings also affect the position of the date when no reference line is -used.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{usekomavar}\OParameter{command}\Parameter{name}% - \Macro{usekomavar*}\OParameter{command}\Parameter{name} -\end{Declaration} -The \DescRef{scrlttr2.cmd.usekomavar} and \DescRef{scrlttr2.cmd.usekomavar*} -commands are, like all commands where a starred version exists or which can -take an optional argument, not fully expandable. Nevertheless, if you use them -within \DescRef{scrlttr2.cmd.markboth}\IndexCmd{markboth}, -\DescRef{scrlttr2.cmd.markright}\IndexCmd{markright} or similar commands, you -need not insert \Macro{protect}\IndexCmd{protect} beforehand. Of course -this is also true for -\DescRef{scrlayer-scrpage.cmd.markleft}\IndexCmd{markleft} if you use the -\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% -\IndexPackage{scrlayer-scrpage} package. These\textnote{Attention!} commands -cannot be used within commands that directly affect their argument, such as -\Macro{MakeUppercase}\important{\Macro{MakeUppercase}}% -\IndexCmd{MakeUppercase}. To avoid this problem you can use commands like -\Macro{MakeUppercase} as an optional argument to \Macro{usekomavar} or -\Macro{usekomavar*}. Then you will get the upper-case content of a variable -with -\begin{lstcode}[escapeinside=`'] - \usekomavar[\MakeUppercase]{`\PName{Name}'} -\end{lstcode} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifkomavarempty}\Parameter{name}\Parameter{true}\Parameter{false}% - \Macro{Ifkomavarempty*}\Parameter{name}\Parameter{true}\Parameter{false} -\end{Declaration} -It is important to know that the content of the variable will be expanded as -far as this is possible with \Macro{edef}. If this results in spaces or -unexpandable macros like \Macro{relax}, the result will be not empty even -where the use of the variable would not result in any visible output. - -Once\textnote{Attention!} again, this command cannot be used as the argument -of \Macro{MakeUppercase}\IndexCmd{MakeUppercase} or similar commands However, -it is robust enough to be used as the argument of -\DescRef{scrlttr2.cmd.markboth} or \DescRef{scrlttr2.cmd.footnote}, for -example.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{foreachkomavar}\Parameter{list of variables}\Parameter{command} - \Macro{foreachnonemptykomavar}\Parameter{list of variables}\Parameter{command} - \Macro{foreachemptykomavar}\Parameter{list of variables}\Parameter{command} - \Macro{foreachkomavarifempty}\Parameter{list of variables} - \Parameter{then-code}\Parameter{else-code} -\end{Declaration} -The\ChangedAt{v3.27}{\Class{scrlttr2}\and \Package{scrletter}} -\Macro{foreachkomavar} command executes the specified \PName{command} for each -variable in the comma-separated \PName{list of variables}. The name of each -variable is added as parameter to the \PName{command}.% - -The \Macro{foreachnonemptykomavar} command does the same but only for those -variables that are not empty in sense of -\DescRef{\LabelBase.cmd.Ifkomavarempty}. Empty variables in the \PName{list of - variables} are ignored. - -By contrast, the \Macro{foreachemptykomavar} command executes the -\PName{command} only for variables that are empty in sense of -\DescRef{\LabelBase.cmd.Ifkomavarempty}. Accordingly, non-empty variables are -ignored. - -The \Macro{foreachkomavarifempty} command is a kind of combination of the two -previously described commands. It executes the \PName{then-command} only for -those variables in the \PName{list of variables} that are empty, and the -\PName{else-command} for the non empty variables. As with \PName{command}, the -name of each variable is added as a parameter in both cases.% -\EndIndexGroup -% -\EndIndexGroup - - -\section{Additional Information about Page Styles} -\seclabel{pagestyleatscrletter} -\BeginIndexGroup -\BeginIndex{}{page>style} - -\LoadNonFree{scrlttr2-experts}{0}% -\EndIndexGroup - -\iffalse% Wurde bereits in Kapitel 4.21 behandelt -\section{Differences in How \Package{scrletter} Handles \File{lco} Files} -\seclabel{lcoatscrletter} -\BeginIndexGroup -\BeginIndex{File}{lco} -\BeginIndex{}{lco file=\File{lco} file} - -As\ChangedAt{v3.15}{\Package{scrletter}} explained in -\autoref{sec:scrlttr2.lcoFile}, \Class{scrlttr2} can load \File{lco} files via -the optional argument of \Macro{documentclass}. The \Package{scrletter} package -does not support this. - -\begin{Declaration} - \Macro{LoadLetterOption}\Parameter{name}% - \Macro{LoadLetterOptions}\Parameter{list of names} -\end{Declaration} -For \Class{scrlttr2}, load \File{lco} files with -\DescRef{scrlttr2.cmd.LoadLetterOption} or -\DescRef{scrlttr2.cmd.LoadLetterOptions} is only a recommendation. For -\Package{scrletter}, it is mandatory. Of course, you can only load the -\File{lco} files after you load \Package{scrletter}. -% -\EndIndexGroup -% -\EndIndexGroup -\fi - - -\section{\File{lco} Files for Experienced Users} -\seclabel{lcoFile} -\BeginIndexGroup -\BeginIndex{File}{lco} -\BeginIndex{}{lco file=\File{lco} file} - -\BeginIndexGroup% -\BeginIndex{}{paper>format}% -Although you can use any paper size that the -\hyperref[cha:typearea]{\Package{typearea}}% -\IndexPackage{typearea} package can configure, the output of the letterhead -page may produce undesirable results with some formats. Unfortunately, there -are no general rules to calculate the position of the address fields and the -like for every available paper size. Instead, different parameter sets are -needed for different paper sizes.% - -%\subsection{Verifying the Paper Size} -%\seclabel{papersize} - -At present parameter sets and \File{lco} files exist only for A4-sized and -letter-sized paper. Theoretically, however, the \Class{scrlttr2} class can -support many more paper sizes. Therefore, it's necessary to verify that the -correct paper size is used. This is even more true if you use -\Package{scrletter}, since the paper size depends on the class you use. - -\begin{Declaration} - \Macro{LetterOptionNeedsPapersize}% - \Parameter{option name}\Parameter{paper size} -\end{Declaration} -To provide at least a warning when another \PName{paper size} is used, you can -find a \Macro{LetterOptionNeedsPapersize} command in every \File{lco} file -distributed with {\KOMAScript}. The first argument is the name of the -\File{lco} file without the ``\File{.lco}'' suffix. The second argument is the -paper size for which the \File{lco} file is designed. - -If several \File{lco} files are loaded in succession, a -\Macro{LetterOptionNeedsPapersize} command can be contained in each of them, -but the \DescRef{scrlttr2.cmd.opening} command will only check the last given -\PName{paper size}. As the following example shows, an experienced user can -thus easily write \File{lco} files with parameter sets for other paper sizes. -\iffalse% Umbruchoptimierung -If you do not plan to set up such \File{lco} files yourself, you can just -forget about this option and skip the example.% -\fi -\begin{Example} - Suppose you use A5-sized paper in normal, that is upright or portrait, - orientation for your letters. Let's assume that you want to put them into - standard C6 window envelopes. In that case, the position of the address - field would be the same as for a standard letter on A4-sized paper. The main - difference is that A5 paper needs only one fold. So you want to disable the - top and bottom fold marks. You can do this, for example, by placing the - marks outside the paper area. -\begin{lstcode} - \ProvidesFile{a5.lco} - [2002/05/02 letter class option] - \LetterOptionNeedsPapersize{a5}{a5} - \setplength{tfoldmarkvpos}{\paperheight} - \setplength{bfoldmarkvpos}{\paperheight} -\end{lstcode} - Of course, it would be more elegant to deactivate the marks with the - \DescRef{scrlttr2.option.foldmarks} option. In addition, you must adjust the - position of the footer, that is, the \PLength{firstfootvpos} pseudo-length. - I leave it to the reader to find an appropriate value. When using such an - \File{lco} file, you must declare other \File{lco} file options like - \File{SN} before you load ``\File{a5.lco}''. -\end{Example} -% -\EndIndexGroup% -\EndIndexGroup% -\vskip-\ht\strutbox% Wegen Beispiel am Ende der Erklaerung - - -%\subsection{Visualizing Positions} -%\seclabel{visualize} -%\BeginIndexGroup -\begin{Declaration} - \File{visualize.lco} -\end{Declaration} -\BeginIndex{Option}{visualize}% -If you develop your own \File{lco} file, for example to modify the positions -of various fields on the letterhead page because your own desires or -requirements, it is helpful if you can make at least some elements directly -visible. The \File{lco} file -\File{visualize.lco}\ChangedAt{v3.04}{\Class{scrlttr2}} exists for this -purpose. You can load this file as you would any other \File{lco} file. But -this \emph{letter class options} file must be loaded in the document preamble, -and its effects cannot be deactivated. The \File{lco} file uses the -\Package{eso-pic}\IndexPackage{eso-pic}% -\important[i]{\Package{eso-pic}\\\Package{graphicx}} and -\Package{graphicx}\IndexPackage{graphicx} packages, which are not part of -\KOMAScript. - - -\begin{Declaration} - \Macro{showfields}\Parameter{field list} -\end{Declaration} -This command makes the space occupied by the fields on the letterhead page -visible. The \PName{field list} argument is a comma-separated list of fields -to be shown. The following fields are supported: -\begin{labeling}[~--]{\PValue{location}} -\item[\PValue{test}] is a 10\Unit{cm} by 15\Unit{cm} test field, 1\Unit{cm} - from the top and left edges of the paper. This field exists for debugging. - You can use it as a benchmark to check whether the measurements have been - distorted during the creation of the document. -\item[\PValue{head}] is the header area of the letterhead page. This field - is open at the bottom. -\item[\PValue{foot}] is the footer area of the letterhead page. This field is - open at the top. -\item[\PValue{address}] is the address window area used by window envelopes. -\item[\PValue{location}] is the field for the extra sender information. -\item[\PValue{refline}] is the reference line. This field is open at the - bottom. -\end{labeling}% -\BeginIndex{FontElement}{field}\LabelFontElement{field}% -You can change the colour of the visualisation with -the\DescRef{scrlttr2.cmd.setkomafont} and \DescRef{scrlttr2.cmd.addtokomafont} -(see \autoref{sec:scrlttr2.textmarkup}, -\DescPageRef{scrlttr2.cmd.setkomafont}) commands using the -\FontElement{field}\important{\FontElement{field}} element. The default is -\Macro{normalcolor}.% -\EndIndex{FontElement}{field}% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{setshowstyle}\Parameter{style}% - \Macro{edgesize} -\end{Declaration} -By default, \File{visualize.lco} indicates the individual areas with -frames\important{\PValue{frame}}, which corresponds to the \PName{style} -\PValue{frame}. Areas open at top or bottom are not completely framed but have -an open edge with with small arrows pointing up or down. -Alternatively\important{\PValue{rule}}, you can use the \PName{style} -\PValue{rule}. In this case, the area is highlighted by a background colour. -It isnot possible to distinguish open and closed areas. Instead a minimal -height will be used for open areas. The third\important{\PValue{edges}} -available \PName{style} is \PValue{edges}, which shows the corners of the -areas. The corner marks at the open edge of open areas will be omitted. The -size of two edges of the corner marks are given by the \Macro{edgesize} macro -with a default of 1\Unit{ex}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{showenvelope}\AParameter{width\textup{,}height}% - \AParameter{h-offset\textup{,}v-offset}% - \OParameter{instructions}% - \Macro{showISOenvelope}\Parameter{format}\OParameter{instructions}% - \Macro{showUScommercial}\Parameter{format}\OParameter{instructions}% - \Macro{showUScheck}\OParameter{instructions}% - \Macro{unitfactor} -\end{Declaration} -If you have loaded \File{visualize.lco}, you can use these commands to output -a page with a drawing of an envelope. The envelope drawing is always rotated -by 90\textdegree{} on a separate page and printed in 1:1~scale. The addressee -window is generated automatically from the current data for the address -position of the letterhead page: \PLength{toaddrvpos}, \PLength{toaddrheight}, -\PLength{toaddrwidth}, and \PLength{toaddrhpos}. To do so requires knowing how -much smaller the folded letter pages are than the width and height of the -envelope. If you do not specify these two values, \PName{h-offset} and -\PName{v-offset}, when calling \Macro{showenvelope}, they are calculated from -the fold marks and the paper size itself. - -The \Macro{showISOenvelope}, \Macro{showUScommercial}, and \Macro{showUScheck} -commands are based on \Macro{showenvelope}. With \Macro{showISOenvelope}, you -can create ISO-envelopes in C4, C5, C5/6, DL (also known as C5/6) or C6 -\PName{format}. With \Macro{showUScommercial}, you can create a US commercial -envelope in the 9 or 10 \PName{format}. You can use \Macro{showUScheck} for -envelopes in US check format. - -\BeginIndex{FontElement}{letter}\LabelFontElement{letter}% -The position of the letterhead page inside the envelope is indicated with -dashed lines. You can change the colour of these lines with the -\DescRef{scrlttr2.cmd.setkomafont} and \DescRef{scrlttr2.cmd.addtokomafont} -(see \autoref{sec:scrlttr2.textmarkup}, -\DescPageRef{scrlttr2.cmd.setkomafont}) using the -\FontElement{letter}\important{\FontElement{letter}} element. The default is -\Macro{normalcolor}.% -\EndIndex{FontElement}{letter}% - -\BeginIndex{FontElement}{measure}\LabelFontElement{measure}% -The envelope drawing will be provided with dimensions automatically. You can -change the colour of these dimension labels with the commands -\DescRef{scrlttr2.cmd.setkomafont} and \DescRef{scrlttr2.cmd.addtokomafont} -(see \autoref{sec:scrlttr2.textmarkup}, -\DescPageRef{scrlttr2.cmd.setkomafont}) using the -\FontElement{measure}\important{\FontElement{measure}} element. The default is -\Macro{normalcolor}. The dimensions are given in multiples of -\Length{unitlength}, with an accuracy of $1/\Macro{unitfactor}$, where the -accuracy of \TeX{} arithmetic is the actual limits. The default is 1. You can -redefine \Macro{unitfactor} using \Macro{renewcommand}.% -\EndIndex{FontElement}{measure}% - -\begin{Example} - You are generating a sample letter using the ISO-A4 format. The supported - fields should be marked with yellow borders to check their position. - Furthermore, the position of the window for a DL-size envelope should be - checked with drawing. The dimension lines in this drawing should be red, and - the numbers should use a smaller font, with the dimensions printed in cm - with an accuracy of 1\Unit{mm}. The dashed letterhead page in the envelope - should be coloured green. -\begin{lstcode} - \documentclass[visualize]{scrlttr2} - \usepackage{xcolor} - \setkomafont{field}{\color{yellow}} - \setkomafont{measure}{\color{red}\small} - \setkomafont{letter}{\color{green}} - \showfields{head,address,location,refline,foot} - \usepackage[british]{babel} - \usepackage{lipsum} - \begin{document} - \setkomavar{fromname}{Joe Public} - \setkomavar{fromaddress}{2 Valley\\ - SAMPLEBY\\ - ZY32 1XW} - \begin{letter}{% - 1 Hillside\\ - SAMPLESTEAD\\ - WX12 3YZ% - } - \opening{Hello,} - \lipsum[1] - \closing{Good bye} - \end{letter} - \setlength{\unitlength}{1cm} - \renewcommand*{\unitfactor}{10} - \showISOenvelope{DL} - \end{document} -\end{lstcode} - This will show the letterhead page as the first page and the drawing of the - envelope on the second page. -\end{Example} - -Note that poorly chosen combinations of \Length{unitlength} and -\Macro{unitfactor} can quickly lead to a \TeX{} \emph{arithmetic overflow} -error. The dimension numbers shown may also differ slightly from the actual -values. Neither are errors in \Option{visualize} but merely implementation -limitations of \TeX. -% -\EndIndexGroup -% -\EndIndexGroup -% -\EndIndexGroup - - -\section{Language Support} -\seclabel{languages}% -\BeginIndexGroup -\BeginIndex{}{languages}% - -% TODO: New translation of the shorter into in German manual should be used. -% :ODOT -The \Class{scrlttr2} class and the \Package{scrletter} package support many -languages. These include German\Index{language>German} (\PValue{german} for -the old German orthography, \PValue{ngerman} for the new orthography; -\PValue{austrian} for Austrian with the old German orthography, -\PValue{naustrian}\ChangedAt{v3.09}{\Class{scrlttr2}} for Austrian with the -new orthography; and \PValue{nswissgerman}\ChangedAt{v3.13}{\Class{scrlttr2}} -for Swiss German with the new orthogrphy, \PValue{swissgerman} for Swiss -German with the old orthography), English\Index{language>English} (among -others, \PValue{english} without specification as to whether American or -British should be used, \PValue{american} and \PValue{USenglish} for American -English, and \PValue{british} and \PValue{UKenglish} for British English), -French\Index{language>French}, Italian\Index{language>Italian}, -Spanish\Index{language>Spanish}, Dutch\Index{language>Dutch}, -Croatian\Index{language>Croatian}, Finnish\Index{language>Finnish}, -Norwegian\Index{language>Norwegian}\ChangedAt{v3.02}{\Class{scrlttr2}}, -Swedish\Index{language>Swedish}\ChangedAt{v3.08}{\Class{scrlttr2}}, -Polish\ChangedAt{v3.13}{\Class{scrlttr2}}, -Czech\ChangedAt{v3.13}{\Class{scrlttr2}}, and Slovak. - -You can switch languages using the \Package{babel}\IndexPackage{babel} package -(see \cite{package:babel}) with the \Macro{selectlanguage}\Parameter{language} -command. Other packages like \Package{german}\IndexPackage{german} (see -\cite{package:german}) and \Package{ngerman}\IndexPackage{ngerman} (see -\cite{package:ngerman}) also define this command. As a rule though, the -language selection occurs immediately as a direct consequence of loading such -a package. -\iffalse% Umbruchkorrekturtext -For details, please refer to the documentation of the relevant packages. -\fi - -There\textnote{Attention!} is one more point to note about language-switching -packages. The -\Package{french}\IndexPackage{french}\important{\Package{french}} package (see -\cite{package:french}) makes changes well beyond redefining the terms in -\autoref{tab:\LabelBase.languageTerms}. For instance, it redefines the -\DescRef{scrlttr2.cmd.opening} command, since the package simply assumes that -\DescRef{scrlttr2.cmd.opening} is always defined as it is in the standard -\Class{letter} class. This, however, is not the case with \KOMAScript{}. The -\Package{french} package thus overwrites the definition and does not work -correctly with \KOMAScript. I regard this as a fault in the \Package{french} -package which, although reported decades ago, was unfortunately never -eliminated. - -If you use the \Package{babel}\IndexPackage{babel} package to switch to -\PValue{french}, problems can occasionally occur. With \Package{babel}, -however, you can usually deactivate changes to a language in a targeted -manner.% -\iffalse% This is actually outdated! -\ If the package \Package{french} is not installed, the problem with - \Package{babel} does not arise. Similarly, the problem usually does not - exist when you use \Package{babel} with other varieties of French such as - \PValue{acadian}, \PValue{canadien}, \PValue{francais} or \PValue{frenchb} - instead of \PValue{french}. -\fi - -\iffalse% This is also outdated! - However, with \Package{babel} version 3.7j and above, this problem only occurs - if the option explicitly indicates that \Package{babel} should use the - \Package{french} package. -% -\iftrue - If you cannot be sure you are not using an old version of \Package{babel}, I - recommend you use -\begin{lstcode} - \usepackage[...,frenchb,...]{babel} -\end{lstcode} - to select French. - \iffalse % - If necessary, you can still switch to French with - \Macro{selectlanguage}\PParameter{french}.% - \fi% -\fi -\fi - -\iffalse - It cannot be ruled out that similar problems will not occur with other - languages or packages. For German and English, however, there are currently - no known problems with the \Package{babel} package. -\fi - - -\begin{Declaration} - \Macro{yourrefname}% - \Macro{yourmailname}% - \Macro{myrefname}% - \Macro{customername}% - \Macro{invoicename}% - \Macro{subjectname}% - \Macro{ccname}% - \Macro{enclname}% - \Macro{headtoname}% - \Macro{headfromname}% - \Macro{datename}% - \Macro{pagename}% - \Macro{mobilephonename}% - \Macro{phonename}% - \Macro{faxname}% - \Macro{emailname}% - \Macro{wwwname}% - \Macro{bankname} -\end{Declaration} -These commands contain the language-dependent terms. These\important[i]{% - \DescRef{scrbase.cmd.newcaptionname}\\ - \DescRef{scrbase.cmd.renewcaptionname}\\ - \DescRef{scrbase.cmd.providecaptionname}} definitions can be -modified to support a new language or for your private customization, as -described in -\autoref{sec:scrbase.languageSupport}. \KOMAScript{} sets these terms only in -\Macro{begin}\PParameter{document}. Therefore they are not available in the -preamble and cannot be redefined there. The default settings for -\Option{english} and \Option{ngerman} are listed in -\autoref{tab:\LabelBase.languageTerms}.% -\EndIndexGroup -%\iffree{}{\clearpage}% Siehe Kommentar zur Tabelle - -\begin{Declaration} - \Macro{captionsacadian} - \Macro{captionsamerican} - \Macro{captionsaustralien} - \Macro{captionsaustrian} - \Macro{captionsbritish} - \Macro{captionscanadian} - \Macro{captionscanadien} - \Macro{captionscroatian} - \Macro{captionsczech} - \Macro{captionsdutch} - \Macro{captionsenglish} - \Macro{captionsfinnish} - \Macro{captionsfrancais} - \Macro{captionsfrench} - \Macro{captionsgerman} - \Macro{captionsitalian} - \Macro{captionsnaustrian} - \Macro{captionsnewzealand} - \Macro{captionsngerman} - \Macro{captionsnorsk} - \Macro{captionsnswissgerman} - \Macro{captionspolish} - \Macro{captionsslovak} - \Macro{captionsspanish} - \Macro{captionsswedish} - \Macro{captionsswissgerman} - \Macro{captionsUKenglish} - \Macro{captionsUSenglish} -\end{Declaration} -If you change the language of a letter, the language-dependent terms listed in -\autoref{tab:\LabelBase.languageTerms}, -\autopageref{tab:\LabelBase.languageTerms} are redefined using these -commands. If your language-switching package does not support this, you can -also use the above commands directly. -% -\begin{table} - \begin{minipage}{\textwidth} - \centering -% \KOMAoptions{captions=topbeside}% -% \setcapindent{0pt}% - \caption[{% - Defaults for language-dependent terms - }]{% - Defaults for language-dependent terms for the languages - \Option{english} and \Option{ngerman}, if they are not already defined - by the packages used for language switching% - \label{tab:\LabelBase.languageTerms}% - }[l] - \begin{tabular}[t]{lll} - \toprule - Command & \Option{english} & \Option{ngerman} \\ - \midrule - \Macro{bankname} & Bank account & Bankverbindung \\ - \Macro{ccname}\footnotemark[1] & cc & Kopien an \\ - \Macro{customername} & Customer no. & Kundennummer \\ - \Macro{datename} & Date & Datum \\ - \Macro{emailname} & Email & E-Mail \\ - \Macro{enclname}\footnotemark[1] & encl & Anlagen \\ - \Macro{faxname} & Fax & Fax \\ - \Macro{headfromname} & From & Von \\ - \Macro{headtoname}\footnotemark[1] & To & An \\ - \Macro{invoicename} & Invoice no. & Rechnungsnummer \\ - \Macro{myrefname} & Our ref. & Unser Zeichen \\ - \Macro{pagename}\footnotemark[1] & Page & Seite \\ - \Macro{mobilephonename} & Mobile phone & Mobiltelefon \\ - \Macro{phonename} & Phone & Telefon \\ - \Macro{subjectname} & Subject & Betrifft \\ - \Macro{wwwname} & Url & URL \\ - \Macro{yourmailname} & Your letter of & Ihr Schreiben vom\\ - \Macro{yourrefname} & Your ref. & Ihr Zeichen \\ - \bottomrule - \end{tabular} - \deffootnote{1em}{1em}{1\ }% brutal aber effektiv - \footnotetext[1000]{Normally these terms are defined by language - packages like \Package{babel}. In this case, \KOMAScript{} does not - redefine them. The actual wording may therefore differ and can - be found in the documentation for the language package used.} -% \end{captionbeside} - \end{minipage} -\end{table} -% -\EndIndexGroup -\iffree{}{\clearpage}% Umbruchkorrektur - -\begin{Declaration} - \Macro{dateacadian} - \Macro{dateamerican} - \Macro{dateaustralien} - \Macro{dateaustrian} - \Macro{datebritish} - \Macro{datecanadian} - \Macro{datecanadien} - \Macro{datecroatian} - \Macro{dateczech} - \Macro{datedutch} - \Macro{dateenglish} - \Macro{datefinnish} - \Macro{datefrancais} - \Macro{datefrench} - \Macro{dategerman} - \Macro{dateitalian} - \Macro{datenaustrian} - \Macro{datenewzealand} - \Macro{datengerman} - \Macro{datenorsk} - \Macro{datenswissgerman} - \Macro{datepolish} - \Macro{dateslovak} - \Macro{datespanish} - \Macro{dateswedish} - \Macro{dateswissgerman} - \Macro{dateUKenglish} - \Macro{dateUSenglish} -\end{Declaration} -Depending on the language used, the numerical representation of the date\Index{date} (see option -\DescRef{scrlttr2.option.numericaldate} in \autoref{sec:scrlttr2.firstpage}, -\DescPageRef{scrlttr2.option.numericaldate}) is formatted in various ways. -The exact format can be found in \autoref{tab:date}.% -\EndIndexGroup -% -\EndIndexGroup -\iffree{}{\clearpage}% Umbruchkorrektur zwecks Ausgabe der Tabellen - -\begin{table}[!tp]% Umbruchoptimierung -% \centering - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% -% \caption - \begin{captionbeside}{Language-dependent forms of the date}[l] - \begin{tabular}[t]{ll} - \toprule - Command & Date Example \\ - \midrule - \Macro{dateacadian} & 24.\,12.\,1993\\ - \Macro{dateamerican} & 12/24/1993\\ - \Macro{dateaustralien}& 24/12/1993\\ - \Macro{dateaustrian} & 24.\,12.\,1993\\ - \Macro{datebritish} & 24/12/1993\\ - \Macro{datecanadian} & 1993/12/24\\ - \Macro{datecanadien} & 1993/12/24\\ - \Macro{datecroatian} & 24.\,12.\,1993.\\ - \Macro{dateczech} & 24.\,12.\,1993\\ - \Macro{datedutch} & 24.\,12.\,1993\\ - \Macro{dateenglish} & 24/12/1993\\ - \Macro{datefinnish } & 24.12.1993.\\ - \Macro{datefrancais} & 24.\,12.\,1993\\ - \Macro{datefrench} & 24.\,12.\,1993\\ - \Macro{dategerman} & 24.\,12.\,1993\\ - \Macro{dateitalian} & 24.\,12.\,1993\\ - \Macro{datenaustrian} & 24.\,12.\,1993\\ - \Macro{datenewzealand}& 24/12/1993\\ - \Macro{datengerman} & 24.\,12.\,1993\\ - \Macro{datenorsk} & 24.12.1993\\ - \Macro{datenswissgerman} & 24.\,12.\,1993\\ - \Macro{datepolish} & 24.\,12.\,1993\\ - \Macro{dateslovak} & 24.\,12.\,1993\\ - \Macro{datespanish} & 24.\,12.\,1993\\ - \Macro{dateswedish} & 24/12 1993\\ - \Macro{dateswissgerman} & 24.\,12.\,1993\\ - \Macro{dateUKenglish} & 24/12/1993\\ - \Macro{dateUSenglish} & 12/24/1993\\ - \bottomrule - \end{tabular} - \end{captionbeside} - \label{tab:date} -\end{table} -% -\section{Obsolete Commands} -\seclabel{obsolete} -\BeginIndexGroup - -\LoadNonFree{scrlttr2-experts}{1} -\EndIndexGroup -% -\iffalse% Es wird Zeit das komplett rauszuwerfen! -\section{From Obsolete \Class{scrlettr} to Current \Class{scrlttr2}} -\seclabel{fromscrlettr} - -With\textnote{Attention!} the 2002 release of \Class{scrlttr2} (see -\autoref{cha:scrlttr2}), the old letter class, \Class{scrlettr}, became -obsolete, and it is no longer part of \KOMAScript. If you still need the class -or information about it, you will find it in -\cite{package:koma-script-obsolete}. - -To facilitate the transition to the new class, there is the compatibility -option \Option{KOMAold}. Basically, all the older functionality still -exists in the new class. Without \Option{KOMAold}, however, the user -interface and the defaults are different. More details on -this option are provided in \autoref{sec:scrlttr2.lcoFile}, -\autoref{tab:lcoFiles}. - -\LoadNonFree{scrlttr2-experts}{2} -% -\EndIndexGroup -\fi -% -\EndIndexGroup - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% ispell-local-dictionary: "english" -%%% coding: us-ascii -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrlttr2.tex b/macros/latex/contrib/koma-script/source-doc/english/scrlttr2.tex deleted file mode 100644 index 2642275d0c..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrlttr2.tex +++ /dev/null @@ -1,4545 +0,0 @@ -% ====================================================================== -% scrlttr2.tex -% Copyright (c) Markus Kohm, 2002-2022 -% -% 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 -% https://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. -% ---------------------------------------------------------------------- -% scrlttr2.tex -% Copyright (c) Markus Kohm, 2002-2022 -% -% 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 -% https://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. -% ====================================================================== -% -% Chapter about scrlttr2 of the KOMA-Script guide -% Maintained by Markus Kohm -% -% ---------------------------------------------------------------------- -% -% Kapitel ueber scrlttr2 in der KOMA-Script-Anleitung -% Verwaltet von Markus Kohm -% -% ============================================================================ - -\KOMAProvidesFile{scrlttr2.tex}% - [$Date: 2022-03-07 10:51:27 +0100 (Mo, 07. Mär 2022) $ - KOMA-Script guide (chapter: scrlttr2)] - -\translator{Harald Bongartz\and Georg Grandke\and Raimund Kohl\and Jens-Uwe - Morawski\and Stephan Hennig\and Gernot Hassenpflug\and Markus Kohm\and - Karl Hagen} - -% Date of the translated German file: 2022-03-07 - -\chapter{Letters with the \Class{scrlttr2} Class or the \Package{scrletter} - Package} -\labelbase{scrlttr2} - -\BeginIndexGroup -\BeginIndex{Class}{scrlttr2}\BeginIndex{Package}{scrletter}% -\BeginIndex{}{letters}% -Letters are quite different in many ways from articles, reports, books, and -the like. That alone justifies a separate chapter on letters. But there are -other reasons for a separate chapter on \Class{scrlttr2} and -\Package{scrletter}. - -The \Class{scrlttr2}\important{\Class{scrlttr2}} class was developed from -scratch in 2002. It provides a completely new user interface, different from -every other class I know. This new user interface may be unusual, but it -offers benefits to both new and experienced {\KOMAScript} users. - -The \Package{scrletter}\important{\Package{scrletter}}% -\ChangedAt{v3.15}{\Package{scrletter}} package has supplemented \KOMAScript{} -since Version~3.15. It also provides all the letter-based functionality of -\Class{scrlttr2} to the other classes. I recommend you use one of the -\KOMAScript{} classes\,---\,\Class{scrbook}, \Class{scrreprt} or -\Class{scrartcl}\,---\, which are explained in the previous chapter. With -minor limitations, \Package{scrletter} also works well with the standard -classes. - -The starting point for developing \Package{scrletter} was, on the one hand, -requests from users who also wanted to have elements such as -section\textnote{headings, floating environments, indexes} headings, floating -environments, or a bibliography in letters. On the other hand, there were also -requests to use \Class{scrlttr2} variables in the remaining \KOMAScript{} -classes. You can achieve both by combining the desired \KOMAScript{} class -with \Package{scrletter}. - -Compared to the letter class, the letter package has a few small changes that -were necessary to avoid conflicts with other classes. These changes mainly -affect the page styles and are explicitly documented (see -\autoref{sec:\LabelBase.pagestyle}, starting at -\autopageref{sec:\LabelBase.pagestyle}). Where \Package{scrletter} is not -explicitly mentioned, everything that is documented for \Class{scrlttr2} -applies without change. - -\LoadCommonFile{options} % \section{Early or Late Selection of Options} - -\LoadCommonFile{compatibility} % \section{Compatibility with Earlier Versions of - % \KOMAScript{}} - -\LoadCommonFile{draftmode} % \section{Draft-Mode} - -\LoadCommonFile{typearea} % \section{Page Layout} - -For letters, it is normally not useful to distinguish one-sided and two-sided -printing. Since letters are not usually bound, each page of a letter will be -viewed on its own. This is also true even if both the letter is printed on -both sides of the paper. Vertical adjustment usually does not matter for -letters either. If you nevertheless need it, or want to understand what it is, -please refer to the commands -\DescRef{maincls.cmd.raggedbottom}\IndexCmd{raggedbottom} and -\DescRef{maincls.cmd.flushbottom}\IndexCmd{flushbottom} explained in -\autoref{sec:maincls.typearea} on \DescPageRef{maincls.cmd.flushbottom}.% -% -\EndIndexGroup - - -\section{Variables} -\seclabel{variables}% -\BeginIndexGroup -\BeginIndex{}{variables} - -In addition to options, commands, environments, counters, and lengths, -\autoref{cha:maincls} introduced the concept of additional elements for -\KOMAScript{}. A typical property of an element is its font style and the -ability to change it (see \autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}). In this section we introduce -variables. Variables can have a label used to identify them when they are -output in the document as well as their actual content. To avoid confusion -with labels used for cross-references, this guide refers to such labels as the -``description'' of the variable. The content of a variable can be set -independently of the time and place it is used the same way that the content -of a command can be defined separately from its use. The main difference -between a command and a variable is that a command usually triggers an action, -whereas a variable usually consists of plain text which is then output by a -command. In addition, a variable can also have a description which can be -customised and output. - -This section deliberately confines itself to introducing the concept of -variables. The examples below have no special meaning. More detailed -examples can be found in the explanation of predefined variables used in the -class and the package. An overview of all defined variables is given in -\autoref{tab:\LabelBase.variables}. -% -\begin{desclist} - %\renewcommand*{\abovecaptionskipcorrection}{-\normalbaselineskip}% - \desccaption{Supported variables in \Class{scrlttr2} and - \Package{scrletter}\label{tab:\LabelBase.variables}}% - {Supported variables in \Class{scrlttr2} and \Package{scrletter} - (\emph{continued})}% - \ventry{addresseeimage}{% - commands used to print the postpaid postmark for the - \OptionValueRef{\LabelBase}{addrfield}{backgroundimage} option or the - postpaid address for the \OptionValueRef{\LabelBase}{addrfield}{image} - option (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.addresseeimage})}% - \ventry{backaddress}{% - return address for window envelopes % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.backaddress})}% - \ventry{% - backaddressseparator}{separator within the return address % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.backaddressseparator})}% - \ventry{ccseparator}{% - separator between title of additional addresses (cc list) - and additional addresses % - (\autoref{sec:\LabelBase.document}, - \DescPageRef{\LabelBase.variable.ccseparator})}% - \ventry{customer}{% - customer number % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.customer})}% - \ventry{date}{% - date % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.date})}% - \ventry{emailseparator}{% - separator between email name and email address % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.emailseparator})}% - \ventry{enclseparator}{% - separator between title of enclosure and enclosures % - (\autoref{sec:\LabelBase.document}, - \DescPageRef{\LabelBase.variable.enclseparator})}% - \ventry{faxseparator}{% - separator between title of fax and fax number % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.faxseparator})}% - \ventry{firstfoot}{% - footer\ChangedAt{v3.08}{\Class{scrlttr2}} of the letterhead page % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.firstfoot})}% - \ventry{firsthead}{% - header\ChangedAt{v3.08}{\Class{scrlttr2}} of the letterhead page % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.firsthead})}% - \ventry{fromaddress}{% - sender's address without sender name % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.fromaddress})}% - \ventry{frombank}{% - sender's bank details % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.frombank})}% - \ventry{fromemail}{% - sender's e-mail % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.fromemail})}% - \ventry{fromfax}{% - sender's fax number % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.fromfax})}% - \ventry{fromlogo}{% - commands for inserting the sender's logo % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.fromlogo})}% - \ventry{frommobilephone}{% - \ChangedAt{v3.12}{\Class{scrlttr2}}% - sender's mobile telephone number % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.frommobilephone})}% - \ventry{fromname}{% - complete name of sender % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.fromname})}% - \ventry{fromphone}{% - sender's telephone number % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.fromphone})}% - \ventry{fromurl}{% - URL of the sender, e.\,g. of the sender's homepage % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.fromurl})}% - \ventry{fromzipcode}{% - ZIP code (postal code) of the sender for the postpaid postmark of the - \OptionValueRef{\LabelBase}{addrfield}{PP} option % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.fromzipcode})}% - \ventry{invoice}{% - invoice number % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.invoice})}% - \ventry{location}{% - extra details of the sender % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.location})}% - \ventry{myref}{% - sender's reference % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.myref})}% - \ventry{nextfoot}{% - footer\ChangedAt{v3.08}{\Class{scrlttr2}} using page style - \PageStyle{headings}\IndexPagestyle{headings} or - \PageStyle{myheadings}\IndexPagestyle{myheadings} % - (\autoref{sec:\LabelBase.pagestyle}, - \DescPageRef{\LabelBase.variable.nextfoot})}% - \ventry{nexthead}{% - header\ChangedAt{v3.08}{\Class{scrlttr2}} using page style - \PageStyle{headings}\IndexPagestyle{headings} or - \PageStyle{myheadings}\IndexPagestyle{myheadings} % - (\autoref{sec:\LabelBase.pagestyle}, - \DescPageRef{\LabelBase.variable.nexthead})}% - \ventry{phoneseparator}{% - separator between title of telephone and telephone number % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.phoneseparator})}% - \ventry{place}{% - sender's location; used next to date % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.place})}% - \ventry{placeseparator}{% - separator between location and date % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.placeseparator})}% - \ventry{PPdatamatrix}{% - command to print the data array for the - \OptionValueRef{\LabelBase}{addrfield}{PP} option % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.PPdatamatrix})}% - \ventry{PPcode}{% - commands for the sender's identification code for the - \OptionValueRef{\LabelBase}{addrfield}{PP} option % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.PPcode})}% - \ventry{signature}{% - signature annotation beneath the closing text of the letter % - (\autoref{sec:\LabelBase.closing}, - \DescPageRef{\LabelBase.variable.signature})}% - \ventry{specialmail}{% - delivery method % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.specialmail})}% - \ventry{subject}{% - letter's subject % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.subject})}% - \ventry{subjectseparator}{% - separator between subject title and subject % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.subjectseparator})}% - \ventry{title}{% - letter title % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.title})}% - \ventry{toaddress}{% - address of recipient without recipient name % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.toaddress})}% - \ventry{toname}{% - complete name of recipient % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.toname})}% - \ventry{yourmail}{% - date of recipient's referenced mail % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.yourmail})}% - \ventry{yourref}{% - recipient's reference % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.yourref})}% - \ventry{zipcodeseparator}{% - separator between the title of ZIP code (postal code) and the code itself % - (\autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.zipcodeseparator})}% -\end{desclist} - -\begin{Declaration} - \Macro{setkomavar}% - \Parameter{name}\OParameter{description}\Parameter{content}% - \Macro{setkomavar*}\Parameter{name}\Parameter{description} -\end{Declaration} -The \Macro{setkomavar} command sets the \PName{content} of the \PName{name} -variable. Using the optional argument, you can change the \PName{description} -of the variable at the same time. In contrast, \Macro{setkomavar*} sets only -the \PName{description} of the \PName{name} variable. -\begin{Example} - It is customary for letters to indicate the sender in the letterhead. - First, \KOMAScript{} must know the name of the sender. For - ``Joe Public'' that would be done with: -\begin{lstcode} - \setkomavar{fromname}{Joe Public} -\end{lstcode} - The default for the description of the sender is ``From''. Assuming, - however, that Mr Public wants to have ``Sender'' in the places where - \KOMAScript{} outputs his name, he would have to add -\begin{lstcode} - \setkomavar*{fromname}{Sender} -\end{lstcode} - or combine the two commands into one: -\begin{lstcode} - \setkomavar{fromname}[Sender]{Joe Public} -\end{lstcode} - He thus kills two birds with one stone, so to speak. -\end{Example} -By the way, you can delete the content of the variable by providing an empty -\PName{content} argument. Of course, you can delete the \PName{description} of -the variable in the same way, with an empty argument for the description. -\begin{Example} - Suppose Mr Public wants to have no label for the name of the sender. He can - either delete it for himself with -\begin{lstcode} - \setkomavar*{fromname}{} -\end{lstcode} - or he could again kill two birds with one stone and use -\begin{lstcode} - \setkomavar{fromname}[]{Joe Public} -\end{lstcode} - This will simultaneously set the contents of the variable and delete its - description. -\end{Example} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{usekomavar}\OParameter{command}\Parameter{name}% - \Macro{usekomavar*}\OParameter{command}\Parameter{name} -\end{Declaration} -In\ChangedAt{v2.9i}{\Class{scrlttr2}} some cases, it is necessary to access -the content or description of a variable and not to leave this solely to the -class. This is especially important if you have defined a variable which is -not added to the reference fields line. Using the command \Macro{usekomavar} -you have access to the content of the \PName{name} variable, whereas the -starred version \Macro{usekomavar*} allows you to access the description or -title. In \autoref{sec:scrlttr2-experts.variables}, -\DescPageRef{scrlttr2-experts.cmd.newkomavar} you can find more information -about defining your own variables.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifkomavar}\Parameter{name}\Parameter{then code}\Parameter{else code} -\end{Declaration} -With\ChangedAt{v3.03}{\Class{scrlttr2}}% -\ChangedAt{v3.28}{\Class{scrlttr2}\and \Package{scrletter}} this command, you -can determine if a variable has already been defined. The \PName{then code} -will be executed only if the variable already exists. The variable's contents -will not be examined and so can be empty. The \PName{else code} will be -executed if the variable does not exist. Such tests can be useful, for -example, if your own variables are defined in one \File{lco} file\Index{lco - file=\File{lco} file} (see \autoref{sec:\LabelBase.lcoFile} starting at -\autopageref{sec:\LabelBase.lcoFile}) but used in another \File{lco} file only -if they exist.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifkomavarempty}\Parameter{name}\Parameter{then code}% - \Parameter{else code}% - \Macro{Ifkomavarempty*}\Parameter{name}\Parameter{then code}% - \Parameter{else code} -\end{Declaration} -With\ChangedAt{v2.9i}{\Class{scrlttr2}}% -\ChangedAt{v3.28}{\Class{scrlttr2}\and \Package{scrletter}} these commands, -you can determine whether either the content or the description of a variable -is empty. The \PName{then code} will be executed if the expanded content or -the expanded description of the \PName{name} variable is empty. Otherwise, the -\PName{else code} will be executed. The starred variant tests the variable's -description, while the normal variant tests its contents.% -\EndIndexGroup -% -\EndIndexGroup - - -\section{Pseudo-lengths} -\seclabel{pseudoLength} -\BeginIndexGroup -\BeginIndex{}{pseudo-lengths} - -\LaTeX{} processes lengths with three commands: -\Macro{newlength}\IndexCmd{newlength}, \Macro{setlength}\IndexCmd{setlength} -and \Macro{addtolength}\IndexCmd{addtolength}. Many packages also use macros, -which are commands, to store lengths. \KOMAScript{} extends this method with -the ability to process such lengths stored in macros with commands similar to -those used to handle real lengths. \KOMAScript{} calls lengths that are -actually stored in macros \emph{pseudo-lengths}. - -Note\textnote{Attention!} that even though these pseudo-lengths are internally -implemented as macros, the commands for pseudo-length management expect only -the names of the pseudo-lengths not the macros representing the -pseudo-lengths. The names of pseudo-lengths are written without the initial -backslash, like the names of \LaTeX{} counters and unlike macros or \LaTeX{} -lengths. - -\begin{Explain} - Historical \TeX{} works with a fixed number of registers. There are - registers for tokens, for boxes, for counters, for skips, and for - dimensions. Overall there are 256 registers for each of these - categories. For \LaTeX{} lengths, which are defined with \Macro{newlength}, - skip registers are used. Once all these registers are in use, you can not - define any more lengths. Both \Class{scrlttr2} and \Package{scrletter} would - normally use more than 20 of these registers for the first page - alone. \LaTeX{} itself already uses 40 of these registers. The - \hyperref[cha:typearea]{\Package{typearea}}% - \IndexPackage{typearea} package needs some of them too; thus, approximately - a quarter of these precious registers would already be in use. For this - reason, in 2002 \Class{scrlttr2} stores letter-specific lengths in macros - instead of lengths. - - Anyone who wants to argue that the recommended \LaTeX{} installation with - \eTeX{}, which is required for \KOMAScript{} anyway, no longer suffers from - the above-mentioned limitation would be right. However, that improvement - came too late for \Class{scrlttr2}. With \Package{scrletter}, the concept of - psuedo-lengths was adopted for reasons of compatibility. -\end{Explain} - -The pseudo-lengths defined and uses by \KOMAScript{} are listed in -\autoref{tab:\LabelBase.pseudoLength}, which also provides cross -references to the detailed descriptions of each pseudo-lengths in the -following sub-sections. - -A schematic display of the most important distances of the letterhead page is -shown in \autoref{fig:\LabelBase.pseudoLength} on -\autopageref{fig:\LabelBase.pseudoLength}. In addition to the -pseudo-lengths for the configurable distances, some non-configurable lengths -are also shown in light gray. For the sake of clarity, however, some rarely -required pseudo-lengths have been omitted. -% -\begin{desclist} - \renewcommand{\abovecaptionskipcorrection}{-\normalbaselineskip}% - \desccaption{% - Pseudo-lengths provided by \Class{scrlttr2} and \Package{scrletter}% - \label{tab:\LabelBase.pseudoLength}% - }{% - Pseudo-lengths provided by \Class{scrlttr2} and \Package{scrletter} - (\emph{continued})% - }% - \pentry{backaddrheight}{% - the height of the return address at the upper edge of the address field - (\autoref{sec:\LabelBase.addressee}, - \DescPageRef{\LabelBase.plength.backaddrheight})% - }% - \pentry{bfoldmarklength}{% - the length of the bottommost fold mark - (\autoref{sec:\LabelBase.foldmarks}, - \DescPageRef{\LabelBase.plength.bfoldmarkvpos})% - }% - \pentry{bfoldmarkvpos}{% - the vertical distance of the bottommost fold mark from the top edge of the - paper (\autoref{sec:\LabelBase.foldmarks}, - \DescPageRef{\LabelBase.plength.bfoldmarkvpos})% - }% - \pentry{firstfoothpos}{% - the horizontal distance of the letterhead page footer from the left edge - of the paper; values greater than the width of the paper or less than the - negative value of the width of the paper activate special handling % - (\autoref{sec:\LabelBase.firstFoot}, - \DescPageRef{\LabelBase.plength.firstfoothpos})% - }% - \pentry{firstfootvpos}{% - the vertical distance of letterhead page footer from the top edge of the - paper (\autoref{sec:\LabelBase.firstFoot}, - \DescPageRef{\LabelBase.plength.firstfootvpos})% - }% - \pentry{firstfootwidth}{% - the width of the letterhead page footer - (\autoref{sec:\LabelBase.firstFoot}, - \DescPageRef{\LabelBase.plength.firstfootwidth})% - }% - \pentry{firstheadhpos}{% - the horizontal distance of the letterhead from the left edge of the paper; - values greater than the width of the paper or less than the negative value - of the width of the paper activate special handling - (\autoref{sec:\LabelBase.firstHead}, - \DescPageRef{\LabelBase.plength.firstheadhpos})% - }% - \pentry{firstheadvpos}{% - the vertical distance of the letterhead from the top edge of the paper - (\autoref{sec:\LabelBase.firstHead}, - \DescPageRef{\LabelBase.plength.firstheadvpos})% - }% - \pentry{firstheadwidth}{% - the width of the letterhead (\autoref{sec:\LabelBase.firstHead}, - \DescPageRef{\LabelBase.plength.firstheadwidth})% - }% - \pentry{foldmarkhpos}{% - the horizontal distance of the horizontal fold marks from the left edge of - the paper (\autoref{sec:\LabelBase.foldmarks}, - \DescPageRef{\LabelBase.plength.foldmarkhpos})% - }% - \pentry{foldmarkvpos}{% - the vertical distance of the vertical fold marks from the top edge of the - paper (\autoref{sec:\LabelBase.foldmarks}, - \DescPageRef{\LabelBase.plength.foldmarkvpos})% - }% - \pentry{fromrulethickness}{% - the thickness of an optional horizontal rule in the letterhead - (\autoref{sec:\LabelBase.firstHead}, - \DescPageRef{\LabelBase.plength.fromrulethickness})% - }% - \pentry{fromrulewidth}{% - the length of an optional horizontal rule in the letterhead - (\autoref{sec:\LabelBase.firstHead}, - \DescPageRef{\LabelBase.plength.fromrulewidth})% - }% - \pentry{lfoldmarkhpos}{% - the horizontal distance of the vertical fold mark from the left edge of - the paper (\autoref{sec:\LabelBase.foldmarks}, - \DescPageRef{\LabelBase.plength.lfoldmarkhpos})% - }% - \pentry{lfoldmarklength}{% - the length of the vertical fold mark - (\autoref{sec:\LabelBase.foldmarks}, - \DescPageRef{\LabelBase.plength.lfoldmarklength})% - }% - \pentry{locheight}{% - the height of the field containing the additional sender information if - the value is not 0; if it is 0, \PLength{toaddrheight} is used instead - (\autoref{sec:\LabelBase.locationField}, - \DescPageRef{\LabelBase.plength.locheight})% - }% - \pentry{lochpos}{% - the horizontal distance of the field containing the additional sender - information; if the value is positive, the distance is measured from the - right paper edge; if negative, from the left paper edge; if 0, the - negative value of \PLength{toaddrhpos} is used instead - (\autoref{sec:\LabelBase.locationField}, - \DescPageRef{\LabelBase.plength.lochpos})% - }% - \pentry{locvpos}{% - the vertical distance of the field containing the additional sender - information from the top edge of the paper if the value is not 0; if it is - 0, \PLength{toaddrvpos} is used instead - (\autoref{sec:\LabelBase.locationField}, - \DescPageRef{\LabelBase.plength.locvpos})% - }% - \pentry{locwidth}{% - the width of the field containing the additional sender information; if it - is 0, the width is calculated automatically based on the - \DescRef{\LabelBase.option.locfield} option described in - \autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.locfield} % - (\autoref{sec:\LabelBase.locationField}, - \DescPageRef{\LabelBase.plength.locwidth})% - }% - \pentry{mfoldmarklength}{% - the length of the middle horizontal fold mark - (\autoref{sec:\LabelBase.foldmarks}, - \DescPageRef{\LabelBase.plength.mfoldmarklength})% - }% - \pentry{mfoldmarkvpos}{% - the vertical distance of the middle horizontal fold mark from the top edge - of the paper (\autoref{sec:\LabelBase.foldmarks}, - \DescPageRef{\LabelBase.plength.mfoldmarkvpos})% - }% - \pentry{pfoldmarklength}{% - the length of the hole-punch mark - (\autoref{sec:\LabelBase.foldmarks}, - \DescPageRef{\LabelBase.plength.pfoldmarklength})% - }% - \pentry{PPdatamatrixvskip}{% - the vertical distance between the postpaid header and the data array with - \OptionValueRef{scrlttr2}{addrfield}{PP} - (\autoref{sec:\LabelBase.addressee}, - \DescPageRef{\LabelBase.plength.PPdatamatrixvskip})% - }% - \pentry{PPheadheight}{% - the height of the postpaid header - (\autoref{sec:\LabelBase.addressee}, - \DescPageRef{\LabelBase.plength.PPheadheight})% - }% - \pentry{PPheadwidth}{% - the width of the left postpaid field with - \OptionValueRef{scrlttr2}{addrfield}{PP} - (\autoref{sec:\LabelBase.addressee}, - \DescPageRef{\LabelBase.plength.PPheadwidth})% - }% - \pentry{refaftervskip}{% - vertical skip below reference-field line % - (\autoref{sec:\LabelBase.refLine}, - \DescPageRef{\LabelBase.plength.refaftervskip})% - }% - \pentry{refhpos}{% - the horizontal distance of reference-field line from the left - edge of the paper; if the value is 0, the reference-field line is centred - horizontally on the letterhead page - (\autoref{sec:\LabelBase.refLine}, - \DescPageRef{\LabelBase.plength.refhpos})% - }% - \pentry{refvpos}{% - the vertical distance of reference-field line from the top - edge of the paper (\autoref{sec:\LabelBase.refLine}, - \DescPageRef{\LabelBase.plength.refvpos})% - }% - \pentry{refwidth}{% - the width of the reference-field line - (\autoref{sec:\LabelBase.refLine}, - \DescPageRef{\LabelBase.plength.refwidth})% - }% - \pentry{sigbeforevskip}{% - the vertical skip between the closing and the signature - (\autoref{sec:\LabelBase.closing}, - \DescPageRef{\LabelBase.plength.sigbeforevskip})% - }% - \pentry{sigindent}{% - the indentation of the signature with respect to the text body - (\autoref{sec:\LabelBase.closing}, - \DescPageRef{\LabelBase.plength.sigindent})% - }% - \pentry{specialmailindent}{% - the left indentation of the delivery method within the address field - (\autoref{sec:\LabelBase.addressee}, - \DescPageRef{\LabelBase.plength.specialmailindent})% - }% - \pentry{specialmailrightindent}{% - the right indentation of the delivery method within the address field - (\autoref{sec:\LabelBase.addressee}, - \DescPageRef{\LabelBase.plength.specialmailrightindent})% - }% - \pentry{subjectaftervskip}{% - the vertical skip after the subject - (\autoref{sec:\LabelBase.subject}, - \DescPageRef{\LabelBase.plength.subjectaftervskip})% - }% - \pentry{subjectbeforevskip}{% - additional vertical skip before the subject - (\autoref{sec:\LabelBase.subject}, - \DescPageRef{\LabelBase.plength.subjectbeforevskip})% - }% - \pentry{subjectvpos}{% - the vertical distance of the subject from the top edge of the paper; if it - is 0, the position is calculated based on the - \DescRef{\LabelBase.option.subject} option - (\autoref{sec:\LabelBase.subject}, - \DescPageRef{\LabelBase.plength.subjectaftervskip})% - }% - \pentry{tfoldmarklength}{% - the length of the topmost horizontal fold mark - (\autoref{sec:\LabelBase.foldmarks}, - \DescPageRef{\LabelBase.plength.tfoldmarklength})% - }% - \pentry{tfoldmarkvpos}{% - the vertical distance of the topmost horizontal folding mark from the top - edge of the paper (\autoref{sec:\LabelBase.foldmarks}, - \DescPageRef{\LabelBase.plength.tfoldmarkvpos})% - }% - \pentry{toaddrheight}{% - the height of the address field (\autoref{sec:\LabelBase.addressee}, - \DescPageRef{\LabelBase.plength.toaddrheight})% - }% - \pentry{toaddrhpos}{% - the horizontal distance of the address field from left edge of the paper, - if the value is positive; if it is negative, the negative horizontal - distance of the address field from the right edge of the paper - (\autoref{sec:\LabelBase.addressee}, - \DescPageRef{\LabelBase.plength.toaddrhpos})% - }% - \pentry{toaddrindent}{% - the left and right indentation of the address within the address field - (\autoref{sec:\LabelBase.addressee}, - \DescPageRef{\LabelBase.plength.toaddrindent})% - }% - \pentry{toaddrvpos}{% - the vertical distance of the address field from the the top edge of the - paper (\autoref{sec:\LabelBase.addressee}, - \DescPageRef{\LabelBase.plength.toaddrvpos})% - }% - \pentry{toaddrwidth}{% - the width of the address field % - (\autoref{sec:\LabelBase.addressee}, - \DescPageRef{\LabelBase.plength.toaddrwidth})% - }% -\end{desclist} - -\begin{figure} - \centering - \includegraphics{plenDIN} - \caption{Schematic of the pseudo-lengths for a letter} - \label{fig:\LabelBase.pseudoLength} -\end{figure} - - -\begin{Declaration} - \Macro{newplength}\Parameter{name} -\end{Declaration} -This\ChangedAt{v3.26}{\Class{scrlttr2}\and \Package{scrletter}} command -defines a new pseudo-length. The new pseudo-length is uniquely identified by -its \PName{name}. Each name can therefore be assigned only once. If you -attempt to redefine an existing pseudo-length, the commands exits with an -error message. - -\BeginIndex{Cmd}{@newplength}% -Since the ordinary user does not normally need to define pseudo-lengths, this -command was not a user instruction until \KOMAScript~3.26. Before then, -\Macro{@newplength} existed with the same functionality. This instruction still -exists for package authors.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{Ifplength}\Parameter{pseudo-length}% - \Parameter{then-code}\Parameter{else-code} -\end{Declaration} -This\ChangedAt{v3.27}{\Class{scrlttr2}\and \Package{scrletter}} command can be -used to determine whether a \PName{pseudo-length} has been defined. The -\PName{then-code} is executed if the \PName{pseudo-length} is defined and not -\Macro{relax}. Otherwise the \PName{else-code} is executed. - -% Note: In the English manual this information is not \iffree{}{...}! -\BeginIndex{Cmd}{if@plength}% -For reasons of consistency only, the internal command \Macro{if@plength}, -with the identical meaning, exists for the use of package authors.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{useplength}\Parameter{name} -\end{Declaration} -Using this command you can access the value of the pseudo-length of -the given \PName{name}. This is one of the few user commands in -connection with pseudo-lengths. Of course this command can also be -used with an \File{lco} file\Index{lco file=\File{lco} file} (see -\autoref{sec:\LabelBase.lcoFile} ab \autopageref{sec:\LabelBase.lcoFile}).% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{setplength}% - \OParameter{factor}\Parameter{pseudo-length}\Parameter{value}% - \Macro{addtoplength}% - \OParameter{factor}\Parameter{pseudo-length}\Parameter{value} -\end{Declaration} -Using \Macro{setplength}, you can assign the multiple of a -\PName{value} to a \PName{pseudo-length}. The \PName{factor} is given as an -optional argument (see also \DescRef{\LabelBase.cmd.setlengthtoplength}, -\autoref{sec:\LabelBase.pseudoLength}, -\DescPageRef{\LabelBase.cmd.setlengthtoplength}). - -With \Macro{addtoplength} you can add the multiple of a \PName{value} to a -\PName{pseudo-length}. Again, you can pass a \PName{factor} as an optional -argument. - -To assign or to add the multiple of one \PName{pseudo-length} to another -pseudo-length, use the \Macro{useplength} command (see -\autoref{sec:\LabelBase.pseudoLength}, \DescPageRef{\LabelBase.cmd.useplength}) -within the \PName{value}. To subtract the value of one \PName{pseudo-length} -from another \PName{pseudo-length}, you use should use at the same time a -minus sign or \PValue{-1} as the \PName{factor}. - -\BeginIndex{Cmd}{@setplength}% -\BeginIndex{Cmd}{@addtoplength}% -Since the ordinary user does not normally need to define pseudo-lengths, these -commands were not user instructions until \KOMAScript~3.26. Before then, -\Macro{@setplength} and \Macro{@addtoplength} existed with the -same functionality. These commands still exist for the use of package authors.% -\EndIndexGroup - -\begin{Declaration} - \Macro{setplengthtowidth} - \OParameter{factor}\Parameter{pseudo-length}\Parameter{content}% - \Macro{setplengthtoheight} - \OParameter{factor}\Parameter{pseudo-length}\Parameter{content}% - \Macro{setplengthtodepth} - \OParameter{factor}\Parameter{pseudo-length}\Parameter{content}% - \Macro{setplengthtototalheight} - \OParameter{factor}\Parameter{pseudo-length}\Parameter{content}% -\end{Declaration} -The\ChangedAt{v3.26}{\Class{scrlttr2}\and \Package{scrletter}} first three -commands essentially correspond with \Macro{settowidth}, -\Macro{settoheight}, and \Macro{settodepth} from the \LaTeX{} kernel, but set -\PName{pseudo-length}s instead of lengths. Like -\DescRef{\LabelBase.cmd.setplength}, these commands extend their \LaTeX{} -kernel equivalents with an optional \PName{factor}. They set a -\PName{pseudo-length} to the natural width, height or depth of the given -\PName{content}, multiplied by the optional \PName{factor}. The additional -command \Macro{setplengthtototalheight} sets the \PName{pseudo-length} to the -sum of the height and depth of \PName{content} multiplied by the optional -\PName{factor}.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{setlengthtoplength}% - \OParameter{factor}\Parameter{length}\Parameter{pseudo-length}% - \Macro{addtolengthplength}% - \OParameter{factor}\Parameter{length}\Parameter{pseudo-length} -\end{Declaration} -With the \Macro{setlengthtoplength} command, you can assign a multiple of a -\PName{pseudo-length} to a real \PName{length}. The \PName{factor} is given -as an optional argument instead of directly preceding the -\PName{pseudo-length}. You should also use this command when you want to -assign the negative of a \PName{pseudo-length} to a \PName{length}. In this -case, you can use either a minus sign or \PValue{-1} as the \PName{factor}. -The \Macro{addtolengthplength} command works very similarly. It adds the -\PName{pseudo-length} multiplied by the \PName{factor} to the \PName{length}.% -% -\EndIndexGroup -% -\EndIndexGroup - - -\section{General Structure of Letter Documents} -\seclabel{document} -\BeginIndexGroup -\BeginIndex{}{letter>structure} - -The general structure of a letter document differs somewhat from the structure -of a normal document. Whereas a book document usually contains only one book, -a letter document can contain several letters. As illustrated in -\autoref{fig:\LabelBase.document}, a letter document consists of a preamble, -the individual letters, and the closing. - -\begin{figure} - \KOMAoptions{captions=bottombeside}% - \setcapindent{0pt}% - \begin{captionbeside}[{% - General structure of a letter document containing several individual letters% - }]{% - General structure of a letter document containing several individual letters - (the structure of a single letter is shown in - \autoref{fig:\LabelBase.letter})% - \label{fig:\LabelBase.document}% - }[l] - \begin{minipage}[b]{.667\linewidth} - \centering\small\setlength{\fboxsep}{1.5ex}% - \addtolength{\linewidth}{-\dimexpr2\fboxrule+2\fboxsep\relax}% - \fbox{\parbox{\linewidth}{\raggedright% - \Macro{documentclass}\OParameter{\dots}\PParameter{scrlttr2}\\ - \dots\\ - {\centering\emph{settings for all letters}\\} - \dots\\ - \Macro{begin}\PParameter{document}\\ - \dots\\ - {\centering\emph{settings for all letters}\\} - \dots\\ - }}\\ - \fbox{\parbox{\linewidth}{\raggedright% - \Macro{begin}\PParameter{letter}\Parameter{recipient}\\ - \dots\\ - {\centering\emph{content of the individual letter}\\} - \dots\\ - \Macro{end}\PParameter{letter}\\ - }}\\[2pt] - \parbox{\linewidth}{\raggedright\vspace{-.5ex}\vdots\vspace{1ex}}\\ - \fbox{\parbox{\linewidth}{\raggedright% - \Macro{end}\PParameter{document}\\ - }}\\[\dimexpr\fboxsep+\fboxrule\relax] - \end{minipage} - \end{captionbeside} -\end{figure} - -The preamble contains all the settings that apply generally to all letters. -Most of them can also be overwritten in the settings of the individual -letters. The only setting which cannot currently be changed within a single -letter is the version of \Class{scrlttr2} for which compatibility is required -(see the \DescRef{\LabelBase.option.version} option in -\autoref{sec:\LabelBase.compatibilityOptions}, -\DescPageRef{\LabelBase.option.version}). - -If you use \Package{scrletter}\important{scrletter}, the only difference is -that another class is loaded, with -\DescRef{\LabelBase.cmd.usepackage}\PParameter{scrletter} added before the -settings for all letters. For setting options with \Package{scrletter}, see -\autoref{sec:\LabelBase.options}, on \autopageref{sec:\LabelBase.options}. - -I recommended that you place only general settings such as loading packages -and setting options before \Macro{begin}\PParameter{document}. You should -initialise all variables or other textual features after -\Macro{begin}\PParameter{document}, particularly when you use the -\Package{babel} package\IndexPackage{babel} (see \cite{package:babel}) or -change language-dependent variables of \Class{scrlttr2}. - -The closing usually consists only of \Macro{end}\PParameter{document}. Of -course you can also add additional comments at this point. - -\begin{figure} - \KOMAoptions{captions=bottombeside}% - \setcapindent{0pt}% - \begin{captionbeside}[{% - General structure of a single letter within a letter document% - }]{% - General structure of a single letter within a letter document (see also - \autoref{fig:\LabelBase.document})% - \label{fig:\LabelBase.letter}}[l] - \begin{minipage}[b]{.667\linewidth}% - \centering\small\setlength{\fboxsep}{1.5ex}% - \addtolength{\linewidth}{-\dimexpr2\fboxrule+2\fboxsep\relax}% - \fbox{\parbox{\linewidth}{\raggedright% - \Macro{begin}\PParameter{letter}% - \OParameter{options}\Parameter{recipient}\\ - \dots\\[\dp\strutbox] - {\centering\emph{settings for this letter}\\} - \dots\\ - \DescRef{\LabelBase.cmd.opening}\Parameter{salutation}\\ - }}\\[1pt] - \fbox{\parbox{\linewidth}{\raggedright% - \dots\\[\dp\strutbox] - {\centering\emph{letter text}\\} - \dots\\ - }}\\[1pt] - \fbox{\parbox{\linewidth}{\raggedright% - \DescRef{\LabelBase.cmd.closing}\Parameter{concluding text}\\ - \DescRef{\LabelBase.cmd.ps}\\ - \dots\\[\dp\strutbox] - {\centering\emph{postscript}\\} - \dots\\ - \DescRef{\LabelBase.cmd.encl}\Parameter{enclosures}\\ - \DescRef{\LabelBase.cmd.cc}\Parameter{additional recipients}\\ - \Macro{end}\PParameter{letter}\\ - }}\\[\dimexpr\fboxsep+\fboxrule\relax] - \end{minipage} - \end{captionbeside} -\end{figure} - -As detailed in \autoref{fig:\LabelBase.letter}, individual letters each -consist of an introduction, the body of the letter, and the closing. In the -introduction, all settings pertaining to the current letter alone are defined. -It is important that this introduction always ends with -\DescRef{\LabelBase.cmd.opening}\IndexCmd{opening}. Similarly, the closing -always starts with \DescRef{\LabelBase.cmd.closing}\IndexCmd{closing}. The -\PName{opening} and \PName{closing} arguments of the two commands can be left -empty, but both commands must be used and must have an argument. - -Note that you can change additional settings between the individual letters. -Such changes then apply to all subsequent letters. However, to keep your -letter documents clear and maintainable, you should think carefully before -actually placing further general settings of limited scope between the -letters. I cannot recommend this practice. However, if you use -\Package{scrletter2}, there is nothing wrong with inserting additional parts -of the document between or after letters that should not be in the same scope. -For example, you can combine a cover letter and a CV in one document. - -\begin{Declaration} - \begin{Environment}{letter}\OParameter{options}\Parameter{recipient} - \end{Environment} -\end{Declaration} -\BeginIndex{}{address}% -The \Environment{letter} environment is one of the key environments of the -letter class. A noteworthy\textnote{\KOMAScript{} vs. standard classes} -feature of \Class{scrlttr2} and \Package{scrletter} is that they can provide -additional \PName{options} for the \Environment{letter} environment. These -\PName{options} are executed internally using the -\DescRef{\LabelBase.cmd.KOMAoptions} command. - -The \PName{recipient}, or addressee, is a mandatory argument passed to the -\Environment{letter} environment and includes both the name and the address of -the recipient of the letter. Double\textnote{Attention!} backslashes serve to -separate the individual parts of the address. These parts are output on -individual lines in the address field. Nevertheless, you should not interpret -the double backslash as a mandatory line break. Vertical material such as new -paragraphs or vertical space is not permitted within the address. They can -lead to unexpected results and error messages. Incidentally, this is the same -for the standard letter class. - -\begin{Example} - \phantomsection\label{desc:\LabelBase.env.letter.example}% - Suppose you want to write a letter to Joanna Public. A minimalist - letter document would look like this: -\begin{lstcode} - \documentclass[version=last]{scrlttr2} - \usepackage[british]{babel} - \begin{document} - \begin{letter}{Joanna Public\\ - 1 Hillside\\ - SAMPLESTEAD\\ - WX12 3YZ} - \end{letter} - \end{document} -\end{lstcode} - However, this would not result in any output. It would not even print the - recipient on the letterhead page. Why this is the case is explained in the - description of the \DescRef{\LabelBase.cmd.opening} command on - \DescPageRef{\LabelBase.cmd.opening}. -\end{Example} - -Letters\ChangedAt{v3.27}{\Class{scrlttr2}\and \Package{scrletter}} are always -printed in single-column mode and without vertical adjustment. You can use -\DescRef{maincls.cmd.flushbottom}, explained in \autoref{sec:maincls.typearea} -on \DescPageRef{maincls.cmd.flushbottom}\IndexCmd{flushbottom}, together with -\DescRef{\LabelBase.cmd.AtBeginLetter} to force a vertical adjustment.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{AtBeginLetter}\Parameter{code}% - \Macro{AtEndLetter}\Parameter{code} -\end{Declaration} -As mentioned in \cite{latex:clsguide}, \LaTeX{} lets the user declare -additional \PName{code} to be executed at certain points in a \LaTeX{} run. -For this purpose, the \LaTeX{} kernel provides, for example, -\Macro{AtBeginDocument}\IndexCmd{AtBeginDocument} and -\Macro{AtEndOfClass}\IndexCmd{AtEndOfClass}. Such points are called -\emph{hooks}\Index{hook}. The \Class{scrlttr2} class and the -\Package{scrletter} package provide two additional hooks. You can declare the -\PName{code} for these using \Macro{AtBeginLetter} and -\Macro{AtEndLetter}\ChangedAt{v2.95}{\Class{scrlttr2}}. Originally, hooks were -intended for package and class authors, so they are documented only in -\cite{latex:clsguide} and not in \cite{latex:usrguide}. However, with letters -there are useful applications at the user level for both new hooks, as the -following example illustrates. -% -\begin{Example} - Suppose you have several letters in a document that use their own commands - to insert a questionnaire in the letters. The questions are numbered - automatically using a counter. Since \KOMAScript{} is unaware of this - counter, it would not be reset at the start of each new letter, unlike the - page number. If each questionnaire contains ten questions, the first - question in the fifth letter would get the number~41. You can solve this - problem by telling \KOMAScript{} to reset this counter at the beginning of - each letter: -\begin{lstlisting} - \newcounter{Question} - \newcommand{\Question}[1]{% - \refstepcounter{Question}\par - \noindent\begin{tabularx}{\textwidth}{l@{}X} - \theQuestion:~ & #1\\ - \end{tabularx}% - }% - \AtBeginLetter{\setcounter{Question}{0}} -\end{lstlisting} - This way first question remains question~1, even in the 1001st letter. Of - course the definition in this example requires the - \Package{tabularx}\IndexPackage{tabularx} package (see - \cite{package:tabularx}). -\end{Example}% -% -\EndIndexGroup - - -\begin{Declaration} - \Counter{letter}% - \Macro{thisletter}% - \Macro{letterlastpage} -\end{Declaration} -If\ChangedAt{v3.19}{\Class{scrlttr2}\and \Package{scrletter}} you have more -than one letter in a document, it is useful to have a letter number. For this -purpose, \KOMAScript{} has provided the \Counter{letter} counter, which -is incremented by one at each \Macro{begin}\PParameter{letter}, since -version~3.19. -\begin{Example} - Let's return to the \DescRef{\LabelBase.cmd.AtBeginLetter} - example. Instead of resetting the counter explicitly at - \Macro{begin}\PParameter{letter}, we can do so implicitly by defining - counter \Counter{Question} to depend on counter \Counter{letter}: -\begin{lstlisting} - \newcounter{Question}[letter] - \newcommand{\Question}[1]{% - \refstepcounter{Question}\par - \noindent\begin{tabularx}{\textwidth}{l@{}X} - \theQuestion:~ & #1\\ - \end{tabularx}% - }% -\end{lstlisting} - Now the new counter will be reset at every start of each letter so that - the first question in each letter will be number one. -\end{Example} - -If you want to display the current value of \Counter{letter}, this is -possible, as usual, with \Macro{theletter}. The counter can also be used for -cross-references. So you can use \Macro{label}\Parameter{name} to generate a -label immediately after \Macro{begin}\PParameter{letter} and reference it -somewhere in the document using \Macro{ref}\Parameter{name}. Inside the same -letter you can get the same result by simply using \Macro{thisletter} without -creating a label. - -For labels in form letters, it is necessary to give them a unique name across -all letters. Once again, you can use \Macro{thisletter} for this purpose. -\KOMAScript{} also uses \Macro{thisletter} internally to put a label on the -last page of each letter. This makes it possible to use -\Macro{letterlastpage}\IndexCmd{label}\IndexCmd{pageref} to reference the -number of the last page of the current letter at any point within the letter. -Since \Macro{letterlastpage} uses \Macro{label} and \Macro{pageref}, it is -only valid after several \LaTeX{} runs\,---\,usually two or three. If you use -\Macro{letterlastpage}, pay attention to the \emph{Rerun} messages in the -terminal output or \File{log} file messages about labels that have been -changed.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{opening}\Parameter{salutation} -\end{Declaration} -This is one of the most important commands for letters. On the surface, it may -seem that only the \PName{salutation}\Index{letter>salutation}, for example -``Dear Mrs~\dots'', is printed. Actually\textnote{Attention!}, this command -also prints the fold marks\Index{fold marks}, the -letterhead\Index{letterhead}, the address\Index{address}, the extra sender -information, the reference line\Index{reference line}, the title\Index{title}, -the subject\Index{subject}, and the footer\Index{page>footer}. In short, -without \Macro{opening} there is no letter. If, in fact, you want to print a -letter without a salutation, you have to use an \Macro{opening} command with -an empty argument. - -\begin{Example} - Let's return to the example of - \DescPageRef{\LabelBase.env.letter.example} and add a salutation: - \lstinputcode[xleftmargin=1em]{letter-0.tex} - This will result in the letterhead shown in - \autoref{fig:\LabelBase.letter-0}. - \begin{figure} - \setcapindent{0pt}% - \begin{captionbeside}[{Example: letter with recipient and salutation}]{% - result of a minimalist letter with recipient and salutation only - (the date is set by default)}[l] - \frame{\includegraphics[width=.4\textwidth]{letter-0}} - \end{captionbeside} - \label{fig:\LabelBase.letter-0} - \end{figure} -\end{Example} -\iffalse% Umbruchkorrekturtext -\begin{Explain} - In the early days of computer-generated letters, a salutation was normally - omitted, since individualised form letters were hardly possible. Today - personalised greetings are common in in mass mailings.% -\end{Explain} -\fi -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{closing}\Parameter{concluding text} -\end{Declaration} -The main purpose of the command \Macro{closing} is to typeset the -\PName{concluding text}\Index{closing}. This can even consist of multiple -lines. In that case, the individual lines should be separated by a double -backslash. Paragraph breaks inside the \PName{concluding text} are not -allowed. - -In addition, this command also prints the content of the -\DescRef{\LabelBase.variable.signature} variable. You can find more -information about the signature and its configuration in -\autoref{sec:\LabelBase.closing} on -\DescPageRef{\LabelBase.variable.signature}. - -\begin{Example} - Let's extend the our example with a few lines of text and a closing phrase: - \lstinputcode[xleftmargin=1em]{letter-1.tex} - This will result in a the letter shown in \autoref{fig:\LabelBase.letter-1}. - \begin{figure} - \setcapindent{0pt}% - \begin{captionbeside}[{Example: letter with recipient, opening, text, and - closing}]{% - result of a short letter with recipient, opening, text, and closing - % The refernce to DIN-letters in the German guide isn't relevant for - % English-language letters - (the date is set by default)}[l] - \frame{\includegraphics[width=.4\textwidth]{letter-1}} - \end{captionbeside} - \label{fig:\LabelBase.letter-1} - \end{figure} -\end{Example} -% -\EndIndexGroup - -\begin{Declaration} - \Macro{ps} -\end{Declaration}% -This instruction merely switches to the postscript. To do so, a new paragraph -begins, and a vertical gap\,---\,usually below the signature\,---\,is -inserted. The \Macro{ps} text can be followed by any text. If you want the -postscript to be introduced with the acronym ``PS:'', which in most current -usage is written without full stops, you have to type this yourself. This -abbreviation is printed neither automatically nor optionally by the -\Class{scrlttr2} class. - -\begin{Example} - The sample letter with the addition of a postscript - \lstinputcode[xleftmargin=1em]{letter-2.tex} - results in \autoref{fig:\LabelBase.letter-2}. - \begin{figure} - \setcapindent{0pt}% - \begin{captionbeside}[{Example: letter with recipient, opening, text, - closing, and postscript}]{% - result of a short letter with recipient, opening, text, closing, and - postscript (the date is set by default)}[l] - \frame{\includegraphics[width=.4\textwidth]{letter-2}} - \end{captionbeside} - \label{fig:\LabelBase.letter-2} - \end{figure} -\end{Example} - -\begin{Explain} - When letters were written still by hand, it was quite common to use a - postscript because this was the only way to add information which had been - forgotten in the main part of the letter. For letters written with \LaTeX{}, - of course, you can easily insert additional lines. Nevertheless, postscripts - remain popular. They can be useful to emphasize important points once more, - or even to mention the less important matters. -\end{Explain} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{cc}\Parameter{distribution list}% - \Variable{ccseparator}% -\end{Declaration} -You can print a \PName{distribution list}\Index{recipient>additional}% -\Index{distribution list}\Index{carbon copy} with the \Macro{cc} command. The -command takes the \PName{distribution list} as its argument. If the content of -the variable \Variable{ccseparator}\Index{separator}\Index{delimiter} is not -empty, the name and content of this variable are inserted before the -\PName{distribution list}. In this case, the \PName{distribution list} will be -indented appropriately. It's a good idea\textnote{Hint!} to set the -\PName{distribution list} \Macro{raggedright}\IndexCmd{raggedright} and to -separate the individual entries with a double backslash. -\begin{Example} - This time, the sample letter should go not only to the chairman but also to - all club members: - \lstinputcode[xleftmargin=1em]{letter-3.tex}% - The result is shown in \autoref{fig:\LabelBase.letter-3}. - \begin{figure} - \setcapindent{0pt}% - \begin{captionbeside}[{Example: letter with recipient, opening, text, - closing, postscript, and distribution list}]{% - result of a short letter with recipient, opening, text, closing, - postscript, and distribution list (the date is set by default)}[l] - \frame{\includegraphics[width=.4\textwidth]{letter-3}} - \end{captionbeside} - \label{fig:\LabelBase.letter-3} - \end{figure} -\end{Example} -A vertical gap is inserted automatically before the distribution list.% -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{encl}\Parameter{enclosures}% - \Variable{enclseparator}% -\end{Declaration} -The \PName{enclosures} have the same structure as the distribution list. The -only difference is that the list of enclosures begins with the name and -content of the \Variable{enclseparator}\Index{separator}\Index{delimiter} -variable. -\begin{Example} - To the sample letter we will attach an excerpt from the club's articles of - association. These will be added as an enclosure. Because there is only one - enclosure, we change the description title accordingly: - \lstinputcode[xleftmargin=1em]{letter-4.tex} - This will result in \autoref{fig:\LabelBase.letter-4}. - \begin{figure} - \setcapindent{0pt}% - \begin{captionbeside}[{Example: letter with recipient, opening, text, - closing, postscript, distribution list, and enclosure}]{% - result of a short letter with recipient, opening, text, closing, - postscript, distribution list, and enclosure (the date is set by - default)}[l] - \frame{\includegraphics[width=.4\textwidth]{letter-4}} - \end{captionbeside} - \label{fig:\LabelBase.letter-4} - \end{figure} -\end{Example} -% -\EndIndexGroup -% -\EndIndexGroup - - -\LoadCommonFile{fontsize} % \section{Choosing the Document Font Size} - -\LoadCommonFile{textmarkup} % \section{Text Markup} - -\section{Letterhead Page} -\seclabel{firstpage} -\BeginIndexGroup -\BeginIndex{}{letterhead page}% - -The letterhead page is the first page of, and therefore the signpost for, each -letter. In a business context, the paper for this page is often preprinted -stationery containing elements such as a header with the sender's information -and logo. This header itself is also known as a letterhead. \KOMAScript{} lets -you position these elements freely, and so you can not only replicate the -letterhead page directly but also fill in the required fields instantaneously. -This free positioning is achieved with pseudo-lengths (see -\autoref{sec:\LabelBase.pseudoLength} starting on -\autopageref{sec:\LabelBase.pseudoLength}). You can find a schematic -representation of the letterhead page and the variables used for it in -\autoref{fig:\LabelBase.variables}. The names of the variables are printed in -bold to better distinguish the commands from their arguments. - -Subsequent pages\Index{page>subsequent}\Index{subsequent pages} should be -distinguished from the letterhead page. For the purposes of this manual, -subsequent pages are all pages of a letter except the first one. - -\begin{figure} - \centering - \includegraphics[scale=0.99]{varDIN} - \caption{schematic display of the letterhead page outlining the most - important commands and variables} - \label{fig:\LabelBase.variables} -\end{figure} - - -\subsection{Fold Marks} -\seclabel{foldmarks} -\BeginIndexGroup -\BeginIndex{}{fold marks}% -\index{marks>folding|see{fold marks}} - -Fold marks, or folding marks, are short horizontal lines at the left edge, and -short vertical lines at the upper edge of the paper. \KOMAScript{} currently -supports three configurable horizontal and one configurable vertical fold -marks. In addition, there is support for a hole-punch mark, or centre mark, -which cannot be shifted vertically. - -\begin{Declaration} - \OptionVName{foldmarks}{setting} -\end{Declaration} -The \Option{foldmarks} option activates or deactivates fold marks for two, -three, or four vertical divisions and one horizontal division. The individual -parts do not have to be of equal size. The positions of three of the four -horizontal marks and the single vertical mark are configurable via -pseudo-lengths (see \autoref{sec:\LabelBase.pseudoLength}, -\autopageref{sec:\LabelBase.pseudoLength}). - -With the \Option{foldmarks} option, you can either use the default values for -simple switches described in \autoref{tab:truefalseswitch}, -\autopageref{tab:truefalseswitch} in order to activate or deactivate all -configured fold marks on the left and upper edges of the paper at once, -or\ChangedAt{v2.97e}{\Class{scrlttr2}} you can configure the individual fold -marks independently by specifying one or more letters, as listed in -\autoref{tab:\LabelBase.foldmark}. In the latter case, the fold marks are only -shown if they have not been deactivated globally with \PValue{false}, -\PValue{off}, or \PValue{no}. The exact position of the fold marks is depends -on the user settings or the \File{lco} files (see -\autoref{sec:\LabelBase.lcoFile} starting on -\autopageref{sec:\LabelBase.lcoFile}). The default values are \PValue{true} -and \PValue{TBMPL}.\textnote{default} -% -\begin{table} -% \centering - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% -% \caption - \begin{captionbeside}{% - Combinable values for configuring fold marks with the - \Option{foldmarks} option% - }[l] - \begin{tabular}[t]{ll} - \toprule - \PValue{B} & activate bottom horizontal fold mark on left paper edge\\% - \PValue{b} & deactivate bottom horizontal fold mark on left paper edge\\% - \PValue{H} & activate all horizontal fold marks on left paper edge\\% - \PValue{h} & deactivate all horizontal fold marks on left paper edge\\% - \PValue{L} & activate left vertical fold mark on upper paper edge\\% - \PValue{l} & deactivate left vertical fold mark on upper paper edge\\% - \PValue{M} & activate middle horizontal fold mark on left paper edge\\% - \PValue{m} & deactivate middle horizontal fold mark on left paper edge\\% - \PValue{P} & activate hole-punch or centre mark on left paper edge\\% - \PValue{p} & deactivate hole-punch or centre mark on left paper edge\\% - \PValue{T} & activate top horizontal fold mark on left paper edge\\% - \PValue{t} & deactivate top horizontal fold mark on left paper edge\\% - \PValue{V} & activate all vertical fold marks on upper paper edge\\% - \PValue{v} & deactivate all vertical fold marks on upper paper edge\\% - \bottomrule - \end{tabular} - \end{captionbeside} - \label{tab:\LabelBase.foldmark} -\end{table} -% -\begin{Example} - Suppose you want to deactivate all fold marks except the hole-punch mark. If - the default has not already been changed, you can deactivate it as follows: -\begin{lstlisting} - \KOMAoptions{foldmarks=blmt} -\end{lstlisting} - If there is a chance that the default has already been changed, you should - use a safer method. This changes our example a little bit: - \lstinputcode[xleftmargin=1em]{letter-7}% - The result is shown in \autoref{fig:\LabelBase.letter-7}. - \begin{figure} - \setcapindent{0pt}% - \begin{captionbeside}[{Example: letter with recipient, opening, text, - closing, postscript, distribution list, enclosure, and hole-punch - mark}]{% - result of a short letter with recipient, opening, text, closing, - postscript, distribution list, enclosure, and hole-punch mark - (the date is set by default)}[l] - \frame{\includegraphics[width=.4\textwidth]{letter-7}} - \end{captionbeside} - \label{fig:\LabelBase.letter-7} - \end{figure} -\end{Example} -\BeginIndex{FontElement}{foldmark}\LabelFontElement{foldmark}% -You\ChangedAt{v2.97c}{\Class{scrlttr2}} can change the colour of the fold mark -with the \DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\LabelBase.textmarkup}, \DescPageRef{\LabelBase.cmd.setkomafont}) -with the \FontElement{foldmark} element. The default is no change.% -\EndIndexGroup - - -\begin{Declaration} - \PLength{tfoldmarkvpos}% - \PLength{mfoldmarkvpos}% - \PLength{bfoldmarkvpos} -\end{Declaration} -\KOMAScript{} recognises a total of three fold marks whose vertical position -can be configured. The distance of the top fold mark from the upper edge of -the paper is determined by the \PLength{tfoldmarkvpos} pseudo-length; the -distance of the middle fold mark, by the -\PLength{mfoldmarkvpos}\ChangedAt{v2.97e}{\Class{scrlttr2}} pseudo-length; the -distance of the bottommost fold mark, by \PLength{bfoldmarkvpos} -pseudo-length. With the addition of the hole-punch\Index{hole-punch mark} or -centre\Index{centre mark|see{hole-punch mark}} mark, there is yet a fourth -horizontal mark. This one is however always placed at the vertical centre of -the paper. -\iftrue% Umbruchkorrekturtext -There is no pseudo-length for this last mark because its vertical position is -not configurable. -\fi - -The\textnote{Attention!} top and bottom fold marks do not serve to divide the -paper exactly into equal thirds. Instead, the paper should be folded with -their help such that the address field can be seen in a window envelope. The -settings are therefore different depending on the \File{lco} file chosen. -Several such files are available offering predefined formats. One format -particularly worth noting is \Option{DINmtext}. This format assumes an -envelope format of C6/5 (also known as ``C6 long''). Letters written with this -option are typically not suited for C5 or C4 envelopes. - -The middle fold mark is not normally required for Western letters. In Japan, -however, a larger number of envelope formats exists, requiring one more fold -mark (see the Japanese \File{lco} files). Note that the terms ``top'', -``middle'', and ``bottom'' fold marks only represent a naming convention. In -fact, it is not required that \PLength{tfoldmarkvpos} must be smaller than -\PLength{mfoldmarkvpos}, which in turn must be smaller than -\PLength{bfoldmarkvpos}. If, though, one of the pseudo-lengths is zero, then -the corresponding fold mark will not be set even if the -\DescRef{\LabelBase.option.foldmarks}\IndexOption{foldmarks~=\PName{setting}}% -\important{\DescRef{\LabelBase.option.foldmarks}} option (see -\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.foldmarks}) is -explicitly activated. -% -\EndIndexGroup - - -\begin{Declaration} - \PLength{tfoldmarklength}% - \PLength{mfoldmarklength}% - \PLength{bfoldmarklength}% - \PLength{pfoldmarklength} -\end{Declaration} -These\ChangedAt{v2.97e}{\Class{scrlttr2}} four pseudo-lengths determine the -lengths of the four horizontal fold marks. One\textnote{Attention!} feature is -particularly worth noting. If the length is given as zero, then the three -vertically configurable pseudo-lengths \PLength{tfoldmarklength}, -\PLength{mfoldmarklength} and \PLength{bfoldmarklength} are set to 2\Unit{mm}. -The length of the hole-punch mark, \PLength{pfoldmarklength}, however, is set -to 4\Unit{mm}.% -\EndIndexGroup - - -\begin{Declaration} - \PLength{foldmarkhpos} -\end{Declaration} -This pseudo-length gives the distance of all horizontal fold marks from the -left edge of the paper. Normally, this is 3.5\Unit{mm}. You\textnote{Hint!} -can change this value in your own \File{lco} file if you are using a printer -that has a wider unprintable left margin. Whether the fold marks are typeset -at all depends on the option \DescRef{\LabelBase.option.foldmarks}% -\important{\DescRef{\LabelBase.option.foldmarks}}% -\IndexOption{foldmarks~=\PName{setting}} (see -\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.foldmarks}). -% -\EndIndexGroup - - -\begin{Declaration} - \PLength{lfoldmarkhpos} -\end{Declaration} -In\ChangedAt{v2.97e}{\Class{scrlttr2}} addition to the horizontal fold marks, -there is also a vertical fold mark. Its distance from the left margin is set -via the \PLength{lfoldmarkhpos} pseudo-length. This fold mark is used, for -example, in Japanese Chou- or You-format envelopes if you want to use them -with A4 paper. It can also be useful for envelopes in C6 format.% -\EndIndexGroup - - -\begin{Declaration} - \PLength{lfoldmarklength} -\end{Declaration} -The\ChangedAt{v2.97e}{\Class{scrlttr2}} \PLength{lfoldmarklength} -pseudo-length determines the length of the vertical fold mark. Once again, a -feature worth noting is that if the length is given as zero, a length of -4\Unit{mm} is actually used.% -\EndIndexGroup - - -\begin{Declaration} - \PLength{foldmarkvpos} -\end{Declaration} -This\ChangedAt{v2.97e}{\Class{scrlttr2}} pseudo-length determines the distance of -all vertical fold marks from the upper edge of the paper. Normally this is -3.5\Unit{mm}, but\textnote{Hint!} you can change the value in your own -\File{lco} file in case your printer has a wider unprintable -top margin. Whether or not the foldmarks are actually typeset depends on the -\DescRef{\LabelBase.option.foldmarks}% -\important{\DescRef{\LabelBase.option.foldmarks}}% -\IndexOption{foldmarks~=\PName{setting}} option (see -\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.foldmarks}). -\iffree{At present there is only one vertical fold mark, called the left - vertical fold mark.}{}% -\EndIndexGroup - - -\begin{Declaration} - \PLength{foldmarkthickness} -\end{Declaration} -This\ChangedAt{v2.97c}{\Class{scrlttr2}} pseudo-length determines the -thickness of all fold marks. The default is 0.2\Unit{pt}, in other words a -very thin hairline. In\textnote{Hint!} particular, if the colour of the fold -marks is changed, this may not be enough.% -\EndIndexGroup -% -\EndIndexGroup - - -\subsection{Letterhead} -\seclabel{firstHead} -\BeginIndexGroup -\BeginIndex{}{letterhead}% - -The term letterhead refers here to all of the information concerning the -sender that appears above the recipient's address. Normally you would expect -that this information would be set through the page-style settings. In fact, -this was the case with the old letter class, \Class{scrlettr}. -But\textnote{Attention!} \Class{scrlttr2} and \Package{scrletter} output the -letterhead independently of the page style by means of the -\DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} command. -% Fuellmaterial -\iftrue% - The letterhead is positioned absolutely, so that it is independent of the - type area. In fact, the first page of a letter, the page that holds the - letterhead, is set using the page style - \DescRef{\LabelBase.pagestyle.empty}\IndexPagestyle{empty}.% -\fi -% Ende des Fuellmaterials - - -\begin{Declaration} - \OptionVName{firsthead}{simple switch} -\end{Declaration} -\BeginIndex{}{letterhead}% -\BeginIndex{}{letter>header}% -The\ChangedAt{v2.97e}{\Class{scrlttr2}} letterhead is usually the topmost -element of the letterhead page. With the \Option{firsthead} option, you can -choose whether the letterhead will be typeset at all. The option accepts the -standard values for simple switches given in \autoref{tab:truefalseswitch} on -\autopageref{tab:truefalseswitch}. The default is to typeset the letterhead.% -% -\EndIndexGroup - - -\begin{Declaration} - \PLength{firstheadvpos} -\end{Declaration} -The \PLength{firstheadvpos} pseudo-length gives the distance between the top -edge of the paper and the start of the letterhead. This value is set -differently in the various predefined -\File{lco} files\textnote{\File{lco} file}\Index{lco file=\File{lco} file}. A -typical value is 8\Unit{mm}.% -\EndIndexGroup - - -\begin{Declaration} - \PLength{firstheadhpos} -\end{Declaration} -A positive value of the -\PLength{firstheadhpos}\ChangedAt{v3.05}{\Class{scrlttr2}} pseudo-length gives -the distance between the left edge of the paper and the start of the -letterhead. If\textnote{Attention!} the value is actually greater than or -equal to the paper width, -\Length{paperwidth}\important{\Length{paperwidth}}\IndexLength{paperwidth}, -the letterhead will be centred horizontally on the letterhead paper. A -negative value gives the distance between the right edge of the paper and the -right edge of the letterhead. If the value actually less than or equal to the -negative value of the width of the paper, the letterhead is placed flush with -the left edge of the type area. - -The default\textnote{Attention!} value is typically -\Length{maxdimen}\IndexLength{maxdimen}, which is the maximum allowed value of -a length. This results in horizontal centring.% -\EndIndexGroup - - -\begin{Declaration} - \PLength{firstheadwidth} -\end{Declaration} -The \PLength{firstheadwidth} pseudo-length gives the width of the letterhead. -This value is set differently in the various predefined \File{lco} -files\textnote{\File{lco} file}\Index{lco file=\File{lco} file}. While this -value usually depends on the paper width and the distance between the left -edge of the paper and the recipient's address field, it was the width of the -type area in \Option{KOMAold} and has a fixed value of 170\Unit{mm} in -\Option{NF}.% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{fromalign}{method} -\end{Declaration} -\BeginIndex{}{letterhead}% -\BeginIndex{}{letter>head}% -The\important{\Option{fromalign}} \Option{fromalign} option determines where -the sender information should be placed on the first page. In addition to the -various placement options in the letterhead, you also have the -ability\ChangedAt{v2.97e}{\Class{scrlttr2}} to accommodate extra sender -information\Index{extra sender information}. At the same -time\textnote{Attention!}, this option serves as a central switch to activate -or deactivate letterhead extensions. If these extensions are deactivated, some -other options will have no effect. This will be noted in the explanations of -the respective options. Available values for \Option{fromalign} are shown in -\autoref{tab:\LabelBase.fromalign}. The default value is \PValue{left}.% -% -\begin{table} - \caption[{Available values for the \Option{fromalign} option with - \Class{scrlttr2}}]{Available values for the \Option{fromalign} option to - define the position of the from address in the letterhead with - \Class{scrlttr2}} - \label{tab:\LabelBase.fromalign} - \begin{desctabular} - \entry{\PValue{center}, \PValue{centered}, \PValue{middle}}{% - Sender information is centred inside the letterhead; a logo is - placed at the beginning of the extra sender information, if - applicable; letterhead extensions are activated.}% - \entry{\PValue{false}, \PValue{no}, \PValue{off}}{% - The default design will be used for the sender information; the - letterhead extensions are deactivated.}% - \entry{\PValue{left}}{% - Sender information is left-aligned in the letterhead; a logo is - placed right-aligned, if applicable; letterhead extensions are - activated.}% - \entry{\PValue{locationleft}, \PValue{leftlocation}}{% - Sender information is left-justified and uses the extra sender - information; a logo is placed at the top of it, if applicable; the - letterhead is automatically deactivated but can be reactivated using the - \DescRef{\LabelBase.option.firsthead} option.}% - \entry{\PValue{locationright}, \PValue{rightlocation}, - \PValue{location}}{% - Sender information is right-justified and uses the extra sender - information; a logo is placed at the top of it, if applicable; the - letterhead is automatically deactivated but can be reactivated using the - \DescRef{\LabelBase.option.firsthead} option.}% - \entry{\PValue{right}}{% - Sender information is right-justified; a logo is placed left-justified, - if applicable; letterhead extensions are activated}% - \end{desctabular} -\end{table} -% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{fromrule}{position}% - \Variable{fromname}% - \Variable{fromaddress}% -\end{Declaration} -\BeginIndex{}{letterhead}% -\BeginIndex{}{letter>head}% -The\important{\Variable{fromname}} sender's name is determined by the -\Variable{fromname} variable. Its \PName{description} (see also -\autoref{tab:\LabelBase.fromTerm}, \autopageref{tab:\LabelBase.fromTerm}) is -not used in the default letterheads. - -In\important{\OptionValue{fromrule}{aftername}} the extended letterhead, you -can create a horizontal rule below the sender's name with -\OptionValue{fromrule}{aftername}. -Alternatively\important{\OptionValue{fromrule}{afteraddress}} you can place -this rule below the complete sender information with -\OptionValue{fromrule}{afteraddress}. A summary of all available settings for -the rule position is shown in \autoref{tab:\LabelBase.fromrule}. The length of -this rule is determined by the -\PLength{fromrulewidth}\IndexPLength[indexmain]{fromrulewidth} pseudo-length. - -\begin{table} - \caption[{Available values for the \Option{fromrule} option with - \Class{scrlttr2}}]{Available values for the \Option{fromrule} option for the - position of the rule in the sender information with - \Class{scrlttr2}} - \label{tab:\LabelBase.fromrule} - \begin{desctabular} - \entry{\PValue{afteraddress}, \PValue{below}, \PValue{on}, \PValue{true}, - \PValue{yes}}{% - rule below the sender's address}% - \entry{\PValue{aftername}}{% - rule directly below the sender's name}% - \entry{\PValue{false}, \PValue{no}, \PValue{off}}{% - no rule}% - \end{desctabular} -\end{table} - -The default\textnote{default} for the rule with the extended letterhead is -\PValue{false}. But in the standard letterhead, the rule will always be placed -below the sender's name. - -The\important{\Variable{fromaddress}} sender's address follows below the name. -The \PName{content} of variable \Variable{fromaddress} determines this -address. The address \PName{description} (see also -\autoref{tab:\LabelBase.fromTerm}) is not used in the default letterheads - -\BeginIndexGroup -\BeginIndex{FontElement}{fromaddress}\LabelFontElement{fromaddress}% -\BeginIndex{FontElement}{fromname}\LabelFontElement{fromname}% -\BeginIndex{FontElement}{fromrule}\LabelFontElement{fromrule}% -You can set the font used for the complete sender information with the -\FontElement{fromaddress}\IndexFontElement{fromaddress}% -\important{\FontElement{fromaddress}} element. You can define modifications to -this with the \FontElement{fromname}\IndexFontElement{fromname}% -\important{\FontElement{fromname}} element for the sender's name, and with the -\FontElement{fromrule}\IndexFontElement{fromrule}% -\important{\FontElement{fromrule}} element for the rule created with the -\Option{fromrule} option. The default setting does not change the font. For -the rule, font switching is mainly intended to change the colour of the rule, -for example to use grey instead of black. See \cite{package:xcolor} for -information about colours.% -% -\EndIndexGroup - -\begin{Example} - Now let's give the sender of our sample letter a name: - \lstinputcode[xleftmargin=1em]{letter-8.tex} - \begin{figure} - \centering - \frame{\includegraphics[width=.4\textwidth]{letter-8}}\quad - \frame{\includegraphics[width=.4\textwidth]{letter-9}} - \caption[{Example: letter with sender, recipient, opening, text, closing, - postscript, distribution list, and enclosure}] - {result of a short letter with sender, recipient, opening, text, closing, - postscript, distribution list, and enclosure (the date is set by - default): on the left, the standard letterhead using - \OptionValueRef{\LabelBase}{fromalign}{false}; on the right, the - extended letterhead using \OptionValueRef{\LabelBase}{fromalign}{center}} - \label{fig:\LabelBase.letter-8-9} - \end{figure} - Initially, the standard rather than the extended letterhead is used. The - result can be seen in \autoref{fig:\LabelBase.letter-8-9} on the left. For - comparison, the same example is shown on the right with - \OptionValueRef{\LabelBase}{fromalign}{center} (that is, with the extended - letterhead). You can see that this variation initially has no rule. - - For the first time, \autoref{fig:\LabelBase.letter-8-9} also shows a - signature below the closing phrase. This is generated automatically from the - sender's name. You can find more information about how to configure the - signature in \autoref{sec:\LabelBase.closing}, starting on - \autopageref{sec:\LabelBase.closing}. - - Next, the letter with the extended letterhead should use the - \Option{fromrule} option to print a rule below the sender's name:% - \lstinputcode[xleftmargin=1em]{letter-11.tex}% - You can see the result on the right in - \autoref{fig:\LabelBase.letter-10-11}. By comparison, the same example on - the left uses the standard letterhead, which ignores the additional options. - % - \begin{figure} - \centering - \frame{\includegraphics[width=.4\textwidth]{letter-10}}\quad - \frame{\includegraphics[width=.4\textwidth]{letter-11}} - \caption[{Example: letter with sender, rule, recipient, - opening, text, closing, signature, postscript, distribution list, - enclosure, and hole-punch mark}] - {result of a short letter with sender, rule, recipient, - opening, text, closing, signature, postscript, distribution list, - enclosure and hole-punch mark (the date is set by default): - at left one the standard letterhead using - \OptionValueRef{\LabelBase}{fromalign}{false}, at right one the extended letterhead - using \OptionValueRef{\LabelBase}{fromalign}{center}} - \label{fig:\LabelBase.letter-10-11} - \end{figure} -\end{Example} - -An\textnote{Attention!} important note concerns the sender's address: within -the sender's address, individual parts such as house number and street, city -and postal code, etc., are separated with a double backslash. This double -backslash is interpreted differently depending on how the sender's address is -used and therefore is not necessarily a line break. Paragraphs, vertical -spacing, and the like are usually not allowed within the sender's information. -You have to know \KOMAScript{} very well to put such things into the sender -information, if necessary. In addition, note that if you do so, you should -definitely set the variables for return address (see -\DescRef{\LabelBase.variable.backaddress}, -\DescPageRef{\LabelBase.variable.backaddress}) and signature (see -\DescRef{\LabelBase.variable.signature}, -\DescPageRef{\LabelBase.variable.signature}) yourself.% -% -\EndIndexGroup - - -\begin{Declaration} - \PLength{fromrulethickness}% - \PLength{fromrulewidth} -\end{Declaration} -As mentioned in the explanation of the -\DescRef{\LabelBase.option.fromrule}\IndexOption{fromrule} option in -\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.fromrule}, you -can put a horizontal rule within or below the sender's address in the -predefined letterheads. If\textnote{Attention!} the \PLength{fromrulewidth} -pseudo-length has a value of 0\Unit{pt}, which is the default in the -predefined \File{lco} files, the length of this rule is calculated -automatically taking into account, for example, letterhead width or an -optional logo. You can adjust rule length manually in your own \File{lco} -files by setting this pseudo-length to positive values using -\Macro{setplength} (see \DescPageRef{\LabelBase.cmd.setplength}). The -default thickness of the line\ChangedAt{v2.97c}{\Class{scrlttr2}}, -\PLength{fromrulethickness}, is 0.4\Unit{pt}.% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{symbolicnames}{value}% - \OptionVName{fromphone}{simple switch}% - \OptionVName{frommobilephone}{simple switch}% - \OptionVName{fromfax}{simple switch}% - \OptionVName{fromemail}{simple switch}% - \OptionVName{fromurl}{simple switch}% - \Variable{fromphone}% - \Variable{frommobilephone}% - \Variable{fromfax}% - \Variable{fromemail}% - \Variable{fromurl}% - \Variable{phoneseparator}% - \Variable{mobilephoneseparator}% - \Variable{faxseparator}% - \Variable{emailseparator}% - \Variable{urlseparator}% -\end{Declaration} -\BeginIndex{}{letterhead}% -\BeginIndex{}{letter>header}% -You can use the five options \Option{fromphone}, -\Option{frommobilephone}\ChangedAt{v3.12}{\Class{scrlttr2}}, \Option{fromfax}, -\Option{fromemail}, and \Option{fromurl} to specify whether to include the -phone number\Index{telephone}\Index{phone}, -mobile\ChangedAt{v3.12}{\Class{scrlttr2}} phone number\Index{mobile - phone}\Index{cell phone}\Index{cellphone}, fax number\Index{fax}, e-mail -address\Index{e-mail}, or URL should be as part of the sender's -information. You can assign any standard value for simple switches from -\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} to these -options. The default for all of them is \PValue{false}. The \PName{contents} -themselves are determined by the variables of the same name. You can find the -defaults for the \PName{description} or title of each variable in -\autoref{tab:\LabelBase.fromTerm}. You can find the separators that will be -inserted between the \PName{description} and the \PName{content} in -\autoref{tab:\LabelBase.fromSeparator}. - -You can\ChangedAt{v3.12}{\Class{scrlttr2}}\important{\Option{symbolicnames}} -change the defaults for describing the variables all at once with the -\Option{symbolicnames} option. This option understands the values for simple -switches found in \autoref{tab:truefalseswitch}, -\autopageref{tab:truefalseswitch}. -Activating\ChangedAt{v3.27}{\Class{scrlttr2}\and \Package{scrletter}} the -option corresponds to \PName{value} \PValue{marvosym} and replaces the -descriptions from the language-dependent labels of -\DescRef{scrlttr2-experts.cmd.emailname}, -\DescRef{scrlttr2-experts.cmd.faxname}, -\DescRef{scrlttr2-experts.cmd.mobilephonename}, and -\DescRef{scrlttr2-experts.cmd.phonename} with symbols from the -\Package{marvosym}\IndexPackage{marvosym} package. At the same time, the colon -is omitted when defining the separators. In this case, both the description -and the content of the URL separator will be empty. With -\OptionValue{symbolicnames}{fontawesome} or -\OptionValue{symbolicnames}{awesome}, symbols of package -\Package{fontawesome}\IndexPackage{fontawesome} are used. In this case there -is also a symbol for the URL. Note\textnote{Attention!} that you may need to -load the \Package{marvosym} or \Package{fontawesome} package in your document -preamble if you activate the option for the corresponding package for the -first time after \Macro{begin}\PParameter{document}. - -\begin{table} - \centering - \caption[{Default descriptions of the letterhead variables}]{Default - descriptions of the letterhead variables (you can find the description and - contents of the separator variables in - \autoref{tab:\LabelBase.fromSeparator}} - \begin{desctabular}[1.8em] - \ventry{fromemail}{\DescRef{\LabelBase.cmd.usekomavar*}\PParameter{emailseparator}% - \DescRef{\LabelBase.cmd.usekomavar}\PParameter{emailseparator}}% - \ventry{fromfax}{\DescRef{\LabelBase.cmd.usekomavar*}\PParameter{faxseparator}% - \DescRef{\LabelBase.cmd.usekomavar}\PParameter{faxseparator}}% - \ventry{frommobilephone}{% - \ChangedAt{v3.12}{\Class{scrlttr2}}% - \DescRef{\LabelBase.cmd.usekomavar*}\PParameter{mobilephoneseparator}% - \DescRef{\LabelBase.cmd.usekomavar}\PParameter{mobilephoneseparator}}% - \ventry{fromname}{\DescRef{scrlttr2-experts.cmd.headfromname}}% - \ventry{fromphone}{\DescRef{\LabelBase.cmd.usekomavar*}\PParameter{phoneseparator}% - \DescRef{\LabelBase.cmd.usekomavar}\PParameter{phoneseparator}}% - \ventry{fromurl}{\DescRef{\LabelBase.cmd.usekomavar*}\PParameter{urlseparator}% - \DescRef{\LabelBase.cmd.usekomavar}\PParameter{urlseparator}}% - \end{desctabular} - \label{tab:\LabelBase.fromTerm} -\end{table} - -\begin{table}[tp] - \centering -% \KOMAoptions{captions=topbeside}% -% \setcapindent{0pt}% - \caption{Default descriptions and contents of the letterhead - separators without the \Option{symbolicnames} option} -% [l] - \begin{tabular}[t]{lll} - \toprule - variable name & description & content \\ - \midrule - \Variable{emailseparator} & \DescRef{scrlttr2-experts.cmd.emailname} & \texttt{:\~} \\ - \Variable{faxseparator} & \DescRef{scrlttr2-experts.cmd.faxname} & \texttt{:\~} \\ - \Variable{mobilephoneseparator} & \DescRef{scrlttr2-experts.cmd.mobilephonename} & \Macro{usekomavaer}\PParameter{phoneseparator} \\ - \Variable{phoneseparator} & \DescRef{scrlttr2-experts.cmd.phonename} & \texttt{:\~} \\ - \Variable{urlseparator} & \DescRef{scrlttr2-experts.cmd.wwwname} & \texttt{:\~} \\ - \bottomrule - \end{tabular} -% \end{captionbeside} - \label{tab:\LabelBase.fromSeparator} -\end{table} - -\begin{Example} - Mr Public from our sample letter has a telephone and an e-mail address. He - also wants to show these in the letterhead. At the same time, the separation - rule should now be placed after the letterhead. So he uses the appropriate - options and also sets the required variables:% - \lstinputcode[xleftmargin=1em]{letter-12.tex}% - The results on the left side of \autoref{fig:\LabelBase.letter-12-13}, - however, are confounding: the options are ignored. That's because the - additional variables and options are only used in the extended letterhead. - So the \DescRef{\LabelBase.option.fromalign} option must be used, as it is - in the right side of - \autoref{fig:\LabelBase.letter-12-13}. - \begin{figure} - \centering - \frame{\includegraphics[width=.4\textwidth]{letter-12}}\quad - \frame{\includegraphics[width=.4\textwidth]{letter-13}} - \caption[{Example: letter with extra sender information, rule, - recipient, opening, text, closing, signature, postscript, distribution - list, enclosure, and hole-punch mark; standard vs. extended letterhead}] - {result of a short letter with sender, rule, recipient, opening, text, - closing, signature, postscript, distribution list, enclosure and - hole-punch mark (the date is set by default): the left one uses the - standard letterhead with - \OptionValueRef{\LabelBase}{fromalign}{false}; the right one uses the - extended letterhead with \OptionValueRef{\LabelBase}{fromalign}{center}} - \label{fig:\LabelBase.letter-12-13} - \end{figure} - \lstinputcode[xleftmargin=1em]{letter-13.tex} - - You can compare two other alternatives with left-aligned sender information using - \OptionValueRef{\LabelBase}{fromalign}{left} and right-aligned sender information - using \OptionValueRef{\LabelBase}{fromalign}{right} in - \autoref{fig:\LabelBase.letter-14-15}. - \begin{figure} - \centering - \frame{\includegraphics[width=.4\textwidth]{letter-14}}\quad - \frame{\includegraphics[width=.4\textwidth]{letter-15}} - \caption[{Example: letter with extra sender information, rule, - recipient, opening, text, closing, signature, postscript, distribution - list, enclosure, and hole-punch mark; left- vs. right-aligned - letterhead}] - {result of a short letter with extra sender information, rule, - recipient, opening, text, closing, signature, postscript, distribution - list, enclosure and hole-punch mark (the date is set by default): - the left one uses a left-aligned letterhead with - \OptionValueRef{\LabelBase}{fromalign}{left}; the right one uses a - right-aligned letterhead using - \OptionValueRef{\LabelBase}{fromalign}{right}} - \label{fig:\LabelBase.letter-14-15} - \end{figure} -\end{Example} -% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{fromlogo}{simple switch}% - \Variable{fromlogo}% -\end{Declaration} -\BeginIndex{}{letterhead}% -\BeginIndex{}{letter>head}% -You can use the \Option{fromlogo} to configure whether to put a -logo\Index{Logo} in the letterhead. You can use any of the default values from -\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch} for the -\PName{simple switch}. The default is \PValue{false}, which means no logo. The -logo itself is defined by the \PName{content} of the \Variable{fromlogo} -variable. The \PName{description} of the logo is empty by default and -\KOMAScript{} does not use it in the default letterhead pages.% -\begin{Example} - Mr Public finds it particularly stylish when he provides his letterhead with - a logo. He has saved his logo as a graphics file, which he would like to - load using \Macro{includegraphics}. To do this, he loads the - \Package{graphics}\IndexPackage{graphics} package (see - \cite{package:graphics}).% - \lstinputcode[xleftmargin=1em]{letter-16}% - You can see the result in the top left of - \autoref{fig:\LabelBase.letter-16-18}. The other two images in this figure - show the results with right-aligned and centred sender information. - \begin{figure} - \setcapindent{0pt}% - {\hfill - \frame{\includegraphics[width=.4\textwidth]{letter-16}}\quad - \frame{\includegraphics[width=.4\textwidth]{letter-17}}\par\bigskip} - \begin{captionbeside}[{Example: letter with extra sender information, - logo, rule, recipient, opening, text, closing, signature, postscript, - distribution list, enclosure, and hole-punch mark; left-aligned vs. - right-aligned vs. centred sender information}] - {result of a short letter with extra sender information, logo, rule, - recipient, opening, text, closing, signature, postscript, distribution - list, enclosure and hole-punch mark (the date is set by default): - at top left the sender is left-aligned, at top right the sender is - centred, and at bottom right the sender is right-aligned - sender}[l] - \frame{\includegraphics[width=.4\textwidth]{letter-18}}\quad - \end{captionbeside} - \label{fig:\LabelBase.letter-16-18} - \end{figure} -\end{Example}% -% -\EndIndexGroup - - -\begin{Declaration} - \Variable{firsthead}% -\end{Declaration} -In many cases, the capabilities that \Class{scrlttr2} offers with the -foregoing options and variables will be sufficient to design a letterhead. In -some cases, however, you may want even more flexibility. In those situations, -you will have to do without the possibilities offered by the predefined -letterhead, which you can select via the options described above. Instead, you -must create your own letterhead from scratch. To do so, you must specify the -desired structure as the \PName{contents} of the \Variable{firsthead} -variable. For example, you can set several boxes side by side or one beneath -the other using the \Macro{parbox} command (see \cite{latex:usrguide}). -Experienced users should thus be able to create their own a letterheads. Of -course you can and should use other variables with -\DescRef{\LabelBase.cmd.usekomavar}. \KOMAScript{} does not use the -\PName{description} of variable \Variable{firsthead}. \iffree{}{You can find - a detailed example of a letterhead definition in - \autoref{cha:modernletters}.}% -\EndIndexGroup -% -\EndIndexGroup - - -\subsection{Addressee} -\seclabel{addressee}% -\BeginIndexGroup -\BeginIndex{}{addressee} -\index{recipient|seealso{addressee}} - -The term \emph{addressee} normally refers only to the recipient's name and -address, which are output in an address field. Additional information, -however, can be placed within this address field, including the delivery -method, for example registered mail or special delivery. For window envelopes, -the return address also counts as part of the address field, as it will be -displayed in the address window. The address field directly follows the -letterhead. - -\begin{Declaration} - \OptionVName{addrfield}{format}% - \OptionVName{backaddress}{value}% - \OptionVName{priority}{priority}% - \Variable{toname}% - \Variable{toaddress}% - \Variable{backaddress}% - \Variable{backaddressseparator}% - \Variable{specialmail}% - \Variable{fromzipcode}% - \Variable{zipcodeseparator}% - \Variable{place}% - \Variable{PPcode}% - \Variable{PPdatamatrix}% - \Variable{addresseeimage}% -\end{Declaration}% -\BeginIndex{}{address}% -The \Option{addrfield} option determines whether or not to print an address -field. The default\textnote{default} is to include an address field. The -option recognizes the formats described in -\autoref{tab:\LabelBase.addrfield}\ChangedAt{v3.03}{\Class{scrlttr2}}. With -the values \PValue{true}, -\PValue{topaligned}\ChangedAt{v3.17}{\Class{scrlttr2}\and -\Package{scrletter}}, \PValue{PP}, and \PValue{backgroundimage}, the name and -address of the recipient are determined by the mandatory argument of the -\DescRef{\LabelBase.env.letter} environment (see -\autoref{sec:\LabelBase.document}, \DescPageRef{\LabelBase.env.letter}). This -information is also copied into the variables \Variable{toname} and -\Variable{toaddress}. - -\BeginIndexGroup -\BeginIndex{FontElement}{addressee}\LabelFontElement{addressee}% -\BeginIndex{FontElement}{toname}\LabelFontElement{toname}% -\BeginIndex{FontElement}{toaddress}\LabelFontElement{toaddress}% -You can change the default font styles\ChangedAt{v2.97c}{\Class{scrlttr2}} -with the \DescRef{\LabelBase.cmd.setkomafont} or -\DescRef{\LabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}). There are three elements. First, -the \FontElement{addressee}\important{\FontElement{addressee}} element is -responsible for the overall style of the recipient's name and address. The -elements \FontElement{toname}\important{\FontElement{toname}} and -\FontElement{toaddress}\important{\FontElement{toaddress}} are responsible -only for the name and the address of the recipient, respectively. You can use -\FontElement{toname} and \FontElement{toaddress} to define modifications from -the basic \FontElement{addressee} configuration.% -\EndIndexGroup -% -\begin{table} - \caption[{Available values for the \Option{addrfield} option with - \Class{scrlttr2}}]{Available values for the \Option{addrfield} option to - change the recipient format of \Class{scrlttr2}}% - \label{tab:\LabelBase.addrfield}% - \begin{desctabular} - \entry{\PValue{backgroundimage}, \PValue{PPbackgroundimage}, - \PValue{PPBackgroundImage}, \PValue{PPBackGroundImage}, - \PValue{ppbackgroundimage}, \PValue{ppBackgroundImage}, - \PValue{ppBackGroundImage}}{% - Prints an address with a background image stored in the - \Variable{addresseimage} variable as the postpaid postmark, but without - a return address or delivery type.}% - \entry{\PValue{false}, \PValue{off}, \PValue{no}}{% - Does not print an address.}% - \entry{\PValue{image}, \PValue{Image}, \PValue{PPimage}, \PValue{PPImage}, - \PValue{ppimage}, \PValue{ppImage}}{% - Prints an image stored in the \Variable{addresseeimage} variable as an - address with a postpaid postmark. Recipient information, return address, - and delivery type or priority are ignored.}% - \entry{\PValue{PP}, \PValue{pp}, \PValue{PPexplicite}, - \PValue{PPExplicite}, \PValue{ppexplicite}, \PValue{ppExplicite}}{% - Prints an address with a postage print impression (pospaid) header - filled in with the variables \Variable{fromzipcode}, \Variable{place}, - and \Variable{PPcode}, and when applicable with a priority and a data - array defined by \Variable{PPdatamatrix}, but without a return address - or delivery type.}% - \entry{\PValue{topaligned}, \PValue{alignedtop}% - \ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}}}{% - Prints an address including a return address and a delivery type - or priority. The address is not centred vertically beneath the delivery - type.}% - \entry{\PValue{true}, \PValue{on}, \PValue{yes}}{% - Prints an address field including a return address and delivery type - or priority.}% - \end{desctabular} -\end{table}% - -The default \OptionValue{addrfield}{true} also prints an underlined return -address in the address field. The \Option{backaddress} option defines if and -in what form a return address will be printed for window envelopes. On the one -hand, this option\important{\OptionValue{backaddress}{false}} accepts the -standard values for simple switches listed in \autoref{tab:truefalseswitch}, -\autopageref{tab:truefalseswitch}. These values do not change style of the -return address. On the other hand, when\ChangedAt{v2.96}{\Class{scrlttr2}} the -return address is enabled, you can select its format at the same time. For -example, the \PValue{underlined} option value enables an underlined return -address, while \PValue{plain}\important{\OptionValue{backaddress}{plain}} -selects a style without underlining. The default is \PValue{underlined} and -thus prints an underlined return address. - -The return address itself is defined by the \PName{content} of the -\Variable{backaddress} variable. The default is the name specified in -\DescRef{\LabelBase.variable.fromname} and the address specified in -\DescRef{\LabelBase.variable.fromaddress}. The double backslash is also -replaced with the \PName{content} of the \Variable{backaddressseparator} -variable. The default separator is a comma followed by a non-breaking space. -\KOMAScript{} does not use the \PName{description} of the -\Variable{backaddress} variable. -\BeginIndexGroup\BeginIndex{FontElement}{backaddress}% -\LabelFontElement{backaddress}% -You can configure the font style of the return address via the -\FontElement{backaddress}\important{\FontElement{backaddress}} element. The -default is \Macro{sffamily} (see \autoref{tab:\LabelBase.AddresseeElements}). -Before applying the element's font style \KOMAScript{} switches to -\Macro{scriptsize}.% -\EndIndexGroup - -The default \OptionValue{addrfield}{true}, centres the address vertically -within the space available for the address. -In\ChangedAt{v3.17}{\Class{scrlttr2}\and \Package{scrletter}} contrast, -\OptionValue{addrfield}{topaligned}% -\important{\OptionValue{addrfield}{topaligned}} will not centre the address -but place it flush with the top of the available space.% - -\begin{table} -% \centering - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% -% \caption - \begin{captionbeside}{% - Default font styles for the elements of the address field.% - }% - [l] - \begin{tabular}[t]{ll} - \toprule - element & font style \\ - \midrule - \DescRef{\LabelBase.fontelement.addressee}\IndexFontElement{addressee} & - \\ - \DescRef{\LabelBase.fontelement.backaddress}\IndexFontElement{backaddress} & - \Macro{sffamily}% - \\ - \DescRef{\LabelBase.fontelement.PPdata}\IndexFontElement{PPdata} & - \Macro{sffamily}% - \\ - \DescRef{\LabelBase.fontelement.PPlogo}\IndexFontElement{PPlogo} & - \Macro{sffamily}\Macro{bfseries}% - \\ - \DescRef{\LabelBase.fontelement.priority}\IndexFontElement{priority} & - \Macro{fontsize}\PParameter{10pt}\PParameter{10pt}% - \Macro{sffamily}\Macro{bfseries}% - \\ - \DescRef{\LabelBase.fontelement.prioritykey}\IndexFontElement{prioritykey} & - \Macro{fontsize}\PParameter{24.88pt}\PParameter{24.88pt}% - \Macro{selectfont}% - \\ - \DescRef{\LabelBase.fontelement.specialmail}\IndexFontElement{specialmail} & - \\ - \DescRef{\LabelBase.fontelement.toaddress}\IndexFontElement{toaddress} & - \\ - \DescRef{\LabelBase.fontelement.toname}\IndexFontElement{toname} & - \\ - \bottomrule - \end{tabular} - \end{captionbeside} - \label{tab:\LabelBase.AddresseeElements}% -\end{table} - -\BeginIndexGroup -\BeginIndex{FontElement}{specialmail}\LabelFontElement{specialmail} -With the default \OptionValue{addrfield}{true} setting, you can output an -optional delivery type\Index{delivery type} between the return address and the -recipient address. This will be output only if the \Variable{specialmail} -variable has non-empty content and -\OptionValue{priority}{manual}\ChangedAt{v3.03}{\Class{scrlttr2}} has been -selected, which is the default. The \Class{scrlttr2} class itself does not use -the \PName{description} of the \Variable{specialmail} variable. The alignment -is defined by the \PLength{specialmailindent} and -\PLength{specialmailrightindent} pseudo-lengths (see -\DescPageRef{\LabelBase.plength.specialmailindent}). You can change the -default font style of the\ChangedAt{v2.97c}{\Class{scrlttr2}} -\FontElement{specialmail}\important{\FontElement{specialmail}} element, which -is listed in \autoref{tab:\LabelBase.AddresseeElements}, with the -\DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}).% -\EndIndexGroup - -\BeginIndexGroup -\BeginIndex{FontElement}{priority}\LabelFontElement{priority}% -\BeginIndex{FontElement}{prioritykey}\LabelFontElement{prioritykey}% -However\ChangedAt{v3.03}{\Class{scrlttr2}}\important{\normalcolor - \OptionValue{priority}{A}\\ - \normalcolor\OptionValue{priority}{B}}, selecting an international priority -with \OptionValue{priority}{A} or \OptionValue{priority}{B} (see -\autoref{tab:\LabelBase.priority}) together with -\OptionValue{addrfield}{true}, prints the priority as the delivery type. Using -it together with -\OptionValue{addrfield}{PP}\important{\OptionValue{addrfield}{PP}} prints the -priority at the corresponding position in the postpaid postmark (also known as -the postage print impression or \emph{port pay\'e}). The \FontElement{priority} -element defines the basic font style, and \FontElement{prioritykey} defines -the modification of the basic font style for the priority keys ``A'' or ``B''. -You can find the default font styles listed in -\autoref{tab:\LabelBase.AddresseeElements} and can change then using the -\DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}).% -\EndIndexGroup - -\begin{table} - \caption[{Available values for the \Option{priority} option in - \Class{scrlttr2}}]{Available values for the \Option{priority} option to - select the international priority in the address field of\Class{scrlttr2}} - \label{tab:\LabelBase.priority} - \begin{desctabular} - \entry{\PValue{false}, \PValue{off}, \PValue{no}, \PValue{manual}}{% - Priority will not be printed.}% - \entry{\PValue{B}, \PValue{b}, \PValue{economy}, \PValue{Economy}, - \PValue{ECONOMY}, \PValue{B-ECONOMY}, \PValue{B-Economy}, - \PValue{b-economy}}{% - Use international priority B-Economy. With - \OptionValue{addrfield}{true}, this is printed instead of the delivery - type.}% - \entry{\PValue{A}, \PValue{a}, \PValue{priority}, \PValue{Priority}, - \PValue{PRIORITY}, \PValue{A-PRIORITY}, \PValue{A-Priority}, - \PValue{a-priority}}{% - Use international priority A-Priority. With - \OptionValue{addrfield}{true}, this is printed instead of the delivery - type.}% - \end{desctabular} -\end{table} - -With\ChangedAt{v3.03}{\Class{scrlttr2}}\important{\OptionValue{addrfield}{PP}} -\OptionValue{addrfield}{PP}, the postal code in the \Variable{fromzipcode} -variable and the location from the \Variable{place} pariable will be output in -the postpaid postmark. The postal code (that is, the \PName{content} of -\Variable{fromzipcode}) is preceded by the \PName{description} of the -\Variable{fromzipcode} variable and the \PName{content} of -\Variable{zipcodeseparator}. The default for the \PName{description} depends -on the \File{lco} file used (see \autoref{sec:\LabelBase.lcoFile} starting on -\autopageref{sec:\LabelBase.lcoFile}). On the other hand, the default -\PName{content} of the \Variable{zipcodeseparator} variable is a thin space -followed by an en rule followed by another thin space -(\Macro{,}\texttt{-{}-}\Macro{,}). - -With\ChangedAt{v3.03}{\Class{scrlttr2}} -\OptionValue{addrfield}{PP}\important{\OptionValue{addrfield}{PP}}, a code is -placed in the postpaid postmark that uniquely identifies the sender. This is -stored in the \Variable{PPcode} variable. You can also print an additional -data array to the right of the address, which is stored in the -\Variable{PPdatamatrix} variable. - -\BeginIndexGroup -\BeginIndex{FontElement}{PPdata}\LabelFontElement{PPdata} -The ZIP code\ChangedAt{v3.03}{\Class{scrlttr2}} (postal code), place, and -sender code will be printed by default in an 8\Unit{pt} font. The the font -style of the \FontElement{PPdata}\important{\FontElement{PPdata}} is used to -do so. The default is listed in \autoref{tab:\LabelBase.AddresseeElements} and -can be changed with the \DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}).% -\EndIndexGroup - -\BeginIndexGroup -\BeginIndex{FontElement}{PPlogo}\LabelFontElement{PPlogo} For the postpaid -logo ``P.P.'', however, the font style of the -\FontElement{PPlogo}\important{\FontElement{PPlogo}} element is used. Its -default can also be found in \autoref{tab:\LabelBase.AddresseeElements}.% -\EndIndexGroup - -With\important{\OptionValue{addrfield}{backgroundimage}\\ - \OptionValue{addrfield}{image}} the two settings -\OptionValue{addrfield}{backgroundimage}\ChangedAt{v3.03}{\Class{scrlttr2}} -and \OptionValue{addrfield}{image}, an image is print inside the address -window. This image is stored in the \PName{content} of variable -\Variable{addresseeimage}. \KOMAScript{} does not use the \PName{description} -of this variable. Although only the image is printed with the -\OptionValue{addrfield}{image} option, the recipient's name and address from -the mandatory argument of the \DescRef{\LabelBase.env.letter} environment will -be printed with the \OptionValue{addrfield}{backgroundimage} option. - -The position of the postpaid postmark and that of the -postpaid address is defined by the \PLength{toaddrindent} pseudo-length (see -\DescPageRef{\LabelBase.plength.toaddrindent}) as well as -\PLength{PPheadwidth} and \PLength{PPheadheight} (see -\DescPageRef{\LabelBase.plength.PPheadheight}). The position of -the data array is defined by the \PLength{PPdatamatrixvskip} pseudo-length -(see \DescPageRef{\LabelBase.plength.PPdatamatrixvskip}). - -Note\textnote{Attention!} that \KOMAScript{} cannot print any external -graphics or pictures by itself. So if you want to put external picture files -into variables like \Variable{addresseeimage} or \Variable{PPdatamatrix}, you -must load an additional graphics package like -\Package{graphics}\IndexPackage{graphics} or -\Package{graphicx}\IndexPackage{graphicx} and use, for instance, the -\Macro{includegraphics} command in the \PName{content} of the variables.% -% -\EndIndexGroup - - -\begin{Declaration} - \PLength{toaddrvpos}% - \PLength{toaddrhpos} -\end{Declaration} -These pseudo-lengths define the vertical and horizontal distance of the -address field from the top-left corner of the paper. Values are set -differently in the various predefined \File{lco} files\textnote{\File{lco} -file}\Index{lco file=\File{lco} file}, according to standard envelope window -measures. For \PLength{toaddrhpos}, one property worth noting is that with -negative values, the offset is the distance from the right edge of the address -field to the right edge of the paper. You will find this, for instance, in -\Option{SN} or \Option{NF}. The smallest value of \PLength{toaddrvpos} is -found with \Option{DINmtext}. With this setting, the letterhead can easily -protrude into the address window. Whether the address field is output or not -depends on the \Option{addrfield} option (see -\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.addrfield}).% -\EndIndexGroup - - -\begin{Declaration} - \PLength{toaddrheight} -\end{Declaration} -This pseudo-length defines the height of the address field, including the -delivery method. Whether the name and address of the recipient are vertically -centred in the address field, taking into account the presence or absence of -the delivery method, depends on the \DescRef{\LabelBase.option.addrfield} -option.% -\EndIndexGroup - - -\begin{Declaration} - \PLength{toaddrwidth} -\end{Declaration} -This pseudo-length defines the width of the address field. The various -predefined \File{lco} files\textnote{\File{lco} files}\Index{lco -file=\File{lco} files} use different settings according to the different -standards for window envelopes. Typical values are between 70\Unit{mm} and -100\Unit{mm}. -\begin{Example} - Suppose your printer has very wide, non-printable left and right margins of 15\Unit{mm}. - This means that the letterhead, the additional sender information, and the address field cannot - be completely printed if you use the \Option{SN} option. You therefore - create a new \File{lco} file with the following content: -\begin{lstcode} - \ProvidesFile{SNmmarg.lco} - [2002/06/04 v0.1 my lco] - \LoadLetterOption{SN} - \addtoplength{toaddrwidth}{% - -\useplength{toaddrhpos}} - \setplength{toaddrhpos}{-15mm} - \addtoplength{toaddrwidth}{% - \useplength{toaddrhpos}} - \endinput -\end{lstcode} - Then, until you can obtain a printer with smaller page margins, you - simply use the option \Option{SNmmarg} instead of \Option{SN}.% -\end{Example}% -% -\EndIndexGroup - - -\begin{Declaration} - \PLength{toaddrindent} -\end{Declaration} -Sometimes you do not want the address field to extend the full width of the -address window but to be indented a bit. You can set the amount of this -indentation with the \PLength{toaddrindent} pseudo-length. Typically, the -default value is 0\Unit{pt}. - -For\textnote{Attention!} the\ChangedAt{v3.03}{\Class{scrlttr2}} -\OptionValueRef{scrlttr2}{addrfield}{PP}\important{% - \OptionValueRef{scrlttr2}{addrfield}{PP}\\ - \OptionValueRef{scrlttr2}{addrfield}{image}\\ - \OptionValueRef{scrlttr2}{addrfield}{backgroundimage} -}\IndexOption{addrfield~=\textKValue{PP}}, -\OptionValueRef{scrlttr2}{addrfield}{image}% -\IndexOption{addrfield~=\textKValue{image}}, and -\OptionValueRef{scrlttr2}{addrfield}{backgroundimage}% -\IndexOption{addrfield~=\textKValue{backgroundimage}} settings (see -\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.addrfield}) a -value of 0\Unit{pt} will be replaced by a value of 8\Unit{mm}. If you really -do not want any indentation, you can use a value of 1\Unit{sp} to set a -negligibly small indentation. Furthermore, \PLength{toaddrindent} is also used -for the distance to the right edge of the address window with the these -\Option{addrfield} settings.% -\EndIndexGroup - - -\begin{Declaration} - \PLength{backaddrheight} -\end{Declaration} -For window envelopes, the sender is often printed in a small font on one line -above the addressee. This sender information is called the return -address\textnote{return address}\Index{return address}, because it is visible -in the address window and will be used by the post office to return an -undeliverable letter to the sender. This return address, therefore, requires -only the information necessary for that purpose. - -The height reserved for the return address within the address window is given -by the \PLength{backaddrheight} pseudo-length. This value is typically -5\Unit{mm} in the predefined \File{lco} files\textnote{\File{lco} -file}\Index{}{lco file=\File{lco} file}. Whether to print the return address -at all depends on the \Option{addrfield} (see -\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.addrfield}) and -\DescRef{\LabelBase.option.backaddress} options (see -\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.backaddress}).% -\EndIndexGroup - - -\begin{Declaration} - \PLength{specialmailindent}% - \PLength{specialmailrightindent} -\end{Declaration} -You can print an optional delivery method between the return address and the -recipient's address. This field is printed only if the -\DescRef{\LabelBase.variable.specialmail} variable has non-empty contents. Its -alignment is determined by the \PLength{specialmailindent} and -\PLength{specialmailrightindent} pseudo-lengths, which specify the left and -right indentation, respectively. In the predefined \File{lco} -files\textnote{\File{lco} file}\Index{lco file=\File{lco} file}, -\PLength{specialmailindent} is set to rubber length \Macro{fill}, while -\PLength{specialmailrightindent} is set to 1\Unit{em}. Thus the delivery -method is set 1\Unit{em} from the address field's right margin.% -\EndIndexGroup - - -\begin{Declaration} - \PLength{PPheadheight}% - \PLength{PPheadwidth} -\end{Declaration} -The \PLength{PPheadheight}\ChangedAt{v3.03}{\Class{scrlttr2}} pseudo-length -specifies the height reserved for the postpaid header at the start of the -address field for the two options -\OptionValueRef{scrlttr2}{addrfield}{PP}\important{% - \OptionValueRef{scrlttr2}{addrfield}{PP}\\ - \OptionValueRef{scrlttr2}{addrfield}{backgroundimage}}% -\IndexOption{addrfield~=\textKValue{PP}} and -\OptionValueRef{scrlttr2}{addrfield}{backgroundimage}% -\IndexOption{addrfield~=\textKValue{backgroundimage}}. The -\PLength{PPheadwidth} pseudo-length is used only with -\OptionValueRef{scrlttr2}{addrfield}{PP} (see -\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.addrfield}) and -gives the width of the left-hand field within the postpaid header, which -contains the postpaid logo, the postal code, and the location. The width of -the right-hand field containing the sender's code and the priority is the -remaining width. - -\KOMAScript{}\textnote{Attention!} automatically changes the default value of -0\Unit{mm} for the \PLength{PPheadheight} pseudo-length to 20.74\Unit{pt}, and -\PLength{PPheadwidth}'s default from 0\Unit{mm} to 42\Unit{mm}.% -% -\EndIndexGroup - - -\begin{Declaration} - \PLength{PPdatamatrixvskip} -\end{Declaration} -This\ChangedAt{v3.03}{\Class{scrlttr2}} pseudo-length specifies the vertical -distance between the postpaid header and the data array used with -\OptionValueRef{scrlttr2}{addrfield}{PP}% -\important{\OptionValueRef{scrlttr2}{addrfield}{PP}}% -\IndexOption{addrfield~=\PValue{PP}} (see \autoref{sec:\LabelBase.firstpage}, -\DescPageRef{\LabelBase.option.addrfield}). \KOMAScript{}\textnote{Attention!} -automatically changes the default value of 0\Unit{mm} to 9\Unit{mm}. The data -matrix is flush right within the postpaid header.% -\EndIndexGroup -% -\EndIndexGroup - - -\subsection{Extra Sender Information} -\seclabel{locationField} -\BeginIndexGroup -\BeginIndex{}{extra sender information} -\index{sender>extra information|see{extra sender information}} - -Often, especially with business letters, there is not enough space in the -letterhead and footer to accommodate all the information about the sender that -you want to include. For such additional information, you can use the space -next to the addressee. In this manual, this field is called the -\emph{extra sender information}. In earlier versions of this manual, it -was called the \emph{sender's extension} or the \emph{location field}. - - -\begin{Declaration} - \OptionVName{locfield}{setting} -\end{Declaration} -\BeginIndex{}{extra sender information}% -The content ot the field with extra sender attributes next to the address -field can be anything you want, for example a location, a bank-account number, -or other information. Depending\important{% - \OptionValueRef{\LabelBase}{fromalign}{locationleft}\\ - \OptionValueRef{\LabelBase}{fromalign}{center}\\ - \OptionValueRef{\LabelBase}{fromalign}{locationright}} on the -\DescRef{\LabelBase.option.fromalign} option, it will also be used for the -sender's logo. The width of this field can be specified in an \File{lco} file -(see \autoref{sec:\LabelBase.lcoFile}). If the width is set to zero there, the -\Option{locfield} option can toggle between two defaults for the field width. -This is the case for most of the \File{lco} files that come with -\KOMAScript{}. See also the explanation on the \PLength{locwidth} -pseudo-length in \autoref{sec:\LabelBase.locationField}, -\DescPageRef{\LabelBase.plength.locwidth}. Available values for this -option are shown in \autoref{tab:\LabelBase.locfield}. The default is -\PValue{narrow}.% -% -\begin{table} -% \centering - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% -% \caption - \begin{captionbeside} - [{Available values for the \Option{locfield} option with - \Class{scrlttr2}}]{Available values for the \Option{locfield} option to - set the width of the field for extra sender information with - \Class{scrlttr2}% - \label{tab:\LabelBase.locfield}}% - [l] - \begin{minipage}[t]{.45\linewidth} - \begin{desctabular}[t] - \pventry{narrow}{narrow extra sender information field}% - \pventry{wide}{wide extra sender information field}% - \end{desctabular} - \end{minipage} - \end{captionbeside} -\end{table} - -\begin{Declaration} - \Variable{location}% -\end{Declaration} -The contents of the extra sender information field, unless it contains -the logo or the basic sender information itself, are specified by the -\Variable{location} variable. You can use formatting commands like -\Macro{raggedright} within this variable's \PName{content}. \KOMAScript{} does -not use the \PName{description} of this variable. - -\begin{Example} - Mr Public would like to provide some additional information about his - membership. Therefore he uses the \Variable{location} variable:% - \lstinputcode[xleftmargin=1em]{letter-19.tex}% - This will place the corresponding field beside the recipient's address, as - shown in \autoref{fig:\LabelBase.letter-19}. - \begin{figure} - \setcapindent{0pt}% - \begin{captionbeside}[{Example: letter with extended sender, logo, - recipient, extra sender information, opening, text, closing, - signature, postscript, distribution list, enclosure, and hole-punch - mark}] - {result of a short letter with extended sender, logo, recipient, - extra sender information, opening, text, closing, signature, - postscript, distribution list, enclosure, and hole-punch mark (the - date is set by default)}[l] - \frame{\includegraphics[width=.4\textwidth]{letter-19}} - \end{captionbeside} - \label{fig:\LabelBase.letter-19} - \end{figure} -\end{Example} -\EndIndexGroup -\EndIndexGroup - - -\begin{Declaration} - \PLength{locheight}% - \PLength{lochpos}% - \PLength{locvpos}% - \PLength{locwidth} -\end{Declaration} -The \PLength{locwidth} and -\PLength{locheight}\ChangedAt{v2.97d}{\Class{scrlttr2}} pseudo-lengths set the -width and height of the extra-sender-information field. The \PLength{lochpos} -and \PLength{locvpos} pseudo-lengths determine the distances from the -top-right edge of the paper. These values are typically set to 0\Unit{pt} in -the predefined \File{lco} files. These\textnote{Attention!} zero-length values -have a special meaning. They result in the actual values being set within -\DescRef{\LabelBase.cmd.opening} based on the paper width, the address-window -width, the address window's distance from the top-left edge of the paper, and -the \DescRef{\LabelBase.option.locfield} option (see -\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.locfield}). As -is the case for \PLength{toaddrhpos}, negative values of \PLength{lochpos} -also take on a special meaning. Instead of referring to the distance from the -right edge of the paper, \PLength{lochpos} then refers to the distance from -the left edge of the paper. The meaning is thus the opposite of that of -\PLength{toaddrhpos} (see \autoref{sec:\LabelBase.addressee}, -\DescPageRef{\LabelBase.plength.toaddrhpos}).% -\EndIndexGroup -% -\EndIndexGroup - - -\subsection{Reference Line} -\seclabel{refLine}% -\BeginIndexGroup -\BeginIndex{}{reference line} -\index{business line|see{reference line}} - -The reference line can actually be longer than just one line. It is printed -only if at least one of variables for the reference line is not empty. Only -non-empty fields will be printed. To\textnote{Hint!} set a seemingly empty -field, you can provide content for the variable that appears empty, such as -\Macro{mbox}\Parameter{}. If the reference line is omitted, the description -and contents of the \DescRef{\LabelBase.variable.date} variable are printed in -its place. You can find information about adding variables to or removing them -from the reference line in \autoref{sec:scrlttr2-experts.variables}, -\DescPageRef{scrlttr2-experts.cmd.removereffields}. - - -\begin{Declaration} - \OptionVName{numericaldate}{simple switch} -\end{Declaration} -This option toggles between the standard, language-dependent -date\Index{date}\Index{reference line} presentation, and a short, numerical -one. \KOMAScript{} does not provide the standard date format. It should be -defined by a package such as \Package{ngerman}\IndexPackage{ngerman}, -\Package{babel}\IndexPackage{babel}, or -\Package{isodate}\IndexPackage{isodate}. -The\important{\OptionValue{numericaldate}{true}} short, numerical -representation, however, is produced by \Class{scrlttr2} itself. The option -recognizes the standard values for simple switches as listed in -\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. The default -is \PValue{false}, which results in standard date format. - -\begin{Declaration} - \Variable{date}% -\end{Declaration} -The date in the selected format is stored as \PName{content} of the -\Variable{date} variable. Setting the -\DescRef{\LabelBase.option.numericaldate} option has no effect if this -variable is overridden. The date is usually output as part of the reference -line. If all other elements of the reference line are empty, a date line -consisting of the location and the date is printed instead. However in this -case, the settings of the \DescRef{\LabelBase.option.refline} option described -below also affect the date line. See the description of variable -\DescRef{\LabelBase.variable.place} on -\DescPageRef{\LabelBase.variable.placeseparator} for more information about -the location. -% -\EndIndexGroup -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{refline}{selection} -\end{Declaration} -\BeginIndex{}{reference line}% -\index{business line|see{reference line}}% -Business letters in particular often contain an area with information such as -an identification code\Index{identification code}, phone -extension\Index{phone>extension}, customer number\Index{customer number}, -invoice number\Index{invoice number}, or references to previous letters. This -guide calls this area the \emph{reference-field line}\textnote{reference-field - line}, or simply the \emph{reference line}. - -With \Class{scrlttr2} and \Package{scrletter}, the header, footer, address, -and extra sender information can extend left and right beyond the normal -type area. The -\OptionValue{refline}{wide}\important{\OptionValue{refline}{wide}} option -specifies that this should also apply to the reference-field line. Normally, -the reference-field line contains at least the date, but it can hold -additional data. Available values for this option are shown in -\autoref{tab:\LabelBase.refline}. The default is \PValue{narrow} and -\PValue{dateright}\ChangedAt{v3.09}{\Class{scrlttr2}}.% -% -\begin{table} - \caption[{Available values for the \Option{refline} option with - \Class{scrlttr2}}]{Available values for the \Option{refline} option to set - the width of the reference line with \Class{scrlttr2}} - \label{tab:\LabelBase.refline} - \begin{desctabular} - \pventry{dateleft}{\ChangedAt{v3.09}{\Class{scrlttr2}}% - The date is placed leftmost in the reference line.}% - \pventry{dateright}{\ChangedAt{v3.09}{\Class{scrlttr2}}% - The date is placed rightmost in the reference line.}% - \pventry{narrow}{The reference line is restricted to the type area.}% - \pventry{nodate}{\ChangedAt{v3.09}{\Class{scrlttr2}}% - The date is not placed automatically into the reference line.}% - \pventry{wide}{The width of the reference line depends on the positions of - the address and extra sender information.}% - \end{desctabular} -\end{table} - -\begin{Declaration} - \Variable{yourref}% - \Variable{yourmail}% - \Variable{myref}% - \Variable{customer}% - \Variable{invoice}% -\end{Declaration} -You can manage the typical contents of the reference-field line with five -variables: \Variable{yourref}, \Variable{yourmail}, \Variable{myref}, -\Variable{customer} and \Variable{invoice}. Their meanings are listed in -\autoref{tab:\LabelBase.variables} on \autopageref{tab:\LabelBase.variables}. -Each variable has also a predefined \PName{description}, shown in -\autoref{tab:\LabelBase.reflineTerm}. How to add more variables to the -reference-field line is explained in \autoref{sec:scrlttr2-experts.variables} -starting on \DescPageRef{scrlttr2-experts.cmd.newkomavar}.% -% -\begin{table} -% \centering - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% -% \caption - \begin{captionbeside}[{Default descriptions of variables in the - reference line}]{Default descriptions of typical variables in the - reference line using language-dependent commands}% - [l] - \begin{tabular}[t]{lll} - \toprule - name & description & English default text\\ - \midrule - \Variable{yourref} & \DescRef{scrlttr2-experts.cmd.yourrefname} & Your reference \\ - \Variable{yourmail} & \DescRef{scrlttr2-experts.cmd.yourmailname} & Your letter from \\ - \Variable{myref} & \DescRef{scrlttr2-experts.cmd.myrefname} & Our reference \\ - \Variable{customer} & \DescRef{scrlttr2-experts.cmd.customername} & Customer No.: \\ - \Variable{invoice} & \DescRef{scrlttr2-experts.cmd.invoicename} & Invoice No.: \\ - \DescRef{\LabelBase.variable.date} & \DescRef{scrlttr2-experts.cmd.datename} & date \\ - \bottomrule - \end{tabular} - \end{captionbeside} - \label{tab:\LabelBase.reflineTerm} -\end{table} - -\BeginIndexGroup -\BeginIndex{FontElement}{refname}\LabelFontElement{refname}% -\BeginIndex{FontElement}{refvalue}\LabelFontElement{refvalue}% -You\ChangedAt{v2.97c}{\Class{scrlttr2}} can change the font style and colour -of the \PName{description} and \PName{content} of the fields in the reference -line with the \FontElement{refname}% -\important[i]{\FontElement{refname}\\\FontElement{refvalue}} and -\FontElement{refvalue} elements using the \DescRef{\LabelBase.cmd.setkomafont} -and \DescRef{\LabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}). The defaults for both elements are -listed in \autoref{tab:\LabelBase.refnamerefvalue}.% -\begin{table}[tp] -% \centering - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% -% \caption - \begin{captionbeside} - [{Default font styles for elements in the reference line}]{Default font - style settings for the elements in the reference line% - \label{tab:\LabelBase.refnamerefvalue}} - [l] - \begin{tabular}[t]{ll} - \toprule - element & default configuration \\ - \midrule - \DescRef{\LabelBase.fontelement.refname} & \Macro{sffamily}\Macro{scriptsize} \\ - \DescRef{\LabelBase.fontelement.refvalue} & \\ - \bottomrule - \end{tabular} - \end{captionbeside} -\end{table}% -% -\EndIndexGroup - - -\begin{Declaration} - \Variable{placeseparator}% -\end{Declaration}% -\BeginIndex{Variable}{place}% -If all variables in the reference-field line, with the exception of -\DescRef{\LabelBase.variable.date}% -\important{\DescRef{\LabelBase.variable.date}}\IndexVariable{date}, are empty, -no actual reference line is output. Instead, a date line consisting only of a -location\Index{location} and a date\Index{date} is output. The \PName{content} -of the \DescRef{\LabelBase.variable.place} variable contains the location. The -delimiter, which in this case is placed after the location, is specified by -the \PName{content} of the \Variable{placeseparator} variable. The -default\textnote{default} \PName{content} of the delimiter is a comma followed -by a non-breaking space. If the location is empty, the delimiter is not -output. The default \PName{content} of \DescRef{\LabelBase.variable.date} is -\Macro{today}\IndexCmd{today} and depends on the setting of the -\DescRef{\LabelBase.option.numericaldate} option (see -\DescPageRef{\LabelBase.option.numericaldate}). - -Starting with version~3.09\ChangedAt{v3.09}{\Class{scrlttr2}}, the location -and date are no longer required to be right-aligned. Instead, when a date -line is used, its alignment is specified by the date setting of the -\DescRef{\LabelBase.option.refline} option, as listed in -\autoref{tab:\LabelBase.refline}. - -\BeginIndexGroup -\BeginIndex{FontElement}{placeanddate}\LabelFontElement{placeanddate}% -If\ChangedAt{v3.12}{\Class{scrlttr2}} such a date line is output with a -location rather than a reference-field line, the font setting of the -\DescRef{\LabelBase.fontelement.refvalue} element does not apply. In this -case, the \FontElement{placeanddate}\important{\FontElement{placeanddate}} -element is used. You can change the empty default of this font element as -usual with the \DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}).% -\EndIndexGroup - -\begin{Example} - Now Mr Public also sets the variable for the location:% - \lstinputcode[xleftmargin=1em]{letter-20.tex}% - As seen in \autoref{fig:\LabelBase.letter-20}, the location appears - in front of the date, followed by the automatic delimiter. This date has - been defined explicitly so that the original date is maintained in any later - \LaTeX{} run rather than using the date of the \LaTeX{} run. - \begin{figure} - \setcapindent{0pt}% - \begin{captionbeside}[{Example: letter with extended sender, logo, - recipient, extra sender information, location, date, opening, - text, closing, signature, postscript, distribution list, enclosure, - and hole-punch mark}] - {result of a short letter with extended sender, logo, recipient, - extra sender information, location, date, opening, text, closing, - signature, postscript, distribution list, enclosure and hole-punch - mark}[l] - \frame{\includegraphics[width=.4\textwidth]{letter-20}} - \end{captionbeside} - \label{fig:\LabelBase.letter-20} - \end{figure} -\end{Example} -% -\EndIndexGroup -\EndIndexGroup -\EndIndexGroup - - -\begin{Declaration} - \PLength{refvpos} -\end{Declaration} -This pseudo-length specifies the distance from the upper edge of the paper to -the reference line. Its value is set differently in the various predefined -\File{lco} files\textnote{\File{lco} file}\Index{lco file=\File{lco} file}. -Typical values are between 80.5\Unit{mm} and 98.5\Unit{mm}.% -\EndIndexGroup - - -\begin{Declaration} - \PLength{refwidth}% - \PLength{refhpos} -\end{Declaration} -The \PLength{refwidth} pseudo-length specifies the width available for the -reference line. Its value is typically set to 0\Unit{pt} in the predefined -\File{lco} files\textnote{\File{lco} file}\Index{lco file=\File{lco} file}. -This\textnote{Attention!} value has a special meaning. In no way does it -indicate that there is no available width for the reference line. Instead, it -indicates that the width will be calculated within the -\DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} command. This calculated -width then depends on the value of the \DescRef{\LabelBase.option.refline}% -\important{\DescRef{\LabelBase.option.refline}}% -\IndexOption{refline~=\PName{setting}} options (see -\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.refline}). At -the same time, \PLength{refhpos} will also be set according to this option. -With \OptionValueRef{scrlttr2}{refline}{wide}% -\IndexOption{refline~=\textKValue{wide}}, the reference fields line is -centred, while with \OptionValueRef{scrlttr2}{refline}{narrow}% -\IndexOption{refline~=\textKValue{narrow}} it is aligned flush left with the -type area. - -If \PLength{refwidth} is not zero, the width of the reference line is not -determined by the \DescRef{\LabelBase.option.refline} option, and so -\PLength{refhpos} specifies the distance of the reference line from the left -edge of the paper. If\textnote{Attention!} this distance is zero, the the -reference line is placed so that the ratio between its distances from the left -and right edges of the paper corresponds to the ratio of distance of the type -area from the left and right edges of the paper. Thus, for a type area -horizontally centred on the paper, the reference line will also be centred. - -As a rule, these special cases are likely of little interest to the normal -user. The\textnote{Attention!} simplest rule is as follows: either -\PLength{refhpos} remains zero, and so the width and alignment of the -reference line are determined with the \DescRef{\LabelBase.option.refline} -option, or the user sets both \PLength{refwidth} and \PLength{refhpos}.% -\EndIndexGroup - - -\begin{Declaration} - \PLength{refaftervskip} -\end{Declaration} -This pseudo-length specifies the vertical skip to be inserted beneath the -reference line. The value is set in the predefined \File{lco} -files\textnote{\File{lco} file}\Index{lco file=\File{lco} file}. It directly -affects the height of the text area on the first page. A typical value is -between one and two lines.% -\EndIndexGroup -% -\EndIndexGroup - - -\subsection{Subject} -\seclabel{subject}% -\BeginIndexGroup -\BeginIndex{}{subject} - -Different countries have different conventions for placing the subject line of -a letter. Some place it before the opening phrase; others place it after. Some -professional groups even want it before the reference line. - - -\begin{Declaration} - \Variable{title}% -\end{Declaration} -With \KOMAScript{}, you can also give a letter a title\Index{title}. The title -is centred, using the \Macro{LARGE} font size, and placed directly beneath the -reference-field line. - -\BeginIndex{FontElement}{lettertitle}\LabelFontElement{lettertitle}% -\BeginIndex{FontElement}{title}\LabelFontElement{title}% -You can change the font style for the -\FontElement{lettertitle}\important{\FontElement{lettertitle}} element with -the \DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}). Font size declarations are -allowed. The \Macro{LARGE} font size always precedes the font selection in -\KOMAScript{}, and is therefore not part of the default setting -\Macro{normalcolor}\Macro{sffamily}\Macro{bfseries}. With \Class{scrlttr2}, -you can also use \FontElement{title}\important{\FontElement{title}} as an -alias for \FontElement{lettertitle}. This is not possible when using -\Package{scrletter} with a \KOMAScript{} class because these classes already -define a \FontElement{title} element for the document title with different -setting.% -\EndIndex{FontElement}{title}% -\EndIndex{FontElement}{lettertitle}% -\begin{Example} - Suppose you are writing a reminder letter. You set a corresponding title: -\begin{lstlisting} - \setkomavar{title}{Reminder} -\end{lstlisting} - This way the recipient should recognize the reminder as such. -\end{Example} -As shown in the example, the \PName{content} of the variable defines the -title. \KOMAScript{} does not use the \PName{description}.% -% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{subject}{selection}% - \Variable{subject}% - \Variable{subjectseparator}% -\end{Declaration} -\BeginIndex{}{subject}% -To include a subject, define the \PName{content} of the \Variable{subject} -variable accordingly. First of all, you can use the -\OptionValue{subject}{true}\important{\OptionValue{subject}{titled}} option, -to choose whether the subject should be preceded with a \PName{description} or -not. If you use the \PName{description} the \PName{content} of the -\Variable{subjectseparator}\Index{separator} variable is output between the -\PName{description} and the \PName{content} of the \Variable{subject} -variable. The default \PName{content} of \PName{subjectseparator} consists of -a colon followed by a space. - -\begin{table} -% \centering - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% -% \caption - \begin{captionbeside}{Default descriptions of variables for the subject} - [l] - \begin{tabular}[t]{lll} - \toprule - variable name & description \\ - \midrule - \Variable{subject} & \DescRef{\LabelBase.cmd.usekomavar*}\PParameter{subjectseparator}% - \texttt{\%} \\ - & \texttt{\quad}% - \DescRef{\LabelBase.cmd.usekomavar}\PParameter{subjectseparator} \\ - \Variable{subjectseparator} & \DescRef{scrlttr2-experts.cmd.subjectname} \\ - \bottomrule - \end{tabular} - \end{captionbeside} - \label{tab:\LabelBase.subjectTerm} -\end{table} - -Additionally, you can use \OptionValue{subject}{afteropening}% -\important{\OptionValue{subject}{afteropening}\\ - \OptionValue{subject}{beforeopening}} to place the subject after the letter -opening instead of the default \OptionValue{subject}{beforeopening}. You can -also specify other formatting\important{\OptionValue{subject}{underlined}\\ - \OptionValue{subject}{centered}\\ - \OptionValue{subject}{right}} for the subject with -\OptionValue{subject}{underlined}, \OptionValue{subject}{centered}, or -\OptionValue{subject}{right}\ChangedAt{v2.97c}{\Class{scrlttr2}}. The -available values are listed in \autoref{tab:\LabelBase.subject}. -Note\textnote{Attention!} that with the \OptionValue{subject}{underlined} -option, the whole subject must fit onto one line. The defaults are -\OptionValue{subject}{left}, \OptionValue{subject}{beforeopening}, and -\OptionValue{subject}{untitled}.% -% -\begin{table} -% \centering - \KOMAoptions{captions=topbeside}% - \setcapindent{0pt}% -% \caption - \begin{captionbeside} - [{Available values for the \Option{subject} option with \Class{scrlttr2}}] - {Available values for the \Option{subject} option for the position and - formatting of the subject with - \Class{scrlttr2}\label{tab:\LabelBase.subject}}% - [l] - \begin{minipage}[t]{.6\linewidth} - \begin{desctabular}[t] - \pventry{afteropening}{subject after opening}% - \pventry{beforeopening}{subject before opening}% - \pventry{centered}{subject centred}% - \pventry{left}{subject left-justified}% - \pventry{right}{subject right-justified}% - \pventry{titled}{add title/description to subject}% - \pventry{underlined}{set subject underlined (see note in text)}% - \pventry{untitled}{do not add title/description to subject}% - \end{desctabular} - \end{minipage} - \end{captionbeside} -\end{table} - -\BeginIndexGroup -\BeginIndex{FontElement}{lettersubject}\LabelFontElement{lettersubject}% -\BeginIndex{FontElement}{subject}\LabelFontElement{subject}% -The subject line is set in a separate font\Index{font>style}. To change this, -use the \DescRef{\LabelBase.cmd.setkomafont} and -\DescRef{\LabelBase.cmd.addtokomafont} commands (see -\autoref{sec:\LabelBase.textmarkup}, -\DescPageRef{\LabelBase.cmd.setkomafont}). For the -\FontElement{lettersubject}\important{\FontElement{lettersubject}} element, -the default font is \Macro{normalcolor}\Macro{bfseries}. With the -\Class{scrlttr2} class, you can also use -\FontElement{subject}\important{\FontElement{subject}} as an alias of -\FontElement{lettersubject}. This is not possible with the \Package{scrletter} -package when using a \KOMAScript{} class, because these classes already define -a \FontElement{subject} element for the document title with different -settings.% -\EndIndexGroup - -\begin{Example} - Mr Public now includes a subject. As a traditionalist, he also wants the - subject to be labelled accordingly and therefore sets the corresponding - option:% - \lstinputcode[xleftmargin=1em]{letter-21.tex}% - The result is shown in \autoref{fig:\LabelBase.letter-21}. - \begin{figure} - \setcapindent{0pt}% - \begin{captionbeside}[{Example: letter with extended sender, logo, - recipient, extra sender information, place, date, subject, - opening, text, closing, signature, postscript, distribution list, - enclosure, and hole-punch mark}] - {result of a short letter with extended sender, logo, recipient, - extra sender information, place, date, subject, opening, text, - closing, signature, postscript, distribution list, enclosure and - hole-punch mark}[l] - \frame{\includegraphics[width=.4\textwidth]{letter-21}} - \end{captionbeside} - \label{fig:\LabelBase.letter-21} - \end{figure} -\end{Example} -% -\EndIndexGroup - - -\begin{Declaration} - \PLength{subjectvpos} -\end{Declaration} -\ChangedAt{v3.01}{\Class{scrlttr2}}% -If\textnote{Attention!} the value of this pseudo-length is 0\Unit{pt}, the -\DescRef{\LabelBase.option.subject}\important{\DescRef{\LabelBase.option.subject}}% -\IndexOption{subject~=\PName{Einstellung}} option (see -\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.subject}) -determines the position of the subject. Any other value defines the distance -between the top edge of the paper and the subject. In this -case\textnote{Hint!}, you should ensure that there is enough space available -that overlapping with other elements is unlikely. -\begin{Example} - A few professionals prefer to have the subject above the reference line. For - this, you can specify the position as follows, which also changes the - position of the reference line itself: -\begin{lstcode} - \ProvidesFile{lawsubj.lco} - [2008/11/03 lawyers lco file] - \setplength{subjectvpos}{\useplength{refvpos}} - \addtoplength{refvpos}{3\baselineskip} - \endinput -\end{lstcode} - If you want to leave at least one empty line between the subject and the - reference, you have space for a maximum of two lines. -\end{Example} -\EndIndexGroup - - -\begin{Declaration} - \PLength{subjectbeforevskip}% - \PLength{subjectaftervskip} -\end{Declaration} -\ChangedAt{v3.01}{\Class{scrlttr2}}% -If the subject is placed not absolutely but before or after the salutation, -you can insert additional vertical space before and after the subject. The -space before the subject may interfere with other distances, such as the -automatic distance of one line after the title. Therefore the default is to -use no additional space here. The default of the class and the package for the -space after the subject is two lines.% -\EndIndexGroup -% -\EndIndexGroup - - -\subsection{Closing} -\seclabel{closing} -\BeginIndexGroup -\BeginIndex{}{closing} - -\BeginIndex{}{letter>closing}% -\BeginIndex{}{signature}% -\BeginIndex{}{letter>signature}% - -It has already been mentioned in \autoref{sec:\LabelBase.document}, -\DescPageRef{\LabelBase.cmd.closing} that the letter's closing text is -provided by \DescRef{\LabelBase.cmd.closing}\IndexCmd{closing}. Beneath the -closing text, there is often a space for a handwritten signature, beneath -which there can be a printed name, which serves as a kind of annotation to the -actual signature. - - -\begin{Declaration} - \Variable{signature}% -\end{Declaration} -The \Variable{signature} variable contains the printed name or annotation for -the handwritten signature. Its default \PName{content} is the -\DescRef{\LabelBase.cmd.usekomavar}\PParameter{fromname}. This annotation can -consist of multiple lines. In that case, you should separate the individual -lines with double backslashes. Paragraph\textnote{Attention!} breaks in the -signature annotation, however, are not permitted.% -\EndIndexGroup - - -\begin{Declaration} - \Macro{raggedsignature} -\end{Declaration} -The closing phrase and the signature will be typeset in a box. The width of -the box is determined by the length of the longest line in the closing -phrase or signature. - -The \PLength{sigindent}\IndexPLength{sigindent} and -\PLength{sigbeforevskip}\IndexPLength{sigbeforevskip} pseudo-lengths determine -exactly where this box is placed (see \autoref{sec:\LabelBase.closing}, -\DescPageRef{\LabelBase.plength.sigindent}). The \Macro{raggedsignature} -command defines the alignment inside the box. In the default \File{lco} files, -the command is either defined as \Macro{centering} (all besides -\Option{KOMAold}) or \Macro{raggedright} (\Option{KOMAold}). In order to -obtain flush-right or flush-left alignment inside the box, you can redefine -the command in the same way as \DescRef{maincls.cmd.raggedsection} (see the -example in \autoref{sec:maincls.structure}, -\DescPageRef{maincls.cmd.raggedsection}). - -\begin{Example} - Now Mr Public wants to make himself seem really important, and therefore he uses the - signature to show once again that he was formerly a chairman himself. So - he changes \PName{contents} of the - \DescRef{\LabelBase.variable.signature} variable. He also wants the signature - be aligned flush-left and so he also redefines \Macro{raggedsignature}:% - \lstinputcode[xleftmargin=1em]{letter-22}% - See \autoref{fig:\LabelBase.letter-22} for the result. - \begin{figure} - \setcapindent{0pt}% - \begin{captionbeside}[{Example: letter with extended sender, logo, - recipient, extra sender information, place, date, subject, - opening, text, closing, modified signature, postscript, distribution - list, enclosure, and hole-punch mark}] - {result of a short letter with extended sender, logo, recipient, - extra sender information, place, date, subject opening, text, - closing, modified signature, postscript, distribution list, enclosure - and hole-punch mark}[l] - \frame{\includegraphics[width=.4\textwidth]{letter-22}} - \end{captionbeside} - \label{fig:\LabelBase.letter-22} - \end{figure} -\end{Example} -\iftrue% Umbruchkorrekturtext - The preceding example shows the most important, although not all possible, - elements of a letter. It can, however, serve quite well as a general - template.% -\else - \vskip -1\ht\strutbox plus .75\ht\strutbox% example at end of description -\fi -% -\EndIndexGroup - - -\begin{Declaration} - \PLength{sigindent}% - \PLength{sigbeforevskip} -\end{Declaration} -The closing phrase\Index{closing>phrase}\Index{signature} and signature -explanation are typeset in a box whose width is determined by the length of -the longest line of the closing phrase or explanation. - -The box will be indented by the distance specified in the \PLength{sigindent} -pseudo-length. In the predefined \File{lco} files\textnote{\File{lco} -file}\Index{lco file=\File{lco} file}, this length is set to 0\Unit{mm}. - -Between the closing phrase and the signature explanation, a vertical skip is -inserted whose height is defined in the \PLength{sigbeforevskip} -pseudo-length. In the predefined \File{lco} files\textnote{\File{lco} -file}\Index{lco file=\File{lco} file} this value is set to two lines. In this -space you can then write your signature.% -\iffalse% Umbruchkorrekturtext -\ If you decide to include a facsimile of your signature in the -\DescRef{\LabelBase.variable.signature}\IndexVariable{signature}% -\important{\DescRef{\LabelBase.variable.signature}} with the -\Package{graphicx}\IndexPackage{graphicx} package, it would be useful -to reduce the value of \PLength{sigbeforevskip} and thus the gap between -the closing phrase and the signature.% -\fi% -\EndIndexGroup -% -\EndIndexGroup - - -\subsection{Letterhead Page Footer} -\seclabel{firstFoot}% -\BeginIndexGroup -\BeginIndex{}{letterhead page>footer}% - -The first page of a letter, the letterhead page, contains not just its own -header, the letterhead, but also its own footer\Index{footer>letterhead -page}\Index{footer}. Just like the letterhead, it will be set not by the page -style but directly within \DescRef{\LabelBase.cmd.opening}\IndexCmd{opening}% -\important{\DescRef{\LabelBase.cmd.opening}}. - - -\begin{Declaration} - \OptionVName{enlargefirstpage}{simple switch} -\end{Declaration} -\begin{Explain} - The first page of a letter always uses a different page layout because of - the many predefined elements such as the letterhead or the address. The - \Class{scrlttr2} class provides a mechanism to calculate height and vertical - alignment of header and footer of the first page independently of the - subsequent pages. If, as a result, the footer of the first page would - protrude into the text area, this text area of the first page is - automatically reduced using - \Macro{enlargethispage}\IndexCmd{enlargethispage}. -\end{Explain} -If the text area should become larger, assuming the footer on the first page -permits this, you can use this option. At best, a little more text will then -fit on the first page. See also the description of the \PLength{firstfootvpos} -pseudo-length on \DescPageRef{\LabelBase.plength.firstfootvpos}. This -option takes the standard values for simple switches, as listed in -\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. The default -is \PValue{false}.\textnote{default}% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{firstfoot}{simple switch} -\end{Declaration} -\BeginIndex{}{letterhead page>footer}% -This\ChangedAt{v2.97e}{\Class{scrlttr2}} option determines whether the footer -for the letterhead page is output. Switching off the letterhead page footer -with \OptionValue{firstfoot}{false}\important{\OptionValue{firstfoot}{false}}, -has an effect when the \DescRef{\LabelBase.option.enlargefirstpage} option -(see \DescPageRef{\LabelBase.option.enlargefirstpage}) is used at the same -time, as this will logically extend the page downwards. In this case, the -distance that is ordinarily between type area and the footer becomes the -distance between the end of the type area and the bottom of the page. - -The option recognizes the standard values for simple switches listed in -\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. The default -is to include the letterhead page footer. -\EndIndexGroup - - -\begin{Declaration} - \Variable{firstfoot}% -\end{Declaration}% -\BeginIndex{}{letterhead page>footer}% -The footer of the first page is empty by default. -However\ChangedAt{v3.08}{\Class{scrlttr2}}, you can specify a new footer -in the \PName{content} of the \Variable{firstfoot} variable. \KOMAScript{} -does not use the \PName{description} of the variable. - -\BeginIndex{Variable}{frombank}% -\begin{Example} - You want to put the \PName{content} of the \Variable{frombank} variable - (i.\,e. the bank account details) in the footer of the first page. The - double backslash should be replaced with a comma: -\begin{lstcode} - \setkomavar{firstfoot}{% - \parbox[b]{\linewidth}{% - \centering\def\\{, }\usekomavar{frombank}% - }% - } -\end{lstcode} - You can also define your own variable for the separator. I leave - this as an exercise for the reader. - - If you want to create a footer in order to counterbalance the letterhead, you - can do so, for example, as follows: -\begin{lstcode} - \setkomavar{firstfoot}{% - \parbox[t]{\textwidth}{\footnotesize - \begin{tabular}[t]{l@{}}% - \multicolumn{1}{@{}l@{}}{Partners:}\\ - Jim Smith\\ - Russ Mayer - \end{tabular}% - \hfill - \begin{tabular}[t]{l@{}}% - \multicolumn{1}{@{}l@{}}{Managing Director:}\\ - Lisa Mayer\\[1ex] - \multicolumn{1}{@{}l@{}}{Court Jurisdiction:}\\ - Great Plains - \end{tabular}% - \Ifkomavarempty{frombank}{}{% - \hfill - \begin{tabular}[t]{l@{}}% - \multicolumn{1}{@{}l@{}}{\usekomavar*{frombank}:}\\ - \usekomavar{frombank} - \end{tabular}% - }% - }% - } -\end{lstcode} - This example originally came from Torsten Kr\"uger. You should - consider placing a definition intended for multiple use in different - documents in a separate \File{lco} file\Index{lco file=\File{lco} file}. -\begin{lstcode} - \setkomavar{frombank}{Account No. 12345678\\ - Buffoon Bank\\ - Bank Code: 65-43-21} -\end{lstcode} - can then be used to set the bank details in the document. -% However depending on your settings, there may not be sufficient space -% for such a large footer, and it may therefore be placed too low on the -% page. In such a case, you can adjust its vertical position with the -% pseudo-length \PLength{firstfootvpos}\IndexPLength{firstfootvpos}. -\end{Example} - -The previous example uses a multi-line footer. With a compatibility setting -of version 2.9u (see \DescRef{\LabelBase.option.version} in -\autoref{sec:\LabelBase.compatibilityOptions}, -\DescPageRef{\LabelBase.option.version}) the space is generally insufficient. -In this case, you should reduce \PLength{firstfootvpos} (see -\DescPageRef{\LabelBase.plength.firstfootvpos}) appropriately.% -\EndIndexGroup - -\begin{Declaration} - \Variable{frombank} -\end{Declaration}% -\BeginIndex{}{letterhead page>footer}% -The \Variable{frombank} variable used in the previous example -occupies a special position. It is not currently used internally. However, you -can use it to put the bank information\Index{bank information} in the -extra sender information field or in the footer, as in the example (see -the variable \DescRef{\LabelBase.variable.location}, -\DescPageRef{\LabelBase.variable.location}).% -% -\EndIndexGroup - - -\begin{Declaration} - \PLength{firstfootvpos} -\end{Declaration} -This pseudo-length gives the distance from the top of the paper to the footer -of the letterhead page. It also ensures that the text area does not protrude -into the footer. To do so, the height of the text area on the first page will -be decreased, if necessary, using -\Macro{enlargethispage}\IndexCmd{enlargethispage}% -\important{\Macro{enlargethispage}}. The -\DescRef{\LabelBase.option.enlargefirstpage}% -\important{\DescRef{\LabelBase.option.enlargefirstpage}} option (see -\autoref{sec:\LabelBase.firstpage}, -\DescPageRef{\LabelBase.option.enlargefirstpage}) can also ensure that the -height of the text area is increased, if necessary. Thus, the distance between -text area and the letterhead page footer can be reduced to the value of the -\Length{footskip}\IndexLength{footskip}\important{\Length{footskip}} length. - -With\textnote{Attention!} the compatibility option -set\ChangedAt{v2.9t}{\Class{scrlttr2}} to versions up to -2.9t\IndexOption{version~=\PValue{2.9t}} (see -\DescRef{\LabelBase.option.version} in -\autoref{sec:\LabelBase.compatibilityOptions}, -\DescPageRef{\LabelBase.option.version}) the footer is set independently of the -type area in all predefined \File{lco} files\textnote{\File{lco} -file}\Index{lco file=\File{lco} file} (see \autoref{sec:\LabelBase.lcoFile}) -except for \Option{KOMAold} and \Option{NF}. Thus the -\DescRef{\LabelBase.option.enlargefirstpage}% -\important{\DescRef{\LabelBase.option.enlargefirstpage}} option has no effect. -From version 2.9u on, the footer is placed at the bottom edge of the paper. -Thus, the height of the letterhead page's type area may also depend on the -\DescRef{\LabelBase.option.enlargefirstpage} option. - -If the letter footer is deactivated with the -\OptionValueRef{scrlttr2}{firstfoot}{false}% -\important{\OptionValueRef{scrlttr2}{firstfoot}{false}}% -\IndexOption{firstfoot~=\PValue{false}}\ChangedAt{v2.97e}{\Class{scrlttr2}} -option (see \autoref{sec:\LabelBase.firstpage}, -\DescPageRef{\LabelBase.option.firstfoot}), the setting of -\PLength{firstfootvpos} is ignored, and instead -\Length{paperheight}\IndexLength{paperheight} is applied. There remains then a -minimum bottom margin of length \Length{footskip}\IndexLength{footskip}.% -\EndIndexGroup - - -\begin{Declaration} - \PLength{firstfoothpos} -\end{Declaration} -\ChangedAt{v3.05}{\Class{scrlttr2}}% -A\textnote{Attention!} positive value of the \PLength{firstfoothpos} -pseudo-length specifies the distance from the left edge of the paper to the -letterhead page footer. If the value is greater than or equal to the paper -width, \Length{paperwidth}\IndexLength{paperwidth}, the footer is centred -horizontally on the letterhead page. But if the value is less than or equal to -the negative width of the paper, the footer is placed flush with the left edge -of the typing area. - -The typical default for this value is \Length{maxdimen}\IndexLength{maxdimen}, -which is the maximum possible value for a length. This results in horizontal -centring.% -\EndIndexGroup - - -\begin{Declaration} - \PLength{firstfootwidth} -\end{Declaration} -This pseudo-length specifies the width of the footer of the first page of the -letter, that is the letterhead page. The value in the predefined \File{lco} -files\textnote{\File{lco} file}\Index{lco file=\File{lco} file} matches -\PLength{firstheadwidth}\important{\PLength{firstheadwidth}}% -\IndexPLength{firstheadwidth}.% -% -\EndIndexGroup -% -\EndIndexGroup -% -\EndIndexGroup - -\LoadCommonFile{parmarkup} % \section{Paragraph Markup} - -\LoadCommonFile{oddorevenpage} % \section{Detection of Odd and Even Pages} - - -\section{Headers and Footers with the Default Page Style} -\seclabel{pagestyle} -\BeginIndexGroup -\BeginIndex{}{page>style}% -\BeginIndex{}{page>header}% -\BeginIndex{}{page>footer}% - -One of the general properties of a document is its page style. In \LaTeX{} -this mostly consists of the contents of headers and footers. -As\textnote{Attention!} already mentioned in -\autoref{sec:\LabelBase.firstpage}, the header and footer of the letterhead -page are treated as elements of the letterhead page. Therefore they do not -depend on the settings of the page style. So this section describes the page -styles of the subsequent pages of a letter after the letterhead page. For -one-sided letters, this is the page style of the second sheet. For two-sided -letters, this is also the page style of all verso pages. - - -\begin{Declaration} - \Macro{letterpagestyle} -\end{Declaration} -The\ChangedAt{v3.19}{\Class{scrlttr2}\and \Package{scrletter}} default page -style for letters is specified by the contents of the \Macro{letterpagestyle} -command. By default\textnote{default}, -\Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} leaves this command empty. This -means that the page style of letters is the same as in the rest of the -document. This is useful because \Class{scrlttr2} is intended for letter-only -documents, and it is easier to define the page style for all letters globally, -using \DescRef{\LabelBase.cmd.pagestyle} as usual. - -Since both the \DescRef{\LabelBase.pagestyle.plain} and the -\DescRef{\LabelBase.pagestyle.headings} page styles of other classes differs -from the page style necessary for letters, the -\Package{scrletter}\OnlyAt{\Package{scrletter}}\textnote{default} package -defines \Macro{letterpagestyle} with to be -\DescRef{\LabelBase.pagestyle.plain.letter}\IndexPagestyle{plain.letter}% -\important{\DescRef{\LabelBase.pagestyle.plain.letter}}. This causes all -letters to use the -\hyperref[desc:\LabelBase.pagestyle.plain.letter]{\PageStyle{plain}} style of -the \DescRef{\LabelBase.pagestyle.letter}\IndexPagestyle{letter} page style -pair, regardless of the page style of the rest of the document. See -\autoref{sec:scrlttr2-experts.pagestyleatscrletter} for more information about -the characteristics of the page style of the \Package{scrletter} package. -\begin{Example} - You are using the \Package{scrletter} package and want letters to use the - same page style that was set for the rest of the document with - \DescRef{\LabelBase.cmd.pagestyle}. To do this, put the command -\begin{lstcode} - \renewcommand*{\letterpagestyle}{} -\end{lstcode} - in your document preamble. Notice the star in \Macro{renewcommand*}. -\end{Example} -Of course, if you use \DescRef{\LabelBase.cmd.pagestyle} or -\DescRef{\LabelBase.cmd.thispagestyle} inside a letter, this will take -precedence over the page style set in \Macro{begin}\PParameter{letter} with -\Macro{letterpagestyle}.% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{headsepline}{simple switch}% - \OptionVName{footsepline}{simple switch} -\end{Declaration} -With these options \Class{scrlttr2}\OnlyAt{scrlttr2} can select whether to put -a separator rule\Index{line>separator}\Index{rule>separator} below the header -or above the footer, respectively, on subsequent pages. This option acccepts -the standard values for simple switches listed in -\autoref{tab:truefalseswitch}, \autopageref{tab:truefalseswitch}. -Activating\important{\OptionValue{headsepline}{true}} the \Option{headsepline} -option enables a rule below the header. -Activating\important{\OptionValue{footsepline}{true}} the \Option{footsepline} -option enables a rule above the footer. Deactivating the options disables the -corresponding rules. - -Of course, the \Option{headsepline} and \Option{footsepline} options have no -effect on the \DescRef{\LabelBase.pagestyle.empty}% -\important{\DescRef{\LabelBase.pagestyle.empty}} page style (see later in this -section). This page style explicitly does not use headers or footers. - -Typographically\important{\DescRef{\LabelBase.pagestyle.headings}\\ - \DescRef{\LabelBase.pagestyle.myheadings}\\ - \DescRef{\LabelBase.pagestyle.plain}} speaking, such a rule creates an -optical effect of making the header or footer appear to be closer to the text -area. This does not mean that the distance between the header or footer and -the text should be increased. Instead, they should be seen as part of the text -body\Index{text>body} when calculating the type area. To achieve this -\Class{scrlttr2} uses the \Option{headsepline} class option to automatically -pass the \DescRef{typearea.option.headinclude}% -\important{\DescRef{typearea.option.headinclude}} package option to the -\hyperref[cha:typearea]{\Package{typearea}} package. The same applies to -\DescRef{\LabelBase.option.footsepline} for -\DescRef{typearea.option.footinclude}% -\important{\DescRef{typearea.option.footinclude}}. - -The options themselves do not automatically recalculate the type area. To -recalculate the type area, see the \DescRef{typearea.option.DIV} option with -the \PValue{last} or \PValue{current} values (see -\DescPageRef{typearea.option.DIV.last}), or the -\DescRef{typearea.cmd.recalctypearea} command (see -\DescPageRef{typearea.cmd.recalctypearea}) in \autoref{cha:typearea}. - -The \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% -\IndexPackage{scrlayer-scrpage}% -\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} -package (see \autoref{cha:scrlayer-scrpage}) provides further control over -header and footer rules and you can also combine it with \Class{scrlttr2}. The -\Package{scrletter} package automatically uses -\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} to -define the \DescRef{\LabelBase.pagestyle.letter} and -\DescRef{\LabelBase.pagestyle.plain.letter} page styles. - -The\OnlyAt{\Package{scrletter}} \DescRef{\LabelBase.pagestyle.letter} and -\DescRef{\LabelBase.pagestyle.plain.letter} page styles defined by -\Package{scrletter} follow the rules of -\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}. This particularly -applies to setting the header and footer rules of the \PageStyle{plain} page -style \DescRef{\LabelBase.pagestyle.plain.letter}. See in -\autoref{sec:scrlayer-scrpage.pagestyle.content}, -\DescPageRef{scrlayer-scrpage.option.headsepline} and -\DescPageRef{scrlayer-scrpage.option.plainheadsepline} the options -\DescRef{scrlayer-scrpage.option.headsepline} and -\DescRef{scrlayer-scrpage.option.plainheadsepline}. Also, settings like -\DescRef{scrlayer-scrpage.option.automark} are of some importance for the -\DescRef{\LabelBase.pagestyle.letter} page style.% -% -\EndIndexGroup - - -\begin{Declaration} - \OptionVName{pagenumber}{position} -\end{Declaration} -With this option you can select if and where a page number should be placed on -subsequent pages. In \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} this option -affects the page styles\important{\DescRef{\LabelBase.pagestyle.headings}\\ - \DescRef{\LabelBase.pagestyle.myheadings}\\ - \DescRef{\LabelBase.pagestyle.plain}} -\DescRef{\LabelBase.pagestyle.headings}, -\DescRef{\LabelBase.pagestyle.myheadings} and -\DescRef{\LabelBase.pagestyle.plain}; in -\Package{scrletter}\OnlyAt{\Package{scrletter}}, it affects the -\DescRef{\LabelBase.pagestyle.letter} and -\DescRef{\LabelBase.pagestyle.plain.letter} page styles. It also affects the -default page styles of the -\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% -\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}}% -\IndexPackage{scrlayer-scrpage} package, as long as it is set before that -package is loaded (see \autoref{cha:scrlayer-scrpage}). It accepts values that -influence only the horizontal position, only the vertical position, or both -positions simultaneously. Available values are listed in -\autoref{tab:\LabelBase.pagenumber}. The default is \PValue{botcenter}. - -\begin{table} - \caption[{Available values for the \Option{pagenumber} option with - \Class{scrlttr2}}]{Available values for the \Option{pagenumber} option to - position the page number in the \PageStyle{headings}, - \PageStyle{myheadings}, and \PValue{plain} page styles with - \Class{scrlttr2}} - \label{tab:\LabelBase.pagenumber} - \begin{desctabular} - \entry{\PValue{bot}, \PValue{foot}}{% - page number in footer, horizontal position unchanged}% - \entry{\PValue{botcenter}, \PValue{botcentered}, \PValue{botmittle}, - \PValue{footcenter}, \PValue{footcentered}, \PValue{footmiddle}}{% - page number in footer, centred}% - \entry{\PValue{botleft}, \PValue{footleft}}{% - page number in footer, left-justified}% - \entry{\PValue{botright}, \PValue{footright}}{% - page number in footer, right-justified}% - \entry{\PValue{center}, \PValue{centered}, \PValue{middle}}{% - page number centred horizontally, vertical position unchanged}% - \entry{\PValue{false}, \PValue{no}, \PValue{off}}{% - no page number}% - \entry{\PValue{head}, \PValue{top}}{% - page number in header, horizontal position unchanged}% - \entry{\PValue{headcenter}, \PValue{headcentered}, \PValue{headmiddle}, - \PValue{topcenter}, \PValue{topcentered}, \PValue{topmiddle}}{% - page number in header, centred}% - \entry{\PValue{headleft}, \PValue{topleft}}{% - page number in header, left-justified}% - \entry{\PValue{headright}, \PValue{topright}}{% - page number in header, right-justified}% - \entry{\PValue{left}}{% - page number left, vertical position unchanged}% - \entry{\PValue{right}}{% - page number right, vertical position unchanged}% - \end{desctabular} -\end{table} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{pagestyle}\Parameter{page style}% - \Macro{thispagestyle}\Parameter{local page style} -\end{Declaration}% -\BeginIndex{Pagestyle}{empty}% -\BeginIndex{Pagestyle}{plain}% -\BeginIndex{Pagestyle}{headings}% -\BeginIndex{Pagestyle}{myheadings}% -Letters written with \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} have four -different page styles available. In contrast, -\Package{scrletter}\OnlyAt{\Package{scrletter}} defines only two of its own -page styles. -\begin{description}\setkomafont{descriptionlabel}{} -\item[{\PageStyle{empty}}] - \LabelPageStyle{empty} is the page style where the headers and footers of - subsequent pages are completely empty. This page style is also automatically - used for the first page of the letter because the header and footer of this - page are set by other means, using - \DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} (see - \autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.cmd.opening}). -\item[{\PageStyle{headings}}] - \LabelPageStyle{headings} is, for \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}}, - the page style for automatic running heads on subsequent pages. The sender's - name from the \DescRef{\LabelBase.variable.fromname}\IndexVariable{fromname} - variable and the subject from the - \DescRef{\LabelBase.variable.subject}\IndexVariable{subject} variable are - used to set the marks (see \autoref{sec:\LabelBase.firstpage}, - \DescPageRef{\LabelBase.variable.fromname} and - \DescPageRef{\LabelBase.variable.subject}). Where exactly these marks and - page numbers are placed depends on the - \DescRef{\LabelBase.option.pagenumber} described above and the - \PName{content} of the - \DescRef{\LabelBase.variable.nexthead}\IndexVariable{nexthead} and - \DescRef{\LabelBase.variable.nextfoot}\IndexVariable{nextfoot} variables. An - author can also change these marks manually after the - \DescRef{\LabelBase.cmd.opening} command. As usual, the - \DescRef{\LabelBase.cmd.markboth} and \DescRef{\LabelBase.cmd.markright} - commands are available, as is \DescRef{scrlayer-scrpage.cmd.markleft} if you - use \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% - \IndexPackage{scrlayer-scrpage}% - \important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} - (see \autoref{sec:scrlayer-scrpage.pagestyle.content}, - \DescPageRef{scrlayer-scrpage.cmd.automark}). - - Since \Package{scrletter}\OnlyAt{scrletter} uses - \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} internally, any - page style \DescRef{maincls.pagestyle.headings} provided by the class are - redefined as an alias of \DescRef{scrlayer-scrpage.pagestyle.scrheadings}. - You can find more about this page style in \autoref{cha:scrlayer-scrpage} on - \DescPageRef{scrlayer-scrpage.pagestyle.scrheadings}. -\item[{\PageStyle{letter}}] - \LabelPageStyle{letter}% - Since the \PageStyle{headings} page style is generally already in use by - the classes, the \Package{scrletter}\OnlyAt{scrletter} package instead - defines the \PageStyle{letter} page style. This is accomplished with the - help of \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} in - \autoref{cha:scrlayer-scrpage}, \autopageref{cha:scrlayer-scrpage}. With the - \OptionValueRef{scrlayer-scrpage}{automark}{true}% - \important{\OptionValueRef{scrlayer-scrpage}{automark}{true}}% - \IndexOption{automark} setting enabled, \PageStyle{letter} then assumes the - role played by \PageStyle{headings} in \Class{scrlttr2}. With - \OptionValueRef{scrlayer-scrpage}{automark}{false}% - \important{\OptionValueRef{scrlayer-scrpage}{automark}{false}}% - \IndexOption{automark} set, \PageStyle{letter} assumes the role of - \PageStyle{myheadings}. - - When\textnote{Attention!} you use - \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} with - \Package{scrletter}, you cannot use the obsolete - \Package{scrpage2}\IndexPackage{scrpage2} package or the - \Package{fancyhdr}\IndexPackage{fancyhdr} package, which is incompatible - with \KOMAScript{}. -\item[{\PageStyle{myheadings}}] - \LabelPageStyle{myheadings}% - in \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} is the page style for manual - running heads on subsequent pages. Unlike \PValue{headings}, you must set - the marks yourself with the - \DescRef{\LabelBase.cmd.markboth}\IndexCmd{markboth} and - \DescRef{\LabelBase.cmd.markright}\IndexCmd{markright} commands. When you - use \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}, - \DescRef{scrlayer-scrpage.cmd.markleft}\IndexCmd{markleft} is also - available. - - With the \Package{scrletter}\OnlyAt{\Package{scrletter}} package, the - \PageStyle{letter} page style also assumes the role of - \PageStyle{myheadings}. -\item[{\PageStyle{plain}}] - \LabelPageStyle{plain}% - is the default page style for \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}}, - which does not use any headers on subsequent pages and only outputs - a single page number. Where this is placed depends on the - \DescRef{\LabelBase.option.pagenumber} option explained above. - - Since \Package{scrletter}\OnlyAt{scrletter} uses - \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} internally, the - \DescRef{maincls.pagestyle.plain} page style is redefined as an alias of - \DescRef{scrlayer-scrpage.pagestyle.plain.scrheadings}. You can find more - about this page style in \autoref{cha:scrlayer-scrpage} on - \DescPageRef{scrlayer-scrpage.pagestyle.scrheadings}. -\item[{\PageStyle{plain.letter}}] - \LabelPageStyle{plain.letter}% - Since the \PageStyle{plain} page style is generally already in use by the - classes, the \Package{scrletter}\OnlyAt{scrletter} defines a - \PageStyle{plain.letter} page style instead. This is accomplished with the - help of \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}. - When\textnote{Attention!} you use - \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}} with - \Package{scrletter}, you cannot use the obsolete - \Package{scrpage2}\IndexPackage{scrpage2} package or the - \Package{fancyhdr}\IndexPackage{fancyhdr} package, which is incompatible - with \KOMAScript{}. -\end{description} - -The appearance of the page styles is also influenced by -the\important{\DescRef{\LabelBase.option.headsepline}\\ - \DescRef{\LabelBase.option.footsepline}} -\DescRef{\LabelBase.option.headsepline}\IndexOption{headsepline} and -\DescRef{\LabelBase.option.footsepline}\IndexOption{footsepline} options -described above. The page style beginning with the current page is changed -using \Macro{pagestyle}. In contrast, \Macro{thispagestyle} changes only the -page style of the current page. The\textnote{Attention!} letter class itself -uses \Macro{thispagestyle}\PParameter{empty} within -\DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} for the first page of the -letter. - -\BeginIndexGroup% -\BeginIndex[indexother]{}{font>style}% -\BeginIndex{FontElement}{pageheadfoot}\LabelFontElement{pageheadfoot}% -\BeginIndex{FontElement}{pagehead}\LabelFontElement{pagehead}% -\BeginIndex{FontElement}{pagefoot}\LabelFontElement{pagefoot}% -\BeginIndex{FontElement}{pagenumber}\LabelFontElement{pagenumber}% -To changing the font style of headers or footers, you should use the user -interface described in \autoref{sec:maincls.textmarkup}. The header and footer -use the same element -\FontElement{pageheadfoot}\important{\FontElement{pageheadfoot}}. -% TODO: Fix new translation -With package \hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% -\IndexPackage{scrlayer-scrpage} and therefore with \Package{scrletter} the -\FontElement{pagehead}\important{\FontElement{pagehead}} element is -additionally responsible for the header. In \Class{scrlttr2} and without -package \Package{scrlayer-scrpage} the element is an alias of -\FontElement{pageheadfoot} only. -% :ODOT -The\ChangedAt{v3.00}{\Class{scrlttr2}} -\FontElement{pagefoot}\important{\FontElement{pagefoot}} element additionally -controls the formatting of the footer. This element is applied after -\FontElement{pageheadfoot} in the -\DescRef{\LabelBase.variable.nextfoot}\IndexVariable{nextfoot} variable or -when \Package{scrlayer-scrpage}\IndexPackage{scrlayer-scrpage} page styles are -used (see \autoref{cha:scrlayer-scrpage}, -\DescPageRef{scrlayer-scrpage.fontelement.pagefoot}). The element for the page -number within the header or footer is called -\FontElement{pagenumber}\important{\FontElement{pagenumber}}. The default -settings are listed in \autoref{tab:maincls.defaultFontsHeadFoot}, -\autopageref{tab:maincls.defaultFontsHeadFoot}. Please also note the example -from \autoref{sec:maincls.pagestyle}, \PageRefxmpl{maincls.cmd.pagestyle}. -% -\EndIndexGroup -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{markboth}\Parameter{left mark}\Parameter{right mark}% - \Macro{markright}\Parameter{right mark} -\end{Declaration} -In most cases, \KOMAScript{}'s options and variables should be quite adequate -for creating headers\Index{header} and footers\Index{footer} for the -subsequent pages, all the more so because, in addition to \Macro{markboth} and -\Macro{markright}, you can change the sender information that \Class{scrlttr2} -or \Package{scrletter} puts in the header. You can, in particular, use the -\Macro{markboth}\IndexCmd{markboth} and \Macro{markright}\IndexCmd{markright} -commands with the \PageStyle{myheadings}\IndexPagestyle{myheadings}% -\important{\PageStyle{myheadings}} pagestyle. Of course, if you use the -\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}% -\IndexPackage{scrlayer-scrpage}% -\important{\hyperref[cha:scrlayer-scrpage]{\Package{scrlayer-scrpage}}} -package, this is also valid for the -\PValue{scrheadings}\IndexPagestyle{scrheadings} page style. In that case, the -\DescRef{scrlayer-scrpage.cmd.markleft}\IndexCmd{markleft} command is also -available. - -\begin{Declaration} - \Variable{nexthead}% - \Variable{nextfoot}% -\end{Declaration} -At times, however, you may want to the header or the footer of subsequent pages -to more closely resemble the letterhead page. In these cases, you must dispense -with the predefined options that can be selected with the -\DescRef{\LabelBase.option.pagenumber}\IndexOption{pagenumber} option described above. -Instead, you can customise the header and footer of subsequent pages using the -\DescRef{\LabelBase.pagestyle.headings}\IndexPagestyle{headings}% -\important{\DescRef{\LabelBase.pagestyle.headings}, - \DescRef{\LabelBase.pagestyle.myheadings}} or -\DescRef{\LabelBase.pagestyle.myheadings}\IndexPagestyle{myheadings} page styles with \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}}, -and the \DescRef{\LabelBase.pagestyle.letter}% -\IndexPagestyle{letter}\important{\DescRef{\LabelBase.pagestyle.letter}} page style -with \Package{scrletter}\OnlyAt{\Package{scrletter}}. To do so, you create the -structure you want in the \PName{content} of -the\ChangedAt{v3.08}{\Class{scrlttr2}} \Variable{nexthead} or -\Variable{nextfoot} variables. Within the \PName{content} of -\Variable{nexthead} and \Variable{nextfoot} you can, for example, use the \Macro{parbox} -command to place several boxes next to or beneath each other (see \cite{latex:usrguide}). More advanced users should -be able to create their own headers and footers. Of course, you can -and should also make use of additional variables using -\DescRef{\LabelBase.cmd.usekomavar}. \KOMAScript{} does not use the -\PName{description} for either variable. -% -%Only\textnote{Attention!} for compatibility reason the deprecated commands -%\Macro{nexthead}\IndexCmd[indexmain]{nexthead} and -%\Macro{nextfoot}\IndexCmd[indexmain]{nextfoot} of former \Class{scrlttr2} -%releases before 3.08 are also implemented. Nevertheless, you should not use -%those.% -% -\EndIndexGroup -\EndIndexGroup -% -\EndIndexGroup - - -\LoadCommonFile{interleafpage}% \section{Interleaf Pages} - -\LoadCommonFile{footnotes}% \section{Footnotes} - -\LoadCommonFile{lists}% \section{Lists} - - -\section{Mathematics} -\seclabel{math}% -\BeginIndexGroup -\BeginIndex{}{equations}% -\BeginIndex{}{formulas}% -\BeginIndex{}{mathematics}% - -The \KOMAScript{} classes do not provide their own maths environments. -Instead, \KOMAScript{} relies completely on the maths features of the \LaTeX{} -kernel. However\textnote{Attention!}, since numbered equations and formulas -are very unusual in letters, \KOMAScript{} does not actively support them. -Therefore, the \DescRef{maincls.option.leqno} and -\DescRef{maincls.option.fleqn} options for \Class{scrbook}, \Class{scrreprt}, -and \Class{scrartcl}, documented in \autoref{sec:maincls.math}, are not -available with \Class{scrlttr2}. - -You will not find a description here of the maths environments of the \LaTeX{} -kernel, that is \Environment{displaymath}\IndexEnv{displaymath}, -\Environment{equation}\IndexEnv{equation}, and -\Environment{eqnarray}\IndexEnv{eqnarray}. If you want to use them, consult an -introduction to \LaTeX{} like \cite{lshort}. But\textnote{Hint!} if you want -more than very simple mathematics, you should use the \Package{amsmath} -package (see \cite{package:amsmath}).% -% -\EndIndexGroup - - -\section{Floating Environments for Tables and Figures} -\seclabel{floats} - -Floating environments for tables or figures are very unusual in letters. -Therefore\textnote{Attention!} \Class{scrlttr2} does not provide them. If you -still believe you need them, this often indicates a misuse of the letter -class. In such cases, it is advisable to combine one of the \KOMAScript{} -classes from \autoref{cha:maincls} with the -\Package{scrletter}\important{\Package{scrletter}} package instead. In this -case you, the floating environments documented for the class can also be used -in letters. You could also define your own floating environments with help of -\Package{tocbasic}\important{\Package{tocbasic}} (see \autoref{cha:tocbasic}). - -\LoadCommonFile{marginpar} % \section{Margin Notes} - - -\section{Letter Class Option Files} -\seclabel{lcoFile}% -\BeginIndexGroup -\BeginIndex{}{lco file=\File{lco} file}% -\BeginIndex{}{letter class option}% - -Normally, you would not redefine selections like the sender's information -every time you write a letter. Instead, you would reuse a whole set of -parameters for certain occasions. The same applies to the letterhead -and footer used on the first page. Therefore it makes sense to save these -settings in a separate file. For this purpose, \KOMAScript{} offers -\File{lco} files. The \File{lco} suffix is an abbreviation for -\emph{\emph{l}etter \emph{c}lass \emph{o}ption}. - -In an \File{lco} file, you can use all commands available to the document at -the time the \File{lco} file is loaded. You can also use internal commands -available to package writers. For \Class{scrlttr2} and \Package{scrletter}, -these are, in particular, the commands -\DescRef{\LabelBase.cmd.newplength}\IndexCmd{newplength}, -\DescRef{\LabelBase.cmd.setplength}\IndexCmd{setplength}, and -\DescRef{\LabelBase.cmd.addtoplength}\IndexCmd{addtoplength} (see -\autoref{sec:\LabelBase.pseudoLength}). - -\KOMAScript{} comes provided with some \File{lco} files. The \File{DIN.lco}, -\File{DINmtext.lco}, \File{SNleft.lco}, \File{SN.lco}, \File{UScommercial9}, -\File{UScommercial9DW}, and \File{NF.lco}\ChangedAt{v3.04}{\Class{scrlttr2}} -files serve to adapt \Class{scrlttr2} and \Package{scrletter} to different -standards. They are well suited as templates for your own parameter sets as -you become a \KOMAScript{} expert. The \File{KOMAold.lco} file, on the other -hand, serves to improve compatibility with the old letter class -\Class{scrlettr}. This class was removed from \KOMAScript{} over fifteen years -ago. It is therefore not discussed in any detail. Since this file also -contains internal commands that are not released for package writers, you -should not use this as a template for your own \File{lco} files. You can find -a list of predefined \File{lco} files in \autoref{tab:lcoFiles}, -\autopageref{tab:lcoFiles}. - -If you have defined a parameter set for a letter standard that is not yet -supported by \KOMAScript{}, you are explicitly requested to send this -parameter set to the \KOMAScript{} support address. Please also provide -permission for distribution under the \KOMAScript{} license (see the -\File{lppl.txt} file). If you have the necessary measurements for an -unsupported letter standard but are unable to write a corresponding \File{lco} -file yourself, you can also contact the \KOMAScript{} author, Markus Kohm, -directly. you can find further examples of \File{lco} files, some very -complex, at \cite{homepage} or in \cite{DANTE:TK0203:MJK}. Both sites are -mainly in German. - - -\begin{Declaration} - \Macro{LoadLetterOption}\Parameter{name}% - \Macro{LoadLetterOptions}\Parameter{list of names} -\end{Declaration} -With \Class{scrlttr2}\OnlyAt{\Class{scrlttr2}} you can load \File{lco} files -with the \Macro{documentclass} command. To do so, give the name of the -\File{lco} file without the extension as an option\Index{option}. The -\File{lco} file is then loaded directly after the class. The -\Package{scrletter}\textnote{Attention!} package does not offer this option. -To load \File{lco} files, you must use \Macro{LoadLetterOption} or -\Macro{LoadLetterOptions}\ChangedAt{v3.14}{\Class{scrlttr2}}. -This\textnote{Recommendation!} is also recommended for \Class{scrlttr2}. - -You can also use \Macro{LoadLetterOption} and \Macro{LoadLetterOptions} after -\Macro{begin}\PParameter{document}, or even from within another \File{lco} -file. Both commands take the \PName{name} of the \File{lco} file without the -extension. While the argument of \Macro{LoadLetterOption} should be exactly -one \File{lco} file, \Macro{LoadLetterOptions} accepts a comma-separated -\PName{list of names}. The corresponding \File{lco} files with those names are -loaded in the order given by the list. -\begin{Example} - Joe Public also writes a document containing several letters. For most of - them, the default format, which follows the format of the German Institute - for Standardisation, or \emph{Deutsches Institut f\"{u}r Normung} (DIN), is - sufficient. So he starts with: -\begin{lstcode} - \documentclass{scrlttr2} -\end{lstcode} - However, he wants to send one letter in a C6/5 envelope, and so he - uses the \File{DINmtext} variant, in which the - address field appears higher on the page, so that more text - fits on the first page. The fold marks are adjusted so that the - address field still fits the address window in a C6/5 envelope. - He achieves this as follows: -\begin{lstcode} - \begin{letter}{% - Joanna Public\\ - 1 Hillside\\ - SAMPLESTEAD\\ - WX12 3YZ} - \LoadLetterOption{DINmtext} - \opening{Hello,} -\end{lstcode} - Since construction of the first page only really begins with the - \DescRef{\LabelBase.cmd.opening}\IndexCmd{opening} command, you only need to - load the \File{lco} file before this point. In particular, you do not need - to load it before \Macro{begin}\PParameter{letter}. That way the changes - made by loading the \File{lco} file are local to the corresponding letter. -\end{Example} - -If\ChangedAt{v2.97}{\Class{scrlttr2}} an \File{lco} file is loaded via -\Macro{documentclass}, then it must not have the same name as an option. - -\begin{Example} - Since Mr Public often writes letters with the same options and parameters, - he finds it quite annoying to copy this information to each new letter. To - simplify the effort of writing a new letter, he therefore creates an - \File{lco} file:% - \lstinputcode[xleftmargin=1em]{ich.lco}% - With this, the size of his letter from the previous example shrinks - considerably: \lstinputcode[xleftmargin=1em]{letter-23.tex}% - Nevertheless, the result does not change, as shown in - \autoref{fig:\LabelBase.letter-23}. - \begin{figure} - \setcapindent{0pt}% - \begin{captionbeside}[{Example: letter with extended sender, logo, - recipient, extra sender information, place, date, subject, - opening, text, closing, modified signature, postscript, distribution - list, enclosure, and hole-punch mark using an \File{lco} file}] - {result of a short letter with extended sender, logo, recipient, - extra sender information, place, date, subject opening, text, - closing, modified signature, postscript, distribution list, enclosure - and hole-punch mark using an \File{lco} file}[l] - \frame{\includegraphics[width=.4\textwidth]{letter-23}} - \end{captionbeside} - \label{fig:\LabelBase.letter-23} - \end{figure} -\end{Example} - -Note\textnote{Attention!} that immediately after loading the document class, -normally neither a package for the input encoding nor a language package has -been loaded. Because of this, you should use \TeX's 7-bit encoding for all -non-ASCII characters. For example, use ``\Macro{ss}'' to produce a German -``\ss''. - -In \autoref{tab:lcoFiles}, \autopageref{tab:lcoFiles} you can find a list of -all predefined \File{lco} files. If\textnote{Attention!} you use a printer -that has large unprintable areas on the left or right side, you might have -problems with the \Option{SN}\IndexOption{SN} option. Since the Swiss standard -SN~101\,130 stipulates that the address field should be placed 8\Unit{mm} from -the right edge of the paper, the headline and the sender attributes are also -placed at a correspondingly small distance from the paper edge. This also -applies to the reference line when using the -\DescRef{\LabelBase.option.refline}\PValue{=wide} option (see -\autoref{sec:\LabelBase.firstpage}, \DescPageRef{\LabelBase.option.refline}). -If\textnote{Hint!} you have this kind of problem, create your own \File{lco} -file that loads \Option{SN} first and then changes -\PLength{toaddrhpos}\IndexPLength{toaddrhpos} (see -\autoref{sec:\LabelBase.addressee}, -\DescPageRef{\LabelBase.plength.toaddrvpos}) to a smaller value. In -addition, you should also reduce \PLength{toaddrwidth} accordingly.% - -By\textnote{Hint!} the way, the \File{DIN} \File{lco} file is always loaded -automatically as the first \File{lco} file. This ensures that all -pseudo-lengths will have more or less reasonable default values. Therefore you -do not need to load this default file on your own. - -%Please\textnote{Attention!} note that it is not possible to use -%\Macro{PassOptionsToPackage} to pass options to packages from within an -%\File{lco} file that have already been loaded by the class. Normally, this -%only applies to the \Package{typearea}, \Package{scrlfile}, \Package{scrbase}, -%and \Package{keyval} packages.% - -\begin{desclist} - \renewcommand*{\abovecaptionskipcorrection}{-\normalbaselineskip}% - \desccaption{% - Predefined \File{lco} files\label{tab:lcoFiles}% - }{% - Predefined \File{lco} files (\emph{continued})% - }% - \oentry{DIN}{% - \leavevmode% - \IndexOption[indexmain]{DIN}\IndexFile[indexmain]{DIN.lco}% - parameters for letters on A4 paper, complying with German standard - DIN~676; suitable for window envelopes in the sizes C4, C5, C6, and C6/5 - (C6 long).}% - \oentry{DINmtext}{% - \leavevmode% - \IndexOption[indexmain]{DINmtext}\IndexFile[indexmain]{DINmtext.lco}% - parameters for letters on A4 paper, complying with DIN~676 but using an - alternate layout with more text on the first page; only suitable for - window envelopes in the sizes C6 and C6/5 (C6 long).}% - \oentry{KakuLL}{% - \leavevmode% - \IndexOption[indexmain]{KakuLL}\IndexFile[indexmain]{KakuLL.lco}% - parameters for Japanese letters on A4 paper; suitable for Japanese - window envelopes of type Kaku A4, in which the window is approximately - 90\Unit{mm} wide by 45\Unit{mm} high, and positioned 25\Unit{mm} from the - left and 24\Unit{mm} from the top edge (see \autoref{cha:japanlco}).}% - \oentry{KOMAold}{% - \leavevmode% - \IndexOption[indexmain]{KOMAold}\IndexFile[indexmain]{KOMAold.lco}% - parameters for letters on A4 paper using a layout close to that of the - obsolete \Class{scrlettr} letter class; suitable for window envelopes in - the sizes C4, C5, C6, and C6/5 (C6 long); some additional commands to - improve compatibility with obsolete \Class{scrlettr} commands are defined; - \Class{scrlttr2} may behave slightly differently with this \File{lco} file - than with the other \File{lco} files.}% - \oentry{NF}{% - \leavevmode% - \IndexOption[indexmain]{NF}\IndexFile[indexmain]{NF.lco}% - parameters for French letters, complying with NF~Z~11-001; suitable for - window envelopes of type DL (110\Unit{mm} by 220\Unit{mm}) with a window - 45\Unit{mm} wide by 100\Unit{mm} high placed about 20\Unit{mm} from the - lower right edge; this file was originally developed by Jean-Marie - Pacquet, who also provides LyX integration in addition to extensions at - \cite{www:NF.lco}.}% - \oentry{NipponEH}{% - \leavevmode% - \IndexOption[indexmain]{NipponEH}\IndexFile[indexmain]{NipponEH.lco}% - parameters for Japanese letters on A4 paper; suitable for Japanese - window envelopes of types Chou or You 3 or 4, in which the window is - approximately 90\Unit{mm} wide by 55\Unit{mm} high, and positioned - 22\Unit{mm} from the left and 12\Unit{mm} from the top edge (see - \autoref{cha:japanlco}).}% - \oentry{NipponEL}{% - \leavevmode% - \IndexOption[indexmain]{NipponEL}\IndexFile[indexmain]{NipponEL.lco}% - parameters for Japanese letters on A4 paper; suitable for Japanese - window envelopes of types Chou or You 3 or 4, in which the window is - approximately 90\Unit{mm} wide by 45\Unit{mm} high, and positioned - 22\Unit{mm} from the left and 12\Unit{mm} from the top edge (see - \autoref{cha:japanlco}).}% - \oentry{NipponLH}{% - \leavevmode% - \IndexOption[indexmain]{NipponLH}\IndexFile[indexmain]{NipponLH.lco}% - parameters for Japanese letters on A4 paper; suitable for Japanese - window envelopes of types Chou or You 3 or 4, in which the window is - approximately 90\Unit{mm} wide by 55\Unit{mm} high, and positioned - 25\Unit{mm} from the left and 12\Unit{mm} from the top edge (see - \autoref{cha:japanlco}).}% - \oentry{NipponLL}{% - \leavevmode% - \IndexOption[indexmain]{NipponLL}\IndexFile[indexmain]{NipponLL.lco}% - parameters for Japanese letters on A4 paper; suitable for Japanese - window envelopes of types Chou or You 3 or 4, in which the window is - approximately 90\Unit{mm} wide by 45\Unit{mm} high, and positioned - 25\Unit{mm} from the left and 12\Unit{mm} from the top edge (see - \autoref{cha:japanlco}).}% - \oentry{NipponRL}{% - \leavevmode% - \IndexOption[indexmain]{NipponRL}\IndexFile[indexmain]{NipponRL.lco}% - parameters for Japanese letters on A4 paper; suitable for Japanese - window envelopes of types Chou or You 3 or 4, in which the window is - approximately 90\Unit{mm} wide by 45\Unit{mm} high, and positioned - 25\Unit{mm} from the left and 24\Unit{mm} from the top edge (see - \autoref{cha:japanlco}).}% - \oentry{SN}{% - \leavevmode% - \IndexOption[indexmain]{SN}\IndexFile[indexmain]{SN.lco}% - parameters for Swiss letters with the address field on the right side, - according to SN~010\,130; suitable for Swiss window envelopes in the sizes - C4, C5, C6, and C6/5 (C6 long).}% - \oentry{SNleft}{% - \leavevmode% - \IndexOption[indexmain]{SNleft}\IndexFile[indexmain]{SNleft.lco}% - parameters for Swiss letters with the address field on the left side; - suitable for Swiss window envelopes with the window on the left side in - the sizes C4, C5, C6, and C6/5 (C6 long).}% - \oentry{UScommercial9}{% - \leavevmode% - \IndexOption[indexmain]{UScommercial9}% - \IndexFile[indexmain]{UScommercial9.lco}% - parameters for US letters on American letter paper; suitable for - \emph{commercial~No.\,9} US window envelopes with a window 4\,1/2\Unit{in} - wide by 1\,1/8\Unit{in} high, positioned 7/8\Unit{in} from the left and - 1/2\Unit{in} from the bottom, without the return address inside the - window; when folded first at the middle mark then at the top fold mark, - legal paper can also be used but results in a paper-size warning}% - \oentry{UScommercial9DW}{% - \leavevmode% - \IndexOption[indexmain]{UScommercial9DW}% - \IndexFile[indexmain]{UScommercial9DW.lco}% - parameters for US letters on American letter paper; suitable for - \emph{commercial~No.\,9} US window envelopes with an recipient-address - window 3\,5/8\Unit{in} wide by 1\,1/8\Unit{in} high, positioned - 3/4\Unit{in} from the left and 1/2\Unit{in} from the bottom, and with a - return-address window 3\,1/2\Unit{in} wide by 7/8\Unit{in} high, - positioned 5/16\Unit{in} from the left and 2\,1/2\Unit{in} from the - bottom; when folded first at the middle mark and then at the top fold - mark, legal paper can also be used but results in a paper-size warning}% -\end{desclist} -% -\EndIndexGroup -% -\EndIndexGroup - - -\section{Address Files and Form Letters} -\seclabel{addressFile}% -\BeginIndexGroup -\BeginIndex{}{address>file}% -\BeginIndex{}{form letters}% -\index{serial letters|see form letters}% -\index{circular letters|see form letters}% - -One of the most annoying things about creating form letters is typing up -the different addresses. \KOMAScript{} provides basic support for this task% -\iffalse% Umbruchkorrekturtext -, as did its predecessor \Class{scrlettr}% -\fi% -.% -\iffalse% Umbruchkorrekturtext -\ Currently there are plans for greatly enhanced support.% -\fi - -\begin{Declaration} - \Macro{adrentry}\Parameter{last~name}\Parameter{first~name}% - \Parameter{address}\Parameter{phone}\Parameter{F1}\Parameter{F2}% - \Parameter{comment}\Parameter{key} -\end{Declaration}% -\Class{scrlttr2} and \Package{scrletter} can evaluate address files. -This can be very useful for form letters. An address file must have the -extension \File{.adr} and consists of a number \Macro{adrentry} entries. -An individual entry consists of eight parameters and may look, for example, -like this: -\begin{lstcode} - \adrentry{McEnvy} - {Flann} - {1 High Street\\ Glasgow} - {0141 123 4567} - {builder} - {} - {buys everything} - {FLANN} -\end{lstcode} -You can use the fifth and sixth elements, \PValue{F1} and \PValue{F2}, for -anything you want. Gender, academic grade, birth date, or the date the person -joined a society are all possibilities. The last parameter, \PName{key}, -should consist of more than one letter and be upper-case only so as not to -interfere with existing \TeX{} or \LaTeX{} commands. - -\begin{Example} - Mr McEnvy is one of your most important business partners. Since you - maintain a frequent correspondence with him, it is too tedious to - enter all his data again and again. \KOMAScript{} will do this work for you. - For example, if you have saved your customer contacts in the - \File{partners.adr} address file and you would like to write a letter to - Mr~McEnvy, you can save a great deal of effort by typing: - \begin{lstcode} - \input{partners.adr} - \begin{letter}{\FLANN} - Your correspondence of today \dots - \end{letter} - \end{lstcode} - Please make sure that your {\TeX} system can access your address file. - Otherwise the \Macro{input} command results in an error message. You can - either put your address file in the same directory as your letter or - configure your \TeX{} system to look for a dedicated address directory. -\end{Example} -% -\EndIndexGroup - - -\begin{Declaration} - \Macro{addrentry}\Parameter{last-name}\Parameter{first-name}% - \Parameter{address}\Parameter{phone}\Parameter{F1}\Parameter{F2}% - \Parameter{F3}\Parameter{F4}\Parameter{key} -\end{Declaration}% -Before you object that a total of two free parameters is too few, -\KOMAScript{} alternatively offers the \Macro{addrentry} command\,---\,note -the additional ``d''\,---\,which adds two more freely definable parameters but -omits the comment parameter. Otherwise, you can use this command in exactly -the same way as \DescRef{\LabelBase.cmd.adrentry}. - -Both \DescRef{\LabelBase.cmd.adrentry} and \Macro{addrentry} commands can be -freely mixed in the \File{adr} files. I should note, however, that other -packages, such as \Package{adrconv}\IndexPackage{adrconv} by Axel Kielhorn, -may not be designed to use \Macro{addrentry}. If necessary, you have to create -the appropriate extensions yourself.% -% -\EndIndexGroup - -In addition to simplifying access to addresses, you can also use the -\File{adr} files to create circulars or form letters. Thus you can create such -mass mailings without a complicated connection to a database system. -% -\begin{Example} - You want to sent a form letter to all members of your fishing club to invite - them to the next general meeting. -\begin{lstcode} - \documentclass{scrlttr2} - \begin{document} - \renewcommand*{\adrentry}[8]{ - \begin{letter}{#2 #1\\#3} - \opening{Dear members,} - Our next general meeting will be on - Monday, 12 August 2002. - - The following topics are \dots - \closing{Regards,} - \end{letter} - } - \input{members.adr} - \end{document} -\end{lstcode} - If the address file also contains \DescRef{\LabelBase.cmd.addrentry} - commands, you must add a corresponding definition before loading the address - file: -\begin{lstcode} - \renewcommand*{\addrentry}[9]{% - \adrentry{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#9}% - } -\end{lstcode} - In this example, the extra freely-definable parameter is not used, and - therefore \DescRef{\LabelBase.cmd.addrentry} is defined using - \DescRef{\LabelBase.cmd.adrentry}. -\end{Example} - -Of course, the letter's contents can also be adapted to the characteristics of -the address data. You can use the free parameters of the -\DescRef{\LabelBase.cmd.adrentry} and \DescRef{\LabelBase.cmd.addrentry} -commands for this. -\begin{Example} - Suppose you use the fifth parameter of the \DescRef{\LabelBase.cmd.adrentry} - command to indicate the gender of a club member (\PValue{m/f}), and the - sixth parameter to indicate the amount of membership dues that is unpaid. - If you would like to write a reminder to each such member and address them - personally, the next example will help you: -\begin{lstcode} - \renewcommand*{\adrentry}[8]{ - \ifdim #6pt>0pt\relax - % #6 is an amount (floating-point number) greater than 0. - % Thus, this selects all members owing dues. - \begin{letter}{#2 #1\\#3} - \if #5m \opening{Dear Mr #2,} \fi - \if #5f \opening{Dear Ms #2,} \fi - - Unfortunately, we have noticed that you are in arrears - with the payment of your membership fees. - - Please remit the outstanding balance of \pounds #6 to the club - account. - \closing{Regards,} - \end{letter} - \fi - } -\end{lstcode} -\end{Example} -It is therefore possible to tailor the text of the letter to the specific -characteristics of the recipient and create the impression of a personal -letter. The extent of the customisation is only limited by the maximum number -of two free \DescRef{\LabelBase.cmd.adrentry} parameters and four free -\DescRef{\LabelBase.cmd.addrentry} parameters. - - -\begin{Declaration} - \Macro{adrchar}\Parameter{initial letter}% - \Macro{addrchar}\Parameter{initial letter} -\end{Declaration} -\Index[indexmain]{address>list}\Index[indexmain]{telephone directory}% -It is possible to create address lists and telephone directories using -\File{adr} files. You also need the \Package{adrconv}\IndexPackage{adrconv} -package by Axel Kielhorn (see \cite{package:adrconv}). This package contains -interactive \LaTeX{} documents which make it easy to create such lists. - -The address files have to be sorted already in order to obtain sorted lists. -It is advisable to insert an \Macro{adrchar} or \Macro{addrchar} command -containing the initial letter of the \PName{last name} before the point in the -list where this letter changes. \Class{scrlettr2} and \Package{scrletter} will -ignore these commands. -% -\begin{Example} - Suppose you have the following, rather tiny address file from which you - want to create an address book: -\begin{lstlisting} - \adrchar{A} - \adrentry{Angel}{Gabriel} - {Cloud 3\\12345 Heaven's Realm} - {000\,01\,02\,03}{}{}{archangel}{GABRIEL} - \adrentry{Angel}{Michael} - {Cloud 3a\\12345 Heaven's Realm} - {000\,01\,02\,04}{}{}{archangel}{MICHAEL} - \adrchar{K} - \adrentry{Kohm}{Markus} - {Freiherr-von-Drais-Stra\ss e 66\\68535 Edingen-Neckarhausen} - {+49~62\,03~1\,??\,??}{}{}{no angel at all} - {KOMA} -\end{lstlisting} - You can now process these entries using the \File{adrdir.tex} document from - \cite{package:adrconv}. One potential problem with this is that - \File{adrdir.tex} up to and including Version~1.3 uses both the obsolete - \Package{scrpage} package and obsolete font commands which \KOMAScript{} has - not supported for some time. If you receive an error message and cannot - install a newer version, you can find a listing of \File{adrdir.tex} which - indicates the changes necessary to avoid these errors at - \cite{https://komascript.de/node/2154} (in German). - - The result looks something like this: - \begin{center} - \setlength{\unitlength}{1mm} - \begin{picture}(80,57) - \put(0,57){\line(1,0){80}} - \put(0,3){\line(0,1){54}} - \put(80,3){\line(0,1){54}} - \thicklines - \put(10,42){\line(1,0){60}} - \put(70,45){\makebox(0,0)[r]{\textsf{\textbf{A}}}} - \put(10,23){\makebox(0,20)[l]{\parbox{5cm}{\raggedright - \textsc{Angel}, Gabriel\\\quad\small Cloud 3\\ - \quad 12345 Heaven's Realm\\ - \quad (archangel)}}} - \put(70,23){\makebox(0,20)[r]{\parbox{2cm}{\raggedright~\\ - \small~\\\textsc{gabriel}\\000\,01\,02\,03}}} - \put(10,4){\makebox(0,20)[l]{\parbox{5cm}{\raggedright - \textsc{Angel}, Michael\\\quad\small Cloud 3a\\ - \quad 12345 Heaven's Realm\\ - \quad (archangel)}}} - \put(70,4){\makebox(0,20)[r]{\parbox{2cm}{\raggedright~\\ - \small~\\\textsc{michael}\\000\,01\,02\,04}}} - \qbezier(0,3)(10,6)(40,3)\qbezier(40,3)(60,0)(80,3) - \end{picture} - \end{center} - The letter in the header is generated by answering ``no'' to the - question ``Names in the header?'' See explanation in \File{adrdir.tex}. -\end{Example} -You can find more about the \Package{adrconv}\IndexPackage{adrconv} package in -its documentation. There you should also find information about whether the -current version of \Package{adrconv} supports the -\DescRef{\LabelBase.cmd.addrentry} and \Macro{addrchar} commands. Previous -versions only recognised the \DescRef{\LabelBase.cmd.adrentry} and -\Macro{adrchar} commands.% -% -\EndIndexGroup -% -\EndIndexGroup -% -\EndIndexGroup - -\endinput - -%%% Local Variables: -%%% mode: latex -%%% mode: flyspell -%%% coding: utf-8 -%%% ispell-local-dictionary: "en_GB" -%%% TeX-master: "../guide" -%%% End: diff --git a/macros/latex/contrib/koma-script/source-doc/english/scrlttr2examples.dtx b/macros/latex/contrib/koma-script/source-doc/english/scrlttr2examples.dtx deleted file mode 100644 index 18286886b3..0000000000 --- a/macros/latex/contrib/koma-script/source-doc/english/scrlttr2examples.dtx +++ /dev/null @@ -1,347 +0,0 @@ -% \CheckSum{0} -% \iffalse -% ====================================================================== -% scrlttr2examples.dtx -% Copyright (c) Markus Kohm, 2008-2018 -% -% 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. -% ---------------------------------------------------------------------- -% scrlttr2examples.dtx -% Copyright (c) Markus Kohm, 2008-2018 -% -% 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. -% ====================================================================== -% -% Generation of letter example files for scrlttr2 chapter. -% -% --------------------------------------------------------------------------- -% -% Erzeugung der Brief-Beispiele für das scrlttr2-Kapitel. -% -% ============================================================================ -%<*ins> -\def\batchfile{scrlttr2examples.dtx} -\input docstrip.tex - -\keepsilent -\askforoverwritefalse - -\generate{% - \nopreamble\nopostamble - \file{musterlogo.eps}{\from{scrlttr2examples.dtx}{logo}}% -} - -\generate{% - \nopreamble\nopostamble - \file{ich.lco}{\from{scrlttr2examples.dtx}{lco,23,\languagename}}% -} - -\generate{% - \nopreamble\nopostamble - \file{letter-0.tex}{\from{scrlttr2examples.dtx}{example,0,\languagename}}% - \file{letter-1.tex}{\from{scrlttr2examples.dtx}{example,1,\languagename}}% - \file{letter-2.tex}{\from{scrlttr2examples.dtx}{example,2,\languagename}}% - \file{letter-3.tex}{\from{scrlttr2examples.dtx}{example,3,\languagename}}% - \file{letter-4.tex}{\from{scrlttr2examples.dtx}{example,4,\languagename}}% - \file{letter-5.tex}{\from{scrlttr2examples.dtx}{example,5,\languagename}}% - \file{letter-6.tex}{\from{scrlttr2examples.dtx}{example,6,\languagename}}% - \file{letter-7.tex}{\from{scrlttr2examples.dtx}{example,7,\languagename}}% - \file{letter-8.tex}{\from{scrlttr2examples.dtx}{example,8,\languagename}}% - \file{letter-9.tex}{\from{scrlttr2examples.dtx}{example,9,\languagename}}% - \file{letter-10.tex}{\from{scrlttr2examples.dtx}{example,10,\languagename}}% - \file{letter-11.tex}{\from{scrlttr2examples.dtx}{example,11,\languagename}}% - \file{letter-12.tex}{\from{scrlttr2examples.dtx}{example,12,\languagename}}% - \file{letter-13.tex}{\from{scrlttr2examples.dtx}{example,13,\languagename}}% - \file{letter-14.tex}{\from{scrlttr2examples.dtx}{example,14,\languagename}}% - \file{letter-15.tex}{\from{scrlttr2examples.dtx}{example,15,\languagename}}% - \file{letter-16.tex}{\from{scrlttr2examples.dtx}{example,16,\languagename}}% - \file{letter-17.tex}{\from{scrlttr2examples.dtx}{example,17,\languagename}}% - \file{letter-18.tex}{\from{scrlttr2examples.dtx}{example,18,\languagename}}% - \file{letter-19.tex}{\from{scrlttr2examples.dtx}{example,19,\languagename}}% - \file{letter-20.tex}{\from{scrlttr2examples.dtx}{example,20,\languagename}}% - \file{letter-21.tex}{\from{scrlttr2examples.dtx}{example,21,\languagename}}% - \file{letter-22.tex}{\from{scrlttr2examples.dtx}{example,22,\languagename}}% - \file{letter-23.tex}{\from{scrlttr2examples.dtx}{example,23,\languagename}}% - \file{letter-label.tex}{\from{scrlttr2examples.dtx}{% - example,label,\languagename}}% - \file{letter-nipponA.tex}{\from{scrlttr2examples.dtx}{% - example,22,nipponA,\languagename}}% - \file{letter-nipponB.tex}{\from{scrlttr2examples.dtx}{% - example,22,nipponB,\languagename}}% -} - -\csname endinput\endcsname -% -% -% \begin{macrocode} -%<*lco&23> -\ProvidesFile{ich.lco}[2008/06/11 lco -% (Joe Public)] -% (Peter Musterfrau)] -\KOMAoptions{foldmarks=true,foldmarks=blmtP, - fromphone,fromemail,fromlogo,subject=titled} -%<*english> -\setkomavar{fromname}{Joe Public} -\setkomavar{signature}{Joe Public\\ - (former chairman)} -% -%<*ngerman> -\setkomavar{fromname}{Peter Musterfrau} -\setkomavar{signature}{Peter Musterfrau\\ - (ehemaliger Vorsitzender)} -% -\renewcommand*{\raggedsignature}{\raggedright} -%<*english> -\setkomavar{fromaddress}{2 Valley\\ - SAMPLEBY\\ - ZY32 1XW} -% -%<*ngerman> -\setkomavar{fromaddress}{Hinter dem Tal 2\\ - 54321 Musterheim} -% -\setkomavar{fromphone}{0\,12\,34~56\,78} -%\setkomavar{fromemail}{joe@public.invalid} -%\setkomavar{fromemail}{Peter@Musterfrau.invalid} -\setkomavar{fromlogo}{% - \includegraphics{musterlogo}} -\setkomavar{location}{\raggedright -%<*english> - Club member no.~4711\\ - since 11.09.2001\\ - chairman 2003--2005} -\setkomavar{place}{Sampleby} -\setkomavar{frombank}{Bank of Friendly Greetings} -% -%<*ngerman> - Mitglied Nr.~4711\\ - seit dem 11.09.2001\\ - Vorsitzender in den Jahren 2003--2005} -\setkomavar{place}{Musterheim} -\setkomavar{frombank}{Bank freundlichen Gru\ss es} -% -% -%<*example> -%<*label> -\AtBeginDocument{% - \usepackage{xcolor,eso-pic}% - \BeforeClosingMainAux{% - \AddToShipoutPicture*{% - \thinlines\color{gray!50}% - \AtPageLowerLeft{% - \put(0,\LenToUnit{8mm}){% - \line(0,1){\LenToUnit{180mm}}% - }% - \multiput(\LenToUnit{70mm},\LenToUnit{8mm})(\LenToUnit{70mm},0){3}{% - \line(0,1){\LenToUnit{216mm}}% - }% - \multiput(0,\LenToUnit{8mm})(0,\LenToUnit{36mm}){6}{% - \line(1,0){\LenToUnit{210mm}}% - }% - \put(\LenToUnit{70mm},\LenToUnit{224mm}){% - \line(1,0){\LenToUnit{140mm}}% - }% - }\color{black}% - }% - }% -} -% -%<0|1|2|3|4|5>\documentclass[version=last]{scrlttr2} -%<6>\documentclass[version=last,fontsize=14pt]{scrlttr2} -%\documentclass[foldmarks=true,foldmarks=blmtP, -%\documentclass[foldmarks=true,locfield=wide, -%<8> fromalign=false, -%<9> fromalign=center, -%<10> fromalign=false,fromrule=aftername, -%<11> fromalign=center,fromrule=aftername, -%<12> fromalign=false,fromrule=afteraddress, -%<13|17> fromalign=center,fromrule=afteraddress, -%<14|16> fromrule=afteraddress, -%<15|18> fromalign=right,fromrule=afteraddress, -%<12|13|14|15> fromphone,fromemail, -%<16|17|18|19|20|21|22> fromphone,fromemail,fromlogo, -% fromphone=false,fromemail=false, -%<21|22> subject=titled, -% version=last]{scrlttr2} -%<23>\documentclass[version=last,ich]{scrlttr2} -%\LoadLetterOption{NipponLL} -%\LoadLetterOption{NipponEL} -% -%<0|1|2|3|4|5>\documentclass[version=last]{scrlttr2} -%<6>\documentclass[version=last,fontsize=14pt]{scrlttr2} -%\documentclass[foldmarks=true,foldmarks=blmtP, -%\documentclass[foldmarks=true,locfield=wide, -%<8> fromalign=false, -%<9> fromalign=center, -%<10> fromalign=false,fromrule=aftername, -%<11> fromalign=center,fromrule=aftername, -%<12> fromalign=false,fromrule=afteraddress, -%<13|17> fromalign=center,fromrule=afteraddress, -%<14|16> fromrule=afteraddress, -%<15|18> fromalign=right,fromrule=afteraddress, -%<12|13|14|15> fromphone,fromemail, -%<16|17|18|19|20|21|22> fromphone,fromemail,fromlogo, -% fromphone=false,fromemail=false, -%<21|22> subject=titled, -% version=last]{scrlttr2} -%<23>\documentclass[version=last,ich]{scrlttr2} -%\LoadLetterOption{NipponLL} -%\LoadLetterOption{NipponEL} -%
-% \end{macrocode} -% \end{command} -% \begin{macro}{\fnum@figure} -% \begin{command}{\figureformat} -% \changes{v2.3c}{1995/08/06}{added} -% The print format of the number (by \cs{DeclareNewTOC}). -% \end{command} -% \end{macro} -% \end{environment} -% -% -% \subsection{Defining the \env{table} environment} -% -% Note: This is almost the same as defining the \env{figure} environment. So -% read the previous section first. -% -% \begin{environment}{table*,table-,table} -% \changes{v2.2c}{1995/05/25}{initial CJK support} -% \changes{v2.8h}{2001/07/19}{\cs{caption} is \cs{captionbelow}} -% \changes{v3.25}{2017/10/10}{re-implemented using \pkg*{tocbasic}} -% \changes{v3.36}{2022/02/22}{define additional non-float} -% \begin{counter}{table} -% \changes{v3.25}{2017/10/10}{implicit by \cs{DeclareNewTOC}} -% \end{counter} -% We do the main job using \cs{DeclareNewTOC}: -% \begin{macrocode} -\DeclareNewTOC[% - type=table, - float, - nonfloat, -% counterwithin=chapter, -% \end{macrocode} -% \begin{macro}{\fps@table} -% Default placement (by \cs{DeclareNewTOC}) \textbf{t}op, \textbf{b}ottom, -% \textbf{p}age. -% \begin{macrocode} - floatpos=tbp, -% \end{macrocode} -% \end{macro} -% \begin{macro}{\ftype@table} -% Numerical float type 2 (by \cs{DeclareNewTOC}). -% \begin{macrocode} - floattype=2, -% \end{macrocode} -% \end{macro} -% \changes{v3.20}{2016/04/07}{internal redefinition of \cs{caption}} -% \begin{macrocode} - tocentryindent=1.5em, - tocentrynumwidth=2.3em, - atbegin=\def\caption{% - \if@tablecaptionabove\expandafter\captionabove - \else\expandafter\captionbelow\fi - } -% \end{macrocode} -% \begin{macro}{\ext@table} -% Extension to be used (by \cs{DeclareNewTOC}) -% \begin{macrocode} -]{lot} -% \end{macrocode} -% \end{macro} -% \begin{command}{\thetable} -% \changes{v2.97e}{2007/11/23}{using chapter number in main-matter only} -% \changes{v3.27}{2019/06/26}{\cs{relax} replaced by percent} -% \changes{v3.35}{2021/10/12}{use chapter number only of greater than zero} -% \changes{v3.35}{2021/10/12}{redefine \cs{thefigure} only if compatibility is -% less or equal 2.97d resp. less than 3.35} -% \begin{macrocode} -%<*book|report> -\expandafter\ifnum\scr@v@is@le{2.97d}% - \renewcommand*\thetable{\thechapter.\@arabic\c@table} -\fi -% -%<*article> -\expandafter\ifnum\scr@v@is@lt{3.35}% - \renewcommand*\thetable{\@arabic\c@table} -\fi -%
-% -% \end{macrocode} -% \end{command} -% \begin{macro}{\fnum@table} -% \begin{command}{\tableformat} -% \changes{v2.3c}{1995/08/06}{added} -% The print format of the number (by \cs{DeclareNewTOC}). -% \end{command} -% \end{macro} -% \end{environment} -% -% \begin{macrocode} -% -% \end{macrocode} -% -% \Finale -% \PrintChanges -% -\endinput -% Local Variables: -% mode: doctex -% ispell-local-dictionary: "en_US" -% eval: (flyspell-mode 1) -% TeX-master: t -% TeX-engine: luatex-dev -% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) -% End: diff --git a/macros/latex/contrib/koma-script/source/scrkernel-fonts.dtx b/macros/latex/contrib/koma-script/source/scrkernel-fonts.dtx deleted file mode 100644 index 1fb7cf7601..0000000000 --- a/macros/latex/contrib/koma-script/source/scrkernel-fonts.dtx +++ /dev/null @@ -1,2028 +0,0 @@ -% \iffalse meta-comment -% ====================================================================== -% scrkernel-fonts.dtx -% Copyright (c) Markus Kohm, 2002-2022 -% -% 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. -% ====================================================================== -%%% From File: $Id: scrkernel-fonts.dtx 3723 2022-02-23 14:53:44Z kohm $ -%%%% (run: identify) -%