3
0
Fork 0
mirror of https://github.com/fsr/nopanic synced 2025-01-18 16:01:42 +01: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

19
colors.tex Normal file
View file

@ -0,0 +1,19 @@
\ifdefined\colormodel\relax\else%
\def\colormodel{rgb}%
\fi
\selectcolormodel{\colormodel}
% \definecolor{ese_bg_color}{rgb}{0.0, 0.20, 0.376} % the definitive color -- #003360 (2015?)
% \definecolor{ese_bg_color}{rgb}{0.0, 0.263, 0.486} % the definitive color -- #00437C (2016?)
% \definecolor{ese_bg_color}{rgb}{0.051, 0.373, 0.596} % the definitive color -- #0D5F98 (2017)
% \definecolor{ese_bg_color}{rgb}{0.796, 0.376, 0.251} % the definitive color -- #CB6040 (2018)
% \definecolor{ese_bg_color}{rgb}{0.0, 0.47, 0.3} % wip-ish color -- #01794C (2019)
%\definecolor{ese_bg_color}{RGB}{5,109,133} % final_really_final -- #056d85 (2020)
\definecolor{ese_bg_color}{RGB/cmyk}{155,30,70/0,0.9,0.6,0.1} % complement -- #9B1E46 (2021)
\definecolor{ese_fg_color}{rgb/cmyk}{1,1,1/0,0,0,0}
\definecolor{fancypageref_color}{RGB/cmyk}{155,30,70/0,0.9,0.6,0.1} %
\definecolor{ifsrgray}{rgb/cmyk}{0.6,0.6,0.6/0,0,0,0.4} % 153, 153, 153

View file

@ -2,6 +2,7 @@
\usepackage[english, ngerman]{babel} \usepackage[english, ngerman]{babel}
\usepackage{xcolor}
\usepackage{graphicx} \usepackage{graphicx}
\usepackage{fancyhdr} \usepackage{fancyhdr}
\usepackage{eso-pic} \usepackage{eso-pic}
@ -30,19 +31,7 @@
\PassOptionsToPackage{hyphens}{url} \PassOptionsToPackage{hyphens}{url}
\usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref} \usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref}
\input{colors.tex}
% \definecolor{ese_bg_color}{rgb}{0.0, 0.20, 0.376} % the definitive color -- #003360 (2015?)
% \definecolor{ese_bg_color}{rgb}{0.0, 0.263, 0.486} % the definitive color -- #00437C (2016?)
% \definecolor{ese_bg_color}{rgb}{0.051, 0.373, 0.596} % the definitive color -- #0D5F98 (2017)
% \definecolor{ese_bg_color}{rgb}{0.796, 0.376, 0.251} % the definitive color -- #CB6040 (2018)
% \definecolor{ese_bg_color}{rgb}{0.0, 0.47, 0.3} % wip-ish color -- #01794C (2019)
% \definecolor{ese_bg_color}{RGB}{5,109,133} % final_really_final -- #056d85 (2020)
\definecolor{ese_bg_color}{RGB}{155,30,70} % complement -- #9B1E46 (2021)
\definecolor{ese_fg_color}{rgb}{1, 1, 1}
\definecolor{fancypageref_color}{RGB}{155,30,70} %
\definecolor{ifsrgray}{rgb}{0.6, 0.6, 0.6} % 153, 153, 153
% is toggled twice for moduluebersicht.tex % is toggled twice for moduluebersicht.tex
\changemenucolor{gray}{bg}{named}{ese_fg_color} %background of the menukeys \changemenucolor{gray}{bg}{named}{ese_fg_color} %background of the menukeys

View file

@ -22,7 +22,7 @@
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{timetable} \ProvidesPackage{timetable}
\RequirePackage{ifthen, calc, color} \RequirePackage{ifthen, calc, xcolor}
% swtich case helper % swtich case helper
\newcommand\addcase[3]{\expandafter\def\csname\string#1@case@#2\endcsname{#3}} \newcommand\addcase[3]{\expandafter\def\csname\string#1@case@#2\endcsname{#3}}
@ -35,11 +35,11 @@
% Preset the colors % Preset the colors
\definecolor{ttframecol1}{rgb}{0.95,0.95,0.95} \definecolor{ttframecol1}{rgb/cmyk}{0.95,0.95,0.95/0,0,0,0.05}
\definecolor{ttframecol2}{rgb}{0.9,0.9,0.9} \definecolor{ttframecol2}{rgb/cmyk}{0.9,0.9,0.9/0,0,0,0.1}
\definecolor{ttfontcolor}{rgb}{0.25,0.25,0.25} \definecolor{ttfontcolor}{rgb/cmyk}{0.25,0.25,0.25/0,0,0,0.75}
\definecolor{ttlinecol1}{rgb}{0.0,0.0,0.0} \definecolor{ttlinecol1}{rgb/cmyk}{0.0,0.0,0.0/0,0,0,1}
\definecolor{ttlinecol2}{rgb}{0.5,0.0,0.0} \definecolor{ttlinecol2}{rgb/cmyk}{0.5,0.0,0.0/0,1,1,0.5}
% Simple for loop construct as proposed by N. Setzer % Simple for loop construct as proposed by N. Setzer
\newcommand{\@ttforloop}[5][1] \newcommand{\@ttforloop}[5][1]
@ -560,6 +560,18 @@
\legend {\value{@daymarks}} 1 {#1} \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] \newcommand{\defineevent}[7]
{ {
\definecolor{@timetable#1block}{rgb}{#2, #3, #4} \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[default]{opensans}
\usepackage[margin=0.55cm,landscape]{geometry} \usepackage[margin=0.55cm,landscape]{geometry}
% \usepackage[height=25cm]{geometry} % \usepackage[height=25cm]{geometry}
\usepackage{xcolor}
\usepackage{timetable} \usepackage{timetable}
\usepackage{transparent} \usepackage{transparent}
\usepackage{amssymb} \usepackage{amssymb}
@ -9,6 +10,8 @@
\usepackage{pifont} \usepackage{pifont}
\newcommand{\wontfix}{\rlap{$\square$}{\large\hspace{1pt}\xmark}} \newcommand{\wontfix}{\rlap{$\square$}{\large\hspace{1pt}\xmark}}
\input{../colors.tex}
\begin{document} \begin{document}
\thispagestyle{empty} \thispagestyle{empty}
% \begin{landscape} % \begin{landscape}
@ -33,6 +36,9 @@
\defineevent{other}{0.0}{0.47}{0.3}{1.0}{1.0}{1.0}% dunkelgrün \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{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 \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 % Start the timetable
\begin{center} \begin{center}