From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/25642 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: setuptyping Date: Sat, 28 Jan 2006 12:23:52 +0100 Message-ID: <43DB5448.4030601@elvenkind.com> References: <44A15872-7023-4CB4-B04D-E3B443BF7A33@science.uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090602040502070408000701" X-Trace: sea.gmane.org 1138447399 3697 80.91.229.2 (28 Jan 2006 11:23:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 28 Jan 2006 11:23:19 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sat Jan 28 12:23:18 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1F2oAj-0006Nt-6J for gctc-ntg-context-518@m.gmane.org; Sat, 28 Jan 2006 12:23:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C89101284C; Sat, 28 Jan 2006 12:23:12 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09760-03; Sat, 28 Jan 2006 12:23:09 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D447112848; Sat, 28 Jan 2006 12:23:09 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 60A6812848 for ; Sat, 28 Jan 2006 12:23:09 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09775-03 for ; Sat, 28 Jan 2006 12:23:08 +0100 (CET) Original-Received: from post-22.mail.nl.demon.net (post-22.mail.nl.demon.net [194.159.73.192]) by ronja.ntg.nl (Postfix) with SMTP id 78F5412832 for ; Sat, 28 Jan 2006 12:23:08 +0100 (CET) Original-Received: from boo.demon.nl ([82.161.175.147]:33035 helo=[192.168.1.3]) by post-22.mail.nl.demon.net with esmtp (Exim 4.51) id 1F2oAd-0006Dh-Ud for ntg-context@ntg.nl; Sat, 28 Jan 2006 11:23:08 +0000 User-Agent: Mozilla Thunderbird 1.0 (X11/20050215) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <44A15872-7023-4CB4-B04D-E3B443BF7A33@science.uva.nl> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:25642 Archived-At: This is a multi-part message in MIME format. --------------090602040502070408000701 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hans van der Meer wrote: > I get some unexpected results with setuptyping. > According to the manual the style-parameter has options normal, bold, > small, etc. AFAICS, this has not worked in a very very long time, and it may even be a bug in the documentation. But it was easy to fix the code, so see attached file with a small change to the \setupcommonverbatim routine. for HansH: I did not want to call \startattributes, so I invented a new macro called '\getstylevalue'. Cheers, taco --------------090602040502070408000701 Content-Type: application/x-tex; name="ma.tex" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ma.tex" \unprotect \def\setupcommonverbatim#1% {\eightbitcharactersfalse % obey regime / encoding % \def\prettyidentifier{TEX}% % \doifelsevalue{#1\c!text}\v!yes \naturaltextexttrue \naturaltextextfalse \def\prettyidentifierfont{\getvalue{#1\c!icommand}}% \def\prettyvariablefont {\getvalue{#1\c!vcommand}}% \def\prettynaturalfont {\getvalue{#1\c!ccommand}}% % \doifvalue{#1\c!space}\v!on {\def\obeyspaces{\setcontrolspaces}}% \doifvalue{#1\c!page }\v!no {\def\obeypages {\ignorepages}}% % \doifelsevalue{#1\c!tab}\v!yes {\def\obeytabs{\settabskips}}% {\doifvalue{#1\c!tab}\s!ascii {\chardef\tabskipmode\plustwo % quit on >127 \def\obeytabs{\settabskips}}% {}}% % \ignorehyphens % default \ExpandFirstAfter\processaction [\getvalue{#1\c!lines}] [ \v!yes=>\obeybreakpoints, \v!hyphenated=>\obeyhyphens]% % \ExpandFirstAfter\processaction [\getvalue{#1\c!option}] [ \v!none=>\let\obeycharacters\relax, \v!color=>\setupprettiesintype{TEX}% \let\obeycharacters\setupprettytype \let\obeytabs\ignoretabs, \v!normal=>\let\obeycharacters\setupgroupedtype, \v!commands=>\def\obeycharacters{\setupcommandsintype{#1}}% \let\obeytabs\ignoretabs, \v!slanted=>\let\obeycharacters\setupslantedtype \let\obeytabs\ignoretabs, \s!unknown=>\setupprettiesintype{\getvalue{#1\c!option}}% \let\obeycharacters\setupprettytype \let\obeytabs\ignoretabs]% \doifnumberelse{\getvalue{#1\c!tab}} {\def\obeytabs{\setfixedtabskips{\getvalue{#1\c!tab}}}}% \donothing %TH next line is changed \def\verbatimfont{\getstylevalue{#1}\normalnoligatures\font}% \setupverbatimcolor{#1}} % new macro: \def\getstylevalue#1% {\ifcsname#1\c!style\endcsname \expandafter\doconvertfont \else \expandafter\gobbleoneargument \fi{\csname#1\c!style\endcsname}} \protect \doifnotmode{demo}{\endinput} \starttext \begingroup \setuptyping[style=italic] \starttyping abcd \stoptyping \endgroup \begingroup \setuptyping[style=\tt] \starttyping abcd \stoptyping \endgroup \stoptext --------------090602040502070408000701 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --------------090602040502070408000701--