On 26-jun-04, at 20:13, Hans Hagen Outside wrote:
dr. Hans van der Meer wrote:
Hans,
I definitely see problems with the \starttextbackground[]-\stoptextbackground environment (discussed in the "displays"-brochure).
When the textbackground falls at a page crossing -- i.e. starts at the top of a page -- the coloring extends backwards on the page just left.
It can be remedied by putting a \null just in front of \starttextbackground. The extra vertical space this introduces just manages to constrain the background to its own page. However, this is not a general solution, on other places the extra vertical space is certainly not wanted.
I cannot find the exact nature of the problem. I suspect it has to do with the \output-routines, but these are not my speciality, to say the least. So, not much help there,
Also, the \starttextbackground does not respect footnotes, these are colored. In contrast, the old \startbackground-\stopbackground does respect footnotes. The coloring stops at the footnote and restarts at the next page. I should like that for \starttextbackground as well.
can you make me a minimal example of where things go wrong (keep in mind that there are two methods, tex and paragraph)
with respect to footnotes, maybe i can make that an option (there are more exceptions)
Hans
Here is the smallest one I could construct that shows the page crossing effect. I used the "location=paragraph". With "location=text" I did not experiment.
Here follows the code:
% testing textbackgroundcolor \setupbodyfont[12pt] % using the default cmr font \setuppapersize[S6][S6] \setuplayout[width=middle,location=middle,header=0pt,footer=4ex] \setuppagenumbering[location={footer,inright},alternative=singlesided] % \setupcolors [state=start] \definecolor [lavender] [r=.901961,g=.901961,b=.980392] \definecolor [lavenderblush] [r=1,g=.941176,b=.960784] % general page coloring
\setupbackgrounds[page][background=color,backgroundcolor=lavenderblush] % % special background coloring for parts of the text \definetextbackground[A][frame=off,location=paragraph, backgroundcolor=lavender,backgroundoffset=0pt] \starttext % \dorecurse{10}{Some text that must fill a portion of the page. }\par \dorecurse{10}{Some text that must fill a portion of the page. }\par \dorecurse{10}{Some text that must fill a portion of the page. }\par % % WITH 8 AND 9 IN THE NEXT RECURSION THE FIRST PARAGRAPH ON PAGE 2 HAS % THE BACKGROUND COLORED BUT THE WHITESPACE BELOW THE LAST PARAGRAPH ON % PAGE 1 IS COLORED TOO. % CHANGE THE 8/9 TO 10 AND THE COLORING ON PAGE 1 DISPAPPEARS. % I HAVE BECOME ACROSS SITUATIONS WERE THE COLORING EXTENDED STILL % FURTHER BACK OVER MORE PRECEDING PARAGRAPHS, BUT IT IS DIFFICULT TO % CONSTRUCT A MINIMAL EXAMPLE FOR THAT. \dorecurse{9}{Some text that must fill a portion of the page. }\par % % THIS SHOULD COLOR THE FIRST PARAGRAPH ON PAGE 2 \starttextbackground[A] \dorecurse{5}{Text with the background. } \stoptextbackground \dorecurse{10}{Some text that must fill a portion of the page. }\par % \stoptext
I hope you can find what causes it, because I like the effects.
Keeping footnotes free from the coloring would be very great if it could be accomplished (same as for interposed floats), like:
-- text on page containing reference to footnote, not colored background
-- text on page with colored background
-- footnote not colored (or perhaps the same coloring as where the reference occurs?)
-- text on next page goes on with colored background
Hans van der Meer
_______________________________________________ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context