diff --git a/collects/scribble/html-render.ss b/collects/scribble/html-render.ss index d2d904f59f..8888b06062 100644 --- a/collects/scribble/html-render.ss +++ b/collects/scribble/html-render.ss @@ -1076,6 +1076,7 @@ [(#f) null] [(top) '((valign "top"))] [(baseline) '((valign "baseline"))] + [(center) '((valign "center"))] [(bottom) '((valign "bottom"))]) ,@(if (string? st) `([class ,st]) diff --git a/collects/scribble/latex-render.ss b/collects/scribble/latex-render.ss index 4399ddd8e4..4633c9d590 100644 --- a/collects/scribble/latex-render.ss +++ b/collects/scribble/latex-render.ss @@ -302,12 +302,12 @@ (let ([flows (car flowss)] [row-style (car row-styles)]) (let loop ([flows flows] - [col-v-styles (and (list? row-style) - (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)))))]) + [col-v-styles (or (and (list? row-style) + (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)) @@ -347,17 +347,20 @@ (printf "\\begin{tabular}~a{@{}l@{}}\n" (cond [(eq? vstyle 'top) "[t]"] + [(eq? vstyle 'center) "[c]"] [else ""]))) (let loop ([ps (flow-paragraphs p)]) (cond [(null? ps) (void)] [else - (let ([minipage? (not (or (paragraph? (car ps)) - (table? (car ps))))]) + (let ([minipage? (or (not (or (paragraph? (car ps)) + (table? (car ps)))) + (eq? vstyle 'center))]) (when minipage? (printf "\\begin{minipage}~a{~a\\linewidth}\n" (cond [(eq? vstyle 'top) "[t]"] + [(eq? vstyle 'center) "[c]"] [else ""]) (/ 1.0 twidth))) (render-block (car ps) part ri #f) diff --git a/collects/scribblings/scribble/struct.scrbl b/collects/scribblings/scribble/struct.scrbl index 5809ba0bae..60bb8e19d2 100644 --- a/collects/scribblings/scribble/struct.scrbl +++ b/collects/scribblings/scribble/struct.scrbl @@ -426,7 +426,8 @@ The @scheme[style] can be any of the following: @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].} + @scheme['top], @scheme['baseline], @scheme['center], + or @scheme['bottom].} @item{@scheme['row-styles] to a list of association lists, one for each row in the table. Each of these nested