initial preambles and empty document

This commit is contained in:
ivan-igorevich 2022-02-02 14:35:38 +03:00
commit 32b9dbaa66
8 changed files with 412 additions and 0 deletions

35
.gitignore vendored Executable file
View File

@ -0,0 +1,35 @@
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# Flycheck
flycheck_*.el
# AUCTeX auto folder
/auto/
# cask packages
.cask/
dist/
# directory configuration
.dir-locals.el
*.log
/build/*
!/build/*.pdf
*/*/build/*
!*/*/build/*.pdf

23
00-blank-document.tex Normal file
View File

@ -0,0 +1,23 @@
\documentclass[a4paper,fontsize=14bp]{article}
\input{common-preamble}
\input{fancy-listings-preamble}
\numerationTop
\begin{document}
\pagestyle{empty}
\thispagestyle{titlepage}
\newpage
\pagestyle{fancy}
% \blankpage
\tableofcontents
\newpage
\section*{Обозначения и сокращения}
\addcontentsline{toc}{section}{Обозначения и сокращения}
\printnomenclature[2cm]
\newpage
\section{Раздел 1}
Ваш текст здесь.
\end{document}

88
bmstu-preamble.tex Executable file
View File

@ -0,0 +1,88 @@
\usepackage{pgfplots}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{scrextend}
\usepackage{enumitem}
\usepackage{caption,subcaption}
\usepackage{afterpage}
\input{fancy-listings-preamble}
\newgeometry{ % отступы по ГОСТ Р 7.0.97-2016
left=2cm,
right=1cm,
top=2cm,
bottom=2cm
}
\graphicspath{ {./pics/} }
\pgfplotsset{compat=1.16}
\pgfplotsset{model/.style = {blue, samples = 100}}
\usetikzlibrary{calc,intersections,backgrounds}
\newcommand{\approval}[2]{
\begin{tabular}{c}
УТВЕРЖДАЮ \\
#1\\
\underline{\hspace{2.7cm}}#2\\
«\underline{\hspace{0.6cm}}»\underline{\hspace{2.1cm}}2021 г.
\end{tabular}
}
\renewcommand\labelitemi{\textemdash}
\renewcommand\thesubfigure{\asbuk{subfigure}}
\newcommand{\makeBMSTUHeader}{
\noindent\begin{minipage}{0.05\textwidth}
\includegraphics[scale=0.2]{../logo_bmstu.png}
\end{minipage}
\hfill
\begin{minipage}{0.85\textwidth}\raggedleft
\begin{center}
\fontsize{13pt}{0.3\baselineskip}\selectfont
\textbf{Министерство науки и высшего образования
Российской Федерации \\
Федеральное государственное бюджетное образовательное \\
учреждение высшего образования \\
«Московский государственный технический университет \\
имени Н. Э. Баумана \\
(национальный исследовательский университет)» \\
(МГТУ им. Н. Э. Баумана)
}
\end{center}
\end{minipage}
\begin{center}
\fontsize{12pt}{0.1\baselineskip}\selectfont
\noindent\makebox[\linewidth]{\rule{\textwidth}{2pt}}
\makebox[\linewidth]{\rule{\textwidth}{1pt}}
\end{center}
\begin{flushleft}
\fontsize{12pt}{14pt}\selectfont
\textbf{ФАКУЛЬТЕТ \tabto{3cm} «Информатика и системы управления» (ИУ)\\
КАФЕДРА \tabto{3cm} «Информационные системы и телекоммуникации» (ИУ3)
}
\end{flushleft}
}
\newcommand{\makeReportTitle}[5]{
\vspace*{3em}
\thispagestyle{titlepage}
\begin{center}
\Large{\textbf{Отчет \\
по лабораторной работе № #1\\
«#2»\\
по курсу\\
«#3»
}}
\end{center}
\vspace*{4em}
\begin{flushright}
Выполнил:\\
Студент группы ИУ3-11М \\
Овчинников И.И. \\
\vspace*{0.5em}
Проверил#4:\\
#5
\end{flushright}
}

29
book-preamble.tex Normal file
View File

@ -0,0 +1,29 @@
% \usepackage[printwatermark]{xwatermark}
\usepackage{ascii}
\usepackage{textcomp}
\usepackage{eurosym}
\usepackage{cclicenses}
\input{fancy-listings-preamble}
\usetikzlibrary{positioning}
\geometry{
paperheight=24cm,
paperwidth=17cm,
lmargin=1.5cm,
rmargin=2.5cm,
tmargin=2.5cm,
bmargin=2.5cm,
}
\author{Иван Овчинников}
\date{\today}
\title{Очередное введение в\\язык программирования C}
% \newwatermark[allpages,color=red!50,angle=70,scale=7,xpos=-36,ypos=14]{DRAFT}
\addto{\captionsrussian}{\renewcommand{\figurename}{}}
\newcommand{\sectionbreak}{\clearpage}

BIN
build/00-blank-document.pdf Normal file

Binary file not shown.

85
common-preamble.tex Executable file
View File

@ -0,0 +1,85 @@
\usepackage{tikz}
\usepackage{import}
\usepackage{xcolor}
\usepackage{bookmark}
\usepackage{multicol,multirow,colortbl}
\usepackage{longtable}
\usepackage{setspace}
\usepackage{titlesec}
\usepackage{indentfirst}
\usepackage{amsmath,amsfonts,amssymb,amsthm,mathtools}
\usepackage{layout,lscape}
\usepackage{hyperref}
\usepackage{geometry}
\usepackage[russian]{babel}
\usepackage{nomencl}
\usepackage{makeidx}
\usepackage{fancyhdr}
\usepackage{tabularx,adjustbox}
\usepackage{float,makecell}
\usepackage{anyfontsize,tabto}
\usepackage{tocloft}
\makeindex
\makenomenclature
\babelfont{rm}{Times New Roman}
\babelfont{sf}{Liberation Serif}
\babelfont{tt}{Courier New}
\onehalfspacing
\hypersetup{
colorlinks=false,
linktoc=all
}
\fancypagestyle{plain}{ % для автосгенерированых
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
}
\fancypagestyle{titlepage}{
\fancyhf{}
\cfoot{\small{\textbf{Москва, \the\year{}г.}}}
}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\newcommand{\numerationTop}{
\fancyhead[C]{\thepage}
}
\newcommand{\numerationBottom}{
\fancyfoot[C]{\thepage}
}
\newcommand{\code}[1]{\texttt{#1}}
\renewcommand{\nomname}{ }
\newcommand*{\nom}[2]{#1\nomenclature{#1}{#2}}
\newcommand\blankpage{%
\null
\thispagestyle{empty}%
\addtocounter{page}{-1}%
\newpage
}
\newcommand{\frm}[1]{\newline%
\newline%
\indent\fbox{%
\parbox{0.9\textwidth}{%
#1}%
}%
\newline%
\newline%
}%
\makeatletter
\newcommand{\setword}[2]{%
\phantomsection
#1\def\@currentlabel{\unexpanded{#1}}\label{#2}%
}
\makeatother
\newcommand\lh[2]{\texttt{\textcolor{#1}{#2}}}
\newcommand\hrf[1]{\hyperref[#1]{\ref{#1}}}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{\node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}

104
fancy-listings-preamble.tex Normal file
View File

@ -0,0 +1,104 @@
\usepackage{listings}
\definecolor{codekeywords}{rgb}{0.1,0.4,0.4}
\definecolor{codecomments}{rgb}{0,0.6,0}
\definecolor{codenumbers}{rgb}{0.4,0.4,0.4}
\definecolor{codestring}{rgb}{0.85,0.2,0.1}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\definecolor{codefine}{rgb}{0.7,0.5,0.3}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstdefinestyle{JCodeStyle}{
frame=single,
language=Java,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
basicstyle=\footnotesize\ttfamily,
numbers=left,
numberstyle=\tiny\color{gray},
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
tabsize=4,
escapeinside={<@}{@>}
}
\lstdefinestyle{PyCodeStyle}{
frame=single,
commentstyle=\color{codecomments},
numberstyle=\tiny\color{codenumbers},
stringstyle=\color{codestring},
basicstyle=\ttfamily\footnotesize,
keywordstyle=\color{codekeywords},
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=4,
escapeinside={<@}{@>}
}
\lstdefinestyle{CCodeStyle}{
frame=single,
commentstyle=\color{codecomments},
morecomment=[l][\color{codefine}]{\#},
numberstyle=\tiny\color{codenumbers},
stringstyle=\color{codestring},
basicstyle=\ttfamily\footnotesize,
keywordstyle=\color{codekeywords},
emph={int,char,double,float,unsigned,void,bool},
emphstyle={\color{blue}},
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=4,
escapeinside={<@}{@>}
}
\lstdefinestyle{ASMStyle}{
frame=single,
numberstyle=\tiny\color{codenumbers},
commentstyle=\color{codecomments},
keywordstyle=\color{codekeywords},
morecomment=[l]{//}, % l is for line comment
morecomment=[s]{/*}{*/}, % s is for start and end delimiter
basicstyle={\ttfamily\footnotesize},
morekeywords={
add,addi,and,andi,
bge,beq,bne,br,
cmpeqi,cmpgei,cmplti,cmpnei,
ldhu,ldw,ldwio,
mov,movi,movhi,muli,
nop,nor,
ret,
slli,srai,srli,stw,stwio},
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showtabs=false,
tabsize=4,
escapeinside={<@}{@>}
}
\lstset{escapeinside={<@}{@>}}

48
rss-preamble.tex Normal file
View File

@ -0,0 +1,48 @@
\newgeometry{ % отступы по ГОСТ Р 7.0.97-2016
left=2cm,
right=1cm,
top=2cm,
bottom=2cm
}
\tikzset{every picture/.style={line width=0.75pt}} %set default line width to 0.75pt
\usetikzlibrary{patterns}
\usetikzlibrary{calc}
\author{Иван И. Овчинников}
\fancypagestyle{plain}{ % для автосгенерированых
\fancyhf{}
\fancyhead[C]{\thepage}
\renewcommand{\headrulewidth}{0pt}
}
\pagestyle{fancy}
\numerationTop
\renewcommand{\cfttoctitlefont}{\hfill\Large\bfseries} % toc title centering
\renewcommand{\cftaftertoctitle}{\hfill}
\newcommand{\approval}[3]{
\begin{tabular}{c}
УТВЕРЖДАЮ \\
#1\\
#2\\
\underline{\hspace{2.7cm}}#3\\
"\underline{\hspace{0.6cm}}"\underline{\hspace{2.1cm}}2021 г.
\end{tabular}
}
\newcommand{\agreement}[3]{
\begin{tabular}{c}
СОГЛАСОВАНО \\
#1\\
#2\\
\underline{\hspace{2.7cm}}#3\\
"\underline{\hspace{0.6cm}}"\underline{\hspace{2.1cm}}2021 г.
\end{tabular}
}
\newcommand{\signature}[2]{
\noindent
\parbox{6cm}{#1}\hfill\parbox{3cm}{#2}
\vspace*{5mm}
}