<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 14 juin 2022 à 22:40, Albert Astals Cid <<a href="mailto:aacid@kde.org">aacid@kde.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">El dimarts, 14 de juny de 2022, a les 21:49:04 (CEST), Johnny Jazeix va escriure:<br>
> Hi,<br>
> <br>
> After discussing with a French contributor translating KStars, we noticed<br>
> that some formulas were stored as images where we can potentially use<br>
> MathML formulas to display them.<br>
> <br>
> There is the <equation> tag that do not require MathML but some of the<br>
> formulas use fractions (<br>
> <a href="https://invent.kde.org/education/kstars/-/blob/master/doc/lambda_ex.png" rel="noreferrer" target="_blank">https://invent.kde.org/education/kstars/-/blob/master/doc/lambda_ex.png</a> for<br>
> example) and I didn't find how to display them the same without MathML.<br>
> <br>
> Is there any existing docbook that uses MathML? If I understand correctly,<br>
> the way to tell we use MathML is using a specific doctype (<br>
> <a href="http://www.sagehill.net/docbookxsl/MathML.html" rel="noreferrer" target="_blank">http://www.sagehill.net/docbookxsl/MathML.html</a>) but as we already<br>
> customized one for KDE, it may not be easy to do it.<br>
<br>
Using it's specific docttype it's just for the files that are exclusively mathml and they are supposed to be included from other docbook files, no?<br>
<br>
That should be fine as far as i understand, see for example stuff like kstars/doc/faq.docbook it doesn't even have a doctype because it's just included from the "main" file.<br>
<br>
My bigger concern is that this is an extra compile-time dependency so we need to find a way to express that in CMakeLists.txt so people don't start getting some strange compile time errors when compiling the docbbok (and we probably need to include that in the CI images).<br>
<br>
My current suggestion, give it a quick try to see if it works :D<br>
<br></blockquote><div><br></div><div>Hi,</div><div><br></div><div>Thanks for the pointer.</div><div><br></div><div>we did a quick try and it does not work and for now, it's not much worth the time :).</div><div>Just in case someone stumbles on it and wants to dig deeper:<br>including directly <a href="http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">http://www.w3.org/Math/DTD/mathml2/mathml2.dtd</a> cause an issue: I/O error : Attempt to load network entity <a href="http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">http://www.w3.org/Math/DTD/mathml2/mathml2.dtd</a><br><br></div><div>So I installed the corresponding package (w3c-mathml2 in archlinux).</div><div><br></div><div>I added the corresponding entities in index.docbook:</div><div><!ENTITY % MATHML.prefixed "INCLUDE"><br><!ENTITY % MATHML.prefix "mml"><br><!ENTITY % equation.content "(alt?, (graphic+|mediaobject+|mml:math))"><br><!ENTITY % inlineequation.content<br>                "(alt?, (inlinegraphic+|inlinemediaobject+|mml:math))"><br><!ENTITY % mathml PUBLIC "-//W3C//DTD MathML 2.0//EN"<br>        "/usr/share/xml/w3c/mathml2/mathml2.dtd"> -> <!-- hardcoded path! --><br>%mathml;</div><div><br></div><div>But then, I have the issue reported in <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993638" target="_blank">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993638</a> ("error : xmlAddEntity: invalid redeclaration of predefined entity") which refers to this bug: <a href="https://gitlab.gnome.org/GNOME/libxml2/-/issues/308" target="_blank">https://gitlab.gnome.org/GNOME/libxml2/-/issues/308</a>.) and I stopped here.</div><div><br></div><div>Cheers,</div><div><br></div><div>Johnny</div><div> </div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Cheers,<br>
  Albert<br>
<br>
> <br>
> Cheers,<br>
> <br>
> Johnny<br>
> <br>
<br>
<br>
<br>
<br>
</blockquote></div></div></div></div></div></div></div>