From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/27167 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: placefigure feature request ? Date: Fri, 14 Apr 2006 10:52:41 +0200 Message-ID: <443F62D9.1010500@wxs.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1145004973 8096 80.91.229.2 (14 Apr 2006 08:56:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Apr 2006 08:56:13 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Apr 14 10:56:11 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1FUK63-0003XM-9q for gctc-ntg-context-518@m.gmane.org; Fri, 14 Apr 2006 10:56:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F099F127A3; Fri, 14 Apr 2006 10:56:06 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31943-02; Fri, 14 Apr 2006 10:56:06 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A619F127A5; Fri, 14 Apr 2006 10:52:41 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0A783127A5 for ; Fri, 14 Apr 2006 10:52:40 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31496-04-2 for ; Fri, 14 Apr 2006 10:52:39 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with SMTP id 1D25A127A3 for ; Fri, 14 Apr 2006 10:52:38 +0200 (CEST) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 12541 for ; Fri, 14 Apr 2006 12:52:38 +0400 User-Agent: Thunderbird 1.5 (Windows/20051201) Original-To: mailing list for ConTeXt users In-Reply-To: X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:27167 Archived-At: Sanjoy Mahajan wrote: >> [code for text key] >> \setupfloats[numbering=text] >> > > I included the code for numbering=text, to make the tex file below. > Sadly, the figures are numbered 3->1->2 (i.e. as if numbering=nocheck > were given). I also tried the context live and got the same order. Am > I doing something silly? > also redefine: \def\redofloatorder#1% {\doifnotinset\@@bknumbering{\v!nocheck,\v!text} {\doglobal\increment\nofplacedfloats\relax \gettwopassdata\s!float \iftwopassdatafound \doifnot\composedsectionnumber\twopassdata {\edef\oldcomposedsectionnumber{\composedsectionnumber}% \xdef\composedsectionnumber{\twopassdata}% \showmessage\m!floatblocks1{\nofplacedfloats,#1 \oldcomposedsectionnumber,\composedsectionnumber}}% \fi}} and the text options works as expected > -Sanjoy > > ====================================================================== > % first a new key > > \startconstants dutch english > german czech > italian romanian > french > > fallback: terugval fallback > fallback fallback > fallback fallback > fallback > \stopconstants > > % use that key > > \unprotect > > \long\def\dofloat#1#2#3#4% > {\dosetfloatbox{#1}{#2}{#3}{#4}% > \doifelsevaluenothing{\??fl#4\c!criterium} > {\dogetfloatbox{#1}\empty} > {\ifdim\wd\floatbox>\getvalue{\??fl#4\c!criterium}\relax > \postcenterfloatbox{\wd\floatbox}% else we get left aligned > %dogetfloatbox{#1}\v!here % see details/pascal > > \dogetfloatbox{#1}{\executeifdefined{\??fl#4\c!fallback}\v!here}% PATCHED > \else > \dogetfloatbox{#1}\empty > \fi}} > > % pass the new location (will be done differently, hack > > \def\dogetfloatbox#1#2% > {\ifvisible > \doifelsenothing{#2} > {\getfromcommalist[#1][1]% > \@EA\beforesplitstring\commalistelement\at:\to\floatmethod > \@EA\aftersplitstring \commalistelement\at:\to\floatcolumn > \@EA\aftersplitstring \floatcolumn\at*\to\floatrow > \@EA\beforesplitstring\floatcolumn\at*\to\floatcolumn > % todo: nog algemeen otr > \ifx\OTRSETsetpreferedcolumnslot\undefined\else > \OTRSETsetpreferedcolumnslot\floatcolumn\floatrow > \fi} > {\let\floatcolumn\empty > \let\floatrow\empty > \edef\floatmethod{#2}}% > \doifundefined{\string\floatmethod\floatmethod} > {\let\floatmethod\v!here}% > \getvalue{\string\floatmethod\floatmethod}[\floatmethod,#1]% PATCHED > \fi} > > \def\dofloatreference > {\doifnot\@@bknumbering\v!text > {\doglobal\increment\numberedfloat > \doifelse\@@bknumbering\v!text % alternative to yes|page > {\let\next\immediatewriteutilitycommand} > {\let\next\writeutilitycommand}% > \expanded{\next > {\noexpand\twopassentry > {\s!float}% > {\numberedfloat}% > {\composedsectionnumber}}}}} > > \protect > > \setupfloats[numbering=text] > > % we use the marginwidth as criterium > > \setupfloat[figure][criterium=\marginwidth,fallback=bottom] > > \starttext > > \placefigure[bottom]{1}{} \input tufte > \placefigure[left]{2}{} \input tufte > \placefigure[left]{3}{\framed[width=.9\marginwidth]{}} \input tufte > > \stoptext > ====================================================================== > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------