From 8ebc1bdfbd950acbbeb76a3515f4b3687b6c0c23 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 4 Nov 2012 06:38:30 -0700 Subject: [PATCH] make figure target rendering configurable from Kevin Tew original commit: c6fc92915d3de5b585eb01ddddf8c60f60664008 --- collects/scriblib/figure.rkt | 5 +++-- collects/scriblib/figure.tex | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/collects/scriblib/figure.rkt b/collects/scriblib/figure.rkt index 014034c9..d9bbad80 100644 --- a/collects/scriblib/figure.rkt +++ b/collects/scriblib/figure.rkt @@ -29,6 +29,7 @@ (define herefigure-style (make-style "Herefigure" figure-style-extras)) (define figureinside-style (make-style "FigureInside" figure-style-extras)) (define legend-style (make-style "Legend" figure-style-extras)) +(define figure-target-style (make-style "FigureTarget" figure-style-extras)) (define centertext-style (make-style "Centertext" figure-style-extras)) (define figure-style (make-style "Figure" figure-style-extras)) @@ -52,7 +53,7 @@ figure-style (list (make-nested-flow content-style (list (make-nested-flow figureinside-style (decode-flow content)))) - (make-paragraph centertext-style (list (make-element legend-style (list (Figure-target tag) ": " caption))))))) + (make-paragraph centertext-style (list (make-element legend-style (list (make-element figure-target-style (list (Figure-target tag) ": ")) caption))))))) (define (*figure style tag caption content) (make-nested-flow @@ -65,7 +66,7 @@ (list (make-paragraph plain - (list (make-element legend-style (list (Figure-target tag) ": " caption)))))))))) + (list (make-element legend-style (list (make-element figure-target-style (list (Figure-target tag) ": ")) caption)))))))))) (define (figure* tag caption . content) (*figure centerfiguremulti-style tag caption content)) diff --git a/collects/scriblib/figure.tex b/collects/scriblib/figure.tex index b7a586a2..9f58e972 100644 --- a/collects/scriblib/figure.tex +++ b/collects/scriblib/figure.tex @@ -12,6 +12,8 @@ \vspace{4pt} \legend{#1}} +\newcommand{\FigureTarget}[1]{#1} + \newlength{\FigOrigskip} \FigOrigskip=\parskip