Skip to content

Proposal to add support for BibTeX citations and references #1162

@ali-ramadhan

Description

@ali-ramadhan

Hi Documenter devs,

A few of us would love to see support for in-text citations and reference generation in Documenter through BiBTeX (see CliMA/ClimateMachine.jl#152 and CliMA/Oceananigans.jl#474).

I guess I envision being able to pass a BibTeX file to Documenter and automatically be able to cite references in the text with something like [<label>](@ref) (which would pull the info from the BibTeX file), and also generate a bibliography from the BibTex file through something like

```@bibliography
```

I'm wondering if this is something that could be worked on by someone unfamiliar with Documenter. Thought it might be good to open an issue first to see if it's possible and if I'm missing anything. Not sure of the best approach but here's what I've gathered so far.

It looks like there was an attempt back in 2017 by @lucianolorenti to add a bibtex option to makedocs that allowed citations with [<label>](@ref): #379 (comment)

But it had to use the Python package pybtex to parse bibtex files. But since then there's been a native Julia parser: https://github.com/JuliaTeX/BibTeX.jl

So maybe if we can get that bibtex option to work with BibTeX.jl then we can pretty easily have citations in Documenter?

But then I came across a recent issue (#1018) where @mortenpi suggested that proper bibliography support should be done via a plugin like Citations.jl, although it was mentioned on Slack that it's an unmaintained package that would need some work to bring it up to speed with the current version of Documenter and it would have to be registered.

It seems like the best approach would be to polish off Citations.jl to work with Documenter v0.24 and register it? Would #745 have to be resolved first?

cc @glwagner @charleskawczynski @simonbyrne who might be interested as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: PluginA feature that should be implemented as a separate package.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions