mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 13:04:58 +00:00
DocBook: new lines around formulae.
This commit is contained in:
parent
e995414917
commit
91982ee105
@ -1,21 +1,24 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- This DocBook file was created by LyX 2.4.0dev
|
<!-- This DocBook file was created by LyX 2.4.0dev
|
||||||
See http://www.lyx.org/ for more information -->
|
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>
|
<title>Test document</title>
|
||||||
<para>A formula:
|
<para>A formula:
|
||||||
<informalequation>
|
<informalequation>
|
||||||
|
<alt role='tex'>\Vert,\vert</alt>
|
||||||
<m:math>
|
<m:math>
|
||||||
<m:alt role='tex'>\Vert,\vert</m:alt>
|
|
||||||
<m:mrow>
|
<m:mrow>
|
||||||
<m:mrow><m:mi>∥</m:mi><m:mo>,</m:mo><m:mi>|</m:mi>
|
<m:mrow><m:mi>∥</m:mi><m:mo>,</m:mo><m:mi>|</m:mi>
|
||||||
</m:mrow>
|
</m:mrow>
|
||||||
</m:mrow>
|
</m:mrow>
|
||||||
</m:math>
|
</m:math>
|
||||||
</informalequation>A second formula:
|
</informalequation>
|
||||||
<informalequation>
|
A second formula:
|
||||||
|
<informalequation>
|
||||||
|
<alt role='tex'>\left\Vert \mathbf{a^{T}\,x}\right\Vert _{2}\leq x_{0}</alt>
|
||||||
<m:math>
|
<m:math>
|
||||||
<m:alt role='tex'>\left\Vert \mathbf{a^{T}\,x}\right\Vert _{2}\leq x_{0}</m:alt>
|
|
||||||
<m:mrow>
|
<m:mrow>
|
||||||
<m:mrow>
|
<m:mrow>
|
||||||
<m:msub>
|
<m:msub>
|
||||||
@ -46,6 +49,6 @@
|
|||||||
</m:mrow>
|
</m:mrow>
|
||||||
</m:mrow>
|
</m:mrow>
|
||||||
</m:math>
|
</m:math>
|
||||||
</informalequation></para>
|
</informalequation>
|
||||||
|
</para>
|
||||||
</article>
|
</article>
|
@ -2418,13 +2418,11 @@ void InsetMathHull::docbook(XMLStream & xs, OutputParams const & runparams) cons
|
|||||||
{
|
{
|
||||||
// Choose the tag around the MathML equation.
|
// Choose the tag around the MathML equation.
|
||||||
docstring name;
|
docstring name;
|
||||||
|
bool doCR = false;
|
||||||
if (getType() == hullSimple)
|
if (getType() == hullSimple)
|
||||||
name = from_ascii("inlineequation");
|
name = from_ascii("inlineequation");
|
||||||
else {
|
else {
|
||||||
// This is a block equation, always have <informalequation> on its own line.
|
doCR = true; // This is a block equation, always have <informalequation> on its own line.
|
||||||
if (!xs.isLastTagCR())
|
|
||||||
xs << xml::CR();
|
|
||||||
|
|
||||||
name = from_ascii("informalequation");
|
name = from_ascii("informalequation");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2439,6 +2437,10 @@ void InsetMathHull::docbook(XMLStream & xs, OutputParams const & runparams) cons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (doCR)
|
||||||
|
if (!xs.isLastTagCR())
|
||||||
|
xs << xml::CR();
|
||||||
|
|
||||||
xs << xml::StartTag(name, attr);
|
xs << xml::StartTag(name, attr);
|
||||||
xs << xml::CR();
|
xs << xml::CR();
|
||||||
|
|
||||||
@ -2485,6 +2487,8 @@ void InsetMathHull::docbook(XMLStream & xs, OutputParams const & runparams) cons
|
|||||||
xs << XMLStream::ESCAPE_NONE << osmath.str();
|
xs << XMLStream::ESCAPE_NONE << osmath.str();
|
||||||
xs << xml::CR();
|
xs << xml::CR();
|
||||||
xs << xml::EndTag(name);
|
xs << xml::EndTag(name);
|
||||||
|
if (doCR)
|
||||||
|
xs << xml::CR();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user