sriblib/autobib: added a keyword argument to generate-bibliography to control the name of the section
original commit: 62d758ca56d16ceb8c4f55460ffdb904a52b002d
This commit is contained in:
parent
58183ac740
commit
fae7c00658
|
@ -96,7 +96,7 @@
|
||||||
(string->number (auto-bib-date b)))
|
(string->number (auto-bib-date b)))
|
||||||
|
|
||||||
|
|
||||||
(define (gen-bib tag group)
|
(define (gen-bib tag group sec-title)
|
||||||
(let* ([author/date<?
|
(let* ([author/date<?
|
||||||
(lambda (a b)
|
(lambda (a b)
|
||||||
(or
|
(or
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
(make-part
|
(make-part
|
||||||
#f
|
#f
|
||||||
`((part ,tag))
|
`((part ,tag))
|
||||||
'("Bibliography")
|
(list sec-title)
|
||||||
(make-style #f '(unnumbered))
|
(make-style #f '(unnumbered))
|
||||||
null
|
null
|
||||||
(list
|
(list
|
||||||
|
@ -150,8 +150,8 @@
|
||||||
(add-cites group (cons bib-entry bib-entries)))
|
(add-cites group (cons bib-entry bib-entries)))
|
||||||
(define (citet bib-entry . bib-entries)
|
(define (citet bib-entry . bib-entries)
|
||||||
(add-inline-cite group (cons bib-entry bib-entries)))
|
(add-inline-cite group (cons bib-entry bib-entries)))
|
||||||
(define (generate-bibliography #:tag [tag "doc-bibliography"])
|
(define (generate-bibliography #:tag [tag "doc-bibliography"] #:sec-title [sec-title "Bibliography"])
|
||||||
(gen-bib tag group))))
|
(gen-bib tag group sec-title))))
|
||||||
|
|
||||||
(define (ends-in-punc? e)
|
(define (ends-in-punc? e)
|
||||||
(regexp-match? #rx"[.!?,]$" (content->string e)))
|
(regexp-match? #rx"[.!?,]$" (content->string e)))
|
||||||
|
|
|
@ -20,7 +20,7 @@ to one or more bibliography entries with a preceding non-breaking
|
||||||
space. It has the contract
|
space. It has the contract
|
||||||
|
|
||||||
@schemeblock[
|
@schemeblock[
|
||||||
((bib?) () (listof bib?) . ->* . element?)
|
(->* (bib?) () #:rest (listof bib?) element?)
|
||||||
]
|
]
|
||||||
|
|
||||||
The function bound to @scheme[citet-id] generates an element suitable
|
The function bound to @scheme[citet-id] generates an element suitable
|
||||||
|
@ -28,15 +28,19 @@ for use as a noun---referring to a document or its author---for one
|
||||||
or more bibliography entries which share an author. It has the contract
|
or more bibliography entries which share an author. It has the contract
|
||||||
|
|
||||||
@schemeblock[
|
@schemeblock[
|
||||||
((bib?) () (listof bib?) . ->* . element?)
|
(->* (bib?) () #:rest (listof bib?) element?)
|
||||||
]
|
]
|
||||||
|
|
||||||
The function bound to @scheme[generate-bibliography-id] generates the
|
The function bound to @scheme[generate-bibliography-id] generates the
|
||||||
section for the bibliography. It has the contract
|
section for the bibliography. It has the contract
|
||||||
|
|
||||||
@schemeblock[
|
@schemeblock[
|
||||||
(() (#:tag [tag "doc-bibliography"]) null? . ->* . part?)
|
(->* () (#:tag string? #:sec-title string?) part?)
|
||||||
]}
|
]
|
||||||
|
|
||||||
|
The default value for the @racket[#:tag] argument is @racket["doc-bibliography"]
|
||||||
|
and for @racket[#:sec-title] is @racket["Bibliography"].
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(bib? [v any/c]) boolean?]{
|
@defproc[(bib? [v any/c]) boolean?]{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user