Re: [NTG-context] Textbackgrounds interrupted by floats

2015-04-08 Thread Robin.Kirkham
On 7 April 2015 21:53:40 AEST, Wolfgang Schuster wrote:

 Am 07.04.2015 um 13:31 schrieb robin.kirk...@csiro.au:
 Here is problem that must have been asked about before, but I can’t seem to 
 find a solution on the archive or anywhere else. I want a colour background 
 for verbatim text (for code), and floating figures. However if a figure 
 floats to the bottom (as in the example below), and the verbatim text is 
 broken over to the next page because it is long, I don’t want the colour 
 background under the figure as well — I want no background at all.
 What is the correct setup to do that?
 
 Add the following line to your document:
 
 \setconstant\kindofpagetextareas\plusone
 
 Wolfgang

Thanks Wolfgang, obscure but works perfectly — Robin
___
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] Textbackgrounds interrupted by floats

2015-04-07 Thread Robin.Kirkham
Folks,

Here is problem that must have been asked about before, but I can’t seem to 
find a solution on the archive or anywhere else. I want a colour background for 
verbatim text (for code), and floating figures. However if a figure floats to 
the bottom (as in the example below), and the verbatim text is broken over to 
the next page because it is long, I don’t want the colour background under the 
figure as well — I want no background at all.

What is the correct setup to do that?

Thanks, Robin

\setupexternalfigures[location=default]
\setupcolors[state=start]

\definetextbackground[code][
frame=off,
location=paragraph,
background=color,
backgroundcolor=yellow]
\setuptyping[typing][
%option=color,
before={\starttextbackground[code]},
after=\stoptextbackground]

\starttext

\startplacefigure[location=bottom]
\externalfigure[cow][width=0.5\textwidth]
\stopplacefigure

\input tufte

\starttyping
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
Long
\stoptyping

\input tufte

\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] Textbackgrounds interrupted by floats

2015-04-07 Thread Wolfgang Schuster

 Am 07.04.2015 um 13:31 schrieb robin.kirk...@csiro.au:
 
 Folks,
 
 Here is problem that must have been asked about before, but I can’t seem to 
 find a solution on the archive or anywhere else. I want a colour background 
 for verbatim text (for code), and floating figures. However if a figure 
 floats to the bottom (as in the example below), and the verbatim text is 
 broken over to the next page because it is long, I don’t want the colour 
 background under the figure as well — I want no background at all.
 
 What is the correct setup to do that?


Add the following line to your document:

\setconstant\kindofpagetextareas\plusone

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
___