ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MkIV and LMTX difference in comma list expansion
@ 2020-10-26 16:34 Rik Kabel
  2020-10-26 16:56 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Rik Kabel @ 2020-10-26 16:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2197 bytes --]

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


[-- Attachment #1.2: Type: text/html, Size: 2918 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: MkIV and LMTX difference in comma list expansion
  2020-10-26 16:34 MkIV and LMTX difference in comma list expansion Rik Kabel
@ 2020-10-26 16:56 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2020-10-26 16:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Rik Kabel

Rik Kabel schrieb am 26.10.2020 um 17:34:
> 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.)
> 
>     [...]
> 
> Did I misuse the comma list processing, or is this a bug?

Probably something we missed when the comma list processor was 
rewritten. In the example below the braces are stripped when there is 
only a single element (first and second list).

\def\CommalistEntry#1{\ruledhbox{\strut#1}}

\starttext

\dontleavehmode\processcommalist[{aaa}]\CommalistEntry

\dontleavehmode\processcommalist[{aaa,bbb}]\CommalistEntry

\dontleavehmode\processcommalist[{ccc,ddd},{eee,fff}]\CommalistEntry

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-26 16:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 16:34 MkIV and LMTX difference in comma list expansion Rik Kabel
2020-10-26 16:56 ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).