Am 23.03.2012 um 23:55 schrieb Thomas A. Schmitz: > Hi all, > > maybe I'm overlooking something obvious, but...: when I have a figure, I can > calculate its width dependent on the page width, and it will adapt: > > \starttext > > \externalfigure[cow][width=0.6\textwidth] > > \stoptext > > But is there a method for similar calculations inside a frame? Here's what I > tried, but it doesn't give the expected result (the image is much smaller > than expected): > > \starttext > > \framed[width=7cm]{\externalfigure[cow][width=\the\dimexpr0.9\framedparameter{width}\relax]} > > \stoptext
When you set a value for the align-key the \framed command uses a \vbox for the content and you can use \hsize for the width. \starttext \framed[width=7cm,align=middle]{\externalfigure[cow][width=0.9\hsize]} \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________