core-def.mkiv /size: 3886 b    last modification: 2021-10-28 13:50
1%D \module
2%D   [       file=core-def,
3%D        version=2002.05.07,
4%D          title=\CONTEXT\ Core Macros,
5%D       subtitle=Defaults,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14\writestatus{loading}{ConTeXt Core Macros / Defaults}
15
16%D Here we collect settings that cannot be done earlier due to
17%D depedencies. More code will moved to this module later.
18
19\unprotect
20
21\usesymbols[mis,nav] % no longer mvs preloaded
22
23\setupsymbolset[navigation 1]
24
25\setupinteraction[\c!symbolset=navigation 1]
26
27% what a mess
28
29\everypar  \emptytoks
30\neverypar \emptytoks
31
32\appendtoks
33  % \flushnotes
34    \page_otr_command_synchronize_side_floats % an otr specific command
35    \checkindentation
36    \showparagraphnumber
37    \restoreinterlinepenalty
38  % \flushmargincontents
39  % \flushcommentanchors
40    \flushnotes
41    \synchronizenotes
42  % \OTRSETshowstatus
43    \registerparoptions
44  % \flushsyncpositions
45    \flushpostponednodedata
46    \typo_delimited_repeat
47    \insertparagraphintro
48    \typo_initial_handle
49    \typo_firstline_handle
50\to \everypar
51
52\appendtoks
53    \flushnotes
54\to \everydisplay
55
56% \appendtoks
57%     \adjustsidefloatdisplaylines
58% \to \everydisplay
59
60% \appendtoks
61%     \flushpostponednodedata
62% \to \neverypar
63
64% \appendtoks
65%     \flushsyncpositions
66% \to \everyheadstart
67
68% \appendtoks
69%     \flushsyncresets
70% \to \everyendoftextbody
71
72\appendtoks
73    \ignorespaces
74\to \everybeginofpar
75
76\appendtoks
77    \removeunwantedspaces
78  % \strut                % option ?
79  % \flushsyncresets
80  % \setlastlinewidth     % gone, will be done in lua
81    \endgraf
82\to \everyendofpar
83
84% initialization order:
85
86\ifdefined\font_preloads_at_every_job  \else \let\font_preloads_at_every_job \relax \fi
87\ifdefined\font_preloads_at_start_text \else \let\font_preloads_at_start_text\relax \fi
88\ifdefined\font_preloads_at_stop_text  \else \let\font_preloads_at_stop_text \relax \fi
89
90\appendtoks
91    \font_preloads_at_start_text
92\to \everystarttext
93
94\appendtoks
95    \font_preloads_at_stop_text
96\to \everystoptext
97
98% We made \loadoptionfile obsolete: we pass options via the command line to
99% luatex now and handle them directly instead of via a file. This also makes
100% the next obsolete:
101%
102% \directsetup{*runtime:options}
103% \directsetup{*runtime:modules}
104
105\appendtoks
106    \showcontextbanner
107    \initializenewlinechar
108    \calculatecurrenttime
109    \syst_files_load
110    % for the moment here (before doc env)
111    \setupoutput[pdf]%
112    %
113    \clf_setdocumentcommandline
114    \clf_setdocumentctxfile
115    \clf_setdocumentfilenames
116    \font_preloads_at_every_job
117    \settopskip                           % brrr
118    \initializemainlanguage
119    \initializepagebackgrounds
120    \initializepagecounters
121    \clf_setdocumentmodes
122    \clf_setdocumentmodules
123    \clf_setdocumentenvironments
124\to \everyjob
125
126\appendtoks
127    \ifarrangingpages\poparrangedpages\fi
128\to \everybye
129
130\prependtoks
131    \resetallattributes
132\to \everybeforeoutput
133
134\appendtoks
135    \the\everybackendshipout
136\to \everyshipout
137
138\prependtoks
139    \the\everylastbackendshipout
140\to \everylastshipout
141
142\prependtoks
143    \lefttoright
144\to \everybeforeoutput
145
146% temporary here:
147
148\pushoverloadmode
149    \frozen\unexpanded\def\arg{\mathortext\normalmatharg\normaltextarg}
150\popoverloadmode
151
152% might move to \everydump or even disappear:
153
154\nonknuthmode
155
156% brrr
157
158\appendtoks
159    \synchronizegloballinespecs
160    \synchronizelocallinespecs
161\to \everysetupbodyfont
162
163\appendtoks
164    \synchronizelocallinespecs
165\to \everyswitchtobodyfont
166
167% who knows
168
169% \appendtoks
170%     \resetcharacterspacing
171% \to \everyhyphenatedurl
172
173% \setbreakpoints[compound]
174
175%D Till we fixed all styles:
176
177\enforced\let\\\crlf % frozen or permanent?
178
179\protect \endinput
180