ma-cb-en-usersetups.tex /size: 2285 b    last modification: 2023-12-21 09:43
1\startcomponent ma-cb-en-usersetups
2
3\enablemode[**en-us]
4
5\project ma-cb
6
7\startchapter[title=User specifications]
8
9\index{preamble}
10\index{input file}
11
12The setup area of your document is the area before
13the \type{\starttext} command. For example:
14
15\setuptyping
16    [escape=yes]
17
18\definestartstop
19    [comment][style={\rm}]
20
21\starttyping
22                                   /BTEX \comment{first line of your file} /ETEX
23\setuplayout[width=25cm]           /BTEX \comment{set the width of your text} /ETEX
24                                   /BTEX \comment{empty line for readability} /ETEX
25\starttext                         /BTEX \comment{starts your text} /ETEX
26Hello Hasselt.                     /BTEX \comment{your text} /ETEX
27\stoptext                          /BTEX \comment{ends your text} /ETEX
28\stoptyping
29
30Note that the first line of this file is empty. However, this first line
31is a preamble and can be used for specific user specifications. For example:
32
33\starttyping
34% engine=luatex                    /BTEX \comment{use the \type{luatex} engine} /ETEX
35                                   /BTEX \comment{empty line for readability} /ETEX
36\setuplayout[width=25cm]           /BTEX \comment{set the width of your text} /ETEX
37                                   /BTEX \comment{empty line for readability} /ETEX
38\starttext                         /BTEX \comment{starts your text} /ETEX
39Hello Hasselt.                     /BTEX \comment{your text} /ETEX
40\stoptext                          /BTEX \comment{ends your text} /ETEX
41\stoptyping
42
43Note that \CONTEXT\ sees the text after the \type{ % }
44sign in this first line not as a comment.
45
46The preamble can have a meaning for both \CONTEXT\ and \SCITE:
47
48\starttyping
49% engine=pdftex interface=en modes=screen language=us
50
51\starttext
52Hello Hasselt.
53\stoptext
54\stoptyping
55
56This will be interpreted as:
57
58\starttabulate[|T||p|]
59\NC engine=pdftex \NC \CONTEXT \EQ run as \PDFTEX \NC\NR
60\NC interface=en  \NC \CONTEXT \EQ expect english \CONTEXT\ commands (lexing) \NC\NR
61\NC               \NC \SCITE   \EQ use english lexing \NC\NR
62\NC modes=screen  \NC \CONTEXT \EQ invoke mode \type{screen} that is set in the text \NC\NR
63\NC language=uk   \NC \SCITE   \EQ use the english spell checker \NC\NR
64\stoptabulate
65
66\stopchapter
67
68\stopcomponent
69