\documentclass[12pt]{scrartcl}
\setparsizes{0em}{0.25\baselineskip plus .25\baselineskip}{1em plus 1fil}
\usepackage{geometry}
\geometry{
paper = a4paper,
textwidth = 250mm,
textheight = 160mm,
landscape
}
\usepackage[newcommands]{ragged2e}
%\setlength{\RaggedRightskip}{0pt plus 2cm}
\usepackage[libertinus]{fontsetup}
%\usepackage[ngerman]{babel}
%\selectlanguage{ngerman}
\usepackage{microtype}
%======
\usepackage{tikz}
\usetikzlibrary{math}
%======
\definecolor{co-olive}{HTML}{829079}
\definecolor{co-beige}{HTML}{ede6b9}
\definecolor{co-brown}{HTML}{b9925e}
\colorlet{co-cour}{co-olive!25!white}
\colorlet{co-labA}{co-beige!45!white}
\colorlet{co-labB}{co-beige!30!white}
\colorlet{co-mast}{orange!20!white}
\colorlet{co-lecA}{co-brown!35!white}
\colorlet{co-lecB}{co-brown!20!white}
\begin{document}
\enlargethispage{2cm}
\thispagestyle{empty}
% Start
% These set the width of a day and the height of an hour.
\newcommand\daywidth{5cm}
\newcommand\hourheight{1.2cm}
% The entry style will have two options:
% * the first option sets how many hours the entry will be (i.e. its height);
% * the second option sets how many overlapping entries there are (thus
% determining the width).
\tikzset{entry/.style 2 args={
draw,
rectangle,
rounded corners,
anchor=north west,
line width=0.4pt,
inner xsep=0.3333em,
inner ysep=0ex,
text width={\daywidth/#2-0.6666em-0.4pt},
text height=2.5ex,
text depth=#1\hourheight-2.5ex,
align=left
}}
\vspace{-2cm}
\begin{center}
Schedule 2023
\end{center}
% Start the picture and set the x coordinate to correspond to days and the y
% coordinate to correspond to hours (y should point downwards).
\begin{tikzpicture}[y=-\hourheight,x=\daywidth]
% First print a list of times 9 - 16 o'clock
\foreach \time/\ustime in {9/9,10/10,11/11,12/12,13/13,14/14,15/15,16/16}{
% Full hour, added :00
% changed anchor to mid east
\node[anchor=mid east] at (0.94,\time) {\ustime:00};
\draw [thick] (1,\time) -- (6,\time);
% Quarter
\foreach \qtime/\qmin in {0.25/15,0.5/30,0.75/45}{
\node[anchor=mid east] at (1,\time+\qtime) {\qmin};
\draw [thin] (1,\time+\qtime) -- (6,\time+\qtime);
}
}
% Adding the times: 17:00
% And then 15,30
\node[anchor=mid east] at (0.94,17) {17:00};
\draw [thick] (1,17) -- (6,17);
\foreach \qtime/\qmin in {0.25/15,0.5/30}{
\node[anchor=mid east] at (1,17+\qtime) {\qmin};
\draw [thin] (1,17+\qtime) -- (6,17+\qtime);
}
\tikzmath{
\startTime = 8.5; % Vertical line start
\endTime = 18; % Vertical line end
%
\xday = 1.5; % x-position of name of days
\yday = 8.5; % y-position (hour) of name of days
}
% Draw some day dividers.
\foreach \i in {1,...,6}
\draw (\i,\startTime) -- (\i,\endTime);
% Start Monday
\node[anchor=north] at (\xday,\yday) {Monday};
% Write the entries. Note that the x coordinate is 1 (for Monday) plus an
% appropriate amount of shifting. The y coordinate is simply the starting
% time.
% Tuesday
\node[anchor=north] at (\xday+1,\yday) {Tuesday};
\node[entry={1.5}{1}, fill=co-cour]
at (2,11.5) {Course 3 \\Room 1.23};
\node[entry={1.5}{2}, fill=co-labA]
at (2,14) {Lab RT 3A\\ S 05.305};
\node[entry={1.5}{2}, fill=co-mast]
at (2.5,14) {Master\\ Room 1.33};
\node[entry={1.5}{2}, fill=co-labA]
at (2,15.75) {Lab RT 3A\\ Room 2.34};
\node[entry={1.5}{2}, fill=co-mast]
at (2.5,15.75) {Master\\ Room 3.45};
% Wednesday
\node[anchor=north] at (\xday+2,\yday) {Wednesday};
\node[entry={1.5}{1}, fill=co-labB]
at (3,14) {Lab RT 3B\ Room 3.45};
\node[entry={1.5}{1}, fill=co-labB]
at (3,15.75) {Lab RT 3B\ Room 3.45};
% Thursday
\node[anchor=north] at (\xday+3,\yday) {Thursday};
\node[entry={1.5}{1}, fill=co-lecA]
at (4,14) {Lecture A\ Room 3.45};
\node[entry={1.5}{1}, fill=co-lecB]
at (4,15.75) {Lecture B\ Room 3.45};
% Friday
\node[anchor=north] at (\xday+4,\yday) {Friday};
\node[entry={1.5}{1}, fill=co-lecB]
at (5,9.75) {Lecture B\ Room 3.45};
\node[entry={1.5}{1}, fill=co-lecA]
at (5,11.5) {Lecture A\ Room 3.45};
\node[entry={1.5}{1}, fill=co-cour]
at (5,14) {Course 3\ Room 3.45};
\end{tikzpicture}
\end{document}