Difference between revisions of "Command/startcombination"

From ConTeXt wiki
Jump to navigationJump to search
m (see also setupcombinations)
(Add example of alternative=label)
Line 38: Line 38:
 
     \stopcombination}
 
     \stopcombination}
 
</context>
 
</context>
 +
 +
This MkIV example shows how to autolabel figures with
 +
 +
<texcode>
 +
\useMPlibrary[dum]
 +
 +
\definecombination[mycombi][alternative=label]
 +
 +
\setuplabel[combination:mycombi][
 +
    text={Item },
 +
    numberconversion=character,
 +
    stopper=!,
 +
]
 +
 +
4 pics
 +
 +
\startcombination[mycombi][2*2]
 +
    {\externalfigure[dummy][width=4cm,height=1cm]}
 +
    {\externalfigure[dummy][width=4cm,height=1cm]}
 +
    {\externalfigure[dummy][width=4cm,height=1cm]}
 +
    {\externalfigure[dummy][width=4cm,height=1cm]}
 +
\stopcombination
 +
 +
\blank[2*big]
 +
 +
2 more pics
 +
 +
\startcombination[mycombi][nx=2,ny=1,continue=yes]
 +
    {\externalfigure[dummy][width=4cm,height=1cm]}
 +
    {\externalfigure[dummy][width=4cm,height=1cm]}
 +
\stopcombination
 +
</texcode>
 +
[[Image:combinations.png]]
  
 
== See also ==
 
== See also ==

Revision as of 16:34, 15 April 2013

\startcombination

Syntax

\startcombination[r*c] ... \stopcombination
[r*c] rows * columns

Description

A combination is a number of objects arranged in a matrix, with a caption below each object. (The captions may be empty.)

Example

\setupexternalfigures[location={local, default}]
\placefigure
    [here]                                       % figure placement
    [fig:combinations]                           % figure reference
    {An example of \type{\startcombination...}.} % figure caption
    {\startcombination[3*2]                      % contents of the figure: a combination
        % first row
        {\externalfigure[cow][height=1cm]} {a}   % subfigure and subcaption
        {\externalfigure[cow][height=1cm]} {b}
        {\externalfigure[cow][height=1cm]} {c} 
        % second row
        {\externalfigure[cow][height=1cm]} {d}
        {\externalfigure[cow][height=1cm]} {e} 
        {\externalfigure[cow][height=1cm]} {f}
     \stopcombination}

This MkIV example shows how to autolabel figures with

\useMPlibrary[dum]

\definecombination[mycombi][alternative=label]

\setuplabel[combination:mycombi][
    text={Item },
    numberconversion=character,
    stopper=!,
]

4 pics

\startcombination[mycombi][2*2]
    {\externalfigure[dummy][width=4cm,height=1cm]}
    {\externalfigure[dummy][width=4cm,height=1cm]}
    {\externalfigure[dummy][width=4cm,height=1cm]}
    {\externalfigure[dummy][width=4cm,height=1cm]}
\stopcombination

\blank[2*big]

2 more pics

\startcombination[mycombi][nx=2,ny=1,continue=yes]
    {\externalfigure[dummy][width=4cm,height=1cm]}
    {\externalfigure[dummy][width=4cm,height=1cm]}
\stopcombination

combinations.png

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: