diff options
Diffstat (limited to 'tex/context/base/core-sys.mkiv')
-rw-r--r-- | tex/context/base/core-sys.mkiv | 90 |
1 files changed, 72 insertions, 18 deletions
diff --git a/tex/context/base/core-sys.mkiv b/tex/context/base/core-sys.mkiv index 8f56b6f16..3d31dee53 100644 --- a/tex/context/base/core-sys.mkiv +++ b/tex/context/base/core-sys.mkiv @@ -35,24 +35,24 @@ %D End of lines to the output. \TEX\ will map this onto the platform specific %D line ending. I hate this mess. -\edef\operatingsystem {\cldcontext{os.platform}} +\let\operatingsystem\clf_operatingsystem %D The jobname is what gets loaded by the cont-yes stub file. This name %D also determines the name of tuc etc files. -\def \jobfilename {\cldcontext{environment.jobfilename or ""}} -\def \jobfilesuffix {\cldcontext{environment.jobfilesuffix or ""}} +\let\jobfilename \clf_jobfilename +\let\jobfilesuffix\clf_jobfilesuffix %D However, that one can itself load another file. -\def \inputfilebarename {\cldcontext{environment.inputfilebarename or ""}} -\def \inputfilerealsuffix{\cldcontext{environment.inputfilerealsuffix or ""}} -\def \inputfilesuffix {\cldcontext{environment.inputfilesuffix or ""}} -\def \inputfilename {\cldcontext{environment.inputfilename or ""}} +\let\inputfilebarename \clf_inputfilebarename +\let\inputfilerealsuffix\clf_inputfilerealsuffix +\let\inputfilesuffix \clf_inputfilesuffix +\let\inputfilename \clf_inputfilename %D The output name is only used for some checking. -\def \outputfilename {\cldcontext{environment.outputfilename or ""}} +\let\outputfilename\clf_outputfilename \installcorenamespace{system} @@ -89,6 +89,8 @@ % \ctxcommand{updatefilenames("\jobame","\inputfilename","\outputfilename")}% % \to \everysetupsystem +\newconditional\prerollrun % when true it means that we have a forced number of runs + % Some mechanisms (see x-res-01) use either \jobfilename or % \jobfilename.somesuffix, in which case we need to use the % full name if given or a default (like \jobfilename.xml); @@ -206,27 +208,31 @@ \to \everydefinestartstop \unexpanded\def\syst_startstop_start#1% - {\namedstartstopparameter{#1}\c!before + {\namedstartstopparameter{#1}\c!before\relax \bgroup \def\currentstartstop{#1}% - \startstopparameter\c!commands + \startstopparameter\c!commands\relax % better: setups so that will show op soon \dostarttagged\t!construct\currentstartstop \usestartstopstyleandcolor\c!style\c!color} \unexpanded\def\syst_startstop_stop#1% {\dostoptagged \egroup - \namedstartstopparameter{#1}\c!after} + \namedstartstopparameter{#1}\c!after\relax} \unexpanded\def\syst_startstop_indeed#1% {\groupedcommand {\def\currentstartstop{#1}% - \startstopparameter\c!commands % will become setups + \startstopparameter\c!commands\relax % better: setups so that will show op soon \dostarttagged\t!construct\currentstartstop - \usestartstopstyleandcolor\c!style\c!color} - {\def\currentstartstop{#1}% + \usestartstopstyleandcolor\c!style\c!color + \startstopparameter\c!left\relax} + {\def\currentstartstop{#1}% safeguard, nto really needed + \startstopparameter\c!right\relax \dostoptagged - \startstopparameter\c!inbetween}} + \startstopparameter\c!inbetween\relax}} + +% \definestartstop[tracing][\c!style=\tt] % \unexpanded\def\ignorestartstop[#1]% % {\unexpanded\expandafter\def\csname\e!start#1\expandafter\endcsname\expandafter @@ -238,8 +244,14 @@ \installcommandhandler \??highlight {highlight} \??highlight % we could do with less +\setuphighlight + [\c!command=\v!yes] + \appendtoks - \setuevalue\currenthighlight{\typo_highlights_indeed{\currenthighlight}}% + \edef\p_command{\highlightparameter\c!command}% + \ifx\p_command\v!yes + \setuevalue\currenthighlight{\typo_highlights_indeed{\currenthighlight}}% + \fi \to \everydefinehighlight \ifdefined\dotaghighlight \else \let\dotaghighlight\relax \fi @@ -252,13 +264,29 @@ \dotaghighlight} {\dostoptagged}} +\unexpanded\def\highlight[#1]% + {\typo_highlights_indeed{#1}} + +\unexpanded\def\starthighlight[#1]% + {\begingroup + \def\currenthighlight{#1}% + \dostarttagged\t!highlight\currenthighlight + \usehighlightstyleandcolor\c!style\c!color + \dotaghighlight} + +\unexpanded\def\stophighlight + {\dostoptagged + \endgroup} + +\let\directhighlight\typo_highlights_indeed + \unexpanded\def\defineexpandable - {\doifnextoptionalelse + {\doifelsenextoptional {\syst_basics_define_yes\def}% {\syst_basics_define_nop\def}} \unexpanded\def\define - {\doifnextoptionalelse + {\doifelsenextoptional {\syst_basics_define_yes{\unexpanded\def}}% {\syst_basics_define_nop{\unexpanded\def}}} @@ -397,5 +425,31 @@ % \processcommalist[#1]\docommand % \endgroup} +\unexpanded\def\syst_log_indeed#1#2#3% + {\ctxcommand{systemlog("#1","#2",\!!bs#3\!!es)}} + +\let\systemlog\syst_log_indeed + +\unexpanded\def\systemlogfirst + {\ifcase\directsystemparameter\c!n\relax + \expandafter\syst_log_indeed + \or + \expandafter\syst_log_indeed + \else + \expandafter\gobblethreearguments + \fi} + +\unexpanded\def\systemloglast + {\ifcase\directsystemparameter\c!n\relax + \expandafter\syst_log_indeed + \or + \expandafter\gobblethreearguments + \or + \expandafter\gobblethreearguments + \or + \expandafter\gobblethreearguments + \or + \expandafter\syst_log_indeed + \fi} \protect \endinput |