From ac0e3262fb027e4ab586204bf2d5a05e9a831933 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sat, 2 Jun 2018 23:42:05 +0200 Subject: 2018-06-02 22:41:00 --- tex/context/base/mkiv/strc-mar.lua | 61 +++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 20 deletions(-) (limited to 'tex/context/base/mkiv/strc-mar.lua') diff --git a/tex/context/base/mkiv/strc-mar.lua b/tex/context/base/mkiv/strc-mar.lua index bb79ac7a9..51f896aa7 100644 --- a/tex/context/base/mkiv/strc-mar.lua +++ b/tex/context/base/mkiv/strc-mar.lua @@ -650,28 +650,49 @@ end -- pushing to context: -local separator = context.nested.markingseparator -local command = context.nested.markingcommand -local ctxconcat = context.concat - -local function fetchonemark(name,range,method) - context(command(name,fetched(name,range,method))) -end +-- local separator = context.nested.markingseparator +-- local command = context.nested.markingcommand +-- local ctxconcat = context.concat + +-- local function fetchonemark(name,range,method) +-- context(command(name,fetched(name,range,method))) +-- end + +-- local function fetchtwomarks(name,range) +-- ctxconcat( { +-- command(name,fetched(name,range,v_first)), +-- command(name,fetched(name,range,v_last)), +-- }, separator(name)) +-- end + +-- local function fetchallmarks(name,range) +-- ctxconcat( { +-- command(name,fetched(name,range,v_previous)), +-- command(name,fetched(name,range,v_first)), +-- command(name,fetched(name,range,v_last)), +-- }, separator(name)) +-- end + + local ctx_separator = context.markingseparator + local ctx_command = context.markingcommand + + local function fetchonemark(name,range,method) + ctx_command(name,fetched(name,range,method)) + end -local function fetchtwomarks(name,range) - ctxconcat( { - command(name,fetched(name,range,v_first)), - command(name,fetched(name,range,v_last)), - }, separator(name)) -end + local function fetchtwomarks(name,range) + ctx_command(name,fetched(name,range,v_first)) + ctx_separator(name) + ctx_command(name,fetched(name,range,v_last)) + end -local function fetchallmarks(name,range) - ctxconcat( { - command(name,fetched(name,range,v_previous)), - command(name,fetched(name,range,v_first)), - command(name,fetched(name,range,v_last)), - }, separator(name)) -end + local function fetchallmarks(name,range) + ctx_command(name,fetched(name,range,v_previous)) + ctx_separator(name) + ctx_command(name,fetched(name,range,v_first)) + ctx_separator(name) + ctx_command(name,fetched(name,range,v_last)) + end function marks.fetch(name,range,method) -- chapter page first | chapter column:1 first if trace_marks_get then -- cgit v1.2.3