Azzeddine LAZREK
University Cadi Ayyad, Faculty of Sciences
Department of Computer Science
Marrakesh - Morocco
http://www.ucam.ac.ma/fssm/rydarab
1
MathML & Arabic notation
MathML
Adaptation to the Arabic notation
2
Dadzilla – Arabic MathML Navigator
Dadzilla
Versions
ArMathmlEd – Mathematical editor
Extension
3
CtoArP – CMathML to PMathML transformation
Motivations
CtoArP
ArSelector – Notation selector
Results
MathML
Mathematical Markup Language, W3C standard - 1999
Aim
Allowing mathematics to be transmitted, processed and
published on the Web
MathML 1 and 2
The first two versions of MathML describe only mathematics in
the European languages
Separation
Presentation MathML
Content MathML
MathML
Mathematical Markup Language, W3C standard - 1999
Aim
Allowing mathematics to be transmitted, processed and
published on the Web
MathML 1 and 2
The first two versions of MathML describe only mathematics in
the European languages
Separation
Presentation MathML
Content MathML
Content MathML is generally language-neutral. In contrary,
presentation MathML necessarily targets a specific language
and notational conventions.
MathML
Mathematical Markup Language, W3C standard - 1999
Aim
Allowing mathematics to be transmitted, processed and
published on the Web
MathML 1 and 2
The first two versions of MathML describe only mathematics in
the European languages
Separation
Presentation MathML
Content MathML
MathML
Mathematical Markup Language, W3C standard - 1999
Aim
Allowing mathematics to be transmitted, processed and
published on the Web
MathML 1 and 2
The first two versions of MathML describe only mathematics in
the European languages
Separation
Presentation MathML
Content MathML
Content MathML is generally language-neutral. In contrary,
presentation MathML necessarily targets a specific language
and notational conventions.
Content MathML
Semantically, an Arabic
ma-thematical
expression
has
the
same
functionality
as
its Latin equivalent: same
content MathML tree
skele-ton but with different content
for token elements.
Presentation MathML
Only rendering aspects need
to be taken into account:
same presentation MathML
tree skeleton with different
content for token elements is
insufficient.
MathML & Arabic notation
Dadzilla – Arabic MathML Navigator CtoArP – CMathML to PMathML transformation
MathML
Adaptation to the Arabic notation
Direction
<math dir="rtl">
<mi>
<mo>(</mo>
<mi>
<mo>)</mo>
<mo>=</mo>
<msup>
<mi>
<mn>2</mn>
</msup>
<mo>-</mo>
X
</mi>
</mi>
</mi>
1
−
2
= (
)
XDirection
Bidi Unicode algorithm
<
mn
>
1
<
/mn
>
<
mo
>
+
<
/mo
>
<
mi
>H
.<
/mi
>
<
mo
>
-
<
/mo
>
<
mn
>
2
<
/mn
>
1+2
−
H .1+H
.−
2
Direction
<mn>
Q® XYªË@</mn>
<mn> Le nombre z´
ero </mn>
Q® XYªË@
Le nombre z´
ero
Additional variants
Symbols mirrors
The attributes
lspace/rspace
and
lquote/rquote
are to
be interpreted as open/closed, instead of left/right respectively.
<math>
<ms lquote='|' rquote='
.
'>
</ms>
</math>
|
.
Kashida
1
Using CSS
text-justify: kashida
2
Using new entities characters
Additional constructions
<
math dir="rtl"
>
<
menclose
notation="madruwb"
>
<
mn
>
12
<
/mn
>
<
/menclose
>
<
/math
>
MathML extension
After examining all notational conventions, in current use with
Arabic, the following step is to clarify the specification of
MathML, proposing extensions where needed, so that MathML
has the broadest coverage possible proposals:
Direction: the overall mathematical directionality should be determined
by a
dir
attribute on the outermost
math
and
mrow
elements ; which
takes one of the values
ltr
or
rtl
. The text content of each token
element should be treated as a separate directional segment and the
bidirectional algorithm should be applied to each independently
Additional value for
mathvariant
:
isolated
,
initial
,
tailed
,
looped
,
stretched
and
double-struck
Mirroring: code-points for Arabic mathematical symbols are not
available yet, but appropriately marked for mirroring
Arabic specific notation: additional allowed value
madruwb
for the
notation attribute
menclose
of factorial symbol.
MathML extension
After examining all notational conventions, in current use with
Arabic, the following step is to clarify the specification of
MathML, proposing extensions where needed, so that MathML
has the broadest coverage possible proposals:
Direction: the overall mathematical directionality should be determined
by a
dir
attribute on the outermost
math
and
mrow
elements ; which
takes one of the values
ltr
or
rtl
. The text content of each token
element should be treated as a separate directional segment and the
bidirectional algorithm should be applied to each independently
Additional value for
mathvariant
:
isolated
,
initial
,
tailed
,
looped
,
stretched
and
double-struck
Mirroring: code-points for Arabic mathematical symbols are not
MathML extension
After examining all notational conventions, in current use with
Arabic, the following step is to clarify the specification of
MathML, proposing extensions where needed, so that MathML
has the broadest coverage possible proposals:
Direction: the overall mathematical directionality should be determined
by a
dir
attribute on the outermost
math
and
mrow
elements ; which
takes one of the values
ltr
or
rtl. The text content of each token
element should be treated as a separate directional segment and the
bidirectional algorithm should be applied to each independently
Additional value for
mathvariant
:
isolated
,
initial
,
tailed
,
looped
,
stretched
and
double-struck
Mirroring: code-points for Arabic mathematical symbols are not
available yet, but appropriately marked for mirroring
Arabic specific notation: additional allowed value
madruwb
for the
MathML extension
After examining all notational conventions, in current use with
Arabic, the following step is to clarify the specification of
MathML, proposing extensions where needed, so that MathML
has the broadest coverage possible proposals:
Direction: the overall mathematical directionality should be determined
by a
dir
attribute on the outermost
math
and
mrow
elements ; which
takes one of the values
ltr
or
rtl
. The text content of each token
element should be treated as a separate directional segment and the
bidirectional algorithm should be applied to each independently
Additional value for
mathvariant
:
isolated,
initial,
tailed,
looped,
stretched
and
double-struck
Mirroring: code-points for Arabic mathematical symbols are not
Extension adopted
The proposals for adapting MathML to Arabic mathematical
notation, published in the W3C Note, will be included in the new
version of MathML (MathML3).
Extension
Navigator choice
Extension
Architecture
XUL
CSS
JavaScript
XBL
RDF
SVG
xpconnect
Web
services
Gecko
xpcom
Extension
Fonts
To correctly display MathML documents in Arabic presentation,
some fonts must be installed:
ACM
Mirrored BaKoMa Computer Modern fonts
RamzArab
Adapted Arabic mathematical symbols font
Problems
Existent fonts
ACM
Extension
Dadzilla 1.1
H
3
q
+
Extension
Dadzilla 1.2
H
3
q
+
Extension
MathML verbosity
<math>
<msqrt>
<mfrac>
<mrow>
<mi>a</mi>
<mo>+</mo>
<mi>b</mi>
</mrow>
<mrow>
<mi>c</mi>
<mo>+</mo>
<mi>d</mi>
</mrow>
</mfrac>
$\sqrt{\frac{a+b}{c+d}}$
r
a
+
b
c
+
d
T X
E
MathML
Extension
Extension
Dadzilla
Added the factorial function in Arabic notation.
Support extensible alphabetic symbols.
Using the attribute with
dir
avec
mrow
et
mstyle
Arabization menu Dadzilla and ArMathmlEd
Results <apply> <diff/> <bvar> <ci>x</ci> </bvar> <apply> <root/> <ci>x</ci> </apply> </apply> <apply> <divide/> <ci>1</ci> <apply> <times/> <ci>2</ci> <apply> <root/> <ci>x</ci> </apply> </apply> </apply>
CMathML
CMathML
<mfrac>
<mn>1</mn>
<mrow>
<mn>2</mn>
<msqrt>
<mi>
س
</mi>
</msqrt>
</mrow>
</mfrac>
1
p
2
PMathML
Dadzilla
Results
Results
Pourquoi XSLT ?
(C
→
P)MathML est interne `a MathML
XSLT est une application XML
XSLT est largement adopt ´e
XSLT est portable
CtoArP
feuille de style XSLT
fait appel par d ´efaut aux r `egles d ´efinies dans
ctop.xsl
Results
Pourquoi XSLT ?
(C
→
P)MathML est interne `a MathML
XSLT est une application XML
XSLT est largement adopt ´e
XSLT est portable
CtoArP
feuille de style XSLT
fait appel par d ´efaut aux r `egles d ´efinies dans
ctop.xsl
le r ´esultat est visualis ´e en utilisant Dadzilla
Results
ctop.xsl
est utilis ´ee dans les cas o `u le codage est le m ˆeme
en notation arabe et latine.
root
Notation arabe
Notation latine
msqrt
R `egles de r ´esolution de conflits
=
⇒
les r `egles mod `eles de
Results
ctop.xsl
est utilis ´ee dans les cas o `u le codage est le m ˆeme
en notation arabe et latine.
root
Notation arabe
Notation latine
msqrt
dir="rtl"
R `egles de r ´esolution de conflits
=
⇒
les r `egles mod `eles de
Results
ctop.xsl
est utilis ´ee dans les cas o `u le codage est le m ˆeme
en notation arabe et latine.
root
Notation arabe
Notation latine
msqrt
dir="ltr"
R `egles de r ´esolution de conflits
=
⇒
les r `egles mod `eles de
Results
Motivations
Certains concepts peuvent ˆetre pr ´esent ´es par plusieurs
vari ´et ´es de notations au choix :
utilisation des symboles miroirs ou des symboles
alphab ´etiques
HX
¸ 1=H X HX
¸m.×
1=H HX
¸Y
H=1 HX
¸Yk.
1=Hutilisation du syst `eme du num ´eration arabe ou
arabe-hindou
Results
Motivations
Certains concepts peuvent ˆetre pr ´esent ´es par plusieurs
vari ´et ´es de notations au choix :
utilisation des symboles miroirs ou des symboles
alphab ´etiques
utilisation du syst `eme du num ´eration arabe ou
arabe-hindou
0,
1,
2,
3,
4,
5,
6,
7,
8,
90
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
Results
Motivations
Certains concepts peuvent ˆetre pr ´esent ´es par plusieurs
vari ´et ´es de notations au choix :
utilisation des symboles miroirs ou des symboles
alphab ´etiques
utilisation du syst `eme du num ´eration arabe ou
arabe-hindou
utilisation des symboles avec ou sans point diacritiques
H . A£ + Ag . H A£+
AgResults
Results
Our aims were to explore avenues to ensure:
The presence of a high-quality typographic
→
Adoption of the TEX typographical rules
Compliance with the rules of Arabic calligraphy
→
Use of Kashida and variations style
The expression structuring to allow: search features,
copying, indexing. . .
→
Extension of MathML and development of Dadzilla
The look and feel of content coding
→
Achieving CtoArP
The ease with the task of Arabic mathematical
e-documents composition
Results
Results
Results