From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/109391 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sylvain Hubert Newsgroups: gmane.comp.tex.context Subject: Re: \type{...} as macro argument Date: Sun, 8 Nov 2020 17:56:21 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8236390237215782499==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20470"; mail-complaints-to="usenet@ciao.gmane.io" To: Wolfgang Schuster , mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Nov 08 17:57:07 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbo02-0005Ch-My for gctc-ntg-context-518@m.gmane-mx.org; Sun, 08 Nov 2020 17:57:06 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id AEF781AA359; Sun, 8 Nov 2020 17:56:38 +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 SSPBR_IZjYFl; Sun, 8 Nov 2020 17:56:37 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F16AA1AA389; Sun, 8 Nov 2020 17:56:36 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5CD301AA359 for ; Sun, 8 Nov 2020 17:56:35 +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 pmOPTBXB2eKq for ; Sun, 8 Nov 2020 17:56:34 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.53; helo=mail-io1-f53.google.com; envelope-from=champignoom@gmail.com; receiver= Original-Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (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 9BFF11AA2FB for ; Sun, 8 Nov 2020 17:56:34 +0100 (CET) Original-Received: by mail-io1-f53.google.com with SMTP id k21so7439001ioa.9 for ; Sun, 08 Nov 2020 08:56:34 -0800 (PST) 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=M5NBElISOLQCD6Y+E32zTy1VLhQkByTbr1iqZMao4rA=; b=udTAfp+GRFyYh26QY4NmYIcgn/QAZXnjrCLezbN/pgZkpKNCrETx0DNbBk1lEcZot3 mdmjl4iDomwSkbm/W0y2fRIvC0O6ZKZJ01qCG7+SnbA7gCsBsvD5mJz/7wkPVp1fa/e3 Um9cCO7JbQg5ZvDXIofHH1l2cUrGu0vQCvrFHdTgvfPE6puIFDsvC7ompwhSGHDlYowa C8Q2xMi+MrWlPQj3McUToIYtaXB5+9oAUnhbb6aYM9ulabewxHD+ZLIw7PNzbiJ+Uvo4 xwbQRWTa5RiL9UcuHl2yjk15n90miZxP7KeaXXXSz/wi+AnnxohdKu/ZJjkjCZSI8bPD 3TeQ== 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=M5NBElISOLQCD6Y+E32zTy1VLhQkByTbr1iqZMao4rA=; b=IlOadfUoz9cEGH5K6gB3WbaewZDO9vDtmjLNQiMdcAsWt1zidDwTLjvP8krQH0B753 rMdhKnmFWA2osQApN4TLXeQXSkjwnq9lvVY2tV5r0J4sDJTPK+UkzbtWouaZa4/SCGww QTGWuG7TYU/0o7AFpqDs3YUYJjFZr7U+RGN+ch6AJoeWMcfvTuDnMcx2Sh/EU+92ODo7 lVj5Kwn/1cDfJEQmG7pkTpDQRyd/K4VglhwtSJNqD2uc5TNDNzEGIQTL3FKSx0OY/bu7 EZEZ6DhLzh92CxlDW7pvpRjKJtPVkmvPSq3638pGxeazIpe1ZHV69PdL8ITBq9dAc2dJ o/jQ== X-Gm-Message-State: AOAM530JR2yedvf6T8q9mD1kdXYbR04+rkIiYxCd7XCsC65/eLHFxwPW xLLSo4G7qriGZZ2XPcRTM42hNreXJ1vDNK3BSOM= X-Google-Smtp-Source: ABdhPJyX7Qx+JaWic7aQwm9rKa4Dr7BKKqbVNFO3mhj1XWmCdSDkOu0asLJOfOo7mUAzhZdZm3zuodGhT/fgFbFv2lg= X-Received: by 2002:a05:6602:5de:: with SMTP id w30mr3783006iox.64.1604854593026; Sun, 08 Nov 2020 08:56:33 -0800 (PST) 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.io gmane.comp.tex.context:109391 Archived-At: --===============8236390237215782499== Content-Type: multipart/alternative; boundary="000000000000eefd7b05b39b53fe" --000000000000eefd7b05b39b53fe Content-Type: text/plain; charset="UTF-8" Hi Wolfgang, I'm sorry that the question was not clear enough. Let me ask in this way: how to define a \dorecurse, such that \dorecurse{10}{\type{a b c}} does not squash the spaces? Sylvain On Sun, 8 Nov 2020 at 15:03, Wolfgang Schuster < wolfgang.schuster.lists@gmail.com> wrote: > Sylvain Hubert schrieb am 08.11.2020 um 14:47: > > Dear List, > > > > I would like to ask how to define a command, \same, such that > > > > \same{\type{a b c}} > > > > produces the same result as its argument does > > > > \type{a b c} > > > > The naive way doesn't work because it makes all the spaces collapse: > > > > \define[1]\same{#1} > > > \definetype [typeTEX] [option=tex] > > \starttext > > \type{\startsection[title=\tex{type}]} > > \typeTEX{\startsection[title=\tex{typeTEX}]} > > \stoptext > > Wolfgang > --000000000000eefd7b05b39b53fe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Wolfgang,

I'm sorry t= hat the question was not clear enough. Let me ask in this way:
ho= w to define a \dorecurse, such that \dorecurse{10}{\type{a=C2=A0=C2=A0=C2= =A0 b c}} does not squash the spaces?

Sylvain
<= /div>

On Sun, 8 Nov 2020 at 15:03, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>= wrote:
Sylvain = Hubert schrieb am 08.11.2020 um 14:47:
> Dear List,
>
> I would like to ask how to define a command, \same, such that
>
>=C2=A0 =C2=A0=C2=A0=C2=A0 \same{\type{a=C2=A0=C2=A0 b c}}
>
> produces the same result as its argument does
>
>=C2=A0 =C2=A0=C2=A0=C2=A0 \type{a=C2=A0=C2=A0 b c}
>
> The naive way doesn't work because it makes all the spaces collaps= e:
>
>=C2=A0 =C2=A0=C2=A0=C2=A0 \define[1]\same{#1}


\definetype [typeTEX] [option=3Dtex]

\starttext

\type{\startsection[title=3D\tex{type}]}

\typeTEX{\startsection[title=3D\tex{typeTEX}]}

\stoptext

Wolfgang
--000000000000eefd7b05b39b53fe-- --===============8236390237215782499== 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== --===============8236390237215782499==--