nm-coursework/config.tex
AVAtarMod 1285da87e5
config: Update math symbos, style
- Replace quotation marks symbols to <<, >>
- Fix TOC, itemize list style
2023-08-22 14:36:50 +03:00

240 lines
6.0 KiB
TeX
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

\documentclass[oneside,final,14pt]{extreport}
\usepackage[utf8]{inputenc}
\usepackage[T2A,T1]{fontenc}
\usepackage[russian]{babel}
\usepackage{threeparttable}
\usepackage[labelsep=endash,tableposition=top,labelfont=md,textfont=md]{caption}
\usepackage{indentfirst}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{array}
\usepackage{graphicx}
\usepackage[compact]{titlesec}
\usepackage{titletoc}
\usepackage{xinttools}
\usepackage{ragged2e}
\usepackage{listingsutf8}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{color}
\usepackage{xstring}
\usepackage{tabularx}
\usepackage{enumitem}
\usepackage[strict=true]{csquotes}
\usepackage[abspath]{currfile}
\usepackage[hidelinks,linktoc=all]{hyperref}
% ОТЛАДОЧНЫЕ ФУНКЦИИ --------------------
% \usepackage{showframe}
% ПОЛЯ ----------------------------------
\usepackage{geometry}
\geometry{
a4paper,
% total={170mm,257mm},
left=30mm,
top=15mm,
right=15mm,
bottom=20mm
}
% ОФОРМЛЕНИЕ СОДЕРЖАНИЯ -----------------
\addto\captionsrussian{
\renewcommand{\contentsname}%
{\normalsize \MakeUppercase{Содержание}}%
}
\dottedcontents{chapter}[0cm]{}{1em}{2mm}
\titlecontents{chapter}
[0em]
{}
{\thecontentslabel. }
{}
{\titlerule*[2mm]{.}\contentspage}
\titlecontents{section}
[1.5em] % 1.5em (chapter) + 2.3em
{}
{\thecontentslabel. }
{\hspace*{-2.3em}}
{\titlerule*[2mm]{.}\contentspage}
\titlecontents{subsection}
[3.5em] % 1.5em (chapter) + 2.3em
{}
{\thecontentslabel. }
{\hspace*{-2.3em}}
{\titlerule*[2mm]{.}\contentspage}
% ОФОРМЛЕНИЕ ЗАГОЛОВКОВ -----------------
% В т.ч. и содержания
\titleformat{\paragraph}[runin]
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph} {\parindent}{3.25ex plus 1ex minus .2ex}{1em}
\titleformat{\chapter}[display]{\normalfont\large\bfseries}{}{0cm}{\large\centering}
\titleformat{\section}
{\normalfont\large\bfseries}{\thesection}{5mm}{}
\makeatletter
% NormalTeXSyntaxON
\def\@makechapterhead#1{%
\vspace*{0\p@}%
{\parindent \z@ \raggedright \normalfont \setstretch{1.2}
\interlinepenalty\@M
\large \bfseries \space \thechapter. #1\par\nobreak
}}
% NormalTeXSyntaxOFF
\titlespacing{\chapter}{0pt}{-5mm}{0cm}
% ОФОРМЛЕНИЕ СПИСКОВ --------------------
\setlist{noitemsep,align=left,left=\parindent,topsep=0pt}
\setlist[itemize]{label=--}
% ОФОРМЛЕНИЕ ЛИСТИНГОВ КОДА -----------------
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstset{
frame=tb,
language=C++,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
basicstyle={\small\ttfamily},
numbers=none,
numberstyle=\tiny\color{gray},
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
tabsize=3,
escapechar={|},
emptylines=0,
}
\newcommand\inputcode[3][]{
{\bfseries #1\filename{#2}}:
\lstinputlisting[%
#3,
]{#2}%
}
% ОФОРМЛЕНИЕ НУМЕРАЦИИ СПИСКОВ ----------------------------------
% Команды ниже переназначают алфавит используемый при нумерации с английского на русский
\makeatletter
\renewcommand*{\@alph}[1]{%
\ifcase#1\or а\or б\or в\or г\or
д\or е\or ё\or ж\or з\or и\or й\or
к\or л\or м\or н\or о\or п\or р\or с\or т\or
у\or ф\or х\or ц\or ч\or
ш\or щ\or ы\or э\or у \or я
\else\@ctrerr\fi
}
\renewcommand*{\@Alph}[1]{%
\ifcase#1\or А\or Б\or В\or Г\or
Д\or Е\or Ё\or Ж\or З\or И\or Й\or
К\or Л\or М\or Н\or О\or П\or Р\or С\or Т\or
У\or Ф\or Х\or Ц\or Ч\or
Ш\or Щ\or Ы\or Э\or У\or Я
\else\@ctrerr\fi
}
\makeatother
\makeatletter
\renewcommand\@biblabel[1]{#1.}
\makeatother
% file path
\newcommand{\runtimeFsep}{/}
\newcommand{\updateRuntimeFsep}{\IfSubStr{\currfileabsdir}{/}{}{\renewcommand{\runtimeFsep}{\backslash}}}
\updateRuntimeFsep
\makeatletter
\DeclareRobustCommand{\filename}[2][]{%
\begingroup
% \lstname seems to change hyphens into \textendash
\def\textendash{-}%
\filename@parse{#2}%
\IfSubStr{\filename@base}{\runtimeFsep}{\filename@parse{\filename@base}}{}%
\edef\filename@base{\detokenize\expandafter{\filename@base}}%
#1{\filename@base.\filename@ext}%
\endgroup
}
\makeatother
% \section*{#1}%
% \addcontentsline{toc}{chapter}{#1}
\newcommand\tcchapter[1]{%
\chapter{#1}%
}
\newcommand\tcsection[1]{%
\section{#1}%
}
\onehalfspacing
% \contentsmargin{2.55em}
\addto\captionsrussian{\renewcommand{\figurename}{Рисунок }}
% URL ---------------
\urlstyle{same}
% ОФОРМЛЕНИЕ ТЕКСТА
\renewcommand{\baselinestretch}{1.5}
\MakeOuterQuote{"}
\makeatletter
\DeclareRobustCommand\vdots{%
\mathpalette\@vdots{}%
}
\newcommand*{\@vdots}[2]{%
% #1: math style
% #2: unused
\sbox0{$#1\cdotp\cdotp\cdotp\m@th$}%
\sbox2{$#1.\m@th$}%
\vbox{%
\dimen@=\wd0 %
\advance\dimen@ -3\ht2 %
\kern.5\dimen@
% remove side bearings
\dimen@=\wd2 %
\advance\dimen@ -\ht2 %
\dimen2=\wd0 %
\advance\dimen2 -\dimen@
\vbox to \dimen2{%
\offinterlineskip
\copy2 \vfill\copy2 \vfill\copy2 %
}%
}%
}
\DeclareRobustCommand\ddots{%
\mathinner{%
\mathpalette\@ddots{}%
\mkern\thinmuskip
}%
}
\newcommand*{\@ddots}[2]{%
% #1: math style
% #2: unused
\sbox0{$#1\cdotp\cdotp\cdotp\m@th$}%
\sbox2{$#1.\m@th$}%
\vbox{%
\dimen@=\wd0 %
\advance\dimen@ -3\ht2 %
\kern.5\dimen@
% remove side bearings
\dimen@=\wd2 %
\advance\dimen@ -\ht2 %
\dimen2=\wd0 %
\advance\dimen2 -\dimen@
\vbox to \dimen2{%
\offinterlineskip
\hbox{$#1\mathpunct{.}\m@th$}%
\vfill
\hbox{$#1\mathpunct{\kern\wd2}\mathpunct{.}\m@th$}%
\vfill
\hbox{$#1\mathpunct{\kern\wd2}\mathpunct{\kern\wd2}\mathpunct{.}\m@th$}%
}%
}%
}
\makeatother