diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/core-uti.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/base/core-uti.tex | 136 |
1 files changed, 71 insertions, 65 deletions
diff --git a/Master/texmf-dist/tex/context/base/core-uti.tex b/Master/texmf-dist/tex/context/base/core-uti.tex index b630a13502b..b564347c178 100644 --- a/Master/texmf-dist/tex/context/base/core-uti.tex +++ b/Master/texmf-dist/tex/context/base/core-uti.tex @@ -66,8 +66,8 @@ \def\thisissectionseparator#1% {\bgroup \globallet\checksectionseparator\relax - \convertcommand \sectionseparator\to\asciia - \convertargument #1\to\asciib + \defconvertedcommand \asciia\sectionseparator + \defconvertedargument\asciib{#1}% \expanded{\gdef\noexpand\dosplitofffoliopart[####1\sectionseparator \sectionseparator####2\sectionseparator\sectionseparator####3]{####3}}% \ifx\asciia\asciib @@ -133,7 +133,7 @@ \to \everyopenutilities \appendtoks - \immediate\closeout\utility@tui % niet echt nodig +% \immediate\closeout\utility@tui % niet echt nodig \reportutilityproblems % should be a message : \let\writeutilitycommand \gobbleoneargument @@ -189,48 +189,74 @@ \newif\ifdoinpututilities \newif\ifunprotectutilities % voor't geval er \v!xxxxxx's zijn -% no longer needed, since texutil is now multi platform -% -% \def\utilitycheckmessage -% {\showmessage\m!systems{12}{}% -% \globallet\utilitycheckmessage=\relax} -% -% \def\saveutilityline#1 #2\txen% tricky maar ok, want achter \command -% {\if #1c% commands % in \ascii staat een spatie; #1 kan -% \write\scratchwrite{#2}% % \par in stringvorm zijn (eof)! -% \else\if#1s% synoniems -% \utilitycheckmessage -% \else\if#1r% registers -% \utilitycheckmessage -% \fi\fi\fi} +\def\currentutilityfilename{\jobname} + +% \long\def\doutilities#1#2#3#4#5% % introduceren in utility file +% {\restorecatcodes +% \resetutilities +% % more than one utility thing can be handled in one pass, +% % for instance lists, so we process ##1 as list +% \def\douticommand##1{\csname\s!set##1\endcsname}% +% \processcommacommand[#1]\douticommand +% \begingroup +% \def\currentutilityfilename{#2}% +% \notesenabledfalse +% \doinpututilitiestrue +% \global\utilitydonefalse +% \catcode`\\=\@@escape +% \catcode`\{=\@@begingroup +% \catcode`\}=\@@endgroup +% \catcode`\%=\@@comment\relax +% \pushendofline % geeft problemen zodra andere file wordt ingelezen +% \ifunprotectutilities % nog nodig ? +% \unprotect +% \fi +% \ifnum\catcode`\@=\@@active \else +% \catcode`\@=\@@letter % permits expanded commands with \@'s +% \fi +% \ifnum\catcode`\!=\@@active \else +% \catcode`\!=\@@letter % permits multilingual constants +% \fi +% #4% +% \the\everybeforeutilityread +% \readjobfile{#2.\f!outputextension}\donothing\donothing +% \the\everyafterutilityread +% #5% +% \relax +% \ifunprotectutilities +% \protect +% \fi +% \popendofline +% \ifutilitydone\else +% \doifsomething{#3} +% {\showmessage\m!systems9{{#3}}% +% \doifconcepttracing +% {\blank +% \type{[\currentmessagetext]}% +% \blank}}% +% \fi +% \endgroup} + +% we need to pop and push, else problems with reading +% utility files (toc) in xml mode and (e.g.) in a toc +% entry doing a doifmode % -% \def\checkutilityfile -% {\doiflocfileelse{\jobname.\f!outputextension} -% {} -% {\doiflocfileelse{\jobname.\f!inputextension} -% {\bgroup -% \showmessage\m!systems{11}{}% -% \openout\scratchwrite\jobname.\f!outputextension -% \openlocin\scratchread{\jobname.\f!inputextension}% -% \def\doprocessline% -% {\ifeof\scratchread -% \def\doprocessline{\closein\scratchread}% -% \else -% \read\scratchread to \ascii -% \convertcommand\ascii\to\ascii -% \expandafter\saveutilityline\ascii\txen -% \fi -% \doprocessline}% -% \doprocessline -% \closeout\scratchwrite -% \egroup} -% {}}} +% the following is not ok because we have no way to signal +% xml content (yet), so for the moment we use this: -\def\currentutilityfilename{\jobname} +\appendtoks + \ifprocessingXML + \processingXMLfalse + \enableXML + \catcode`\\=\@@escape + \catcode`\{=\@@begingroup + \catcode`\}=\@@endgroup + \catcode`\%=\@@comment\relax + \fi +\to \everybeforeutilityread \long\def\doutilities#1#2#3#4#5% % introduceren in utility file - {\restorecatcodes - \resetutilities + {\resetutilities % more than one utility thing can be handled in one pass, % for instance lists, so we process ##1 as list \def\douticommand##1{\csname\s!set##1\endcsname}% @@ -240,24 +266,17 @@ \notesenabledfalse \doinpututilitiestrue \global\utilitydonefalse - \catcode`\\=\@@escape - \catcode`\{=\@@begingroup - \catcode`\}=\@@endgroup - \catcode`\%=\@@comment\relax \pushendofline % geeft problemen zodra andere file wordt ingelezen + \pushcatcodetable + \setcatcodetable\ctxcatcodes \ifunprotectutilities % nog nodig ? \unprotect \fi - \ifnum\catcode`\@=\@@active \else - \catcode`\@=\@@letter % permits expanded commands with \@'s - \fi - \ifnum\catcode`\!=\@@active \else - \catcode`\!=\@@letter % permits multilingual constants - \fi #4% \the\everybeforeutilityread \readjobfile{#2.\f!outputextension}\donothing\donothing \the\everyafterutilityread + \popcatcodetable #5% \relax \ifunprotectutilities @@ -269,24 +288,11 @@ {\showmessage\m!systems9{{#3}}% \doifconcepttracing {\blank + \setmessagetext\m!systems9{{#3}}% \type{[\currentmessagetext]}% \blank}}% \fi \endgroup} - -% Saving the sort vector: - -% \def\savesortkeys -% {\startnointerference -% \def\flushsortkey##1##2##3##4% -% {\convertargument{##1}{##2}{##3}{##4}\to\ascii -% \immediatewriteutility{k {\currentlanguage}{\currentencoding}\ascii}}% -% \let\definesortkey\flushsortkey -% \flushsortkeys -% \globallet\savesortkeys\relax -% \stopnointerference} -% -% \prependtoks \savesortkeys \to \everystarttext % Default-instellingen (verborgen) |