blob: 0d9350c1cd3963d83b848bd3485b86d244d30d36 (
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
|
\defineregister[function][functions]
\defineregister[variable][variables]
\definehead[source][subject]
\definehead[extra] [subsubject]
\definehead[topic] [subsubsubject]
\setuphead[source][style=\bfb]
\setuphead[extra] [style=\bfa]
\setuphead[topic] [style=\bf]
\def\LDXkey #1{\bold{#1}}
\def\LDXfunction#1{\LDXkey{function} #1\function{#1}}
\def\LDXvariable#1{#1\variable{#1}}
\def\LDXcomment #1{{\tt--#1}}
\def\LDXsource #1{\source{#1}}
\defineXMLenvironment
[ldx:document]
{\page}
{\determineregistercharacteristics[function]
\startmode[*register]
\extra{Functions}
\placeregister[function]
\stopmode
\determineregistercharacteristics[variable]
\startmode[*register]
\extra{Variables}
\placeregister[variable]
\stopmode}
\defineXMLargument [ldx:source] \LDXsource
\defineXMLargument [ldx:key] \LDXkey
\defineXMLargument [ldx:variable] \LDXvariable
\defineXMLargument [ldx:function] \LDXfunction
\defineXMLargument [ldx:com] \LDXcomment
\newcounter\CommentCounter
\defineXMLenvironment[ldx:comment]
{\endgraf
\blank
\doglobal\increment\CommentCounter
\margintitle{\bf\CommentCounter}}
{\blank
\endgraf}
\defineXMLenvironment[ldx:dqs]
{\bgroup\tt"}
{"\egroup}
\defineXMLenvironment[ldx:sqs]
{\bgroup\tt'}
{'\egroup}
\defineXMLenvironment[ldx:code]
{\startpacked}
{\stoppacked}
\defineXMLenvironment[ldx:line][n=0,comment=] % maybe hangindent or leftskip
{\dontleavehmode
\hbox to \hsize\bgroup
\strut\hskip\dimexpr\XMLop{n}em/4\relax\relax
\doif {\XMLop{comment}} {yes} {\tt}}
{\hss
\egroup
\endgraf}
\defineXMLsingular[ldx:line]
{\crlf}
\defineXMLargument [source] \LDXsource
\defineXMLargument [key] \LDXkey
\defineXMLsingular[logo][label=,name=]
{\uppercasestring\XMLop{label}\XMLop{label}\to\ascii
\getvalue{\ascii}}
\defineXMLsingular[l][l=,n=]
{\uppercasestring\XMLop{l}\XMLop{l}\to\ascii
\getvalue{\ascii}}
\defineXMLenvironment
[typing]
{\blank
\startpacked \tt
\obeyspaces}
{\stoppacked
\blank}
\defineXMLentity[amp]{\&}
\defineXMLentity[lt] {<}
\defineXMLentity[gt] {>}
\usemodule[abr-02]
\startnotmode[atpragma]
\definetypeface[mainfacenormal] [ss][sans] [iwona] [default]
\definetypeface[mainfacenormal] [rm][serif][palatino] [default]
\definetypeface[mainfacenormal] [tt][mono] [modern] [default][rscale=1.1]
\definetypeface[mainfacenormal] [mm][math] [iwona] [default][encoding=default]
\definetypeface[mainfacemedium] [ss][sans] [iwona-medium][default]
\definetypeface[mainfacenormal] [rm][serif][palatino] [default]
\definetypeface[mainfacemedium] [tt][mono] [modern] [default][rscale=1.1]
\definetypeface[mainfacemedium] [mm][math] [iwona-medium][default][encoding=default]
\definetypeface[mainfacenarrowtt][tt][mono] [modern-cond] [default][rscale=1.1]
\stopnotmode
\startmode[atpragma]
\usetypescriptfile[type-ghz]
\definetypeface[mainfacenormal] [ss][sans] [optima-nova] [default]
\definetypeface[mainfacenormal] [rm][serif][palatino] [default]
\definetypeface[mainfacenormal] [tt][mono] [modern] [default][rscale=1.1]
\definetypeface[mainfacenormal] [mm][math] [palatino] [default][encoding=default]
\definetypeface[mainfacemedium] [ss][sans] [optima-nova] [default]
\definetypeface[mainfacenormal] [rm][serif][palatino] [default]
\definetypeface[mainfacemedium] [tt][mono] [modern] [default][rscale=1.1]
\definetypeface[mainfacemedium] [mm][math] [palatino] [default][encoding=default]
\definetypeface[mainfacenarrowtt][tt][mono] [modern-cond] [default][rscale=1.1]
\stopmode
\setupbodyfont[mainfacenormal,11pt]
\setupwhitespace[big]
% \starttext
% \processXMLfilegrouped{\inputfilename}
% \stoptext
|