From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72049 Path: news.gmane.org!not-for-mail From: Curiouslearn Newsgroups: gmane.comp.tex.context Subject: Re: custom command \myframedsection does not always work. Bug? Date: Sun, 30 Oct 2011 17:08:18 -0400 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1320008911 7245 80.91.229.12 (30 Oct 2011 21:08:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 30 Oct 2011 21:08:31 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 30 22:08:27 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RKccE-0006cl-T7 for gctc-ntg-context-518@m.gmane.org; Sun, 30 Oct 2011 22:08:26 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8784CCB05F; Sun, 30 Oct 2011 22:08:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id skwUSJQcgmA0; Sun, 30 Oct 2011 22:08:23 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 185D7CB093; Sun, 30 Oct 2011 22:08:23 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BE43CCB093 for ; Sun, 30 Oct 2011 22:08:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id hO7QcD3p9bv0 for ; Sun, 30 Oct 2011 22:08:19 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 8F63ECB05F for ; Sun, 30 Oct 2011 22:08:19 +0100 (CET) Original-Received: from mail-bw0-f41.google.com (mail-bw0-f41.google.com [209.85.214.41]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p9UL8I3H016913 for ; Sun, 30 Oct 2011 22:08:19 +0100 Original-Received: by bkbzv15 with SMTP id zv15so910876bkb.14 for ; Sun, 30 Oct 2011 14:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=pgRwqWSvV4S/hPTSQpydKx3CUVtwk5FOrcVKSpp6XlI=; b=Gk9zjV64xzaboL5bfCXlpeunvyo9FW3elJ82Pn8beBkjcP14OdzEJLnSZKMoEVmCAz rtkeCOYqNvF7LN4h2W4mAa619a7Qe+Mf9DkyXO1GQgg/rIQg/k8HmjGuxm8AXZMsCdhp ocAOG2Xi28ADt3U+sELyZpTts5Av6WuuHG3WE= Original-Received: by 10.204.141.142 with SMTP id m14mr8439966bku.89.1320008898449; Sun, 30 Oct 2011 14:08:18 -0700 (PDT) Original-Received: by 10.204.119.211 with HTTP; Sun, 30 Oct 2011 14:08:18 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0bFP98iX2 - b062eba2444e - 20111030 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:72049 Archived-At: Hi Wolfgang, Thanks very much. Your command worked great. Regards, Bharat On Sun, Oct 30, 2011 at 1:42 PM, Wolfgang Schuster wrote: > > Am 30.10.2011 um 16:00 schrieb Curiouslearn: > >> Hi All, >> >> Please see the working example below. I have defined a command called >> \myframedsection. It works the first two times I use it, but not the >> third time. I think it has something to do with using >> \startitemize...\stopitemize before the command is used the third >> time. But I am not sure. Can someone please tell me why it is not >> working, and how I can change my definition so that it works? Is this >> a bug? >> >> \definehead[mysection][section] >> \setuphead[mysection][color=3Dblue*:3] >> >> \def\myframedsection#1{\bgroup\vskip 0.5in >> =A0 =A0 =A0 =A0 =A0 =A0\framed[background=3Dcolor, backgroundcolor=3Dgra= y:10] >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{\mysection{#1}}% >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\egroup} > > No wonder you get unexpected results with this definition, better solutio= ns are > > \definehead[myframedsection][section] > > \setuphead > =A0[myframedsection] > =A0[before=3D{\blank[0.5in]\startframedtext[background=3Dcolor,background= color=3Dgray:10]}, > =A0 after=3D{\stopframedtext\blank[0.25in]}, > =A0 color=3Dblue*:3] > > and > > \define[2]\MyframedsectionCommand > =A0{\framed > =A0 =A0 [background=3Dcolor,backgroundcolor=3Dgray:10,align=3Dflushleft] > =A0 =A0 {\hbox to 2cm{#1}\vtop{\hsize=3D\dimexpr\hsize-2cm\relax#2}}} > > \definehead[myframedsection][section] > > \setuphead > =A0[myframedsection] > =A0[before=3D{\blank[0.5in]}, > =A0 command=3D\MyframedsectionCommand, > =A0 style=3Dblue*:3] > > Wolfgang > _________________________________________________________________________= __________ > 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-co= ntext > webpage =A0: http://www.pragma-ade.nl / http://tex.aanhet.net > archive =A0: http://foundry.supelec.fr/projects/contextrev/ > wiki =A0 =A0 : http://contextgarden.net > _________________________________________________________________________= __________ > ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________