[NTG-context] placefigure feature request ?
Sanjoy Mahajan
sanjoy at mrao.cam.ac.uk
Wed Apr 5 17:43:46 CEST 2006
Taco Hoekwater <taco at elvenkind.com> wrote:
> Hans Hagen wrote:
> >>So 'numbering=yes' will number according to position on the page?
> >>
> > no
>
> To avoid confusion:
>
> When 'page' refers to the typeset result, then Hans' answer actually
> means 'yes'. Or it should, at least. I remember files where I had to
> run texexec twice though. I am not sure if that bug still happens,
> so be careful.
Right, I meant in pages of the typeset result. I'll watch for the need
to run texexec and make a minimal example if I find the problem.
Meanwhile I've been experimenting in baby steps, and numbering=yes does
what I want, as does specifying nothing about numbering. But
numbering=nocheck doesn't stop it, so I'm confused by what the nocheck
option does (doesn't cause me problems since the default is what I want,
but I'm curious).
Probaby I'm just using an old version of context since the texshow-web
says that numbering=nocheck is a new option. My last attempt at
upgrading didn't go well (I have tetex-3.0) but maybe it's time to try
again.
$ texexec --version
TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
texexec : TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
context : ver: 2005.01.31
cont-en : ver: 2005.01.31 fmt: 2006.3.28 mes: english
With this output on the file
$ texexec 2m
[...snip...]
systems : begin file 2m at line 6
(/usr/share/texmf-tetex/tex/context/sample/tufte.tex)
figures : dimensions of ./a.1 loaded from figurefile itself
(./2m.tuo)
floatblocks : 1 renumbered / figure 1 => 2
floatblocks : 1 placed
(/usr/share/texmf-tetex/tex/context/sample/knuth.tex)
figures : dimensions of ./a.2 loaded from figurefile itself
floatblocks : 2 renumbered / figure 2 => 1
floatblocks : 2 placed
[1.1]
systems : end file 2m at line 13
[...snip...]
So the figures get renumbered.
Here's the 2m.tex file:
======================================================================
\setuplayout[textwidth=3.6in, rightmargin=2in]
\useexternalfigure[mpg][a.1]
\useexternalfigure[mpg2][a.2]
\setupfloats[numbering=nocheck]
\starttext
\input tufte
\placefigure[rightmargin]{first in source file.}{\externalfigure[mpg]}
\par
\input knuth
\placefigure[top]{second in source file.}{\externalfigure[mpg2]}
\par
\stoptext
======================================================================
Where a.mp to produce a.1 and a.2 is:
======================================================================
beginfig(1)
fill unitsquare scaled 1in withcolor red;
endfig;
beginfig(2)
fill unitsquare scaled 1in withcolor green;
endfig;
end
======================================================================
-Sanjoy
`A society of sheep must in time beget a government of wolves.'
- Bertrand de Jouvenal
More information about the ntg-context
mailing list