summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/disser/env.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/disser/env.dtx')
-rw-r--r--Master/texmf-dist/source/latex/disser/env.dtx107
1 files changed, 77 insertions, 30 deletions
diff --git a/Master/texmf-dist/source/latex/disser/env.dtx b/Master/texmf-dist/source/latex/disser/env.dtx
index b45652c6c70..f7a9d0d57da 100644
--- a/Master/texmf-dist/source/latex/disser/env.dtx
+++ b/Master/texmf-dist/source/latex/disser/env.dtx
@@ -9,8 +9,8 @@
% \end{macrocode}
% \subsection{Окружения}
%
-% \DescribeEnv{description}
-% Примечание
+% \DescribeEnv{description}\index{Окружения!\verb*+description+}
+% \subsubsection{Примечание}
% \begin{macrocode}
\newenvironment{description}
{\list{}{\labelwidth\z@ \itemindent-\leftmargin
@@ -18,8 +18,8 @@
{\endlist}
\newcommand*\descriptionlabel[1]{\hspace\labelsep\normalfont\bfseries #1}
% \end{macrocode}
-% \DescribeEnv{abstract}
-% Аннотация
+% \DescribeEnv{abstract}\index{Окружения!\verb*+abstract+}
+% \subsubsection{Аннотация}
% \begin{macrocode}
\if@titlepage
\newenvironment{abstract}{
@@ -44,8 +44,8 @@
}{\if@twocolumn\else\endquotation\fi}
\fi
% \end{macrocode}
-% \DescribeEnv{quotation}
-% Цитирование
+% \DescribeEnv{quotation}\index{Окружения!\verb*+quotation+}
+% \subsubsection{Цитирование}
% \begin{macrocode}
\newenvironment{quotation}{
\list{}{
@@ -57,16 +57,16 @@
\item\relax
}{\endlist}
% \end{macrocode}
-% \DescribeEnv{quote}
-% Выдержка
+% \DescribeEnv{quote}\index{Окружения!\verb*+quote+}
+% \subsubsection{Выдержка}
% \begin{macrocode}
\newenvironment{quote}{
\list{}{\rightmargin\leftmargin}
\item\relax
}{\endlist}
% \end{macrocode}
-% \DescribeEnv{titlepage}
-% Титульный лист
+% \DescribeEnv{titlepage}\index{Окружения!\verb*+titlepage+}
+% \subsubsection{Титульный лист}
% \begin{macrocode}
\newenvironment{titlepage}{
\if@twocolumn
@@ -83,41 +83,88 @@
}
% \end{macrocode}
%
-% \DescribeEnv{figure}
-% \DescribeEnv{figure*}
-% Рисунок
+% \DescribeEnv{figure}\index{Окружения!\verb*+figure+}
+% \DescribeEnv{figure*}\index{Окружения!\verb*+figure*+}
+% \subsubsection{Рисунок}
% \begin{macrocode}
\newenvironment{figure}{\@float{figure}}{\end@float}
\newenvironment{figure*}{\@dblfloat{figure}}{\end@dblfloat}
% \end{macrocode}
%
-% \DescribeEnv{table}
-% \DescribeEnv{table*}
-% Таблица
+% \DescribeEnv{table}\index{Окружения!\verb*+table+}
+% \DescribeEnv{table*}\index{Окружения!\verb*+table*+}
+% \subsubsection{Таблица}
% \begin{macrocode}
\newenvironment{table}{\@float{table}}{\end@float}
\newenvironment{table*}{\@dblfloat{table}}{\end@dblfloat}
% \end{macrocode}
%
-% \subsection{Команды для создания окружений типа <<теорема>>}
-% Параметры формата.
-% \begin{macrocode}
-\providecommand\theoremstyle{\itshape}
-\providecommand\thetheoremstyle{\bfseries}
-\providecommand\opargtheoremstyle{\rm}
-\providecommand\preopargtheorem{(}
-\providecommand\postopargtheorem{)}
-\providecommand\postthetheorem{.}
+% \subsubsection{Окружения типа <<теорема>>}
+%
+% \DescribeMacro{\newtheorem}\index{Макросы!\verb*+\newtheorem+}
+% Переопределяем |\newtheorem|, так чтобы автоматически создавались
+% параметры формата теорем.
+% \begin{macrocode}
+
+\def\newtheorem#1{%
+% \end{macrocode}
+% \DescribeMacro{\theoremstyle}\index{Макросы!\verb*+\theoremstyle+}
+% \DescribeMacro{\thetheoremstyle}\index{Макросы!\verb*+\thetheoremstyle+}
+% \DescribeMacro{\postthetheorem}\index{Макросы!\verb*+\postthetheorem+}
+% \DescribeMacro{\opargtheorem}\index{Макросы!\verb*+\opargtheorem+}
+% \DescribeMacro{\preopargtheorem}\index{Макросы!\verb*+\preopargtheorem+}
+% \DescribeMacro{\postopargtheorem}\index{Макросы!\verb*+\postopargtheorem+}
+% \begin{macrocode}
+ {
+% \end{macrocode}
+% Стиль текста теоремы.
+% \begin{macrocode}
+ \global\@namedef{#1style}{\itshape}
+% \end{macrocode}
+% Стиль заголовка и номера теоремы.
+% \begin{macrocode}
+ \global\@namedef{the#1style}{\bfseries}
+% \end{macrocode}
+% Символ после номера.
+% \begin{macrocode}
+ \global\@namedef{postthe#1}{.}
+% \end{macrocode}
+% Стиль опционального аргумента (текста в скобках после заголовка и номера).
+% \begin{macrocode}
+ \global\@namedef{oparg#1style}{\rm}
+% \end{macrocode}
+% Символы, окружающие опциональный аргумент (по умолчанию --- круглые скобки).
+% \begin{macrocode}
+ \global\@namedef{preoparg#1}{(}
+ \global\@namedef{postoparg#1}{)}
+ }
+ \@ifnextchar[{\@othm{#1}}{\@nthm{#1}}%
+}
% \end{macrocode}
-% Низкоуровневые команды для создания заголовка теоремы.
+% У команд |\@begintheorem| и |\@opargbegintheorem| изменены аргументы,
+% чтобы можно было использовать обобщенное форматирование.
% \begin{macrocode}
+\def\@xthm#1#2{%
+ \@begintheorem{#1}{#2}\ignorespaces}
+\def\@ythm#1#2[#3]{%
+ \@opargbegintheorem{#1}{#2}{#3}\ignorespaces}
+
\def\@begintheorem#1#2{\trivlist
- \item[\hskip \labelsep{\thetheoremstyle #1\ %
- #2\unskip\postthetheorem}]\theoremstyle}
+ \item[\hskip \labelsep{\csname the#1style\endcsname #2\ %
+ \csname the#1\endcsname\unskip%
+ \csname postthe#1\endcsname}]%
+ \csname #1style\endcsname}
+
\def\@opargbegintheorem#1#2#3{\trivlist
- \item[\hskip \labelsep{\thetheoremstyle #1\ #2\ %
- {\opargtheoremstyle\preopargtheorem #3\postopargtheorem}}]\theoremstyle}
+ \item[\hskip \labelsep{%
+ {\csname the#1style\endcsname #2}\ %
+ \csname the#1\endcsname\ %
+ {\csname oparg#1style\endcsname%
+ \csname preoparg#1\endcsname #3%
+ \csname postoparg#1\endcsname}}]%
+ \csname #1style\endcsname}
+
\def\@endtheorem{\endtrivlist}
%</env>