Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make org-cite AuthorInText styles apply to all cited authors #8510

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JonathanReeve
Copy link

This fixes #8509, which only de-parenthesizes the first author in a list. Thus, a [cite/t:See @Einstein;@Feynman; and @Newton] list will have no parentheses around any of the authors. Previous behavior was to de-parenthesize the first author, but leave the others in parentheses, which seems strange.

Before:

See Einstein, (Feynman, and Newton).

After:

See Einstein, Feynman, and Newton.

I also fixed the test so that it's looking for this new behavior.

I can't really get the nix shell working on this end, or the cabal build to work, so this isn't as well tested as it should be. Was hoping someone with a working build could help test this before merging.

@jgm
Copy link
Owner

jgm commented Dec 30, 2022

We need some more testing of this. Can I help you get the cabal build to work?

cabal clean
cabal update
cabal build

should work, assuming you have a relatively recent cabal (>= 2.4) and ghc.(>= 8.6.5).
If they don't, let me know what fails.

@JonathanReeve
Copy link
Author

I finally figured out how to get this to build, with the shell.nix.

It looks like all the automated tests are passing, and the citationModes are all correctly set as AuthorInText, but for some reason the output is still the same as before. Using a different CSL doesn't seem to affect it.

So maybe there's something else in the Citeproc module that I missed? If anyone could point me to where the parentheses are being computed, that would be helpful.

@jgm
Copy link
Owner

jgm commented Dec 30, 2022

See Text.Pandoc.Citeproc around l. 337 to see how the pandoc citation types are getting converted to the citeproc types.
Then look at citeproc, Citeproc.Eval around l. 254.

This probably isn't too clear, but one basic background fact to keep in mind is that citeproc/CSL doesn't have an author-in-text mode. So all the author-in-text stuff is a pandoc extension. Pandoc has to implement author-in-text by combining author-only and regular citeproc citations. Related: jgm/citeproc#69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants