mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
DocBook: fix issues with nested description lists.
This commit is contained in:
parent
1ebf58de0c
commit
88e00a0b7b
179
autotests/export/docbook/description_list_nested.lyx
Normal file
179
autotests/export/docbook/description_list_nested.lyx
Normal file
@ -0,0 +1,179 @@
|
||||
#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 scrartcl
|
||||
\options BCOR8mm,captions=tableheading
|
||||
\use_default_options false
|
||||
\begin_modules
|
||||
logicalmkup
|
||||
\end_modules
|
||||
\maintain_unincluded_children no
|
||||
\language english
|
||||
\language_package default
|
||||
\inputencoding utf8
|
||||
\fontencoding auto
|
||||
\font_roman "lmodern" "default"
|
||||
\font_sans "lmss" "default"
|
||||
\font_typewriter "lmtt" "default"
|
||||
\font_math "auto" "auto"
|
||||
\font_default_family default
|
||||
\use_non_tex_fonts false
|
||||
\font_sc 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
|
||||
\use_dash_ligatures true
|
||||
\graphics default
|
||||
\default_output_format pdf2
|
||||
\output_sync 1
|
||||
\bibtex_command default
|
||||
\index_command default
|
||||
\paperfontsize 12
|
||||
\spacing single
|
||||
\use_hyperref true
|
||||
\pdf_title "LyX's Development manual"
|
||||
\pdf_author "LyX Team"
|
||||
\pdf_subject "LyX's development documentation"
|
||||
\pdf_keywords "LyX, Documentation, Development"
|
||||
\pdf_bookmarks true
|
||||
\pdf_bookmarksnumbered true
|
||||
\pdf_bookmarksopen true
|
||||
\pdf_bookmarksopenlevel 1
|
||||
\pdf_breaklinks false
|
||||
\pdf_pdfborder false
|
||||
\pdf_colorlinks true
|
||||
\pdf_backref false
|
||||
\pdf_pdfusetitle false
|
||||
\pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
|
||||
\papersize a4
|
||||
\use_geometry false
|
||||
\use_package amsmath 1
|
||||
\use_package amssymb 1
|
||||
\use_package cancel 1
|
||||
\use_package esint 1
|
||||
\use_package mathdots 1
|
||||
\use_package mathtools 1
|
||||
\use_package mhchem 1
|
||||
\use_package stackrel 1
|
||||
\use_package stmaryrd 1
|
||||
\use_package undertilde 1
|
||||
\cite_engine basic
|
||||
\cite_engine_type default
|
||||
\biblio_style plain
|
||||
\use_bibtopic false
|
||||
\use_indices false
|
||||
\paperorientation portrait
|
||||
\suppress_date false
|
||||
\justification true
|
||||
\use_refstyle 0
|
||||
\use_minted 0
|
||||
\use_lineno 0
|
||||
\notefontcolor #0000ff
|
||||
\index Index
|
||||
\shortcut idx
|
||||
\color #008000
|
||||
\end_index
|
||||
\secnumdepth 4
|
||||
\tocdepth 4
|
||||
\paragraph_separation indent
|
||||
\paragraph_indentation default
|
||||
\is_math_indent 0
|
||||
\math_numbering_side default
|
||||
\quotes_style english
|
||||
\dynamic_quotes 0
|
||||
\papercolumns 1
|
||||
\papersides 2
|
||||
\paperpagestyle headings
|
||||
\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 true
|
||||
\docbook_table_output 0
|
||||
\end_header
|
||||
|
||||
\begin_body
|
||||
|
||||
\begin_layout Title
|
||||
Developing \SpecialChar LyX
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
New
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
valid
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
value
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
for
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
an
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
existing
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
setting, e.
|
||||
\begin_inset space \thinspace{}
|
||||
\end_inset
|
||||
|
||||
g.
|
||||
\end_layout
|
||||
|
||||
\begin_deeper
|
||||
\begin_layout Description
|
||||
\paragraph_spacing single
|
||||
Automatically
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
loaded
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
math
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
package The reason
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
New
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
language that is stored
|
||||
\end_layout
|
||||
|
||||
\end_deeper
|
||||
\begin_layout Description
|
||||
New
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
inset Of course a new inset requires a file format update.
|
||||
\end_layout
|
||||
|
||||
\end_body
|
||||
\end_document
|
39
autotests/export/docbook/description_list_nested.xml
Normal file
39
autotests/export/docbook/description_list_nested.xml
Normal file
@ -0,0 +1,39 @@
|
||||
<?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.2">
|
||||
<title>Developing LyX</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>New valid value for an existing setting,</term>
|
||||
|
||||
<listitem>
|
||||
<para> e. g.</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>Automatically loaded math package</term>
|
||||
|
||||
<listitem>
|
||||
<para> The reason </para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>New language</term>
|
||||
|
||||
<listitem>
|
||||
<para> that is stored</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<!-- lastlay != nullptr; item tag: listitem; item wrapper tag: varlistentry --></listitem>
|
||||
<!-- has docbookwrappertag --></varlistentry>
|
||||
<varlistentry>
|
||||
<term>New inset</term>
|
||||
|
||||
<listitem>
|
||||
<para> Of course a new inset requires a file format update.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</article>
|
@ -1,9 +1,9 @@
|
||||
<?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">
|
||||
<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">
|
||||
<title>Test document</title>
|
||||
<para>A list: </para>
|
||||
<para>A list:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>First item</para>
|
||||
|
@ -257,7 +257,8 @@ void closeInnerItemTag(XMLStream &xs, Layout const &lay)
|
||||
|
||||
inline void closeItemTag(XMLStream &xs, Layout const &lay)
|
||||
{
|
||||
xs << xml::EndTag(lay.docbookitemtag()) << xml::CR();
|
||||
xs << xml::EndTag(lay.docbookitemtag());
|
||||
xs << xml::CR();
|
||||
}
|
||||
|
||||
// end of convenience functions
|
||||
@ -507,11 +508,17 @@ ParagraphList::const_iterator makeEnvironment(
|
||||
if (par->params().depth() == origdepth) {
|
||||
LATTEST(bstyle == style);
|
||||
if (lastlay != nullptr) {
|
||||
xs << XMLStream::ESCAPE_NONE << ("<!-- lastlay != nullptr; item tag: " + from_utf8(lastlay->docbookitemtag()) + "; item wrapper tag: " + from_utf8(lastlay->docbookitemwrappertag()) + " -->");
|
||||
closeItemTag(xs, *lastlay);
|
||||
if (lastlay->docbookitemwrappertag() != "NONE") {
|
||||
xs << XMLStream::ESCAPE_NONE << "<!-- has docbookwrappertag -->";
|
||||
xs << xml::EndTag(lastlay->docbookitemwrappertag());
|
||||
xs << xml::CR();
|
||||
}
|
||||
lastlay = nullptr;
|
||||
}
|
||||
|
||||
// this will be positive, if we want to skip the
|
||||
// this will be positive if we want to skip the
|
||||
// initial word (if it's been taken for the label).
|
||||
pos_type sep = 0;
|
||||
|
||||
@ -585,8 +592,7 @@ ParagraphList::const_iterator makeEnvironment(
|
||||
}
|
||||
}
|
||||
}
|
||||
// The other possibility is that the depth has increased, in which
|
||||
// case we need to recurse.
|
||||
// The other possibility is that the depth has increased.
|
||||
else {
|
||||
send = findEndOfEnvironment(par, pend);
|
||||
par = makeEnvironment(buf, xs, runparams, text, par, send);
|
||||
|
Loading…
Reference in New Issue
Block a user