summaryrefslogtreecommitdiffstats
path: root/src/latexdocvisitor.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-08-24 08:56:38 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-08-24 08:56:38 (GMT)
commit1f849a16671e1c9afff4ee30a5b5a33d271e8684 (patch)
tree61a428413af2b6b0d89b3467d83365427f427b31 /src/latexdocvisitor.cpp
parent94a52469b177703d3e0d94bed6c4a48bddba18cb (diff)
downloadDoxygen-1f849a16671e1c9afff4ee30a5b5a33d271e8684.zip
Doxygen-1f849a16671e1c9afff4ee30a5b5a33d271e8684.tar.gz
Doxygen-1f849a16671e1c9afff4ee30a5b5a33d271e8684.tar.bz2
Issue_6456 Using # in links causes errors in PDF generation
- The # sign in an URL needs to be escaped as longtabu reads the table body as the argument to a command, so the self-escaping mechanism of \href cannot work (from https://tex.stackexchange.com/questions/447461/having-a-hash-sign-in-href-in-a-longtabu-cell) - a regression regarding the change from `\tt` to `\texttt` (needed `{ ... }` as `\href` has 2 arguments )
Diffstat (limited to 'src/latexdocvisitor.cpp')
-rw-r--r--src/latexdocvisitor.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index d2c4c5d..76e3a55 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -215,13 +215,14 @@ void LatexDocVisitor::visit(DocURL *u)
if (m_hide) return;
if (Config_getBool(PDF_HYPERLINKS))
{
+ m_t << endl << "%% AME " << u->url() <<endl;
m_t << "\\href{";
if (u->isEmail()) m_t << "mailto:";
- m_t << u->url() << "}";
+ m_t << latexFilterURL(u->url()) << "}";
}
- m_t << "\\texttt{ ";
+ m_t << "{\\texttt{ ";
filter(u->url());
- m_t << "}";
+ m_t << "}}";
}
void LatexDocVisitor::visit(DocLineBreak *)
@@ -1245,17 +1246,18 @@ void LatexDocVisitor::visitPre(DocHRef *href)
if (m_hide) return;
if (Config_getBool(PDF_HYPERLINKS))
{
+ m_t << endl << "%% AME " << href->url() <<endl;
m_t << "\\href{";
- m_t << href->url();
+ m_t << latexFilterURL(href->url());
m_t << "}";
}
- m_t << "\\texttt{ ";
+ m_t << "{\\texttt{ ";
}
void LatexDocVisitor::visitPost(DocHRef *)
{
if (m_hide) return;
- m_t << "}";
+ m_t << "}}";
}
void LatexDocVisitor::visitPre(DocHtmlHeader *header)