summaryrefslogtreecommitdiffstats
path: root/src/latexdocvisitor.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2016-09-02 14:34:43 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2016-09-03 09:43:07 (GMT)
commit558958dca5e5cb50bd33f3344cab151aba9ce076 (patch)
treefc9995ba8e53c8d525a92886f2eee11bff8057e1 /src/latexdocvisitor.cpp
parent0bdf976df43dfc1eea03fd3e31d949d05422b2ca (diff)
downloadDoxygen-558958dca5e5cb50bd33f3344cab151aba9ce076.zip
Doxygen-558958dca5e5cb50bd33f3344cab151aba9ce076.tar.gz
Doxygen-558958dca5e5cb50bd33f3344cab151aba9ce076.tar.bz2
Sorting in latex index and missing \@ in index
When looking at the index of the doxygen (pdf) manual we see that __init__ is on a bit strnge place (between "\" items) and that the item "\@" is missing. Made handling of the index consistent by using latex... routines and adjusting the label routine in respect to the @.
Diffstat (limited to 'src/latexdocvisitor.cpp')
-rw-r--r--src/latexdocvisitor.cpp30
1 files changed, 4 insertions, 26 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 467800c..2b590ed 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -34,30 +34,6 @@
#include "htmlentity.h"
#include "plantuml.h"
-static QCString escapeLabelName(const char *s)
-{
- QCString result;
- const char *p=s;
- char c;
- if (p)
- {
- while ((c=*p++))
- {
- switch (c)
- {
- case '%': result+="\\%"; break;
- case '|': result+="\\texttt{\"|}"; break;
- case '!': result+="\"!"; break;
- case '{': result+="\\lcurly{}"; break;
- case '}': result+="\\rcurly{}"; break;
- case '~': result+="````~"; break; // to get it a bit better in index together with other special characters
- default: result+=c;
- }
- }
- }
- return result;
-}
-
const int maxLevels=5;
static const char *secLabels[maxLevels] =
{ "section","subsection","subsubsection","paragraph","subparagraph" };
@@ -556,8 +532,10 @@ void LatexDocVisitor::visit(DocFormula *f)
void LatexDocVisitor::visit(DocIndexEntry *i)
{
if (m_hide) return;
- m_t << "\\index{" << escapeLabelName(i->entry()) << "@{";
- escapeMakeIndexChars(i->entry());
+ m_t << "\\index{";
+ m_t << latexEscapeLabelName(i->entry(),false);
+ m_t << "@{";
+ m_t << latexEscapeIndexChars(i->entry(),false);
m_t << "}}";
}