ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Textbackgrounds interrupted by floats
       [not found] <mailman.48.1428421233.2431.ntg-context@ntg.nl>
@ 2015-04-08 12:12 ` Robin.Kirkham
  0 siblings, 0 replies; 3+ messages in thread
From: Robin.Kirkham @ 2015-04-08 12:12 UTC (permalink / raw)
  To: ntg-context

On 7 April 2015 21:53:40 AEST, Wolfgang Schuster wrote:

>> Am 07.04.2015 um 13:31 schrieb Robin.Kirkham@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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Textbackgrounds interrupted by floats
  2015-04-07 11:31 Robin.Kirkham
@ 2015-04-07 11:53 ` Wolfgang Schuster
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2015-04-07 11:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 07.04.2015 um 13:31 schrieb Robin.Kirkham@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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Textbackgrounds interrupted by floats
@ 2015-04-07 11:31 Robin.Kirkham
  2015-04-07 11:53 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Robin.Kirkham @ 2015-04-07 11:31 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-08 12:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.48.1428421233.2431.ntg-context@ntg.nl>
2015-04-08 12:12 ` Textbackgrounds interrupted by floats Robin.Kirkham
2015-04-07 11:31 Robin.Kirkham
2015-04-07 11:53 ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).