I'm afraid you hit no correct choice. ;-)
$\fT_\text{triv} = \Set{\emptyset, X}$
: incorrect. Define
\newcommand{\ts}[1]{\textnormal{#1}} % textual subscript
and use $\fT_{\ts{triv}}
. You can later change your mind about the typesetting of \ts
. With \text
you're not guaranteed to get upright shape, for example in the statement of a theorem.
$g \circ f = \text{id}_X$
: incorrect. Define
\newcommand{\id}{\textnormal{id}}
(or with \textit
, which I'd prefer).
$\text{Isom}(X)$
: incorrect. It's an operator, so $\operatorname{Isom}(X)$
. Defining a command with \DeclareMathOperator
is of course a good choice. The same considerations hold for “grad”, “cov”, ”sgn” and ”Gal”.
\[ \text{Let } x = \text{ number of cats} \]
: incorrect. “Let” should not go in the displayed equation. So
Let
\[
x=\text{number of cats}
\]
with no space before “number”.
The longer one should be
\begin{align*}
U \subseteq \mathbb{R}^n \text{ offen} \Leftrightarrow
&\text{für jedes $x \in U$ gibt es $r > 0$,}\\
&\text{sodass $\fB_r(x) = \Set{y \in \mdr^n | d(x,y) < r} \subseteq U$}
\end{align*}
so you don't have to think where spaces are necessary.
I wouldn't use a macro \Set
with delimited argument, preferring
\newcommand{\Set}[2]{\{\,#1\mid #2\,\}}
and \Set{y \in \mdr^n}{d(x,y) < r}
. This is more consistent with LaTeX syntax. If your \Set
macro has just one normal argument, then use \mid
and not |
.
You’re loading polyglossia
, which loads fontspec
, and using an OpenType font. This is not compatible with the legacy package bm
.
One solution is:
\usepackage{unicode-math}
\defaultfontfeatures{ Ligatures=TeX, Scale=MatchLowercase }
\setmathfont{TeX Gyre Termes Math} % Or another math font
\setmathfont{Georgia}[range=up]
\setmathfont{Georgia Italic}[range=it]
\setmathfont{Georgia Bold}[range=bfup]
\setmathfont{Georgia Bold Italic}[range=bfit]
This will allow you to use \mathbf{1}
or \symbf{1}
. If you don’t ever use \mathbf
for words in math mode, you might use the option \usepackage[mathbf=sym]{unicode-math}
, and make \mathbf
a synonym for \symbf
. Theoretically, this invokes the bold alphanumeric symbols from your math font, rather than a text font, although here you’re setting them both to the same font anyway. You can still use \textbf
(or, more robustly, \textnormal{\bfseries ...}
) in math mode.
If you have a version of Georgia that supports lining numbers, you can additionally give the supplemental \setmathfont
commands the option Numbers=Lining
. Or, if you specifically want to use Georgia for letters and not numbers, you may specify range=up/{Latin,latin,Greek,greek}
, etc.
You can change the \mathbf
font, which is intended for words and short phrases in math mode, to something different from your main text font with \setmathrm[BoldFont={...}, BoldFeatures={...}]
. Alternatively, you can call \usepackage[no-math]{fontspec}
before polyglossia
to prevent it from changing \mathbf
, \mathrm
, and so on.
The unicode-math
package does support \boldsymbol
, but this calls \mathversion{bold}
. As of 2020, unicode-math
does not support both the version=bold
and range=
options of \setmathfont
at the same time, so you cannot reliably use \boldsymbol
and also change the letters in math mode.
Other options to change the math font to Georgia are mathastext
, or, in XeTeX, mathspec
.
Best Answer
Another option is to use the
\text{}
command provided by theamsmath
package.Having said that, I doubt that it's possible to have a single format that is "correct" for all possible requirements of leading and trailing spaces. For instance, I think you'll find that your example looks better without the space before "number" but with the space after "Let."
If there's some reason that you really want to not have the space inside whatever text environment you choose, you can force a space in math mode using a single backslash followed by a space (i.e.
\<space>
). For example,