From d6ad16c43606784f503e4052650df01f3a945325 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 22 Oct 2017 19:55:11 +0000 Subject: unitn-bimrep (22oct17) git-svn-id: svn://tug.org/texlive/trunk@45581 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/unitn-bimrep/unitn-bimrep.cls | 228 +++++++++++++++++++++ .../tex/latex/unitn-bimrep/unitn-bimrep.jpg | Bin 0 -> 83383 bytes 2 files changed, 228 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/unitn-bimrep/unitn-bimrep.cls create mode 100644 Master/texmf-dist/tex/latex/unitn-bimrep/unitn-bimrep.jpg (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/unitn-bimrep/unitn-bimrep.cls b/Master/texmf-dist/tex/latex/unitn-bimrep/unitn-bimrep.cls new file mode 100644 index 00000000000..7c12297081d --- /dev/null +++ b/Master/texmf-dist/tex/latex/unitn-bimrep/unitn-bimrep.cls @@ -0,0 +1,228 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{unitn-bimrep}[2017/09/18 University of Trento Bimonthly Report - Matteo Ragni] + +\newif\if@TNbiboption +\@TNbiboptionfalse +\DeclareOption{bib}{\@TNbiboptiontrue} +\ProcessOptions\relax + +\LoadClass[a4paper,12pt]{report} + +\let\@author\@empty +\let\@title\@empty +\let\@cycle\@empty +\let\@advisor\@empty + +\newcounter{TNenvflag} + +\RequirePackage[english]{babel} +\RequirePackage[T1]{fontenc} +\RequirePackage[a4paper, + top=1cm, + bottom=1cm, + left=1.4cm, + right=1.4cm, + marginparwidth=0pt, + headheight=0pt, + footskip=0pt + ]{geometry} +\RequirePackage{graphicx} +\RequirePackage{array} +\RequirePackage{libertine} +\RequirePackage{framed} +\if@TNbiboption + \RequirePackage[refsection=none,style=ieee,indexing=false]{biblatex} + \let\TNprintbibliography\printbibliography + \renewcommand{\printbibliography}{\TNprintbibliography[heading=none]} +\fi + +% Page Numbering +\pagenumbering{gobble} + +% Command Declarations +\newcommand{\advisor}[1]{\def\@advisor{#1}} +\newcommand{\cycle}[1]{\def\@cycle{#1}} +\newcommand{\@TNhlinenew}{\noindent\makebox[\linewidth]{\rule{\linewidth}{0.4pt}}} +% Variable Checker +\newcommand{\@TNcheckvariables}{% +\ifx\@author\@empty{ + \ClassError{unitn-bimrep}{Report Author is undefined}{Use the \author{...} command to define it} +}\fi +\ifx\@title\@empty{ + \ClassError{unitn-bimrep}{Student Thesis title is undefined}{Use the \title{...} command to define it} +}\fi +\ifx\@advisor\@empty{ + \ClassError{unitn-bimrep}{Student Advisor is undefined}{Use the \advisor{...} command to define it} +}\fi +\ifx\@cycle\@empty{ + \ClassError{unitn-bimrep}{Student Cycle is undefined}{Use the \cycle{...} command to define it} +}\fi} +\newcommand{\@TNcheckenvs}{% + \ifnum\value{TNenvflag}<1{ + \ClassError{unitn-bimrep}{Missing Research activities Environment} + {Please define it in \begin{research} ... \end{research}} + } + \ifnum\value{TNenvflag}<2{ + \ClassError{unitn-bimrep}{Missing School and Seminars attendance Environment} + {Please define it in \begin{attendance} ... \end{attendance}} + } + \ifnum\value{TNenvflag}<3{ + \ClassError{unitn-bimrep}{Missing Production Environment} + {Please define it in \begin{production} ... \end{production}} + } +} + +% Environment Checker +% Title Declaration +\renewcommand{\maketitle}{% +\@TNcheckvariables +\begin{centering} + \begin{tabular}{c} + \includegraphics[scale=0.5]{unitn-bimrep.jpg} \\ + \textsc{{\bfseries Doctoral School in Materials,}} \\ + \textsc{{\bfseries Mechatronics and Systems Engineering}} \vspace{0.3cm} \\ + BIMONTHLY REPORT. \textit{Send to: {dii.phd@unitn.it}} \vspace{0.3cm} \\ + \textsc{Deadlines}: 22.02, 22.04, 22.06, 22.08, 22.10, 20.12 (every year) \\ + \hspace{\linewidth} \\ + \end{tabular} +\end{centering} +\begin{framed} +\noindent +Student Name: \textbf{\@author} \hfill Cycle/Year: \textbf{\@cycle} \\ +Thesis: \textbf{\@title} \\ +Supervisor: \textbf{\@advisor} \hfill Date: \textbf{\today} +\end{framed}% +} + +% document environment last fixes +\AtBeginDocument{% + +\maketitle +\begin{framed} +} +\AtEndDocument{ +\ifnum\value{TNenvflag}=10\else{ + \ClassError{unitn-bimrep} + {One of the required environment is missing.} + {Please remember that the correct order is 1) Research Activities, 2) School and Seminars, 3) Publications} +}\fi +\end{framed}} + +% May be empty itemize environment wrkaround (sorurce: https://tex.stackexchange.com/questions/86547) +\let\@oldnoitemerr\@noitemerr +\newcommand\noitemerroroff{\let\@noitemerr\relax} +\newcommand\noitemerroron{\let\@noitemerr\@oldnoitemerr} +\newenvironment{TN may be empty itemize} +{\itemize\noitemerroroff} +{\enditemize\noitemerroron} +% Research - Bullet list environment +\newenvironment{research}{% + \ifnum\value{TNenvflag}=0{ + \setcounter{TNenvflag}{1} + }\else{ + \ClassError{unitn-bimrep} + {Reasearch activities already defined} + {The research environment has already been used. Please use it only once.} + }\fi + {\noindent{\large\textbf{Summary of Research Activity}:}} + \begin{TN may be empty itemize} +} +{ + \end{TN may be empty itemize} +} +% Research - Empty environment +\newenvironment{research*}{% + \ifnum\value{TNenvflag}=0{ + \setcounter{TNenvflag}{1} + }\else{ + \ClassError{unitn-bimrep} + {Reasearch activities already defined} + {The research environment has already been used. Please use it only once.} + }\fi + {\noindent{\large\textbf{Summary of Research Activity}:}} \\ +}{} +% School - Bullet list environment +\newenvironment{school}{% + \ifnum\value{TNenvflag}=5{ + \ClassError{unitn-bimrep} + {Schools and Seminars activities already defined} + {The attendance environment has already been used. Please use it only once.} + }\else{ + \ifnum\value{TNenvflag}=1{ + \setcounter{TNenvflag}{5} + }\else{ + \ClassError{unitn-bimrep} + {Schools and Seminars attendance defined before Research Activities} + {Please remember that the correct order is 1) Research Activities, 2) School and Seminars, 3) Publications} + }\fi + }\fi + \let\@TNitem\item + \renewcommand{\item}[3]{\@TNitem \emph{##1}, ##2 (##3)} + \@TNhlinenew \vspace{0.2cm} {\large \textbf{Attendance at Schools/Classes/Seminars}} (title, length (day/hours), credits): + \begin{TN may be empty itemize} +} +{ + \end{TN may be empty itemize} +} +% School - Plain environment +\newenvironment{school*}{% + \ifnum\value{TNenvflag}=5{ + \ClassError{unitn-bimrep} + {Schools and Seminars activities already defined} + {The attendance environment has already been used. Please use it only once.} + }\else{ + \ifnum\value{TNenvflag}=1{ + \setcounter{TNenvflag}{5} + }\else{ + \ClassError{unitn-bimrep} + {Schools and Seminars attendance defined before Research Activities} + {Please remember that the correct order is 1) Research Activities, 2) School and Seminars, 3) Publications} + }\fi + }\fi + \@TNhlinenew \vspace{0.2cm} {\large \textbf{Attendance at Schools/Classes/Seminars}} (title, length (day/hours), credits): \\ +}{} +% Production - Bullet list environment +\newenvironment{production}{% +\ifnum\value{TNenvflag}=10{ + \ClassError{unitn-bimrep} + {List of new publications and congress participation already defined} + {The production environment has already been used. Please use it only once.} + }\else{ + \ifnum\value{TNenvflag}=5{ + \setcounter{TNenvflag}{10} + }\else{ + \ClassError{unitn-bimrep} + {Schools and Seminars attendance defined before Research Activities} + {Please remember that the correct order is 1) Research Activities, 2) School and Seminars, 3) Publications} + }\fi + }\fi + \let\@TNitem\item + \renewcommand{\item}[3]{\@TNitem {\small##1}:\\ \emph{##2}\\ {\small##3}} + \@TNhlinenew \vspace{0.2cm} {\large\textbf{Publications/Congress participation}:} + \begin{TN may be empty itemize} +} +{ + \end{TN may be empty itemize} + \vspace{0.2cm} +} +% Production - Plain Environment +\newenvironment{production*}{% +\ifnum\value{TNenvflag}=10{ + \ClassError{unitn-bimrep} + {List of new publications and congress participation already defined} + {The production environment has already been used. Please use it only once.} + }\else{ + \ifnum\value{TNenvflag}=5{ + \setcounter{TNenvflag}{10} + }\else{ + \ClassError{unitn-bimrep} + {Schools and Seminars attendance defined before Research Activities} + {Please remember that the correct order is 1) Research Activities, 2) School and Seminars, 3) Publications} + }\fi + }\fi + \@TNhlinenew \vspace{0.2cm} {\large\textbf{Publications/Congress participation}:} \\ +} +{ + \vspace{0.2cm} +} + diff --git a/Master/texmf-dist/tex/latex/unitn-bimrep/unitn-bimrep.jpg b/Master/texmf-dist/tex/latex/unitn-bimrep/unitn-bimrep.jpg new file mode 100644 index 00000000000..e8891910553 Binary files /dev/null and b/Master/texmf-dist/tex/latex/unitn-bimrep/unitn-bimrep.jpg differ -- cgit v1.2.3