summaryrefslogtreecommitdiffstats
path: root/src/latexgen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2000-05-08 20:42:05 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2000-05-08 20:42:05 (GMT)
commit367c98ad291fd02781ae1c20a6e09e0b07dbec88 (patch)
tree28a24e8c88d32a50bc5bef6d49306553267dc5ab /src/latexgen.cpp
parent59bbbf5099f9bcf96d3585e4fc0669e091d3b9e7 (diff)
downloadDoxygen-367c98ad291fd02781ae1c20a6e09e0b07dbec88.zip
Doxygen-367c98ad291fd02781ae1c20a6e09e0b07dbec88.tar.gz
Doxygen-367c98ad291fd02781ae1c20a6e09e0b07dbec88.tar.bz2
Release-1.1.3
Diffstat (limited to 'src/latexgen.cpp')
-rw-r--r--src/latexgen.cpp37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 7c32d86..ee822da 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -47,22 +47,21 @@ static QCString filterTitle(const char *s)
return result;
}
-//static QCString escapeLabelName(const QCString &s)
-//{
-// QCString result;
-// uint i;
-// for (i=0;i<s.length();i++)
-// {
-// char c=s.at(i);
-// switch (c)
-// {
-// case '~': result+=".1"; break;
-// case '%': result+=".2"; break;
-// default: result+=c;
-// }
-// }
-// return result;
-//}
+static QCString escapeLabelName(const QCString &s)
+{
+ QCString result;
+ uint i;
+ for (i=0;i<s.length();i++)
+ {
+ char c=s.at(i);
+ switch (c)
+ {
+ case '%': result+="\\%"; break;
+ default: result+=c;
+ }
+ }
+ return result;
+}
LatexGenerator::LatexGenerator() : OutputGenerator()
@@ -861,11 +860,11 @@ void LatexGenerator::startMemberDoc(const char *clname,
docify(clname);
t << "}!";
}
- t << memname << "@{";
+ t << escapeLabelName(memname) << "@{";
docify(memname);
t << "}}" << endl;
- t << "\\index{" << memname << "@{";
+ t << "\\index{" << escapeLabelName(memname) << "@{";
docify(memname);
t << "}";
if (clname)
@@ -921,7 +920,7 @@ void LatexGenerator::addToIndex(const char *s1,const char *s2)
{
if (s1)
{
- t << "\\index{" << s1 << "@{";
+ t << "\\index{" << escapeLabelName(s1) << "@{";
docify(s1);
t << "}";
if (s2)