summaryrefslogtreecommitdiffstats
path: root/src/latexgen.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-07-30 13:58:29 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-07-30 13:58:29 (GMT)
commit3876f92c80e9cc62af30916f0ccdeb83cdc2ff05 (patch)
tree2d71d4688e381dc8e0c968d120b25fdd0763c27e /src/latexgen.cpp
parent7295388a3c6b3a12a77dc7a56862333c97e4ccb6 (diff)
downloadDoxygen-3876f92c80e9cc62af30916f0ccdeb83cdc2ff05.zip
Doxygen-3876f92c80e9cc62af30916f0ccdeb83cdc2ff05.tar.gz
Doxygen-3876f92c80e9cc62af30916f0ccdeb83cdc2ff05.tar.bz2
Release-1.2.0-20000730
Diffstat (limited to 'src/latexgen.cpp')
-rw-r--r--src/latexgen.cpp50
1 files changed, 35 insertions, 15 deletions
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 1f2e1a2..721176c 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -157,10 +157,20 @@ void LatexGenerator::init()
<< "refman.ps: refman.dvi" << endl
<< "\tdvips -o refman.ps refman.dvi" << endl
<< endl
- << "refman.pdf: refman.ps" << endl
- << "\tps2pdf refman.ps refman.pdf" << endl
- << endl
- << "refman_2on1.ps: refman.ps" << endl
+ << "refman.pdf: refman.ps" << endl;
+ if (Config::usePDFLatexFlag) // use pdflatex instead of latex
+ {
+ t << "\tpdflatex refman.tex" << endl;
+ t << "\tmakeindex refman.idx" << endl;
+ t << "\tpdflatex refman.tex" << endl << endl;
+ }
+ else // otherwise use ps2pdf: not as nice :(
+ // especially from the font point of view
+ {
+ t << "\tps2pdf refman.ps refman.pdf" << endl << endl;
+ }
+
+ t << "refman_2on1.ps: refman.ps" << endl
<< "\tpsnup -2 refman.ps >refman_2on1.ps" << endl
<< endl
<< "refman_2on1.pdf: refman_2on1.ps" << endl
@@ -185,7 +195,7 @@ static void writeDefaultHeaderPart1(QTextStream &t)
if (Config::latexBatchModeFlag) t << "\\batchmode" << endl;
if (Config::paperType=="a4wide") paperName="a4"; else paperName=Config::paperType;
t << "\\documentclass[" << paperName << "paper";
- if (Config::pdfHyperFlag) t << ",ps2pdf";
+ //if (Config::pdfHyperFlag) t << ",ps2pdf";
t << "]{";
if (Config::compactLatexFlag) t << "article"; else t << "book";
t << "}\n";
@@ -197,12 +207,20 @@ static void writeDefaultHeaderPart1(QTextStream &t)
"\\usepackage{doxygen}\n";
if (Config::pdfHyperFlag)
{
- t << "\\usepackage{times}" << endl
- << "\\usepackage[backref=true," << endl
+ t << "\\usepackage{times}" << endl;
+ t << "\\ifx\\pdfoutput\\undefined" << endl
+ << "\\usepackage[ps2pdf," << endl
+ << " pagebackref=true," << endl
+ << " colorlinks=true," << endl
+ << " linkcolor=blue" << endl
+ << " ]{hyperref}" << endl
+ << "\\else" << endl
+ << "\\usepackage[pdftex," << endl
<< " pagebackref=true," << endl
<< " colorlinks=true," << endl
<< " linkcolor=blue" << endl
- << " ]{hyperref}" << endl;
+ << " ]{hyperref}" << endl
+ << "\\fi" << endl;
}
// Try to get the command for switching on the language
// support
@@ -479,7 +497,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
bool found=FALSE;
while (nd && !found)
{
- if (nd->isLinkableInProject() && nd->countMembers()>0)
+ if (nd->isLinkableInProject())
{
if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; // Namespace Documentation}\n":
@@ -560,7 +578,9 @@ void LatexGenerator::endIndexSection(IndexSections is)
}
break;
case isMainPage:
- t << "}\n\\input{index}\n";
+ t << "}\n\\label{index}";
+ if (Config::pdfHyperFlag) t << "\\hypertarget{index}{}";
+ t << "\\input{index}\n";
break;
case isModuleIndex:
t << "}\n\\input{modules}\n";
@@ -610,7 +630,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
bool found=FALSE;
while (nd && !found)
{
- if (nd->isLinkableInProject() && nd->countMembers()>0)
+ if (nd->isLinkableInProject())
{
t << "}\n\\input{" << nd->getOutputFileBase() << "}\n";
found=TRUE;
@@ -619,7 +639,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
}
while (nd)
{
- if (nd->isLinkableInProject() && nd->countMembers()>0)
+ if (nd->isLinkableInProject())
{
if (Config::compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << nd->getOutputFileBase() << "}\n";
@@ -686,13 +706,13 @@ void LatexGenerator::endIndexSection(IndexSections is)
PageInfo *pi=exampleList.first();
if (pi)
{
- t << "\\input{" << convertSlashes(pi->name,TRUE) << "-example}\n";
+ t << "\\input{" << convertFileName(pi->name) << "-example}\n";
pi=exampleList.next();
}
while (pi)
{
if (Config::compactLatexFlag) t << "\\input" ; else t << "\\include";
- t << "{" << convertSlashes(pi->name,TRUE) << "-example}\n";
+ t << "{" << convertFileName(pi->name) << "-example}\n";
pi=exampleList.next();
}
}
@@ -1076,7 +1096,7 @@ void LatexGenerator::writeSectionRef(const char *,const char *lab,
if (strcmp(lab,text)!=0) // lab!=text
{
// todo: don't hardcode p. here!
- t << "{\\bf " << text << "} (p.\\,\\pageref{" << lab << "})";
+ t << "{\\bf " << text << "} {\\rm (p.\\,\\pageref{" << lab << "})}";
}
else
{