ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* combinations
@ 2021-05-14  3:27 jbf
  2021-05-14  4:30 ` combinations Benny Schurig
  0 siblings, 1 reply; 24+ messages in thread
From: jbf @ 2021-05-14  3:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi list,

The following MWE is giving me two photos under each other, not beside 
each. What am I doing wrong?

Julian


\startplacefigure[location=here]
\setupcombination[distance=0mm,after=]
{\startcombination[2*1]
{\externalfigure[res1.jpg][width=.4\textwidth]}
{\externalfigure[res2.jpg][width=.4\textwidth]} \stopcombination}
\stopplacefigure

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2021-05-14  3:27 combinations jbf
@ 2021-05-14  4:30 ` Benny Schurig
  2021-05-14  4:52   ` combinations jbf
  2021-05-14  9:39   ` combinations Hans Hagen
  0 siblings, 2 replies; 24+ messages in thread
From: Benny Schurig @ 2021-05-14  4:30 UTC (permalink / raw)
  To: ntg-context

Hi Julian,

for me first reply ever with a suggestion:

You have to set a caption

https://wiki.contextgarden.net/Command/startcombination

That worked fine for me:

\startplacefigure[location=here]
   \setupcombination[distance=0mm,after=]
   {\startcombination[2*1]
     {\externalfigure[res1.jpg][width=.4\textwidth]} {pic 1}
     {\externalfigure[res2.jpg][width=.4\textwidth]} {pic 2}
   \stopcombination}
\stopplacefigure

Best, Benny

Am 14.05.21 um 05:27 schrieb jbf:
> Hi list,
> 
> The following MWE is giving me two photos under each other, not beside 
> each. What am I doing wrong?
> 
> Julian
> 
> 
> \startplacefigure[location=here]
> \setupcombination[distance=0mm,after=]
> {\startcombination[2*1]
> {\externalfigure[res1.jpg][width=.4\textwidth]}
> {\externalfigure[res2.jpg][width=.4\textwidth]} \stopcombination}
> \stopplacefigure
> 
> ___________________________________________________________________________________ 
> 
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________ 
> 
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2021-05-14  4:30 ` combinations Benny Schurig
@ 2021-05-14  4:52   ` jbf
  2021-05-14  9:39   ` combinations Hans Hagen
  1 sibling, 0 replies; 24+ messages in thread
From: jbf @ 2021-05-14  4:52 UTC (permalink / raw)
  To: Benny Schurig; +Cc: mailing list for ConTeXt users

Wonderful Benny! Congrats on your first ever suggestion. I didn't need a 
caption so I had left it out, but I see that I now need at least an 
empty {} after each item for it to work.

Thanks

Julian

On 14/5/21 2:30 pm, Benny Schurig wrote:
> {pic 1}
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2021-05-14  4:30 ` combinations Benny Schurig
  2021-05-14  4:52   ` combinations jbf
@ 2021-05-14  9:39   ` Hans Hagen
  2021-05-22 20:50     ` combinations Willi Egger
  1 sibling, 1 reply; 24+ messages in thread
From: Hans Hagen @ 2021-05-14  9:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Benny Schurig

On 5/14/2021 6:30 AM, Benny Schurig wrote:
> Hi Julian,
> 
> for me first reply ever with a suggestion:
> 
> You have to set a caption
> 
> https://wiki.contextgarden.net/Command/startcombination
> 
> That worked fine for me:
> 
> \startplacefigure[location=here]
>    \setupcombination[distance=0mm,after=]
>    {\startcombination[2*1]
>      {\externalfigure[res1.jpg][width=.4\textwidth]} {pic 1}
>      {\externalfigure[res2.jpg][width=.4\textwidth]} {pic 2}
>    \stopcombination}
> \stopplacefigure
> 
> Best, Benny
> 
> Am 14.05.21 um 05:27 schrieb jbf:
>> Hi list,
>>
>> The following MWE is giving me two photos under each other, not beside 
>> each. What am I doing wrong?
>>
>> Julian
>>
>>
>> \startplacefigure[location=here]
>> \setupcombination[distance=0mm,after=]
>> {\startcombination[2*1]
>> {\externalfigure[res1.jpg][width=.4\textwidth]}
>> {\externalfigure[res2.jpg][width=.4\textwidth]} \stopcombination}
>> \stopplacefigure
You can also do this:

\startplacefigure[location=here]
     \startcombination[distance=2mm,after=,nx=2,ny=1,location=middle]
         \startcontent
             \externalfigure[mill.png]  [width=.4\textwidth]
         \stopcontent
         \startcaption
             pic 1
         \stopcaption
         \startcontent
             \externalfigure[hacker.jpg][width=.4\textwidth]
         \stopcontent
         \startcaption
             pic 2
         \stopcaption
     \stopcombination
\stopplacefigure


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2021-05-14  9:39   ` combinations Hans Hagen
@ 2021-05-22 20:50     ` Willi Egger
  0 siblings, 0 replies; 24+ messages in thread
From: Willi Egger @ 2021-05-22 20:50 UTC (permalink / raw)
  To: NTG-Context ConTeXt users

Hello everybody,

this example given by Hans is interesting. I added it to the Wiki to the command \startcombination.

Willi

> On 14 May 2021, at 11:39, Hans Hagen <j.hagen@xs4all.nl> wrote:
> 
> On 5/14/2021 6:30 AM, Benny Schurig wrote:
>> Hi Julian,
>> for me first reply ever with a suggestion:
>> You have to set a caption
>> https://wiki.contextgarden.net/Command/startcombination
>> That worked fine for me:
>> \startplacefigure[location=here]
>>   \setupcombination[distance=0mm,after=]
>>   {\startcombination[2*1]
>>     {\externalfigure[res1.jpg][width=.4\textwidth]} {pic 1}
>>     {\externalfigure[res2.jpg][width=.4\textwidth]} {pic 2}
>>   \stopcombination}
>> \stopplacefigure
>> Best, Benny
>> Am 14.05.21 um 05:27 schrieb jbf:
>>> Hi list,
>>> 
>>> The following MWE is giving me two photos under each other, not beside each. What am I doing wrong?
>>> 
>>> Julian
>>> 
>>> 
>>> \startplacefigure[location=here]
>>> \setupcombination[distance=0mm,after=]
>>> {\startcombination[2*1]
>>> {\externalfigure[res1.jpg][width=.4\textwidth]}
>>> {\externalfigure[res2.jpg][width=.4\textwidth]} \stopcombination}
>>> \stopplacefigure
> You can also do this:
> 
> \startplacefigure[location=here]
>    \startcombination[distance=2mm,after=,nx=2,ny=1,location=middle]
>        \startcontent
>            \externalfigure[mill.png]  [width=.4\textwidth]
>        \stopcontent
>        \startcaption
>            pic 1
>        \stopcaption
>        \startcontent
>            \externalfigure[hacker.jpg][width=.4\textwidth]
>        \stopcontent
>        \startcaption
>            pic 2
>        \stopcaption
>    \stopcombination
> \stopplacefigure
> 
> 
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2013-04-15 16:45     ` combinations Sietse Brouwer
  2013-04-15 16:58       ` combinations Wolfgang Schuster
@ 2013-04-16  8:41       ` Hans Hagen
  1 sibling, 0 replies; 24+ messages in thread
From: Hans Hagen @ 2013-04-16  8:41 UTC (permalink / raw)
  To: Sietse Brouwer; +Cc: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2013-04-15 16:58       ` combinations Wolfgang Schuster
@ 2013-04-15 23:38         ` Hans Hagen
  0 siblings, 0 replies; 24+ messages in thread
From: Hans Hagen @ 2013-04-15 23:38 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On 4/15/2013 6:58 PM, Wolfgang Schuster wrote:
>
> Am 15.04.2013 um 18:45 schrieb Sietse Brouwer <sbbrouwer@gmail.com>:
>
>> 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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2013-04-15 17:23 ` combinations Marco Patzer
@ 2013-04-15 23:19   ` Hans Hagen
  0 siblings, 0 replies; 24+ messages in thread
From: Hans Hagen @ 2013-04-15 23:19 UTC (permalink / raw)
  To: ntg-context

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2013-04-15  8:50 combinations Hans Hagen
  2013-04-15 13:40 ` combinations Sietse Brouwer
@ 2013-04-15 17:23 ` Marco Patzer
  2013-04-15 23:19   ` combinations Hans Hagen
  1 sibling, 1 reply; 24+ messages in thread
From: Marco Patzer @ 2013-04-15 17:23 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 494 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2013-04-15 16:45     ` combinations Sietse Brouwer
@ 2013-04-15 16:58       ` Wolfgang Schuster
  2013-04-15 23:38         ` combinations Hans Hagen
  2013-04-16  8:41       ` combinations Hans Hagen
  1 sibling, 1 reply; 24+ messages in thread
From: Wolfgang Schuster @ 2013-04-15 16:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


Am 15.04.2013 um 18:45 schrieb Sietse Brouwer <sbbrouwer@gmail.com>:

> 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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2013-04-15 14:04   ` combinations Hans Hagen
@ 2013-04-15 16:45     ` Sietse Brouwer
  2013-04-15 16:58       ` combinations Wolfgang Schuster
  2013-04-16  8:41       ` combinations Hans Hagen
  0 siblings, 2 replies; 24+ messages in thread
From: Sietse Brouwer @ 2013-04-15 16:45 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

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 <pragma@wxs.nl> wrote:
>
> 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
> -----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2013-04-15 13:40 ` combinations Sietse Brouwer
  2013-04-15 13:57   ` combinations Wolfgang Schuster
@ 2013-04-15 14:04   ` Hans Hagen
  2013-04-15 16:45     ` combinations Sietse Brouwer
  1 sibling, 1 reply; 24+ messages in thread
From: Hans Hagen @ 2013-04-15 14:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2013-04-15 13:40 ` combinations Sietse Brouwer
@ 2013-04-15 13:57   ` Wolfgang Schuster
  2013-04-15 14:04   ` combinations Hans Hagen
  1 sibling, 0 replies; 24+ messages in thread
From: Wolfgang Schuster @ 2013-04-15 13:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 15.04.2013 um 15:40 schrieb Sietse Brouwer <sbbrouwer@gmail.com>:

> 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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2013-04-15  8:50 combinations Hans Hagen
@ 2013-04-15 13:40 ` Sietse Brouwer
  2013-04-15 13:57   ` combinations Wolfgang Schuster
  2013-04-15 14:04   ` combinations Hans Hagen
  2013-04-15 17:23 ` combinations Marco Patzer
  1 sibling, 2 replies; 24+ messages in thread
From: Sietse Brouwer @ 2013-04-15 13:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 <pragma@wxs.nl> wrote:
>
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* combinations
@ 2013-04-15  8:50 Hans Hagen
  2013-04-15 13:40 ` combinations Sietse Brouwer
  2013-04-15 17:23 ` combinations Marco Patzer
  0 siblings, 2 replies; 24+ messages in thread
From: Hans Hagen @ 2013-04-15  8:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Combinations
  2006-10-09  1:46         ` Combinations Aditya Mahajan
@ 2006-10-09 16:43           ` Pepe Barbe
  0 siblings, 0 replies; 24+ messages in thread
From: Pepe Barbe @ 2006-10-09 16:43 UTC (permalink / raw)


On 10/8/06, Aditya Mahajan <adityam@umich.edu> wrote:
> You can center it on your own by \midaligned.

Thanks, works like a charm.

Pepe

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Combinations
  2006-10-08 23:51       ` Combinations Pepe Barbe
@ 2006-10-09  1:46         ` Aditya Mahajan
  2006-10-09 16:43           ` Combinations Pepe Barbe
  0 siblings, 1 reply; 24+ messages in thread
From: Aditya Mahajan @ 2006-10-09  1:46 UTC (permalink / raw)


On Sun, 8 Oct 2006, Pepe Barbe wrote:

> On 10/8/06, Aditya Mahajan <adityam@umich.edu> wrote:
>> That was because you do not have proper grouping in your \placefigure
>> definition. Try
>>
>> \placefigure[tag][here] {Caption}
>> {% <-- Note this
>> \startcombination[3*4]
>> ....
>> \stopcombination
>> \startcombination[2*1]
>> ....
>> \stopcombination
>> } %<---- Note this
>
> Thanks. It does work, but is the same as doing 3*5. The last line does
> not show centered.

You can center it on your own by \midaligned.

\placefigure {Combinations}
{
\startcombination [3*4]
   {\externalfigure[unknown]}{1}
   {\externalfigure[unknown]}{2}
   {\externalfigure[unknown]}{3}
   {\externalfigure[unknown]}{4}
   {\externalfigure[unknown]}{5}
   {\externalfigure[unknown]}{6}
   {\externalfigure[unknown]}{7}
   {\externalfigure[unknown]}{8}
   {\externalfigure[unknown]}{9}
   {\externalfigure[unknown]}{10}
   {\externalfigure[unknown]}{11}
   {\externalfigure[unknown]}{12}
\stopcombination
\blank[medium] %<-- This is the default inbetween for
%              \setupcombinations
\midaligned{\startcombination[2*1]
   {\externalfigure[unknown]}{1}
   {\externalfigure[unknown]}{2}
\stopcombination}}


Aditya

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Combinations
  2006-10-08 19:46     ` Combinations Aditya Mahajan
@ 2006-10-08 23:51       ` Pepe Barbe
  2006-10-09  1:46         ` Combinations Aditya Mahajan
  0 siblings, 1 reply; 24+ messages in thread
From: Pepe Barbe @ 2006-10-08 23:51 UTC (permalink / raw)


On 10/8/06, Aditya Mahajan <adityam@umich.edu> wrote:
> That was because you do not have proper grouping in your \placefigure
> definition. Try
>
> \placefigure[tag][here] {Caption}
> {% <-- Note this
> \startcombination[3*4]
> ....
> \stopcombination
> \startcombination[2*1]
> ....
> \stopcombination
> } %<---- Note this

Thanks. It does work, but is the same as doing 3*5. The last line does
not show centered.

Pepe

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Combinations
  2006-10-08 18:15   ` Combinations Pepe Barbe
@ 2006-10-08 19:46     ` Aditya Mahajan
  2006-10-08 23:51       ` Combinations Pepe Barbe
  0 siblings, 1 reply; 24+ messages in thread
From: Aditya Mahajan @ 2006-10-08 19:46 UTC (permalink / raw)


On Sun, 8 Oct 2006, Pepe Barbe wrote:

> Aditya,
>
> Thanks for the help.
>
> On 10/8/06, Aditya Mahajan <adityam@umich.edu> wrote:
>> \startcombination[3*4,2*1] but then you will have to count on your
>> own.
>
> That is what I wanted to avoid, I don't know ConTeXt very well, and less TeX.
>
>> Perhaps, you can define (untested)
>>
>> \def\resetcombination{\stopcomination\startcombination} and then
>
> I tried a similar idea. But it didn't work. If I start with 2*1 and
> then 3*4 it shows everything but the first two are not centered, so
> its the same. If I do 3*4 and then 2*1 it just shows the 3*4 and thend
> the figure ends for some reason.

That was because you do not have proper grouping in your \placefigure 
definition. Try

\placefigure[tag][here] {Caption}
{% <-- Note this
\startcombination[3*4]
....
\stopcombination
\startcombination[2*1]
....
\stopcombination
} %<---- Note this

Aditya

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Combinations
  2006-10-08 14:26 ` Combinations Aditya Mahajan
@ 2006-10-08 18:15   ` Pepe Barbe
  2006-10-08 19:46     ` Combinations Aditya Mahajan
  0 siblings, 1 reply; 24+ messages in thread
From: Pepe Barbe @ 2006-10-08 18:15 UTC (permalink / raw)


Aditya,

Thanks for the help.

On 10/8/06, Aditya Mahajan <adityam@umich.edu> wrote:
> \startcombination[3*4,2*1] but then you will have to count on your
> own.

That is what I wanted to avoid, I don't know ConTeXt very well, and less TeX.

> Perhaps, you can define (untested)
>
> \def\resetcombination{\stopcomination\startcombination} and then

I tried a similar idea. But it didn't work. If I start with 2*1 and
then 3*4 it shows everything but the first two are not centered, so
its the same. If I do 3*4 and then 2*1 it just shows the 3*4 and thend
the figure ends for some reason.


> The problem, if any, is with \tfx. This demonstrates it

Thanks for this info!

Pepe

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Combinations
  2006-10-08  3:19 Combinations Pepe Barbe
@ 2006-10-08 14:26 ` Aditya Mahajan
  2006-10-08 18:15   ` Combinations Pepe Barbe
  0 siblings, 1 reply; 24+ messages in thread
From: Aditya Mahajan @ 2006-10-08 14:26 UTC (permalink / raw)


On Sat, 7 Oct 2006, Pepe Barbe wrote:

> Hello everyone,
>
> I have 14 graphs that I want to arrange in a single page. I've found
> the best wat to do that is with a 3 by 5 combination. Yet, it would
> look better if I had a 3 by 4 combination and a 2 by 1 centered
> underneath the preveious. Is there some simple way to do that?

Not that I know of. It may be possible to expand \start stop 
combination to work with

\startcombination[3*4,2*1] but then you will have to count on your 
own.

Perhaps, you can define (untested)

\def\resetcombination{\stopcomination\startcombination} and then

\startcombination[3*4]
  ....
  ....
\resetcombination[2*1]
....
....
\stopcombination


> Also, a while ago I asked about the font size of the captions in the
> combinations, which wasn't being respected in Math mode. I've tried in
> the latest beta and the problem persists. Any ideas?

The problem, if any, is with \tfx. This demonstrates it

\tfx Test $Test$

Perhaps a cleaner way to do this is

\switchtobodyfont[small] Test $Test$

I do not know why is this not equivalent to

\small Test $Test$

Aditya

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Combinations
@ 2006-10-08  3:19 Pepe Barbe
  2006-10-08 14:26 ` Combinations Aditya Mahajan
  0 siblings, 1 reply; 24+ messages in thread
From: Pepe Barbe @ 2006-10-08  3:19 UTC (permalink / raw)


Hello everyone,

I have 14 graphs that I want to arrange in a single page. I've found
the best wat to do that is with a 3 by 5 combination. Yet, it would
look better if I had a 3 by 4 combination and a 2 by 1 centered
underneath the preveious. Is there some simple way to do that?

Also, a while ago I asked about the font size of the captions in the
combinations, which wasn't being respected in Math mode. I've tried in
the latest beta and the problem persists. Any ideas?

Example:

\setupcaptions[ headstyle=\ss\bf,style=\tfx ]
\setupcombinations[ style=\tfx\em ]

\starttext

\placefigure [center] {Combination Caption}
       \startcombination [2*1]
               {\framed[height=.45\textwidth,width=.45\textwidth]{My Graphic
1}}{Text: Test. Math: $Test$}
               {\framed[height=.45\textwidth,width=.45\textwidth]{My Graphic
2}}{Text: Test. Math: $Test$}
       \stopcombination

\stoptext

Thanks,
Pepe

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: combinations
  2002-11-03 22:30 combinations Hans Hagen
@ 2002-11-04  9:18 ` Jens-Uwe Morawski
  0 siblings, 0 replies; 24+ messages in thread
From: Jens-Uwe Morawski @ 2002-11-04  9:18 UTC (permalink / raw)


On Sun, 03 Nov 2002 23:30:40 +0100
Hans Hagen <pragma@wxs.nl> wrote:

Hi Hans,

> The next release will provide more control over combinations:
> 
>    \setupcombinations[align=right,location={top,left}]
> 
> i.e. location (top,bottom,middle,left,right) concerns the top thing, the 
> alignment (left,right,middle with right being raggedright) the caption
> 
> also new: \placefloat[leftmargin]{}{} and \placefloat[leftmargin,2*-line]{}{}
> 
> (there is more new, but that's experimental)

this sounds like "hidden for unexperienced TeX users". Is it possible
to give more detailed release notes, even for experimental features? I
know, this takes much more of your time, but IMO it could provide you
more/better feetback from "normal" ConTeXt users.

Best,
  Jens

^ permalink raw reply	[flat|nested] 24+ messages in thread

* combinations
@ 2002-11-03 22:30 Hans Hagen
  2002-11-04  9:18 ` combinations Jens-Uwe Morawski
  0 siblings, 1 reply; 24+ messages in thread
From: Hans Hagen @ 2002-11-03 22:30 UTC (permalink / raw)


Hi,

The next release will provide more control over combinations:

   \setupcombinations[align=right,location={top,left}]

i.e. location (top,bottom,middle,left,right) concerns the top thing, the 
alignment (left,right,middle with right being raggedright) the caption

also new: \placefloat[leftmargin]{}{} and \placefloat[leftmargin,2*-line]{}{}

(there is more new, but that's experimental)


Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2021-05-22 20:50 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14  3:27 combinations jbf
2021-05-14  4:30 ` combinations Benny Schurig
2021-05-14  4:52   ` combinations jbf
2021-05-14  9:39   ` combinations Hans Hagen
2021-05-22 20:50     ` combinations Willi Egger
  -- strict thread matches above, loose matches on Subject: below --
2013-04-15  8:50 combinations Hans Hagen
2013-04-15 13:40 ` combinations Sietse Brouwer
2013-04-15 13:57   ` combinations Wolfgang Schuster
2013-04-15 14:04   ` combinations Hans Hagen
2013-04-15 16:45     ` combinations Sietse Brouwer
2013-04-15 16:58       ` combinations Wolfgang Schuster
2013-04-15 23:38         ` combinations Hans Hagen
2013-04-16  8:41       ` combinations Hans Hagen
2013-04-15 17:23 ` combinations Marco Patzer
2013-04-15 23:19   ` combinations Hans Hagen
2006-10-08  3:19 Combinations Pepe Barbe
2006-10-08 14:26 ` Combinations Aditya Mahajan
2006-10-08 18:15   ` Combinations Pepe Barbe
2006-10-08 19:46     ` Combinations Aditya Mahajan
2006-10-08 23:51       ` Combinations Pepe Barbe
2006-10-09  1:46         ` Combinations Aditya Mahajan
2006-10-09 16:43           ` Combinations Pepe Barbe
2002-11-03 22:30 combinations Hans Hagen
2002-11-04  9:18 ` combinations Jens-Uwe Morawski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).