From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82657 Path: news.gmane.org!not-for-mail From: Alan Bowen Newsgroups: gmane.comp.tex.context Subject: Re: \definehighlight with style=command problem Date: Mon, 27 May 2013 16:09:55 -0400 Message-ID: References: <51A39470.3040209@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1310361399==" X-Trace: ger.gmane.org 1369685418 1274 80.91.229.3 (27 May 2013 20:10:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 May 2013 20:10:18 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon May 27 22:10:19 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uh3kJ-0005ho-As for gctc-ntg-context-518@m.gmane.org; Mon, 27 May 2013 22:10:19 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9BEC0101E8; Mon, 27 May 2013 22:10:18 +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 AVPG19pvhovd; Mon, 27 May 2013 22:10:12 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id C501E101E5; Mon, 27 May 2013 22:10:12 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8655D101E5 for ; Mon, 27 May 2013 22:10:11 +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 9Xej8r8RMOVw for ; Mon, 27 May 2013 22:10:06 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 60A2A101E0 for ; Mon, 27 May 2013 22:09:56 +0200 (CEST) Original-Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r4RK9tOP005840 for ; Mon, 27 May 2013 22:09:55 +0200 Original-Received: by mail-ee0-f53.google.com with SMTP id c1so4214526eek.12 for ; Mon, 27 May 2013 13:09:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Kdpwr3c6Aw62IuBaxro+0WZCwTA2UyHW6zBVNxI5hLc=; b=nAqOd9ftgCdZzBpMJsFxpQxZhEtxO0qT6035W/lwhL1gKCpRD3Yr0ORZLMx8PWfpOA nVucC5kqWq+3g2/OOkp+cXYu1bT2lpSY8BFkBfG5rTqypk5l4mMytxTKFCcs7MhzpJsi TVQ6HlU5bARfYVRvaAJdvDdU0/RIAzbEM1UP6Mm4NGx/RtY+bupSmQaNTxj6x2uAsFuc kRqW4u8UI8FqkCxSluJmuzGFoABPpVcHxLZnvfU+B8Ivz4XuJvVcvXq4sKB1jnmuArLO 05qpK2Rt4MoG3k/rZKtyouFWuFeJLF5i0+xg3kobTP19JiPWw0mmepnkBU94lQG10qFk XWAw== X-Received: by 10.14.7.66 with SMTP id 42mr11297354eeo.130.1369685395567; Mon, 27 May 2013 13:09:55 -0700 (PDT) Original-Received: by 10.15.90.201 with HTTP; Mon, 27 May 2013 13:09:55 -0700 (PDT) In-Reply-To: <51A39470.3040209@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.83.53; 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: 0QJF89T4B - f4ef56674e65 - 20130527 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:82657 Archived-At: --===============1310361399== Content-Type: multipart/alternative; boundary=001a11c1af4075175904ddb8bb5f --001a11c1af4075175904ddb8bb5f Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Wonderful, Hans! Many thanks. Alan On Mon, May 27, 2013 at 1:14 PM, Hans Hagen wrote: > On 5/27/2013 3:36 PM, Alan Bowen wrote: > >> I an trying to use \definehighlight to define a macro that will color >> and overstrike selected text. >> Thus far, >> >> \definehighlight[Delete][**color=3Dred,style=3D{\overstrike}] >> \starttext >> test \Delete{test} test >> \stoptext >> >> reports >> >> ! Too many }'s. >> >> system > tex > error on line 4 in file ...TEST.tex: Too many >> }'s ... >> >> >> If I replace =93\overstrike=94 with =93bold=94, =93\Delete=94 works. =93= \overstrike=94 >> works otherwise, so am I trying the impossible here? >> > > The next beta will have \setbar for that purpose, used as: > > \setuphead[section][textstyle=3D**{\setbar[overstrike]},**textcolor=3Dblu= e] > > \definehighlight[Whatever][**color=3Ddarkyellow] > \definehighlight[Delete] [color=3Dred,style=3D{\setbar[**overstrike]}] > \definehighlight[Keep] [color=3Dgreen] > > \starttext > > \setupbar[overstrike][**foregroundcolor=3Dcyan,color=3D**blue] > > \startsection[title=3D{{\green green} foo {\green green}}] > > foo \startbar[overstrike]bar\**stopbar > > test \Delete{test} test \Keep{test} test \Whatever{test} test > > \color[red]{test \Delete{test} test \Keep{test} test} > > \stopsection > > \stoptext > > for the source watchers: watch the subtle change in > > \mult_interfaces_install_**style_and_color_handler > > Hans > > ------------------------------**------------------------------**----- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > ------------------------------**------------------------------**----- > ______________________________**______________________________** > _______________________ > 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 > ______________________________**______________________________** > _______________________ > --001a11c1af4075175904ddb8bb5f Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
Wonderful, Hans! Many thanks.

Alan


On Mon= , May 27, 2013 at 1:14 PM, Hans Hagen <pragma@wxs.nl> wrote:
On 5= /27/2013 3:36 PM, Alan Bowen wrote:
I an trying to use \definehighlight to define a macro that will color
and overstrike selected text.
Thus far,

\definehighlight[Delete][color=3Dred,style=3D{\overstrike}]
\starttext
test =A0\Delete{test} test
\stoptext

reports

! Too many }'s.

system =A0 =A0 =A0 =A0 =A0> tex > error on line 4 in file ...TEST.tex= : Too many
}'s ...


If I replace =93\overstrike=94 with =93bold=94, =93\Delete=94 works. =93\ov= erstrike=94
works otherwise, so am I trying the impossible here?

The next beta will have \setbar for that purpose, used as:

\setuphead[section][textstyle=3D{\setbar[overstrike]},textcol= or=3Dblue]

\definehighlight[Whatever][color=3Ddarkyellow]
\definehighlight[Delete] =A0[color=3Dred,style=3D{\setbar[overstrike= ]}]
\definehighlight[Keep] =A0 =A0[color=3Dgreen]

\starttext

=A0 =A0 \setupbar[overstrike][foregroundcolor=3Dcyan,color=3D= blue]

=A0 =A0 \startsection[title=3D{{\green green} foo {\green green}}]

=A0 =A0 =A0 =A0 foo \startbar[overstrike]bar\stopbar

=A0 =A0 =A0 =A0 test =A0\Delete{test} test \Keep{test} test \Whatever{test}= test

=A0 =A0 =A0 =A0 \color[red]{test =A0\Delete{test} test \Keep{test} test}
=A0 =A0 \stopsection

\stoptext

for the source watchers: watch the subtle change in

\mult_interfaces_install_style_and_color_handler

Hans

-------------------------------------------------------------= ----
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 Hans Hagen | PRAGMA ADE
=A0 =A0 =A0 =A0 =A0 =A0 =A0 Ridderstraat 27 | 8061 GH Hasselt | The Netherl= ands
=A0 =A0 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0| ww= w.pragma-pod.nl
-------------------------------------------------------------= ----
_____________________________________________________________= ______________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
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
_____________________________________________________________= ______________________

--001a11c1af4075175904ddb8bb5f-- --===============1310361399== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1310361399==--