# Turning a T1 text-mode character into a maths-mode character

I would like to use the T1 font character Ð, \DH, as a mathematical symbol, as so in a quick and dirty way I defined

\newcommand{\dH}{\text{\DH}}


However, in my theorem environments, where the default is italic text, the Ð is italicised, which is not the case for my equation symbols which are standard roman characters. For instance,

\begin{lemma}\label{depth_bounds}
The depth function $\dH_{Y'}$ satisfies the inequalities
$\dH_{Y'}(x,y) \le lcm(\dH_{G/K}(x),\dH_Y(y))$
\end{lemma}


The disparity with \dH_Y outside the lemma environment, for example, is blatantly obvious: ÐY vs ÐY, modulo HTML spacing issues.

-
I should clarify that I want the upright character throughout, i.e. the one outside the lemma environment. –  David Roberts Nov 2 '12 at 2:43
Adding \normalfont in front of \DH should solve your problem -- \newcommand{\dH}{\text{\normalfont\DH}} –  PattaFeuFeu Nov 2 '12 at 3:16

So for the actually intended way you want to use it, here’s your solution:

\newcommand{\dH}{\text{\normalfont\DH}}


This should print the \DH in “upright character” while the rest of the lemma is italic, as it’s supposed to be.

-
Worked a treat, thanks. –  David Roberts Nov 2 '12 at 3:39
Also \newcommand{\dH}{\textnormal{\DH}} should work. –  egreg Nov 2 '12 at 9:26

I’m not 100% sure whether I got your question right, to be honest, but here is my attempt.

This:

\documentclass[paper=a4, fontsize=11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{amsmath, amsthm, amssymb}

\newcommand{\dH}{\text{\DH}}

\begin{document}

\newtheorem{lem}{Lemma}
Lemma environment:
\begin{lem}\label{depth_bounds}
The depth function $\dH_{Y'}$ satisfies the inequalities
$\dH_{Y'}(x,y) \le lcm(\dH_{G/K}(x),\dH_Y(y))$
\end{lem}

Equation environment:
$\dH_{Y'}(x,y) \le lcm(\dH_{G/K}(x),\dH_Y(y))$
\end{document}


results in

While a small change – namely: \newcommand{\dH}{\text{\itshape\DH}}– results in:

-
Ah, I should have said. I want the upright version as default, not the italic version. I tried using \textrm but that gave the same result at \text –  David Roberts Nov 2 '12 at 2:41