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 of bibliography entries #28

Closed
simonbyrne opened this issue Nov 2, 2020 · 6 comments
Closed

Sorting of bibliography entries #28

simonbyrne opened this issue Nov 2, 2020 · 6 comments

Comments

@simonbyrne
Copy link
Collaborator

Can they be sorted by author-year?

c.f. CliMA/ClimateMachine.jl#1687 (comment)

@ali-ramadhan
Copy link
Owner

Don't think would would be super hard to implement. The bibliography is an ordered dict I think so we just have to iterate over the entries of the dict sorted by xnames or something:

for (id, entry) in doc.plugins[CitationBibliography].bib

@fingolfin
Copy link
Contributor

This would be great to have. Currently, our bibliography looks like a random mess: https://oscar-system.github.io/Oscar.jl/dev/references/

@Azzaare
Copy link

Azzaare commented Jun 19, 2021

New tag version on the way for Bibliography.jl that adds sorting option(s) thanks to @LazyScholar

I suppose long term would need a lot of different sorting options, but it is a great start that should help in making the output of DocumenterCitations.jl less messy

@LazyScholar
Copy link
Collaborator

Merged #39 which brings a documentation entry on how to use the sorting for now.
Sorting is still rudimentary so have a look if it is good enough for now or if some adjustments are necessary (if so please direct issues at Bibliography.jl or BibInternal.jl as the sorting mechanics are handled there).
Humans-of-Julia/Bibliography.jl#17

@LazyScholar
Copy link
Collaborator

Sorry i was too fast...
For some reason

return CitationBibliography(bf)
recreates the Dictionary/OrderedDict and the ordering is lost. I have to investigate how to insert it into the Documenter.Plugin structure without loosing the ordering.

@LazyScholar
Copy link
Collaborator

Tested it on my tiny project
It should work 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

5 participants