I have been trying to integrate \cite into our documentation and have
hit a few problems on the way. While trying to patch things, I came
across more issues and would like to know if anybody has clearer idea of
how to fix things.
First of all CiteDict::generatePage() in cite.cpp wont work when an
output directory is specified because the paths to the bib files wont
match up with the paths handed to bib2xhtml.pl
The attached doxygen_bib2xhtml_local.patch fixes this by using the
directory from which doxygen is run for the temporary citelist.doc and
the perl script.
Index: cite.cpp
===================================================================
--- cite.cpp (revision 831)
+++ cite.cpp (working copy)
@@ -118,8 +118,7 @@
// 1. generate file with markers and citations to OUTPUT_DIRECTORY
QFile f;
- QCString outputDir = Config_getString("OUTPUT_DIRECTORY");
- QCString citeListFile = outputDir+"/citelist.doc";
+ QCString citeListFile = "citelist.doc";
f.setName(citeListFile);
if (!f.open(IO_WriteOnly))
{
@@ -141,7 +140,7 @@
f.close();
// 2. generate bib2xhtml
- QCString bib2xhtmlFile = outputDir+"/bib2xhtml.pl";
+ QCString bib2xhtmlFile = "bib2xhtml.pl";
f.setName(bib2xhtmlFile);
QCString bib2xhtml = bib2xhtml_pl;
if (!f.open(IO_WriteOnly))
@@ -152,7 +151,7 @@
f.close();
// 3. generate doxygen.bst
- QCString doxygenBstFile = outputDir+"/doxygen.bst";
+ QCString doxygenBstFile = "doxygen.bst";
QCString bstData = doxygen_bst;
f.setName(doxygenBstFile);
if (!f.open(IO_WriteOnly))
@@ -162,16 +161,19 @@
f.writeBlock(bstData, bstData.length());
f.close();
+ QCString command = bib2xhtmlFile+" "+getListOfBibFiles(" ",FALSE)+" "+ citeListFile;
+ printf("Executed Command %s\n", command.data());
+
// 4. run bib2xhtml perl script on the generated file which will insert the
// bibliography in citelist.doc
portable_system("perl",bib2xhtmlFile+" "+getListOfBibFiles(" ",FALSE)+" "+
- citeListFile);
+ citeListFile);
// 5. read back the file
f.setName(citeListFile);
if (!f.open(IO_ReadOnly))
{
- err("error: could not open file %s/citelist.doc for reading\n",outputDir.data());
+ err("error: could not open file citelist.doc for reading\n");
}
bool insideBib=FALSE;
The next issue that comes up is that citelist pages wont be generated
when a tag file is used. The tagfile usually already specifies a page
<compound kind="page">
<name>citelist</name>
<title>Bibliographic References</title>
<filename>citelist</filename>
</compound>
and this prevents the new citelist from being written. The result are
broken links in the documentation.
Of course just hacking around this should be easy by special casing it
citelist in PageDef or excluding it from the tag file output, but I
don't know if this can lead to problems with anchors along the way or if
there is a use case for this. Is there a better solution to this, e.g. a
more general citing system even across tags (rather unlikely)?
Cheers,
Philipp Moeller
GeometryFactory
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Doxygen-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-develop