[NTG-context] Absolute positioning of \startcombination... \stopcombination

Pablo Rodriguez oinos at gmx.es
Thu Mar 16 18:58:26 CET 2023


On 3/16/23 17:59, Keith McKay via ntg-context wrote:
> 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.

Hi Keith,

I think the following sample might achieve what you want:

  \showframe
  \setupexternalfigures[location={default}]
  \setuplayout
    [backspace=2.5cm,
    topspace=1cm,
    height=28cm,
    width=17cm,
    header=0cm,
    footer=0.75cm,
    ]
  \definelayer[test3]
  %[x=.5\paperwidth, y=.5\paperheight]
  [x=.5\textwidth, y=.5\textheight]
  %\setupbackgrounds[page]
  \setupbackgrounds[text]
  [background=test3]
  \starttext
  \setlayer[test3][location={middle}]
     \framed[offset=overlay]{{\startcombination[nx=3,ny=1,distance=15mm]
            {\externalfigure[cow][width=15mm]}{}
            \rotate[rotation=90]{\externalfigure[cow][width=15mm]}{}
            {\externalfigure[cow][width=15mm]}{}
     \stopcombination}}
  \null
  \stoptext

BTW, A4 portrait is the default page size.

\setupbackgrounds is the standard way to place layers.

Page and text centering would require different positions (I have
commented out the option for page centering).

I hope it helps (since I’m not sure I’m getting your point here),

Pablo


More information about the ntg-context mailing list