;*=====================================================================*/ ;* 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.]) (:rowspan [The number of columns that the cell spans over.]) (#!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)@*