lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev Display of SGML Greek Math entities -- solution


From: Steve White
Subject: lynx-dev Display of SGML Greek Math entities -- solution
Date: Tue, 13 Aug 2002 09:11:40 -0700

Hi, All!

I've finally worked something out whereby the Greek alphabet and
the SGML Greek mathematical symbols are displayed distinctly.

It was suggested to use the Unicode codes in E000-F8FF "Private
Use Area" to code the math characters.  This range of Unicode is
explicitly free for "use by software developers and end users who
need a special set of characters for their application programs",
and it's still 16 bit, so...

I made changes to
        src/chrtrans/entity.h   and
        src/chrtrans/def7_uni.tbl
The diffs are listed below.

I checked that the Greek alphabet was still mapped correctly for
transliteration
        <http://www.zipcon.net/~swhite/docs/computers/browsers/greek.html>
I checked that all the Greek SGML was working correctly with
        
<http://www.zipcon.net/~swhite/docs/computers/browsers/entities_new.html>
You can see some formulas using Greek in action 
        <http://www.zipcon.net/~swhite/docs/math/math.html>

So I believe we have a solution.

Here is a summary history of this problem.
-----------------------------------------

1) Anyone who has used the SGML entities for their intended
purpose, the display of Greek symbols in mathematical formulas,
has been disppointed with the way Lynx displays them.

Currently, lynx tranliterates Greek mathematical characters into
their Latin equivalents, rendering them indistinct from Latin
characters in formulas, and often incomprehensible.  This amounts
to a loss of information, and is broken behavior.

It would be much better if they were displayed as their raw SGML
code.  It would be prettier if "&alpha;" were displayed as "alpha".

2) Internally, Lynx maps these characters to the corresponding
Unicode Greek alphabetic characters.  To simply change the display
for the SGML would mess up the display of Greek text, for which
Lynx correctly tranliterates the characters.

3) The documentation for the HTML 4 SGML entities
<http://www.w3.org/TR/html4/sgml/entities.html>, Sect 24.3,
suggests that the Greek SGML entities be displayed the same as the
Greek alphabetic characters, but goes on to emphasize that the
mapping used is up to the user agent.

4) This suggests mapping them internally to some other Unicode
than the Greek alphabetic codes.

5) The obvious choice of a Unicode range to which to map the SGML
characters is 1D400-1D7FF "Mathematical Alphanumeric Symbols",
which contain explicit Greek mathematical symbols.  Unfortunately,
Lynx doesn't seem to support the high (24 and 32-bit) Unicode ranges.

6) It was suggested elsewhere to make use of the Unicode range
E000-F8FF "Private Use Area".  The Unicode 3.0 documentation
<http://www.unicode.org/unicode/uni2book/u2.html>, Ch 13, Explains
that this range is for "use by software developers and end users
who need a special set of characters for their application
programs".  This was the ticket.

-------------------------- def7_uni.tbl.diff -------------------------------
2155a2156,2216
> 
> #
> # Ensure that the SGML Greek symbols are displayed distinctly from Latin
> # letters.
> # Would have liked to have mapped these to the proper Unicode characters
> # in the high range 1D6A8-1D6E1, but Lynx has trouble with that range...
> 
> U+e0c1:Alpha
> U+e0c2:Beta
> U+e0c3:Gamma
> U+e0c4:Delta
> U+e0c5:Epsilon
> U+e0c6:Zeta
> U+e0c7:Eta
> U+e0c8:Theta
> U+e0c9:Iota
> U+e0ca:Kappa
> U+e0cb:Lambda
> U+e0cc:Mu
> U+e0cd:Nu
> U+e0ce:Xi
> U+e0cf:Omicron
> U+e0d0:Pi
> U+e0d1:Rho
> U+e0d3:Sigma
> U+e0d4:Tau
> U+e0d5:Upsilon
> U+e0d6:Phi
> U+e0d7:Chi
> U+e0d8:Psi
> U+e0d9:Omega
> 
> U+e0e1:alpha
> U+e0e2:beta
> U+e0e3:gamma
> U+e0e4:delta
> U+e0e5:epsilon
> U+e0e6:zeta
> U+e0e7:eta
> U+e0e8:theta
> U+e0e9:iota
> U+e0ea:kappa
> U+e0eb:lambda
> U+e0ec:mu
> U+e0ed:nu
> U+e0ee:xi
> U+e0ef:omicron
> U+e0f0:pi
> U+e0f1:rho
> U+e0f2:sigmaf
> U+e0f3:sigma
> U+e0f4:tau
> U+e0f5:upsilon
> U+e0f6:phi
> U+e0f7:chi
> U+e0f8:psi
> U+e0f9:omega
> 
> U+e1f1:thetasym
> U+e1f2:upsih
> U+e1f3:piv
----------------------- entities.h.diff -----------------------------------
117c117
<   {"alpha",      945}, /* greek small letter alpha, U+03B1 ISOgrk3 */
---
>   {"alpha",      0xe000}, /* greek small letter alpha, U+03B1 ISOgrk3 */
398c398
<   {"Alpha",   0x0391},  /* GREEK CAPITAL LETTER ALPHA                    */
---
>   {"Alpha",   0xE0C1},  /* GREEK CAPITAL LETTER ALPHA                    */
406c406
<   {"Beta",    0x0392},  /* GREEK CAPITAL LETTER BETA                     */
---
>   {"Beta",    0xE0C2},  /* GREEK CAPITAL LETTER BETA                     */
415c415
<   {"Chi",     0x03A7},  /* GREEK CAPITAL LETTER CHI                      */
---
>   {"Chi",     0xE0D7},  /* GREEK CAPITAL LETTER CHI                      */
423c423
<   {"Delta",   0x0394},  /* GREEK CAPITAL LETTER DELTA                    */
---
>   {"Delta",   0xE0C4},  /* GREEK CAPITAL LETTER DELTA                    */
442,443c442,443
<   {"Epsilon", 0x0395},  /* GREEK CAPITAL LETTER EPSILON                  */
<   {"Eta",     0x0397},  /* GREEK CAPITAL LETTER ETA                      */
---
>   {"Epsilon", 0xE0C5},  /* GREEK CAPITAL LETTER EPSILON                  */
>   {"Eta",     0xE0C7},  /* GREEK CAPITAL LETTER ETA                      */
447c447
<   {"Gamma",   0x0393},  /* GREEK CAPITAL LETTER GAMMA                    */
---
>   {"Gamma",   0xE0C3},  /* GREEK CAPITAL LETTER GAMMA                    */
472c472
<   {"Iota",    0x0399},  /* GREEK CAPITAL LETTER IOTA                     */
---
>   {"Iota",    0xE0C9},  /* GREEK CAPITAL LETTER IOTA                     */
483c483
<   {"Kappa",   0x039A},  /* GREEK CAPITAL LETTER KAPPA                    */
---
>   {"Kappa",   0xE0CA},  /* GREEK CAPITAL LETTER KAPPA                    */
489c489
<   {"Lambda",  0x039B},  /* GREEK CAPITAL LETTER LAMDA                    */
---
>   {"Lambda",  0xE0CB},  /* GREEK CAPITAL LETTER LAMDA                    */
501c501
<   {"Mu",      0x039C},  /* GREEK CAPITAL LETTER MU                       */
---
>   {"Mu",      0xE0CC},  /* GREEK CAPITAL LETTER MU                       */
509c509
<   {"Nu",      0x039D},  /* GREEK CAPITAL LETTER NU                       */
---
>   {"Nu",      0xE0CD},  /* GREEK CAPITAL LETTER NU                       */
521,522c521,522
<   {"Omega",   0x03A9},  /* GREEK CAPITAL LETTER OMEGA                    */
<   {"Omicron", 0x039F},  /* GREEK CAPITAL LETTER OMICRON                  */
---
>   {"Omega",   0xE0D9},  /* GREEK CAPITAL LETTER OMEGA                    */
>   {"Omicron", 0xE0CF},  /* GREEK CAPITAL LETTER OMICRON                  */
530,531c530,531
<   {"Phi",     0x03A6},  /* GREEK CAPITAL LETTER PHI                      */
<   {"Pi",      0x03A0},  /* GREEK CAPITAL LETTER PI                       */
---
>   {"Phi",     0xE0D6},  /* GREEK CAPITAL LETTER PHI                      */
>   {"Pi",      0xE0D0},  /* GREEK CAPITAL LETTER PI                       */
533c533
<   {"Psi",     0x03A8},  /* GREEK CAPITAL LETTER PSI                      */
---
>   {"Psi",     0xE0D8},  /* GREEK CAPITAL LETTER PSI                      */
540c540
<   {"Rho",     0x03A1},  /* GREEK CAPITAL LETTER RHO                      */
---
>   {"Rho",     0xE0D1},  /* GREEK CAPITAL LETTER RHO                      */
550c550
<   {"Sigma",   0x03A3},  /* GREEK CAPITAL LETTER SIGMA                    */
---
>   {"Sigma",   0xE0D3},  /* GREEK CAPITAL LETTER SIGMA                    */
557c557
<   {"Tau",     0x03A4},  /* GREEK CAPITAL LETTER TAU                      */
---
>   {"Tau",     0xE0D4},  /* GREEK CAPITAL LETTER TAU                      */
562c562
<   {"Theta",   0x0398},  /* GREEK CAPITAL LETTER THETA                    */
---
>   {"Theta",   0xE0C8},  /* GREEK CAPITAL LETTER THETA                    */
577c577
<   {"Upsilon", 0x03A5},  /* GREEK CAPITAL LETTER UPSILON                  */
---
>   {"Upsilon", 0xE0D5},  /* GREEK CAPITAL LETTER UPSILON                  */
587c587
<   {"Xi",      0x039E},  /* GREEK CAPITAL LETTER XI                       */
---
>   {"Xi",      0xE0CE},  /* GREEK CAPITAL LETTER XI                       */
600c600
<   {"Zeta",    0x0396},  /* GREEK CAPITAL LETTER ZETA                     */
---
>   {"Zeta",    0xE0C6},  /* GREEK CAPITAL LETTER ZETA                     */
613c613
<   {"alpha",   0x03B1},  /* GREEK SMALL LETTER ALPHA                      */
---
>   {"alpha",   0xE0E1},  /* GREEK SMALL LETTER ALPHA                      */
682c682
<   {"beta",    0x03B2},  /* GREEK SMALL LETTER BETA                       */
---
>   {"beta",    0xE0E2},  /* GREEK SMALL LETTER BETA                       */
754c754
<   {"chi",     0x03C7},  /* GREEK SMALL LETTER CHI                        */
---
>   {"chi",     0xE0F7},  /* GREEK SMALL LETTER CHI                        */
792c792
<   {"delta",   0x03B4},  /* GREEK SMALL LETTER DELTA                      */
---
>   {"delta",   0xE0E4},  /* GREEK SMALL LETTER DELTA                      */
843c843
<   {"epsilon", 0x03B5},  /* GREEK SMALL LETTER EPSILON                    */
---
>   {"epsilon", 0xE0E5},  /* GREEK SMALL LETTER EPSILON                    */
849c849
<   {"eta",     0x03B7},  /* GREEK SMALL LETTER ETA                        */
---
>   {"eta",     0xE0E7},  /* GREEK SMALL LETTER ETA                        */
885c885
<   {"gamma",   0x03B3},  /* GREEK SMALL LETTER GAMMA                      */
---
>   {"gamma",   0xE0E3},  /* GREEK SMALL LETTER GAMMA                      */
943c943
<   {"iota",    0x03B9},  /* GREEK SMALL LETTER IOTA                       */
---
>   {"iota",    0xE0E9},  /* GREEK SMALL LETTER IOTA                       */
953c953
<   {"kappa",   0x03BA},  /* GREEK SMALL LETTER KAPPA                      */
---
>   {"kappa",   0xE0EA},  /* GREEK SMALL LETTER KAPPA                      */
967c967
<   {"lambda",  0x03BB},  /* GREEK SMALL LETTER LAMDA                      */
---
>   {"lambda",  0xE0EB},  /* GREEK SMALL LETTER LAMDA                      */
1037c1037
<   {"mu",      0x03BC},  /* GREEK SMALL LETTER MU                         */
---
>   {"mu",      0xE0EC},  /* GREEK SMALL LETTER MU                         */
1094c1094
<   {"nu",      0x03BD},  /* GREEK SMALL LETTER NU                         */
---
>   {"nu",      0xE0ED},  /* GREEK SMALL LETTER NU                         */
1121,1122c1121,1122
<   {"omega",   0x03C9},  /* GREEK SMALL LETTER OMEGA                      */
<   {"omicron", 0x03BF},  /* GREEK SMALL LETTER OMICRON                    */
---
>   {"omega",   0xE0F9},  /* GREEK SMALL LETTER OMEGA                      */
>   {"omicron", 0xE0EF},  /* GREEK SMALL LETTER OMICRON                    */
1145c1145
<   {"phi",     0x03C6},  /* GREEK SMALL LETTER PHI                        */
---
>   {"phi",     0xE0F6},  /* GREEK SMALL LETTER PHI                        */
1150,1151c1150,1151
<   {"pi",      0x03C0},  /* GREEK SMALL LETTER PI                         */
<   {"piv",     0x03D6},  /* GREEK PI SYMBOL                               */
---
>   {"pi",      0xE0F0},  /* GREEK SMALL LETTER PI                         */
>   {"piv",     0xE1F3},  /* GREEK PI SYMBOL                               */
1166c1166
<   {"psi",     0x03C8},  /* GREEK SMALL LETTER PSI                        */
---
>   {"psi",     0xE0F8},  /* GREEK SMALL LETTER PSI                        */
1196c1196
<   {"rho",     0x03C1},  /* GREEK SMALL LETTER RHO                        */
---
>   {"rho",     0xE0F1},  /* GREEK SMALL LETTER RHO                        */
1240,1241c1240,1241
<   {"sigma",   0x03C3},  /* GREEK SMALL LETTER SIGMA                      */
<   {"sigmaf",  0x03C2},  /* GREEK SMALL LETTER FINAL SIGMA                */
---
>   {"sigma",   0xE0F3},  /* GREEK SMALL LETTER SIGMA                      */
>   {"sigmaf",  0xE0F2},  /* GREEK SMALL LETTER FINAL SIGMA                */
1281c1281
<   {"tau",     0x03C4},  /* GREEK SMALL LETTER TAU                        */
---
>   {"tau",     0xE0F4},  /* GREEK SMALL LETTER TAU                        */
1289c1289
<   {"theta",   0x03B8},  /* GREEK SMALL LETTER THETA                      */
---
>   {"theta",   0xE0E8},  /* GREEK SMALL LETTER THETA                      */
1291c1291
<   {"thetasym",        0x03D1},  /* GREEK THETA SYMBOL                         
   */
---
>   {"thetasym",        0xE1F1},  /* GREEK THETA SYMBOL                         
>    */
1333,1334c1333,1334
<   {"upsih",   0x03D2},  /* GREEK UPSILON WITH HOOK SYMBOL                */
<   {"upsilon", 0x03C5},  /* GREEK SMALL LETTER UPSILON                    */
---
>   {"upsih",   0xE1F2},  /* GREEK UPSILON WITH HOOK SYMBOL                */
>   {"upsilon", 0xE0F5},  /* GREEK SMALL LETTER UPSILON                    */
1367c1367
<   {"xi",      0x03BE},  /* GREEK SMALL LETTER XI                         */
---
>   {"xi",      0xE0EE},  /* GREEK SMALL LETTER XI                         */
1383c1383
<   {"zeta",    0x03B6},  /* GREEK SMALL LETTER ZETA                       */
---
>   {"zeta",    0xE0E6},  /* GREEK SMALL LETTER ZETA                       */



; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]