Re: Sequential Numbers on Pictures
Bruce Horrocks <[email protected]>
| Newsgroups | gmane.comp.tex.context |
|---|---|
| Message-ID | <[email protected]> |
> On 15 Aug 2026, at 10:06, Jeroen <[email protected]> wrote: > > In order to add pictures to a procedure, I would like to add 2x1 or a 4x4 startcombination as below. To match for example step 3 of the procedure to the first picture and step 7 to the second, I would like somehow to add number 3 and 7 to both pictures with the numbers in a black circle. I would like to have the numbers located on the picture itself so not above or below but with some kind of control so sometimes it is at the left top and sometimes at the right top corner of the picture. Is there an easy way to achieve this with MP or even Tikz? > • > +----------------+--------------+ > | ___ | ___ | > | / 3 \ | / 7 \ | > | \___/ | \___/ | > | | | > | | | > | | | > | | | > | | | > +----------------+--------------+ > • \startplacefigure[location=here] > \startcombination[distance=2mm,after=,nx=2,ny=1,location=middle] > \startcontent > \externalfigure[mill.png] [width=.4\textwidth] > \stopcontent > \startcontent > \externalfigure[hacker.jpg][width=.4\textwidth] > \stopcontent > \stopcombination > \stopplacefigure > I pulled this together from the example in the Wiki here: <https://wiki.contextgarden.net/Graphics_and_media/Boxes_and_stacking_mechanisms/Collectors> The 'location' keyword is a bit of a mystery: if it is the same as 'corner' then the item is placed outside the cumulative bounds of the composed item so far. If diagonally opposite then it seems to be placed within the bounds of the composed object so far. \setupexternalfigures[location={local,default}] \startuseMPgraphic{Circle} fill fullcircle scaled 20pt withcolor \mycolor; \stopuseMPgraphic \def\mycolor{red} \definecollector[Upper] \setcollector[Upper] {\externalfigure[mill.png][width=.4\textwidth]} \setcollector[Upper] [corner={right,bottom},location={left,top}] {\useMPgraphic{Circle}} \setcollector[Upper] [corner={right,bottom},location={left,top}] {\framed[frame=off,width=20pt]{\color[white]{01}}} \def\mycolor{yellow} \definecollector[Lower] \setcollector[Lower] \setcollector[Lower] {\externalfigure[hacker.jpg][width=.4\textwidth]} \setcollector[Lower] [corner={left,top}, location={right,bottom}] {\useMPgraphic{Circle}} \setcollector[Lower] [corner={left,top}, location={right,bottom}] {\framed[frame=off,width=20pt]{\color[blue]{2}}} \startplacefigure[location=here] \startcombination[distance=2mm,after=,nx=2,ny=1,location=middle] \startcontent \composedcollector{Upper} \stopcontent \startcontent \composedcollector{Lower} \stopcontent \stopcombination \stopplacefigure -- Bruce Horrocks Hampshire, UK ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________