[NTG-context] Labels and Enumerations

Hans Hagen pragma at wxs.nl
Sun Jan 14 15:46:11 CET 2018


On 1/13/2018 10:17 PM, Rik Kabel wrote:
> I would like to request the restoration of labels (\definelabel) to full 
> citizenship in MKIV. While enumerations are more flexible in many ways, 
> they cannot replace one particular use of labels if find necessary. 
> Enumerations are paragraph entities, while labels are not so restricted.
> 
> I use labels displayed as numbers in the margin to serially identify 
> quotations in a book about the development of quotation and 
> misquotation, at the same time generating reference information for 
> cross-referencing. While most quotations are blocks and can be handled 
> by enumerations, many are in-line quotations, and enumeration cannot be 
> used for these.
> 
> The wiki describes enumerations as the MKIV replacement for labels, and 
> the documentation as far as I can see omits \definelabel. Unless there 
> is something else supported in MKIV that can assume this function of 
> labels, can we please have full support for labels? I would not want to 
> see labels deprecated before the functionality is reproduced.
> 
> (Of course, if you can suggest how enumeration can be adapted to this 
> requirement, or suggest an alternative mechanism, this request can be 
> rejected.)

two options:

\defineconstructionalternative
   [mylabel]
   [renderingsetup=constructionrenderings:mylabel,
    width=]

\startsetups[constructionrenderings:mylabel]
     \dontleavehmode
     \flushconstructionheadbox
\stopsetups

\defineenumeration[two][alternative=mylabel,display=no,before=,after=]

\definelabel[foo][way=bychapter,prefix=chapter]

\starttext

     \startchapter[title=bar]

         here \starttwo\stoptwo \input tufte

         here \foo[xx] \input tufte

         whatever \in{foo}[xx]

     \stopchapter

\stoptext





-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list