Schule als Staat Projekt Web, Dokumente, etc.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

193 řádky
4.2KB

  1. \ProvidesClass{sasbase}[2017/11/6 SaS base class]
  2. \LoadClass[twocolumn]{article}
  3. \RequirePackage[utf8]{inputenc}
  4. \RequirePackage[shortlabels]{enumitem}
  5. \RequirePackage{environ}
  6. \RequirePackage{geometry}
  7. \RequirePackage{booktabs}
  8. \RequirePackage{mathptmx}
  9. \RequirePackage[12pt]{moresize}
  10. \RequirePackage{array}
  11. \RequirePackage{titlesec}
  12. \RequirePackage[titles]{tocloft}
  13. \RequirePackage[rm={lining,proportional},sf={lining, proportional},tt={lining, proportional, variable}]{cfr-lm}
  14. \RequirePackage[T1]{fontenc}
  15. \RequirePackage{indentfirst}
  16. \RequirePackage{fancyhdr}
  17. \RequirePackage{bm}
  18. \RequirePackage{roboto}
  19. % SET PAGE GEOMETRY
  20. \geometry{
  21. left=13mm,
  22. right=13mm,
  23. top=8mm,
  24. bottom=8mm,
  25. includeheadfoot}
  26. % ENABLE FANCY HEADERS
  27. \pagestyle{fancy}
  28. \fancyhf{}
  29. % DISABLE HEADER RULE
  30. \renewcommand{\headrulewidth}{0pt}
  31. % ADD PAGE NUMBER TO TOP RIGHT / LEFT (ODD / EVEN)
  32. \fancyhead[R]{\sffamily\bfseries\large{\textbf{\thepage}} \ifodd\value{page}\else\hfill\fi}
  33. % SET COLUMN GAP OF TWOCOLUMN LAYOUT
  34. \setlength{\columnsep}{6mm}
  35. % SET PLACE COMMAND
  36. \makeatletter
  37. \newcommand{\place}[1]{
  38. \def\@place{#1}
  39. }
  40. \makeatother
  41. % SET DATE COMMAND (COLLIDES WITH BUILTIN)
  42. \makeatletter
  43. \newcommand{\datum}[1]{
  44. \def\@datum{#1}
  45. }
  46. \makeatother
  47. % SET NUMBER COMMAND (COLLIDES WITH BUILTIN)
  48. \makeatletter
  49. \newcommand{\edition}[1]{
  50. \def\@edition{#1}
  51. }
  52. \makeatother
  53. % HELPER TO EXTRACT YEAR FROM DATE
  54. \newcommand*\TheLastWord[1]{\expandafter\xreverseit\expandafter{\expandafter}#1 \relax}
  55. \def\xreverseit#1#2 #3{%
  56. \ifx\relax#3%
  57. #2%
  58. \expandafter\xthree
  59. \fi
  60. \xreverseit{#1 #2}#3%
  61. }
  62. \def\xthree#1#2#3{}
  63. % ------------------
  64. % SECTION FORMATTING
  65. % ------------------
  66. \titleformat
  67. {\section}
  68. {\centering\normalfont\bf\large\ostyle}
  69. {\thesection}
  70. {1em}
  71. {}
  72. \titleformat
  73. {\subsection}
  74. {\centering\normalfont\bf}
  75. {\thesection}
  76. {1em}
  77. {}
  78. % -----------------
  79. % TABLE OF CONTENTS
  80. % -----------------
  81. % DISABLE BOLD
  82. \renewcommand{\cftsecfont}{\normalfont\ostyle}
  83. % ONLY SHOW SECTIONS IN TOC
  84. \setcounter{tocdepth}{1}
  85. % HIDE NUMBERING OF SECTIONS
  86. \setcounter{secnumdepth}{0}
  87. % DEFINE SPACING BETWEEN ITEMS
  88. \setlength{\cftbeforesecskip}{1mm}
  89. \setlength{\cftbeforetoctitleskip}{0mm}
  90. \setlength{\cftaftertoctitleskip}{5cm}
  91. % SET DOTS FOR SECTIONS
  92. \renewcommand{\cftsecdotsep}{\cftdotsep}
  93. % Redefinition of ToC command to remove heading
  94. \makeatletter
  95. \renewcommand\tableofcontents{%
  96. \vspace{-4mm}
  97. \@starttoc{toc}
  98. }
  99. \makeatother
  100. % CUSTOM TOC COMMAND
  101. \newcommand{\mycontents}{%
  102. \vspace{4mm}
  103. \ostyle
  104. \begin{tabular}{lp{.9\textwidth}}
  105. \textbf{Inhalt:} & \tableofcontents \\
  106. \end{tabular}
  107. }
  108. % ---------------------------------------
  109. % TITLE (THIS IS WHERE THE MAGIC HAPPENS)
  110. % ---------------------------------------
  111. % SET WIDTH OF RULES IN TABULAR
  112. \setlength{\arrayrulewidth}{.3mm}
  113. % SET CELL HEIGHT
  114. %\renewcommand{\arraystretch}{2.5}
  115. % DEFINE OWN COLUMN TYPE
  116. \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
  117. \newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
  118. \makeatletter
  119. \def\@maketitle{
  120. \vspace*{-10mm}
  121. \begin{center}
  122. \textbf{\ostyle{\HUGE{\@title}}}
  123. \end{center}
  124. \vspace{5mm}
  125. \begin{tabular}{M{\dimexpr.1\textwidth-2\tabcolsep}|M{\dimexpr.8\textwidth-2\tabcolsep}|M{\dimexpr.1\textwidth-2\tabcolsep}@{}m{0pt}@{}}
  126. \hline
  127. \large \ostyle{\TheLastWord{\@datum}} &
  128. \large \ostyle{Ausgegeben in {\@place} am {\@datum}} &
  129. \large \ostyle{Nr. {\@edition}}
  130. &\\[5mm] \hline
  131. \multicolumn{3}{m{\dimexpr\textwidth-2\tabcolsep}}{\mycontents} \\ \hline
  132. \end{tabular}
  133. \vspace{10mm}
  134. %\thispagestyle{fancy}
  135. }
  136. \makeatother
  137. \newcommand{\mytitle}{
  138. \maketitle
  139. \thispagestyle{fancy}
  140. }
  141. % ---------------------------
  142. % DEFINITION OF USEFUL MACROS
  143. % ---------------------------
  144. % ARTICLE COUNTER
  145. \newcounter{articleno}
  146. \setcounter{articleno}{1}
  147. % AN ARTICLE (LAW) ENVIRONMENT
  148. \newenvironment{article}[1][nil]{
  149. \def\val{#1}
  150. \def\null{nil}
  151. \subsubsection{Artikel {\thearticleno} {\ifx\val\null\else(#1)\fi}}
  152. \stepcounter{articleno}
  153. \begin{enumerate}[(1)]
  154. }
  155. {
  156. \end{enumerate}
  157. }
  158. % JUST TO MAKE CLEAR WHICH LEVEL TO USE
  159. \newcommand{\segmentoflaw}[1]{\subsection{#1}}