# How to insert upright delta symbol in LaTeX?

I need to insert upright delta symbol as

But I did it as

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\mathrm{\delta}^{18}\mathrm{O}$

\end{document}


The delta symbol is not so upright? So how should I get a upright delta symbol?

• textgreek package provides \textdelta, then you can do it all in text mode; \textdelta\textsuperscript{18}O. Jun 17 at 5:34
• Thanks for your reply. Your way is totally a new one to reslove the problem in text mode. So good! @Cicada Jun 17 at 5:41
• You can do direct input δ ¹⁸O if you can use fontspec package and have a suitable font (\documentclass{article} \usepackage{fontspec} \setmainfont{Noto Serif} \begin{document} δ ¹⁸O \end{document}) but better to use the chem packages. Jun 17 at 6:35
• Since discussion associated with the answers indicates that the question is about setting chemical notation, I have added a tag to that effect. (It would have been useful to include this information in the original question.) Jun 17 at 22:17

(I rewrote the answer to avoid creating any kind of impression that I might somehow be claiming that one LaTeX chemistry package might be "better" than another. For a broad examination of the pros and cons of various LaTeX chemistry packages, please check out the posting Typesetting Chemical Formulas.)

First, assuming that the "raised-18-upright-capital-O" denotes a particular isotope of oxygen, I strongly recommend you employ the macros of a LaTeX chemistry package to typeset chemical formulas and equations. For instance, you could load the mhchem package and employ its \ce macro.

Second, for the upright-delta symbol, how to proceed depends on which text and math font families you employ:

• If your document employs the default fonts (Computer Modern), you could load the upgreek package and employ that package's \updelta macro instead of \delta.

• If you wish to use Times Roman fonts for your document -- I raise this point because the glyphs shown in the OP's screenshots look like they could be from the Times Roman family -- you could do so by loading the newtxtext and newtxmath packages. Happily, the \newtxmath also provides a macro called \updelta that you could use for your chemical formula.

• According to the user guide of the mhchem package, other packages (besides upgreek and \newtxmath) that provide access to a macro called \updelta are textgreek, kpfonts, mathdesign, fourier, textalpha, newpxmath, and unicode-math.

• Interestingly, if one of these font packages is loaded, the \ce macro will automatically use the upright greek letter -- here, \updelta -- while evaluating the expression \ce{\delta^18O}.

I suppose that the slight gap after the upright lowercase-delta symbol helps clarify that we're not dealing "delta raised to the 18th power".

\documentclass{article} % or some other suitable document class
\usepackage{newtxtext,newtxmath} % Times Roman fonts (text and math)
\usepackage{mhchem} % for \ce macro

\begin{document}
$\delta$ vs.\ $\updelta$

$\updelta\ce{^18O}$

\ce{\delta^18O} % note use of "\delta" _inside_ "\ce"
\end{document}

• Do you feel there is too much blank between \updelta and \ce{^18O}? Jun 17 at 6:00
• @Y.zeng - $\ce{^{18}O}$ is very helpful because it incorporates the meaning of what you're writing about. (The \ce macro works in both text and math mode.) In contrast, ${}^{18}\mathrm{O} does not convey any meaning, does it? – Mico Jun 17 at 6:11 • Okay, I will use this one $\updelta\ce{^18O}$ Jun 17 at 6:13 • I’ll note that if you use chemmacros rather than mhchem, you get the upright letters ‘for free’, even in textmode: \chemdelta\ch{^{18}O}. Jun 18 at 2:13 • @bradrn \chemdelta\ce{^{18}O} also works “out of the box” with only loading mhchem (as both chemmacros and mhchem load chemgreek behind the scene). However, without specifying how upright Greek letters should be printed \chemdelta gives an italic delta. Jun 18 at 9:28 Use package upgreek, and then use \updelta. \documentclass{article} \usepackage{upgreek} \begin{document}$\updelta^{18} \mathrm{O}$\end{document}  This should give you the following: • Assuming that 18-before-O denotes an isotope of oxygen, you should do yourself a big favor and (a) load the mhchem package and (b) write either \ce{^18O} or, slightly easier to parse, \ce{^{18}O}. – Mico Jun 17 at 5:52 • @Mico If I do as you said, the blank between \delta and \ce{^18O} is too big. The code is $\updelta\ce{^18O}\$ Jun 17 at 5:58
• @Y.zeng - If the expression really is about a particular isotope of oxygen, there should be a slight gap between \updelta and \ce{^{18}O}. In the screenshot I posted with my answer, there is such a gap, which helps to make clear that we're not talking about the 18-th power of \updelta but, rather, \updelta followed by an expression for a particular isotope of oxygen.
– Mico
Jun 17 at 6:03
• @Mico I see they are the same with gap and without the gap. Jun 17 at 6:05
• @Y.zeng - Sorry, I don't understand your latest comment. Which things are "the same"?
– Mico
Jun 17 at 6:07

The unicode-math package provides both \updelta,\mupdelta, and \symup{\delta}. It requires LuaLaTeX or XeLaTeX. I recommend that you use this if you can and legacy 8-bit math fonts if you have to.

If you have to, many other packages provide either \updelta or \deltaup.

There are only two 8-bit TeX encodings with upright Greek lowercase letters: OML (which contains Latin and Greek math symbols) and LGR (which covers polytonic Greek). You can load an OML-encoded upright font with isomath and then use \mathrm{\delta} as you thought.. The Math Design fonts are some of the only 8-bit math fonts that support upright lowercase Greek.

\documentclass{article}
\usepackage{amsmath}
\usepackage[utopia]{mathdesign}
\usepackage[rmdefault=mdput, OMLmathrm]{isomath}

\begin{document}
\begin{align*}
&\mathrm{\delta}^{18}\mathrm{O} \\
&\delta^{18}\mathrm{O}
\end{align*}


The above uses mdput, or Math Design Utopia, which is also compatible with fourier. The available options (Math Design Garamond, Utopia or Charter) are documented in section 4.2.2 of the isomath manual.

If you want to use an 8-bit font other than these, you would declare it as a symbol alphabet. Since Euler uses the same mapping for its Greek and Latin letters as the standard OML, but is technically declared as a U encoding, the above will not work for Euler, but the following will:

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathpazo}

\DeclareMathAlphabet{\mathrm}{U}{zeur}{m}{n}
\SetMathAlphabet{\mathrm}{bold}{U}{zeur}{b}{n}

\begin{document}
\begin{align*}
&\mathrm{\delta}^{18}\mathrm{O} \\
&\delta^{18}\mathrm{O}
\end{align*}
\end{document}


A few notes: Hermann Zapf originally designed AMS Euler to complement the font Concrete (for DEK’s book, Concrete Mathematics), but he also designed Palatino and Optima, which also make excellent complements to it. You also might prefer to use a different alphabet for upright math symbols, perhaps calling it \symup, and leave \mathrm unchanged for text such as if.

If your 8-bit font has its upright Greek letters in different slots, you should first look for a package that defines symbols such as \updelta, such as upgreek. Most Greek text fonts do not have them, however. This minimal example shows how to do it with a LGR-encoded font (Tempora, complementing Times, but for practical real-world use, you would probably want newtxmath for this).

documentclass{article}
\usepackage[LGR,T1]{fontenc}
\usepackage{amsmath}
\usepackage{mathptmx}

\DeclareSymbolFont{elup}{LGR}{Tempora-TLF}{m}{n}
\SetSymbolFont{elup}{bold}{LGR}{Tempora-TLF}{b}{n}

\DeclareMathSymbol{\updelta}{\mathalpha}{elup}{"64}

\begin{document}
\begin{align*}
&\updelta^{18}\mathrm{O} \\
&\delta^{18}\mathrm{O}
\end{align*}
\end{document}


This also works for Computer Modern:

\documentclass{article}
\usepackage[LGR,T1]{fontenc}
\usepackage{amsmath}

\DeclareSymbolFont{elup}{LGR}{cmr}{m}{n}
\SetSymbolFont{elup}{bold}{LGR}{cmr}{b}{n}

\DeclareMathSymbol{\updelta}{\mathalpha}{elup}{"64}

\begin{document}
\begin{align*}
&\updelta^{18}\mathrm{O} \\
&\delta^{18}\mathrm{O}
\end{align*}
\end{document}


The layouts of LGR and OML are documented in “LaTeX Font Encodings,” or else a specific package might document its own custom encoding.

Finally, you can use any LGR-encoded Greek text font in math mode (such as the ones from the Greek Font Society) with the mathastext package.

• I am very curious why you know so much! I want to good at Latex as you! Jun 18 at 6:59

Simple: Want it? Write it. Compile with xelatex or lualatex and use a suitable font:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\def\su#1{\textsuperscript{#1}}

\begin{document}
δ\su{81} O


%want italic? alright!

{\it δ} \su{81} O
\end{document}

• This works, but only in text mode with no unusual formatting. For many chemistry papers, the OP probably needs math mode. It would also come out as italicized or small caps if the surrounding text is. But \textnormal{δ} would work in both modes. Jun 17 at 23:43