-
Notifications
You must be signed in to change notification settings - Fork 791
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
Rewrite references using BibTeX and sphinxcontrib-bibtex #1041
Conversation
One gotcha that I've discovered with sphinxcontrib-bibtex, and could be a bug, is that it will show a WARNING for the alphabetically first citation, i.e.:
My workaround is to "update" the reference file, then re-build:
then everything is fine. I'm not sure if a similar thing would be required in |
This is awesome, Mike. I like that the references are stored in bibtex format. Good job on collecting the missing info like DOIs.
It works and it is nice that the references are consistent. I don't particularly like this style for citations since you don't really get a feel for who and what is cited when just reading the text. My preference is Harvard style citations which I also believe is the standard for most texts within the physical sciences. I wonder if it is possible to configure sphinxcontrib-bibtex to use Harvard citations? |
Yes, I'd prefer Harvard or something more classic too. However, after the looking at the default style for a while, it's not the worst citation style I've encountered. Unfortunately, It's not as easy as LaTeX is to change the citation style (either in text, or the References section). It is "documented" here and here, but not very cleanly. It may take me a bit of time to unravel the necessary Python smoke for |
Yeah, I had a look as well and i reckon it will take a bit of reading in the source code to figure out how to do this. I'll just merge this PR for now and changing the citation style can be changed later. |
The rest of Pybtex is reasonably documented, and has a simple command-line interface that does the stuff we are interested in modifying, e.g.:
I've also quickly gone over the Pybtex source code, which looks like an active project in reasonable shape. I'll first see if I can get the key name as the text citation label, as it was before. |
Does the docker container that builds the docs need to be updated with bibtex support? |
Yes, something like |
I thinj it's fine like you did it here. It may be slightly faster do add to the docker container but less transparent. Here it is easy to see what is going on and how you set up the system. |
Docker container rebuilt and pushed. |
Does that mean we don't have to |
Yes I hope so.
… On Jun 22, 2018, at 3:06 PM, Kristian Evers ***@***.***> wrote:
Does that mean we don't have to pip install sphinxcontrib-bibtex on travis?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I've replaced the documentation's references using sphinxcontrib-bibtex, which is somewhat straightforward to use, and may hopefully allow easier and consistent references to be added to the documentation. Contributors will need to install this onto their Python distribution with:
I've set-up the initial
references.bib
file with JabRef, which is not required, but is a recommended cross-platform GUI to add/edit bibliographic entries in BibTeX format. Also, entries use UTF-8, mostly for international names. This seems to work correctly for both html and pdf outputs.There were a few corrections/modifications to both the cited text and the entries themselves. I've removed website references, as they just need an inline link. And I've hunted down each citation to fix numbers, DOIs and other details.
At present, sphinxcontrib-bibtex changes the cited text to some other default style, e.g.
[Bessel1825]
becomes[Bes25]
in the output. I think this is customisable, with a bit of work inconf.py
. Also, each reference also looks different (is it Vancouver style?). Also probably customisable inconf.py
. I can take a look, if anyone thinks this would be good to do. But the main benefit is that the reference style is consistent.