summaryrefslogtreecommitdiffstats
path: root/src/latexgen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/latexgen.cpp')
-rw-r--r--src/latexgen.cpp177
1 files changed, 121 insertions, 56 deletions
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index ff00d0f..6c297b8 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -95,7 +95,7 @@ void LatexGenerator::init()
FTextStream t(&file);
if (!Config_getBool("USE_PDFLATEX")) // use plain old latex
{
- t << "all: clean refman.dvi" << endl
+ t << "all: refman.dvi" << endl
<< endl
<< "ps: refman.ps" << endl
<< endl
@@ -116,7 +116,7 @@ void LatexGenerator::init()
#else
t << "\tps2pdf refman.ps refman.pdf" << endl << endl;
#endif
- t << "refman.dvi: refman.tex doxygen.sty" << endl
+ t << "refman.dvi: clean refman.tex doxygen.sty" << endl
<< "\techo \"Running latex...\"" << endl
<< "\t" << latex_command << " refman.tex" << endl
<< "\techo \"Running makeindex...\"" << endl
@@ -144,9 +144,9 @@ void LatexGenerator::init()
}
else // use pdflatex for higher quality output
{
- t << "all: clean refman.pdf" << endl << endl
+ t << "all: refman.pdf" << endl << endl
<< "pdf: refman.pdf" << endl << endl;
- t << "refman.pdf: refman.tex" << endl;
+ t << "refman.pdf: clean refman.tex" << endl;
t << "\tpdflatex refman.tex" << endl;
t << "\tmakeindex refman.idx" << endl;
t << "\tpdflatex refman.tex" << endl
@@ -161,7 +161,11 @@ void LatexGenerator::init()
t << endl
<< "clean:" << endl
+#if defined(_MSC_VER)
+ << "\tdel /s/y "
+#else
<< "\trm -f "
+#endif
<< "*.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out refman.pdf" << endl;
createSubDirs(d);
@@ -236,6 +240,8 @@ static void writeDefaultHeaderPart1(FTextStream &t)
t << "\\usepackage{mathptmx}\n";
t << "\\usepackage[scaled=.90]{helvet}\n";
t << "\\usepackage{courier}\n";
+ t << "\\usepackage{sectsty}\n";
+ t << "\\usepackage[titles]{tocloft}\n";
t << "\\usepackage{doxygen}\n";
// define option for listings
@@ -318,46 +324,46 @@ static void writeDefaultStyleSheetPart1(FTextStream &t)
"\\RequirePackage{longtable}\n"
"\\RequirePackage{verbatim}\n"
"\\RequirePackage{ifthen}\n"
- "\\RequirePackage{xcolor}\n\n";
+ "\\RequirePackage[table]{xcolor}\n\n";
t << "% Use helvetica font instead of times roman\n"
"\\RequirePackage{helvet}\n"
"\\RequirePackage{sectsty}\n"
"\\RequirePackage{tocloft}\n"
- "\\allsectionsfont{\\usefont{OT1}{phv}{bc}{n}\\selectfont}\n"
- "\\providecommand{\\cftchapfont}{%\n"
- " \\fontsize{11}{13}\\usefont{OT1}{phv}{bc}{n}\\selectfont\n"
- "}\n"
- "\\providecommand{\\cftchappagefont}{%\n"
- " \\fontsize{11}{13}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
- "}\n"
- "\\providecommand{\\cftsecfont}{%\n"
- " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
- "}\n"
- "\\providecommand{\\cftsecpagefont}{%\n"
- " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
- "}\n"
- "\\providecommand{\\cftsubsecfont}{%\n"
- " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
- "}\n"
- "\\providecommand{\\cftsubsecpagefont}{%\n"
- " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
- "}\n"
- "\\providecommand{\\cftsubsubsecfont}{%\n"
- " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
- "}\n"
- "\\providecommand{\\cftsubsubsecpagefont}{%\n"
- " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
- "}\n"
- "\\providecommand{\\cftparafont}{%\n"
- " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
- "}\n"
- "\\providecommand{\\cftparapagefont}{%\n"
- " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
- "}\n"
- "\\providecommand{\\cfttoctitlefont}{%\n"
- " \\fontsize{20}{22}\\usefont{OT1}{phv}{b}{n}\\selectfont\n"
- "}\n"
+// "\\allsectionsfont{\\usefont{OT1}{phv}{bc}{n}\\selectfont}\n"
+// "\\providecommand{\\cftchapfont}{%\n"
+// " \\fontsize{11}{13}\\usefont{OT1}{phv}{bc}{n}\\selectfont\n"
+// "}\n"
+// "\\providecommand{\\cftchappagefont}{%\n"
+// " \\fontsize{11}{13}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+// "}\n"
+// "\\providecommand{\\cftsecfont}{%\n"
+// " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+// "}\n"
+// "\\providecommand{\\cftsecpagefont}{%\n"
+// " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+// "}\n"
+// "\\providecommand{\\cftsubsecfont}{%\n"
+// " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+// "}\n"
+// "\\providecommand{\\cftsubsecpagefont}{%\n"
+// " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+// "}\n"
+// "\\providecommand{\\cftsubsubsecfont}{%\n"
+// " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+// "}\n"
+// "\\providecommand{\\cftsubsubsecpagefont}{%\n"
+// " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+// "}\n"
+// "\\providecommand{\\cftparafont}{%\n"
+// " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+// "}\n"
+// "\\providecommand{\\cftparapagefont}{%\n"
+// " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+// "}\n"
+// "\\providecommand{\\cfttoctitlefont}{%\n"
+// " \\fontsize{20}{22}\\usefont{OT1}{phv}{b}{n}\\selectfont\n"
+// "}\n"
"\\providecommand{\\rmdefault}{phv}\n"
"\\providecommand{\\bfdefault}{bc}\n"
"\n\n";
@@ -738,16 +744,21 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
t << "\\setlength{\\parindent}{0cm}\n";
t << "\\setlength{\\parskip}{0.2cm}\n";
- t << "\\addtocounter{secnumdepth}{1}\n";
+ t << "\\addtocounter{secnumdepth}{2}\n";
// \sloppy should not be used, see bug 563698
//t << "\\sloppy\n";
t << "\\usepackage[T1]{fontenc}\n";
t << "\\makeatletter\n";
t << "\\renewcommand{\\paragraph}{\\@startsection{paragraph}{4}{0ex}%\n";
- t << " {-3.25ex plus -1ex minus -0.2ex}%\n";
- t << " {1.5ex plus 0.2ex}%\n";
- t << " {\\normalfont\\normalsize\\bfseries}}\n";
+ t << " {-1.0ex}%\n";
+ t << " {1.0ex}%\n";
+ t << " {\\usefont{OT1}{phv}{bc}{n}\\color{darkgray}}}\n";
+ t << "\\renewcommand{\\subparagraph}{\\@startsection{subparagraph}{5}{0ex}%\n";
+ t << " {-1.0ex}%\n";
+ t << " {1.0ex}%\n";
+ t << " {\\usefont{OT1}{phv}{bc}{n}\\color{darkgray}}}\n";
t << "\\makeatother\n";
+ t << "\\allsectionsfont{\\usefont{OT1}{phv}{bc}{n}\\selectfont\\color{darkgray}}\n";
t << "\\stepcounter{secnumdepth}\n";
t << "\\stepcounter{tocdepth}\n";
t << "\\definecolor{comment}{rgb}{0.5,0.0,0.0}\n";
@@ -948,7 +959,10 @@ void LatexGenerator::startIndexSection(IndexSections is)
bool found=FALSE;
for (cli.toFirst();(cd=cli.current()) && !found;++cli)
{
- if (cd->isLinkableInProject() && cd->templateMaster()==0)
+ if (cd->isLinkableInProject() &&
+ cd->templateMaster()==0 &&
+ !cd->isEmbeddedInGroupDocs()
+ )
{
if (compactLatex) t << "\\section"; else t << "\\chapter";
t << "{"; //Compound Documentation}\n";
@@ -1126,7 +1140,10 @@ void LatexGenerator::endIndexSection(IndexSections is)
bool found=FALSE;
for (cli.toFirst();(cd=cli.current()) && !found;++cli)
{
- if (cd->isLinkableInProject() && cd->templateMaster()==0)
+ if (cd->isLinkableInProject() &&
+ cd->templateMaster()==0 &&
+ !cd->isEmbeddedInGroupDocs()
+ )
{
t << "}\n\\input{" << cd->getOutputFileBase() << "}\n";
found=TRUE;
@@ -1134,7 +1151,10 @@ void LatexGenerator::endIndexSection(IndexSections is)
}
for (;(cd=cli.current());++cli)
{
- if (cd->isLinkableInProject() && cd->templateMaster()==0)
+ if (cd->isLinkableInProject() &&
+ cd->templateMaster()==0 &&
+ !cd->isEmbeddedInGroupDocs()
+ )
{
//if (compactLatex) t << "\\input"; else t << "\\include";
t << "\\input";
@@ -1524,20 +1544,33 @@ void LatexGenerator::startTitle()
}
}
-void LatexGenerator::startGroupHeader()
+void LatexGenerator::startGroupHeader(int extraIndentLevel)
{
if (Config_getBool("COMPACT_LATEX"))
{
- t << "\\subsubsection{";
+ extraIndentLevel++;
}
- else
+
+ if (extraIndentLevel==3)
+ {
+ t << "\\subparagraph*{";
+ }
+ else if (extraIndentLevel==2)
+ {
+ t << "\\paragraph{";
+ }
+ else if (extraIndentLevel==1)
+ {
+ t << "\\subsubsection{";
+ }
+ else // extraIndentLevel==0
{
t << "\\subsection{";
}
disableLinks=TRUE;
}
-void LatexGenerator::endGroupHeader()
+void LatexGenerator::endGroupHeader(int)
{
disableLinks=FALSE;
t << "}" << endl;
@@ -1565,7 +1598,8 @@ void LatexGenerator::endMemberHeader()
void LatexGenerator::startMemberDoc(const char *clname,
const char *memname,
const char *,
- const char *title)
+ const char *title,
+ bool showInline)
{
if (memname && memname[0]!='@')
{
@@ -1595,7 +1629,13 @@ void LatexGenerator::startMemberDoc(const char *clname,
}
t << "}" << endl;
}
- if (Config_getBool("COMPACT_LATEX")) t << "\\paragraph"; else t << "\\subsubsection";
+ static const char *levelLab[] = { "subsubsection","paragraph","subparagraph", "subparagraph" };
+ static bool compactLatex = Config_getBool("COMPACT_LATEX");
+ int level=0;
+ if (showInline) level+=2;
+ if (compactLatex) level++;
+ t << "\\" << levelLab[level];
+
//if (Config_getBool("PDF_HYPERLINKS") && memname)
//{
// t << "[";
@@ -1613,7 +1653,7 @@ void LatexGenerator::endMemberDoc(bool)
{
disableLinks=FALSE;
t << "}";
- if (Config_getBool("COMPACT_LATEX")) t << "\\hfill";
+ //if (Config_getBool("COMPACT_LATEX")) t << "\\hfill";
}
void LatexGenerator::startDoxyAnchor(const char *fName,const char *,
@@ -1903,7 +1943,8 @@ void LatexGenerator::endMemberDescription()
{
if (!insideTabbing)
{
- t << "\\item\\end{DoxyCompactList}";
+ //t << "\\item\\end{DoxyCompactList}";
+ t << "\\end{DoxyCompactList}";
}
else
{
@@ -1944,12 +1985,19 @@ void LatexGenerator::endMemberList()
void LatexGenerator::startMemberGroupHeader(bool hasHeader)
{
if (hasHeader) t << "\\begin{Indent}";
- t << "{\\bf ";
+ if (Config_getBool("COMPACT_LATEX"))
+ {
+ t << "\\subparagraph*{";
+ }
+ else
+ {
+ t << "\\paragraph*{";
+ }
}
void LatexGenerator::endMemberGroupHeader()
{
- t << "}\\par" << endl;
+ t << "}" << endl;
}
void LatexGenerator::startMemberGroupDocs()
@@ -2301,3 +2349,20 @@ void LatexGenerator::endCodeAnchor()
{
}
+void LatexGenerator::startInlineHeader()
+{
+ if (Config_getBool("COMPACT_LATEX"))
+ {
+ t << "\\paragraph*{";
+ }
+ else
+ {
+ t << "\\subsubsection*{";
+ }
+}
+
+void LatexGenerator::endInlineHeader()
+{
+ t << "}" << endl;
+}
+