[NTG-context] Absolute positioning of \startcombination... \stopcombination
Wolfgang Schuster
wolfgang.schuster.lists at gmail.com
Thu Mar 16 18:27:53 CET 2023
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20230316/5b742367/attachment.htm>
More information about the ntg-context
mailing list