[NTG-context] MkIV and LMTX difference in comma list expansion

Rik Kabel ConTeXt at rik.users.panix.com
Mon Oct 26 17:34:28 CET 2020


Hello list,

Another difference, perhaps the result of my lack of knowledge, but a 
difference.

The following example produces different results for the fourth 
sequence, with the index being passed one item under MkIV and two items 
under LMTX.

(The code is stripped out of a much more complex bit to show the issue.)

    % macros=mkvi
    \starttexdefinition unexpanded startBlockQuotation
         \dosingleempty\dostartBlockQuotation
    \stoptexdefinition
    \starttexdefinition dostartBlockQuotation [#SETUPS]
         \getrawparameters[BlockQuotation]
           [index=,#SETUPS]
         \expandafter\processcommalist
           \expandafter[\BlockQuotationindex]\doIndexIt{}
    \stoptexdefinition
    \starttexdefinition stopBlockQuotation
    \stoptexdefinition

    \starttexdefinition doIndexIt #INDEXTERM
       indexer sees #INDEXTERM\
       \index{#INDEXTERM}
    \stoptexdefinition

    \starttext

    \startBlockQuotation[index=aaa]
      \startparagraph
       1 \quad when indexing aaa.
      \stopparagraph
    \stopBlockQuotation
    \startBlockQuotation[index={aab}]
      \startparagraph
       2 \quad when indexing \{aab\}.
      \stopparagraph
    \stopBlockQuotation
    \startBlockQuotation[index={aac, aad}]
      \startparagraph
       3 \quad when indexing \{aac, aad\}.
      \stopparagraph
    \stopBlockQuotation
    \startBlockQuotation[index={{aae, aaf}}]
      \startparagraph
       4 \quad when indexing \{\{aae, aaf\}\}.
      \stopparagraph
    \stopBlockQuotation
    \startBlockQuotation[index={{{aag, aah}}}]
      \startparagraph
       5 \quad when indexing \{\{\{aag, aah\}\}\}.
      \stopparagraph
    \stopBlockQuotation
    \startBlockQuotation[index={{aai, aaj},{aak, aal}}]
      \startparagraph
       6 \quad when indexing \{\{aai, aaj\},\{aak, aal\}\}.
      \stopparagraph
    \stopBlockQuotation
    \startBlockQuotation[index={{{aam, aan}},{{aao, aap}}}]
      \startparagraph
       7 \quad when indexing \{\{\{aam, aan\}\},\{\{aao, aap\}\}\}.
      \stopparagraph
    \stopBlockQuotation
    \placeindex
    \stoptext

Did I misuse the comma list processing, or is this a bug?

-- 
Rik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20201026/5465e627/attachment.htm>


More information about the ntg-context mailing list