Fwd: Store images and text in the right margin
---------- Forwarded message ---------
De : Fabrice Couvreur
Hi Marco, Without being a specialist, I knew the \blank command, but I too thought that there must be another solution. Thank you for your help. Fabrice
Le ven. 3 juil. 2020 à 11:04, Marco
a écrit : On Fri, 3 Jul 2020 10:39:41 +0200 Fabrice Couvreur
wrote: I think there should be a space between comments and figures.
Maybe you can add manual \blank[…] in the margindata setups, e.g.
... {\blank{\bf Remarque — }\getinlineuserdata\blank}
Otherwise I'm sure there's a more elegant solution using dedicated keys, but as I haven't used that mechanism for a while I can't tell which works. Maybe manual blanks already do the job.
Marco
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
wrote: ---------- Forwarded message --------- De : Fabrice Couvreur
Date: lun. 6 juil. 2020 à 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
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 à 16:35, Taco Hoekwater
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
wrote: ---------- Forwarded message --------- De : Fabrice Couvreur
Date: lun. 6 juil. 2020 à 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
___________________________________________________________________________________
participants (2)
-
Fabrice Couvreur
-
Taco Hoekwater