commit 67414563ac13cd8f61f58ae7018e20b61cfdb87f
Author: Thibaut Cuvelier <cuvelier.thib...@gmail.com>
Date:   Fri May 10 02:20:20 2019 +0200

    Migrate the previous DocBook layouts so the old documents can still be 
generated with the new implementation.
    
    The output WILL change for these documents, as the output is updated from 
DocBook 4 to DocBook 5.
---
 lib/layouts/db_lyxmacros.inc       |   25 ---------
 lib/layouts/db_stdcharstyles.inc   |   41 +++++---------
 lib/layouts/db_stdclass.inc        |   44 ----------------
 lib/layouts/db_stdcounters.inc     |   32 -----------
 lib/layouts/db_stdlayouts.inc      |   33 ------------
 lib/layouts/db_stdlists.inc        |   36 -------------
 lib/layouts/db_stdsections.inc     |   66 -----------------------
 lib/layouts/db_stdstarsections.inc |   89 +-------------------------------
 lib/layouts/db_stdstruct.inc       |   17 ------
 lib/layouts/db_stdtitle.inc        |  100 ------------------------------------
 lib/layouts/docbook-book.layout    |    8 ++-
 lib/layouts/docbook-chapter.layout |    9 ++-
 lib/layouts/docbook-section.layout |    9 ++-
 lib/layouts/docbook.layout         |   14 -----
 14 files changed, 34 insertions(+), 489 deletions(-)

diff --git a/lib/layouts/db_lyxmacros.inc b/lib/layouts/db_lyxmacros.inc
deleted file mode 100644
index c858491..0000000
--- a/lib/layouts/db_lyxmacros.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-# Textclass definition file for docbook.
-# Author : José Abílio Oliveira Matos <jama...@lyx.org>
-
-# This is the counterpart of lyxmacros.inc
-# It is desirable, as far as possible, to have the same look and feel for
-# related layouts in latex and docbook.
-
-Format 81
-Input lyxmacros.inc
-
-Style Code
-       CopyStyle             LyX-Code
-       LatexType             Environment
-       LatexName             screen
-       PassThru              1
-       ParbreakIsNewline     1
-End
-
-Style LyX-Code
-       ObsoletedBy           Code
-End
-
-NoStyle LyX-Code
-NoStyle Address
-NoStyle Right_Address
diff --git a/lib/layouts/db_stdcharstyles.inc b/lib/layouts/db_stdcharstyles.inc
index 6947203..ffa4315 100644
--- a/lib/layouts/db_stdcharstyles.inc
+++ b/lib/layouts/db_stdcharstyles.inc
@@ -2,12 +2,12 @@
 # Author : José Abílio Oliveira Matos <jama...@lyx.org>
 # Character Styles definition
 
-Format 81
+Format 82
+
 InsetLayout Flex:Filename
-       LyXType element
        LabelString Filename
        LatexType             Command
-       LatexName             filename
+       DocBookTag            filename
        Font
          Family              Typewriter
        EndFont
@@ -19,11 +19,10 @@ InsetLayout Flex:Filename
 End
 
 InsetLayout Flex:Directory
-       LyXType element
        LabelString Directory
        LatexType             Command
-       LatexName             filename
-       LatexParam            "class=<directory>"
+       DocBookTag            filename
+       DocBookAttr           "class='directory'"
        Font
          Family              Typewriter
        EndFont
@@ -35,10 +34,9 @@ InsetLayout Flex:Directory
 End
 
 InsetLayout Flex:Firstname
-       LyXType element
        LabelString Firstname
        LatexType             Command
-       LatexName             firstname
+       DocBookTag            firstname
        LabelFont
          Shape               Up
          Color               blue
@@ -47,10 +45,9 @@ InsetLayout Flex:Firstname
 End
 
 InsetLayout Flex:Surname
-       LyXType element
        LabelString Surname
        LatexType             Command
-       LatexName             surname
+       DocBookTag            surname
        LabelFont
          Shape               Up
          Color               blue
@@ -59,10 +56,9 @@ InsetLayout Flex:Surname
 End
 
 InsetLayout Flex:Literal
-       LyXType element
        LabelString Literal
        LatexType             Command
-       LatexName             literal
+       DocBookTag            literal
        Font
          Family              Typewriter
        EndFont
@@ -74,10 +70,9 @@ InsetLayout Flex:Literal
 End
 
 InsetLayout Flex:Email
-       LyXType element
        LabelString Email
         LatexType             Command
-        LatexName             email
+        DocBookTag            email
         Font
           Family              Typewriter
         EndFont
@@ -89,10 +84,9 @@ InsetLayout Flex:Email
 End
 
 InsetLayout Flex:KeyCombo
-       LyXType element
        LabelString KeyCombo
         LatexType             Command
-        LatexName             keycombo
+        DocBookTag            keycombo
         Font
           Family              Typewriter
         EndFont
@@ -104,10 +98,9 @@ InsetLayout Flex:KeyCombo
 End
 
 InsetLayout Flex:KeyCap
-       LyXType element
        LabelString KeyCap
         LatexType             Command
-        LatexName             keycap
+        DocBookTag            keycap
         Font
           Family              Typewriter
         EndFont
@@ -119,10 +112,9 @@ InsetLayout Flex:KeyCap
 End
 
 InsetLayout Flex:GuiMenu
-       LyXType element
        LabelString GuiMenu
         LatexType             Command
-        LatexName             guimenu
+        DocBookTag            guimenu
         Font
           Family              Sans
         EndFont
@@ -134,10 +126,9 @@ InsetLayout Flex:GuiMenu
 End
 
 InsetLayout Flex:GuiMenuItem
-       LyXType element
        LabelString GuiMenuItem
         LatexType             Command
-        LatexName             guimenuitem
+        DocBookTag            guimenuitem
         Font
           Family              Sans
         EndFont
@@ -149,10 +140,9 @@ InsetLayout Flex:GuiMenuItem
 End
 
 InsetLayout Flex:GuiButton
-       LyXType element
        LabelString GuiButton
         LatexType             Command
-        LatexName             guibutton
+        DocBookTag            guibutton
         Font
           Family              Sans
         EndFont
@@ -164,10 +154,9 @@ InsetLayout Flex:GuiButton
 End
 
 InsetLayout Flex:MenuChoice
-       LyXType element
        LabelString MenuChoice
         LatexType             Command
-        LatexName             menuchoice
+        DocBookTag            menuchoice
         Font
           Family              Sans
         EndFont
diff --git a/lib/layouts/db_stdclass.inc b/lib/layouts/db_stdclass.inc
deleted file mode 100644
index 5a1ebc1..0000000
--- a/lib/layouts/db_stdclass.inc
+++ /dev/null
@@ -1,44 +0,0 @@
-# Textclass definition file for docbook.
-# Author : José Abílio Oliveira Matos <jama...@lyx.org>
-
-# This file is the counterpart of stdclass.inc
-# It is desirable, as far as possible, to have the same look and feel for
-# related layouts in latex and docbook.
-
-Format 81
-OutputType              docbook
-
-Columns                 1
-Sides                   1
-SecNumDepth             3
-TocDepth                3
-DefaultStyle            Standard
-
-ClassOptions
-#      Header          "PUBLIC &quot;-//OASIS//DTD DocBook V4.3//EN&quot;"
-       Other           ".-"
-End
-
-Style Standard
-       Category              MainText
-       Margin                Static
-       LatexType             Paragraph
-       LatexName             para
-       ParIndent             MM
-       ParSkip               0.4
-       Align                 Block
-       LabelType             No_Label
-End
-
-Input stdinsets.inc
-Input db_stdcharstyles.inc
-Input db_stdlists.inc
-Input db_stdsections.inc
-Input db_stdstarsections.inc
-Input db_stdtitle.inc
-Input db_stdstruct.inc
-Input db_lyxmacros.inc
-Input db_stdlayouts.inc
-Input stdcounters.inc
-Input db_stdcounters.inc
-Input stdfloats.inc
diff --git a/lib/layouts/db_stdcounters.inc b/lib/layouts/db_stdcounters.inc
deleted file mode 100644
index 34d8d54..0000000
--- a/lib/layouts/db_stdcounters.inc
+++ /dev/null
@@ -1,32 +0,0 @@
-# Author : José Matos <jama...@lyx.org>
-#          Martin Vermeer <martin.verm...@hut.fi>
-
-# This include file contains all the counters that are defined as standard
-# in Docbook LyX layouts.
-
-Format 81
-Counter sect1
-       GuiName "Section Level 1"
-       Within               chapter
-End
-
-Counter sect2
-       GuiName "Section Level 2"
-       Within               sect1
-End
-
-Counter sect3
-       GuiName "Section Level 3"
-       Within               sect2
-End
-
-Counter sect4
-       GuiName "Section Level 4"
-       Within               sect3
-End
-
-Counter sect5
-       GuiName "Section Level 5"
-       Within               sect4
-End
-
diff --git a/lib/layouts/db_stdlayouts.inc b/lib/layouts/db_stdlayouts.inc
deleted file mode 100644
index 7fa6b4b..0000000
--- a/lib/layouts/db_stdlayouts.inc
+++ /dev/null
@@ -1,33 +0,0 @@
-# Textclass definition file for docbook.
-# Author : José Abílio Oliveira Matos <jama...@lyx.org>
-
-# This is the counterpart of stdlayouts.inc
-# It is desirable, as far as possible, to have the same look and feel for
-# related layouts in latex and docbook.
-
-Format 81
-Input stdlayouts.inc
-
-Style Literal
-       LatexType             Environment
-       LatexName             literallayout
-       PassThru              1
-       ParbreakIsNewline     1
-End
-
-
-Style Quotation
-       LatexType             Environment
-       LatexName             blockquote
-       InnerTag              para
-End
-
-# Quote should be an inline element
-NoStyle Quote
-NoStyle Verse
-
-
-
-Style SGML
-       ObsoletedBy           Standard
-End
diff --git a/lib/layouts/db_stdlists.inc b/lib/layouts/db_stdlists.inc
deleted file mode 100644
index 0e847d8..0000000
--- a/lib/layouts/db_stdlists.inc
+++ /dev/null
@@ -1,36 +0,0 @@
-# Textclass definition file for docbook.
-# Author : José Abílio Oliveira Matos <jama...@lyx.org>
-
-# This is the counterpart of stdlists.inc
-# It is desirable, as far as possible, to have the same look and feel for
-# related layouts in latex and docbook.
-
-Format 81
-Input stdlists.inc
-
-
-Style Itemize
-       LatexType             Item_Environment
-       LatexName             itemizedlist
-       ItemTag               listitem
-End
-
-
-Style Enumerate
-       LatexType             Item_Environment
-       LatexName             orderedlist
-       ItemTag               listitem
-End
-
-
-Style Description
-       LatexType             Item_environment
-       LatexName             variablelist
-       InnerTag              varlistentry
-       LabelTag              term
-       ItemTag               listitem
-End
-
-# maybe List is the same as simplelist (I need to check it).
-NoStyle List
-
diff --git a/lib/layouts/db_stdsections.inc b/lib/layouts/db_stdsections.inc
deleted file mode 100644
index e09b675..0000000
--- a/lib/layouts/db_stdsections.inc
+++ /dev/null
@@ -1,66 +0,0 @@
-# Textclass definition file for docbook.
-# Author : José Abílio Oliveira Matos <jama...@lyx.org>
-# Modified by Martin Vermeer <martin.verm...@hut.fi>
-
-# This file is the counterpart of stdsections.inc
-# It is desirable, as far as possible, to have the same look and feel for
-# related layouts in latex and docbook.
-
-Format 81
-Input stdsections.inc
-
-Style Part
-       LatexType             Command
-       LatexName             part
-       InnerTag              "title"
-       CommandDepth          0
-End
-
-
-Style Chapter
-       LatexType             Command
-       LatexName             chapter
-       InnerTag              "title"
-       CommandDepth          1
-End
-
-
-Style Section
-       LatexType             Command
-       LatexName             sect1
-       InnerTag              "title"
-       CommandDepth          2
-End
-
-
-Style Subsection
-       LatexType             Command
-       LatexName             sect2
-       InnerTag              "title"
-       CommandDepth          3
-End
-
-
-Style Subsubsection
-       LatexType             Command
-       LatexName             sect3
-       InnerTag              "title"
-       CommandDepth          4
-End
-
-
-Style Paragraph
-       LatexType             Command
-       LatexName             sect4
-       InnerTag              "title"
-       CommandDepth          5
-End
-
-
-Style Subparagraph
-       LatexType             Command
-       LatexName             sect5
-       InnerTag              "title"
-       CommandDepth          6
-End
-
diff --git a/lib/layouts/db_stdstarsections.inc 
b/lib/layouts/db_stdstarsections.inc
index 94a8a0c..33abcdd 100644
--- a/lib/layouts/db_stdstarsections.inc
+++ b/lib/layouts/db_stdstarsections.inc
@@ -3,91 +3,6 @@
 # Transposed by Pascal André <an...@via.ecp.fr>
 # Heavily modifed and enhanced by several developers.
 
-# This include files contains all non numbered versions of the
-# sectioning-related commands that are useful for article-like
-# document classes, but not for letters. It should be Input after
-# modifying the style of the regular sectioning layouts.
 
-
-Format 81
-Style Part*
-       CopyStyle             Part
-       Margin                Static
-       LatexName             bridgehead
-       LatexType             Paragraph
-       InnerTag              "!-- --"
-       LabelType             No_Label
-       LatexParam            renderas="part"
-End
-
-
-Style Chapter*
-       CopyStyle             Chapter
-       Margin                Static
-       LatexType             Paragraph
-       InnerTag              "!-- --"
-       LatexName             bridgehead
-       LabelType             No_Label
-       ResetArgs             1
-       LatexParam            renderas="chapter"
-End
-
-
-Style Section*
-       CopyStyle             Section
-       Margin                Static
-       LatexName             bridgehead
-       LatexType             Paragraph
-       InnerTag              "!-- --"
-       LabelType             No_Label
-       ResetArgs             1
-       LatexParam            renderas="sect1"
-End
-
-
-Style Subsection*
-       CopyStyle             Subsection
-       Margin                Static
-       LatexName             bridgehead
-       LatexType             Paragraph
-       InnerTag              "!-- --"
-       LabelType             No_Label
-       ResetArgs             1
-       LatexParam            renderas="sect2"
-End
-
-
-Style Subsubsection*
-       CopyStyle             Subsubsection
-       Margin                Static
-       LatexName             bridgehead
-       LatexType             Paragraph
-       InnerTag              "!-- --"
-       LabelType             No_Label
-       ResetArgs             1
-       LatexParam            renderas="sect3"
-End
-
-
-Style Paragraph*
-       CopyStyle             Paragraph
-       Margin                Static
-       LatexName             bridgehead
-       LatexType             Paragraph
-       InnerTag              "!-- --"
-       LabelType             No_Label
-       ResetArgs             1
-       LatexParam            renderas="sect4"
-End
-
-
-Style Subparagraph*
-       CopyStyle             Subparagraph
-       Margin                Static
-       LatexName             bridgehead
-       LatexType             Paragraph
-       InnerTag              "!-- --"
-       LabelType             No_Label
-       ResetArgs             1
-       LatexParam            renderas="sect5"
-End
+Format 82
+Input stdstarsections.inc
diff --git a/lib/layouts/db_stdstruct.inc b/lib/layouts/db_stdstruct.inc
deleted file mode 100644
index ccdad39..0000000
--- a/lib/layouts/db_stdstruct.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-# Textclass definition file for docbook.
-# Author : José Abílio Oliveira Matos <jama...@lyx.org>
-
-# This file is the counterpart of stdstruct.inc
-# It is desirable, as far as possible, to have the same look and feel for
-# related layouts in latex and docbook.
-
-Format 81
-Input stdstruct.inc
-
-Style Abstract
-       LatexType             Environment
-       LatexName             abstract
-       InnerTag              para
-End
-
-NoStyle Bibliography
diff --git a/lib/layouts/db_stdtitle.inc b/lib/layouts/db_stdtitle.inc
deleted file mode 100644
index ab22489..0000000
--- a/lib/layouts/db_stdtitle.inc
+++ /dev/null
@@ -1,100 +0,0 @@
-# Textclass definition file for docbook.
-# Author : José Abílio Oliveira Matos <jama...@lyx.org>
-# Modified Martin Vermeer <martin.verm...@hut.fi>
-#
-# This file is the counterpart of stdstyle.inc
-# It is desirable, as far as possible, to have the same look and feel for
-# related layouts in latex and docbook.
-
-Format 81
-Input stdtitle.inc
-
-
-Style Title
-       LatexType             Command
-       LatexName             articleinfo
-       CommandDepth          2
-       InnerTag              title
-End
-
-
-Style Author
-       LatexType             Environment
-       LatexName             author
-End
-
-
-Style Authorgroup
-       CopyStyle             Author
-       LatexType             Environment
-       LatexName             authorgroup
-       InnerTag              author
-End
-
-
-Style Date
-       LatexType             Paragraph
-       LatexName             date
-       Align                 Center
-       AlignPossible         Left,Center
-End
-
-
-Style RevisionHistory
-       Margin                Static
-       LatexType             Command
-       LatexName             revhistory
-       CommandDepth          3
-       InnerTag              "!-- --"
-       LeftMargin            MMM
-       RightMargin           MMM
-       ParIndent             MM
-       TopSep                0.7
-       BottomSep             0
-       ParSep                0
-       Align                 Block
-       KeepEmpty             1
-       LabelType             Centered
-       LabelString           "Revision History"
-       LabelBottomSep        0.5
-End
-
-
-Style Revision
-       Margin                Dynamic
-       LatexType             Command
-       LatexName             revision
-       CommandDepth          4
-       InnerTag              revnumber
-       LabelSep              xxx
-       ParSkip               0.4
-       TopSep                0.9
-       BottomSep             0.5
-       ParSep                0.5
-       Align                 Block
-End
-
-
-Style RevisionRemark
-       Margin                Static
-       LatexType             Paragraph
-       InTitle               1
-       LatexName             revremark
-       LabelSep              xxx
-       ParIndent             MM
-       ParSkip               0.0
-       TopSep                0.0
-       BottomSep             0.0
-       ParSep                1
-       Align                 Block
-       LabelType             No_Label
-End
-
-
-Style FirstName
-        ObsoletedBy   Standard
-End
-
-Style Surname
-       ObsoletedBy   Standard
-End
diff --git a/lib/layouts/docbook-book.layout b/lib/layouts/docbook-book.layout
index 800373c..b153419 100644
--- a/lib/layouts/docbook-book.layout
+++ b/lib/layouts/docbook-book.layout
@@ -1,16 +1,18 @@
 #% Do not delete the line below; configure depends on this
-#  \DeclareDocBookClass[book]{DocBook Book (SGML)}
+#  \DeclareDocBookClass[book]{DocBook Book (XML)}
 #  \DeclareCategory{Books (DocBook)}
 # DocBook textclass definition file.
 # Author : Jose' Matos <jama...@lyx.org>
 # hacked for books: Luc Abom <l...@abom.com>
 
-Format 81
+Format 82
 Input report
 Input db_stdclass.inc
 
+DocBookRoot            book
+DocBookForceAbstract   true
+
 Style Title
        LatexType             Command
-       LatexName             bookinfo
        CommandDepth          1
 End
diff --git a/lib/layouts/docbook-chapter.layout 
b/lib/layouts/docbook-chapter.layout
index 9908ac0..e00a0b6 100644
--- a/lib/layouts/docbook-chapter.layout
+++ b/lib/layouts/docbook-chapter.layout
@@ -1,15 +1,18 @@
 #% Do not delete the line below; configure depends on this
-#  \DeclareDocBookClass[chapter]{DocBook Chapter (SGML)}
+#  \DeclareDocBookClass[chapter]{DocBook Chapter (XML)}
 #  \DeclareCategory{Books (DocBook)}
 # DocBook textclass definition file.
 # Author : Jose' Matos <jama...@lyx.org>
 
-Format 81
+Format 82
 Input db_stdclass.inc
 
+SecNumDepth             2
+TocDepth                2
+DocBookRoot            chapter
+
 Style Title
        LatexType             Command
-       LatexName             "!-- --"
        CommandDepth          2
 End
 
diff --git a/lib/layouts/docbook-section.layout 
b/lib/layouts/docbook-section.layout
index 9973850..6ee3e5e 100644
--- a/lib/layouts/docbook-section.layout
+++ b/lib/layouts/docbook-section.layout
@@ -1,15 +1,18 @@
 #% Do not delete the line below; configure depends on this
-#  \DeclareDocBookClass[section]{DocBook Section (SGML)}
+#  \DeclareDocBookClass[section]{DocBook Section (XML)}
 #  \DeclareCategory{Books (DocBook)}
 # DocBook textclass definition file.
 # Author : Jose' Matos <jama...@lyx.org>
 
-Format 81
+Format 82
 Input db_stdclass.inc
 
+SecNumDepth             3
+TocDepth                3
+DocBookRoot            section
+
 Style Title
        LatexType             Command
-       LatexName             "!-- --"
        CommandDepth          3
 End
 
diff --git a/lib/layouts/docbook.layout b/lib/layouts/docbook.layout
deleted file mode 100644
index da0e6e2..0000000
--- a/lib/layouts/docbook.layout
+++ /dev/null
@@ -1,14 +0,0 @@
-#% Do not delete the line below; configure depends on this
-#  \DeclareDocBookClass[article]{DocBook Article (SGML)}
-#  \DeclareCategory{Articles (DocBook)}
-# DocBook textclass definition file.
-# Author : Jose' Matos <jama...@lyx.org>
-
-Format 81
-Input db_stdclass.inc
-
-# Exclude higher, or equal, sections:
-NoStyle Part
-NoCounter part
-NoStyle Chapter
-NoCounter chapter
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to