diff options
Diffstat (limited to 'Master/texmf-doc/doc/german/latex-tipps-und-tricks/colorps.tex')
-rw-r--r-- | Master/texmf-doc/doc/german/latex-tipps-und-tricks/colorps.tex | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Master/texmf-doc/doc/german/latex-tipps-und-tricks/colorps.tex b/Master/texmf-doc/doc/german/latex-tipps-und-tricks/colorps.tex new file mode 100644 index 00000000000..8b7e12b5c1d --- /dev/null +++ b/Master/texmf-doc/doc/german/latex-tipps-und-tricks/colorps.tex @@ -0,0 +1,41 @@ +\documentclass[a4paper,12pt]{report} +\usepackage[latin1]{inputenc} +\usepackage{german} +\begin{document} + +% Farbbefehl bereitstellen +\newcommand{\color}[1] + {\special{ps: #1 setrgbcolor + gsave newpath 0 0 moveto 1 0 rlineto stroke grestore}} + +% Farbige Quadrate +\newcommand{\colorsquare}[1] + {\color{#1}\rule{1em}{1em}\color{\black}} + +% Einige Farben definieren +\newcommand{\red}{1 0 0} \newcommand{\white}{1 1 1} +\newcommand{\yellow}{1 1 0}\newcommand{\blue}{0 0 1} +\newcommand{\green}{0 1 0} \newcommand{\black}{0 0 0} +\newcommand{\violet}{1 0 1}\newcommand{\cyan}{0 1 1} + +% los geht's +\begin{figure}\begin{center} + \begin{tabular}{llll}\hline + Weiß & \colorsquare{\white} & + Schwarz & \colorsquare{\black} \\ + Rot & \colorsquare{\red} & + Zyan & \colorsquare{\cyan} \\ + Grün & \colorsquare{\green} & + Violett & \colorsquare{\violet} \\ + Blau & \colorsquare{\blue} & + Gelb & \colorsquare{\yellow} \\ +\hline\end{tabular}\end{center} + +Auch Texte können \color{\red} farbig (hier in Rot) +\color{\black} gesetzt werden. Allerdings benötigen Sie +den Treiber \color{\violet} DVIPS \color{\black} dafür. +\caption{Grund- und Sekundärfarben im RGB-System sowie +farbiger Text.} +\end{figure} + +\end{document}
\ No newline at end of file |