;;; table.skb -- Skribe tables ;;; -*- coding: iso-8859-1 -*- ;;; ;;; Copyright 2008 Ludovic Courtès ;;; Copyright 2003, 2004 Manuel Serrano ;;; ;;; ;;; This file is part of Skribilo. ;;; ;;; Skribilo is free software: you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by ;;; the Free Software Foundation, either version 3 of the License, or ;;; (at your option) any later version. ;;; ;;; Skribilo is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with Skribilo. If not, see . ;*---------------------------------------------------------------------*/ ;* 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.]) (:rulecolor ,[The color of rules (see Section ,(ref :section "Frames and Colors")).]) (#!rest row... [The rows of the table. Each row must be constructed by the ,(ref :mark "tr" :text (code "tr")) function.]))) (p [,(bold (color :fg "red" "Note:")) Table 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)@* ;;; Local Variables: ;;; ispell-local-dictionary: "american" ;;; End: