ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] itemize
@ 2023-08-15 19:35 Hans Hagen via ntg-context
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen via ntg-context @ 2023-08-15 19:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

Hi,

There has been some additions to itemize wrt columns. One problem with 
columns is that we have a 'cross page' and 'balancing' situation. The 
existing columns features has been improved a bit.

That leaves the problem that mixing single and multi columns is not 
really tex's strong point. So, when Mikael and I were looking at one of 
his documents that mixes a lot of math into itemized situations, a 
different variant was made (ok, there was another reason but that's a 
bit technical).

At that time, I had already adapted itemize to work a bit better with 
bTABLE and starttabulate (nesting, trial mode etc), think of

\bTABLE \bTR \bTD
\startitemize[a]
\startitem
     \im{\sqrt{\frac{1}{x^4}}}
\stopitem
\startitem
     \startitemize[n]
     \startitem
         \im{\sqrt{\frac{1}{x^4}}}
     \stopitem
     \startitem
         \im{\sqrt{\frac{1}{x^4}}}
     \stopitem
     \stopitemize
\stopitem
\startitem
     \im{\sqrt{\frac{1}{x^4}}}
\stopitem
\stopitemize
\eTD \eTR \eTABLE

or with tabulate

\startitemize[n]
\starttabulate[||k2|]
     \NC \startitem test \stopitem
     \NC \startitem test \stopitem \NC \NR
     \NC \startitem test \stopitem
     \NC \startitem test \stopitem \NC \NR
\stoptabulate
\stopitemize

so basically inside these tables items can be dealt with. Don't wonder 
too much how this translates into structure.

So, back the columns, a logical next step was to add tabulated columns 
to itemize:

\startitemizetable[n,four]
     \dorecurse{10}{
         \startitem
             \im{\sqrt{\frac{1}{x^4}}}
         \stopitem
         \startitem
             \im{\sqrt{x^5}}
         \stopitem
         \startitem
             \im{\frac{x^5}{x^5}}
         \stopitem
     }
\stopitemizetable

or with


Hans

ps. The page columns also have some improvements but that's for next month.

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] itemize
@ 2023-08-15 19:40 Hans Hagen via ntg-context
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen via ntg-context @ 2023-08-15 19:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

Hi,

There has been some additions to itemize wrt columns. One problem with 
columns is that we have a 'cross page' and 'balancing' situation. The 
existing columns features has been improved a bit.

That leaves the problem that mixing single and multi columns is not 
really tex's strong point. So, when Mikael and I were looking at one of 
his documents that mixes a lot of math into itemized situations, a 
different variant was made (ok, there was another reason but that's a 
bit technical).

At that time, I had already adapted itemize to work a bit better with 
bTABLE and starttabulate (nesting, trial mode etc), think of

\bTABLE \bTR \bTD
\startitemize[a]
\startitem
     \im{\sqrt{\frac{1}{x^4}}}
\stopitem
\startitem
     \startitemize[n]
     \startitem
         \im{\sqrt{\frac{1}{x^4}}}
     \stopitem
     \startitem
         \im{\sqrt{\frac{1}{x^4}}}
     \stopitem
     \stopitemize
\stopitem
\startitem
     \im{\sqrt{\frac{1}{x^4}}}
\stopitem
\stopitemize
\eTD \eTR \eTABLE

or with tabulate

\startitemize[n]
\starttabulate[||k2|]
     \NC \startitem test \stopitem
     \NC \startitem test \stopitem \NC \NR
     \NC \startitem test \stopitem
     \NC \startitem test \stopitem \NC \NR
\stoptabulate
\stopitemize

so basically inside these tables items can be dealt with. Don't wonder 
too much how this translates into structure.

So, back the columns, a logical next step was to add tabulated columns 
to itemize:

\startitemizetable[n,four]
     \dorecurse{10}{
         \startitem
             \im{\sqrt{\frac{1}{x^4}}}
         \stopitem
         \startitem
             \im{\sqrt{x^5}}
         \stopitem
         \startitem
             \im{\frac{x^5}{x^5}}
         \stopitem
     }
\stopitemizetable

or with

\defineitemgroup[xxxx]

because every itemgroup also gets an additional pair of commands defined.

\startxxxxtable[n,four][inbetween={\blank[big]}]
     \dorecurse{10}{
         \startitem
             \im{\sqrt{1/x}}
         \stopitem
         \startitem
             \im{\sqrt{\frac{2}{x}}}
         \stopitem
         \startitem
             \im{\frac{3}{x}}
         \stopitem
     }
     \startitem
         \im{\sqrt{\frac{1}{x^4}}}
     \stopitem
     \startitem
         \im{\sqrt{x^5}}
     \stopitem
\stopxxxxtable

etc etc. The distance can be set with columndistance and vertical 
spacing with inbetween.

This kind of columnizing has the advantage that esp with math that has 
different heights all aligns rather well. A limitation is that we number 
horizontally but that actually makes sense when we cross pages (I might 
cook up a transposed numbering but it's not entirely trivial).

The first one who uses this other than Mikael is invited to wikify it.

Hans

ps. The page columns also have some improvements but that's for next month.

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2023-08-15 19:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-15 19:35 [NTG-context] itemize Hans Hagen via ntg-context
2023-08-15 19:40 Hans Hagen 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).