From: "dr. Hans van der Meer" <hansm@science.uva.nl>
Subject: Re: textbackground
Date: Sun, 27 Jun 2004 10:38:52 +0200 [thread overview]
Message-ID: <6B62B759-C815-11D8-9564-003065568054@science.uva.nl> (raw)
In-Reply-To: <40DDBCDA.1080406@wxs.nl>
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
next prev parent reply other threads:[~2004-06-27 8:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-26 12:47 textbackground dr. Hans van der Meer
2004-06-26 18:13 ` textbackground Hans Hagen Outside
2004-06-27 8:38 ` dr. Hans van der Meer [this message]
2004-06-29 9:12 ` textbackground Hans Hagen
2004-06-29 9:23 ` textbackground Hans Hagen
2005-03-17 10:38 textbackground Duncan Hothersall
2011-11-19 12:50 textbackground Hans van der Meer
2015-02-26 9:22 textbackground Alan BRASLAU
2015-02-26 9:54 ` textbackground Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6B62B759-C815-11D8-9564-003065568054@science.uva.nl \
--to=hansm@science.uva.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).