[NTG-context] Store images and text in the right margin

Taco Hoekwater taco at elvenkind.com
Mon Jul 6 16:34:49 CEST 2020


Hi Fabrice,

Like this maybe? It depends on what you want to achieve exactly, I think

\useMPlibrary[dum]

\setuppapersize[A4]

\setuplayout
  [width=12cm,
   rightmargin=5cm]

\defineuserdata [margintext] [alternative=margintext]

\defineuserdataalternative [margintext] [renderingsetup=userdata:margintext]

\startsetups [userdata:margintext]
  \margindata
    [inright]
    [style={\switchtobodyfont[9pt]},
     width=\rightmarginwidth,
     align={flushleft,broad},
     stack=yes]
    {\startframedtext[before=,after=,offset=0pt,width=max,frame=off]
     \getinlineuserdata
     \stopframedtext}
\stopsetups

\showframe
\starttext
\startuserdata[margintext]
 {\bf Remarque — }\input ward
\stopuserdata
\startuserdata[margintext]
 \externalfigure[dummy][width=\rightmarginwidth]
\stopuserdata
\startchapter[title=First chapter]
\dorecurse{2}{\input knuth}
\stopchapter
\stoptext


> On 6 Jul 2020, at 16:18, Fabrice Couvreur <fabrice1.couvreur at gmail.com> wrote:
> 
> 
> 
> ---------- Forwarded message ---------
> De : Fabrice Couvreur <fabrice1.couvreur at gmail.com>
> Date: lun. 6 juil. 2020 à 12:10
> Subject: Re: [NTG-context] Store images and text in the right margin
> To: Marco <lists at 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 include both text and figures ?
> Thank you
> Fabrice


More information about the ntg-context mailing list