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

Why processCitationCluster silently exclude citation passed through citationPre or citationPost #227

Open
ga676005 opened this issue May 8, 2023 · 1 comment

Comments

@ga676005
Copy link

ga676005 commented May 8, 2023

I ran into a problem that processCitationCluster doesn't out as expected. I made an issue on citation-js citation-js/citation-js#196 and made a reproduction here https://github.com/ga676005/citation.js_csl-output-bug-reproduction. Now I think the issue would be more appropriate to deal on the citeproc-js side that's why I'm creating this issue.

So the problem I run into is that processCitationCluster(data,pre,post) can process the data even it doesn't have author field. But if the data only has one item that has no author. Later on when we call processCitationCluster(anotherData, dataInPre, post) for example. The output won't include the citation that created with data that passed through dataInPre. There is also no error in citation_errors returned from processCitationCluster in this situation. I found two case that won't have this issue. First is to manually inject [{ "given": "unknown", "family": "unknown" }] to the author field. Second is data has other item that has non-empty author field.

I had tried to use debugger to dig into the issue but I have no luck. I don't have much CSL or citation style knowledge so I am not sure whether a item has no author is "citatable" or not. Could you kindly give me advice what should I do?

@ga676005
Copy link
Author

I also found that with APA style if we have two entries and their first author are exactly the same, or the first author doesn't have both 'given' and 'family' properties. it would result in same error. My solution to this is add pattern plus random string to the author names to the input and remove them from the output. This is not a desirable solution but it is the closest one I can get.

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

No branches or pull requests

1 participant