Open main menu

Difference between revisions of "Command/startcombination"

m (Text replace - "== Help from ConTeXt-Forum ==" to "== Help from ConTeXt-Forum == All issues with:")
m (Taco moved page Environment/combination to Command/startcombination over a redirect without leaving a redirect)
 
(17 intermediate revisions by 6 users not shown)
Line 4: Line 4:
 
}}
 
}}
  
== [[Help:Reference|Syntax]] ==
+
== [[Help:Reference|Syntax]] (autogenerated) ==
<table cellspacing="4" cellpadding="2" class="cmd">
+
<syntax>startcombination</syntax>
  <tr>
 
    <td colspan="2" class="cmd">\startcombination<span class="first" >[...]</span> ... \stopcombination</td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[...]</td>
 
    <td>matrix </td>
 
  </tr>
 
</table>
 
  
 +
== Description ==
 +
 +
A combination is a number of objects arranged in a matrix, with a caption below each object. (The captions may be empty.)
 +
 +
== Example ==
  
== Description ==
+
<context source=yes>
matrix = cols*rows (e.g. 3*2 means 3 columns and 2 rows).
+
\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}
 +
</context>
 +
 
 +
This MkIV example shows how to autolabel figures with
 +
 
 +
<texcode>
 +
\useMPlibrary[dum]
  
This command can be used with figures, tables or other floats.
+
\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
  
== Example ==
+
\blank[2*big]
  
<texcode>
+
2 more pics
\placefigure
 
  [here]
 
  {Caption.}
 
  {\startcombination[3*2]
 
    {\externalfigure[f11][width=\OneColWidth]}{Subcaption 11.}
 
    {\externalfigure[f12][width=\OneColWidth]}{Subcaption 12.}
 
    {\externalfigure[f13][width=\OneColWidth]}{Subcaption 13.}
 
    {\externalfigure[f21][width=\OneColWidth]}{Subcaption 21.}
 
    {\externalfigure[f22][width=\OneColWidth]}{Subcaption 22.}
 
    {\externalfigure[f23][width=\OneColWidth]}{Subcaption 23.}
 
  \stopcombination}
 
  
 +
\startcombination[mycombi][nx=2,ny=1,continue=yes]
 +
    {\externalfigure[dummy][width=4cm,height=1cm]}
 +
    {\externalfigure[dummy][width=4cm,height=1cm]}
 +
\stopcombination
 
</texcode>
 
</texcode>
 
+
[[Image:combinations.png]]
  
 
== See also ==
 
== See also ==
<!-- something like [[cmd:goto|\goto]] -->
+
* {{cmd|setupcombination}}
 +
* {{cmd|placefloat}}
 +
* {{cmd|defineparagraphs}} for non-floating side-by-side.
 +
* {{cmd|startfloatcombination}}
 +
* [[Combinations]]
  
== Help from ConTeXt-Forum ==
+
== Help from ConTeXt-Mailinglist/Forum ==
 
All issues with:
 
All issues with:
 
{{Forum|{{SUBPAGENAME}}}}
 
{{Forum|{{SUBPAGENAME}}}}
  
[[Category:Commands|startcombination]]
+
[[Category:Command/Floating|startcombination]]
 +
[[Category:Command/FiguresImages|startcombination]]

Latest revision as of 09:36, 7 August 2020

\startcombination

Syntax (autogenerated)

\startcombination[...][...] ... \stopcombination
[...]name
[...]matrix


\startcombination[...][...=...,...] ... \stopcombination
[...]name
...=...,...inherits from \setupcombination


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

 

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: