4 Copyright (c) 2014 - 2015 Steffen (Daode) Nurpmeso <sdaoden@users.sf.net>.
6 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
7 written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
9 This is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 2, or (at your option) any later
14 This is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 You should have received a copy of the GNU General Public License
20 along with groff; see the file COPYING. If not, write to the Free
21 Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA
33 ".nr #cc +(1f / \\$1)" \
34 ".defcolor \En[t*#] rgb \\$2 \\$3 \\$4" \
35 ".TBL csp=\n[l]/(12*\\$1+2) border= cpd=0 bgc=\\\\n[t*#] bc=" \
36 ".if (\\\\n+[*#] == 1) \
37 .CPTN Rainbow Colors \[em] Nested Tables with Colored Backgrounds \
43 .ctab \n[*n] 1 0 \En[#cc]u \" rot -> magenta
44 .ctab \n[*n] 1-\En[#cc]u 0 1 \" magenta -> blue
45 .ctab \n[*n] 0 \En[#cc]u 1 \" blue -> cyan
46 .ctab \n[*n] 0 1 1-\En[#cc]u \" cyan -> green
47 .ctab \n[*n] \En[#cc]u 1 0 \" green -> yellow
48 .ctab \n[*n] 1 1-\En[#cc]u 0 \" yellow -> red
64 ".nr #cc +(1f / \\$1)" \
65 ".defcolor \En[t*#] rgb \\$2 \\$3 \\$4" \
66 ".TBL border=\n[l]/(12*\\$1+2) csp=0 cpd=0 bc=\\\\n[t*#] bgc=" \
67 ".if (\\\\n+[*#] == 1) \
68 .CPTN Rainbow Colors \[em] Nested Tables with Colored Borders \
74 .ctab \n[*n] 1 \En[#cc]u 0 \" red -> yellow
75 .ctab \n[*n] 1-\En[#cc]u 1 0 \" yellow -> green
76 .ctab \n[*n] 0 1 \En[#cc]u \" green -> cyan
77 .ctab \n[*n] 0 1-\En[#cc]u 1 \" cyan -> blue
78 .ctab \n[*n] \En[#cc]u 0 1 \" blue -> magenta
79 .ctab \n[*n] 1 0 1-\En[#cc]u \" magenta -> red
84 .\" 466MHz Celeron CPU, 384MB RAM
85 .\" WindowsXP/cygwin groff18.1: 11/10s
86 .\" WindowsXP/cygwin groff19.2: 57/55s
87 .\" Suse Linux 9.3 groff19.2: 8/8s