[prev in list] [next in list] [prev in thread] [next in thread] 

List:       calligra-devel
Subject:    Re: Review Request: Make the epub filter handle math formulas
From:       "Jaime Torres Amate" <jtamate () gmail ! com>
Date:       2013-01-01 9:31:46
Message-ID: 20130101093146.3695.36858 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Dec. 31, 2012, 9:42 p.m., mojtaba shahi wrote:
> > I found something, I tested your patch and made an epub from your document sample \
> > (sqrt) and it doesn't look right for me. I unpacked the epub and tryed to open \
> > the .xhtml (chapter1.xhtml) with my browser and it got error. I checked and found \
> > the problem: for your file is this:
> > <math:math>
> > <math:semantics>
> > <math:msqrt>
> > <math:mrow>
> > ...
> > </math:math>
> > 
> > It should be this:
> > <math>
> > <semantics>
> > <msqrt>
> > <mrow>
> > ...
> > </math>
> > 
> > If i am right, you should remove local name "math".
> > sorry for my hurry to ship it.

I only want to show that in the file context.xml in Object 1, the namespace is \
<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">, therefore, the prefix \
for every mathml element is mandatory. If the namespace were declared in the default \
namespace <math xmlns="http://www.w3.org/1998/Math/MathML">, then all the prefixes \
should be removed, but probably it can cause conflicts with other default namespaces.


- Jaime Torres


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107969/#review24354
-----------------------------------------------------------


On Dec. 30, 2012, 4:44 a.m., Inge Wallin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107969/
> -----------------------------------------------------------
> 
> (Updated Dec. 30, 2012, 4:44 a.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Description
> -------
> 
> This patch implements support for math formulas in the EPUB filter. This is the \
> first one of the EPUB3 features that we want to add to Calligra 2.7. 
> This version only supports math formulas saved as an embedded document, like \
> LibreOffice and the OpenOffice variants save it. Calligra saves math formulas as \
> inline mathML in the frame, which is not supported by this version. I thought that \
> I could get some initial feedback while implementing support for the Calligra way \
> too. 
> 
> Diffs
> -----
> 
> filters/words/epub/OdfParser.cpp 6069b89 
> filters/words/epub/OdtHtmlConverter.h 68aaffa 
> filters/words/epub/OdtHtmlConverter.cpp e5e0edc 
> filters/words/epub/TODO e634a05 
> filters/words/epub/exportepub2.cpp cfd50c3 
> filters/words/epub/exporthtml.cpp 5bb44aa 
> 
> Diff: http://git.reviewboard.kde.org/r/107969/diff/
> 
> 
> Testing
> -------
> 
> Created one simple odt using OOo which has a formula and some text.
> 
> 
> Thanks,
> 
> Inge Wallin
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/107969/">http://git.reviewboard.kde.org/r/107969/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On December 31st, 2012, 9:42 p.m., <b>mojtaba \
shahi</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">I found something, I tested your patch and made an epub from your \
document sample (sqrt) and it doesn&#39;t look right for me. I unpacked the epub and \
tryed to open the .xhtml (chapter1.xhtml) with my browser and it got error. I checked \
and found the problem: for your file is this:
&lt;math:math&gt;
    &lt;math:semantics&gt;
     &lt;math:msqrt&gt;
      &lt;math:mrow&gt;
       ...
&lt;/math:math&gt;

It should be this:
&lt;math&gt;
    &lt;semantics&gt;
     &lt;msqrt&gt;
      &lt;mrow&gt;
       ...
&lt;/math&gt;

If i am right, you should remove local name &quot;math&quot;.
sorry for my hurry to ship it.</pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I only want to show that \
in the file context.xml in Object 1, the namespace is &lt;math:math \
xmlns:math=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;, therefore, the prefix \
for every mathml element is mandatory. If the namespace were declared in the default \
namespace &lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;, then all \
the prefixes should be removed, but probably it can cause conflicts with other \
default namespaces.</pre> <br />








<p>- Jaime Torres</p>


<br />
<p>On December 30th, 2012, 4:44 a.m., Inge Wallin wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Calligra.</div>
<div>By Inge Wallin.</div>


<p style="color: grey;"><i>Updated Dec. 30, 2012, 4:44 a.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This patch implements support for math formulas in the EPUB filter. This \
is the first one of the EPUB3 features that we want to add to Calligra 2.7.

This version only supports math formulas saved as an embedded document, like \
LibreOffice and the OpenOffice variants save it. Calligra saves math formulas as \
inline mathML in the frame, which is not supported by this version. I thought that I \
could get some initial feedback while implementing support for the Calligra way \
too.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Created one simple odt using OOo which has a formula and some \
text.</pre>  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>filters/words/epub/OdfParser.cpp <span style="color: grey">(6069b89)</span></li>

 <li>filters/words/epub/OdtHtmlConverter.h <span style="color: \
grey">(68aaffa)</span></li>

 <li>filters/words/epub/OdtHtmlConverter.cpp <span style="color: \
grey">(e5e0edc)</span></li>

 <li>filters/words/epub/TODO <span style="color: grey">(e634a05)</span></li>

 <li>filters/words/epub/exportepub2.cpp <span style="color: \
grey">(cfd50c3)</span></li>

 <li>filters/words/epub/exporthtml.cpp <span style="color: \
grey">(5bb44aa)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/107969/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic