From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90805 Path: news.gmane.org!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Color in an environment Date: Sun, 29 Mar 2015 22:05:27 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0000415194==" X-Trace: ger.gmane.org 1427659574 3081 80.91.229.3 (29 Mar 2015 20:06:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Mar 2015 20:06:14 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 29 22:05:59 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YcJT4-0001Ll-RJ for gctc-ntg-context-518@m.gmane.org; Sun, 29 Mar 2015 22:05:58 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 168A210232 for ; Sun, 29 Mar 2015 22:05:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id mCOWIOQpyT26 for ; Sun, 29 Mar 2015 22:05:57 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id AC89D10234 for ; Sun, 29 Mar 2015 22:05:34 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 41082101FE for ; Sun, 29 Mar 2015 22:05:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lpfni-LXvp8i for ; Sun, 29 Mar 2015 22:05:30 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 8E8F1101FD for ; Sun, 29 Mar 2015 22:05:30 +0200 (CEST) Original-Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t2TK5SCG004357 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sun, 29 Mar 2015 22:05:29 +0200 Original-Received: by igcxg11 with SMTP id xg11so55889214igc.0 for ; Sun, 29 Mar 2015 13:05:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=JPuavPbbcaUa17/8FSWWsDX8x9vxAG99CBqYBkaJ8o0=; b=SkquVCcAp4wi3WXjvNn3/wHUilcLt0KUZdMDFu37VIDxk//6kxp6rnLJNRke+MMnRM jRL6by88clBxtKPC8gSPz3FiQE/uiR5jxIJhuw9x15bRkfGBygEJOksBTfnXBo4xQIVX X/Apu2Bhh6g7ie4qpDlPqI9Q/1oNvOQhwRFWqA3qRdbg8n8Iz5WlbV/BhAKOC632M2Wg Ib2FH9VLT3fhrn7WpmRgoE1Bff73q/klRVdUjgqA0q4EXjup0sf8elfaxAO3I97wDwzT wTy7fyGy5gvGMoHWsnmn4azjqY3Gi8UuSyfT8KL0jdKXyuCjH2uYiYxGApJBZoHcBdbc 6X2Q== X-Received: by 10.50.66.243 with SMTP id i19mr13323744igt.7.1427659527648; Sun, 29 Mar 2015 13:05:27 -0700 (PDT) Original-Received: by 10.50.239.38 with HTTP; Sun, 29 Mar 2015 13:05:27 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4001:c05::229; country=US; latitude=38.0000; longitude=-97.0000; http://maps.google.com/maps?q=38.0000,-97.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0TO9w5tTV - c9268bd65024 - 20150329 (trained as not-spam) Received-SPF: pass (filter2-til.mf.surf.net: domain of fabrice1.couvreur@gmail.com designates 2607:f8b0:4001:c05::229 as permitted sender) receiver=filter2-til.mf.surf.net; client-ip=2607:f8b0:4001:c05::229; envelope-from=; helo=mail-ig0-x229.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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:90805 Archived-At: --===============0000415194== Content-Type: multipart/alternative; boundary=047d7bdc11d6017940051272e368 --047d7bdc11d6017940051272e368 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, 1. In the following code, the color is not included in the \startframedtext \stopframedtext environment 2. How can the height of the red square adapts to the height of the text ? 3. Can we improve the code ? Best regards, Fabrice \setupcolors[state=3Dstart] \definecolor[mycolor][c=3D0.00, m=3D0.10, y=3D0.20, k=3D0.00] \defineenumeration [definition] [text=3D{\blue D=C3=89FINITION : }, headstyle=3D{\bf\feature[+][f:smallcaps]}, headcommand=3D{ \startMPcode u:=3D0.3cm; filldraw (0,0)--(1u,0)--(1u,1u)--(0,1u)--cycle withcolor red ; \stopMPcode}, width=3Dfit, alternative=3Dtop, title=3Dyes, titleright=3D, titleleft=3D, before=3D{\startframedtext[width=3D\textwidth,frame=3Doff,background=3Dcolo= r,backgroundcolor=3D\MPcolor{mycolor}]}, after=3D{\stopframedtext}] \starttext \startdefinition{\red Exp=C3=A9rience al=C3=A9atoire} Une {\bf exp=C3=A9rience al=C3=A9atoire} est une exp=C3=A9rience renouvelab= le dont les r=C3=A9sultats possibles sont connus sans qu'on puisse d=C3=A9terminer lequ= el sera r=C3=A9alis=C3=A9. \stopdefinition \stoptext --047d7bdc11d6017940051272e368 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
<= span class=3D"">Hi,

1. In the following code, the color is not included in the \startframedtext=C2=A0 \stopframedtext environment

2. How can the height of the red square adapts to = the height of the text ?
3. Can we improve the code ?


Best regards,
Fabrice

\setupcolors[state=3Dstart]
\d= efinecolor[mycolor][c=3D0.00, m=3D0.10, y=3D0.20, k=3D0.00]

\definee= numeration
=C2=A0 [definition]
=C2=A0 [text=3D{\blue D=C3=89FINITION = : },
=C2=A0=C2=A0 headstyle=3D{\bf\feature[+][f:smallcaps]},
=C2=A0= =C2=A0 headcommand=3D{
=C2=A0=C2=A0 \startMPcode
=C2=A0=C2=A0 u:=3D0= .3cm;
=C2=A0=C2=A0 filldraw (0,0)--(1u,0)--(1u,1u)--(0,1u)--cycle withco= lor red ;
=C2=A0=C2=A0 \stopMPcode},
=C2=A0=C2=A0 width=3Dfit,
= =C2=A0=C2=A0 alternative=3Dtop,
=C2=A0=C2=A0 title=3Dyes,
=C2=A0=C2= =A0 titleright=3D,
=C2=A0=C2=A0 titleleft=3D,
=C2=A0=C2=A0 before=3D{= \startframedtext[width=3D\textwidth,frame=3Doff,background=3Dcolor,backgrou= ndcolor=3D\MPcolor{mycolor}]},
=C2=A0=C2=A0 after=3D{\stopframedtext}]
\starttext
\startdefinition{\red Exp=C3=A9rience al=C3=A9atoire}Une {\bf exp=C3=A9rience al=C3=A9atoire} est une exp=C3=A9rience renouvel= able dont les r=C3=A9sultats possibles sont connus sans qu'on puisse d= =C3=A9terminer lequel sera r=C3=A9alis=C3=A9.
\stopdefinition
\stopte= xt
--047d7bdc11d6017940051272e368-- --===============0000415194== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0000415194==--