From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/104896 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Mikael P. Sundqvist" Newsgroups: gmane.comp.tex.context Subject: Re: Frame with shadow for header Date: Tue, 27 Aug 2019 11:08:57 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8482958957958062159==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="100626"; mail-complaints-to="usenet@blaine.gmane.org" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 27 11:09:51 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 1i2XU5-000Q1p-2D for gctc-ntg-context-518@m.gmane.org; Tue, 27 Aug 2019 11:09:49 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 694D21539DB; Tue, 27 Aug 2019 11:09:27 +0200 (CEST) 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 LttRlMXBQvZz; Tue, 27 Aug 2019 11:09:26 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 843751539DF; Tue, 27 Aug 2019 11:09:26 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DCBFC1539DC for ; Tue, 27 Aug 2019 11:09:25 +0200 (CEST) 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 prujuy-rPH2x for ; Tue, 27 Aug 2019 11:09:25 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.222.170; helo=mail-qk1-f170.google.com; envelope-from=mickep@gmail.com; receiver= Original-Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 20DE71539DB for ; Tue, 27 Aug 2019 11:09:25 +0200 (CEST) Original-Received: by mail-qk1-f170.google.com with SMTP id 4so1163295qki.6 for ; Tue, 27 Aug 2019 02:09:25 -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=dwQBeIxrQy1h55zj1qS8bwHJWHJdrU+Loz+Wz4Rlylk=; b=HVLeC7i12wyZhHcLrIcH9CIHs6Co/Q+0KZpXIJTDbtFC/7rE8vQwdQQyjexJpT4e7H /UOV1aqhMjePLPIqAXNKBjK612STszmC0DpIxF/99RaL2kSqt7NrfD02sY7oaoUwF0YZ Msi6s0it2wLJn/M5OVr5aLSQSUJGqNnIwY6Ri1gWEZJ0AgsWhQ94beTc0/GMy5biLZjL vcPcOcvht92H5posqpLNoUKtDqaCIXWYlyNXieCIILptDBW4YjL8mnwyQwKECEwoqaJV zwgrwwixTFAnJ+hBIppnqQwqvQk7fGrto5a5u73ONSQMvAFgThV4xclill/DxDk2evYB pAYg== 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=dwQBeIxrQy1h55zj1qS8bwHJWHJdrU+Loz+Wz4Rlylk=; b=FuUUDE98DMEQIqS4Gcah+kTT21u6UgfKNlCP63yGbUUdZ1PeynyM2J9WTu8sM6OexZ cSs8LtqEVKplDxYe0lT5OUPSfXI5Zzh9RWdANxa7jF0I9/rjhs4D75yVPAVX9tUoAWPX 69LgLAKH1Zjh153/SVIwzD1YAlplez83Px+oO9KfBDGm1gcoIfIBZAdN8n3glUHY4ryh Mqt9RqIbyRjA4aQ5/WvPhDY2rfZ+i2dAYhhGL2lNd95p6TQyA29h0cSZNKtVoj4CyTL+ eesX6TX7F5rWzOts2Pw+7de9NebfW0gGT6LwqqSIJ4BIjj03uggZTBtlaS4pX3ZxDAMJ LlFw== X-Gm-Message-State: APjAAAU6dp/AAZxIk0FKb6zPbDqanar/d+k52xPM2VrfU0cDe10jCq9c qOpdZZ0pZ760FIBUshLl/ME9VNMqg3UHsbgnC5745R+Y X-Google-Smtp-Source: APXvYqzWQFdhVvTZk1yMVMIdcw0y4F6ejnSiRQ8qt8ORf6b/lUgZ5SNU4VZzkJKqCSEkcHwAeWxHm03Cnre/fL3TzPc= X-Received: by 2002:a37:6005:: with SMTP id u5mr3299942qkb.358.1566896963287; Tue, 27 Aug 2019 02:09:23 -0700 (PDT) In-Reply-To: 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:104896 Archived-At: --===============8482958957958062159== Content-Type: multipart/alternative; boundary="000000000000e57f32059115a09b" --000000000000e57f32059115a09b Content-Type: text/plain; charset="UTF-8" On Tue, Aug 27, 2019 at 10:16 AM Fabrice Couvreur < fabrice1.couvreur@gmail.com> wrote: > Hi Mikael, > I did not think about using Metapost, I tried with the keys of the command > \framed without success. > I use the following code for my headings (thank you Aditya) and I would > like to use your code instead. > Thank you. > Fabrice > > > \setupbackgrounds > [header] > [text] > [frame=off, > topframe=off, > bottomframe=off, > framecolor=, > rulethickness=2pt] > > \defineframed > [headerframed] > [frame=off, > height=fit, > width=fit] > > \definecolor[ColorA][0.8(white)] > > > \startsetups [headertext] > > \setupheadertexts > [{\startframed [headerframed] > [foregroundstyle=bold,background=color,backgroundcolor=ColorA] > \getvariable{headertext}{title} > n\high{o}\,\getvariable{headertext}{number} > \stopframed}] > What if you change this part to \setupheadertexts [{\startframed [headerframed] [foregroundstyle=bold,background=framewithshadow] \getvariable{headertext}{title} n\high{o}\,\getvariable{headertext}{number} \stopframed}] Does that give you what you want? /Mikael --000000000000e57f32059115a09b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Aug 27, 2019 at 10:16 AM Fabrice = Couvreur <fabrice1.couvre= ur@gmail.com> wrote:
Hi Mikael,
I did not think about using Metapost, I tried with t= he keys of the command \framed without success.
= I use the following code for my headings (thank you Aditya) and I would lik= e to use your code instead.
Thank you.Fabrice


<= /span>
\setupbackgrounds<= br>=C2=A0 =C2=A0 [header]
=C2=A0 =C2=A0 [text]
=C2=A0 =C2=A0 [frame= =3Doff,
=C2=A0 =C2=A0 =C2=A0topframe=3Doff,
=C2=A0 =C2=A0 =C2=A0botto= mframe=3Doff,
=C2=A0 =C2=A0 =C2=A0framecolor=3D,
=C2=A0 =C2=A0 =C2=A0= rulethickness=3D2pt]

=C2=A0 \defineframed
=C2=A0 =C2=A0 [headerfr= amed]
=C2=A0 =C2=A0 [frame=3Doff,
=C2=A0 =C2=A0 =C2=A0height=3Dfit,=C2=A0 =C2=A0 =C2=A0width=3Dfit]

=C2=A0 \definecolor[ColorA][0.8(w= hite)]
=C2=A0

=C2=A0 \startsetups [headertext]

=C2=A0 =C2= =A0 \setupheadertexts
=C2=A0 =C2=A0 =C2=A0 [{\startframed [headerframed]=
=C2=A0 =C2=A0 =C2=A0 [foregroundstyle=3Dbold,background=3Dcolor,backgro= undcolor=3DColorA]
=C2=A0 =C2=A0 =C2=A0 \getvariable{headertext}{title} = n\high{o}\,\getvariable{headertext}{number}
=C2=A0 =C2=A0 =C2=A0 \stopfr= amed}]

What i= f you change this part to

=C2=A0 =C2=A0 \setuphead= ertexts
=C2=A0 =C2=A0 =C2=A0 [{\startframed [headerframed]
=C2=A0 =C2= =A0 =C2=A0 [foregroundstyle=3Dbold,background=3Dframewithshadow]
=C2=A0 = =C2=A0 =C2=A0 \getvariable{headertext}{title} n\high{o}\,\getvariable{heade= rtext}{number}
=C2=A0 =C2=A0 =C2=A0 \stopframed}]

Does that give you what you want?

/Mikael
--000000000000e57f32059115a09b-- --===============8482958957958062159== 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== --===============8482958957958062159==--