From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/27149 Path: news.gmane.org!not-for-mail From: Sanjoy Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: placefigure feature request ? Date: Thu, 13 Apr 2006 09:30:17 -0400 Message-ID: References: <443E0452.2080200@wxs.nl> 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 1144935146 7719 80.91.229.2 (13 Apr 2006 13:32:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 13 Apr 2006 13:32:26 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 13 15:32:24 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 1FU1vn-0005up-NL for gctc-ntg-context-518@m.gmane.org; Thu, 13 Apr 2006 15:32:19 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5BA9D127A1; Thu, 13 Apr 2006 15:32:19 +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 06058-04; Thu, 13 Apr 2006 15:32:19 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8AD8712797; Thu, 13 Apr 2006 15:30:31 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B820312797 for ; Thu, 13 Apr 2006 15:30:29 +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 05990-09 for ; Thu, 13 Apr 2006 15:30:28 +0200 (CEST) Original-Received: from elasmtp-kukur.atl.sa.earthlink.net (elasmtp-kukur.atl.sa.earthlink.net [209.86.89.65]) by ronja.ntg.nl (Postfix) with SMTP id CF4CE12793 for ; Thu, 13 Apr 2006 15:30:27 +0200 (CEST) Original-Received: from [24.41.6.91] (helo=approximate.corpus.cam.ac.uk) by elasmtp-kukur.atl.sa.earthlink.net with asmtp (TLSv1:AES256-SHA:256) (Exim 4.34) id 1FU1ty-0000rA-Gt; Thu, 13 Apr 2006 09:30:26 -0400 Original-Received: from sanjoy by approximate.corpus.cam.ac.uk with local (Exim 4.60) (envelope-from ) id 1FU1tp-0005wz-KJ; Thu, 13 Apr 2006 09:30:17 -0400 Original-To: mailing list for ConTeXt users In-Reply-To: Your message of "Thu, 13 Apr 2006 09:57:06 +0200." <443E0452.2080200@wxs.nl> X-Mailer: MH-E 7.93; nmh 1.1; GNU Emacs 21.4.1 X-ELNK-Trace: dcd19350f30646cc26f3bd1b5f75c9f474bf435c0eb9d47848d7ba2f7fbb8675e06711cb3d76ea942f6c6d60cc716232350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 24.41.6.91 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:27149 Archived-At: > [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? -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 ======================================================================