Difference between revisions of "Combinations"

From Wiki
Jump to navigation Jump to search
(Added a short example for referencing subfigures and explained how the reference-string is build up (just from how I percieved it, I hope it is right).)
m (Text replacement - "</cmd>" to "}}")
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
< [[Graphics]], [[Using Graphics]] | [[Tables]] >
 
 
 
Combinations are ConTeXt's way to align several pictures (preferrably at same size):
 
Combinations are ConTeXt's way to align several pictures (preferrably at same size):
  
Line 13: Line 11:
 
You define, how much figures in columns * rows you'd like to align.
 
You define, how much figures in columns * rows you'd like to align.
  
You must provide one "figure something" (e.g. an <cmd>externalfigure</cmd>) and a caption for every "cell".
+
You must provide one "figure something" (e.g. an {{cmd|externalfigure}}) and a caption for every "cell".
  
The sample from the manual:
+
The sample, from the manual, shows how to define a caption for the whole group and use it as float (see [[Floating Objects]]):
<texcode>
+
 
 +
<context source=yes>
 
\placefigure
 
\placefigure
[here] % placement
+
[here] % placement option
 
[fig:combinations] % reference
 
[fig:combinations] % reference
 
{An example of combination} % caption for whole group
 
{An example of combination} % caption for whole group
Line 28: Line 27:
 
\stopcombination
 
\stopcombination
 
} % whole combination in braces of placefigure
 
} % whole combination in braces of placefigure
</texcode>
+
</context>
shows how to define a caption for the whole group and use it as float (see [[Floating Objects]]).
 
  
 
== Setup ==
 
== Setup ==
  
There is <cmd>setupcombinations</cmd> command.
+
There is {{cmd|setupcombinations}} command.
 
 
[[Category:Graphics]]
 
[[Category:Text elements]]
 
  
 
== Referencing ==
 
== Referencing ==
  
To reference a subfigure you can provide the subfigure's caption as a second parameter to the \in command.
+
To reference a subfigure you can provide the subfigure's caption as a second parameter to the {{cmd|in}} command.
  
 
To reference the subfigure with the caption d you would write:
 
To reference the subfigure with the caption d you would write:
Line 49: Line 44:
  
 
This would produce something like 'figure 2.4d'. The content of the second parameter simply gets appended to the end of the figure's reference-number, thus the example above would still work even if the caption would be 'd) An awesome subfigure'.
 
This would produce something like 'figure 2.4d'. The content of the second parameter simply gets appended to the end of the figure's reference-number, thus the example above would still work even if the caption would be 'd) An awesome subfigure'.
 +
 +
 +
[[Category:Graphics]]

Revision as of 13:25, 9 August 2020

Combinations are ConTeXt's way to align several pictures (preferrably at same size):

\startcombination[x*y]
{something}{caption} ...
...
\stopcombination

means:

You define, how much figures in columns * rows you'd like to align.

You must provide one "figure something" (e.g. an \externalfigure) and a caption for every "cell".

The sample, from the manual, shows how to define a caption for the whole group and use it as float (see Floating Objects):

\placefigure
[here] % placement option
[fig:combinations] % reference
{An example of combination} % caption for whole group
{
\startcombination[3*2] % 3 columns, 2 rows
{\externalfigure[lb00220]} {a} {\externalfigure[lb00221]} {b} % picture and caption for two figures in first row
{\externalfigure[lb00222]} {c} {\externalfigure[lb00223]} {d}
{\externalfigure[lb00225]} {e} {\externalfigure[lb00226]} {f}
\stopcombination
} % whole combination in braces of placefigure

Setup

There is \setupcombinations command.

Referencing

To reference a subfigure you can provide the subfigure's caption as a second parameter to the \in command.

To reference the subfigure with the caption d you would write:

\in{figure}{d}[fig:combinations]

This would produce something like 'figure 2.4d'. The content of the second parameter simply gets appended to the end of the figure's reference-number, thus the example above would still work even if the caption would be 'd) An awesome subfigure'.