Чистка шаблона

This commit is contained in:
Andrei Astafev 2020-05-16 11:34:28 +03:00
parent becbeb607d
commit 8741960836
2 changed files with 127 additions and 100 deletions

View File

@ -1,58 +1,42 @@
\PassOptionsToPackage{unicode=true}{hyperref} %%%%% Проверка версии компилятора
%
% Проверка версии компилятора
%
\usepackage{ifxetex} \usepackage{ifxetex}
% %%%%% Функции для работы с размерностями и счётчиками
% Функции для работы с размерностями и счётчиками
%
\usepackage{calc} \usepackage{calc}
% %%%%% Параметры страницы
% Параметры страницы
%
\usepackage{geometry} \usepackage{geometry}
% %%%%% Межстрочный интервал
% Межстрочный интервал
%
\usepackage{setspace} \usepackage{setspace}
% \onehalfspacing работает только для шрифтов 10pt, 11pt, 12pt
% Указываем явное значение %%%%% \onehalfspacing работает только для шрифтов 10pt, 11pt, 12pt
%%%%% Указываем явное значение
\setstretch{1.25} \setstretch{1.25}
% %%%%% Отступ первой строки в параграфе
% Отступ первой строки в параграфе
%
\setlength{\parindent}{12.5mm} \setlength{\parindent}{12.5mm}
\usepackage{indentfirst} \usepackage{indentfirst}
% %%%%% Правила для висячих строк
% Правила для висячих строк
%
\usepackage[defaultlines=3,all]{nowidow} \usepackage[defaultlines=3,all]{nowidow}
% %%%%% Защита от строк на полях (добавление 3 виртуальных пустых символов)
% Защита от строк на полях (добавление 3 виртуальных пустых символов)
%
\setlength{\emergencystretch}{3em} \setlength{\emergencystretch}{3em}
%%%%% Оптимизация расстановки переносов и длины последней строки абзаца
\IfFileExists{impnattypo.sty}{\usepackage[hyphenation, lastparline]{impnattypo}}{}
%%%%% Поддержка переносоустойчивых подчёркиваний и зачёркиваний
\usepackage{soulutf8}
%%%%% Запятая в десятичных дробях
\usepackage{icomma}
%%%%% Работа с цветом
%
% Работа с цветом
%
\usepackage[dvipsnames,svgnames*,x11names*]{xcolor} \usepackage[dvipsnames,svgnames*,x11names*]{xcolor}
%%%%% Оформление блоков исходных текстов (обязательно перед локализацией)
%
% Оформление блоков исходных текстов (обязательно перед локализацией)
%
\usepackage{fancyvrb} \usepackage{fancyvrb}
\ifxetex \ifxetex
% Break long lines of code % Break long lines of code
@ -60,13 +44,11 @@
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,commandchars=\\\{\}} \DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,commandchars=\\\{\}}
\fi \fi
\VerbatimFootnotes % allows verbatim text in footnotes \VerbatimFootnotes % allows verbatim text in footnotes
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\usepackage{listings} \usepackage{listings}
\newcommand{\passthrough}[1]{#1} \newcommand{\passthrough}[1]{#1}
\lstset{defaultdialect=[5.3]Lua} \lstset{defaultdialect=[5.3]Lua}
\lstset{defaultdialect=[x86masm]Assembler} \lstset{defaultdialect=[x86masm]Assembler}
%
%
%
@ -89,17 +71,6 @@
\usepackage{array} \usepackage{array}
%
%
%
\usepackage{siunitx}
\sisetup{range-phrase = \text{...}}
\usepackage{physics}
\usepackage{eqexpl}
\eqexplSetIntro{где}
\providecommand{\strong}[1]{\textbf{#1}}
\newcounter{fontsnotfound} \newcounter{fontsnotfound}
\newcommand{\iffontsexist}[3]{ \newcommand{\iffontsexist}[3]{
\setcounter{fontsnotfound}{0} \setcounter{fontsnotfound}{0}
@ -111,9 +82,18 @@
\fi \fi
} }
%%%%% Математика
\usepackage{amsthm,amsmath,amscd} % Математические дополнения от AMS
\usepackage{amsfonts,amssymb} % Математические дополнения от AMS
\usepackage{mathtools} % Добавляет окружение multlined
\usepackage{xfrac} % Красивые дроби
%%%%% Шрифты
\ifxetex \ifxetex
\usepackage{amssymb,amsmath} \usepackage[no-math]{fontspec} % Вместо fontspec
\usepackage{mathspec} % Вместо fontspec \usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text} \defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}
\defaultfontfeatures[\rmfamily]{Scale=1} \defaultfontfeatures[\rmfamily]{Scale=1}
\setsansfont[Mapping=tex-text]{Arial} \setsansfont[Mapping=tex-text]{Arial}
@ -125,13 +105,29 @@
\newfontfamily\listingsfontinline{Pragmata Pro Mono Bold} \newfontfamily\listingsfontinline{Pragmata Pro Mono Bold}
\DeclareSymbolFont{letters}{\encodingdefault}{\rmdefault}{m}{it} \DeclareSymbolFont{letters}{\encodingdefault}{\rmdefault}{m}{it}
\else \else
\usepackage{unicode-math}
\fi \fi
%
% Настройка локализации %%%%% Размерности SI (обязательно после fontspec, amsmath, unicode-math)
% \usepackage{siunitx}
\usepackage{csquotes} \sisetup{
exponent-product = \ensuremath { \cdot },
inter-unit-product = \ensuremath { \cdot },
output-decimal-marker = { , },
list-separator = {;\,},
list-final-separator = {;\,},
list-pair-separator = {;\,},
range-phrase = {\text{...}},
quotient-mode = fraction, % красивые дроби могут не соответствовать ГОСТ
fraction-function = \sfrac,
separate-uncertainty
}
\usepackage{physics}
\usepackage{eqexpl}
\eqexplSetIntro{где}
%%%%% Локализация
\ifxetex \ifxetex
\usepackage{textcase} \usepackage{textcase}
\usepackage{xltxtra} \usepackage{xltxtra}
@ -145,6 +141,10 @@
\setmathfont{XITS Math} \setmathfont{XITS Math}
\defaultfontfeatures{Scale=MatchLowercase} \defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\IfFileExists{microtype.sty}{ % use microtype if available
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\else \else
\usepackage{cmap} \usepackage{cmap}
\usepackage[T1]{fontenc} \usepackage[T1]{fontenc}
@ -152,45 +152,56 @@
\usepackage[russian]{babel} \usepackage[russian]{babel}
\fi \fi
% При переносе оставлять минимум 3 символа на первой строке и 3 на второй %%%%% При переносе оставлять минимум 3 символа на первой строке и 3 на второй
\renewcommand\russianhyphenmins{33} \renewcommand\russianhyphenmins{33}
% Использовать для кавычек-ёлочек данные символы %%%%% Использовать для кавычек-ёлочек данные символы
\usepackage{csquotes}
\renewcommand{\flqq}{«} \renewcommand{\flqq}{«}
\renewcommand{\frqq}{»} \renewcommand{\frqq}{»}
\IfFileExists{upquote.sty}{\usepackage{upquote}}{} %%%%% Оформление URL, разрешение переносов
\IfFileExists{microtype.sty}{ % use microtype if available
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
%
% Оформление URL, разрешение переносов
%
\usepackage[hyphens]{xurl} \usepackage[hyphens]{xurl}
% Использование того же шрифта, что и в окружающем тексте %%%%% Использование того же шрифта, что и в окружающем тексте
\urlstyle{same} \urlstyle{same}
%
%
%
\usepackage[
\usepackage{hyperref}
\hypersetup{
unicode=true, unicode=true,
bookmarks=true,
bookmarksnumbered=false, bookmarksnumbered=false,
bookmarksopen=false, bookmarksopen=false,
colorlinks=true, colorlinks=true, % ссылки отображаются цветным текстом
linkcolor={Maroon}, % цвет ссылок типа ref, eqref и подобных
filecolor={Maroon}, %
citecolor={Blue}, % цвет ссылок-цитат
urlcolor={Blue}, % цвет гиперссылок
linktocpage=true, % ссылки с номера страницы в оглавлении, списке таблиц и списке рисунков
pdfborder={0 0 0}, pdfborder={0 0 0},
pdfborderstyle={}, pdfborderstyle={},
pdfpagelabels=false, % set PDF page labels (true|false)
pdflang={ru}
]{hyperref}
\makeatletter
\AtBeginDocument{
\hypersetup{
breaklinks=false, breaklinks=false,
linkcolor=Maroon, % linktoc=all, % both the section and page part are links
filecolor=Maroon, plainpages=false, % Forces page anchors to be named by the Arabic form of the page number, rather than the formatted form
citecolor=Blue, % hidelinks, % Hide links (removing color and border)
urlcolor=Blue, pdftitle={\@title}, % Заголовок
pdfauthor={\@author}, % Автор
% pdfsubject={\thesisSpecialtyNumber\ \thesisSpecialtyTitle}, % Тема
% pdfcreator={Создатель}, % Создатель, Приложение
% pdfproducer={Производитель},% Производитель, Производитель PDF
pdfkeywords={}, % Ключевые слова
} }
}
\makeatother
%bookmarks=true, %bookmarks=true,
% pdftitle={\@title}, % pdftitle={\@title},
% pdfauthor={\@author}, % pdfauthor={\@author},
@ -201,24 +212,27 @@
% backref=false]{hyperref} % backref=false]{hyperref}
% %%%%% Добавление модификатора H для размещения объектов
% Настройка таблиц \usepackage{float}
%
%%%%% Команда \FloatBarrier
\usepackage{placeins}
%%%%% Настройка таблиц
\usepackage{xltabular} \usepackage{xltabular}
\usepackage{ltcaption}
\usepackage{multirow} \usepackage{multirow}
\usepackage{makecell}
\newcommand{\HY}{\hyphenpenalty=25\exhyphenpenalty=25} \newcommand{\HY}{\hyphenpenalty=25\exhyphenpenalty=25}
\newcolumntype{Z}{>{\HY\raggedright\arraybackslash\hspace{0pt}}X} \newcolumntype{Z}{>{\HY\raggedright\arraybackslash\hspace{0pt}}X}
\newcolumntype{M}{>{\HY\RaggedRight\arraybackslash\hspace{0pt}}c} \newcolumntype{M}{>{\HY\RaggedRight\arraybackslash\hspace{0pt}}c}
\newcolumntype{L}{>{\HY\RaggedRight\arraybackslash\hspace{0pt}}l} \newcolumntype{L}{>{\HY\RaggedRight\arraybackslash\hspace{0pt}}l}
% Обязательно после hyperref %%%%% Заголовок на последней странице таблицы (обязательно после hyperref)
\usepackage{fr-longtable} \usepackage{fr-longtable}
%%%%% Автоматический подгон ширины подписи таблицы
\usepackage{threeparttable}
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
% Redefines (sub)paragraphs to behave more like sections % Redefines (sub)paragraphs to behave more like sections
\ifx\paragraph\undefined\else \ifx\paragraph\undefined\else
@ -230,9 +244,8 @@
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi \fi
%
% Подключение изображений (желательно после локализации) %%%%% Подключение изображений (желательно после локализации)
%
\usepackage{graphicx} \usepackage{graphicx}
\usepackage[encoding,filenameencoding=utf8,extendedchars]{grffile} \usepackage[encoding,filenameencoding=utf8,extendedchars]{grffile}
@ -245,10 +258,22 @@
% using explicit options in \includegraphics[width, height, ...]{} % using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Расположение по умолчанию %%%%% Расположение по умолчанию
\makeatletter \makeatletter
\def\fps@figure{htbp} \def\fps@figure{Htbp}
\makeatother \makeatother
%
% \providecommand{\tabularnewline}{\\}
% \providecommand{\strong}[1]{\textbf{#1}}
\providecommand{\No}{\textnumero}
%%%%% Компактный список
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\AtBeginDocument{
\def\labelitemi{\textendash}
\def\labelitemii{\(\bullet\)}
}

View File

@ -1,4 +1,3 @@
\PassOptionsToPackage{unicode=true}{hyperref}
\PassOptionsToPackage{a4paper,top=20mm,left=20mm,right=10mm,bottom=15mm}{geometry} \PassOptionsToPackage{a4paper,top=20mm,left=20mm,right=10mm,bottom=15mm}{geometry}
\documentclass[russian,14pt]{extarticle} \documentclass[russian,14pt]{extarticle}
@ -15,9 +14,9 @@
\usepackage{lipsum} \usepackage{lipsum}
\author{} \author{Автор}
\date{} \date{}
\title{} \title{Название}
\makeglossaries \makeglossaries
@ -25,7 +24,10 @@
\begin{document} \begin{document}
\maketitle \maketitle
\No
\lipsum[1] \lipsum[1]
\end{document} \end{document}