0ce9507c84205a0ed807046a720b87b86a27fcea
[platform/upstream/groff.git] / contrib / hdtbl / examples / color_boxes.roff
1 .\" -*- mode: nroff -*-
2 .ig
3 color_boxes.roff
4
5 This file is part of groff, the GNU roff type-setting system.
6
7 Copyright (C) 2005-2014 Free Software Foundation, Inc.
8 written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
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 .so \*[sopath]examples/common.roff
28 .
29 .time start
30 .
31 .H Horizontal Rules and Boxes .br with Randomly Colored Border and Background
32 .PN 25 Text before horizontal rule.
33 .TBL border=.5n bc=green bgc=red width=7c tal=c csp=.2n cpd=.3n .TR .TD .ETB
34 .PN 10 Text after horizontal rule and before table.
35 .de ctab
36 .nr ? 0 1
37 .PN 5 .random# ".defcolor color\En+? rgb \E*[#random]" 
38 .TD ".TBL border=1c bc=color1 csp=0 cpd=0 height=3c bgc=color2" .TR .TD .ETB
39 ..
40 .
41 .TBL tal=c border= csp=0 cpd=0 cols=5 width=3c
42 .PN 2 .TR ".PN 5 .ctab"
43 .ETB 
44 .PN 15 Text after table.
45 .TBL border=.5n bc=color1 bgc=color2 width=15c tal=c csp=.2n cpd=.3n .TR .TD .ETB
46 .PN 25 Text after horizontal rule.
47 .time
48 .\"     466MHz Celeron CPU, 384MB RAM 
49 .\"     WindowsXP/cygwin groff18.1:      10s
50 .\"     WindowsXP/cygwin groff19.2:      14s
51 .\"     Suse Linux 9.3 groff19.2:         1s