From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107962 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Re: Store images and text in the right margin Date: Mon, 6 Jul 2020 19:06:19 +0200 Message-ID: References: <20200702190416.0720324f@homerow> <20200703102828.6c17ba40@homerow> <20200703110446.4ee95771@homerow> <83F9B18B-440C-4F50-9E5D-78EB11952EBA@elvenkind.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2439697243692269856==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15844"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jul 06 19:08:30 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 1jsUbV-00040X-OS for gctc-ntg-context-518@m.gmane-mx.org; Mon, 06 Jul 2020 19:08:29 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 78DA3185214; Mon, 6 Jul 2020 19:07:58 +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 3i3suhdVCE7U; Mon, 6 Jul 2020 19:07:56 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A40D718523E; Mon, 6 Jul 2020 19:07:56 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E69E2185207 for ; Mon, 6 Jul 2020 19:07:54 +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 vnS6W0E8gq1m for ; Mon, 6 Jul 2020 19:07:53 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.46; helo=mail-wr1-f46.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Original-Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 161BF184C24 for ; Mon, 6 Jul 2020 19:07:52 +0200 (CEST) Original-Received: by mail-wr1-f46.google.com with SMTP id o11so41968352wrv.9 for ; Mon, 06 Jul 2020 10:07:52 -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=KfhxzyGZkcsHZu29WnQJE7QUvma6/OuKMdnHrgN8cTw=; b=WJtPKlTJgq6lfJbZ3LhlnWaowa2og+dKJs/wWzvEQzRsdv7wLEwHQk9bKmlXHXoOGZ Y54boo//hl21mbzGnDhKTM+64iniKeRal+pW1yxSgzoblKmw5Nl0Fjo88WZJsldQvLqs 4dcF3KJKsJEJE6wkj59GEsTf4uC+OnIcNin6I2fhxU1TjVgofMG3RIoGlPdIK7dhvlII wQAnMz61JsK4pbCAQzQ5zpZ7RDIugdxa2VoIFRhI97cliDCwLk9788AYsPn/gXVsPoGp qM4VdoaP87woopcEMMkkH/PEIB7v4V3/jIN/uygkQB/mCAaBEAvy1oOWQbg1FTPvIZto 73uQ== 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=KfhxzyGZkcsHZu29WnQJE7QUvma6/OuKMdnHrgN8cTw=; b=Om8xXE7L1iEjblk9H7X+11Bous6/pIG6488+9hT1YGyKrsBoDIrd0wmbkGJfk4mCR2 JI3MYyJRR9MGyVP3pwofWqa2cpvyr4zAHkBSDCo0Mq6ZAbfnEF/KMjAcab03Lkud4W0K OU8xevXN8/j2PE49PwgI1ERvmfuWKYgtefUPOnb0xNFZ5gN71L7w2w1w3f9gGunS0C2L VFHBUzEOQSeZf8YZUs3/0d2dV10fz6oG55YDq3wGfgT+HIbNByiPxfhBQ0WvgNkSeaZq gvz448bEddxxKI9/w85ACYmzBBSkU0m70ZEz9dacXi4ggvj5apWLJTX4fAGXwy/eBzK4 q9kA== X-Gm-Message-State: AOAM533omW+OhuWHZB3Xt3UAUpOepr4COmX50IhMUd2iKR13ToVPta6u PfHY2vWWJ5mIm4WptXG3IbFaGpZJJGxRBTjnOTe5GaWw X-Google-Smtp-Source: ABdhPJypdNfMYkn03hgpQAxXjjY9heCUAsRX0lYtCSs5IHTNwwkSINsvzANG/AO+MvuwVHYLHjytCV9Yzba9em8YpPg= X-Received: by 2002:a5d:688d:: with SMTP id h13mr14924935wru.303.1594055272314; Mon, 06 Jul 2020 10:07:52 -0700 (PDT) In-Reply-To: <83F9B18B-440C-4F50-9E5D-78EB11952EBA@elvenkind.com> 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:107962 Archived-At: --===============2439697243692269856== Content-Type: multipart/alternative; boundary="000000000000423c1905a9c8ea51" --000000000000423c1905a9c8ea51 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Taco, Thank you for your help. What I want to do is write a course for my students, and the definitions, theorems ... will be illustrated by graphs, examples, remarks ... placed in the right margin. The idea is to consider that a text or a graphic is an element to place in the right margin without worrying about the nature and that a single command does the job. What you are proposing goes in the right direction. However, I noticed a little problem with the hyphenation. Fabrice Le lun. 6 juil. 2020 =C3=A0 16:35, Taco Hoekwater a = =C3=A9crit : > Hi Fabrice, > > Like this maybe? It depends on what you want to achieve exactly, I think > > \useMPlibrary[dum] > > \setuppapersize[A4] > > \setuplayout > [width=3D12cm, > rightmargin=3D5cm] > > \defineuserdata [margintext] [alternative=3Dmargintext] > > \defineuserdataalternative [margintext] > [renderingsetup=3Duserdata:margintext] > > \startsetups [userdata:margintext] > \margindata > [inright] > [style=3D{\switchtobodyfont[9pt]}, > width=3D\rightmarginwidth, > align=3D{flushleft,broad}, > stack=3Dyes] > {\startframedtext[before=3D,after=3D,offset=3D0pt,width=3Dmax,frame= =3Doff] > \getinlineuserdata > \stopframedtext} > \stopsetups > > \showframe > \starttext > \startuserdata[margintext] > {\bf Remarque =E2=80=94 }\input ward > \stopuserdata > \startuserdata[margintext] > \externalfigure[dummy][width=3D\rightmarginwidth] > \stopuserdata > \startchapter[title=3DFirst chapter] > \dorecurse{2}{\input knuth} > \stopchapter > \stoptext > > > > On 6 Jul 2020, at 16:18, Fabrice Couvreur > wrote: > > > > > > > > ---------- Forwarded message --------- > > De : Fabrice Couvreur > > Date: lun. 6 juil. 2020 =C3=A0 12:10 > > Subject: Re: [NTG-context] Store images and text in the right margin > > To: Marco > > > > > > Hello, > > What has been proposed by Wolfgang and Marco works correctly but is it > possible to define a single environment margintext which would allow to > include both text and figures ? > > Thank you > > Fabrice > > _________________________________________________________________________= __________ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ > --000000000000423c1905a9c8ea51 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Taco,
Thank you for your help. What I want to do is write a course for my students, and the de= finitions, theorems ... will be illustrated by graphs, examples, remarks ..= . placed in the right margin. The = idea is to consider that a text or a graphic is an element to place in the = right margin without worrying about the nature and that a single command do= es the job. What you are proposing= goes in the right direction. Howe= ver, I noticed a little problem with the hyphenation.
Fabrice

Le=C2=A0lun. 6 juil. 2020 =C3=A0=C2=A016:3= 5, Taco Hoekwater <taco@elvenkind.= com> a =C3=A9crit=C2=A0:
Hi Fabrice,

Like this maybe? It depends on what you want to achieve exactly, I think
\useMPlibrary[dum]

\setuppapersize[A4]

\setuplayout
=C2=A0 [width=3D12cm,
=C2=A0 =C2=A0rightmargin=3D5cm]

\defineuserdata [margintext] [alternative=3Dmargintext]

\defineuserdataalternative [margintext] [renderingsetup=3Duserdata:marginte= xt]

\startsetups [userdata:margintext]
=C2=A0 \margindata
=C2=A0 =C2=A0 [inright]
=C2=A0 =C2=A0 [style=3D{\switchtobodyfont[9pt]},
=C2=A0 =C2=A0 =C2=A0width=3D\rightmarginwidth,
=C2=A0 =C2=A0 =C2=A0align=3D{flushleft,broad},
=C2=A0 =C2=A0 =C2=A0stack=3Dyes]
=C2=A0 =C2=A0 {\startframedtext[before=3D,after=3D,offset=3D0pt,width=3Dmax= ,frame=3Doff]
=C2=A0 =C2=A0 =C2=A0\getinlineuserdata
=C2=A0 =C2=A0 =C2=A0\stopframedtext}
\stopsetups

\showframe
\starttext
\startuserdata[margintext]
=C2=A0{\bf Remarque =E2=80=94 }\input ward
\stopuserdata
\startuserdata[margintext]
=C2=A0\externalfigure[dummy][width=3D\rightmarginwidth]
\stopuserdata
\startchapter[title=3DFirst chapter]
\dorecurse{2}{\input knuth}
\stopchapter
\stoptext


> On 6 Jul 2020, at 16:18, Fabrice Couvreur <fabrice1.couvreur@gmail.com>= ; wrote:
>
>
>
> ---------- Forwarded message ---------
> De : Fabrice Couvreur <fabrice1.couvreur@gmail.com>
> Date: lun. 6 juil. 2020 =C3=A0 12:10
> Subject: Re: [NTG-context] Store images and text in the right margin > To: Marco <= lists@homerow.info>
>
>
> Hello,
> What has been proposed by Wolfgang and Marco works correctly but is it= possible to define a single environment margintext which would allow to in= clude both text and figures ?
> Thank you
> Fabrice
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--000000000000423c1905a9c8ea51-- --===============2439697243692269856== 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== --===============2439697243692269856==--