summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ncclatex/ncclatex.sty
blob: 42965e9966a846f7fdd6d07535fef9cfeb877185 (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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ncclatex}
         [2005/05/20 v1.05 NCC-LaTeX Extension Package (NCC)]
%
% \changes{v1.00}{2002/03/16}{This version is uploaded to CTAN}
% \changes{v1.01}{2002/05/17}{Package extdash is loaded with cyremdash}
% \changes{v1.01}{2002/05/17}{The equation counter is dynamic now}
% \changes{v1.02}{2002/05/19}{Vskip after table's caption is reduced}
% \changes{v1.03}{2004/04/08}{The processing of 'russian' option is improved}
% \changes{v1.04}{2004/12/12}{Require the latest version of nccsect}
% \changes{v1.05}{2005/01/09}{Add options T2A, T2B, T2C}
% \changes{v1.05}{2005/02/07}{Remove |\tr|, |\tl|, and |\tc| commands}
% \changes{v1.05}{2005/02/15}{Prepare equations tag in |\mathrm|)
% \changes{v1.05}{2005/03/23}{Add \NCC logo}
% \changes{v1.05}{2005/04/25}{Declare equation counter as dynamic one}
% \changes{v1.05}{2005/05/20}{Change nccsect package date to 2005/05/20}
%
% Define headers for theorem-like environments and acknowledgements.
%
\newcommand{\theoremname}{Theorem}
\newcommand{\lemmaname}{Lemma}
\newcommand{\propositionname}{Proposition}
\newcommand{\corollaryname}{Corollary}
\newcommand{\definitionname}{Definition}
\newcommand{\statementname}{Statement}
\newcommand{\examplename}{Example}
\newcommand{\remarkname}{Remark}
\newcommand{\proofname}{Proof}
\newcommand{\acknowname}{Acknowledgements}
%
% Russian headings (Babel needed)
%
\newif\ifNCC@rus \NCC@rusfalse
\DeclareOption{russian}{\NCC@rustrue}
\DeclareOption{T2C}{\def\NCC@cyrenc{T2C}}
\DeclareOption{T2B}{\def\NCC@cyrenc{T2B}}
\DeclareOption{T2A}{\def\NCC@cyrenc{T2A}}
%
% Smaller headings of sections
%
\newif\ifNCC@small \NCC@smallfalse
\DeclareOption{small}{\NCC@smalltrue}
\ExecuteOptions{T2A}
\ProcessOptions\relax
%
% Load packages
%
\RequirePackage{dcounter}[2005/04/25]
\RequirePackage{desclist}
\RequirePackage[shortcuts,cyremdash]{extdash}
\RequirePackage{nccboxes}
\RequirePackage{nccfoots}
\RequirePackage{nccmath}
\def\maketag@@@#1{\hbox{$\m@th\mathrm{#1}$}}
\RequirePackage{nccpic}
\RequirePackage{nccthm}
\RequirePackage{nccsect}[2005/05/20]
\RequirePackage{nccfloats}
\ifNCC@rus
  \RequirePackage[\NCC@cyrenc]{fontenc}
  \RequirePackage[russian]{nccltrus}
\else
  \def\tg{\qopname\relax o{tg}}
  \def\arctg{\qopname\relax o{arctg}}
  \def\ctg{\qopname\relax o{ctg}}
  \def\arcctg{\qopname\relax o{arcctg}}
  \@ifundefined{No}{\def\No{\mbox{No.}}}{}
\fi
\let\NCC@cyrenc\relax
%
% Declare the equation counter in the dynamic style.
%
\DeclareDynamicCounter{equation}
%
% \cref{label} is cite without square brackets
%
\newcommand*{\cref}[1]{{\def\@cite##1##2{##1}\cite{#1}}}
%
% Prepare theorem-like environments
%
\newtheorem{theorem}{\theoremname}
\newtheorem{lemma}{\lemmaname}
\newtheorem{proposition}{\propositionname}
\newtheorem{corollary}{\corollaryname}
\newtheorem{statement}{\statementname}[remark]
\newtheorem{definition}{\definitionname}[remark]
\newtheorem{example}{\examplename}[remark]
\newtheorem{remark}{\remarkname}[remark]
%
% Prepare APAR theorem-like environments
%
\newtheorem*{atheorem}{\theoremname}
\newtheorem*{alemma}{\lemmaname}
\newtheorem*{aproposition}{\propositionname}
\newtheorem*{acorollary}{\corollaryname}
\newtheorem*{astatement}{\statementname}[remark]
\newtheorem*{adefinition}{\definitionname}[remark]
\newtheorem*{anexample}{\examplename}[remark]
\newtheorem*{aremark}{\remarkname}[remark]
%
% Prepare manual theorem-like environments
%
\newenvironment{Theorem}{\liketheorem{\theoremname}}{\qef}
\newenvironment{Lemma}{\liketheorem{\lemmaname}}{\qef}
\newenvironment{Proposition}{\liketheorem{\propositionname}}{\qef}
\newenvironment{Corollary}{\liketheorem{\corollaryname}}{\qef}
\newenvironment{Statement}{\likeremark{\statementname}}{\qef}
\newenvironment{Definition}{\likeremark{\definitionname}}{\qef}
\newenvironment{Example}{\likeremark{\examplename}}{\qef}
\newenvironment{Remark}{\likeremark{\remarkname}}{\qef}
%
% Change default settings for theorems
%
\renewtheoremtype{remark}{\bfseries}{}{}
\TheoremCommentDelimiters{}{}
\AfterTheoremHeaderChar{.}
\AfterTheoremHeaderSkip{\hskip .7em \@plus .2em \@minus .1em}
\AparStyleParameters{\bff}{\bff}{.\enskip}
\ProofStyleParameters{\bff}{\proofname}
%
% \acknow starts acknowledgements.
%
\newcommand{\acknow}{\likeremark{\normalfont\itshape\acknowname}{}}
%
% \mop{FOO} is equivalent to \operatorname{FOO}
%
\newcommand{\mop}{\operatorname}
%
% NCC logo:
%
\DeclareRobustCommand{\NCC}{{\protect\AmSfont
  N\kern-.05em\lower.5ex\hbox{C}\kern.05emC}%
}
%
% Customize sections and captions.
%
\def\NCC@runskip{2.3ex \@plus 1ex \@minus .2ex}
\DeclareSection{-2}{table}{\bfseries}{\z@}{1.3ex}{\small}
\DeclareSection{-1}{figure}{\bfseries}{2ex}{\z@}{\small}
\ifNCC@small
  \@ifundefined{chapter}{%
    \DeclareSection*0{part}{\large\bff}%
                    {4ex \@plus 1ex \@minus .2ex}%
                    {2.8ex \@plus .2ex}{\LARGE\bff}
  }{%
    \DeclareSection*0{chapter}{\vspace{1.5ex}\large\bff}{\z@}%
                    {6ex \@plus .2ex}{\LARGE\bff}
  }
  \DeclareSection*1{section}{}%
                  {3.1ex \@plus 1ex \@minus .2ex}%
                  {1.5ex \@plus .2ex}{\large\bff}
  \DeclareSection*2{subsection}{}%
                  {2.7ex \@plus 1ex \@minus .2ex}%
                  {1.5ex \@plus .2ex}{\normalsize\bff}
  \DeclareSection*3{subsubsection}{}%
                  {\NCC@runskip}%
                  {1.5ex \@plus .2ex}{\normalsize\bff\itshape}
\else
  \@ifundefined{chapter}{%
    \DeclareSection*0{part}{\Large\bff}%
                    {5ex \@plus 1ex \@minus .2ex}%
                    {3.8ex \@plus .2ex}{\huge\bff}
  }{%
    \DeclareSection*0{chapter}{\vspace{2ex}\Large\bff}{\z@}%
                    {8ex \@plus .2ex}{\huge\bff}
  }
  \DeclareSection*1{section}{}%
                  {3.5ex \@plus 1ex \@minus .2ex}%
                  {2.3ex \@plus .2ex}{\Large\bff}
  \DeclareSection*2{subsection}{}%
                  {3.1ex \@plus 1ex \@minus .2ex}%
                  {1.5ex \@plus .2ex}{\large\bff}
  \DeclareSection*3{subsubsection}{}%
                  {2.7ex \@plus 1ex \@minus .2ex}%
                  {1.5ex \@plus .2ex}{\normalsize\bff}
\fi
\DeclareSection4{paragraph}{}{\NCC@runskip}%
                {-.6em \@plus -.2em \@minus -.1em}{\normalsize\bff}
\DeclareSection5{subparagraph}[\parindent]{}{\NCC@runskip}%
                {-.6em \@plus -.2em \@minus -.1em}{\normalsize\bff}
\SectionTagSuffix{.\hskip .6em}
\CaptionTagSuffix{.\hskip .6em \@plus .2em \@minus .1em}
\NumberlineSuffix{.\hskip .6em}{.\hskip .4em}
\sectionstyle{hangindent*}
%
% Millimeters are default units in NCC-LaTeX.
%
\unitlength=1mm
\renewcommand{\cboxstyle}{\scriptsize}
\endinput