The wiki page for \setupexternalfigure says
     "Show frame around image. Most(?) options of \setupframed are usable!"

I tried to put a frame around a picture (using \externalfigure with
frame=on) but I didn't get the frame to play nicely (see example below).  I
can get the frame where I want it if instead I do
     \framed[frame=on,...]{\externalfigure...}
but this leaves me wondering whether
(1) I am misinterpreting the wiki pages,
(2) The wiki pages are misleading/wrong, or
(3) There is a bug in some code.

If anyone would care to enlighten me, I would appreciate it.

In particular, the offset=... option of \externalfigure does not seem to be
consistent with the offset=... option of \framed.

Here is the example... one and all should be able to directly run it, but
the text above and below each picture may make the issues clear without
having to run the code.  (The result I was looking for is the second figure
in this example.)

Thanks.
                                Jim

%%%%%%%%%%%%%%%%%%%%%%%%%%% cut here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setuppapersize[legal]

\starttext

fr[ef] with frameoffset=1cm: This preceding text ends up inside the frame.

\framed[frame=on,frameoffset=1cm]{\externalfigure[cow][width=3cm,frame=on]}

This following text ends up inside the frame.


\vskip0.25 in\hrule\vskip0.25 in


fr[ef] with offset=1cm: This preceding text is above the frame as desired.

\framed[frame=on,offset=1cm]{\externalfigure[cow][width=3cm,frame=on]}

This following text is below the frame, as desired.


\vskip0.25 in\hrule\vskip0.25 in


ef[fr] with frameoffset=1cm: This preceding text ends up inside the frame.

\externalfigure[cow][width=3cm,frame=on,frameoffset=1cm]

This following text ends up inside the frame.


\vskip0.25 in\hrule\vskip0.25 in


ef[fr] with offset=1cm: The frame is tight to the image, not 1cm away.

\externalfigure[cow][width=3cm,frame=on,offset=1cm]

This following text ends up just below the image.


\vskip0.25 in\hrule\vskip0.25 in


ef[fr] with frameoffset=1cm,offset=1cm: This preceding text ends up inside
the frame.

\externalfigure[cow][width=3cm,frame=on,frameoffset=1cm,offset=1cm]

This following text ends up inside the frame.

\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
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
___________________________________________________________________________________

Reply via email to