[NTG-context] Meptapost Drawing not showing-up in Context Letter Style

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Mon Mar 11 21:55:15 CET 2019


Context NTG schrieb am 10.03.19 um 16:59:
> I am trying to get a metapost drawing as logo added to right upper 
> corner of a DIN B style letterhead, but it does not show up, just the 
> letter itself. Is there anything to change to the layers for the MP toe 
> reveal itself?

The letter module uses local settings for the page background to place 
all the layer for the header, footer etc. and your own background setup 
is overloaded by the module.


What you can do in this case is to use the predefined but unused 
lettermain layer to place your logo in the background.


\usemodule[letter][style=dinb]

\startuseMPgraphic{mpglogo}
   path p;
   p := (0,0)--(100,0)--(100,100)--(0,100)--cycle ;
   path q;
   q := p cornered 30pt;
   draw q withcolor black withpen pencircle scaled 7pt ;
\stopuseMPgraphic

\startsetups[letter:layer:lettermain]
   \scale[width=25mm,height=25mm]{\useMPgraphic{mpglogo}}
\stopsetups

\setupletterlayer
   [lettermain]
   [alternative=setups,
    x=160mm,
    y=17mm]

\startletter
\dorecurse{3}{\input knuth \par}
\stopletter


Another way to place content in the background is to use the “paper” (or 
“text”) background which isn’t used by the letter module and your 
settings won’t be overloaded.

Wolfgang


More information about the ntg-context mailing list