ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Spacing after combination
@ 2019-07-16 15:08 Marco Patzer
  2019-07-16 18:46 ` Willi Egger
  0 siblings, 1 reply; 5+ messages in thread
From: Marco Patzer @ 2019-07-16 15:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi!

Is there a way to influence the spacing after a combination is
placed?

\useMPlibrary [dum]

\starttext

\startcombination [2*2]
  \startcontent \externalfigure  \stopcontent
  \startcaption Foo    \stopcaption
  \startcontent \externalfigure  \stopcontent
  \startcaption Bar    \stopcaption
  \startcontent \externalfigure  \stopcontent
  \startcaption Lorem  \stopcaption
  \startcontent \externalfigure  \stopcontent
  \startcaption Ipsum  \stopcaption
\stopcombination

\samplefile{knuth}

\stoptext

I know I could wrap it in a float and use the float to control the
spacing, but it would be great if I could do without that float.

Marco
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Spacing after combination
  2019-07-16 15:08 Spacing after combination Marco Patzer
@ 2019-07-16 18:46 ` Willi Egger
  2019-07-16 19:09   ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Willi Egger @ 2019-07-16 18:46 UTC (permalink / raw)
  To: NTG-Context ConTeXt users

Marco,

there is a \setupcombination command:

\setupcombination [...,...] [..,..=..,..]
1 NAME
2 nx
ny
width height location distance alternative align continue before after inbetween style
color
OPT
= NUMBER
= NUMBER
= fit DIMENSION
= fit DIMENSION
= left middle right top bottom = DIMENSION
= label text
= inherits: \setupalign
= yes no
= COMMAND
= COMMAND
= COMMAND
= STYLE COMMAND
= COLOR

I hope this will enable you to get what you want.

Willi

> On 16 Jul 2019, at 17:08, Marco Patzer <lists@homerow.info> wrote:
> 
> Hi!
> 
> Is there a way to influence the spacing after a combination is
> placed?
> 
> \useMPlibrary [dum]
> 
> \starttext
> 
> \startcombination [2*2]
>  \startcontent \externalfigure  \stopcontent
>  \startcaption Foo    \stopcaption
>  \startcontent \externalfigure  \stopcontent
>  \startcaption Bar    \stopcaption
>  \startcontent \externalfigure  \stopcontent
>  \startcaption Lorem  \stopcaption
>  \startcontent \externalfigure  \stopcontent
>  \startcaption Ipsum  \stopcaption
> \stopcombination
> 
> \samplefile{knuth}
> 
> \stoptext
> 
> I know I could wrap it in a float and use the float to control the
> spacing, but it would be great if I could do without that float.
> 
> Marco
> ___________________________________________________________________________________
> 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] 5+ messages in thread

* Re: Spacing after combination
  2019-07-16 18:46 ` Willi Egger
@ 2019-07-16 19:09   ` Wolfgang Schuster
  2019-07-16 20:32     ` Marco Patzer
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2019-07-16 19:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Willi Egger, Marco Patzer

Willi Egger schrieb am 16.07.2019 um 20:46:
> Marco,
>
> there is a \setupcombination command:
>
> \setupcombination [...,...] [..,..=..,..]
> 1 NAME
> 2 nx
> ny
> width height location distance alternative align continue before after inbetween style
> color
> OPT
> = NUMBER
> = NUMBER
> = fit DIMENSION
> = fit DIMENSION
> = left middle right top bottom = DIMENSION
> = label text
> = inherits: \setupalign
> = yes no
> = COMMAND
> = COMMAND
> = COMMAND
> = STYLE COMMAND
> = COLOR
>
> I hope this will enable you to get what you want.
None of these options is applied at the begin or end of the environment 
(use the following setup in the example).

\setupcombination
   [   before={\endgraf{\tttf    [before]}\endgraf},
        after={\endgraf{\tttf     [after]}\endgraf},
    inbetween={\endgraf{\tttf [inbetween]}\endgraf}]


A alternative to using floats is to put the combination in a 
linecorrection environment, i.e.

\startlinecorrection
   \startcombination [2*2]
   ...
   \stopcombination
\stoplinecorrection

or

\startlinecorrection[blank]
   \startcombination [2*2]
   ...
   \stopcombination
\stoplinecorrection

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

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

* Re: Spacing after combination
  2019-07-16 19:09   ` Wolfgang Schuster
@ 2019-07-16 20:32     ` Marco Patzer
  2019-07-16 21:59       ` Alan Braslau
  0 siblings, 1 reply; 5+ messages in thread
From: Marco Patzer @ 2019-07-16 20:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 16 Jul 2019 21:09:15 +0200
Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:

> A alternative to using floats is to put the combination in a 
> linecorrection environment, i.e.
> 
> \startlinecorrection
>    \startcombination [2*2]
>    ...
>    \stopcombination
> \stoplinecorrection
> 
> or
> 
> \startlinecorrection[blank]
>    \startcombination [2*2]
>    ...
>    \stopcombination
> \stoplinecorrection

I hadn't thought of this. That's better suited than a float.
However, I'd prefer to not have another environment around the
combinations, but if there's no other way, I'd settle for your
approach. So far that seems to be the best choice.

Thanks for the quick response.

Marco
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Spacing after combination
  2019-07-16 20:32     ` Marco Patzer
@ 2019-07-16 21:59       ` Alan Braslau
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Braslau @ 2019-07-16 21:59 UTC (permalink / raw)
  To: Marco Patzer; +Cc: mailing list for ConTeXt users

On Tue, 16 Jul 2019 22:32:39 +0200
Marco Patzer <lists@homerow.info> wrote:

> However, I'd prefer to not have another environment around the
> combinations, but if there's no other way, I'd settle for your
> approach. So far that seems to be the best choice.

A combination is a construction, not really an "environment".

Alan
___________________________________________________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2019-07-16 21:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-16 15:08 Spacing after combination Marco Patzer
2019-07-16 18:46 ` Willi Egger
2019-07-16 19:09   ` Wolfgang Schuster
2019-07-16 20:32     ` Marco Patzer
2019-07-16 21:59       ` Alan Braslau

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).