fix index generation for Latex/PDF output

This commit is contained in:
Matthew Flatt 2015-01-24 10:09:57 -07:00
parent 064ccc9bfc
commit 2eb3c62bd6

View File

@ -692,10 +692,13 @@
[all-left-line?s all-left-line?s] [all-left-line?s all-left-line?s]
[need-left? #f]) [need-left? #f])
(unless (null? flows) (unless (null? flows)
(define (render-cell cnt)
(render-table-cell (car flows) part ri (/ twidth cnt) (car cell-styles) (not index?)))
(define right-line? (define right-line?
(cond (cond
[index? [index?
(printf "\n\\item ") (printf "\n\\item ")
(render-cell 1)
#f] #f]
[(eq? 'cont (car flows)) [(eq? 'cont (car flows))
#f] #f]
@ -711,7 +714,7 @@
(memq 'left-border (style-properties (car cell-styles))) (memq 'left-border (style-properties (car cell-styles)))
(memq 'border (style-properties (car cell-styles))))) (memq 'border (style-properties (car cell-styles)))))
(printf "\\vline ")) (printf "\\vline "))
(render-table-cell (car flows) part ri (/ twidth cnt) (car cell-styles) (not index?)) (render-cell cnt)
(define right-line? (or (memq 'right-border (style-properties (list-ref cell-styles (sub1 cnt)))) (define right-line? (or (memq 'right-border (style-properties (list-ref cell-styles (sub1 cnt))))
(memq 'border (style-properties (list-ref cell-styles (sub1 cnt)))))) (memq 'border (style-properties (list-ref cell-styles (sub1 cnt))))))
(when (and right-line? (null? (list-tail flows cnt)) (not all-right-line?)) (when (and right-line? (null? (list-tail flows cnt)) (not all-right-line?))