[NTG-context] itemize columns transposed

Hans Hagen pragma at wxs.nl
Mon Oct 10 10:24:24 CEST 2016


On 10/2/2016 8:08 PM, Mikael P. Sundqvist wrote:
> \starttext
>>> Some text before.
>>> \startitemize[a,horizontal,three][before={\blank[big]},after={\blank[big]}]
>>> \startitem $\int_0^2 1+2x\,dx$ \stopitem
>>> \startitem $\int_0^{\ln 2} e^s\,ds$ \stopitem
>>> \startitem $\int_0^{\ln 2} e^{2s}\,ds$ \stopitem
>>> \startitem $\int_0^{\pi} \sin t\,dt$ \stopitem
>>> \startitem $\int_0^{2\pi}\sin t\,dt$ \stopitem
>>> \startitem $\int_0^1\frac{1}{1+x^2}\,dx$ \stopitem
>>> \stopitemize
>>> some text after.
>>> \stoptext

Something like this ... (unless WS sees a flaw):

\unprotect

\def\v!notpacked  {notpacked}
\def\v!notjoinedup{notjoinedup}

\setvalue{\??itemgroupkeyword\v!notpacked}%
   {\setfalse\c_strc_itemgroups_pack}

\setvalue{\??itemgroupkeyword\v!notjoinedup}%
   {\setfalse\c_strc_itemgroups_joined}

\unexpanded\def\stopcollectitems
   {\ifconditional\c_strc_itemgroups_collecting
      \c_strc_itemgroups_collected_done   \zerocount
      \c_strc_itemgroups_collected_current\zerocount
      \ifnum\c_strc_itemgroups_collected_stored>\zerocount
        \ifconditional\c_strc_itemgroups_horizontal
          \strc_itemgroups_before_command
          \setfalse\c_strc_itemgroups_first
          \strc_itemgroups_collected_flush
         %\strc_itemgroups_after_command % triggered elsewhere
        \else
          \strc_itemgroups_collected_flush
        \fi
      \fi
    \fi}

\protect

\starttext

bla bla

\startitemize[a,horizontal,three,notjoinedup]
\startitem $\int_0^2 1+2x\,dx$ \stopitem
\startitem $\int_0^{\ln 2} e^s\,ds$ \stopitem
\startitem $\int_0^{\ln 2} e^{2s}\,ds$ \stopitem
\startitem $\int_0^{\pi} \sin t\,dt$ \stopitem
\startitem $\int_0^{2\pi}\sin t\,dt$ \stopitem
\startitem $\int_0^1\frac{1}{1+x^2}\,dx$ \stopitem
\stopitemize

bla bla

\stoptext




-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list