Reference prefix for sections is ignored
Hi, the automatic reference prefix for section etc. with the setup \setuphead[chapter][referenceprefix=+] doesn't work anymore (broken since a while). The following patch for strc-sec.mkxl fixes the missing prefix: %%%% begin fix \def\strc_sectioning_set_reference_prefix {\ifempty\currentstructurereferenceprefix % nothing \orelse\ifx\currentstructurereferenceprefix\m_strc_references_prefix_yes - \global\advance\prefixcounter \plusone % temp here - \setupglobalreferenceprefix[\the\prefixcounter]% + \ifempty\currentstructurereference + \global\advance\prefixcounter \plusone % temp here + \setupglobalreferenceprefix[\the\prefixcounter]% + \else + \setupglobalreferenceprefix[\currentstructurereference]% + \fi \orelse\ifx\currentstructurereferenceprefix\m_strc_references_prefix_nop \setupglobalreferenceprefix[]% \else \setupglobalreferenceprefix[\currentstructurereferenceprefix]% \fi \glet\currentstructurereferenceprefix\referenceprefix} %%%% end fix When I apply the changes above the following document shows the correct references in the output. %%%% begin example \setuphead[chapter][referenceprefix=+] \starttext \chapter[one]{First chapter} \section[alpha]{First section} See \in{Section}[alpha]. See \in{Section}[two:beta]. \chapter[two]{Second chapter} \section[beta]{Second section} See \in{Section}[one:alpha]. See \in{Section}[beta]. \stoptext %%%% end example Wolfgang
participants (1)
-
Wolfgang Schuster