@@ -0,0 +1,425 @@
1+\NeedsTeXFormat{LaTeX2e}
3+\ProvidesClass{TechDoc}
5+\LoadClass[a4paper, 12pt]{article}
7+\RequirePackage{geometry}
8+\RequirePackage{listings}
9+\RequirePackage{fancyhdr}
10+\RequirePackage{setspace}
11+\RequirePackage{titlesec}
12+\RequirePackage{graphicx}
13+\RequirePackage[T2A]{fontenc}
14+\RequirePackage[utf8]{inputenc}
15+\RequirePackage[unicode]{hyperref}
16+\RequirePackage{array}
17+\RequirePackage{color}
18+\RequirePackage{textcomp}
19+\RequirePackage{lastpage}
20+\RequirePackage{longtable}
21+\RequirePackage{multirow}
22+\RequirePackage{indentfirst}
23+\RequirePackage{enumitem}
24+\RequirePackage{tocloft}
25+\RequirePackage{caption}
27+\setcounter{secnumdepth}{4}
29+\titleformat{\paragraph}
30+{\normalfont\normalsize\bfseries}{\theparagraph}{0mm}{.~}
31+\titlespacing*{\paragraph}
32+{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
36+\AddEnumerateCounter{\asbuk}{\@asbuk}{\cyrm}
37+\renewcommand{\theenumi}{(\asbuk{enumi})}
38+\renewcommand{\labelenumi}{\asbuk{enumi})}
41+\setenumerate[1]{label={\arabic*)}}
42+\setenumerate[2]{label={\asbuk*)}}
43+\setenumerate[3]{label={\roman*)}}
46+\DeclareUnicodeCharacter{306}{{\color{red} \textbf{По всей видимости либо ты откуда-то не очень хорошо скопировал, либо у тиебя с вводом что-то не то потому что буква Й у тебя состоит из двух скаляров юникода. Удали этот Й и напечатай его заново. (Выйди и зайди норимально)} }}
48+\RequirePackage[main=russian,english]{babel}
50+\titlelabel{\thetitle.~}
53+ basicstyle=\small\ttfamily,
68+\geometry{left=20mm, right=10mm, top=25mm, bottom=25mm, headheight=25mm}
76+ \thepage \\ \@documentCode
79+\renewcommand\headrulewidth{0pt}
84+\begin{tabular}{|p{0.30\linewidth}|p{0.14\linewidth}|p{0.15\linewidth}|p{0.14\linewidth}|p{0.14\linewidth}|}
87+ Изм. & Лист & \textnumero~докум. & Подп. & Дата\\
89+ \footnotesize{\@documentCode}& & & &\\
91+ Инв. \textnumero~подл. & Подп. и дата & Взам. инв. \textnumero & Инв. \textnumero~дубл.& Подп. и дата \\
101+\tocloftpagestyle{fancy}
102+\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
104+\setcounter{tocdepth}{2}
108+\renewcommand{\@title}{\color{red}{TODO}}
109+\renewcommand{\title}[1]{
110+ \renewcommand{\@title}{#1}
113+\newcommand{\@institute}{правительство российской федерации\\
114+ национальный исследовательский университет \\
115+ «высшая школа экономики»}
116+\newcommand{\institute}[1]{
117+ \renewcommand{\@institute}{#1}
120+\newcommand{\@faculty}{Факультет компьютерных наук\\
121+ Департамент программной инженерии}
122+\newcommand{\faculty}[1]{
123+ \renewcommand{\@faculty}{#1}
126+\newcommand{\@academicTeacherTitle}{{\color{red}{TODO}}}
127+\newcommand{\@academicTeacherName}{{\color{red}{TODO}}}
128+\newcommand{\academicTeacher}[2]{
129+ \renewcommand{\@academicTeacherTitle}{#1}
130+ \renewcommand{\@academicTeacherName}{#2}
133+\newcommand{\@academicSupervisorName}{В. В. Шилов}
134+\newcommand{\@academicSupervisorTitle}{Академический руководитель образовательной программы «Программная инженерия»
135+ профессор департамента программной инженерии, канд. техн. наук}
136+\newcommand{\academicSupervisor}[2]{
137+ \renewcommand{\@academicSupervisorTitle}{#1}
138+ \renewcommand{\@academicSupervisorName}{#2}
141+\newcommand{\@documentTitle}{{\color{red}{TODO}}}
142+\newcommand{\documentTitle}[1]{
143+ \renewcommand{\@documentTitle}{#1}
146+\newcommand{\@documentCode}{{\color{red}{TODO}}}
147+\newcommand{\documentCode}[1]{
148+ \renewcommand{\@documentCode}{#1}
151+\renewcommand{\@author}{{\color{red}{TODO}}}
152+\newcommand{\@authorTitle}{{\color{red}{TODO}}}
153+\renewcommand{\author}[2]{
154+ \renewcommand{\@authorTitle}{#1}
155+ \renewcommand{\@author}{#2}
158+\newcommand{\@year}{2018}
159+\renewcommand{\year}[1]{
160+ \renewcommand{\@year}{#1}
163+\newcommand{\@city}{Москва}
164+\newcommand{\city}[1]{
165+ \renewcommand{\@city}{#1}
168+\newcommand{\@titleTable}{
169+\reversemarginpar\marginpar{\rotatebox{90}{\begin{tabular}{|l|l|l|l|l|}
171+ Инв. \textnumero~подл & Подп. и дата & Взам. инв. \textnumero& Инв. \textnumero~дубл.&Подп. и дата\\
178+\titleformat{\subsection}{\normalfont\large\bfseries\raggedright}{\thesubsection.~}{0mm}{}
179+\titleformat{\subsubsection}{\normalfont\normalsize\bfseries\raggedright}{\thesubsubsection.~}{0mm}{}
180+\titleformat{\paragraph}{\normalfont\normalsize\bfseries\raggedright}{\theparagraph.~}{0mm}{}
182+\newcommand{\@startAdditions}{
183+ \setcounter{section}{0}
184+ \renewcommand{\sectionbreak}{}
185+ \titleformat{\section}[block]{\Large\bfseries\filcenter}{}{0mm}{}
186+ \renewcommand{\@startAdditions}{}
189+\newcounter{@tempSection}
191+\newcommand{\addition}[1]{%
195+ \stepcounter{section}
197+ \Large \textbf{\textsc{приложение \arabic{section}}}
199+ \setcounter{@tempSection}{\arabic{section}}
200+ \setcounter{secnumdepth}{0}
201+ \section[Приложение \arabic{@tempSection}]{#1}
202+ \setcounter{secnumdepth}{4}
205+\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
209+ \textsc{\textbf{\@institute}}
216+ \begin{tabular}[h!]{P{0.45\textwidth} P{0.45\textwidth}}
218+ \textit{СОГЛАСОВАНО} & \textsl{УТВЕРЖДАЮ}\\
220+ \@academicTeacherTitle & \@academicSupervisorTitle \\
222+ \underline{\hspace{4cm}} \@academicTeacherName & \underline{\hspace{4cm}} \@academicSupervisorName \\
223+ <<\underline{\hspace{1cm}}>> \underline{\hspace{3cm}} \@year{} г. & <<\underline{\hspace{1cm}}>> \underline{\hspace{3cm}} \@year{} г.\\
228+ {\LARGE{\textsc{\textbf{\MakeLowercase{\@title}}}}}
232+ \textbf{\@documentTitle}
236+ \textbf{\textsc{Лист Утверждения}}
240+ \textbf{\@documentCode{}-ЛУ}
249+ Исполнитель: \@authorTitle
251+ \underline{\hspace{4cm}} \@author
253+ <<\underline{\hspace{1cm}}>> \underline{\hspace{4cm}} \@year~г.
268+ \renewcommand{\@LU}{}
271+\renewcommand{\maketitle}{
281+ \textbf{\textsc{Утверждён}}
283+ \textbf{\@documentCode{}-ЛУ}
288+ {\LARGE{\textsc{\textbf{\MakeLowercase{\@title}}}}}
292+ \textbf{\@documentTitle}
296+ \textbf{\@documentCode}
300+ \textbf{Листов \pageref{LastPage}}
320+ \setcounter{page}{2}
324+\newcommand{\registrationList}{%
330+ \setcounter{secnumdepth}{0}
331+ \section{Лист регистрации изменений}
332+ \setcounter{secnumdepth}{4}
334+ \begin{tabular}{|p{0.05\linewidth}|p{0.04\linewidth}|p{0.06\linewidth}|p{0.06\linewidth}|p{0.06\linewidth}|p{0.1\linewidth}|p{0.1\linewidth}|p{0.12\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|}
337+ \multirow{2}{*}{Изм.} & \multicolumn{4}{c|}{Номера листов} & Всего листов в документе & \textnumero{} доку-мента & Входящий \textnumero{} сопрово-дит.~докум. и дата & Под-пись & Дата \\ [5ex] \cline{2-5}
338+ & из-ме-нен-ных & заме-нен-ных & но-вых & аннул-лиро-ван-ных & & & & & \\[10ex]
340+ & & & & & & & & & \\[5ex]
342+ & & & & & & & & & \\[5ex]
344+ & & & & & & & & & \\[5ex]
346+ & & & & & & & & & \\[5ex]
348+ & & & & & & & & & \\[5ex]
350+ & & & & & & & & & \\[5ex]
352+ & & & & & & & & & \\[5ex]
354+ & & & & & & & & & \\[5ex]
356+ & & & & & & & & & \\[5ex]
358+ & & & & & & & & & \\[5ex]
360+ & & & & & & & & & \\[5ex]
362+ & & & & & & & & & \\[5ex]
364+ & & & & & & & & & \\[5ex]
372+\newcommand{\programmingLanguage}[1]{
373+ \lstset{language=#1}
379+\newcommand{\floatCode}[3][]{
381+ \lstinputlisting [frame=single] {#2}
382+ \ifblank{#3}{}{\caption{#3}}
383+ \ifblank{#1}{}{\label{#1}}
387+\newcommand{\code}[1]{%
388+ \lstinputlisting[frame=single,basicstyle=\footnotesize\ttfamily]{#1}
394+\newcommand{\image}[3][]{
396+ \includegraphics{#2}
397+ \ifblank{#1}{}{\caption{#1}}
398+ \ifblank{#3}{}{\label{#3}}
402+\newcommand{\img}[1]{%
405+ \includegraphics[width=0.6\textwidth,height=0.6\textheight,keepaspectratio]{#1}%
411+\newcommand{\imgs}[2]{%
414+ \includegraphics[width=0.45\textwidth,height=0.45\textwidth,keepaspectratio]{#1}%
415+ \hspace{0.05\textwidth}%
416+ \includegraphics[width=0.45\textwidth,height=0.45\textwidth,keepaspectratio]{#2}%
423+\titleformat{\section}[block]{\Large\bfseries\filcenter}{\thesection.}{0mm}{~}
425+\newcommand{\sectionbreak}{\clearpage}