[LyX/master] DocBook: fix indentation for section titles (including stars).

Thibaut Cuvelier tcuvelier at lyx.org
Sat Sep 19 18:18:55 UTC 2020


commit 97cfabb8831ea5ab58b46f470dcecd317b26df04
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Sat Aug 29 18:40:31 2020 +0200

    DocBook: fix indentation for section titles (including stars).
---
 autotests/export/docbook/basic.lyx |   31 ++++++++++++++---
 autotests/export/docbook/basic.xml |   62 +++++++++++++++++++++++-------------
 lib/layouts/stdsections.inc        |    5 ++-
 3 files changed, 69 insertions(+), 29 deletions(-)

diff --git a/autotests/export/docbook/basic.lyx b/autotests/export/docbook/basic.lyx
index 0bd87ce..1735dc4 100644
--- a/autotests/export/docbook/basic.lyx
+++ b/autotests/export/docbook/basic.lyx
@@ -1,5 +1,5 @@
-#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
@@ -9,11 +9,11 @@
 \newcommand{\testmacro}{\ensuremath{\operatorname{testmacro}}}
 \end_preamble
 \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"
@@ -21,7 +21,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
@@ -56,6 +58,7 @@
 \justification true
 \use_refstyle 1
 \use_minted 0
+\use_lineno 0
 \index Index
 \shortcut idx
 \color #008000
@@ -75,11 +78,15 @@
 \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
@@ -140,6 +147,10 @@ I am a quote
 \end_layout
 
 \begin_layout Standard
+Now, we're outside quotes.
+\end_layout
+
+\begin_layout Standard
 \begin_inset Formula 
 \[
 Formula!
@@ -386,6 +397,8 @@ Now, three tables:
 
 \begin_layout Standard
 \begin_inset Float table
+placement document
+alignment document
 wide false
 sideways false
 status open
@@ -511,6 +524,8 @@ I am a table caption below the table.
 
 \begin_layout Standard
 \begin_inset Float table
+placement document
+alignment document
 wide false
 sideways false
 status open
@@ -636,6 +651,8 @@ Col 3, row 2
 
 \begin_layout Standard
 \begin_inset Float table
+placement document
+alignment document
 wide false
 sideways false
 status open
@@ -753,6 +770,8 @@ Then, one figure:
 
 \begin_layout Standard
 \begin_inset Float figure
+placement document
+alignment document
 wide false
 sideways false
 status open
diff --git a/autotests/export/docbook/basic.xml b/autotests/export/docbook/basic.xml
index 6f4a828..7980289 100644
--- a/autotests/export/docbook/basic.xml
+++ b/autotests/export/docbook/basic.xml
@@ -29,6 +29,7 @@
  </m:math>
 </inlineequation>. </para>
 </blockquote>
+<para>Now, we're outside quotes.</para>
 <para><informalequation>
 <alt role='tex'>Formula!</alt>
  <m:math>
@@ -72,22 +73,37 @@
 </section>
 <section>
 <title>I am the third section and I have fun with lists</title>
-<orderedlist><listitem>First item. 
-<br />
-Second line of the first item, after a line break. </listitem></orderedlist>
-<orderedlist><listitem>Second item. </listitem></orderedlist>
-<itemizedlist><listitem>Item has no order (1). </listitem></itemizedlist>
-<itemizedlist><listitem>Item has no order (2). </listitem></itemizedlist>
-<variablelist><listitem><varlistentry>
-
-Word description<!-- Output Error: Closing tag `listitem' when other tags are open, namely: -->
-<!-- Output Error: varlistentry -->
-</varlistentry></listitem></variablelist>
-<variablelist><listitem><varlistentry>
-
-Sentence meaning<!-- Output Error: Closing tag `listitem' when other tags are open, namely: -->
-<!-- Output Error: varlistentry -->
-</varlistentry></listitem></variablelist>
+<orderedlist>
+<listitem>
+<para>First item. </para>
+<para>Second line of the first item, after a line break. </para>
+</listitem>
+<listitem>
+<para>Second item. </para>
+</listitem>
+</orderedlist>
+<itemizedlist>
+<listitem>
+<para>Item has no order (1). </para>
+</listitem>
+<listitem>
+<para>Item has no order (2). </para>
+</listitem>
+</itemizedlist>
+<variablelist>
+<varlistentry>
+<term>Word</term>
+<listitem>
+<para>description</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>Sentence</term>
+<listitem>
+<para>meaning</para>
+</listitem>
+</varlistentry>
+</variablelist>
 </section>
 <section>
 <title>I am the fourth section and I deal with formatting. </title>
@@ -95,9 +111,11 @@ Sentence meaning<!-- Output Error: Closing tag `listitem' when other tags are op
 <para><programlisting>I am some code. 
 I am a second line of code. 
 </programlisting>I am no more code. </para>
-<para>This line has inline code. <code>This has typewriter font</code><footnote><para>I repeat that in a footnote.</para>
+<para>This line has inline code. <code>This has typewriter font</code><footnote>
+<para>I repeat that in a footnote.</para>
 </footnote>. </para>
-<para>On the other hand, <footnote><para>this footnote</para>
+<para>On the other hand, <footnote>
+<para>this footnote</para>
 <para>has multiple </para>
 <para>paragraphs.</para>
 </footnote>. </para>
@@ -145,7 +163,7 @@ I am a second line of code.
 </tr>
 </tbody>
 </table>
-<informaltable>
+<table>
 <tbody>
 <tr>
 <td align='center' valign='top'>Table that has no caption 1</td>
@@ -163,7 +181,8 @@ I am a second line of code.
 <td align='center' valign='top'>Col 3, row 2</td>
 </tr>
 </tbody>
-</informaltable>
+</table>
+
 <para>Then, one figure: </para>
 <figure>
 <title>Caption.</title>
@@ -334,5 +353,4 @@ I am a second line of code.
 </author>
 </authorgroup>
 </biblioentry>
-</bibliography>
-</article>
\ No newline at end of file
+</bibliography></article>
\ No newline at end of file
diff --git a/lib/layouts/stdsections.inc b/lib/layouts/stdsections.inc
index fa42eac..30b64ea 100644
--- a/lib/layouts/stdsections.inc
+++ b/lib/layouts/stdsections.inc
@@ -7,7 +7,7 @@
 # commands that are useful for article-like document classes, but not
 # for letters.
 
-Format 82
+Format 84
 
 Style Part
 	Category              Sectioning
@@ -40,6 +40,7 @@ Style Part
 	EndFont
 	HTMLTag               h1
 	DocBookTag            title
+	DocBookTagType        paragraph
 	DocBookSectionTag     part
 	DocBookForceAbstractTag	partintro
 End
@@ -75,6 +76,7 @@ Style Chapter
 	EndFont
 	HTMLTag               h1
 	DocBookTag            title
+	DocBookTagType        paragraph
 	DocBookSectionTag     chapter
 End
 
@@ -108,6 +110,7 @@ Style Section
 	EndFont
 	HTMLTag               h2
 	DocBookTag            title
+	DocBookTagType        paragraph
 	DocBookSectionTag     section
 End
 


More information about the lyx-cvs mailing list