ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Skipped figure numbers
       [not found] <mailman.244.1459405195.1989.ntg-context@ntg.nl>
@ 2016-03-31 13:23 ` Aidan Nichol
  2016-03-31 21:51   ` Aditya Mahajan
  0 siblings, 1 reply; 10+ messages in thread
From: Aidan Nichol @ 2016-03-31 13:23 UTC (permalink / raw)
  To: ntg-context

Thanks Aditya

That solved the problem
> 
> 
> On Wed, 30 Mar 2016, Aidan Nichol wrote:
> 
>> I have been looking at various options for controlling how figures are placed on a page and based on answers to similar questions in this mailing list I  tried various options. The most flexible one seems to be using tables e.g.
>> 
>> \setupexternalfigures[location={default}]
>> 
>> \starttext
>> 
>> \placefigure[]{}{\externalfigure[hacker][height=1in]}
>> 
>> \startxtable[frame=off,align=low]
>> \startxrow
>> \startxcell[ny=2]
>>     \placefigure[force][]{left twoup}{\externalfigure[mill][height=4in]}
>>  \stopxcell
>>  \startxcell
>>    \placefigure[force][]{the first}{\externalfigure[spider][height=1.5in]}
>>  \stopxcell
>> \stopxrow
>> \startxrow
>> \startxcell
>>   \placefigure[force][]{the second}{\externalfigure[cow][height=1.5in]}
>> \stopxcell
>> \stopxrow
>> \stopxtable
>> 
>> It seems to work well except that figure numbers are being skipped. In this example hacker=1 mill=8, spider=9 and cow=10.
>> Varying the contents of the table reveals that It is skipping two times the number of figures in the table.
>> 
>> Is this an invalid combination of features I’m using or am I doing something wrong?
> 
> The contents of a table are typeset multiple times to get an idea of the
> height and width. Here is one option:
> 
> \useMPlibrary[dum]
> 
> \starttext
> 
> \bTABLE[frame=off,align=low]
> \bTR
> \bTD[ny=2]
>      \placefigure[here,\iftrialtypesetting nonumber \fi]
>                  []{left twoup}{\externalfigure[mill][width=2in,height=4in]}
> \eTD
> \bTD
>      \placefigure[here,\iftrialtypesetting nonumber \fi]
>                  []{the first}{\externalfigure[spider][width=2in,height=2in]}
> \eTD
> \eTR
> \bTR
> \bTD
>      \placefigure[here,\iftrialtypesetting nonumber \fi]
>                  []{the second}{\externalfigure[cow][width=2in,height=2in]}
> \eTD
> \eTR
> \eTABLE
> \stoptext
> 
> Aditya
> 

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

* Re: Skipped figure numbers
  2016-03-31 13:23 ` Skipped figure numbers Aidan Nichol
@ 2016-03-31 21:51   ` Aditya Mahajan
  2016-03-31 22:27     ` Alan BRASLAU
                       ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Aditya Mahajan @ 2016-03-31 21:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2188 bytes --]

On Thu, 31 Mar 2016, Aidan Nichol wrote:

>> On Wed, 30 Mar 2016, Aidan Nichol wrote:
>> 
>>> I have been looking at various options for controlling how figures are placed on a page and based on answers to similar questions in this mailing list I  tried various options. The most flexible one seems to be using tables e.g.
>>> 
>>> \setupexternalfigures[location={default}]
>>> 
>>> \starttext
>>> 
>>> \placefigure[]{}{\externalfigure[hacker][height=1in]}
>>> 
>>> \startxtable[frame=off,align=low]
>>> \startxrow
>>> \startxcell[ny=2]
>>>     \placefigure[force][]{left twoup}{\externalfigure[mill][height=4in]}
>>>  \stopxcell
>>>  \startxcell
>>>    \placefigure[force][]{the first}{\externalfigure[spider][height=1.5in]}
>>>  \stopxcell
>>> \stopxrow
>>> \startxrow
>>> \startxcell
>>>   \placefigure[force][]{the second}{\externalfigure[cow][height=1.5in]}
>>> \stopxcell
>>> \stopxrow
>>> \stopxtable
>>> 
>>> It seems to work well except that figure numbers are being skipped. In this example hacker=1 mill=8, spider=9 and cow=10.
>>> Varying the contents of the table reveals that It is skipping two times the number of figures in the table.
>>> 
>>> Is this an invalid combination of features I’m using or am I doing something wrong?
>> 
>> The contents of a table are typeset multiple times to get an idea of the
>> height and width. Here is one option:
>> 
>> \useMPlibrary[dum]
>> 
>> \starttext
>> 
>> \bTABLE[frame=off,align=low]
>> \bTR
>> \bTD[ny=2]
>>      \placefigure[here,\iftrialtypesetting nonumber \fi]
>>                  []{left twoup}{\externalfigure[mill][width=2in,height=4in]}
>> \eTD
>> \bTD
>>      \placefigure[here,\iftrialtypesetting nonumber \fi]
>>                  []{the first}{\externalfigure[spider][width=2in,height=2in]}
>> \eTD
>> \eTR
>> \bTR
>> \bTD
>>      \placefigure[here,\iftrialtypesetting nonumber \fi]
>>                  []{the second}{\externalfigure[cow][width=2in,height=2in]}
>> \eTD
>> \eTR
>> \eTABLE
>> \stoptext
>> 
> Thanks Aditya
>
> That solved the problem

@Hans: Does it make sense to disable \incrementcounter if 
\trialtypesetting is active?

Aditya

[-- 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] 10+ messages in thread

* Re: Skipped figure numbers
  2016-03-31 21:51   ` Aditya Mahajan
@ 2016-03-31 22:27     ` Alan BRASLAU
  2016-04-01  1:49       ` Aditya Mahajan
  2016-04-01  7:51     ` Hans Hagen
  2016-04-01  8:01     ` Hans Hagen
  2 siblings, 1 reply; 10+ messages in thread
From: Alan BRASLAU @ 2016-03-31 22:27 UTC (permalink / raw)
  To: Aditya Mahajan; +Cc: mailing list for ConTeXt users

On Thu, 31 Mar 2016 17:51:07 -0400
Aditya Mahajan <adityam@umich.edu> wrote:

> @Hans: Does it make sense to disable \incrementcounter if 
> \trialtypesetting is active?

I was going to suggest such things...

Here is a case where a float is not being used as a floating object in
that we want to control placement through location=here or, better,
location=force. We do this as users for we want to produce a caption
as well as make an entry into the list.

However, floats have some limitations: for example they cannot usually
handle multiple pages (except for some table splits), nor can they take
\startcolumns \stopcolumns, and I am sure that there are others.

Does anyone have suggestions/ideas around these kinds of issues? Should
a float with location=force be treated any differently?

Another annoying issue with floats: \startplacefloat\stopplacefloat
initiates a paragraph break. If one refers to a float (figure or table)
somewhere in a long paragraph, one might like the float to be anchored
starting from that location. I achieve this using
\startpostponing [+0]
  \startplacefigure
  \stopplacefigure
\stoppostponing
but this does not always work well. In addition, this is not very
satisfying (as it makes for ugly source code). Also, one might want to
use location=right or location=left without using "hang" and counting
lines. Hans has repeated that floats are complicated beasts and such
features would interfere with paragraph building. OK (But dare I say
that LaTeX does not seem to have any problem with this.)

Alan

P.S. Would not the use of \startcombination\stopcombination be an
alternative to the placefigures within a table?
___________________________________________________________________________________
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] 10+ messages in thread

* Re: Skipped figure numbers
  2016-03-31 22:27     ` Alan BRASLAU
@ 2016-04-01  1:49       ` Aditya Mahajan
  0 siblings, 0 replies; 10+ messages in thread
From: Aditya Mahajan @ 2016-04-01  1:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 31 Mar 2016, Alan BRASLAU wrote:

> On Thu, 31 Mar 2016 17:51:07 -0400
> Aditya Mahajan <adityam@umich.edu> wrote:
>
>> @Hans: Does it make sense to disable \incrementcounter if
>> \trialtypesetting is active?
>
> I was going to suggest such things...

My motivation is different. If you have any macro in a table (or anything 
that requires multiple runs to get the size right) that uses a counter 
(e.g., enumeration), then the numbers will be off. That would not happen 
if a counter is frozen when trialtypesetting is on.

> P.S. Would not the use of \startcombination\stopcombination be an
> alternative to the placefigures within a table?

combinations only give regular grid. Sometimes you want an irregular grid. 
For example, the OP wanted

+------+------+
|      |      |
|      | Fig2 |
| Fig1 +------+
|      | Fig3 |
|      |      |
+------+------+

Such layouts are not possible using combinations.

Aditya
___________________________________________________________________________________
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] 10+ messages in thread

* Re: Skipped figure numbers
  2016-03-31 21:51   ` Aditya Mahajan
  2016-03-31 22:27     ` Alan BRASLAU
@ 2016-04-01  7:51     ` Hans Hagen
  2016-04-01  8:01     ` Hans Hagen
  2 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2016-04-01  7:51 UTC (permalink / raw)
  To: ntg-context

On 3/31/2016 11:51 PM, Aditya Mahajan wrote:
> On Thu, 31 Mar 2016, Aidan Nichol wrote:
>
>>> On Wed, 30 Mar 2016, Aidan Nichol wrote:
>>>
>>>> I have been looking at various options for controlling how figures
>>>> are placed on a page and based on answers to similar questions in
>>>> this mailing list I  tried various options. The most flexible one
>>>> seems to be using tables e.g.
>>>>
>>>> \setupexternalfigures[location={default}]
>>>>
>>>> \starttext
>>>>
>>>> \placefigure[]{}{\externalfigure[hacker][height=1in]}
>>>>
>>>> \startxtable[frame=off,align=low]
>>>> \startxrow
>>>> \startxcell[ny=2]
>>>>     \placefigure[force][]{left
>>>> twoup}{\externalfigure[mill][height=4in]}
>>>>  \stopxcell
>>>>  \startxcell
>>>>    \placefigure[force][]{the
>>>> first}{\externalfigure[spider][height=1.5in]}
>>>>  \stopxcell
>>>> \stopxrow
>>>> \startxrow
>>>> \startxcell
>>>>   \placefigure[force][]{the second}{\externalfigure[cow][height=1.5in]}
>>>> \stopxcell
>>>> \stopxrow
>>>> \stopxtable
>>>>
>>>> It seems to work well except that figure numbers are being skipped.
>>>> In this example hacker=1 mill=8, spider=9 and cow=10.
>>>> Varying the contents of the table reveals that It is skipping two
>>>> times the number of figures in the table.
>>>>
>>>> Is this an invalid combination of features I’m using or am I doing
>>>> something wrong?
>>>
>>> The contents of a table are typeset multiple times to get an idea of the
>>> height and width. Here is one option:
>>>
>>> \useMPlibrary[dum]
>>>
>>> \starttext
>>>
>>> \bTABLE[frame=off,align=low]
>>> \bTR
>>> \bTD[ny=2]
>>>      \placefigure[here,\iftrialtypesetting nonumber \fi]
>>>                  []{left
>>> twoup}{\externalfigure[mill][width=2in,height=4in]}
>>> \eTD
>>> \bTD
>>>      \placefigure[here,\iftrialtypesetting nonumber \fi]
>>>                  []{the
>>> first}{\externalfigure[spider][width=2in,height=2in]}
>>> \eTD
>>> \eTR
>>> \bTR
>>> \bTD
>>>      \placefigure[here,\iftrialtypesetting nonumber \fi]
>>>                  []{the
>>> second}{\externalfigure[cow][width=2in,height=2in]}
>>> \eTD
>>> \eTR
>>> \eTABLE
>>> \stoptext
>>>
>> Thanks Aditya
>>
>> That solved the problem
>
> @Hans: Does it make sense to disable \incrementcounter if
> \trialtypesetting is active?

depends a bit .. other mechanisms do a save, increment, restore, which 
better reflects the number to be rendered (otherwise you can get 
oscillating runs)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | 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] 10+ messages in thread

* Re: Skipped figure numbers
  2016-03-31 21:51   ` Aditya Mahajan
  2016-03-31 22:27     ` Alan BRASLAU
  2016-04-01  7:51     ` Hans Hagen
@ 2016-04-01  8:01     ` Hans Hagen
  2 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2016-04-01  8:01 UTC (permalink / raw)
  To: ntg-context

On 3/31/2016 11:51 PM, Aditya Mahajan wrote:
> On Thu, 31 Mar 2016, Aidan Nichol wrote:
>
>>> On Wed, 30 Mar 2016, Aidan Nichol wrote:
>>>
>>>> I have been looking at various options for controlling how figures
>>>> are placed on a page and based on answers to similar questions in
>>>> this mailing list I  tried various options. The most flexible one
>>>> seems to be using tables e.g.
>>>>
>>>> \setupexternalfigures[location={default}]
>>>>
>>>> \starttext
>>>>
>>>> \placefigure[]{}{\externalfigure[hacker][height=1in]}
>>>>
>>>> \startxtable[frame=off,align=low]
>>>> \startxrow
>>>> \startxcell[ny=2]
>>>>     \placefigure[force][]{left
>>>> twoup}{\externalfigure[mill][height=4in]}
>>>>  \stopxcell
>>>>  \startxcell
>>>>    \placefigure[force][]{the
>>>> first}{\externalfigure[spider][height=1.5in]}
>>>>  \stopxcell
>>>> \stopxrow
>>>> \startxrow
>>>> \startxcell
>>>>   \placefigure[force][]{the second}{\externalfigure[cow][height=1.5in]}
>>>> \stopxcell
>>>> \stopxrow
>>>> \stopxtable
>>>>
>>>> It seems to work well except that figure numbers are being skipped.
>>>> In this example hacker=1 mill=8, spider=9 and cow=10.
>>>> Varying the contents of the table reveals that It is skipping two
>>>> times the number of figures in the table.
>>>>
>>>> Is this an invalid combination of features I’m using or am I doing
>>>> something wrong?
>>>
>>> The contents of a table are typeset multiple times to get an idea of the
>>> height and width. Here is one option:
>>>
>>> \useMPlibrary[dum]
>>>
>>> \starttext
>>>
>>> \bTABLE[frame=off,align=low]
>>> \bTR
>>> \bTD[ny=2]
>>>      \placefigure[here,\iftrialtypesetting nonumber \fi]
>>>                  []{left
>>> twoup}{\externalfigure[mill][width=2in,height=4in]}
>>> \eTD
>>> \bTD
>>>      \placefigure[here,\iftrialtypesetting nonumber \fi]
>>>                  []{the
>>> first}{\externalfigure[spider][width=2in,height=2in]}
>>> \eTD
>>> \eTR
>>> \bTR
>>> \bTD
>>>      \placefigure[here,\iftrialtypesetting nonumber \fi]
>>>                  []{the
>>> second}{\externalfigure[cow][width=2in,height=2in]}
>>> \eTD
>>> \eTR
>>> \eTABLE
>>> \stoptext
>>>
>> Thanks Aditya
>>
>> That solved the problem
>
> @Hans: Does it make sense to disable \incrementcounter if
> \trialtypesetting is active?

btw, floats are just that: floats ...

\starttext

     \useMPlibrary[dum]

     \dorecurse{34}{test\par}

     \bTABLE[split=yes]
         \dorecurse{10}{
             \bTR
                 \bTD \placefigure{}{\externalfigure[dummy][width=2cm]} \eTD
                 \bTD \placefigure{}{\externalfigure[dummy][width=2cm]} \eTD
             \eTR
             \bTR
                 \bTD[nx=2] 
\placefigure{}{\externalfigure[dummy][width=4cm]} \eTD
             \eTR
         }
     \eTABLE

\stoptext


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | 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] 10+ messages in thread

* Re: Skipped figure numbers
  2016-04-01 10:17 ` Aidan Nichol
@ 2016-04-01 14:21   ` Alan BRASLAU
  0 siblings, 0 replies; 10+ messages in thread
From: Alan BRASLAU @ 2016-04-01 14:21 UTC (permalink / raw)
  To: Aidan Nichol; +Cc: ntg-context

On Fri, 1 Apr 2016 11:17:07 +0100
Aidan Nichol <aidan@nicholware.co.uk> wrote:

> combinations only give regular grid. Sometimes you want an irregular
> grid. 

Use a nested combination.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Skipped figure numbers
       [not found] <mailman.263.1459497717.1989.ntg-context@ntg.nl>
@ 2016-04-01 10:17 ` Aidan Nichol
  2016-04-01 14:21   ` Alan BRASLAU
  0 siblings, 1 reply; 10+ messages in thread
From: Aidan Nichol @ 2016-04-01 10:17 UTC (permalink / raw)
  To: ntg-context


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

> On Thu, 31 Mar 2016 21:49:56 -0400 (EDT)
> Aditya Mahajan <adityam@umich.edu> wrote:
> 
> On Thu, 31 Mar 2016, Alan BRASLAU wrote:
> 
>> On Thu, 31 Mar 2016 17:51:07 -0400
>> Aditya Mahajan <adityam@umich.edu> wrote:
>> 
>>> @Hans: Does it make sense to disable \incrementcounter if
>>> \trialtypesetting is active?
>> 
>> I was going to suggest such things...
> 
> My motivation is different. If you have any macro in a table (or anything 
> that requires multiple runs to get the size right) that uses a counter 
> (e.g., enumeration), then the numbers will be off. That would not happen 
> if a counter is frozen when trialtypesetting is on.
> 
>> P.S. Would not the use of \startcombination\stopcombination be an
>> alternative to the placefigures within a table?

And \startcombination\stopcombination fails when you use \placefigure instead of \externalfigure because you want the captions to be numbered and included in the list of figures. You get an error like this one 

      > tex error on line 7 in file virtual: . . .  ! You can't use `\prevdepth' in restricted horizontal mode

Using \startfloatcombinations\stopfloatcombination (which appears to be undocumented) avoids this error.


> 
> combinations only give regular grid. Sometimes you want an irregular grid. 
> For example, the OP wanted
> 
> +-------+------+
> |          |         |
> |          | Fig2 |
> | Fig1 +-------+
> |          | Fig3 |
> |          |         |
> +------+-------+
> 
> Such layouts are not possible using combinations.

I thought that nesting combinations might enable this type of combination but it didn’t work. see
https://mailman.ntg.nl/pipermail/ntg-context/2016/084926.html <https://mailman.ntg.nl/pipermail/ntg-context/2016/084926.html>

Using tables is a better solution because it has the syntax to handle figures that span rows or columns

> 
> Aditya
> 
Lots of things seem to work well with external figures but as soon as you embed them in a \placefigure, which makes them a float, you make things more complex and run into the possibility of triggering the restricted horizontal mode  error.

It seems to me that once you place an object that is normally a float inside another float you want the inner one to lose it floating characteristics. Is there a way do this explicitly i.e. instead of creating an inner float with

\placefigure[force][ref1]{this is the caption }{\externalfigure[cow][width=3in,height=1in]}

could we create a non-floating version with something explicit like

\externalfigure[cow][width=3in,height=1in]
\addcaption[figure][ref1]{this is the caption }

Aidan



[-- Attachment #1.2: Type: text/html, Size: 4887 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] 10+ messages in thread

* Re: Skipped figure numbers
  2016-03-30  9:41 Aidan Nichol
@ 2016-03-30 23:25 ` Aditya Mahajan
  0 siblings, 0 replies; 10+ messages in thread
From: Aditya Mahajan @ 2016-03-30 23:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1866 bytes --]

On Wed, 30 Mar 2016, Aidan Nichol wrote:

> I have been looking at various options for controlling how figures are placed on a page and based on answers to similar questions in this mailing list I  tried various options. The most flexible one seems to be using tables e.g.
>
> \setupexternalfigures[location={default}]
>
> \starttext
>
> \placefigure[]{}{\externalfigure[hacker][height=1in]}
>
> \startxtable[frame=off,align=low]
> \startxrow
>  \startxcell[ny=2]
>      \placefigure[force][]{left twoup}{\externalfigure[mill][height=4in]}
>   \stopxcell
>   \startxcell
>     \placefigure[force][]{the first}{\externalfigure[spider][height=1.5in]}
>   \stopxcell
> \stopxrow
> \startxrow
>  \startxcell
>    \placefigure[force][]{the second}{\externalfigure[cow][height=1.5in]}
>  \stopxcell
> \stopxrow
> \stopxtable
>
> It seems to work well except that figure numbers are being skipped. In this example hacker=1 mill=8, spider=9 and cow=10.
> Varying the contents of the table reveals that It is skipping two times the number of figures in the table.
>
> Is this an invalid combination of features I’m using or am I doing something wrong?

The contents of a table are typeset multiple times to get an idea of the
height and width. Here is one option:

\useMPlibrary[dum]

\starttext

\bTABLE[frame=off,align=low]
\bTR
\bTD[ny=2]
      \placefigure[here,\iftrialtypesetting nonumber \fi]
                  []{left twoup}{\externalfigure[mill][width=2in,height=4in]}
\eTD
\bTD
      \placefigure[here,\iftrialtypesetting nonumber \fi]
                  []{the first}{\externalfigure[spider][width=2in,height=2in]}
\eTD
\eTR
\bTR
\bTD
      \placefigure[here,\iftrialtypesetting nonumber \fi]
                  []{the second}{\externalfigure[cow][width=2in,height=2in]}
\eTD
\eTR
\eTABLE
\stoptext

Aditya

[-- 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] 10+ messages in thread

* Skipped figure numbers
@ 2016-03-30  9:41 Aidan Nichol
  2016-03-30 23:25 ` Aditya Mahajan
  0 siblings, 1 reply; 10+ messages in thread
From: Aidan Nichol @ 2016-03-30  9:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I have been looking at various options for controlling how figures are placed on a page and based on answers to similar questions in this mailing list I  tried various options. The most flexible one seems to be using tables e.g.

\setupexternalfigures[location={default}]

\starttext

\placefigure[]{}{\externalfigure[hacker][height=1in]}

\startxtable[frame=off,align=low]
\startxrow
  \startxcell[ny=2]
      \placefigure[force][]{left twoup}{\externalfigure[mill][height=4in]}
   \stopxcell
   \startxcell
     \placefigure[force][]{the first}{\externalfigure[spider][height=1.5in]}
   \stopxcell
\stopxrow
\startxrow
  \startxcell
    \placefigure[force][]{the second}{\externalfigure[cow][height=1.5in]}
  \stopxcell
\stopxrow
\stopxtable

It seems to work well except that figure numbers are being skipped. In this example hacker=1 mill=8, spider=9 and cow=10.
Varying the contents of the table reveals that It is skipping two times the number of figures in the table.

Is this an invalid combination of features I’m using or am I doing something wrong?
___________________________________________________________________________________
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] 10+ messages in thread

end of thread, other threads:[~2016-04-01 14:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.244.1459405195.1989.ntg-context@ntg.nl>
2016-03-31 13:23 ` Skipped figure numbers Aidan Nichol
2016-03-31 21:51   ` Aditya Mahajan
2016-03-31 22:27     ` Alan BRASLAU
2016-04-01  1:49       ` Aditya Mahajan
2016-04-01  7:51     ` Hans Hagen
2016-04-01  8:01     ` Hans Hagen
     [not found] <mailman.263.1459497717.1989.ntg-context@ntg.nl>
2016-04-01 10:17 ` Aidan Nichol
2016-04-01 14:21   ` Alan BRASLAU
2016-03-30  9:41 Aidan Nichol
2016-03-30 23:25 ` Aditya Mahajan

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