|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- \NeedsTeXFormat{LaTeX2e}
- \ProvidesClass{tmtkthesis}[2020/06/06 MSc BSc template class for GRF uni]
-
- \newif\if@msc
- \newif\if@bsc
- \newif\if@tocitem
- \@tocitemfalse
- \@mscfalse
- \@bscfalse
-
- \DeclareOption{msc}{\@msctrue}
- \DeclareOption{bsc}{\@bsctrue}
- \DeclareOption{tocitem}{\@tocitemtrue}
- \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
- \ProcessOptions
- % \relax
-
- \LoadClass[a4paper, 12pt, oneside]{book}
-
- \RequirePackage{ifplatform}
- \ifwindows
- \RequirePackage{cm-super}
- \fi
-
- % PAGE
- \RequirePackage[margin=2cm]{geometry} % Margins
-
- % FONT
- \RequirePackage[T1, T2A]{fontenc} % Font rendering
- \RequirePackage[utf8]{inputenc} % Input encoding
- \RequirePackage[english, serbianc]{babel}
- \RequirePackage{microtype}
-
- % PARAGRAPH
- \widowpenalty10000 % Prevent widows
- \clubpenalty10000 % Prevent orphans
- \setlength{\parindent}{0pt} % Paragraph indentation
- \setlength{\parskip}{12pt} % Space between paragraphs
-
- % CHAPTER
- \RequirePackage{titlesec} % Modify titles style
- \titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter%
- \hspace{20pt}}{0pt}{} % Modify chapter style
-
- % NUMBERING
- \setcounter{secnumdepth}{5} % Depth of section numbering
- \RequirePackage{chngcntr}
- \counterwithout{figure}{chapter}
- \counterwithout{table}{chapter}
- \counterwithout{equation}{chapter}
-
- % HEADER AND FOOTER
- \RequirePackage{fancyhdr}
- \pagestyle{fancy}
- \makeatletter
- \renewcommand{\footrulewidth}{0.4pt}
- \renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}}
- \fancypagestyle{mainmatter}{
- \fancyhf{}
- \lhead{\nouppercase{\removelinebreaks\@naslov}}
- \rhead{}
- \if@bsc \lfoot{\nouppercase{\removelinebreaks\@student} - Дипломски рад} \fi
- \if@msc \lfoot{\nouppercase{\removelinebreaks\@student} - Мастер рад} \fi
- \cfoot{}
- \rfoot{\thepage}
- }
- \fancypagestyle{frontmatter}{
- \fancyhf{}
- \lhead{}
- \rhead{}
- \cfoot{}
- \rfoot{}
- }
- \fancypagestyle{plain}{
- \lhead{\nouppercase{\removelinebreaks\@naslov}}
- \rhead{}
- \if@bsc \lfoot{\nouppercase{\removelinebreaks\@student} - Дипломски рад} \fi
- \if@msc \lfoot{\nouppercase{\removelinebreaks\@student} - Мастер рад} \fi
- \cfoot{}
- \rfoot{\thepage}
- }
- \addtocontents{toc}{\protect\thispagestyle{frontmatter}}
- \makeatother
-
- % BIBLIOGRAPHY
- \addto{\captionsserbianc}{\renewcommand{\bibname}{Литература}}
- \RequirePackage{cite}
-
- % QUOTES
- \RequirePackage[style=german]{csquotes}
-
- % MATH
- \RequirePackage{amsmath}
- \RequirePackage{mathtools}
- \RequirePackage{siunitx}
-
- % REFERENCES & CAPTIONS
- \RequirePackage{hyperref} % use [hidelinks] to hide links
- \RequirePackage{subcaption}
- \captionsetup{justification=centering}
-
- % ITEMIZE
- \RequirePackage{enumitem}
- \setlist[itemize]{noitemsep, topsep=0pt}
-
- % TABLES
- \RequirePackage{booktabs}
-
- % TITLE PAGE
- \makeatletter
- \newcommand{\naslov}[2]{\gdef\@naslov{#1} \gdef\@title{#2}}
- \newcommand{\rezime}[2]{\gdef\@rezime{#1} \gdef\@abstract{#2}}
- \newcommand{\kljucnereci}[2]{\gdef\@kljucnereci{#1} \gdef\@keywords{#2}}
- \newcommand{\krataksadrzaj}[1]{\gdef\@krataksadrzaj{#1}}
- \newcommand{\predlogpoglavlja}[1]{\gdef\@predlogpoglavlja{#1}}
- \newcommand{\teza}[1]{\gdef\@teza{#1}}
- \newcommand{\mentor}[1]{\gdef\@mentor{#1}}
- \newcommand{\student}[2]{\gdef\@student{#1} \gdef\@studentEN{#2}}
- \newcommand{\odobreno}[1]{\gdef\@odobreno{#1}}
- \newcommand{\godina}[1]{\gdef\@godina{#1}}
- \newcommand{\removelinebreaks}[1]{%
- \begingroup\def\\{}#1\endgroup}
-
- \newcommand{\n}{\vadjust{\vspace{12pt}}\nolinebreak\hspace{\fill}\linebreak}
-
- \renewcommand{\maketitle}{
-
- \frontmatter
- \pagestyle{frontmatter}
-
- \begin{titlepage}
- \begin{center}
- {\fontsize{16}{20}\selectfont УНИВЕРЗИТЕТ У БЕОГРАДУ\\[6pt] ГРАЂЕВИНСКИ ФАКУЛТЕТ}
-
- \includegraphics[width=46mm]{img/grf.png}
- \vspace{2cm}
-
- {\fontsize{20}{24}\selectfont\bfseries\MakeUppercase{\@naslov}\par}
-
- \vspace{1cm}
-
- { \fontsize{16}{20}\selectfont
- \if@bsc - ДИПЛОМСКИ РАД - \fi
- \if@msc - МАСТЕР РАД - \fi
- }
- \vfill
-
- { \fontsize{16}{20}\selectfont
-
- \begin{tabular*}{\textwidth}{l @{\extracolsep{\fill}} l}
- \textbf{Ментор:} & \textbf{Кандидат:} \\[12pt]
- \@mentor & \@student \\
- \end{tabular*}
- }
-
- \vspace{1cm}
-
- { \fontsize{16}{20}\selectfont Београд, \@godina }
- \end{center}
- \end{titlepage}
- }
-
- \newcommand{\prvestrane}{
-
- \textbf{%
- \if@bsc ДИПЛОМСКИ РАД \fi
- \if@msc МАСТЕР РАД \fi
- ИЗ УЖЕ НАУЧНЕ ОБЛАСТИ:}\\
- ТЕХНИЧКА МЕХАНИКА И ТЕОРИЈА КОНСТРУКЦИЈА
-
- \textbf{Кандидат:} \@student
-
- \textbf{Тема:} \removelinebreaks{\@naslov}
-
- \textbf{Кратак садржај рада (попуњава ментор):}
-
- \if@tocitem
- \begin{enumerate}[itemsep=0mm, topsep=0mm]
- \@krataksadrzaj
- \end{enumerate}
- \else
- \@krataksadrzaj
- \fi
-
- \textbf{Предлог поглавља (попуњава ментор):}
- \begin{enumerate}[itemsep=0mm, topsep=0mm]
- \@predlogpoglavlja
- \end{enumerate}
-
- Тема
- \if@bsc дипломског рада \fi
- \if@msc мастер рада \fi
- рада одобрена је на седници
- Катедре за техничку механику и теорију конструкција
- одржаној \@odobreno{} године.
-
- \hfill
- \begin{tabular}{@{}l@{}}
- Ментор,\\
- \@mentor
- \end{tabular}
-
- \newpage
-
- {\bfseries\removelinebreaks{\MakeUppercase{\@naslov}}}
-
- \textbf{Резиме:}
-
- {\@rezime}
-
- \textbf{Kljuчне речи:}
- {\@kljucnereci}
-
- \vspace{1cm}
- {\bfseries\MakeUppercase{\@title}}
-
- \textbf{Abstract:}
-
- {\@abstract}
-
- \textbf{Keywords:}
- {\@keywords}
-
- }
-
- \newcommand{\sadrzaj}{
-
- \tableofcontents
- \mainmatter
- \pagestyle{mainmatter}
-
- }
-
- % PDF METADATA
- \makeatother
- \makeatletter
- \AtBeginDocument{
- \hypersetup{
- pdftex,
- pdfauthor={\ifx\@studentEN\empty \@student \else \@student; \@studentEN \fi},
- pdftitle={\ifx\@title\empty \@naslov \else \@naslov; \@title \fi},
- pdfsubject={\ifx\@abstract\empty \@rezime \else \@rezime; \@abstract \fi},
- pdfkeywords={\ifx\@keywords\empty \@kljucnereci \else \@kljucnereci; \@keywords \fi},
- }
- }
- \makeatother
|