Re: [NTG-context] Centering an image in framed.

2008-12-03 Thread Bart Wise
On Wednesday 03 December 2008 12:35:43 am Hans Hagen wrote:
> Bart C. Wise wrote:
> > I am using framed and externalfigure commands. I want to put a rule
> > around the image; however, the image has space around all sides. It
> > appears that the top, right, and left sides has the same gap. However,
> > the bottom side has a huge (by comparison) gap. So I can't use a
> > negative offset to fix the problem.
>
> strut=no
>
> > How do I center the image & place a border?
> >
> > \framed[location=middle,height=fit,width=fit,rulethickness=1.0pt]{%
> >
> > \externalfigure[image-01.png][maxwidth=3cm,maxheight=4cm]
> >
> > }
>
> \framed[strut=no,offset=2mm,rulethickness=1.0pt]{...}
>
> or just
>
> \externalfigure[image-01.png][maxwidth=3cm,maxheight=4cm,frame=on]
>
Thanks for your help! And extremely quick response.
Bart
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Centering an image in framed.

2008-12-03 Thread Hans Hagen
Bart C. Wise wrote:
> On Wednesday 03 December 2008 12:23:05 am Bart C. Wise wrote:
> 
>  > I am using framed and externalfigure commands. I want to put a rule 
> around
> 
>  > the image; however, the image has space around all sides. It appears that
> 
>  > the top, right, and left sides has the same gap. However, the bottom side
> 
>  > has a huge (by comparison) gap. So I can't use a negative offset to fix
> 
>  > the problem. How do I center the image & place a border?
> 
>  >
> 
>  > \framed[location=middle,height=fit,width=fit,rulethickness=1.0pt]{%
> 
>  > \externalfigure[image-01.png][maxwidth=3cm,maxheight=4cm]
> 
>  > }
> 
>  >
> 
>  > Thanks,
> 
>  > Bart
> 
> Solved!
> 
> I figured it out (after 400 attempts). By adding the strut=no, that 
> centered the picture without differing offsets, then I added the 
> offset=0pt. Now the image is centered with a border.
> 
> \framed[
> 
> frameoffset=0pt,
> 
> height=fit,
> 
> location=middle,
> 
> rulethickness=1.0pt,
> 
> offset=0pt,
> 
> strut=no,
> 
> width=fit,
> 
> ]{%
> 
> \externalfigure[image-01.png][maxwidth=3cm,maxheight=4cm]
> 
> }

then just use:

\framed[offset=overlay,rulethickness=1.0pt]{...}

it really makes sense to play with \framed and its parameters since it's 
uses all over the place, so 400 attemps is a good start; when playing, 
say \showstruts and you'll see where context adds struts

Hans



-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Centering an image in framed.

2008-12-02 Thread Hans Hagen
Bart C. Wise wrote:
> I am using framed and externalfigure commands. I want to put a rule 
> around the image; however, the image has space around all sides. It 
> appears that the top, right, and left sides has the same gap. However, 
> the bottom side has a huge (by comparison) gap. So I can't use a 
> negative offset to fix the problem.

strut=no

> How do I center the image & place a border?
> 
> \framed[location=middle,height=fit,width=fit,rulethickness=1.0pt]{%
> 
> \externalfigure[image-01.png][maxwidth=3cm,maxheight=4cm]
> 
> }

\framed[strut=no,offset=2mm,rulethickness=1.0pt]{...}

or just

\externalfigure[image-01.png][maxwidth=3cm,maxheight=4cm,frame=on]

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Centering an image in framed.

2008-12-02 Thread Bart C. Wise
On Wednesday 03 December 2008 12:23:05 am Bart C. Wise wrote:
> I am using framed and externalfigure commands.  I want to put a rule around
> the image; however, the image has space around all sides.  It appears that
> the top, right, and left sides has the same gap.  However, the bottom side
> has a huge (by comparison) gap.  So I can't use a negative offset to fix
> the problem. How do I center the image & place a border?
>
> \framed[location=middle,height=fit,width=fit,rulethickness=1.0pt]{%
> \externalfigure[image-01.png][maxwidth=3cm,maxheight=4cm]
> }
>
> Thanks,
> Bart
Solved!

I figured it out (after 400 attempts).  By adding the strut=no, that centered 
the picture without differing offsets, then I added the offset=0pt.  Now the 
image is centered with a border.

\framed[
frameoffset=0pt,
height=fit,
location=middle,
rulethickness=1.0pt,
offset=0pt,
strut=no,
width=fit,
]{%
\externalfigure[image-01.png][maxwidth=3cm,maxheight=4cm]
}

___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Centering an image in framed.

2008-12-02 Thread Bart C. Wise
I am using framed and externalfigure commands.  I want to put a rule around the 
image; however, the image has space around all sides.  It appears that the 
top, right, and left sides has the same gap.  However, the bottom side has a 
huge (by comparison) gap.  So I can't use a negative offset to fix the problem.
How do I center the image & place a border?

\framed[location=middle,height=fit,width=fit,rulethickness=1.0pt]{%
\externalfigure[image-01.png][maxwidth=3cm,maxheight=4cm]
}

Thanks,
Bart

___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___