[NTG-context] simple usage of \hpos

Wolfgang Schuster schuster.wolfgang at googlemail.com
Sun Feb 7 15:56:54 CET 2010


Am 07.02.10 15:26, schrieb Peter Münster:

> \def\doPlaceAtPos[#1]#2#3{%
>    \getparameters[PAA][dx=0pt, dy=0pt, #1]%
>    \setbox\scratchbox\hbox{#3}%
>    \setlayer[myBG][%
>      x=\the\dimexpr\MPx{#2} - 0.5\wd\scratchbox\relax,
>      y=\the\dimexpr\paperheight-\MPy{#2}-\ht\scratchbox\relax,
>      dx=\PAAdx, dy=\PAAdy]{#3}}

\def\doPlaceAtPos[#1]#2%
   {\dowithnextbox
      {\setlayer
         [myBG]
         [x=\the\dimexpr\MPx{#2}-\nextboxwd/2\relax,
          y=\the\dimexpr\paperheight-\MPy{#2}-\nextboxht\relax,
          #1]
         {\flushnextbox}}
    \normalhbox}

Wolfgang


More information about the ntg-context mailing list