%D \module
%D   [       file=publ-imp-list,
%D        version=2014.06.16,
%D          title=\CONTEXT\ Publication Support,
%D       subtitle=Lists,
%D         author=Alan Braslau and Hans Hagen,
%D           date=\currentdate,
%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.

\unprotect

\starttexdefinition mutable protected btx:list:inject:text #content
    \texdefinition{btx:format:gotointernal} {
        #content
    }
\stoptexdefinition

\startsetups \s!btx:\s!list:text
   \texdefinition {\s!btx:\s!list:inject:text} {
        \btxflushlisttext
        \ifx\currentbtxcombis\empty \else
            \btxrenderingparameter\c!separator
            \btxflushlistcombis
        \fi
   }
\stopsetups

\starttexdefinition mutable protected btx:list:inject:number #content
    \texdefinition{btx:format:gotointernal} {
        #content
    }
\stoptexdefinition

\starttexdefinition mutable protected btx:list:helpers:concat
    \space
\stoptexdefinition

\startsetups[\s!btx:\s!list:\s!numbering]
    \texdefinition {\s!btx:\s!list:inject:number} {
        \currentbtxfirst
        \btxparameter\c!stopper
    }
\stopsetups

\starttexdefinition mutable protected btx:list:numbering #variant
    \btxstartstyleandcolor [\currentbtxspecification:\s!list:\s!numbering:#variant]
        \btxusecommand [\currentbtxspecification:\s!list:\s!numbering:#variant] {
            \fastsetup{\s!btx:\s!list:\s!numbering}
        }
    \btxstopstyleandcolor
\stoptexdefinition

\startsetups[\s!btx:\s!list:\s!numbering:default]
    \texdefinition {\s!btx:\s!list:\s!numbering} {default}
\stopsetups

\startsetups[\s!btx:\s!list:\s!numbering:num]
    \texdefinition {\s!btx:\s!list:\s!numbering} {num}
\stopsetups

\startsetups[\s!btx:\s!list:\s!numbering:short]
    \texdefinition {\s!btx:\s!list:\s!numbering} {short}
\stopsetups

\startsetups[\s!btx:\s!list:\s!numbering:tag]
    \texdefinition {\s!btx:\s!list:\s!numbering} {tag}
\stopsetups

\startsetups[\s!btx:\s!list:\s!numbering:index]
    \texdefinition {\s!btx:\s!list:\s!numbering} {index}
\stopsetups

\protect
