3
0
Fork 0
mirror of https://github.com/fsr/nopanic synced 2025-04-27 01:58:27 +02:00

rgb and cmyk versions in one document

- separate colors.tex, to include from any sub-document
- provide both rgb and cmyk versions
- use rgb by default, \def\colormodel{cmyk} for clean print version
- make timetable.sty work with all color specifications:
- new \defineeventcolors accepts 5 arguments: name, bg colorformat, bg color values, fg format, fg values
- new \leteventcolors accepts 3 arguments: name, name of previously defined color for bg, name of color for fg

ESE 21 red CMYK version very VAGUELY approximated by a non-professional
This commit is contained in:
Peter Nerlich 2021-09-25 19:48:03 +02:00
parent 8f23dbbcd5
commit a82484206e
5 changed files with 45 additions and 19 deletions

View file

@ -22,7 +22,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{timetable}
\RequirePackage{ifthen, calc, color}
\RequirePackage{ifthen, calc, xcolor}
% swtich case helper
\newcommand\addcase[3]{\expandafter\def\csname\string#1@case@#2\endcsname{#3}}
@ -35,11 +35,11 @@
% Preset the colors
\definecolor{ttframecol1}{rgb}{0.95,0.95,0.95}
\definecolor{ttframecol2}{rgb}{0.9,0.9,0.9}
\definecolor{ttfontcolor}{rgb}{0.25,0.25,0.25}
\definecolor{ttlinecol1}{rgb}{0.0,0.0,0.0}
\definecolor{ttlinecol2}{rgb}{0.5,0.0,0.0}
\definecolor{ttframecol1}{rgb/cmyk}{0.95,0.95,0.95/0,0,0,0.05}
\definecolor{ttframecol2}{rgb/cmyk}{0.9,0.9,0.9/0,0,0,0.1}
\definecolor{ttfontcolor}{rgb/cmyk}{0.25,0.25,0.25/0,0,0,0.75}
\definecolor{ttlinecol1}{rgb/cmyk}{0.0,0.0,0.0/0,0,0,1}
\definecolor{ttlinecol2}{rgb/cmyk}{0.5,0.0,0.0/0,1,1,0.5}
% Simple for loop construct as proposed by N. Setzer
\newcommand{\@ttforloop}[5][1]
@ -560,6 +560,18 @@
\legend {\value{@daymarks}} 1 {#1}
}
\newcommand{\defineeventcolors}[5]
{
\definecolor{@timetable#1block}{#2}{#3}
\definecolor{@timetable#1text} {#4}{#5}
}
\newcommand{\leteventcolors}[3]
{
\colorlet{@timetable#1block}{#2}
\colorlet{@timetable#1text} {#3}
}
\newcommand{\defineevent}[7]
{
\definecolor{@timetable#1block}{rgb}{#2, #3, #4}

0
timetable/zeitplan.pdf Executable file → Normal file
View file

View file

@ -2,6 +2,7 @@
\usepackage[default]{opensans}
\usepackage[margin=0.55cm,landscape]{geometry}
% \usepackage[height=25cm]{geometry}
\usepackage{xcolor}
\usepackage{timetable}
\usepackage{transparent}
\usepackage{amssymb}
@ -9,6 +10,8 @@
\usepackage{pifont}
\newcommand{\wontfix}{\rlap{$\square$}{\large\hspace{1pt}\xmark}}
\input{../colors.tex}
\begin{document}
\thispagestyle{empty}
% \begin{landscape}
@ -33,6 +36,9 @@
\defineevent{other}{0.0}{0.47}{0.3}{1.0}{1.0}{1.0}% dunkelgrün
\defineevent{extern}{0.77}{0.56}{0.05}{1.0}{1.0}{1.0}
\defineevent{stream}{0.09}{0.45}{0.56}{1.0}{1.0}{1.0}% petrol
\leteventcolors{ese}%
{ese_bg_color}
{ese_fg_color}
% Start the timetable
\begin{center}