[NTG-context] simple usage of \hpos

Peter Münster pmlists at free.fr
Sun Feb 7 15:26:31 CET 2010

On Sun, Feb 07 2010, Wolfgang Schuster wrote:

> Remove the 'position=yes' setup and correct the coordinates, layers use the 
> top left corner as origin but positions are measures from the left bottom 
> corner.

Ah, now I see, why the graphics was at the bottom before.

Thank you very much!

Here an example to show how I use it:

  \getparameters[PAA][dx=0pt, dy=0pt, #1]%
    x=\the\dimexpr\MPx{#2} - 0.5\wd\scratchbox\relax,
    dx=\PAAdx, dy=\PAAdy]{#3}}

Place something exactly 2cm left from he\xypos{XXX}re.

Place something exactly 1 line below he\xypos{YYY}re.

Place something exactly he\xypos{ZZZ}re.

\PlaceAtPos[dx=-2cm]{XXX}{\red something}           \FlushStep
\PlaceAtPos[dy=\lineheight]{YYY}{\green something}  \FlushStep
\PlaceAtPos{ZZZ}{\blue something}                   \FlushStep

Cheers, Peter

Contact information: http://pmrb.free.fr/contact/

More information about the ntg-context mailing list