Hello, Is there a way (magical option) to have the framedtext width adapt to the environment width where it is put? I've tried width=broad, but it always uses the page \textwidth, even if the framedtext is in an item or something like this. There is the same behaviour for background too. An example: \setuplayout[middle] \setupcolors[state=start] \defineframedtext[mybox] [width=broad, frame=on, before=\blank, after=\blank] \starttext Here is an example: \startitemize[n] \item \input tufte \startmybox Some text in the box \stopmybox \input tufte \stopitemize \stoptext Regards, BG
(Just to say it's a question I was going to post too) -a- On 22 May 2006, at 12:54, nico wrote:
Hello,
Is there a way (magical option) to have the framedtext width adapt to the environment width where it is put?
I've tried width=broad, but it always uses the page \textwidth, even if the framedtext is in an item or something like this. There is the same behaviour for background too.
An example:
\setuplayout[middle] \setupcolors[state=start]
\defineframedtext[mybox] [width=broad, frame=on, before=\blank, after=\blank]
\starttext
Here is an example:
\startitemize[n] \item \input tufte
\startmybox Some text in the box \stopmybox
\input tufte \stopitemize
\stoptext
Regards, BG _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea andrea.valle@unito.it
andrea valle wrote:
(Just to say it's a question I was going to post too)
-a-
On 22 May 2006, at 12:54, nico wrote:
Hello,
Is there a way (magical option) to have the framedtext width adapt to the environment width where it is put?
\defineframedtext[mybox] [width=local] Cheers, Taco
On 22 May 2006, at 15:10, Taco Hoekwater wrote:
\defineframedtext[mybox] [width=local]
Thanks Taco Definitively, from now on this \setupframedtexts[width=local] will be in my preferites -a- Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea andrea.valle@unito.it
On Mon, 22 May 2006 15:10:21 +0200, Taco Hoekwater
andrea valle wrote:
(Just to say it's a question I was going to post too)
-a-
On 22 May 2006, at 12:54, nico wrote:
Hello,
Is there a way (magical option) to have the framedtext width adapt to the environment width where it is put?
\defineframedtext[mybox] [width=local]
Thanks, It works fine for framedtext! Unfortunately it doesn't help with background. Another option? The same case with background instead of framedtext: \setuplayout[middle] \setupcolors[state=start] \setupbackground [background=screen, frame=on, strut=yes, width=local, before=\blank, after=\blank] \starttext Here is an example: \startitemize[n] \item \input tufte \startbackground Some backgrounded text \stopbackground \input tufte \stopitemize Regards, BG
On Mon, 22 May 2006, nico wrote:
On Mon, 22 May 2006 15:10:21 +0200, Taco Hoekwater
wrote: andrea valle wrote:
(Just to say it's a question I was going to post too)
-a-
On 22 May 2006, at 12:54, nico wrote:
Hello,
Is there a way (magical option) to have the framedtext width adapt to the environment width where it is put?
\defineframedtext[mybox] [width=local]
Thanks, It works fine for framedtext! Unfortunately it doesn't help with background. Another option?
Again, use textbackground. The following honors the present width \setuplayout[middle] \setupcolors[state=start] \definetextbackground[screen] [backgrond=screen, frame=on, strut=yes, width=local, location=paragraph] \starttext Here is an example, \startitemize[n] \item \input tufte \startscreen Some background test \stopscreen \stopitemize \stoptext Aditya
nico wrote:
Hello,
Is there a way (magical option) to have the framedtext width adapt to the environment width where it is put?
I've tried width=broad, but it always uses the page \textwidth, even if the framedtext is in an item or something like this. There is the same behaviour for background too.
An example:
\setuplayout[middle] \setupcolors[state=start]
\defineframedtext[mybox] [width=broad, frame=on, before=\blank, after=\blank]
well, this is what 'local' is for: \defineframedtext[mybox] [width=local,..] 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 -----------------------------------------------------------------
Hans Hagen wrote:
well, this is what 'local' is for:
\defineframedtext[mybox] [width=local,..]
(i hit send button too soon -) here we can use a keyword but when no such option is present one can say: \setlocalhsize \hsize\localhsize as in: \start \setlocalhsize \hsize\localhsize whatever content \par \stop 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 -----------------------------------------------------------------
participants (5)
-
Aditya Mahajan
-
andrea valle
-
Hans Hagen
-
nico
-
Taco Hoekwater