x-lmx-demo.mkiv /size: 3060 b    last modification: 2020-07-01 14:35
1
% last page less markup
2 3
\usemodule
4
[
article
]
5 6
\setupbottomtexts
7
[
\directsetup
{
document
:
comment
}
]
8 9
\setuplayout
10
[
bottom
=
1
cm
]
11 12
\setupbottom
13
[
style
=
\small
\tt
]
14 15
\usemodule
16
[
lmx
-
html
]
17 18
% \startxmlsetups exa:variables
19
%
20
% \xmlfilter{#1}{/exa:variable/command(exa:variable)}
21
%
22
% % todo: fontkerns
23
%
24
% \xmldoif {#1} {/exa:variable[@name='bodyfont']} {
25
% \setupbodyfont
26
% [\xmltext{#1}{/exa:variable[@name='bodyfont']}]
27
% }
28
% \xmldoif {#1} {/exa:variable[@name='cutmarks' and text()='yes']} {
29
% \setuppapersize
30
% [A4]
31
% [oversized]
32
% \setuplayout
33
% [marking=on,
34
% location=middle]
35
% }
36
% \xmldoif {#1} {/exa:variable[@name='spelling' and text()='yes']} {
37
% % \loadspellchecklist[en][spell-en.txt]
38
% % \setupspellchecking[state=start,method=1]
39
% }
40
% \xmldoif {#1} {/exa:variable[@name='frame' and text()='yes']} {
41
% \showframe
42
% }
43
% \xmldoif {#1} {/exa:variable[@name='markup' and text()='yes']} {
44
% \showmakeup
45
% }
46
% \xmldoif {#1} {/exa:variable[@name='request' and text()='yes']} {
47
% \enablemode[showrequest]
48
% }
49
%
50
% \stopxmlsetups
51 52
\startxmlsetups
exa
:
variable
:
cutmarks
53
\xmldoif
{
#
1
}
{
.
[
text
()
=
'
yes
'
]
}
{
54
\setuppapersize
55
[
A
4
]
56
[
oversized
]
57
\setuplayout
58
[
marking
=
on
,
59
location
=
middle
]
60
}
61
\stopxmlsetups
62 63
\startxmlsetups
exa
:
variable
:
bodyfont
64
\setupbodyfont
65
[
\xmltext
{
#
1
}{
.
}
]
66
\stopxmlsetups
67 68
\startxmlsetups
exa
:
variable
:
frame
69
\xmldoif
{
#
1
}
{
.
[
text
()
=
'
yes
'
]
}
{
70
\showframe
71
}
72
\stopxmlsetups
73 74
\startxmlsetups
exa
:
variable
:
markup
75
\xmldoif
{
#
1
}
{
.
[
text
()
=
'
yes
'
]
}
{
76
\showmakeup
77
}
78
\stopxmlsetups
79 80
\startxmlsetups
exa
:
variable
:
request
81
\xmldoif
{
#
1
}
{
.
[
text
()
=
'
yes
'
]
}
{
82
\enablemode
[
showrequest
]
83
}
84
\stopxmlsetups
85 86
\startxmlsetups
exa
:
variable
87
\xmlsetup
{
#
1
}{
exa
:
variable
:
\xmlatt
{
#
1
}{
name
}}
88
\stopxmlsetups
89 90
\startxmlsetups
exa
:
variables
91
\xmlfilter
{
#
1
}{
/
exa
:
variable
/
command
(
exa
:
variable
)
}
92
\stopxmlsetups
93 94
\startsetups
document
:
comment
95
\xmlfilter
{
main
}{
/
exa
:
selection
/
exa
:
variables
/
exa
:
variable
[
@
name
=
'
comment
'
]
/
html
()
}
96
\stopsetups
97 98
\startxmlsetups
exa
:
entry
99 100
\startchapter
[
title
=
\xmlatt
{
#
1
}{
title
}
]
101
\samplefile
{
\xmlatt
{
#
1
}{
id
}}
102
\stopchapter
103 104
\stopxmlsetups
105 106
\startxmlsetups
exa
:
selection
107 108
\xmlfirst
{
#
1
}{
/
exa
:
variables
}
109 110
\starttitle
[
title
=
{
Contents
}
]
111
\placelist
[
chapter
][
criterium
=
all
]
112
\stoptitle
113 114
\xmlfilter
{
#
1
}{
/
exa
:
selectors
/
exa
:
selector
/
exa
:
tree
/
exa
:
entry
/
exa
:
entry
/
command
(
exa
:
entry
)
}
115 116
\stopxmlsetups
117 118
\startxmlsetups
xml
:
request
119
\xmlsetsetup
{
#
1
}
{
120
exa
:
variables
|
exa
:
selection
121
}
{
exa
:
*
}
122
\stopxmlsetups
123 124
\xmlregistersetup
{
xml
:
request
}
125 126
\starttext
127 128
\xmlprocess
{
main
}{
\inputfilename
}{}
129 130
\page
131 132
\doifelsemode
{
showrequest
}
{
133 134
\usemodule
[
scite
]
135 136
\start
137
\switchtobodyfont
[
small
]
138
\scitefile
[
\inputfilename
]
139
\stop
140 141
}
142 143
\stoptext
144