From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/12724 Path: main.gmane.org!not-for-mail From: Matthias Weber Newsgroups: gmane.comp.tex.context Subject: Re: beginner's hazzles with backgrounds and definitions. Date: Tue, 29 Jul 2003 20:44:41 -0500 Sender: ntg-context-admin@ntg.nl Message-ID: <631560E1-C22F-11D7-B01E-000A959AFACC@indiana.edu> References: <5.2.0.9.1.20030729190018.0201ccb0@server-1> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v552) Content-Type: multipart/alternative; boundary=Apple-Mail-2--382097354 X-Trace: main.gmane.org 1059529851 18378 80.91.224.249 (30 Jul 2003 01:50:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 30 Jul 2003 01:50:51 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Wed Jul 30 03:50:50 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19hg78-0004mG-00 for ; Wed, 30 Jul 2003 03:50:50 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id BB15010B63; Wed, 30 Jul 2003 03:50:53 +0200 (MEST) Original-Received: from julesburg.uits.indiana.edu (julesburg.uits.indiana.edu [129.79.1.75]) by ref.ntg.nl (Postfix) with ESMTP id EA59710B1C for ; Wed, 30 Jul 2003 03:44:42 +0200 (MEST) Original-Received: from logchain.uits.indiana.edu (logchain.uits.indiana.edu [129.79.1.77]) by julesburg.uits.indiana.edu (8.12.9/8.12.9/IUPO) with ESMTP id h6U1iePJ024708 for ; Tue, 29 Jul 2003 20:44:40 -0500 (EST) Original-Received: from indiana.edu (dial-116-78.dial.indiana.edu [156.56.116.78]) by logchain.uits.indiana.edu (8.12.9/8.12.9/IUPO) with ESMTP id h6U1ia1e007139 for ; Tue, 29 Jul 2003 20:44:37 -0500 (EST) Original-To: ntg-context@ntg.nl In-Reply-To: <5.2.0.9.1.20030729190018.0201ccb0@server-1> X-Mailer: Apple Mail (2.552) Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:12724 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:12724 --Apple-Mail-2--382097354 Content-Transfer-Encoding: 7bit Content-Type: text/plain; delsp=yes; charset=US-ASCII; format=flowed 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 > > --Apple-Mail-2--382097354 Content-Transfer-Encoding: 7bit Content-Type: text/enriched; charset=US-ASCII 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 --Apple-Mail-2--382097354--