Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a constant defined by

\newcommand{\Lip}{\textrm{Lip}}

or

\def\Lip{\text{Lip}}

I use this constant in equations. But in the theorem environment, it appears in italic style. Does anyone know how to make it appear the same as it being put outside of theorem environment?

Thank you very much!

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

if you are using amsmath (which you may be, since you are using \text) it would be better to use \DeclareMathOperator{\Lip}{Lip}. then it will always be in an upright font.

share|improve this answer
add comment

You could use

\newcommand{\Lip}{\ensuremath{\mathrm{Lip}}}
share|improve this answer
    
I've deleted my comments. You can now delete yours. –  Gonzalo Medina Aug 1 '11 at 21:50
add comment
\usepackage{xspace}% To avoid adding a forced space after a command: '\Lip\ '
...
\newcommand{\Lip}{{\upshape Lip}\xspace}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.