%PDF- %PDF-
| Direktori : /proc/self/root/data/old/usr/share/texlive/texmf-dist/tex/latex/ncctools/ |
| Current File : //proc/self/root/data/old/usr/share/texlive/texmf-dist/tex/latex/ncctools/nccthm.sty |
%%
%% This is file `nccthm.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% nccthm.dtx (with options: `package')
%%
%% IMPORTANT NOTICE:
%%
%% This file is a generated file from the sources of the `ncctools'
%% bundle.
%%
%% You are not allowed to modify this file.
%%
%% You are allowed to distribute this file if and only if
%% it is distributed with the corresponding source files in
%% the `ncctools' bundle.
%%
%% For the copying and distribution conditions of the source files,
%% see the README file distributed with the ncctools bundle.
%%
%% File: nccthm.dtx Copyright (C) 2002--2004 by Alexander I. Rozhenko
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{nccthm}
[2004/12/16 v1.1 NCC Extention to Theorems (NCC)]
\@ifpackageloaded{nccsect}{}{%
\def\NCC@secskip#1{%
\if@noskipsec \leavevmode \fi \par
\if@nobreak \everypar{}\else
\addpenalty\@secpenalty
\addvspace{#1}%
\fi
}
\def\NCC@runskip{2.75ex \@plus 1ex \@minus .2ex}
}
\DeclareRobustCommand{\NCC@qedsymbol}{%
\mbox{\normalsize\normalfont\thinlines \@tempdima 1.5ex
\advance\@tempdima-2\@wholewidth
\edef\@tempa{\the\@tempdima}%
\kern \@wholewidth
\raisebox\@wholewidth[1.5ex]{%
\frame{\rule\z@\@tempa\rule\@tempa\z@}}%
\kern \@wholewidth
}%
}
\let\qedsymbol\NCC@qedsymbol
\newcommand{\qed}{\NCC@qed{\qedsymbol}}
\def\NCC@qed#1{\unskip\allowbreak%
\hspace*{1em plus 1fill minus .2em}#1\@ifstar{}{\qef}%
}
\newcommand{\qef}{\NCC@secskip{\NCC@runskip}\@nobreakfalse\normalfont}
\DeclareOption{whiteqed}{%
\let\whiteqedsymbol\NCC@qedsymbol
\newcommand{\whiteqed}{\NCC@qed{\whiteqedsymbol}}
\let\qedsymbol\whiteqedsymbol
}
\DeclareOption{blackqed}{%
\DeclareRobustCommand{\blackqedsymbol}{%
\begingroup\normalsize\normalfont\thinlines
\rule{1.5ex}{1.5ex}\endgroup
}
\newcommand{\blackqed}{\NCC@qed{\blackqedsymbol}}
\let\qedsymbol\blackqedsymbol
}
\newif\ifNCC@thmindent
\newif\ifNCC@thmmargin
\DeclareOption{noindent}{\NCC@thmindentfalse}
\DeclareOption{indent}{\NCC@thmindenttrue}
\DeclareOption{nomargin}{\NCC@thmmarginfalse}
\DeclareOption{margin}{\NCC@thmmargintrue}
\ExecuteOptions{noindent,nomargin}
\ProcessOptions*
\RequirePackage{amsgen}
\RequirePackage{dcounter}[1998/12/19]
\let\NCC@thmbrmode\relax
\newif\ifNCC@thmbr
\newcommand\breakafterheader{%
\ifx\NCC@thmbrmode\relax \global\chardef\NCC@thmbrmode\z@\fi
}
\newcommand\nobreakafterheader{%
\ifx\NCC@thmbrmode\relax \global\chardef\NCC@thmbrmode\@ne\fi
}
\newcommand{\TheoremBreakStyle}{\NCC@thmbrtrue}
\newcommand{\TheoremNoBreakStyle}{\NCC@thmbrfalse}
\newcommand*{\TheoremCommentDelimiters}[2]{%
\def\NCC@thmcmt@##1{#1\ignorespaces##1\unskip#2}%
}
\newcommand*{\AfterTheoremHeaderChar}[1]{\def\NCC@thmchar{#1}}
\newcommand*{\AfterTheoremHeaderSkip}[1]{\def\NCC@thmskip{#1}}
\@onlypreamble\TheoremBreakStyle
\@onlypreamble\TheoremNoBreakStyle
\@onlypreamble\TheoremCommentDelimiters
\@onlypreamble\AfterTheoremHeaderChar
\@onlypreamble\AfterTheoremHeaderSkip
\def\NCC@thmhdr#1#2{%
\qef
\addpenalty{-\@lowpenalty}%
\begingroup
#1%
\ifx\NCC@thmbrmode\relax
\ifNCC@thmbr \chardef\NCC@thmbrmode\z@
\else \chardef\NCC@thmbrmode\@ne
\fi
\fi
\ifnum\NCC@thmbrmode=\z@
\@tempdima\parindent
\hbox{\vbox{\hsize\linewidth\@parboxrestore
\ifNCC@thmindent\parindent\@tempdima\fi
\leavevmode\strut#2\strut
}}\nobreak\noindent
\else
\ifNCC@thmindent\else\noindent\fi
\leavevmode{#2\normalfont\NCC@thmskip}\nobreak
\fi
\endgroup
\global\let\NCC@thmbrmode\relax
}
\def\NCC@thmcmt#1#2{%
\@ifempty{#2}{}{\/\space\normalfont#1\NCC@thmcmt@{#2}}%
}
\def\NCC@lthm#1#2#3#4#5{%
\@ifnextchar[{\NCC@lthm@{#1}{#2}{#3}{#4}{#5}}%
{\NCC@lthm@{#1}{#2}{#3}{#4}{#5}[]}%
}
\def\NCC@lthm@#1#2#3#4#5[#6]{%
\NCC@thmhdr{}{%
#1#4\@ifempty{#5}{}{\space#5}%
\NCC@thmcmt{#2}{#6}\NCC@thmchar
}%
#3\hskip 0.001\p@ \ignorespaces
}
\def\NCC@thxhdr#1#2{%
\refstepcounter{apar}%
\NCC@thmhdr{%
\ifNCC@thmmargin \NCC@thmindentfalse \fi
#1%
}{%
\ifNCC@thmmargin \llap{\NCC@thmapar}\else \hbox{\NCC@thmapar}\fi
#2%
}%
}
\def\NCC@lthx#1#2#3#4{%
\@ifnextchar[{\NCC@lthx@{#1}{#2}{#3}{#4}}%
{\NCC@lthx@{#1}{#2}{#3}{#4}[]}%
}
\def\NCC@lthx@#1#2#3#4[#5]{%
\NCC@thxhdr{}{%
\normalfont#1#4\NCC@thmcmt{#2}{#5}\NCC@thmchar
}%
#3\hskip 0.001\p@ \ignorespaces
}
\def\NCC@likethm#1#2#3{%
\@ifstar{\NCC@lthx{#1}{#2}{#3}}{\NCC@lthm{#1}{#2}{#3}}%
}
\DeclareDynamicCounter{apar}
\newcommand*{\AparStyleParameters}[3]{%
\def\NCC@thmaparstyle{#1}%
\def\NCC@thmapar{#2\theapar#3}%
}
\@onlypreamble\AparStyleParameters
\newcommand*{\apar}[1][]{%
\NCC@thxhdr{\NCC@thmaparstyle}
{\@ifempty{#1}{\let\NCC@thmskip\@empty}{\ignorespaces#1\unskip}}%
\hskip 0.001\p@ \ignorespaces
}
\newcommand*{\ProofStyleParameters}[2]{%
\def\NCC@thmproofstyle{#1}%
\def\NCC@thmproof{#2}%
}
\@onlypreamble\ProofStyleParameters
\newcommand*{\proof}[1][]{%
\NCC@thmhdr{\NCC@thmproofstyle}{%
\NCC@thmproof
\@ifempty{#1}{}{\space\ignorespaces#1\unskip}%
\NCC@thmchar
}%
\hskip 0.001\p@ \ignorespaces
}
\newcommand*{\newtheoremtype}[1]{%
\edef\@tempa{\noexpand\newcommand*{\expandafter\noexpand
\csname like#1\endcsname}}\NCC@nthmtype
}
\newcommand*{\renewtheoremtype}[1]{%
\edef\@tempa{\noexpand\renewcommand*{\expandafter\noexpand
\csname like#1\endcsname}}\NCC@nthmtype
}
\def\NCC@nthmtype#1#2#3{\@tempa{\NCC@likethm{#1}{#2}{#3}}}
\@onlypreamble\newtheoremtype
\@onlypreamble\renewtheoremtype
\@onlypreamble\NCC@nthmtype
\def\NCC@thmdef#1#2#3{%
\@ifnextchar[{\NCC@thmdef@{#1}{#2}{#3}}%
{\NCC@thmdef@{#1}{#2}{#3}[theorem]}%
}
\def\NCC@thmdef@#1#2#3[#4]{%
\@ifundefined{like#4}{%
\PackageError{nccthm}{Unknown theorem type `#4'}{}%
}%
\edef\@tempa##1##2{%
\@tempa{#1}{##1\expandafter\noexpand\csname like#4\endcsname##2}%
}%
\ifNCC@thmbr
\@tempa{#2\breakafterheader}{#3}{\qef\ignorespacesafterend}%
\else
\@tempa{#2\nobreakafterheader}{#3}{\qef\ignorespacesafterend}%
\fi
}
\@onlypreamble\NCC@thmdef
\@onlypreamble\NCC@thmdef@
\renewcommand*{\newtheorem}{\def\@tempa{\noexpand\newenvironment}%
\@ifstar{\NCC@nthx}{\NCC@nthm}}
\newcommand*{\renewtheorem}{\def\@tempa{\noexpand\renewenvironment}%
\@ifstar{\NCC@nthx}{\NCC@nthm}}
\def\NCC@nthx#1#2{\NCC@thmdef{#1}{}{*{#2}}}
\def\NCC@nthm#1{\@ifnextchar[{\NCC@nthm@{#1}}{\NCC@nthm@{#1}[#1]}}
\def\NCC@nthm@#1[#2]#3{%
\DeclareDynamicCounter{#2}%
\NCC@thmdef{#1}{\refstepcounter{#2}}{{#3}{\csname the#2\endcsname}}%
}
\@onlypreamble\newtheorem
\@onlypreamble\renewtheorem
\@onlypreamble\NCC@nthx
\@onlypreamble\NCC@nthm
\@onlypreamble\NCC@nthm@
\newtheoremtype{theorem}{\bfseries}{}{\itshape}
\newtheoremtype{remark}{\itshape}{}{}
\TheoremNoBreakStyle
\TheoremCommentDelimiters{(}{)}
\AfterTheoremHeaderChar{}
\AfterTheoremHeaderSkip{\hskip 1em \@plus .2em \@minus .2em}
\AparStyleParameters{\bfseries}{\bfseries}{\enskip}
\ProofStyleParameters{\bfseries}{Proof}
\endinput
%%
%% End of file `nccthm.sty'.