summaryrefslogtreecommitdiffstats
path: root/src/latexgen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2000-06-25 15:06:41 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2000-06-25 15:06:41 (GMT)
commit7d9031583b2a1cc2374a54f5004ed2dd4a61e649 (patch)
tree85b63c5acfeaa5def630341302a12b466fbc3a42 /src/latexgen.cpp
parent2d0679ab5e5cf4fd5daa7bbc007c9b43ccac42d8 (diff)
downloadDoxygen-7d9031583b2a1cc2374a54f5004ed2dd4a61e649.zip
Doxygen-7d9031583b2a1cc2374a54f5004ed2dd4a61e649.tar.gz
Doxygen-7d9031583b2a1cc2374a54f5004ed2dd4a61e649.tar.bz2
Release-1.1.4-20000625
Diffstat (limited to 'src/latexgen.cpp')
-rw-r--r--src/latexgen.cpp41
1 files changed, 33 insertions, 8 deletions
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 036abe4..192e6d4 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -48,22 +48,47 @@ static QCString filterTitle(const char *s)
return result;
}
-static QCString escapeLabelName(const QCString &s)
+static QCString escapeLabelName(const char *s)
{
QCString result;
- uint i;
- for (i=0;i<s.length();i++)
+ const char *p=s;
+ char c;
+ while ((c=*p++))
{
- char c=s.at(i);
switch (c)
{
case '%': result+="\\%"; break;
+ case '|': result+="\\texttt{\"|}"; break;
+ case '!': result+="\"!"; break;
default: result+=c;
}
}
return result;
}
+static QCString escapeMakeIndexChars(LatexGenerator *g,QTextStream &t,const char *s)
+{
+ QCString result;
+ const char *p=s;
+ char str[2];
+ str[1]=0;
+ char c;
+ while ((c=*p++))
+ {
+ switch (c)
+ {
+ case '!': t << "\"!"; break;
+ case '"': t << "\"\""; break;
+ case '@': t << "\"@"; break;
+ case '|': t << "\\texttt{\"|}"; break;
+ case '[': t << "["; break;
+ case ']': t << "]"; break;
+ default: str[0]=c; g->docify(str); break;
+ }
+ }
+ return result;
+}
+
LatexGenerator::LatexGenerator() : OutputGenerator()
{
@@ -178,7 +203,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
t << "}\n";
if (Config::paperType=="a4wide") t << "\\usepackage{a4wide}\n";
t << "\\usepackage{makeidx}\n"
- "\\usepackage{fancyheadings}\n"
+ "\\usepackage{fancyhdr}\n"
"\\usepackage{epsfig}\n"
"\\usepackage{float}\n"
"\\usepackage{doxygen}\n";
@@ -865,11 +890,11 @@ void LatexGenerator::startMemberDoc(const char *clname,
t << "}!";
}
t << escapeLabelName(memname) << "@{";
- docify(memname);
+ escapeMakeIndexChars(this,t,memname);
t << "}}" << endl;
t << "\\index{" << escapeLabelName(memname) << "@{";
- docify(memname);
+ escapeMakeIndexChars(this,t,memname);
t << "}";
if (clname)
{
@@ -934,7 +959,7 @@ void LatexGenerator::addToIndex(const char *s1,const char *s2)
if (s1)
{
t << "\\index{" << escapeLabelName(s1) << "@{";
- docify(s1);
+ escapeMakeIndexChars(this,t,s1);
t << "}";
if (s2)
{