From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/117217 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Keith McKay via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Absolute positioning of \startcombination... \stopcombination Date: Thu, 16 Mar 2023 19:50:12 +0000 Message-ID: References: <31725561-7e98-c964-0637-4883ad234351@gmail.com> <20230316120712.2eeaa7fc@boo.my.domain> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4261732976345952367==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21633"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Keith McKay , Wolfgang Schuster via ntg-context To: Alan Braslau Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 16 20:51:01 2023 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pctcr-0005Om-CI for gctc-ntg-context-518@m.gmane-mx.org; Thu, 16 Mar 2023 20:51:01 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 48E79380AFE; Thu, 16 Mar 2023 20:50:35 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zNabngi_NYhJ; Thu, 16 Mar 2023 20:50:33 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 70B28380B03; Thu, 16 Mar 2023 20:50:33 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6194D380AFE for ; Thu, 16 Mar 2023 20:50:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LgMFs5_gW4qc for ; Thu, 16 Mar 2023 20:50:30 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.167.42; helo=mail-lf1-f42.google.com; envelope-from=mckaymeister@gmail.com; receiver= Original-Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 0A4A1380A7A for ; Thu, 16 Mar 2023 20:50:29 +0100 (CET) Original-Received: by mail-lf1-f42.google.com with SMTP id br6so3759622lfb.11 for ; Thu, 16 Mar 2023 12:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678996229; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qncJxAuOw06ZI36Fi+Pya+TI2wCDW+2bUZDejVLDEx0=; b=SXmwcFK008sRQRD4ymPdiQLpCVrUsjbLD3f5XE2M/apNjGGFJ12wDO7iplo25k7BRz tnLlVKfZhvZClEUCUAhsS35mpin30KUoFnS8yW3Iv9O6zZpN5KH9jdlD9K3xXFbCKkjE h8vUNduhmhGiAX7HmyD9Tc72FCQZPTgEu7qlVZVyh7W5VATVfMc8yZUSPfNyWr4V7zH0 GwD+sVlRLQbqjTF5vRRYXz2y1XR8VJZ1iUinq4+Cidef8HxkcLWm+gYRMsPN/pDz5mua poSZQGQcOtd5CAg50ZDBeT20WUwbUwq/GGBAnMJeS/pHG6LI1cW2kHBb3OIVrp/aH3LM Q6Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678996229; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qncJxAuOw06ZI36Fi+Pya+TI2wCDW+2bUZDejVLDEx0=; b=mGDevjoR5jOkziGaSJ31IU0OIp+ZEWwSTuOU0Y97STP2IQ9SFARb7cCXpRVKP/1UrW 9XpcxlcrFTQQ579IXUxDLuVp1IglSYm61mxEvlfAkBqxPxEjuSBbvaKOOrqAAdTO31s/ zGaqoF23glBJzILNhecQ+bWWurArT/1CFJWzBdmyEwxJY4V7sf1F8AphuZWJHVCXOawe qpn6iX5QRt0r9TWvQly93szHBJop116usKLHVRWGZRR1hGaG6hcZF+GBfDdAJ7TQB3aE k1CnswhG6g99G0dXBCm+AKXhvfTZun3JOwhrsUQsg/L/tMu+2cZBKwTFzOuyTRTOV5mJ /KbA== X-Gm-Message-State: AO0yUKUdClU7UKfAJoqoQ4r6ZKfPUU5OwkB3OL0mtwkEL1cu9Lhjljow oyErQervkIgtRkbDt5Mf49FM5Ieg5VkrLq7oFxA= X-Google-Smtp-Source: AK7set+os9tFkfUC5sLoR/hpeti86TFLIh2cEeTCggF4KpcBplku0nT+50k66XxWQENhW5D3hTbEpWDm4EM4DwTSCVQ= X-Received: by 2002:ac2:46c8:0:b0:4d5:ca32:6ed8 with SMTP id p8-20020ac246c8000000b004d5ca326ed8mr191118lfo.6.1678996229126; Thu, 16 Mar 2023 12:50:29 -0700 (PDT) In-Reply-To: <20230316120712.2eeaa7fc@boo.my.domain> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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" Xref: news.gmane.io gmane.comp.tex.context:117217 Archived-At: --===============4261732976345952367== Content-Type: multipart/alternative; boundary="000000000000d0fe1505f709c545" --000000000000d0fe1505f709c545 Content-Type: text/plain; charset="UTF-8" Thanks Wolfgang and Alan! I will experiment with them tomorrow. Best Wishes Keith McKay On Thu, 16 Mar 2023, 18:07 Alan Braslau, wrote: > On Thu, 16 Mar 2023 18:27:53 +0100 > Wolfgang Schuster via ntg-context wrote: > > > Keith McKay via ntg-context schrieb am 16.03.2023 um 17:59: > > > > > > Hi, > > > > > > I would like to position a combination of images where the centre > > > of the combination coincides with the centre of the text area of a > > > page. In the example below I have made the combination into a layer > > > thinking that this would be the easiest way to position it where I > > > wanted. However to position in the centre of the page I would need > > > to know the size of the combination and use this to calculate the x > > > and y values for positioning of the layer. I have looked at the > > > Wiki page on image size of combinations but still cant figure out > > > how to do it. Any suggestions on how to go about this or is their a > > > better way? > > > > > > Wiki Page reference: > > > https://wiki.contextgarden.net/Combinations#Image_Width > > > > > > Thanks > > > > > > Keith McKay > > > > > > %%% example %%% > > > > > > \setuppapersize[A4,portrait]%[A4,portrait] > > > > > > \setuplayout > > > > > > [backspace=2.5cm, > > > > > > topspace=1cm, > > > > > > height=28cm, > > > > > > width=17cm, > > > > > > header=0cm, > > > > > > footer=0.75cm, > > > > > > ] > > > > > > \useMPlibrary [dum] > > > > > > \starttext > > > > > > \definelayer[test3] > > > > > > \setlayer[test3][x=2cm,y=15cm] > > > > > > {\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle] > > > > > > {\externalfigure[dummy]}{} > > > > > > \rotate[rotation=90]{\externalfigure[dummy]}{} > > > > > > {\externalfigure[dummy][]}{} > > > > > > \stopcombination} > > > > > > \flushlayer[test3] > > > > > > \stoptext > > > > > > > \useMPlibrary [dum] > > > > \showframe [text] [text] > > > > \setuplayout [tight] > > > > \starttext > > > > \centerbox > > {\bTABLE[frame=off,offset=7.5mm,align={middle,lohi}] > > \bTR > > \bTD > > \externalfigure[dummy] > > \eTD > > \bTD > > \rotate[rotation=90]{\externalfigure[dummy]} > > \eTD > > \bTD > > \externalfigure[dummy] > > \eTD > > \eTR > > \eTABLE} > > > > \stoptext > > > > Wolfgang > > Or you could put the combination in a frame: > > \startparagraph [align=middle] > \startframed [frame=off,offset=\zeropoint] > \startcombination [nx=3,ny=1] > {first} {} > {second}{} > {third} {} > \stopcombination > \stopframed > \stopparagraph > > Alan > --000000000000d0fe1505f709c545 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks Wolfgang and Alan! I will experiment with the= m tomorrow.
Best Wishes
Keith McKay= =C2=A0


On Thu, 16 Mar 2023, 18:07 Alan Braslau, <alan.braslau@icloud.com> wrote:
On Thu, 16 Mar 2023 18:27:53 +0100
Wolfgang Schuster via ntg-context <ntg-context@ntg.nl> wrote:

> Keith McKay via ntg-context schrieb am 16.03.2023 um 17:59:
> >
> > Hi,
> >
> > I would like to position a combination of images where the centre=
> > of the combination coincides with the centre of the text area of = a
> > page. In the example below I have made the combination into a lay= er
> > thinking that this would be the easiest way to position it where = I
> > wanted. However to position in the centre of the page I would nee= d
> > to know the size of the combination and use this to calculate the= x
> > and y values for positioning of the layer. I have looked at the > > Wiki page on image size of combinations but still cant figure out=
> > how to do it. Any suggestions on how to go about this or is their= a
> > better way?
> >
> > Wiki Page reference:
> > https://wiki.contextgard= en.net/Combinations#Image_Width
> >
> > Thanks
> >
> > Keith McKay
> >
> > %%% example %%%
> >
> > \setuppapersize[A4,portrait]%[A4,portrait]
> >
> > \setuplayout
> >
> > [backspace=3D2.5cm,
> >
> > topspace=3D1cm,
> >
> > height=3D28cm,
> >
> > width=3D17cm,
> >
> > header=3D0cm,
> >
> > footer=3D0.75cm,
> >
> > ]
> >
> > \useMPlibrary [dum]
> >
> > \starttext
> >
> > \definelayer[test3]
> >
> > \setlayer[test3][x=3D2cm,y=3D15cm]
> >
> > {\startcombination[nx=3D3,ny=3D1,distance=3D15mm,after=3D,locatio= n=3Dmiddle]
> >
> > {\externalfigure[dummy]}{}
> >
> > \rotate[rotation=3D90]{\externalfigure[dummy]}{}
> >
> > {\externalfigure[dummy][]}{}
> >
> > \stopcombination}
> >
> > \flushlayer[test3]
> >
> > \stoptext
> >=C2=A0
>
> \useMPlibrary [dum]
>
> \showframe [text] [text]
>
> \setuplayout [tight]
>
> \starttext
>
> \centerbox
>=C2=A0 =C2=A0=C2=A0 {\bTABLE[frame=3Doff,offset=3D7.5mm,align=3D{middle= ,lohi}]
>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \bTR
>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 \bTD
>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 \externalfigure[dummy]
>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 \eTD
>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 \bTD
>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 \rotate[rotation=3D90]{\externalfigure[dummy]}<= br> >=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 \eTD
>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 \bTD
>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 \externalfigure[dummy]
>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 \eTD
>=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \eTR
>=C2=A0 =C2=A0=C2=A0=C2=A0 \eTABLE}
>
> \stoptext
>
> Wolfgang

Or you could put the combination in a frame:

\startparagraph [align=3Dmiddle]
=C2=A0 \startframed [frame=3Doff,offset=3D\zeropoint]
=C2=A0 =C2=A0 \startcombination [nx=3D3,ny=3D1]
=C2=A0 =C2=A0 =C2=A0 {first} {}
=C2=A0 =C2=A0 =C2=A0 {second}{}
=C2=A0 =C2=A0 =C2=A0 {third} {}
=C2=A0 =C2=A0 \stopcombination
=C2=A0 \stopframed
\stopparagraph

Alan
--000000000000d0fe1505f709c545-- --===============4261732976345952367== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cHM6Ly93d3cubnRnLm5sL21haWxtYW4v bGlzdGluZm8vbnRnLWNvbnRleHQKd2VicGFnZSAgOiBodHRwczovL3d3dy5wcmFnbWEtYWRlLm5s IC8gaHR0cDovL2NvbnRleHQuYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHBzOi8vYml0YnVja2V0 Lm9yZy9waGcvY29udGV4dC1taXJyb3IvY29tbWl0cy8Kd2lraSAgICAgOiBodHRwczovL2NvbnRl eHRnYXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============4261732976345952367==--