From 3a4ec996f6ea823cb3465beeaa09b5d83bde5265 Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau Date: Wed, 4 Feb 2026 20:16:08 -0500 Subject: [PATCH 1/2] autobib: fix sorting of author-less books Convert title using content->string before it may be used as a sortable name. --- scribble-lib/scriblib/autobib.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scribble-lib/scriblib/autobib.rkt b/scribble-lib/scriblib/autobib.rkt index 8a45614966..a8e727c053 100644 --- a/scribble-lib/scriblib/autobib.rkt +++ b/scribble-lib/scriblib/autobib.rkt @@ -208,7 +208,7 @@ (define (extract-bib-author b) (or (auto-bib-author b) - (org-author-name (auto-bib-title b)))) + (org-author-name (content->string (auto-bib-title b))))) (define (extract-bib-key b) (author-element-names (extract-bib-author b))) From b00ba8bbfdeb5f01e68b9f98939128f05f26cea6 Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau Date: Thu, 5 Feb 2026 17:49:44 -0500 Subject: [PATCH 2/2] autobib: simplify previous fix after feedback from mflatt --- scribble-lib/scriblib/autobib.rkt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scribble-lib/scriblib/autobib.rkt b/scribble-lib/scriblib/autobib.rkt index a8e727c053..c4d393fa68 100644 --- a/scribble-lib/scriblib/autobib.rkt +++ b/scribble-lib/scriblib/autobib.rkt @@ -87,7 +87,7 @@ (define-struct auto-bib (author date title location url note is-book? doi key specific)) (define-struct bib-group (ht)) -(define-struct (author-element element) (names cite)) +(define-struct (author-element element) (names cite)) ;; NB: names should always be a string (define-struct (other-author-element author-element) ()) (define (author-element-names* x) @@ -208,7 +208,7 @@ (define (extract-bib-author b) (or (auto-bib-author b) - (org-author-name (content->string (auto-bib-title b))))) + (org-author-name (auto-bib-title b)))) (define (extract-bib-key b) (author-element-names (extract-bib-author b))) @@ -693,7 +693,7 @@ (make-author-element #f (list org) - org + (content->string org) org)) (define (other-authors) @@ -705,7 +705,7 @@ (define (authors name . names*) (define names (map parse-author (cons name names*))) - (define slash-names (string-join (map (compose1 content->string author-element-names) names) " / ")) + (define slash-names (string-join (map author-element-names names) " / ")) (define cite (case (length names) [(1) (author-element-cite (car names))]