Skip to content

Commit 7ff376e

Browse files
committed
and word
1 parent 3a0ce3e commit 7ff376e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

scribble-doc/scriblib/scribblings/figure.scrbl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,13 @@ provided for backward compatibility.}
8686

8787

8888
@defproc[(figure-ref [tag string?] ...+
89-
[#:link-render-style link-style (or/c link-render-style? #f)])
89+
[#:and-word and-word string? "and"]
90+
[#:link-render-style link-style (or/c link-render-style? #f) #f])
9091
element?]{
9192

9293
Generates a reference to one or more figures, using a lowercase word ``figure''.
94+
When two tags are given, the @racket[connecting-word] is used to
95+
connect the two.
9396

9497
If @racket[link-style] or @racket[(current-link-render-style)] at the
9598
time of rendering indicates the @racket['number] style mode, then the

scribble-lib/scriblib/figure.rkt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
(#:continue? any/c)
1919
element?)]
2020
[Figure-ref (->* (string?)
21-
(#:link-render-style link-render-style?)
21+
(#:link-render-style link-render-style? #:and-word string?)
2222
#:rest (listof string?)
2323
element?)]
2424
[figure-ref (->* (string?)
25-
(#:link-render-style link-render-style?)
25+
(#:link-render-style link-render-style? #:and-word string?)
2626
#:rest (listof string?)
2727
element?)])
2828
left-figure-style
@@ -141,6 +141,7 @@
141141

142142
(define (ref-proc initial)
143143
(lambda (tag #:link-render-style [link-style #f]
144+
#:and-word (and-word "and")
144145
. tags)
145146
(cond
146147
[(null? tags)
@@ -153,7 +154,7 @@
153154
(define tag2 (car tags))
154155
(make-element #f (list (counter-ref figures tag1 (string-append initial "igures")
155156
#:link-render-style link-style)
156-
" and "
157+
(string-append " " and-word " ")
157158
(counter-ref figures tag2 #f
158159
#:link-render-style link-style)))]
159160
[else

0 commit comments

Comments
 (0)