diff options
Diffstat (limited to 'src/latexgen.cpp')
-rw-r--r-- | src/latexgen.cpp | 47 |
1 files changed, 12 insertions, 35 deletions
diff --git a/src/latexgen.cpp b/src/latexgen.cpp index b00bc6f..0e52914 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -182,7 +182,7 @@ void LatexCodeGenerator::writeCodeLink(const char *ref,const char *f, } else { - m_t << name; + codify(name); } m_col+=l; } @@ -652,28 +652,12 @@ static void writeDefaultHeaderPart1(FTextStream &t) "\n"; writeExtraLatexPackages(t); + writeLatexSpecialFormulaChars(t); // Hyperlinks bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS); if (pdfHyperlinks) { - unsigned char minus[4]; // Superscript minus - char *pminus = (char *)minus; - unsigned char sup2[3]; // Superscript two - char *psup2 = (char *)sup2; - unsigned char sup3[3]; - char *psup3 = (char *)sup3; // Superscript three - minus[0]= 0xE2; - minus[1]= 0x81; - minus[2]= 0xBB; - minus[3]= 0; - sup2[0]= 0xC2; - sup2[1]= 0xB2; - sup2[2]= 0; - sup3[0]= 0xC2; - sup3[1]= 0xB3; - sup3[2]= 0; - t << "% Hyperlinks (required, but should be loaded last)\n" "\\ifpdf\n" " \\usepackage[pdftex,pagebackref=true]{hyperref}\n" @@ -684,18 +668,6 @@ static void writeDefaultHeaderPart1(FTextStream &t) " \\usepackage[ps2pdf,pagebackref=true]{hyperref}\n" " \\fi\n" "\\fi\n" - "\\ifpdf\n" - " \\DeclareUnicodeCharacter{207B}{${}^{-}$}% Superscript minus\n" - " \\DeclareUnicodeCharacter{C2B2}{${}^{2}$}% Superscript two\n" - " \\DeclareUnicodeCharacter{C2B3}{${}^{3}$}% Superscript three\n" - "\\else\n" - " \\catcode`\\" << pminus << "=13% Superscript minus\n" - " \\def" << pminus << "{${}^{-}$}\n" - " \\catcode`\\" << psup2 << "=13% Superscript two\n" - " \\def" << psup2 << "{${}^{2}$}\n" - " \\catcode`\\"<<psup3<<"=13% Superscript three\n" - " \\def"<<psup3<<"{${}^{3}$}\n" - "\\fi\n" "\n" "\\hypersetup{%\n" " colorlinks=true,%\n" @@ -1385,7 +1357,7 @@ void LatexGenerator::startHtmlLink(const char *url) t << url; t << "}"; } - t << "{\\tt "; + t << "\\texttt{ "; } void LatexGenerator::endHtmlLink() @@ -1401,7 +1373,7 @@ void LatexGenerator::endHtmlLink() // t << url; // t << "}"; // } -// t << "{\\tt "; +// t << "\\texttt{ "; // docify(url); // t << "}"; //} @@ -1409,7 +1381,7 @@ void LatexGenerator::endHtmlLink() void LatexGenerator::writeStartAnnoItem(const char *,const char *, const char *path,const char *name) { - t << "\\item\\contentsline{section}{\\bf "; + t << "\\item\\contentsline{section}\\textbf{ "; if (path) docify(path); docify(name); t << "} "; @@ -1444,7 +1416,7 @@ void LatexGenerator::endIndexValue(const char *name,bool /*hasBrief*/) //void LatexGenerator::writeClassLink(const char *,const char *, // const char *,const char *name) //{ -// t << "{\\bf "; +// t << "\\textbf{ "; // docify(name); // t << "}"; //} @@ -2157,7 +2129,7 @@ void LatexGenerator::endParameterList() void LatexGenerator::startParameterType(bool first,const char *key) { t << "\\item[{"; - if (!first && key) t << key; + if (!first && key) docify(key); } void LatexGenerator::endParameterType() @@ -2246,6 +2218,11 @@ void LatexGenerator::startCodeFragment() void LatexGenerator::endCodeFragment() { + //if (DoxyCodeOpen) + //{ + // t << "}\n"; + // DoxyCodeOpen = FALSE; + //} t << "\\end{DoxyCode}\n"; DoxyCodeOpen = FALSE; } |