| 1 |
% \iffalse meta-comment |
| 2 |
%/GitFileInfo=tudscr-color.dtx |
| 3 |
% |
| 4 |
% TUD-Script -- Corporate Design of Technische Universität Dresden |
| 5 |
% ---------------------------------------------------------------------------- |
| 6 |
% |
| 7 |
% Copyright (C) Falk Hanisch <[email protected]>, 2012-2022 |
| 8 |
% |
| 9 |
% ---------------------------------------------------------------------------- |
| 10 |
% |
| 11 |
% This work may be distributed and/or modified under the conditions of the |
| 12 |
% LaTeX Project Public License, either version 1.3c of this license or |
| 13 |
% any later version. The latest version of this license is in |
| 14 |
% http://www.latex-project.org/lppl.txt |
| 15 |
% and version 1.3c or later is part of all distributions of |
| 16 |
% LaTeX version 2008-05-04 or later. |
| 17 |
% |
| 18 |
% This work has the LPPL maintenance status "maintained". |
| 19 |
% |
| 20 |
% The current maintainer and author of this work is Falk Hanisch. |
| 21 |
% |
| 22 |
% ---------------------------------------------------------------------------- |
| 23 |
% |
| 24 |
% \fi |
| 25 |
% |
| 26 |
% \iffalse ins:batch + dtx:driver |
| 27 |
%<*ins> |
| 28 |
\ifx\documentclass\undefined |
| 29 |
\input docstrip.tex |
| 30 |
\ifToplevel{\batchinput{tudscr.ins}} |
| 31 |
\else |
| 32 |
\let\endbatchfile\relax |
| 33 |
\fi |
| 34 |
\endbatchfile |
| 35 |
%</ins> |
| 36 |
%<*dtx> |
| 37 |
\ProvidesFile{tudscr-color.dtx}[2022/08/09] |
| 38 |
\RequirePackage{tudscr-gitinfo} |
| 39 |
\documentclass[english,ngerman,xindy]{tudscrdoc} |
| 40 |
\iftutex |
| 41 |
\usepackage{fontspec} |
| 42 |
\else |
| 43 |
\usepackage[T1]{fontenc} |
| 44 |
\usepackage[ngerman=ngerman-x-latest]{hyphsubst} |
| 45 |
\fi |
| 46 |
\usepackage{babel} |
| 47 |
\usepackage{tudscrfonts} |
| 48 |
\usepackage[babel]{microtype} |
| 49 |
|
| 50 |
\GitHubBase{\TUDScriptRepository} |
| 51 |
\begin{document} |
| 52 |
\author{Falk Hanisch\TUDScriptContactTitle} |
| 53 |
\maketitle |
| 54 |
\tableofcontents |
| 55 |
\DocInput{\filename} |
| 56 |
\end{document} |
| 57 |
%</dtx> |
| 58 |
% \fi |
| 59 |
% |
| 60 |
% \selectlanguage{ngerman} |
| 61 |
% |
| 62 |
% |
| 63 |
% |
| 64 |
% \section{Das Paket \pkg{tudscrcolor} -- Die Farben des \CDs} |
| 65 |
% |
| 66 |
% Das \TUDCD legt nicht nur die zu nutzenden Schriften und das Layout sondern |
| 67 |
% auch die zu verwendenden Farben fest. Diese werden nachfolgend für das CMYK"~ |
| 68 |
% und RGB"~Farbmodel definiert. Sie können im Dokument mit sämtlichen Befehlen |
| 69 |
% zur Farbauswahl wie \cs{color}\marg{Farbe} oder \cs{textcolor}\marg{Farbe} |
| 70 |
% verwendet werden. |
| 71 |
% |
| 72 |
% \begin{macrocode} |
| 73 |
% \iffalse |
| 74 |
%<*package> |
| 75 |
\ProvidesPackage{tudscrcolor}[% |
| 76 |
%!TUD@Version |
| 77 |
package (corporate design colors)% |
| 78 |
] |
| 79 |
%</package> |
| 80 |
% \fi |
| 81 |
% \end{macrocode} |
| 82 |
% |
| 83 |
% \iffalse |
| 84 |
%<*package> |
| 85 |
% \fi |
| 86 |
% |
| 87 |
% \subsection{Optionen und Befehle} |
| 88 |
% |
| 89 |
% \begin{option}{newcolors} |
| 90 |
% \begin{option}{reduced} |
| 91 |
% \begin{option}{oldcolors} |
| 92 |
% \begin{option}{extended} |
| 93 |
% \begin{option}{full} |
| 94 |
% Das Paket kann entweder mit einfachen, für \TUDScript ausreichenden oder |
| 95 |
% erweiterten Farbdefinitionen geladen werden. Letztere definieren zusätzliche |
| 96 |
% Farbbezeichnungen für die Kompatibilität zu alten TUD-Klassen. |
| 97 |
% \ToDo{Optionen oldcolors und colormodel mit key-value-interface!}[v2.07] |
| 98 |
% \begin{macrocode} |
| 99 |
\DeclareOption{newcolors}{\let\tud@setcolors@add\relax} |
| 100 |
\DeclareOption{reduced}{\let\tud@setcolors@add\relax} |
| 101 |
\DeclareOption{oldcolors}{\let\tud@setcolors@add\tud@setcolors@old} |
| 102 |
\DeclareOption{extended}{\let\tud@setcolors@add\tud@setcolors@old} |
| 103 |
\DeclareOption{full}{\let\tud@setcolors@add\tud@setcolors@old} |
| 104 |
% \end{macrocode} |
| 105 |
% \end{option}^^A full |
| 106 |
% \end{option}^^A extended |
| 107 |
% \end{option}^^A oldcolors |
| 108 |
% \end{option}^^A reduced |
| 109 |
% \end{option}^^A newcolors |
| 110 |
% \begin{macro}{\setcdcolors} |
| 111 |
% Der Befehl \cs{setcdcolors} definiert die Farben des \CDs. Das Argument dient |
| 112 |
% zur Auswahl des gewünschten Farbmodels. Dies kann dazu genutzt werden, |
| 113 |
% innerhalb des Dokumentes die Definition der Farben für ein neues Farbmodell |
| 114 |
% zu ändern. |
| 115 |
% \begin{macrocode} |
| 116 |
\newcommand*\setcdcolors[1]{% |
| 117 |
\selectcolormodel{#1}% |
| 118 |
\tud@setcolors@do% |
| 119 |
} |
| 120 |
% \end{macrocode} |
| 121 |
% \end{macro}^^A \setcdcolors |
| 122 |
% \begin{macro}{\tud@color} |
| 123 |
% \changes{v2.04}{2015/04/21}{neu}^^A |
| 124 |
% Der Befehl wählt eine in einem Makro gespeicherte Farbe nur aus, wenn dieses |
| 125 |
% auch tatsächlich definiert ist. Dieser Befehl wird von den \TUDScript-Klassen |
| 126 |
% für die Umsetzung des Layouts verwendet. |
| 127 |
% \begin{macrocode} |
| 128 |
\newcommand*\tud@color[1]{\ifdefvoid{#1}{}{\color{#1}}} |
| 129 |
% \end{macrocode} |
| 130 |
% \end{macro}^^A \tud@color |
| 131 |
% |
| 132 |
% \subsection{Farbdefinitionen} |
| 133 |
% \subsubsection{Notwendige Farben für \TUDScript} |
| 134 |
% |
| 135 |
% \begin{macro}{\tud@setcolors@do} |
| 136 |
% Die Definitionen der Farben erfolgt erst durch die Ausführung von |
| 137 |
% \cs{tud@setcolors@do}. Damit wird es möglich, auf die angegebenen Optionen in |
| 138 |
% Form von \cs{tud@setcolors@add} oder den durch das Paket \pkg{xcolor} |
| 139 |
% angegebenen Farbraum zu reagieren. |
| 140 |
% \begin{macrocode} |
| 141 |
\newcommand*\tud@setcolors@do{% |
| 142 |
% \end{macrocode} |
| 143 |
% \begin{TUDcolor}{HKS41} |
| 144 |
% Die primäre Hausfarbe (dunkles Blau) |
| 145 |
% \begin{macrocode} |
| 146 |
\definecolor{HKS41}{cmyk/RGB/rgb}{% |
| 147 |
1.00,0.70,0.10,0.50/011,042,081/0.0431372549,0.16470588235,0.31764705882% |
| 148 |
}% |
| 149 |
% \end{macrocode} |
| 150 |
% \end{TUDcolor}^^A HKS41 |
| 151 |
% \begin{TUDcolor}{HKS92} |
| 152 |
% Die sekundäre Hausfarbe (grau), allein und ausschließlich für die Verwendung |
| 153 |
% in der Geschäftsausstattung und nicht für Fließtext, Grafiken etc. |
| 154 |
% \begin{macrocode} |
| 155 |
\definecolor{HKS92}{cmyk/RGB/rgb}{% |
| 156 |
0.10,0.00,0.05,0.65/080,089,085/0.31372549019,0.34901960784,0.33333333333% |
| 157 |
}% |
| 158 |
% \end{macrocode} |
| 159 |
% \end{TUDcolor}^^A HKS92 |
| 160 |
% \begin{TUDcolor}{HKS44} |
| 161 |
% Auszeichnungen 1. Kategorie (helles Blau) |
| 162 |
% \begin{macrocode} |
| 163 |
\definecolor{HKS44}{cmyk/RGB/rgb}{% |
| 164 |
1.00,0.50,0.00,0.00/000,089,163/0,0.34901960784,0.63921568627% |
| 165 |
}% |
| 166 |
% \end{macrocode} |
| 167 |
% \end{TUDcolor}^^A HKS44 |
| 168 |
% \begin{TUDcolor}{HKS36} |
| 169 |
% \begin{TUDcolor}{HKS33} |
| 170 |
% \begin{TUDcolor}{HKS57} |
| 171 |
% \begin{TUDcolor}{HKS65} |
| 172 |
% Auszeichnungen 2. Kategorie (Indigo, Purpur, dunkles Grün, helles Grün) |
| 173 |
% \begin{macrocode} |
| 174 |
\definecolor{HKS36}{cmyk/RGB/rgb}{% |
| 175 |
0.80,0.90,0.00,0.00/081,041,127/0.31764705882,0.16078431372,0.49803921568% |
| 176 |
}% |
| 177 |
\definecolor{HKS33}{cmyk/RGB/rgb}{% |
| 178 |
0.50,1.00,0.00,0.00/129,026,120/0.50588235294,0.10196078431,0.47058823529% |
| 179 |
}% |
| 180 |
\definecolor{HKS57}{cmyk/RGB/rgb}{% |
| 181 |
1.00,0.00,0.90,0.20/000,122,071/0,0.47843137254,0.28235294117% |
| 182 |
}% |
| 183 |
\definecolor{HKS65}{cmyk/RGB/rgb}{% |
| 184 |
0.65,0.00,1.00,0.00/034,173,054/0.13333333333,0.67843137254,0.21176470588% |
| 185 |
}% |
| 186 |
% \end{macrocode} |
| 187 |
% \end{TUDcolor}^^A HKS65 |
| 188 |
% \end{TUDcolor}^^A HKS57 |
| 189 |
% \end{TUDcolor}^^A HKS33 |
| 190 |
% \end{TUDcolor}^^A HKS36 |
| 191 |
% \begin{TUDcolor}{HKS07} |
| 192 |
% Ausnahmefarbe (Orange) |
| 193 |
% \begin{macrocode} |
| 194 |
\definecolor{HKS07}{cmyk/RGB/rgb}{% |
| 195 |
0.00,0.60,1.00,0.00/232,123,020/0.90980392156,0.48235294117,0.07843137254% |
| 196 |
}% |
| 197 |
% \end{macrocode} |
| 198 |
% \end{TUDcolor}^^A HKS07 |
| 199 |
% \begin{TUDcolor}{cddarkblue} |
| 200 |
% \begin{TUDcolor}{cdgray} |
| 201 |
% \begin{TUDcolor}{cdgrey} |
| 202 |
% \begin{TUDcolor}{cdblue} |
| 203 |
% \begin{TUDcolor}{cdindigo} |
| 204 |
% \begin{TUDcolor}{cdpurple} |
| 205 |
% \begin{TUDcolor}{cddarkgreen} |
| 206 |
% \begin{TUDcolor}{cdgreen} |
| 207 |
% \begin{TUDcolor}{cdorange} |
| 208 |
% Die definierten Grundfarben werden zur einfacheren Verwendung im Dokument |
| 209 |
% noch einmal speziell benannt. |
| 210 |
% \begin{macrocode} |
| 211 |
\colorlet{cddarkblue}{HKS41}% |
| 212 |
\colorlet{cdgray}{HKS92}% |
| 213 |
\colorlet{cdgrey}{HKS92}% |
| 214 |
\colorlet{cdblue}{HKS44}% |
| 215 |
\colorlet{cdindigo}{HKS36}% |
| 216 |
\colorlet{cdpurple}{HKS33}% |
| 217 |
\colorlet{cddarkgreen}{HKS57}% |
| 218 |
\colorlet{cdgreen}{HKS65}% |
| 219 |
\colorlet{cdorange}{HKS07}% |
| 220 |
% \end{macrocode} |
| 221 |
% \end{TUDcolor}^^A cdorange |
| 222 |
% \end{TUDcolor}^^A cdgreen |
| 223 |
% \end{TUDcolor}^^A cddarkgreen |
| 224 |
% \end{TUDcolor}^^A cdpurple |
| 225 |
% \end{TUDcolor}^^A cdindigo |
| 226 |
% \end{TUDcolor}^^A cdblue |
| 227 |
% \end{TUDcolor}^^A cdgrey |
| 228 |
% \end{TUDcolor}^^A cdgray |
| 229 |
% \end{TUDcolor}^^A cddarkblue |
| 230 |
% Damit enden die notwendigen Farbdefinitionen für das \pkg{tudscrcolor}-Paket. |
| 231 |
% Abhängig von den gewählten Optionen werden mit \cs{tud@setcolors@add} ggf. |
| 232 |
% zusätzliche Farbnamen definiert. |
| 233 |
% \begin{macrocode} |
| 234 |
\tud@setcolors@add% |
| 235 |
} |
| 236 |
% \end{macrocode} |
| 237 |
% \end{macro}^^A \tud@setcolors@do |
| 238 |
% |
| 239 |
% \subsubsection{Zusätzliche Farben für alte TUD-Klassen} |
| 240 |
% |
| 241 |
% \begin{macro}{\tud@setcolors@add} |
| 242 |
% \begin{macro}{\tud@setcolors@old} |
| 243 |
% Die erweiterten Farbbefehle werden durch \pkg{tudscrcolor} definiert, wenn |
| 244 |
% das Paket explizit mit der Option \opt{extended} geladen wird. Damit werden |
| 245 |
% alle gängigen Farbdefinitionen der vielen Insellösungen des \LaTeX-Universums |
| 246 |
% an der \TnUD unterstützt. |
| 247 |
% \begin{macrocode} |
| 248 |
\newcommand*\tud@setcolors@add{} |
| 249 |
\newcommand*\tud@setcolors@old{% |
| 250 |
\def\tud@res@a##1{% |
| 251 |
\@for\tud@res@b:={10,20,30,40,50,60,70,80,90,100}\do{% |
| 252 |
\colorlet{##1K\tud@res@b}{##1!\tud@res@b}% |
| 253 |
\colorlet{##1-\tud@res@b}{##1!\tud@res@b}% |
| 254 |
}% |
| 255 |
}% |
| 256 |
\tud@res@a{HKS41}% |
| 257 |
\tud@res@a{HKS92}% |
| 258 |
\tud@res@a{HKS44}% |
| 259 |
\tud@res@a{HKS36}% |
| 260 |
\tud@res@a{HKS33}% |
| 261 |
\tud@res@a{HKS57}% |
| 262 |
\tud@res@a{HKS65}% |
| 263 |
\tud@res@a{HKS07}% |
| 264 |
} |
| 265 |
% \end{macrocode} |
| 266 |
% \end{macro}^^A \tud@setcolors@old |
| 267 |
% \end{macro}^^A \tud@setcolors@add |
| 268 |
% |
| 269 |
% \subsection{Ausführung der Optionen} |
| 270 |
% |
| 271 |
% Zum Schluss werden die Optionen ausgeführt und ggf. an \pkg{xcolor} |
| 272 |
% weitergereicht. Anschließend werden die Farben für das Dokument definiert. |
| 273 |
% Ohne die Angabe eines optionalen Argumentes an das Paket \pkg{xcolor} erfolgt |
| 274 |
% die Definition für den gewählten bzw. standardmäßig eingestellten Farbraum. |
| 275 |
% \begin{macrocode} |
| 276 |
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{xcolor}} |
| 277 |
\ExecuteOptions{reduced} |
| 278 |
\ProcessOptions\relax |
| 279 |
\RequirePackage{xcolor} |
| 280 |
\tud@setcolors@do% |
| 281 |
% \end{macrocode} |
| 282 |
% |
| 283 |
% \iffalse |
| 284 |
%</package> |
| 285 |
% \fi |
| 286 |
% |
| 287 |
% \PrintBackMatter |
| 288 |
% |
| 289 |
\endinput |