I would like to write an equation within a theorem that involves an integrand and the upright symbol $ \textrm{d} $
which I have abbreviated in my preamble with
\newcommand{\dmath}{\textrm{d}}
(and the preamble also contains)
\usepackage{array}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
... etc
\newtheorem{theorem}{Theorem}[section]
I have the following theorem:
\begin{theorem}[Fubini's theorem]
\label{app:thrm:fubini}
Suppose $ X $ and $ Y $ are measurable spaces. If $ f(x,y) $ is integrable ($ f(x,y) $ is measurable and $ \int_{X,Y} \left| f(x,y)\right| \dmath (x,y) < \infty$) then
\begin{equation*}
\int_{X} \left(\int_{Y} f(x,y) \dmath y \right) \dmath x
=
\int_{Y} \left(\int_{X} f(x,y) \dmath x \right) \dmath y
=
\int_{X,Y} f(x,y) \dmath (x,y).
\end{equation*}
\end{theorem}
and have the following output
but would like the \dmath
to produce $\textrm{d}$ to produce an upright 'd' character whenever it is called, and would like the following output:
Any suggestions on a simple way to achieve the desired result?
I have looked at the following Qs but they don't quite address the issue:
- Non italic text in theorems, definitions, examples
-
Equivalent of \mathup for upright text in math mode? (*see link below)
https://tex.stackexchange.com/questions/139699/equivalent-of-mathup-for-upright-text-in-math-mode
Best Answer
Here's a better reimplementation;
\mathrm
will always choose upright medium, whereas\textrm
will retain the settings of the font current outside the formula.Note some further refinements. See Better automatic spacing of differential d? for more information.
I wouldn't use
\dmath
, though, becausebreqn
uses it and you never know if you're going to reuse the code.