|
|
|
@ -10,6 +10,9 @@ $if(latex-dir-rtl)$
|
|
|
|
|
\PassOptionsToPackage{RTLdocument}{bidi}
|
|
|
|
|
$endif$
|
|
|
|
|
$endif$
|
|
|
|
|
$if(CJKmainfont)$
|
|
|
|
|
\PassOptionsToPackage{space}{xeCJK}
|
|
|
|
|
$endif$
|
|
|
|
|
%
|
|
|
|
|
\documentclass[
|
|
|
|
|
$if(fontsize)$
|
|
|
|
@ -55,9 +58,9 @@ $for(beameroption)$
|
|
|
|
|
\setbeameroption{$beameroption$}
|
|
|
|
|
$endfor$
|
|
|
|
|
% Prevent slide breaks in the middle of a paragraph
|
|
|
|
|
\widowpenalties 1 10000
|
|
|
|
|
\widowpenalty10000
|
|
|
|
|
\clubpenalty10000
|
|
|
|
|
\raggedbottom
|
|
|
|
|
\usepackage[defaultlines=3,all]{nowidow}
|
|
|
|
|
$if(section-titles)$
|
|
|
|
|
\setbeamertemplate{part page}{
|
|
|
|
|
\centering
|
|
|
|
@ -127,15 +130,17 @@ $endif$
|
|
|
|
|
$if(mainfont)$
|
|
|
|
|
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
|
|
|
|
|
$else$
|
|
|
|
|
\setmainfont[Scale=1.0]{Georgia}
|
|
|
|
|
\setmainfont[Scale=1.0]{PT Serif}
|
|
|
|
|
$endif$
|
|
|
|
|
$if(sansfont)$
|
|
|
|
|
\setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
|
|
|
|
|
$else$
|
|
|
|
|
\setmainfont[Scale=1.0]{PT Sans}
|
|
|
|
|
$endif$
|
|
|
|
|
$if(monofont)$
|
|
|
|
|
\setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$monofont$}
|
|
|
|
|
$else$
|
|
|
|
|
\setmonofont[Scale=0.75]{Pragmata Pro}
|
|
|
|
|
\setmonofont[Scale=0.75]{Iosevka Prog}
|
|
|
|
|
$endif$
|
|
|
|
|
$for(fontfamilies)$
|
|
|
|
|
\newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$}
|
|
|
|
@ -169,6 +174,12 @@ $if(CJKmainfont)$
|
|
|
|
|
\fi
|
|
|
|
|
$endif$
|
|
|
|
|
\fi
|
|
|
|
|
|
|
|
|
|
\setlength{\parindent}{12.5mm}
|
|
|
|
|
\usepackage[defaultlines=3,all]{nowidow}
|
|
|
|
|
\usepackage[nobottomtitles]{titlesec}
|
|
|
|
|
\renewcommand{\bottomtitlespace}{.15\textheight}
|
|
|
|
|
|
|
|
|
|
$if(beamer)$
|
|
|
|
|
$if(theme)$
|
|
|
|
|
\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$}
|
|
|
|
@ -195,14 +206,15 @@ $endif$
|
|
|
|
|
\usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
|
|
|
|
|
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
|
|
|
|
|
}{}
|
|
|
|
|
\usepackage{indentfirst}
|
|
|
|
|
$if(indent)$
|
|
|
|
|
$else$
|
|
|
|
|
\makeatletter
|
|
|
|
|
\@ifundefined{KOMAClassName}{% if non-KOMA class
|
|
|
|
|
\IfFileExists{parskip.sty}{%
|
|
|
|
|
\usepackage{parskip}
|
|
|
|
|
}{% else
|
|
|
|
|
\setlength{\parindent}{0pt}
|
|
|
|
|
}{% else%
|
|
|
|
|
\setlength{\parindent}{12.5mm}
|
|
|
|
|
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
|
|
|
|
|
}{% if KOMA class
|
|
|
|
|
\KOMAoptions{parskip=half}}
|
|
|
|
@ -221,6 +233,9 @@ $endif$
|
|
|
|
|
$if(author-meta)$
|
|
|
|
|
pdfauthor={$author-meta$},
|
|
|
|
|
$endif$
|
|
|
|
|
$if(lang)$
|
|
|
|
|
pdflang={$lang$},
|
|
|
|
|
$endif$
|
|
|
|
|
$if(subject)$
|
|
|
|
|
pdfsubject={$subject$},
|
|
|
|
|
$endif$
|
|
|
|
@ -239,7 +254,7 @@ $endif$
|
|
|
|
|
}
|
|
|
|
|
\urlstyle{same} % disable monospaced font for URLs
|
|
|
|
|
$if(verbatim-in-note)$
|
|
|
|
|
\VerbatimFootnotes % allows verbatim text in footnotes
|
|
|
|
|
\VerbatimFootnotes % allow verbatim text in footnotes
|
|
|
|
|
$endif$
|
|
|
|
|
$if(geometry)$
|
|
|
|
|
\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
|
|
|
|
@ -262,7 +277,11 @@ $if(highlighting-macros)$
|
|
|
|
|
$highlighting-macros$
|
|
|
|
|
$endif$
|
|
|
|
|
$if(tables)$
|
|
|
|
|
\usepackage{longtable,booktabs}
|
|
|
|
|
\usepackage{longtable,booktabs,array}
|
|
|
|
|
$if(multirow)$
|
|
|
|
|
\usepackage{multirow}
|
|
|
|
|
$endif$
|
|
|
|
|
\usepackage{calc} % for calculating minipage widths
|
|
|
|
|
$if(beamer)$
|
|
|
|
|
\usepackage{caption}
|
|
|
|
|
% Make caption package work with longtable
|
|
|
|
@ -270,6 +289,11 @@ $if(beamer)$
|
|
|
|
|
\def\fnum@table{\tablename~\thetable}
|
|
|
|
|
\makeatother
|
|
|
|
|
$else$
|
|
|
|
|
% Correct order of tables after \paragraph or \subparagraph
|
|
|
|
|
\usepackage{etoolbox}
|
|
|
|
|
\makeatletter
|
|
|
|
|
\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
|
|
|
|
|
\makeatother
|
|
|
|
|
% Allow footnotes in longtable head/foot
|
|
|
|
|
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
|
|
|
|
|
\makesavenoteenv{longtable}
|
|
|
|
@ -357,6 +381,9 @@ $else$
|
|
|
|
|
\usepackage[shorthands=off,russian]{babel}
|
|
|
|
|
\fi
|
|
|
|
|
$endif$
|
|
|
|
|
\ifluatex
|
|
|
|
|
\usepackage{selnolig} % disable illegal ligatures
|
|
|
|
|
\fi
|
|
|
|
|
$if(dir)$
|
|
|
|
|
\ifxetex
|
|
|
|
|
% Load bidi as late as possible as it modifies e.g. graphicx
|
|
|
|
@ -380,6 +407,78 @@ $for(bibliography)$
|
|
|
|
|
\addbibresource{$bibliography$}
|
|
|
|
|
$endfor$
|
|
|
|
|
$endif$
|
|
|
|
|
$if(csl-refs)$
|
|
|
|
|
\newlength{\cslhangindent}
|
|
|
|
|
\setlength{\cslhangindent}{1.5em}
|
|
|
|
|
\newlength{\csllabelwidth}
|
|
|
|
|
\setlength{\csllabelwidth}{3em}
|
|
|
|
|
\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
|
|
|
|
|
{% don't indent paragraphs
|
|
|
|
|
\setlength{\parindent}{0pt}
|
|
|
|
|
% turn on hanging indent if param 1 is 1
|
|
|
|
|
\ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi
|
|
|
|
|
% set entry spacing
|
|
|
|
|
\ifnum #2 > 0
|
|
|
|
|
\setlength{\parskip}{#2\baselineskip}
|
|
|
|
|
\fi
|
|
|
|
|
}%
|
|
|
|
|
{}
|
|
|
|
|
\usepackage{calc}
|
|
|
|
|
\newcommand{\CSLBlock}[1]{#1\hfill\break}
|
|
|
|
|
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
|
|
|
|
|
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
|
|
|
|
|
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
|
|
|
|
|
$endif$
|
|
|
|
|
$if(csquotes)$
|
|
|
|
|
\usepackage{csquotes}
|
|
|
|
|
$endif$
|
|
|
|
|
|
|
|
|
|
\RequirePackage{enumitem} % убрать вертикальный отступ перед списками
|
|
|
|
|
|
|
|
|
|
\setlist[itemize]{%
|
|
|
|
|
topsep=0pt,
|
|
|
|
|
parsep=0pt,
|
|
|
|
|
leftmargin=0cm,
|
|
|
|
|
listparindent=\parindent{},
|
|
|
|
|
itemindent=\labelwidth{}
|
|
|
|
|
}
|
|
|
|
|
\setlist[enumerate]{%
|
|
|
|
|
topsep=0pt,
|
|
|
|
|
parsep=0pt,
|
|
|
|
|
leftmargin=0cm,
|
|
|
|
|
listparindent=\parindent{},
|
|
|
|
|
itemindent=\labelwidth{}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
\AddEnumerateCounter{\asbuk}{\@asbuk}{\cyra}
|
|
|
|
|
|
|
|
|
|
\renewcommand{\theenumi}{\arabic{enumi}}
|
|
|
|
|
\renewcommand{\labelenumi}{\theenumi)}
|
|
|
|
|
\renewcommand{\theenumii}{\asbuk{enumi}}
|
|
|
|
|
\renewcommand{\labelenumii}{\theenumii)}
|
|
|
|
|
|
|
|
|
|
\renewcommand{\labelitemi}{\bfseries\textemdash}
|
|
|
|
|
\renewcommand{\labelitemii}{\bfseries\textemdash}
|
|
|
|
|
\renewcommand{\labelitemiii}{\bfseries\textemdash}
|
|
|
|
|
\renewcommand{\labelitemiv}{\bfseries\textemdash}
|
|
|
|
|
|
|
|
|
|
%\renewcommand{\@listi}{%
|
|
|
|
|
% \setlength{\itemsep}{0pt}}
|
|
|
|
|
%\renewcommand{\@listii}{%
|
|
|
|
|
% \setlength{\itemsep}{0pt}}
|
|
|
|
|
%\renewcommand{\@listiii}{%
|
|
|
|
|
% \setlength{\itemsep}{0pt}}
|
|
|
|
|
%\renewcommand{\@listiv}{%
|
|
|
|
|
% \setlength{\itemsep}{0pt}}
|
|
|
|
|
%\let\@listI\@listi
|
|
|
|
|
%\@listi
|
|
|
|
|
|
|
|
|
|
\setlength{\labelwidth}{\parindent}
|
|
|
|
|
\addtolength{\labelwidth}{\labelsep}
|
|
|
|
|
\addtolength{\labelwidth}{0.7em}
|
|
|
|
|
\setlength{\itemindent}{0pt}
|
|
|
|
|
\setlength{\leftmargin}{\labelwidth}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$if(title)$
|
|
|
|
|
\title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
|
|
|
|
@ -412,6 +511,46 @@ $if(logo)$
|
|
|
|
|
$endif$
|
|
|
|
|
$endif$
|
|
|
|
|
|
|
|
|
|
\usepackage{float}
|
|
|
|
|
\let\origfigure=\figure
|
|
|
|
|
\let\endorigfigure=\endfigure
|
|
|
|
|
\renewenvironment{figure}[1][]{%
|
|
|
|
|
\origfigure[H]
|
|
|
|
|
\centering
|
|
|
|
|
}{%
|
|
|
|
|
\endorigfigure
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
\usepackage{acro}
|
|
|
|
|
\NewAcroTemplate[list]{acrolist}{%
|
|
|
|
|
\AcroNeedPackage{array}%
|
|
|
|
|
\acronymsmapF{%
|
|
|
|
|
\AcroAddRow{
|
|
|
|
|
\acrowrite{short}%
|
|
|
|
|
\acroifT{alt}{/\acrowrite{alt}}
|
|
|
|
|
&~---~
|
|
|
|
|
\acrowrite{list}%
|
|
|
|
|
\acroifanyT{foreign,extra}{ (}%
|
|
|
|
|
\acroifT{foreign}{\acrowrite{foreign}\acroifT{extra}{, }}%
|
|
|
|
|
\acroifT{extra}{\acrowrite{extra}}%
|
|
|
|
|
\acroifanyT{foreign,extra}{)}%
|
|
|
|
|
\acropagefill
|
|
|
|
|
\acropages
|
|
|
|
|
{\acrotranslate{page}\nobreakspace}
|
|
|
|
|
{\acrotranslate{pages}\nobreakspace}%
|
|
|
|
|
\tabularnewline
|
|
|
|
|
}%
|
|
|
|
|
}
|
|
|
|
|
{\AcroRerun}%
|
|
|
|
|
\acroheading
|
|
|
|
|
\acropreamble
|
|
|
|
|
\par\noindent
|
|
|
|
|
\begin{tabular}{>{}lp{.7\linewidth}}
|
|
|
|
|
\AcronymTable
|
|
|
|
|
\end{tabular}
|
|
|
|
|
}
|
|
|
|
|
\acsetup{make-links = true, pdfcomments/use = true, list/template = acrolist, first-style = short}
|
|
|
|
|
|
|
|
|
|
\begin{document}
|
|
|
|
|
$if(has-frontmatter)$
|
|
|
|
|
\frontmatter
|
|
|
|
@ -434,11 +573,12 @@ $include-before$
|
|
|
|
|
|
|
|
|
|
$endfor$
|
|
|
|
|
$if(toc)$
|
|
|
|
|
\cleardoublepage
|
|
|
|
|
$if(toc-title)$
|
|
|
|
|
\renewcommand*\contentsname{$toc-title$}
|
|
|
|
|
$endif$
|
|
|
|
|
$if(beamer)$
|
|
|
|
|
\begin{frame}
|
|
|
|
|
\begin{frame}[allowframebreaks]
|
|
|
|
|
$if(toc-title)$
|
|
|
|
|
\frametitle{$toc-title$}
|
|
|
|
|
$endif$
|
|
|
|
@ -453,6 +593,7 @@ $endif$
|
|
|
|
|
\tableofcontents
|
|
|
|
|
}
|
|
|
|
|
$endif$
|
|
|
|
|
\cleardoublepage
|
|
|
|
|
$endif$
|
|
|
|
|
$if(lot)$
|
|
|
|
|
\listoftables
|
|
|
|
|