summaryrefslogtreecommitdiffstats
path: root/src/latexgen.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-08-22 19:30:14 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-08-22 19:30:14 (GMT)
commitce8facca2c23f4656747ad3a5b4a8db475855e27 (patch)
treee5faa5e8d675f525b1cd2f397645136f8193b36f /src/latexgen.cpp
parentf0e47672cc3f910aebd1d30fe3db21e9dbd943c4 (diff)
downloadDoxygen-ce8facca2c23f4656747ad3a5b4a8db475855e27.zip
Doxygen-ce8facca2c23f4656747ad3a5b4a8db475855e27.tar.gz
Doxygen-ce8facca2c23f4656747ad3a5b4a8db475855e27.tar.bz2
Release-1.7.1-20100822
Diffstat (limited to 'src/latexgen.cpp')
-rw-r--r--src/latexgen.cpp98
1 files changed, 80 insertions, 18 deletions
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 85e2905..f75b76a 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -182,7 +182,8 @@ static void writeDefaultHeaderPart1(FTextStream &t)
t << "]{";
if (Config_getBool("COMPACT_LATEX")) t << "article"; else t << "book";
t << "}\n";
- if (paperType=="a4wide") t << "\\usepackage{a4wide}\n";
+ // the next package is obsolete (see bug 563698)
+ //if (paperType=="a4wide") t << "\\usepackage{a4wide}\n";
t << "\\usepackage{makeidx}\n"
"\\usepackage{graphicx}\n"
"\\usepackage{multicol}\n"
@@ -193,10 +194,10 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"\\usepackage{alltt}\n"
//"\\usepackage{ae,aecompl,aeguill}\n"
;
- if (Config_getBool("USE_PDFLATEX"))
- {
- t << "\\usepackage{times}" << endl;
- }
+ //if (Config_getBool("USE_PDFLATEX"))
+ //{
+ // t << "\\usepackage{times}" << endl;
+ //}
if (Config_getBool("PDF_HYPERLINKS"))
{
t << "\\usepackage{ifpdf}" << endl
@@ -229,6 +230,9 @@ static void writeDefaultHeaderPart1(FTextStream &t)
// if the command is empty, no output is needed.
t << sLanguageSupportCommand << endl;
}
+ t << "\\usepackage{mathptmx}\n";
+ t << "\\usepackage[scaled=.90]{helvet}\n";
+ t << "\\usepackage{courier}\n";
t << "\\usepackage{doxygen}\n";
// define option for listings
@@ -308,6 +312,49 @@ static void writeDefaultStyleSheetPart1(FTextStream &t)
"\\RequirePackage{color}\n"
"\\RequirePackage{fancyhdr}\n"
"\\RequirePackage{verbatim}\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"
+ "\\renewcommand{\\cftchapfont}{%\n"
+ " \\fontsize{11}{13}\\usefont{OT1}{phv}{bc}{n}\\selectfont\n"
+ "}\n"
+ "\\renewcommand{\\cftchappagefont}{%\n"
+ " \\fontsize{11}{13}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+ "}\n"
+ "\\renewcommand{\\cftsecfont}{%\n"
+ " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+ "}\n"
+ "\\renewcommand{\\cftsecpagefont}{%\n"
+ " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+ "}\n"
+ "\\renewcommand{\\cftsubsecfont}{%\n"
+ " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+ "}\n"
+ "\\renewcommand{\\cftsubsecpagefont}{%\n"
+ " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+ "}\n"
+ "\\renewcommand{\\cftsubsubsecfont}{%\n"
+ " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+ "}\n"
+ "\\renewcommand{\\cftsubsubsecpagefont}{%\n"
+ " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+ "}\n"
+ "\\renewcommand{\\cftparafont}{%\n"
+ " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+ "}\n"
+ "\\renewcommand{\\cftparapagefont}{%\n"
+ " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
+ "}\n"
+ "\\renewcommand{\\cfttoctitlefont}{%\n"
+ " \\fontsize{20}{22}\\usefont{OT1}{phv}{b}{n}\\selectfont\n"
+ "}\n"
+ "\\renewcommand{\\rmdefault}{phv}\n"
+ "\\renewcommand{\\bfdefault}{bc}\n"
+ "\n\n";
+
t << "% Setup fancy headings\n"
"\\pagestyle{fancyplain}\n"
"\\newcommand{\\clearemptydoublepage}{%\n"
@@ -320,25 +367,42 @@ static void writeDefaultStyleSheetPart1(FTextStream &t)
t << "\\renewcommand{\\sectionmark}[1]{%\n"
" \\markright{\\thesection\\ #1}%\n"
"}\n";
- t << "\\lhead[\\fancyplain{}{\\bfseries\\thepage}]{%\n"
- " \\fancyplain{}{\\bfseries\\rightmark}%\n"
- "}\n";
- t << "\\rhead[\\fancyplain{}{\\bfseries\\leftmark}]{%\n"
- " \\fancyplain{}{\\bfseries\\thepage}%\n"
- "}\n";
- t << "\\rfoot[\\fancyplain{}{\\bfseries\\scriptsize%\n ";
+
+ //t << "\\lhead[\\fancyplain{}{\\bfseries\\thepage}]{%\n"
+ // " \\fancyplain{}{\\bfseries\\rightmark}%\n"
+ // "}\n";
+ //t << "\\rhead[\\fancyplain{}{\\bfseries\\leftmark}]{%\n"
+ // " \\fancyplain{}{\\bfseries\\thepage}%\n"
+ // "}\n";
+ //t << "\\rfoot[\\fancyplain{}{\\bfseries\\scriptsize%\n ";
+ t << "\\fancyhead[LE]{\\fancyplain{}{\\bfseries\\thepage}}\n";
+ t << "\\fancyhead[CE]{\\fancyplain{}{}}\n";
+ t << "\\fancyhead[RE]{\\fancyplain{}{\\bfseries\\leftmark}}\n";
+ t << "\\fancyhead[LO]{\\fancyplain{}{\\bfseries\\rightmark}}\n";
+ t << "\\fancyhead[CO]{\\fancyplain{}{}}\n";
+ t << "\\fancyhead[RO]{\\fancyplain{}{\\bfseries\\thepage}}\n";
+
+ t << "\\fancyfoot[LE]{\\fancyplain{}{}}\n";
+ t << "\\fancyfoot[CE]{\\fancyplain{}{}}\n";
+ t << "\\fancyfoot[RE]{\\fancyplain{}{\\bfseries\\scriptsize ";
}
static void writeDefaultStyleSheetPart2(FTextStream &t)
{
- t << "\\lfoot[]{\\fancyplain{}{\\bfseries\\scriptsize%\n ";
+ t << "}}\n";
+ t << "\\fancyfoot[LO]{\\fancyplain{}{\\bfseries\\scriptsize ";
+ //t << "\\lfoot[]{\\fancyplain{}{\\bfseries\\scriptsize%\n ";
+
}
static void writeDefaultStyleSheetPart3(FTextStream &t)
{
static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
t << "}}\n";
- t << "\\cfoot{}\n\n";
+ //t << "\\cfoot{}\n\n";
+ t << "\\fancyfoot[CO]{\\fancyplain{}{}}\n";
+ t << "\\fancyfoot[RO]{\\fancyplain{}{}}\n";
+
t << "%---------- Internal commands used in this style file ----------------\n\n";
t << "% Generic environment used by all paragraph-based environments defined\n"
"% below. Note that the command \\title{...} needs to be defined inside\n"
@@ -623,7 +687,8 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
t << "\\setlength{\\parindent}{0cm}\n";
t << "\\setlength{\\parskip}{0.2cm}\n";
t << "\\addtocounter{secnumdepth}{1}\n";
- t << "\\sloppy\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";
@@ -1128,14 +1193,11 @@ void LatexGenerator::writeStyleInfo(int part)
break;
case 2:
{
- //t << " Dimitri van Heesch \\copyright~1997-2010";
- t << "}]{}\n";
writeDefaultStyleSheetPart2(t);
}
break;
case 4:
{
- //t << " Dimitri van Heesch \\copyright~1997-2010";
writeDefaultStyleSheetPart3(t);
endPlainFile();
}