openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Regina Henschel <rb.hensc...@t-online.de>
Subject Re: Need help in the code jungle of starmath
Date Sun, 28 Dec 2014 19:45:49 GMT
Hi Dennis,

Dennis E. Hamilton schrieb:
>
>   -- replying below to --
> From: Regina Henschel [mailto:rb.henschel@t-online.de]
> Sent: Sunday, December 28, 2014 09:00
> To: dev@openoffice.apache.org
> Subject: Re: Need help in the code jungle of starmath
>
> Hi Dennis,
>
> Dennis E. Hamilton schrieb:
> [ ... ]
>>
>> <orcnote>
>>       I'm not clear what is the issue about MathML
>>       Names.  If there is a character-set encoding issue, I think that
>>       can be handled in the <?xml> prolog element for free-standing
>>       MathML XML documents.  What non-Unicode are you encountering?
>> </orcnote>
>
> It is not about encoding, but about an entity reference like &int;
> instead of the numeric XML character references &#x222B; or the literal
> character ∫.
>
> <orcmid>
>     Ah! Character entities.  Yes that is a problem.
>     Hmm, perhaps a standalone internal DTD could be used to define these.
>     I am not certain how one gets around DTD validation.
>
>     It would be nice
>     to use the character entities rather than the character references.
>     I would avoid the literal characters of course, because their being
>     understandable depends on font availability.
>
>     Does the MathML DTD provide definitions that could be moved to an
>     internal DTD?
>
>     Perhaps a brief experiment to see if that much will be accepted by
>     the SAX parser?
> </orcmid>

Some brief experiments: When I use version A or B (see below) the 
reference &Integral; is not resolved. The browser Seamonkey resolves it 
in both cases, so I assume that the syntax and URI is correct. The 
version C is resolved correctly by Apache OpenOffice, Seamonkey and Word 
2010 but not by LibreOffice; which shows, that the error is likely 
inside LibreOffice.

The mappings are in a file "mmlalias.ent" but I don't know, how I can 
link to it in the doctype declaration.

I see no problem in using a literal character, because such character 
itself has no binding to a font. When you try version C, you will 
notice, that the integral sign is the same in all three occurrences.

Kind regards
Regina



== A ======================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE math
     PUBLIC "-//W3C//DTD MathML 2.0//EN"
            "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd"
 >
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
   <mrow>
     <mo>&#x222B;</mo>
     <mi>x</mi>
     <mo>=</mo>
     <mn>1</mn>
   </mrow>
   <mrow>
     <mo>&Integral;</mo>
     <mi>x</mi>
     <mo>=</mo>
     <mn>2</mn>
   </mrow>
   <mrow>
     <mo>∫</mo>
     <mi>x</mi>
     <mo>=</mo>
     <mn>3</mn>
   </mrow>
</mrow>
</math>


== B ===================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE math
     PUBLIC "-//W3C//DTD MathML 2.0//EN"
            "../../w3org/Doctypes/mathml2/mathml2/mathml2.dtd"
 >
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
   <mrow>
     <mo>&#x222B;</mo>
     <mi>x</mi>
     <mo>=</mo>
     <mn>1</mn>
   </mrow>
   <mrow>
     <mo>&Integral;</mo>
     <mi>x</mi>
     <mo>=</mo>
     <mn>2</mn>
   </mrow>
   <mrow>
     <mo>∫</mo>
     <mi>x</mi>
     <mo>=</mo>
     <mn>3</mn>
   </mrow>
</mrow>
</math>

== C ===========================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE math
     PUBLIC "-//W3C//DTD MathML 2.0//EN"
            "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd"
[
   <!ENTITY Integral         "&#x0222B;" >
]
 >
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
   <mrow>
     <mo>&#x222B;</mo>
     <mi>x</mi>
     <mo>=</mo>
     <mn>1</mn>
   </mrow>
   <mrow>
     <mo>&Integral;</mo>
     <mi>x</mi>
     <mo>=</mo>
     <mn>2</mn>
   </mrow>
   <mrow>
     <mo>∫</mo>
     <mi>x</mi>
     <mo>=</mo>
     <mn>3</mn>
   </mrow>
</mrow>
</math>




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Mime
View raw message