After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 702584 - \cite rejects valid BibTeX keys
\cite rejects valid BibTeX keys
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.4-GIT
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2013-06-18 16:52 UTC by Alexandre Duret-Lutz
Modified: 2014-08-21 17:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
MWE (72.96 KB, application/gzip)
2013-06-18 20:02 UTC, Alexandre Duret-Lutz
Details

Description Alexandre Duret-Lutz 2013-06-18 16:52:29 UTC
I'm using a 10-day old version compiled from git (8cd4425a523965a5541d46a84828fb7e16f98bae).


My lab maintain several large BibTeX files in which each entry key has the form

   name.year.conference

For instance

@InProceedings{	  vardi.86.lics,
  author	= {Moshe Y. Vardi},
  title		= {An Automata-Theoretic Approach to Automatic Program
		  Verification},
  booktitle	= {Proceedings of the 1st IEEE Symposium on Logic in Computer
		  Science (LICS'86)},
  pages		= {332--344},
  year		= {1986},
  publisher	= {IEEE Computer Society Press}
}

Unfortunately, when I use 

/// \brief First test
///
/// bar
/// \cite{vardi.86.lics}
/// baz
int test1(int f);

and run the Doxygen with default options (expect for the obvious CITE_BIB_FILES = myfile)

I get

[...]
/home/adl/doxygen-bug/test.hh:5: warning: Invalid or missing cite label
[...]
/home/adl/doxygen-bug/test.hh:5: warning: unable to resolve reference to `vardi' for \cite command
[...]

and the generated HTML documentation for test1()


<div class="memdoc">
<p>First test. </p>
<p>bar <b>[vardi]</b>.86.lics} baz </p>
</div>

So apparently Doxygen considers only the first component of the citation key, but this contradicts its documentation that states that "The <label> must be a valid BibTeX label".

I can't point to a definition of what characters are allowed as keys in a BibTeX entry.  I've seen : and - used as separators as well.


Unfortunately, renaming these BibTeX entries to match what Doxygen expect is not a satisfying option for me, because the BibTeX files are used in too many places.  Being able to refer to these from Doxygen would have been a bonus.

I nonetheless tried to play with this little example, and had other surprises:

@InProceedings{	  vardi,
  author	= {Moshe Y. Vardi},
  title		= {An Automata-Theoretic Approach to Automatic Program
		  Verification},
  booktitle	= {Proceedings of the 1st IEEE Symposium on Logic in Computer
		  Science (LICS'86)},
  pages		= {332--344},
  year		= {1986},
  publisher	= {IEEE Computer Society Press}
}

/// \brief First test
///
/// bar
/// \cite{vardi}
/// baz
int test1(int f);

Gives the very same diagnostics (!) and produces:

<div class="memdoc">
<p>First test. </p>
<p>bar <b>[vardi]</b>} baz </p>
</div>First test q barq vardi baz.



hinting that probably the use of braces is unwelcome (I believe people using BibTeX are used to call \cite with braces, so it would be very nice to support it).


My next try without braces was more successful, but not entirely.

/// \brief First test
///
/// bar
/// \cite vardi
/// baz.


int test1(int f);

This replaced all the warnings by

citelist:3: warning: expected <dt> tag but found <dl> instead!
citelist:4: warning: unexpected end of comment while looking for a html description title

and successfully output a link to the bibliography in the description of test1().  Unfortunately the bibliography page is empty :-(


I have found no file named citelist, so I find these warnings very unhelpful.
Comment 1 Dimitri van Heesch 2013-06-18 19:36:10 UTC
The \cite command does not support { .. } and no dots in the label at the moment.
With those limitation in mind you last example should work however.

Can you attach a minimal self-contained example (source + config file in a tar or zip) so I can reproduce the problem?
Comment 2 Alexandre Duret-Lutz 2013-06-18 20:02:47 UTC
Created attachment 247207 [details]
MWE

Here is a MWE containing Doxyfile, test.hh and my.bib for the last scenario.  I've also included logs (separate for stdout and stderr) and the html output where the citelist.html page show no reference.   (The generated LaTeX document is OK.)
Comment 3 albert 2013-08-18 10:11:57 UTC
Example has been provided.
With version 1.8.4 (and git version) the related page "Bibliographic References" is still empty.
During processing with 1.8.4 a file citelist.doc is generated, though the error message states citelist. In this, automatically generated, citelist.doc the code:
<!-- BEGIN CITATIONS -->
<!--
\citation{vardi}
-->
<!-- END CITATIONS -->
<!-- BEGIN BIBLIOGRAPHY -->
<dl class="citelist">

</dl>

<!-- END BIBLIOGRAPHY -->

exists.
NOTE: in version 1.8.4-git the file citelist.doc does not exist anymore
Comment 4 albert 2014-06-19 17:42:21 UTC
For the problem regarding the problem as shown in the attached MWE file I've pushed a proposed solution to github (pull request 186)
Comment 5 albert 2014-07-06 15:55:55 UTC
I've just pushed a proposed patch for the original problem of this bug report (pull request 196)

Added possibility for . (dot) and + (bit analogous to file names. A . (dot) cannot be the last character)
Comment 6 albert 2014-07-14 17:16:17 UTC
Fix has been include July 13 2014 into master branch of git.
Comment 7 Dimitri van Heesch 2014-08-21 17:15:28 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.8. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information 
that you think can be relevant (preferrably in the form of a self-contained example).