Skip to content

Conversation

@fare
Copy link
Contributor

@fare fare commented Feb 5, 2026

Convert title using content->string before it may be used as a sortable name by autobib.

Convert title using content->string before it may be used as a sortable name.
@fare fare force-pushed the fix-authorless-books branch from ad9383e to 3a4ec99 Compare February 5, 2026 01:20
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 1 file in this pull request and found no issues.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 1 file in this pull request and found no issues.

@fare
Copy link
Contributor Author

fare commented Feb 5, 2026

@mflatt is this right, or should the content->string be moved to within (one of?) the fields of org-author-name ?

@mflatt
Copy link
Member

mflatt commented Feb 5, 2026

I think you're right that content->string belongs around the third argument to make-author-element in org-author-names. It looks like the names field was meant to be a string, always.

There's a use of content->string composed with author-element-names on line 708. That was added in commit 6a8986f in reaction to (I think) the same underlying issue. It looks like fixing org-author-names would have been the right change then (but that commit has some other useful corrections, too).

@fare
Copy link
Contributor Author

fare commented Feb 5, 2026

I'll move the fix to org-author-name and remove the kluge line 708—though how do I test that? (I'll assume the test that @bennn added is enough.)

Also—should I use define-struct/contract to force names to be a string? What's the contract for cite?

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 1 file in this pull request and found no issues.

@mflatt
Copy link
Member

mflatt commented Feb 6, 2026

Your revised changes look good to me.

Here's an example that works both before and after your changes, but doesn't work if I only adjust authors to drop the compose1. We could add this to the test documents in "scribble-test/tests/scriblib". (I'm happy to do that after merging your change, if you prefer.)

#lang scribble/base
@(begin
   (require scriblib/autobib)
   (define-cite ~cite citet generate-bibliography)
   (define great-pub
     (make-bib
      #:title "The Publication"
      #:author (authors (org-author-name (list (italic "Great") ", Inc."))
                        "Scribble Volunteer")
      #:date 2026)))

@title{Example}

@citet[great-pub]

@generate-bibliography[]

@fare
Copy link
Contributor Author

fare commented Feb 6, 2026

I'm willing to add this change, if you tell me how to test it. Otherwise, LGTM. I think that the test that @bennn added in the commit you mentioned might already test this case, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants