From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/92312 Path: news.gmane.org!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Re: Command that does not give the expected result (Metafun) Date: Tue, 11 Aug 2015 09:03:40 +0200 Message-ID: References: <55C7584E.7080106@wxs.nl> <55C90BAC.7040702@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1298338653==" X-Trace: ger.gmane.org 1439276701 3018 80.91.229.3 (11 Aug 2015 07:05:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Aug 2015 07:05:01 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 11 09:04:51 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 1ZP3cB-0002iR-3h for gctc-ntg-context-518@m.gmane.org; Tue, 11 Aug 2015 09:04:51 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6339110228 for ; Tue, 11 Aug 2015 09:04:50 +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 yvtmfDgjfYwO for ; Tue, 11 Aug 2015 09:04:49 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 18C0410233 for ; Tue, 11 Aug 2015 09:04:14 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3DE2D101F6 for ; Tue, 11 Aug 2015 09:04:10 +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 3oQfRTn5lOqp for ; Tue, 11 Aug 2015 09:04:09 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 02DB3101E6 for ; Tue, 11 Aug 2015 09:04:03 +0200 (CEST) Original-Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) by filter4-ams.mf.surf.net (8.14.4/8.14.4/Debian-4) with ESMTP id t7B73fT2015686 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 11 Aug 2015 09:03:42 +0200 Original-Received: by ioii16 with SMTP id i16so193103199ioi.0 for ; Tue, 11 Aug 2015 00:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=KHDshlUnY8HEkbNGzLM0Mw9CKUJDwocKNdJdB3n1e8A=; b=Yxlkiz7N4AV/dT9BmayeUTKm4jYoftDgSUl7Z0s6eQy4rI9jnvT0N3OwKUyphhWIoM ZZmZC21Zxjlqe1sx1EKe61rfk8f6Q595z1KR59lOBks8WSiKFBIx6qVPy3gEpoAGZQfJ qntrqtGyChixk8h6gToygPDEuCH8NSgPRZ/16J6hDOA+OLXtxWfQ4QHNd8u29tt4EYW8 L96PP2Zdvzh0KpRK7XWuQ79TBUUed8aXwhf7hbyVyHF7aU3OOlyt+4g540lPMO6feBkR 7BvXsAm1VhFkR89twq4qZ9+td9J768JGjo14ozHE4iyinfI6z91rk1rHclRRPoktZRvi fQjw== X-Received: by 10.107.129.230 with SMTP id l99mr26627766ioi.32.1439276620747; Tue, 11 Aug 2015 00:03:40 -0700 (PDT) Original-Received: by 10.64.248.227 with HTTP; Tue, 11 Aug 2015 00:03:40 -0700 (PDT) In-Reply-To: <55C90BAC.7040702@gmail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4001:c06::22d; country=US; region=Iowa; city=Council Bluffs; latitude=41.2619; longitude=-95.8608; http://maps.google.com/maps?q=41.2619,-95.8608&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01P3j3GBg - 0a266780f32d - 20150811 (trained as not-spam) Received-SPF: pass (filter4-ams.mf.surf.net: domain of fabrice1.couvreur@gmail.com designates 2607:f8b0:4001:c06::22d as permitted sender) receiver=filter4-ams.mf.surf.net; client-ip=2607:f8b0:4001:c06::22d; envelope-from=; helo=mail-io0-x22d.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:92312 Archived-At: --===============1298338653== Content-Type: multipart/alternative; boundary=001a113ecd60b69a13051d03b30f --001a113ecd60b69a13051d03b30f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Wolfgang, I will follow your advice but I will try to understand, when I have the tim= e , the difference between \unexpanded\def\ChapterCommand#1#2% et \def\ChapterCommand#1#2%. Fabrice 2015-08-10 22:38 GMT+02:00 Wolfgang Schuster : > Fabrice Couvreur > 10. August 2015 09:13 > Dear Hans, > I tested without understanding what \unexpanded, and of course it works ! > > You can use ConTeXt=E2=80=99s \define command where you don=E2=80=99t hav= e to think about > \unexpanded etc., e.g. > > \define[2]\ChapterCommand > {\setbox\scratchbox\hbox to \leftmarginwidth{#1\hss}% > \hskip-\dimexpr\leftmarginwidth+\leftmargindistance\relax > \framed > [background=3Dtitled,frame=3Doff,offset=3D0pt] > {\box\scratchbox > \hskip\leftmargindistance > #2}} > > Wolfgang > > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ > --001a113ecd60b69a13051d03b30f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Wolfgang, I will follow your advice= but I will try to un= derstand, when I have= the time, the difference between <= /span>
\unexpanded\def\ChapterCommand#1#2% et \def\ChapterCommand#1#2%.
F= abrice

2= 015-08-10 22:38 GMT+02:00 Wolfgang Schuster <schuster.wolfgang= @gmail.com>:
10.=20 August 2015 09:13
Dear Hans,
I=20 tested without understanding what \<= /span>unexpanded, and of course it works !
=

You can use ConTeXt=E2=80=99s \define command where you don=E2=80=99t have = to think=20 about \unexpanded etc., e.g.

\define[2]\ChapterCommand
=C2=A0 {\setbox\scratchbox\hbox to \leftmarginwidth{#1\hss}%
=C2=A0=C2=A0 \hskip-\dimexpr\leftmarginwidth+\leftmargindistance\relax
=C2=A0=C2=A0 \framed
=C2=A0=C2=A0=C2=A0=C2=A0 [background=3Dtitled,frame=3Doff,offset=3D0pt]
=C2=A0=C2=A0=C2=A0=C2=A0 {\box\scratchbox
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \hskip\leftmargindistance
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #2}}

Wolfgang

_______________________________________________________________________= ____________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">http://www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/con= textrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________

--001a113ecd60b69a13051d03b30f-- --===============1298338653== 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= --===============1298338653==--