% \iffalse meta-comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% disser -- LaTeX document class for dissertations. %% %% Copyright (c) Stanislav Kruchinin %% %% It may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2003/12/01 or later. %% %% This program is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %<*driver> \ProvidesFile{disser.drv}[2017/03/03 1.5.0 Document class for dissertations] \documentclass{ltxdoc} \usepackage[a4paper,includeheadfoot,nohead,mag=1000, left=5cm,right=1cm,top=1.5cm,bottom=1.5cm]{geometry} \usepackage{ifpdf,indentfirst,tabularx,doc,makeidx,longtable,color} \definecolor{darkblue}{rgb}{0,0,.6} \ifpdf \usepackage[pdftex,hyperindex,unicode]{hyperref} \usepackage{cmap} \else \usepackage[hypertex]{hyperref} \fi \hypersetup{ pdftitle = {Documented source code of disser class}, pdfauthor = {Stanislav Kruchinin}, pdfsubject = {disser}, pdfstartview = {FitH}, pdfborder = {0 0 0}, bookmarksopen = true, bookmarksnumbered = true, bookmarksopenlevel = 2, colorlinks = true, linkcolor = darkblue, citecolor = darkblue, filecolor = darkblue, menucolor = darkblue, urlcolor = darkblue } \IfFileExists{url.sty}{\usepackage{url}}{\newcommand\url{\texttt}} \usepackage[T2A]{fontenc} \usepackage[cp1251]{inputenc} \usepackage[english,russian]{babel} \usepackage{microtype} \MakeShortVerb{\|} \def\file#1{\texttt{#1}} \def\pkg#1{\textsf{#1}} \def\cmd#1{\texttt{#1}} \def\deflabel#1{\ttfamily #1\hfill} \newenvironment{deflist}[1]{% \begin{list}{}{% \settowidth\labelwidth{\ttfamily #1}% \setlength\leftmargin\labelwidth \addtolength\leftmargin\labelsep \let\makelabel\deflabel} }{\end{list}} \newcommand\DescribePackage[1]{% \DescribeEnv{#1}\index{Пакеты!\texttt{#1}} } \newcommand\DescribeCounter[1]{% \DescribeMacro{#1}\index{Счетчики!\texttt{#1}} } \newcommand\DescribeOption[1]{ \DescribeMacro{#1}\index{Опции!\texttt{#1}} } \makeatletter \def\IndexParms{% \parindent \z@ \columnsep 15pt \parskip 0pt plus 1pt \rightskip 15pt \mathsurround \z@ \parfillskip=-15pt \small \def\@idxitem{\normalfont\par\hangindent 30pt\bfseries}% \def\subitem{\normalfont\par\hangindent 30pt}% \def\subsubitem{\normalfont\par\hangindent 30pt\hspace*{15pt}}% \def\indexspace{\par\vspace{10pt plus 2pt minus 3pt}}% } \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi \columnseprule \z@ \columnsep 35\p@ \twocolumn[\index@prologue]% \IndexParms \let\item\@idxitem \ignorespaces} \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi} \makeatother \setlength\hfuzz{20pt} \hbadness=10000 \makeindex \GetFileInfo{disser.drv} \begin{document} \sloppy \DocInput{disser.dtx} \DocInput{counters.dtx} \DocInput{part.dtx} \DocInput{chapter.dtx} \DocInput{sections.dtx} \DocInput{lists.dtx} \DocInput{floats.dtx} \DocInput{env.dtx} \DocInput{page.dtx} \DocInput{titledefs.dtx} \DocInput{titlepage.dtx} \DocInput{bachelor.dtx} \DocInput{specialist.dtx} \DocInput{master.dtx} \DocInput{candidate.dtx} \DocInput{doctor.dtx} \DocInput{autoref.dtx} \DocInput{toc.dtx} \DocInput{custom.dtx} \IndexPrologue{\section{Предметный указатель}} \printindex \end{document} % % \fi % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \title{\pkg{disser} "--- пакет для оформления диссертаций} % \date{Версия \fileversion\\[6pt]\filedate} % \author{Станислав Кручинин\\[6pt] % \normalsize E-mail: % \href{mailto:stanislav.kruchinin@gmail.com} % {\texttt{stanislav.kruchinin@gmail.com}}} % % \maketitle % % \section*{Обзор документации} % % Документация пакета состоит из следующих файлов: % \begin{deflist}{README, README.ru } % \item[\href{file:manual.pdf}{manual.pdf}] % Руководство пользователя. % \item[README, README.ru] % Информация о сборке и установке пакета. % \item[ChangeLog] % История версий. % \end{deflist} % % Документированные исходные тексты: % \begin{deflist}{README, README.ru } % \item[\href{file:disser.pdf}{disser.dtx}] % Исходный текст класса \pkg{disser} (данный файл). % \item[\href{file:gost732.pdf}{gost732.dtx}] % Исходный текст класса \pkg{gost732} для оформления документов в % соответствии с ГОСТ 7.32-2001. % \end{deflist} % % \clearpage % \tableofcontents % % \section{Исходный текст класса}\parindent=0pt % % \begin{macrocode} %<*disser> \NeedsTeXFormat{LaTeX2e} \ProvidesClass{disser}[2017/03/03 1.4.1 Document class for dissertations] % \end{macrocode} % Подключение пакета \pkg{kvoptions} для обработки опций в формате % <<ключ = значение>>. % \DescribePackage{kvoptions} % \begin{macrocode} \RequirePackage{kvoptions} % \end{macrocode} % Определение операторов условного выполнения: % \begin{itemize} % \item подключение пакета \pkg{ifpdf}, определяющего команду |\ifpdf|. % \DescribePackage{ifpdf} % \begin{macrocode} \RequirePackage{ifpdf} % \end{macrocode} % \item подключение пакета \pkg{ifthen} для построчных сравнений. % \DescribePackage{ifthen} % \begin{macrocode} \RequirePackage{ifthen} % \end{macrocode} % \item Англоязычная версия титульного листа. % \begin{macrocode} \newif\if@titlepage@en\@titlepage@enfalse % \end{macrocode} % \item Разрешено оставлять одну колонку при двухколонном наборе. % \begin{macrocode} \newif\if@restonecol % \end{macrocode} % \item Отображение титульного листа (включено). % \begin{macrocode} \newif\if@titlepage\@titlepagetrue % \end{macrocode} % \item Главы начинаются только с нечетных страниц (отключено). % \begin{macrocode} \newif\if@openright\@openrightfalse % \end{macrocode} % \item Типы документов (по умолчанию candidate). % \begin{macrocode} \newif\ifDis@bachelor\Dis@bachelorfalse \newif\ifDis@specialist\Dis@specialistfalse \newif\ifDis@master\Dis@masterfalse \newif\ifDis@candidate\Dis@candidatetrue \newif\ifDis@doctor\Dis@doctorfalse \newif\ifDis@autoref\Dis@autoreffalse % \end{macrocode} % \item Отображение УДК на титульном листе (отключено). % \begin{macrocode} \newif\ifDis@libcat\Dis@libcatfalse % \end{macrocode} % \item Отображение грифа секретности на титульном листе (отключено). % \begin{macrocode} \newif\ifDis@classified\Dis@classifiedfalse % \end{macrocode} % \item Отображение подписей диссертанта и ученого секретаря (отключено). % \begin{macrocode} \newif\ifDis@facsimile\Dis@facsimilefalse % \end{macrocode} % \item Подключение \pkg{hyperref} (отключено). % \begin{macrocode} \newif\ifDis@href\Dis@hreffalse % \end{macrocode} % \item Подключение \pkg{subcaption} (отключено). % \begin{macrocode} \newif\ifDis@subf\Dis@subffalse % \end{macrocode} % \item Шрифт Times как основной (отключено). % \begin{macrocode} \newif\ifDis@times\Dis@timesfalse % \end{macrocode} % \item Поддержка математических шрифтов MathTime Pro (отключено). % \begin{macrocode} \newif\ifDis@mtpro\Dis@mtprofalse % \end{macrocode} % \item Подключение \pkg{natbib} (отключено). % \begin{macrocode} \newif\ifDis@natbib\Dis@natbibfalse % \end{macrocode} % \item Использовать цветные ссылки (отключено). % \begin{macrocode} \newif\ifDis@colorlinks\Dis@colorlinksfalse % \end{macrocode} % \item Исправление знаков интегралов на более привычные (отключено). % \begin{macrocode} \newif\ifDis@fixint\Dis@fixintfalse % \end{macrocode} % \end{itemize} % % \subsection{Опции класса} % % Подключение пакета \pkg{hyperref} и необходимых настроек. % \begin{macrocode} \DeclareOption{href}{\Dis@hreftrue} % \end{macrocode} % Подключение пакета \pkg{subcaption} и необходимых настроек. % \begin{macrocode} \DeclareOption{subf}{\Dis@subftrue} % \end{macrocode} % Отображение УДК на титульном листе. % \begin{macrocode} \DeclareOption{libcat}{\Dis@libcattrue} % \end{macrocode} % Отображение грифа секретности. % \begin{macrocode} \DeclareOption{classified}{\Dis@classifiedtrue} % \end{macrocode} % Отображение подписей диссертанта и ученого секретаря. % \begin{macrocode} \DeclareOption{facsimile}{\Dis@facsimiletrue} % \end{macrocode} % Подключение пакета \pkg{natbib} и необходимых настроек. % \begin{macrocode} \DeclareOption{natbib}{\Dis@natbibtrue} % \end{macrocode} % Исправление знаков интегралов на более привычные. % \begin{macrocode} \DeclareOption{fixint}{\Dis@fixinttrue} % \end{macrocode} % Создание цветных ссылок. % \begin{macrocode} \DeclareOption{colorlinks}{\Dis@colorlinkstrue} % \end{macrocode} % Размеры листов. % \begin{macrocode} \DeclareOption{a4paper}{% \setlength\paperheight{297mm} \setlength\paperwidth {210mm} } \DeclareOption{a5paper}{% \setlength\paperheight{210mm} \setlength\paperwidth {148mm} } \DeclareOption{b5paper}{% \setlength\paperheight{250mm} \setlength\paperwidth {176mm} } % \end{macrocode} % Альбомная ориентация. % \begin{macrocode} \DeclareOption{landscape}{% \setlength\@tempdima {\paperheight}% \setlength\paperheight{\paperwidth}% \setlength\paperwidth {\@tempdima} } % \end{macrocode} % Размер шрифта основного текста. % \begin{macrocode} \newcommand\@ptsize{} \DeclareOption{8pt} {\renewcommand\@ptsize{8}} \DeclareOption{9pt} {\renewcommand\@ptsize{9}} \DeclareOption{10pt}{\renewcommand\@ptsize{10}} \DeclareOption{11pt}{\renewcommand\@ptsize{11}} \DeclareOption{12pt}{\renewcommand\@ptsize{12}} \DeclareOption{14pt}{\renewcommand\@ptsize{14}} \DeclareOption{16pt}{\renewcommand\@ptsize{16}} \DeclareOption{18pt}{\renewcommand\@ptsize{18}} \DeclareOption{20pt}{\renewcommand\@ptsize{20}} % \end{macrocode} % Установка полей для односторонней или двухсторонней печати. % \begin{macrocode} \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} % \end{macrocode} % Включение сообщений о строках, выходящих за поля. % \begin{macrocode} \DeclareOption{draft}{\setlength\overfullrule{5pt}} \DeclareOption{final}{\setlength\overfullrule{0pt}} % \end{macrocode} % Печатать титульный лист или нет. % \begin{macrocode} \DeclareOption{titlepage} {\@titlepagetrue} \DeclareOption{notitlepage}{\@titlepagefalse} % \end{macrocode} % Главы будут начинаться только на нечетной странице (будет всегда справа на % развороте) или на первой доступной. % \begin{macrocode} \DeclareOption{openright}{\@openrighttrue} \DeclareOption{openany}{\@openrightfalse} % \end{macrocode} % Верстка в один или в два столбца. % \begin{macrocode} \DeclareOption{onecolumn}{\@twocolumnfalse} \DeclareOption{twocolumn}{\@twocolumntrue} % \end{macrocode} % Номера размещаются слева, а не справа от формул. % \begin{macrocode} \DeclareOption{leqno}{\input{leqno.clo}} % \end{macrocode} % Выключные формулы будут выравнены по левому краю, а не по центру. % \begin{macrocode} \DeclareOption{fleqn}{\input{fleqn.clo}} % \end{macrocode} % Если указана эта опция, то блоки текста в списке литературы будут печататься % на новых строках и с отступом. % \begin{macrocode} \DeclareOption{openbib}{% \AtEndOfPackage{% \renewcommand\@openbib@code{% \advance\leftmargin\bibindent \itemindent -\bibindent \listparindent \itemindent \parsep \z@ }% \renewcommand\newblock{\par} }% } % \end{macrocode} % Тип диссертации. % \begin{macrocode} \DeclareOption{bachelor}{% \Dis@bachelortrue \Dis@specialistfalse \Dis@masterfalse \Dis@candidatefalse \Dis@doctorfalse \Dis@autoreffalse } \DeclareOption{specialist}{% \Dis@bachelorfalse \Dis@specialisttrue \Dis@masterfalse \Dis@candidatefalse \Dis@doctorfalse \Dis@autoreffalse } \DeclareOption{master}{% \Dis@bachelorfalse \Dis@specialistfalse \Dis@mastertrue \Dis@candidatefalse \Dis@doctorfalse \Dis@autoreffalse } \DeclareOption{candidate}{% \Dis@bachelorfalse \Dis@specialistfalse \Dis@masterfalse \Dis@candidatetrue \Dis@doctorfalse \Dis@autoreffalse } \DeclareOption{doctor}{% \Dis@bachelorfalse \Dis@specialistfalse \Dis@masterfalse \Dis@candidatefalse \Dis@doctortrue \Dis@autoreffalse } \DeclareOption{autoref}{% \Dis@bachelorfalse \Dis@specialistfalse \Dis@masterfalse \Dis@candidatefalse \Dis@doctorfalse \Dis@autoreftrue } % \end{macrocode} % Обработка опций в формате <<ключ-значение>>. % \begin{macrocode} \SetupKeyvalOptions{ family=Dis, prefix=Dis@ } \DeclareStringOption{substylefile} % \end{macrocode} % Выполнение опций по умолчанию. % \begin{macrocode} \ExecuteOptions{a4paper,14pt,oneside,titlepage,onecolumn,final,openany,candidate} % \end{macrocode} % Выполнение пользовательских опций. % \begin{macrocode} \ProcessKeyvalOptions{Dis} \ProcessOptions % \end{macrocode} % Файл с описанием разметки титульного листа по умолчанию. % \begin{macrocode} \ifx\Dis@substylefile\@empty \ifDis@bachelor \renewcommand*{\Dis@substylefile}{bachelor.rtx}\fi \ifDis@specialist \renewcommand*{\Dis@substylefile}{specialist.rtx}\fi \ifDis@master \renewcommand*{\Dis@substylefile}{master.rtx}\fi \ifDis@candidate \renewcommand*{\Dis@substylefile}{candidate.rtx}\fi \ifDis@doctor \renewcommand*{\Dis@substylefile}{doctor.rtx}\fi \ifDis@autoref \renewcommand*{\Dis@substylefile}{autoref.rtx}\fi \fi % \end{macrocode} % Подключение стиля документа. % \begin{macrocode} \AtEndOfClass{\input{\Dis@substylefile}} % \end{macrocode} % Определение команд изменения регистра |\MakeTextUppercase| и % |\MakeTextLowercase|. % \DescribePackage{textcase} % \begin{macrocode} \RequirePackage[overload]{textcase} % \end{macrocode} % \subsection{Настройка шрифтов} % \subsubsection{Определение размеров} % % \begin{macrocode} \def\EC@family#1#2#3#4#5{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8><9><10><10.95><12><14.4><17.28><20.74>% <24.88><29.86><35.83><42.99><51.59>genb*#5}{}} \EC@family{T1}{cmr}{m}{n}{ecrm} \EC@family{T1}{cmr}{m}{sl}{ecsl} \EC@family{T1}{cmr}{m}{it}{ecti} \EC@family{T1}{cmr}{m}{sc}{eccc} \EC@family{T1}{cmr}{bx}{n}{ecbx} \EC@family{T1}{cmr}{b}{n}{ecrb} \EC@family{T1}{cmr}{bx}{it}{ecbi} \EC@family{T1}{cmr}{bx}{sl}{ecbl} \EC@family{T1}{cmr}{bx}{sc}{ecxc} \EC@family{T1}{cmr}{m}{ui}{ecui} \DeclareFontShape{OT1}{cmr}{m}{n}{% <5><6><7><8><9><10><12>gen*cmr% <10.95>cmr10% <14.4>cmr12% <17.28><20.74><24.88><29.86><35.83><42.99><51.59>cmr17% }{} \DeclareFontShape{OT1}{cmr}{m}{sl}{% <5><6><7>cmsl8% <8><9>gen*cmsl% <10><10.95>cmsl10% <12><14.4><17.28><20.74><24.88><29.86><35.83><42.99><51.59>cmsl12% }{} \DeclareFontShape{OT1}{cmr}{m}{it}{% <5><6><7>cmti7% <8>cmti8% <9>cmti9% <10><10.95>cmti10% <12><14.4><17.28><20.74><24.88><29.86><35.83><42.99><51.59>cmti12% }{} \DeclareFontShape{OT1}{cmr}{m}{sc}{% <5><6><7><8><9><10><10.95><12>% <14.4><17.28><20.74><24.88><29.86><35.83><42.99><51.59>cmcsc10% }{} \DeclareFontShape{OT1}{cmr}{m}{ui}{% <5><6><7><8><9><10><10.95><12>% <14.4><17.28><20.74><24.88><29.86><35.83><42.99><51.59>cmu10% }{} \DeclareFontShape{OT1}{cmr}{b}{n}{% <5><6><7><8><9><10><10.95><12>% <14.4><17.28><20.74><24.88><29.86><35.83><42.99><51.59>cmb10% }{} \DeclareFontShape{OT1}{cmr}{bx}{n}{% <5><6><7><8><9>gen*cmbx% <10><10.95>cmbx10% <12><14.4><17.28><20.74><24.88><29.86><35.83><42.99><51.59>cmbx12% }{} \DeclareFontShape{OT1}{cmr}{bx}{sl}{% <5><6><7><8><9>% <10><10.95><12><14.4><17.28><20.74><24.88><29.86><35.83><42.99>% <51.59>cmbxsl10% }{} \DeclareFontShape{OT1}{cmr}{bx}{it}{% <5><6><7><8><9>% <10><10.95><12><14.4><17.28><20.74><24.88><29.86><35.83><42.99>% <51.59>cmbxti10% }{} \input{size\@ptsize.clo} \RequirePackage{exscale} % \end{macrocode} % % \subsubsection{Старые команды изменения начертания шрифтов (без NFSS)} % % Изменение начертания в текстовом режиме. % \begin{macrocode} \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} \DeclareOldFontCommand{\it}{\normalfont\itshape} {\mathit} \DeclareOldFontCommand{\sl}{\normalfont\slshape} {\@nomath\sl} \DeclareOldFontCommand{\sc}{\normalfont\scshape} {\@nomath\sc} % \end{macrocode} % В математическом режиме. % \begin{macrocode} \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} % \end{macrocode} % Команда, объединяющая |\newlength| и |\setlength|. % \DescribeMacro{\Dis@deflength}\index{Макросы!\verb*+\Dis"@deflength+} % \begin{macrocode} \providecommand\Dis@deflength[2]{\newlength{#1}\setlength{#1}{#2}} \providecommand\ifundeflength[2]{% \ifx#1\undefined \newlength{#1}\setlength{#1}{#2} \else \relax \fi } % \end{macrocode} % % \subsection{Параметры текста} % % \DescribeMacro{\lineskip}\index{Интервалы!\verb*+\lineskip+} % \DescribeMacro{\normallineskip}\index{Интервалы!\verb*+\normallineskip+} % Вертикальный интервал между строками. Упоминаемый здесь и далее макрос % |\p@| определяет стандартную единицу длины. По умолчанию она равна % английскому пункту (pt). % \begin{macrocode} \setlength\lineskip{1\p@} \setlength\normallineskip{1\p@} % \end{macrocode} % \DescribeMacro{\Dis@singlespacing} \index{Макросы!\verb*+\Dis"@singlespacing+} % \DescribeMacro{\Dis@onehalfspacing}\index{Макросы!\verb*+\Dis"@onehalfspacing+} % \DescribeMacro{\Dis@doublespacing} \index{Макросы!\verb*+\Dis"@doublespacing+} % Характерные величины межстрочнах интервалов. % \begin{macrocode} \newcommand\Dis@singlespacing {\renewcommand\baselinestretch{1}\normalsize} \newcommand\Dis@onehalfspacing{\renewcommand\baselinestretch{1.5}\normalsize} \newcommand\Dis@doublespacing {\renewcommand\baselinestretch{2}\normalsize} % \end{macrocode} % Межстрочный интервал по умолчанию. % \begin{macrocode} \Dis@onehalfspacing % \end{macrocode} % \DescribeMacro{\parindent}\index{Интервалы!\verb*+\parindent+} % Абзацный отступ. % \begin{macrocode} \setlength\parindent{5ex} % \end{macrocode} % Интервал между абзацами (добавляется к межстрочному). % \DescribeMacro{\parskip}\index{Интервалы!\verb*+\parskip+} % \begin{macrocode} \setlength\parskip{0\p@ \@plus \p@} % \end{macrocode} % % Интервал между колонками текста. % \DescribeMacro{\columnsep}\index{Интервалы!\verb*+\columnsep+} % \begin{macrocode} \setlength\columnsep{10\p@} % \end{macrocode} % % Ширина разделителя (линии) между колонками текста (по умолчанию его нет). % \DescribeMacro{\columnseprule}\index{Интервалы!\verb*+\columnseprule+} % \begin{macrocode} \setlength\columnseprule{0\p@} % \end{macrocode} % Характерные величины штрафов. Штраф --- мера <<красоты>> разбиения % абзаца на строки. Чем больше величина, тем менее красиво. % \begin{macrocode} \@lowpenalty 51 \@medpenalty 151 \@highpenalty 301 % \end{macrocode} % Всегда ставить отступ в первой строке первого абзаца. % \begin{macrocode} \let\@afterindentfalse\@afterindenttrue \@afterindenttrue % \end{macrocode} % Перенос в словах с дефисом. % \begin{macrocode} \lccode`\-=`\- \defaulthyphenchar=127 % \end{macrocode} % Пустое определение макроса для вывода сегодняшней даты (переопределяется % в \pkg{babel}). % \DescribeMacro{\today}\index{Макросы!\verb*+\today+} % \begin{macrocode} \newcommand\today{} % % \end{macrocode}