From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38277 Path: news.gmane.org!not-for-mail From: Peter Rolf Newsgroups: gmane.comp.tex.context Subject: Re: conditionals and font switches Date: Tue, 25 Dec 2007 20:22:38 +0100 Message-ID: <4771587E.4000705@gmx.net> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1198610804 32336 80.91.229.12 (25 Dec 2007 19:26:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Dec 2007 19:26:44 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Dec 25 20:26:56 2007 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 lo.gmane.org with esmtp (Exim 4.50) id 1J7FQV-0007M2-Bz for gctc-ntg-context-518@m.gmane.org; Tue, 25 Dec 2007 20:26:55 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C961F1FB95; Tue, 25 Dec 2007 20:26:25 +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 12022-02-7; Tue, 25 Dec 2007 20:25:48 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C95271FB87; Tue, 25 Dec 2007 20:25:43 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 69A181FB82 for ; Tue, 25 Dec 2007 20:25:41 +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 12506-02 for ; Tue, 25 Dec 2007 20:25:05 +0100 (CET) Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by ronja.ntg.nl (Postfix) with SMTP id D2E321FB8E for ; Tue, 25 Dec 2007 20:22:39 +0100 (CET) Original-Received: (qmail invoked by alias); 25 Dec 2007 19:22:39 -0000 Original-Received: from i5387CEF7.versanet.de (EHLO [192.168.1.3]) [83.135.206.247] by mail.gmx.net (mp032) with SMTP; 25 Dec 2007 20:22:39 +0100 X-Authenticated: #24293357 X-Provags-ID: V01U2FsdGVkX18nzTtXqv0nHdtG58Y7FYcm7b28p3ZwBG69mgvH2Z 9ddtVYRCeCzak6 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) In-Reply-To: X-Enigmail-Version: 0.95.5 X-Y-GMX-Trusted: 0 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:38277 Archived-At: Idris Samawi Hamid schrieb: > Dear gang, > > Consider a control sequence \MyCS. It has three possible definitions: > > \def\MyCS{}, \def\MyCS{}, \def\MyCS{} > > What I would like is to define \MyCS once such that > > takes effect when \tf is invoked > takes effect when \it is invoked > takes effect when \bf is invoked > > something like (incorrect syntax but you'll get the point) > > \def\MyCS{% > \if\it > \else > \if\bf > \else > } > > How can I do this> Any tips greatly appreciated! > something like this should work (if I get you right) \ifx\fontalternative\c!tf \else \ifx\fontalternative\c!it \else \ifx\fontalterantive\c!bf % \fi\fi\fi search fo \fontalternative in the base (font-ini.tex and alike) Best wishes, Peter > Happy Holidays! > Idris > ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________