From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/88008 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Placing (numbered) figures side-by-side Date: Fri, 4 Jul 2014 17:53:31 +0200 Message-ID: <66923A93-AC75-4A5D-A3CF-C63CA0BA5215@gmail.com> References: <7818A4DB-6A52-4FF6-A863-59015F912E98@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/mixed; boundary="===============0350857741==" X-Trace: ger.gmane.org 1404489244 30509 80.91.229.3 (4 Jul 2014 15:54:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Jul 2014 15:54:04 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jul 04 17:53:58 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 1X35oC-0006YO-CJ for gctc-ntg-context-518@m.gmane.org; Fri, 04 Jul 2014 17:53:56 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A4B5910206 for ; Fri, 4 Jul 2014 17:53:55 +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 Q5xDw+NQ6lR6 for ; Fri, 4 Jul 2014 17:53:55 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 0ADAD10225 for ; Fri, 4 Jul 2014 17:53:47 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 800EB101EA for ; Fri, 4 Jul 2014 17:53:43 +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 JE3ZIL-jmKno for ; Fri, 4 Jul 2014 17:53:41 +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 E9F7C101E7 for ; Fri, 4 Jul 2014 17:53:35 +0200 (CEST) Original-Received: from mail-we0-x234.google.com (mail-we0-x234.google.com [IPv6:2a00:1450:400c:c03::234]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s64FrYvK013274 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 4 Jul 2014 17:53:34 +0200 Original-Received: by mail-we0-f180.google.com with SMTP id x48so1852947wes.11 for ; Fri, 04 Jul 2014 08:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=zMmZHDggnHCjAmQqtfFwr0WtJLOwO6NldneiC3cv/eo=; b=OTtTq5A2x6/K3Yubq6oFKJOxGsLgHVq2ik/GhNOXZyDtNSnSchvwFETNIHy1m7Alcj lCTY6WkpX42mvcXjXxW0kqRBPczjqAD1GM5YL9TMGmCPSXFIUiiH+NpYSg7cwy98nusl UdT9GVrPsJzYWNdLUeT2NgHjeWAnz+uRxsaZqVMxxCrJjEkUFyjOASitYxGnHW31HjGQ FeaJjzQUAkdzHLpdpzIzRafAf78Exgi1pRfCqaU45JFYWwIrWMlcKDEa7Ov6JQjtl0Cf WVFPsLHbvpqQoWBGMvIASbzemG9UojG9NO8gLR7OoQmL1MszhUW4rFIc8TpvnYLeBIFG 0G+Q== X-Received: by 10.180.84.7 with SMTP id u7mr57988626wiy.1.1404489213986; Fri, 04 Jul 2014 08:53:33 -0700 (PDT) Original-Received: from keima.localdomain (x2f310cc.dyn.telefonica.de. [2.243.16.204]) by mx.google.com with ESMTPSA id ev9sm80543583wic.24.2014.07.04.08.53.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Jul 2014 08:53:33 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1878.6) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c03::234; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VMmfRyJ4 - efd44ec17e85 - 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:88008 Archived-At: --===============0350857741== Content-Type: multipart/alternative; boundary="Apple-Mail=_DE59AB46-2D05-4978-9CFB-E30AA75FE759" --Apple-Mail=_DE59AB46-2D05-4978-9CFB-E30AA75FE759 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Am 04.07.2014 um 17:31 schrieb Mojca Miklavec = : > On Fri, Jul 4, 2014 at 4:13 PM, Wolfgang Schuster > wrote: >>=20 >> Am 04.07.2014 um 10:21 schrieb Mojca Miklavec = : >>=20 >>> Hi, >>>=20 >>> When placing figures side-by-side I usually use >>>=20 >>> \placefigure[force][label]{}{\startcombination[2*1] >>> {\externalfigure[A]}{Some description of A} >>> {\externalfigure[B]}{Some description of B} >>> \stopcombination} >>>=20 >>> But this time I would like to get two separate figures with two = separate titles: >>>=20 >>> [figure] [figure] >>> Figure 1.1: Long description of A Figure 1.2: Long description of = B >>>=20 >>> with those long descriptions being "justified" (they split in = multiple >>> line already), not centered. >>>=20 >>> What is the best way to achieve that? >>=20 >> Use the floatcombination environment. >>=20 >> \useMPlibrary[dum] >>=20 >> \starttext >>=20 >> \startplacefigure[location=3Dnonumber] >> \startfloatcombination%[width=3D\textwidth,distance=3D0pt] >> \startplacefigure[title=3D{Some description of A}] >> %\externalfigure[A][width=3D4cm] >> = \framed[frame=3Doff,offset=3Dnone,width=3D.5\textwidth]{\externalfigure[A]= [width=3D4cm]} >> \stopplacefigure >> \startplacefigure[title=3D{Some description of B}] >> %\externalfigure[B][width=3D4cm] >> = \framed[frame=3Doff,offset=3Dnone,width=3D.5\textwidth]{\externalfigure[B]= [width=3D4cm]} >> \stopplacefigure >> \stopfloatcombination >> \stopplacefigure >>=20 >> \stoptext >=20 > 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: >=20 > - titles are wider than the figure, so titles from left and right > overlap; what I ended up doing was > = \framed[frame=3Doff,offset=3Dnone,width=3D.2\textwidth]{\externalfigure[co= w][width=3D.4\textwidth]} >=20 > - 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; >=20 > - width=3D... and distance=3D... 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=3Dnonumber] \setupcaption[figure][width=3Dmax] \startfloatcombination[location=3Dtop] \startplacefigure[title=3D{Some description of A which = spans multiple lines}] \externalfigure[A][width=3D4cm] = %\framed[frame=3Doff,offset=3Dnone,width=3D.5\textwidth]{\externalfigure[A= ][width=3D4cm]} \stopplacefigure \startplacefigure[title=3D{Some description of B}] \externalfigure[B][width=3D4cm] = %\framed[frame=3Doff,offset=3Dnone,width=3D.5\textwidth]{\externalfigure[B= ][width=3D4cm]} \stopplacefigure \stopfloatcombination \stopplacefigure \stoptext Wolfgang= --Apple-Mail=_DE59AB46-2D05-4978-9CFB-E30AA75FE759 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
Am 04.07.2014 um 17:31 schrieb Mojca = Miklavec <mojca.miklavec.lists@gmail.= com>:

On Fri, Jul 4, 2014 at 4:13 PM, = Wolfgang Schuster
<schuster.wolfgang@gmail.com> wrote:

Am 04.07.2014 um 10:21 = schrieb Mojca Miklavec <
mojca.miklavec.lists@gmail.= com>:

Hi,

When placing = figures side-by-side I usually = use

\placefigure[force][label]{}{\startcombination[2*1]
{\extern= alfigure[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] =             &n= bsp;           &nbs= p;  [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

\startplac= efigure[location=3Dnonumber]
       = \startfloatcombination%[width=3D\textwidth,distance=3D0pt]
  =             &n= bsp;\startplacefigure[title=3D{Some description of = A}]
           &= nbsp;           %\e= xternalfigure[A][width=3D4cm]
       = ;            &= nbsp;   \framed[frame=3Doff,offset=3Dnone,width=3D.5\textwi= dth]{\externalfigure[A][width=3D4cm]}
     &nb= sp;         \stopplacefigure<= br>            = ;   \startplacefigure[title=3D{Some description of = B}]
           &= nbsp;           %\e= xternalfigure[B][width=3D4cm]
       = ;            &= nbsp;   \framed[frame=3Doff,offset=3Dnone,width=3D.5\textwi= dth]{\externalfigure[B][width=3D4cm]}
     &nb= sp;         \stopplacefigure<= br>       \stopfloatcombination
\sto= pplacefigure

\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=3Doff,offset=3Dnone,width=3D.2\text= width]{\externalfigure[cow][width=3D.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=3D... and distance=3D... 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=3Dnonumbe= r]
= \setupcaption[figure][width=3Dmax]
= \startfloatcombination[location=3Dtop]
= \startplacefigure[title=3D{Some description of A which spans = multiple lines}]
= \externalfigure[A][width=3D4cm]
= %\framed[frame=3Doff,offset=3Dnone,width=3D.5\textwidth]{\externalf= igure[A][width=3D4cm]}
= \stopplacefigure
= \startplacefigure[title=3D{Some description of = B}]
= \externalfigure[B][width=3D4cm]
= %\framed[frame=3Doff,offset=3Dnone,width=3D.5\textwidth]{\externalf= igure[B][width=3D4cm]}
= \stopplacefigure
= \stopfloatcombination
\stopplacefigure

\stoptext

Wolfgang
= --Apple-Mail=_DE59AB46-2D05-4978-9CFB-E30AA75FE759-- --===============0350857741== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0350857741==--