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
___________________________________________________________________________________

Reply via email to