Am Sonntag, 29. Juli 2018 06:49:39 CEST schrieb Jürgen Spitzmüller 
<sp...@lyx.org>:
> Am Samstag, den 28.07.2018, 14:49 +0200 schrieb Jürgen Spitzmüller:
> > Am Samstag, den 28.07.2018, 14:33 +0200 schrieb Kornel Benko:
> > > commit 3e92efd118aa66d90cee8e1cd5b305ead0849925
> > > Author: Kornel Benko <kor...@lyx.org>
> > > Date:   Sat Jul 28 14:30:25 2018 +0200
> > > 
> > >     Replace styles '(Begin|End)Frontmatter' with environment in
> > > elsarticle
> > >     
> > >     No change in tex or pdf output.
> > >     This does not help in compiling, but still feels more natural.
> > 
> > This is a file format change. Please add the necessary change and
> > lyx2lyx routines.
> 
> Looking at the actual change, I think you don't need an InsetLayout for
> Frontmatter. This is sort of a maketitle environment AFAICS. Hence it
> would be more in line with other layouts (and easier to use) if you'd
> use something like
> 
> TitleLatexType Environment
> TitleLatexName frontmatter
> 
> and the respective layouts that should go there with
> 
> InTitle               1
> 
> like elsart.layout does it, in fact.
> 
> Jürgen

I like it. But the existence of Begin/EndFrontmater in the lyx-file is a 
problem.
With the new layout, we can omit it, but the conversion to old (2.3.x) format 
would miss these styles.

Attached the new version. Working without need of additional lyx2lyx conversion.

        Kornel
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[elsarticle,natbib.sty,pifont.sty]{Elsevier}
#  \DeclareCategory{Articles}
# elsarticle textclass definition file.
# Author: Uwe Stöhr (uwesto...@web.de)

Format 68

Columns                         1
Sides                           1
SecNumDepth                     3
TocDepth                        3
DefaultStyle            Standard
Provides natbib         1
Provides refstyle       1

ClassOptions
        FontSize                10|11|12
end

TitleLatexType Environment
TitleLatexName frontmatter

# This is just to show how to declare the default font.
# The defaults are exactly those shown here.
DefaultFont
        Family                  Roman
        Series                  Medium
        Shape                   Up
        Size                    Normal
        Color                   None
EndFont


Style Standard
        Category                MainText
        Margin                  Static
        LatexType               Paragraph
        LatexName               dummy
        ParIndent               MM
        ParSkip                 0.4
        Align                   Block
        AlignPossible   Block, Left, Right, Center
        LabelType               No_Label
End

Style BeginFrontmatter
        Category                FrontMatter
        LatexType               Paragraph
        LatexName               dummy
        LabelType               No_Label
End

Style EndFrontmatter
        Category                FrontMatter
        LatexType               None
        LatexName               dummy
        LabelType               No_Label
End

Input stdcounters.inc
Input stdfloats.inc
Input stdlists.inc
Input stdsections.inc
Input stdstarsections.inc
Input stdlayouts.inc

NoStyle                         Chapter
NoCounter                       chapter
NoStyle                         Chapter*

Style Title
        Margin                  Static
        LatexType               Command
        LatexName               title
        Category                FrontMatter
        InTitle                 1
        ResetArgs               1
        ParSkip                 0.4
        ItemSep                 0
        TopSep                  0
        BottomSep               1
        ParSep                  1
        Align                   Center
        LabelType               No_Label
        Font
          Size                  Largest
        EndFont
        HTMLTitle               true
End

InsetLayout "Flex:Titlenotemark"
        LyxType                 custom
        LatexType               command
        ForcePlain              1
        LatexName               tnoteref
        LabelString             "Titlenote mark"
        Font
          Color                 foreground
          Size                  Small
          Family                Roman
          Shape                 Up
          Series                Medium
          Misc                  No_Emph
          Misc                  No_Noun
          Misc                  No_Bar
        EndFont
        LabelFont
          Color                 green
          Size                  Small
        EndFont
End


Style "Title footnote"
        Margin                  Dynamic
        LatexType               Command
        LatexName               tnotetext
        Category                FrontMatter
        InTitle                 1
        Argument 1
          LabelString   "Footnote Label"
          Tooltip               "Label you refer to in the title"
        EndArgument
        ParSkip                 0.4
        BottomSep               0.5
        Align                   Left
        LabelSep                xx
        LabelType               Static
        LabelString             "Title footnote:"
        LabelFont
          Color                 Green
          Series                Bold
        EndFont
End


Style Author
        Margin                  Static
        LatexType               Command
        Category                FrontMatter
        InTitle                 1
        Argument 1
          LabelString   "Author Label"
          Tooltip               "Label you will reference in the address"
        EndArgument
        LatexName               author
        LabelSep                xxx
        ParSkip                 0.4
        TopSep                  1.3
        BottomSep               0.7
        ParSep                  0.7
        Align                   Center
        LabelType               No_Label
        Font
          Size                  Large
        EndFont
End


InsetLayout "Flex:Authormark"
        LyxType                 custom
        LatexType               command
        ForcePlain              1
        LatexName               fnref
        LabelString             "Author mark"
        Font
          Color                 foreground
          Size                  Small
          Family                Roman
          Shape                 Up
          Series                Medium
          Misc                  No_Emph
          Misc                  No_Noun
          Misc                  No_Bar
        EndFont
        LabelFont
          Color                 latex
          Size                  Small
        EndFont
End


Style "Author footnote"
        CopyStyle               "Title footnote"
        LatexName               fntext
        InTitle                 1
        LabelString             "Author footnote:"
        Argument 1
          LabelString   "Author Footnote Label"
          Tooltip               "Label you refer to for an author"
        EndArgument
End


InsetLayout "Flex:CorAuthormark"
        CopyStyle               "Flex:Authormark"
        LatexName               corref
        LabelString             "CorAuthor mark"
        LabelFont
          Color                 blue
        EndFont
End


Style "Corresponding author"
        CopyStyle               "Author footnote"
        LatexName               cortext
        InTitle                 1
        LabelString             "Corresponding author text:"
End


Style Address
        Margin                  Static
        LatexType               Command
        Category                FrontMatter
        LatexName               address
        InTitle                 1
        Argument 1
          LabelString   "Address Label"
          Tooltip               "Label of the author you refer to"
        EndArgument
        ParSkip                 0.4
        Align                   Center
        AlignPossible   Left, Right
        LabelType               No_Label
        Font
          Shape                 Italic
        EndFont
End


Style Email
        CopyStyle               Address
        LatexName               ead
        InTitle                 1
        AlignPossible   Block
        Argument 1
          LabelString   "Internet"
          Tooltip               "If content is 'url', email becomes an Internet 
address"
        EndArgument
        Font
          Shape                 Up
        EndFont
End


Style Abstract
        Margin                  Static
        LatexType               Environment
        LatexName               abstract
        Category                FrontMatter
        InTitle                 1
        NextNoIndent    1
        LeftMargin              MMM
        RightMargin             MMM
        ParIndent               MM
        ItemSep                 0
        TopSep                  0.7
        BottomSep               0.7
        ParSep                  0
        Align                   Block
        AlignPossible   Block
        LabelType               Centered
        LabelString             "Abstract"
        LabelBottomSep  0.5
        Font
          Size                  Small
        EndFont
        LabelFont
          Series                Bold
          Size                  Large
        EndFont
End


Style Keywords
        Margin                  Dynamic
        LatexType               Environment
        LatexName               keyword
        Category                FrontMatter
        InTitle                 1
        NextNoIndent    1
        BottomSep               0.5
        ParSkip                 0.4
        Align                   Block
        LabelSep                xx
        LabelType               Static
        LabelString             "Keywords:"
        LabelFont
          Color                 Green
          Series                Bold
        EndFont         
End


Style Bibliography
        Margin                  First_Dynamic
        LatexType               Bib_Environment
        LatexName               thebibliography
        Category                BackMatter
        NextNoIndent            1
        ToggleIndent            Never
        LeftMargin              MM
        ParSkip                 0.4
        ItemSep                 0
        TopSep                  0.7
        BottomSep               0.7
        ParSep                  0.5
        Align                   Block
        AlignPossible           Block, Left
        LabelType               Bibliography
        LabelString             "References"
        LabelBottomSep          1.2
        LabelFont
          Series                Bold
          Size                  Larger
        EndFont
        TocLevel                1
        IsTocCaption            0
End

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to