Skip to content

Commit

Permalink
Bug 744938 - PATCH: add option to build latex without timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed Oct 31, 2015
1 parent af5c5b3 commit 9ef2dc1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
10 changes: 10 additions & 0 deletions src/config.xml
Expand Up @@ -2644,6 +2644,16 @@ or
bibliography, e.g. \c plainnat, or \c ieeetr.
See http://en.wikipedia.org/wiki/BibTeX and \ref cmdcite "\\cite"
for more info.
]]>
</docs>
</option>
<option type='bool' id='LATEX_TIMESTAMP' defval='0' depends='GENERATE_LATEX'>
<docs>
<![CDATA[
If the \c LATEX_TIMESTAMP tag is set to \c YES then the footer of
each generated page will contain the date and time when the page
was generated. Setting this to \c NO can help when comparing the output of
multiple runs.
]]>
</docs>
</option>
Expand Down
24 changes: 16 additions & 8 deletions src/latexgen.cpp
Expand Up @@ -571,11 +571,18 @@ static void writeDefaultHeaderPart1(FTextStream &t)

// Headers & footers
QGString genString;
QCString generatedBy;
static bool timeStamp = Config_getBool("LATEX_TIMESTAMP");
FTextStream tg(&genString);
filterLatexString(tg,
theTranslator->trGeneratedAt(dateToString(TRUE),
Config_getString("PROJECT_NAME")),
FALSE,FALSE,FALSE);
if (timeStamp)
{
generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), Config_getString("PROJECT_NAME"));
}
else
{
generatedBy = theTranslator->trGeneratedBy();
}
filterLatexString(tg, generatedBy, FALSE,FALSE,FALSE);
t << "% Headers & footers\n"
"\\usepackage{fancyhdr}\n"
"\\pagestyle{fancyplain}\n"
Expand Down Expand Up @@ -700,10 +707,11 @@ static void writeDefaultHeaderPart3(FTextStream &t)
{
// part 3
// Finalize project number
t << " Doxygen " << versionString << "}\\\\\n"
"\\vspace*{0.5cm}\n"
"{\\small " << dateToString(TRUE) << "}\\\\\n"
"\\end{center}\n"
t << " Doxygen " << versionString << "}\\\\\n";
if (Config_getBool("LATEX_TIMESTAMP"))
t << "\\vspace*{0.5cm}\n"
"{\\small " << dateToString(TRUE) << "}\\\\\n";
t << "\\end{center}\n"
"\\end{titlepage}\n";
bool compactLatex = Config_getBool("COMPACT_LATEX");
if (!compactLatex)
Expand Down

0 comments on commit 9ef2dc1

Please sign in to comment.