Hi, The attached patch fixes a bug in generating references to subpages (and potentially also other items) in the LaTeX output when PDF_HYPERLINKS is set to NO. I also included a minimal example.
Cheers, Markus
>From ec1dfbd4ab0ad47a21e110d3e4fb1eced3ef6e14 Mon Sep 17 00:00:00 2001 From: Markus Geimer <[email protected]> Date: Wed, 9 Apr 2014 19:07:09 +0200 Subject: [PATCH] Fix broken links to subpages in LaTeX output When subpages are used and PDF_HYPERLINKS is set to NO, the generated LaTeX output contains references to labels starting with an underscore which do not exist. This commit fixes this behavior by writing the underscore only if both file and anchor are non-empty. --- src/latexdocvisitor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index aefcac3..20e45f8 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -1541,8 +1541,10 @@ void LatexDocVisitor::endLink(const QCString &ref,const QCString &file,const QCS { m_t << "{"; filter(theTranslator->trPageAbbreviation()); - m_t << "}{" << file; - if (!anchor.isEmpty()) m_t << "_" << anchor; + m_t << "}{"; + if (!file.isEmpty()) m_t << file; + if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_"; + if (!anchor.isEmpty()) m_t << anchor; m_t << "}"; } } -- 1.7.10.4
example.tgz
Description: application/gtar-compressed
------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________ Doxygen-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/doxygen-develop
