readthedocs / readthedocs.org

The source code that powers readthedocs.org
https://readthedocs.org/
MIT License
8.01k stars 3.58k forks source link

Citations compilation according to bibtex file #2601

Closed mattberjon closed 7 years ago

mattberjon commented 7 years ago

Details

Hi,

I'm using Sphinx to compile a thesis and host it on ReadTheDocs. The build works and finishes correctly but the bibliography and all the references/citations are not properly compiled in the document. When I compile it locally, I don't have errors and can see the bibliography.

My project relies on:

Expected Result

Locally, I don't have particular issue but sometimes I need to edit the conf.py to force the compilation to generate the bilbiography and links.

Actual Result

I would like to see the bibliography and the related links pointing to the bilbiography in the ReadTheDocs build.

humitos commented 7 years ago

@mattberjon I just tried downloading your project from github and compiling the documentations and I got a bunch of this errors:

/tmp/auditory-motion-perception/lab.rst:146: SEVERE: Title level inconsistent:

The room
++++++++

and

/tmp/auditory-motion-perception/lab.rst:58: WARNING: citation not found: Guillon2009

Besides, once it finished, the documentation was built but there is no bibliography at all under bibliography.html

mattberjon commented 7 years ago

@humitos thanks a lot for pointing out these errors, I just corrected them. Nevertheless, it doesn't change my issue on hands. If the bibliography doesn't come out on your side, the problem could come from the the bibtex plugin I'm using and not from rtd.

humitos commented 7 years ago

@mattberjon have you ever seen the bibliography when building in your own computer? If no, I will close the issue since it doesn't seem to be related with RTD but with bibtex or some configuration in your end.

mattberjon commented 7 years ago

@humitos as explained, I can see the bibliography locally, but sometimes it doesn't work on the first compilation and end-up with the same issue as you had such as citation not found. When this happen, it seems that by forcing the compilation (by changing the conf.py for example) the compilation is successful and I can see the bibliography.

I have difficulties to know if the issue is on rtd side or on the plugin. If you think the probability is toward the plugin, I would be gladly close this issue and open one on the plugin's repo.

humitos commented 7 years ago

I see. I updated your repo and re-run the make html and I don't see the bibliography, but as you said, changing the conf.py a little and re-running make html made the bibliography appears there.

It seems that the plugin needs to be ran twice for some reason (maybe it creates a file with the link and in the second it uses it, or something like that since at first it fails because doesn't find the citations)

I would say that this is not related to RTD since we can reproduce the same error our own local computers. I would ask for help at the plugin people and link this issue for reference.

Thanks!

mattberjon commented 7 years ago

Thanks for your help guys, I'm going to follow your suggestions.