GNOME Bugzilla – Bug 338205
@ref commands with CREATE_SUBDIRS might not work properly with Latex output
Last modified: 2013-05-19 12:35:56 UTC
Please describe the problem: If the CREATE_SUBDIRS is activated and some @ref commands are pointing to some @anchor, the PDF output doesnn't generate the properly path to the file where the @anchor is. Steps to reproduce: Activate the CREATE_SUBDIRS and PDF_HYPERLINKS. use two files: - autoconf.dox /** * * @defgroup autoconf Autoconfiguration * * All of the set callback functions must follow the format below: * @anchor setcallback * @include setcallback.c * * All of the get callback functions must follow the format below: * * @anchor getcallback * @include getcallback.c **/ - examples.dox /** * * @page examples_autoconf Autoconfiguration examples * * @ref setcallback "Set callback example" * * @ref getcallback "Get callback example" * **/ Then generate the PDF. The page that contains the @ref has some hyperlinks which should point to the autoconf module but they don't (the links are just broken) Actual results: The links are broken Expected results: - Does this happen every time? yes Other information: The problem seems to be in the LatexDocVisitor::startLink function of the latexdocvisitor.cpp file. The call to "stripPath(file)" when constructing the link leaves only the .tex filename but not the path to the file and therefore, the link is broken. I've took out the stripPath function and left only the file string. Now, everything seems to work but I'm not really sure if I broke something.
Created attachment 153404 [details] Minimal doxygen setup which demonstrates error.
Comment on attachment 153404 [details] Minimal doxygen setup which demonstrates error. I have a very similar problem with HTML output. Use the attached The zip file contains doxygen config and one source file. Run doxygen. Click the "dummy" link on the main page - the link doesn't work.
(In reply to comment #2) > (From update of attachment 153404 [details]) > I have a very similar problem with HTML output. Use the attached The zip file > contains doxygen config and one source file. Run doxygen. Click the "dummy" > link on the main page - the link doesn't work. This is more related to bugs #607432 and #608002 which should already be fixed in the latest subversion update.
Did some test and the problem of Eva looks like to be solved. The original problem of Mario is in version 1.8.3.1 still present. Some digging led to the conclusion that with the \hypertarget / \label the reference was given including the directory names and with the \hyperlinks the reference was given without the directory names: - d8/d10/group__autoconf.tex \section{Autoconfiguration} \label{d8/d10/group__autoconf}\index{Autoconfiguration@{Autoconfiguration}} All of the set callback functions must follow the format below\-: \label{d8/d10/group__autoconf_setcallback}% \hypertarget{d8/d10/group__autoconf_setcallback}{}% include setcallback.\-c All of the get callback functions must follow the format below\-: \label{d8/d10/group__autoconf_getcallback}% \hypertarget{d8/d10/group__autoconf_getcallback}{}% include getcallback.\-c - dd/d49/examples_autoconf.tex \hyperlink{group__autoconf_setcallback}{Set callback example} \hyperlink{group__autoconf_getcallback}{Get callback example} Both files are correctly loaded by means of the \input in the refman.tex I think that that either the directory names have to be added or removed everywhere (as long as the names are unique). Looking in latexgen.cpp and latexdocvisitor.cpp at some places the path is tripped and on other places it is not, hard to tell for me where the path has to be stripped and where not.
Confirmed. Should be fixed in the next subversion update.
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.8.4. 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.