ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Bart Wise <bntgcontext@wiseguysweb.com>
To: ntg-context@ntg.nl
Subject: Background color spaning columns.
Date: Mon, 3 Mar 2008 13:20:22 -0700	[thread overview]
Message-ID: <200803031320.22666.bntgcontext@wiseguysweb.com> (raw)

I am trying change the background color of some text.  It works fine if I am 
using one column.  It also works fine if I am using multiple columns, but 
restricting my background color changes to only a single line of text in a 
column.  

However, if I have a section that I want to I change, and that section spans 
more than one line in a given column it does not work.  What happens is that 
the background starts to change where you have indicated; however, instead of 
stopping at the end of the column, the background color changes for the 
entire text.  See the subject entitled "Problem 1" below for an example.  Is 
there a fix for this (and no, using a single column is not a solution.)

Problem #2 is the same thing only the background change starts in the first 
column and extends to the second.  In this case the output is even worse.  
It's difficult to describe, so run the code.

Solutions?

Thanks,
Bart

*******************************
* Sample Code --- #1
*******************************
\setupcolors[state=start]
\definetextbackground[highlight][
        backgroundcolor=yellow,
        frame=off,
        location=text,
        color=black]
\definestartstop[Highlight][
    before={\starttextbackground[highlight]},
    after=\stoptextbackground]

\starttext
\subject{Problem 1}
\startcolumns
It was a·
\starthighlight dark·
and stormy night;  the rain fell in torrents --- except at
occasional intervals, when it was checked by a·
violent\stoptextbackground~
gust of wind which swept
up the streets (for it is in London that our scene lies), rattling along the
housetops, and fiercely agitating the scanty flame of the lamps that struggled
against the darkness.
\stopcolumns

\subject{Problem 2}
\startcolumns
It was a dark and stormy night;  the rain fell in torrents --- except at
occasional intervals, when it was checked by a violent gust of wind which·
\starthighlight·
swept up the streets (for it is in London that our scene lies), rattling along
the housetops, and fiercely agitating the scanty flame
\stophighlight
of the lamps that struggled
against the darkness.
\stopcolumns

\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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2008-03-03 20:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 20:20 Bart Wise [this message]
2008-03-03 22:41 ` Aditya Mahajan
2008-03-03 23:28   ` Bart Wise

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=200803031320.22666.bntgcontext@wiseguysweb.com \
    --to=bntgcontext@wiseguysweb.com \
    --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).