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

Sorting the citations #45

Closed
hvoss49 opened this issue Oct 3, 2023 · 8 comments
Closed

Sorting the citations #45

hvoss49 opened this issue Oct 3, 2023 · 8 comments

Comments

@hvoss49
Copy link

hvoss49 commented Oct 3, 2023

Describe the bug
With two citations of the same year by the same author we get for example <author>1988a, 1988b
when using biblatex and an authoryear style. With citation-style-language we get it the other way round
(see screenshot)

Additional information

  • TeX distribution: [TeX Live 2023, MacTeX 2023]
  • Package citation-style-language version: [e.g. v0.4.4, main branch]
  • LaTeX engine: [e.g. lualatex]

To Reproduce

\documentclass[]{article}
\usepackage{citation-style-language} 
\cslsetup{style=turabian-author-date} 
%\usepackage[style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}

\cite{nietzsche:ksa,nietzsche:ksa1} 
\printbibliography

\end{document}

Screenshots

Bildschirmfoto 2023-10-03 um 21 40 21
@zepinglee
Copy link
Owner

zepinglee commented Oct 5, 2023

The turabian-author-date.csl doesn't have a <sort> element in <citation> and thus the cites appear in the order that they are cited.

https://github.com/citation-style-language/styles/blob/cb7b29955429a5a62bfdf82f5d16932ee41f7314/turabian-author-date.csl#L605-L606

I don't have access to the Turabian style but the Chicago Manual of Style 17th ed. says (in § 15.30):

Two or more references in a single parenthetical citation are separated by semicolons. The order in which they are given may depend on what is being cited, and in what order, or it may reflect the relative importance of the items cited. If neither criterion applies, alphabetical or chronological order may be appropriate. Unless the order is prescribed by a particular journal style, the decision is the author’s.

(Armstrong and Malacinski 1989; Beigl 1989; Pickett and White 1985)

@hvoss49
Copy link
Author

hvoss49 commented Oct 5, 2023

Ah, I See. The style elsevier-harvard.csl does it. But I am not familiar with XML so I can't use the code snippet for turabian.

@hvoss49 hvoss49 closed this as completed Oct 5, 2023
@zepinglee
Copy link
Owner

Ah, I See. The style elsevier-harvard.csl does it. But I am not familiar with XML so I can't use the code snippet for turabian.

This is my edit: zepinglee/csl-styles@bdbed1b.

@hvoss49
Copy link
Author

hvoss49 commented Oct 7, 2023

I am sorry, I can't get right. It is still "(Nietzsche 1988b, 1988a). Here are my files: https://hvoss.org/turabian.zip

@zepinglee
Copy link
Owner

zepinglee commented Oct 7, 2023

I am sorry, I can't get right. It is still "(Nietzsche 1988b, 1988a). Here are my files: https://hvoss.org/turabian.zip

Ah, my mistake. It turns out this is not easy to implement in CSL. I'll discuss with the CSL folks.

@zepinglee
Copy link
Owner

@zepinglee
Copy link
Owner

Thanks to Sebastian Karcher's suggestion of adding citation sort <key>s identical to the ones in <bibliography>. Now the style works as expected (https://gist.github.com/zepinglee/8a8355e465e4424cf7bd4a105da919a6).

Screenshot 2023-10-10 at 22 14 57

@hvoss49
Copy link
Author

hvoss49 commented Oct 11, 2023

thanks, it is fine now!

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

2 participants