diff options
| -rw-r--r-- | include/bsumain.sty | 287 | ||||
| -rw-r--r-- | include/bsupracticetitle.sty | 68 | ||||
| -rw-r--r-- | src/report/report.tex | 9 | 
3 files changed, 361 insertions, 3 deletions
| diff --git a/include/bsumain.sty b/include/bsumain.sty new file mode 100644 index 0000000..80b608f --- /dev/null +++ b/include/bsumain.sty @@ -0,0 +1,287 @@ +% Source: https://github.com/bsutex/bsustyle/blob/master/style/bsumain.sty + +% Поддержка русского и английского. В частности переносы +\usepackage[english,russian]{babel} +% AMS пакеты для отображения и форматирования математических формул. +\usepackage{amssymb,amsthm,amsmath,amscd} +% Пакет для вставки отбражений +\usepackage{graphicx} +\usepackage{float} +% пакет cite служит для простой вставки ссылок на публикации в работе, если что, +% вызов этого пакета можно закомментировать с помощью символа +\usepackage{cite} + +\usepackage[usenames,dvipsnames]{color} + +\usepackage{listings} +\renewcommand\lstlistingname{Листинг} + +\renewcommand\appendixname{Приложение} +\gdef\appendix{ +  \par +  \setcounter{section}{0} +  \setcounter{subsection}{0} +  \def\thesection{\Asbuk{section}} +  \def\section##1{ +    \refstepcounter{section} +    \setcounter{table}{0} +    \def\thetable{\Asbuk{section}.\arabic{table}} +    \def\thefigure{\Asbuk{section}.\arabic{figure}} +    \goodbreak\noindent{ +      \indent\Large\bf\hbox to 8.5em{\appendixname\ \thesection\hss}\hspace{0.8ex}##1 +    } +    \nobreak\vspace{1em}\nobreak\noindent +    \addcontentsline{toc}{chapter}{\hbox to 8.5em{\appendixname\ \thesection\hss}\hspace{0.8ex}##1} +  } +} + +% Листинг R +\lstloadlanguages{R} +\lstset{ +  language=R,                       % the language of the code +  basicstyle=\footnotesize,         % the size of the fonts that are used for the code +  numbers=left,                     % where to put the line-numbers +  numberstyle=\tiny\color{black},   % the style that is used for the line-numbers +  stepnumber=1,                     % the step between two line-numbers. If it's 1, each line +                                    % will be numbered +  numbersep=5pt,                    % how far the line-numbers are from the code +  backgroundcolor=\color{white},    % choose the background color. You must add \usepackage{color} +  showspaces=false,                 % show spaces adding particular underscores +  showstringspaces=false,           % underline spaces within strings +  showtabs=false,                   % show tabs within strings adding particular underscores +  frame=single,                     % adds a frame around the code +  rulecolor=\color{black},          % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. commens (green here)) +  tabsize=2,                        % sets default tabsize to 2 spaces +  captionpos=b,                     % sets the caption-position to bottom +  breaklines=true,                  % sets automatic line breaking +  breakatwhitespace=false,          % sets if automatic breaks should only happen at whitespace +  title=\lstname,                   % show the filename of files included with \lstinputlisting; +                                    % also try caption instead of title +  escapeinside={\%*}{*)},           % if you want to add a comment within your code +  morekeywords={*,...}              % if you want to add more keywords to the set +} + +% Злостный мегакостыль для поддержки кириллицы в листингах +\lstset{ +  literate= +    {а}{{\selectfont\char224}}1 +    {б}{{\selectfont\char225}}1 +    {в}{{\selectfont\char226}}1 +    {г}{{\selectfont\char227}}1 +    {д}{{\selectfont\char228}}1 +    {е}{{\selectfont\char229}}1 +    {ё}{{\"e}}1 +    {ж}{{\selectfont\char230}}1 +    {з}{{\selectfont\char231}}1 +    {и}{{\selectfont\char232}}1 +    {й}{{\selectfont\char233}}1 +    {к}{{\selectfont\char234}}1 +    {л}{{\selectfont\char235}}1 +    {м}{{\selectfont\char236}}1 +    {н}{{\selectfont\char237}}1 +    {о}{{\selectfont\char238}}1 +    {п}{{\selectfont\char239}}1 +    {р}{{\selectfont\char240}}1 +    {с}{{\selectfont\char241}}1 +    {т}{{\selectfont\char242}}1 +    {у}{{\selectfont\char243}}1 +    {ф}{{\selectfont\char244}}1 +    {х}{{\selectfont\char245}}1 +    {ц}{{\selectfont\char246}}1 +    {ч}{{\selectfont\char247}}1 +    {ш}{{\selectfont\char248}}1 +    {щ}{{\selectfont\char249}}1 +    {ъ}{{\selectfont\char250}}1 +    {ы}{{\selectfont\char251}}1 +    {ь}{{\selectfont\char252}}1 +    {э}{{\selectfont\char253}}1 +    {ю}{{\selectfont\char254}}1 +    {я}{{\selectfont\char255}}1 +    {А}{{\selectfont\char192}}1 +    {Б}{{\selectfont\char193}}1 +    {В}{{\selectfont\char194}}1 +    {Г}{{\selectfont\char195}}1 +    {Д}{{\selectfont\char196}}1 +    {Е}{{\selectfont\char197}}1 +    {Ё}{{\"E}}1 +    {Ж}{{\selectfont\char198}}1 +    {З}{{\selectfont\char199}}1 +    {И}{{\selectfont\char200}}1 +    {Й}{{\selectfont\char201}}1 +    {К}{{\selectfont\char202}}1 +    {Л}{{\selectfont\char203}}1 +    {М}{{\selectfont\char204}}1 +    {Н}{{\selectfont\char205}}1 +    {О}{{\selectfont\char206}}1 +    {П}{{\selectfont\char207}}1 +    {Р}{{\selectfont\char208}}1 +    {С}{{\selectfont\char209}}1 +    {Т}{{\selectfont\char210}}1 +    {У}{{\selectfont\char211}}1 +    {Ф}{{\selectfont\char212}}1 +    {Х}{{\selectfont\char213}}1 +    {Ц}{{\selectfont\char214}}1 +    {Ч}{{\selectfont\char215}}1 +    {Ш}{{\selectfont\char216}}1 +    {Щ}{{\selectfont\char217}}1 +    {Ъ}{{\selectfont\char218}}1 +    {Ы}{{\selectfont\char219}}1 +    {Ь}{{\selectfont\char220}}1 +    {Э}{{\selectfont\char221}}1 +    {Ю}{{\selectfont\char222}}1 +    {Я}{{\selectfont\char223}}1 +} + +% Оформление теорем, лемм и т.д. +\theoremstyle{plain} +\newtheorem{Theorem}{Теорема}[chapter] +\newtheorem{Lemma}{Лемма}[chapter] +\newtheorem{Proposition}{Предложение}[chapter] +\newtheorem{Corollary}{Следствие}[chapter] +\newtheorem{Statement}{Утверждение}[chapter] + +\theoremstyle{definition} +\newtheorem{Definition}{Определение}[chapter] +\newtheorem{Conjecture}{Гипотеза}[chapter] +\newtheorem{Algorithm}{Алгоритм}[chapter] +\newtheorem{Property}{Свойство}[chapter] + +\theoremstyle{remark} +\newtheorem{Remark}{Замечание}[chapter] +\newtheorem{Example}{Пример}[chapter] +\newtheorem{Note}{Примечание}[chapter] +\newtheorem{Case}{Случай}[chapter] +\newtheorem{Assumption}{Предположение}[chapter] + +% Определение полей +\setlength{\oddsidemargin}{0cm} % 1in = 2.54см +\setlength{\hoffset}{0.46cm} % 1in + \hoffset = 3cm ~ левое поле; + +\setlength{\textwidth}{17cm}% 21cm - 3cm(левое поле) - 1cm(правое поле) = 17cm; + +\setlength{\headheight}{0cm} +\setlength{\topmargin}{0cm} +\setlength{\headsep}{0cm} +\setlength{\voffset}{-0.54cm} % 1in + \voffset = 2cm ~ верхнее поле; + +\setlength{\textheight}{25.7cm} % 29.7cm - 2cm(верхнее поле) - 2cm(нижнее поле) = 25.7cm; + +% Оформление глав, разделов и т.д. +\makeatletter + +% Не подавлять абзацный отступ в главах +\renewcommand{\chapter} { +  \cleardoublepage\thispagestyle{plain} +  \global\@topnum=0 \@afterindenttrue \secdef\@chapter\@schapter +} + +% Оформление нумерованных глав +\renewcommand{\@makechapterhead}[1] { +  \vspace{36pt} % Пустое место вверху страницы +  { +    \centering +    \parindent=18pt +    \normalfont\Large\bfseries +    \chaptername ~ \thechapter{} \par % Номер главы +    #1 \par % Заголовок текста с новой строки +    \nopagebreak % Не отрываем заголовок от текста +    \vspace{36pt} % Пустое место между заголовком и текстом +  } +} + +% Оформление ненумерованных глав +\renewcommand{\@makeschapterhead}[1] { +  \vspace{36pt} % Пустое место вверху страницы +  { +    \centering +    \parindent=18pt +    \normalfont\Large\bfseries #1 \par +    \nopagebreak % чтобы не оторвать заголовок от текста +    \vspace{25pt} % между заголовком и текстом +  } +} + +% Оформление разделов +\renewcommand{\section} { +    \@startsection{section} +                  {1} +                  {18pt} +                  {3.5ex plus 1ex minus .2ex} +                  {2.3ex plus .2ex} +                  {\normalfont\Large\bfseries\raggedright} +} + +% Оформление подразделов +\renewcommand{\subsection} { +  \@startsection{subsection} +                {2} +                {18pt} +                {3.25ex plus 1ex minus .2ex} +                {1.5ex plus .2ex} +                {\normalfont\large\bfseries\raggedright} +} + +% Оформление подподразделов +\renewcommand{\subsubsection} { +  \@startsection{subsubsection} +                {3} +                {18pt} +                {3.25ex plus 1ex minus .2ex} +                {1.5ex plus .2ex} +                {\normalfont\large\bfseries\raggedright} +} + +%оформление библиографии +\bibliographystyle{unsrt} +\renewcommand{\@biblabel}[1]{#1.} + +\addto\captionsrussian{\renewcommand\figurename{Рисунок}} + +%Оформление подписи рисунка +%\renewcommand \thefigure{\thesection.\@arabic\c@figure } +%чтобы номер рисунка содержал номер главы (например, рисунок 2.1) надо закомментировать предыдущую строку +\renewenvironment{figure}{% +\let\@makecaption\@makefigurecaption +\@float{figure} +}% +{% +\addtocontents{lof}{ {\vskip 0.2em} } +\end@float +} + +\newcommand{\@makefigurecaption}[2]{% +\vspace{\abovecaptionskip}% +\sbox{\@tempboxa}{\normalsize #1 --- \normalsize #2}% +\ifdim \wd\@tempboxa >\hsize {\center\hyphenpenalty=10000\normalsize #1 --- \normalsize #2 \par}% +\else \global\@minipagefalse \hbox to \hsize +{\hfil \hyphenpenalty=10000 \normalsize #1 --- \normalsize #2\hfil}% +\fi \vspace{\belowcaptionskip}} + + +%Оформление подписи таблицы +%\renewcommand{\thetable}{\@arabic\c@table} +%чтобы номер таблицы содержал номер главы (например, таблица 2.1) надо закомментировать предыдущую строку +\renewenvironment{table}{% +\let\@makecaption\@maketablecaption +\@float{table}}% +{% +\addtocontents{lot}{ {\vskip 0.4em} }% +\end@float% +} +% + +\newlength\abovetablecaptionskip +\newlength\belowtablecaptionskip +\newlength\tableparindent +\setlength\abovetablecaptionskip{10\p@} +\setlength\belowtablecaptionskip{0\p@} +\setlength\tableparindent{18\p@} +\newcommand{\@maketablecaption}[2]{ +  \vskip\abovetablecaptionskip +  \hskip\tableparindent \normalsize #1~---\ \normalsize #2\par +  \vskip\belowtablecaptionskip +} + +\makeatother% + +\sloppy diff --git a/include/bsupracticetitle.sty b/include/bsupracticetitle.sty new file mode 100644 index 0000000..3d5e500 --- /dev/null +++ b/include/bsupracticetitle.sty @@ -0,0 +1,68 @@ +% Source: https://github.com/bsutex/bsustyle/blob/master/style/bsupracticetitle.sty + +\newcommand*{\mentor}[1]{\gdef\@mentor{#1}} +\newcommand*{\@mentor}{} + +\newcommand*{\subfaculty}[1]{\gdef\@subfaculty{#1}} +\newcommand*{\@subfaculty}{} + +\newcommand*{\supervisor}[1]{\gdef\@supervisor{#1}} +\newcommand*{\@supervisor}{} + + +\renewcommand{\maketitle} +{ +\begin{titlepage} +  \begin{center} +  \textbf{ +    МИНИСТЕРСТВО ОБРАЗОВАНИЯ РЕСПУБЛИКИ БЕЛАРУСЬ\\ +    \vspace{1em} +    БЕЛОРУССКИЙ ГОСУДАРСТВЕННЫЙ УНИВЕРСИТЕТ\\ +    \vspace{1em} +    ФАКУЛЬТЕТ ПРИКЛАДНОЙ МАТЕМАТИКИ И ИНФОРМАТИКИ\\ +    \vspace{1em} +    \@subfaculty +  } +  \end{center} + +  \vspace{10em} + +  \begin{center} +    \large\textbf {\@author} \\ +    \vspace{1em} +    \large\textbf{\@title} \\ +    \vspace{2em} +    Отчет о прохождении преддипломной практики +  \end{center} + +  \vspace{3em} + +  \begin{flushright} +    \begin{minipage}[H]{0.35\textwidth} +      \begin{flushleft} +        \textbf{Руководитель практики} \\ +        \textit{\@supervisor} +        \line(1,0){150} +      \end{flushleft} +    \end{minipage} +  \end{flushright} + +  \begin{flushright} +    \begin{minipage}[H]{0.35\textwidth} +      \begin{flushleft} +        \textbf{Научный руководитель} \\ +        \textit{\@mentor} \\ +        \line(1,0){150} +      \end{flushleft} +    \end{minipage} +  \end{flushright} + +  \vspace{2em} + +  \vfill + +  \begin{center} +    Минск, \the\year +  \end{center} +\end{titlepage} +} diff --git a/src/report/report.tex b/src/report/report.tex index 8281a35..e081a34 100644 --- a/src/report/report.tex +++ b/src/report/report.tex @@ -1,8 +1,8 @@ -\documentclass{article} +\documentclass[a4paper,14pt]{extreport} +\usepackage{./include/bsumain} +\usepackage{./include/bsupracticetitle}  \usepackage[utf8x]{inputenc} -\usepackage[english,main=russian]{babel} -\usepackage{graphicx}  \usepackage[hidelinks]{hyperref}  \usepackage{listings}  \usepackage{amsmath} @@ -10,6 +10,9 @@  \author{Соколов Евгений Викторович}  \title{Отчет по преддипломной практике \\  Численное моделирование течения в плоском канале} +\supervisor{Репников Василий Иванович} +\mentor{Тетерев Александр Владимирович} +\subfaculty{Кафедра вычислительной математики}  \begin{document} | 
