1

I have a .rst document containing the following lines...

This example goes over the  analysis found the author's paper [Hughes2017]_.

.. [Hughes2017] Hughes, M., Olsen, J., *On the potential of organic Rankine cycles for recovering waste heat from the exhaust gases of a piston aero-engine*, Asia-Pacific International Symposium on Aerospace Technology, Seoul, Korea, 2017.

When I use Sphinx to produce a .html file from this .rst file, the reference comes out as [Hughes20170] (both in text and in the reference list). Could anybody explain why this is?

mzjn
  • 48,958
  • 13
  • 128
  • 248
momargoh
  • 66
  • 4
  • Cannot reproduce. Python 3.6 / Sphinx 1.5.6. I obtain the right `[Hughes2017]`. Any unusual extensions in the `conf.py` file? Have you cleaned the build? `make clean && make html` – Pierre de Buyl Jan 23 '18 at 09:36
  • I have run `make clean && make html` but I still get the same problem. I haven't edited my conf.py file beyond adding 'numpydoc' to extensions. My MAKEFILE has SPHINXBUILD = sphinx3-build, which otherwise seems to be working fine, as recommended in this post https://stackoverflow.com/a/24675806/8917310 – momargoh Jan 24 '18 at 04:06
  • When executing `make html`, is sphinx mentioning errors and/or warnings? – Pierre de Buyl Jan 24 '18 at 08:18
  • it comes up with lots of warnings about non existing documents which I believe is due to me using autosummary, because it then creates these documents and the html files are created fine. That's the only warning it shows though. – momargoh Jan 29 '18 at 07:32
  • can you give the version of sphinx? – Pierre de Buyl Jan 29 '18 at 08:30
  • Sphinx v1.6.6. I have since uninstalled python-sphinx and the custom sphinx3-build file and am using python3-sphinx which builds great but with this same problem. – momargoh Jan 31 '18 at 02:40

1 Answers1

0

I found the answer! My question was a little misleading because actually the text above was in the docstring of a module. I was then using automodule in an rst file in my /doc folder to call the docstring of that module and it was appending the 0 to the citation. If I remove the References heading from the docstring and place it instead in the actual rst file it stops appending the 0.

momargoh
  • 66
  • 4
  • this could be an `autodoc` bug, could you [open a ticket](https://github.com/sphinx-doc/sphinx/issues) ? –  Mar 24 '18 at 15:14
  • Issue has been opened. https://github.com/sphinx-doc/sphinx/issues/4782 – momargoh Mar 26 '18 at 02:21