From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/88009 Path: news.gmane.org!not-for-mail From: Mojca Miklavec Newsgroups: gmane.comp.tex.context Subject: Re: Placing (numbered) figures side-by-side Date: Fri, 4 Jul 2014 18:05:30 +0200 Message-ID: References: <7818A4DB-6A52-4FF6-A863-59015F912E98@gmail.com> <66923A93-AC75-4A5D-A3CF-C63CA0BA5215@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1404489958 6822 80.91.229.3 (4 Jul 2014 16:05:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Jul 2014 16:05:58 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jul 04 18:05:51 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X35zi-0003Nb-J7 for gctc-ntg-context-518@m.gmane.org; Fri, 04 Jul 2014 18:05:50 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2C44D10298 for ; Fri, 4 Jul 2014 18:05:50 +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 b41SOpbXvHNt for ; Fri, 4 Jul 2014 18:05:50 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 40ABD10224 for ; Fri, 4 Jul 2014 18:05:42 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9DF1E101EA for ; Fri, 4 Jul 2014 18:05:39 +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 Uf7H-yN3qQ4w for ; Fri, 4 Jul 2014 18:05:37 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 0C123101E7 for ; Fri, 4 Jul 2014 18:05:31 +0200 (CEST) Original-Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s64G5Stg021671 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 4 Jul 2014 18:05:28 +0200 Original-Received: by mail-wi0-f174.google.com with SMTP id bs8so13288642wib.13 for ; Fri, 04 Jul 2014 09:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=yHHwBeWtY0tl4cAcq8TH2CgsfUTyg6DSfbhJyt96/Bo=; b=QZ3cghN67AAt+eVtlCP+Y2So+omKgdDFW5vU9P5S3UD/AkuN5nljv+uNHFXU6ucsH3 hO5q0gBZBMVum2Xnt7LzLKZzHp+6Vq7dxkOJywh6yOagNFjABf6jaF3oUN9IjZmq5bc6 i+KIJzHTyCPyIIXXkskKwZABp3IF8eKT8i87QXCQiooK6cy8+HJfnXVngyhEOXKGCdc+ mfcTNsWkWoY+hnju1Oj2HFdNIssaiVmnz+yKwb9bnyhlQblB9cTB7GpoH/P53j7WLPdk 9AktnhIG5quIUy8x8Ceff+lRAjMCUnrdyKbKAjlOL10YM46PNp43sS/zCelyehrOUtWd 9XSw== X-Received: by 10.194.234.42 with SMTP id ub10mr13448767wjc.42.1404489930534; Fri, 04 Jul 2014 09:05:30 -0700 (PDT) Original-Received: by 10.217.4.69 with HTTP; Fri, 4 Jul 2014 09:05:30 -0700 (PDT) In-Reply-To: <66923A93-AC75-4A5D-A3CF-C63CA0BA5215@gmail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c05::22e; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07Mmg5smH - 919439e084d8 - 20140704 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:88009 Archived-At: On Fri, Jul 4, 2014 at 5:53 PM, Wolfgang Schuster wrote: > Am 04.07.2014 um 17:31 schrieb Mojca Miklavec: > On Fri, Jul 4, 2014 at 4:13 PM, Wolfgang Schuster wrote: > Am 04.07.2014 um 10:21 schrieb Mojca Miklavec: > > Hi, > > When placing figures side-by-side I usually use > > \placefigure[force][label]{}{\startcombination[2*1] > {\externalfigure[A]}{Some description of A} > {\externalfigure[B]}{Some description of B} > \stopcombination} > > But this time I would like to get two separate figures with two separate > titles: > > [figure] [figure] > Figure 1.1: Long description of A Figure 1.2: Long description of B > > with those long descriptions being "justified" (they split in multiple > line already), not centered. > > What is the best way to achieve that? > > > Use the floatcombination environment. > > \useMPlibrary[dum] > > \starttext > > \startplacefigure[location=nonumber] > \startfloatcombination%[width=\textwidth,distance=0pt] > \startplacefigure[title={Some description of A}] > %\externalfigure[A][width=4cm] > > \framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[A][width=4cm]} > \stopplacefigure > \startplacefigure[title={Some description of B}] > %\externalfigure[B][width=4cm] > > \framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[B][width=4cm]} > \stopplacefigure > \stopfloatcombination > \stopplacefigure > > \stoptext > > > Thank you, but there are some serious problems with the layout. I > managed to find some very dirty workaround, so I can get the desired > effect, but nonetheless: > > - titles are wider than the figure, so titles from left and right > overlap; what I ended up doing was > > \framed[frame=off,offset=none,width=.2\textwidth]{\externalfigure[cow][width=.4\textwidth]} > > - titles are of different length (and have a different number of > lines), so I need to manually add \crlf in one of the titles to > achieve equal height and proper alignment; > > - width=... and distance=... are weird; once I set some width, > distance only shifts the right figure outside of the page margin > > > The caption can be forced to the same width as the image with the > \setupcaption command, > the vertical alignment of the images/text can be controlled with the > location key but you have > to ensure both images have the same height. > > \useMPlibrary[dum] > > \starttext > > \startplacefigure[location=nonumber] > \setupcaption[figure][width=max] > \startfloatcombination[location=top] > \startplacefigure[title={Some description of A which spans multiple lines}] > \externalfigure[A][width=4cm] > %\framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[A][width=4cm]} > \stopplacefigure > \startplacefigure[title={Some description of B}] > \externalfigure[B][width=4cm] > %\framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[B][width=4cm]} > \stopplacefigure > \stopfloatcombination > \stopplacefigure > > \stoptext Perfect. \setupcaption[figure][width=max] or \setupcaption[figure][width=.4\textwidth] does exactly what I want. My figures are of the same height, so "location=top" is OK. (Can one combine "location=top" with "[3*1]"?) Even though a much nicer option would be to top-align the captions and vertically center the images (or provide a location= option separately for the image). The workaround to use \framed around the image probably works though ... Thank you, Mojca ___________________________________________________________________________________ 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 ___________________________________________________________________________________