diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | doc/user/colframe.skb | 10 | ||||
-rw-r--r-- | doc/user/table.skb | 20 | ||||
-rw-r--r-- | src/guile/skribilo/engine/lout.scm | 6 | ||||
-rw-r--r-- | src/guile/skribilo/package/base.scm | 8 |
5 files changed, 32 insertions, 13 deletions
@@ -26,6 +26,7 @@ Namely, `slide-outline-title' and `slide-outline-{active,inactive}-color'. See manual for details. ** The `:toc' option of `slide' determines whether to include it in the outline +** New option `:rulecolor' for `table' * New in Skribilo 0.9.0 (user-visible changes compared to Skribe 1.2d) diff --git a/doc/user/colframe.skb b/doc/user/colframe.skb index 307b95c..a69db05 100644 --- a/doc/user/colframe.skb +++ b/doc/user/colframe.skb @@ -1,5 +1,6 @@ ;;; colframe.skb -- Skribe color and frame ;;; +;;; Copyright 2008 Ludovic Courtès <ludo@gnu.org> ;;; Copyright 2003, 2004 Manuel Serrano ;;; ;;; @@ -21,7 +22,7 @@ ;*---------------------------------------------------------------------*/ ;* Frame and color */ ;*---------------------------------------------------------------------*/ -(section :title "Frame and color" :file #t +(section :title "Frames and Colors" :file #t (p [The function ,(code "frame") embeds a text inside a frame. The function ,(code "color") may also use the same purpose when it is @@ -61,6 +62,7 @@ acts as a container. Otherwise, it acts as an ,(ref :section "Ornaments").]) (disp (include "src/api13.skb"))))) - - - +;;; Local Variables: +;;; coding: latin-1 +;;; ispell-local-dictionary: "american" +;;; End: diff --git a/doc/user/table.skb b/doc/user/table.skb index 0408778..8e7f6e0 100644 --- a/doc/user/table.skb +++ b/doc/user/table.skb @@ -1,5 +1,6 @@ ;;; table.skb -- Skribe tables ;;; +;;; Copyright 2008 Ludovic Courtès <ludo@gnu.org> ;;; Copyright 2003, 2004 Manuel Serrano ;;; ;;; @@ -41,17 +42,19 @@ (: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 (emph (color :fg "red" "Note:"))) Tables rendering may be only + (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" +(subsection :title "Table Row" (p [Table rows are defined by the ,(code "tr") function.]) @@ -60,19 +63,19 @@ attribute is only supported by HTML engines supporting (#!rest cell... [The row cells.])))) ;*--- Table cell ------------------------------------------------------*/ -(subsection :title "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.]) + `((:bg [The background color of the cell.]) (:width ,[The ,(ref :mark "width") of the table.]) - (:align [The horizontal alignment of the table cell + (: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 + (: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.]) @@ -89,3 +92,8 @@ attribute is only supported by HTML engines supporting (disp (include "src/api17.skb"))))) ;; @indent: (put 'doc-markup 'skribe-indent 'skribe-indent-function)@* + +;;; Local Variables: +;;; coding: latin-1 +;;; ispell-local-dictionary: "american" +;;; End: diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm index b924b2b..64e8634 100644 --- a/src/guile/skribilo/engine/lout.scm +++ b/src/guile/skribilo/engine/lout.scm @@ -2274,7 +2274,7 @@ ;* table ... */ ;*---------------------------------------------------------------------*/ (markup-writer 'table - :options '(:frame :rules :border :width :cellpadding) + :options '(:frame :rules :border :width :cellpadding :rulecolor) ;; XXX: `:cellstyle' `separate' and `:cellspacing' not supported ;; by Lout's @Tbl. :before (lambda (n e) @@ -2305,6 +2305,10 @@ (if (number? cp) (format #t " margin { ~ap }\n" (number->string cp))) + (let ((rule-color (markup-option n :rulecolor))) + (and rule-color + (format #t " rulecolor { ~a }~%" + (lout-color-specification rule-color)))) (display "{\n"))) diff --git a/src/guile/skribilo/package/base.scm b/src/guile/skribilo/package/base.scm index a4443dc..8462e81 100644 --- a/src/guile/skribilo/package/base.scm +++ b/src/guile/skribilo/package/base.scm @@ -1,6 +1,6 @@ ;;; base.scm -- The base markup package of Skribe/Skribilo. ;;; -;;; Copyright 2005, 2006, 2007 Ludovic Courtès <ludo@gnu.org> +;;; Copyright 2005, 2006, 2007, 2008 Ludovic Courtès <ludo@gnu.org> ;;; Copyright 2003, 2004 Manuel Serrano ;;; ;;; @@ -697,7 +697,8 @@ (ident #f) (class #f) (&location #f) (border #f) (width #f) (frame 'none) (rules 'none) - (cellstyle 'collapse) (cellpadding #f) (cellspacing #f)) + (cellstyle 'collapse) (cellpadding #f) (cellspacing #f) + (rulecolor #f)) (let ((frame (cond ((string? frame) (string->symbol frame)) @@ -740,6 +741,9 @@ (options `((:frame ,frame) (:rules ,rules) (:cellstyle ,cellstyle) + ,@(if rulecolor + `((:rulecolor ,rulecolor)) + '()) ,@(the-options opts :ident :class))) (body (parse-list-of 'table 'tr (the-body opts)))))))) |