summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/koma-script/scrhack.sty
blob: 1486ddd2d36ff8e3d297839930f8d7edb61e5a4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
%%
%% This is file `scrhack.sty',
%% generated with the docstrip utility, extended by scrdocstrip.
%%
%% The original source files were:
%%
%% scrkernel-version.dtx  (with options: `package,scrhack')
%% scrhack.dtx  (with options: `package,identify')
%% scrkernel-basics.dtx  (with options: `load')
%% scrhack.dtx  (with options: `package,option')
%% scrhack.dtx  (with options: `package,body')
%% scrlogo.dtx  (with options: `logo')
%% 
%% Copyright (c) 2008-2019 Markus Kohm [komascript at gmx info]
%% 
%% 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.txt'.  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
%% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
%% 
%%% From File: $Id: scrkernel-version.dtx 3481 2020-04-19 09:52:23Z kohm $
\begingroup
  \catcode`\@11\relax
  \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
    }
  \fi
  \@CheckKOMAScriptVersion{2020/04/19 v3.30 KOMA-Script}%
\endgroup
\providecommand*{\scr@pkgextension}{\@pkgextension}
\AtBeginDocument{%
  \let\scr@pkgextension\@pkgextension
}
%%% From File: $Id: scrhack.dtx 3474 2020-04-08 09:34:56Z kohm $
%%% using: package,identify
\ProvidesPackage{scrhack}[%
  2020/04/19 v3.30 KOMA-Script
  package (hacking other packages)%
]
%%% From File: $Id: scrkernel-basics.dtx 3465 2020-03-07 10:23:56Z kohm $
%%%            (run: load)
\RequirePackage{scrkbase}[\KOMAScriptVersion]
%%% From File: $Id: scrhack.dtx 3474 2020-04-08 09:34:56Z kohm $
%%% using: package,option
\KOMA@ifkey{hyperref}{@scrhack@hyperref}%
\KOMAExecuteOptions{hyperref=true}%
\KOMA@ifkey{float}{@scrhack@float}%
\KOMAExecuteOptions{float=true}%
\KOMA@ifkey{floatrow}{@scrhack@floatrow}
\KOMAExecuteOptions{floatrow=true}
\KOMA@ifkey{listings}{@scrhack@listings}
\KOMAExecuteOptions{listings=true}
\RequirePackage{xpatch}%
\KOMA@ifkey{nomencl}{@scrhack@nomencl}
\KOMAExecuteOptions{nomencl=true}
\KOMA@ifkey{setspace}{@scrhack@setspace}
\KOMAExecuteOptions{setspace=true}
\RequirePackage{xpatch}%
\KOMA@ifkey{lscape}{@scrhack@lscape}%
\KOMAExecuteOptions{lscape=true}%
\KOMA@ifkey{standardsections}{@scrhack@standardsections}
\KOMAExecuteOptions{standardsections=false}
\KOMAProcessOptions\relax
%%% From File: $Id: scrhack.dtx 3474 2020-04-08 09:34:56Z kohm $
%%% using: package,body
\newcommand{\scr@ifexpected}[2]{%
  \begingroup
    \let\@tempa#1
    #2
    \ifx\@tempa#1
      \aftergroup\@firstoftwo
    \else
      \aftergroup\@secondoftwo
    \fi
  \endgroup
}
\newcommand*{\scr@hack@load}[2]{%
  \expandafter\ifx\csname ver@#2.#1\endcsname\relax
    \expandafter\@secondoftwo
  \else
    \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}%
  }%
}
\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
}
\AfterPackage*{float}{%
  \KOMA@key[.scrhack.sty]{float}{%
    \PackageWarning{scrhack}{option `float' ignored}%
    \FamilyKeyStateProcessed
  }%
  \if@scrhack@float\scr@hack@load\@pkgextension{float}\fi
}
\AfterPackage*{floatrow}{%
  \KOMA@key[.scrhack.sty]{floatrow}{%
    \PackageWarning{scrhack}{option `floatrow' ignored}%
    \FamilyKeyStateProcessed
  }%
  \if@scrhack@floatrow\scr@hack@load\@pkgextension{floatrow}\fi
}
\AfterPackage*{listings}{%
  \KOMA@key[.scrhack.sty]{listings}{%
    \PackageWarning{scrhack}{option `listings' ignored}%
    \FamilyKeyStateProcessed
  }%
  \if@scrhack@listings\scr@hack@load\@pkgextension{listings}\fi
}
\AfterPackage*{nomencl}{%
  \KOMA@key[.scrhack.sty]{nomencl}{%
    \PackageWarning{scrhack}{option `nomencl' ignored}%
    \FamilyKeyStateProcessed
  }%
  \if@scrhack@nomencl\scr@hack@load\@pkgextension{nomencl}\fi
}
\AfterPackage*{setspace}{%
  \KOMA@key[.scrhack.sty]{setspace}{%
    \PackageWarning{scrhack}{option `setspace' ignored}%
    \FamilyKeyStateProcessed
  }%
  \if@scrhack@setspace\scr@hack@load\@pkgextension{setspace}\fi
}
\AfterPackage*{lscape}{%
  \if@scrhack@lscape\scr@hack@load\@pkgextension{lscape}\else
    \KOMA@key[.scrhack.sty]{lscape}{%
      \PackageWarning{scrhack}{option `lscape' ignored}%
      \FamilyKeyStateProcessed
    }%
  \fi
}
\AtEndOfPackage{%
  \if@scrhack@standardsections
    \PackageInfo{scrhack}{loading standard classes sections hack}%
    \input{standardsections.hak}%
  \fi
}
%%% From File: $Id: scrlogo.dtx 2640 2017-05-08 09:36:55Z kohm $
\@ifundefined{KOMAScript}{%
  \DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
      M\kern.05em A\kern.1em-\kern.1em Script}}}{}
\endinput
%%
%% End of file `scrhack.sty'.