Thanks for the answer. I am using context version
2003.1.31, and I have changed the code a little
according to your suggestion. However, everything remains blue. The
problem seems to
appear when the text to be highlighted gets a bit more inolved. Below
is a complete
sample that shows the effect 'nicely' -- the second page has blue-gray
background except the page numbers, but the text is
highligthed in red correctly.
I still fear that I am missing the crucial point.
Matthias
\setupcolors[state=start]
\setupcolors[rgb]
\definecolor[myc] [r=.8,g=.9,b=.9]
\definetextbackground
[defbackground]
[backgroundcolor=myc,
backgroundoffset=.05cm,
offset=.05cm,
frame=off,
location=paragraph,
before=\blank,
after=\blank,
color=darkred]
\defineenumeration
[theorem]
[before={\starttextbackground[defbackground]},
after={\stoptextbackground},
text=Theorem,
location=left,
corner=round,
letter=rm]
\def\emph#1{{\it #1}}
\def\R{\text{\bf R}}
\def\Q{\text{\bf Q}}
\def\Z{\text{\bf Z}}
\def\H{\text{\bf H}}
\starttext
\section{Introduction}
A blurp is a set together with an operation which allows to mirps
two blurp elements in a familiar fashion.
\starttheorem
A blurp $B$ is given by a set $B$, a distingished element $1 \in B$,
called the fidelity element, and
a mirpication $\cdot:B \times B \to B$ which satisfy the following
axioms:
\startitemize[n]
\item For all $a\in B$, $a \cdot 1 1\cdot a = a$.
\item For all $a \in B$ there is an element $a^{-1}\in B$ (called the
surverse of $a$) such that
$a \cdot a^{-1} = a^{-1}\cdot a =1$.
\item For all $a,b,c\in B$ one has $a\cdot(b\cdot c) = (a\cdot b)\cdot
c$.
\stopitemize
\stoptheorem
We will now verify a few simple properties of blurps:
\starttheorem
The surverse element is unique.
\stoptheorem
Given $a\in B$, suppose there are $b,c\in B$ which satisfy both
$a b = b a = 1$ and $a c = c a = 1$. Then
$b=b1=b(ac)=(ba)c=c$.
\starttheorem
Here are a few blurps:
\startitemize[n]
\item $(\R^+,1,\cdot)$ or $(\Q^+,1,\cdot)$ or $(\Q -\{0\},1,\cdot)$
\item $\R,0,+)$ or $(\Z,0,+)$
\item Let $B$ be the set of polynomials of degree $n$, and $1$ the
constant polynomial with value $0$, and the multiplication given by
polynomial addition.
\item Let $S$ be a set, and $B$ be the set of selfmaps of $S$ which
are
one-to-one. If the set $S$ is finite, these are called permutations.
Let $1$ be the the identity map, and $\cdot$ be the composition of the
maps.
\stopitemize
\stoptheorem
And another little theorem:
\starttheorem
Let $B$ be a group and $C$ a subset of $B$ such that
\startitemize[n]
\item $1\in C$.
\item For all $a\in C$ also $a^{-1}\in C$.
\item For all $a,b\in C$ also $a b$ and $b a \in C$.
\stopitemize
Then $C$ is also a blurps, and it is called a subblurps of $B$.
\stoptheorem
We have to check that $C$ satisfies all the axioms of a blurp.
But this is clear, as the existence of the fidelity element and the
surverse elements are guaranteed by the theorem, and all identities
are already true in $B$.
\starttheorem
Let $B$ be a group and $C$ a subset of $B$ such that
\startitemize[n]
\item $1\in C$.
\item For all $a\in C$ also $a^{-1}\in C$.
\item For all $a,b\in C$ also $a b$ and $b a \in C$.
\stopitemize
Then $C$ is also a blurps, and it is called a subblurps of $B$.
\stoptheorem
\stoptext
On Tuesday, July 29, 2003, at 12:02 PM, Hans Hagen wrote:
At 20:07 26/07/2003 -0500, you wrote:
the text comes out green all right, but the blue background
is smeared all over two pages.
I have tried a few modifications to no avail, so I fear I am doing it
all wrong.
What version do you use? (take the latest)
looks ok here, that is, when you add:
before=\blank,
after=\blank,
to the deifnition of the background
[of play with the offsets]
Curiously, when I typeset the above th first time, I only get
the green text (no blue), and the
mess shows only up when typesetting the second time.
normally texexec should handle that for you (multiple runs are needed
to sort out the background)
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE |
pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The
Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 |
www.pragma-ade.com
-------------------------------------------------------------------------
information:
http://www.pragma-ade.com/roadmap.pdf
documentation:
http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context