Jean-Marc Lasgouttes schrieb:
I have problems with this patch, by decreasing order of importance
1/ some layouts do not have a date, and thus this will create un
typesettable document
2/ you cannot assume that all layouts set date with \date (I thought you
cared about assumptions :)
That can be fixed using
\...@ifunefined{date}{}{\date{}}
Before implementing that I would like to know what layouts don't have a \date
command.
3/ I think that some layouts do not set current date as default. In this
case, the setting is misleading (what does it do?)
When the current date is not the default, the default is no date. This is the same that your get
when using this option. So yes this option has then no effect. I can add a tooltip to clarify this.
To solve 1/ and 2/, one could check for the presence of layout Date in
the textclass and disable the option when it is not here. (and use its
LatexName instead of hardcoding)
I think this won't work in all cases. Assume a document class that uses an environment named
"deadline" instead of a command "date".
Using
\...@ifunefined{date}{}{\date{}}
is in any case safe and work in 90% of all text classes and also for custom
layout files.
To solve 3/ (and 1/ and 2/) one would need a specific tag in the layout
file like
RemoveDateCommand date
This is in my opinion too complicated and not worth it. For the very few cases where \date is not
defined it is OK for me when the option does nothing.
regards Uwe