Hi Hans,
can you extend the \setupreferencestructureprefix command with number (e.g. numberconversion) keys.
In strc-ref.mkvi the definition of \getreferencestructureprefix should be changed to
(besides the number keys I added starter and stopper keys to the prefix)
\def\getreferencestructureprefix#kind#name#category% name will change
{{
prefix = "\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefix",
separatorset = "\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixseparatorset",
conversion = "\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixconversion",
conversionset = "\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixconversionset",
starter = \!!bs\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixstarter\!!es,
stopper = \!!bs\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixstopper\!!es,
set = "\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixset",
segments = "\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixsegments",
connector = \!!bs\referencestructureprefixparameter{#kind}{#name}{#category}\c!prefixconnector\!!es,
},
{
separatorset = "\referencestructureprefixparameter{#kind}{#name}{#category}\c!numberseparatorset",
conversion = "\referencestructureprefixparameter{#kind}{#name}{#category}\c!numberconversion",
conversionset = "\referencestructureprefixparameter{#kind}{#name}{#category}\c!numberconversionset",
starter = \!!bs\referencestructureprefixparameter{#kind}{#name}{#category}\c!numberstarter\!!es,
stopper = \!!bs\referencestructureprefixparameter{#kind}{#name}{#category}\c!numberstopper\!!es,
segments = "\referencestructureprefixparameter{#kind}{#name}{#category}\c!numbersegments",
}}
In the Lua file src-ref.lua a small change is necessary to use this extra table:
-function genericfilters.number(data,what,prefixspec) -- todo: spec and then no stopper
+function genericfilters.number(data,what,prefixspec,numberspec) -- todo: spec and then no stopper
if data then
numberdata = lists.reordered(data) -- data.numberdata
if numberdata then
helpers.prefix(data,prefixspec)
- sections.typesetnumber(numberdata,"number",numberdata)
+ sections.typesetnumber(numberdata,"number",numberspec,numberdata)
else
local useddata = data.useddata
if useddata and useddata.number then
context(useddata.number)
end
end
end
end
BTW: The \setupreferencestructureprefix command needs a better name
%%%% begin example
\setupreferencestructureprefix[default][prefixstopper={\symbol[none]},numberstopper={\symbol[none]}]
%\setupreferencestructureprefix[section][default][prefixconversion=A]
%\setupreferencestructureprefix[float] [default][numberconversion=A]
\setuphead [chapter][sectionstopper=.]
\setupcaption[figure] [numberstopper=:]
\starttext
\chapter[sec:dummy]{Dummy chapter}
\placefigure[][fig:dummy]{Dummy figure}{\externalfigure[dummy]}
Section: \in[sec:dummy]
Float: \in[fig:dummy]
\stoptext
%%%% end example
Wolfgang