diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/page-lin.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/page-lin.mkiv | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/context/base/page-lin.mkiv b/Master/texmf-dist/tex/context/base/page-lin.mkiv index 4f2226f6e33..7b1cbcd94aa 100644 --- a/Master/texmf-dist/tex/context/base/page-lin.mkiv +++ b/Master/texmf-dist/tex/context/base/page-lin.mkiv @@ -5,14 +5,16 @@ %D subtitle=Line Numbering, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. % generic or not ... maybe not bother too much and simplify to mkiv only -% get rid of \mk* +% get rid of \mk* (left over from experimental times) +% +% to be redone (was experiment) .. can be hooked into margin code \writestatus{loading}{ConTeXt Core Macros / Line Numbering} @@ -68,7 +70,7 @@ {\setbox\linenumberscratchbox\vbox {\forgetall \offinterlineskip - \ctxlua{nodes.lines.boxed.stage_one(\number#1,\ifcase\linenumbernesting false\else true\fi)}}% + \ctxlua{nodes.lines.boxed.stage_one(\number#1,\ifcase\linenumbernesting false\else true\fi)}}% #2 \ctxlua{nodes.lines.boxed.stage_two(\number#1,\number\linenumberscratchbox)}}% can move to lua code % id nr shift width leftskip dir @@ -93,7 +95,7 @@ {continue = "\linenumberparameter\c!continue"} \def\mkdefinetextlinenumbering - {\setxvalue{ln:c:\currentlinenumbering}{\number\ctxlua{tex.sprint(nodes.lines.boxed.register({\mklinenumberparameters}))}}} + {\setxvalue{ln:c:\currentlinenumbering}{\number\cldcontext{nodes.lines.boxed.register({\mklinenumberparameters})}}} \def\mkupdatetextlinenumbering {\ctxlua{nodes.lines.boxed.setup(\getvalue{ln:c:\currentlinenumbering},{\mklinenumberupdateparameters})}} @@ -129,7 +131,7 @@ \attribute\linereferenceattribute\linerefcounter #3% % for the moment we use a simple system i.e. no prefixes etc .. todo: store as number - \expanded{\dodosetreference{line}{#2}{conversion=\linenumberparameter\c!conversion}{\the\linerefcounter}}% kind labels userdata text + \expanded{\strc_references_set_named_reference{line}{#2}{conversion=\linenumberparameter\c!conversion}{\the\linerefcounter}}% kind labels userdata text \endgroup} \def\mkstartlinereference#1{\mksomelinereference{#1}{lr:b:#1}{}\ignorespaces} @@ -176,11 +178,14 @@ \fi \mksetuptextlinenumbering} +% some day commandhandler + \def\linenumberparameter#1% {\csname\??rn\ifcsname\??rn\currentlinenumbering#1\endcsname\currentlinenumbering\fi#1\endcsname} -\def\linenumberattributes - {\doattributes{\??rn\ifcsname\??rn\currentlinenumbering\c!style\endcsname\currentlinenumbering\fi}} +\unexpanded\def\dolinenumberattributes#1#2% + {\dousestyleparameter{\linenumberparameter#1}% + \dousecolorparameter{\linenumberparameter#2}} \setuplinenumbering [\c!conversion=\v!numbers, @@ -261,7 +266,7 @@ \the\aftereverylinenumbering \endgroup} -% number placement +% number placement .. will change into (the new) margin code \def\mkdoinnerlinenumber{\doifoddpageelse\mkdoleftlinenumber\mkdorightlinenumber} \def\mkdoouterlinenumber{\doifoddpageelse\mkdorightlinenumber\mkdoleftlinenumber} @@ -459,11 +464,11 @@ \ifconditional\faketextlinenumber % we need to reserve space \else - \linenumberattributes\c!style\c!color - {\linenumberparameter\c!command - {\linenumberparameter\c!left - \convertnumber{\linenumberparameter\c!conversion}{#3}% - \linenumberparameter\c!right}}% + \dolinenumberattributes\c!style\c!color + \linenumberparameter\c!command + {\linenumberparameter\c!left + \convertnumber{\linenumberparameter\c!conversion}{#3}% + \linenumberparameter\c!right}% \fi \ifcase\linenumberlocation \hss % middle |