7a482f3891e8647774bc6ab25cea4147e55bf908
[platform/upstream/groff.git] / contrib / hdtbl / examples / color_table_cells.roff
1 .\" -*- mode: nroff -*-
2 .ig
3
4 color_table_cells.roff
5
6 This file is part of groff, the GNU roff type-setting system.
7
8 Copyright (C) 2005-2014 Free Software Foundation, Inc.
9 written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
10
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.
15
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
19 for more details.
20
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/>.
23
24 ..
25 .
26 .if !d sopath \
27 .  ds sopath
28 .
29 .so \*[sopath]examples/common.roff
30 .
31 .time start
32 .
33 .H Horizontal Rules and Randomly Colored Table Cells
34 .PN 15 Text before HR.
35 .TBL border=.5n bc=green bgc=red width=7c tal=c csp=.2n cpd=.3n .TR .TD .ETB
36 .PN 10 Text after HR and before Table.
37 .
38 .nr ? 0 1
39 .de ctab
40 .TR height=\nl/10
41 .PN 8 .random# ".defcolor c\\\\n+? rgb \E*[#random]" ".TD bgc=c\\\\n?" 
42 ..
43 .TBL tal=c border= csp=0 cpd=0 cols=8 width=\nl/10
44 .PN 8 .ctab
45 .ETB 
46 .PN 10 Text after table.
47 .TBL border=.5n bc=c1 bgc=c2 width=15c tal=c csp=.2n cpd=.3n .TR .TD .ETB
48 .PN 15 Text after HR.
49 .time
50 .\"     466MHz Celeron CPU, 384MB RAM 
51 .\"     WindowsXP/cygwin groff18.1:      14s
52 .\"     WindowsXP/cygwin groff19.2:      18s
53 .\"     Suse Linux 9.3 groff19.2:         1s