summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/computational-complexity/ccqed.sty
blob: cb32ecc7368617aeba6893ccf2e1a1ab0d1ae656 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
%%
%% This is file `ccqed.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% cc.dtx  (with options: `ccqed,chartab')
%% 
%% Copyright 2000-2015
%% Michael N"usken, Joachim von zur Gathen, computational complexity
%% 
%% IMPORTANT NOTICE:
%% 
%% This is a generated file.  It is part of the
%%      computational complexity macro package
%% derived from cc.dtx by 'tex cc.ins'.
%% See cc.dtx for license information.
%% 
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\ProvidesPackage{ccqed}[2014/07/08 v2.25d
  right-justified end-of-proof mark,
  based on Paul Taylor's QED.sty of 24 June 1995]
\def\qed{\protect\@qed{$\qedsymbol$}}
\def\qedsymbol{\square}
\newif\ifAutoQED\AutoQEDfalse
\def\parag@pushright#1{{%
    \parfillskip\z@
    \widowpenalty\@M
    \displaywidowpenalty\@M
    \finalhyphendemerits\z@
    \hbox@pushright
    #1%
    \par}}%
\def\hbox@pushright{%
    \unskip
    \nobreak
    \hfil
    \penalty50
    \hskip.2em
    \null
    \hfill
}%
\def\vbox@pushright#1{\expandafter\message %  (2 Jan 1994)
  {QED.sty could be improved in this case
    (line \the\inputlineno): please ask}%
  \page@pushright{#1}}%
\newif\if@qed\@qedfalse
\def\save@set@qed{\let\saved@ifqed\if@qed\global\@qedtrue}%
\def\restore@qed{\global\let\if@qed\saved@ifqed}
\def\@qed#1{\check@pt@fm@thm
\if@qed
     \global\@qedfalse\pushright{#1}%
\else\ifhmode\ifinner\else\par\fi\fi%
\fi}
\def\@pushright#1{%
  \ifvmode
       \ifinner\vbox@pushright{#1}%
       \else   \page@pushright{#1}%
       \fi
  \else\ifmmode\maths@pushright{\hbox{#1}}%
       \else\ifinner\hbox@pushright{#1}%
            \else\parag@pushright{#1}%
  \fi  \fi  \fi
}
\def\maths@pushright#1{%
  \ifinner
     \hbox@pushright{#1}%
  \else
     \eqno#1%
     \def\]{$$\ignorespaces}%
  \fi
}%
\def\page@pushright#1{% 18 Jan 1994
  \skip@\lastskip
  \ifdim\skip@>\z@
    \unskip
  \else\skip@\z@\relax
  \fi
  \dimen@\baselineskip
  \advance\dimen@-\prevdepth
  \nobreak
  \nointerlineskip
  \hbox to\hsize{%
    \setbox\z@\null
    \ifdim\dimen@>\z@\ht\z@\dimen@\fi
    \box\z@
    \hfill
    #1}%
  \vskip\skip@
}%
\let\nonqed@thm\@thm
\let\nonqed@endthm\@endtheorem
\def\@thm{\save@set@qed\nonqed@thm}
\def\@endtheorem{\ifAutoQED\qed\fi\restore@qed\nonqed@endthm}
\newbox\qed@box
\def\WillHandleQED{\relax
  \ifx\HandleQED\nohandle@qed
    \def\pushright{\global\setbox\qed@box\hbox}%
    \let\QEDbox\qed@box
    \def\HandleQED{\unhbox\QEDbox}%
    \aftergroup\check@handle@qed
  \else
    \let\QEDbox\voidb@x
  \fi
  }
\def\nohandle@qed{%
\errhelp{One of them is missing: see QED.sty.}%
\errmessage{This environment uses \string\WillHandleQED\space and
\string\HandleQED\space incorrectly}}
\def\check@handle@qed{\relax
\ifvoid\qed@box\else\expandafter\nohandle@qed\fi}
\def\UnHandleQED{%
\let\HandleQED\nohandle@qed
\let\QEDbox\voidb@x
\def\pushright{\protect\@pushright}}%
\UnHandleQED
\ifx\theorem@style\undefined
   \def\check@pt@fm@thm{\relax
     \ifx\square\undefined
       \gdef\square{\bigcirc
          \errhelp={Anonymous ftp e-math.ams.com /ams/amsfonts}%
          \errmessage{\string\square\space is an AMS symbol}%
          \global\let\square\bigcirc}%
     \fi
      \ifx\theorem@style\undefined
          \global\let\check@pt@fm@thm\relax
      \else
        \errhelp={The macros \@thm and \@endtheorem
          need to be re-defined.}%
        \errmessage{QED.sty must be loaded AFTER theorem.sty but
          before using \string\newtheorem}%
      \fi
      \global\let\check@pt@fm@thm\relax
      }%
\else
   \def\check@pt@fm@thm{%
      \ifx\square\undefined
         \def\square{\bigcirc
         \errhelp={Anonymous ftp e-math.ams.com /ams/amsfonts}%
         \errmessage{\string\square\space is an AMS symbol}%
         \global\let\square\bigcirc}%
      \fi
      \global\let\check@pt@fm@thm\relax
      }%
\fi
\DeclareOption{auto-QED}{\AutoQEDtrue}%
\DeclareOption{explicit-QED}{\AutoQEDfalse}%
\DeclareOption{black-square}{\def\qedsymbol{\blacksquare}}%
\DeclareOption{open-square}{\def\qedsymbol{\square}}%
\ProcessOptions*
\newif\if@resettagsleft@
\let\standardqed\qed
\def\rescueqed{\qquad\qedsymbol\vphantom{\standardqed}}
\def\eqnoqed{\eqno\hbox{\standardqed}}%\vphantom{\standardqed}}
\let\ccorg@eqnnum\@eqnnum
\let\ccorg@nonumber\nonumber
\def\eqnarrayqed{%
  \global\@eqnswtrue
  \global\let\nonumber\relax
  \addtocounter{equation}\m@ne
  \gdef\@eqnnum{\llap{$\qedsymbol$\vphantom{\standardqed}}%
    \global\let\nonumber\ccorg@nonumber
    \global\let\@eqnnum\ccorg@eqnnum}}
\def\tagqed{\tag*{\iftagsleft@
    \hskip\displaywidth\llap{$\qedsymbol$}\hskip-\displaywidth%
    \else$\qedsymbol$\fi}\vphantom{\standardqed}}
\def\simpletagqed{\iftagsleft@\global\@resettagsleft@true\fi
  \global\tagsleft@false
  \tag*{$\qedsymbol$}\vphantom{\standardqed}}
\def\aftersplitqed{\global\let\endsplit\@endsplit}
\let\ccorg@endsplit\endsplit
\def\@endsplit{\ccorg@endsplit\qed\global\let\endsplit\ccorg@endsplit}%
\def\noqed{}
\def\@ifcurrenv#1#2{\def\@tempa{#1}\ifx\@tempa\@currenvir\relax
  \let\next#2\fi}
\renewenvironment{displaymath}{$$}{$$\@ignoretrue}
\renewcommand{\[}{\begin{displaymath}}
\renewcommand{\]}{\end{displaymath}}
\if@ams
\def\qed{%
  \if@resettagsleft@
    \global\tagsleft@true
    \global\@resettagsleft@false
  \fi
  \let\next\standardqed
  \@ifcurrenv{displaymath}\eqnoqed
  \@ifcurrenv{equation}\noqed
  \@ifcurrenv{eqnarray}\noqed
  \@ifcurrenv{eqnarray*}\eqnarrayqed
  \@ifcurrenv{equation*}\tagqed
  \@ifcurrenv{split}\aftersplitqed
  \@ifcurrenv{multline}\noqed
  \@ifcurrenv{multline*}\simpletagqed
  \@ifcurrenv{gather}\noqed
  \@ifcurrenv{gather*}\tagqed
  \@ifcurrenv{align}\noqed
  \@ifcurrenv{align*}\tagqed
  \@ifcurrenv{alignat}\noqed
  \@ifcurrenv{alignat*}\tagqed
  \next}
\else
\def\qed{%
  \let\next\standardqed
  \@ifcurrenv{displaymath}\eqnoqed
  \@ifcurrenv{equation}\noqed
  \@ifcurrenv{eqnarray}\noqed
  \@ifcurrenv{eqnarray*}\eqnarrayqed
  \next}
\fi
\endinput
%%
%% End of file `ccqed.sty'.