summaryrefslogtreecommitdiffstats
path: root/src/latexgen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-02-03 20:07:39 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-02-03 20:07:39 (GMT)
commitae7007a45fbf1957fa265ae667a7c20a72298468 (patch)
tree0025125994627e74d4f11d5a3e0499a84928476c /src/latexgen.cpp
parentbe7a6bf70f440124bc205e02f456e2178696e207 (diff)
parentdd2c137847e16d0a7c6086053f55bce501d84a0c (diff)
downloadDoxygen-ae7007a45fbf1957fa265ae667a7c20a72298468.zip
Doxygen-ae7007a45fbf1957fa265ae667a7c20a72298468.tar.gz
Doxygen-ae7007a45fbf1957fa265ae667a7c20a72298468.tar.bz2
Merge pull request #95 from albert-github/feature/bug_latex_index_1
Enabling possibility to have { and } in (latex) index items
Diffstat (limited to 'src/latexgen.cpp')
-rw-r--r--src/latexgen.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 8b8c835..04750f5 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -1375,8 +1375,10 @@ void LatexGenerator::startMemberDoc(const char *clname,
t << "}";
if (clname)
{
- t << "!" << clname << "@{";
- docify(clname);
+ t << "!";
+ escapeLabelName(clname);
+ t << "@{";
+ escapeMakeIndexChars(clname);
t << "}";
}
t << "}" << endl;
@@ -2013,13 +2015,18 @@ void LatexGenerator::escapeLabelName(const char *s)
{
switch (c)
{
+ case '|': t << "\\texttt{\"|}"; break;
+ case '!': t << "\"!"; break;
case '%': t << "\\%"; break;
+ case '{': t << "\\lcurly{}"; break;
+ case '}': t << "\\rcurly{}"; break;
+ case '~': t << "````~"; break; // to get it a bit better in index together with other special characters
// NOTE: adding a case here, means adding it to while below as well!
default:
i=0;
// collect as long string as possible, before handing it to docify
result[i++]=c;
- while ((c=*p) && c!='%')
+ while ((c=*p) && c!='|' && c!='!' && c!='%' && c!='{' && c!='}' && c!='~')
{
result[i++]=c;
p++;
@@ -2042,16 +2049,20 @@ void LatexGenerator::escapeMakeIndexChars(const char *s)
{
switch (c)
{
+ case '!': t << "\"!"; break;
case '"': t << "\"\""; break;
case '@': t << "\"@"; break;
+ case '|': t << "\\texttt{\"|}"; break;
case '[': t << "["; break;
case ']': t << "]"; break;
+ case '{': t << "\\lcurly{}"; break;
+ case '}': t << "\\rcurly{}"; break;
// NOTE: adding a case here, means adding it to while below as well!
default:
i=0;
// collect as long string as possible, before handing it to docify
result[i++]=c;
- while ((c=*p) && c!='"' && c!='@' && c!='[' && c!=']')
+ while ((c=*p) && c!='"' && c!='@' && c!='[' && c!=']' && c!='!' && c!='{' && c!='}' && c!='|')
{
result[i++]=c;
p++;