Debian Codegraph @

texmf-dist/tex/latex/oberdiek/ifdraft.sty

raw
1 %%
2 %% This is file `ifdraft.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% ifdraft.dtx (with options: `package')
8 %%
9 %% This is a generated file.
10 %%
11 %% Project: ifdraft
12 %% Version: 2016/05/16 v1.4
13 %%
14 %% Copyright (C)
15 %% 1999, 2005, 2006, 2008 Heiko Oberdiek
16 %% 2016-2019 Oberdiek Package Support Group
17 %%
18 %% This work may be distributed and/or modified under the
19 %% conditions of the LaTeX Project Public License, either
20 %% version 1.3c of this license or (at your option) any later
21 %% version. This version of this license is in
22 %% https://www.latex-project.org/lppl/lppl-1-3c.txt
23 %% and the latest version of this license is in
24 %% https://www.latex-project.org/lppl.txt
25 %% and version 1.3 or later is part of all distributions of
26 %% LaTeX version 2005/12/01 or later.
27 %%
28 %% This work has the LPPL maintenance status "maintained".
29 %%
30 %% The Current Maintainers of this work are
31 %% Heiko Oberdiek and the Oberdiek Package Support Group
32 %% https://github.com/ho-tex/oberdiek/issues
33 %%
34 %%
35 %% This work consists of the main source file ifdraft.dtx
36 %% and the derived files
37 %% ifdraft.sty, ifdraft.pdf, ifdraft.ins, ifdraft.drv.
38 %%
39 \NeedsTeXFormat{LaTeX2e}
40 \ProvidesPackage{ifdraft}%
41 [2016/05/16 v1.4 Detect class options draft and final (HO)]
42 \newif\if@draft
43 \newif\if@option@draft
44 \newif\if@option@final
45 \DeclareOption{draft}{%
46 \@drafttrue
47 \@option@drafttrue
48 }
49 \DeclareOption{final}{%
50 \@draftfalse
51 \@option@finaltrue
52 }
53 \ProcessOptions*\relax
54 \newcommand*{\ifdraft}{%
55 \if@draft
56 \expandafter\@firstoftwo
57 \else
58 \expandafter\@secondoftwo
59 \fi
60 }
61 \newcommand*{\ifoptiondraft}{%
62 \if@option@draft
63 \expandafter\@firstoftwo
64 \else
65 \expandafter\@secondoftwo
66 \fi
67 }
68 \newcommand*{\ifoptionfinal}{%
69 \if@option@final
70 \expandafter\@firstoftwo
71 \else
72 \expandafter\@secondoftwo
73 \fi
74 }
75 \endinput
76 %%
77 %% End of file `ifdraft.sty'.