Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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
add comment

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
Worked a treat, thanks. –  David Roberts Nov 2 '12 at 3:39
1  
Also \newcommand{\dH}{\textnormal{\DH}} should work. –  egreg Nov 2 '12 at 9:26
add comment

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 originally posted

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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