From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/103623 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jeroen Newsgroups: gmane.comp.tex.context Subject: Fwd: Meptapost Drawing not showing-up in Context Letter Style Date: Tue, 12 Mar 2019 22:17:48 +0000 Message-ID: References: <3204c3cd-1284-36a0-f389-05f01a8a2ebd@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6321890870731178252==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="192879"; mail-complaints-to="usenet@blaine.gmane.org" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Mar 12 23:16:50 2019 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1h3phY-000o2i-7O for gctc-ntg-context-518@m.gmane.org; Tue, 12 Mar 2019 23:16:48 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 04411FB90A; Tue, 12 Mar 2019 23:16:29 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rajmUMah9qsj; Tue, 12 Mar 2019 23:16:28 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3E7E4FB900; Tue, 12 Mar 2019 23:16:28 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4C939FB900 for ; Tue, 12 Mar 2019 23:16:27 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9pR8Yw76KzZk for ; Tue, 12 Mar 2019 23:16:26 +0100 (CET) Original-Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 727E6FB8FC for ; Tue, 12 Mar 2019 23:16:26 +0100 (CET) Original-Received: by mail-qt1-f169.google.com with SMTP id d16so4485645qtn.10 for ; Tue, 12 Mar 2019 15:16:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=30zkazN0H+PpT2ocY/rJYAND+PfLDPCq/h2YNqGKerQ=; b=bBxDWA01e3u9/5skklBDukPt2X1laSkyji4lpfp62Ft5V3vqnbjjL6eZx8DH7zlW/Q A3fVbZr8W+mjMUelRuiR8A8tdN4fWlqGuqK45kUThuHfF8hZ3B1slXz0Rg6k/xr5bFvK iebphJdDqNjXl7NXg0gWdTiS9r5hZpTeW0g4IwJagIEbBpy9XLTTA8ca8miIhl4op8Y0 G/hUEfkvtH9k+aMqMHew2ciZt/ceIluMD67TfxYq15ctIBZn/SMOW5Xi2iwyUZB2bxXZ hpffdtdYtoXXnVbOwr04eJ94zetwuAl3/UCJakNaF/wElF+f0lAvt//DbYJRwSONzN3H /jvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=30zkazN0H+PpT2ocY/rJYAND+PfLDPCq/h2YNqGKerQ=; b=mKV63AHgJN8ek1UtNCmR7OtK48jw8vj0jGvWWssxJ5cr4ac5HX+RF7jRUpTlb2h0DZ gSJUK7H4vNIFddvRIXK7cVmaqrbwh7h5YWpqkq4W5KtN4LE/oPPgQCCMfa1OqAiKegGn 88Wo3hSKTlJ6Kek9WJsjCP4GOz/sxQh6hqmodXhmL/Yu9g3ECT+It1CSv9IqxMzUYo+S vxwEYit9FMvvpJnCY+EYPvTQj/T5MMfNt6E1YAH3tWoto1cYvgIrLY9STwfyqbAzkEBv MI3K+VxqkTaMzoIlqrcuIpHUE3S6tTHl+INgSxXwj6Cuepo5Y6Tr5N0faRPULcUUa5pV b22g== X-Gm-Message-State: APjAAAX+TAFD3uW186BGjXwopaEc+4lP63RH5gzKTIkPLnrzcLO1UpnT 6ML8h/BSQbIKWCp58TQxuGfPnQWhWp9G9+oeu+iWbILw X-Google-Smtp-Source: APXvYqxo8Zr4FgkYvXrm4HxybFBhPozOWrIMH/G0inN/aLMUj1ompAq9ZHRC3VHZ9KuDGuOKAg2jJgLqCuY9u4c9udo= X-Received: by 2002:ad4:50c9:: with SMTP id e9mr12020973qvq.117.1552428984624; Tue, 12 Mar 2019 15:16:24 -0700 (PDT) In-Reply-To: <3204c3cd-1284-36a0-f389-05f01a8a2ebd@gmail.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:103623 Archived-At: --===============6321890870731178252== Content-Type: multipart/alternative; boundary="0000000000002ae8420583ed0a5d" --0000000000002ae8420583ed0a5d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Eventually, these two options worked. Firstly changing \setupbackgrounds % BEGIN MP LOGO SETUP \startuseMPgraphic{mpglogo} path p; p :=3D (0,0)--(100,0)--(100,100)--(0,100)--cycle; path q; q :=3D p cornered 30pt; draw q withcolor black withpen pencircle scaled 7pt; \stopuseMPgraphic \definelayer [logo] [repeat=3Dno] \setlayer [logo] [hoffset=3D160mm,voffset=3D17mm] {\scale[width=3D25mm,height=3D25mm]{\useMPgraphic{mpglogo}}} \setupbackgrounds[paper][background=3Dlogo] % END MP LOGO SETUP, BEGIN LETTER SETUP \usemodule [letter] [style=3Ddinb] \setupletterlayer [reference] [list=3D{name,phone,email,date}] \setupletterlayer [address] [y=3D55mm] \setupletterdescription [enclosure] [location=3Dtop, leftmargin=3D0.5em, symbol=3D#1,] \usesymbols [mvs] \definesymbol [1] [{\symbol[martinvogel 2][PointingHand]}] \setupletter [toname=3D{John Doe}, toaddress=3D{201, Main Street\\23124 London\\United Kingdom}, fromname=3D{Jansen NV}, fromaddress=3D{Waalhaven 2200\\2842 KL Rotterdam}, name=3D{Piet jansen}, phone=3D{+31(010)4234 4232}, email=3D{peter.jansen@gmail.com}, date=3D{\currentdate}, signature=3D{Pete},] % END LETTER SETUP, START LETTER \startletter [subject=3D{Outstanding Invoices}, opening=3D{Dear Sir,}, closing=3D{Kind Regards,}, enclosure=3D{list:Commercial Invoice,Accounts Statement},] \dorecurse{3}{\input knuth \par} \stopletter Alternatively, adjusting \setupletterlayer \usemodule [letter] [style=3Ddinb] % BEGIN MP LOGO SETUP \startuseMPgraphic{mpglogo} path p; p :=3D (0,0)--(100,0)--(100,100)--(0,100)--cycle; path q; q :=3D p cornered 30pt; draw q withcolor black withpen pencircle scaled 7pt; \stopuseMPgraphic \startsetups[letter:layer:lettermain] \scale [width=3D25mm,height=3D25mm] {\useMPgraphic{mpglogo}} \stopsetups \setupletterlayer [lettermain] [alternative=3Dsetups, x=3D160mm, y=3D17mm] % END MP LOGO SETUP, BEGIN LETTER SETUP \setupletterlayer [reference] [list=3D{name,phone,email,date}] \setupletterlayer [address] [y=3D55mm] \setupletterdescription [enclosure] [location=3Dtop, leftmargin=3D0.5em, symbol=3D#1,] \usesymbols [mvs] \definesymbol [1] [{\symbol[martinvogel 2][PointingHand]}] \setupletter [toname=3D{John Doe}, toaddress=3D{201, Main Street\\23124 London\\United Kingdom}, fromname=3D{Jansen NV}, fromaddress=3D{Waalhaven 2200\\2842 KL Rotterdam}, name=3D{Piet jansen}, phone=3D{+31(010)4234 4232}, email=3D{peter.jansen@gmail.com}, date=3D{\currentdate}, signature=3D{Pete},] % END LETTER SETUP, START LETTER \startletter [subject=3D{Outstanding Invoices}, opening=3D{Dear Sir,}, closing=3D{Kind Regards,}, enclosure=3D{list:Commercial Invoice,Accounts Statement},] \dorecurse {3} {\input knuth \par} \stopletter ---------- Forwarded message --------- From: Wolfgang Schuster Date: ma 11 mrt. 2019 om 20:55 Subject: Re: [NTG-context] Meptapost Drawing not showing-up in Context Letter Style To: mailing list for ConTeXt users , Context NTG < contextntg@gmail.com> 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=3Ddinb] \startuseMPgraphic{mpglogo} path p; p :=3D (0,0)--(100,0)--(100,100)--(0,100)--cycle ; path q; q :=3D p cornered 30pt; draw q withcolor black withpen pencircle scaled 7pt ; \stopuseMPgraphic \startsetups[letter:layer:lettermain] \scale[width=3D25mm,height=3D25mm]{\useMPgraphic{mpglogo}} \stopsetups \setupletterlayer [lettermain] [alternative=3Dsetups, x=3D160mm, y=3D17mm] \startletter \dorecurse{3}{\input knuth \par} \stopletter Another way to place content in the background is to use the =E2=80=9Cpaper= =E2=80=9D (or =E2=80=9Ctext=E2=80=9D) background which isn=E2=80=99t used by the letter m= odule and your settings won=E2=80=99t be overloaded. Wolfgang --0000000000002ae8420583ed0a5d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ev= entually, these two options worked. Firstly changing \setupbackgrounds

% BEGIN MP LOGO SETUP

\startu= seMPgraphic{mpglogo}
=C2=A0 path p;
=C2=A0 p :=3D (0,0)--(100,0)--(10= 0,100)--(0,100)--cycle;
=C2=A0
=C2=A0 path q;
=C2=A0 q :=3D p cor= nered 30pt;
=C2=A0 draw q withcolor black withpen pencircle scaled 7pt;<= br>\stopuseMPgraphic

\definelayer
=C2=A0 [logo]=
=C2=A0 [repeat=3Dno]

\setlayer
=C2=A0 [logo= ]
=C2=A0 [hoffset=3D160mm,voffset=3D17mm]
=C2=A0 {\scale[width=3D25mm= ,height=3D25mm]{\useMPgraphic{mpglogo}}}
=C2=A0
\setupbackgrounds[pa= per][background=3Dlogo]

% END MP LOGO SETUP, BEGIN= LETTER SETUP

\usemodule
=C2=A0 [letter]
=C2= =A0 [style=3Ddinb]

\setupletterlayer
=C2=A0 [re= ference]
=C2=A0 [list=3D{name,phone,email,date}]
=C2=A0
\setuplet= terlayer
=C2=A0 [address]
=C2=A0 [y=3D55mm]
=C2=A0
\setuplette= rdescription
=C2=A0 [enclosure]
=C2=A0 [location=3Dtop,
=C2=A0 l= eftmargin=3D0.5em,
=C2=A0 symbol=3D#1,]

\usesy= mbols
=C2=A0 [mvs]
=C2=A0
\definesymbol
=C2=A0 [1]
=C2=A0 [= {\symbol[martinvogel 2][PointingHand]}]

\setuplett= er
=C2=A0 [toname=3D{John Doe},
=C2=A0=C2=A0 toaddress=3D{201, Main S= treet\\23124 London\\United Kingdom},
=C2=A0=C2=A0 fromname=3D{Jansen NV= },
=C2=A0=C2=A0 fromaddress=3D{Waalhaven 2200\\2842 KL Rotterdam},
= =C2=A0=C2=A0 name=3D{Piet jansen},
=C2=A0=C2=A0 phone=3D{+31(010)4234 42= 32},
=C2=A0=C2=A0 email=3D{peter.jansen@gmail.com},
=C2=A0=C2=A0 date=3D{\curren= tdate},
=C2=A0=C2=A0 signature=3D{Pete},]

% END= LETTER SETUP, START LETTER
=C2=A0
\startletter
=C2=A0 [subject= =3D{Outstanding Invoices},
=C2=A0=C2=A0 opening=3D{Dear Sir,},
=C2=A0= =C2=A0 closing=3D{Kind Regards,},
=C2=A0=C2=A0 enclosure=3D{list:Commerc= ial Invoice,Accounts Statement},]

\dorecurse{3}{\i= nput knuth \par}

\stopletter

<= div>
Alternatively, adjusting \setupletterlayer


\usemodule
=C2=A0 [letter]
=C2=A0 [sty= le=3Ddinb]

% BEGIN MP LOGO SETUP

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

\startsetups[= letter:layer:lettermain]
=C2=A0 \scale
=C2=A0=C2=A0=C2=A0 [width=3D25= mm,height=3D25mm]
=C2=A0=C2=A0=C2=A0 {\useMPgraphic{mpglogo}}
\stopse= tups

\setupletterlayer
=C2=A0 [lettermain]
= =C2=A0 [alternative=3Dsetups,
=C2=A0=C2=A0 x=3D160mm,
=C2=A0=C2=A0 y= =3D17mm]

% END MP LOGO SETUP, BEGIN LETTER SETUP

\setupletterlayer
=C2=A0 [reference]
=C2=A0 [= list=3D{name,phone,email,date}]
=C2=A0
\setupletterlayer
=C2=A0 [= address]
=C2=A0 [y=3D55mm]
=C2=A0
\setupletterdescription
=C2= =A0 [enclosure]
=C2=A0 [location=3Dtop,
=C2=A0=C2=A0 leftmargin=3D0= .5em,
=C2=A0=C2=A0 symbol=3D#1,]

\usesymbols=C2=A0 [mvs]
\definesymbol

=C2=A0 [1]
=C2=A0 [= {\symbol[martinvogel 2][PointingHand]}]

\setuplett= er
=C2=A0 [toname=3D{John Doe},
=C2=A0=C2=A0 toaddress=3D{201, Main S= treet\\23124 London\\United Kingdom},
=C2=A0=C2=A0 fromname=3D{Jansen NV= },
=C2=A0=C2=A0 fromaddress=3D{Waalhaven 2200\\2842 KL Rotterdam},
= =C2=A0=C2=A0 name=3D{Piet jansen},
=C2=A0=C2=A0 phone=3D{+31(010)4234 42= 32},
=C2=A0=C2=A0 email=3D{pet= er.jansen@gmail.com},
=C2=A0=C2=A0 date=3D{\currentdate},
=C2=A0= =C2=A0 signature=3D{Pete},]

% END LETTER SETUP, ST= ART LETTER
=C2=A0
\startletter
=C2=A0 [subject=3D{Outstanding Inv= oices},
=C2=A0=C2=A0 opening=3D{Dear Sir,},
=C2=A0=C2=A0 closing=3D{K= ind Regards,},
=C2=A0=C2=A0 enclosure=3D{list:Commercial Invoice,Account= s Statement},]

\dorecurse
=C2=A0 {3}
=C2=A0 = {\input knuth \par}

\stopletter

---------- Forwarded message ---------
From: Wolfgang Schuster <wolfga= ng.schuster.lists@gmail.com>
Date: ma 11 mrt. 2019 om 20:5= 5
Subject: Re: [NTG-context] Meptapost Drawing not showing-up in Context= Letter Style
To: mailing list for ConTeXt users <ntg-context@ntg.nl>, Context NT= G <contextntg@= gmail.com>


Context NTG schrieb am 10.03.19 um 16:59= :
> I am trying to get a metapost drawing as logo=C2=A0added to right uppe= r
> corner of=C2=A0a 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 to= e
> 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=3Ddinb]

\startuseMPgraphic{mpglogo}
=C2=A0 =C2=A0path p;
=C2=A0 =C2=A0p :=3D (0,0)--(100,0)--(100,100)--(0,100)--cycle ;
=C2=A0 =C2=A0path q;
=C2=A0 =C2=A0q :=3D p cornered 30pt;
=C2=A0 =C2=A0draw q withcolor black withpen pencircle scaled 7pt ;
\stopuseMPgraphic

\startsetups[letter:layer:lettermain]
=C2=A0 =C2=A0\scale[width=3D25mm,height=3D25mm]{\useMPgraphic{mpglogo}}
\stopsetups

\setupletterlayer
=C2=A0 =C2=A0[lettermain]
=C2=A0 =C2=A0[alternative=3Dsetups,
=C2=A0 =C2=A0 x=3D160mm,
=C2=A0 =C2=A0 y=3D17mm]

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


Another way to place content in the background is to use the =E2=80=9Cpaper= =E2=80=9D (or
=E2=80=9Ctext=E2=80=9D) background which isn=E2=80=99t used by the letter m= odule and your
settings won=E2=80=99t be overloaded.

Wolfgang
--0000000000002ae8420583ed0a5d-- --===============6321890870731178252== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============6321890870731178252==--