ali-ramadhan / DocumenterCitations.jl

DocumenterCitations.jl uses Bibliography.jl to add support for BibTeX citations and references in documentation pages generated by Documenter.jl.
https://ali-ramadhan.github.io/DocumenterCitations.jl/dev
MIT License
65 stars 10 forks source link

Edition missing #60

Open ulthiel opened 2 years ago

ulthiel commented 2 years ago

The edition field of a Bibtex entry seems to be missing from the generated references. Could this be added?

Here's an example:

@book{Knuth-4A,
    author = {Knuth, D. E.},
    edition = {Sixteenth printing, April 2021},
    pages = {xv+883},
    publisher = {Addison-Wesley, Upper Saddle River, NJ},
    title = {The art of computer programming. {V}ol. 4{A}. {C}ombinatorial algorithms. {P}art 1},
    year = {2011}}
fingolfin commented 2 years ago

The bib text is generated in this function: https://github.com/ali-ramadhan/DocumenterCitations.jl/blob/5ef4fbf4b71cc04941ad5258adea666c046b73da/src/bibliography.jl#L57-L79

So I guess modifying this to insert the edition (if it is defined) should be possible, as long as one can access the edition value. For e.g. the title, this is done by the helper functions like xtitle which are defined in Bibliography.jl, like here: https://github.com/Humans-of-Julia/Bibliography.jl/blob/9d7386b5ad075a5f43eadff691c47961b38d566d/src/staticweb.jl#L23-L25. So that together could be used to resolve the issue.

Of course on the long run a more general and flexible solution as in issue #22 would be nicer...

goerz commented 1 year ago

Can you check whether this is still a problem in DocumenterCitations.jl v1.0? If so, please open a new issue at https://github.com/JuliaDocs/DocumenterCitations.jl/issues