0

Trying to debug (after update to sphinx 1.8.5 from 1.7) documentation biulding produced by sphinx, we see in generated LaTeX files calls to \cite with an argument involving a path to a file, like \cite{../foo/bar:baz}, where baz is the actual citation label.

What should this mean? I have never seen such references in my 25+ years working with LaTeX. Indeed, we have thebibliography in the file ../foo/bar.tex, but is it supposed to work? Or this is a bug in the sphinx LaTeX support?

1 Answers1

2

To latex ., : and / are just normal catcode 12 non letter characters so

\cite{../foo/bar:baz}

is a perfectly good call to \cite with no more significance than

\cite{zzzzzz}

presumably the tex generator is using the filename as some kind of device to generate unique citation keys, but latex doesn't need to know that.

David Carlisle
  • 757,742
  • Just to add that there are some other characters that should not appear in \cite. A comma is used to separate several keys, so that is out. One part of cite is basically a \label-\ref mechanism, which rules out ~, \, # and a few other special symbols. If one uses BibTeX (or biblatex with Biber) the set of valid characters is further reduced by restrictions from the backend. See for example https://tex.stackexchange.com/q/408530/35864, https://tex.stackexchange.com/q/96454/35864, https://tex.stackexchange.com/q/243729/35864 – moewe Jun 27 '19 at 05:34