From 563fad62a43dbe055dc4cea3d6bef4cb2eacc000 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 14 Aug 2012 21:33:04 -0500 Subject: [PATCH] adjust 'authors' from scriblib/autobib so that it has a contract (which I'm inferring from the way it is implemented so I might be getting it wrong) related to PR 12966 original commit: f03274c8b77d61991231f5f7931356508b07caa3 --- collects/scriblib/autobib.rkt | 9 +++++++-- collects/scriblib/scribblings/autobib.scrbl | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/collects/scriblib/autobib.rkt b/collects/scriblib/autobib.rkt index 35c7b90d..a6b8730a 100644 --- a/collects/scriblib/autobib.rkt +++ b/collects/scriblib/autobib.rkt @@ -10,14 +10,19 @@ (for-syntax syntax/parse racket/base) scheme/string - setup/main-collects) + setup/main-collects + racket/contract) (provide define-cite author+date-style number-style make-bib in-bib (rename-out [auto-bib? bib?]) proceedings-location journal-location book-location techrpt-location dissertation-location - author-name org-author-name authors other-authors editor) + author-name org-author-name + (contract-out + [authors (->* (content?) #:rest (listof content?) element?)]) + other-authors + editor) (define autobib-style-extras (let ([abs (lambda (s) diff --git a/collects/scriblib/scribblings/autobib.scrbl b/collects/scriblib/scribblings/autobib.scrbl index c26f0b0f..b7bd0723 100644 --- a/collects/scriblib/scribblings/autobib.scrbl +++ b/collects/scriblib/scribblings/autobib.scrbl @@ -193,10 +193,11 @@ describing an author's name, especially where the last name is not merely a sequence of ASCII alphabet letters or where the name has a suffix (such as ``Jr.'').} -@defproc[(authors [name any/c] ...) element?]{ +@defproc[(authors [name content?] [names content?] ...) element?]{ Combines multiple author elements into one, so that it is rendered and -alphabetized appropriately. If a @racket[name] is a string, it is +alphabetized appropriately. Any of @racket[name] or @racket[names] +that are strings are parsed in the same way as by @racket[make-bib].} @defproc[(org-author-name [name any/c]) element?]{