ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* abbreviations as macros
@ 2010-08-07 14:15 ivo welch
  2010-08-07 15:10 ` Aditya Mahajan
  0 siblings, 1 reply; 2+ messages in thread
From: ivo welch @ 2010-08-07 14:15 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-07 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-07 14:15 abbreviations as macros ivo welch
2010-08-07 15:10 ` Aditya Mahajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).