bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit fd1bb626d68a7a7ac963d92a9f043484fe18d9f9
parent 9eb42b71eeee59bba39ebac2bedd62bb83490ba3
Author: Matthew Flatt <mflatt@racket-lang.org>
Date:   Thu, 12 Mar 2009 00:59:54 +0000

fix grammar alignment; allow row-independent 'alignment and 'valignment associations in a table style

svn: r14063

original commit: e43b393253ff65b3aeb8d2a49e4dbcbb04341e9c

Diffstat:
Mcollects/scribble/html-render.ss | 2++
Mcollects/scribble/latex-render.ss | 7+++++--
Mcollects/scribblings/scribble/struct.scrbl | 16+++++++++++-----
3 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/collects/scribble/html-render.ss b/collects/scribble/html-render.ss @@ -1052,8 +1052,10 @@ `(tr (,@(if (string? style) `([class ,style]) null)) ,@(let loop ([ds flows] [as (cdr (or (and (list? style) (assq 'alignment style)) + (t-style-get 'alignment) (cons #f (map (lambda (x) #f) flows))))] [vas (cdr (or (and (list? style) (assq 'valignment style)) + (t-style-get 'valignment) (cons #f (map (lambda (x) #f) flows))))] [sts (cdr (or (and (list? style) (assq 'style style)) (cons #f (map (lambda (x) #f) flows))))] diff --git a/collects/scribble/latex-render.ss b/collects/scribble/latex-render.ss @@ -303,8 +303,11 @@ [row-style (car row-styles)]) (let loop ([flows flows] [col-v-styles (and (list? row-style) - (let ([p (assoc 'valignment row-style)]) - (and p (cdr p))))]) + (or (let ([p (assoc 'valignment row-style)]) + (and p (cdr p))) + (let ([p (and (list? (table-style t)) + (assoc 'valignment (table-style t)))]) + (and p (cdr p)))))]) (unless (null? flows) (when index? (printf "\\item ")) (unless (eq? 'cont (car flows)) diff --git a/collects/scribblings/scribble/struct.scrbl b/collects/scribblings/scribble/struct.scrbl @@ -420,6 +420,14 @@ The @scheme[style] can be any of the following: @item{@scheme['style] to a string for a CSS class for HTML output.} + @item{@scheme['alignment] to a list of symbols and + @scheme[#f]s (one for each column); each symbol can be + @scheme['left], @scheme['right], or @scheme['center].} + + @item{@scheme['valignment] to a list of symbols and + @scheme[#f]s (one for each column); each symbol can be + @scheme['top], @scheme['baseline], or @scheme['bottom].} + @item{@scheme['row-styles] to a list of association lists, one for each row in the table. Each of these nested association lists can map @scheme['alignment] and @@ -427,11 +435,9 @@ The @scheme[style] can be any of the following: @scheme[#f]s (one for each column cell) and/or @scheme['style] to a list of strings and @scheme[#f]s (one for each column cell) for a CSS class in HTML - output. The symbols in an @scheme['alignment] list can - be @scheme['left], @scheme['right], or - @scheme['center]. The symbols in a @scheme['valignment] - list can be @scheme['top], @scheme['baseline], or - @scheme['bottom].} + output. Row-specific @scheme['valignment] and + @scheme['alignment] associations override row-independent + associations.} ]}