]> git.lyx.org Git - lyx.git/commitdiff
DocBook: restore the old DocBook support.
authorThibaut Cuvelier <tcuvelier@lyx.org>
Wed, 7 Oct 2020 03:33:56 +0000 (05:33 +0200)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Wed, 7 Oct 2020 03:33:56 +0000 (05:33 +0200)
autotests/export/docbook/olddb_article.lyx
autotests/export/docbook/olddb_article.xml
autotests/export/docbook/olddb_book.lyx
autotests/export/docbook/olddb_book.xml
lib/layouts/db_stdclass.inc [new file with mode: 0644]
lib/layouts/db_stdstruct.inc [new file with mode: 0644]
lib/layouts/db_stdtitle.inc [new file with mode: 0644]
lib/layouts/docbook-book.layout
lib/layouts/docbook-chapter.layout
lib/layouts/docbook-section.layout
lib/layouts/docbook.layout [new file with mode: 0644]

index 174a226925cf350b3d9317316dc6db926a10ee3f..892cbe1043647527ecefdde0f668dd1d17b87ac9 100644 (file)
@@ -1,16 +1,16 @@
-#LyX 2.4 created this file. For more info see http://www.lyx.org/
-\lyxformat 544
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 598
 \begin_document
 \begin_header
 \save_transient_properties true
 \origin unavailable
 \textclass docbook
 \use_default_options true
-\maintain_unincluded_children false
+\maintain_unincluded_children no
 \language english
 \language_package default
-\inputencoding auto
-\fontencoding global
+\inputencoding auto-legacy
+\fontencoding auto
 \font_roman "default" "default"
 \font_sans "default" "default"
 \font_typewriter "default" "default"
@@ -18,7 +18,9 @@
 \font_default_family default
 \use_non_tex_fonts false
 \font_sc false
-\font_osf false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
 \font_sf_scale 100 100
 \font_tt_scale 100 100
 \use_microtype false
@@ -53,6 +55,7 @@
 \justification true
 \use_refstyle 1
 \use_minted 0
+\use_lineno 0
 \index Index
 \shortcut idx
 \color #008000
 \papercolumns 1
 \papersides 1
 \paperpagestyle default
+\tablestyle default
 \tracking_changes false
 \output_changes false
+\change_bars false
+\postpone_fragile_content false
 \html_math_output 0
 \html_css_as_file 0
 \html_be_strict false
+\docbook_table_output 0
 \end_header
 
 \begin_body
@@ -98,6 +105,10 @@ Article abstract.
  
 \end_layout
 
+\begin_layout Standard
+\begin_inset Note Note
+status collapsed
+
 \begin_layout RevisionHistory
 Article revision history.
  
@@ -113,9 +124,13 @@ Article revision remark.
  
 \end_layout
 
-\begin_layout Verse
-Literal.
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Content.
 \end_layout
 
 \end_body
index 7cd3de3edc87d18ec6eaba5e6286ce9c4d88d795..8ebaba6ff7a25f65ebbcbc8f191f8c11c591732e 100644 (file)
@@ -1,25 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- This DocBook file was created by LyX 2.4.0dev
   See http://www.lyx.org/ for more information -->
-<article xml:lang="en_US" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.1">
-
-<info><title>Article title</title>
-
-<author><personname>Article author
-</personname></author>
-
-<author><personname>Article author group
-</personname></author>
+<article xml:lang="en_US" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.2">
+<info>
+<title>Article title</title>
+<author>
+<personname>Article author</personname>
+</author>
+<authorgroup>
+<author>Article author group</author>
+</authorgroup>
 <date>Article date</date>
-
-<abstract><para>Article abstract. </para>
+<abstract>
+<para>Article abstract. </para>
 </abstract>
-</info>
-<RevisionHistory>Article revision history. </RevisionHistory>
-<Revision>Article revision. </Revision>
-<RevisionRemark>Article revision remark. </RevisionRemark>
-
-<literallayout><para>Literal. </para>
-</literallayout>
 
+</info>
+<para>Content.</para>
 </article>
\ No newline at end of file
index 801086e0175004c240dca1676787a5081cbe7026..0f8e6594d8d00e549920a7f4896bdcbfb5713c2c 100644 (file)
@@ -1,16 +1,16 @@
-#LyX 2.4 created this file. For more info see http://www.lyx.org/
-\lyxformat 544
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 598
 \begin_document
 \begin_header
 \save_transient_properties true
 \origin unavailable
 \textclass docbook-book
 \use_default_options true
-\maintain_unincluded_children false
+\maintain_unincluded_children no
 \language english
 \language_package default
-\inputencoding auto
-\fontencoding global
+\inputencoding auto-legacy
+\fontencoding auto
 \font_roman "default" "default"
 \font_sans "default" "default"
 \font_typewriter "default" "default"
@@ -18,7 +18,9 @@
 \font_default_family default
 \use_non_tex_fonts false
 \font_sc false
-\font_osf false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
 \font_sf_scale 100 100
 \font_tt_scale 100 100
 \use_microtype false
@@ -53,6 +55,7 @@
 \justification true
 \use_refstyle 1
 \use_minted 0
+\use_lineno 0
 \index Index
 \shortcut idx
 \color #008000
 \papercolumns 1
 \papersides 1
 \paperpagestyle default
+\tablestyle default
 \tracking_changes false
 \output_changes false
+\change_bars false
+\postpone_fragile_content false
 \html_math_output 0
 \html_css_as_file 0
 \html_be_strict false
+\docbook_table_output 0
 \end_header
 
 \begin_body
@@ -98,6 +105,10 @@ Book abstract.
  
 \end_layout
 
+\begin_layout Standard
+\begin_inset Note Note
+status collapsed
+
 \begin_layout RevisionHistory
 Book revision history.
  
@@ -113,9 +124,17 @@ Book revision remark.
  
 \end_layout
 
-\begin_layout Verse
-Literal.
+\end_inset
+
+
+\end_layout
+
+\begin_layout Chapter
+Chapter
+\end_layout
+
+\begin_layout Standard
+Content.
 \end_layout
 
 \end_body
index 5debd71ff996a38357d3318e44cf54842fc14d49..71befec57f5aa19d13b4616bd5d4b9f6ef36db16 100644 (file)
@@ -1,28 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- This DocBook file was created by LyX 2.4.0dev
   See http://www.lyx.org/ for more information -->
-<book xml:lang="en_US" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.1">
-
-<info><title>Book title</title>
-
-<author><personname>Book author
-</personname></author>
-
-<author><personname>Book author group
-</personname></author>
+<book xml:lang="en_US" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.2">
+<info>
+<title>Book title</title>
+<author>
+<personname>Book author</personname>
+</author>
+<authorgroup>
+<author>Book author group</author>
+</authorgroup>
 <date>Book date</date>
-
-<abstract><para>Book abstract. </para>
+<abstract>
+<para>Book abstract. </para>
 </abstract>
 
-<abstract><RevisionHistory>Book revision history. </RevisionHistory>
-</abstract>
 </info>
-<Revision>Book revision. </Revision>
-<RevisionRemark>Book revision remark. </RevisionRemark>
-
-
-<info><literallayout><para>Literal. </para>
-</literallayout>
-
+<chapter>
+<title>Chapter</title>
+<para>Content.</para>
+</chapter>
 </book>
\ No newline at end of file
diff --git a/lib/layouts/db_stdclass.inc b/lib/layouts/db_stdclass.inc
new file mode 100644 (file)
index 0000000..446af07
--- /dev/null
@@ -0,0 +1,39 @@
+# Textclass definition file for docbook.
+# Author : José Abílio Oliveira Matos <jamatos@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 84
+
+Columns                 1
+Sides                   1
+SecNumDepth             3
+TocDepth                3
+DefaultStyle            Standard
+
+Style Standard
+       Category              MainText
+       Margin                Static
+       LatexType             Paragraph
+       LatexName             para
+       ParIndent             MM
+       ParSkip               0.4
+       Align                 Block
+       LabelType             No_Label
+       DocBookTag            para
+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_stdstruct.inc b/lib/layouts/db_stdstruct.inc
new file mode 100644 (file)
index 0000000..b42f09a
--- /dev/null
@@ -0,0 +1,21 @@
+# Textclass definition file for docbook.
+# Author : José Abílio Oliveira Matos <jamatos@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 84
+Input stdstruct.inc
+
+Style Abstract
+       LatexType             Environment
+       LatexName             abstract
+       DocBookAbstract       true
+       DocBookInInfo         always
+       DocBookWrapperTag     abstract
+       DocBookWrapperMergeWithPrevious    true
+       DocBookTag            para
+End
+
+NoStyle Bibliography
diff --git a/lib/layouts/db_stdtitle.inc b/lib/layouts/db_stdtitle.inc
new file mode 100644 (file)
index 0000000..9adc1bb
--- /dev/null
@@ -0,0 +1,88 @@
+# Textclass definition file for docbook.
+# Author : José Abílio Oliveira Matos <jamatos@lyx.org>
+# Modified Martin Vermeer <martin.vermeer@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 84
+Input stdtitle.inc
+
+
+Style Authorgroup
+       CopyStyle             Author
+       LatexType             Environment
+       LatexName             authorgroup
+       # TODO: missing a DocBookInnerTag to be valid (authorgroup > author > personname). 
+       DocBookTag            author
+       DocBookTagType        paragraph
+       DocBookWrapperTag     authorgroup
+       DocBookWrapperTagType paragraph
+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
+       DocBookTag            revhistory
+       DocBookTagType        paragraph
+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
+       DocBookTag            revision
+       DocBookTagType        paragraph
+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
+       DocBookTag            revremark
+       DocBookTagType        paragraph
+End
+
+
+Style FirstName
+       ObsoletedBy   Standard
+End
+
+Style Surname
+       ObsoletedBy   Standard
+End
index 525bddb27e56581a0d258f42b371ef9b46e58a41..4b1c9d44c8c726d1fe63ece93d69844b247eb4c6 100644 (file)
@@ -1,4 +1,7 @@
 #% Do not delete the line below; configure depends on this
+#  \DeclareLaTeXClass[docbook5_book]{DocBook Book (XML)}
+#  \DeclareCategory{Books}
+#% Do not delete the line below; configure depends on this
 #  \DeclareDocBookClass[book]{DocBook Book (XML)}
 #  \DeclareCategory{Books (DocBook)}
 # DocBook textclass definition file.
index 294059247cc9c998f058897fb3a054adf4e7d418..dd475729e51e5631843a532d18e188e5c07c9992 100644 (file)
@@ -1,6 +1,6 @@
 #% Do not delete the line below; configure depends on this
-#  \DeclareDocBookClass[chapter]{DocBook Chapter (XML)}
-#  \DeclareCategory{Books (DocBook)}
+#  \DeclareLaTeXClass[docbook5_chapter]{DocBook Chapter (XML)}
+#  \DeclareCategory{Books}
 # DocBook textclass definition file.
 # Author : Jose' Matos <jamatos@lyx.org>
 
index 4107a1925dfa96c22f8680dc514168792daa7334..5aab79502d3ffae7eeeeb0b7aa87d3956f513b75 100644 (file)
@@ -1,6 +1,6 @@
 #% Do not delete the line below; configure depends on this
-#  \DeclareDocBookClass[section]{DocBook Section (XML)}
-#  \DeclareCategory{Books (DocBook)}
+#  \DeclareLaTeXClass[docbook5_section]{DocBook Section (XML)}
+#  \DeclareCategory{Books}
 # DocBook textclass definition file.
 # Author : Jose' Matos <jamatos@lyx.org>
 
diff --git a/lib/layouts/docbook.layout b/lib/layouts/docbook.layout
new file mode 100644 (file)
index 0000000..c8adf18
--- /dev/null
@@ -0,0 +1,14 @@
+#% Do not delete the line below; configure depends on this
+#  \DeclareLaTeXClass[docbook]{DocBook Article (XML)}
+#  \DeclareCategory{Articles}
+# DocBook textclass definition file.
+# Author : Jose' Matos <jamatos@lyx.org>
+
+Format 84 
+Input db_stdclass.inc
+
+# Exclude higher, or equal, sections:
+NoStyle Part
+NoCounter part
+NoStyle Chapter
+NoCounter chapter