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
___________________________________________________________________________________

Reply via email to