diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2016-10-23 11:15:37 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2016-10-23 11:17:47 (GMT) |
commit | d571efb062fbe17d7257f3971e3db6c9cba833d0 (patch) | |
tree | a1efcf15f2fdcc837bca9ebf303cf14f46bfa53b /src | |
parent | 6300c03b6201ca7981388a6d3c01486f8a8adba0 (diff) | |
download | Doxygen-d571efb062fbe17d7257f3971e3db6c9cba833d0.zip Doxygen-d571efb062fbe17d7257f3971e3db6c9cba833d0.tar.gz Doxygen-d571efb062fbe17d7257f3971e3db6c9cba833d0.tar.bz2 |
Bug 773231 - Underscores in type or member name cause unwanted hyphenation in PDF output Data Fields
Diffstat (limited to 'src')
-rw-r--r-- | src/latexdocvisitor.cpp | 4 | ||||
-rw-r--r-- | src/latexgen.cpp | 17 |
2 files changed, 13 insertions, 8 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 2b590ed..048deb7 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -386,8 +386,8 @@ void LatexDocVisitor::visit(DocAnchor *anc) m_t << "\\label{" << stripPath(anc->file()) << "_" << anc->anchor() << "}%" << endl; if (!anc->file().isEmpty() && Config_getBool(PDF_HYPERLINKS)) { - m_t << "\\hypertarget{" << stripPath(anc->file()) << "_" << anc->anchor() - << "}{}%" << endl; + m_t << "\\Hypertarget{" << stripPath(anc->file()) << "_" << anc->anchor() + << "}%" << endl; } } diff --git a/src/latexgen.cpp b/src/latexgen.cpp index ca60b50..37eacdb 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -203,7 +203,7 @@ void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,co //if (!m_prettyCode) return; if (usePDFLatex && pdfHyperlinks) { - m_t << "\\hypertarget{" << stripPath(lineAnchor) << "}{}"; + m_t << "\\Hypertarget{" << stripPath(lineAnchor) << "}"; } writeCodeLink(ref,fileName,anchor,lineNumber,0); } @@ -1596,17 +1596,18 @@ void LatexGenerator::startDoxyAnchor(const char *fName,const char *, { static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS); static bool usePDFLatex = Config_getBool(USE_PDFLATEX); + t << "\\mbox{"; if (usePDFLatex && pdfHyperlinks) { - t << "\\hypertarget{"; + t << "\\Hypertarget{"; if (fName) t << stripPath(fName); if (anchor) t << "_" << anchor; - t << "}{}"; + t << "}"; } t << "\\label{"; if (fName) t << stripPath(fName); if (anchor) t << "_" << anchor; - t << "} " << endl; + t << "}} " << endl; } void LatexGenerator::endDoxyAnchor(const char *fName,const char *anchor) @@ -1623,11 +1624,11 @@ void LatexGenerator::writeAnchor(const char *fName,const char *name) { if (fName) { - t << "\\hypertarget{" << stripPath(fName) << "_" << stripPath(name) << "}{}" << endl; + t << "\\Hypertarget{" << stripPath(fName) << "_" << stripPath(name) << "}" << endl; } else { - t << "\\hypertarget{" << stripPath(name) << "}{}" << endl; + t << "\\Hypertarget{" << stripPath(name) << "}" << endl; } } } @@ -2216,20 +2217,24 @@ void LatexGenerator::endMemberDocSimple(bool isEnum) void LatexGenerator::startInlineMemberType() { + insideTabbing = TRUE; // to prevent \+ from causing unwanted breaks } void LatexGenerator::endInlineMemberType() { t << "&" << endl; + insideTabbing = FALSE; } void LatexGenerator::startInlineMemberName() { + insideTabbing = TRUE; // to prevent \+ from causing unwanted breaks } void LatexGenerator::endInlineMemberName() { t << "&" << endl; + insideTabbing = FALSE; } void LatexGenerator::startInlineMemberDoc() |