summaryrefslogtreecommitdiff
path: root/tex/context/base/symb-mis.mkii
blob: 9921fa94fb154fd61797a43b03689b08c5567e5f (plain)
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
%D \module
%D   [       file=symb-mis,
%D        version=2002.05.07,
%D          title=\CONTEXT\ Symbol Libraries,
%D       subtitle=Miscelaneous,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\unprotect

%D We predefine some common symbols and conversions that will
%D be understood by many commands.

% \mathematics no longer needed, although only math fonts might have these

\definesymbol [\v!none]   []
\definesymbol [bullet]    [\mathematics{\bullet}]
\definesymbol [dash]      [\mathematics{-}]
\definesymbol [star]      [\mathematics{\star}]
\definesymbol [triangle]  [\mathematics{\triangleright}]
\definesymbol [circle]    [\mathematics{\circ}]
\definesymbol [square]    [\mathematics{\square}]
\definesymbol [diamond]   [\mathematics{\diamond}]

\definesymbol [smallcircle] [\hbox{\raise.1ex\hbox{\mathematics{\scriptscriptstyle\bigcirc}}}]
\definesymbol [medcircle]   [\hbox{\raise.1ex\hbox{\mathematics{\scriptstyle      \bigcirc}}}]
\definesymbol [bigcircle]   [\mathematics{\bigcirc}]

\definesymbol [1] [\symbol{bullet}]
\definesymbol [2] [\symbol{dash}]
\definesymbol [3] [\symbol{star}]
\definesymbol [4] [\symbol{triangle}]
\definesymbol [5] [\symbol{circle}]
\definesymbol [6] [\symbol{medcircle}]
\definesymbol [7] [\symbol{bigcircle}]
\definesymbol [8] [\symbol{square}]

%D Special hyperlinks, namely those to pages or navigational
%D properties, are associated with symbols.

\definesymbol [\v!firstpage]       [\gotobegincharacter]
\definesymbol [\v!previouspage]    [\gobackwardcharacter]
\definesymbol [\v!nextpage]        [\goforwardcharacter]
\definesymbol [\v!lastpage]        [\gotoendcharacter]
\definesymbol [\v!firstsubpage]    [\gotobegincharacter]
\definesymbol [\v!previoussubpage] [\gobackwardcharacter]
\definesymbol [\v!nextsubpage]     [\goforwardcharacter]
\definesymbol [\v!lastsubpage]     [\gotoendcharacter]
\definesymbol [\v!PreviousJump]    [\gobackjumpcharacter]
\definesymbol [\v!NextJump]        [\goforjumpcharacter]
\definesymbol [\v!CloseDocument]   [\closecharacter]

\definesymbol [\v!first]           [\symbol{\v!firstpage}]
\definesymbol [\v!previous]        [\symbol{\v!previouspage}]
\definesymbol [\v!next]            [\symbol{\v!nextpage}]
\definesymbol [\v!last]            [\symbol{\v!lastpage}]
\definesymbol [\v!somewhere]       [\gotosomewherecharacter]
\definesymbol [\v!nowhere]         [\gonowherecharacter]

\definesymbol [\v!backward]        [\symbol{\v!previouspage}]
\definesymbol [\v!forward]         [\symbol{\v!nextpage}]

%D The next two symbols (\symbol[P] and \symbol[S]) are
%D variations in their math counterparts. The following ones
%D {\em do} scale.

% todo : hook this into \textsection

\definesymbol [S] [\getglyph{MathSymbol}{\char"78}]
\definesymbol [P] [\getglyph{MathSymbol}{\char"7B}]

%D These symbols are taken from the Computer Moders Roman
%D symbol set or, when present, from the additional symbols of
%D the American Mathematical Society. Of course one can use
%D his or her own symbols by redefining them.

\def\dogotocharacter#1#2#3%
  {\ifx#1\undefined#2\else#3\fi}

\def\gotobegincharacter
  {\hbox
     {\dogotocharacter\blacktriangleleft
        {\setbox0\hbox{\mathematics{\triangleleft}}%
         \vrule\!!width.085ex\!!height1.075\ht0\!!depth\dp0
         \kern-.11ex\box0}
        {\setbox0\hbox{\mathematics{\blacktriangleleft}}%
         \setbox2\hbox{\vrule\!!height\ht0\!!depth\dp0\!!width.25ex}%
         \hbox{\lower.03ex\box2\kern-.35ex\box0}}}}

\def\gotoendcharacter
  {\hbox
     {\dogotocharacter\blacktriangleright
        {\setbox0\hbox{\mathematics{\triangleright}}%
         \copy0\kern-.11ex
         \vrule\!!width.085ex\!!height1.075\ht0\!!depth\dp0}
        {\setbox0\hbox{\mathematics{\blacktriangleright}}%
         \setbox2\hbox{\vrule\!!height\ht0\!!depth\dp0\!!width.25ex}%
         \hbox{\box0\kern-.35ex\lower.03ex\box2}}}}

\def\gobackwardcharacter
  {\mathematics{\dogotocharacter\blacktriangleright\triangleleft\blacktriangleleft}}

\def\goforwardcharacter
  {\mathematics{\dogotocharacter\blacktriangleright\triangleright\blacktriangleright}}

\def\gonowherecharacter
  {\mathematics{\bullet}}

\def\gotosomewherecharacter
  {{\hbox{\hsmash{\symbol[\v!previous]}\symbol[\v!next]}}}

\unexpanded\def\closecharacter
  {\dogotocharacter\boxtimes
     {\ruledhbox{\mathematics{\times}}}
     {\mathematics{\boxtimes}}}

\def\goforjumpcharacter
  {\hbox{\goforwardcharacter \kern-.5em\goforwardcharacter}}

\def\gobackjumpcharacter
  {\hbox{\gobackwardcharacter\kern-.5em\gobackwardcharacter}}

%D The next two symbols are for Daniel Flipo:

\ifx\high          \undefined \let\high          \firstofoneargument \fi % todo
\ifx\notsmallcapped\undefined \let\notsmallcapped\firstofoneargument \fi % todo

\definesymbol [Numero] [N\high{\notsmallcapped{o}\kern.2em}]
\definesymbol [numero] [n\high{\notsmallcapped{o}\kern.2em}]

\def\Numero{\symbol[Numero]}
\def\numero{\symbol[numero]}

\protect \endinput