Commit 093334cd authored by Martin Ukrop's avatar Martin Ukrop
Browse files

Added title options.

Can now be also supervisor's report and master thesis.
Closes #3.
Version bumbed up to 1.0.
parent dbd05da5
......@@ -3,7 +3,7 @@
% Released to public domain.
% Feel free to contribute or add bug reports in the form of issues
% in the project's repository at https://gitlab.fi.muni.cz/xukrop/fi-thesis-report/
\ProvidesClass{fi-thesis-report}[2016/05/30 v0.8]
\ProvidesClass{fi-thesis-report}[2016/05/30 v1.0 FI thesis report template]
% Based on 'article'
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
......@@ -13,25 +13,42 @@
% Load necessary packages
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{charter}
\RequirePackage[a4paper, top=30mm, bottom=35mm, left=30mm, right=30mm]{geometry}
\RequirePackage[final,kerning=true,spacing=true]{microtype}
\RequirePackage[czech]{babel}
\RequirePackage{color}
\RequirePackage{graphicx}
\RequirePackage{tabularx}
\RequirePackage{ifthen}
\RequirePackage{tikz}
\RequirePackage{charter}
\usetikzlibrary{positioning}
% Define colours
\definecolor{blue-mu}{RGB}{0,39,118}
% Define name strings and setting commands
\def\@student{}
\newcommand{\setStudent}[1]{\def\@student{#1}}
\def\@reportType{}
\newcommand{\setReportType}[1]{\def\@reportType{#1}}
\def\@thesisType{}
\newcommand{\setThesisType}[1]{\def\@thesisType{#1}}
\def\@thesisName{}
\newcommand{\setThesisName}[1]{\def\@thesisName{#1}}
\def\@student{}
\newcommand{\setStudent}[1]{\def\@student{#1}}
\def\@supervisor{}
\newcommand{\setSupervisor}[1]{\def\@supervisor{#1}}
\def\@reader{}
\newcommand{\setReader}[1]{\def\@reader{#1}}
% Determine correct title texts
\def\@titleFirst{Posudek
\ifthenelse{\equal{\@reportType}{reader}}{oponenta}{vedoucího}
}
\def\@titleSecond{
\ifthenelse{\equal{\@thesisType}{bc}}{bakalářské}{diplomové}
práce}
% Document header (logo + table with names)
\AtBeginDocument{
\begin{tikzpicture}[remember picture,overlay]
......@@ -39,8 +56,8 @@
\node[anchor=north west](FI-stitok) [below right=-3mm and 11.5mm of A] {\includegraphics{fi-stitok}};
\node[] (B) at (current page.north east) {};
\node[below left=14.3mm and 27mm of B](posudek){{\large \textsc{Posudek oponenta}}};
\node[below=4.9mm of posudek.east,anchor=east]{{\large \textsc{bakalářské práce}}};
\node[below left=14.3mm and 27mm of B](posudek){{\large \textsc{\@titleFirst}}};
\node[below=4.9mm of posudek.east,anchor=east]{{\large \textsc{\@titleSecond}}};
\end{tikzpicture}
\medskip
......@@ -53,8 +70,11 @@ Vedoucí práce: & \@supervisor \\
Oponent: & \@reader \\
\end{tabularx}
}
\vspace{0.6cm}
\@afterindentfalse\@afterheading
\vspace{-0.5em}
\par\noindent
\textcolor{blue-mu}{\rule{\textwidth}{0.3mm}}
\vspace{-0.5em}
\par\@afterindentfalse\@afterheading
}
% Document footer (date, signature)
......
......@@ -2,9 +2,11 @@
\usepackage{lipsum}
% Set names
\setStudent{John Doe}
% Set types and names
\setReportType{reader} % 'reader' or 'supervisor'
\setThesisType{bc} % 'bc' or 'mgr'
\setThesisName{My wonderful thesis}
\setStudent{John Doe}
\setSupervisor{Mgr.\ Richard Roe, Ph.D.}
\setReader{RNDr.\ John Smith}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment