summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/unitn-bimrep
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/unitn-bimrep
Initial commit
Diffstat (limited to 'macros/latex/contrib/unitn-bimrep')
-rw-r--r--macros/latex/contrib/unitn-bimrep/LICENSE.md28
-rw-r--r--macros/latex/contrib/unitn-bimrep/README.md138
-rw-r--r--macros/latex/contrib/unitn-bimrep/README.pdfbin0 -> 220537 bytes
-rw-r--r--macros/latex/contrib/unitn-bimrep/VERSION.md1
-rw-r--r--macros/latex/contrib/unitn-bimrep/examples/example.pdfbin0 -> 350978 bytes
-rw-r--r--macros/latex/contrib/unitn-bimrep/examples/example.pngbin0 -> 83122 bytes
-rw-r--r--macros/latex/contrib/unitn-bimrep/examples/example.tex24
-rw-r--r--macros/latex/contrib/unitn-bimrep/examples/example_bib.bib17
-rw-r--r--macros/latex/contrib/unitn-bimrep/examples/example_bib.pdfbin0 -> 354791 bytes
-rw-r--r--macros/latex/contrib/unitn-bimrep/examples/example_bib.pngbin0 -> 90526 bytes
-rw-r--r--macros/latex/contrib/unitn-bimrep/examples/example_bib.tex26
-rw-r--r--macros/latex/contrib/unitn-bimrep/unitn-bimrep.cls228
-rw-r--r--macros/latex/contrib/unitn-bimrep/unitn-bimrep.jpgbin0 -> 83383 bytes
13 files changed, 462 insertions, 0 deletions
diff --git a/macros/latex/contrib/unitn-bimrep/LICENSE.md b/macros/latex/contrib/unitn-bimrep/LICENSE.md
new file mode 100644
index 0000000000..d45367e278
--- /dev/null
+++ b/macros/latex/contrib/unitn-bimrep/LICENSE.md
@@ -0,0 +1,28 @@
+**Copyright (c) 2017 - Matteo Ragni, University of Trento**
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+***
+
+University of Trento owns the file unitn-bimrep.jpg, that can be
+used only for the compilation of bimonthly reports, through the
+class unitn-bimrep.cls, and cannot be used otherwise.
diff --git a/macros/latex/contrib/unitn-bimrep/README.md b/macros/latex/contrib/unitn-bimrep/README.md
new file mode 100644
index 0000000000..b1d163f0f0
--- /dev/null
+++ b/macros/latex/contrib/unitn-bimrep/README.md
@@ -0,0 +1,138 @@
+# unitn-bimrep
+
+A LaTeX class for the Bimonthly report for the University of Trento. The class formats the document in order to
+obtain the typical aspect required by the bimonthly report.
+
+## Installation
+
+If you want to use it for now, you have to put `unitn-bimrep.cls` and `unitn-bimrep.jpg` in the same directory
+of your main LaTeX file.
+
+## Usage
+
+There are some very simple step to complete a document:
+
+ 1. Use `unitn-bimrep` as your `\documentclass`
+ 1. In the preamble:
+ * Define the `\author` (your name)
+ * Define the `\advisor` (name of your advisor, or comma separated list of advisors)
+ * Define the `\title` (the title of your thesis)
+ * Define the `\cycle` (your school cycle)
+ 3. In your document (exactly in this order):
+ 1. Insert the `research` (or `research*`) environment
+ 2. Insert the `school` (or `school*`) environment
+ 3. Insert the `production` (or `production*`) environment
+
+If one of the above element is missing, the class will raise an error.
+
+### Environments
+
+#### Research
+
+The `research` enviroment should contain a sequence of `\item` that describe your work. Inside the environment you can use directly the `\item` macro,
+that is interpreted as in a `itemize`. The environment can also be empty.
+
+If you prefer to write a small paragraph, you should use the `research*` environment instead.
+
+`research` (or in alterntive `research*`) can be used **only once**.
+
+#### School
+
+The `school` enviroment should contain a sequence of `\item` that describe the courses you have attended. Inside the environment you can use directly the `\item` macro,
+that it is slightly different with respect to the standard one. This `\item` can take upto 3 arguments:
+
+```latex
+\item{Title of the course}{Teacher or Organization}{Duration in hours or ECTS credit}
+```
+
+If you prefer to write a small paragraph, you should use the `school*` environment instead.
+
+`school` (or in alterntive `school*`) can be used **only once**, after the `research` environment.
+
+#### Production
+
+The `production` enviroment should contain a sequence of `\item` that describe The course you have attended. Inside the environment you can use directly the `\item` macro,
+that it is slightly different with respect to the standard one. This `\item` can take upto 3 arguments:
+
+```latex
+\item{List of Authors}{Title of the publication}{More information about the paper}
+```
+
+If you prefer to write a small paragraph, you should use the `production*` environment instead. This opens tothe usage of more advanced function, such as list of publication generated by `bibtex`.
+
+`production` (or in alterntive `production*`) can be used **only once**, after the `research` and `school` environments.
+
+
+### Examples
+
+#### Normal Mode
+
+The code:
+
+```latex
+\documentclass{unitn-bimrep}
+
+\author{Student Name Surname}
+\title{An awesome thesis for a PhD student}
+\advisor{Advisor Name Surname}
+\cycle{XXX}
+
+\begin{document}
+
+\begin{research*}
+ For my ctivities I usually prefer to write a small paragraph. Since I used the
+ \texttt{research*} environment, I cannot use the \texttt{research} after.
+\end{research*}
+
+\begin{school}
+ \item{Interesting course}{A. Einstein}{20h}
+\end{school}
+
+\begin{production}
+ \item{Student Name Surname, Advisor Name Surname}{An awesome publication}{Awesome journal (in review)}
+\end{production}
+
+
+\end{document}
+```
+
+produces:
+
+![example](examples/example.png?raw=true)
+
+#### With Biblatex
+
+The code:
+
+```latex
+\documentclass[bib]{unitn-bimrep}
+
+\addbibresource{ref.bib} % Define here the bibliography file to use
+
+\author{Student Name Surname}
+\title{An awesome thesis for a PhD student}
+\advisor{Advisor Name Surname}
+\cycle{XXX}
+
+\begin{document}
+
+\begin{research*}
+ For my ctivities I usually prefer to write a small paragraph. Since I used the
+ \texttt{research*} environment, I cannot use the \texttt{research} after.
+\end{research*}
+
+\begin{school}
+ \item{Interesting course}{A. Einstein}{20h}
+\end{school}
+
+\begin{production*}
+ \nocite{ref:1,ref:2} % Import the citations with \nocite
+ \printbibliography % and print the bibliography.
+\end{production*}
+
+\end{document}
+```
+
+produces:
+
+![example](examples/example_bib.png?raw=true)
diff --git a/macros/latex/contrib/unitn-bimrep/README.pdf b/macros/latex/contrib/unitn-bimrep/README.pdf
new file mode 100644
index 0000000000..5f44482dfb
--- /dev/null
+++ b/macros/latex/contrib/unitn-bimrep/README.pdf
Binary files differ
diff --git a/macros/latex/contrib/unitn-bimrep/VERSION.md b/macros/latex/contrib/unitn-bimrep/VERSION.md
new file mode 100644
index 0000000000..37f0780c1f
--- /dev/null
+++ b/macros/latex/contrib/unitn-bimrep/VERSION.md
@@ -0,0 +1 @@
+2017/10/22
diff --git a/macros/latex/contrib/unitn-bimrep/examples/example.pdf b/macros/latex/contrib/unitn-bimrep/examples/example.pdf
new file mode 100644
index 0000000000..4b749f2107
--- /dev/null
+++ b/macros/latex/contrib/unitn-bimrep/examples/example.pdf
Binary files differ
diff --git a/macros/latex/contrib/unitn-bimrep/examples/example.png b/macros/latex/contrib/unitn-bimrep/examples/example.png
new file mode 100644
index 0000000000..a856a38595
--- /dev/null
+++ b/macros/latex/contrib/unitn-bimrep/examples/example.png
Binary files differ
diff --git a/macros/latex/contrib/unitn-bimrep/examples/example.tex b/macros/latex/contrib/unitn-bimrep/examples/example.tex
new file mode 100644
index 0000000000..930f43a5ec
--- /dev/null
+++ b/macros/latex/contrib/unitn-bimrep/examples/example.tex
@@ -0,0 +1,24 @@
+\documentclass{unitn-bimrep}
+
+\author{Student Name Surname}
+\title{An awesome thesis for a PhD student}
+\advisor{Advisor Name Surname}
+\cycle{XXX}
+
+\begin{document}
+
+\begin{research*}
+ For my ctivities I usually prefer to write a small paragraph. Since I used the
+ \texttt{research*} environment, I cannot use the \texttt{research} after.
+\end{research*}
+
+\begin{school}
+ \item{Interesting course}{A. Einstein}{20h}
+\end{school}
+
+\begin{production}
+ \item{Student Name Surname, Advisor Name Surname}{An awesome publication}{Awesome journal (in review)}
+\end{production}
+
+
+\end{document}
diff --git a/macros/latex/contrib/unitn-bimrep/examples/example_bib.bib b/macros/latex/contrib/unitn-bimrep/examples/example_bib.bib
new file mode 100644
index 0000000000..a23cb13cce
--- /dev/null
+++ b/macros/latex/contrib/unitn-bimrep/examples/example_bib.bib
@@ -0,0 +1,17 @@
+@article{ref:1,
+ author = "Albert Einstein",
+ title = "On the electrodynamics of moving bodies",
+ journal = "Annalen der Physik",
+ volume = "322",
+ number = "10",
+ pages = "891--921",
+ year = "1905"
+}
+
+@book{ref:2,
+ author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
+ title = "The \LaTeX\ Companion",
+ year = "1993",
+ publisher = "Addison-Wesley",
+ address = "Reading, Massachusetts"
+}
diff --git a/macros/latex/contrib/unitn-bimrep/examples/example_bib.pdf b/macros/latex/contrib/unitn-bimrep/examples/example_bib.pdf
new file mode 100644
index 0000000000..37076986ea
--- /dev/null
+++ b/macros/latex/contrib/unitn-bimrep/examples/example_bib.pdf
Binary files differ
diff --git a/macros/latex/contrib/unitn-bimrep/examples/example_bib.png b/macros/latex/contrib/unitn-bimrep/examples/example_bib.png
new file mode 100644
index 0000000000..a66ae082bc
--- /dev/null
+++ b/macros/latex/contrib/unitn-bimrep/examples/example_bib.png
Binary files differ
diff --git a/macros/latex/contrib/unitn-bimrep/examples/example_bib.tex b/macros/latex/contrib/unitn-bimrep/examples/example_bib.tex
new file mode 100644
index 0000000000..fd167aabcd
--- /dev/null
+++ b/macros/latex/contrib/unitn-bimrep/examples/example_bib.tex
@@ -0,0 +1,26 @@
+\documentclass[bib]{unitn-bimrep}
+
+\addbibresource{example_bib.bib} % Define here the bibliography file to use
+
+\author{Student Name Surname}
+\title{An awesome thesis for a PhD student}
+\advisor{Advisor Name Surname}
+\cycle{XXX}
+
+\begin{document}
+
+\begin{research*}
+ For my ctivities I usually prefer to write a small paragraph. Since I used the
+ \texttt{research*} environment, I cannot use the \texttt{research} after.
+\end{research*}
+
+\begin{school}
+ \item{Interesting course}{A. Einstein}{20h}
+\end{school}
+
+\begin{production*}
+ \nocite{ref:1,ref:2} % Import the citations with \nocite
+ \printbibliography % and print the bibliography.
+\end{production*}
+
+\end{document}
diff --git a/macros/latex/contrib/unitn-bimrep/unitn-bimrep.cls b/macros/latex/contrib/unitn-bimrep/unitn-bimrep.cls
new file mode 100644
index 0000000000..7c12297081
--- /dev/null
+++ b/macros/latex/contrib/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/macros/latex/contrib/unitn-bimrep/unitn-bimrep.jpg b/macros/latex/contrib/unitn-bimrep/unitn-bimrep.jpg
new file mode 100644
index 0000000000..e889191055
--- /dev/null
+++ b/macros/latex/contrib/unitn-bimrep/unitn-bimrep.jpg
Binary files differ