summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/disser/custom.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/disser/custom.dtx')
-rw-r--r--Master/texmf-dist/source/latex/disser/custom.dtx110
1 files changed, 66 insertions, 44 deletions
diff --git a/Master/texmf-dist/source/latex/disser/custom.dtx b/Master/texmf-dist/source/latex/disser/custom.dtx
index 668e1e12b1f..6410d7762a4 100644
--- a/Master/texmf-dist/source/latex/disser/custom.dtx
+++ b/Master/texmf-dist/source/latex/disser/custom.dtx
@@ -122,29 +122,29 @@
% \subsubsection{Библиографические ссылки}
% \DescribePackage{natbib}\index{Пакеты!\verb*+natbib+}
% \begin{macrocode}
-\usepackage[square,comma,sort&compress,numbers]{natbib}
+\ifDis@natbib
+ \usepackage[square,comma,sort&compress,numbers]{natbib}
+\else
+% \end{macrocode}
+% Пустые определения команд из пакета |natbib|.
+% \DescribeMacro{\bibsection}\index{Макросы!\verb*+\bibsection+}
+% \DescribeMacro{\bibpreamble}\index{Макросы!\verb*+\bibpreamble+}
+% \DescribeMacro{\bibpostamble}\index{Макросы!\verb*+\bibpostamble+}
+% \DescribeMacro{\bibfont}\index{Макросы!\verb*+\bibfont+}
+% \DescribeMacro{\bibsep}\index{Макросы!\verb*+\bibsep+}
+% \begin{macrocode}
+ \newcommand\bibsection{}
+ \newcommand\bibpreamble{}
+ \newcommand\bibpostamble{}
+ \newcommand\bibfont{\normalfont\selectfont}
+ \newlength\bibsep
+\fi
% \end{macrocode}
-% Переопределение |\bibsection| для включения ссылки на список литературы в
-% оглавление.
+% Команда, создающая заголовок библиографии.
% \DescribeMacro{\bibsection}\index{Макросы!\verb*+\bibsection+}
% \begin{macrocode}
\renewcommand\bibsection{\nchapter{\bibname}}
-\@ifundefined{chapter}{%
- \renewcommand\bibsection{%
- \nsection{\bibname\@mkboth{\MakeUppercase{\bibname}}{\MakeUppercase{\bibname}}}%
- }%
-}{%
- \@ifxundefined\NAT@sectionbib{%
- \renewcommand\bibsection{%
- \nchapter{\bibname\@mkboth{\MakeUppercase{\bibname}}{\MakeUppercase{\bibname}}}%
- }%
- }{%
- \renewcommand\bibsection{%
- \nsection{\bibname\ifx\@mkboth\@gobbletwo\else\markright{\MakeUppercase{\bibname}}\fi}%
- }%
- }%
-}%
% \end{macrocode}
% Преамбула окружения |thebibliography|.
@@ -156,50 +156,72 @@
% \DescribeMacro{\@biblabel}\index{Макросы!\verb*+"\"@biblabel+}
% \begin{macrocode}
\renewcommand\@biblabel[1]{##1.}%
+ \setlength\bibsep{0pt}
}
+\@ifpackageloaded{natbib}{
+ \@ifundefined{chapter}{%
+ \renewcommand\bibsection{%
+ \nsection{\bibname\@mkboth{\MakeUppercase{\bibname}}{\MakeUppercase{\bibname}}}%
+ }%
+ }{%
+ \@ifxundefined\NAT@sectionbib{%
+ \renewcommand\bibsection{%
+ \nchapter{\bibname\@mkboth{\MakeUppercase{\bibname}}{\MakeUppercase{\bibname}}}%
+ }%
+ }{%
+ \renewcommand\bibsection{%
+ \nsection{\bibname\ifx\@mkboth\@gobbletwo\else\markright{\MakeUppercase{\bibname}}\fi}%
+ }%
+ }%
+ }%
+}{%
+ \@ifundefined{chapter}{%
+ \renewcommand\bibsection{%
+ \nsection{\bibname\@mkboth{\MakeUppercase{\bibname}}{\MakeUppercase{\bibname}}}%
+ }%
+ }{}
% \end{macrocode}
-% Переопределение окружения |thebibliography| для создания корректной
-% PDF-закладки (основано на варианте из \pkg{natbib}).
% \DescribeEnv{thebibliography}\index{Окружения!\verb*+thebibliography+}
% \begin{macrocode}
-\renewenvironment{thebibliography}[1]{%
- \setlength\bibsep{0pt}
- \bibsection
- \parindent \z@
- \bibpreamble\bibfont
- \list{\@biblabel{\arabic{NAT@ctr}}}%
- {\@bibsetup{#1}\setcounter{NAT@ctr}{0}}%
- \ifNAT@openbib
- \renewcommand\newblock{\par}
- \else
- \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
- \fi
- \sloppy\clubpenalty4000\widowpenalty4000
- \sfcode`\.=1000\relax
- \let\citeN\cite
- \let\shortcite\cite
- \let\citeasnoun\cite
-}{%
- \def\@noitemerr{%
- \PackageWarning{natbib}{Empty `thebibliography' environment}%
+ \renewenvironment{thebibliography}[1]{
+ \bibsection
+ \parindent\z@
+ \bibpreamble\bibfont
+ \list{\@biblabel{\@arabic\c@enumiv}}{\settowidth\labelwidth{\@biblabel{#1}}%
+ \setlength{\itemsep}{\bibsep}
+ \setlength{\parsep}{\bibsep}
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \@openbib@code
+ \usecounter{enumiv}%
+ \let\p@enumiv\@empty
+ \renewcommand\theenumiv{\@arabic\c@enumiv}}%
+ \sloppy\clubpenalty4000\widowpenalty4000
+ \sfcode`\.\@m
+ }{%
+ \bibpostamble
+ \def\@noitemerr
+ {\@latex@warning{Empty `thebibliography' environment}}%
+ \endlist
}
- \endlist\vskip-\lastskip%
}
% \end{macrocode}
% \subsubsection{Плавающие объекты}
%
-% Пакеты \pkg{caption} и \pkg{subfig} для вложенной нумерации плавающих
+% Пакеты \pkg{caption} и \pkg{subcaption} для вложенной нумерации плавающих
% объектов.
% \DescribePackage{caption}\index{Пакеты!\verb*+caption+}
-% \DescribePackage{subfig}\index{Пакеты!\verb*+subfig+}
+% \DescribePackage{subcaption}\index{Пакеты!\verb*+subcaption+}
% \begin{macrocode}
\ifDis@subf
- \usepackage[config,font=small,labelsep=period]{caption,subfig}
+ \usepackage[config,font=small,labelsep=period]{caption}
+ \usepackage[list=true,subrefformat=parens]{subcaption}
% \end{macrocode}
% Формат счетчика.
% \begin{macrocode}
+ \DeclareCaptionSubType[asbuk]{figure}
\def\thesubfigure{\textit{\asbuk{subfigure}}}
% \end{macrocode}
% Формат ссылки через |\ref|.