| 1 |
.ig |
| 2 |
Copyright 2006 Free Software Foundation, Inc. |
| 3 |
|
| 4 |
Written by Joachim Walsdorff <[email protected]> |
| 5 |
|
| 6 |
This file is part of hdtbl. |
| 7 |
|
| 8 |
hdtbl is distributed with groff, the GNU roff typesetting system. |
| 9 |
|
| 10 |
groff is free software; you can redistribute it and/or modify it under |
| 11 |
the terms of the GNU General Public License as published by the Free |
| 12 |
Software Foundation, either version 3 of the License, or |
| 13 |
(at your option) any later version. |
| 14 |
|
| 15 |
groff is distributed in the hope that it will be useful, but WITHOUT |
| 16 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 17 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 18 |
for more details. |
| 19 |
|
| 20 |
You should have received a copy of the GNU General Public License |
| 21 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 22 |
.. |
| 23 |
. |
| 24 |
.if !d sopath \ |
| 25 |
. ds sopath |
| 26 |
. |
| 27 |
.ds lib examples/common.roff |
| 28 |
.soquiet \*[sopath]\*[lib] |
| 29 |
.if !d common \{\ |
| 30 |
. tmc \n[.F]: cannot find "\*[lib]"; specify its location |
| 31 |
. tm1 " with groff '-I' or '-d sopath=' option |
| 32 |
.\} |
| 33 |
. |
| 34 |
. |
| 35 |
.nr *n 25 |
| 36 |
.nr *# 0 1 |
| 37 |
. |
| 38 |
.de ctab |
| 39 |
. nr #cc 0 |
| 40 |
. PN \\$1 \ |
| 41 |
".nr #cc +(1f / \\$1)" \ |
| 42 |
".defcolor \En[t*#] rgb \\$2 \\$3 \\$4" \ |
| 43 |
".TBL csp=\n[t*l]/(12*\\$1+2) border= cpd=0 bgc=\\\\n[t*#] bc=" \ |
| 44 |
".if (\\\\n+[*#] == 1) \ |
| 45 |
.CPTN Rainbow Colors \[em] Nested Tables with Colored Backgrounds \ |
| 46 |
val=b" \ |
| 47 |
.TR \ |
| 48 |
.TD |
| 49 |
.. |
| 50 |
. |
| 51 |
.ctab \n[*n] 1 0 \En[#cc]u \" rot -> magenta |
| 52 |
.ctab \n[*n] 1-\En[#cc]u 0 1 \" magenta -> blue |
| 53 |
.ctab \n[*n] 0 \En[#cc]u 1 \" blue -> cyan |
| 54 |
.ctab \n[*n] 0 1 1-\En[#cc]u \" cyan -> green |
| 55 |
.ctab \n[*n] \En[#cc]u 1 0 \" green -> yellow |
| 56 |
.ctab \n[*n] 1 1-\En[#cc]u 0 \" yellow -> red |
| 57 |
. |
| 58 |
.PN 6*\n[*n] .ETB |
| 59 |
. |
| 60 |
.bp |
| 61 |
. |
| 62 |
.nr *n 25 |
| 63 |
.nr *# 0 1 |
| 64 |
. |
| 65 |
.de ctab |
| 66 |
. nr #cc 0 |
| 67 |
. PN \\$1 \ |
| 68 |
".nr #cc +(1f / \\$1)" \ |
| 69 |
".defcolor \En[t*#] rgb \\$2 \\$3 \\$4" \ |
| 70 |
".TBL border=\n[t*l]/(12*\\$1+2) csp=0 cpd=0 bc=\\\\n[t*#] bgc=" \ |
| 71 |
".if (\\\\n+[*#] == 1) \ |
| 72 |
.CPTN Rainbow Colors \[em] Nested Tables with Colored Borders \ |
| 73 |
val=b" \ |
| 74 |
.TR \ |
| 75 |
.TD |
| 76 |
.. |
| 77 |
. |
| 78 |
.ctab \n[*n] 1 \En[#cc]u 0 \" red -> yellow |
| 79 |
.ctab \n[*n] 1-\En[#cc]u 1 0 \" yellow -> green |
| 80 |
.ctab \n[*n] 0 1 \En[#cc]u \" green -> cyan |
| 81 |
.ctab \n[*n] 0 1-\En[#cc]u 1 \" cyan -> blue |
| 82 |
.ctab \n[*n] \En[#cc]u 0 1 \" blue -> magenta |
| 83 |
.ctab \n[*n] 1 0 1-\En[#cc]u \" magenta -> red |
| 84 |
. |
| 85 |
.PN 6*\n[*n] .ETB |
| 86 |
. |
| 87 |
.\" Local Variables: |
| 88 |
.\" mode: nroff |
| 89 |
.\" fill-column: 72 |
| 90 |
.\" End: |
| 91 |
.\" vim: set filetype=groff textwidth=72: |