mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 06:15:16 +00:00
backporting tex2lyx: the support for \date{} in the preamble
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40054 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
62486d95e3
commit
57a0b232fd
@ -55,6 +55,7 @@ Format LaTeX feature LyX feature
|
|||||||
368 glue lengths InsetHSpace
|
368 glue lengths InsetHSpace
|
||||||
369 author id \author
|
369 author id \author
|
||||||
370 \date{} \suppress_date
|
370 \date{} \suppress_date
|
||||||
|
(partly supported, see bug #7844)
|
||||||
371 automatic mhchem loading \use_mhchem
|
371 automatic mhchem loading \use_mhchem
|
||||||
375 \includeonly \{begin,end}_includeonly
|
375 \includeonly \{begin,end}_includeonly
|
||||||
376 update .aux of unincluded children \maintain_unincluded_children
|
376 update .aux of unincluded children \maintain_unincluded_children
|
||||||
|
@ -914,6 +914,14 @@ void parse_preamble(Parser & p, ostream & os,
|
|||||||
else if (t.cs() == "pagestyle")
|
else if (t.cs() == "pagestyle")
|
||||||
h_paperpagestyle = p.verbatim_item();
|
h_paperpagestyle = p.verbatim_item();
|
||||||
|
|
||||||
|
else if (t.cs() == "date") {
|
||||||
|
string argument = p.getArg('{', '}');
|
||||||
|
if (argument.empty())
|
||||||
|
h_suppress_date = "true";
|
||||||
|
else
|
||||||
|
h_preamble << t.asInput() << '{' << argument << '}';
|
||||||
|
}
|
||||||
|
|
||||||
else if (t.cs() == "color") {
|
else if (t.cs() == "color") {
|
||||||
string argument = p.getArg('{', '}');
|
string argument = p.getArg('{', '}');
|
||||||
// check the case that a standard color is used
|
// check the case that a standard color is used
|
||||||
@ -1254,7 +1262,10 @@ void parse_preamble(Parser & p, ostream & os,
|
|||||||
string const arg1 = p.verbatim_item();
|
string const arg1 = p.verbatim_item();
|
||||||
string const arg2 = p.verbatim_item();
|
string const arg2 = p.verbatim_item();
|
||||||
string const arg3 = p.verbatim_item();
|
string const arg3 = p.verbatim_item();
|
||||||
if (!in_lyx_preamble) {
|
// test case \@ifundefined{date}{}{\date{}}
|
||||||
|
if (arg1 == "date" && arg2.empty() && arg3 == "\\date{}")
|
||||||
|
h_suppress_date = "true";
|
||||||
|
else if (!in_lyx_preamble) {
|
||||||
h_preamble << t.asInput()
|
h_preamble << t.asInput()
|
||||||
<< '{' << arg1 << '}'
|
<< '{' << arg1 << '}'
|
||||||
<< '{' << arg2 << '}'
|
<< '{' << arg2 << '}'
|
||||||
|
@ -61,6 +61,8 @@ What's new
|
|||||||
|
|
||||||
* Rotated floats (sidewaysfigure, sidewaystable).
|
* Rotated floats (sidewaysfigure, sidewaystable).
|
||||||
|
|
||||||
|
* Command \date{} in the preamble to suppress the date output.
|
||||||
|
|
||||||
|
|
||||||
* USER INTERFACE
|
* USER INTERFACE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user