From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/71303 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Stefan_M=FCller?= Newsgroups: gmane.comp.tex.context Subject: Frame around float and its caption, how to? Date: Sun, 25 Sep 2011 18:10:40 +0200 Message-ID: <4E7F5280.4070003@gmx.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1316967084 10209 80.91.229.12 (25 Sep 2011 16:11:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 25 Sep 2011 16:11:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Sep 25 18:11:16 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R7rIR-0007Rg-Hc for gctc-ntg-context-518@m.gmane.org; Sun, 25 Sep 2011 18:11:15 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C372BCAFC9; Sun, 25 Sep 2011 18:11:14 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 0E6CJ4pp9lp4; Sun, 25 Sep 2011 18:11:14 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E55E0CAFC4; Sun, 25 Sep 2011 18:11:02 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 28389CAFC4 for ; Sun, 25 Sep 2011 18:11:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GNPwj+lgv+g3 for ; Sun, 25 Sep 2011 18:10:49 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id D78CFCAF37 for ; Sun, 25 Sep 2011 18:10:49 +0200 (CEST) Original-Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with SMTP id p8PGAmXo002587 for ; Sun, 25 Sep 2011 18:10:49 +0200 Original-Received: (qmail invoked by alias); 25 Sep 2011 16:10:48 -0000 Original-Received: from 77-64-189-59.dynamic.primacom.net (EHLO [192.168.100.108]) [77.64.189.59] by mail.gmx.net (mp022) with SMTP; 25 Sep 2011 18:10:48 +0200 X-Authenticated: #11064435 X-Provags-ID: V01U2FsdGVkX18NKL9IB2IN9OEj75l0Esxr0Ju2/N+gomoJMmILv+ 752/5mJOgZvcOA User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 X-Y-GMX-Trusted: 0 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.165.64.22; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05FB4aM7K - 9208cbb7bbf1 - 20110925 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.216 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:71303 Archived-At: Hi list, I'm using 201100920 00:09 MkIV standalone. Some time ago Marcin Borkowski asked [1] on this list about framing floats together with their captions. It seems to be unanswered and now I stumbled upon a similar problem. I want to have a figure with a caption together in a frame as wide as the surrounding text, aka \textwidth and the caption filling the available horizontal space. I.e. I want something like \setupcaption[width=\textwidth] \starttext \placefigure[here]{\input tufte}{\externalfigure[cow]} \stoptext with a frame around it. I see two approaches here and none of them gives me what I need. First using \setupfloat[frame=on] only frames the cow and not the caption. I think I can manually correct this with "framedepth" and "width" but doing something "manually" in ConTeXt seems not like a good idea. Am I overlooking something about \setupfloat? Secondly, I tried \framed{...} around \placefigure but there are two issues here: How do I setup the caption to fit nicely into the frame? "\setupcaption[width=\textwidth]" is to much because of the frame spacing... And there is another serious issue, see the following minimal example. The frame is where the figure was placed but is empty, because the figure floated to the next page. \setupcaption[width=max] \starttext \dorecurse{2}{\input tufte \par} \framed{\placefigure[here][fig:muh]{\input tufte}{\externalfigure[cow]}} \input tufte \stoptext I have no idea how to procede with this. Hopefully someone on this list knows how to do this right. Thanks in advance, Stefan. [1] http://archive.contextgarden.net/message/20090724.123610.ddad55af.en.html ___________________________________________________________________________________ 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 ___________________________________________________________________________________