summaryrefslogtreecommitdiff
path: root/info/examples/ltt/colorps.tex
diff options
context:
space:
mode:
Diffstat (limited to 'info/examples/ltt/colorps.tex')
-rw-r--r--info/examples/ltt/colorps.tex41
1 files changed, 41 insertions, 0 deletions
diff --git a/info/examples/ltt/colorps.tex b/info/examples/ltt/colorps.tex
new file mode 100644
index 0000000000..fa59819911
--- /dev/null
+++ b/info/examples/ltt/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