Hi, As follow up on the combinations tread I made this: \useMPlibrary[dum] \starttext \definecombination[mycombi][alternative=label] \setuplabel[combination:mycombi][text={Item },numberconversion=character,stopper=!] \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] \startcombination[mycombi][nx=2,ny=1,continue=yes] {\externalfigure[dummy][width=4cm,height=1cm]} {\externalfigure[dummy][width=4cm,height=1cm]} \stopcombination \blank[2*big] \startcombination[mycombi][alternative=text,nx=2,ny=2] {\externalfigure[dummy][width=4cm,height=1cm]} {alpha} {\externalfigure[dummy][width=4cm,height=1cm]} {beta} {\externalfigure[dummy][width=4cm,height=1cm]} {gamma} {\externalfigure[dummy][width=4cm,height=1cm]} {delta} \stopcombination \blank[2*big] \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 \stoptext A relative simple extension but probably useful. -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans,
Is the following correct?
(1) [alternative=...] is a new key for \definecombination
(2) \definecombination[mycombiA][alternative=text] means you specify
the combination's contents as item, caption, item, caption, etc.
\startcombination[mycombiA][nx=2,ny=1]
{item}{caption}
{another item}{another caption}
\stopcombination
(3) \definecombination[mycombiB][alternative=label] means you specify
the combination's contents as item, item, item, etc.
\startcombination[mycombiB][nx=2,ny=1]
{item}
{another item}
\stopcombination
and the caption (label) will be placed automatically.
(4) You can setup the mycombiB labels like so:
\setuplabel[combination:mycombiB][
text={Item },
numberconversion=character,
stopper=!
]
(If you do not setup the mycombiB label, each item's label will be a
bold number.)
Cheers,
Sietse
On 15 April 2013 10:50, Hans Hagen
Hi,
As follow up on the combinations tread I made this:
\useMPlibrary[dum]
\starttext
\definecombination[mycombi][alternative=label]
\setuplabel[combination:mycombi][text={Item },numberconversion=character,stopper=!]
\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]
\startcombination[mycombi][nx=2,ny=1,continue=yes] {\externalfigure[dummy][width=4cm,height=1cm]} {\externalfigure[dummy][width=4cm,height=1cm]} \stopcombination
\blank[2*big]
\startcombination[mycombi][alternative=text,nx=2,ny=2] {\externalfigure[dummy][width=4cm,height=1cm]} {alpha} {\externalfigure[dummy][width=4cm,height=1cm]} {beta} {\externalfigure[dummy][width=4cm,height=1cm]} {gamma} {\externalfigure[dummy][width=4cm,height=1cm]} {delta} \stopcombination
\blank[2*big]
\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
\stoptext
A relative simple extension but probably useful. --
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Am 15.04.2013 um 15:40 schrieb Sietse Brouwer
Hi Hans,
Is the following correct? (1) [alternative=...] is a new key for \definecombination
Yes but you can also change the alternative with \startcombination.
(2) \definecombination[mycombiA][alternative=text] means you specify the combination's contents as item, caption, item, caption, etc.
\startcombination[mycombiA][nx=2,ny=1] {item}{caption} {another item}{another caption} \stopcombination
Yes, alternative=text is the old combination mechanism which takes two arguments for each entry for the content and the caption.
(3) \definecombination[mycombiB][alternative=label] means you specify the combination's contents as item, item, item, etc. \startcombination[mycombiB][nx=2,ny=1] {item} {another item} \stopcombination and the caption (label) will be placed automatically.
Yes.
(4) You can setup the mycombiB labels like so: \setuplabel[combination:mycombiB][ text={Item }, numberconversion=character, stopper=! ] (If you do not setup the mycombiB label, each item's label will be a bold number.)
When you don’t set individual settings for a combination label the global values from \setuplabel are used which are bold text and numbers. Wolfgang
On 4/15/2013 3:40 PM, Sietse Brouwer wrote:
Is the following correct?
indeed ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Perhaps the default for the label could be numberconversion=character
--- subfigures are more commonly numbered a, b, c, I think.
Wikified at
http://wiki.contextgarden.net/Command/setupcombinations
http://wiki.contextgarden.net/Command/startcombination
Cheers,
Sietse
On 15 April 2013 16:04, Hans Hagen
On 4/15/2013 3:40 PM, Sietse Brouwer wrote:
Is the following correct?
indeed
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 15.04.2013 um 18:45 schrieb Sietse Brouwer
Perhaps the default for the label could be numberconversion=character --- subfigures are more commonly numbered a, b, c, I think.
To set default values it can be usefull to add a unnamed “combination” label, i.e. \definelabel[\v!combination] and \definecombination is changed to \appendtoks \edef\p_pack_combinations_alternative{\combinationparameter\c!alternative}% \setfalse\c_str_define_commands_label % no helper commands \ifx\currentcombinationparent\empty - \normalexpanded{\definelabel[\v!combination:\currentcombination]}[\c!text=]% + \normalexpanded{\definelabel[\v!combination:\currentcombination][\v!combination]}[\c!text=]% \else \normalexpanded{\definelabel[\v!combination:\currentcombination][\currentcombinationparent]}[\c!text=]% \fi \to \everydefinecombination Wolfgang
On 4/15/2013 6:58 PM, Wolfgang Schuster wrote:
Am 15.04.2013 um 18:45 schrieb Sietse Brouwer
: Perhaps the default for the label could be numberconversion=character --- subfigures are more commonly numbered a, b, c, I think.
To set default values it can be usefull to add a unnamed “combination” label, i.e.
\definelabel[\v!combination]
and \definecombination is changed to
\appendtoks \edef\p_pack_combinations_alternative{\combinationparameter\c!alternative}% \setfalse\c_str_define_commands_label % no helper commands \ifx\currentcombinationparent\empty - \normalexpanded{\definelabel[\v!combination:\currentcombination]}[\c!text=]% + \normalexpanded{\definelabel[\v!combination:\currentcombination][\v!combination]}[\c!text=]% \else \normalexpanded{\definelabel[\v!combination:\currentcombination][\currentcombinationparent]}[\c!text=]% \fi \to \everydefinecombination
ok, but \normalexpanded {\definelabel [\v!combination:\currentcombination]% [\v!combination\ifx\currentcombinationparent\empty\else:\currentcombinationparent\fi]}% [\c!text=]% ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 4/15/2013 6:45 PM, Sietse Brouwer wrote:
Perhaps the default for the label could be numberconversion=character --- subfigures are more commonly numbered a, b, c, I think.
ok ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 2013–04–15 Hans Hagen wrote:
As follow up on the combinations tread I made this:
…
A relative simple extension but probably useful.
How about making the first bracket pair optional if key-value options are passed? This would allow for the following syntax: \starttext %% works: %% \startcombination [][nx=3, ny=1] %% suggestion, fails at the moment \startcombination [nx=3, ny=1] {a}{x} {b}{x} {c}{x} \stopcombination \stoptext Marco
On 4/15/2013 7:23 PM, Marco Patzer wrote:
On 2013–04–15 Hans Hagen wrote:
As follow up on the combinations tread I made this:
…
A relative simple extension but probably useful.
How about making the first bracket pair optional if key-value options are passed? This would allow for the following syntax:
\starttext
%% works: %% \startcombination [][nx=3, ny=1]
%% suggestion, fails at the moment \startcombination [nx=3, ny=1] {a}{x} {b}{x} {c}{x} \stopcombination
\stoptext
ok ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Hans Hagen
-
Marco Patzer
-
Sietse Brouwer
-
Wolfgang Schuster