Schule als Staat Projekt Web, Dokumente, etc.
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.

134 lignes
2.8KB

  1. \ProvidesClass{sasbase}[2017/11/6 SaS base class]
  2. \LoadClass[twocolumn]{article}
  3. \RequirePackage[utf8]{inputenc}
  4. \RequirePackage{geometry}
  5. \RequirePackage{booktabs}
  6. \RequirePackage{mathptmx}
  7. \RequirePackage[12pt]{moresize}
  8. \RequirePackage{array}
  9. \RequirePackage{titlesec}
  10. \RequirePackage[titles]{tocloft}
  11. \RequirePackage[rm={lining,proportional},sf={lining, proportional},tt={lining, proportional, variable}]{cfr-lm}
  12. \RequirePackage[T1]{fontenc}
  13. \RequirePackage{indentfirst}
  14. % SET PAGE GEOMETRY
  15. \geometry{
  16. left=12mm,
  17. right=12mm,
  18. top=8mm}
  19. % SET PLACE COMMAND
  20. \makeatletter
  21. \newcommand{\place}[1]{
  22. \def\@place{#1}
  23. }
  24. \makeatother
  25. % SET DATE COMMAND (COLLIDES WITH BUILTIN)
  26. \makeatletter
  27. \newcommand{\datum}[1]{
  28. \def\@datum{#1}
  29. }
  30. \makeatother
  31. % HELPER TO EXTRACT YEAR FROM DATE
  32. \newcommand*\TheLastWord[1]{\expandafter\xreverseit\expandafter{\expandafter}#1 \relax}
  33. \def\xreverseit#1#2 #3{%
  34. \ifx\relax#3%
  35. #2%
  36. \expandafter\xthree
  37. \fi
  38. \xreverseit{#1 #2}#3%
  39. }
  40. \def\xthree#1#2#3{}
  41. \renewcommand{\arraystretch}{2.5}
  42. % ------------------
  43. % SECTION FORMATTING
  44. % ------------------
  45. \titleformat
  46. {\section}
  47. {\centering\normalfont\bf\large\ostyle}
  48. {\thesection}
  49. {1em}
  50. {}
  51. \titleformat
  52. {\subsection}
  53. {\centering\normalfont\bf}
  54. {\thesection}
  55. {1em}
  56. {}
  57. % -----------------
  58. % TABLE OF CONTENTS
  59. % -----------------
  60. % DISABLE BOLD
  61. \renewcommand{\cftsecfont}{\normalfont}
  62. % ONLY SHOW SECTIONS IN TOC
  63. \setcounter{tocdepth}{1}
  64. % HIDE NUMBERING OF SECTIONS
  65. \setcounter{secnumdepth}{0}
  66. % DEFINE OWN COLUMN TYPE
  67. \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
  68. % DEFINE SPACING BETWEEN ITEMS
  69. \setlength{\cftbeforesecskip}{-3mm}
  70. \setlength{\cftbeforetoctitleskip}{0mm}
  71. \setlength{\cftaftertoctitleskip}{-10mm}
  72. % SET DOTS FOR SECTIONS
  73. \renewcommand{\cftsecdotsep}{\cftdotsep}
  74. %\setlength{\cftsecnumwidth}{0mm}
  75. % Redefinition of ToC command to remove heading
  76. \makeatletter
  77. \renewcommand\tableofcontents{%
  78. \vspace{-4mm}
  79. \@starttoc{toc}
  80. }
  81. \makeatother
  82. \newcommand{\mycontents}{%
  83. \ostyle
  84. \begin{tabular}{lp{.9\textwidth}}
  85. \textbf{Inhalt:} & \tableofcontents \\
  86. \end{tabular}
  87. \vspace*{-5cm}
  88. }
  89. % ---------------------------------------
  90. % TITLE (THIS IS WHERE THE MAGIC HAPPENS)
  91. % ---------------------------------------
  92. \setlength{\arrayrulewidth}{.3mm}
  93. \makeatletter
  94. \def\@maketitle{
  95. \begin{center}
  96. \textbf{\ostyle{\HUGE{\@title}}}
  97. \end{center}
  98. \vspace{5mm}
  99. \begin{tabular}{P{\dimexpr.1\textwidth-2\tabcolsep}|P{\dimexpr.8\textwidth-2\tabcolsep}|P{\dimexpr.1\textwidth-2\tabcolsep}}
  100. \hline
  101. \large \ostyle{\TheLastWord{\@datum}} &
  102. \large \ostyle{Ausgegeben in {\@place} am {\@datum}} &
  103. \large \ostyle{Nr. 1}
  104. \\ \hline
  105. \multicolumn{3}{p{\textwidth}}{\mycontents} \\ \hline
  106. \end{tabular}
  107. \vspace{10mm}
  108. }
  109. \makeatother