From 6839525662c63dca0ef7defb9801d014fd406610 Mon Sep 17 00:00:00 2001 From: Leif Andersen Date: Fri, 26 May 2017 09:19:47 -0400 Subject: [PATCH] An idea, if #f is passed into a figure's label, then no label is printed. As is, this may still increase the figure counter, which we may want to change. Also I am sure there are other edge cases we will want to consider before merging. --- scribble-lib/scriblib/figure.rkt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/scribble-lib/scriblib/figure.rkt b/scribble-lib/scriblib/figure.rkt index 16780d4933..54e5875f7a 100644 --- a/scribble-lib/scriblib/figure.rkt +++ b/scribble-lib/scriblib/figure.rkt @@ -92,16 +92,19 @@ (define (figure-helper figure-style content-style tag caption content continue?) (make-nested-flow figure-style - (list + (list* (make-nested-flow content-style (list (make-nested-flow figureinside-style (decode-flow content)))) - (make-paragraph - centertext-style - (list (make-element (if continue? - legend-continued-style - legend-style) - (list (Figure-target tag #:continue? continue?) caption))))))) + (if caption + (list + (make-paragraph + centertext-style + (list (make-element (if continue? + legend-continued-style + legend-style) + (list (Figure-target tag #:continue? continue?) caption))))) + (list))))) (define figures (new-counter "figure" #:target-wrap make-figure-target