Blame view

mephimemo/mephimemo.cls 3.71 KB
redmine authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
% Provides UT memorandum template
%
% Licensed under CC-BY-SA-3.0
% © Andrew Savchenko, 2012

\ProvidesClass{mephimemo}

\LoadClass[14pt,a4paper]{extarticle}

% formal requirements
\usepackage[a4paper,hmargin=2.0cm,vmargin=1.5cm]{geometry}
\linespread{1.3}

% xetex stuff
\usepackage{fontspec}
\usepackage{xltxtra}
\usepackage{xunicode}
redmine authored
18
\usepackage{setspace}
redmine authored
19 20 21 22
%\usepackage{parskip}
\usepackage{pst-barcode}
\defaultfontfeatures{Mapping=tex-text}
\usepackage{polyglossia}
redmine authored
23 24
\newfontfamily\cyrillicfont{Times New Roman}
\setmainfont{Times New Roman}
redmine authored
25 26 27 28 29 30 31 32
\setsansfont{DejaVu Sans}
\setmonofont{DejaVu Sans Mono}
\setdefaultlanguage[spelling=modern]{russian}
\setotherlanguage{english}

\usepackage{indentfirst}    % indent first paragraph in section
\usepackage{textcomp}       % allow ligatures and special symbols

redmine authored
33
\usepackage[none]{hyphenat}
redmine authored
34
\usepackage{soul}
redmine authored
35

redmine authored
36 37
\pagestyle{empty}

redmine authored
38 39
% memorandum NRNU MEPhI header
\newcommand{\mmnrnumephi} {
redmine authored
40 41 42 43 44 45 46 47 48 49 50 51 52 53
	\hspace*{-\parindent}%
	\begin{minipage}{\linewidth}
		\begin{center}
			\begin{spacing}{1.4}
				{\MakeUppercase{\fontsize{12.7pt}{14.7pt}\selectfont{Министерство образования и науки Российской Федерации}}}
			\end{spacing}
			\begin{spacing}{0.75}
				{\MakeUppercase{\fontsize{10pt}{12pt}\selectfont{Федеральное государственное автономное образовательное учреждение высшего профессионального образования}}}
			\end{spacing}
			\begin{spacing}{1.5}
				\textbf{\fontsize{14pt}{16pt}\selectfont{«Национальный исследовательский ядерный университет «МИФИ»}}
			\end{spacing}
		\end{center}
	\end{minipage}
redmine authored
54 55 56 57 58 59 60 61 62 63 64 65 66 67
}

% memorandum "from external subdivision"
% #1 - subdivision name
\newcommand{\mmorgfrom}[1] {
	\begin{center}
	{\bfseries {#1}}
	\end{center}
}

\newcommand{\mmstartmemo} {
	\begin{center}
	Служебная записка
	\end{center}
redmine authored
68 69 70 71 72 73 74 75
	\vspace{0.6cm}
}

\newcommand{\mmstartstatement} {
	\begin{center}
	{\addfontfeature{LetterSpace=20}\bfseries{\MakeUppercase{Заявление}}}
	\end{center}
	\vspace{0.6cm}
redmine authored
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
}

% memorandum recipient (while inter-organization communication)
% #1 - position
% #2 - name
\newcommand{\mmorgrecipient}[2]{
	\hspace*{0.5\linewidth}
	\begin{minipage}{0.5\linewidth}
		\begin{flushleft}
			{#1}\\
			{#2}
		\end{flushleft}
	\end{minipage}
}

\newcommand{\mmfullheader}[3] {
	\mmnrnumephi
	\mmorgfrom{{#1}}
	\vspace{1em}
	\mmorgrecipient{{#2}}{{#3}}
	\vspace{1em}
	\mmstartmemo
}

redmine authored
100 101 102
% memorandum header
% #1 - position
% #2 - name
redmine authored
103
\newcommand{\mmheadermemo}[2]{
redmine authored
104 105 106 107 108
	\begin{flushright}
	{#1}\\
	{#2}
	\end{flushright}
	
redmine authored
109
	\vspace{1em}
redmine authored
110
	\mmstartmemo
redmine authored
111
}
redmine authored
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
\newcommand{\mmheader}[2]{
	\mmheadermemo{{#1}}{{#2}}
}

% statement header
% #1 - position
% #2 - name
\newcommand{\mmheaderstatement}[2]{
	\begin{flushright}
	{#1}\\
	{#2}
	\end{flushright}
	
	\vspace{5em}
	\mmstartstatement
}
redmine authored
128 129 130 131

% memorandum footer
% #1 - position
% #2 - name
redmine authored
132
% #3 - comment (date)
redmine authored
133
\newcommand{\mmfooter}[4]{
redmine authored
134
	\vspace{\stretch{1}}
redmine authored
135 136 137
	\begin{flushleft}
	{#4}
	\end{flushleft}
redmine authored
138 139 140
	\begin{flushright}
	{#1}\\
	\vspace{0.7cm}
redmine authored
141

redmine authored
142
	{#2}
redmine authored
143 144

	{#3}
redmine authored
145 146 147 148 149 150 151 152 153
	\end{flushright}
}

% memorandum's responsible person
% #1 - position
% #2 - name
\newcommand{\mmresponsible}[3]{
	\begin{flushleft}
	\small{
redmine authored
154
		Контактное лицо:\\
redmine authored
155
		\vspace{0.2cm}
redmine authored
156 157 158
		ФИО: {#1}\\
		телефон: {#2}\\
		эл. почта: {#3}
redmine authored
159 160 161
	}
	\end{flushleft}
}
redmine authored
162 163 164
\newcommand{\mmresponsibleskip}[0]{
	\vspace{4cm}
}
redmine authored
165 166 167 168 169 170

% memorandum's responsible person
% #1 - position
% #2 - name
\newcommand{\mmredmineurlqr}[1]{
	\begin{flushright}
redmine authored
171
	\parbox{3.2cm}{
redmine authored
172
		\psbarcode{{https://tasks.mephi.ru/issues/#1}}{eclevel=L width=1.2 height=1.2}{qrcode}
redmine authored
173
	}
redmine authored
174
	\\
redmine authored
175
	\small https://tasks.mephi.ru/issues/#1
redmine authored
176 177 178
	\end{flushright}
}