From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/59333 Path: news.gmane.org!not-for-mail From: Bernhard Rosensteiner Newsgroups: gmane.comp.tex.context Subject: macro beginner question... Date: Sat, 5 Jun 2010 14:03:34 +0200 Message-ID: <15E2369A-AB18-461F-8A9E-806F866CAD86@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: multipart/mixed; boundary=Apple-Mail-7--1068012514 X-Trace: dough.gmane.org 1275739426 20905 80.91.229.12 (5 Jun 2010 12:03:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 5 Jun 2010 12:03:46 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jun 05 14:03:45 2010 connect(): No such file or directory 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 1OKs6K-0006an-RP for gctc-ntg-context-518@m.gmane.org; Sat, 05 Jun 2010 14:03:44 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DD2B6C9CB9; Sat, 5 Jun 2010 14:03:43 +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 1hC6bTgrNGes; Sat, 5 Jun 2010 14:03:40 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E0801C9C98; Sat, 5 Jun 2010 14:03:39 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8D064C9C98 for ; Sat, 5 Jun 2010 14:03:38 +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 1cet-yMz3hyb for ; Sat, 5 Jun 2010 14:03:36 +0200 (CEST) Original-Received: from mail-fx0-f41.google.com (mail-fx0-f41.google.com [209.85.161.41]) by balder.ntg.nl (Postfix) with ESMTP id 6ED54C9C8B for ; Sat, 5 Jun 2010 14:03:36 +0200 (CEST) Original-Received: by fxm14 with SMTP id 14so1500471fxm.14 for ; Sat, 05 Jun 2010 05:03:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type:subject :date:message-id:to:mime-version:x-mailer; bh=7Ahc/dAYeqYn18uaR61MqlhSfqODXDCXHnTAgDsQ3d8=; b=vh5vYoIDfxn/iUmGh/X4oB7brcNaMOADnQqesrHSJV7mZMkktq6cAKj79ii3MJqR9K C12ytkBI8NL5pLSp8oUwmNCz26Qioh3RK/5kpoIb9h50HukbaChFp24ZO1okqB+w3Gts W8T1KcY/nwyoBpAByjdsOHfVdKaZr15U1Yp9M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:subject:date:message-id:to:mime-version:x-mailer; b=kfz6EEB2G8NrY2rFAsJ9Bx3LT0HrQhjnyOn+1w/UwYitReEt0/2iqQg+3E2sZStvkZ of0bK7mcNhXRQFLvedAdgdjrZB8W9PTlPb1RPm5lo+kgpvLcOl806Ln6xiDTZ+OZ3HPv 3ZbTMY6RTiUf2nWtkL2LiCulWsRdSQ6fZENTY= Original-Received: by 10.223.19.87 with SMTP id z23mr12967797faa.7.1275739416063; Sat, 05 Jun 2010 05:03:36 -0700 (PDT) Original-Received: from 196-086-142-078.ascus.at ([78.142.86.196]) by mx.google.com with ESMTPS id 7sm10067936far.18.2010.06.05.05.03.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 05 Jun 2010 05:03:35 -0700 (PDT) X-Mailer: Apple Mail (2.1078) 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:59333 Archived-At: --Apple-Mail-7--1068012514 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Hello all, in the process of learning macro programming in context i encountered = the following problem (minimal example is attached): when i have \setuphead[section][color=3D{red}] the color key influences = in a strange way my =84novice macro=93 (see the text which should be = black but is red). Further more the \ruledhbox in my macro stops at some = point the red color (with a normal \hbox all the text in the section is = red).=20 what i=B4m doing wrong here? best regards Bernhard --Apple-Mail-7--1068012514 Content-Disposition: attachment; filename=Typescript_Test.tex Content-Type: application/octet-stream; name="Typescript_Test.tex" Content-Transfer-Encoding: quoted-printable %=20Typescript=20test=20file=0A\setuplayout[margin=3D0pt,=20height=3Dfit,=20= width=3Dfit,=20backspace=3D0cm,=20header=3D0cm,=20footer=3D\headerheight]=0A= %\showframe=0A%\showboxes=0A=0A=0A\setuphead[section][color=3D{red}]%=20= this=20color=20key=20influences=20my=20macro=20why?=0A= \setuphead[subsection][color=3Dblack]=0A=0A= \setupbodyfontenvironment[14pt][script=3D10pt,=0A=09=09=09=09=09=09=09=09= scriptscript=3D8pt,=20=0A=09=09=09=09=09=09=09=09x=3D10pt,=20=0A=09=09=09= =09=09=09=09=09xx=3D7pt,=20=0A=09=09=09=09=09=09=09=09big=3D18pt,=0A=09=09= =09=09=09=09=09=09small=3D10pt]=0A=0A\unprotect=0A=0A= \define\Kern{\hskip2pt}=0A=0A\define\MyTestText{=E2=82=AC\Kern=20\$\Kern=20= \%\Kern=20\&\Kern=20?\Kern=20@\Kern=20=C2=B5\Kern=20=E2=88=86\Kern=20= =E2=88=82\Kern=20=CF=80\Kern=20=E2=88=9E\Kern=201\Kern=202\Kern=203\Kern=20= 4\Kern=205\Kern=206\Kern=207\Kern=208\Kern=209\Kern=200\Kern=20ff\Kern=20= ft\Kern=20fft}=0A=0A\def\OpticalsTest{\dosingleempty\doOpticalsTest}=0A=0A= =0A\def\doOpticalsTest[#1]#2{%=0A=09= \getparameters[OO][Limitone=3D{.37\textwidth},%text=20limit=20for=20font=20= name=20(e.g.=20SerifDisplay-Regular)=0A=09=09=09=09=09=20=20=20= Limittwo=3D{3cm},%limit=20for=20"Example=20Text"=20-=20not=20that=20= usefull=0A=09=09=09=09=09=20=20=20Limittext=3D{.57\textwidth},%limit=20= for=20text=20in=20Textkey=0A=09=09=09=09=09=20=20=20= Size=3D\bodyfontsize,%textsize=0A=09=09=09=09=09=20=20=20= Feature=3Ddefault,%desired=20Open=20Type=20Font=20feature=0A=09=09=09=09=09= =20=20=20Color=3Dblack,%text=20color=0A=09=09=09=09=09=20=20=20= Text=3D,#1]%what=20text=20should=20be=20displayed=0A=09\bgroup=0A=09=09= \def\Mycolor{\color[\OOColor]}=0A=09=09= \def\processitem##1{\OpticalTest[#1]{##1}}%=0A=09=09= \processcommalist[#2]\processitem=0A=09\egroup=0A}=0A=0A= \def\OpticalTest[#1]#2{%=0A=09\addff{\OOFeature}\definedfont[#2=20at=20= \OOSize]\setupinterlinespace%=0A=09\hbox=20to=20= \textwidth{\clip[width=3D.39\textwidth,=20bottomoffset=3D\strutdepth]{%=0A= =09=09\hbox=20to=20.39\textwidth{%=0A=09=09=09= \hfill\limitatetext{#2}{\OOLimitone}{\textellipsis}%=0A=09=09=09=09=09=09= =09=20=20}}%=0A=09=09\hbox=20to=20.61\textwidth{:\hskip.2cm%=0A=09=09=09= \doifelse{\OOText}{}%=0A=09=09=09{{\ruledhbox=20to=20= 3.6cm{\quotation{\limitatetext{Example\Kern=20= Text}{\OOLimittwo}{\textellipsis}}\hfill}%=0A=09=09=09= \limitatetext{\MyTestText}{\OOLimittext}{\textellipsis}}}%=0A=09=09=09= {\limitatetext{\OOText}{\OOLimittext}{\textellipsis}}\hfilll=0A=09=09=09=09= =09=09=09=20=20}%=0A=09=09=09=09=09=20=20=20=20}\vskip3pt=0A}%=0A=0A= \protect=0A=0A\setupbodyfont[14pt]=0A=0A\starttext=0A=0A\section{Section=20= in=20red}=0A=0A\OpticalsTest[Text=3D{Test=20text,=20Test=20text,=20Test=20= text,=20Test=20text,=20Test=20text,=20Test=20text,=20Test=20text,=20Test=20= text,=20Test=20text,=20Test=20text,=20Test=20text,=20Test=20= text},Size=3D40pt]=0A= {SerifCaption-Regular,SerifSmalltext-Regular,SerifRegular-Regular,SerifSub= head-Regular,SerifDisplay-Regular}=0A\blank=0A= \OpticalsTest{SerifCaption-Bold,SerifSmalltext-Bold,SerifRegular-Bold,Seri= fSubhead-Bold,SerifDisplay-Bold}=0A\blank=0A= \OpticalsTest{SerifCaption-Italic,SerifSmalltext-Italic,SerifRegular-Itali= c,SerifSubhead-Italic,SerifDisplay-Italic}=0A=0A\subsection{Subsection=20= in=20black}=0A=0A\OpticalsTest[Text=3D{Test=20text,=20Test=20text,=20= Test=20text,=20Test=20text,=20Test=20text,=20Test=20text,=20Test=20text,=20= Test=20text,=20Test=20text,=20Test=20text,=20Test=20text,=20Test=20= text},Size=3D40pt,=20Feature=3Dstretched]=0A= {SerifCaption-Regular,SerifSmalltext-Regular,SerifRegular-Regular,SerifSub= head-Regular,SerifDisplay-Regular}=0A\blank=0A= \OpticalsTest{SerifCaption-Bold,SerifSmalltext-Bold,SerifRegular-Bold,Seri= fSubhead-Bold,SerifDisplay-Bold}=0A\blank=0A= \OpticalsTest{SerifCaption-Italic,SerifSmalltext-Italic,SerifRegular-Itali= c,SerifSubhead-Italic,SerifDisplay-Italic}=0A=0A=0A=0A\stoptext= --Apple-Mail-7--1068012514 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail-7--1068012514 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 ___________________________________________________________________________________ --Apple-Mail-7--1068012514--