1 .\" -*- mode: nroff -*-
6 This file is part of groff, the GNU roff type-setting system.
8 Copyright (C) 2005-2014 Free Software Foundation, Inc.
9 written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
11 groff is free software; you can redistribute it and/or modify it under
12 the terms of the GNU General Public License as published by the Free
13 Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 groff is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
29 .so \*[sopath]examples/common.roff
39 ".nr #cc +(1f / \\$1)" \
40 ".defcolor \En[t*#] rgb \\$2 \\$3 \\$4" \
41 ".TBL csp=\n[t*l]/(12*\\$1+2) border= cpd=0 bgc=\\\\n[t*#] bc=" \
42 ".if (\\\\n+[*#] == 1) \
43 .CPTN Rainbow Colors \[em] Nested Tables with Colored Backgrounds \
49 .ctab \n[*n] 1 0 \En[#cc]u \" rot -> magenta
50 .ctab \n[*n] 1-\En[#cc]u 0 1 \" magenta -> blue
51 .ctab \n[*n] 0 \En[#cc]u 1 \" blue -> cyan
52 .ctab \n[*n] 0 1 1-\En[#cc]u \" cyan -> green
53 .ctab \n[*n] \En[#cc]u 1 0 \" green -> yellow
54 .ctab \n[*n] 1 1-\En[#cc]u 0 \" yellow -> red
70 ".nr #cc +(1f / \\$1)" \
71 ".defcolor \En[t*#] rgb \\$2 \\$3 \\$4" \
72 ".TBL border=\n[t*l]/(12*\\$1+2) csp=0 cpd=0 bc=\\\\n[t*#] bgc=" \
73 ".if (\\\\n+[*#] == 1) \
74 .CPTN Rainbow Colors \[em] Nested Tables with Colored Borders \
80 .ctab \n[*n] 1 \En[#cc]u 0 \" red -> yellow
81 .ctab \n[*n] 1-\En[#cc]u 1 0 \" yellow -> green
82 .ctab \n[*n] 0 1 \En[#cc]u \" green -> cyan
83 .ctab \n[*n] 0 1-\En[#cc]u 1 \" cyan -> blue
84 .ctab \n[*n] \En[#cc]u 0 1 \" blue -> magenta
85 .ctab \n[*n] 1 0 1-\En[#cc]u \" magenta -> red
91 .\" 466MHz Celeron CPU, 384MB RAM
92 .\" WindowsXP/cygwin groff18.1: 11/10s
93 .\" WindowsXP/cygwin groff19.2: 57/55s
94 .\" Suse Linux 9.3 groff19.2: 8/8s