diff options
Diffstat (limited to 'src/latexdocvisitor.cpp')
-rw-r--r-- | src/latexdocvisitor.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 8c1e757..a780434 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -1021,18 +1021,33 @@ void LatexDocVisitor::filter(const char *str) void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor) { - if (ref.isEmpty() && Config_getBool("PDF_HYPERLINKS")) + if (ref.isEmpty() && Config_getBool("PDF_HYPERLINKS")) // internal PDF link { - m_t << "\\hyperlink{"; - if (!file.isEmpty()) m_t << stripPath(file); - if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_"; - if (!anchor.isEmpty()) m_t << anchor; - m_t << "}{"; + if (ref.isEmpty()) { + m_t << "\\hyperlink{"; + if (!file.isEmpty()) m_t << stripPath(file); + if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_"; + if (!anchor.isEmpty()) m_t << anchor; + m_t << "}{"; + } + else + { + QCString *dest; + m_t << "\\href{"; + if ((dest=Doxygen::tagDestinationDict[ref])) m_t << *dest << "/"; + if (!file.isEmpty()) m_t << file << Doxygen::htmlFileExtension; + if (!anchor.isEmpty()) m_t << "#" << anchor; + m_t << "}{"; + } } - else + else if (ref.isEmpty()) // internal non-PDF link { m_t << "\\doxyref{"; } + else // external link + { + m_t << "{\\bf "; + } } void LatexDocVisitor::endLink(const QString &ref,const QString &file,const QString &anchor) |