From 45d172a9a2dbf865de095df88bc9be79f96ad8c9 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 6 Mar 2008 17:13:13 +0100 Subject: `base' package: Add `:rulecolor' option to `table'. * NEWS, doc/user/colframe.skb, doc/user/table.skb: Update. * src/guile/skribilo/engine/lout.scm (table): Support `:rulecolor'. * src/guile/skribilo/package/base.scm (table): Support `:rulecolor'. --- src/guile/skribilo/engine/lout.scm | 6 +++++- src/guile/skribilo/package/base.scm | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src/guile') 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 +;;; Copyright 2005, 2006, 2007, 2008 Ludovic Courtès ;;; 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)))))))) -- cgit v1.2.3