On 08/09/2016 10:57 PM, Scott Kostyshak wrote:
> On Tue, Aug 09, 2016 at 11:05:21PM +0200, Kornel Benko wrote:
>> Am Dienstag, 9. August 2016 um 18:57:50, schrieb Scott Kostyshak 
>> <skost...@lyx.org>
>>> commit e7a64949ad0562764a3d1db3698103ee2b91e3ce
>>> Author: Scott Kostyshak <skost...@lyx.org>
>>> Date:   Tue Aug 9 12:53:56 2016 -0400
>>>
>>>     Foils.lyx: fix output of author
>>>     
>>>     By moving date and author above the standard layouts, author is now
>>>     output in the PDF and the terminal error from LyX about mixing an
>>>     InTitle layout with non-InTitle layouts is gone.
>>> ---
>>>  lib/examples/Foils.lyx    |   20 ++++++++++----------
>>>  lib/examples/fr/Foils.lyx |   26 +++++++++++++-------------
>>>  2 files changed, 23 insertions(+), 23 deletions(-)
>>>
>> From my POV, this should be handled by lyx itself. Why is it important to 
>> the user
>> in where to add author or date data?
> Good point. I hope one of our layout experts joins in this conversation.
>
> My first reaction is the same as yours. However, after studying the code it 
> seemed to indicate that we do this on purpose, so I decided to at least fix 
> it at the higher level.
>
> A couple of thoughts come to mind for why things are this way:
>
> 1. Do we process the layouts sequentially? If so, it might just be
> difficult to see a date layout after the code to make the title is
> written and go back. Perhaps we would need two runs?

The export process just goes through the document sequentially. In the
most common case, when we hit something that isn't "InTitle", that's
when we output \maketitle. So you can think of "InTitle" as really
meaning: Before \maketitle.

> 2. The behavior of what happens seems to depend on the LaTeX class. I'm not 
> sure about this, but in some cases, it seems that nothing is wrong with e.g. 
> outputting the date after making the title. In other cases there is something 
> wrong -- it doesn't show up and there is no LaTeX error.

Some document classes put \title and \author in the premable. In that
case, having them come after non-InTitle stuff won't affect the
output---the preamble material is collected during the validation
process---but you may still get the warning.

In principle, we could process all the InTitle material during
validation, or we could just collect a bunch of pointers to those
paragraphs, and process them together at the beginning of the output
process, or who knows what. Then you wouldn't have to worry about where
those things go. But it's not clear to me whether that is worth the effort.

Richard

Reply via email to