Skip to content

Commit 79b0254

Browse files
authored
autobib: fix sorting of author-less books
1 parent ed6d55b commit 79b0254

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scribble-lib/scriblib/autobib.rkt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
(define-struct auto-bib (author date title location url note is-book? doi key specific))
8888
(define-struct bib-group (ht))
8989

90-
(define-struct (author-element element) (names cite))
90+
(define-struct (author-element element) (names cite)) ;; NB: names should always be a string
9191
(define-struct (other-author-element author-element) ())
9292

9393
(define (author-element-names* x)
@@ -693,19 +693,19 @@
693693
(make-author-element
694694
#f
695695
(list org)
696-
org
696+
(content->string org)
697697
org))
698698

699699
(define (other-authors)
700700
(make-other-author-element
701701
#f
702702
(list "Alia")
703-
(list "al" ._)
703+
"al."
704704
(list "al" ._)))
705705

706706
(define (authors name . names*)
707707
(define names (map parse-author (cons name names*)))
708-
(define slash-names (string-join (map (compose1 content->string author-element-names) names) " / "))
708+
(define slash-names (string-join (map author-element-names names) " / "))
709709
(define cite
710710
(case (length names)
711711
[(1) (author-element-cite (car names))]

0 commit comments

Comments
 (0)