ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Typeset multiple pictures not in a strict matrix (\startfloatcombination)
@ 2023-03-07 17:54 Gerion Entrup via ntg-context
  2023-03-08  8:56 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 2+ messages in thread
From: Gerion Entrup via ntg-context @ 2023-03-07 17:54 UTC (permalink / raw)
  To: ntg-context; +Cc: Gerion Entrup


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

Hi,

I'm trying to typeset several pictures as a floatcombination but not in
the form of strict cells of a matrix.

Here is some ASCII art to demonstrate the positions of the pictures:

  ---------------------------
  |                         |
  |                         |
  ---------------------------
        a) Some caption

  ------------  -------------
  |          |  |           |
  |          |  |           |
  |          |  |           |
  ------------  -------------
     b) foo        c) foo

     Figure 1.1: Foo Bar


I tried to typeset it with this code (based on https://tex.stackexchange.com/a/502903):

\useMPlibrary[dum]
\setupcombinations[alternative=text]

\definefloat[subfigure][local=yes]
\setupcaption[subfigure][numberconversion=a]
\setuplabeltext[subfigure=]

\appendvalue{stopplacefigure}{\resetcounter[subfigure]}

\starttext
\startplacefigure[title=Test]
    \startfloatcombination[nx=1, ny=2]
      \startplacesubfigure[title=Test]
        \externalfigure[dummy][width=4cm,height=1cm]
      \stopplacesubfigure
      \startfloatcombination[nx=2, ny=1]
        \startplacesubfigure[title=Test]
          \externalfigure[dummy][width=4cm,height=1cm]
        \stopplacesubfigure
        \startplacesubfigure[title=Test]
          \externalfigure[dummy][width=4cm,height=1cm]
        \stopplacesubfigure
      \stopfloatcombination
    \stopfloatcombination
\stopplacefigure
\stoptext

However, this does not work (the pictures are all in one row).
Do you have some advice?

Gerion

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* Re: Typeset multiple pictures not in a strict matrix (\startfloatcombination)
  2023-03-07 17:54 Typeset multiple pictures not in a strict matrix (\startfloatcombination) Gerion Entrup via ntg-context
@ 2023-03-08  8:56 ` Hans Hagen via ntg-context
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen via ntg-context @ 2023-03-08  8:56 UTC (permalink / raw)
  To: Gerion Entrup via ntg-context; +Cc: Hans Hagen

On 3/7/2023 6:54 PM, Gerion Entrup via ntg-context wrote:
> Hi,
> 
> I'm trying to typeset several pictures as a floatcombination but not in
> the form of strict cells of a matrix.
> 
> Here is some ASCII art to demonstrate the positions of the pictures:
> 
>    ---------------------------
>    |                         |
>    |                         |
>    ---------------------------
>          a) Some caption
> 
>    ------------  -------------
>    |          |  |           |
>    |          |  |           |
>    |          |  |           |
>    ------------  -------------
>       b) foo        c) foo
> 
>       Figure 1.1: Foo Bar
> 
> 
> I tried to typeset it with this code (based on https://tex.stackexchange.com/a/502903):
> 
> \useMPlibrary[dum]
> \setupcombinations[alternative=text]
> 
> \definefloat[subfigure][local=yes]
> \setupcaption[subfigure][numberconversion=a]
> \setuplabeltext[subfigure=]
> 
> \appendvalue{stopplacefigure}{\resetcounter[subfigure]}
> 
> \starttext
> \startplacefigure[title=Test]
>      \startfloatcombination[nx=1, ny=2]
>        \startplacesubfigure[title=Test]
>          \externalfigure[dummy][width=4cm,height=1cm]
>        \stopplacesubfigure
>        \startfloatcombination[nx=2, ny=1]
>          \startplacesubfigure[title=Test]
>            \externalfigure[dummy][width=4cm,height=1cm]
>          \stopplacesubfigure
>          \startplacesubfigure[title=Test]
>            \externalfigure[dummy][width=4cm,height=1cm]
>          \stopplacesubfigure
>        \stopfloatcombination
>      \stopfloatcombination
> \stopplacefigure
> \stoptext
> 
> However, this does not work (the pictures are all in one row).
> Do you have some advice?
you can cheat:

\startplacefigure[title=Test]
     \bTABLE[frame=off]
         \bTR
             \bTD[nx=2,align=middle,offset=overlay]
 
\dontleavehmode\externalfigure[dummy-1][width=4cm,height=1cm]
             \eTD
         \eTR
         \bTR[toffset=1ex]
             \bTD[nx=2,align=middle]
%                 \placefloatcaption[figure][title=foo]
                 a) foo
             \eTD
         \eTR
         \bTR[toffset=2ex]
             \bTD[align=middle,offset=overlay]
                 \externalfigure[dummy-2][width=4cm,height=1cm]
             \eTD
             \bTD[align=middle,offset=overlay]
                 \externalfigure[dummy-3][width=4cm,height=1cm]
             \eTD
         \eTR
         \bTR[toffset=1ex]
             \bTD[align=middle]
%                 \placefloatcaption[figure][title=foo]
                 b) foo
             \eTD
             \bTD[align=middle]
%                 \placefloatcaption[figure][title=foo]
                 c) foo
             \eTD
         \eTR
     \eTABLE
\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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2023-03-08  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 17:54 Typeset multiple pictures not in a strict matrix (\startfloatcombination) Gerion Entrup via ntg-context
2023-03-08  8:56 ` Hans Hagen via ntg-context

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