[Doxygen-develop] Bug list link bug
Brought to you by:
dimitri
From: Simon G. <sim...@at...> - 2002-06-05 17:31:48
|
Hi Doxygenators, Here`s another quirk in pdflatex output from Doxygen, which I have homed in on but not yet found a way to fix within Doxygen, though I can. resolve it by delving into the .tex files before I make pdf. Problem: Hyperlinks to the Bug page in PDF output from Doxygen 1.2.15 and 1.2.16 do not work. After PDF generation they are linked to the front page with a warning from pdflatex. Explanation: Links to the bug list are of the form \item[\hyperlink{bug__bug000001}{Bug: }]\par And yet the target of these (in bug.tex) is of the form: \hypertarget{classc_timer__bug000001}{} A target within the main file (classc_timer.tex) would be (and indeed is) of this form: \hypertarget{classc_timer_c_timera3} to match up with this reference: \hyperlink{classc_timer_c_timera3} But the target of the bug hyperlink is not found, unless it is of the form: \hypertarget{bug__bug000001}{} The problem seems to be that the bug list target uses the same prefix as the class file, or that the reference in the class file uses the bug prefix (the {name} before the {text} in hyperref parlance) when the bug list hypertarget does not. The error message in refman.log is of this form: pdfTeX warning (dest): name{bug__bug000001} has been referenced but does not exist, replaced by a fixed one Fixes: There appear to be two possible fixes. Either we change the link or the target, to match ;-). Since bug_ is an unique name and the bug list contains items potentially from several pages, it makes more sense to change the target, in the code that generates hypertarget names for bug.tex. But if we wanted per-class bug lists the alternative of changing the link is viable, with something like: \hyperlink{classc_timer__bug000001} That would appear to need more changes so I have opted for the bug_ prefix and a single bug page. To test this I edited bug.tex to replace classc_timer_ with bug_ and remade the PDF without re-running Doxygen: cd latex touch *.tex make pdf Such corrected links worked! The source that generates the incorrect links is part of latexgen.cpp: LatexGenerator::writeAnchor(const char *fName,const char *name) where fName is the bit before the __ and name is the bit after it. It appears that fName is incorrect in calls to this method that generate the bug list. I have not managed to identify the code that is driving this, after looking through the source=20 for a couple of hours, so I welcome comments =66rom anyone more familiar with the program flow. Incidentally, I have produced project files that allow Doxygen to be built within the Micro$oft Visual C++ IDE, with help from Janet Swisher at Motorola. These have been posted to the Doxygen users list as the wish for them was raised there, initially by Michiel Ouwehand and later by Janet and me. Cheers Simon Goodwin Technology Programmer Attention To Detail Ltd --=20 Simon Goodwin <sim...@at...> This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged and/or confidential. If the reader of this message is not the intended recipient please notify us immediately and delete this e-mail from your system. E-mail transmissions cannot be guaranteed to be secure or error free and may contain viruses. We therefore do not accept liability for any loss occasioned by any such errors, omissions or viruses in the contents of this message.=20 |