commit 877806f208b196236bdbbf48a793799330bcbfbb
Author: Thibaut Cuvelier <[email protected]>
Date:   Sun Nov 29 01:15:37 2020 +0100

    DocBook: implement SciPoster.
---
 development/autotests/invertedTests |    8 +++++-
 lib/layouts/multicol.module         |   11 +++++++++-
 lib/layouts/sciposter.layout        |    8 +++++++
 lib/layouts/sectionbox.module       |   36 ++++++++++++++++++++--------------
 src/insets/InsetText.cpp            |    1 +
 5 files changed, 46 insertions(+), 18 deletions(-)

diff --git a/development/autotests/invertedTests 
b/development/autotests/invertedTests
index 54f2f84..b31ecf8 100644
--- a/development/autotests/invertedTests
+++ b/development/autotests/invertedTests
@@ -427,8 +427,9 @@ export/mathmacros/testcases_speed_docbook5
 export/mathmacros/testcases_environments_docbook5
 export/mathmacros/masterOfSpace_docbook5
 export/doc/sl/Tutorial_docbook5
-# - Sidebars can be nested in LyX (mostly with shapepar), but not in DocBook.
-export/doc(|/de|/es|/fr|/ja)/Additional_docbook5
+# - Sidebars can be nested in LyX (mostly with shapepar), but not in DocBook. 
Also, multicol issues (like columns in
+#   columns).
+export/doc(|/de|/es|/fr|/ja|/ru)/Additional_docbook5
 # - Many templates are too complex for automatic conversion to work reliably.
 #   The resulting documents should still be easy to fully convert into DocBook.
 #   - AASTeX.
@@ -529,6 +530,9 @@ 
export/templates/Articles/American_Psychological_Association_%28APA%29,_v._7_doc
 # - Empty figure. Dedications: IEEE wants them in the preamble, DocBook 
outside. How to implement biographies?
 #   They should have their own section...
 export/templates/Articles/IEEE_Transactions(.*)_docbook5
+# - Bibliography in the middle of the document (potentially fixable, but 
complicated, because some documents have
+#   several bibliographies, like books with one bibliography per chapter), 
subsections.
+export/export/docbook/SciPoster_docbook5
 
 Sublabel: docbook poster
 # Posters cannot be properly exported, the LyX documents are too far from
diff --git a/lib/layouts/multicol.module b/lib/layouts/multicol.module
index 3756208..c932714 100644
--- a/lib/layouts/multicol.module
+++ b/lib/layouts/multicol.module
@@ -22,16 +22,25 @@ InsetLayout Flex:Multiple_Columns
     Mandatory          1
     DefaultArg         2
     PassThru           1
+       DocBookTag      IGNORE
   EndArgument
   Argument 2
     LabelString                "Preface"
     Tooltip                    "An optional preface"
+       DocBookTag      para
+       DocBookAttr     role='preface'
+       DocBookArgumentBeforeMainTag  true
   EndArgument
   Argument 3
     LabelString                "Space Before Page Break"
     Tooltip                    "Free space that needs to be on the page to 
start the multiple columns on this page"
     Requires           2
+       DocBookTag      IGNORE
   EndArgument
-       ResetsFont true
+  ResetsFont        true
+  DocBookWrapperTag NONE
+  DocBookTag        NONE
+  DocBookNotInPara  true
+  DocBookItemTag    para
 End
 
diff --git a/lib/layouts/sciposter.layout b/lib/layouts/sciposter.layout
index d4bdebd..1cce39f 100644
--- a/lib/layouts/sciposter.layout
+++ b/lib/layouts/sciposter.layout
@@ -181,3 +181,11 @@ InsetLayout Flex:Most_Giant_Snippet
        LabelString           "Most Giant"
        LeftDelim             {\VERYHuge{}
 End
+
+# InsetLayout Flex:Multiple_Columns
+#   DocBookWrapperTag NONE
+#   DocBookTag        NONE
+#   DocBookItemWrapperTag  NONE
+#   DocBookItemTag    NONE
+#   DocBookNotInPara  true
+# End
diff --git a/lib/layouts/sectionbox.module b/lib/layouts/sectionbox.module
index 75e81e0..bcf61ef 100644
--- a/lib/layouts/sectionbox.module
+++ b/lib/layouts/sectionbox.module
@@ -10,18 +10,19 @@
 Format 85
 
 InsetLayout Flex:SectionBox
-       LyXType               custom
-       LabelString           "Section Box"
-       LatexType             environment
-       LatexName             sectionbox
-       Decoration            classic
-       MultiPar              true
-       CustomPars            true
-       Requires              sectionbox
+       LyXType            custom
+       LabelString        "Section Box"
+       LatexType          environment
+       LatexName          sectionbox
+       Decoration         classic
+       MultiPar           true
+       CustomPars         true
+       Requires               sectionbox
        Argument 1
                LabelString    "Width"
                MenuString     "Section Box Width|S"
                Tooltip        "Width of the section Box"
+               DocBookTag     IGNORE
        EndArgument
        Argument 2
                LabelString    "Heading"
@@ -34,19 +35,24 @@ InsetLayout Flex:SectionBox
                    Size       Large
                    Series     Bold
                EndFont
+               DocBookTag     title
+               DocBookTagType paragraph
+               DocBookArgumentBeforeMainTag  true
        EndArgument
-       ResetsFont             true
+       ResetsFont         true
+       DocBookTag         section
+       DocBookItemTag     para
 End
 
 InsetLayout Flex:SubsectionBox
-       CopyStyle             Flex:SectionBox
-       LabelString           "Subsection Box"
-       LatexName             subsectionbox
+       CopyStyle          Flex:SectionBox
+       LabelString        "Subsection Box"
+       LatexName          subsectionbox
 End
 
 InsetLayout Flex:SubsubsectionBox
-       CopyStyle             Flex:SectionBox
-       LabelString           "Subsubsection Box"
-       LatexName             subsubsectionbox
+       CopyStyle          Flex:SectionBox
+       LabelString        "Subsubsection Box"
+       LatexName          subsubsectionbox
 End
 
diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp
index bf1fe62..78e389c 100644
--- a/src/insets/InsetText.cpp
+++ b/src/insets/InsetText.cpp
@@ -673,6 +673,7 @@ void InsetText::docbook(XMLStream & xs, OutputParams const 
& rp, XHTMLOptions op
        runparams.docbook_prepended_arguments = std::move(prependedArguments);
 
        // - Deal with the first item.
+       // TODO: in things like SciPoster, this should also check if the item 
tag is allowed. Hard to formalise for now...
        if (writeOuterTag) {
                if (!il.docbookitemwrappertag().empty() && 
il.docbookitemwrappertag() != "NONE" && il.docbookitemwrappertag() != "IGNORE")
                        xml::openTag(xs, il.docbookitemwrappertag(), 
il.docbookitemwrapperattr(), il.docbookitemwrappertagtype());
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to