From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/84106 Path: news.gmane.org!not-for-mail From: Xan Newsgroups: gmane.comp.tex.context Subject: Defined command troubles Date: Thu, 5 Sep 2013 17:42:25 +0200 Message-ID: <20130905174225.31aca4cd2edb1c51a4e30293@telefonica.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1378395959 9593 80.91.229.3 (5 Sep 2013 15:45:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Sep 2013 15:45:59 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Sep 05 17:46:03 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VHbkx-00086N-7U for gctc-ntg-context-518@m.gmane.org; Thu, 05 Sep 2013 17:46:03 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 504BC101FB; Thu, 5 Sep 2013 17:44:29 +0200 (CEST) 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 gJXVhbpceXlj; Thu, 5 Sep 2013 17:44:27 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 2305E101E9; Thu, 5 Sep 2013 17:44:27 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 42A64101E9 for ; Thu, 5 Sep 2013 17:44:26 +0200 (CEST) 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 4t9joIzpi2UM for ; Thu, 5 Sep 2013 17:44:25 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 3D709101E7 for ; Thu, 5 Sep 2013 17:44:25 +0200 (CEST) Original-Received: from smtp.movistar.es (smtp20.acens.net [86.109.99.144]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r85Fjvb6019841 for ; Thu, 5 Sep 2013 17:45:57 +0200 X-CTCH-RefID: str=0001.0A0B020A.5228A734.009E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-Spam: Unknown Original-Received: from rulot (80.30.57.84) by smtp.movistar.es (8.6.111) (authenticated as dxpublica) id 5226B400002D812F for ntg-context@ntg.nl; Thu, 5 Sep 2013 15:45:56 +0000 X-Mailer: Sylpheed 3.3.0 (GTK+ 2.24.20; i686-pc-linux-gnu) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=86.109.99.144; country=ES; latitude=40.0000; longitude=-4.0000; http://maps.google.com/maps?q=40.0000,-4.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VKlrJVQs - 0d8ef4f5ed7e - 20130905 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:84106 Archived-At: Hi, I just want to define a shortcut for framedtexts... That's it: \def\important{\dodoubleempty\doimportant} \def\doimportant[#1][#2]{\bgroup \ifsecondargument \startframedtext[background=#2,frame=off,width=broad]% #1 \else \startframedtext[background=screen,frame=off,width=broad]% #1 \fi \stopframedtext \egroup} It works perfectly with \important[Anything] but not with \important[Anything][red]. By the other hand, I want to define 'important' for use with start and end (startimportant ... \stopimportant) and not with single command. How can I get it? Thanks, Xan. ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________