mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 06:19:36 +00:00
Fix MathML output of wide characters.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32699 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a1316dbea3
commit
13b88d6166
@ -175,10 +175,10 @@ void InsetMathChar::mathmlize(MathStream & ms) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
char const * type =
|
char const * type =
|
||||||
(isalpha(char_) || Encodings::isMathAlpha(char_))
|
(isalpha(char_) || Encodings::isMathAlpha(char_))
|
||||||
? "mi" : "mo";
|
? "mi" : "mo";
|
||||||
// we don't use MTag and ETag because we do not want the spacing
|
// we don't use MTag and ETag because we do not want the spacing
|
||||||
ms << "<" << type << ">" << char(char_) << "</" << type << ">";
|
ms << "<" << type << ">" << char_type(char_) << "</" << type << ">";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -250,6 +250,32 @@ MathStream::MathStream(odocstream & os)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
void MathStream::cr()
|
||||||
|
{
|
||||||
|
os() << '\n';
|
||||||
|
for (int i = 0; i < tab(); ++i)
|
||||||
|
os() << ' ';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MathStream::defer(docstring const & s)
|
||||||
|
{
|
||||||
|
deferred_ << s;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MathStream::defer(string const & s)
|
||||||
|
{
|
||||||
|
deferred_ << from_utf8(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
docstring MathStream::deferred() const
|
||||||
|
{
|
||||||
|
return deferred_.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
MathStream & operator<<(MathStream & ms, MathAtom const & at)
|
MathStream & operator<<(MathStream & ms, MathAtom const & at)
|
||||||
{
|
{
|
||||||
at->mathmlize(ms);
|
at->mathmlize(ms);
|
||||||
@ -278,6 +304,13 @@ MathStream & operator<<(MathStream & ms, char c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
MathStream & operator<<(MathStream & ms, char_type c)
|
||||||
|
{
|
||||||
|
ms.os() << c;
|
||||||
|
return ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
MathStream & operator<<(MathStream & ms, MTag const & t)
|
MathStream & operator<<(MathStream & ms, MTag const & t)
|
||||||
{
|
{
|
||||||
++ms.tab();
|
++ms.tab();
|
||||||
@ -297,32 +330,6 @@ MathStream & operator<<(MathStream & ms, ETag const & t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MathStream::cr()
|
|
||||||
{
|
|
||||||
os() << '\n';
|
|
||||||
for (int i = 0; i < tab(); ++i)
|
|
||||||
os() << ' ';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MathStream::defer(docstring const & s)
|
|
||||||
{
|
|
||||||
deferred_ << s;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MathStream::defer(string const & s)
|
|
||||||
{
|
|
||||||
deferred_ << from_utf8(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
docstring MathStream::deferred() const
|
|
||||||
{
|
|
||||||
return deferred_.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
MathStream & operator<<(MathStream & ms, docstring const & s)
|
MathStream & operator<<(MathStream & ms, docstring const & s)
|
||||||
{
|
{
|
||||||
ms.os() << s;
|
ms.os() << s;
|
||||||
|
@ -286,6 +286,8 @@ MathStream & operator<<(MathStream &, char const *);
|
|||||||
///
|
///
|
||||||
MathStream & operator<<(MathStream &, char);
|
MathStream & operator<<(MathStream &, char);
|
||||||
///
|
///
|
||||||
|
MathStream & operator<<(MathStream &, char_type);
|
||||||
|
///
|
||||||
MathStream & operator<<(MathStream &, MTag const &);
|
MathStream & operator<<(MathStream &, MTag const &);
|
||||||
///
|
///
|
||||||
MathStream & operator<<(MathStream &, ETag const &);
|
MathStream & operator<<(MathStream &, ETag const &);
|
||||||
|
Loading…
Reference in New Issue
Block a user