1

I use some text in the math formula, e.g.:

$ \texttt{MinimumPolynomial}(T) \mid \texttt{CharacteristicPolynomial}(T)$. 

I use "\texttt" to make such text non-italic.

This works fine but, when I use remark to wrap around it, e.g.

\begin{remark}
This is a remark:
$ \texttt{MinimumPolynomial}(T) \mid \texttt{CharacteristicPolynomial}(T)$. 
\end{remark}

, all text are italic now.

I wish the text outside of math formular, e.g. "This is a remark", still be italic, while the ones inside, e.g. "MinimumPolynomial" be straight.

How could I do that?

  • Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Apr 7 '15 at 1:51
  • 2
    Put \normalfont after \begin{remark} like \begin{remark} \normalfont – user11232 Apr 7 '15 at 1:53
  • 3
    Please share the code of how the remark environment is set up. – Mico Apr 7 '15 at 2:07
4

\text.... commands escape to text mode so use the current text font settings. Math fonts do not change according to the local context and here you want the math monospace font so use \mathtt{MinimumPolynomial}

  • but \mathtt will ignore the spaces inside it, is it? – athos Apr 7 '15 at 13:26
  • @athos do you really have spaces in function names? – David Carlisle Apr 7 '15 at 13:34
  • it's a minor thing, for example I use \texttt{sgn } \sigma to keep a bit space between the text part and other symbol parts in a math formular. but i can use \mathtt{sgn\,}, so no problem. – athos Apr 8 '15 at 4:40
  • 2
    @athos no! don't do either of those things:-) \mathop{\mathtt{sgn}} will give the same space as \log so small space in \sgn x but no space in \sgn(x) – David Carlisle Apr 8 '15 at 7:33
  • some little new things to learn :) – athos Apr 8 '15 at 8:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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