Difference between revisions of "Command/setupitemgroup"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \setupitemgroup")
 
Line 193: Line 193:
 
     </cd:parameter>
 
     </cd:parameter>
 
     <cd:parameter name="items">
 
     <cd:parameter name="items">
       <cd:paramdoc>number of items when using {{cmd|its}} {{todo|is this sentence right? --[[User:Taco|Taco]] ([[User talk:Taco|talk]])}} </cd:paramdoc>
+
       <cd:paramdoc>number of items when using {{cmd|its}}</cd:paramdoc>
 
       <cd:constant type="cd:number"></cd:constant>
 
       <cd:constant type="cd:number"></cd:constant>
 
     </cd:parameter>
 
     </cd:parameter>
Line 281: Line 281:
 
     <cd:keywords list="yes" optional="yes" ordinal="1">
 
     <cd:keywords list="yes" optional="yes" ordinal="1">
 
     <cd:keywordsdoc></cd:keywordsdoc>
 
     <cd:keywordsdoc></cd:keywordsdoc>
     <cd:constant type="cd:name">See <cd:iref variant='' ordinal='1'/>, with an implied <code>each</code> for the second argument</cd:constant>
+
     <cd:constant type="cd:name">See <cd:iref ordinal="1" variant=""/>, with an implied <code>each</code> for the second argument</cd:constant>
     <cd:constant method="range" prefix="cd:name" type="cd:number">See <cd:iref variant='' ordinal='1'/>, with the number part replacing <cd:iref variant='' ordinal='2'/></cd:constant>
+
     <cd:constant method="range" prefix="cd:name" type="cd:number">See <cd:iref ordinal="1" variant=""/>, with the number part replacing <cd:iref ordinal="2" variant=""/></cd:constant>
 
     </cd:keywords>
 
     </cd:keywords>
 
     <cd:assignments list="yes" ordinal="2">
 
     <cd:assignments list="yes" ordinal="2">
     <cd:assignmentsdoc>See <cd:iref variant='' ordinal='4'/></cd:assignmentsdoc>
+
     <cd:assignmentsdoc>See <cd:iref ordinal="4" variant=""/></cd:assignmentsdoc>
 
     <cd:parameter name="before">
 
     <cd:parameter name="before">
 
       <cd:paramdoc></cd:paramdoc>
 
       <cd:paramdoc></cd:paramdoc>
Line 339: Line 339:
 
     </cd:parameter>
 
     </cd:parameter>
 
     <cd:parameter name="option">
 
     <cd:parameter name="option">
       <cd:paramdoc>See <cd:iref variant='' ordinal='3'/></cd:paramdoc>
+
       <cd:paramdoc>See <cd:iref ordinal="3" variant=""/></cd:paramdoc>
 
       <cd:constant type="intro"></cd:constant>
 
       <cd:constant type="intro"></cd:constant>
 
       <cd:constant type="random"></cd:constant>
 
       <cd:constant type="random"></cd:constant>
Line 546: Line 546:
 
   </cd:command>
 
   </cd:command>
 
</cd:variants>
 
</cd:variants>
<cd:description>This command controls all of the formatting for the specified item group, for example the name <code>itemize</code> configures the item group that is the environment {{cmd|startitemize}}). {{cmd|setupitemgroup|[itemize]}} and {{cmd|setupitemize}} are equivalent.  
+
<cd:description>This command controls all of the formatting for the specified item group, for example the name <code>itemize</code> configures the item group that is the environment {{cmd|startitemize}}). {{cmd|setupitemgroup|[itemize]}} and {{cmd|setupitemize}} are equivalent.
  
 
{{todo|There are a great many options here, and not nearly all of them are documented.}}</cd:description>
 
{{todo|There are a great many options here, and not nearly all of them are documented.}}</cd:description>

Revision as of 14:58, 29 August 2020


\setupitemgroup

Summary

The command \setupitemgroup is used for configuring item groups.

Settings

\setupitemgroup[...][...,...][...,...][...=...,...]
[...]name
[...,...]each number
[...,...]intro random continue packed autointro broad text before after nowhite margin inmargin atmargin intext headintext loose fit nofit paragraph joinedup serried stopper nostopper unpacked repeat norepeat reverse columns one two three four five six seven eight nine standard number*broad number*serried horizontal name
beforecommand
aftercommand
inbetweencommand
beforeheadcommand
afterheadcommand
lefttextcommand
righttextcommand
leftcommand
rightcommand
factornumber
stepdimension
widthdimension
distancedimension
marginyes no standard dimension
leftmarginyes no standard dimension
rightmarginyes no standard dimension
leftmargindistanceyes no standard dimension
rightmargindistanceyes no standard dimension
alignsee \setupalign
indentingsee \setupindenting
startnumber
symalignleft middle right flushleft center flushright
symbolname
nnumber
indentnextyes no auto
innercommand
commandcsname
itemsnumber
maxwidthdimension
itemalignleft right middle flushleft flushright inner outer
alignsymbolyes no
textdistancesmall medium big none space dimension
placestopperyes no display inline
stylestyle command
colorcolor
headstylestyle command
headcolorcolor
marstylestyle command
marcolorcolor
symstylestyle command
symcolorcolor
gridsee \definegridsnapping
packcriteriumnumber
...=...,...inherits from \setupcounter

OptionExplanation
name of the itemgroup to change.
The nesting level to configure.
each this setup will apply to all nesting levels
number this setup will only influence a particular nesting level
intro always prevent a page break before the item list
packed no whitespace between items
autointro prevent a page break before the item list only when the last paragraph has only one or two lines
inmargin item separator in the margin
atmargin item separator at the margin
joinedup no white space before and after itemization
stopper punctuation after item separator
repeat repeat higher-level number at lower levels, to produce e.g. 1.a.4.
columns typeset items in two columns
standard use the default setup
number*broad extra horizontal white space after symbol
number*serried little horizontal white space after symbol
inbetween
command between items (e.g. spacing)
n
enter a number e.g. n=5
items
number of items when using \its
itemalign
Alignment of the number (if n is used)
headstyle
It works only if one uses \head instead of \item; the \head must stay as a paragraph, i.e. followed by an empty line or by the command \par.
see \setupcounter To configure the counter used for this item group

Settings assignment

\setupitemgroup[...,...][...=...,...]
[...,...]name name:number
beforecommand
aftercommand
inbetweencommand
beforeheadcommand
afterheadcommand
lefttextcommand
righttextcommand
leftcommand
rightcommand
factornumber
stepdimension
widthdimension
distancedimension
optionintro random continue packed autointro broad text before after nowhite margin inmargin atmargin intext headintext loose fit nofit paragraph joinedup serried stopper unpacked repeat norepeat reverse columns one two three four five six seven eight nine standard number*broad number*serried horizontal name
marginyes no standard dimension
leftmarginyes no standard dimension
rightmarginyes no standard dimension
leftmargindistanceyes no standard dimension
rightmargindistanceyes no standard dimension
alignsee \setupalign
indentingsee \setupindenting
startnumber
symalignleft middle right flushleft center flushright
symbolname
nnumber
indentnextyes no auto
innercommand
commandcsname
itemsnumber
maxwidthdimension
itemalignleft right middle flushleft flushright inner outer
alignsymbolyes no
textdistancesmall medium big none space dimension
placestopperyes no display inline
stylestyle command
colorcolor
headstylestyle command
headcolorcolor
marstylestyle command
marcolorcolor
symstylestyle command
symcolorcolor
gridsee \definegridsnapping
packcriteriumnumber
...=...,...inherits from \setupcounter

OptionExplanation
name See [...] in variant default, with an implied each for the second argument
name:number See [...] in variant default, with the number part replacing [...,...] in variant default
See [...=...,...] in variant default
option
See [...,...] in variant default

Description

This command controls all of the formatting for the specified item group, for example the name itemize configures the item group that is the environment \startitemize). \setupitemgroup[itemize] and \setupitemize are equivalent.

TODO: There are a great many options here, and not nearly all of them are documented. (See: To-Do List)


Examples

Example 1

\setuppapersize[A8]

% generates itemization like "Idea a:  text text .."
\setupitemize
   [1]       % level of itemization
   [broad]
   [margin=no,
    distance=5em,
    stopper=,
    left=Idea ,
    right=:]

\starttext

\startitemize[a]
  \item Text Text Text Text Text Text Text Text Text Text Text Text
  \item Text Text Text Text Text Text Text Text Text Text Text Text
\stopitemize
\stoptext

Head style example

\starttext
  \startitemize[][headstyle=bold]
    \head Head 1

      \dorecurse{16}{some text }
    \head Head 2\par
      \dorecurse{10}{some other text }
  \stopitemize

  \startitemize[][headstyle=\em,afterhead={\blank[small]}]
    \head Head 3\par
      \dorecurse{10}{some closer text }

    \head Head 4\par
  \stopitemize
\stoptext

Gives:

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: