Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.46 KB | None | 0 0
  1. %% VUMIFPSbakalaurinis.cls – „Tik svajotojai-romantikai gali pagerinti nepakeičiamą pasaulį“
  2. %% Created by „Atviras Kodas Lietuvai“ 2015
  3. %
  4. %% Latest version available here: https://github.com/LIKS/bachelor_thesis_template_vu_mif_se
  5. %% Any suggestions or contributions are welcome! Also see: http://latex.liks.lt!
  6. %
  7. %% License CC BY 4.0 (see more at http://creativecommons.org/licenses/by/4.0/)
  8. % You are free to (a) share - copy and redistribute the material in any medium
  9. % or format (b) adapt - remix, transform, and build upon the material for any
  10. % purpose, even commercially. As long as you give appropriate credit, provide a
  11. % link to the license, and indicate if changes were made.)
  12.  
  13.  
  14. % Bakalaruo baigiamojo darbo apiforminimas pagal Vilniaus universiteto
  15. % Matematikos ir informatikos fakulteto Programų sistemų katedros reikalavimus
  16. \NeedsTeXFormat{LaTeX2e}
  17. \ProvidesClass{VUMIFPSbakalaurinis}[2015/02/03 1.0 VU MIF SE bachelor thesis class]
  18. \LoadClass[12pt, a4paper]{article}
  19. \RequirePackage{LTPlius} % Nustatymų sulietuvinimas
  20. \RequirePackage{fontspec} % Šrifto pasirinkimui
  21. \setmainfont[
  22. Ligatures=TeX,
  23. Extension=.otf,
  24. UprightFont= *-regular,
  25. BoldFont=*-bold,
  26. ItalicFont=*-italic,
  27. BoldItalicFont=*-bolditalic
  28. ]{texgyretermes} % Teksto šrifatas bus Nimbus Roman No9 L, kuris yra
  29. % atviras Times New Roman šrifto atitikmuo
  30. \RequirePackage{setspace} % Intervalas tarp eilučių
  31. \RequirePackage[
  32. left=3cm,
  33. top=2cm,
  34. right=1.5cm,
  35. bottom=2cm,
  36. footskip=0.6cm,
  37. ]{geometry} % Lapo paraštės
  38. \sloppy % Tolygiai paskirsto tekstą nuo kairės iki dešinės paraštės
  39. \RequirePackage[titles]{tocloft} % Turinio eilučių išlygiavimo nustatymui
  40. \RequirePackage{fancyhdr} % Puslapio numerio vietos nustatymui
  41. \pagestyle{fancy}
  42.  
  43. % Nustatoma puslapio numerio vieta puslapyje
  44. \renewcommand{\headrulewidth}{0pt}
  45. \renewcommand{\footrulewidth}{0pt}
  46. \lhead{}
  47. \chead{}
  48. \rhead{}
  49. \lfoot{}
  50. \cfoot{}
  51. \rfoot{\thepage} % Numeris bus puslapio apačioje dešinėje
  52.  
  53. % Nerodyti įspėjimo dėl pakeistos article klasės antraščių stiliaus
  54. \RequirePackage{silence}
  55. \WarningFilter{caption}{Unsupported document class}
  56.  
  57. % Po lentelės antraštės prefiksu bus dedamas taškas
  58. \RequirePackage{caption}
  59. \captionsetup*[table]{labelsep=period}
  60. \captionsetup*[figure]{labelsep=period, name=pav}
  61.  
  62. % Informacijos tituliniame puslapyje kintamieji
  63. \newcommand{\university}[1]{\def\@university{#1}}
  64. \newcommand{\faculty}[1]{\def\@faculty{#1}}
  65. \newcommand{\papertype}[1]{\def\@papertype{#1}}
  66. \newcommand{\department}[1]{\def\@department{#1}}
  67. \newcommand{\supervisor}[1]{\def\@supervisor{#1}}
  68. \newcommand{\reviewer}[1]{\def\@reviewer{#1}}
  69. \newcommand{\status}[1]{\def\@status{#1}}
  70. \newcommand{\titleineng}[1]{\def\@titleineng{#1}}
  71. \newcommand{\secondauthor}[1]{\def\@secondauthor{#1}}
  72.  
  73. % Tarpai tarp sąrašo elementų
  74. \RequirePackage{enumitem}
  75. \setitemize{noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt}
  76. \setenumerate{noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt}
  77.  
  78. % Pirmos eilutės paragrafe atitraukimas 1 cm
  79. \setlength{\parindent}{1cm}
  80.  
  81. % Nustatomas bibliografijos stilius
  82. \RequirePackage[
  83. alldates=iso8601,
  84. autolang=other,
  85. backend=biber,
  86. sortcites=true,
  87. style=trad-alpha,
  88. abbreviate=true,
  89. minalphanames=3,
  90. maxalphanames=3,
  91. maxnames=9,
  92. minnames=4,
  93. ]{biblatex}
  94. \RequirePackage[style=lithuanian]{csquotes}
  95. % Pliuso ženklas, kuris rodomas esant >3 autoriams, sumažinamas ir pakeliamas
  96. \renewcommand*{\labelalphaothers}{\textsuperscript{+}}
  97.  
  98. % -------------------------------
  99. % Titulinio puslapio formatavimas
  100. % -------------------------------
  101. \newcommand{\@signatureplace}{%
  102. \parbox[t]{2.5cm}{%
  103. \makebox[2.5cm]{\raisebox{-0.5ex}{\scriptsize
  104. (para\v{s}as) }}}
  105. }
  106.  
  107. \newcommand{\checkifdefined}[2]{%
  108. % Patikriname, ar visa reikalinga informacija tituliniam puslapiui
  109. % buvo nurodyta. #1 yra tikrinama reikšmė (be \ priekyje),
  110. % #2 - klaidos pranešimas.
  111. \@ifundefined{#1}{\PackageError{VUMIF}{#2}{Add the missing command}}%
  112. }
  113.  
  114. \renewcommand\maketitle{\begin{titlepage}%
  115. \checkifdefined{@department}%
  116. {Tituliniame puslapyje nenurodyta katedra (komanda \protect\department)}
  117. \checkifdefined{@supervisor}%
  118. {Tituliniame puslapyje nenurodytas darbo vadovas (komanda \protect\supervisor)}
  119. ~
  120. \begin{center}
  121. {\setstretch{1.3}\large \MakeUppercase{\@university} \\
  122. \MakeUppercase{\@faculty} \\
  123. \MakeUppercase{\@department}\par }
  124.  
  125. \null\vfil
  126. \vskip 2.5cm
  127. {\singlespacing \LARGE \textbf{\@title} \par}
  128. {\singlespacing \Large \textbf{\@titleineng} \par}%
  129. \vskip 0.8cm
  130. {\large \@papertype}%
  131. \end{center}
  132. \@ifundefined{@secondauthor}{
  133. \vskip 3cm
  134. \begin{flushright}
  135. \large
  136. \singlespacing
  137. {\begin{tabular}[t]{l l}%
  138. \bigskip Atliko: &\; \@author \hfill \@signatureplace \\
  139. \bigskip Darbo vadovas: &\; \@supervisor \hfill \@signatureplace \\
  140. Darbo recenzentas: &\; \@reviewer \hfill \@signatureplace
  141. \end{tabular} \par}%
  142. \end{flushright}
  143. \vskip 4cm
  144. }{
  145. \vskip 2.8cm
  146. \begin{flushright}
  147. \large
  148. \singlespacing
  149. {\begin{tabular}[t]{l l}%
  150. \bigskip Atliko: &\; \@author \hfill \@signatureplace \\
  151. \bigskip &\; \@secondauthor \hfill \@signatureplace \\
  152. \bigskip Darbo vadovas: &\; \@supervisor \hfill \@signatureplace \\
  153. Darbo recenzentas: &\; \@reviewer \hfill \@signatureplace
  154. \end{tabular} \par}%
  155. \end{flushright}
  156. \vskip 3.8cm
  157. }
  158.  
  159. \begin{center}
  160. {\large \singlespacing \@date \par}%
  161. \end{center}\par
  162. \@thanks
  163. \vfil\null
  164. \end{titlepage}%
  165. % Atlaisviname panaudotus kintamuosius
  166. \global\let\@outputtitle\relax
  167. \global\let\thanks\relax
  168. \global\let\maketitle\relax
  169. \global\let\@papertype\@empty
  170. \global\let\@thanks\@empty
  171. \global\let\@author\@empty
  172. \global\let\@date\@empty
  173. \global\let\@title\@empty
  174. \global\let\@university\@empty
  175. \global\let\@faculty\@empty
  176. \global\let\@department\@empty
  177. \global\let\@papertype\@empty
  178. \global\let\@supervisor\@empty
  179. \global\let\@reviewer\@empty
  180. \global\let\title\relax
  181. \global\let\author\relax
  182. \global\let\date\relax
  183. \global\let\and\relax
  184. \global\let\department\relax
  185. \global\let\supervisor\relax
  186. \global\let\@signatureplace\relax
  187. \global\let\checkifdefined\relax
  188. \setcounter{footnote}{0}%
  189. % Nustatome dokumentui 1,5 eilutės intervalą
  190. \onehalfspacing
  191. }
  192.  
  193. % Skyriaus pavadinimas, turinyje neturintis numerio
  194. \newcommand{\sectionnonum}[1]{%
  195. \section*{#1}%
  196. \addcontentsline{toc}{section}{#1}%
  197. }
  198.  
  199. % Skyriaus pavadinimas, neturintis numerio bei neįeinantis į turinį
  200. \newcommand{\sectionnonumnocontent}[1]{%
  201. \section*{#1}% Sugadina pirmojo šio tipo skyriaus numeravimą puslapiais
  202. }
  203.  
  204. \renewcommand\tableofcontents{%
  205. % Turinys su viengubu intervalu tarp eilučių
  206. \begin{singlespacing}%
  207. \section*{\bf\normalsize\centering\MakeUppercase\contentsname
  208. \@mkboth{%
  209. \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
  210. \@starttoc{toc}%
  211. \end{singlespacing}%
  212. \newpage%
  213. }
  214.  
  215. % Tarpai tarp taškų turinyje
  216. \renewcommand{\@dotsep}{1}
  217.  
  218. % Pakeitimai sekcijos eilutėms turinyje:
  219. % 1. Turinyje turi taškai bėgti ir iki sekcijų
  220. % 2. Nėra vertikalaus tarpo prieš sekcijos turinio eilutę
  221. % 3. Ne pusstoris, o paprastas šriftas
  222. \renewcommand\l@section[2]{%
  223. \ifnum \c@tocdepth >\z@
  224. \addpenalty\@secpenalty
  225. \addvspace{0.6em \@plus\p@}
  226. \setlength\@tempdima{1.5em}%
  227. \begingroup
  228. \parindent \z@ \rightskip \@pnumwidth
  229. \parfillskip -\@pnumwidth
  230. \leavevmode {
  231. \advance\leftskip\@tempdima
  232. \hskip -\leftskip
  233. % Uppercasing first level titles
  234. \MakeUppercase{#1}}\nobreak\
  235. \leaders\hbox{$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}
  236. \hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
  237. \endgroup
  238. \fi}
  239.  
  240.  
  241. % Sekcija pradeda naują puslapį
  242. \renewcommand{\section}{%
  243. \cleardoublepage%
  244. \@startsection {section}{1}{\z@}%
  245. {-3.5ex \@plus -1ex \@minus -.2ex}%
  246. {2.3ex \@plus.2ex}%
  247. {\normalfont\Large\bfseries}%
  248. }
  249.  
  250. % Priedo sekcijų formatavimas turiniui
  251. \renewcommand{\appendix}{%
  252. \renewcommand{\section}{%
  253. \cleardoublepage%
  254. \secdef\@Appendix\@sAppendix%
  255. }%
  256. \setcounter{section}{0}%
  257. \renewcommand{\thesection}{nr. \arabic{section}}%
  258. % Insert record to TOC
  259. \addcontentsline{toc}{section}{\MakeUppercase{Priedai}}%}
  260. }
  261.  
  262. \def\@Appendix[#1]#2{%
  263. \refstepcounter{section}%
  264. \addcontentsline{toc}{subsection}%
  265. {\arabic{section} priedas.~#2}%
  266. {\large\bfseries\appendixname\ \thesection\par
  267. #2\par}% \nohyphens\centering#2\par}%
  268. \sectionmark{#1}\vspace{\baselineskip}%
  269. \footnotesize%
  270. }
  271.  
  272. \def\@sAppendix#1{%
  273. {\flushright\large\bfseries\appendixname\par
  274. \centering#1\par}% \nohyphens\centering#1\par}%
  275. \vspace{\baselineskip}%
  276. \footnotesize
  277. }
  278.  
  279. % Literatūros sąrašą reikia pervadinti
  280. \addto\captionslithuanian{%
  281. \renewcommand{\refname}{\v{S}altiniai}%
  282. }
  283.  
  284. % Apibrėžiame ketvirto lygio skyrius
  285. \newcommand{\subsubsubsection}{\subsubparagraph}
  286.  
  287. \makeatletter
  288. \renewcommand\subsubsubsection{\@startsection{paragraph}{4}{0ex}{-3.25ex plus -1ex minus
  289. -0.2ex}{1.5ex plus 0.2ex}{\normalfont\normalsize\bfseries}}
  290. \makeatother
  291.  
  292. \stepcounter{secnumdepth}
  293. \stepcounter{tocdepth}
  294. \renewcommand{\paragraph}{\subparagraph}
  295.  
  296. % Turinio skyrių indentavimo nustatymas. Kiekvienam skyriui nustatoma:
  297. % 1. Atitraukimo iš kairės plotis
  298. % 2. Vietos, skiriama skaičiams, plotis
  299. \makeatletter
  300. \renewcommand*\l@subsection{\@dottedtocline{2}{0.1cm}{0.87cm}}
  301. \renewcommand*\l@subsubsection{\@dottedtocline{3}{0.8cm}{1.22cm}}
  302. \renewcommand*\l@paragraph{\@dottedtocline{4}{1.5cm}{1.52cm}}
  303. \makeatother
  304.  
  305. % Raktinių žodžių komandos
  306. \newcommand\keywords[1]{%
  307. \par \bigskip \par
  308. % \hangindent=\parindent % Lygiavimas nuo antros eilutės
  309. \noindent \textbf{Keywords:}\; \textbf{#1}
  310. }
  311. \newcommand\raktiniaizodziai[1]{%
  312. \par \bigskip \par
  313. % \hangindent=\parindent % Lygiavimas nuo antros eilutės
  314. \noindent \textbf{Raktiniai žodžiai:}\; \textbf{#1}
  315. }
  316.  
  317. % Tarpai tarp išnašų eilučių nustatomi į 1.5 eilutės
  318. \let\oldfootnote\footnote
  319. \renewcommand{\footnote}[1]{\oldfootnote{\onehalfspacing #1}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement