Monday, April 11, 2011

LaTex macro to make LaTex more human-friendly in Math?

How can I make a LaTex macro which replaces each

  1. \and by the word "and"
  2. \or by the word "or"

so that the nouns are not in italics?

From stackoverflow
  • \text{and} or \text{or}

    If you insist on a macro, just use the normal LaTeX \newcommand.

    Masi : Thank you! Do you know how I can make an alias of \and so that it applies to \text{and}?
    Masi : It seems that I can make an alias by \newcommand.
    Charlie Martin : Hah, beat you to it ;-)
    Will Robertson : You need to load the amsmath package (or amstext, at a minimum) for this to work.
    Charlie Martin : No you don't. \text is plain LaTeX.
  • In math mode \mbox{} gives the argument upright (roman) typesetting.

    Will Robertson : The advantage to \text is that the font size adjusts in different situations (such as subscripts/superscripts). Although that's not always important...
    dmckee : @Will: News to me. Thanks.

0 comments:

Post a Comment