From 97d55239bd9720a5af000b1ba586643bf7d3f980 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 25 May 2007 01:54:44 +0000 Subject: [PATCH] fix local TOC in latex output svn: r6288 original commit: 7d9f2d8b6a8365c7246012e55a73b03eb6f52322 --- collects/scribble/base-render.ss | 3 +++ collects/scribble/basic.ss | 10 ++++++++-- collects/scribble/latex-render.ss | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/collects/scribble/base-render.ss b/collects/scribble/base-render.ss index c615263d..7a5e8d82 100644 --- a/collects/scribble/base-render.ss +++ b/collects/scribble/base-render.ss @@ -254,6 +254,9 @@ (define/public (table-of-contents part ht) (make-table #f (render-toc part #t))) + (define/public (local-table-of-contents part ht) + (table-of-contents part ht)) + (define/private (render-toc part skip?) (let ([number (collected-info-number (part-collected-info part))]) (let ([subs diff --git a/collects/scribble/basic.ss b/collects/scribble/basic.ss index c0e00575..b326fa63 100644 --- a/collects/scribble/basic.ss +++ b/collects/scribble/basic.ss @@ -178,12 +178,18 @@ ;; ---------------------------------------- - (provide table-of-contents) + (provide table-of-contents + local-table-of-contents) (define (table-of-contents) (make-delayed-flow-element (lambda (renderer part ht) - (send renderer table-of-contents part ht))))) + (send renderer table-of-contents part ht)))) + + (define (local-table-of-contents) + (make-delayed-flow-element + (lambda (renderer part ht) + (send renderer local-table-of-contents part ht))))) diff --git a/collects/scribble/latex-render.ss b/collects/scribble/latex-render.ss index 5e765958..cf167ca6 100644 --- a/collects/scribble/latex-render.ss +++ b/collects/scribble/latex-render.ss @@ -229,6 +229,9 @@ ;; FIXME: isn't local to the section (make-toc-paragraph null)) + (define/override (local-table-of-contents part ht) + (make-paragraph null)) + ;; ---------------------------------------- (super-new))))