Commit 20d2b629 authored by Martin Ukrop's avatar Martin Ukrop
Browse files

Supervisor/consultant/reader now optional, custom siganture.

* Consultant can now be set. (issue #8)
* Supervisor, consultant and reader can be unset (and will not be displayed). (issue #10)
* Custom signature can be set. (issue #11)
parent 6515c072
......@@ -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 v1.0 FI thesis report template]
\ProvidesClass{fi-thesis-report}[2016/06/10 v1.1 FI thesis report template]
% Based on 'article'
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
......@@ -36,10 +36,16 @@
\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{\setConsultant}[1]{\def\@consultant{#1}}
\newcommand{\setReader}[1]{\def\@reader{#1}}
\newcommand{\setSignature}[1]{\def\@signature{#1}}
% If custom signature is not set, use supervisor/reader
\ifthenelse{\isundefined{\@signature}}{ % then
\def\@signature{\ifthenelse{\equal{\@reportType}{reader}}{\@reader}{\@supervisor}}
}{ % else keep the set signature
}
% Determine correct title texts
\def\@titleFirst{Posudek
......@@ -66,8 +72,9 @@ práce}
\begin{tabularx}{\textwidth}{@{} l >{\it} l @{}}
Název práce: & \@thesisName \\
Autor práce: & \@student \\
Vedoucí práce: & \@supervisor \\
Oponent: & \@reader \\
\ifthenelse{\isundefined{\@supervisor}}{}{Vedoucí práce: & \@supervisor \\}%
\ifthenelse{\isundefined{\@consultant}}{}{Konzultant: & \@consultant \\}%
\ifthenelse{\isundefined{\@reader}}{\vspace{-1.3em}}{Oponent: & \@reader \\}%
\end{tabularx}
}
\vspace{-0.5em}
......@@ -81,5 +88,5 @@ Oponent: & \@reader \\
\AtEndDocument{
\vspace{2em}
\noindent
Brno \today \hfill \ifthenelse{\equal{\@reportType}{reader}}{\@reader}{\@supervisor}
Brno \today \hfill \@signature
}
......@@ -2,14 +2,22 @@
\usepackage{lipsum}
% Set types and names
% MANDATORY: Set report & thesis types, student and thesis names.
\setReportType{reader} % 'reader' or 'supervisor'
\setThesisType{bc} % 'bc' or 'mgr'
\setThesisName{My wonderful thesis}
\setStudent{John Doe}
% SELECTIVE: Set supervisor/consultant/reader names.
% Those not set will not be displayed
\setSupervisor{Mgr.\ Richard Roe, Ph.D.}
% \setConsultant{Ing.\ Maggie Lane}
\setReader{RNDr.\ John Smith}
% OPTIONAL: Choose a custom signature (e.g. without tiles).
% If signature is not set, supervisor/reader name is taken.
\setSignature{John Smith}
% Thesis report begin
\begin{document}
......
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