From 420b66ca4e4ab0a06ba4b620f8ce729c4a5dd083 Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Wed, 2 May 2012 22:38:45 -0400 Subject: [PATCH] Add an example to scriblib/autobib docs. --- collects/scriblib/scribblings/autobib.scrbl | 27 +++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/collects/scriblib/scribblings/autobib.scrbl b/collects/scriblib/scribblings/autobib.scrbl index 209e3c3f21..c3e7044bba 100644 --- a/collects/scriblib/scribblings/autobib.scrbl +++ b/collects/scriblib/scribblings/autobib.scrbl @@ -8,6 +8,33 @@ @defmodule[scriblib/autobib] +This library provides support for bibliography management in a Scribble +document. The @racket[define-cite] form is used to bind procedures +that create in-line citations and generate the bibilography in the +document. + +Individual bibliography entries are created with the @racket[make-bib] +function. See below for an example. + +@codeblock|{ + #lang scribble/base + + @(require scriblib/autobib) + + @(define-cite ~cite citet generate-bibliography) + + @(define plt-tr1 + (make-bib + #:title "Reference: Racket" + #:author (authors "Matthew Flatt" "PLT") + #:date "2010" + #:location (techrpt-location #:institution "PLT Inc." #:number "PLT-TR-2010-1") + #:url "http://racket-lang.org/tr1/")) + + Racket is fun@~cite[plt-tr1]. + + @(generate-bibliography) +}| @defform[(define-cite ~cite-id citet-id generate-bibliography-id [#:disambiguate disambiguator]