2

I'm trying to increase the space between nested itemizations just a little bit. I don't want to change the inter-item spacing, only the spacing that occurs before the first item and after the last item in an itemization.

The after and before keywords seem to work for the outermost level of itemization, but have no effect for nested itemizations. Is this intentional?

Here's a MWE that exaggerates the spacing just to make it clearer:

% ConTeXt 2016.05.19 13:43
\setupitemgroup[itemize][1][before={\blank[3*big]},after={\blank[3*big]}]
\setupitemgroup[itemize][2][before={\blank[3*big]},after={\blank[3*big]}]

\starttext

Text above

\startitemize
  \item Big gap above? Yes
  \startitemize
    \item Big gap above? No
    \item Big gap below? No
  \stopitemize
  \item Big gap below? Yes
\stopitemize

Text below

\stoptext

This produces the following:

Example of after and before keywords only applying to outermost itemization

The above shows that the \blank[3*big] from the after and before keywords are working for the outermost level, but have no effect for the nested itemization.

Is what I'm after possible? I tried to dig around in strc-itm.mkvi and I can sorta see what's going on but I am still a ConTeXt noob so I don't really know what I am looking for/at.

3

You have to change the spacing mode for itemizations to something other than 2 by using

% 0 = before/after
% 1 = between unless before
% 2 = between (default)
\c_strc_itemgroups_spacing_mode=0

I’m not so sure what these actually do. They are not documented and there is no high-level interface for them. Just try it out.

\setupitemgroup[itemize][1][before={\blank[3*big]},after={\blank[3*big]}]
\setupitemgroup[itemize][2][before={\blank[3*big]},after={\blank[3*big]}]

\unprotect
% 0 = before/after
% 1 = between unless before
% 2 = between (default)
\c_strc_itemgroups_spacing_mode=0
\protect

\starttext

Text above

\startitemize
  \item Big gap above? Yes
  \startitemize
    \item Big gap above? No
    \item Big gap below? No
  \stopitemize
  \item Big gap below? Yes
\stopitemize

Text below

\stoptext

enter image description here

  • Works exactly as I needed, thanks for your help. – dreamlax Nov 23 '16 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.