ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Background color spaning columns.
@ 2008-03-03 20:20 Bart Wise
  2008-03-03 22:41 ` Aditya Mahajan
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Wise @ 2008-03-03 20:20 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

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

* Re: Background color spaning columns.
  2008-03-03 20:20 Background color spaning columns Bart Wise
@ 2008-03-03 22:41 ` Aditya Mahajan
  2008-03-03 23:28   ` Bart Wise
  0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2008-03-03 22:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 3 Mar 2008, Bart Wise wrote:

> 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.

I have encountered this problem in the past. This is a limitations of the 
simple column mechanism.

> 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.)

Use columnsets. They are not as easy and simple as columns, but they 
provide a lot more features. See the columnset manual for details about 
using them.

Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: Background color spaning columns.
  2008-03-03 22:41 ` Aditya Mahajan
@ 2008-03-03 23:28   ` Bart Wise
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Wise @ 2008-03-03 23:28 UTC (permalink / raw)
  To: ntg-context

Thanks for the insight.  I'll give it a try with columnsets.

Bart

On Monday March 3 2008, Aditya Mahajan wrote:
> On Mon, 3 Mar 2008, Bart Wise wrote:
> > 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.
>
> I have encountered this problem in the past. This is a limitations of the
> simple column mechanism.
>
> > 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.)
>
> Use columnsets. They are not as easy and simple as columns, but they
> provide a lot more features. See the columnset manual for details about
> using them.
>
> Aditya
> ___________________________________________________________________________
>________ 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
> ___________________________________________________________________________
>________
___________________________________________________________________________________
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
___________________________________________________________________________________


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

end of thread, other threads:[~2008-03-03 23:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-03 20:20 Background color spaning columns Bart Wise
2008-03-03 22:41 ` Aditya Mahajan
2008-03-03 23:28   ` Bart Wise

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).