From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/28111 Path: news.gmane.org!not-for-mail From: Sanjoy Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: slithering captions Date: Mon, 22 May 2006 01:37:50 +0100 Message-ID: References: <4443565D.5070700@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 1148258291 31513 80.91.229.2 (22 May 2006 00:38:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 May 2006 00:38:11 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon May 22 02:38:07 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 1FhyQw-0006qm-NV for gctc-ntg-context-518@m.gmane.org; Mon, 22 May 2006 02:38:06 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BA5C3127D0; Mon, 22 May 2006 02:38:05 +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 15723-02; Mon, 22 May 2006 02:38:00 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DF719127C7; Mon, 22 May 2006 02:37:59 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A49A4127C7 for ; Mon, 22 May 2006 02:37:58 +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 15617-04 for ; Mon, 22 May 2006 02:37:57 +0200 (CEST) Original-Received: from ppsw-9.csi.cam.ac.uk (ppsw-9.csi.cam.ac.uk [131.111.8.139]) by ronja.ntg.nl (Postfix) with SMTP id 3522F127BC for ; Mon, 22 May 2006 02:37:56 +0200 (CEST) X-Cam-SpamDetails: Not scanned X-Cam-AntiVirus: No virus found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Original-Received: from [131.111.235.105] (port=59550 helo=approximate.corpus.cam.ac.uk) by ppsw-9.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.159]:25) with esmtps (TLSv1:AES256-SHA:256) id 1FhyQk-0000Xl-TV (Exim 4.54) (return-path ); Mon, 22 May 2006 01:37:54 +0100 Original-Received: from sanjoy by approximate.corpus.cam.ac.uk with local (Exim 4.61) (envelope-from ) id 1FhyQg-0006G1-Bo; Mon, 22 May 2006 01:37:50 +0100 Original-To: mailing list for ConTeXt users In-Reply-To: Your message of "Mon, 17 Apr 2006 10:48:29 +0200." <4443565D.5070700@wxs.nl> X-Mailer: MH-E 7.94; nmh 1.1; GNU Emacs 21.4.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:28111 Archived-At: From: Hans Hagen , Mon, 17 Apr 2006 10:48:29 +0200 >> [question about placing figures differently according to their widths] > best use closed floats and set their characteristics (see details.pdf) I haven't found closed floats in details.pdf, though it's teaching me much useful stuff about floats meanwhile. Are closed floats the ones attached to text (e.g. \placefigure[inmargin]), rather than ones that can move up and down? Though that's the opposite of floating. Mixing mixing inmargin and margin locations produces lots of collisions, I've found (an example is below). If TeX had a decent programming language, it might be possible to implement lots more float-position optimizations. The user could write: \placefigure[inmargin][someref]{}{\externalfigure[somefig.pdf]} In the diagram \attachto[someref] the long arrows mean blah and the short arrows mean blahblah... Then the optimizer would favor placing each margin figure with its top aligned to the top of the attachment point, but if it couldn't do that, it would move them up and down to minimize (say) the sum of the squared vertical offsets (using a larger penalty if the figure had to be postponed to the next page, and insert "(p. 27)" where \attachto[someref] is). The first pass can do greedy optimization on the fly, and subsequent runs could analyze the figure locations and their attachment points to find the best solution for a whole chapter. But it would be miserable to do all of that in a macro language (which are ghastly). Here is the collision example. As the doctor says when you say "It hurts when I do X": "So don't do that!" \starttext \dorecurse{6}{ We thrive in information-thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize, catalog, classify, \placefigure[inmargin]{A caption goes here} {\framed[height=1in,width=1.5in]{!}} list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, \placefigure[margin]{float} {\framed[height=1in,width=1.5in]{!}} outline, summarize, itemize, review, dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the chaff and separate the sheep from the goats. }