Compare commits
No commits in common. "876d0b5d3b35d1281830877fb1fcdfcddf8a9fc8" and "ac4359558c660d9b1642d236a56fc146ceefdbf2" have entirely different histories.
876d0b5d3b
...
ac4359558c
426
AUTHReport.cls
Normal file
426
AUTHReport.cls
Normal file
@ -0,0 +1,426 @@
|
|||||||
|
%
|
||||||
|
% AUTH report class
|
||||||
|
%
|
||||||
|
% note: Requires compilation with XeLaTeX or LuaTeX
|
||||||
|
%
|
||||||
|
% author: Christos Choutouridis <cchoutou@ece.auth.gr>
|
||||||
|
%
|
||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{AUTHReport}[2024-11-03 AUTH Report document class]
|
||||||
|
|
||||||
|
|
||||||
|
% Options
|
||||||
|
% ===============================================
|
||||||
|
|
||||||
|
% Declare option for short report version
|
||||||
|
\DeclareOption{short}{\def\auth@short{yes}}
|
||||||
|
|
||||||
|
% Declare option for CoAuthor
|
||||||
|
%\DeclareOption{coauthor}{\def\auth@coauthor{yes}}
|
||||||
|
|
||||||
|
|
||||||
|
% Default option values
|
||||||
|
\def\auth@short{no}
|
||||||
|
%\def\auth@coauthor{no}
|
||||||
|
|
||||||
|
% Pass all other options to article
|
||||||
|
\DeclareOption*{%
|
||||||
|
\PassOptionsToClass{\CurrentOption}{article}
|
||||||
|
}
|
||||||
|
\ProcessOptions\relax
|
||||||
|
|
||||||
|
\LoadClass{article}
|
||||||
|
|
||||||
|
|
||||||
|
% Requirements
|
||||||
|
% ===============================================
|
||||||
|
\RequirePackage{iftex}
|
||||||
|
\ifPDFTeX
|
||||||
|
\RequirePackage[utf8]{inputenc}
|
||||||
|
\RequirePackage[T1]{fontenc}
|
||||||
|
\RequirePackage[english, greek]{babel}
|
||||||
|
\else
|
||||||
|
\RequirePackage{fontspec}
|
||||||
|
\RequirePackage{polyglossia}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\RequirePackage{xargs} % Commands
|
||||||
|
|
||||||
|
\RequirePackage{geometry} % Layout
|
||||||
|
\RequirePackage{fancyhdr}
|
||||||
|
|
||||||
|
\RequirePackage{graphicx} % Figures
|
||||||
|
|
||||||
|
% Format packages
|
||||||
|
\RequirePackage[hang, small,labelfont=bf,up,textfont=it,up]{caption} % Custom captions under/above floats in tables or figures
|
||||||
|
\RequirePackage[nobottomtitles]{titlesec}
|
||||||
|
\RequirePackage{titling}
|
||||||
|
\RequirePackage[bottom]{footmisc} % Place footnotes always as much to the bottom as possible.
|
||||||
|
|
||||||
|
\RequirePackage{hyperref} % Various
|
||||||
|
\RequirePackage[ddmmyyyy]{datetime}
|
||||||
|
\RequirePackage{enumitem}
|
||||||
|
|
||||||
|
|
||||||
|
% Local Tools
|
||||||
|
% ===============================================
|
||||||
|
|
||||||
|
% Tool to check equality
|
||||||
|
\newcommand{\isequal}[2]{ \pdf@strcmp{#1}{#2} }
|
||||||
|
|
||||||
|
% syntactic suggar for horizaontal rule
|
||||||
|
\newcommand{\Hrule}{ \rule{\linewidth}{0.1mm} }
|
||||||
|
|
||||||
|
|
||||||
|
% Theme
|
||||||
|
% ===============================================
|
||||||
|
|
||||||
|
% Layout
|
||||||
|
% =====================================================
|
||||||
|
|
||||||
|
% Page core layout settings (include head and foot)
|
||||||
|
% A4 will result to:
|
||||||
|
% Top margin: 12mm
|
||||||
|
% Bottom margin: 11mm
|
||||||
|
% Head hight: 14mm
|
||||||
|
% Foot skip: 15mm
|
||||||
|
% Left margin: 15mm
|
||||||
|
% Right margin: 12mm
|
||||||
|
\newcommand{\authTopMargin}{12mm}
|
||||||
|
\newcommand{\authBottomMargin}{12mm}
|
||||||
|
\newcommand{\authHeadHeight}{10mm}
|
||||||
|
\newcommand{\authFootSkip}{10mm}
|
||||||
|
\newcommand{\authLeftMargin}{15mm}
|
||||||
|
\newcommand{\authRightMargin}{15mm}
|
||||||
|
|
||||||
|
|
||||||
|
%
|
||||||
|
% Sets page layout. (include head and foot)
|
||||||
|
\newcommand*{\authSetPageLayout}{%
|
||||||
|
\newgeometry{%
|
||||||
|
includeheadfoot,
|
||||||
|
top= \authTopMargin,
|
||||||
|
bottom= \authBottomMargin,
|
||||||
|
headheight= \authHeadHeight,
|
||||||
|
footskip= \authFootSkip,
|
||||||
|
lmargin= \authLeftMargin,
|
||||||
|
rmargin= \authRightMargin
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
% Fonts
|
||||||
|
% =====================================================
|
||||||
|
|
||||||
|
% [1]: Main(Serif) body font
|
||||||
|
% [5]: Sans family font
|
||||||
|
% [6]: Mono family font
|
||||||
|
%
|
||||||
|
\newcommand{\authFontEnvSetup}[3]{%
|
||||||
|
\setmainfont{#1}[SmallCapsFeatures={Letters=SmallCaps}]
|
||||||
|
\setsansfont{#2}
|
||||||
|
\setmonofont{#3}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
% Header and Footer
|
||||||
|
% =====================================================
|
||||||
|
|
||||||
|
\newcommand*{\authSetFooterEmpty}{%
|
||||||
|
% Clear styles
|
||||||
|
\fancyfoot{}
|
||||||
|
\renewcommand{\footrulewidth}{0pt}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand*{\authSetFooter}{%
|
||||||
|
% Clear styles
|
||||||
|
\fancyfoot{}
|
||||||
|
\fancyfoot[C]{\thepage}
|
||||||
|
\renewcommand{\footrulewidth}{0pt}
|
||||||
|
\pagenumbering{arabic}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\authSetHeaderEmpty}{
|
||||||
|
% Clear styles
|
||||||
|
\fancyhead{}
|
||||||
|
\renewcommand{\headrulewidth}{0pt}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\authSetHeader}{
|
||||||
|
% Clear styles
|
||||||
|
\fancyhead{}
|
||||||
|
\fancyhead[L]{\auth@className}
|
||||||
|
\fancyhead[R]{\auth@docTitle}
|
||||||
|
\renewcommand{\headrulewidth}{0.5pt}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
%
|
||||||
|
% Page styles
|
||||||
|
%
|
||||||
|
\fancypagestyle{plain}{%
|
||||||
|
% Style for the main document (including TOC)
|
||||||
|
\authSetFooter
|
||||||
|
\authSetHeader
|
||||||
|
}
|
||||||
|
|
||||||
|
\fancypagestyle{authTitlePageStyle}{%
|
||||||
|
% Style for Title page
|
||||||
|
\authSetHeaderEmpty
|
||||||
|
\ifnum \isequal{\auth@short}{no}=0
|
||||||
|
\authSetFooterEmpty
|
||||||
|
\else
|
||||||
|
\authSetFooter
|
||||||
|
\fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
% Common Page style
|
||||||
|
\newcommand{\authPageStyle}{%
|
||||||
|
|
||||||
|
\renewcommand{\bottomtitlespace}{0.12\textheight}
|
||||||
|
|
||||||
|
% Change the look of the section and subsection titles
|
||||||
|
\titleformat{\section}[block]{\large\scshape}{\thesection.}{1em}{}
|
||||||
|
\titleformat{\subsection}[block]{\large}{\thesubsection.}{1em}{}
|
||||||
|
\titleformat{\subsubsection}[block]{\normalsize}{\thesubsubsection.}{1em}{}
|
||||||
|
|
||||||
|
%\setlist[itemize]{noitemsep} % Make itemize lists more compact
|
||||||
|
\setlist[itemize]{topsep=6pt, partopsep=0pt, itemsep=3pt, parsep=3pt}
|
||||||
|
|
||||||
|
% Set paragraph identation and skip
|
||||||
|
\setlength{\parindent}{0pt}
|
||||||
|
\setlength{\parskip}{0.3em}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
% Setup theme
|
||||||
|
% =====================================================
|
||||||
|
|
||||||
|
\hypersetup{
|
||||||
|
colorlinks=true,
|
||||||
|
linkcolor=red, % Internal links, those generated by cross-referenced elements
|
||||||
|
filecolor=blue, % Links to local files
|
||||||
|
urlcolor=blue % Links to web sites
|
||||||
|
}
|
||||||
|
\setlist[itemize]{topsep=0pt, partopsep=0pt, itemsep=3pt, parsep=3pt}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\AtBeginDocument{%
|
||||||
|
% Page layout (check above for the geometry setup)
|
||||||
|
\authSetPageLayout
|
||||||
|
|
||||||
|
% Fonts
|
||||||
|
\authFontEnvSetup{CMU Serif}{CMU Sans Serif}{Courier New}
|
||||||
|
|
||||||
|
\setdefaultlanguage{greek} % Main language
|
||||||
|
\setotherlanguage{english} % Other language
|
||||||
|
|
||||||
|
%hyphenation settiongs
|
||||||
|
\lefthyphenmin=2 % minimum characters before
|
||||||
|
\righthyphenmin=2 % minimum characters after
|
||||||
|
|
||||||
|
% Header - Footer
|
||||||
|
\pagestyle{plain}
|
||||||
|
\thispagestyle{authTitlePageStyle}
|
||||||
|
|
||||||
|
% Page styles and formating
|
||||||
|
\authPageStyle
|
||||||
|
|
||||||
|
\normalsize
|
||||||
|
} % End \AtBeginDocument
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
% QA document public environments/commands
|
||||||
|
% =====================================================
|
||||||
|
|
||||||
|
% Common fields
|
||||||
|
% =====================================================
|
||||||
|
\newcommand*{\AuthorName}[1]{\def\auth@authorName{#1}}
|
||||||
|
\newcommand*{\AuthorMail}[1]{\def\auth@authorMail{#1}}
|
||||||
|
\newcommand*{\AuthorAEM}[1]{\def\auth@authorAEM{#1}}
|
||||||
|
|
||||||
|
\newcommand*{\CoAuthorName}[1]{\def\auth@coauthorName{#1}}
|
||||||
|
\newcommand*{\CoAuthorMail}[1]{\def\auth@coauthorMail{#1}}
|
||||||
|
\newcommand*{\CoAuthorAEM}[1]{\def\auth@coauthorAEM{#1}}
|
||||||
|
|
||||||
|
\newcommand*{\WorkGroup}[1]{\def\auth@workGroup{#1}}
|
||||||
|
|
||||||
|
\newcommand*{\DocTitle}[1]{\def\auth@docTitle{#1}}
|
||||||
|
\newcommand*{\DocSubTitle}[1]{\def\auth@docSubTitle{#1}}
|
||||||
|
\newcommand*{\Department}[1]{\def\auth@department{#1}}
|
||||||
|
\newcommand*{\ClassName}[1]{\def\auth@className{#1}}
|
||||||
|
|
||||||
|
\newcommand*{\InstructorName}[1]{\def\auth@instructorName{#1}}
|
||||||
|
\newcommand*{\InstructorMail}[1]{\def\auth@instructorMail{#1}}
|
||||||
|
\newcommand*{\CoInstructorName}[1]{\def\auth@coinstructorName{#1}}
|
||||||
|
\newcommand*{\CoInstructorMail}[1]{\def\auth@coinstructorMail{#1}}
|
||||||
|
|
||||||
|
\newcommand*{\CurrentDate}[1]{\def\auth@date{#1}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
% \FirstPage
|
||||||
|
\newcommand{\authTitlePage}{%
|
||||||
|
\begin{titlepage}
|
||||||
|
% Logo
|
||||||
|
\begin{figure}
|
||||||
|
\begin{flushleft}
|
||||||
|
\includegraphics[width=5cm]{img/auth_logogr.png}
|
||||||
|
\end{flushleft}
|
||||||
|
\end{figure}
|
||||||
|
% Titles
|
||||||
|
\center % Center everything on the page
|
||||||
|
\textbf{} \\[3.5cm] % vertical space
|
||||||
|
\textsc{\Large \auth@department} \\[0.5cm] % Department
|
||||||
|
\textsc{\Large \auth@className} \\[1.5cm] % Class/Course name
|
||||||
|
\Hrule \\[0.4cm] % -------
|
||||||
|
{\huge \bfseries \auth@docTitle} \\[0.4cm] % Document/Assignement Title
|
||||||
|
{\LARGE \bfseries \auth@docSubTitle} \\[0.1cm] % Document/Assignement Sub-Title
|
||||||
|
\Hrule \\[3.5cm] % -------
|
||||||
|
% vertical space
|
||||||
|
% Authors
|
||||||
|
\begin{minipage}{0.4\textwidth}
|
||||||
|
\begin{flushleft}
|
||||||
|
\large
|
||||||
|
\ifdefined \auth@workGroup \emph{\textsc{\auth@workGroup}} \\[2ex]\fi
|
||||||
|
\ifdefined \auth@coauthorName
|
||||||
|
\emph{Συντάκτες:}
|
||||||
|
\else
|
||||||
|
\emph{Συντάκτης:}
|
||||||
|
\fi \\
|
||||||
|
\auth@authorName \\
|
||||||
|
AEM:\auth@authorAEM \\[0.35ex]
|
||||||
|
\normalsize \href{mailto:\auth@authorMail}{\auth@authorMail} \\[2ex]
|
||||||
|
\large
|
||||||
|
\ifdefined \auth@coauthorName
|
||||||
|
\auth@coauthorName \\
|
||||||
|
AEM:\auth@coauthorAEM \\[0.35ex]
|
||||||
|
\normalsize \href{mailto:\auth@coauthorMail}{\auth@coauthorMail} \\[2ex]
|
||||||
|
\fi
|
||||||
|
\end{flushleft}
|
||||||
|
\end{minipage}
|
||||||
|
\begin{minipage}{0.4\textwidth}
|
||||||
|
\begin{flushright}
|
||||||
|
\large
|
||||||
|
\ifdefined \auth@coinstructorName % Instructor(s)
|
||||||
|
\emph{Διδάσκοντες:}
|
||||||
|
\else
|
||||||
|
\emph{Διδάσκων:}
|
||||||
|
\fi \\
|
||||||
|
\auth@instructorName \\[0.35ex]
|
||||||
|
\normalsize \href{mailto:\auth@instructorMail}{\auth@instructorMail} \\[2ex]
|
||||||
|
\large
|
||||||
|
\ifdefined \auth@coinstructorName
|
||||||
|
\auth@coinstructorName \\[0.35ex]
|
||||||
|
\normalsize \href{mailto:\auth@coinstructorMail}{\auth@coinstructorMail} \\[2ex]
|
||||||
|
\fi
|
||||||
|
\end{flushright}
|
||||||
|
\end{minipage}
|
||||||
|
\vfill
|
||||||
|
{\large \auth@date} \\ % date
|
||||||
|
|
||||||
|
\end{titlepage}
|
||||||
|
\newpage
|
||||||
|
}
|
||||||
|
|
||||||
|
% \TitleHeader
|
||||||
|
\newcommand{\authTitleHeader}{%
|
||||||
|
\begin{center} % Center everything on the page
|
||||||
|
% Logo
|
||||||
|
\begin{figure}
|
||||||
|
\center
|
||||||
|
\includegraphics[width=5cm]{img/auth_logogr.png}
|
||||||
|
\end{figure}
|
||||||
|
% Titles
|
||||||
|
\textsc{\Large \auth@department} \\[0.4cm] % Department
|
||||||
|
\textsc{\Large \auth@className} \\[0.1cm] % Class/Course name
|
||||||
|
{\Large \bfseries \auth@docTitle} \\[0.2cm] % Document/Assignement Title
|
||||||
|
{\large \bfseries \auth@docSubTitle} \\[0.2cm] % Document/Assignement Sub-Title
|
||||||
|
{\large \auth@date} \\[0.4cm] % date
|
||||||
|
% Authors
|
||||||
|
\begin{minipage}{0.4\textwidth}
|
||||||
|
\begin{flushleft}
|
||||||
|
\large
|
||||||
|
\ifdefined \auth@coauthorName
|
||||||
|
\emph{Συντάκτες:}
|
||||||
|
\else
|
||||||
|
\emph{Συντάκτης:}
|
||||||
|
\fi \\
|
||||||
|
\textsc{\auth@authorName} \\
|
||||||
|
\textsc{AEM:\auth@authorAEM} \\[0.35ex]
|
||||||
|
\normalsize \href{mailto:\auth@authorMail}{\auth@authorMail} \\[2ex]
|
||||||
|
\large
|
||||||
|
\ifdefined \auth@coauthorName
|
||||||
|
\textsc{\auth@coauthorName} \\
|
||||||
|
\textsc{AEM:\auth@coauthorAEM} \\[0.35ex]
|
||||||
|
\normalsize \href{mailto:\auth@coauthorMail}{\auth@coauthorMail} \\[2ex]
|
||||||
|
\fi
|
||||||
|
\end{flushleft}
|
||||||
|
\end{minipage}
|
||||||
|
\begin{minipage}{0.4\textwidth}
|
||||||
|
\begin{flushright} \large
|
||||||
|
\large
|
||||||
|
\ifdefined \auth@coinstructorName % Instructor(s)
|
||||||
|
\emph{Διδάσκοντες:}
|
||||||
|
\else
|
||||||
|
\emph{Διδάσκων:}
|
||||||
|
\fi \\
|
||||||
|
\textsc{\auth@instructorName} \\[0.35ex]
|
||||||
|
\normalsize \href{mailto:\auth@instructorMail}{\auth@instructorMail} \\[2ex]
|
||||||
|
\large
|
||||||
|
\ifdefined \auth@coinstructorName
|
||||||
|
\textsc{\auth@coinstructorName} \\[0.35ex]
|
||||||
|
\normalsize \href{mailto:\auth@coinstructorMail}{\auth@coinstructorMail} \\[2ex]
|
||||||
|
\fi
|
||||||
|
\end{flushright}
|
||||||
|
\end{minipage}
|
||||||
|
\end{center}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\InsertTitle}{%
|
||||||
|
\ifnum \isequal{\auth@short}{no}=0
|
||||||
|
\authTitlePage
|
||||||
|
\else
|
||||||
|
\authTitleHeader
|
||||||
|
\fi
|
||||||
|
}
|
||||||
|
|
||||||
|
% \InsertFigure{}{}{}{}{}
|
||||||
|
% [1]: Position specifier
|
||||||
|
% [2]: scale
|
||||||
|
% [3]: Label
|
||||||
|
% [4]: Figure file
|
||||||
|
% [5]: Caption text
|
||||||
|
% example: \InsertFigure{!h}{0.8}{fig:lala}{lala.png}{\eng{Makes lala}}
|
||||||
|
\newcommand{\InsertFigure}[5]{
|
||||||
|
\begin{figure}[#1]
|
||||||
|
\captionsetup{format=plain}
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=#2\textwidth]{#4}
|
||||||
|
\caption{#5}
|
||||||
|
\label{#3}
|
||||||
|
\end{figure}
|
||||||
|
}
|
||||||
|
|
||||||
|
% \WrapFigure{}{}{}{}
|
||||||
|
% [1]: scale
|
||||||
|
% [2]: place left or right r,l,R,L
|
||||||
|
% [3]: Label
|
||||||
|
% [4]: Figure file
|
||||||
|
% [5]: Caption text
|
||||||
|
% example: \WrapFigure{0.8}{r}{fig:lala}{lala.png}{\eng{Makes lala}}
|
||||||
|
\newcommand{\WrapFigure}[5]{
|
||||||
|
\begin{wrapfigure}{#2}{#1\textwidth}
|
||||||
|
\vspace{-20pt}
|
||||||
|
\begin{center}
|
||||||
|
\captionsetup{format=plain}
|
||||||
|
\includegraphics[width=#1\textwidth]{#4}
|
||||||
|
\caption{#5}
|
||||||
|
\label{#3}
|
||||||
|
\end{center}
|
||||||
|
\vspace{-20pt}
|
||||||
|
\end{wrapfigure}
|
||||||
|
}
|
51
AUTHReportTemplate.tex
Normal file
51
AUTHReportTemplate.tex
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
%
|
||||||
|
% Network programming Lab sum report
|
||||||
|
%
|
||||||
|
% authors:
|
||||||
|
% Χρήστος Χουτουρίδης ΑΕΜ 8997
|
||||||
|
% cchoutou@ece.auth.gr
|
||||||
|
|
||||||
|
% Options:
|
||||||
|
% short: Switch to title header instead of title page
|
||||||
|
\documentclass[a4paper, 11pt]{AUTHReport}
|
||||||
|
|
||||||
|
\AuthorName{Χρήστος Χουτουρίδης}
|
||||||
|
\AuthorAEM{8997}
|
||||||
|
\AuthorMail{cchoutou@ece.auth.gr}
|
||||||
|
|
||||||
|
%\CoAuthorName{CoAuthor Name}
|
||||||
|
%\CoAuthorAEM{AEM}
|
||||||
|
%\CoAuthorMail{CoAuthor Mail}
|
||||||
|
|
||||||
|
% \WorkGroup{Ομάδα Χ}
|
||||||
|
|
||||||
|
\DocTitle{Τίτλος}
|
||||||
|
\DocSubTitle{Υπότιτλος}
|
||||||
|
|
||||||
|
\Department{Τμήμα ΗΜΜΥ. Τομέας Ηλεκτρονικής}
|
||||||
|
\ClassName{Μάθημα}
|
||||||
|
|
||||||
|
\InstructorName{Ον. Επίθετο}
|
||||||
|
\InstructorMail{xxx@auth.gr}
|
||||||
|
|
||||||
|
\CoInstructorName{Ν. Surname}
|
||||||
|
\CoInstructorMail{xxx@ece.auth.gr}
|
||||||
|
|
||||||
|
\CurrentDate{\today}
|
||||||
|
|
||||||
|
|
||||||
|
\usepackage{lipsum}
|
||||||
|
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\InsertTitle
|
||||||
|
|
||||||
|
\section{Εισαγωγή Intro}
|
||||||
|
\lipsum[1-4]
|
||||||
|
|
||||||
|
\subsection{μικρός τίτλος small title}
|
||||||
|
|
||||||
|
\lipsum[1-4]
|
||||||
|
|
||||||
|
\end{document}
|
644
AUThReport.cls
644
AUThReport.cls
@ -1,644 +0,0 @@
|
|||||||
%
|
|
||||||
% AUTH report class
|
|
||||||
%
|
|
||||||
% note: Requires compilation with XeLaTeX or LuaTeX
|
|
||||||
%
|
|
||||||
% author: Christos Choutouridis <cchoutou@ece.auth.gr>
|
|
||||||
%
|
|
||||||
\NeedsTeXFormat{LaTeX2e}
|
|
||||||
\ProvidesClass{AUThReport}[2024-12-07 AUTh Report document class]
|
|
||||||
|
|
||||||
% Pre-option packages
|
|
||||||
\RequirePackage{iftex}
|
|
||||||
\RequirePackage{xkeyval}
|
|
||||||
|
|
||||||
% Options
|
|
||||||
% ===============================================
|
|
||||||
|
|
||||||
% Default options
|
|
||||||
\newcommand{\auth@mainlanguage}{english} % Default main language
|
|
||||||
\newcommand{\auth@languages}{none} % Default list of additional languages
|
|
||||||
\def\auth@short{no} % Default value for the "short" option
|
|
||||||
|
|
||||||
\newcommand{\none}{none} % For comparison checks
|
|
||||||
|
|
||||||
% Language append tool for option process
|
|
||||||
\newcommand{\authSetupLanguageOption}[1]{%
|
|
||||||
\ifx\auth@languages\none
|
|
||||||
\gdef\auth@languages{#1}%
|
|
||||||
\else
|
|
||||||
\edef\auth@languages{\auth@languages, #1}%
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
%
|
|
||||||
% Set the default language of the document which affects:
|
|
||||||
% - hyphenations
|
|
||||||
% - Localization (section, dates, etc...)
|
|
||||||
%
|
|
||||||
% Usage: mainlang=<language>
|
|
||||||
% Default: english
|
|
||||||
%
|
|
||||||
% example: \documentclass[mainlang=greek]{AUThReport}
|
|
||||||
%
|
|
||||||
\DeclareOptionX{mainlang}{
|
|
||||||
\def\auth@mainlanguage{#1}
|
|
||||||
}
|
|
||||||
|
|
||||||
\ProcessOptionsX\relax
|
|
||||||
|
|
||||||
%
|
|
||||||
% Add hyphenation and typesetting support for other languages
|
|
||||||
% Currently supports: english, greek, german, french
|
|
||||||
%
|
|
||||||
% Usage: <language>
|
|
||||||
%
|
|
||||||
% example: \documentclass[english, greek]{AUThReport}
|
|
||||||
%
|
|
||||||
\DeclareOption{english}{\authSetupLanguageOption{english}}
|
|
||||||
\DeclareOption{greek}{\authSetupLanguageOption{greek}}
|
|
||||||
\DeclareOption{french}{\authSetupLanguageOption{french}}
|
|
||||||
\DeclareOption{german}{\authSetupLanguageOption{german}}
|
|
||||||
|
|
||||||
%
|
|
||||||
% Requests a shorter title for the document
|
|
||||||
%
|
|
||||||
% Usage: short
|
|
||||||
% Default: no short
|
|
||||||
%
|
|
||||||
% example: \documentclass[short]{AUThReport}
|
|
||||||
%
|
|
||||||
\DeclareOption{short}{\def\auth@short{yes}}
|
|
||||||
|
|
||||||
|
|
||||||
% Pass all other options to article
|
|
||||||
\DeclareOption*{%
|
|
||||||
\PassOptionsToClass{\CurrentOption}{article}%
|
|
||||||
}
|
|
||||||
\ProcessOptions\relax
|
|
||||||
|
|
||||||
\LoadClass{article}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% Requirements
|
|
||||||
% ===============================================
|
|
||||||
|
|
||||||
% Font packages
|
|
||||||
\ifPDFTeX
|
|
||||||
\RequirePackage[LGR, T1]{fontenc} % ToDo: find a way to dynamicaly select encoding based on languages
|
|
||||||
\RequirePackage[utf8]{inputenc}
|
|
||||||
\RequirePackage{lmodern}
|
|
||||||
\else
|
|
||||||
\RequirePackage{fontspec}
|
|
||||||
\fi
|
|
||||||
|
|
||||||
% Language packages
|
|
||||||
\ifPDFTeX
|
|
||||||
% Postponed to Pre-Begin hook
|
|
||||||
% \usepackage{babel}
|
|
||||||
\else
|
|
||||||
\RequirePackage{polyglossia}%
|
|
||||||
\fi
|
|
||||||
|
|
||||||
\RequirePackage{xargs} % Commands
|
|
||||||
|
|
||||||
\RequirePackage{geometry} % Layout
|
|
||||||
\RequirePackage{fancyhdr}
|
|
||||||
|
|
||||||
\RequirePackage{graphicx} % Figures
|
|
||||||
\RequirePackage{tikz}
|
|
||||||
|
|
||||||
% Format packages
|
|
||||||
\RequirePackage[hang, small,labelfont=bf,up,textfont=it,up]{caption} % Custom captions under/above floats in tables or figures
|
|
||||||
%\RequirePackage{caption}
|
|
||||||
\RequirePackage[nobottomtitles]{titlesec}
|
|
||||||
\RequirePackage{titling}
|
|
||||||
\RequirePackage[bottom]{footmisc} % Place footnotes always as much to the bottom as possible.
|
|
||||||
|
|
||||||
\RequirePackage{hyperref} % Various
|
|
||||||
\RequirePackage[ddmmyyyy]{datetime}
|
|
||||||
\RequirePackage{enumitem}
|
|
||||||
\RequirePackage{multicol}
|
|
||||||
|
|
||||||
% Local Tools
|
|
||||||
% ===============================================
|
|
||||||
|
|
||||||
% Tool to check equality
|
|
||||||
\newcommand{\isequal}[2]{ \pdf@strcmp{#1}{#2} }
|
|
||||||
|
|
||||||
% syntactic suggar for horizaontal rule
|
|
||||||
\newcommand{\Hrule}[1]{ \rule{\linewidth}{#1} }
|
|
||||||
|
|
||||||
% Dispatch between the right author(s) caption text for document title
|
|
||||||
\newcommand{\authAuthorTitleText}{%
|
|
||||||
\ifnum \isequal{\auth@mainlanguage}{greek}=0
|
|
||||||
\ifdefined \auth@coauthorName Συντάκτες\else Συντάκτης\fi
|
|
||||||
\else
|
|
||||||
\ifdefined \auth@coauthorName Authors\else Author\fi
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
|
|
||||||
% Dispatch between the right instructor(s) caption text for document title
|
|
||||||
\newcommand{\authInstructorTitleText}{%
|
|
||||||
\ifnum \isequal{\auth@mainlanguage}{greek}=0
|
|
||||||
\ifdefined \auth@coinstructorName Διδάσκοντες\else Διδάσκων\fi
|
|
||||||
\else
|
|
||||||
\ifdefined \auth@coinstructorName Instructors\else Instructor\fi
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
|
|
||||||
% Handle the language command for email href for document title
|
|
||||||
\newcommand{\authMailText}[1]{%
|
|
||||||
\ifnum \isequal{\auth@mainlanguage}{greek}=0
|
|
||||||
\href{mailto:#1}{\eng{#1}}
|
|
||||||
\else
|
|
||||||
\href{mailto:#1}{#1}
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
% Language
|
|
||||||
% ===============================================
|
|
||||||
|
|
||||||
%
|
|
||||||
% Language setup functionality to use at the end of class.
|
|
||||||
%
|
|
||||||
% It uses either babel to register the languages(pdflatex) or
|
|
||||||
% polyglossia (already included) to setup default and other languages
|
|
||||||
%
|
|
||||||
\newcommand{\authSetupLanguageEnv}{%
|
|
||||||
\ifPDFTeX
|
|
||||||
\ifnum \isequal{\auth@languages}{none}=0
|
|
||||||
\usepackage[\auth@mainlanguage]{babel}
|
|
||||||
\else
|
|
||||||
\usepackage[\auth@languages, main=\auth@mainlanguage]{babel}
|
|
||||||
\fi
|
|
||||||
\else
|
|
||||||
% Set main language
|
|
||||||
\setdefaultlanguage{\auth@mainlanguage}%
|
|
||||||
% Set other languages
|
|
||||||
\@for\auth@lang:=\auth@languages\do{%
|
|
||||||
\setotherlanguage{\auth@lang}
|
|
||||||
}%
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
|
|
||||||
% Theme
|
|
||||||
% ===============================================
|
|
||||||
|
|
||||||
% Layout
|
|
||||||
% =====================================================
|
|
||||||
|
|
||||||
% Page core layout settings (include head and foot)
|
|
||||||
% A4 will result to:
|
|
||||||
% Top margin: 12mm
|
|
||||||
% Bottom margin: 11mm
|
|
||||||
% Head hight: 14mm
|
|
||||||
% Foot skip: 15mm
|
|
||||||
% Left margin: 15mm
|
|
||||||
% Right margin: 12mm
|
|
||||||
\newcommand{\authTopMargin}{12mm}
|
|
||||||
\newcommand{\authBottomMargin}{12mm}
|
|
||||||
\newcommand{\authHeadHeight}{10mm}
|
|
||||||
\newcommand{\authFootSkip}{10mm}
|
|
||||||
\newcommand{\authLeftMargin}{15mm}
|
|
||||||
\newcommand{\authRightMargin}{15mm}
|
|
||||||
|
|
||||||
|
|
||||||
%
|
|
||||||
% Sets page layout. (include head and foot)
|
|
||||||
\newcommand*{\authSetPageLayout}{%
|
|
||||||
\newgeometry{%
|
|
||||||
includeheadfoot,
|
|
||||||
top= \authTopMargin,
|
|
||||||
bottom= \authBottomMargin,
|
|
||||||
headheight= \authHeadHeight,
|
|
||||||
footskip= \authFootSkip,
|
|
||||||
lmargin= \authLeftMargin,
|
|
||||||
rmargin= \authRightMargin
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
% Fonts
|
|
||||||
% =====================================================
|
|
||||||
|
|
||||||
%
|
|
||||||
% Setup fonts (computer modern)
|
|
||||||
%
|
|
||||||
\newcommand{\authSetupFontEnv}{%
|
|
||||||
\ifPDFTeX
|
|
||||||
% PDFLaTeX fonts
|
|
||||||
\else
|
|
||||||
% \setmainfont{CMU-Serif-Roman}[%
|
|
||||||
%% Path=~/texmf/tex/latex/local/AUThReport/cmu/,
|
|
||||||
% ItalicFont = CMU-Serif-Italic,
|
|
||||||
% BoldFont = CMU-Serif-Bold,
|
|
||||||
% BoldItalicFont= CMU-Serif-BoldItalic
|
|
||||||
% ]
|
|
||||||
% \setsansfont{CMU-Sans-Medium}[%
|
|
||||||
%% Path=~/texmf/tex/latex/local/AUThReport/cmu/,
|
|
||||||
% ItalicFont = CMU-Sans-Oblique,
|
|
||||||
% BoldFont = CMU-Sans-Bold,
|
|
||||||
% BoldItalicFont= CMU-Sans-BoldOblique
|
|
||||||
% ]
|
|
||||||
% %\setsansfont{CMU-Concrete-Roman}[%
|
|
||||||
% % Path=~/texmf/tex/latex/local/AUThReport/cmu/,
|
|
||||||
% % ItalicFont = CMU-Concrete-Italic,
|
|
||||||
% % BoldFont = CMU-Concrete-Bold,
|
|
||||||
% % BoldItalicFont= CMU-Concrete-BoldItalic
|
|
||||||
% %]
|
|
||||||
% \setmonofont{CMU-Typewriter-Regular}[%
|
|
||||||
%% Path=~/texmf/tex/latex/local/AUThReport/cmu/,
|
|
||||||
% ItalicFont = CMU-Typewriter-Oblique,
|
|
||||||
% BoldFont = CMU-Typewriter-Bold,
|
|
||||||
% BoldItalicFont= CMU-Typewriter-Oblique
|
|
||||||
% ]
|
|
||||||
% \typeout{[DEBUG] set fonts}
|
|
||||||
\setmainfont{CMU Serif}
|
|
||||||
\setsansfont{CMU Sans Serif}
|
|
||||||
\setmonofont{CMU Typewriter Text}
|
|
||||||
% \setmonofont{Courier New}
|
|
||||||
\fi
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
% Header and Footer
|
|
||||||
% =====================================================
|
|
||||||
|
|
||||||
%
|
|
||||||
% Clear footer command
|
|
||||||
%
|
|
||||||
\newcommand*{\authSetFooterEmpty}{%
|
|
||||||
% Clear styles
|
|
||||||
\fancyfoot{}
|
|
||||||
\renewcommand{\footrulewidth}{0pt}
|
|
||||||
}
|
|
||||||
|
|
||||||
%
|
|
||||||
% Setup footer according to theme
|
|
||||||
%
|
|
||||||
\newcommand*{\authSetFooter}{%
|
|
||||||
% Clear styles
|
|
||||||
\fancyfoot{}
|
|
||||||
\fancyfoot[C]{\thepage}
|
|
||||||
\renewcommand{\footrulewidth}{0pt}
|
|
||||||
\pagenumbering{arabic}
|
|
||||||
}
|
|
||||||
|
|
||||||
%
|
|
||||||
% Clear header command
|
|
||||||
%
|
|
||||||
\newcommand{\authSetHeaderEmpty}{
|
|
||||||
% Clear styles
|
|
||||||
\fancyhead{}
|
|
||||||
\renewcommand{\headrulewidth}{0pt}
|
|
||||||
}
|
|
||||||
|
|
||||||
%
|
|
||||||
% Setup header according to theme
|
|
||||||
%
|
|
||||||
\newcommand{\authSetHeader}{
|
|
||||||
% Clear styles
|
|
||||||
\fancyhead{}
|
|
||||||
\fancyhead[L]{\auth@className}
|
|
||||||
\fancyhead[R]{\auth@docTitle}
|
|
||||||
\renewcommand{\headrulewidth}{0.5pt}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
%
|
|
||||||
% Page styles
|
|
||||||
%
|
|
||||||
|
|
||||||
% Plain: the main style of the document (including TOC if any)
|
|
||||||
\fancypagestyle{plain}{%
|
|
||||||
\authSetFooter
|
|
||||||
\authSetHeader
|
|
||||||
}
|
|
||||||
|
|
||||||
% authTitlePageStyle: The style for the title page
|
|
||||||
\fancypagestyle{authTitlePageStyle}{%
|
|
||||||
% Style for Title page
|
|
||||||
\authSetHeaderEmpty
|
|
||||||
\ifnum \isequal{\auth@short}{no}=0
|
|
||||||
\authSetFooterEmpty
|
|
||||||
\else
|
|
||||||
\authSetFooter
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
% Page content look and feel style
|
|
||||||
\newcommand{\authPageStyle}{%
|
|
||||||
|
|
||||||
\renewcommand{\bottomtitlespace}{0.12\textheight}
|
|
||||||
|
|
||||||
% Change the look of the section and subsection titles
|
|
||||||
\titleformat{\section}[block]{\large\scshape}{\thesection.}{1em}{}
|
|
||||||
\titleformat{\subsection}[block]{\large}{\thesubsection.}{1em}{}
|
|
||||||
\titleformat{\subsubsection}[block]{\normalsize}{\thesubsubsection.}{1em}{}
|
|
||||||
|
|
||||||
%\setlist[itemize]{noitemsep} % Make itemize lists more compact
|
|
||||||
\setlist[itemize]{topsep=6pt, partopsep=0pt, itemsep=3pt, parsep=3pt}
|
|
||||||
|
|
||||||
% Set paragraph identation and skip
|
|
||||||
\setlength{\parindent}{0pt}
|
|
||||||
\setlength{\parskip}{0.3em}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
% Setup theme
|
|
||||||
% =====================================================
|
|
||||||
|
|
||||||
\AtEndOfClass{%
|
|
||||||
\hypersetup{
|
|
||||||
colorlinks=true,
|
|
||||||
linkcolor=red, % Internal links, those generated by cross-referenced elements
|
|
||||||
filecolor=blue, % Links to local files
|
|
||||||
urlcolor=blue % Links to web sites
|
|
||||||
}
|
|
||||||
|
|
||||||
% Language and fonts
|
|
||||||
\ifPDFTeX
|
|
||||||
\authSetupLanguageEnv % Before fonts
|
|
||||||
\authSetupFontEnv
|
|
||||||
\else
|
|
||||||
\authSetupFontEnv
|
|
||||||
\authSetupLanguageEnv % After fonts
|
|
||||||
\fi
|
|
||||||
|
|
||||||
\typeout{[AUThReport] Main language: \auth@mainlanguage}
|
|
||||||
\typeout{[AUThReport] Other languages: \auth@languages}
|
|
||||||
\typeout{[AUThReport] Short title: \auth@short}
|
|
||||||
}
|
|
||||||
|
|
||||||
\AtBeginDocument{%
|
|
||||||
% Page layout (check above for the geometry setup)
|
|
||||||
\authSetPageLayout
|
|
||||||
|
|
||||||
%hyphenation settiongs
|
|
||||||
\lefthyphenmin=2 % minimum characters before
|
|
||||||
\righthyphenmin=2 % minimum characters after
|
|
||||||
|
|
||||||
% ToDo:
|
|
||||||
% Something wrong is going on with fancy header for LaTeX
|
|
||||||
% In greek (main) the text are in the wrong language configurations
|
|
||||||
% Header - Footer
|
|
||||||
\pagestyle{plain}
|
|
||||||
\thispagestyle{authTitlePageStyle}
|
|
||||||
|
|
||||||
% Page styles and formating
|
|
||||||
\authPageStyle
|
|
||||||
|
|
||||||
\normalsize
|
|
||||||
} % End \AtBeginDocument
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% Public environments/commands
|
|
||||||
% =====================================================
|
|
||||||
|
|
||||||
% Common fields
|
|
||||||
% =====================================================
|
|
||||||
\newcommand*{\AuthorName}[1]{\def\auth@authorName{#1}}
|
|
||||||
\newcommand*{\AuthorMail}[1]{\def\auth@authorMail{#1}}
|
|
||||||
\newcommand*{\AuthorAEM}[1]{\def\auth@authorAEM{#1}}
|
|
||||||
|
|
||||||
\newcommand*{\CoAuthorName}[1]{\def\auth@coauthorName{#1}}
|
|
||||||
\newcommand*{\CoAuthorMail}[1]{\def\auth@coauthorMail{#1}}
|
|
||||||
\newcommand*{\CoAuthorAEM}[1]{\def\auth@coauthorAEM{#1}}
|
|
||||||
|
|
||||||
\newcommand*{\WorkGroup}[1]{\def\auth@workGroup{#1}}
|
|
||||||
|
|
||||||
\newcommand*{\DocTitle}[1]{\def\auth@docTitle{#1}}
|
|
||||||
\newcommand*{\DocSubTitle}[1]{\def\auth@docSubTitle{#1}}
|
|
||||||
\newcommand*{\Department}[1]{\def\auth@department{#1}}
|
|
||||||
\newcommand*{\ClassName}[1]{\def\auth@className{#1}}
|
|
||||||
|
|
||||||
\newcommand*{\InstructorName}[1]{\def\auth@instructorName{#1}}
|
|
||||||
\newcommand*{\InstructorMail}[1]{\def\auth@instructorMail{#1}}
|
|
||||||
\newcommand*{\CoInstructorName}[1]{\def\auth@coinstructorName{#1}}
|
|
||||||
\newcommand*{\CoInstructorMail}[1]{\def\auth@coinstructorMail{#1}}
|
|
||||||
|
|
||||||
\newcommand*{\CurrentDate}[1]{\def\auth@date{#1}}
|
|
||||||
|
|
||||||
|
|
||||||
% Language manipulation commands
|
|
||||||
% =====================================================
|
|
||||||
|
|
||||||
% \eng{}
|
|
||||||
% syntactic suggar for english text inside greek
|
|
||||||
% example \eng{A quick brown fox jumpedover the lazy dog}
|
|
||||||
\newcommand{\eng}[1]{%
|
|
||||||
\ifPDFTeX
|
|
||||||
\foreignlanguage{english}{#1}
|
|
||||||
\else
|
|
||||||
#1
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
|
|
||||||
% \gr{}
|
|
||||||
% syntactic suggar for greek text inside english
|
|
||||||
% example \gr{Άσπρη πέτρα ξέξασπρη κι απτον ήλιο ξεξασπρότερη}
|
|
||||||
\newcommand{\gr}[1]{%
|
|
||||||
\ifPDFTeX
|
|
||||||
\foreignlanguage{greek}{#1}
|
|
||||||
\else
|
|
||||||
#1
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
|
|
||||||
% \setEnglish
|
|
||||||
% Selects english for the rest of the text
|
|
||||||
\newcommand{\setEnglish}{%
|
|
||||||
\ifPDFTeX \selectlanguage{english} \fi
|
|
||||||
}
|
|
||||||
|
|
||||||
% \setGreek
|
|
||||||
% Selects greek for the rest of the text
|
|
||||||
\newcommand{\setGreek}{%
|
|
||||||
\ifPDFTeX \selectlanguage{greek} \fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
% Content commands
|
|
||||||
% =====================================================
|
|
||||||
|
|
||||||
%
|
|
||||||
%
|
|
||||||
%
|
|
||||||
\newcommand{\authInsertAuthsInstructors}{%
|
|
||||||
\center
|
|
||||||
\noindent
|
|
||||||
% Authors
|
|
||||||
\hspace*{0.05\textwidth}
|
|
||||||
\begin{minipage}[t]{0.35\textwidth}
|
|
||||||
\begin{flushleft}
|
|
||||||
\large
|
|
||||||
\ifdefined \auth@workGroup \emph{\textsc{\auth@workGroup}} \\[2ex]\fi
|
|
||||||
\emph{\authAuthorTitleText:} \\
|
|
||||||
\auth@authorName\hspace{1ex}[\auth@authorAEM] \\[0.35ex]
|
|
||||||
\normalsize \authMailText{\auth@authorMail} \\[2ex]
|
|
||||||
\large
|
|
||||||
\ifdefined \auth@coauthorName
|
|
||||||
\auth@coauthorName\hspace{1ex}[\auth@coauthorAEM] \\[0.35ex]
|
|
||||||
\normalsize \authMailText{\auth@coauthorMail} \\[2ex]
|
|
||||||
\fi
|
|
||||||
\end{flushleft}
|
|
||||||
\end{minipage}
|
|
||||||
\hfill
|
|
||||||
% Instructors
|
|
||||||
\begin{minipage}[t]{0.35\textwidth}
|
|
||||||
\begin{flushright}
|
|
||||||
\large
|
|
||||||
\emph{\authInstructorTitleText:} \\
|
|
||||||
\auth@instructorName \\[0.35ex]
|
|
||||||
\normalsize \authMailText{\auth@instructorMail} \\[2ex]
|
|
||||||
\large
|
|
||||||
\ifdefined \auth@coinstructorName
|
|
||||||
\auth@coinstructorName \\[0.35ex]
|
|
||||||
\normalsize \authMailText{\auth@coinstructorMail} \\[2ex]
|
|
||||||
\fi
|
|
||||||
\end{flushright}
|
|
||||||
\end{minipage}
|
|
||||||
\hspace*{0.05\textwidth}
|
|
||||||
}
|
|
||||||
|
|
||||||
% \FirstPage
|
|
||||||
\newcommand{\authTitlePage}[3]{%
|
|
||||||
\begin{titlepage}
|
|
||||||
% Logo
|
|
||||||
\begin{figure}
|
|
||||||
\begin{flushleft}
|
|
||||||
\vspace{-1cm}
|
|
||||||
\includegraphics[width=5cm]{img/auth_logogr.png}
|
|
||||||
\end{flushleft}
|
|
||||||
\end{figure}
|
|
||||||
\ifnum \isequal{#1}{none}=0 \else
|
|
||||||
\begin{tikzpicture}[remember picture, overlay]
|
|
||||||
\node[anchor=center, opacity=0.25] at ([yshift=#3] current page.center) {
|
|
||||||
\includegraphics[width=#2]{#1}
|
|
||||||
};
|
|
||||||
\end{tikzpicture}
|
|
||||||
\fi
|
|
||||||
% Titles
|
|
||||||
\center
|
|
||||||
\textbf{} \\[1cm] % vertical space
|
|
||||||
\textsc{\Large \auth@department} \\[0.5cm] % Department
|
|
||||||
\textsc{\Large \auth@className} \\[4.0cm] % Class/Course name
|
|
||||||
\begin{flushleft}
|
|
||||||
{\huge \bfseries \auth@docTitle} \\[0.4cm] % Document/Assignement Title
|
|
||||||
{\LARGE \bfseries \auth@docSubTitle} \\[0.1cm] % Document/Assignement Sub-Title
|
|
||||||
\Hrule{0.2mm} \\ % -------
|
|
||||||
\end{flushleft}
|
|
||||||
|
|
||||||
\vfill
|
|
||||||
% Authors-Instructors
|
|
||||||
\authInsertAuthsInstructors \\
|
|
||||||
\vspace{1.5cm}
|
|
||||||
{\large \auth@date} \\ % date
|
|
||||||
\end{titlepage}
|
|
||||||
\newpage
|
|
||||||
}
|
|
||||||
|
|
||||||
% \TitleHeader
|
|
||||||
\newcommand{\authTitleHeader}{%
|
|
||||||
\begin{center} % Center everything on the page
|
|
||||||
% Logo
|
|
||||||
\noindent
|
|
||||||
\begin{figure}
|
|
||||||
\vspace{-1.5cm}
|
|
||||||
\center
|
|
||||||
\includegraphics[width=5cm]{img/auth_logogr.png}
|
|
||||||
\end{figure}
|
|
||||||
% Titles
|
|
||||||
\textsc{\Large \auth@department} \\[0.4cm] % Department
|
|
||||||
\textsc{\Large \auth@className} \\[0.8cm] % Class/Course name
|
|
||||||
{\Large \bfseries \auth@docTitle} \\[0.2cm] % Document/Assignement Title
|
|
||||||
{\large \bfseries \auth@docSubTitle} \\[0.2cm] % Document/Assignement Sub-Title
|
|
||||||
{\large \auth@date} \\[0.4cm] % date
|
|
||||||
% Authors-Instructors
|
|
||||||
\authInsertAuthsInstructors
|
|
||||||
\end{center}
|
|
||||||
}
|
|
||||||
|
|
||||||
%
|
|
||||||
% Inserts titles, author(s), instructor(s) as a first page or header
|
|
||||||
%
|
|
||||||
% [1]: Optional background image
|
|
||||||
% [2]: Optional width of the image (if argument 1 is used)
|
|
||||||
% [3]: Optional y shift for image positioning (if argument 1 is used)
|
|
||||||
%
|
|
||||||
% examples:
|
|
||||||
% - \InsertFigure
|
|
||||||
% - \InsertFigure[myBackgroung]
|
|
||||||
% - \InsertFigure[myBackgroung][0.9\textwidth][2cm]
|
|
||||||
%
|
|
||||||
\newcommandx{\InsertTitle}[3][1=none, 2=\textwidth, 3=0mm]{%
|
|
||||||
\ifnum \isequal{\auth@short}{no}=0
|
|
||||||
\authTitlePage{#1}{#2}{#3}
|
|
||||||
\else
|
|
||||||
\authTitleHeader
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
|
|
||||||
%
|
|
||||||
% \InsertFigure{}{}{}{}{}
|
|
||||||
%
|
|
||||||
% [1]: Position specifier
|
|
||||||
% [2]: scale
|
|
||||||
% [3]: Label
|
|
||||||
% [4]: Figure file
|
|
||||||
% [5]: Caption text
|
|
||||||
% example: \InsertFigure{!h}{0.8}{fig:lala}{lala.png}{\eng{Makes lala}}
|
|
||||||
%
|
|
||||||
% ToDo:
|
|
||||||
% Something iswrong with InserFigures in general. In LaTeX the combination
|
|
||||||
% titlepage and begin{figure} creates problems.
|
|
||||||
%
|
|
||||||
\newcommand{\InsertFigure}[5]{
|
|
||||||
\begin{figure}[#1]
|
|
||||||
\captionsetup{
|
|
||||||
format=plain, % Plain format
|
|
||||||
labelfont={bf,up}, % Bold and upright for label
|
|
||||||
textfont={it,up}, % Italic and upright for text
|
|
||||||
justification=centering,
|
|
||||||
singlelinecheck=false
|
|
||||||
}
|
|
||||||
\centering
|
|
||||||
\includegraphics[width=#2\textwidth]{#4}
|
|
||||||
\caption{#5}
|
|
||||||
\label{#3}
|
|
||||||
\end{figure}
|
|
||||||
}
|
|
||||||
|
|
||||||
%
|
|
||||||
% \WrapFigure{}{}{}{}
|
|
||||||
%
|
|
||||||
% [1]: scale
|
|
||||||
% [2]: place left or right r,l,R,L
|
|
||||||
% [3]: Label
|
|
||||||
% [4]: Figure file
|
|
||||||
% [5]: Caption text
|
|
||||||
% example: \WrapFigure{0.8}{r}{fig:lala}{lala.png}{\eng{Makes lala}}
|
|
||||||
\newcommand{\WrapFigure}[5]{
|
|
||||||
\begin{wrapfigure}{#2}{#1\textwidth}
|
|
||||||
\vspace{-20pt}
|
|
||||||
\begin{center}
|
|
||||||
\captionsetup{
|
|
||||||
format=plain, % Plain format
|
|
||||||
labelfont={bf,up}, % Bold and upright for label
|
|
||||||
textfont={it,up}, % Italic and upright for text
|
|
||||||
justification=centering,
|
|
||||||
singlelinecheck=false
|
|
||||||
}
|
|
||||||
\includegraphics[width=#1\textwidth]{#4}
|
|
||||||
\caption{#5}
|
|
||||||
\label{#3}
|
|
||||||
\end{center}
|
|
||||||
\vspace{-20pt}
|
|
||||||
\end{wrapfigure}
|
|
||||||
}
|
|
@ -1,112 +0,0 @@
|
|||||||
%
|
|
||||||
% AUTH report template for english
|
|
||||||
%
|
|
||||||
% Requires compilation with pdfLaTeX or XeLaTeX
|
|
||||||
%
|
|
||||||
% authors:
|
|
||||||
% Χρήστος Χουτουρίδης ΑΕΜ 8997
|
|
||||||
% cchoutou@ece.auth.gr
|
|
||||||
|
|
||||||
% Options:
|
|
||||||
%
|
|
||||||
% 1) mainlang=<language>
|
|
||||||
% Default: english
|
|
||||||
% Set the default language of the document which affects hyphenations,
|
|
||||||
% localization (section, dates, etc...)
|
|
||||||
%
|
|
||||||
% example: \documentclass[mainlang=greek]{AUThReport}
|
|
||||||
%
|
|
||||||
% 2) <language>
|
|
||||||
% Add hyphenation and typesetting support for other languages
|
|
||||||
% Currently supports: english, greek, german, frenc
|
|
||||||
%
|
|
||||||
% example: \documentclass[english, greek]{AUThReport}
|
|
||||||
%
|
|
||||||
% 3) short: Requests a shorter title for the document
|
|
||||||
% Default: no short
|
|
||||||
%
|
|
||||||
% example: \documentclass[short]{AUThReport}
|
|
||||||
%
|
|
||||||
\documentclass[a4paper, 11pt, mainlang=greek, english]{AUThReport}
|
|
||||||
|
|
||||||
\CurrentDate{\today}
|
|
||||||
|
|
||||||
% Greek report document setup suggestions
|
|
||||||
%---------------------------------
|
|
||||||
% \WorkGroup{Ομάδα Χ}
|
|
||||||
|
|
||||||
\AuthorName{Όνομα Επίθετο}
|
|
||||||
\AuthorAEM{1234}
|
|
||||||
\AuthorMail{xxx@ece.auth.gr}
|
|
||||||
|
|
||||||
%\CoAuthorName{Όνομα Επίθετο}
|
|
||||||
%\CoAuthorAEM{1234}
|
|
||||||
%\CoAuthorMail{xxx@ece.auth.gr}
|
|
||||||
|
|
||||||
\DocTitle{Τίτλος}
|
|
||||||
\DocSubTitle{Υπότιτλος}
|
|
||||||
|
|
||||||
\Department{Τμήμα ΗΜΜΥ. Τομέας Ηλεκτρονικής}
|
|
||||||
\ClassName{Μάθημα}
|
|
||||||
|
|
||||||
\InstructorName{Όνομα Επίθετο}
|
|
||||||
\InstructorMail{xxx@auth.gr}
|
|
||||||
|
|
||||||
\CoInstructorName{Όνομα Επίθετο}
|
|
||||||
\CoInstructorMail{xxx@ece.auth.gr}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% English report document setup suggestions
|
|
||||||
%---------------------------------
|
|
||||||
%\WorkGroup{Group Χ}
|
|
||||||
%\AuthorName{Name Surname}
|
|
||||||
%\AuthorAEM{1234}
|
|
||||||
%\AuthorMail{xxx@ece.auth.gr}
|
|
||||||
%
|
|
||||||
%%\CoAuthorName{Name Surname}
|
|
||||||
%%\CoAuthorAEM{AEM}
|
|
||||||
%%\CoAuthorMail{xxx@ece.auth.gr}
|
|
||||||
%
|
|
||||||
%\DocTitle{Title}
|
|
||||||
%\DocSubTitle{Subtitle}
|
|
||||||
%
|
|
||||||
%\Department{Electrical and Computer Engineering. Electronics Sector}
|
|
||||||
%\ClassName{Class Name}
|
|
||||||
%
|
|
||||||
%\InstructorName{Name Surname}
|
|
||||||
%\InstructorMail{xxx@auth.gr}
|
|
||||||
%
|
|
||||||
%\CoInstructorName{Name Surname}
|
|
||||||
%\CoInstructorMail{xxx@ece.auth.gr}
|
|
||||||
|
|
||||||
% Local package requirements
|
|
||||||
%---------------------------------
|
|
||||||
%\usepackage{tabularx}
|
|
||||||
%\usepackage{array}
|
|
||||||
%\usepackage{amssymb}
|
|
||||||
%\usepackage{amsfonts}
|
|
||||||
%\usepackage{amsmath}
|
|
||||||
%\usepackage{commath}
|
|
||||||
%\usepackage{float}
|
|
||||||
|
|
||||||
\usepackage{lipsum}
|
|
||||||
\usepackage{float}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
|
|
||||||
% Request a title page or header
|
|
||||||
\InsertTitle
|
|
||||||
%\InsertTitle[img/background.png][0.8\textwidth][2cm]
|
|
||||||
|
|
||||||
\section{Εισαγωγή}
|
|
||||||
|
|
||||||
\lipsum[1]
|
|
||||||
|
|
||||||
%\InsertFigure{H}{0.8}{fig:lala}{img/auth_logogr.png}{\eng{Makes lala}}
|
|
||||||
|
|
||||||
\setGreek % Only for LaTex, dont use it in XeLaTeX
|
|
||||||
\lipsum[1]
|
|
||||||
\setEnglish % Only for LaTex, dont use it in XeLaTeX
|
|
||||||
|
|
||||||
\end{document}
|
|
Loading…
x
Reference in New Issue
Block a user