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

Reply via email to