This repository has been archived by the owner on Jan 3, 2020. It is now read-only.
forked from w3c/mathml.old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chapter7.xml
1171 lines (1111 loc) · 56.6 KB
/
chapter7.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html
SYSTEM "mathml.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<title>Characters, Entities and Fonts</title>
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" />
<style type="text/css">
/** Table of Contents taken from html 5.2 spec
stop flicker in toc **/
.toc a {
/* More spacing; use padding to make it part of the click target. */
padding-top: 0.1rem;
/* Larger, more consistently-sized click target */
display: block;
/* Reverse color scheme */
color: black;
border-color: #3980B5;
border-bottom-width: 3px !important;
margin-bottom: 0px !important;
}
.egmeta {
color:#5555AA;font-style:italic;font-family:serif;font-weight:bold;
}
div.graphic{margin-left:2em}
table.syntax {
font-size: 75%;
background-color: #DDDDDD;
border: thin solid;
}
table.syntax td {
border: solid thin;
}
table.syntax th {
text-align: left;
}
table.attributes td { padding-left:0.5em; padding-right:0.5em; border: solid thin; }
table.attributes td.attname { white-space:nowrap; vertical-align:top;}
table.attributes td.attdesc { background-color:#F0F0FF; padding-left:2em; padding-right:2em}
th.uname {font-size: 50%; text-align:left;}
code { font-family: monospace; }
div.constraint,
div.issue,
div.note,
div.notice { margin-left: 2em; }
li p { margin-top: 0.3em;
margin-bottom: 0.3em; }
div.exampleInner pre { margin-left: 1em;
margin-top: 0em; margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
margin: 0em; padding: 0em}
div.exampleInner { background-color: #d5dee3;
border-top-width: 4px;
border-top-style: double;
border-top-color: #d3d3d3;
border-bottom-width: 4px;
border-bottom-style: double;
border-bottom-color: #d3d3d3;
padding: 4px; margin: 0em }
div.exampleWrapper { margin: 4px }
div.exampleHeader { font-weight: bold;
margin: 4px}
a.mainindex {font-weight: bold;}
li.sitem {list-style-type: none;}
.error { color: red }
div.mathml-example {border:solid thin black;
padding: 0.5em;
margin: 0.5em 0 0.5em 0;
}
div.strict-mathml-example {border:solid thin black;
padding: 0.5em;
margin: 0.5em 0 0.5em 0;
}
div.strict-mathml-example h5 {
margin-top: -0.3em;
margin-bottom: -0.5em;}
var.meta {background-color:green}
var.transmeta {background-color:red}
pre.mathml {padding: 0.5em;
background-color: #FFFFDD;}
pre.mathml-fragment {padding: 0.5em;
background-color: #FFFFDD;}
pre.strict-mathml {padding: 0.5em;
background-color: #FFFFDD;}
span.uname {color:#999900;font-size:75%;font-family:sans-serif;}
.minitoc { border-style: solid;
border-color: #0050B2;
border-width: 1px ;
padding: 0.3em;}
.attention { border-style: solid;
border-width: 1px ;
color: #5D0091;
background: #F9F5DE;
border-color: red;
margin-left: 1em;
margin-right: 1em;
margin-top: 0.25em;
margin-bottom: 0.25em; }
.attribute-Name { background: #F9F5C0; }
.method-Name { background: #C0C0F9; }
.IDL-definition { border-style: solid;
border-width: 1px ;
color: #001000;
background: #E0FFE0;
border-color: #206020;
margin-left: 1em;
margin-right: 1em;
margin-top: 0.25em;
margin-bottom: 0.25em; }
.baseline {vertical-align: baseline}
#eqnoc1 {width: 10%}
#eqnoc2 {width: 80%; text-align: center; }
#eqnoc3 {width: 10%; text-align: right; }
div.div1 {margin-bottom: 1em;}
.h3style {
text-align: left;
font-family: sans-serif;
font-weight: normal;
color: #0050B2;
font-size: 125%;
}
h4 { text-align: left;
font-family: sans-serif;
font-weight: normal;
color: #0050B2; }
h5 { text-align: left;
font-family: sans-serif;
font-weight: bold;
color: #0050B2; }
th {background: #E0FFE0;}
p, blockquote, h4 { font-family: sans-serif; }
dt, dd, dl, ul, li { font-family: sans-serif; }
pre, code { font-family: monospace }
a.termref {
text-decoration: none;
color: black;
}
.mathml-render {
font-family: serif;
font-size: 130%;
border: solid 4px green;
padding-left: 1em;
padding-right: 1em;
}
</style>
<link rel="stylesheet" type="text/css" href="https://www.w3.org/StyleSheets/TR/2016/W3C-ED.css" /><script src="//www.w3.org/scripts/TR/2016/fixup.js"> </script></head>
<body>
<h1><a id="chars"></a>7 Characters, Entities and Fonts</h1>
<!-- TOP NAVIGATION BAR -->
<nav id="toc">
<ol class="toc">
<li><a href="Overview.xml"><span class="secno"></span> Mathematical Markup Language (MathML) Version 4.0</a></li>
<li><a href="chapter6.xml"><span class="secno">6 </span> Interactions with the Host Environment</a></li>
<li><a href="appendixa.xml"><span class="secno">A </span> Parsing MathML</a></li>
<li><a href="chapter7.xml"><span class="secno">7 </span> Characters, Entities and Fonts</a>
<ol class="toc">
<li><a href="chapter7.xml#chars.intro"><span class="secno">7.1 </span> Introduction</a>
</li>
<li><a href="chapter7.xml#chars.unicodechars"><span class="secno">7.2 </span> Unicode Character Data</a>
</li>
<li><a href="chapter7.xml#chars.entities"><span class="secno">7.3 </span> Entity Declarations</a>
</li>
<li><a href="chapter7.xml#chars.mglyph"><span class="secno">7.4 </span> Special Characters Not in Unicode</a>
</li>
<li><a href="chapter7.xml#chars.BMP-SMP"><span class="secno">7.5 </span> Mathematical Alphanumeric Symbols</a>
</li>
<li><a href="chapter7.xml#chars.nonmark"><span class="secno">7.6 </span> Non-Marking Characters</a>
</li>
<li><a href="chapter7.xml#chars.anomalous"><span class="secno">7.7 </span> Anomalous Mathematical Characters</a>
<ol class="toc">
<li><a href="chapter7.xml#chars.keyboard"><span class="secno">7.7.1 </span> Keyboard Characters</a>
<ol class="toc">
<li><a href="chapter7.xml#chars.hyph-minus"><span class="secno">7.7.1.1 </span> Minus</a>
</li>
<li><a href="chapter7.xml#chars.prime-quote"><span class="secno">7.7.1.2 </span> Apostrophes, Quotes and Primes</a>
</li>
<li><a href="chapter7.xml#id.7.7.1.3"><span class="secno">7.7.1.3 </span> Other Keyboard Substitutions</a>
</li>
</ol>
</li>
<li><a href="chapter7.xml#chars.pseudo-scripts"><span class="secno">7.7.2 </span> Pseudo-scripts</a>
</li>
<li><a href="chapter7.xml#chars.comb-chars"><span class="secno">7.7.3 </span> Combining Characters</a>
</li>
</ol>
</li>
</ol>
</li>
</ol>
</nav>
<div class="div1">
<div class="div2">
<h2><a id="chars.intro"></a>7.1 Introduction</h2>
<p>
Notation and symbols have proved very important for
mathematics. Mathematics has grown in part because
its notation continually changes toward being succinct and
suggestive.
Many new signs have been developed for use in mathematical notation,
and many have been adopted
that were originally introduced elsewhere.The result is
that mathematics makes use of a very large collection of
symbols. It is difficult to write mathematics fluently if these
characters are not available for use. It is difficult
to read mathematics if corresponding glyphs are not available
for presentation on specific display devices.
</p>
<p>The W3C Math Working Group therefore took on the job
of specifying part of the mechanism needed to proceed from
notation to final presentation, and has collaborated with the
<a href="http://www.unicode.org/">Unicode Technical Committee</a>
(UTC) and the <a href="http://www.stixfonts.org/">STIX Fonts Project</a>
in undertaking specification of the rest.</p>
<p>This chapter contains discussion of
characters for use within MathML, recommendations for their use,
and warnings concerning the correct form of the
corresponding code points given in the Universal Multiple-Octet Coded Character
Set (UCS) <a href="appendixg.xml#ISO10646">[ISO10646]</a> as codified in Unicode <a href="appendixg.xml#Unicode">[Unicode]</a>.
For simplicity we refer to this character set by the short name Unicode.
Unless otherwise stated, the mappings discussed in this chapter and
elsewhere in the MathML 3.0 recommendation are based on Unicode 5.2.
Conformant MathML processors (see <a href="chapter2.xml#interf.genproc">Section 2.3 Conformance</a>) are
free to use characters defined in Unicode 5.2 or later.
</p>
<p>While a long process of review and adoption by UTC and ISO/IEC
of the characters of special interest to mathematics and MathML is
now complete, more characters may be added in the future. For the latest
character tables and font information,
see the <a href="appendixg.xml#Entities">[Entities]</a> and the <a href="http://www.unicode.org/">Unicode
Home Page</a>, notably
<a href="http://www.unicode.org/unicode/alloc/Pipeline.html">Unicode Work
in Progress</a> and
<a href="http://www.unicode.org/reports/tr25/tr25-8.html">
Unicode Technical Report #25 “Unicode Support for Mathematics”</a>.</p>
<p>
A MathML token element (see <a href="chapter3.xml#presm.tokel">Section 3.2 Token Elements</a>, <a href="chapter4.xml#contm.cn">Section 4.2.1 Numbers <code><cn></code></a>,
<a href="chapter4.xml#contm.ci">Section 4.2.2 Content Identifiers <code><ci></code></a>, <a href="chapter4.xml#contm.csymbol">Section 4.2.3 Content Symbols <code><csymbol></code></a>) takes as content a
sequence of MathML characters or <code>mglyph</code> elements. The latter are
used to represent characters that do not have a Unicode encoding, as described in
<a href="chapter3.xml#presm.mglyph">Section 3.2.1.2 Using images to represent
symbols <code><mglyph/></code></a>. The need for <code>mglyph</code> should be rare because Unicode 3.1
provided approximately one thousand alphabetic characters for mathematics, and
Unicode 3.2 added over 900 more special mathematical symbols.
</p>
</div>
<div class="div2">
<h2><a id="chars.unicodechars"></a>7.2 Unicode Character Data</h2>
<p>
Any character allowed by XML may be used in MathML. More precisely,
the legal Unicode characters have the hexadecimal code
numbers 09 (tab = U+0009), 0A (line feed = U+000A), 0D (carriage
return = U+000D), 20-D7FF (U+0020..U+D7FF), E000-FFFD
(U+E000..U+FFFD), and 10000-10FFFF (U+10000..U+10FFFF).
The exclusions above code number D7FF are of the blocks used
in surrogate pairs, and the two characters guaranteed not to be
Unicode characters at all. U+FFFE is excluded to allow determination
of byte order in certain encodings.
</p>
<p>
There are essentially three different ways of encoding character data
in an XML document.
</p>
<ul>
<li>
<p>Using characters directly: For example, the 'é' (character U+00E9 [LATIN SMALL LETTER
E WITH ACUTE]) may have been inserted.
This option is only useful
if the character encoding specified for the XML document includes
the character intended. Note that if the document is, for example,
encoded in
Latin-1 (ISO-8859-1) then <em>only</em> the characters in that
encoding are available directly; for instance character
U+00E9 (eacute) is, but character
U+03B1 (alpha) is not.
</p>
</li>
<li>
<p>
Using numeric XML character references: For example, 'é' may be
represented as &#233; (decimal) or &#xE9; (hex),
or &#0233; (decimal) or &#x00E9;.
Note that the numbers in the character references always refer to the Unicode encoding
(and not to
the character encoding used in the XML file). By using character
references it is always possible to access the entire Unicode range.
</p>
</li>
<li>
<p>
Using entity references: The MathML DTD defines internal entities that
expand to character data. Thus for example the entity reference
&eacute; may be used rather than the character reference
&#xE9;. An XML fragment that uses an entity
reference which is not defined in a DTD is not well-formed; therefore
it will be rejected by an XML parser. For this reason
every fragment using entity references must
use a DOCTYPE declaration which specifies the MathML DTD, or a DTD
that at least declares any entity reference used in the MathML
instance. The need to use a DOCTYPE complicates inclusion of MathML in
some documents. However, entity references can be useful for small
illustrative examples.
</p>
</li>
</ul>
</div>
<div class="div2">
<h2><a id="chars.entities"></a>7.3 Entity Declarations</h2>
<p>Earlier versions of this MathML specification included detailed
listings of the entity definitions to be used with the MathML DTD.
These entity definitions are of more general use, and have now been
separated into an ancillary document, XML Entity Definitions for
Characters <a href="appendixg.xml#Entities">[Entities]</a>. The
tables there list the entity names and the corresponding
Unicode character references.
That document describes several entity sets; not all of them are used in
the MathML DTD.
The MathML DTD references the
<a href="http://www.w3.org/2003/entities/2007/htmlmathml.ent">combined HTML MathML entity set</a>
defined in <a href="appendixg.xml#Entities">[Entities]</a>.
</p>
</div>
<div class="div2">
<h2><a id="chars.mglyph"></a>7.4 Special Characters Not in Unicode</h2>
<p>
For special purposes, one may need a symbol which does not have a
Unicode representation.
In these cases one may use the <a href="chapter3.xml#presm.mglyph"><code>mglyph</code></a>
element for direct access to a glyph as an image, or (in some systems)
from a font that uses a non-Unicode encoding.
All MathML token elements accept characters in their content and
also accept an <code>mglyph</code> there.
Beware, however, that use of <code>mglyph</code> to access a font is
deprecated and the mechanism may not work in all systems. The
<code>mglyph</code> element should always supply a useful alternative
representation in its <code>alt</code> attribute.
</p>
</div>
<div class="div2">
<h2><a id="chars.BMP-SMP"></a>7.5 Mathematical Alphanumeric Symbols</h2>
<p>
In mathematical and scientific writing, single letters often denote
variables and constants in a given context. The increasing complexity
of science has led to the use of
certain common alphabet and font variations to provide enough special
symbols of this letter-like type. These denotations are generally
<em>not</em> letters that may be used to make up words with
recognized meanings, but individual carriers of semantics themselves.
Writing a string of such symbols is usually interpreted in terms of
some composition law, for instance, multiplication. Many letter-like
symbols may be quickly interpreted as
of a certain mathematical type by specialists in a given area:
for instance, bold symbols, whether
based on Latin or Greek letters, as vectors in physics or engineering,
or Fraktur symbols as Lie algebras in part of pure mathematics.
</p>
<p>
The additional Mathematical Alphanumeric Symbols
provided in Unicode 3.1 have
code points in the range U+1D400 to U+1D7FF in <em>Plane 1</em>, that is, in the first
plane with Unicode values higher than 2<sup>16</sup>. This plane of
characters is also known as the Secondary Multilingual Plane (SMP),
in contrast to the Basic Multilingual Plane (BMP) which
was originally the entire extent of Unicode. Support for Plane 1 characters in currently
deployed software is not always reliable, but it should be possible in
multilingual operating systems, since Plane 2 has many Chinese
characters that must be displayable in East Asian locales.</p>
<p>
As discussed in <a href="chapter3.xml#presm.commatt">Section 3.2.2 Mathematics style attributes common to token elements</a>, MathML offers an
alternative mechanism to specify mathematical alphanumeric characters.
This alternative mechanism spans the gap between the
specification of the mathematical alphanumeric symbols as Unicode
code points, and the deployment of software and fonts that support them.
Namely, one uses the <code>mathvariant</code> attribute on a token element
such as <code>mi</code> to indicate that the character data in the token
element selects a mathematical alphanumeric symbol.
</p>
<p>
In principle, any mathvariant value may be used with any character
data to define a specific symbolic token. In practice, only certain
combinations of character data and mathvariant values will be visually
distinguished by a given renderer.
In this section we explain the correspondence between certain characters
in Plane 0 that, when modified by the <code>mathvariant</code> attribute,
are considered equivalent to mathematical alphanumeric symbol characters.
</p>
<p>
The mathematical alphanumeric symbol characters in Plane 1 include
alphabets for Latin upper-case and lower-case letters, including
dotless i and j, Greek upper-case and lower-case letters, Greek symbols
(also known as variants), including upper-case and lower-case digamma,
and Latin digits. These alphabets provide Plane 1 Unicode code points
that differ from corresponding Plane 0 characters only by a variation
in font that carries mathematical semantics when used in a formula.
</p>
<p>
The <code>mathvariant</code> attribute uses exactly this correspondence to
provide an alternate markup encoding that selects these Plane 1 characters.
For example, the Mathematical Italic alphabet runs from U+1D434 ("A")
to U+1D467 ("z"). Thus, a typical example of an identifier for a
variable, marked up as
</p>
<table>
<tr>
<td>
<pre class="mathml">
<mi>a</mi>
</pre>
</td>
<td class="mathml-render" valign="middle"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>a</mi>
</math></td>
</tr>
</table>
<p>
and rendered in a mathematical italic font (as described in
<a href="chapter3.xml#presm.mi">Section 3.2.3 Identifier <code><mi></code></a>) could equivalently be marked up as
</p>
<table>
<tr>
<td>
<pre class="mathml">
<mi><span title="#x1D44E">&#x1D44E;</span><span class="uname"><!--mathematical italic small a--></span><!--MATHEMATICAL ITALIC SMALL A--></mi>
</pre>
</td>
<td class="mathml-render" valign="middle"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>𝑎</mi>
</math></td>
</tr>
</table>
<p>
which invokes the Mathematical Italic lower-case a explicitly.
</p>
<p>
An important use of the mathematical alphanumeric symbols in Plane 1
is for identifiers normally printed in special mathematical fonts,
such as Fraktur, Greek, Boldface, or Script. As another example,
the Mathematical Fraktur alphabet runs from U+1D504 ("A") to U+1D537 ("z").
Thus, an identifier for a variable that uses Fraktur characters could
be marked up as
</p>
<table>
<tr>
<td>
<pre class="mathml">
<mi><span title="#x1D504">&#x1D504;</span><span class="uname"><!--mathematical fraktur capital a--></span><!--BLACK-LETTER CAPITAL A--></mi>
</pre>
</td>
<td class="mathml-render" valign="middle"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>𝔄</mi>
</math></td>
</tr>
</table>
<p>
An alternative, equivalent markup for this example is to use the
common upper-case A, modified by using the <code>mathvariant</code> attribute:
</p>
<table>
<tr>
<td>
<pre class="mathml">
<mi mathvariant="fraktur">A</mi>
</pre>
</td>
<td class="mathml-render" valign="middle"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mi mathvariant="fraktur">A</mi>
</math></td>
</tr>
</table>
<p>
A MathML processor must treat a mathematical alphanumeric character
(when it appears) as identical to the corresponding combination of
the unstyled character and mathvariant attribute value.
It is important to note that the mathvariant attribute specifies a
semantic class of characters, each of which has a specific appearance
that should be protected from document-wide style changes, so the
intended meaning of the character may be preserved. The use of a
mathematical alphanumeric character is also intended to preserve
this specific appearance, and so these characters are also not to
be affected by surrounding style changes.
</p>
<p>
Not all combinations of character data and mathvariant values have assigned
Unicode code points. For example, sans-serif Greek alphabets are
omitted, while bold sans-serif Greek alphabets are included, and
bold digits are included, while bold-italic digits are excluded.
A renderer should visually distinguish those combinations of character data
and mathvariant attribute values that it can subject to the
availability of font characters.
It is intended that renderers distinghish at least those combinations
that have equivalent Unicode code points, and renderers are free to
ignore those combinations that have no assigned Unicode code point
or for which adequate font support is unavailable.
</p>
<p>
The exact correspondence between a mathematical alphabetic character
and an unstyled character is complicated by the fact that certain
characters that were already present in Unicode in Plane 0 are not in
the 'expected' sequence in Plane 1. The table below shows the Plane 0
mathematical alphanumeric symbols, listing for each character its
Unicode code point, its Unicode character name, its corresponding
unstyled alphabetic character, and the code point in Plane 1 where
one might naturally have sought this character.
</p>
<table id="chars.letter-like-tables" class="data">
<thead>
<tr>
<th>Unicode code point</th>
<th>Unicode name</th>
<th>BMP code</th>
<th>Plane-1 code</th>
</tr>
</thead>
<tbody>
<tr>
<td>U+210E</td>
<td>PLANCK CONSTANT</td>
<td>U+0068</td>
<td>U+1D455</td>
</tr>
<tr>
<td>U+212C</td>
<td>SCRIPT CAPITAL B</td>
<td>U+0042</td>
<td>U+1D49D</td>
</tr>
<tr>
<td>U+2130</td>
<td>SCRIPT CAPITAL E</td>
<td>U+0045</td>
<td>U+1D4A0</td>
</tr>
<tr>
<td>U+2131</td>
<td>SCRIPT CAPITAL F</td>
<td>U+0046</td>
<td>U+1D4A1</td>
</tr>
<tr>
<td>U+210B</td>
<td>SCRIPT CAPITAL H</td>
<td>U+0048</td>
<td>U+1D4A3</td>
</tr>
<tr>
<td>U+2110</td>
<td>SCRIPT CAPITAL I</td>
<td>U+0049</td>
<td>U+1D4A4</td>
</tr>
<tr>
<td>U+2112</td>
<td>SCRIPT CAPITAL L</td>
<td>U+004C</td>
<td>U+1D4A7</td>
</tr>
<tr>
<td>U+2133</td>
<td>SCRIPT CAPITAL M</td>
<td>U+004D</td>
<td>U+1D4A8</td>
</tr>
<tr>
<td>U+211B</td>
<td>SCRIPT CAPITAL R</td>
<td>U+0052</td>
<td>U+1D4AD</td>
</tr>
<tr>
<td>U+212F</td>
<td>SCRIPT SMALL E</td>
<td>U+0065</td>
<td>U+1D4BA</td>
</tr>
<tr>
<td>U+210A</td>
<td>SCRIPT SMALL G</td>
<td>U+0067</td>
<td>U+1D4BC</td>
</tr>
<tr>
<td>U+2134</td>
<td>SCRIPT SMALL O</td>
<td>U+006F</td>
<td>U+1D4C4</td>
</tr>
<tr>
<td>U+212D</td>
<td>BLACK-LETTER CAPITAL C</td>
<td>U+0043</td>
<td>U+1D506</td>
</tr>
<tr>
<td>U+210C</td>
<td>BLACK-LETTER CAPITAL H</td>
<td>U+0048</td>
<td>U+1D50B</td>
</tr>
<tr>
<td>U+2111</td>
<td>BLACK-LETTER CAPITAL I</td>
<td>U+0049</td>
<td>U+1D50C</td>
</tr>
<tr>
<td>U+211C</td>
<td>BLACK-LETTER CAPITAL R</td>
<td>U+0052</td>
<td>U+1D515</td>
</tr>
<tr>
<td>U+2128</td>
<td>BLACK-LETTER CAPITAL Z</td>
<td>U+005A</td>
<td>U+1D51D</td>
</tr>
<tr>
<td>U+2102</td>
<td>DOUBLE-STRUCK CAPITAL C</td>
<td>U+0043</td>
<td>U+1D53A</td>
</tr>
<tr>
<td>U+210D</td>
<td>DOUBLE-STRUCK CAPITAL H</td>
<td>U+0048</td>
<td>U+1D53F</td>
</tr>
<tr>
<td>U+2115</td>
<td>DOUBLE-STRUCK CAPITAL N</td>
<td>U+004E</td>
<td>U+1D545</td>
</tr>
<tr>
<td>U+2119</td>
<td>DOUBLE-STRUCK CAPITAL P</td>
<td>U+0050</td>
<td>U+1D547</td>
</tr>
<tr>
<td>U+211A</td>
<td>DOUBLE-STRUCK CAPITAL Q</td>
<td>U+0051</td>
<td>U+1D548</td>
</tr>
<tr>
<td>U+211D</td>
<td>DOUBLE-STRUCK CAPITAL R</td>
<td>U+0052</td>
<td>U+1D549</td>
</tr>
<tr>
<td>U+2124</td>
<td>DOUBLE-STRUCK CAPITAL Z</td>
<td>U+005A</td>
<td>U+1D551</td>
</tr>
</tbody>
</table>
<p>
Mathematical Alphanumeric Symbol characters should not be used for styled prose.
For example, Mathematical Fraktur A must not be used to just select
a blackletter font for an uppercase A as it
would create problems for searching, restyling (e.g. for accessibility),
and many other kinds of processing.
</p>
</div>
<div class="div2">
<h2><a id="chars.nonmark"></a>7.6 Non-Marking Characters</h2>
<p>
Some characters, although important for the quality of print or
alternative rendering, do not have glyph marks that correspond
directly to them. They are called here non-marking characters.
Their roles are
discussed in <a href="chapter3.xml">Chapter 3 Presentation Markup</a> and <a href="chapter4.xml">Chapter 4 Content Markup</a>.</p>
<p>In MathML, control of page composition, such as line-breaking, is
effected by the use of the proper attributes on the <code>mo</code> and <code>mspace</code> elements.</p>
<p>The characters below are not simple spacers. They are
especially important new additions to the UCS because they provide
textual clues which can increase the quality of print rendering,
permit correct audio rendering, and allow the unique recovery of
mathematical semantics from text which is visually ambiguous.
</p>
<table id="chars.table-white">
<thead>
<tr>
<th>Unicode code point</th>
<th>Unicode name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>U+2061</td>
<td>FUNCTION APPLICATION</td>
<td>character showing function application in presentation tagging
(<a href="chapter3.xml#presm.mo">Section 3.2.5 Operator, Fence, Separator or Accent
<code><mo></code></a>)</td>
</tr>
<tr>
<td>U+2062</td>
<td>INVISIBLE TIMES</td>
<td>marks multiplication when it is understood without a mark
(<a href="chapter3.xml#presm.mo">Section 3.2.5 Operator, Fence, Separator or Accent
<code><mo></code></a>)</td>
</tr>
<tr>
<td>U+2063</td>
<td>INVISIBLE SEPARATOR</td>
<td>used as a separator, e.g., in indices (<a href="chapter3.xml#presm.mo">Section 3.2.5 Operator, Fence, Separator or Accent
<code><mo></code></a>)</td>
</tr>
<tr>
<td>U+2064</td>
<td>INVISIBLE PLUS</td>
<td>marks addition, especially in constructs such as 1½
(<a href="chapter3.xml#presm.mo">Section 3.2.5 Operator, Fence, Separator or Accent
<code><mo></code></a>)</td>
</tr>
</tbody>
</table>
</div>
<div class="div2">
<h2><a id="chars.anomalous"></a>7.7 Anomalous Mathematical Characters</h2>
<p>Some characters which occur fairly often in mathematical texts, and
have special significance there, are frequently confused with other
similar characters in the UCS. In some cases, common keyboard
characters have become entrenched as alternatives to the more appropriate
mathematical characters. In others, characters have legitimate uses in
both formulas and text, but conflicting rendering and font
conventions. All these characters are called here anomalous
characters.</p>
<div class="div3">
<h3><a id="chars.keyboard"></a>7.7.1 Keyboard Characters</h3>
<p>Typical Latin-1-based keyboards contain several characters that
are visually similar to important mathematical characters.
Consequently, these characters are frequently substituted,
intentionally or unintentionally, for their more correct mathematical
counterparts.</p>
<div class="div4">
<h4><a id="chars.hyph-minus"></a>7.7.1.1 Minus</h4>
<p>The most common ordinary text character which enjoys a special
mathematical use is U+002D [HYPHEN-MINUS]. As its Unicode name
suggests, it is used as a hyphen in prose contexts, and as a minus
or negative sign in formulas.
For text use, there is a specific code point U+2010 [HYPHEN] which is
intended for prose contexts, and which should render as a hyphen or
short dash.
For mathematical use, there is another code point U+2212 [MINUS SIGN]
which is intended for mathematical formulas, and which should render
as a longer minus or negative sign.
MathML renderers should treat U+002D [HYPHEN-MINUS] as equivalent to
U+2212 [MINUS SIGN] in formula contexts such as <code>mo</code>, and as
equivalent to U+2010 [HYPHEN] in text contexts such as <code>mtext</code>.
</p>
</div>
<div class="div4">
<h4><a id="chars.prime-quote"></a>7.7.1.2 Apostrophes, Quotes and Primes</h4>
<p>On a typical European keyboard there is a key available which is
viewed as an apostrophe or a single quotation mark (an upright or
right quotation mark). Thus one key is doing double duty for prose
input to enter U+0027 [APOSTROPHE] and U+2019 [RIGHT SINGLE QUOTATION
MARK]. In mathematical contexts it is also commonly used for the
prime, which should be U+2032 [PRIME]. Unicode recognizes the
overloading of this symbol and remarks that it can also signify the
units of minutes or feet. In the unstructured printed text of normal
prose the characters are placed next to one another. The U+0027
[APOSTROPHE] and U+2019 [RIGHT SINGLE QUOTATION MARK] are marked with
glyphs that are small and raised with respect to the center line of
the text. The fonts used provide small raised glyphs in the
appropriate places indexed by the Unicode codes. The U+2032 [PRIME]
of mathematics is similarly treated in fuller Unicode fonts.
</p>
<p>MathML renderers are encouraged to treat U+0027
[APOSTROPHE] as U+2032 [PRIME] when appropriate in
formula contexts.</p>
<p>A final remark is that a ‘prime’ is often used in
transliteration of the Cyrillic character U+044C [CYRILLIC SMALL
LETTER SOFT SIGN]. This different use of primes is not part of
considerations for mathematical formulas.
</p>
</div>
<div class="div4">
<h4><a id="id.7.7.1.3"></a>7.7.1.3 Other Keyboard Substitutions</h4>
<p>While the minus and prime characters are the most common and
important keyboard characters with more precise mathematical
counterparts, there are a number of other keyboard character
substitutions that are sometime used. For example some may expect
</p>
<table>
<tr>
<td>
<pre class="mathml"><mo>''</mo></pre>
</td>
<td class="mathml-render" valign="middle"><math xmlns="http://www.w3.org/1998/Math/MathML"><mo>''</mo></math></td>
</tr>
</table>
<p> to be treated as
U+2033 [DOUBLE PRIME], and analogous substitutions could perhaps be made for U+2034
[TRIPLE PRIME] and U+2057 [QUADRUPLE PRIME]. Similarly, sometimes U+007C [VERTICAL
LINE] is used for U+2223 [DIVIDES]. MathML regards these as
application-specific authoring conventions, and recommends that
authoring tools generate markup using the more precise mathematical
characters for better interoperability.
</p>
</div>
</div>
<div class="div3">
<h3><a id="chars.pseudo-scripts"></a>7.7.2 Pseudo-scripts</h3>
<p>There are a number of characters in the UCS that traditionally have
been taken to have a natural ‘script’ aspect. The
visual presentation of these characters is similar to a script, that
is, raised from the baseline, and smaller than the base font size. The
degree symbol and prime characters are examples. For use in text, such
characters occur in sequence with the identifier they follow, and are
typically rendered using the same font. These characters are called
pseudo-scripts here.</p>
<p>In almost all mathematical contexts, pseudo-script characters should
be associated
with a base expression using explicit script markup in MathML. For
example, the preferred encoding of "x prime" is
</p>
<table>
<tr>
<td>
<pre class="mathml"><msup><mi>x</mi><mo><span title="#x2032">&#x2032;</span><span class="uname"><!--prime--></span><!--PRIME--></mo></msup></pre>
</td>
<td class="mathml-render" valign="middle"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>x</mi><mo>′</mo></msup></math></td>
</tr>
</table>
<p>
and not
</p>
<table>
<tr>
<td>
<pre class="mathml"><mi>x'</mi></pre>
</td>
<td class="mathml-render" valign="middle"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>x'</mi></math></td>
</tr>
</table>
<p>
or any other variants not using an explicit script construct. Note, however, that
within
text contexts such as <code>mtext</code>, pseudo-scripts may be used in sequence with other character data.</p>
<p>There are two reasons why explicit markup is preferable in
mathematical contexts. First, a problem arises with typesetting, when
pseudo-scripts are used with subscripted identifiers. Traditionally,
subscripting of x' would be rendered stacked under the prime. This is
easily accomplished with script markup, for example:
</p>
<table>
<tr>
<td>
<pre class="mathml"><mrow><msubsup><mi>x</mi><mn>0</mn><mo><span title="#x2032">&#x2032;</span><span class="uname"><!--prime--></span><!--PRIME--></mo></msubsup></mrow></pre>
</td>
<td class="mathml-render" valign="middle"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><msubsup><mi>x</mi><mn>0</mn><mo>′</mo></msubsup></mrow></math></td>
</tr>
</table>
<p>
By contrast,
</p>
<table>
<tr>
<td>
<pre class="mathml"><mrow><msub><mi>x'</mi><mn>0</mn></msub></mrow></pre>
</td>
<td class="mathml-render" valign="middle"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><msub><mi>x'</mi><mn>0</mn></msub></mrow></math></td>
</tr>
</table>
<p>
will render with staggered scripts.</p>
<p>Note this means that a renderer of MathML will have to treat
pseudo-scripts differently from most other character codes it finds in
a superscript position; in most fonts, the glyphs for pseudo-scripts
are already shrunk and raised from the baseline.
</p>
<p>The second reason that explicit script markup is preferrable to
juxtaposition of characters is that it generally better reflects the
intended mathematical structure. For example,
</p>
<table>
<tr>
<td>
<pre class="mathml"><msup>
<mrow><mo>(</mo><mrow><mi>f</mi><mo>+</mo><mi>g</mi></mrow><mo>)</mo></mrow>
<mo><span title="#x2032">&#x2032;</span><span class="uname"><!--prime--></span><!--PRIME--></mo>
</msup></pre>
</td>
<td class="mathml-render" valign="middle"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup>
<mrow><mo>(</mo><mrow><mi>f</mi><mo>+</mo><mi>g</mi></mrow><mo>)</mo></mrow>
<mo>′</mo>
</msup></math></td>
</tr>
</table>
<p>
accurately reflects that the prime here is operating on an entire
expression, and does not suggest that the prime is acting on the final right parenthesis.
</p>
<p>However, the data model for all MathML token elements is Unicode text,
so one cannot rule out the possibility of valid MathML markup
containing constructions such as
</p>
<table>
<tr>
<td>
<pre class="mathml"><mrow><mi>x'</mi></mrow></pre>
</td>
<td class="mathml-render" valign="middle"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi>x'</mi></mrow></math></td>
</tr>
</table>
<p>
and
</p>
<table>
<tr>
<td>
<pre class="mathml"><mrow><mi>x</mi><mo>'</mo></mrow></pre>
</td>
<td class="mathml-render" valign="middle"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi>x</mi><mo>'</mo></mrow></math></td>
</tr>
</table>
<p>
While the first form may, in some rare situations, legitmately be used
to distinguish a multi-character identifer named x' from the
derivative of a function x, such forms should generally be avoided.
Authoring and validation tools are encouraged to generate the
recommended script markup:
</p>
<table>
<tr>
<td>
<pre class="mathml"><mrow><msup><mi>x</mi><mo><span title="#x2032">&#x2032;</span><span class="uname"><!--prime--></span><!--PRIME--></mo></msup></mrow></pre>
</td>
<td class="mathml-render" valign="middle"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><msup><mi>x</mi><mo>′</mo></msup></mrow></math></td>
</tr>
</table>
<p>The U+2032 [PRIME] character is perhaps the most common
pseudo-script, but there are many others, as listed below:
</p>
<table>
<thead>
<tr>