From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/49254 Path: news.gmane.org!not-for-mail From: Sanjoy Mahajan Newsgroups: gmane.comp.tex.context Subject: colored backgrounds in displayed math Date: Thu, 09 Apr 2009 07:34:03 -0600 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1239284128 5195 80.91.229.12 (9 Apr 2009 13:35:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Apr 2009 13:35:28 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 09 15:36:26 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LruQY-0004fu-MW for gctc-ntg-context-518@m.gmane.org; Thu, 09 Apr 2009 15:36:22 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DE9B71FB3C; Thu, 9 Apr 2009 15:34:55 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 30839-01; Thu, 9 Apr 2009 15:34:23 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3E9E61FB30; Thu, 9 Apr 2009 15:34:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id ECC191FB30 for ; Thu, 9 Apr 2009 15:34:21 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 30833-02 for ; Thu, 9 Apr 2009 15:34:13 +0200 (CEST) Original-Received: from filter4-nij.mf.surf.net (filter4-nij.mf.surf.net [195.169.124.155]) by ronja.ntg.nl (Postfix) with ESMTP id 6E9441FB1D for ; Thu, 9 Apr 2009 15:34:13 +0200 (CEST) Original-Received: from biscayne-one-station.mit.edu (BISCAYNE-ONE-STATION.MIT.EDU [18.7.7.80]) by filter4-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n39DYA73008201 for ; Thu, 9 Apr 2009 15:34:12 +0200 Original-Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by biscayne-one-station.mit.edu (8.13.6/8.9.2) with ESMTP id n39DY8Gv010645; Thu, 9 Apr 2009 09:34:08 -0400 (EDT) Original-Received: from approx.mit.edu (c-76-25-207-60.hsd1.co.comcast.net [76.25.207.60]) (authenticated bits=0) (User authenticated as sanjoy@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id n39DY6pn020347 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Thu, 9 Apr 2009 09:34:08 -0400 (EDT) Original-Received: from sanjoy by approx.mit.edu with local (Exim 4.69) (envelope-from ) id 1LruOK-0004L2-7e; Thu, 09 Apr 2009 07:34:04 -0600 X-Mailer: MH-E 8.1; nmh 1.2; GNU Emacs 22.3.1 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.155 X-Scanned-By: MIMEDefang 2.42 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=18.7.7.80; country=US; region=MA; city=Cambridge; postalcode=02139; latitude=42.3646; longitude=-71.1028; metrocode=506; areacode=617; http://maps.google.com/maps?q=42.3646,-71.1028&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 206530792 - 6472127b66a4 - 20090409 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:49254 Archived-At: In displayed math I was trying to highlight a piece of a formula using a gray background. After a few spacing failures with \framed, I discovered \mframed in the core-rul.tex source file. The comments there say: %D As usual, one can specify in what way the text should be %D framed. One should be aware of the fact that, inorder to %D preserve the proper spacing, the \type {offset} is set to %D \type {overlay} and \type {frameoffset} is used used %D instead. But I couldn't get the following example of setting frameoffset to enlarge the box; instead the gray box barely surrounds the x^2/2. Is the cause the \@@oioffset in line 1502 of core-rul.tex: [\c!frameoffset=\@@oioffset,\c!offset=\v!overlay,#2] (I'm using ConTeXt - 2008.10.31 13:58, Mk II) \setupcolors[state=start] \def\graymath{\mframed[frame=off, background=color, backgroundcolor=gray, frameoffset=5pt]} \starttext \startformula \ln(1+x) = \graymath{x- \displaystyle{x^2\over2}} + \cdots \stopformula \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 ___________________________________________________________________________________