From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107928 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Store images and text in the right margin Date: Thu, 2 Jul 2020 17:20:07 +0200 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1599453381618027478==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14128"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 02 17:21:57 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 1jr12C-0003ZJ-T8 for gctc-ntg-context-518@m.gmane-mx.org; Thu, 02 Jul 2020 17:21:56 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3435B185251; Thu, 2 Jul 2020 17:21:38 +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 BoKoN2QaEP_l; Thu, 2 Jul 2020 17:21:37 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 50571185513; Thu, 2 Jul 2020 17:21:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 89C50185509 for ; Thu, 2 Jul 2020 17:21:36 +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 wxnSVSR8-5wt for ; Thu, 2 Jul 2020 17:21:35 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.43; helo=mail-wr1-f43.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Original-Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 EACA2185251 for ; Thu, 2 Jul 2020 17:21:35 +0200 (CEST) Original-Received: by mail-wr1-f43.google.com with SMTP id a6so28992918wrm.4 for ; Thu, 02 Jul 2020 08:21:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=SUgwLenYalCveY/zfQpbz6Dj21idf1WAD9EJqwjAgNg=; b=nbBKFr8QJqowX2yVlNrdZK/McxijvzQXovP3paR1yuqtSV6OT03zUGrFs63Ef7OfaD TOcTt8NkJaJe6Bo0IhaS0dOOo3S/YW+H06s+BDuPt2yY9Gz4dP+e3HuxU+lh2dFxO53s JmEmtoI5lR6sWpFYuouawF29DOy8ZtiqsbiX6KTt4KDo+V/PHyOSMo9RnDDbSB5Wbeol Gih89ehtTpFjtVcssDUyXFZ33PSdkolURsZbU/WAwH/Zmjg5XYDFyd+NeypXwKfEyRaZ M4dSpEgr7XBW8NBEAxuoErbnQ2TWm9umBvWkMbEp7XMcsXHv+xYn+59CAZsEFzG47rzL haFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=SUgwLenYalCveY/zfQpbz6Dj21idf1WAD9EJqwjAgNg=; b=I9xZi9++6XtGvlqSykQByKLfdY56dp7ZjDLUNO/D+r/AjvQQATnteDsha8Jw/3dJyT cISJ2FvxxrmKGGNbo7DMOdLfySHf+hwlyDtEuzxruve2Qz58xfuAU9s3Qt6KPKLsCTEl UA5YSsAdzULni44ayb0GiMIPgg+zJnEWpVET0oi9NjOTd1eRTmVKfPHdkHA7rtSyZyRJ iV5PvFr0LTrG9/lRV7jjRwjWRaxRz+RB/hd0Kh7bmXzXRMtAoX5UhP09ger4zK+AuYFe cFjW5nA9pEVQeCguAsPlYt7w1i6WAuY+aXPMQ5Kbww+VAeaO/nwYwYTSkcz/zjkPc+5A 8erw== X-Gm-Message-State: AOAM532bDdqulw1bT1pEiyms7wupo8D9NrPL5IsuKgaiI5POysxWtig8 Omu395f2vakw0PsnwuwhfDy4jq93UJKwYTLooxO/xW1m X-Google-Smtp-Source: ABdhPJz8jwR+nUk7cnC2ssoU67lIwMo26WB+ge7htj+YhmRyJ9bjv7zfFlAxAb0bBzoTDqNAdP/uU+5aRprMtIEEcTQ= X-Received: by 2002:a5d:504b:: with SMTP id h11mr31373829wrt.160.1593703295454; Thu, 02 Jul 2020 08:21:35 -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" Xref: news.gmane.io gmane.comp.tex.context:107928 Archived-At: --===============1599453381618027478== Content-Type: multipart/alternative; boundary="000000000000cd902405a976f66e" --000000000000cd902405a976f66e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello everyone and in particular to Wolfgang who has already provided me with the solution below. I will have to write a Mathematics book for my students and the remarks and graphics should be in the right margin. I got the code written by Wolfgang and tried to include the graphics in it. The result is not as expected because the graphic overflows on the text. The course will be written in A4 format with an 11 pts font. Thanks for your help. Fabrice \useMPlibrary[dum] \setuppapersize[A4] \setuplayout [width=3D12cm, rightmargin=3D5cm] \definemargindata[marginfigure][inright] \setupmargindata [marginfigure][command=3D\vbox,align=3Dmiddle] \defineuserdata [margintext] [alternative=3Dmargintext] \defineuserdataalternative [margintext] [renderingsetup=3Duserdata:marginte= xt] \startsetups [userdata:margintext] \margindata [inright] [%style=3D\smallbodyfont, style=3D{\switchtobodyfont[9pt]}, width=3D\rightmarginwidth, align=3D{flushleft,broad}] {{\bf Remarque =E2=80=94 }\getinlineuserdata} \stopsetups \showframe \starttext \startuserdata[margintext] \input ward \stopuserdata \marginfigure{\externalfigure[dummy][width=3D\rightmarginwidth]} \startchapter[title=3DFirst chapter] \dorecurse{2}{\input knuth} \stopchapter \stoptext --000000000000cd902405a976f66e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello everyone and in particular to Wolfgang who h= as already provided me with the solution below. I w= ill have to write a Mathematics book for my students and the remarks and gr= aphics should be in the right margin. I got the cod= e written by Wolfgang and tried to include the graphics in it. The result is not as expected because the graphic overflows on = the text.
The course will be written in A4 forma= t with an 11 pts font.
Thanks for your help.
Fabrice

=
\useMPlibrary[dum]

\setuppapersize[A4]

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

\defi= nemargindata[marginfigure][inright]
\setupmargindata [marginfigure][comm= and=3D\vbox,align=3Dmiddle]

\defineuserdata [margintext] [alternativ= e=3Dmargintext]

\defineuserdataalternative [margintext] [renderingse= tup=3Duserdata:margintext]

\startsetups [userdata:margintext]
=C2= =A0 \margindata
=C2=A0 =C2=A0 [inright]
=C2=A0 =C2=A0 [%style=3D\smal= lbodyfont,
=C2=A0 =C2=A0 =C2=A0style=3D{\switchtobodyfont[9pt]},
=C2= =A0 =C2=A0 =C2=A0width=3D\rightmarginwidth,
=C2=A0 =C2=A0 =C2=A0align=3D= {flushleft,broad}]
=C2=A0 =C2=A0 {{\bf Remarque =E2=80=94 }\getinlineuse= rdata}
\stopsetups

\showframe
\starttext
\startuserdata[mar= gintext]
=C2=A0\input ward
\stopuserdata
\marginfigure{\externalfi= gure[dummy][width=3D\rightmarginwidth]}
\startchapter[title=3DFirst chap= ter]
\dorecurse{2}{\input knuth}
\stopchapter
\stoptext
--000000000000cd902405a976f66e-- --===============1599453381618027478== 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== --===============1599453381618027478==--