Thanks Luigi. I did not know where exactly to put the width command.
Your solution works great.


On Tue, Nov 24, 2009 at 9:20 PM, luigi scarso <luigi.sca...@gmail.com> wrote:
> On Wed, Nov 25, 2009 at 2:44 AM, Curiouslearn <curiousle...@gmail.com> wrote:
>> Please see the figure generated by the following minimal example. Due
>> to the dimensions chosen in the figure, the figure is wider than the
>> text width. Is there an option in \placefigure or another command that
>> can help to make this figure smaller (without changing the code of the
>> original figure)?
>>
>>  Thank you.
>>
>> \setuppapersize[letter][letter]
>> \setuplayout[leftedge=0in,leftmargin=1in,leftmargindistance=0in,rightmargin=1in,rightmargindistance=0in,rightedge=0in,leftedgedistance=0in,rightedgedistance=0in,topspace=0.5in,width=6.5in,height=10in]
>>
>> \setupcolors[state=start]
>>
>>
>> \starttext
>>        \startuseMPgraphic{firstFig}
>>                numeric u;
>>                u:=1in;
>>                draw (0,0)--(4u,0) withpen pencircle scaled 2pt withcolor red;
>>        \stopuseMPgraphic
>>
>>        \startuseMPgraphic{secondFig}
>>                numeric u;
>>                u:=1in;
>>                draw (0,0)--(4u,0) withpen pencircle scaled 2pt withcolor 
>> blue;
>>        \stopuseMPgraphic
>>
>>        \placefigure[here]{Two figures next to each other}
>>        \startcombination[2*1]
>>                {\useMPgraphic{firstFig}}{(a)}
>>                {\useMPgraphic{secondFig}}{(b)}
>>        \stopcombination
>>
>> It can be seen that due to the dimensions in the figure, the figure is
>> wider than the text. Is there a way to make the figure as wide as the
>> text by setting some option of "\placefigure".
>>
>> \stoptext
>
>
> \setuppapersize[letter][letter]
> \setuplayout[leftedge=0in,leftmargin=1in,leftmargindistance=0in,rightmargin=1in,rightmargindistance=0in,rightedge=0in,leftedgedistance=0in,rightedgedistance=0in,topspace=0.5in,width=6.5in,height=10in]
>
> \setupcolors[state=start]
>
>
> \definemeasure[textgap]  [\dimexpr 1em\relax]
> \definecombination[both][distance=\measure{textgap}]
>
>
> \showframe
> \starttext
>       \startuseMPgraphic{firstFig}
>               numeric u;
>               u:=1in;
>               draw (0,0)--(4u,0) withpen pencircle scaled 2pt withcolor red;
>       \stopuseMPgraphic
>
>       \startuseMPgraphic{secondFig}
>               numeric u;
>               u:=1in;
>               draw (0,0)--(4u,0) withpen pencircle scaled 2pt withcolor blue;
>       \stopuseMPgraphic
>
>       \placefigure[here]{Two figures next to each other}
>       \startcombination[both][2*1]
>               {\scale[width=\dimexpr
> 0.5\textwidth-0.5\measure{textgap}\relax]{\useMPgraphic{firstFig}}}{(a)}
>               {\scale[width=\dimexpr
> 0.5\textwidth-0.5\measure{textgap}\relax]{\useMPgraphic{secondFig}}}{(b)}
>       \stopcombination
>
> It can be seen that due to the dimensions in the figure, the figure is
> wider than the text. Is there a way to make the figure as wide as the
> text by setting some option of "\type{\placefigure}".
>
> \stoptext
>
> --
> luigi
> ___________________________________________________________________________________
> 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to