# [NTG-context] margin text

Robert Blackstone blackstone.robert at gmail.com
Fri Mar 26 09:56:16 CET 2010

```Thu, 25 Mar 2010 13:26:19 +0100 luigi scarso <luigi.scarso at gmail.com> wrote:

> <blackstone.robert at gmail.com> wrote:
>> What should I do to get the page in the middle of the paper so to
>> speak, instead of shifted to the left, which happens with
>> \setuplayout[location=middle]?? I tried specifying leftedgewidth but
>> that does not change anything.
> hm, strange, try
>
> \setuppapersize[A4][A3]
> \setuplayout[location=middle,
>             backspace=23mm,
>             margin=15mm,margindistance=3mm,
>             width=fit,
>             ]
> \setupinmargin[left][align=left,foregroundcolor=red]
> \setupinmargin[right][align=right,foregroundcolor=blue]
> \showlayout
> \starttext
.....
> --
> luigi

Thank you, Luigi.
This code gives a nice result with the page sitting neatly centered on
the paper.

However, when I increase the margin width to 25mm all gets shifted to
the left. Both margins get 25 width, the right margin stays within the
boundaries of the A4 paper, the left one is pushed outside. One would
have expected that with width=fit, the increase of marginwidth would
go at the expense of textwidth and that location=middle will still
dictate the overall position.
But no, it does not work that way apparently. Setting  margin=20mm is
about the limit. Even setting textwidth to a small size, for example
10 cm, does not work to keep the page inside the paper. The extra
white space all shows up at the right side as an enormously wide
rightedge while the left margin is still partly outside the paper. In
other words: location=middle does not work.
Strange indeed.