From 2eb3c62bd6ce3667fdcaa5125be42dbead5c123f Mon Sep 17 00:00:00 2001
From: Matthew Flatt <mflatt@racket-lang.org>
Date: Sat, 24 Jan 2015 10:09:57 -0700
Subject: [PATCH] fix index generation for Latex/PDF output

---
 scribble-lib/scribble/latex-render.rkt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scribble-lib/scribble/latex-render.rkt b/scribble-lib/scribble/latex-render.rkt
index 95d7903f..bd2dd770 100644
--- a/scribble-lib/scribble/latex-render.rkt
+++ b/scribble-lib/scribble/latex-render.rkt
@@ -692,10 +692,13 @@
                                [all-left-line?s all-left-line?s]
                                [need-left? #f])
                       (unless (null? flows)
+                        (define (render-cell cnt)
+                          (render-table-cell (car flows) part ri (/ twidth cnt) (car cell-styles) (not index?)))
                         (define right-line?
                           (cond
                            [index?
                             (printf "\n\\item ")
+                            (render-cell 1)
                             #f]
                            [(eq? 'cont (car flows))
                             #f]
@@ -711,7 +714,7 @@
                                              (memq 'left-border (style-properties (car cell-styles)))
                                              (memq 'border (style-properties (car cell-styles)))))
                                 (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))))
                                                       (memq 'border (style-properties (list-ref cell-styles (sub1 cnt))))))
                               (when (and right-line? (null? (list-tail flows cnt)) (not all-right-line?))