A LaTeX configuration files to use for various reports
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.

282 lines
9.1 KiB

  1. %
  2. % AUTH report settings
  3. %
  4. % author:
  5. % Χρήστος Χουτουρίδης ΑΕΜ 8997
  6. % cchoutou@ece.auth.gr
  7. % Configuration requirements as new commands
  8. % ===============================================================
  9. %
  10. % \AuthorName: Author's name
  11. % \AuthorMail: Author's mail
  12. % \AuthorAEM: Author's AEM
  13. % \CoAuthorName: Co-author's name [optional]
  14. % \CoAuthorMail: Co-author's mail [optional]
  15. % \DocTitle: To print document title (also in fancyheader)
  16. % \CoAuthorAEM : Co-author's AEM [optional]
  17. % \Department: The School
  18. % \ClassName: Class name to print (also in fancyheader)
  19. % \InstructorName: To print instructor's mame
  20. % \InstructorMail: To print instructor's mame
  21. % \CurrentDate: To print the date
  22. %
  23. % example:
  24. % \newcommand{\AuthorName}{Χρήστος Χουτουρίδης}
  25. % \newcommand{\AuthorMail}{cchoutou@ece.auth.gr}
  26. % \newcommand{\AuthorAEM}{8997}
  27. %
  28. % \newcommand{\CoAuthorName}{John Doe}
  29. % \newcommand{\CoAuthorMail}{doe@ece.auth.gr}
  30. % \newcommand{\CoAuthorAEM}{1729}
  31. %
  32. % \newcommand{\DocTitle}{Universal computing machine}
  33. % \newcommand{\Department}{Τμημα ΗΜΜΥ. Τομεάς Ηλεκτρονικής}
  34. % \newcommand{\ClassName}{Computer Science lab}
  35. %
  36. % \newcommand{\InstructorName}{Allan Turing}
  37. % \newcommand{\InstructorMail}{aturing@auth.gr}
  38. % \newcommand{\CurrentDate}{\today}
  39. %
  40. % Exported commands
  41. % ===============================================================
  42. % \eng{}
  43. % \gr{}
  44. % \setEnglish
  45. % \setGreek
  46. % \BottomTitleSpace{}
  47. % \FirstPage
  48. % \TitleHeader
  49. % \setFancyHeadLR{}{}
  50. % \setFancyHeadLERO{}{}
  51. % \InsertFigure{}{}{}{}
  52. % \WrapFigure{}{}{}{}{}
  53. % Packages and document configuration
  54. % ===============================================================
  55. \documentclass[11pt, twoside, a4paper]{article}
  56. \usepackage[margin=20mm, top=25mm]{geometry} % Document margins
  57. \usepackage[LGR, T1]{fontenc} % Language hyphenation and typographical rules
  58. \usepackage[utf8]{inputenc}
  59. \usepackage{microtype}
  60. \usepackage{lmodern}
  61. \usepackage[english, greek]{babel}
  62. \usepackage[pdfencoding=auto]{hyperref}
  63. \usepackage{enumitem} % Customized lists
  64. \setlist[itemize]{noitemsep} % Make itemize lists more compact
  65. \usepackage{graphicx} % Graphics and figures
  66. \graphicspath{ {images/} }
  67. \usepackage{wrapfig}
  68. % Custom captions under/above floats in tables or figures
  69. \usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption}
  70. % Allows customization of section/subsection titles
  71. \usepackage[nobottomtitles]{titlesec}
  72. \renewcommand{\bottomtitlespace}{0.12\textheight}
  73. \usepackage{titling}
  74. % Change the look of the section and subsection titles
  75. \titleformat{\section}[block]{\large\scshape}{\thesection.}{1em}{}
  76. \titleformat{\subsection}[block]{\large}{\thesubsection.}{1em}{}
  77. % Headers
  78. \usepackage{fancyhdr}
  79. \pagestyle{fancy} % All pages have headers and footers
  80. \fancyhead{} % Blank out the default header
  81. \fancyfoot{} % Blank out the default footer
  82. \fancyfoot[RO,LE]{\thepage} % Custom footer text
  83. \pagenumbering{arabic}
  84. \usepackage[bottom]{footmisc} % Place footnotes always as much to the bottom as possible.
  85. \usepackage{alphabeta}
  86. \usepackage{amsmath,amsfonts,mathtools}
  87. %\usepackage{multicol}
  88. %\usepackage{csvsimple}
  89. %\usepackage{tabularx}
  90. %\usepackage{lscape}
  91. % Local commands
  92. % ===============================================================
  93. % syntactic suggar for horizaontal rule
  94. \newcommand{\Hrule}{
  95. \rule{\linewidth}{0.1mm}
  96. }
  97. % AUTH report exported commands
  98. % ===============================================================
  99. % \eng{}
  100. % syntactic suggar for english text inside greek
  101. % example \eng{A quick brown fox jumpedover the lazy dog}
  102. \newcommand{\eng}[1]{
  103. \foreignlanguage{english}{#1}
  104. }
  105. % \gr{}
  106. % syntactic suggar for greek text inside english
  107. % example \gr{Άσπρη πέτρα ξέξασπρη κι απτον ήλιο ξεξασπρότερη}
  108. \newcommand{\gr}[1]{
  109. \foreignlanguage{greek}{#1}
  110. }
  111. % \setEnglish
  112. % Selects english for the rest of the text
  113. \newcommand{\setEnglish}{\selectlanguage{english}}
  114. % \setGreek
  115. % Selects greek for the rest of the text
  116. \newcommand{\setGreek}{\selectlanguage{greek}}
  117. % \BottomTitleSpace{}
  118. % example \BottomTitleSpace{8em}
  119. \newcommand{\BottomTitleSpace}[1]{
  120. \renewcommand{\bottomtitlespace}{#1}
  121. }
  122. % \FirstPage
  123. \newcommand{\FirstPage}{
  124. \begin{titlepage}
  125. % Logo
  126. \begin{figure}
  127. \begin{flushleft}
  128. \includegraphics[width=5cm]{config/images/auth_logogr.png}
  129. \end{flushleft}
  130. \end{figure}
  131. % Titles
  132. \center % Center everything on the page
  133. \textbf{} \\[3.5cm] % vertical space
  134. \textsc{\Large \Department} \\[0.5cm] % Department
  135. \textsc{\Large \ClassName} \\[1.5cm] % Class/Course name
  136. \Hrule \\[0.4cm] % -------
  137. {\huge \bfseries \DocTitle} \\[0.1cm] % Document/Assignement Title
  138. \Hrule \\[3.5cm] % -------
  139. % vertical space
  140. % Authors
  141. \begin{minipage}{0.4\textwidth}
  142. \begin{flushleft} \large
  143. \ifdefined \CoAuthorName \emph{Συντάκτες :} \else \emph{Συντάκτης :}\fi \\
  144. \textsc{\AuthorName} \\
  145. \textsc{AEM:\AuthorAEM} \\[1ex]
  146. \normalsize \href{mailto:\AuthorMail}{\eng{\AuthorMail}} \\[2ex]
  147. \ifdefined\CoAuthorName \textsc{\CoAuthorName} \\ \fi
  148. \ifdefined\CoAuthorAEM \textsc{AEM:\CoAuthorAEM} \\[1ex] \fi
  149. \ifdefined\CoAuthorMail \normalsize \href{mailto:\CoAuthorMail}{\eng{\CoAuthorMail}} \fi
  150. \end{flushleft}
  151. \end{minipage}
  152. \begin{minipage}{0.4\textwidth}
  153. \begin{flushright} \large
  154. \emph{Διδάσκων :} \\ % Instructor
  155. \textsc{\InstructorName}\\[1ex]
  156. \normalsize
  157. \href{mailto:\InstructorMail}{\eng{\InstructorMail}}
  158. \end{flushright}
  159. \end{minipage} \\
  160. \vfill
  161. {\large \CurrentDate} \\ % date
  162. \end{titlepage}
  163. \newpage
  164. }
  165. % \TitleHeader
  166. \newcommand{\TitleHeader}{
  167. \thispagestyle{plain}
  168. \begin{center} % Center everything on the page
  169. % Logo
  170. \begin{figure}
  171. \center
  172. \includegraphics[width=5cm]{config/images/auth_logogr.png}
  173. \end{figure}
  174. % Titles
  175. \textsc{\Large \Department} \\[0.4cm] % Department
  176. \textsc{\Large \ClassName} \\[0.1cm] % Class/Course name
  177. {\Large \bfseries \DocTitle} \\[0.2cm] % Document/Assignement Title
  178. {\large \CurrentDate} \\[0.4cm] % date
  179. % Authors
  180. \begin{minipage}{0.4\textwidth}
  181. \begin{flushleft} \large
  182. \ifdefined \CoAuthorName \emph{Συντάκτες :} \else \emph{Συντάκτης :}\fi \\
  183. \textsc{\AuthorName} \\
  184. \textsc{AEM:\AuthorAEM} \\[1ex]
  185. \normalsize \href{mailto:\AuthorMail}{\eng{\AuthorMail}} \\[2ex]
  186. \ifdefined\CoAuthorName \textsc{\CoAuthorName} \\ \fi
  187. \ifdefined\CoAuthorAEM \textsc{AEM:\CoAuthorAEM} \\[1ex] \fi
  188. \ifdefined\CoAuthorMail \normalsize \href{mailto:\CoAuthorMail}{\eng{\CoAuthorMail}} \fi
  189. \end{flushleft}
  190. \end{minipage}
  191. \begin{minipage}{0.4\textwidth}
  192. \begin{flushright} \large
  193. \emph{Διδάσκων :} \\ % Instructor
  194. \textsc{\InstructorName}\\[1ex]
  195. \normalsize
  196. \href{mailto:\InstructorMail}{\eng{\InstructorMail}}
  197. \end{flushright}
  198. \end{minipage}
  199. \end{center}
  200. \text{} \\
  201. }
  202. % \setFancyHead{}{}
  203. % [1]: Left text
  204. % [2]: Right text
  205. % example: \setFancyHead{Μαθημα}{Εργασία}
  206. \newcommand{\setFancyHeadLR}[2]{
  207. \fancyhead[L]{#1}
  208. \fancyhead[R]{#2}
  209. }
  210. % \setFancyHead{}{}
  211. % [1]: Left, even page text
  212. % [2]: Right, odd page text
  213. % example: \setFancyHead{Μαθημα}{Εργασία}
  214. \newcommand{\setFancyHeadLERO}[2]{
  215. \fancyhead[LE]{#1}
  216. \fancyhead[RO]{#2}
  217. }
  218. % \InsertFigure{}{}{}{}
  219. % [1]: scale
  220. % [2]: Label
  221. % [3]: Figure file
  222. % [4]: Caption text
  223. % example: \InsertFigure{0.8}{fig:lala}{lala.png}{\eng{Makes lala}}
  224. \newcommand{\InsertFigure}[4]{
  225. \begin{figure*}[h!]
  226. \captionsetup{format=plain}
  227. \centering
  228. \includegraphics[width=#1\textwidth]{#3}
  229. \caption{#4}
  230. \label{#2}
  231. \end{figure*}
  232. }
  233. % \WrapFigure{}{}{}{}
  234. % [1]: scale
  235. % [2]: place left or right r,l,R,L
  236. % [3]: Label
  237. % [4]: Figure file
  238. % [5]: Caption text
  239. % example: \WrapFigure{0.8}{r}{fig:lala}{lala.png}{\eng{Makes lala}}
  240. \newcommand{\WrapFigure}[5]{
  241. \begin{wrapfigure}{#2}{#1\textwidth}
  242. \vspace{-20pt}
  243. \begin{center}
  244. \captionsetup{format=plain}
  245. \includegraphics[width=#1\textwidth]{#4}
  246. \caption{#5}
  247. \label{#3}
  248. \end{center}
  249. \vspace{-20pt}
  250. \end{wrapfigure}
  251. }