Re: [NTG-context] Framed text in paragraphs too wide

2010-04-06 Thread Hans Hagen

On 6-4-2010 5:11, Matthias Weber wrote:

Thanks Aditya,

that is what I need. I don't really understand the difference between
framedtext and textbackground, but all my framing and coloring
desires seem to be realizable with framedtext.


framedtext is the older mechanism, with some limitations but pure tex

textbackground is more advanced using metapost; it can nest backgrounds, 
have inline backgrounds, etc



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


[NTG-context] Framed text in paragraphs too wide

2010-04-05 Thread Matthias Weber

Dear all,

my problem with framed text persists in paragraphs: The frame extends  
over the entire page as soon as the

paragraph has more than one line. Problem exists in mkii and mkiv.
Minimal example below.

Thanks,

Matthias


\setupcolors[state=start]
\setupcolor[rgb]


\definetextbackground   [defbackground]
[backgroundcolor=lightgray,
background=color,
frame=on,
location=paragraph]


\defineparagraphs   [TwoThird][n=2]
\setupparagraphs[TwoThird]
[1]
[width=.66\textwidth]


\starttext

\startTwoThird
\starttextbackground[defbackground]
The frame is too wide.
The frame is too wide.
The frame is too wide.
\stoptextbackground
%
\nextTwoThird
\placefigure
[here]
[figure:cow]
{Mooh}
{\externalfigure[cow][width=.3\textwidth]}
\stopTwoThird

\stoptext
___
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
___


Re: [NTG-context] Framed text in paragraphs too wide

2010-04-05 Thread Aditya Mahajan

On Mon, 5 Apr 2010, Matthias Weber wrote:


Dear all,

my problem with framed text persists in paragraphs: The frame extends over 
the entire page as soon as the

paragraph has more than one line. Problem exists in mkii and mkiv.
Minimal example below.


I have seen this before when trying to use textbacground to highlight 
stuff in tables. I don't know a solution, but if want to highlight whole 
paragrah, and do not want the ability to split across pages, you can use 
framed texts.


\setupcolors[state=start]
\setupcolor[rgb]


\defineframedtext
  [defbackground]
  [backgroundcolor=lightgray,
   background=color,
   width=broad,
   frame=on,
   location=paragraph]


\defineparagraphs
  [TwoThird][n=2]
\setupparagraphs
  [TwoThird]
  [1]
  [width=.66\textwidth]


\starttext

\startTwoThird
\startdefbackground
The frame is too wide.
The frame is too wide.
The frame is too wide.
\stopdefbackground
%
\nextTwoThird
\placefigure
[here]
[figure:cow]
{Mooh}
{\externalfigure[cow][width=.3\textwidth]}
\stopTwoThird

\stoptext

Aditya
___
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
___


Re: [NTG-context] Framed text in paragraphs too wide

2010-04-05 Thread Matthias Weber

Thanks Aditya,

that is what I need. I don't really understand the difference between  
framedtext and textbackground, but all my framing and coloring

desires seem to be realizable with framedtext.

Matthias


On Apr 5, 2010, at 7:50 PM, Aditya Mahajan wrote:


On Mon, 5 Apr 2010, Matthias Weber wrote:


Dear all,

my problem with framed text persists in paragraphs: The frame  
extends over the entire page as soon as the

paragraph has more than one line. Problem exists in mkii and mkiv.
Minimal example below.


I have seen this before when trying to use textbacground to  
highlight stuff in tables. I don't know a solution, but if want to  
highlight whole paragrah, and do not want the ability to split  
across pages, you can use framed texts.


\setupcolors[state=start]
\setupcolor[rgb]


\defineframedtext
 [defbackground]
 [backgroundcolor=lightgray,
  background=color,
  width=broad,
  frame=on,
  location=paragraph]


\defineparagraphs
 [TwoThird][n=2]
\setupparagraphs
 [TwoThird]
 [1]
 [width=.66\textwidth]


\starttext

\startTwoThird
\startdefbackground
The frame is too wide.
The frame is too wide.
The frame is too wide.
\stopdefbackground
%
\nextTwoThird
\placefigure
[here]
[figure:cow]
{Mooh}
{\externalfigure[cow][width=.3\textwidth]}
\stopTwoThird

\stoptext

Aditya
___
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
___