commit 66259b0eb68a5814fee2a886051a6dec067eb3a5
Author: Thibaut Cuvelier <[email protected]>
Date:   Thu Jul 17 06:13:37 2025 +0200

    Add a test case for 6e607c99.
    
    It is based on the test case from https://www.lyx.org/trac/ticket/13194, 
with the removal of a dangling reference.
---
 .../docbook/index_print_not_as_paragraph.lyx       | 672 +++++++++++++++++++++
 .../docbook/index_print_not_as_paragraph.xml       | 125 ++++
 2 files changed, 797 insertions(+)

diff --git a/autotests/export/docbook/index_print_not_as_paragraph.lyx 
b/autotests/export/docbook/index_print_not_as_paragraph.lyx
new file mode 100644
index 0000000000..70aa11eb35
--- /dev/null
+++ b/autotests/export/docbook/index_print_not_as_paragraph.lyx
@@ -0,0 +1,672 @@
+#LyX 2.5 created this file. For more info see https://www.lyx.org/
+\lyxformat 641
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language english
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "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 default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\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 default
+\crossref_package prettyref
+\use_formatted_ref 0
+\use_minted 0
+\use_lineno 0
+\backgroundcolor none
+\fontcolor none
+\notefontcolor none
+\boxbgcolor none
+\table_border_color default
+\table_odd_row_color default
+\table_even_row_color default
+\table_alt_row_colors_start 1
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\docbook_mathml_prefix 1
+\docbook_mathml_version 0
+\end_header
+
+\begin_body
+
+\begin_layout Title
+Color Test
+\end_layout
+
+\begin_layout Author
+Iris
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset toc
+LatexCommand tableofcontents
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Insets
+\end_layout
+
+\begin_layout Standard
+This is a text.
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+Footnote comes here.
+\end_layout
+
+\end_inset
+
+ It shows how 
+\begin_inset Nomenclature
+status open
+
+\begin_layout Plain Layout
+
+\family roman
+\series medium
+\shape up
+\size normal
+\emph off
+\nospellcheck off
+\bar no
+\strikeout off
+\xout off
+\uuline off
+\uwave off
+\noun off
+\color none
+color theme
+\family default
+\series default
+\shape default
+\size default
+\emph default
+\nospellcheck default
+\bar default
+\strikeout default
+\xout default
+\uuline default
+\uwave default
+\noun default
+\color inherit
+
+\begin_inset Argument post:1
+status open
+
+\begin_layout Plain Layout
+Color Theme
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+color theme looks like.
+ Important 
+\begin_inset Index idx
+range none
+pageformat default
+status open
+
+\begin_layout Plain Layout
+
+\family roman
+\series medium
+\shape up
+\size normal
+\emph off
+\nospellcheck off
+\bar no
+\strikeout off
+\xout off
+\uuline off
+\uwave off
+\noun off
+\color none
+words
+\end_layout
+
+\end_inset
+
+words.
+\begin_inset listings
+inline false
+status open
+
+\begin_layout Plain Layout
+Sometimes I write a code.
+\end_layout
+
+\end_inset
+
+Or sometimes I write
+\begin_inset space \space{}
+\end_inset
+
+equations.
+\begin_inset Formula 
+\begin{align*}
+y & =x\\
+z & =y\text{Text in math.}
+\end{align*}
+
+\end_inset
+
+Writing a small math in text too such as 
+\begin_inset Formula $y=x$
+\end_inset
+
+.
+\begin_inset Marginal
+status open
+
+\begin_layout Plain Layout
+By the way,
+ this goes to margin.
+\end_layout
+
+\end_inset
+
+ 
+\begin_inset Float table
+placement document
+alignment document
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Table
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:Table"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="2" columns="2">
+<features borderColor="default" oddRowsColor="default" evenRowsColor="default" 
tabularvalignment="middle">
+<column alignment="center" valignment="top" color="default">
+<column alignment="center" valignment="top" color="default">
+<row color="default">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" color="default" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+A
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" rightline="true" color="default" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+B
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row color="default">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" color="default" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+C
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" rightline="true" color="default" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+D
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+I'm referring to Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:Table"
+plural "false"
+caps "false"
+noprefix "false"
+nolink "false"
+tuple "list"
+
+\end_inset
+
+.
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+LyX note.
+\end_layout
+
+\end_inset
+
+
+\begin_inset Note Comment
+status open
+
+\begin_layout Plain Layout
+Comment
+\end_layout
+
+\end_inset
+
+
+\begin_inset Note Greyedout
+status open
+
+\begin_layout Plain Layout
+greyed out
+\end_layout
+
+\end_inset
+
+ 
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
+URL
+\end_layout
+
+\end_inset
+
+
+\begin_inset CommandInset href
+LatexCommand href
+name "LyX's webpage"
+target "https:://www.lyx.org/"
+literal "false"
+
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+\backslash
+LaTeX { code}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Preview
+
+\begin_layout Standard
+Preview
+\end_layout
+
+\end_inset
+
+
+\begin_inset Info
+type  "date"
+arg   "loclong"
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Boxes
+\end_layout
+
+\begin_layout Standard
+\begin_inset Box Frameless
+position "t"
+hor_pos "c"
+has_inner_box 1
+inner_pos "t"
+use_parbox 0
+use_makebox 0
+width "100col%"
+special "none"
+height "1in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "default"
+backgroundcolor "none"
+status open
+
+\begin_layout Plain Layout
+Without boundaries
+\end_layout
+
+\end_inset
+
+
+\begin_inset Box Boxed
+position "t"
+hor_pos "c"
+has_inner_box 1
+inner_pos "t"
+use_parbox 0
+use_makebox 0
+width "100col%"
+special "none"
+height "1in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "default"
+backgroundcolor "none"
+status open
+
+\begin_layout Plain Layout
+Simple box
+\end_layout
+
+\end_inset
+
+
+\begin_inset Box ovalbox
+position "t"
+hor_pos "c"
+has_inner_box 1
+inner_pos "t"
+use_parbox 0
+use_makebox 0
+width "100col%"
+special "none"
+height "1in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "default"
+backgroundcolor "none"
+status open
+
+\begin_layout Plain Layout
+Ellipse
+\end_layout
+
+\end_inset
+
+
+\begin_inset Box Ovalbox
+position "t"
+hor_pos "c"
+has_inner_box 1
+inner_pos "t"
+use_parbox 0
+use_makebox 0
+width "100col%"
+special "none"
+height "1in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "default"
+backgroundcolor "none"
+status open
+
+\begin_layout Plain Layout
+Ellipse bold
+\end_layout
+
+\end_inset
+
+
+\begin_inset Box Shadowbox
+position "t"
+hor_pos "c"
+has_inner_box 1
+inner_pos "t"
+use_parbox 0
+use_makebox 0
+width "100col%"
+special "none"
+height "1in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "default"
+backgroundcolor "none"
+status open
+
+\begin_layout Plain Layout
+Shadow
+\end_layout
+
+\end_inset
+
+
+\begin_inset Box Shaded
+position "t"
+hor_pos "c"
+has_inner_box 1
+inner_pos "t"
+use_parbox 0
+use_makebox 0
+width "100col%"
+special "none"
+height "1in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "default"
+backgroundcolor "none"
+status open
+
+\begin_layout Plain Layout
+Shadow with background
+\end_layout
+
+\end_inset
+
+
+\begin_inset Box Doublebox
+position "t"
+hor_pos "c"
+has_inner_box 1
+inner_pos "t"
+use_parbox 0
+use_makebox 0
+width "100col%"
+special "none"
+height "1in"
+height_special "totalheight"
+thickness "0.4pt"
+separation "3pt"
+shadowsize "4pt"
+framecolor "default"
+backgroundcolor "none"
+status open
+
+\begin_layout Plain Layout
+Double lines
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset FloatList algorithm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset FloatList figure
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset FloatList table
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset index_print
+LatexCommand printindex
+type "idx"
+name "Index"
+
+\end_inset
+
+
+\begin_inset CommandInset toc
+LatexCommand lstlistoflistings
+
+\end_inset
+
+
+\begin_inset CommandInset nomencl_print
+LatexCommand printnomenclature
+set_width "auto"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset bibtex
+LatexCommand bibtex
+btprint "btPrintCited"
+bibfiles "book"
+options "plain"
+encoding "default"
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/autotests/export/docbook/index_print_not_as_paragraph.xml 
b/autotests/export/docbook/index_print_not_as_paragraph.xml
new file mode 100644
index 0000000000..b2dca00bb1
--- /dev/null
+++ b/autotests/export/docbook/index_print_not_as_paragraph.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This DocBook file was created by LyX 2.5.0~devel
+  See https://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">
+<info>
+<title>Color Test</title>
+<author>
+<personname>Iris</personname>
+</author>
+</info>
+<section>
+<title>Insets</title>
+<para>This is a text.<footnote>
+<para>Footnote comes here.</para>
+</footnote> It shows how <glossterm linkend="nomencolor-theme">color 
theme</glossterm>color theme looks like. Important 
<indexterm><primary>words</primary></indexterm>words.
+<programlisting>Sometimes I write a code.</programlisting>
+Or sometimes I write equations.
+<informalequation>
+<alt role='tex'>y &amp; =x\\
+z &amp; =y\text{Text in math.}
+</alt>
+<m:math display="block">
+ 
+<m:mtable displaystyle="true" columnalign="right left " class="align">
+ <m:mtr>
+  <m:mtd>
+   <m:mi>y</m:mi>
+  </m:mtd>
+  <m:mtd>
+   <m:mrow>
+    <m:mo stretchy='false'>=</m:mo>
+    <m:mi>x</m:mi>
+   </m:mrow>
+  </m:mtd>
+ </m:mtr>
+ <m:mtr>
+  <m:mtd>
+   <m:mi>z</m:mi>
+  </m:mtd>
+  <m:mtd>
+   <m:mrow>
+    <m:mo stretchy='false'>=</m:mo>
+    <m:mi>y</m:mi>
+    <m:mtext>Text&#0160;in&#0160;math</m:mtext>
+    <m:mn>.</m:mn>
+   </m:mrow>
+  </m:mtd>
+ </m:mtr>
+</m:mtable>
+</m:math>
+</informalequation>
+Writing a small math in text too such as <inlineequation>
+<alt role='tex'>y=x</alt>
+<m:math display="inline">
+ 
+<m:mrow>
+ <m:mi>y</m:mi>
+ <m:mo stretchy='false'>=</m:mo>
+ <m:mi>x</m:mi>
+</m:mrow>
+</m:math>
+</inlineequation>.<sidebar role="margin">
+<?dbfo float-type="margin.note"?>
+<para>By the way, this goes to margin.</para>
+</sidebar> <table xml:id="tab.Table">
+<caption>Table</caption>
+<tbody>
+<tr>
+<td style='border-bottom: 3.000000px double; border-left: 1px solid; 
border-top: 1.000000px solid' align='center' valign='top'>
+<para>A</para>
+</td>
+<td style='border-bottom: 3.000000px double; border-right: 1px solid; 
border-left: 1px solid; border-top: 1.000000px solid' align='center' 
valign='top'>
+<para>B</para>
+</td>
+</tr>
+<tr>
+<td style='border-bottom: 1.000000px solid; border-left: 1px solid; 
border-top: 1.000000px solid' align='center' valign='top'>
+<para>C</para>
+</td>
+<td style='border-bottom: 1.000000px solid; border-right: 1px solid; 
border-left: 1px solid; border-top: 1.000000px solid' align='center' 
valign='top'>
+<para>D</para>
+</td>
+</tr>
+</tbody>
+</table>
+I&#8217;m referring to Table <xref linkend="tab.Table" />.<remark>
+Comment
+</remark>
+greyed out <link xlink:href="URL">URL</link><link 
xlink:href="https:://www.lyx.org/">LyX's webpage</link><!-- \LaTeX { code} 
-->Preview<date role="current-date">2025-07-17</date></para>
+</section>
+<section>
+<title>Boxes</title>
+<sidebar role='frameless'>
+<para>Without boundaries</para>
+</sidebar>
+<sidebar role='boxed'>
+<para>Simple box</para>
+</sidebar>
+<sidebar role='ovalbox'>
+<para>Ellipse</para>
+</sidebar>
+<sidebar role='ovalbox-var'>
+<para>Ellipse bold</para>
+</sidebar>
+<sidebar role='shadowbox'>
+<para>Shadow</para>
+</sidebar>
+<sidebar role='shaded'>
+<para>Shadow with background</para>
+</sidebar>
+<sidebar role='doublebox'>
+<para>Double lines</para>
+</sidebar>
+<glossary>
+<title>Nomenclature</title>
+<glossentry xml:id="nomencolor-theme">
+<glossterm>color theme</glossterm>
+<glossdef>
+<para>Color Theme</para>
+</glossdef>
+</glossentry>
+</glossary>
+</section>
+<!-- The bibliography is empty! -->
+</article>
\ No newline at end of file
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to