A LaTeX configuration files to use for various reports
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

282 lignes
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]{\foreignlanguage{english}{#1}}
  103. % \gr{}
  104. % syntactic suggar for greek text inside english
  105. % example \gr{Άσπρη πέτρα ξέξασπρη κι απτον ήλιο ξεξασπρότερη}
  106. \newcommand{\gr}[1]{\foreignlanguage{greek}{#1}}
  107. % \setEnglish
  108. % Selects english for the rest of the text
  109. \newcommand{\setEnglish}{\selectlanguage{english}}
  110. % \setGreek
  111. % Selects greek for the rest of the text
  112. \newcommand{\setGreek}{\selectlanguage{greek}}
  113. % \BottomTitleSpace{}
  114. % example \BottomTitleSpace{8em}
  115. \newcommand{\BottomTitleSpace}[1]{
  116. \renewcommand{\bottomtitlespace}{#1}
  117. }
  118. % \FirstPage
  119. \newcommand{\FirstPage}{
  120. \begin{titlepage}
  121. % Logo
  122. \begin{figure}
  123. \begin{flushleft}
  124. \includegraphics[width=5cm]{config/images/auth_logogr.png}
  125. \end{flushleft}
  126. \end{figure}
  127. % Titles
  128. \center % Center everything on the page
  129. \textbf{} \\[3.5cm] % vertical space
  130. \textsc{\Large \Department} \\[0.5cm] % Department
  131. \textsc{\Large \ClassName} \\[1.5cm] % Class/Course name
  132. \Hrule \\[0.4cm] % -------
  133. {\huge \bfseries \DocTitle} \\[0.1cm] % Document/Assignement Title
  134. \Hrule \\[3.5cm] % -------
  135. % vertical space
  136. % Authors
  137. \begin{minipage}{0.4\textwidth}
  138. \begin{flushleft}
  139. \large
  140. \ifdefined \CoAuthorName \emph{Συντάκτες:} \else \emph{Συντάκτης:}\fi \\
  141. \textsc{\AuthorName} \\
  142. \textsc{AEM:\AuthorAEM} \\[1ex]
  143. \normalsize \href{mailto:\AuthorMail}{\eng{\AuthorMail}} \\[2ex]
  144. \large
  145. \ifdefined\CoAuthorName \textsc{\CoAuthorName} \\ \fi
  146. \ifdefined\CoAuthorAEM \textsc{AEM:\CoAuthorAEM} \\[1ex] \fi
  147. \ifdefined\CoAuthorMail \normalsize \href{mailto:\CoAuthorMail}{\eng{\CoAuthorMail}} \fi
  148. \end{flushleft}
  149. \end{minipage}
  150. \begin{minipage}{0.4\textwidth}
  151. \begin{flushright} \large
  152. \emph{Διδάσκων:} \\ % Instructor
  153. \textsc{\InstructorName} \\[1ex]
  154. \normalsize
  155. \href{mailto:\InstructorMail}{\eng{\InstructorMail}}
  156. \end{flushright}
  157. \end{minipage} \\
  158. \vfill
  159. {\large \CurrentDate} \\ % date
  160. \end{titlepage}
  161. \newpage
  162. }
  163. % \TitleHeader
  164. \newcommand{\TitleHeader}{
  165. \thispagestyle{plain}
  166. \begin{center} % Center everything on the page
  167. % Logo
  168. \begin{figure}
  169. \center
  170. \includegraphics[width=5cm]{config/images/auth_logogr.png}
  171. \end{figure}
  172. % Titles
  173. \textsc{\Large \Department} \\[0.4cm] % Department
  174. \textsc{\Large \ClassName} \\[0.1cm] % Class/Course name
  175. {\Large \bfseries \DocTitle} \\[0.2cm] % Document/Assignement Title
  176. {\large \CurrentDate} \\[0.4cm] % date
  177. % Authors
  178. \begin{minipage}{0.4\textwidth}
  179. \begin{flushleft}
  180. \large
  181. \ifdefined \CoAuthorName \emph{Συντάκτες:} \else \emph{Συντάκτης:}\fi \\
  182. \textsc{\AuthorName} \\
  183. \textsc{AEM:\AuthorAEM} \\[1ex]
  184. \normalsize \href{mailto:\AuthorMail}{\eng{\AuthorMail}} \\[2ex]
  185. \large
  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. }