Network programming assignment for University
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

217 lines
5.9 KiB

  1. %
  2. % AUTH report settings
  3. %
  4. % author:
  5. % Χρήστος Χουτουρίδης ΑΕΜ 8997
  6. % cchoutou@ece.auth.gr
  7. % Requirements
  8. % ===============================================================
  9. %
  10. % \ClassName: To print Class name
  11. % \DocTitle: To print document title
  12. % \InstructorName: To print instructor's mame
  13. % \InstructorMail: To print instructor's mame
  14. % \CurrentDate : To print the date
  15. % Exported commands
  16. % ===============================================================
  17. % \eng{}
  18. % \FirstPage
  19. % \FirstPageCoAuthor{}{}{}
  20. % \SetFancyHead{}{}
  21. % \InsertFigure{}{}{}
  22. % Global configuration
  23. % ===============================================================
  24. % Note: You can reassign them with \renewcommand
  25. % AFTER the \input{AUTH_Settings_Report.tex}
  26. %
  27. \newcommand{\AuthorName}{Χρήστος Χουτουρίδης}
  28. \newcommand{\AuthorMail}{cchoutou@ece.auth.gr}
  29. \newcommand{\AuthorAEM}{8997}
  30. \newcommand{\Department}{Τμημα ΗΜΜΥ. Τομεάς Ηλεκτρονικής}
  31. % Packages and document configuration
  32. % ===============================================================
  33. \documentclass[11pt, twoside, a4paper]{article}
  34. \usepackage[margin=20mm, top=25mm]{geometry} % Document margins
  35. \usepackage[LGR, T1]{fontenc} % Language hyphenation and typographical rules
  36. \usepackage[utf8]{inputenc}
  37. \usepackage{microtype}
  38. \usepackage{lmodern}
  39. \usepackage[english, greek]{babel}
  40. \usepackage[pdfencoding=auto]{hyperref}
  41. \usepackage{enumitem} % Customized lists
  42. \setlist[itemize]{noitemsep} % Make itemize lists more compact
  43. \usepackage{graphicx} % Graphics and figures
  44. \graphicspath{ {images/} }
  45. \usepackage{wrapfig}
  46. % Custom captions under/above floats in tables or figures
  47. \usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption}
  48. % Allows customization of section/subsection titles
  49. \usepackage{titlesec}
  50. \usepackage{titling}
  51. % Change the look of the section and subsection titles
  52. \titleformat{\section}[block]{\large\scshape}{\thesection.}{1em}{}
  53. \titleformat{\subsection}[block]{\large}{\thesubsection.}{1em}{}
  54. % Headers
  55. \usepackage{fancyhdr}
  56. \pagestyle{fancy} % All pages have headers and footers
  57. \fancyhead{} % Blank out the default header
  58. \fancyfoot{} % Blank out the default footer
  59. \fancyfoot[RO,LE]{\thepage} % Custom footer text
  60. \pagenumbering{arabic}
  61. \usepackage{alphabeta}
  62. \usepackage{amsmath,amsfonts,mathtools}
  63. %\usepackage{multicol}
  64. %\usepackage{csvsimple}
  65. %\usepackage{tabularx}
  66. %\usepackage{lscape}
  67. % Local commands
  68. % ===============================================================
  69. % syntactic suggar for horizaontal rule
  70. \newcommand{\Hrule}{
  71. \rule{\linewidth}{0.1mm}
  72. }
  73. % AUTH report exported commands
  74. % ===============================================================
  75. % \eng{}
  76. % syntactic suggar for english text
  77. % example \eng{A quick brown fox jumpedover the lazy dog}
  78. \newcommand{\eng}[1]{
  79. \foreignlanguage{english}{#1}
  80. }
  81. % \FirstPage
  82. \newcommand{\FirstPage}{
  83. \begin{titlepage}
  84. % Logo
  85. \begin{figure}
  86. \begin{flushleft}
  87. \includegraphics[width=5cm]{auth_logogr.png}
  88. \end{flushleft}
  89. \end{figure}
  90. % Titles
  91. \center % Center everything on the page
  92. \textbf{} \\[3.5cm] % vertical space
  93. \textsc{\Large \Department} \\[0.5cm] % Department
  94. \textsc{\Large \ClassName} \\[1.5cm] % Class/Course name
  95. \Hrule \\[0.4cm] % -------
  96. {\huge \bfseries \DocTitle} \\[0.1cm] % Document/Assignement Title
  97. \Hrule \\[3.5cm] % -------
  98. % vertical space
  99. % Authors
  100. \begin{minipage}{0.4\textwidth}
  101. \begin{flushleft} \large
  102. \emph{Συντάκτης :} \\
  103. \textsc{\AuthorName} \\
  104. \textsc{AEM:\AuthorAEM} \\[1ex]
  105. \normalsize \href{mailto:\AuthorMail}{\eng{\AuthorMail}}
  106. \end{flushleft}
  107. \end{minipage}
  108. \begin{minipage}{0.4\textwidth}
  109. \begin{flushright} \large
  110. \emph{Διδάσκον :} \\ % Instructor
  111. \textsc{\InstructorName}\\[1ex]
  112. \normalsize
  113. \href{mailto:\InstructorMail}{\eng{\InstructorMail}}
  114. \end{flushright}
  115. \end{minipage} \\
  116. \vfill
  117. {\large \CurrentDate} \\ % date
  118. \end{titlepage}
  119. \newpage
  120. }
  121. % \FirstPageCoAuthor{}{}{}
  122. % [1]: CoAuthor's name
  123. % [2]: CoAuthor's AEM
  124. % [3]: CoAuthor's email
  125. % example: \FirstPage{someone}{1000}{someone@someone.com}
  126. \newcommand{\FirstPageCoAuthor}[3]{
  127. \begin{titlepage}
  128. % Logo
  129. \begin{figure}
  130. \begin{flushleft}
  131. \includegraphics[width=5cm]{auth_logogr.png}
  132. \end{flushleft}
  133. \end{figure}
  134. % Titles
  135. \center % Center everything on the page
  136. \textbf{} \\[3.5cm] % vertical space
  137. \textsc{\Large \Department} \\[0.5cm] % Department
  138. \textsc{\Large \ClassName} \\[1.5cm] % Class/Course name
  139. \Hrule \\[0.4cm] % -------
  140. {\huge \bfseries \DocTitle} \\[0.1cm] % Document/Assignement Title
  141. \Hrule \\[3.5cm] % -------
  142. % vertical space
  143. % Authors
  144. \begin{minipage}{0.4\textwidth}
  145. \begin{flushleft} \large
  146. \emph{Συντάκτες :} \\
  147. \textsc{\AuthorName} \\
  148. \textsc{AEM:\AuthorAEM} \\[1ex]
  149. \normalsize \href{mailto:\AuthorMail}{\eng{\AuthorMail}} \\[2ex]
  150. \textsc{#1} \\
  151. \textsc{AEM:#2} \\[1ex]
  152. \normalsize \href{mailto:#3}{\eng{#3}}
  153. \end{flushleft}
  154. \end{minipage}
  155. \begin{minipage}{0.4\textwidth}
  156. \begin{flushright} \large
  157. \emph{Διδάσκον :} \\ % Instructor
  158. \textsc{\InstructorName}\\[1ex]
  159. \normalsize
  160. \href{mailto:\InstructorMail}{\eng{\InstructorMail}}
  161. \end{flushright}
  162. \end{minipage} \\
  163. \vfill
  164. {\large \CurrentDate} \\ % date
  165. \end{titlepage}
  166. \newpage
  167. }
  168. % \setFancyHead{}{}
  169. % [1]: Even page text
  170. % [2]: Odd page text
  171. % example: \setFancyHead{Μαθημα}{Εργασία}
  172. \newcommand{\setFancyHead}[2]{
  173. \fancyhead[LE]{#1}
  174. \fancyhead[RO]{#2}
  175. }
  176. % \InsertFigure{}{}{}{}
  177. % [1]: scale
  178. % [2]: Label
  179. % [3]: Figure file
  180. % [4]: Caption text
  181. % example: \InsertFigure{0.8}{fig:lala}{lala.png}{\eng{Makes lala}}
  182. \newcommand{\InsertFigure}[4]{
  183. \begin{figure*}[ht]
  184. \captionsetup{format=plain}
  185. \centering
  186. \includegraphics[width=#1\textwidth]{#3}
  187. \caption{#4}
  188. \label{#2}
  189. \end{figure*}
  190. }