commit 03a8208dc517f1298b5088e1cde04c696cb76c76
Author: Thibaut Cuvelier <[email protected]>
Date:   Thu Nov 12 04:45:02 2020 +0100

    DocBook: implement chess.
---
 development/autotests/invertedTests |    4 ++--
 lib/layouts/chess.layout            |   26 ++++++++++++++++++++++++++
 lib/layouts/chessboard.module       |   12 ++++++++++++
 3 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/development/autotests/invertedTests 
b/development/autotests/invertedTests
index 1be95ff..e547f23 100644
--- a/development/autotests/invertedTests
+++ b/development/autotests/invertedTests
@@ -472,10 +472,10 @@ export/doc(|/de|/es|/fr|/ja)/EmbeddedObjects_docbook5
 export/doc(|/de|/es|/fr|/ja|/ru)/Math_docbook5
 # - UserGuide: formula in inline tag, use of fancyhdr
 export/doc(|/de|/es|/fr|/ja|/ru)/UserGuide_docbook5
-# - Customization: double inlines (code within code, typically).
+# - Double inlines (code within code, personname within personname, emphasis 
within date, etc.).
 export/doc/(es|fr|ja)/Customization_docbook5
-# - Tutorial: double inlines (personname within personname).
 export/doc/gl/Tutorial_docbook5
+export/examples/Articles/Chess/Game_2_docbook5
 # - Bicaption module would require some C++ implementation.
 export/examples(|/de|/fr|/ja)/Modules/Multilingual_Captions_docbook5
 
diff --git a/lib/layouts/chess.layout b/lib/layouts/chess.layout
index d8fc777..3da45cc 100644
--- a/lib/layouts/chess.layout
+++ b/lib/layouts/chess.layout
@@ -53,6 +53,8 @@ Style Mainline
        TextFont
          Color               blue
        EndFont
+       DocBookTag            para
+       DocBookAttr           role='mainline'
 End
 
 
@@ -65,6 +67,8 @@ Style Variation
        LatexName             lyxvariation[1]
        LabelString           "Variation:"
        LeftMargin            MMMMMMMMM
+       DocBookTag            para
+       DocBookAttr           role='variation'
 End
 
 
@@ -74,6 +78,8 @@ Style SubVariation
        LatexName             lyxvariation[2]
        LabelString           "Subvariation:"
        LeftMargin            MMMMMMMMMMMM
+       DocBookTag            para
+       DocBookAttr           role='subvariation'
 End
 
 
@@ -83,6 +89,8 @@ Style SubVariation2
        LatexName             lyxvariation[3]
        LabelString           "Subvariation(2):"
        LeftMargin            MMMMMMMMMMMMMMM
+       DocBookTag            para
+       DocBookAttr           role='subsubvariation'
 End
 
 
@@ -92,6 +100,8 @@ Style SubVariation3
        LatexName             lyxvariation[4]
        LabelString           "Subvariation(3):"
        LeftMargin            MMMMMMMMMMMMMMMMMM
+       DocBookTag            para
+       DocBookAttr           role='subsubsubvariation'
 End
 
 
@@ -101,6 +111,8 @@ Style SubVariation4
        LatexName             lyxvariation[5]
        LabelString           "Subvariation(4):"
        LeftMargin            MMMMMMMMMMMMMMMMMMMMM
+       DocBookTag            para
+       DocBookAttr           role='subsubsubsubvariation'
 End
 
 
@@ -110,6 +122,8 @@ Style SubVariation5
        LatexName             lyxvariation[6]
        LabelString           "Subvariation(5):"
        LeftMargin            MMMMMMMMMMMMMMMMMMMMMMMM
+       DocBookTag            para
+       DocBookAttr           role='subsubsubsubsubvariation'
 End
 
 
@@ -121,6 +135,8 @@ Style HideMoves
        LeftMargin            "HideMoves:M"
        LabelSep              M
        LabelString           "HideMoves:"
+       DocBookTag            para
+       DocBookAttr           role='hide-moves'
 End
 
 
@@ -134,6 +150,8 @@ Style ChessBoard
        LabelFont
          Color               red
        EndFont
+       DocBookTag            para
+       DocBookAttr           role='chess-board'
 End
 
 
@@ -148,6 +166,8 @@ Style BoardCentered
        LabelFont
          Color                red
        EndFont
+       DocBookTag            para
+       DocBookAttr           role='board-centered'
 End
 
 
@@ -168,6 +188,8 @@ Style HighLight
          Series              Bold
          Color               black
        EndFont
+       DocBookTag            para
+       DocBookAttr           role='highlights'
 End
 
 
@@ -179,6 +201,8 @@ Style Arrow
        LatexName             lyxprintarrow
        LeftMargin            MMMMMMMM
        LabelString           "Arrow:"
+       DocBookTag            para
+       DocBookAttr           role='arrow'
 End
 
 
@@ -190,6 +214,8 @@ Style KnightMove
        LatexName             lyxknightmove
        LeftMargin            MMMMMMMM
        LabelString           "KnightMove:"
+       DocBookTag            para
+       DocBookAttr           role='knight-move'
 End
 
 Input article.layout
diff --git a/lib/layouts/chessboard.module b/lib/layouts/chessboard.module
index d49083b..2c874d7 100644
--- a/lib/layouts/chessboard.module
+++ b/lib/layouts/chessboard.module
@@ -38,6 +38,8 @@ Style NewChessGame
                EndFont
        EndArgument
        Requires                xskak
+       DocBookTag      para
+       DocBookAttr     role='new-chess-game'
 End
 
 
@@ -74,12 +76,16 @@ InsetLayout Flex:Mainline
                EndFont
        EndArgument
        Requires                xskak
+       DocBookTag      para
+       DocBookAttr     role='mainline'
 End
 
 InsetLayout Flex:Variation
        CopyStyle               Flex:Mainline
        LatexName               variation
        LabelString             Variation
+       DocBookTag      para
+       DocBookAttr     role='variation'
 End
 
 
@@ -101,6 +107,8 @@ InsetLayout Flex:SetChessBoard
                Color           blue
        EndFont
        Requires                chessboard
+       DocBookTag      para
+       DocBookAttr     role='set-chess-board'
 End
 
 
@@ -115,6 +123,8 @@ InsetLayout Flex:SetBoardStoreStyle
                AutoInsert      true
                Decoration      conglomerate
        EndArgument
+       DocBookTag      para
+       DocBookAttr     role='set-board-store-style'
 End
 
 
@@ -136,5 +146,7 @@ InsetLayout Flex:ChessBoard
                EndFont
        EndArgument
        Requires                chessboard
+       DocBookTag      para
+       DocBookAttr     role='chess-board'
 End
 
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to