BSc and MSc tex templates
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

preamble.tex 3.5KB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. % PAGE
  2. \usepackage[margin=2cm]{geometry} % Margins
  3. % FONT
  4. \usepackage[T1, T2A]{fontenc} % Font rendering
  5. \usepackage[utf8]{inputenc} % Input encoding
  6. \usepackage[english, serbianc]{babel}
  7. \usepackage{microtype}
  8. % PARAGRAPH
  9. \widowpenalty10000 % Prevent widows
  10. \clubpenalty10000 % Prevent orphans
  11. \setlength{\parindent}{0pt} % Paragraph indentation
  12. \setlength{\parskip}{12pt} % Space between paragraphs
  13. % CHAPTER
  14. \usepackage{titlesec} % Modify titles style
  15. \titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter%
  16. \hspace{20pt}}{0pt}{} % Modify chapter style
  17. % NUMBERING
  18. \setcounter{secnumdepth}{5} % Depth of section numbering
  19. \usepackage{chngcntr}
  20. \counterwithout{figure}{chapter}
  21. \counterwithout{table}{chapter}
  22. \counterwithout{equation}{chapter}
  23. % HEADER AND FOOTER
  24. \usepackage{fancyhdr}
  25. \pagestyle{fancy}
  26. \makeatletter
  27. \renewcommand{\footrulewidth}{0.4pt}
  28. \renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}}
  29. \fancypagestyle{mainmatter}{
  30. \fancyhf{}
  31. \lhead{\nouppercase{\removelinebreaks\@naslov}}
  32. \rhead{}
  33. \ifbsc \lfoot{\nouppercase{\removelinebreaks\@student} - Дипломски рад} \fi
  34. \ifmsc \lfoot{\nouppercase{\removelinebreaks\@student} - Мастер рад} \fi
  35. \cfoot{}
  36. \rfoot{\thepage}
  37. }
  38. \fancypagestyle{frontmatter}{
  39. \fancyhf{}
  40. \lhead{}
  41. \rhead{}
  42. \cfoot{}
  43. \rfoot{}
  44. }
  45. \fancypagestyle{plain}{
  46. \lhead{\nouppercase{\removelinebreaks\@naslov}}
  47. \rhead{}
  48. \ifbsc \lfoot{\nouppercase{\removelinebreaks\@student} - Дипломски рад} \fi
  49. \ifmsc \lfoot{\nouppercase{\removelinebreaks\@student} - Мастер рад} \fi
  50. \cfoot{}
  51. \rfoot{\thepage}
  52. }
  53. \addtocontents{toc}{\protect\thispagestyle{frontmatter}}
  54. \makeatother
  55. % BIBLIOGRAPHY
  56. \addto{\captionsserbianc}{\renewcommand{\bibname}{Литература}}
  57. \usepackage{cite}
  58. % QUOTES
  59. \usepackage[style=german]{csquotes}
  60. % MATH
  61. \usepackage{amsmath}
  62. \usepackage{mathtools}
  63. \usepackage{siunitx}
  64. % REFERENCES & CAPTIONS
  65. \usepackage{hyperref} % use [hidelinks] to hide links
  66. \usepackage{subcaption}
  67. \captionsetup{justification=centering}
  68. % ITEMIZE
  69. \usepackage{enumitem}
  70. \setlist[itemize]{noitemsep, topsep=0pt}
  71. % TABLES
  72. \usepackage{booktabs}
  73. % TITLE PAGE
  74. \makeatletter
  75. \newcommand{\naslov}[1]{\gdef\@naslov{#1}}
  76. \newcommand{\naslove}[1]{\gdef\@naslove{#1}}
  77. \newcommand{\teza}[1]{\gdef\@teza{#1}}
  78. \newcommand{\mentor}[1]{\gdef\@mentor{#1}}
  79. \newcommand{\student}[1]{\gdef\@student{#1}}
  80. \newcommand{\odobreno}[1]{\gdef\@odobreno{#1}}
  81. \newcommand{\godina}[1]{\gdef\@godina{#1}}
  82. \newif\ifbsc
  83. \newif\ifmsc
  84. \newcommand{\removelinebreaks}[1]{%
  85. \begingroup\def\n{ }#1\endgroup}
  86. \newcommand{\n}{\vadjust{\vspace{12pt}}\nolinebreak\hspace{\fill}\linebreak}
  87. \renewcommand{\maketitle}{
  88. \begin{titlepage}
  89. \begin{center}
  90. {\fontsize{16}{\baselineskip}\selectfont УНИВЕРЗИТЕТ У БЕОГРАДУ\\[6pt] ГРАЂЕВИНСКИ ФАКУЛТЕТ}
  91. \includegraphics[width=46mm]{img/grf.png}
  92. \vspace{2cm}
  93. {\fontsize{20}{\baselineskip}\selectfont\bfseries\MakeUppercase{\@naslov}}
  94. \vspace{1cm}
  95. { \fontsize{16}{\baselineskip}\selectfont
  96. \ifbsc - ДИПЛОМСКИ РАД - \fi
  97. \ifmsc - МАСТЕР РАД - \fi
  98. }
  99. \vfill
  100. { \fontsize{16}{\baselineskip}\selectfont
  101. \begin{tabular*}{\textwidth}{l @{\extracolsep{\fill}} l}
  102. \textbf{Ментор:} & \textbf{Кандидат:} \\[12pt]
  103. \@mentor & \@student \\
  104. \end{tabular*}
  105. }
  106. \vspace{1cm}
  107. { \fontsize{16}{\baselineskip}\selectfont Београд, \@godina }
  108. \end{center}
  109. \end{titlepage}
  110. }
  111. \makeatother