Skip to content

Commit

Permalink
Added the default i6 exercise sheet template to the new exercise folder
Browse files Browse the repository at this point in the history
  • Loading branch information
dominik-probst committed Nov 8, 2023
1 parent 57c2d3f commit 47effa9
Show file tree
Hide file tree
Showing 5 changed files with 307 additions and 0 deletions.
27 changes: 27 additions & 0 deletions exercise/in-person/0-Demo.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
\documentclass[
english,
smallborders
]{i6prcsht}
\usepackage{i6common}
\usepackage{i6lecture}

\usepackage{todonotes}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage{pdfpages}
\usepackage{csquotes}

\hyphenation{Stud-On}

\begin{document}

\title{Exercise 00: Demo}
\maketitle

\section*{Task 1: Lorem ipsum}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

\begin{solution}
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet,
\end{solution}
\end{document}
23 changes: 23 additions & 0 deletions exercise/in-person/i6common.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
% This file adds packages and configuration options used
% in several exercises.
% Do not use it for packages which are specific to your course!
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{i6common}[2014/04/16 Packages and configuration usefull for practice sheets across courses]

\RequirePackage{enumerate}
\RequirePackage{tikz}
\RequirePackage{hyperref}
\RequirePackage{listings}
\RequirePackage{bold-extra} % Ermöglicht fetten Text in \ttfamily
\RequirePackage{amssymb}
\RequirePackage{amsmath} % align-Environment

\lstset{basicstyle=\ttfamily,language=SQL}
\hypersetup{
colorlinks = true,
linkcolor = {green!40!black},
citecolor = {green!40!black},
urlcolor = {green!40!black}
}

143 changes: 143 additions & 0 deletions exercise/in-person/i6exc.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{i6exc}[2014/04/14 Commands for practice sheets and exams]

% Process options
\newif\ifgerman
\DeclareOption{ngerman}{ % German strings
\germantrue
}
\DeclareOption*{} % Ignore unknown options
\ProcessOptions\relax


% Language-dependent strings for titles and footers
\ifgerman
\newcommand*{\WinterSem}{Wintersemester}
\newcommand*{\SummerSem}{Sommersemester}
\newcommand*{\Department}{Department Informatik}
\newcommand*{\Chair}{Lehrstuhl für Informatik 6\\(Datenmanagement)}
\else
\newcommand*{\WinterSem}{Winter Semester}
\newcommand*{\SummerSem}{Summer Semester}
\newcommand*{\Department}{Department of Computer Science}
\newcommand*{\Chair}{Computer Science 6\\(Data Management)}
\fi


% Calculate semester based on \month and \year
% \semester prints long form of current semester and \semester* prints short form
\ifnum\month<4
\newcounter{LastYear}
\setcounter{LastYear}{\year}
\addtocounter{LastYear}{-1}
\newcommand{\SemesterShort}{WS \theLastYear/\the\year}
\newcommand{\SemesterLong}{\WinterSem~\theLastYear/\the\year}
\else\ifnum\month>9
\newcounter{NextYear}
\setcounter{NextYear}{\year}
\addtocounter{NextYear}{1}
\newcommand{\SemesterShort}{WS \the\year/\theNextYear}
\newcommand{\SemesterLong}{\WinterSem~\the\year/\theNextYear}
\else
\newcommand{\SemesterShort}{SS \the\year}
\newcommand{\SemesterLong}{\SummerSem~\the\year}
\fi
\fi
\newcommand{\semester}{\@ifstar
\SemesterShort%
\SemesterLong%
}


% Solution and Notes
% Use environment "solution" or command \sol to mark solutions.
% \sol is ment for short single-line solutions and may be used with anoptional space argument (e.g. \sol[2cm]{solution}) to insert horizontal space when \withsolutions is not set.
% Use environment "note" or command \nt to mark additional notes, e.g. ment only for tutors.
% Solutions and notes are colored with solutioncolor and notecolor respectively.
% For places where a more flexible solution is needed, e.g. because the content should not be colored, the conditionals \ifsolutions and \ifnotes are provided.
% Use \withsolutions and \withnotes respectively to make content of these environments visible
\RequirePackage[table,dvipsnames]{xcolor}
\RequirePackage{comment}
% Fix encoding issues with the comment package.
%
% See http://tex.stackexchange.com/qüstions/159820/comment-sty-and-utf8-encoding/159824
%
% "The problem is in how comments.sty writes out files; when you input à, it is interpreted during a \write and it becomes the character corresponding to à in the T1 encoding.
% Solution: modify \ThisComment to write out uninterpreted commands."
% This effects only comment.sty version >= 3.7. ThisComment is not defined in older versions.
%
\ifdefined\ThisComment
\renewcommand\ThisComment[1]{%
\immediate\write\CommentStream{\unexpanded{#1}}%
}
\fi


\definecolor{solutioncolor}{RGB}{0,128,255}
\definecolor{notecolor}{RGB}{255,128,0}

% Solutions
\newif\ifsolutions

\newcommand{\sol}[2][]{%
\ifsolutions%
\begingroup\color{solutioncolor}#2\endgroup%
\else%
\ifx\\#1\\\else \hspace*{#1} \fi%
\fi%
}
\excludecomment{solution} % Define solution environment and default to invisible
\excludecomment{footnotedsolution} % Define solution environment with footnote support
\newcommand{\withsolutions}{
\solutionstrue
\specialcomment{solution}
{\begingroup\color{solutioncolor}}
{\endgroup}
\specialcomment{footnotedsolution}
{%
\begingroup%
\color{solutioncolor}%
\setkomafont{footnoterule}{\color{solutioncolor}}%
\setkomafont{footnote}{\color{solutioncolor}}

\begin{minipage}{\textwidth}%

}
{\end{minipage}

\endgroup}
}


\newcommand{\solspace}[2]{
\vbox to #1 {\vfil\sol{#2}\vfil}
}

% Notes
\newif\ifnotes

\newcommand{\nt}[1]{\ifnotes \begingroup\color{notecolor}#1\endgroup \fi}
\excludecomment{note} % Define note environment and default to invisible
\newcommand{\withnotes}{
\notestrue
\specialcomment{note}
{\begingroup\color{notecolor}}
{\endgroup}
}

% Makefile automation. The flags are to be set in the Makefile
\ifdefined\solutionsflag \withsolutions \fi
\ifdefined\notesflag \withnotes \fi


%%% Macros for authors

%%% Creates boxes for Multiple-Choice Questions
\newcommand{\mc}{\Square \enspace}
\newcommand{\mcsol}{\ifsolutions \XBox \else \Square \fi \enspace}

\newcommand{\itemmc}{\item[\Square]}
\newcommand{\itemmcsol}{\ifsolutions \item[\XBox] \else \item[\Square] \fi}

\newcommand{\mcsmall}{\Square}
\newcommand{\mcsmallsol}{\ifsolutions \XBox \else \Square \fi}
8 changes: 8 additions & 0 deletions exercise/in-person/i6lecture.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
% This file adds packages and configuration options used
% in your course which are of no interest in other courses.
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{i6lecture}[2014/04/16 Packages and configuration for course specific practice sheets]

\lecture{Knowledge Discovery in Database with Exercises}{KDDmUe}

106 changes: 106 additions & 0 deletions exercise/in-person/i6prcsht.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{i6prcsht}[2014/04/16 i6 practice sheet]

% Process options
\newif\ifgerman
\DeclareOption{ngerman}{ % German strings
\germantrue
\PassOptionsToClass{\CurrentOption}{scrartcl}
\PassOptionsToClass{\CurrentOption}{babel}
}
\DeclareOption{english}{
\PassOptionsToClass{\CurrentOption}{babel}
}
\newif\ifSmallBorders
\DeclareOption{smallborders} { % Use small borders
\SmallBorderstrue
}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
\ProcessOptions\relax

\LoadClass[a4paper,twoside=off,parskip=half]{scrartcl}

\RequirePackage{babel}
\RequirePackage[utf8]{inputenc} % Unicode is the only reasonable choice for the heterogeneous environment at LS6. UTF8 is the most common Unicode encoding.
\RequirePackage[T1]{fontenc} % Support for umlaute
\RequirePackage{lmodern} % Computer modern font with enhanced metrics and glyph coverage
\RequirePackageWithOptions{i6exc} % Macros for semester, solution, ...
\RequirePackage{scrlayer-scrpage} % Customized footer
\RequirePackage{graphicx} % Include graphics for footer and title
\RequirePackage{lastpage} % Last page number for footer


%%% Macros for authors

% Use \lecture{long name}{abbreviation} to define name of lecture for title and footer
\newif\ifLectureDefined
\newcommand*{\lecture}[2]{\renewcommand{\LectureLong}{#1} \renewcommand{\LectureShort}{#2} \LectureDefinedtrue}


%%% Class-internal code

% Change border size if option smallborders was set
\ifSmallBorders
\RequirePackage{geometry}
\geometry{a4paper, top=20mm, left=25mm, right=25mm, bottom=25mm, headsep=10mm, footskip=10mm}
\fi

% Define commands for long and short lecture title
\newcommand{\LectureLong}{}
\newcommand{\LectureShort}{}

% Save title and subtitle for use in footer
% @title is cleared at some point (probably by \maketitle)
\newcommand*{\PracticeTitle}{}
\newcommand*{\OrigTitle}{}
\let\OrigTitle\title
\renewcommand*{\title}[1]{\OrigTitle{#1} \renewcommand*{\PracticeTitle}{#1}}
\newif\ifSubTitleDefined
\newcommand*{\PracticeSubTitle}{}
\newcommand*{\OrigSubTitle}{}
\let\OrigSubTitle\subtitle
\renewcommand*{\subtitle}[1]{\OrigSubTitle{#1} \renewcommand*{\PracticeSubTitle}{#1} \SubTitleDefinedtrue}

% Footer
\pagestyle{scrheadings}
\ifoot[]{\parbox{1cm}{\includegraphics[width=1cm]{i6prcsht_res/i6_icon}} \parbox{11cm}{\LectureShort,\ \semester* -- \PracticeTitle\ifSubTitleDefined \\ \fi \PracticeSubTitle}}
\cfoot[]{}
\ifgerman
% \parbox is only necessary to achieve same vertical position of page number and one-line string in ifoot
\ofoot[\parbox{3cm}{\begin{flushright}
Seite \thepage\ von \pageref{LastPage}
\end{flushright}}]{\parbox{3cm}{\begin{flushright}
Seite \thepage\ von \pageref{LastPage}
\end{flushright}}}
\else
% \parbox is only necessary to achieve same vertical position of page number and one-line string in ifoot
\ofoot[\parbox{3cm}{\begin{flushright}
Page \thepage\ of \pageref{LastPage}
\end{flushright}}]{\parbox{3cm}{\begin{flushright}
Page \thepage\ of \pageref{LastPage}
\end{flushright}}}
\fi

% Title
\titlehead{%
\parbox[c]{4cm}{
\includegraphics[width=4cm]{i6prcsht_res/fau_tech}
}
\hfill
\parbox[c]{6cm}{
\begin{center}
\textsf{
\textbf{\Department}\\
\Chair
}
\end{center}
}
\hfill
\parbox[c]{4cm}{
\hfill % Graphic right aligned
\includegraphics[width=2.6cm]{i6prcsht_res/i6_logo}
}
}
\subject{\ifLectureDefined \LectureLong \\ \fi \semester}
\date{}
\author{}

0 comments on commit 47effa9

Please sign in to comment.