mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
BufferParams.cpp: make the suppress date feature safer because we cannot be sure that every document class has a \date command
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31071 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f7aa1c1c5d
commit
5f877e218a
@ -1463,10 +1463,6 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
||||
// Line spacing
|
||||
lyxpreamble += from_utf8(spacing().writePreamble(tclass.provides("SetSpace")));
|
||||
|
||||
// date
|
||||
if (suppress_date)
|
||||
lyxpreamble += "\\date{}\n";
|
||||
|
||||
// PDF support.
|
||||
// * Hyperref manual: "Make sure it comes last of your loaded
|
||||
// packages, to give it a fighting chance of not being over-written,
|
||||
@ -1500,6 +1496,12 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
||||
"Textclass specific LaTeX commands.\n"
|
||||
+ tmppreamble + '\n';
|
||||
|
||||
// suppress date if selected
|
||||
// use \@ifundefined because we cannot be sure that every document class
|
||||
// has a \date command
|
||||
if (suppress_date)
|
||||
atlyxpreamble += "\\@ifundefined{date}{}{\\date{}}\n";
|
||||
|
||||
/* the user-defined preamble */
|
||||
if (!containsOnly(preamble, " \n\t"))
|
||||
// FIXME UNICODE
|
||||
|
Loading…
Reference in New Issue
Block a user