This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 7083 - MathML generates wrong tags when adding a <mover>.
Summary: MathML generates wrong tags when adding a <mover>.
Status: RESOLVED FIXED
Alias: None
Product: Amaya
Classification: Unclassified
Component: MathML (show other bugs)
Version: 11.2
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Vincent Quint
QA Contact: Vincent Quint
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-06 12:47 UTC by William Gacquer
Modified: 2009-07-29 16:29 UTC (History)
5 users (show)

See Also:


Attachments
the generated code in an xhtml file. (3.69 KB, application/xhtml+xml)
2009-07-06 19:09 UTC, fred.wang
Details

Description William Gacquer 2009-07-06 12:47:07 UTC
The MathML editor always generates 

<mover>
<mi>a</mi>
<mi>b</mi>
</mover>

instead of 

<mover>
<mi>a</mi>
<mo>b</mo>
</mover>

This bug can easily be reproduced by creating a MathML document and adding the <mover> element ( line 3, row 4 of the MathML elements available on the upper right side of Amaya.
Comment 1 fred.wang 2009-07-06 15:37:00 UTC
(I guess you mean row 3 column 4)

I don't see what is wrong with generating a <mi> around a "b". The choice of mi/mn/mo is determined by the content. If you replace the "b" by "+" or "1" then you get a mo/mn respectively. Moreover, you can select the mi and do "insert->math->mo" so that it will be replaced my a mo. But I don't think you need to do that. Can you clarify what you expect Amaya to do?
Comment 2 William Gacquer 2009-07-06 18:30:25 UTC
(In reply to comment #1)
> (I guess you mean row 3 column 4)
> 
> I don't see what is wrong with generating a <mi> around a "b". The choice of
> mi/mn/mo is determined by the content. If you replace the "b" by "+" or "1"
> then you get a mo/mn respectively. Moreover, you can select the mi and do
> "insert->math->mo" so that it will be replaced my a mo. But I don't think you
> need to do that. Can you clarify what you expect Amaya to do?
> 

Neither firefox, Chrome nor Opera display the generated code as expected. But now I noticed that it only happens when using the "slidy" feature of Amaya.

Below is an illustration of that bug. It displays well in Amaya but not in a browser.

Regards
____________

<?xml version="1.0" encoding="UTF-8"?>
<?xtiger template="http://www.w3.org/Amaya/Templates/slides.xtd" version="1.0" templateVersion="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml"
 xmlns:xt="http://ns.inria.org/xtiger" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type"
  content="application/xhtml+xml; charset=UTF-8" />
  <title><xt:use types="string" label="slide_title"
  initial="true">test</xt:use></title>
  <meta name="generator" content="amaya 9.54, see http://www.w3.org/Amaya/" />
  <link rel="stylesheet" type="text/css" media="screen, projection"
  href="http://www.w3.org/Amaya/Templates/slidy.css" />
  <link rel="stylesheet" type="text/css" media="screen, projection"
  href="http://www.w3.org/Amaya/Templates/slidy-blue.css" title="Blue" />
  <link rel="stylesheet" type="text/css" media="print"
  href="http://www.w3.org/Amaya/Templates/print.css" />
  <script type="text/javascript"
  src="http://www.w3.org/Amaya/Templates/slidy.js">
  </script>
  <script type="text/javascript"
  src="http://www.w3.org/Amaya/Templates/slidy-toc.js">
  </script>
  <style type="text/css">
     /* your custom style rules */
     dd {margin-top: 0.3em}
     dd p {margin-top: 0.3em; margin-bottom: 0.3em}
     </style>
</head>

<body xml:lang="en" lang="en">

<div class="background">
<p> </p>
</div>

<div class="bottom">
<p> </p>
</div>

<div class="slide cover">

<div class="cover-image">
<p> </p>
</div>

<div class="cover-content">
<h1><xt:use types="string" label="title" initial="true">Title</xt:use></h1>

<p><xt:use types="string" label="author" initial="true">Author</xt:use></p>
<address>
  &lt;<xt:use types="string" label="email" initial="true">email</xt:use>&gt; 
</address>

<p><xt:use types="string" label="event" initial="true">Event, day month
year</xt:use></p>
</div>

<div class="cover-bottom">
<p> </p>
</div>
</div>
<xt:repeat minOccurs="2" label="slides" maxOccurs="*">
  <xt:use types="slide chapter_slide handout" label="a_slide" currentType="div">
    <div class="slide">
    <h1><xt:use types="string" label="slide_title" initial="true">Slide
    Heading</xt:use></h1>
    <xt:bag types="simple_list incremental_list anyElement" label="slide_body">
      <p>paragraph ...</p>
      <xt:use types="simple_list" label="simple_list" currentType="ul"><ul>
          <xt:repeat minOccurs="1" label="items" maxOccurs="*">
            <xt:use types="li" label="item"
                currentType="li"><li><math xmlns="http://www.w3.org/1998/Math/MathML">
                  <mover>
                    <mi>a</mi>
                    <mo>_</mo>
                  </mover>
                </math></li>
            </xt:use><xt:use types="li" label="item" currentType="li"><li>item
                ...</li>
            </xt:use></xt:repeat>
        </ul>
      </xt:use></xt:bag>
    </div>
  </xt:use><xt:use types="slide chapter_slide handout" label="a_slide"
  currentType="div">
    <div class="slide">
    <h1><xt:use types="string" label="slide_title" initial="true">Slide
    Heading</xt:use></h1>
    <xt:bag types="simple_list incremental_list anyElement" label="slide_body">
      <p>paragraph ...</p>
      <xt:use types="incremental_list" label="incremental_list"
      currentType="ul"><ul>
          <xt:repeat minOccurs="2" label="items" maxOccurs="*">
            <xt:use types="li" label="item" currentType="li"><li
              class="incremental">item ...</li>
            </xt:use><xt:use types="li" label="item" currentType="li"><li
              class="incremental">item ...</li>
            </xt:use></xt:repeat>
        </ul>
      </xt:use></xt:bag>
    </div>
  </xt:use></xt:repeat>
</body>
</html> 
Comment 3 fred.wang 2009-07-06 19:09:27 UTC
Created attachment 716 [details]
the generated code in an xhtml file.

I'm still not able to reproduce your bug. Amaya generates mi's for placeholders (as suggested by the MathML spec) and when I insert a underscore, as in your example, it is changed in a mo. (By the way, if you want to underline a math fragment, I suggest you use an "overbar" (row 5, column 2) so that it can stretch.)

Opera and Firefox should display your example correctly. However, I'm not sure they interpret the file as XML and consequently MathML may not be displayed. To force them to do so, you can change the extension to .xhtml (see attachment).

Chrome does not support MathML yet. Nevertheless, I believe it uses the rendering engine of Konqueror. Since some users of this browser has requested this feature maybe it will be available in a near future:
https://bugs.kde.org/show_bug.cgi?id=30526

I think the behavior of Amaya is correct, so if you agree we can close this bug. If you need more help about how to edit document with Amaya or want to discuss the issues with other browsers, rather use the mailing list.
Comment 4 fred.wang 2009-07-06 19:10:54 UTC
> if you want to underline

*overline*