summaryrefslogtreecommitdiffstats
path: root/src/latexgen.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-06-25 15:06:41 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-06-25 15:06:41 (GMT)
commit5ade6c6ef255f31d264e74b176c257bbc85cd4c7 (patch)
tree85b63c5acfeaa5def630341302a12b466fbc3a42 /src/latexgen.cpp
parentcb417a1f59c3bf956677a59ce94cf13b4010f3c4 (diff)
downloadDoxygen-5ade6c6ef255f31d264e74b176c257bbc85cd4c7.zip
Doxygen-5ade6c6ef255f31d264e74b176c257bbc85cd4c7.tar.gz
Doxygen-5ade6c6ef255f31d264e74b176c257bbc85cd4c7.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)
{