ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* combining itemize and starttabulate
@ 2016-04-06 11:04 Jan Willem Flamma
  2016-04-07  8:49 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Willem Flamma @ 2016-04-06 11:04 UTC (permalink / raw)
  To: ntg-context


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

Dear members,

The following combination of itemize and starttabulate is numbered from 'd. to f.' instead of from 'a. to c.'

\starttext
\startitemize[a]
\starttabulate[|l|p|]

\item \NC column1 \NC  column2  \NC \NR
\item \NC column1 \NC  column2  \NC \NR
\item \NC column1 \NC  column2  \NC \NR

\stoptabulate
\stopitemize
\stoptext


I'm unable to figure out why this occurs and also how to get the following desired result:
a. 	tekst		tekst
b.	tekst		tekst
c.	tekst		tekst	

Kind regards,
Jan Willem


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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: combining itemize and starttabulate
  2016-04-06 11:04 combining itemize and starttabulate Jan Willem Flamma
@ 2016-04-07  8:49 ` Hans Hagen
  2016-04-07 11:22   ` Procházka Lukáš Ing.
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2016-04-07  8:49 UTC (permalink / raw)
  To: ntg-context

On 4/6/2016 1:04 PM, Jan Willem Flamma wrote:
> Dear members,
> The following combination of itemize and starttabulate is numbered from
> 'd. to f.' instead of from 'a. to c.'
> \starttext
> \startitemize[a]
> \starttabulate[|l|p|]
> \item \NC column1 \NC column2 \NC \NR
> \item \NC column1 \NC column2 \NC \NR
> \item \NC column1 \NC column2 \NC \NR
> \stoptabulate
> \stopitemize
> \stoptext
> I'm unable to figure out why this occurs and also how to get the
> following desired result:
> a. tekst tekst
> b. tekst tekst
> c. tekst tekst

I'm surprised it works at all. We should have a place on the garden 
where we put such 'unexpected combinations of mechanisms' (Alan?).

you can put this in cont-new.mkiv:

\unprotect

\unexpanded\def\itemtag % not yet in interface definitions
   {\dosingleempty\strc_itemgroups_item_tag}

\unexpanded\def\strc_itemgroups_item_tag[#1]% we can reuse more
   {\def\currentitemreference{#1}%
    \iftrialtypesetting
      \strc_counters_save\v_strc_itemgroups_counter
      \strc_itemgroups_increment_item_counter
      \strc_itemgroups_insert_item_tag_indeed
      \strc_counters_restore\v_strc_itemgroups_counter
    \else
      \strc_itemgroups_increment_item_counter
      \strc_itemgroups_insert_item_tag_indeed
    \fi}

\def\strc_itemgroups_insert_item_tag_indeed
   {\letitemgroupparameter\c!distance\zeropoint
    %letitemgroupparameter\c!width\zeropoint
    \strc_itemgroups_make_symbol_box
    \strc_itemgroups_make_destination_box
    \let\m_strc_itemgroups_destination\empty
    \ht\b_strc_itemgroups\strutheight
    \dp\b_strc_itemgroups\strutdepth
    \box\b_strc_itemgroups
    \ignorespaces}

\protect

and then do:

\starttext
\startitemize[a,intext]
\starttabulate[|l|l|p|]
\NC \itemtag \NC column1 \NC column2  \NC \NR
\NC \itemtag \NC column1 \NC column2  \NC \NR
\NC \itemtag \NC column1 \NC column2  \NC \NR
\stoptabulate
\starttabulate[|l|l|l|]
\NC \itemtag \NC c1 \NC c2  \NC \NR
\NC \itemtag \NC c1 \NC c2  \NC \NR
\NC \itemtag \NC c1 \NC c2  \NC \NR
\stoptabulate
\stopitemize
\stoptext

and then explain it on the wiki

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: combining itemize and starttabulate
  2016-04-07  8:49 ` Hans Hagen
@ 2016-04-07 11:22   ` Procházka Lukáš Ing.
  0 siblings, 0 replies; 3+ messages in thread
From: Procházka Lukáš Ing. @ 2016-04-07 11:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

that's a great feature!

I guess it will be involved into Ctx (with the next beta)...

Lukas


On Thu, 07 Apr 2016 10:49:25 +0200, Hans Hagen <pragma@wxs.nl> wrote:

> On 4/6/2016 1:04 PM, Jan Willem Flamma wrote:
>> Dear members,
>> The following combination of itemize and starttabulate is numbered from
>> 'd. to f.' instead of from 'a. to c.'
>> \starttext
>> \startitemize[a]
>> \starttabulate[|l|p|]
>> \item \NC column1 \NC column2 \NC \NR
>> \item \NC column1 \NC column2 \NC \NR
>> \item \NC column1 \NC column2 \NC \NR
>> \stoptabulate
>> \stopitemize
>> \stoptext
>> I'm unable to figure out why this occurs and also how to get the
>> following desired result:
>> a. tekst tekst
>> b. tekst tekst
>> c. tekst tekst
>
> I'm surprised it works at all. We should have a place on the garden
> where we put such 'unexpected combinations of mechanisms' (Alan?).
>
> you can put this in cont-new.mkiv:
>
> \unprotect
>
> \unexpanded\def\itemtag % not yet in interface definitions
>    {\dosingleempty\strc_itemgroups_item_tag}
>
> \unexpanded\def\strc_itemgroups_item_tag[#1]% we can reuse more
>    {\def\currentitemreference{#1}%
>     \iftrialtypesetting
>       \strc_counters_save\v_strc_itemgroups_counter
>       \strc_itemgroups_increment_item_counter
>       \strc_itemgroups_insert_item_tag_indeed
>       \strc_counters_restore\v_strc_itemgroups_counter
>     \else
>       \strc_itemgroups_increment_item_counter
>       \strc_itemgroups_insert_item_tag_indeed
>     \fi}
>
> \def\strc_itemgroups_insert_item_tag_indeed
>    {\letitemgroupparameter\c!distance\zeropoint
>     %letitemgroupparameter\c!width\zeropoint
>     \strc_itemgroups_make_symbol_box
>     \strc_itemgroups_make_destination_box
>     \let\m_strc_itemgroups_destination\empty
>     \ht\b_strc_itemgroups\strutheight
>     \dp\b_strc_itemgroups\strutdepth
>     \box\b_strc_itemgroups
>     \ignorespaces}
>
> \protect
>
> and then do:
>
> \starttext
> \startitemize[a,intext]
> \starttabulate[|l|l|p|]
> \NC \itemtag \NC column1 \NC column2  \NC \NR
> \NC \itemtag \NC column1 \NC column2  \NC \NR
> \NC \itemtag \NC column1 \NC column2  \NC \NR
> \stoptabulate
> \starttabulate[|l|l|l|]
> \NC \itemtag \NC c1 \NC c2  \NC \NR
> \NC \itemtag \NC c1 \NC c2  \NC \NR
> \NC \itemtag \NC c1 \NC c2  \NC \NR
> \stoptabulate
> \stopitemize
> \stoptext
>
> and then explain it on the wiki
>
> Hans


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2016-04-07 11:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-06 11:04 combining itemize and starttabulate Jan Willem Flamma
2016-04-07  8:49 ` Hans Hagen
2016-04-07 11:22   ` Procházka Lukáš Ing.

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).