I have used \text{something}
several times in math mode. The result is rendered like I want it to be rendered, but I think this might not the best way to do it in LaTeX.
What I currently do
Hopefully correct usage of \text
$\fT_\text{triv} = \Set{\emptyset, X}$
: Denote the trivial topology.
A longer one:
\begin{align*}
U \subseteq \mathbb{R}^n \text{ offen} \Leftrightarrow
&\text{ für jedes } x \in U \text{ gibt es } r > 0,\\
&\text{ sodass } \fB_r(x) = \Set{y \in \mdr^n | d(x,y) < r} \subseteq U
\end{align*}
Probably incorrect
$g \circ f = \text{id}_X$
: Donote the identity function.$\text{Isom}(X)$
: Isometry group$\text{grad}(F)(x) \neq 0$
: Degree of a function$\text{conv}(v_0, \dots, v_k)
: Convex hull of some points
Alternatives to \text
I've searched for alternatives and found the following:
\[ \text{Let } x = \text{ number of cats} \]
: Provided by theamsmath
package.\[ \mbox{Let } x = \mbox{ number of cats} \]
\[ \textrm{Let } x = \textrm{ number of cats} \]
\operatorname{sgn}
and\DeclareMathOperator{\sgn}{sgn}
: Provided byamsmath
. I think I should use this for my currently incorrect usages. But I'm not sure if this is semantically correct.$\mathrm{Gal}(f)$
\newcommand{\x}[1]{\text{#1}}
might also be interesting. This would at least give me a command for groups / the identity. At the end, it will also be text, but it lets me switch easier to better variants.
Questions
- Are the two examples which I labeled as correct actually correct? Are there better alternatives?
- How do the "Alternatives to \text" differ? Did I miss some good ones?
- What should I use for my "Probably incorrect" ones?
Related questions
I've read the following questions and answers (which did only partially help):