nn-report/preamble.tex

63 lines
2.7 KiB
TeX
Raw Permalink 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.

% --- ПРЕАМБУЛА: ПОДКЛЮЧАЕМЫЕ ПАКЕТЫ И НАСТРОЙКИ ---
% --- КОДИРОВКА И ЯЗЫК ---
\usepackage[T2A]{fontenc} % Кодировка для кириллицы
\usepackage[utf8]{inputenc} % Кодировка исходного файла
\usepackage[russian]{babel} % Поддержка русского языка
\usepackage{titling}
\usepackage{sourcecodepro}
% --- ГЕОМЕТРИЯ СТРАНИЦЫ (ПОЛЯ) ПО ГОСТ 7.32-2017 ---
\usepackage[left=3cm, right=1.5cm, top=2cm, bottom=2cm]{geometry}
% --- ШРИФТЫ И ИНТЕРВАЛЫ ---
\usepackage{setspace}
\onehalfspacing % Полуторный интервал
\usepackage{indentfirst} % Красная строка для первого абзаца в разделе
\usepackage{titlesec}
\titleformat{\chapter}[display]{\fontsize{16pt}{16pt}\bfseries}{}{5pt}{}
\titlespacing{\chapter}{0pt}{24pt}{1\baselineskip}
\titleformat{\section}[display]{\fontsize{14pt}{14pt}\bfseries}{}{5pt}{\arabic{section} }
% --- МАТЕМАТИКА ---
\usepackage{amsmath, amsfonts, amssymb, amsthm, mathtools}
% --- ГРАФИКА ---
\usepackage{graphicx}
\graphicspath{{images/}} % Указываем папку для изображений
\usepackage{caption} % Для настройки подписей к рисункам и таблицам
\captionsetup[figure]{labelsep=period, name=Рисунок} % Подпись "Рисунок 1."
\captionsetup[table]{labelsep=period, name=Таблица} % Подпись "Таблица 1."
% --- БИБЛИОГРАФИЯ (ГОСТ) ---
\usepackage[
backend=biber,
style=gost-numeric, % Стиль цитирования по ГОСТ
sorting=none
]{biblatex}
\addbibresource{references.bib} % Файл с библиографией
\usepackage{listings}
\usepackage{xcolor}
\lstdefinestyle{compactpython}{
language=Python,
basicstyle=\ttfamily\footnotesize, % Smaller font
upquote=true, % Correct quotes
commentstyle=\color{gray}\itshape, % Smaller, italic comments
keywordstyle=\color{blue}\bfseries, % Bold keywords
stringstyle=\color{red}, % Red strings
numberstyle=\tiny\color{gray}, % Tiny line numbers
numbers=left, % No line numbers (or 'left' if desired)
frame=single, % No frame around the listing
showstringspaces=false, % Don't show spaces in strings
breaklines=true, % Allow lines to break
tabsize=2, % Smaller tab size
% For even more compactness, consider removing line numbers, frames, or captions.
% numbers=none,
% frame=none,
% captionpos=b, % Caption below
}
% --- ГИПЕРССЫЛКИ И НАВИГАЦИЯ (опционально, но удобно для PDF) ---
\usepackage[unicode, colorlinks=true, linkcolor=blue, citecolor=green]{hyperref}