diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/scrdoc.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/koma-script/scrdoc.cls | 71 |
1 files changed, 68 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/scrdoc.cls b/Master/texmf-dist/tex/latex/koma-script/scrdoc.cls index ccb4e42cc74..99096df899e 100644 --- a/Master/texmf-dist/tex/latex/koma-script/scrdoc.cls +++ b/Master/texmf-dist/tex/latex/koma-script/scrdoc.cls @@ -1,6 +1,6 @@ % ====================================================================== % scrdoc.dtx -% Copyright (c) Markus Kohm, 2002-2017 +% Copyright (c) Markus Kohm, 2002-2022 % % This file is part of the LaTeX2e KOMA-Script bundle. % @@ -18,7 +18,7 @@ % This work consists of all files listed in manifest.txt. % ---------------------------------------------------------------------- % scrdoc.dtx -% Copyright (c) Markus Kohm, 2002-2017 +% 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. @@ -39,10 +39,66 @@ % Do not use this class for anything because it may change % incompatible from distribution to distribution % +\newcommand*{\UseOldscrdoc}{% + \def\reserved@a{scrsource}\edef\reserved@b{\jobname}% + \@onelevel@sanitize\reserved@a + \@onelevel@sanitize\reserved@b + \ifx\reserved@a\reserved@b + \AtBeginDocument{% + \ClassWarning{scrdoc}{% + Using emergency fallback definitions to make\MessageBreak + several new commands and environments of\MessageBreak + `koma-script-source-doc' available with\MessageBreak + deprecated `scrdoc'}% + \newcommand*{\cls}{\@ifstar\Class\Class}% + \newcommand*{\pkg}{\@ifstar\Package\Package}% + \newcommand*{\file}{\File}% + \newcommand*{\opt}{\Option}% + \newcommand*{\optvalue}{\texttt}% + \newcommand*{\fnt}{\texttt}% + \newenvironment{length}{\Length}{\endLength}% + \newenvironment{counter}{\Counter}{\endCounter}% + \newenvironment{fontelement}{\KOMAfont}{\endKOMAfont}% + \newenvironment{variable}{\KOMAvar}{\endKOMAvar}% + \newenvironment{command}{\macro}{\endmacro}% + \newcommand*{\MaybeStop}{\StopEventually}% + \newcommand*{\href}[2]{##2}% + }% + \fi +} +\ifdefined\IfFormatAtLeastTF + \IfFormatAtLeastTF{2022/06/01}{% + \IfFileExists{doc-2021-06-01.sty}{% + \renewcommand*{\UseOldscrdoc}{% + \ProvidesClass{scrdoc}[2022/01/16 v0.1zz + emulating deprecated class scrdoc using koma-script-source-doc] + \LoadClassWithOptions{koma-script-source-doc} + \RequirePackage{hologo} + \DeclareRobustCommand*{\eTeX}{\hologo{eTeX}}% + \NewCommandCopy\Class\cls + \NewCommandCopy\Package\pkg + \NewCommandCopy\Option\opt + \NewCommandCopy\File\file + \NewCommandCopy\Macro\cs + \NewCommandCopy\endLength\endlength + \NewCommandCopy\Length\length + \NewCommandCopy\endCounter\endcounter + \NewCommandCopy\Counter\counter + \NewCommandCopy\endKOMAfont\endfontelement + \NewCommandCopy\KOMAfont\fontelement + \NewCommandCopy\endKOMAvar\endvariable + \NewCommandCopy\KOMAvar\variable + \setcounter{IndexColumns}{2}% + \endinput + }% + }{}% + }{}% +\fi +\UseOldscrdoc \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{scrdoc}[% - 2016/04/12 v0.1e KOMA-Script source documentation class] + 2022/02/09 v0.1i KOMA-Script source documentation class] % Load standard LaTeX documentation class, passing all options to it % but use scrartcl instead of article. @@ -90,7 +146,16 @@ }% \newcommand*{\marginline}{\marginpar}% } +% scrdoc is incompatible with ltxdoc v3 and doc v3. Several changes will +% be needed to improve this. However, currently a kind of emergency +% workaround can be used. +\IfFileExists{doc-2021-06-01.sty}{% + \RequirePackage{scrlfile}% + \ReplaceInput{doc.sty}{doc-2021-06-01.sty}% + \PassOptionsToClass{nocfg}{ltxdoc}% +}{} \LoadClassWithOptions{ltxdoc} +\@ifundefined{cs}{\DeclareRobustCommand\cs[1]{\texttt{\bslash #1}}}{} % Use two columns at index \setcounter{IndexColumns}{2} |