summaryrefslogtreecommitdiffstats
path: root/src/latexgen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-06-24 21:52:06 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-07-02 11:52:40 (GMT)
commitdbd559269be1a10cf67ba9e7e92c99fe3c35a217 (patch)
tree1a0b8fcbe9b3820eea5204547f060765397f56be /src/latexgen.cpp
parent4f520b36a54c8ef645dd346d0959b07ffe6deecb (diff)
downloadDoxygen-dbd559269be1a10cf67ba9e7e92c99fe3c35a217.zip
Doxygen-dbd559269be1a10cf67ba9e7e92c99fe3c35a217.tar.gz
Doxygen-dbd559269be1a10cf67ba9e7e92c99fe3c35a217.tar.bz2
Added SOURCE_TOOLTIPS option for advanced tooltip support while source browsing
Diffstat (limited to 'src/latexgen.cpp')
-rw-r--r--src/latexgen.cpp24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 1434dca..7ab75c7 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -2053,6 +2053,8 @@ void LatexGenerator::endCodeFragment()
void LatexGenerator::writeLineNumber(const char *ref,const char *fileName,const char *anchor,int l)
{
+ static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
if (m_prettyCode)
{
QCString lineNumber;
@@ -2063,9 +2065,12 @@ void LatexGenerator::writeLineNumber(const char *ref,const char *fileName,const
QCString lineAnchor;
lineAnchor.sprintf("_l%05d",l);
lineAnchor.prepend(sourceFileName);
- startCodeAnchor(lineAnchor);
+ //if (!m_prettyCode) return;
+ if (usePDFLatex && pdfHyperlinks)
+ {
+ t << "\\hypertarget{" << stripPath(lineAnchor) << "}{}";
+ }
writeCodeLink(ref,fileName,anchor,lineNumber,0);
- endCodeAnchor();
}
else
{
@@ -2101,21 +2106,6 @@ void LatexGenerator::endFontClass()
t << "}";
}
-void LatexGenerator::startCodeAnchor(const char *name)
-{
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
- //if (!m_prettyCode) return;
- if (usePDFLatex && pdfHyperlinks)
- {
- t << "\\hypertarget{" << stripPath(name) << "}{}";
- }
-}
-
-void LatexGenerator::endCodeAnchor()
-{
-}
-
void LatexGenerator::startInlineHeader()
{
if (Config_getBool("COMPACT_LATEX"))