From: Hans Hagen <pragma@wxs.nl>
To: ntg-context@ntg.nl
Subject: Re: Skipped figure numbers
Date: Fri, 1 Apr 2016 09:51:16 +0200 [thread overview]
Message-ID: <56FE2874.5080604@wxs.nl> (raw)
In-Reply-To: <alpine.OSX.2.02.1603311750020.16335@nqv-znpobbx>
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
___________________________________________________________________________________
next prev parent reply other threads:[~2016-04-01 7:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.244.1459405195.1989.ntg-context@ntg.nl>
2016-03-31 13:23 ` 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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56FE2874.5080604@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).