From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/117367 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Fabrice Couvreur via ntg-context Newsgroups: gmane.comp.tex.context Subject: Userdata environment Date: Mon, 3 Apr 2023 19:42:11 +0000 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8352452322284566852==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12209"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Fabrice Couvreur To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 03 19:43:00 2023 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from [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 1pjOCo-0002vV-UR for gctc-ntg-context-518@m.gmane-mx.org; Mon, 03 Apr 2023 19:42:58 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 87CD71C10AB; Mon, 3 Apr 2023 19:42:29 +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 4GbZHKKj2KPp; Mon, 3 Apr 2023 19:42:27 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3C5D71C0F9F; Mon, 3 Apr 2023 19:42:27 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3BC0A1C0C36 for ; Mon, 3 Apr 2023 19:42: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 0ASv1vFotbu3 for ; Mon, 3 Apr 2023 19:42:24 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.160.177; helo=mail-qt1-f177.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Original-Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (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 3157C1C0A24 for ; Mon, 3 Apr 2023 19:42:24 +0200 (CEST) Original-Received: by mail-qt1-f177.google.com with SMTP id cj15so21645795qtb.5 for ; Mon, 03 Apr 2023 10:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680543742; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=TZFSKElPSLNB0L0QNb4BQXhgfHT/BumsPhrqkEKXpoQ=; b=PNG6CuCJNy0qgXulxxIm/PF4u4ONcFqAOj5jtqiM41At/pF+nb4FAoHux8Ervx0dCe PdjfpjwZucBTQtSn1l3PaYRa2OXc0ZH7yjkiyzN3VtSKxBn+iMQe1ky6f/Xv14qzWJ9a IspIzpVjbxNhK6Ntqzkr8KoVebbWFhOVFwp1hCp6lLIJ5vGmizM3GlNhwVZDwl90C3UP oiUgbef5HOEv1V3xbuM519N1KXLgc1x51uk4dtYwjiHkb2zy9QdRQEFvA7jgtP0p3T55 /0r5tUDj6OmEZPUxmxHHtfYRWmzNajHuFAohvSZX5YIFRlFsrBzCUyq5Q71yHLTbzNV4 a0LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680543742; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TZFSKElPSLNB0L0QNb4BQXhgfHT/BumsPhrqkEKXpoQ=; b=bHcXLaoYbrD3pCLQL1tqHFzSTYviJtFfYHfbTx1jrstox5SOF4Nm+Vv51e8kaPBldS RnSw6ATw9UMXV0wXGF0AwOGtUd00qD3ALLv2Y2vxYHAFLbuyWDqU6W8ZLgGMCe22V4mc Nh+qSGe9sKS9E3QubHFk+dm5q6z8/oToesoYOVfMvbQ/AaiOl43RhQQ/BWGOvgKriyc2 SZ0uyV77HZ8aKNTumCeCBfzrnSJ5u0frVpHH3hgIKqlo9wGGOn/5DjHJ+rLwtv62Yxjz eTvIHiFb8tVHQX+DfkcjQsrPyCYKr813o/3WgZVNgXSU9Cd7RcCDqokzSwVe3+/g0FN2 IkGA== X-Gm-Message-State: AO0yUKXZIwvuydRzcXVzuhrflv5P0U0Q3ElBoMVnMZCV4GPkYN50DtJO BwfzROJScpXvX55fHPFABVZd8GHgzi0ANvPGzuBUbcmcBb8= X-Google-Smtp-Source: AK7set+iANq4lMeR+vYCik2QVFbNxzFK1uV85aEJzw34meswJG0KePv6d8bo/4wbM0DTX5ui08FoA7wj3enWUGcMm8M= X-Received: by 2002:ac8:7f87:0:b0:3c0:1f6:ac8d with SMTP id z7-20020ac87f87000000b003c001f6ac8dmr14023584qtj.12.1680543742303; Mon, 03 Apr 2023 10:42:22 -0700 (PDT) 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" X-Broken-Reverse-DNS: no host name found for IP address 5.39.185.232 Xref: news.gmane.io gmane.comp.tex.context:117367 Archived-At: --===============8352452322284566852== Content-Type: multipart/alternative; boundary="000000000000ca317305f87214dc" --000000000000ca317305f87214dc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I have already created a thread on the subject and Wolgang, Marco and Taco have replied but the userdata environment is not yet clear to me. I would like, if possible, to write a definition, a property or a theorem on the left and illustrate it in the right margin with an example. In the code below, the second example is on the second page and not next to the second definition. Thanks. Fabrice ###########################################################################= # \ useMPlibrary[dum] \setuppapersize[A4] \mainlanguage [fr] \setuppagenumbering [alternative=3Ddoublesided] \setuplayout [width=3D12cm, rightmargin=3D60mm] \setupenumerations [before=3D{\blank}, after=3D{\blank}, alternative=3Dserried, distance=3D0.5em, title=3Dyes, titleleft=3D, titleright=3D, titlestyle=3Dnormal, headcommand=3D\groupedcommand{}{.}, numbercommand=3D\groupedcommand{}{}, titlecommand=3D\groupedcommand{(}{)}, width=3Dfit] \defineenumeration [definition] [text=3DD=C3=A9finition, number=3Dno, style=3Ditalic] \defineenumeration [exemple] [text=3DExemple, number=3Dno, style=3Dnormal] \definemargindata[marginfigure][inright] \setupmargindata [marginfigure][command=3D\vbox,align=3Dmiddle,stack=3Dyes] \defineuserdata [margintext] [alternative=3Dmargintext] \defineuserdataalternative [margintext] [renderingsetup=3Duserdata:marginte= xt] \startsetups [userdata:margintext] \margindata [inright] [ style=3D{\switchtobodyfont[10pt]}, width=3D\rightmarginwidth, align=3D{flushleft,broad} ] {\startexemple \getinlineuserdata \stopexemple} \stopsetups \showframe \starttext \startchapter[title=3D{First Chapter},ownnumber=3D1] \startdefinition \input ward \stopdefinition \startuserdata [margintext] \input ward \stopuserdata \startdefinition \input ward \stopdefinition \startuserdata [margintext] \input knuth \stopuserdata \stopchapter \stoptext ###########################################################################= # --000000000000ca317305f87214dc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
I have already created a thread on the subject and Wolga= ng, Marco and Taco have replied but the userdata environment is not yet cle= ar to me. I would like, if possible, to write a definition, a property or a= theorem on the left and illustrate it in the right margin with an example.= In the code below, the second example is on the second page and not next t= o the second definition.
Thanks.
Fabrice

###################= #########################################################
\
useMPlibrary[= dum]

\setuppapersize[A4]

\mainlanguage
=C2=A0 [fr]

= \setuppagenumbering
=C2=A0 =C2=A0 =C2=A0[alternative=3Ddoublesided]
<= br>\setuplayout
=C2=A0 [width=3D12cm,
=C2=A0 =C2=A0rightmargin=3D60mm= ]
=C2=A0

\setupenumerations
=C2=A0 [before=3D{\blank},
=C2= =A0 =C2=A0after=3D{\blank},
=C2=A0 =C2=A0alternative=3Dserried,
=C2= =A0 =C2=A0distance=3D0.5em,
=C2=A0 =C2=A0title=3Dyes,
=C2=A0 =C2=A0ti= tleleft=3D,
=C2=A0 =C2=A0titleright=3D,
=C2=A0 =C2=A0titlestyle=3Dnor= mal,
=C2=A0 =C2=A0headcommand=3D\groupedcommand{}{.},
=C2=A0 =C2=A0nu= mbercommand=3D\groupedcommand{}{},
=C2=A0 =C2=A0titlecommand=3D\groupedc= ommand{(}{)}, =C2=A0
=C2=A0 =C2=A0width=3Dfit]

\defineenumeratio= n
=C2=A0 =C2=A0[definition]
=C2=A0 =C2=A0[text=3DD=C3=A9finition,
= =C2=A0 =C2=A0 number=3Dno,
=C2=A0 =C2=A0 style=3Ditalic]

\definee= numeration
=C2=A0 =C2=A0[exemple]
=C2=A0 =C2=A0[text=3DExemple,
= =C2=A0 =C2=A0 number=3Dno,
=C2=A0 =C2=A0 style=3Dnormal]

\define= margindata[marginfigure][inright]
\setupmargindata [marginfigure][comman= d=3D\vbox,align=3Dmiddle,stack=3Dyes]

\defineuserdata [margintext] [= alternative=3Dmargintext]

\defineuserdataalternative [margintext] [r= enderingsetup=3Duserdata:margintext]

\startsetups [userdata:marginte= xt]
=C2=A0 \margindata
=C2=A0 =C2=A0 [inright]
=C2=A0 =C2=A0 [
= =C2=A0 =C2=A0 =C2=A0style=3D{\switchtobodyfont[10pt]},
=C2=A0 =C2=A0 =C2= =A0width=3D\rightmarginwidth,
=C2=A0 =C2=A0 =C2=A0align=3D{flushleft,bro= ad}
=C2=A0 =C2=A0 ]
=C2=A0 =C2=A0 {\startexemple
=C2=A0 =C2=A0 =C2= =A0\getinlineuserdata
=C2=A0 =C2=A0 =C2=A0\stopexemple}
=C2=A0 \stops= etups

\showframe
\starttext
\startchapter[title=3D{First Chapt= er},ownnumber=3D1]
\startdefinition
=C2=A0\input ward
\stopdefinit= ion
\startuserdata [margintext]
=C2=A0 \input ward
\stopuserdata<= br>\startdefinition
=C2=A0 \input ward
\stopdefinition
\startuserd= ata [margintext]
=C2=A0 \input knuth
\stopuserdata
\stopchapter\stoptext

######################################################= ######################
--000000000000ca317305f87214dc-- --===============8352452322284566852== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cHM6Ly93d3cubnRnLm5sL21haWxtYW4v bGlzdGluZm8vbnRnLWNvbnRleHQKd2VicGFnZSAgOiBodHRwczovL3d3dy5wcmFnbWEtYWRlLm5s IC8gaHR0cDovL2NvbnRleHQuYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHBzOi8vYml0YnVja2V0 Lm9yZy9waGcvY29udGV4dC1taXJyb3IvY29tbWl0cy8Kd2lraSAgICAgOiBodHRwczovL2NvbnRl eHRnYXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============8352452322284566852==--