aboutsummaryrefslogtreecommitdiff
path: root/skribe/doc/user/table.skb
blob: c726d44dc398594347a09e95a857ca9b7c7ecc3c (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
;*=====================================================================*/
;*    serrano/prgm/project/skribe/doc/user/table.skb                   */
;*    -------------------------------------------------------------    */
;*    Author      :  Manuel Serrano                                    */
;*    Creation    :  Fri Sep  5 13:45:18 2003                          */
;*    Last change :  Wed Oct 27 12:09:01 2004 (eg)                     */
;*    Copyright   :  2003-04 Manuel Serrano                            */
;*    -------------------------------------------------------------    */
;*    Skribe tables                                                    */
;*=====================================================================*/

;*---------------------------------------------------------------------*/
;*    Table ...                                                        */
;*---------------------------------------------------------------------*/
(section :title "Table" :file #t

   (p [Tables are defined by the means of the ,(code "table") function.])

   (doc-markup 'table
      `((:border [The table border thickness.])
	(:width ,[The ,(ref :mark "width") of the table.])
	(:frame ,[Which parts of frame to render. Must be one of
         ,(code "none"), ,(code "above"), ,(code "below"), 
         ,(code "hsides"), ,(code "vsides"), ,(code "lhs"), 
         ,(code "rhs"), ,(code "box"), ,(code "border").])
	(:rules ,[Rulings between rows and cols, Must be one of
         ,(code [none]), ,(code "rows"), ,(code "cols"), ,(code "header"), 
         ,(code "all").])
	(:cellstyle ,[The style of cells border. Must be either 
         ,(code "collapse"), ,(code "separate"), or a length representing
         the horizontal and vertical space separating the cells.])
	(:cellpadding [A number of pixels around each cell.])
	(:cellspacing [An optional number of pixels used to separate each
         cell of the table. A negative uses the target default.])
	(#!rest row... [The rows of the table. Each row must be 
         constructed by the ,(ref :mark "tr" :text (code "tr")) function.])))
   
   (p [,(bold (emph (color :fg "red" "Note:"))) Tables rendering may be only
partially supported by graphical agents. For instance, the ,(code "cellstyle")
attribute is only supported by HTML engines supporting
,(ref :url "http://www.w3.org/TR/REC-CSS2/" :text "CSS2").])
   

;*--- table rows ------------------------------------------------------*/
(subsection :title "Table row"

(p [Table rows are defined by the ,(code "tr") function.])

(doc-markup 'tr
	    '((:bg [The background color of the row.])
	      (#!rest cell... [The row cells.]))))

;*--- Table cell ------------------------------------------------------*/
(subsection :title "Table cell"

(p [Two functions define table cells: ,(code "th") for header cells and
,(code "td") for plain cells.])

(doc-markup 'th
	    '((:bg [The background color of the cell.])
	      (:width ,[The ,(ref :mark "width") of the table.])
	      (:align [The horizontal alignment of the table cell 
                       (,(tt "left"), ,(tt "right"), or ,(tt "center"). Some
                       engines, such as the HTML engine, also supports a
                       character for the alignment.)])
	      (:valign [The vertical alignment of the cell. The value can
		        be ,(code "top"), ,(code "center"), ,(code "bottom").])
              (:colspan [The number of columns that the cell expands to.])
	      (#!rest node [The value of the cell.]))
	    :writer-id 'tc
	    :ignore-args '(m)
	    :others '(td)))

;*--- Example ---------------------------------------------------------*/
(subsection :title "Example"

(example-produce
 (example :legend "A table" (prgm :file "src/api17.skb"))
 (disp (include "src/api17.skb")))))

;; @indent: (put 'doc-markup 'skribe-indent 'skribe-indent-function)@*