From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/117211 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Keith McKay via ntg-context Newsgroups: gmane.comp.tex.context Subject: Absolute positioning of \startcombination... \stopcombination Date: Thu, 16 Mar 2023 16:59:08 +0000 Message-ID: <31725561-7e98-c964-0637-4883ad234351@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0022928240477038507==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7087"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Cc: Keith McKay To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 16 17:59:30 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 1pcqwr-0001e4-S3 for gctc-ntg-context-518@m.gmane-mx.org; Thu, 16 Mar 2023 17:59:29 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D388F380A1C; Thu, 16 Mar 2023 17:59:15 +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 HLLYl9juPdNi; Thu, 16 Mar 2023 17:59:14 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 90E8C380A3E; Thu, 16 Mar 2023 17:59:14 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id EE77D380A3E for ; Thu, 16 Mar 2023 17:59:12 +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 fh1U6dk8O9PN for ; Thu, 16 Mar 2023 17:59:11 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.128.52; helo=mail-wm1-f52.google.com; envelope-from=mckaymeister@gmail.com; receiver= Original-Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 E3B67380A1C for ; Thu, 16 Mar 2023 17:59:10 +0100 (CET) Original-Received: by mail-wm1-f52.google.com with SMTP id ip21-20020a05600ca69500b003ed56690948so1523536wmb.1 for ; Thu, 16 Mar 2023 09:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678985949; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=hhp/fWZKWIDBVdc6Yh1PWHOsH4eIuFoL06N6Mlvar/g=; b=TRjx1JnJk9RBtulwoap4XO1dU8coaZd46YREIAFQVaSzqqTcWQRMlo70CJWnm1O14f FzkumPZbeSCq/MVabVzPeKqqtbnsS8RmejOIef/gqgom/W0W3pvIZhuyMEm9TSBQSDwj xXQFshnIQO0LQN14yFRzJcemDsojYKqaayVi3NJyH746iVC6WVO5KlW5KsyjOurFgyLb u+WnySmMIlfBCNs6orA12jOIzDepM5OULWGozE2A7CW2sKQyjH3ItxkMIvLjiyVFSFvY eKnhR7ftLtydtjEX9JJfxkyUODWOgAaFjsV+Czw4PdB7P6ExOmJsF7QAVHRrYKfTV6Yi HbfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678985949; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hhp/fWZKWIDBVdc6Yh1PWHOsH4eIuFoL06N6Mlvar/g=; b=RvqhdRDzXTQVa5HQ4cSFcJxM4mmYIcXe3AW2gv0Aa0mLyJDLh5NJe5cCwcamWdgx2Q Cl/Ev2r6Edop6VURhZLmCU0/PM5DmD7Kn0jaGwgya+CR7QLzhAPKQ14omvt381vrOyTD Ve1GtSttInd14PNvU2HSVNN0HV1+MK3eoLlF2viqvMcMFpFoGTOtZfdEj/NE1TtA+U1C nTPSTkI+/09Nj7Tv0xxx/GbJpBAml/mXc5MwFQQX3bWEfty6tf1ljukryGnuyx9Uc4Ts eWtnCQqf2Pvzx1Y9bVZgsp+ucbcCrztL8sfGxJ/vGzr1TBX9vlcG0iuE2buVTy2/nx3q 6GFg== X-Gm-Message-State: AO0yUKWsk3KQ96n7+YSoRFgHtVYyLLbS9ey7CIWb65tRkW3tcJOqHCki niJPo93me5KKG6LOR2AdSFsT0VEmfmY= X-Google-Smtp-Source: AK7set+BYZPo6/No6CEGVqfrERJItXZmZHdCJ62Z1OTKobvj2Hfz5sDfOIuBJtCkdm9AGjkiKLX8Kg== X-Received: by 2002:a05:600c:3d95:b0:3eb:5990:aea4 with SMTP id bi21-20020a05600c3d9500b003eb5990aea4mr56609wmb.12.1678985949475; Thu, 16 Mar 2023 09:59:09 -0700 (PDT) Original-Received: from [192.168.0.33] (cpc100956-uddi29-2-0-cust81.20-3.cable.virginm.net. [82.45.75.82]) by smtp.gmail.com with ESMTPSA id k6-20020a05600c1c8600b003e209b45f6bsm5983139wms.29.2023.03.16.09.59.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Mar 2023 09:59:08 -0700 (PDT) Content-Language: en-GB 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:117211 Archived-At: This is a multi-part message in MIME format. --===============0022928240477038507== Content-Type: multipart/alternative; boundary="------------YPJGUSjtH0Qgz9Ue2pkr3Ir0" Content-Language: en-GB This is a multi-part message in MIME format. --------------YPJGUSjtH0Qgz9Ue2pkr3Ir0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------YPJGUSjtH0Qgz9Ue2pkr3Ir0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

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

--------------YPJGUSjtH0Qgz9Ue2pkr3Ir0-- --===============0022928240477038507== 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== --===============0022928240477038507==--