From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/59342 Path: news.gmane.org!not-for-mail From: Bernhard Rosensteiner Newsgroups: gmane.comp.tex.context Subject: Re: macro beginner question Date: Sat, 5 Jun 2010 15:35:57 +0200 Message-ID: <96357AB7-7FE5-48E2-A1DA-98696B267654@gmail.com> References: <164BC5F1-93F4-4822-82AF-1C272D5639A9@gmail.com> <4C0A4460.4080902@elvenkind.com> <1666900C-78F6-4A86-88A9-E0E6B92B97E4@gmail.com> <4C0A4B4E.3080007@elvenkind.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-20--1062469415 X-Trace: dough.gmane.org 1275744972 3477 80.91.229.12 (5 Jun 2010 13:36:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 5 Jun 2010 13:36:12 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jun 05 15:36:09 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 1OKtXi-0004xH-Nn for gctc-ntg-context-518@m.gmane.org; Sat, 05 Jun 2010 15:36:06 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 767FFC9CE1; Sat, 5 Jun 2010 15:36:06 +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 SkC0RMumsS+M; Sat, 5 Jun 2010 15:36:05 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7DC7FC9CA7; Sat, 5 Jun 2010 15:36:03 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 769F6C9CA7 for ; Sat, 5 Jun 2010 15:36:01 +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 cjI22mcIFRP6 for ; Sat, 5 Jun 2010 15:35:59 +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 8C702C9C95 for ; Sat, 5 Jun 2010 15:35:59 +0200 (CEST) Original-Received: by fxm14 with SMTP id 14so1527712fxm.14 for ; Sat, 05 Jun 2010 06:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:mime-version :content-type:subject:date:in-reply-to:to:references:message-id :x-mailer; bh=TADvXEh9edkDEIYw6NuLwiEV9NE6t98w5Eg2SgpN7yg=; b=LIws2/OgAa/eeCmiT3YAey3lV5vx6TKbaLyvDmnuH8yKysLIZs5PlchwDOnuZ/K0G3 KMmuMn6Uddc0gBgoRAdtKc+Zkf06t7aJfPfmXKQ7oKdZ4/2gsX+yK3tJGzL6E3cpYSL/ GZfis2UZ6TycnenETm0pqEf+vEkDrTBHIm3pw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; b=qmIZzN9D3JLn0A1iv6wiYzuQFv2HeHTJGcNa7mSZ+2r49LsjGxIvRpp4BI+pL1+ANB Tsr7GffvZQ6caf7Lk0Qol7J+IvoKAUdd+StwcP1G44p8nE6ch30F1Qd4xkvfkNqbRzob sEBpTUd2jEZwdavNFkOx1QaRHQi4nv62wwzNA= Original-Received: by 10.223.29.156 with SMTP id q28mr13026172fac.77.1275744959051; Sat, 05 Jun 2010 06:35:59 -0700 (PDT) Original-Received: from 196-086-142-078.ascus.at ([78.142.86.196]) by mx.google.com with ESMTPS id 13sm10384171fad.19.2010.06.05.06.35.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 05 Jun 2010 06:35:58 -0700 (PDT) In-Reply-To: <4C0A4B4E.3080007@elvenkind.com> 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:59342 Archived-At: --Apple-Mail-20--1062469415 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Am 05.06.2010 um 15:04 schrieb Taco Hoekwater: > Bernhard Rosensteiner wrote: >> deleting the \def\Mycolor line does not help - same result. >=20 > No, that would definitely not help. Your problem was not the > definition, but that you never actually called the macro. >=20 > You should put the definition back, and add \Mycolor to the > \OpticalTest macro, perhaps like so: >=20 > \def\OpticalTest[#1]#2{% > \addff{\OOFeature}% > \definedfont[#2 at \OOSize]% > \setupinterlinespace > \hbox to \textwidth{\clip[width=3D.39\textwidth, > bottomoffset=3D\strutdepth]{% > \Mycolor > ..\hbox to .39\textwidth etc. etc. i tried what you suggested (please see attachment), but i think there is = something fishy with the color black. \definecolor[Myblack][s=3D0] gives = same results as described above but other colors work as they should do. best regards Bernhard --Apple-Mail-20--1062469415 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= \definecolor[Myblack][s=3D0]%other=20values=20as=200=20gives=20desired=20= result=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= Color=3DMyblack,%Color=3Dblack=20gives=20unexpected=20results=20other=20= colors=20work=0A=09=09=09=09=09=20=20=20Feature=3Ddefault,%desired=20= Open=20Type=20Font=20feature=0A=09=09=09=09=09=20=20=20Text=3D,#1]%what=20= text=20should=20be=20displayed=0A=09\def\Mycolor{\color[\OOColor]}=0A=09= \bgroup=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{\Mycolor%=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-20--1062469415 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail-20--1062469415 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-20--1062469415--