ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Neste itemize in table (or vice-versa?)
@ 2021-11-20 15:19 Alexandre Christe via ntg-context
  2021-11-20 15:53 ` Wolfgang Schuster via ntg-context
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Christe via ntg-context @ 2021-11-20 15:19 UTC (permalink / raw)
  To: ntg-context; +Cc: Alexandre Christe


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

Dear all,

I'm trying something out in LMTX, which is to combine itemize with a table.
Application could be to put a question and the answer in the next column.

A minimal example would be:

\starttext
\startitemize [a] [right=),stopper=]
    \bTABLE[frame=off]
      \setupTABLE[column][1] [width=.3\textwidth]
      \setupTABLE[column][2] [width=.6\textwidth]
        \bTR
          \bTD \item Something \eTD
          \bTD Something \eTD
        \eTR
        \bTR
          \bTD \item Something \eTD
          \bTD Something \eTD
        \eTR
        \bTR
          \bTD \item Something \eTD
          \bTD Something \eTD
        \eTR
        \bTR
          \bTD \item Something \eTD
          \bTD Something \eTD
        \eTR
    \eTABLE
\stopitemize
\stoptext

The numbering unfortunately starts with i) instead of a). Any
recommendation which approach shall be preferred?

Thanks in advance!

[-- Attachment #1.2: Type: text/html, Size: 1206 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: Neste itemize in table (or vice-versa?)
  2021-11-20 15:19 Neste itemize in table (or vice-versa?) Alexandre Christe via ntg-context
@ 2021-11-20 15:53 ` Wolfgang Schuster via ntg-context
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2021-11-20 15:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Alexandre Christe via ntg-context
  Cc: Wolfgang Schuster

Alexandre Christe via ntg-context schrieb am 20.11.2021 um 16:19:
> Dear all,
>
> I'm trying something out in LMTX, which is to combine itemize with a 
> table. Application could be to put a question and the answer in the 
> next column.
>
> A minimal example would be:
>
> [...]
>
> The numbering unfortunately starts with i) instead of a). Any 
> recommendation which approach shall be preferred?

Use \itemtag to display the itemize counter, the commands ensures you 
get the correct value because most table environments process the cell 
content multiple times which lead to wrong counters.

\starttext

\startsetups [alexandre:1]
     \setupTABLE [start] [frame=off]
     \setupTABLE [c] [1] [width=.3\textwidth]
     \setupTABLE [c] [2] [width=.6\textwidth]
\stopsetups

\startitemize [a] [right=),stopper=]
\bTABLE[setups=alexandre:1]
\bTR \bTD \dontleavehmode\itemtag\quad Something \eTD \bTD Something 
\eTD \eTR
\bTR \bTD \dontleavehmode\itemtag\quad Something \eTD \bTD Something 
\eTD \eTR
\bTR \bTD \dontleavehmode\itemtag\quad Something \eTD \bTD Something 
\eTD \eTR
\bTR \bTD \dontleavehmode\itemtag\quad Something \eTD \bTD Something 
\eTD \eTR
\eTABLE
\stopitemize

\startsetups [alexandre:2]
     \setupTABLE [start] [frame=off]
     \setupTABLE [c] [2] [width=.2\textwidth]
     \setupTABLE [c] [3] [width=.6\textwidth]
\stopsetups

\startitemize [a] [right=),stopper=]
\bTABLE[setups=alexandre:2]
\bTR \bTD \itemtag \eTD \bTD Something \eTD \bTD Something \eTD \eTR
\bTR \bTD \itemtag \eTD \bTD Something \eTD \bTD Something \eTD \eTR
\bTR \bTD \itemtag \eTD \bTD Something \eTD \bTD Something \eTD \eTR
\bTR \bTD \itemtag \eTD \bTD Something \eTD \bTD Something \eTD \eTR
\eTABLE
\stopitemize

\startitemize [a] [right=),stopper=]
\starttabulate[|l|lw(.2\textwidth)|p|]
\NC \itemtag \NC Something \NC Something \NC\NR
\NC \itemtag \NC Something \NC Something \NC\NR
\NC \itemtag \NC Something \NC Something \NC\NR
\NC \itemtag \NC Something \NC Something \NC\NR
\stoptabulate
\stopitemize

\startitemize [a] [right=),stopper=]
\starttabulate[|l|lw(.2\textwidth)|p|]
\NI Something \NC Something \NC\NR
\NI Something \NC Something \NC\NR
\NI Something \NC Something \NC\NR
\NI Something \NC Something \NC\NR
\stoptabulate
\stopitemize

\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:[~2021-11-20 15:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-20 15:19 Neste itemize in table (or vice-versa?) Alexandre Christe via ntg-context
2021-11-20 15:53 ` Wolfgang Schuster via ntg-context

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