From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/60779 Path: news.gmane.org!not-for-mail From: ivo welch Newsgroups: gmane.comp.tex.context Subject: abbreviations as macros Date: Sat, 7 Aug 2010 10:15:00 -0400 Message-ID: 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: dough.gmane.org 1281190511 22222 80.91.229.12 (7 Aug 2010 14:15:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 7 Aug 2010 14:15:11 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat Aug 07 16:15:10 2010 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 1OhkB3-000829-Pk for gctc-ntg-context-518@m.gmane.org; Sat, 07 Aug 2010 16:15:09 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B0A2FCA141; Sat, 7 Aug 2010 16:15:08 +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 HBNnQVZb1QLR; Sat, 7 Aug 2010 16:15:04 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 98252CA13A; Sat, 7 Aug 2010 16:15:04 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 19F8ECA13A for ; Sat, 7 Aug 2010 16:15:03 +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 rGaep1qe3CnE for ; Sat, 7 Aug 2010 16:15:00 +0200 (CEST) Original-Received: from mail-ew0-f41.google.com (mail-ew0-f41.google.com [209.85.215.41]) by balder.ntg.nl (Postfix) with ESMTP id B6E90CA118 for ; Sat, 7 Aug 2010 16:15:00 +0200 (CEST) Original-Received: by ewy28 with SMTP id 28so3880042ewy.14 for ; Sat, 07 Aug 2010 07:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=ALQUaQK+pq0gwlnJpHgLFtyGS82ViVx4gvuHBpEL6f8=; b=rZC1SFKEOjpilW++K9EGSF9CU6t92M/t1JRLNFqHTkEzXmIxATcdrECAzLN77Vzdzu 8Np1fAW2qw/6cbp58Prdwa2wCYV8Fcf65OQikQSHHWHZFB+6BXHtfBXLV9TSKeOXeRP/ EL7NJMuk5CTCdF3I2owXqb6GVcmEulLFoR8Qo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=XD+tZ3I7B8gOf7tRXUqmEwjT/UFIA6iSCuUTRNQzTuXuVW6ttvIVIvYrSI86W69JMH 07DfMFnrEzjyir+8RNhMXakhUVj1lUyeD/QQCTsapQKElmRCUr5OdE6izvbB9BrHHdVp uxcuESpEy50/RxQ6k4jtFvU3B5c39BXK9pYqQ= Original-Received: by 10.213.22.201 with SMTP id o9mr9938878ebb.71.1281190500356; Sat, 07 Aug 2010 07:15:00 -0700 (PDT) Original-Received: by 10.14.119.6 with HTTP; Sat, 7 Aug 2010 07:15:00 -0700 (PDT) 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:60779 Archived-At: Hi Hans: This is asking Armin Varmaz' question in a different way, although I know even less. I would like to define a macro that is just an abbreviation. For example, say I want to define a snippet \NPV which provides the text NPV$_0$, and NPV is in textfont while 0 is in mathfont. This should work everywhere---formulas, subscripts, footnotes, etc., and automatically appear in the correct sizing. In LaTeX, this is easy to do: \newcommand{\NPV}{\text{NPV\ensuremath{_0}}} I can now use \NPV\ in formulas, footnotes, subscripts, titles, etc., and it is properly sized everywhere. Is there a recommended way to do this on conTeXt? regards, /iaw ___________________________________________________________________________________ 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 ___________________________________________________________________________________